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
#!/bin/bash | |
grep 'heap memory' access.log | cut -f12,16 -d" " | awk '{if ($1 > 7500) {print $1, $2}}' |
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
#!/bin/bash | |
for X in $(egrep -o "[A-Z]\w*Exception" access.log | sort | uniq); | |
do | |
echo -n -e "processing $X\t" | |
grep -c "$X" access.log | |
grep "$X" -m 1 -A 4 access.log | |
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
#!/bin/bash | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.tar.xz) tar zxvf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $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
1. crop image | |
python scripts/preprocessing/preprocess_images.py --input-dir ../formula_images --output-dir ../images_processed | |
2. formula normalization | |
python scripts/preprocessing/preprocess_formulas.py --mode normalize --input-file ../im2latex_formulas.lst --output-file | |
formulas.norm.lst | |
3. generate lists | |
python scripts/preprocessing/preprocess_filter.py --filter --image-dir ../images_processed --label-path formulas.norm.lst | |
--data-path ../im2latex_train.lst --output-path train.lst |
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
# ---------------------------------------------------------------------------- # | |
# Standard setup stuff. In general you will want to alter the formatters | |
# | |
[formatters] | |
keys: detailed,simple | |
[handlers] | |
keys: console | |
[formatter_simple] |
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
python code |
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
tail -f server.log | grep -a duration | cut -f2,13 –d” “ | awk ‘{if ($2 > 340) { print | |
$2}}’ |
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
.classpath file | |
<?xml version="1.0" encoding="UTF-8"?> | |
<classpath> | |
<classpathentry kind="src" path="src/main/java"/> | |
<classpathentry kind="src" path="src/main/resources"/> | |
<classpathentry kind="src" path="src/test/java"/> | |
. | |
. |
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
If throwing an exception, I would choose one of these more descriptive classes: | |
AssertionError | |
IllegalStateException | |
In general, checked Exceptions are supposed to be recoverable, and therefor it is worthwhile catching them. | |
In this case, using an unchecked exception, I assume it should never occur during normal operation and probably | |
indicates an unrecoverable coding error. |
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
{ | |
"form": "JN3P8g", | |
"form_name": "会员注册", | |
"entry": { | |
"serial_number": 7, | |
"field_1": "xxx", | |
"field_2": "18712717072", | |
"x_field_weixin_nickname": "Bachelordom", | |
"x_field_weixin_gender": "男", | |
"x_field_weixin_country": "中国", |
NewerOlder