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
class UserActions(HasManyView): | |
def index(self): | |
page = int(request.args.get('page', PAGE)) | |
per_page = int(request.args.get('per_page', PER_PAGE)) | |
mandate = request.args.get('mandate', MANDATE) | |
rel_spec = parse_mandate(mandate) | |
results = self.obj.find(self.spec, | |
self.rel_name, | |
rel_spec, | |
page, |
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
impl<T> IndexMut<u8> for [T] { | |
fn index_mut<'a>(&'a mut self, _index: &u8) -> &'a mut T { | |
self[_index as uint] | |
} | |
} |
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
from bitarray import bitarray, bitdiff | |
import random | |
from _skein import skein1024 | |
def main(): | |
min_rand = None | |
min_diff = 600 | |
target = bitarray(str(bin(int('5b4da95f5fa08280fc9879df44f418c8f9f12ba424b7757de02bbdfbae0d4c4fdf9317c80cc5fe04c6429073466cf29706b8c25999ddd2f6540d4475cc977b87f4757be023f19b8f4035d7722886b78869826de916a79cf9c94cc79cd4347d24b567aa3e2390a573a373a48a5e676640c79cc70197e1c5e7f902fb53ca1858b6', 16)))[2:].zfill(1024)) | |
while(True): |
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
public void setState(String state) { | |
int counter = 0; | |
int size = BOARD_WIDTH * BOARD_HEIGHT; | |
this.board = new Player[BOARD_HEIGHT][BOARD_WIDTH]; | |
for (int i = 0; i < size; i++) { | |
String sq = String.valueOf(state.charAt(i)); | |
if (x.getName().equals(sq)) { | |
counter++; | |
this.board[i / BOARD_WIDTH][i % BOARD_WIDTH] = x; | |
} |
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
import sys | |
import requests | |
import simplejson as json | |
class ReviewRetriever: | |
def __init__(self, dept, key): | |
self.key = key |
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
Volkswagon v = new Volkswagon(); | |
public class smallClown extends Clown { | |
public int hashCode(){ | |
v.getInCar(new smallClown("foo", 12.0)); | |
super(); | |
} | |
} |
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
" ======== | |
" Filetype | |
" ======== | |
filetype off | |
filetype plugin indent on | |
" ======== | |
" General Setup | |
" ======= | |
set nocompatible |