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
| s = [1,5,10,5,10,2000,5,1,2,100_000_000,5,100_000,10] | |
| d = ["asd" * ss for ss in s] | |
| import sys | |
| xx = [sys.getsizeof(x) for x in d] | |
| print(xx) | |
| import more_itertools | |
| def LengthChunker(iterable, length = 5): | |
| return more_itertools.ichunked(iterable, length) |
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
| import difflib | |
| import sys | |
| if len(sys.argv) < 3: | |
| print("Usage: %s string1 string2" % sys.argv[0]) | |
| sys.exit() | |
| a = sys.argv[1] | |
| b = sys.argv[2] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #include <Adafruit_SoftServo.h> // SoftwareServo (works on non PWM pins) | |
| const int _foodServoPin = 0; | |
| const int _foodButtonPin = 1; | |
| Adafruit_SoftServo foodServo; | |
| int servoAngle = 0; | |
| int foodButtonState = 0; | |
| unsigned long lastServe; |
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
| # full uni | |
| for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do mkdir -v /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}; ls -1 /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o | cut -d '.' -f1 | sort -u | parallel --progress --results /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o} -j 30 ./asd -i /vol/tensusers/lonrust/speech/comp-o/fulluni --padding -o /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o} -r /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o --limit-to {} --debug none -a ${a} -l ${l} -w weighted -m bestinfo --reverse -O ${o}; find /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}/ -name "stdout" | xargs -I {} sh -c 'grep "^fv" {}' > /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info; done; done; done | |
| echo "ins/del#-50#-20#-10#-5#-4#-3#-2#-1#1#2#3#4#5#10#20#50"; for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do echo -n "$l#"; for o in -50 -20 -10 -5 -4 -3 -2 -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
| for BACKOFF in ngram fullnpref; do for COMP in g; do for PART in aa ab ac ad ae af ag ah ai aj ak al; do echo "./rescore -o /scratch/lonrust/cococpypv3/models/ -m mediargus_4S_W250_t2_T2_s10_p0_v2_train -M nbest-${COMP}-${PART} --testinputfiles /home/lonrust/nbest-comp-files/comp-${COMP}.${PART}.txt -O /scratch/lonrust/cococpypv3/nbest_output/${BACKOFF}/comp-${COMP} -B ${BACKOFF} --debug info"; done; done; done |
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
| import sys | |
| unigrams = {} | |
| bigrams = {} | |
| trigrams = {} | |
| quadgrams = {} | |
| with open('/scratch/lonrust/cococpypv3/fixed_derived/1bw_4S_W100_t2_T2_s10_p0_v2_train.copamo.1', 'r') as f: | |
| for line in f: | |
| tokens = line.strip().split("\t") |
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
| import sys | |
| from operator import itemgetter | |
| from os import listdir | |
| from os.path import isfile, join | |
| nbest_path = sys.argv[1]#"/scratch/lonrust/cococpypv3/input/nbest/comp-c" | |
| output_path = sys.argv[2]#"/scratch/lonrust/cococpypv3/nbest_rescored/comp-c" |
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
| export W=2 | |
| export T=2 | |
| export t=2 | |
| export SAMPLES=10 | |
| export DOMAIN=$(dnsdomainname) | |
| if [ ${DOMAIN} = "science.ru.nl" ]; then | |
| OUTPUTPREFIX=/scratch/lonrust/cococpypv3 | |
| COCOCPYPPREFIX=/home/lonrust/Software/cococpyp |
NewerOlder