This file contains 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
#!/bin/bash | |
# pass number of threads as $1 | |
# runs prefix3-dl.sh with several prefixes simultaneously | |
seq -f '%03g' 0 999 | xargs -I {} -n 1 -P $1 ./prefix3-dl.sh {} | |
# as of writing this, the 999 can be changed to 342 | |
# that will increase over time as more sequences are added |
This file contains 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
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set cc=81 | |
set number | |
set cursorline |
This file contains 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
4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4...... | |
52...6.........7.13...........4..8..6......5...........418.........3..2...87..... | |
6.....8.3.4.7.................5.4.7.3..2.....1.6.......2.....5.....8.6......1.... | |
48.3............71.2.......7.5....6....2..8.............1.76...3.....4......5.... | |
....14....3....2...7..........9...3.6.1.............8.2.....1.4....5.6.....7.8... | |
......52..8.4......3...9...5.1...6..2..7........3.....6...1..........7.4.......3. | |
6.2.5.........3.4..........43...8....1....2........7..5..27...........81...6..... | |
.524.........7.1..............8.2...3.....6...9.5.....1.6.3...........897........ | |
6.2.5.........4.3..........43...8....1....2........7..5..27...........81...6..... | |
.923.........8.1...........1.7.4...........658.........6.5.2...4.....7.....9..... |
This file contains 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
import os | |
url_base = 'https://uva.onlinejudge.org/external/' | |
volumes = list(range(1,1+17)) + list(range(100,1+133)) | |
for volume in volumes: | |
os.system('mkdir %d'%volume) | |
os.chdir('%d'%volume) | |
for problem in range(100): |
This file contains 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
#!/bin/bash | |
# $1 = ssd block device (such as /dev/sda) | |
sudo hdparm -I $1 | |
sudo hdparm --user-master u --security-set-pass p $1 | |
sudo hdparm --user-master u --security-erase p $1 |
This file contains 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
import sys | |
map_ = dict() | |
for c in 'abcdefghijklmnopqrstuvwxyz': | |
map_[c] = ':regional_indicator_'+c+':' | |
map_['0'] = ':zero:' | |
map_['1'] = ':one:' | |
map_['2'] = ':two:' | |
map_['3'] = ':three:' | |
map_['4'] = ':four:' |
This file contains 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
# the problem is in Ansatsu Kyoushitsu (Assassination Classroom) season 2 episode 12 | |
# the answer is 1/2 * a^3 | |
from math import sqrt | |
from random import random | |
# corner points for a square and cube (+/- 1 in each dimension) | |
SQP = [(1,1),(1,-1),(-1,1),(-1,-1)] | |
CBP = [(1,1,1),(1,1,-1),(1,-1,1),(1,-1,-1),(-1,1,1),(-1,1,-1),(-1,-1,1),(-1,-1,-1)] |
This file contains 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
-- Getting the song list JSON from expand library -- | |
1. Go to AMQ page | |
2. Open developer menu (F12 in firefox) network tab | |
3. Log in | |
4. Set anime list(s) | |
5. Open expand library and wait for it to load | |
6. Filter network tab to WS (websocket) | |
7. Click on the websocket connection | |
8. Open the response tab on the right |
This file contains 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
2005: 3XTr1pl3play2oo5 | |
2006: S1x240JrTBmsqf95DL06FdsTM33H | |
2007: 7sBg8H4x2f3R9C3tm5 | |
2008: Drive!Straight?Turn!Left | |
2009: 1GiantLeap4FRC | |
2010: Breakaway4FRC! | |
2011: 5Time4For3Robots2To1Dance! | |
2012: HotShots!KnowBalance! | |
2013: sAucersFlyRobotsClimb! | |
2014: 3Zones2Goals1Alliance! |
This file contains 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
#include <stdio.h> | |
int main(int argc, char **argv) | |
{ | |
for (int i = 0; i < argc; ++i) | |
printf("argv[%d] = %s\n",i,argv[i]); | |
} |
OlderNewer