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
<?php | |
/* | |
* Bitstorm - A small and fast Bittorrent tracker | |
* Copyright 2008 Peter Caprioli | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
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
## The basics | |
print('Hello world') | |
## Primatives types | |
a_string = 'hithere' | |
a_int = 5 | |
a_float = 5.5 | |
a_list = [1, 2, 3] | |
a_tuple = tuple(a_list) # tuple is an immutable list | |
a_dict = {'key': 'value'} # dict is a hash map |
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
#include <occi.h> | |
#include <stdio.h> | |
using namespace oracle::occi; | |
int main(int argc, char *argv[]) | |
{ | |
auto env = Environment::createEnvironment(); | |
auto conn = env->createConnection("username", "password", "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=XE)))"); |
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
func BenchmarkSingleGoroutine(b *testing.B) { | |
in := make(chan struct{}) | |
out := make(chan struct{}) | |
go func(in, out chan struct{}) { | |
for { | |
b := <-in | |
out <- b | |
} | |
}(in, out) |
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
package myList; | |
import myList.List; | |
import org.junit.Before; | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
/** | |
* Created by chris on 4/3/14. | |
*/ |
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/python | |
# rtorrent_xmlrpc | |
# (c) 2011 Roger Que <[email protected]> | |
# | |
# Python module for interacting with rtorrent's XML-RPC interface | |
# directly over SCGI, instead of through an HTTP server intermediary. | |
# Inspired by Glenn Washburn's xmlrpc2scgi.py [1], but subclasses the | |
# built-in xmlrpclib classes so that it is compatible with features | |
# such as MultiCall objects. |