Skip to content

Instantly share code, notes, and snippets.

View monajalal's full-sized avatar
🎯
Focusing

Mona Jalal monajalal

🎯
Focusing
View GitHub Profile
@monajalal
monajalal / x360ce.ini
Last active January 14, 2017 02:53
mona's x360ce.ini for #gtav #gta5
[Options]
UseInitBeep=1
Log=0
Console=0
DebugMode=0
InternetDatabaseUrl=http://www.x360ce.com/webservices/x360ce.asmx
InternetFeatures=1
InternetAutoload=1
AllowOnlyOneCopy=1
ProgramScanLocations=C:\Program Files,C:\Program Files (x86)
#Mona trying to make it work for Rockstar GTAV
from __future__ import print_function
import csv
import glob
import hashlib
import sys
import os
import urllib
import zipfile
@monajalal
monajalal / make_array.py
Created November 29, 2016 01:31
creating a database for vidoes
import collections
import sys, os
sys.path.append("/u/j/a/jalal/lib/lib64/python/")
import psycopg2
try:
conn = psycopg2.connect("dbname='tuffydb' user='tuffer' host='localhost' password='strongPassword'")
8UvbIjb.txt []
DoDDAjC.txt [u'fire hydrant']
eiTnGH7.txt [u'person', u'person', u'person', u'person']
3BL69iF.txt []
atllz.txt []
8UIkAz2.txt [u'cup', u'laptop']
DwZ6ckd.txt [u'cat']
7knjSZC.txt [u'sandwich']
51N4n9g.txt []
0VfGAHn.txt []
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 4. in line 1.
1,002qtwH.txt,bed,47%,dog,55%
2,0066Z9W.txt,person,57%
3,0082B22.txt,
4,008BdUz.txt,train,68%
5,00c5Zm8.txt,train,61%,car,59%,car,58%
6,00EUnvm.txt,pizza,59%
7,00Iz1L9.txt,car,53%
8,00tIJI6.txt,
9,00ucuja.txt,car,43%,cow,46%
10,00WLtUB.txt,
import sys
import gensim
import nltk
from gensim.models import word2vec
from nltk.corpus import stopwords
from nltk.corpus import wordnet
import logging
import re
import itertools
import glob
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 4. in line 1.
1,002qtwH.txt,bed,47%,dog,55%
2,0066Z9W.txt,person,57%
3,0082B22.txt,
4,008BdUz.txt,train,68%
5,00c5Zm8.txt,train,61%,car,59%,car,58%
6,00EUnvm.txt,pizza,59%
7,00Iz1L9.txt,car,53%
8,00tIJI6.txt,
9,00ucuja.txt,car,43%,cow,46%
10,00WLtUB.txt,
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 5 columns, instead of 4. in line 3.
1,262145.txt,umbrella,carrot,person
2,262146.txt,person,skis,backpack
3,524291.txt,dog,person,frisbee
4,393223.txt,toothbrush,person
5,393224.txt,tie,person
6,524297.txt,person,bear
7,393227.txt,person,skateboard
8,131084.txt,motorcycle,person
9,393230.txt,person,skis
10,524311.txt,chair,person,remote