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
amb_variable_name = [] | |
amb_possible = [] | |
def amb(v, l): | |
""" | |
set global variable for amb evaluator | |
""" | |
amb_variable_name.append(v) | |
amb_possible.append(l) |
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
;;; Startup Screen | |
(setq inhibit-startup-message t) | |
;;; Wrapping Line | |
(setq truncate-partial-width-windows nil) | |
(setq truncate-lines t) | |
;;; Don't make backup files automatically | |
(setq auto-save-default nil) | |
(setq make-backup-files nil) |
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 <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
#include <linux/proc_fs.h> | |
#include <asm/uaccess.h> | |
MODULE_LICENSE("GPL"); | |
MODULE_AUTHOR("wasabiz"); |
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
# coding: utf-8 | |
import tweepy | |
consumer_key = 'Uvd67rNyTjrPF3Dbq87vw' | |
consumer_sec = 'xzbruHo4mZsPNtQ2U90eHhV2Msf3WNwCS3B2Fzxsw' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_sec) | |
auth.set_access_token('155831769-5LOcoO9aU5U4iP70KSGqVYzvvjhJNfehFjGMK4fZ','hqkoLtBDi3z4q8kwEIjQpVSkZDgpqFPnHHywFZKr4do') | |
api = tweepy.API(auth) | |
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
(define dp (make-vector 1000)) | |
(vector-set! dp 0 1) | |
(vector-set! dp 1 1) | |
(define (fib cur dest) | |
(if (> cur dest) | |
(vector-ref dp dest) | |
(begin (vector-set! dp cur (+ (vector-ref dp (- cur 1)) (vector-ref dp (- cur 2)))) | |
(fib (+ cur 1) dest)))) |
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
(define (fib x) | |
(let* ((MAX-N 1000) | |
(dp (make-vector MAX-N #f)) | |
(data (make-vector MAX-N))) | |
(let loop((num x)) | |
(if (vector-ref dp x) | |
(vector-ref data x) | |
(let ((tmp (if (>= 2 num) 1 (+ (loop (- num 1)) (loop (- num 2)))))) | |
(vector-set! dp num #t) | |
(vector-set! data num tmp) |
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 | |
class Stream: | |
def __init__(self, data): | |
self.data = list(data) | |
self.seeker = 0 | |
self.length = len(self.data) | |
self.labels = {} | |
self.update() |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys, traceback, re | |
from fractions import Fraction | |
nil = type('Nil', (), {'__str__': lambda self: '()'})() | |
undef = type('Undef', (), {'__str__': lambda self: '#<undef>'})() | |
f = type('F', (), {'__str__': lambda self: '#f'})() |
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 java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.event.*; | |
import java.io.*; | |
import java.util.*; | |
import static java.lang.Math.*; | |
public class Test extends JPanel { |
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<cstdio> | |
#include<cstring> | |
#include<algorithm> | |
#define max(x,y) ((x>y)?x:y) | |
#define N_MAX 100000 | |
using namespace std; | |
int len[N_MAX]; |
NewerOlder