Skip to content

Instantly share code, notes, and snippets.

David Li lidavidm

Block or report user

Report or block lidavidm

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
lidavidm /
Created Dec 29, 2017
Halite II remote debugging
import socket
import sys
# Connect
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.bind(('localhost', int(sys.argv[1])))
connection, _ = socket.accept()
# IO Functions
lidavidm / generated.js
Created Apr 1, 2016
Generated Skulpt code
View generated.js
var $scope0 = (function($modname) {
var $gbl = {},
$blk = 0,
$exc = [],
$loc = $gbl,
$err = undefined;
$gbl.__name__ = $modname, $ret = undefined, currLineNo = undefined, currColNo = undefined;
if (typeof Sk.execStart === 'undefined') {
Sk.execStart =

Keybase proof

I hereby claim:

  • I am lidavidm on github.
  • I am lidavidm ( on keybase.
  • I have a public key whose fingerprint is A1F5 3594 0234 AEBA A56A 3243 A751 53D3 42B7 6FF1

To claim this, I am signing this object:

//! # Basic Sample
//! This sample demonstrates how to create a toplevel `window`, set its title, size and position, how to add a `button` to this `window` and how to connect signals with actions.
#![crate_type = "bin"]
extern crate gtk;
use gtk::signal::StatusIconSignals;
use gtk::traits::*;
View gist:997bf6e61c3bc520655b
>>> import functools
>>> def thingy(a, b):
... return "{} {}".format(a, b)
>>> data = [0, 1, 2, 3, 4]
>>> a, *b = data
>>> a
>>> b
[1, 2, 3, 4]
View OSC Lightning Talk - SymPy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View WICC Open Source Workshop Spring 2015.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
lidavidm / gist:9928de726c0aed8a36a8
Last active Aug 29, 2015
CEE1130: dml339 Assignment 2
View gist:9928de726c0aed8a36a8
"metadata": {
"name": "",
"signature": "sha256:b081ae105846bb3cc979fcc46b848d206e3e2f15b94aa3ae1faf86a1d8ff7480"
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
"cells": [
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
View gist:5a05c4eb28ed1c9002d9
Traceback (most recent call last):
File "C:\Documents and Settings\tester\Miniconda3\Scripts\", line 9, in <module>
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\config\", line 563, in launch_instance
File "<string>", line 2, in initialize
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\config\", line 92, in catch_config_error
return method(app, *args, **kwargs)
You can’t perform that action at this time.