Skip to content

Instantly share code, notes, and snippets.

View lidavidm's full-sized avatar

David Li lidavidm

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x3a
CPU Stepping: 0x9
CPU Type: 0x0
Speed: 3200 Mhz
4 logical processors
2 physical processors
HyperThreading: Supported
from HTMLParser import HTMLParser
class MultiResultParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.results = [[]]
self.tag_type = None
def handle_starttag(self, tag, attrs):
attrs = dict(attrs)
Traceback (most recent call last):
File "C:\Documents and Settings\tester\Miniconda3\Scripts\ipython-script.py", line 9, in <module>
start_ipython()
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\config\application.py", line 563, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "C:\Documents and Settings\tester\Miniconda3\lib\site-packages\IPython\config\application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
@lidavidm
lidavidm / designer.html
Created September 11, 2014 01:37
designer
<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">
@lidavidm
lidavidm / gist:9928de726c0aed8a36a8
Last active August 29, 2015 14:15
CEE1130: dml339 Assignment 2
{
"metadata": {
"name": "",
"signature": "sha256:b081ae105846bb3cc979fcc46b848d206e3e2f15b94aa3ae1faf86a1d8ff7480"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
>>> import functools
>>> def thingy(a, b):
... return "{} {}".format(a, b)
...
>>> data = [0, 1, 2, 3, 4]
>>> a, *b = data
>>> a
0
>>> b
[1, 2, 3, 4]
@lidavidm
lidavidm / gist:1407363
Created November 30, 2011 00:35
Sympy doctest output
============================= test process starts ==============================
executable: /usr/bin/python (2.7.2-final-0)
architecture: 64-bit
cache: yes
ground types: python
sympy/polys/rootisolation.py[1] . [OK]
sympy/polys/sqfreetools.py[12] ............ [OK]
sympy/polys/monomialtools.py[8] ........ [OK]
sympy/polys/galoistools.py[70] .................................................