Skip to content

Instantly share code, notes, and snippets.

View Rubix982's full-sized avatar
🇵🇰

Saif Ul Islam Rubix982

🇵🇰
View GitHub Profile
@Rubix982
Rubix982 / geojson_test.geojson
Created August 9, 2021 16:50
Testing geojson generation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rubix982
Rubix982 / Final AI Preperation.md
Created June 22, 2021 16:51
As the title states

All topics

  • AI Bayesian Network
  • Decision Trees ID3
  • K-Means Clustering
  • Confusion Matrix Performance Evaluation
  • Naive Bayes Classifier
  • Bayes Theorem
  • Probability
  • Uncertainty
@Rubix982
Rubix982 / Final AI Lab Preparation.md
Last active June 22, 2021 16:46
Just the final AI Lab Notes

AI Lab Preparation

K Nearest Neighbors

  1. Code,
# calculate the Euclidean distance between two vectors
def euclidean_distance(row1, row2):
 distance = 0.0
@Rubix982
Rubix982 / git-tree.txt
Created June 15, 2021 15:12
Alias for git to produce tree in terminal
git config --global alias.tree 'log --graph --decorate --pretty=oneline --abbrev-commit --all'
@Rubix982
Rubix982 / SoftwareEngineeringMeeting.md
Created April 24, 2021 14:53
SE Assignment # 2 Notes
  • Data Storage System
  • Document Database, using one such as DynamoDB
    • In order to optimize the record
    • SQL systems guarantee ACID
    • Document databases are eventually
    • Python, but not always C/C++ when writing a DB engine
  • Requirement Gathering
    • It depends
    • There are product based companies
  • There are consulting based companies
@Rubix982
Rubix982 / DNS.py
Created April 10, 2021 06:48
The `data.json` is a quick web scrap of potential A, NS, and MX records from about 150 DNS records, generated from `DNS.py`. A list of 499 DNS records was scraped from some domain registry, not sure where. For now, only the results of the first 150 have been put into `data.json`. Feel free to make a folder `./data/` at the same root level, put `…
import dns.resolver
import os
import json
def get_csv_domain_data():
folder_path = str(os.path.abspath(__file__))[
0:-len(os.path.basename(__file__))] + "data/"
file_name = "test.csv"
@Rubix982
Rubix982 / raw_sock.c
Created April 6, 2021 05:42
Short C program to sniff packets from the Network OSI Layer, with the IP protocl.
// Courtesy of https://squidarth.com/networking/systems/rc/2018/05/28/using-raw-sockets.html
// $ gcc raw_rock.c -o raw_sock && sudo ./raw_sock
// raw_sock.c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<netinet/ip.h>
#include<sys/socket.h>
#include<arpa/inet.h>
@Rubix982
Rubix982 / encodings.csv
Last active March 23, 2021 19:49
Extract UTF 8 encodings from W3Schools
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 3.
' ','%20',
'!','%21',
'"','%22',
'#','%23',
'$','%24',
'%','%25',
'&','%26',
''','%27',
'(','%28',
')','%29',

Contributor License Agreement

The following terms are used throughout this agreement:

  • You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
  • Project - is an umbrella term that refers to any and all IOMED Medical Solution S.L. open source projects.
  • Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.
  • Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with IOMED Medical Solution S.L., contributors or maintainers.

1. Grant of Copyright License.

# For datasets starting with D
import random
for j in range(0, 10):
n = random.randint(90,100)
arr = []
for i in range(0, n):
arr.append(random.randint(0, 100))
print(arr)
# For datasets starting with F