Skip to content

Instantly share code, notes, and snippets.

On vacation, oh..

Jindong Zhang beordle

On vacation, oh..
Block or report user

Report or block beordle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
flatten = lambda lst: reduce(lambda l,i: l + flatten(i) if isinstance(i, (list,tuple)) else l + [i], lst, [])
print flatten([2, [2, [4, 5, [7], [2, [6, 2, 6, [6], 4]], 6]]])
# -> [2, 2, 4, 5, 7, 2, 6, 2, 6, 6, 4, 6]
beordle / 0_reuse_code.js
Created Jun 13, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View 网络校时.py
# -*- coding: utf-8 -*-
import socket,sys,time
host = ""
port = 37
curtz = 8
View 树梅派定制
sudo rpi-update
sudo apt-get install python-dev
sudo easy_install -U distribute
sudo apt-get update
sudo apt-get install python-setuptools
sudo apt-get install rpi.gpio
sudo apt-get install python-pip
sudo pip install rpi.gpio
sudo easy_install pip
beordle / 网络时间.py
Created Feb 19, 2013
从 网络 校正时间
View 网络时间.py
from socket import *
import datetime,os,struct,time,sys
# Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP
# time server. Run as "" to simply print the time from
# the NTP server. Run as " --set" to set the Linux
# hardware clock (as the super user, of course).
# Based on Simon Foster's simple SNTP client from ASPN Python cookbook.
# Adapted by Paul Rubin; this script lives at:
beordle / 批量改名.py
Created Feb 19, 2013
给同学开网店写的文件批量改名程序 python+Tkinter
View 批量改名.py
from Tkinter import *
import tkSimpleDialog,tkFileDialog,os
from ttk import *
def ask():
a = tkSimpleDialog.askstring('Beordle','Text from:',initialvalue='')
if a==None:
return None,None
b = tkSimpleDialog.askstring('Beordle','Text to:',initialvalue='')
beordle / 圣堂改建.py
Created Feb 19, 2013
圣堂改建 一键大招(削弱前有用)
View 圣堂改建.py
import ctypes,win32ui,win32con,pyHook,pythoncom,time,win32api
def click():
beordle / dota卡尔改建.py
Last active Dec 13, 2015
View dota卡尔改建.py
You can’t perform that action at this time.