Skip to content

Instantly share code, notes, and snippets.

View DengYiping's full-sized avatar
:octocat:
Available for hiring

Yiping Deng DengYiping

:octocat:
Available for hiring
  • Jacobs University Bremen
  • Dublin, Ireland
  • 15:35 (UTC -12:00)
  • LinkedIn in/yipingdeng
View GitHub Profile
theory poly
imports Main HOL Nat
begin
(*
* Power function
*)
primrec pow :: "nat \<Rightarrow> nat \<Rightarrow> nat" where
"pow x 0 = Suc 0"
| "pow x (Suc y) = x * pow x y"
theory ExponentialDiophantine
imports Main Nat Int Complex Real HOL
begin
(*
* second order recurrence function
* the first argument is the index
* the second argument is the b in the recurrence
*)
fun Abn :: "nat \<Rightarrow> int \<Rightarrow> int" where
package util
import java.util.concurrent.locks.ReentrantReadWriteLock
/**
* Created by Scott on 9/12/16.
*/
class ReadWriteLocker {
private val rwlock = new ReentrantReadWriteLock()
@DengYiping
DengYiping / 0_reuse_code.js
Created August 15, 2016 08:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# -*- coding: utf-8 -*-
__author__ = 'Scott Deng'
import requests
import sys
def check(uri):
test_post = {
@DengYiping
DengYiping / crawling_question_of_the_day.py
Last active November 14, 2015 02:15
this is the code for crawling college board question of the day and store them in mongoldb. My blog: www.geekinguniverse.com
#-*- coding: UTF-8 -*-
import requests
import re
from bs4 import BeautifulSoup
import pymongo
import datetime
from Queue import Queue
from threading import Thread