Skip to content

Instantly share code, notes, and snippets.

View kaivalyar's full-sized avatar

Kai kaivalyar

View GitHub Profile
import csv
import cStringIO
import codecs
import glob
import json
import requests
def fetch_jsons():
url = ('https://summerofcode.withgoogle.com/api/program/current/project/'
Project Title Student Display Name Organization Name Mentors
Key mapping GUI Tomasito665 Mixxx DJ Software RJ Ryan, Ferran Pujol Camins
YAPDNS system64 The Honeynet Project Pietro Delsante, Fedele Mantuano, Andrea De Pasquale
FFv1 P frame support sdolganov FFmpeg Reynaldo Verdejo, michaelni
coala: Integrating coala with the Eclipse IDE Sheikh Araf Python Software Foundation Harsh Dattani, Lasse Schuirmann (sils1297), AbdealiJKothari
User interfaces for Tracker Dilushi Sustainable Computing Research Group ( SCoRe ) Dinith Minura, Namal Jayasuriya, Rumesh
File Support izgzhen Mozilla Manishearth
KolibriOS. Development of TLS/SSL library DenisKarpenko KolibriOS Jeffrey A., Pathoswithin
IPFS friendly & distributed version of Amber skbly7 Berkman Center for Internet and Society Genève
Cache layer for jpf-nhandler Jayton Java Pathfinder Team franck, Nastaran, Cyrille Artho
@kaivalyar
kaivalyar / question.c
Created March 13, 2017 19:50
Simulation to explain answer to pointers question
#include <stdio.h>
int main () {
int c[3] = {4, 5, 6}; // an array is basically a pointer to the first element
void *d = c; // cast int* to void*
d += 1; // increment the void pointer
printf("%08x\n", *((int *)d));
}
@kaivalyar
kaivalyar / pseudocode-exploration.txt
Last active March 16, 2017 07:06
Checking aima-pseudocode for 4th edition
... AimaCode/aima-pseudocode $ # I ran the following command from the aima-pseudocode directory:
... AimaCode/aima-pseudocode $ cat md/*.md | grep -i aima4
... AimaCode/aima-pseudocode $
... AimaCode/aima-pseudocode $ # the output was blank - the word aima4 has not been used anywhere
... AimaCode/aima-pseudocode $
... AimaCode/aima-pseudocode $ # i then checked for aima3:
... AimaCode/aima-pseudocode $ cat md/*.md | grep -i aima3
## AIMA3e
## AIMA3e
.
@kaivalyar
kaivalyar / test.py
Created May 24, 2018 23:45
PracMLN Exact Test
mln = None
db = None
def set():
from pracmln import MLN, Database, query
import sys
import os
global mln
global db
pth = os.path.join(sys.argv[1], 'wts.pybpll.smoking-train-smoking.mln')
@kaivalyar
kaivalyar / test.py
Last active August 29, 2018 15:46
PracMLN MC-SAT Test
import timeit
import sys
import os
import time
from pracmln import query
from pracmln import MLN, Database, query
def main(arg='.'):
#if (len(sys))
pth = os.path.join(arg, 'wts.pybpll.smoking-train-smoking.mln')
@kaivalyar
kaivalyar / test.py
Created June 6, 2018 01:19
PracMLN Gibbs Test
import timeit
import sys
import os
import time
from pracmln import query
from pracmln import MLN, Database, query
def main(arg='.'):
#if (len(sys))
pth = os.path.join(arg, 'wts.pybpll.smoking-train-smoking.mln')
@kaivalyar
kaivalyar / test.py
Last active June 6, 2018 01:20
PracMLN WCSP Test
import timeit
import sys
import os
import time
from pracmln import query
from pracmln import MLN, Database, query
def main(arg='.'):
#if (len(sys))
pth = os.path.join(arg, 'wts.pybpll.smoking-train-smoking.mln')
kaivalya@kaivalyarawal ~/Documents/WORK/GSoC/Gists/TaxonomiesInfer/MC-SAT $ bash test.sh
Traceback (most recent call last):
File "test.py", line 27, in <module>
main(sys.argv[1])
File "test.py", line 15, in main
query(queries='has_sense, action_role', method='MC-SAT', mln=mln, db=db, verbose=False, multicore=True).run()
File "/home/kaivalya/Documents/WORK/GSoC/kPracMLN/python3/pracmln/mlnquery.py", line 249, in run
result = inference.run()
File "infer.pyx", line 189, in pracmln.mln.inference.infer.Inference.run
File "mcsat.pyx", line 240, in pracmln.mln.inference.mcsat.MCSAT._run
@kaivalyar
kaivalyar / Performance_cy.csv
Created June 10, 2018 22:56
PracMLN Performance
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 1. in line 1.
Inference, EnumerationAsk, 0.1270275115966797, 0.033542633056640625
()
()
Inference, MC-SAT, 0.4272785186767578, 0.4875507354736328
Inference, GibbsSampler, 0.12882208824157715, 0.12560558319091797
Inference, WCSPInference, 0.14586448669433594, 0.03891730308532715
Inference, EnumerationAsk, 0.12506461143493652, 0.03306984901428223
()
()
Inference, MC-SAT, 0.3744349479675293, 0.4124472141265869