Skip to content

Instantly share code, notes, and snippets.

View laserbat's full-sized avatar

Olga Ustiuzhanina laserbat

View GitHub Profile
function floodFillScanline(x, y, width, height, diagonal, test, paint) {
// xMin, xMax, y, down[true] / up[false], extendLeft, extendRight
var ranges = [[x, x, y, null, true, true]];
paint(x, y);
while(ranges.length) {
var r = ranges.pop();
var down = r[3] === true;
var up = r[3] === false;
def flood(self, x, y, old, new):
seed_pos = (x, y)
if old == new:
return
stack = []
w, h = MAP_W, MAP_H
max_x = max_y = 0
min_x = w
min_y = h
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 554, in <module>
main()
File "/usr/lib/python2.7/site.py", line 536, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 229, in getuserbase
linux-0qkn:/opt/CutlassRL # ls
bin dgamelaunch.20110709 dgl_menu_main_anon.txt lib
CutlassRL dgl-banner dgl_menu_main_user.txt mail
dev dgl-default-rcfile.nh343 dgl_menu_watchmenu_help.txt src
dgamelaunch dgldir etc usr
linux-0qkn:/opt/CutlassRL # chroot ./ /dgamelaunch
chroot: failed to run command `/dgamelaunch': No such file or directory
linux-0qkn:/opt/CutlassRL # chroot ./ ./usr/bin/python
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/etc/pythonstart", line 16, in save_history
readline.write_history_file(historyPath)
linux-0qkn:/opt/CutlassRL # chroot ./ /usr/bin/python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
<!--
PHP MRPAS
Copyright (c) 2010 Dominik Marczuk
All rights reserved.
#!/usr/bin/env python
"""
PHP MRPAS
Copyright (c) 2010 Dominik Marczuk
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
<!--
PHP MRPAS
Copyright (c) 2010 Dominik Marczuk
All rights reserved.
#!/usr/bin/perl
$_=99072;$o=int(10*cos()**sin());@a=(45906,68783,26026);$l=107618;$a[@a]=$a[0]^$a[1]^$a[2]^$l;$f
[@f]=(10000*(cos()**sin()))foreach@a;s!$_!print(chr($o+sqrt))foreach(@f)!e&&printf(chr$o/(@f-1))