Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View a7r3's full-sized avatar
👩‍💻
<- All day, all night

Arvindraj a7r3

👩‍💻
<- All day, all night
View GitHub Profile
@a7r3
a7r3 / swap.c
Last active February 11, 2020 11:00
#include <stdio.h>
void main() {
int a = 10;
int b = 1;
int temp;
printf("%d %d", a, b);
temp = a;
a = b;
@a7r3
a7r3 / bruh.sh
Created February 1, 2020 08:02
Make your computer "bruh" at you
while true; do
random=$((1 + RANDOM % 8))
for ((i=0;i<$random;i++)); do
echo -en "\t"
done
echo -e "\033[1;3${random}mbruh\033[0m";
sleep 1;
done
# class Graph:
# list of edges with cost
# heuristic of each edge
class Graph:
def __init__(self):
self.edges = {
'S': [('A', 6), ('B', 5), ('C', 10)],
'A': [('E', 4)],
'B': [('E', 6), ('D', 7)],
95,85
85,95
80,70
70,65
60,70
@a7r3
a7r3 / data.csv
Last active February 3, 2019 18:29
color type origin stolen
red sports domestic yes
red sports domestic no
red sports domestic yes
yellow sports domestic no
yellow sports imported yes
yellow suv imported no
yellow suv imported yes
yellow suv domestic no
red suv imported no
class Point:
x = None
w = None
def __init__(self, x):
self.x = x
self.w = -1
points = [
# Age, Income, Student, Credits, Bhai or not
@a7r3
a7r3 / knn.py
Created January 25, 2019 07:39
import operator
class Point:
x = None
y = None
d = None
q = None
def __init__(self, x, y, d, q):
self.x = x
class Cluster:
x = None
y = None
def __init__(x,y):
self.x = x
self.y = y
count = int(input("Enter the number of points >"))
numbers = list(map(int, input("Enter the numbers > ").split(" ")))
numbers.sort()
cluster_centers = {}
for x in numbers:
cluster_centers[x] = -1
print(numbers)
import java.util.*;
import java.io.*;
class Tokenizer {
private static List<String> keywords = new ArrayList<>();
private static List<String> identifiers = new ArrayList<>();
private static List<String> special = new ArrayList<>();
private static List<String> preproc = new ArrayList<>();
private static List<String> brackets = new ArrayList<>();