This python2 program reads in a csv of kerberoses (i.e. from Google Docs), creates a gift-giving chain, and sends cruftmas emails. The CSV should include column headings (i.e. Kerberos, Time, etc.) so that you can choose the correct heading. It asks for your athena password so that it can log into the MIT SMTP server and send the emails; it can also dump a list of assignments for you to send yourself.
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
/// GENERATED C, DO NOT EDIT | |
#ifndef bc_h_ | |
#define bc_h_ | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
#include <stdint.h> | |
uint8_t bc_has_err(); | |
int8_t bc_get_last_err(char** result); |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <bc.h> | |
/// See bc.h at xxx for the API you have access too. | |
/// Note: the API is not thread safe; don't use pthreads. |
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 battlecode as bc | |
import random | |
import sys | |
import traceback | |
print("pystarting") | |
# A GameController is the main type that you talk to the game with. | |
# Its constructor will connect to a running game. | |
gc = bc.GameController() |
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
'''More efficient dense layers for DenseNets. | |
author: James Gilles.''' | |
import torch | |
from torch import nn, autograd | |
class RepeatedConcat(nn.Module): | |
'''Hack for faster DenseNets. | |
Allocates O(n) memory for n concatenated layers, | |
instead of O(n^2). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
nvcc -arch sm_61 -O3 -L/usr/local/lib -lboost_python -I/usr/include/python2.7/ -Xcompiler -fPIC --shared test_python.cu -o test_python.so |
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/sh | |
echo "don't run this" | |
exit 1 | |
git init | |
mv .git git | |
ln -s git .git | |
while true | |
do |
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
#![feature(plugin)] | |
#![plugin(peg_syntax_ext)] | |
extern crate peg; | |
#[derive(Debug, PartialEq, PartialOrd)] | |
pub enum NumericConstant { | |
U64(u64), | |
I64(i64), | |
F64(f64), |