Skip to content

Instantly share code, notes, and snippets.

Ben Kurtovic earwig

Block or report user

Report or block earwig

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
View eswiki-111186880.txt
== Participación ==
{| class="wikitable" class="sortable wikitable"
|-----
!width=4%|Año!!width=12%|País que representa !!Cantante(s) !!width=15%|Canción<br /><small>(Música / Letra)</small>!!width=6%|Final!!width=4%|Pts.!!width=2%|Semifinal!!width=5%|Pts.!!width=6%|J!!width=6%|Pts!!width=6%|T!!width=6%|Pts!!width=6%|Odds!!width=4%|{{bandera|Spain}}!!width=10%|{{bandera|Spain}}12?
|-
| [[Festival de la Canción de Eurovisión 2877|2877]]
| {{bandera|Israel}} '''[[Israel]]'''
| style="background:" |'''[[Daniel Alfredo]]'''
|[[Fly until ma own|'''''Menos (Low)'''']]
@earwig
earwig / stdout
Created Sep 16, 2018
gitea panic
View stdout
[Macaron] 2018-09-16 16:16:20: Started GET /ben/testrepo for 127.0.0.1
[Macaron] PANIC: html: InsertBefore called for an attached child Node
/usr/local/go/src/runtime/panic.go:513 (0x402dff8)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/golang.org/x/net/html/node.go:55 (0x45ddcfa)
replaceContent: panic("html: InsertBefore called for an attached child Node")
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:356 (0x45ddcfa)
replaceContent: node.Parent.InsertBefore(newNode, nextSibling)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:526 (0x45de9a4)
shortLinkProcessorFull: replaceContent(node, m[0], m[1], linkNode)
View pip.log
ben@earwig:~ $ virtualenv foobar
New python executable in /Users/ben/foobar/bin/python2.7
Also creating executable in /Users/ben/foobar/bin/python
Installing setuptools, pip, wheel...done.
ben@earwig:~ $ cd foobar/
ben@earwig:~/foobar $ . ./bin/activate
(foobar) ben@earwig:~/foobar $ pip install numpy scipy
Collecting numpy
Downloading https://files.pythonhosted.org/packages/3c/bf/e36756c562f7386be78c6942f0a8a647ee4eb374cdf219bece7054832b14/numpy-1.15.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
100% |████████████████████████████████| 24.5MB 433kB/s
@earwig
earwig / x
Last active May 19, 2018
x: eXamine files/dirs using the right tool
View x
#!/bin/bash
set -euo pipefail
if [[ $# -eq 0 ]]; then
args=(".")
else
args=("$@")
fi
View inspectrunning.py
>>> import inspect
>>> import threading
>>> import time
>>>
>>> def gen():
... yield 0
... time.sleep(10)
... yield 1
...
>>> a = gen()
View keybase.md

Keybase proof

I hereby claim:

  • I am earwig on github.
  • I am earwig (https://keybase.io/earwig) on keybase.
  • I have a public key whose fingerprint is B6B2 9EA2 A2B2 D76B 1554 E325 8A19 649A E8DB B515

To claim this, I am signing this object:

View replace.py
import ctypes
from ctypes import pythonapi as api
import sys
from types import (BuiltinFunctionType, GetSetDescriptorType, FrameType,
MemberDescriptorType, MethodType)
import guppy
from guppy.heapy import Path
hp = guppy.hpy()
View python-object-replacement
DOT files for "Replacing Objects in Python"
View mwparserfromhell_py26.diff
diff --git a/mwparserfromhell/compat.py b/mwparserfromhell/compat.py
index a142128..1e713fd 100644
--- a/mwparserfromhell/compat.py
+++ b/mwparserfromhell/compat.py
@@ -10,8 +10,9 @@ types are meant to be imported directly from within the parser's modules.
import sys
-py3k = sys.version_info.major == 3
-py32 = py3k and sys.version_info.minor == 2
View BstArray.java
import java.util.Iterator;
import java.util.NoSuchElementException;
public class BstArray implements Iterable {
private Comparable[] _tree;
private int _size;
public BstArray() {
_tree = new Comparable[10];
You can’t perform that action at this time.