Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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
| // usage: | |
| // testDB := testhelpers.NewTestDatabase(t) | |
| // defer testDB.Close(t) | |
| // println(testDB.ConnectionString(t)) | |
| package testhelpers | |
| import ( | |
| "context" | |
| "fmt" | |
| "testing" |
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 | |
| DIR_PATH=$1 | |
| if [ ! -d "$DIR_PATH" ]; then | |
| echo "Directory '$DIR_PATH' not exists" | |
| exit 1 | |
| fi | |
| if [ -z "$GIT_COMMIT" ]; then | |
| echo "No current commit... fail" |
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 | |
| ## Clean-up Comments from Latex Source Files | |
| ## Copyright (c) 2020 Ali Parsai ali@parsai.net | |
| ## Copyright (c) 2021 Thaha Mohammed | |
| ## | |
| ## Dependencies: sponge from moreutils, latexpand, sed, cat, mv, date, cp | |
| ## | |
| ## CAUTION: Use version control or backup your files before using this script. | |
| ## |
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
| \documentclass[tikz,preview, border=5mm]{standalone} | |
| \usepackage{tikz,pgfplots,filecontents} | |
| \pgfplotsset{compat=1.7} | |
| %%% Code for "every nth mark" starts here... | |
| \newcounter{marknumber} | |
| \pgfplotsset{ | |
| error bars/every nth mark/.style={ | |
| /pgfplots/error bars/draw error bar/.prefix code={ |
A quick and dirty syntax translation / conversion reference guide to ease the transition between Python and Julia. This is not meant as a reference to the language. For that you should read the manual.
- Arrays in Julia are indexed starting from 1.
- In Julia classes (i.e. types) don't own methods. Methods are implementations of generic functions and are invoked in a "static style", i.e. instead of Python's str1.rstrip(), we will have rstrip( str1 ), instead of file1.close(), close( file1 ).
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
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Use the koma-script document style | |
| \documentclass{scrbook} | |
| \KOMAoptions{twoside=false} % disable two-side formatting for scrbook | |
| % alternatively, for shorter essay, use the following | |
| % \documentclass{scrartcl} | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Useful packages |
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
| #!/usr/bin/env python2.7 | |
| import time | |
| _URL = 'http://localhost/tmp/derp.html' | |
| _NUMBER = 1000 | |
| def test_urllib2(): | |
| import urllib2 |