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
import shlex | |
import subprocess | |
def main(): | |
jobs = [] | |
job_count = raw_input('number of iterations: ') | |
for i in range(job_count): | |
jobs.append(parameters()) |
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
<html> | |
<head> | |
<title>Chat Example</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
var conn; | |
var msg = $("#msg"); | |
var log = $("#log"); |
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
class bijection(dict): | |
def __setitem__(self, key, value): | |
super(bijection, self).__setitem__(key, value) | |
super(bijection, self).__setitem__(value, key) |
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
% cat main.cc | |
#include <iostream> | |
#include <tuple> | |
using namespace std; | |
auto multi_value_func() -> tuple<int, int, int> { | |
return make_tuple(1,2,3); | |
} |
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
>>> l | |
[('winner0', 'looser0', 0), ('winner1', 'looser1', 1), ('winner2', 'looser2', 2), ('winner3', 'looser3', 3), ('winner4', 'looser4', 4), ('winner5', 'looser5', 5), ('winner6', 'looser6', 6), ('winner7', 'looser7', 7), ('winner8', 'looser8', 8), ('winner9', 'looser9', 9), ('winner10', 'looser10', 10), ('winner11', 'looser11', 11), ('winner12', 'looser12', 12), ('winner13', 'looser13', 13), ('winner14', 'looser14', 14), ('winner15', 'looser15', 15), ('winner16', 'looser16', 16), ('winner17', 'looser17', 17), ('winner18', 'looser18', 18), ('winner19', 'looser19', 19)] | |
# dumps to str: | |
>>> json.dumps(l) | |
'[["winner0", "looser0", 0], ["winner1", "looser1", 1], ["winner2", "looser2", 2], ["winner3", "looser3", 3], ["winner4", "looser4", 4], ["winner5", "looser5", 5], ["winner6", "looser6", 6], ["winner7", "looser7", 7], ["winner8", "looser8", 8], ["winner9", "looser9", 9], ["winner10", "looser10", 10], ["winner11", "looser11", 11], ["winner12", "looser12", 12], ["winner13", "looser13", 13], ["winner14", "looser |
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
#!/usr/bin/python | |
""" | |
This is a handy script to download the media from General Conference for | |
your own use. Execute this script with the appropriate options to download the | |
files you wish. | |
The only non-Python standard library dependency is BeautifulSoup. | |
""" |
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
% cat main.go | |
package main | |
import "flag" | |
import "fmt" | |
import "math" | |
import "rand" | |
import "time" | |
var numprocs *int = flag.Int("procs", 4, "number of processors") |
NewerOlder