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
View GitHub Profile
@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
# -*- coding: utf-8 -*-
__author__ = 'Scott Deng'
import requests
import sys
def check(uri):
test_post = {
@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
package util
import java.util.concurrent.locks.ReentrantReadWriteLock
/**
* Created by Scott on 9/12/16.
*/
class ReadWriteLocker {
private val rwlock = new ReentrantReadWriteLock()
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
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"
@DengYiping
DengYiping / .vimrc
Created June 1, 2018 08:14
My own vimrc profile
" File : .vimrc
" Author : Yiping Deng <[email protected]>
" Date : 26.05.2018
" Last Modified Date: 26.05.2018
" Last Modified By : Yiping Deng <[email protected]>
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
@DengYiping
DengYiping / purgeAndroid.txt
Created June 5, 2018 10:05 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@DengYiping
DengYiping / Tweak.xm
Created July 14, 2018 15:26
Code for soul automatic matching.
%hook MatchChatViewController
- (void)requsetStartMactch {
[NSObject cancelPreviousPerformRequestsWithTarget:self];
%orig;
[self performSelector:@selector(requsetStartMactch) withObject:nil afterDelay:0.30];
}
%end