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
from collections import defaultdict | |
import logging | |
from pprint import pprint | |
import random | |
import queue | |
import threading | |
from solution import solution |
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
/** | |
* This method returns the entire result from the HTTP response. | |
* | |
* See https://stackoverflow.com/questions/309424/read-convert-an-inputstream-to-a-string | |
* | |
* @param url The URL to fetch the HTTP response from. | |
* @return The contents of the HTTP response. | |
* @throws IOException Related to network and stream reading | |
*/ | |
public static String getResponseFromHttpUrl(URL url) throws IOException { |
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
git log --follow filename | |
# https://stackoverflow.com/questions/3701404/list-all-commits-for-a-specific-file |
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
git diff 15dc8^! | |
git show 15dc8 | |
# https://stackoverflow.com/questions/436362/how-to-diff-a-commit-with-its-parent |
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
find $directory -type f -name "*.mp4" |
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
$ sqlite3 db1.sqlite | |
> ATTACH '/path/to/db2.sqlite' AS mergeme; | |
> BEGIN; | |
> INSERT INTO photos SELECT * FROM mergeme.photos WHERE mergeme.photos.orig_md5 NOT IN (SELECT orig_md5 FROM photos); | |
> COMMIT; | |
> DETACH mergeme; |
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
09-23 15:39:43.273 27543-28352/org.odk.collect.android D/LogHandler﹕ EP, 'null', '1443037182942', 'group./HHQ/name_grp[1]/your_name[1]', '' | |
09-23 15:39:43.273 27543-28352/org.odk.collect.android D/LogHandler﹕ EP, 'null', '1443037183273', 'group./HHQ/name_grp[1]/your_name_check[1]', '' | |
09-23 15:39:50.288 27543-28352/org.odk.collect.android D/LogHandler﹕ LP, 'null', '1443037189949', 'group./HHQ/name_grp[1]/your_name[1]', '' | |
09-23 15:39:50.290 27543-28352/org.odk.collect.android D/LogHandler﹕ LP, 'null', '1443037190289', 'group./HHQ/name_grp[1]/your_name_check[1]', 'no' | |
09-23 15:39:50.324 27543-28352/org.odk.collect.android D/LogHandler﹕ EP, 'null', '1443037190324', 'question./HHQ/name_typed[1]', '' | |
09-23 15:39:58.510 27543-28352/org.odk.collect.android D/LogHandler﹕ LP, 'null', '1443037198510', 'question./HHQ/name_typed[1]', 'Awen' | |
09-23 15:39:58.827 27543-28352/org.odk.collect.android D/LogHandler﹕ EP, 'null', '1443037198826', 'group./HHQ/date_group[1]/system_date[1]', '' | |
09-23 15:39:58.827 27543-28352 |