code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# -*- coding: utf-8 -*- # # Copyright © 2011 Santiago Jaramillo # based on pylintgui.py by Pierre Raybaut # # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Profiler widget See the official documentation on python profiling: http://docs.python.org/library/profile.html Quest...
[ [ 8, 0, 0.0262, 0.0181, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0383, 0.002, 0, 0.66, 0.0588, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 7, 0, 0.0494, 0.0161, 0, 0.66,...
[ "\"\"\"\nProfiler widget\n\nSee the official documentation on python profiling:\nhttp://docs.python.org/library/profile.html\n\nQuestions for Pierre and others:\n - Where in the menu should profiler go? Run > Profile code ?", "from __future__ import with_statement", "try:\n # PyQt4 4.3.3 on Windows (stat...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Pylint widget""" # pylint: disable-msg=C0103 # pylint: disable-msg=R0903 # pylint: disable-msg=R0911 # pylint: disable-msg=R0201 from __future__ imp...
[ [ 8, 0, 0.0157, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0314, 0.0022, 0, 0.66, 0.05, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 7, 0, 0.0437, 0.0179, 0, 0.66, ...
[ "\"\"\"Pylint widget\"\"\"", "from __future__ import with_statement", "try:\n # PyQt4 4.3.3 on Windows (static DLLs) with py2exe installed:\n # -> pythoncom must be imported first, otherwise py2exe's boot_com_servers\n # will raise an exception (\"ImportError: DLL load failed [...]\") when\n # ...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ spyderlib.widgets ================= Widgets defined in this module may be used in any other Qt-based application They are also used in Spyder throug...
[ [ 8, 0, 0.7333, 0.6, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\nspyderlib.widgets\n=================\n\nWidgets defined in this module may be used in any other Qt-based application\n\nThey are also used in Spyder through the Plugin interface\n(see spyderlib.plugins)" ]
#!/usr/bin/env python from spyderlib import spyder spyder.main()
[ [ 1, 0, 0.6667, 0.3333, 0, 0.66, 0, 498, 0, 1, 0, 0, 498, 0, 0 ], [ 8, 0, 1, 0.3333, 0, 0.66, 1, 624, 3, 0, 0, 0, 0, 0, 1 ] ]
[ "from spyderlib import spyder", "spyder.main()" ]
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Spyder ====== The Scientific PYthon Development EnviRonment """ from distutils.core import setup from distutils.command.build import build from s...
[ [ 8, 0, 0.0941, 0.0594, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1386, 0.0099, 0, 0.66, 0.0714, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.1485, 0.0099, 0, 0.66...
[ "\"\"\"\nSpyder\n======\n\nThe Scientific PYthon Development EnviRonment\n\"\"\"", "from distutils.core import setup", "from distutils.command.build import build", "from sphinx import setup_command", "import os, os.path as osp, sys", "def get_package_data(name, extlist):\n \"\"\"Return data files for p...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Cloning Spyder mercurial repository Building source and win32 executable distribution package """ import os, shutil, os.path as osp import spyderli...
[ [ 8, 0, 0.2297, 0.1081, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3243, 0.027, 0, 0.66, 0.0667, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3784, 0.027, 0, 0.66, ...
[ "\"\"\"\nCloning Spyder mercurial repository\nBuilding source and win32 executable distribution package\n\"\"\"", "import os, shutil, os.path as osp", "import spyderlib as mod", "name = 'spyder'", "parentdir = osp.join(os.getcwd(), osp.pardir)", "version = '%s-%s' % (name, mod.__version__)", "os.chdir(p...
# -*- coding: utf-8 -*- """ Created on Wed Feb 23 15:44:03 2011 @author: Pierre Raybaut """ import time, os.path as osp import rope.base.project import rope.base.libutils import rope.contrib.codeassist ROPE_PREFS = { 'ignore_syntax_errors': True, 'ignore_bad_imports': Tr...
[ [ 8, 0, 0.0381, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0762, 0.0095, 0, 0.66, 0.0714, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0952, 0.0095, 0, 0.66...
[ "\"\"\"\nCreated on Wed Feb 23 15:44:03 2011\n\n@author: Pierre Raybaut\n\"\"\"", "import time, os.path as osp", "import rope.base.project", "import rope.base.libutils", "import rope.contrib.codeassist", "ROPE_PREFS = {\n 'ignore_syntax_errors': True,\n 'ignore_bad_imports': Tr...
import numpy numpy.
[ [ 1, 0, 1, 1, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ] ]
[ "import numpy" ]
import numpy numpy.linspace
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 8, 0, 1, 0.5, 0, 0.66, 1, 0, 7, 0, 0, 0, 0, 0, 0 ] ]
[ "import numpy", "numpy.linspace" ]
# -*- test-case-name: pyflakes -*- # (c) 2005-2008 Divmod, Inc. # See LICENSE file for details import __builtin__ import os.path from compiler import ast from pyflakes import messages class Binding(object): """ Represents the binding of a value to a name. The checker uses this to keep track of which n...
[ [ 1, 0, 0.009, 0.0018, 0, 0.66, 0, 364, 0, 1, 0, 0, 364, 0, 0 ], [ 1, 0, 0.0108, 0.0018, 0, 0.66, 0.0625, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0126, 0.0018, 0, 0.6...
[ "import __builtin__", "import os.path", "from compiler import ast", "from pyflakes import messages", "class Binding(object):\n \"\"\"\n Represents the binding of a value to a name.\n\n The checker uses this to keep track of which names have been bound and\n which names have not. See L{Assignment...
__version__ = '0.4.0'
[ [ 14, 0, 1, 0.5, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = '0.4.0'" ]
# (c) 2005 Divmod, Inc. See LICENSE file for details class Message(object): message = '' message_args = () def __init__(self, filename, lineno): self.filename = filename self.lineno = lineno def __str__(self): return '%s:%s: %s' % (self.filename, self.lineno, self.message % sel...
[ [ 3, 0, 0.0691, 0.0851, 0, 0.66, 0, 6, 0, 2, 0, 0, 186, 0, 0 ], [ 14, 1, 0.0426, 0.0106, 1, 0.32, 0, 635, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 1, 0.0532, 0.0106, 1, 0.32, ...
[ "class Message(object):\n message = ''\n message_args = ()\n def __init__(self, filename, lineno):\n self.filename = filename\n self.lineno = lineno\n def __str__(self):\n return '%s:%s: %s' % (self.filename, self.lineno, self.message % self.message_args)", " message = ''", "...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Buiding instructions: # python setup.py py2exe from distutils.core import setup import py2exe # Patching distutils setup from guidata.disthelpers import (remove_build_dist, get_default_excludes, get_default_dll_excludes, create_vs2008_...
[ [ 1, 0, 0.1077, 0.0154, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.1231, 0.0154, 0, 0.66, 0.0714, 768, 0, 1, 0, 0, 768, 0, 0 ], [ 1, 0, 0.1615, 0.0615, 0, ...
[ "from distutils.core import setup", "import py2exe # Patching distutils setup", "from guidata.disthelpers import (remove_build_dist, get_default_excludes,\n get_default_dll_excludes, create_vs2008_data_files,\n add_text_data_file, add_module_data_files, add_module...
"""Script to offset by a fixed amount and expose Instructions: load Map.py into your TUI lib/python2.6/TUI/Scripts/TSpec/ directory start up TUI run script! (to test, set sr.debug = True in __init__) History: 2010-10-21 AGinsburg Changed from Nod.py to Map.py, a mapping script! 2008-04-23 ROwen 2008-07-24...
[ [ 8, 0, 0.0301, 0.0556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0602, 0.0046, 0, 0.66, 0.0769, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0648, 0.0046, 0, 0.66...
[ "\"\"\"Script to offset by a fixed amount and expose\nInstructions:\n load Map.py into your TUI lib/python2.6/TUI/Scripts/TSpec/ directory\n start up TUI\n run script!\n(to test, set sr.debug = True in __init__)\n\nHistory:", "import numpy", "import Tkinter", "import RO.Wdg", "import RO.PhysConst",...
import datetime import os import numpy as np try: import astropy.io.fits as pyfits except ImportError: import pyfits import glob try: import progressbar widgets = [progressbar.FormatLabel('Processed: %(value)d spectra in %(elapsed)s)'), progressbar.Percentage()] progress = progressbar.ProgressBar(w...
[ [ 1, 0, 0.0068, 0.0068, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0137, 0.0068, 0, 0.66, 0.0714, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0205, 0.0068, 0, ...
[ "import datetime", "import os", "import numpy as np", "try:\n import astropy.io.fits as pyfits\nexcept ImportError:\n import pyfits", " import astropy.io.fits as pyfits", " import pyfits", "import glob", "try: \n import progressbar\n widgets = [progressbar.FormatLabel('Processed: %(v...
import aplpy import os import pyfits import matplotlib.pyplot as pl pl.ioff() verbose_global = False # orion-specific ROrion = pyfits.getdata('/Volumes/disk5/Users/adam/observations/Q4CU05/UT121105/Robberto2010Orion.fits') UOrion = pyfits.getdata('/Volumes/disk5/Users/adam/observations/Q4CU05/UT121105/UKIDSS_Orion.fi...
[ [ 1, 0, 0.0156, 0.0156, 0, 0.66, 0, 96, 0, 1, 0, 0, 96, 0, 0 ], [ 1, 0, 0.0312, 0.0156, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0469, 0.0156, 0, 0.66,...
[ "import aplpy", "import os", "import pyfits", "import matplotlib.pyplot as pl", "pl.ioff()", "verbose_global = False", "ROrion = pyfits.getdata('/Volumes/disk5/Users/adam/observations/Q4CU05/UT121105/Robberto2010Orion.fits')", "UOrion = pyfits.getdata('/Volumes/disk5/Users/adam/observations/Q4CU05/UT1...
""" TripleSpec's slit is centered at coordinates 250,416.4 REVISED: 250.11, 416.53 angle 0.66 degrees length 89.3 pix, height 3.24 pix in the slitviewer (proc coordinates, not raw) Its endpoints are approximately: 207,416 # REVISED 205.6 415.7 293,417 # REVISED 294.9 416.7 """ import numpy as np...
[ [ 8, 0, 0.1912, 0.3529, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4118, 0.0294, 0, 0.66, 0.25, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 7, 0, 0.5147, 0.1765, 0, 0.66, ...
[ "\"\"\"\nTripleSpec's slit is centered at coordinates\n250,416.4 \nREVISED:\n 250.11, 416.53\n angle 0.66 degrees\n length 89.3 pix, height 3.24 pix\nin the slitviewer (proc coordinates, not raw)", "import numpy as np", "try:\n import astropy.io.fits as pyfits\n import astropy.wcs as pywcs\nexcep...
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as pl pl.ioff() import numpy as np import pyfits verbose_global=False def plot_axy(fn,plow=1,phi=99,verbose=verbose_global): if verbose: print "Plotting %s" % fn prefix = fn.replace('.fits','') axy = pyfits.getdata(prefix+".axy") ...
[ [ 1, 0, 0.0244, 0.0244, 0, 0.66, 0, 75, 0, 1, 0, 0, 75, 0, 0 ], [ 8, 0, 0.0488, 0.0244, 0, 0.66, 0.125, 906, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0732, 0.0244, 0, 0.66,...
[ "import matplotlib", "matplotlib.use('TkAgg')", "import matplotlib.pyplot as pl", "pl.ioff()", "import numpy as np", "import pyfits", "verbose_global=False", "def plot_axy(fn,plow=1,phi=99,verbose=verbose_global):\n if verbose:\n print(\"Plotting %s\" % fn)\n prefix = fn.replace('.fits','...
import datetime def dateobs_to_datetime(fitsstr): """ Converte a DATE-OBS time string to a datetime instance string format should be like: '2012-11-05T08:47:31.549' """ year = int(fitsstr[:4]) month = int(fitsstr[5:7]) day = int(fitsstr[8:10]) hour = int(fitsstr[11:13]) minute ...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 2, 0, 0.5263, 0.7895, 0, 0.66, 1, 506, 0, 1, 1, 0, 0, 0, 8 ], [ 8, 1, 0.3421, 0.3158, 1, 0.01, ...
[ "import datetime", "def dateobs_to_datetime(fitsstr):\n \"\"\"\n Converte a DATE-OBS time string to a datetime instance\n\n string format should be like:\n '2012-11-05T08:47:31.549'\n \"\"\"\n year = int(fitsstr[:4])", " \"\"\"\n Converte a DATE-OBS time string to a datetime instance\n\n...
# Step 1: Grab 2MASS catalog # """ import astroquery.irsa ORION = astroquery.irsa.query_gator_box('pt_src_cat','83.808 -5.391',900) import atpy import astropy T = atpy.Table() [T.add_column(n,ORION[n]) for n in ORION.columns] T.write('2MASS_orion_cat.fits') T2 = atpy.Table() T2.add_column('RA',T.ra) T2.add_column('Dec'...
[ [ 8, 0, 0.0363, 0.0534, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1412, 0.0038, 0, 0.66, 0.0526, 901, 0, 1, 0, 0, 901, 0, 0 ], [ 1, 0, 0.145, 0.0038, 0, 0.66,...
[ "\"\"\"\nimport astroquery.irsa\nORION = astroquery.irsa.query_gator_box('pt_src_cat','83.808 -5.391',900)\nimport atpy\nimport astropy\nT = atpy.Table()\n[T.add_column(n,ORION[n]) for n in ORION.columns]\nT.write('2MASS_orion_cat.fits')", "import multiprocessing", "import glob", "import os", "import subpro...
from __future__ import with_statement import gtk, gobject from gtk import gdk from pychess.System import conf from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix from pychess.Utils.Move import toSAN, toFAN from gtk.gdk import keyval_from_name leftkeys = map(keyval_from_name...
[ [ 1, 0, 0.0052, 0.0052, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0157, 0.0052, 0, 0.66, 0.0667, 166, 0, 2, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0209, 0.0052, 0, ...
[ "from __future__ import with_statement", "import gtk, gobject", "from gtk import gdk", "from pychess.System import conf", "from pychess.System.glock import glock_connect", "from pychess.System.prefix import addDataPrefix", "from pychess.Utils.Move import toSAN, toFAN", "from gtk.gdk import keyval_from...
# -*- coding: UTF-8 -*- import gtk import pango import time from pychess.System import uistuff from pychess.System import glock from pychess.System.Log import log from pychess.System.prefix import addDataPrefix from pychess.Utils.const import LOCAL, WHITE, BLACK from pychess.widgets.ChatView import ChatView __title...
[ [ 1, 0, 0.0566, 0.0189, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0755, 0.0189, 0, 0.66, 0.0833, 288, 0, 1, 0, 0, 288, 0, 0 ], [ 1, 0, 0.1132, 0.0189, 0, ...
[ "import gtk", "import pango", "import time", "from pychess.System import uistuff", "from pychess.System import glock", "from pychess.System.Log import log", "from pychess.System.prefix import addDataPrefix", "from pychess.Utils.const import LOCAL, WHITE, BLACK", "from pychess.widgets.ChatView import...
import gtk, gobject, cairo from pychess.System import conf from pychess.Utils.book import getOpenings from pychess.Utils.Move import parseSAN, toSAN, toFAN from pychess.System.prefix import addDataPrefix __title__ = _("Opening Book") __icon__ = addDataPrefix("glade/panel_book.svg") __desc__ = _("The opening book wi...
[ [ 1, 0, 0.0049, 0.0049, 0, 0.66, 0, 166, 0, 3, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0146, 0.0049, 0, 0.66, 0.0667, 336, 0, 1, 0, 0, 336, 0, 0 ], [ 1, 0, 0.0194, 0.0049, 0, ...
[ "import gtk, gobject, cairo", "from pychess.System import conf", "from pychess.Utils.book import getOpenings", "from pychess.Utils.Move import parseSAN, toSAN, toFAN", "from pychess.System.prefix import addDataPrefix", "__title__ = _(\"Opening Book\")", "__icon__ = addDataPrefix(\"glade/panel_book.svg\"...
from math import e from random import randint from sys import maxint import gtk, gobject from gobject import SIGNAL_RUN_FIRST, TYPE_NONE from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix from pychess.Utils.const import WHITE, DRAW, RUNNING, WHITEWON, BLACKWON from pychess...
[ [ 1, 0, 0.0077, 0.0039, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0116, 0.0039, 0, 0.66, 0.0769, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0154, 0.0039, 0, ...
[ "from math import e", "from random import randint", "from sys import maxint", "import gtk, gobject", "from gobject import SIGNAL_RUN_FIRST, TYPE_NONE", "from pychess.System.glock import glock_connect", "from pychess.System.prefix import addDataPrefix", "from pychess.Utils.const import WHITE, DRAW, RUN...
# -*- coding: UTF-8 -*- from __future__ import with_statement import gtk, pango from pychess.System import uistuff from pychess.System.prefix import addDataPrefix from pychess.System.glock import * from pychess.Utils.const import * from pychess.Utils.repr import reprColor, reprPiece from pychess.Utils.lutils.lsort im...
[ [ 1, 0, 0.0115, 0.0038, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0191, 0.0038, 0, 0.66, 0.0588, 166, 0, 2, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0229, 0.0038, 0, ...
[ "from __future__ import with_statement", "import gtk, pango", "from pychess.System import uistuff", "from pychess.System.prefix import addDataPrefix", "from pychess.System.glock import *", "from pychess.Utils.const import *", "from pychess.Utils.repr import reprColor, reprPiece", "from pychess.Utils.l...
# -*- coding: UTF-8 -*- import datetime import gtk import pango from pychess.Utils.const import * from pychess.System import conf from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix from pychess.Utils.Move import Move, toSAN, toFAN from pychess.Savers.pgn import nag2symbol,...
[ [ 1, 0, 0.0056, 0.0019, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0093, 0.0019, 0, 0.66, 0.0769, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0112, 0.0019, 0, ...
[ "import datetime", "import gtk", "import pango", "from pychess.Utils.const import *", "from pychess.System import conf", "from pychess.System.glock import glock_connect", "from pychess.System.prefix import addDataPrefix", "from pychess.Utils.Move import Move, toSAN, toFAN", "from pychess.Savers.pgn ...
# -*- coding: utf-8 -*- # # require: # gtk-dev-2.10.11-win32-1 # py2exe-0.6.6.win32-py2.5 # pygtk-2.10.6-1.win32-py2.5 # pygobject-2.12.3-1.win32-py2.5 # pycairo-1.2.6-1.win32-py2.5 # # run: # python setup_win32.py py2exe # from distutils.core import setup import py2exe import glob import sys opts =...
[ [ 1, 0, 0.2188, 0.0156, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.2344, 0.0156, 0, 0.66, 0.1667, 768, 0, 1, 0, 0, 768, 0, 0 ], [ 1, 0, 0.25, 0.0156, 0, 0....
[ "from distutils.core import setup", "import py2exe", "import glob", "import sys", "opts = {\n 'py2exe': {\n 'compressed': 1,\n 'optimize': 2,\n 'packages': 'encodings',\n 'includes': 'cairo,pangocairo,pango,atk,gobject,xml.dom,xml.dom.minidom,threading,shutil,pygtk,gtk,sys,gtk...
#!/usr/bin/python # PyChess startup script. # This script is to check package requirements, and set up system/enviroment # stuff, to make the PyChess Main class run smoothly. ############################################################################### # Check requirements import os, sys if sys.version_info < (2,...
[ [ 1, 0, 0.11, 0.01, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 4, 0, 0.13, 0.03, 0, 0.66, 0.0556, 0, 0, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.13, 0.01, 1, 0.44, 0, ...
[ "import os, sys", "if sys.version_info < (2, 5, 0):\n print('ERROR: PyChess requires Python >= 2.5')\n sys.exit(1)", " print('ERROR: PyChess requires Python >= 2.5')", " sys.exit(1)", "import pygtk", "pygtk.require(\"2.0\")", "try:\n import rsvg\nexcept ImportError:\n print('ERROR: Cou...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from imp import load_module, find_module pychess = load_module("pychess", *find_module("pychess",["lib"])) from distutils.core import setup from glob import glob from os import listdir from os.path import isdir, isfile import os import sys # To run "setup.py register" ch...
[ [ 1, 0, 0.0301, 0.0075, 0, 0.66, 0, 201, 0, 2, 0, 0, 201, 0, 0 ], [ 14, 0, 0.0376, 0.0075, 0, 0.66, 0.0526, 806, 3, 2, 0, 0, 654, 10, 2 ], [ 1, 0, 0.0526, 0.0075, 0, ...
[ "from imp import load_module, find_module", "pychess = load_module(\"pychess\", *find_module(\"pychess\",[\"lib\"]))", "from distutils.core import setup", "from glob import glob", "from os import listdir", "from os.path import isdir, isfile", "import os", "import sys", "NAME = \"pychess\"", "VERSI...
import unittest from pychess.Utils.const import WHITE, ANALYZING, INVERSE_ANALYZING from pychess.Utils.lutils.ldata import MATE_VALUE from pychess.Utils.Move import listToMoves from pychess.Utils.Cord import Cord from pychess.Utils.Board import Board from pychess.Players.CECPEngine import CECPEngine from Queue import...
[ [ 1, 0, 0.0102, 0.0102, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0306, 0.0102, 0, 0.66, 0.0909, 297, 0, 3, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0408, 0.0102, 0, 0....
[ "import unittest", "from pychess.Utils.const import WHITE, ANALYZING, INVERSE_ANALYZING", "from pychess.Utils.lutils.ldata import MATE_VALUE", "from pychess.Utils.Move import listToMoves", "from pychess.Utils.Cord import Cord", "from pychess.Utils.Board import Board", "from pychess.Players.CECPEngine im...
import unittest modules_to_test = ( 'ficsmanagers', "bitboard", "draw", "eval", "fen", "frc_castling", "frc_movegen", "move", "movegen", "pgn", "zobrist", 'analysis', ) def suite(): tests = unittest.TestSuite() for module in map(__import__, modules_to_test)...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 14, 0, 0.3654, 0.5385, 0, 0.66, 0.3333, 875, 0, 0, 0, 0, 0, 8, 0 ], [ 2, 0, 0.7692, 0.1923, 0, 0.6...
[ "import unittest", "modules_to_test = (\n 'ficsmanagers',\n \"bitboard\",\n \"draw\",\n \"eval\",\n \"fen\",\n \"frc_castling\",\n \"frc_movegen\",", "def suite():\n tests = unittest.TestSuite()\n for module in map(__import__, modules_to_test):\n tests.addTest(unittest.findTest...
import sys import unittest from pychess.Utils.Board import Board from pychess.Utils.Move import Move from pychess.Utils.Move import parseSAN, parseFAN, toFAN from pychess.Utils.lutils.lmovegen import genAllMoves class MoveTestCase(unittest.TestCase): def setUp(self): self.board = Board() def ...
[ [ 1, 0, 0.0164, 0.0164, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0.1429, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0....
[ "import sys", "import unittest", "from pychess.Utils.Board import Board", "from pychess.Utils.Move import Move", "from pychess.Utils.Move import parseSAN, parseFAN, toFAN", "from pychess.Utils.lutils.lmovegen import genAllMoves", "class MoveTestCase(unittest.TestCase):\n \n def setUp(self):\n ...
import unittest from pychess.Utils.const import * from pychess.Utils.Board import Board from pychess.Utils.lutils.leval import LBoard from pychess.Utils.lutils.lmove import parseAN FEN = "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" class ZobristTestCase(unittest.TestCase): def make_mov...
[ [ 1, 0, 0.0104, 0.0104, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0312, 0.0104, 0, 0.66, 0.1429, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0417, 0.0104, 0, 0....
[ "import unittest", "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "from pychess.Utils.lutils.leval import LBoard", "from pychess.Utils.lutils.lmove import parseAN", "FEN = \"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1\"", "class ZobristTestCase(uni...
import unittest from pychess.Utils.const import * from pychess.Utils.lutils.LBoard import LBoard from pychess.Utils.lutils.leval import evaluateComplete from pychess.Utils.lutils import leval class EvalTestCase(unittest.TestCase): def setUp (self): self.board = LBoard(NORMALCHESS) self.boar...
[ [ 1, 0, 0.0208, 0.0208, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0625, 0.0208, 0, 0.66, 0.1667, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0833, 0.0208, 0, 0....
[ "import unittest", "from pychess.Utils.const import *", "from pychess.Utils.lutils.LBoard import LBoard", "from pychess.Utils.lutils.leval import evaluateComplete", "from pychess.Utils.lutils import leval", "class EvalTestCase(unittest.TestCase):\n \n def setUp (self):\n self.board = LBoard(N...
import sys import unittest from pychess.Utils.Board import Board from pychess.Utils.lutils.LBoard import LBoard from pychess.Savers.pgn import load, walk, movre from pychess.Utils.const import * class PgnTestCase(unittest.TestCase): def test_movre(self): """Testing movre regexp""" moves = "e4 fxg...
[ [ 1, 0, 0.0145, 0.0145, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.029, 0.0145, 0, 0.66, 0.1, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.058, 0.0145, 0, 0.66, ...
[ "import sys", "import unittest", "from pychess.Utils.Board import Board", "from pychess.Utils.lutils.LBoard import LBoard", "from pychess.Savers.pgn import load, walk, movre", "from pychess.Utils.const import *", "class PgnTestCase(unittest.TestCase):\n def test_movre(self):\n \"\"\"Testing mo...
import unittest import datetime from pychess.Utils.const import WHITE from pychess.ic import * from pychess.ic.FICSObjects import * from pychess.ic.FICSConnection import Connection from pychess.ic.VerboseTelnet import PredictionsTelnet from pychess.ic.managers.AdjournManager import AdjournManager from pychess.ic.manag...
[ [ 1, 0, 0.0041, 0.0041, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0082, 0.0041, 0, 0.66, 0.0625, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0165, 0.0041, 0, 0....
[ "import unittest", "import datetime", "from pychess.Utils.const import WHITE", "from pychess.ic import *", "from pychess.ic.FICSObjects import *", "from pychess.ic.FICSConnection import Connection", "from pychess.ic.VerboseTelnet import PredictionsTelnet", "from pychess.ic.managers.AdjournManager impo...
from __future__ import with_statement import unittest from pychess.Savers import pgn from pychess.Utils.lutils import ldraw class DrawTestCase(unittest.TestCase): def setUp(self): with open('gamefiles/3fold.pgn') as f1: self.PgnFile1 = pgn.load(f1) with open('gamefiles/bilba...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.2, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0741, 0.0185, 0, 0.66, ...
[ "from __future__ import with_statement", "import unittest", "from pychess.Savers import pgn", "from pychess.Utils.lutils import ldraw", "class DrawTestCase(unittest.TestCase):\n \n def setUp(self):\n with open('gamefiles/3fold.pgn') as f1:\n self.PgnFile1 = pgn.load(f1)\n\n wi...
import unittest import random import operator from pychess.Utils.lutils.bitboard import * class BitboardTestCase(unittest.TestCase): def setUp (self): self.positionSets = [] # Random positions. Ten of each length. Will also include range(64) and # range(0) for i in xrange(10)...
[ [ 1, 0, 0.0164, 0.0164, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0.2, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0.66,...
[ "import unittest", "import random", "import operator", "from pychess.Utils.lutils.bitboard import *", "class BitboardTestCase(unittest.TestCase):\n \n def setUp (self):\n self.positionSets = []\n # Random positions. Ten of each length. Will also include range(64) and\n # range(0)\...
import unittest from pychess.Utils.Board import Board from pychess.Utils.lutils.LBoard import LBoard import sys class FenTestCase(unittest.TestCase): def setUp(self): self.positions = [] for line in open('gamefiles/perftsuite.epd'): semi = line.find(" ;") self.positio...
[ [ 1, 0, 0.0357, 0.0357, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0.2, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 1, 0, 0.1429, 0.0357, 0, 0.66,...
[ "import unittest", "from pychess.Utils.Board import Board", "from pychess.Utils.lutils.LBoard import LBoard", "import sys", "class FenTestCase(unittest.TestCase):\n \n def setUp(self):\n self.positions = []\n for line in open('gamefiles/perftsuite.epd'):\n semi = line.find(\" ...
import unittest from pychess.Utils.const import * from pychess.Utils.lutils.leval import LBoard from pychess.Utils.lutils.lmove import newMove, FLAG from pychess.Utils.lutils.lmovegen import genCastles # TODO: add more test data data = ( ("r3k2r/8/8/8/8/8/8/R3K2R w AH - 0 1", [(E1, G1, KING_CASTLE), (E1, C1, QUEEN_C...
[ [ 1, 0, 0.0263, 0.0263, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0789, 0.0263, 0, 0.66, 0.1429, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1053, 0.0263, 0, 0....
[ "import unittest", "from pychess.Utils.const import *", "from pychess.Utils.lutils.leval import LBoard", "from pychess.Utils.lutils.lmove import newMove, FLAG", "from pychess.Utils.lutils.lmovegen import genCastles", "data = (\n (\"r3k2r/8/8/8/8/8/8/R3K2R w AH - 0 1\", [(E1, G1, KING_CASTLE), (E1, C1, QUE...
#!/usr/bin/python # -*- coding: UTF-8 -*- import sys, inspect, os from os import listdir, chdir, getcwd from os.path import isdir, join, split docdir = getcwd() print repr ("cd %s" % sys.argv[1]) chdir(sys.argv[1]) todir = "./" def search (path, extension): for file in listdir(path): file = join (path, f...
[ [ 1, 0, 0.0909, 0.0227, 0, 0.66, 0, 509, 0, 3, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1136, 0.0227, 0, 0.66, 0.1, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1364, 0.0227, 0, 0.6...
[ "import sys, inspect, os", "from os import listdir, chdir, getcwd", "from os.path import isdir, join, split", "docdir = getcwd()", "print(repr (\"cd %s\" % sys.argv[1]))", "chdir(sys.argv[1])", "todir = \"./\"", "def search (path, extension):\n for file in listdir(path):\n file = join (path,...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import with_statement import collections ############################# # Configuration starts here # ############################# FILENAME = 'TRANSLATORS' POOLSIZE = 7 ########################### # Configuration ends here # ########################### from...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.2, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.25, 0.0625, 0, 0.66, ...
[ "from __future__ import with_statement", "import collections", "from urllib import urlopen", "from multiprocessing import Pool", "import re", "def findContributors(lang):\n site = \"https://translations.launchpad.net/pychess/trunk/+pots/pychess/%s/+translate\" % lang\n data = urlopen(site).read()\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from getpass import getpass from smtplib import SMTP, SMTPConnectError, SMTPAuthenticationError, SMTPRecipientsRefused from email.mime.text import MIMEText mail = 'pychess@gmail.com' passw = getpass('password: ') smtp = 'smtp.gmail.com' to = 'python-announce-lis...
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 389, 0, 4, 0, 0, 389, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 1, ...
[ "from getpass import getpass", "from smtplib import SMTP, SMTPConnectError, SMTPAuthenticationError, SMTPRecipientsRefused", "from email.mime.text import MIMEText" ]
#!/usr/bin/env python """ Which - locate a command * adapted from proposal__ by Erik Demaine and patch__ by Brian Curtin, which adds this feature__ to shutil __ http://bugs.python.org/file8185/find_in_path.py __ http://bugs.python.org/file15381/shutil_which.patch __ http://bugs.python.org/issue444582 ...
[ [ 8, 0, 0.1084, 0.2048, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2129, 0.004, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2169, 0.004, 0, 0.66, ...
[ "\"\"\" Which - locate a command\n\n * adapted from proposal__ by Erik Demaine and patch__ by Brian Curtin, which adds this feature__ to shutil\n\n __ http://bugs.python.org/file8185/find_in_path.py\n __ http://bugs.python.org/file15381/shutil_which.patch\n __ http://bugs.python.org/issue444582", "__d...
from array import array class MultiArray: def __init__ (self, oneLineData, *lengths): self.lengths = lengths self.data = oneLineData def get (self, *indexes): index = 0 for depth, i in enumerate(indexes[::-1]): index += i*self.lengths[depth]**depth retu...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 3, 0, 0.6154, 0.8462, 0, 0.66, 1, 356, 0, 2, 0, 0, 0, 0, 1 ], [ 2, 1, 0.4615, 0.2308, 1, 0.12, ...
[ "from array import array", "class MultiArray:\n\n def __init__ (self, oneLineData, *lengths):\n self.lengths = lengths\n self.data = oneLineData\n \n def get (self, *indexes):\n index = 0", " def __init__ (self, oneLineData, *lengths):\n self.lengths = lengths\n se...
""" This is a dictionary, that supports a max of items. This is good for the transportation table, as some old entries might not be useable any more, as the position has totally changed """ from UserDict import UserDict from threading import Lock class LimitedDict (UserDict): def __init__ (self, maxSize):...
[ [ 8, 0, 0.0714, 0.1071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1786, 0.0357, 0, 0.66, 0.3333, 351, 0, 1, 0, 0, 351, 0, 0 ], [ 1, 0, 0.2143, 0.0357, 0, 0.66...
[ "\"\"\" This is a dictionary, that supports a max of items.\n This is good for the transportation table, as some old entries might not\n be useable any more, as the position has totally changed \"\"\"", "from UserDict import UserDict", "from threading import Lock", "class LimitedDict (UserDict):\n de...
# -*- coding: UTF-8 -*- from gobject import GObject, SIGNAL_RUN_FIRST from pychess.System.Log import log from pychess.System.SubProcess import SubProcess, searchPath import re class Pinger (GObject): """ The recieved signal contains the time it took to get response from the server in millisecconds. -1 mea...
[ [ 1, 0, 0.0337, 0.0112, 0, 0.66, 0, 90, 0, 2, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0449, 0.0112, 0, 0.66, 0.2, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0562, 0.0112, 0, 0.66,...
[ "from gobject import GObject, SIGNAL_RUN_FIRST", "from pychess.System.Log import log", "from pychess.System.SubProcess import SubProcess, searchPath", "import re", "class Pinger (GObject):\n \"\"\" The recieved signal contains the time it took to get response from the\n server in millisecconds. -1...
""" This module provides some basic functions for accessing pychess datefiles in system or user space """ import os import sys from os import makedirs from os.path import isdir, join, dirname, abspath ################################################################################ # Locate files in system space ...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0.0714, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, ...
[ "import os", "import sys", "from os import makedirs", "from os.path import isdir, join, dirname, abspath", "def addDataPrefix (subpath):\n return abspath (join (_prefix, subpath))", " return abspath (join (_prefix, subpath))", "def getDataPrefix ():\n return _prefix", " return _prefix", ...
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475160 # Was accepted into Python 2.5, but earlier versions still have # to do stuff manually import threading from Queue import Queue def TaskQueue (): if hasattr(Queue, "task_done"): return Queue() return _TaskQueue() class _TaskQueue(Queue)...
[ [ 1, 0, 0.0794, 0.0159, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0952, 0.0159, 0, 0.66, 0.3333, 952, 0, 1, 0, 0, 952, 0, 0 ], [ 2, 0, 0.1508, 0.0635, 0, 0....
[ "import threading", "from Queue import Queue", "def TaskQueue ():\n if hasattr(Queue, \"task_done\"):\n return Queue()\n return _TaskQueue()", " if hasattr(Queue, \"task_done\"):\n return Queue()", " return Queue()", " return _TaskQueue()", "class _TaskQueue(Queue):\n\n ...
import gconf from os.path import normpath GDIR = '/apps/pychess/' c = gconf.client_get_default() c.add_dir(GDIR[:-1], gconf.CLIENT_PRELOAD_NONE) def notify_add (key, func): key = normpath(GDIR+key) return c.notify_add(key, func) def notify_remove (conid): c.notify_remove(conid) def get (key): key = ...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 367, 0, 1, 0, 0, 367, 0, 0 ], [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0.1, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 14, 0, 0.0851, 0.0213, 0, 0.66...
[ "import gconf", "from os.path import normpath", "GDIR = '/apps/pychess/'", "c = gconf.client_get_default()", "c.add_dir(GDIR[:-1], gconf.CLIENT_PRELOAD_NONE)", "def notify_add (key, func):\n key = normpath(GDIR+key)\n return c.notify_add(key, func)", " key = normpath(GDIR+key)", " return c...
from ctypes import * l=CDLL('librsvg-2-2.dll') g=CDLL('libgobject-2.0-0.dll') g.g_type_init() class Props(): def __init__(self, dimension): self.width, self.height = dimension class rsvgHandle(): class RsvgDimensionData(Structure): _fields_ = [("width", c_int), ("heig...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 14, 0, 0.0638, 0.0213, 0, 0.66, 0.1429, 810, 3, 1, 0, 0, 453, 10, 1 ], [ 14, 0, 0.0851, 0.0213, 0, ...
[ "from ctypes import *", "l=CDLL('librsvg-2-2.dll')", "g=CDLL('libgobject-2.0-0.dll')", "g.g_type_init()", "class Props():\n def __init__(self, dimension):\n self.width, self.height = dimension", " def __init__(self, dimension):\n self.width, self.height = dimension", " self.wi...
""" The task of this module is to provide easy saving/loading of configurations It also supports gconf like connection, so you get notices when a property has changed. """ # gconf's notify all seams to be broken #try: # import gconf # import conf_gconf as confmodule #except: import conf_configParser as c...
[ [ 8, 0, 0.0377, 0.0566, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1887, 0.0189, 0, 0.66, 0.1, 535, 0, 1, 0, 0, 535, 0, 0 ], [ 8, 0, 0.2264, 0.0189, 0, 0.66, ...
[ "\"\"\" The task of this module is to provide easy saving/loading of configurations\n It also supports gconf like connection, so you get notices when a property\n has changed. \"\"\"", "import conf_configParser as confmodule", "\"\"\"Module for using gconf without having to care about types\"\"\"", "def...
# -*- coding: UTF-8 -*- import time from pychess.System.ThreadPool import pool def repeat (func, *args, **kwargs): """ Repeats a function in a new thread until it returns False """ def run (): while func(*args, **kwargs): pass pool.start(run) def repeat_sleep (func, sleeptime, recur=F...
[ [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.1212, 0.0303, 0, 0.66, 0.3333, 626, 0, 1, 0, 0, 626, 0, 0 ], [ 2, 0, 0.2576, 0.1818, 0, ...
[ "import time", "from pychess.System.ThreadPool import pool", "def repeat (func, *args, **kwargs):\n \"\"\" Repeats a function in a new thread until it returns False \"\"\"\n def run ():\n while func(*args, **kwargs):\n pass\n pool.start(run)", " \"\"\" Repeats a function in a new...
from threading import Thread import Queue from gobject import GObject, SIGNAL_RUN_FIRST from ThreadPool import PooledThread import glock # # IDEA: We could implement gdk prioritizing by using a global PriorityQueue # class Publisher (PooledThread): """ Publisher can be used when a thread is often spitting out r...
[ [ 1, 0, 0.0032, 0.0032, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0065, 0.0032, 0, 0.66, 0.125, 952, 0, 1, 0, 0, 952, 0, 0 ], [ 1, 0, 0.013, 0.0032, 0, 0.66...
[ "from threading import Thread", "import Queue", "from gobject import GObject, SIGNAL_RUN_FIRST", "from ThreadPool import PooledThread", "import glock", "class Publisher (PooledThread):\n \"\"\" Publisher can be used when a thread is often spitting out results,\n and you want to process these res...
import socket import re, sre_constants from copy import copy from pychess.System.Log import log class Prediction: def __init__ (self, callback, *regexps): self.callback = callback self.regexps = [] self.hash = hash(callback) for regexp in regexps: self.hash ^= ...
[ [ 1, 0, 0.0055, 0.0055, 0, 0.66, 0, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.011, 0.0055, 0, 0.66, 0.0909, 540, 0, 2, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0166, 0.0055, 0, 0...
[ "import socket", "import re, sre_constants", "from copy import copy", "from pychess.System.Log import log", "class Prediction:\n def __init__ (self, callback, *regexps):\n self.callback = callback\n \n self.regexps = []\n self.hash = hash(callback)\n for regexp in regex...
from gobject import * import threading import re from math import ceil import time from pychess.System.Log import log titles = "(?:\([A-Z*]+\))*" names = "([A-Za-z]+)"+titles titlesC = re.compile(titles) namesC = re.compile(names) CHANNEL_SHOUT = "shout" CHANNEL_CSHOUT = "cshout" class ChatManager (GObject): ...
[ [ 1, 0, 0.0065, 0.0033, 0, 0.66, 0, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0098, 0.0033, 0, 0.66, 0.0833, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.013, 0.0033, 0, 0.66,...
[ "from gobject import *", "import threading", "import re", "from math import ceil", "import time", "from pychess.System.Log import log", "titles = \"(?:\\([A-Z*]+\\))*\"", "names = \"([A-Za-z]+)\"+titles", "titlesC = re.compile(titles)", "namesC = re.compile(names)", "CHANNEL_SHOUT = \"shout\"", ...
import re import datetime from gobject import * from BoardManager import BoardManager, moveListHeader1Str, names, months, dates from pychess.ic import * from pychess.ic.FICSObjects import FICSAdjournedGame, FICSPlayer from pychess.Utils.const import * from pychess.System.Log import log class AdjournManager (GObject):...
[ [ 1, 0, 0.0066, 0.0066, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0132, 0.0066, 0, 0.66, 0.125, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0199, 0.0066, 0, 0...
[ "import re", "import datetime", "from gobject import *", "from BoardManager import BoardManager, moveListHeader1Str, names, months, dates", "from pychess.ic import *", "from pychess.ic.FICSObjects import FICSAdjournedGame, FICSPlayer", "from pychess.Utils.const import *", "from pychess.System.Log impo...
from gobject import * sanmove = "([a-hxOoKQRBN0-8+#=-]{2,7})" class ErrorManager (GObject): __gsignals__ = { 'onCommandNotFound' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)), 'onAmbiguousMove' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)), 'onIllegalMove' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,))...
[ [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 14, 0, 0.1333, 0.0333, 0, 0.66, 0.5, 592, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.6, 0.8333, 0, 0.66, ...
[ "from gobject import *", "sanmove = \"([a-hxOoKQRBN0-8+#=-]{2,7})\"", "class ErrorManager (GObject):\n \n __gsignals__ = {\n 'onCommandNotFound' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)),\n 'onAmbiguousMove' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)),\n 'onIllegalMove' : (SIGNAL_RUN_FIRST,...
from gobject import * class AutoLogOutManager (GObject): __gsignals__ = { 'logOut': (SIGNAL_RUN_FIRST, None, ()) } def __init__ (self, connection): GObject.__init__(self) self.connection = connection self.connection.expect_line (self.onLogOut, "\*\*\*...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 3, 0, 0.5556, 0.9444, 0, 0.66, 1, 670, 0, 2, 0, 0, 988, 0, 5 ], [ 14, 1, 0.2222, 0.1667, 1, 0.28, ...
[ "from gobject import *", "class AutoLogOutManager (GObject):\n __gsignals__ = {\n 'logOut': (SIGNAL_RUN_FIRST, None, ())\n }\n \n def __init__ (self, connection):\n GObject.__init__(self)\n self.connection = connection", " __gsignals__ = {\n 'logOut': (SIGNAL_RUN_FIRST...
from threading import RLock from gobject import * import re from time import time from pychess.ic import * from pychess.Utils.const import * from pychess.Utils.Rating import Rating from pychess.System.Log import log types = "(?:blitz|standard|lightning|wild|bughouse|crazyhouse|suicide|losers|atomic)" rated = "(rated|u...
[ [ 1, 0, 0.0029, 0.0029, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0058, 0.0029, 0, 0.66, 0.0556, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0087, 0.0029, 0, 0.66...
[ "from threading import RLock", "from gobject import *", "import re", "from time import time", "from pychess.ic import *", "from pychess.Utils.const import *", "from pychess.Utils.Rating import Rating", "from pychess.System.Log import log", "types = \"(?:blitz|standard|lightning|wild|bughouse|crazyho...
import re from gobject import * types = "(Blitz|Lightning|Standard)" days = "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)" months = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" AMOUNT_OF_NEWSITEMS = 5 FICS_SENDS = 10 class NewsManager (GObject): __gsignals__ = { 'readingNews' : (SIGNAL_RUN_FIRST, TYPE_NONE...
[ [ 1, 0, 0.037, 0.0185, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0.1429, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 14, 0, 0.0926, 0.0185, 0, 0....
[ "import re", "from gobject import *", "types = \"(Blitz|Lightning|Standard)\"", "days = \"(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\"", "months = \"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\"", "AMOUNT_OF_NEWSITEMS = 5", "FICS_SENDS = 10", "class NewsManager (GObject):\n \n __gsignals__ = {\n ...
from FICSConnection import FICSConnection, LogOnError from ICLounge import ICLounge from pychess.System import glock, uistuff from pychess.Utils.const import * import gtk import gobject import re import socket import webbrowser dialog = None def run(): global dialog if not dialog: dialog = ICLogon...
[ [ 1, 0, 0.0051, 0.0051, 0, 0.66, 0, 719, 0, 2, 0, 0, 719, 0, 0 ], [ 1, 0, 0.0102, 0.0051, 0, 0.66, 0.0833, 555, 0, 1, 0, 0, 555, 0, 0 ], [ 1, 0, 0.0153, 0.0051, 0, ...
[ "from FICSConnection import FICSConnection, LogOnError", "from ICLounge import ICLounge", "from pychess.System import glock, uistuff", "from pychess.Utils.const import *", "import gtk", "import gobject", "import re", "import socket", "import webbrowser", "dialog = None", "def run():\n global ...
from pychess.System.Log import log from pychess.Utils.GameModel import GameModel from pychess.Utils.Offer import Offer from pychess.Utils.const import * from pychess.Players.Human import Human from pychess.ic import GAME_TYPES class ICGameModel (GameModel): def __init__ (self, connection, ficsgame, timemodel): ...
[ [ 1, 0, 0.0054, 0.0054, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0108, 0.0054, 0, 0.66, 0.1667, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0162, 0.0054, 0, ...
[ "from pychess.System.Log import log", "from pychess.Utils.GameModel import GameModel", "from pychess.Utils.Offer import Offer", "from pychess.Utils.const import *", "from pychess.Players.Human import Human", "from pychess.ic import GAME_TYPES", "class ICGameModel (GameModel):\n def __init__ (self, co...
import datetime import gobject from gobject import GObject, SIGNAL_RUN_FIRST from pychess.Utils.IconLoader import load_icon from pychess.Utils.Rating import Rating from pychess.Utils.const import * from pychess.ic import TYPE_BLITZ, TYPE_STANDARD, TYPE_LIGHTNING, TYPE_WILD, \ TYPE_LOSERS, TITLE_TYPE_DISPLAY_TEXTS,...
[ [ 1, 0, 0.0015, 0.0015, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0029, 0.0015, 0, 0.66, 0.0769, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0044, 0.0015, 0, 0....
[ "import datetime", "import gobject", "from gobject import GObject, SIGNAL_RUN_FIRST", "from pychess.Utils.IconLoader import load_icon", "from pychess.Utils.Rating import Rating", "from pychess.Utils.const import *", "from pychess.ic import TYPE_BLITZ, TYPE_STANDARD, TYPE_LIGHTNING, TYPE_WILD, \\\n TY...
from pychess import Variants from pychess.Utils.const import * # RatingType TYPE_BLITZ, TYPE_STANDARD, TYPE_LIGHTNING, TYPE_WILD, \ TYPE_BUGHOUSE, TYPE_CRAZYHOUSE, TYPE_SUICIDE, TYPE_LOSERS, TYPE_ATOMIC, \ TYPE_UNTIMED, TYPE_EXAMINED, TYPE_OTHER = range(12) class GameType (object): def __init__ (self, fic...
[ [ 1, 0, 0.0055, 0.0055, 0, 0.66, 0, 806, 0, 1, 0, 0, 806, 0, 0 ], [ 1, 0, 0.0109, 0.0055, 0, 0.66, 0.0455, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 14, 0, 0.0328, 0.0164, 0, ...
[ "from pychess import Variants", "from pychess.Utils.const import *", "TYPE_BLITZ, TYPE_STANDARD, TYPE_LIGHTNING, TYPE_WILD, \\\n TYPE_BUGHOUSE, TYPE_CRAZYHOUSE, TYPE_SUICIDE, TYPE_LOSERS, TYPE_ATOMIC, \\\n TYPE_UNTIMED, TYPE_EXAMINED, TYPE_OTHER = range(12)", "class GameType (object):\n def __init__ ...
from pychess.Utils.const import * from pychess.Utils.Board import Board KNIGHTODDSSTART = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/R1BQKBNR w KQkq - 0 1" class KnightOddsBoard(Board): variant = KNIGHTODDSCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=KNIGH...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.1667, 0.0417, 0, 0...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "KNIGHTODDSSTART = \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/R1BQKBNR w KQkq - 0 1\"", "class KnightOddsBoard(Board):\n variant = KNIGHTODDSCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board._...
# Upside-down Chess from pychess.Utils.const import * from pychess.Utils.Board import Board UPSIDEDOWNSTART = "RNBQKBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w - - 0 1" class UpsideDownBoard(Board): variant = UPSIDEDOWNCHESS def __init__ (self, setup=False): if setup is True: Board.__init__...
[ [ 1, 0, 0.1154, 0.0385, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1538, 0.0385, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.2308, 0.0385, 0, 0...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "UPSIDEDOWNSTART = \"RNBQKBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w - - 0 1\"", "class UpsideDownBoard(Board):\n variant = UPSIDEDOWNCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__in...
from pychess.Utils.const import * from pychess.Utils.Board import Board QUEENODDSSTART = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNB1KBNR w KQkq - 0 1" class QueenOddsBoard(Board): variant = QUEENODDSCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=QUEENODD...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.1667, 0.0417, 0, 0...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "QUEENODDSSTART = \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNB1KBNR w KQkq - 0 1\"", "class QueenOddsBoard(Board):\n variant = QUEENODDSCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__in...
# Shuffle Chess import random from pychess.Utils.const import * from pychess.Utils.Board import Board class ShuffleBoard(Board): variant = SHUFFLECHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=self.shuffle_start()) else: Board.__i...
[ [ 1, 0, 0.0714, 0.0238, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.119, 0.0238, 0, 0.66, 0.2, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1429, 0.0238, 0, 0.66...
[ "import random", "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "class ShuffleBoard(Board):\n variant = SHUFFLECHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init__(self, setup=self.shuffle_start())\n else:\n B...
# Pawns Passed Chess from pychess.Utils.const import * from pychess.Utils.Board import Board PAWNSPASSEDSTART = "rnbqkbnr/8/8/PPPPPPPP/pppppppp/8/8/RNBQKBNR w - - 0 1" class PawnsPassedBoard(Board): variant = PAWNSPASSEDCHESS def __init__ (self, setup=False): if setup is True: Board.__i...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.2222, 0.037, 0, 0.66...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "PAWNSPASSEDSTART = \"rnbqkbnr/8/8/PPPPPPPP/pppppppp/8/8/RNBQKBNR w - - 0 1\"", "class PawnsPassedBoard(Board):\n variant = PAWNSPASSEDCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board._...
# AsymmetricRandom Chess import random from pychess.Utils.const import * from pychess.Utils.Board import Board class AsymmetricRandomBoard(Board): variant = ASYMMETRICRANDOMCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=self.asymmetricrandom_start())...
[ [ 1, 0, 0.0294, 0.0098, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.049, 0.0098, 0, 0.66, 0.2, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0588, 0.0098, 0, 0.66...
[ "import random", "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "class AsymmetricRandomBoard(Board):\n variant = ASYMMETRICRANDOMCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init__(self, setup=self.asymmetricrandom_start())\n ...
from pychess.Utils.Board import Board class NormalChess: __desc__ = _("Classic chess rules\n" + "http://en.wikipedia.org/wiki/Chess") name = _("Normal") cecp_name = "normal" board = Board need_initial_board = False standard_rules = True
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 3, 0, 0.5909, 0.7273, 0, 0.66, 1, 214, 0, 0, 0, 0, 0, 0, 2 ], [ 14, 1, 0.4091, 0.1818, 1, 0.7, ...
[ "from pychess.Utils.Board import Board", "class NormalChess:\n __desc__ = _(\"Classic chess rules\\n\" +\n \"http://en.wikipedia.org/wiki/Chess\")\n name = _(\"Normal\")\n cecp_name = \"normal\"\n board = Board\n need_initial_board = False\n standard_rules = True", " __desc_...
# Random Chess import random from pychess.Utils.const import * from pychess.Utils.Board import Board class RandomBoard(Board): variant = RANDOMCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=self.random_start()) else: Board.__init_...
[ [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1111, 0.0222, 0, 0.66, 0.2, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1333, 0.0222, 0, 0.6...
[ "import random", "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "class RandomBoard(Board):\n variant = RANDOMCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init__(self, setup=self.random_start())\n else:\n Boar...
# Losers Chess from pychess.Utils.const import * from pychess.Utils.lutils.bitboard import bitLength from pychess.Utils.Board import Board class LosersBoard(Board): variant = LOSERSCHESS class LosersChess: __desc__ = _("FICS losers: http://www.freechess.org/Help/HelpFiles/losers_chess.html") name = _("L...
[ [ 1, 0, 0.1154, 0.0385, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1538, 0.0385, 0, 0.66, 0.2, 396, 0, 1, 0, 0, 396, 0, 0 ], [ 1, 0, 0.1923, 0.0385, 0, 0.6...
[ "from pychess.Utils.const import *", "from pychess.Utils.lutils.bitboard import bitLength", "from pychess.Utils.Board import Board", "class LosersBoard(Board):\n variant = LOSERSCHESS", " variant = LOSERSCHESS", "class LosersChess:\n __desc__ = _(\"FICS losers: http://www.freechess.org/Help/HelpF...
# Chess960 (Fischer Random Chess) import random from copy import copy from pychess.Utils.const import * from pychess.Utils.Cord import Cord from pychess.Utils.Board import Board from pychess.Utils.Piece import Piece from pychess.Utils.lutils.bitboard import * from pychess.Utils.lutils.attack import * from pychess.Uti...
[ [ 1, 0, 0.0073, 0.0024, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0097, 0.0024, 0, 0.66, 0.0833, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0146, 0.0024, 0, ...
[ "import random", "from copy import copy", "from pychess.Utils.const import *", "from pychess.Utils.Cord import Cord", "from pychess.Utils.Board import Board", "from pychess.Utils.Piece import Piece", "from pychess.Utils.lutils.bitboard import *", "from pychess.Utils.lutils.attack import *", "from py...
from pychess.Utils.const import * from normal import NormalChess from corner import CornerChess from shuffle import ShuffleChess from fischerandom import FischerRandomChess from randomchess import RandomChess from asymmetricrandom import AsymmetricRandomChess from upsidedown import UpsideDownChess from pawnspushed impo...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.0667, 444, 0, 1, 0, 0, 444, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, ...
[ "from pychess.Utils.const import *", "from normal import NormalChess", "from corner import CornerChess", "from shuffle import ShuffleChess", "from fischerandom import FischerRandomChess", "from randomchess import RandomChess", "from asymmetricrandom import AsymmetricRandomChess", "from upsidedown impo...
# Pawns Pushed Chess from pychess.Utils.const import * from pychess.Utils.Board import Board PAWNSPUSHEDSTART = "rnbqkbnr/8/8/pppppppp/PPPPPPPP/8/8/RNBQKBNR w - - 0 1" class PawnsPushedBoard(Board): variant = PAWNSPUSHEDCHESS def __init__ (self, setup=False): if setup is True: Board.__in...
[ [ 1, 0, 0.1154, 0.0385, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.1538, 0.0385, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.2308, 0.0385, 0, 0...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "PAWNSPUSHEDSTART = \"rnbqkbnr/8/8/pppppppp/PPPPPPPP/8/8/RNBQKBNR w - - 0 1\"", "class PawnsPushedBoard(Board):\n variant = PAWNSPUSHEDCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board._...
from pychess.Utils.const import * from pychess.Utils.Board import Board PAWNODDSSTART = "rnbqkbnr/ppppp1pp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" class PawnOddsBoard(Board): variant = PAWNODDSCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=PAWNODDSSTA...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.1667, 0.0417, 0, 0...
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "PAWNODDSSTART = \"rnbqkbnr/ppppp1pp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\"", "class PawnOddsBoard(Board):\n variant = PAWNODDSCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init_...
from pychess.Utils.const import * from pychess.Utils.Board import Board ROOKODDSSTART = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/1NBQKBNR w Kkq - 0 1" class RookOddsBoard(Board): variant = ROOKODDSCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=ROOKODDSSTAR...
[ [ 1, 0, 0.0435, 0.0435, 0, 0.66, 0, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.087, 0.0435, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0....
[ "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "ROOKODDSSTART = \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/1NBQKBNR w Kkq - 0 1\"", "class RookOddsBoard(Board):\n variant = ROOKODDSCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init__...
# Corner Chess import random from pychess.Utils.const import * from pychess.Utils.Board import Board class CornerBoard(Board): variant = CORNERCHESS def __init__ (self, setup=False): if setup is True: Board.__init__(self, setup=self.shuffle_start()) else: Board.__init...
[ [ 1, 0, 0.0625, 0.0208, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1042, 0.0208, 0, 0.66, 0.2, 297, 0, 1, 0, 0, 297, 0, 0 ], [ 1, 0, 0.125, 0.0208, 0, 0.66...
[ "import random", "from pychess.Utils.const import *", "from pychess.Utils.Board import Board", "class CornerBoard(Board):\n variant = CORNERCHESS\n\n def __init__ (self, setup=False):\n if setup is True:\n Board.__init__(self, setup=self.shuffle_start())\n else:\n Boa...
from Throbber import Throbber from pychess.Players.engineNest import discoverer from pychess.System import conf, uistuff from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix import gtk.glade import os uistuff.cacheGladefile("discovererDialog.glade") class DiscovererDialog...
[ [ 1, 0, 0.0128, 0.0128, 0, 0.66, 0, 695, 0, 1, 0, 0, 695, 0, 0 ], [ 1, 0, 0.0256, 0.0128, 0, 0.66, 0.125, 535, 0, 1, 0, 0, 535, 0, 0 ], [ 1, 0, 0.0385, 0.0128, 0, 0...
[ "from Throbber import Throbber", "from pychess.Players.engineNest import discoverer", "from pychess.System import conf, uistuff", "from pychess.System.glock import glock_connect", "from pychess.System.prefix import addDataPrefix", "import gtk.glade", "import os", "uistuff.cacheGladefile(\"discovererDi...
import gtk, gobject import gamewidget firstRun = True def run(widgets): global firstRun if firstRun: initialize(widgets) firstRun = False widgets["player_info"].show_all() def initialize(widgets): def addColumns (treeview, *columns): model = gtk.ListStore(*((str,)*len(columns)...
[ [ 1, 0, 0.0141, 0.0141, 0, 0.66, 0, 166, 0, 2, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0423, 0.0141, 0, 0.66, 0.2, 632, 0, 1, 0, 0, 632, 0, 0 ], [ 14, 0, 0.0704, 0.0141, 0, 0....
[ "import gtk, gobject", "import gamewidget", "firstRun = True", "def run(widgets):\n global firstRun\n if firstRun:\n initialize(widgets)\n firstRun = False\n widgets[\"player_info\"].show_all()", " if firstRun:\n initialize(widgets)\n firstRun = False", " ini...
import gamewidget from pychess.System import glock from pychess.Utils.const import ACTION_MENU_ITEMS ################################################################################ # Main menubar MenuItem classes to keep track of menu widget states # ########################################################...
[ [ 1, 0, 0.0094, 0.0094, 0, 0.66, 0, 632, 0, 1, 0, 0, 632, 0, 0 ], [ 1, 0, 0.0189, 0.0094, 0, 0.66, 0.2, 336, 0, 1, 0, 0, 336, 0, 0 ], [ 1, 0, 0.0283, 0.0094, 0, 0.6...
[ "import gamewidget", "from pychess.System import glock", "from pychess.Utils.const import ACTION_MENU_ITEMS", "class GtkMenuItem (object):\n def __init__ (self, name, gamewidget, sensitive=False, label=None, tooltip=None):\n assert type(sensitive) is bool\n assert label is None or type(label)...
import time import gtk import gobject import pango import re from pychess.Utils.IconLoader import load_icon from pychess.System import uistuff from pychess.System.glock import glock_connect from pychess.widgets.ChatView import ChatView from pychess.widgets.pydock.PyDockTop import PyDockTop from pychess.widgets.pydock...
[ [ 1, 0, 0.0015, 0.0015, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0046, 0.0015, 0, 0.66, 0.0455, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0061, 0.0015, 0, ...
[ "import time", "import gtk", "import gobject", "import pango", "import re", "from pychess.Utils.IconLoader import load_icon", "from pychess.System import uistuff", "from pychess.System.glock import glock_connect", "from pychess.widgets.ChatView import ChatView", "from pychess.widgets.pydock.PyDock...
import gtk from pychess.System import uistuff from pychess.System.prefix import addDataPrefix from pychess.Utils.Piece import Piece,QUEEN,ROOK,BISHOP,KNIGHT from pychess.Utils.const import WHITE,BLACK from PieceWidget import PieceWidget uistuff.cacheGladefile("promotion.glade") class PromotionDialog: def...
[ [ 1, 0, 0.0233, 0.0233, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0698, 0.0233, 0, 0.66, 0.1429, 336, 0, 1, 0, 0, 336, 0, 0 ], [ 1, 0, 0.093, 0.0233, 0, 0...
[ "import gtk", "from pychess.System import uistuff", "from pychess.System.prefix import addDataPrefix", "from pychess.Utils.Piece import Piece,QUEEN,ROOK,BISHOP,KNIGHT", "from pychess.Utils.const import WHITE,BLACK", "from PieceWidget import PieceWidget", "uistuff.cacheGladefile(\"promotion.glade\")", ...
# -*- coding: UTF-8 -*- import os.path import time import codecs import gtk, pango, gobject from pychess.System import glock, uistuff from pychess.System.Log import log from pychess.System.Log import LOG_DEBUG, LOG_LOG, LOG_WARNING, LOG_ERROR from pychess.System.prefix import addDataPrefix def rawreplace(error): ...
[ [ 1, 0, 0.0117, 0.0039, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0156, 0.0039, 0, 0.66, 0.04, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0195, 0.0039, 0, 0.66...
[ "import os.path", "import time", "import codecs", "import gtk, pango, gobject", "from pychess.System import glock, uistuff", "from pychess.System.Log import log", "from pychess.System.Log import LOG_DEBUG, LOG_LOG, LOG_WARNING, LOG_ERROR", "from pychess.System.prefix import addDataPrefix", "def rawr...
# -*- coding: UTF-8 -*- import gtk, gtk.gdk from gobject import * import threading from pychess.System.prefix import addDataPrefix from pychess.System.Log import log from pychess.Utils.Cord import Cord from pychess.Utils.Move import Move from pychess.Utils.const import * from pychess.Utils.logic import validate from ...
[ [ 1, 0, 0.0054, 0.0018, 0, 0.66, 0, 166, 0, 2, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0072, 0.0018, 0, 0.66, 0.0476, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.009, 0.0018, 0, 0.6...
[ "import gtk, gtk.gdk", "from gobject import *", "import threading", "from pychess.System.prefix import addDataPrefix", "from pychess.System.Log import log", "from pychess.Utils.Cord import Cord", "from pychess.Utils.Move import Move", "from pychess.Utils.const import *", "from pychess.Utils.logic im...
# -*- coding: UTF-8 -*- import sys from math import floor, ceil, pi from time import time, sleep from threading import Lock, RLock import gtk, gtk.gdk, cairo from gobject import * import pango from pychess.System import glock, conf, gstreamer from pychess.System.glock import glock_connect, glock_connect_after from p...
[ [ 1, 0, 0.0024, 0.0008, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0032, 0.0008, 0, 0.66, 0.0385, 526, 0, 3, 0, 0, 526, 0, 0 ], [ 1, 0, 0.004, 0.0008, 0, 0...
[ "import sys", "from math import floor, ceil, pi", "from time import time, sleep", "from threading import Lock, RLock", "import gtk, gtk.gdk, cairo", "from gobject import *", "import pango", "from pychess.System import glock, conf, gstreamer", "from pychess.System.glock import glock_connect, glock_co...
import pygtk pygtk.require("2.0") import gtk from gobject import * from pychess.System.Log import log from pychess.Utils.IconLoader import load_icon class ToggleComboBox (gtk.ToggleButton): __gsignals__ = {'changed' : (SIGNAL_RUN_FIRST, TYPE_NONE, (TYPE_INT,))} def __init__ (self): gtk.ToggleButton...
[ [ 1, 0, 0.0076, 0.0076, 0, 0.66, 0, 106, 0, 1, 0, 0, 106, 0, 0 ], [ 8, 0, 0.0153, 0.0076, 0, 0.66, 0.1667, 66, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0229, 0.0076, 0, 0.6...
[ "import pygtk", "pygtk.require(\"2.0\")", "import gtk", "from gobject import *", "from pychess.System.Log import log", "from pychess.Utils.IconLoader import load_icon", "class ToggleComboBox (gtk.ToggleButton):\n\n __gsignals__ = {'changed' : (SIGNAL_RUN_FIRST, TYPE_NONE, (TYPE_INT,))}\n\n def __i...
# -*- coding: UTF-8 -*- from math import ceil, pi, cos, sin import cairo, gtk, pango from gtk import gdk from pychess.System import glock from pychess.System.repeat import repeat_sleep from pychess.Utils.const import WHITE, BLACK class ChessClock (gtk.DrawingArea): def __init__(self): gtk.DrawingAre...
[ [ 1, 0, 0.0165, 0.0055, 0, 0.66, 0, 526, 0, 4, 0, 0, 526, 0, 0 ], [ 1, 0, 0.022, 0.0055, 0, 0.66, 0.1667, 747, 0, 3, 0, 0, 747, 0, 0 ], [ 1, 0, 0.0275, 0.0055, 0, 0...
[ "from math import ceil, pi, cos, sin", "import cairo, gtk, pango", "from gtk import gdk", "from pychess.System import glock", "from pychess.System.repeat import repeat_sleep", "from pychess.Utils.const import WHITE, BLACK", "class ChessClock (gtk.DrawingArea):\n \n def __init__(self):\n gtk...
import gtk import cairo from pychess.gfx.Pieces import drawPiece class PieceWidget (gtk.DrawingArea): def __init__(self, piece): gtk.DrawingArea.__init__(self) self.connect("expose_event", self.expose) self.piece = piece def setPiece(self, piece): self.piece = piece ...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.3333, 747, 0, 1, 0, 0, 747, 0, 0 ], [ 1, 0, 0.1667, 0.0417, 0, ...
[ "import gtk", "import cairo", "from pychess.gfx.Pieces import drawPiece", "class PieceWidget (gtk.DrawingArea):\n def __init__(self, piece):\n gtk.DrawingArea.__init__(self)\n self.connect(\"expose_event\", self.expose)\n self.piece = piece\n \n def setPiece(self, piece):\n ...
import cairo import gtk from gtk import gdk from gobject import SIGNAL_RUN_FIRST, TYPE_NONE from pychess.System.prefix import addDataPrefix from pychess.System import glock from BorderBox import BorderBox class ChainVBox (gtk.VBox): """ Inspired by the GIMP chainbutton widget """ __gsignals__ = { 'cli...
[ [ 1, 0, 0.0054, 0.0054, 0, 0.66, 0, 747, 0, 1, 0, 0, 747, 0, 0 ], [ 1, 0, 0.0108, 0.0054, 0, 0.66, 0.0833, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0162, 0.0054, 0, ...
[ "import cairo", "import gtk", "from gtk import gdk", "from gobject import SIGNAL_RUN_FIRST, TYPE_NONE", "from pychess.System.prefix import addDataPrefix", "from pychess.System import glock", "from BorderBox import BorderBox", "class ChainVBox (gtk.VBox):\n \"\"\" Inspired by the GIMP chainbutton wi...
import sys, os import gtk from pychess.System.prefix import addDataPrefix from pychess.System import conf, gstreamer, uistuff from pychess.Players.engineNest import discoverer from pychess.Utils.const import * from pychess.Utils.IconLoader import load_icon firstRun = True def run(widgets): global firstRun if ...
[ [ 1, 0, 0.0021, 0.0021, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0042, 0.0021, 0, 0.66, 0.0435, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0084, 0.0021, 0, ...
[ "import sys, os", "import gtk", "from pychess.System.prefix import addDataPrefix", "from pychess.System import conf, gstreamer, uistuff", "from pychess.Players.engineNest import discoverer", "from pychess.Utils.const import *", "from pychess.Utils.IconLoader import load_icon", "firstRun = True", "de...
from os import path import gtk import cairo from pychess.System.prefix import addDataPrefix, addUserCachePrefix CLEARPATH = addDataPrefix("glade/clear.png") surface = None def giveBackground (widget): widget.connect("expose_event", expose) widget.connect("style-set", newtheme) def expose (widget, event): ...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, 0.125, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66, ...
[ "from os import path", "import gtk", "import cairo", "from pychess.System.prefix import addDataPrefix, addUserCachePrefix", "CLEARPATH = addDataPrefix(\"glade/clear.png\")", "surface = None", "def giveBackground (widget):\n widget.connect(\"expose_event\", expose)\n widget.connect(\"style-set\", n...
import gobject import gtk class InfoBarMessageButton (gobject.GObject): def __init__(self, text, response_id, sensitive=True, tooltip=""): gobject.GObject.__init__(self) self.text = text self.response_id = response_id self.sensitive = sensitive self.tooltip = tooltip ...
[ [ 1, 0, 0.0056, 0.0056, 0, 0.66, 0, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0112, 0.0056, 0, 0.66, 0.25, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 3, 0, 0.0843, 0.1292, 0, 0.66...
[ "import gobject", "import gtk", "class InfoBarMessageButton (gobject.GObject):\n def __init__(self, text, response_id, sensitive=True, tooltip=\"\"):\n gobject.GObject.__init__(self)\n self.text = text\n self.response_id = response_id\n self.sensitive = sensitive\n self.too...
import gtk class BorderBox (gtk.Alignment): def __init__ (self, widget=None, top=False, right=False, bottom=False, left=False): gtk.Alignment.__init__(self, 0, 0, 1, 1) self.connect("expose-event", self._onExpose) if widget: self.add(...
[ [ 1, 0, 0.0114, 0.0114, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 3, 0, 0.5114, 0.9886, 0, 0.66, 1, 48, 0, 11, 0, 0, 264, 0, 27 ], [ 2, 1, 0.1023, 0.1477, 1, 0.32...
[ "import gtk", "class BorderBox (gtk.Alignment):\n def __init__ (self, widget=None, top=False, right=False,\n bottom=False, left=False):\n gtk.Alignment.__init__(self, 0, 0, 1, 1)\n self.connect(\"expose-event\", self._onExpose)\n \n if widget:\n ...
import gtk, gtk.gdk from gobject import * from math import floor from BoardView import BoardView from pychess.Utils.const import * from pychess.Utils.Cord import Cord ALL = 0 class SetupBoard (gtk.EventBox): __gsignals__ = { 'cord_clicked' : (SIGNAL_RUN_FIRST, TYPE_NONE, (TYPE_PYOBJECT,)), } ...
[ [ 1, 0, 0.023, 0.0115, 0, 0.66, 0, 166, 0, 2, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66, 0.1429, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0575, 0.0115, 0, 0.6...
[ "import gtk, gtk.gdk", "from gobject import *", "from math import floor", "from BoardView import BoardView", "from pychess.Utils.const import *", "from pychess.Utils.Cord import Cord", "ALL = 0", "class SetupBoard (gtk.EventBox):\n \n __gsignals__ = {\n 'cord_clicked' : (SIGNAL_RUN_FIRST,...
import gtk.glade, os from pychess.System import conf from pychess.System import uistuff from pychess.System.prefix import addDataPrefix from random import randrange uistuff.cacheGladefile("tipoftheday.glade") class TipOfTheDay: @classmethod def _init (cls): cls.widgets = uistuff.GladeWidgets("tip...
[ [ 1, 0, 0.0154, 0.0154, 0, 0.66, 0, 910, 0, 2, 0, 0, 910, 0, 0 ], [ 1, 0, 0.0308, 0.0154, 0, 0.66, 0.1429, 336, 0, 1, 0, 0, 336, 0, 0 ], [ 1, 0, 0.0462, 0.0154, 0, ...
[ "import gtk.glade, os", "from pychess.System import conf", "from pychess.System import uistuff", "from pychess.System.prefix import addDataPrefix", "from random import randrange", "uistuff.cacheGladefile(\"tipoftheday.glade\")", "class TipOfTheDay:\n \n @classmethod\n def _init (cls):\n ...
import math ceil = lambda f: int(math.ceil(f)) from gobject import * import gtk import cairo import pango line = 10 curve = 60 dotSmall = 14 dotLarge = 24 lineprc = 1/7. hpadding = 5 vpadding = 3 class SpotGraph (gtk.EventBox): __gsignals__ = { 'spotClicked' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)) ...
[ [ 1, 0, 0.0021, 0.0021, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 14, 0, 0.0043, 0.0021, 0, 0.66, 0.0714, 211, 9, 0, 0, 0, 0, 0, 2 ], [ 1, 0, 0.0085, 0.0021, 0, 0...
[ "import math", "ceil = lambda f: int(math.ceil(f))", "from gobject import *", "import gtk", "import cairo", "import pango", "line = 10", "curve = 60", "dotSmall = 14", "dotLarge = 24", "lineprc = 1/7.", "hpadding = 5", "vpadding = 3", "class SpotGraph (gtk.EventBox):\n \n __gsignals_...
import gtk class ImageMenu(gtk.EventBox): def __init__ (self, image, child): gtk.EventBox.__init__(self) self.add(image) self.subwindow = gtk.Window() self.subwindow.set_decorated(False) self.subwindow.set_resizable(False) self.subwindow.set_type_hint(gtk.gd...
[ [ 1, 0, 0.0088, 0.0088, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 3, 0, 0.3596, 0.6754, 0, 0.66, 0.3333, 179, 0, 9, 0, 0, 474, 0, 47 ], [ 2, 1, 0.114, 0.1667, 1, ...
[ "import gtk", "class ImageMenu(gtk.EventBox):\n def __init__ (self, image, child):\n gtk.EventBox.__init__(self)\n self.add(image)\n \n self.subwindow = gtk.Window()\n self.subwindow.set_decorated(False)\n self.subwindow.set_resizable(False)", " def __init__ (self...