Skip to content

Instantly share code, notes, and snippets.

View Neppord's full-sized avatar

Samuel Ytterbrink Neppord

View GitHub Profile
table {
border-collapse:collapse;
border-spacing:0px;
}
td{
text-align: center;
vertical-align: middle;
padding:5px;
}
from foo import foo
def bar(a=0):
print "bar"
if a:
foo()
@Neppord
Neppord / wow_macros.txt
Created February 8, 2011 12:57
my wow macrofile
/script
if GetMerchantNumItems()>0 then
for b= 0,4,1 do
for s = 1,GetContainerNumSlots(b),1 do
local n = GetContainerItemLink(b,s);
if n and n:find("ff9d9d9d") then
DEFAULT_CHAT_FRAME:AddMessage("selling:"..n);
UseContainerItem(b,s)
end;
end;
var FooClass = function()
{
x = function() { /* Class constructor */ };
x.prototype.foo = "bar";
x.prototype.__init__ = function()
{
this.something = "other";
};
x.prototype.__call__ = function() {
return 42;
@Neppord
Neppord / error.log
Created July 5, 2011 11:40
Pypy generation doc error
# Sphinx version: 1.0.7
# Python version: 2.7.1
# Docutils version: 0.7 release
# Jinja2 version: 2.5.5
Traceback (most recent call last):
File "c:\Python27\lib\site-packages\sphinx-1.0.7-py2.7.egg\sphinx\cmdline.py", line 188, in main
app.build(force_all, filenames)
File "c:\Python27\lib\site-packages\sphinx-1.0.7-py2.7.egg\sphinx\application.py", line 207, in build
self.builder.build_update()
File "c:\Python27\lib\site-packages\sphinx-1.0.7-py2.7.egg\sphinx\builders\__init__.py", line 193, in build_update
@Neppord
Neppord / error message
Created July 16, 2011 15:24
pypy translate error
[translation:ERROR] Error:
[translation:ERROR] Traceback (most recent call last):
[translation:ERROR] File "../pypy/pypy/translator/goal/translate.py", line 308, in main
[translation:ERROR] drv.proceed(goals)
[translation:ERROR] File "/Users/neppord/pypy/pypy/translator/driver.py", line 810, in proceed
[translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip())
[translation:ERROR] File "/Users/neppord/pypy/pypy/translator/tool/taskengine.py", line 116, in _execute
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR] File "/Users/neppord/pypy/pypy/translator/driver.py", line 286, in _do
[translation:ERROR] res = func()
[Timer] Timings:
[Timer] annotate --- 0.7 s
[Timer] rtype_lltype --- 0.9 s
[Timer] backendopt_lltype --- 0.1 s
[Timer] stackcheckinsertion_lltype --- 0.0 s
[Timer] database_c --- 9.1 s
[Timer] source_c --- 1.5 s
[Timer] compile_c --- 1.1 s
[Timer] =========================================
[Timer] Total: --- 13.6 s
@Neppord
Neppord / gist:1154816
Created August 18, 2011 18:47
Anime List
School Rumble t2 e18
Naruto e145
@Neppord
Neppord / pseudo_impl.py
Created August 19, 2011 07:24
Extendable strings
#I dont have the knowledge to write this but i have the intrest in makeing it writen
#This is in no way complainat with the code of the pypy project and is just a sketch.
class Backend_string(W_object):
_imutable_fields_ = ["_value"]
def __init__(w_self, value):
w_self._value = value
def extend(w_self, w_other_real_string):
magic_extend_function(w_self._value, w_other_real_string.unwrap(None))
@Neppord
Neppord / stack trace
Created April 14, 2012 16:20
Pypy crash
RPython traceback:
File "jit_metainterp_compile.c", line 21285, in send_loop_to_backend
File "jit_backend_x86_assembler.c", line 2598, in Assembler386_assemble_loop
File "jit_backend_x86_regalloc.c", line 510, in RegAlloc_prepare_loop
File "jit_backend_x86_regalloc.c", line 1162, in RegAlloc__prepare
File "jit_backend_x86_regalloc.c", line 4107, in RegAlloc__compute_vars_longevity
Fatal RPython error: AssertionError
Abort trap: 6