start new:
tmux
start new with session name:
tmux new -s myname
| items = ['name', 'flowrate', 'temperature', 'power', 'log_time', 'created_on'] | |
| csv_data = reduce(add, map(lambda x: reduce(add, map(str, map(x.get, items))), json_format)) |
| template <class number> | |
| void input(number *ptr){ | |
| register char c = getchar_unlocked(); | |
| while (c < 33) | |
| c = getchar_unlocked(); | |
| *ptr = 0; | |
| while (c > 33){ | |
| *ptr = (*ptr * 10) + (c - '0'); | |
| c = getchar_unlocked(); | |
| } |
| #include <bits/stdc++.h> | |
| template <class number> | |
| void input(number *ptr) | |
| { | |
| register char c = getchar_unlocked(); | |
| while (c < 33) | |
| c = getchar_unlocked(); | |
| *ptr = 0; | |
| while (c > 33) | |
| { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /* | |
| * Euler's totient function phi(n). | |
| * http://en.wikipedia.org/wiki/Euler%27s_totient_function | |
| * | |
| * This is an *EXTREMELY* fast function and uses | |
| * several tricks to recurse. | |
| * | |
| * It assumes you have a list of primes and a fast | |
| * isprime() function. Typically, you use a bitset | |
| * to implement the sieve of Eratosthenes and use |
| This is the list of exit codes for wget: | |
| 0 No problems occurred | |
| 1 Generic error code | |
| 2 Parse error — for instance, when parsing command-line options, the .wgetrc or .netrc… | |
| 3 File I/O error | |
| 4 Network failure | |
| 5 SSL verification failure | |
| 6 Username/password authentication failure | |
| 7 Protocol errors |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |