This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrapy | |
BeautifulSoup | |
Nautilius-actions | |
ezodf | |
Pillow | |
requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member | |
http://stackoverflow.com/questions/6500313/why-should-c-programmers-minimize-use-of-new | |
http://stackoverflow.com/questions/655065/when-should-i-use-the-new-keyword-in-c | |
http://www.gotw.ca/gotw/009.htm | |
http://stackoverflow.com/questions/3162030/difference-between-angle-bracket-and-double-quotes-while-including-heade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/1274675/ruby-what-does-warray-mean | |
http://stackoverflow.com/questions/4370960/what-is-attr-accessor-in-ruby | |
http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/ | |
The last expression that is evaluated is automatically returned by the method | |
http://queirozf.com/entries/ruby-map-each-collect-inject-reject-select-quick-reference | |
#ffmpeg | |
http://superuser.com/questions/675342/convert-mp3-to-wav-using-ffmpeg-for-vbr | |
http://stackoverflow.com/questions/548766/writing-module-for-ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) How can I give write-access of a folder to all users in linux? | |
http://superuser.com/a/19333/402332 | |
2)cant-create-any-folder-in-htdocs-on-ubuntu | |
http://superuser.com/a/268996/402332 | |
3) change remote origin | |
http://stackoverflow.com/questions/2432764/change-the-uri-url-for-a-remote-git-repository | |
4)when files not ignored even if specified in .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> lines_data[0] | |
(8, 66.772, 14, 5, 0.027030168289315495, 0.04054525243397324, 0.0, 36.0, 4.489792997064637e+16, 45453772.17738786, 30302514.784925245, 40439167617.50947) | |
>>> lines_data[0] | |
(8, 66.772, 14, 5, 0.027030168289315495, 0.04054525243397324, 0.0, 36.0, 4.489792997064637e+16, 45453772.17738786, 30302514.784925245, 40439167617.50947) | |
>>> lines_data[1] | |
(10, 69.204, 14, 5, 0.0866842126131329, 0.0866842126131329, 0.0, 35.0, 4.332010548523206e+16, 100717918.92086083, 100717918.92086083, 120731290053.8376) | |
>>> lines_data[2] | |
(11, 69.236, 14, 5, 0.06192253818286209, 0.09288380727429314, 0.0, 34.0, 4.330008348258131e+16, 107971097.37718476, 71980731.58478984, 86164235409.22531) | |
>>> lines_data[3] | |
(12, 69.448, 14, 5, 0.01769864460960345, 0.0353972892192069, 1.0, 35.0, 4.316790375532773e+16, 41272928.49085178, 20636464.24542589, 24477257110.58792) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is the use of assert in python | |
http://stackoverflow.com/questions/5142418/what-is-the-use-of-assert-in-python | |
An important difference is that assert statements get ignored if you compile your code with the optimization option. | |
Safely using eval | |
http://lybniz2.sourceforge.net/safeeval.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('instiDatacsv.csv','r') as f: | |
myReader = csv.reader(f) | |
for row in myReader: | |
name = row[1] | |
website = row[5] | |
domain = row[4] | |
insti = Institute(name = name, website = website) | |
insti.save() | |
InstituteDomain(instituteId = insti, domain = domain).save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int64_t ipow(int32_t base, uint8_t exp) { | |
static const uint8_t highest_bit_set[] = { | |
0, 1, 2, 2, 3, 3, 3, 3, | |
4, 4, 4, 4, 4, 4, 4, 4, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ipow(int base, int exp) | |
{ | |
int result = 1; | |
while (exp) | |
{ | |
if (exp & 1) | |
result *= base; | |
exp >>= 1; | |
base *= base; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from http://stackoverflow.com/questions/98153/whats-the-best-hashing-algorithm-to-use-on-a-stl-string-when-using-hash-map | |
unsigned int hash(const char* s, unsigned int seed = 0) | |
{ | |
unsigned int hash = seed; | |
while (*s) | |
{ | |
hash = hash * 101 + *s++; | |
} |
OlderNewer