code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
# -*- coding: utf-8 -*-
import pygame
import globals
class HealthWindow(pygame.sprite.Sprite):
def __init__(self, rect, panel):
pygame.sprite.Sprite.__init__(self)
self.panel = panel
self.type = 'healthwindow'
self.player = panel.player
self.image = pygame.image.load('misc/he... | [
[
1,
0,
0.08,
0.04,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.12,
0.04,
0,
0.66,
0.5,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.58,
0.88,
0,
0.66,
1,
... | [
"import pygame",
"import globals",
"class HealthWindow(pygame.sprite.Sprite):\n def __init__(self, rect, panel):\n pygame.sprite.Sprite.__init__(self)\n self.panel = panel\n self.type = 'healthwindow'\n self.player = panel.player\n self.image = pygame.image.load('misc/healt... |
__author__="chubakur"
__date__ ="$20.02.2011 13:00:13$"
from setuptools import setup,find_packages
setup (
name = 'Orions',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for upload to
... | [
[
14,
0,
0.037,
0.037,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
763,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"__author__=\"chubakur\"",
"__date__ =\"$20.02.2011 13:00:13$\"",
"from setuptools import setup,find_packages",
"setup (\n name = 'Orions',\n version = '0.1',\n packages = find_packages(),\n\n # Declare your packages' dependencies here, for eg:\n install_requires=['foo>=3'],"
] |
# -*- coding: utf-8 -*-
import pygame
import globals
import threading
class GameInformationPanel(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.type = "gameinformationpanel"
self.image = pygame.image.load('misc/game_information.gif').convert_alpha()
... | [
[
1,
0,
0.0571,
0.0286,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0857,
0.0286,
0,
0.66,
0.3333,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.1143,
0.0286,
0,
0.... | [
"import pygame",
"import globals",
"import threading",
"class GameInformationPanel(pygame.sprite.Sprite):\n def __init__(self):\n pygame.sprite.Sprite.__init__(self)\n self.type = \"gameinformationpanel\"\n self.image = pygame.image.load('misc/game_information.gif').convert_alpha()\n ... |
# -*- coding: utf-8 -*-
import pygame
import globals
class Cardbox(pygame.sprite.Sprite):
def __init__(self, rect, player, position):
pygame.sprite.Sprite.__init__(self)
self.type = 'cardbox'
self.position = position
self.player = player #первый или второй
self.image = pygame... | [
[
1,
0,
0.0769,
0.0385,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.1154,
0.0385,
0,
0.66,
0.5,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.5769,
0.8846,
0,
0.66,... | [
"import pygame",
"import globals",
"class Cardbox(pygame.sprite.Sprite):\n def __init__(self, rect, player, position):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'cardbox'\n self.position = position\n self.player = player #первый или второй\n self.image = pygame.im... |
__author__="chubakur"
__date__ ="$07.03.2011 15:40:28$"
from setuptools import setup,find_packages
setup (
name = 'WizardsMagic',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for uploa... | [
[
14,
0,
0.037,
0.037,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
763,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"__author__=\"chubakur\"",
"__date__ =\"$07.03.2011 15:40:28$\"",
"from setuptools import setup,find_packages",
"setup (\n name = 'WizardsMagic',\n version = '0.1',\n packages = find_packages(),\n\n # Declare your packages' dependencies here, for eg:\n install_requires=['foo>=3'],"
] |
# -*- coding: utf-8 -*-
#import pygame
#SERVER!
import cards
import random
import globals
#import pygame
class Player(): #Прототип игрока
def __init__(self):
self.health = 50
self.name = "player"
self.action_points = True #Ходил игрок, или нет
#def damage(self, damage, enemy):
# s... | [
[
1,
0,
0.028,
0.007,
0,
0.66,
0,
271,
0,
1,
0,
0,
271,
0,
0
],
[
1,
0,
0.035,
0.007,
0,
0.66,
0.25,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.042,
0.007,
0,
0.66,
... | [
"import cards",
"import random",
"import globals",
"class Player(): #Прототип игрока\n def __init__(self):\n self.health = 50\n self.name = \"player\"\n self.action_points = True #Ходил игрок, или нет\n #def damage(self, damage, enemy):\n # self.health -= damage\n # if s... |
__author__="chubakur"
__date__ ="$20.02.2011 13:00:13$"
from setuptools import setup,find_packages
setup (
name = 'Orions',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for upload to
... | [
[
14,
0,
0.037,
0.037,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
763,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"__author__=\"chubakur\"",
"__date__ =\"$20.02.2011 13:00:13$\"",
"from setuptools import setup,find_packages",
"setup (\n name = 'Orions',\n version = '0.1',\n packages = find_packages(),\n\n # Declare your packages' dependencies here, for eg:\n install_requires=['foo>=3'],"
] |
import cards
# -*- coding: utf-8 -*-
import json
#import pygame.sprite
#Wizards Magic Server
#Copyright (C) 2011 сhubakur
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the L... | [
[
1,
0,
0.0059,
0.0059,
0,
0.66,
0,
271,
0,
1,
0,
0,
271,
0,
0
],
[
1,
0,
0.0176,
0.0059,
0,
0.66,
0.0476,
463,
0,
1,
0,
0,
463,
0,
0
],
[
1,
0,
0.2,
0.0059,
0,
0.6... | [
"import cards",
"import json",
"import sys",
"import player",
"import globals",
"import socket",
"import json",
"import threading",
"host = \"192.168.1.106\"",
"port = 7712",
"sockets = [] #сокеты игроков",
"sockets.append([])",
"connections = [] #подключения",
"connections.append([])",
... |
# -*- coding: utf-8 -*-
#SERVER!
#import pygame
#pygame.font.init()
#panels = pygame.sprite.Group() #Нижний уровень
#interface = pygame.sprite.Group() #Уровень кнопок
#cards_in_deck = pygame.sprite.Group() #Уровень дополнительный
#ccards_1 = pygame.sprite.Group() # Карты, которые вывел первый игрок
#ccards_2 = pygame.... | [
[
14,
0,
0.44,
0.04,
0,
0.66,
0,
887,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.48,
0.04,
0,
0.66,
0.125,
795,
1,
0,
0,
0,
0,
4,
0
],
[
14,
0,
0.64,
0.04,
0,
0.66,
0.25... | [
"cards_of_element_shower_element = \"\" #какой элемент показывать",
"selected_card = False #Выбранная карта",
"screen = None",
"player = None",
"player1 = None",
"players = [[]] #массив игроки. ID элемента - id игры .Элемент 0 - 1 игрок , элемент 1 - второй игрок",
"player2 = None",
"cast_focus = Fal... |
# -*- coding: utf-8 -*-
#from WizardsMagic import cardbox0
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__ = "chubakur"
__date__ = "$13.02.2011 18:46:32$"
water_cards = ["Nixie", "Hydra", "Waterfall", "Leviathan", "IceGuard", "Poseidon", "IceWizard", "Poison", "SeaJ... | [
[
14,
0,
0.2778,
0.0556,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3333,
0.0556,
0,
0.66,
0.0769,
763,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3889,
0.0556,
0,
0... | [
"__author__ = \"chubakur\"",
"__date__ = \"$13.02.2011 18:46:32$\"",
"water_cards = [\"Nixie\", \"Hydra\", \"Waterfall\", \"Leviathan\", \"IceGuard\", \"Poseidon\", \"IceWizard\", \"Poison\", \"SeaJustice\", \"Paralyze\", \"AcidStorm\", \"IceBolt\"]",
"fire_cards = [\"Demon\", \"Devil\", \"Firelord\", \"RedDr... |
# -*- coding: utf-8 -*-
import pygame
import globals
class Actionpanel(pygame.sprite.Sprite):
def __init__(self, rect, player):
pygame.sprite.Sprite.__init__(self)
self.type = 'actionpanel'
self.player = player
self.image = pygame.image.load('misc/actionpanel_bg.gif').convert_alpha()... | [
[
1,
0,
0.1176,
0.0588,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.1765,
0.0588,
0,
0.66,
0.5,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.6176,
0.8235,
0,
0.66,... | [
"import pygame",
"import globals",
"class Actionpanel(pygame.sprite.Sprite):\n def __init__(self, rect, player):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'actionpanel'\n self.player = player\n self.image = pygame.image.load('misc/actionpanel_bg.gif').convert_alpha()\n ... |
# -*- coding: utf-8 -*-
import pygame
import globals
class CardInfo(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.type = 'cardinfo'
#self.image = pygame.Surface((450, 300))
#self.image = self.image.convert()
#self.image.fill((0, 0, 0))
... | [
[
1,
0,
0.0526,
0.0263,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0789,
0.0263,
0,
0.66,
0.5,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.5526,
0.9211,
0,
0.66,... | [
"import pygame",
"import globals",
"class CardInfo(pygame.sprite.Sprite):\n def __init__(self):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'cardinfo'\n #self.image = pygame.Surface((450, 300))\n #self.image = self.image.convert()\n #self.image.fill((0, 0, 0))\n ... |
# -*- coding: utf-8 -*-
import pygame.sprite
#Wizards Magic
#Copyright (C) 2011 сhubakur
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any l... | [
[
1,
0,
0.0155,
0.0078,
0,
0.66,
0,
215,
0,
1,
0,
0,
215,
0,
0
],
[
14,
0,
0.1938,
0.0078,
0,
0.66,
0.0137,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2016,
0.0078,
0,
... | [
"import pygame.sprite",
"__author__ = \"chubakur\"",
"__date__ = \"$12.02.2011 12:11:42$\"",
"import pygame",
"from pygame.locals import *",
"import sys",
"import player",
"import globals",
"import elementbutton",
"import cards",
"import cardinfo",
"import cardsofelementshower",
"import comp... |
# -*- coding: utf-8 -*-
import globals
import pygame
import player
import cards
import sys
from pygame.locals import *
def play_bookopen_sound():
#pygame.mixer.music.load('misc/sounds/book_open.wav')
#pygame.mixer.music.play()
return
def play_bookclose_sound():
#pygame.mixer.music.load('misc/sounds/book... | [
[
1,
0,
0.0112,
0.0056,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0168,
0.0056,
0,
0.66,
0.1111,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0223,
0.0056,
0,
0.... | [
"import globals",
"import pygame",
"import player",
"import cards",
"import sys",
"from pygame.locals import *",
"def play_bookopen_sound():\n #pygame.mixer.music.load('misc/sounds/book_open.wav')\n #pygame.mixer.music.play()\n return",
" return",
"def play_bookclose_sound():\n #pygam... |
# -*- coding: utf-8 -*-
import pygame
import globals
class ElementButton(pygame.sprite.Sprite):
def __init__(self):
#Это прототип!
pass
def draw(self):
self.image = self.surface_backup.copy()
#exec("text = globals.font.render(str(globals.player" + str(self.player.id) + "." + self... | [
[
1,
0,
0.023,
0.0115,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0345,
0.0115,
0,
0.66,
0.125,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.1092,
0.1379,
0,
0.66... | [
"import pygame",
"import globals",
"class ElementButton(pygame.sprite.Sprite):\n def __init__(self):\n #Это прототип!\n pass\n def draw(self):\n self.image = self.surface_backup.copy()\n #exec(\"text = globals.font.render(str(globals.player\" + str(self.player.id) + \".\" + sel... |
# To change this template, choose Tools | Templates
# and open the template in the editor.
import socket
import globals
try:
import json
print 'JSON'
except ImportError:
import simplejson as json
print 'SIMPLEJSON'
#host = "drakmail.ru"
#port = 7712
sock = socket
def connect():
global sock
host ... | [
[
1,
0,
0.075,
0.025,
0,
0.66,
0,
687,
0,
1,
0,
0,
687,
0,
0
],
[
1,
0,
0.1,
0.025,
0,
0.66,
0.1429,
926,
0,
1,
0,
0,
926,
0,
0
],
[
7,
0,
0.1875,
0.15,
0,
0.66,
... | [
"import socket",
"import globals",
"try:\n import json\n print('JSON')\nexcept ImportError:\n import simplejson as json\n print('SIMPLEJSON')",
" import json",
" print('JSON')",
" import simplejson as json",
" print('SIMPLEJSON')",
"sock = socket",
"def connect():\n global... |
__author__="chubakur"
__date__ ="$08.04.2011 19:30:49$"
from setuptools import setup,find_packages
setup (
name = 'WizardsMagic',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for uploa... | [
[
14,
0,
0.037,
0.037,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
763,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"__author__=\"chubakur\"",
"__date__ =\"$08.04.2011 19:30:49$\"",
"from setuptools import setup,find_packages",
"setup (\n name = 'WizardsMagic',\n version = '0.1',\n packages = find_packages(),\n\n # Declare your packages' dependencies here, for eg:\n install_requires=['foo>=3'],"
] |
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import pygame
import sys
import os
import globals
from pygame.locals import *
import options
current_folder = os.path.dirname(os.path.abspath(__file__))
class MenuButton(pygame.sprite.Sprite):
''' menu item '''
def __init__(self, pos=0, text="", cmd... | [
[
1,
0,
0.0227,
0.0076,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0303,
0.0076,
0,
0.66,
0.0714,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0379,
0.0076,
0,
0.... | [
"import pygame",
"import sys",
"import os",
"import globals",
"from pygame.locals import *",
"import options",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class MenuButton(pygame.sprite.Sprite):\n\t''' menu item '''\n\tdef __init__(self, pos=0, text=\"\", cmd=\"\", enabled=True, lo... |
# -*- coding: utf-8 -*-
#import pygame
import cards
import os
import random
import globals
import sockets
import pygame
current_folder = os.path.dirname(os.path.abspath(__file__))
class Player(): #Прототип игрока
def __init__(self):
self.health = 50
self.name = "player"
self.action_points =... | [
[
1,
0,
0.0219,
0.0073,
0,
0.66,
0,
271,
0,
1,
0,
0,
271,
0,
0
],
[
1,
0,
0.0292,
0.0073,
0,
0.66,
0.0833,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0365,
0.0073,
0,
... | [
"import cards",
"import os",
"import random",
"import globals",
"import sockets",
"import pygame",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class Player(): #Прототип игрока\n def __init__(self):\n self.health = 50\n self.name = \"player\"\n self.action_po... |
# -*- coding: utf-8 -*-
import pygame
import os
import globals
import player
current_folder = os.path.dirname(os.path.abspath(__file__))
class CompleteTheCourseButton(pygame.sprite.Sprite):
def __init__(self, rect):
pygame.sprite.Sprite.__init__(self)
#self.panel = panel
self.type = 'button... | [
[
1,
0,
0.0556,
0.0278,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0833,
0.0278,
0,
0.66,
0.2,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1111,
0.0278,
0,
0.66,... | [
"import pygame",
"import os",
"import globals",
"import player",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class CompleteTheCourseButton(pygame.sprite.Sprite):\n def __init__(self, rect):\n pygame.sprite.Sprite.__init__(self)\n #self.panel = panel\n self.type ... |
# To change this template, choose Tools | Templates
# and open the template in the editor.
import globals
import pygame
class NicknameWindow(pygame.sprite.Sprite):
def __init__(self,rect,player):
pygame.sprite.Sprite.__init__(self)
self.type = 'nicknamewindow'
#self.rect = rect
self.... | [
[
1,
0,
0.15,
0.05,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.2,
0.05,
0,
0.66,
0.5,
87,
0,
1,
0,
0,
87,
0,
0
],
[
3,
0,
0.6,
0.75,
0,
0.66,
1,
38... | [
"import globals",
"import pygame",
"class NicknameWindow(pygame.sprite.Sprite):\n def __init__(self,rect,player):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'nicknamewindow'\n #self.rect = rect\n self.player = player\n self.nickname = globals.font2.render(self.play... |
# -*- coding: utf-8 -*-
import pygame
import globals
class HealthWindow(pygame.sprite.Sprite):
def __init__(self, rect):
pygame.sprite.Sprite.__init__(self)
self.type = 'healthwindow'
globals.interface.add(self)
self.font = pygame.font.Font(None, 22)
text = self.font.render('... | [
[
1,
0,
0.0465,
0.0233,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0698,
0.0233,
0,
0.66,
0.3333,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.314,
0.4651,
0,
0.6... | [
"import pygame",
"import globals",
"class HealthWindow(pygame.sprite.Sprite):\n def __init__(self, rect):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'healthwindow'\n globals.interface.add(self)\n self.font = pygame.font.Font(None, 22)\n text = self.font.render('1',... |
__author__="chubakur"
__date__ ="$20.02.2011 13:00:13$"
from setuptools import setup,find_packages
setup (
name = 'Orions',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for upload to
... | [
[
14,
0,
0.037,
0.037,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
763,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"__author__=\"chubakur\"",
"__date__ =\"$20.02.2011 13:00:13$\"",
"from setuptools import setup,find_packages",
"setup (\n name = 'Orions',\n version = '0.1',\n packages = find_packages(),\n\n # Declare your packages' dependencies here, for eg:\n install_requires=['foo>=3'],"
] |
# -*- coding: utf-8 -*-
import pygame
import globals
import threading
import os
current_folder = os.path.dirname(os.path.abspath(__file__))
class GameInformationPanel(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.type = "gameinformationpanel"
self.image... | [
[
1,
0,
0.0513,
0.0256,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0769,
0.0256,
0,
0.66,
0.2,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.1026,
0.0256,
0,
0.66,... | [
"import pygame",
"import globals",
"import threading",
"import os",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class GameInformationPanel(pygame.sprite.Sprite):\n def __init__(self):\n pygame.sprite.Sprite.__init__(self)\n self.type = \"gameinformationpanel\"\n ... |
import unittest
import doctest
class OptionalExtensionTestSuite(unittest.TestSuite):
def run(self, result):
import simplejson
run = unittest.TestSuite.run
run(self, result)
simplejson._toggle_speedups(False)
run(self, result)
simplejson._toggle_speedups(True)
... | [
[
1,
0,
0.0156,
0.0156,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0312,
0.0156,
0,
0.66,
0.1667,
614,
0,
1,
0,
0,
614,
0,
0
],
[
3,
0,
0.1406,
0.1406,
0,
0.... | [
"import unittest",
"import doctest",
"class OptionalExtensionTestSuite(unittest.TestSuite):\n def run(self, result):\n import simplejson\n run = unittest.TestSuite.run\n run(self, result)\n simplejson._toggle_speedups(False)\n run(self, result)\n simplejson._toggle_s... |
"""Implementation of JSONEncoder
"""
import re
from decimal import Decimal
def _import_speedups():
try:
from simplejson import _speedups
return _speedups.encode_basestring_ascii, _speedups.make_encoder
except ImportError:
return None, None
c_encode_basestring_ascii, c_make_encoder = _im... | [
[
8,
0,
0.003,
0.004,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.006,
0.002,
0,
0.66,
0.0588,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.008,
0.002,
0,
0.66,
... | [
"\"\"\"Implementation of JSONEncoder\n\"\"\"",
"import re",
"from decimal import Decimal",
"def _import_speedups():\n try:\n from simplejson import _speedups\n return _speedups.encode_basestring_ascii, _speedups.make_encoder\n except ImportError:\n return None, None",
" try:\n ... |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | [
[
8,
0,
0.1142,
0.226,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2283,
0.0023,
0,
0.66,
0.0625,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2352,
0.0114,
0,
0.66,... | [
"r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintaine... |
"""JSON token scanner
"""
import re
def _import_c_make_scanner():
try:
from simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))... | [
[
8,
0,
0.0195,
0.026,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.039,
0.013,
0,
0.66,
0.1429,
540,
0,
1,
0,
0,
540,
0,
0
],
[
2,
0,
0.0844,
0.0779,
0,
0.66,
... | [
"\"\"\"JSON token scanner\n\"\"\"",
"import re",
"def _import_c_make_scanner():\n try:\n from simplejson._speedups import make_scanner\n return make_scanner\n except ImportError:\n return None",
" try:\n from simplejson._speedups import make_scanner\n return make_sc... |
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger
http://code.activestate.com/recipes/576693/
"""
from UserDict import DictMixin
# Modified from original to support Python 2.4, see
# http://code.google.com/p/simplejson/issues/detail?id=53
try:
all
except NameError:
def all(seq):
... | [
[
8,
0,
0.0252,
0.042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0504,
0.0084,
0,
0.66,
0.3333,
351,
0,
1,
0,
0,
351,
0,
0
],
[
7,
0,
0.1134,
0.0672,
0,
0.66,... | [
"\"\"\"Drop-in replacement for collections.OrderedDict by Raymond Hettinger\n\nhttp://code.activestate.com/recipes/576693/\n\n\"\"\"",
"from UserDict import DictMixin",
"try:\n all\nexcept NameError:\n def all(seq):\n for elem in seq:\n if not elem:\n return False\n ... |
# -*- coding: utf-8 -*-
import pygame
import globals
import os
current_folder = os.path.dirname(os.path.abspath(__file__))
class Cardbox(pygame.sprite.Sprite):
def __init__(self, rect, player, position):
pygame.sprite.Sprite.__init__(self)
self.type = 'cardbox'
self.position = position
... | [
[
1,
0,
0.0444,
0.0222,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0667,
0.0222,
0,
0.66,
0.25,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0889,
0.0222,
0,
0.66... | [
"import pygame",
"import globals",
"import os",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class Cardbox(pygame.sprite.Sprite):\n def __init__(self, rect, player, position):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'cardbox'\n self.position = position\... |
import pygame
import sys
import globals
from pygame.locals import *
import ConfigParser
import os.path
from widgets import TxtInput, CheckBox
import menu
def launcher():
#Something ,what we need to change after reset configuration
globals.bg_sound.stop()
if globals.music == "Y":
globals.... | [
[
1,
0,
0.0097,
0.0097,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0194,
0.0097,
0,
0.66,
0.0833,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0291,
0.0097,
0,
0.... | [
"import pygame",
"import sys",
"import globals",
"from pygame.locals import *",
"import ConfigParser",
"import os.path",
"from widgets import TxtInput, CheckBox",
"import menu",
"def launcher():\n #Something ,what we need to change after reset configuration\n globals.bg_sound.stop()\n if gl... |
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import pygame
import globals
from pygame.locals import *
from pygame import Surface, draw
class TxtInput(pygame.sprite.Sprite):
''' class handling input box:
pos: # of line from the top of form
label: box label
text: text inside box
length: box... | [
[
1,
0,
0.0122,
0.0041,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0163,
0.0041,
0,
0.66,
0.1429,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0203,
0.0041,
0,
0.... | [
"import pygame",
"import globals",
"from pygame.locals import *",
"from pygame import Surface, draw",
"class TxtInput(pygame.sprite.Sprite):\n\t''' class handling input box: \n\tpos: # of line from the top of form\n\tlabel: box label \n\ttext: text inside box \n\tlength: box length in chars\n\tnumeric: Tru... |
# -*- coding: utf-8 -*-
# Documentation for this class available at the end of this code.
# __author__ = "mtsimoni"
# __date__ = "$25.05.2011 23:17:00$"
import pygame
import globals
class Animation():
def __init__(self, image, origin = [0,0]):
self.image = image #The image to move
self.origin = or... | [
[
1,
0,
0.0531,
0.0088,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0619,
0.0088,
0,
0.66,
0.3333,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.4425,
0.7345,
0,
0.... | [
"import pygame",
"import globals",
"class Animation():\n def __init__(self, image, origin = [0,0]):\n self.image = image #The image to move\n self.origin = origin #The origin\n self.position = [self.origin[0],self.origin[1]]\n self.path = [(0,0)] #The path that must follow the ani... |
# -*- coding: utf-8 -*-
import pygame
import globals
import os
current_folder = os.path.dirname(os.path.abspath(__file__))
class CardInfo(pygame.sprite.Sprite):
""" class to display information about a card """
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.type = 'cardinfo'
... | [
[
1,
0,
0.0435,
0.0217,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0652,
0.0217,
0,
0.66,
0.25,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.087,
0.0217,
0,
0.66,... | [
"import pygame",
"import globals",
"import os",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class CardInfo(pygame.sprite.Sprite):\n \"\"\" class to display information about a card \"\"\"\n def __init__(self):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'cardi... |
# -*- coding: utf-8 -*-
import pygame.sprite
#Wizards Magic
#Copyright (C) 2011 сhubakur
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any l... | [
[
1,
0,
0.0065,
0.0032,
0,
0.66,
0,
215,
0,
1,
0,
0,
215,
0,
0
],
[
14,
0,
0.0779,
0.0032,
0,
0.66,
0.0238,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0812,
0.0032,
0,
... | [
"import pygame.sprite",
"__author__ = \"chubakur\"",
"__date__ = \"$12.02.2011 12:11:42$\"",
"import pygame",
"from pygame.locals import *",
"import sys",
"import os",
"import player",
"import globals",
"import elementbutton",
"import cards",
"import cardinfo",
"import cardsofelementshower",... |
import pygame.sprite
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="chubakur"
__date__ ="$17.03.2011 16:55:19$"
import pygame
import globals
class MessageWindow(pygame.sprite.Sprite):
def __init__(self,message):
pygame.sprite.Sprite.__init__(self)
... | [
[
1,
0,
0.0476,
0.0476,
0,
0.66,
0,
215,
0,
1,
0,
0,
215,
0,
0
],
[
14,
0,
0.2381,
0.0476,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2857,
0.0476,
0,
0.6... | [
"import pygame.sprite",
"__author__=\"chubakur\"",
"__date__ =\"$17.03.2011 16:55:19$\"",
"import pygame",
"import globals",
"class MessageWindow(pygame.sprite.Sprite):\n def __init__(self,message):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'informationwindow'\n self.imag... |
# -*- coding: utf-8 -*-
import globals
import pygame
import cards
import sys
import os
import sockets
import menu
from pygame.locals import *
current_folder = os.path.dirname(os.path.abspath(__file__))
class Point(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.i... | [
[
1,
0,
0.0097,
0.0049,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0146,
0.0049,
0,
0.66,
0.1,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0194,
0.0049,
0,
0.66,... | [
"import globals",
"import pygame",
"import cards",
"import sys",
"import os",
"import sockets",
"import menu",
"from pygame.locals import *",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class Point(pygame.sprite.Sprite):\n def __init__(self):\n pygame.sprite.Sprite.__... |
# -*- coding: utf-8 -*-
import pygame
import globals
import os
pygame.font.init()
current_folder = os.path.dirname(os.path.abspath(__file__))
class ElementShower(pygame.sprite.Sprite):
def __init__(self):
self.type = 'outer'
self.font = pygame.font.Font(current_folder+"/misc/Domestic_Manners.ttf", ... | [
[
1,
0,
0.0116,
0.0058,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0173,
0.0058,
0,
0.66,
0.0556,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0231,
0.0058,
0,
0.... | [
"import pygame",
"import globals",
"import os",
"pygame.font.init()",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class ElementShower(pygame.sprite.Sprite):\n def __init__(self):\n self.type = 'outer'\n self.font = pygame.font.Font(current_folder+\"/misc/Domestic_Manne... |
# -*- coding: utf-8 -*-
import globals
import os
import pygame
current_folder = os.path.dirname(os.path.abspath(__file__))
#globals.cards_of_element_shower_element содержит стихию
class LeftArrow(pygame.sprite.Sprite):
def __init__(self, rect):
pygame.sprite.Sprite.__init__(self)
self.type = 'butto... | [
[
1,
0,
0.0175,
0.0088,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0263,
0.0088,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0351,
0.0088,
0,
... | [
"import globals",
"import os",
"import pygame",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"class LeftArrow(pygame.sprite.Sprite):\n def __init__(self, rect):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'button'\n self.image_normal = pygame.image.load(curr... |
# -*- coding: utf-8 -*-
import pygame
import os
current_folder = os.path.dirname(os.path.abspath(__file__))
pygame.font.init()
panels = pygame.sprite.Group() #Нижний уровень #Lower Level
interface = pygame.sprite.Group() #Уровень кнопок #Button Level
cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #The l... | [
[
1,
0,
0.0194,
0.0097,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.0291,
0.0097,
0,
0.66,
0.0233,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0485,
0.0097,
0,
0... | [
"import pygame",
"import os",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"pygame.font.init()",
"panels = pygame.sprite.Group() #Нижний уровень #Lower Level",
"interface = pygame.sprite.Group() #Уровень кнопок #Button Level",
"cards_in_deck = pygame.sprite.Group() #Уровень дополнитель... |
# -*- coding: utf-8 -*-
import pygame.sprite
import animations
import os
current_folder = os.path.dirname(os.path.abspath(__file__))
#from WizardsMagic import cardbox0
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__ = "chubakur"
__date__ = "$13.02.2011 18:46:32$"
w... | [
[
1,
0,
0.001,
0.0005,
0,
0.66,
0,
215,
0,
1,
0,
0,
215,
0,
0
],
[
1,
0,
0.0015,
0.0005,
0,
0.66,
0.0104,
570,
0,
1,
0,
0,
570,
0,
0
],
[
1,
0,
0.002,
0.0005,
0,
0.... | [
"import pygame.sprite",
"import animations",
"import os",
"current_folder = os.path.dirname(os.path.abspath(__file__))",
"__author__ = \"chubakur\"",
"__date__ = \"$13.02.2011 18:46:32$\"",
"water_cards_deck = [\"Nixie\", \"Hydra\", \"Waterfall\", \"Leviathan\", \"IceGuard\", \"Poseidon\", \"IceWizard\"... |
# -*- coding: utf-8 -*-
import globals
import pygame
class CardsOfElementShower(pygame.sprite.Sprite):
#Не прототип!
def __init__(self, rect, player):
pygame.sprite.Sprite.__init__(self)
self.player = player
self.type = 'cardsofelementshower'
self.image = pygame.image.load('misc/... | [
[
1,
0,
0.0339,
0.0169,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
1,
0,
0.0508,
0.0169,
0,
0.66,
0.5,
87,
0,
1,
0,
0,
87,
0,
0
],
[
3,
0,
0.5339,
0.9492,
0,
0.66,... | [
"import globals",
"import pygame",
"class CardsOfElementShower(pygame.sprite.Sprite):\n #Не прототип!\n def __init__(self, rect, player):\n pygame.sprite.Sprite.__init__(self)\n self.player = player\n self.type = 'cardsofelementshower'\n self.image = pygame.image.load('misc/car... |
# -*- coding: utf-8 -*-
import pygame
pygame.font.init()
panels = pygame.sprite.Group() #Нижний уровень #Lower Level
interface = pygame.sprite.Group() #Уровень кнопок #Button Level
cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #The level of additional
ccards_1 = pygame.sprite.Group() # Карты, которые ... | [
[
1,
0,
0.0769,
0.0385,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
8,
0,
0.1538,
0.0385,
0,
0.66,
0.0526,
319,
3,
0,
0,
0,
0,
0,
1
],
[
14,
0,
0.1923,
0.0385,
0,
0.6... | [
"import pygame",
"pygame.font.init()",
"panels = pygame.sprite.Group() #Нижний уровень #Lower Level",
"interface = pygame.sprite.Group() #Уровень кнопок #Button Level",
"cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #The level of additional",
"ccards_1 = pygame.sprite.Group() # Карты, кот... |
# -*- coding: utf-8 -*-
import pygame.sprite
#from WizardsMagic import cardbox0
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__ = "chubakur"
__date__ = "$13.02.2011 18:46:32$"
water_cards = ["Nixie", "Hydra", "Waterfall", "Leviathan", "IceGuard", "Poseidon", "IceWiz... | [
[
1,
0,
0.0011,
0.0005,
0,
0.66,
0,
215,
0,
1,
0,
0,
215,
0,
0
],
[
14,
0,
0.0033,
0.0005,
0,
0.66,
0.011,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0038,
0.0005,
0,
0... | [
"import pygame.sprite",
"__author__ = \"chubakur\"",
"__date__ = \"$13.02.2011 18:46:32$\"",
"water_cards = [\"Nixie\", \"Hydra\", \"Waterfall\", \"Leviathan\", \"IceGuard\", \"Poseidon\", \"IceWizard\", \"Poison\", \"SeaJustice\", \"Paralyze\", \"AcidStorm\", \"IceBolt\"]",
"fire_cards = [\"Demon\", \"Devi... |
# -*- coding: utf-8 -*-
import pygame
import globals
class Infopanel(pygame.sprite.Sprite):
def __init__(self, rect, player):
pygame.sprite.Sprite.__init__(self)
self.type = 'infopanel'
self.player = player
#self.image = pygame.Surface((screen.get_size()[0],screen.get_size()[1]/25))
... | [
[
1,
0,
0.1111,
0.0556,
0,
0.66,
0,
87,
0,
1,
0,
0,
87,
0,
0
],
[
1,
0,
0.1667,
0.0556,
0,
0.66,
0.5,
926,
0,
1,
0,
0,
926,
0,
0
],
[
3,
0,
0.6111,
0.8333,
0,
0.66,... | [
"import pygame",
"import globals",
"class Infopanel(pygame.sprite.Sprite):\n def __init__(self, rect, player):\n pygame.sprite.Sprite.__init__(self)\n self.type = 'infopanel'\n self.player = player\n #self.image = pygame.Surface((screen.get_size()[0],screen.get_size()[1]/25))\n ... |
#!/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... |
#!/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 python2
# -*- 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 (pa... | [
[
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/env python2
# -*- coding: utf-8 -*-
from __future__ import with_statement
import collections
#############################
# Configuration starts here #
#############################
FILENAME = 'TRANSLATORS'
POOLSIZE = 7
###########################
# Configuration ends here #
###########################
... | [
[
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 ... |
# -*- 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... |
import unittest
import datetime
from pychess.Utils.const import WHITE
from pychess.ic.FICSConnection import Connection
from pychess.ic.VerboseTelnet import PredictionsTelnet
from pychess.ic.managers.AdjournManager import AdjournManager
from pychess.ic.managers.GameListManager import GameListManager
from pychess.ic.man... | [
[
1,
0,
0.0047,
0.0047,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0095,
0.0047,
0,
0.66,
0.0769,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.019,
0.0047,
0,
0.6... | [
"import unittest",
"import datetime",
"from pychess.Utils.const import WHITE",
"from pychess.ic.FICSConnection import Connection",
"from pychess.ic.VerboseTelnet import PredictionsTelnet",
"from pychess.ic.managers.AdjournManager import AdjournManager",
"from pychess.ic.managers.GameListManager import G... |
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... |
import unittest
import __builtin__
__builtin__.__dict__['_'] = lambda s: s
modules_to_test = (
"bitboard",
"draw",
"eval",
"fen",
"frc_castling",
"frc_movegen",
"move",
"movegen",
"pgn",
"zobrist",
'ficsmanagers',
'analysis',
)
def suite():
tests = unittest.Te... | [
[
1,
0,
0.0345,
0.0345,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.1034,
0.0345,
0,
0.66,
0.2,
364,
0,
1,
0,
0,
364,
0,
0
],
[
14,
0,
0.1379,
0.0345,
0,
0.66... | [
"import unittest",
"import __builtin__",
"__builtin__.__dict__['_'] = lambda s: s",
"modules_to_test = (\n \"bitboard\",\n \"draw\",\n \"eval\",\n \"fen\",\n \"frc_castling\",\n \"frc_movegen\",\n \"move\",",
"def suite():\n tests = unittest.TestSuite()\n for module in map(__impor... |
import sys
import unittest
from pychess.Utils.Board import Board
from pychess.Utils.Move import parseSAN
class MoveTestCase(unittest.TestCase):
def setUp(self):
self.board = Board()
def test_paresSAN(self):
"""Testing parseSAN with unambiguous notations variants"""
s... | [
[
1,
0,
0.0244,
0.0244,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0488,
0.0244,
0,
0.66,
0.2,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0976,
0.0244,
0,
0.66,... | [
"import sys",
"import unittest",
"from pychess.Utils.Board import Board",
"from pychess.Utils.Move import parseSAN",
"class MoveTestCase(unittest.TestCase):\n \n def setUp(self):\n self.board = Board()\n\n def test_paresSAN(self):\n \"\"\"Testing parseSAN with unambiguous notations va... |
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
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 sys
import unittest
from pychess.Utils.Board import Board
from pychess.Utils.lutils.LBoard import LBoard
from pychess.Savers import pgn
from pychess.Utils.const import FEN_START
KEEPENDS = True
GAMES = """
[Event "Bourdonnais"]
[Site "La Palamede 1837"]
[Date "1797.??.??"]
[Round "?"]
[White "De la Bourd... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0253,
0.0127,
0,
0.66,
0.1,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0506,
0.0127,
0,
0.66,... | [
"import sys",
"import unittest",
"from pychess.Utils.Board import Board",
"from pychess.Utils.lutils.LBoard import LBoard",
"from pychess.Savers import pgn",
"from pychess.Utils.const import FEN_START",
"KEEPENDS = True",
"GAMES = \"\"\"\n[Event \"Bourdonnais\"]\n[Site \"La Palamede 1837\"]\n[Date \"1... |
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... |
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)\... |
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.0078,
0.0039,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.0117,
0.0039,
0,
0.66,
0.0769,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0156,
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 -*-
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... |
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.0055,
0.0055,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0166,
0.0055,
0,
0.66,
0.0667,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0221,
0.0055,
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... |
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\"... |
# -*- 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.lutils.lsort import staticExchangeEvaluate
from pychess.Utils.lutil... | [
[
1,
0,
0.0119,
0.004,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0198,
0.004,
0,
0.66,
0.0625,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0237,
0.004,
0,
0.6... | [
"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.lutils.lsort import staticExchangeEvaluate",
"from pyche... |
#!/usr/bin/env python2
#
# PyChess startup script
#
import os, sys
if sys.version_info < (2, 5, 0):
print 'ERROR: PyChess requires Python >= 2.5'
sys.exit(1)
import pygtk
pygtk.require("2.0")
try:
import rsvg
except ImportError:
print 'ERROR: Could not load the rsvg module.'
print 'You need to in... | [
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
4,
0,
0.1778,
0.0667,
0,
0.66,
0.0909,
0,
0,
0,
0,
0,
0,
0,
2
],
[
8,
1,
0.1778,
0.0222,
1,
0.06... | [
"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... |
from gobject import GObject, SIGNAL_RUN_FIRST, TYPE_NONE
class PlayerIsDead (Exception):
""" Used instead of returning a move,
when an engine crashes, or a nonlocal player disconnects """
pass
class TurnInterrupt (Exception):
""" Used instead of returning a move, when a players turn is interupted.... | [
[
1,
0,
0.007,
0.007,
0,
0.66,
0,
90,
0,
3,
0,
0,
90,
0,
0
],
[
3,
0,
0.0317,
0.0282,
0,
0.66,
0.3333,
977,
0,
0,
0,
0,
645,
0,
0
],
[
8,
1,
0.0317,
0.0141,
1,
0.93... | [
"from gobject import GObject, SIGNAL_RUN_FIRST, TYPE_NONE",
"class PlayerIsDead (Exception):\n \"\"\" Used instead of returning a move,\n when an engine crashes, or a nonlocal player disconnects \"\"\"\n pass",
" \"\"\" Used instead of returning a move,\n when an engine crashes, or a nonl... |
from gobject import GObject, SIGNAL_RUN_FIRST
from threading import Condition, Lock, RLock
from pychess.System.Log import log
from pychess.Players.Engine import Engine
from pychess.Utils.const import *
class ProtocolEngine (Engine):
__gsignals__ = {
"readyForOptions": (SIGNAL_RUN_FIRST, None, ()),
... | [
[
1,
0,
0.0286,
0.0286,
0,
0.66,
0,
90,
0,
2,
0,
0,
90,
0,
0
],
[
1,
0,
0.0571,
0.0286,
0,
0.66,
0.2,
83,
0,
3,
0,
0,
83,
0,
0
],
[
1,
0,
0.1143,
0.0286,
0,
0.66,
... | [
"from gobject import GObject, SIGNAL_RUN_FIRST",
"from threading import Condition, Lock, RLock",
"from pychess.System.Log import log",
"from pychess.Players.Engine import Engine",
"from pychess.Utils.const import *",
"class ProtocolEngine (Engine):\n \n __gsignals__ = {\n \"readyForOptions\":... |
from Queue import Queue
import gtk, gobject
from pychess.Utils.const import *
from pychess.Utils.Offer import Offer
from pychess.System.Log import log
from pychess.System import glock, conf
from pychess.widgets.gamewidget import cur_gmwidg
from Player import Player, PlayerIsDead, TurnInterrupt
OFFER_MESSAGES = {
... | [
[
1,
0,
0.0036,
0.0036,
0,
0.66,
0,
952,
0,
1,
0,
0,
952,
0,
0
],
[
1,
0,
0.0107,
0.0036,
0,
0.66,
0.0833,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0179,
0.0036,
0,
... | [
"from Queue import Queue",
"import gtk, gobject",
"from pychess.Utils.const import *",
"from pychess.Utils.Offer import Offer",
"from pychess.System.Log import log",
"from pychess.System import glock, conf",
"from pychess.widgets.gamewidget import cur_gmwidg",
"from Player import Player, PlayerIsDead,... |
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
class ICGameModel (GameModel):
def __init__ (self, connection, gameno, timemodel, variant, rated=False):
Game... | [
[
1,
0,
0.0057,
0.0057,
0,
0.66,
0,
954,
0,
1,
0,
0,
954,
0,
0
],
[
1,
0,
0.0114,
0.0057,
0,
0.66,
0.2,
182,
0,
1,
0,
0,
182,
0,
0
],
[
1,
0,
0.0171,
0.0057,
0,
0.6... | [
"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",
"class ICGameModel (GameModel):\n \n def __init__ (self, connection, gameno, timemodel, vari... |
from threading import RLock
from gobject import *
from time import time
from pychess.Utils.const import *
from pychess.Utils.Rating import Rating
from pychess.System.Log import log
import re
types = "(?:blitz|standard|lightning|wild|bughouse|crazyhouse|suicide|losers|atomic)"
rated = "(rated|unrated)"
colors = "(?:\[... | [
[
1,
0,
0.0058,
0.0029,
0,
0.66,
0,
83,
0,
1,
0,
0,
83,
0,
0
],
[
1,
0,
0.0087,
0.0029,
0,
0.66,
0.0556,
90,
0,
1,
0,
0,
90,
0,
0
],
[
1,
0,
0.0116,
0.0029,
0,
0.66... | [
"from threading import RLock",
"from gobject import *",
"from time import time",
"from pychess.Utils.const import *",
"from pychess.Utils.Rating import Rating",
"from pychess.System.Log import log",
"import re",
"types = \"(?:blitz|standard|lightning|wild|bughouse|crazyhouse|suicide|losers|atomic)\"",... |
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 ... |
import re
from gobject import GObject, SIGNAL_RUN_FIRST
from pychess.Utils.const import *
from pychess.Utils.Offer import Offer
from pychess.System.Log import log
from pychess.ic.managers.GameListManager import convertName
from GameListManager import variantToSeek, unsupportedWilds
names = "\w+(?:\([A-Z\*]+\))*"
r... | [
[
1,
0,
0.0087,
0.0043,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0173,
0.0043,
0,
0.66,
0.0588,
90,
0,
2,
0,
0,
90,
0,
0
],
[
1,
0,
0.026,
0.0043,
0,
0.6... | [
"import re",
"from gobject import GObject, SIGNAL_RUN_FIRST",
"from pychess.Utils.const import *",
"from pychess.Utils.Offer import Offer",
"from pychess.System.Log import log",
"from pychess.ic.managers.GameListManager import convertName",
"from GameListManager import variantToSeek, unsupportedWilds",
... |
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 *
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\"",
... |
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.8,
... | [
"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... |
import socket
from socket import SHUT_RDWR
import webbrowser
import re
import gtk, gobject, sys
from pychess.System.repeat import repeat_sleep
from pychess.System.ThreadPool import pool
from pychess.System import gstreamer, uistuff, glock
from pychess.System.prefix import addDataPrefix
from pychess.System import uist... | [
[
1,
0,
0.0049,
0.0049,
0,
0.66,
0,
687,
0,
1,
0,
0,
687,
0,
0
],
[
1,
0,
0.0099,
0.0049,
0,
0.66,
0.0625,
687,
0,
1,
0,
0,
687,
0,
0
],
[
1,
0,
0.0148,
0.0049,
0,
... | [
"import socket",
"from socket import SHUT_RDWR",
"import webbrowser",
"import re",
"import gtk, gobject, sys",
"from pychess.System.repeat import repeat_sleep",
"from pychess.System.ThreadPool import pool",
"from pychess.System import gstreamer, uistuff, glock",
"from pychess.System.prefix import ad... |
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... |
import re
from pychess.Utils.const import *
import time
import math
from pychess.System import conf
elemExpr = re.compile(r"([a-zA-Z])\s*([0-9\.,\s]*)\s+")
spaceExpr = re.compile(r"[\s,]+")
l = []
def parse(n, psize):
yield "def f(c):"
s = psize/size
for cmd, points in n:
pstr = ",".join(str(p*s)... | [
[
1,
0,
0.0082,
0.0082,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0164,
0.0082,
0,
0.66,
0.0556,
297,
0,
1,
0,
0,
297,
0,
0
],
[
1,
0,
0.0246,
0.0082,
0,
... | [
"import re",
"from pychess.Utils.const import *",
"import time",
"import math",
"from pychess.System import conf",
"elemExpr = re.compile(r\"([a-zA-Z])\\s*([0-9\\.,\\s]*)\\s+\")",
"spaceExpr = re.compile(r\"[\\s,]+\")",
"l = []",
"def parse(n, psize):\n yield \"def f(c):\"\n s = psize/size\n ... |
# -*- 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... |
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 sys
import time
import math
import gtk
import gobject
import cairo
if sys.platform == 'win32':
from pychess.System.WinRsvg import rsvg
else:
import rsvg
from pychess.System.uistuff import addDataPrefix
from pychess.System.repeat import repeat_sleep
from pychess.System import glock
MAX_FPS = 20
RAD_PS... | [
[
1,
0,
0.0141,
0.0141,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0282,
0.0141,
0,
0.66,
0.0833,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0423,
0.0141,
0,
... | [
"import sys",
"import time",
"import math",
"import gtk",
"import gobject",
"import cairo",
"if sys.platform == 'win32':\n from pychess.System.WinRsvg import rsvg\nelse:\n import rsvg",
" from pychess.System.WinRsvg import rsvg",
" import rsvg",
"from pychess.System.uistuff import addD... |
""" This module intends to work as glue between the gamemodel and the gamewidget
taking care of stuff that is neither very offscreen nor very onscreen
like bringing up dialogs and """
import math
import gtk
from pychess.Utils.Offer import Offer
#from pychess.Utils.GameModel import GameModel
#from pychess.Uti... | [
[
8,
0,
0.0068,
0.0103,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0171,
0.0034,
0,
0.66,
0.0417,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.024,
0.0034,
0,
0.66,... | [
"\"\"\" This module intends to work as glue between the gamemodel and the gamewidget\n taking care of stuff that is neither very offscreen nor very onscreen\n like bringing up dialogs and \"\"\"",
"import math",
"import gtk",
"from pychess.Utils.Offer import Offer",
"from pychess.Utils.const import *"... |
# -*- 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... |
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... |
# -*- coding: UTF-8 -*-
from math import ceil, pi, cos, sin
from gtk import gdk
import gtk, time, pango
import cairo
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):
g... | [
[
1,
0,
0.0163,
0.0054,
0,
0.66,
0,
526,
0,
4,
0,
0,
526,
0,
0
],
[
1,
0,
0.0272,
0.0054,
0,
0.66,
0.1429,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.0326,
0.0054,
0,
... | [
"from math import ceil, pi, cos, sin",
"from gtk import gdk",
"import gtk, time, pango",
"import cairo",
"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__(se... |
from time import strftime, gmtime, localtime
import random
import gtk
from gtk.gdk import keyval_from_name
import pango
import gobject
from pychess.System import uistuff
from BorderBox import BorderBox
class ChatView (gtk.VPaned):
__gsignals__ = {
'messageAdded' : (gobject.SIGNAL_RUN_FIRST, None, (str,st... | [
[
1,
0,
0.0074,
0.0074,
0,
0.66,
0,
654,
0,
3,
0,
0,
654,
0,
0
],
[
1,
0,
0.0148,
0.0074,
0,
0.66,
0.125,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0296,
0.0074,
0,
0... | [
"from time import strftime, gmtime, localtime",
"import random",
"import gtk",
"from gtk.gdk import keyval_from_name",
"import pango",
"import gobject",
"from pychess.System import uistuff",
"from BorderBox import BorderBox",
"class ChatView (gtk.VPaned):\n __gsignals__ = {\n 'messageAdded... |
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... |
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,... |
# -*- 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.0025,
0.0008,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0033,
0.0008,
0,
0.66,
0.0385,
526,
0,
3,
0,
0,
526,
0,
0
],
[
1,
0,
0.0041,
0.0008,
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 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 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 os.path
import gettext
import locale
from time import sleep
from cStringIO import StringIO
from operator import attrgetter
from itertools import groupby
import gtk
from cairo import ImageSurface
try:
from gtksourceview import SourceBuffer
from gtksourceview import SourceView
from gtksourceview impo... | [
[
1,
0,
0.0018,
0.0018,
0,
0.66,
0,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.0036,
0.0018,
0,
0.66,
0.0227,
723,
0,
1,
0,
0,
723,
0,
0
],
[
1,
0,
0.0054,
0.0018,
0,
0.... | [
"import os.path",
"import gettext",
"import locale",
"from time import sleep",
"from cStringIO import StringIO",
"from operator import attrgetter",
"from itertools import groupby",
"import gtk",
"from cairo import ImageSurface",
"try:\n from gtksourceview import SourceBuffer\n from gtksource... |
import time
import gtk
import gobject
import pango
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 import NO... | [
[
1,
0,
0.0016,
0.0016,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0048,
0.0016,
0,
0.66,
0.0526,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.0064,
0.0016,
0,
... | [
"import time",
"import gtk",
"import gobject",
"import pango",
"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 PyDo... |
import os
from xml.dom import minidom
import gtk
import gobject
from pychess.System.prefix import addDataPrefix
from PyDockLeaf import PyDockLeaf
from PyDockComposite import PyDockComposite
from ArrowButton import ArrowButton
from HighlightArea import HighlightArea
from __init__ import TopDock, DockLeaf, DockCompone... | [
[
1,
0,
0.0052,
0.0052,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0105,
0.0052,
0,
0.66,
0.0909,
290,
0,
1,
0,
0,
290,
0,
0
],
[
1,
0,
0.0209,
0.0052,
0,
... | [
"import os",
"from xml.dom import minidom",
"import gtk",
"import gobject",
"from pychess.System.prefix import addDataPrefix",
"from PyDockLeaf import PyDockLeaf",
"from PyDockComposite import PyDockComposite",
"from ArrowButton import ArrowButton",
"from HighlightArea import HighlightArea",
"from... |
import gtk, cairo
import gobject
from OverlayWindow import OverlayWindow
from __init__ import NORTH, EAST, SOUTH, WEST
class ArrowButton (OverlayWindow):
""" Leafs will connect to the drag-drop signal """
__gsignals__ = {
'dropped' : (gobject.SIGNAL_RUN_FIRST, None, (object,)),
'hovered'... | [
[
1,
0,
0.0093,
0.0093,
0,
0.66,
0,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0185,
0.0093,
0,
0.66,
0.25,
90,
0,
1,
0,
0,
90,
0,
0
],
[
1,
0,
0.037,
0.0093,
0,
0.66,... | [
"import gtk, cairo",
"import gobject",
"from OverlayWindow import OverlayWindow",
"from __init__ import NORTH, EAST, SOUTH, WEST",
"class ArrowButton (OverlayWindow):\n \"\"\" Leafs will connect to the drag-drop signal \"\"\"\n \n __gsignals__ = {\n 'dropped' : (gobject.SIGNAL_RUN_FIRST, Non... |
import os
import re
import sys
import gtk
import cairo
if sys.platform == 'win32':
from pychess.System.WinRsvg import rsvg
else:
import rsvg
class OverlayWindow (gtk.Window):
""" This class knows about being an overlaywindow and some svg stuff """
cache = {} # Class global self.cache for svgPat... | [
[
1,
0,
0.0079,
0.0079,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0157,
0.0079,
0,
0.66,
0.1667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0236,
0.0079,
0,
... | [
"import os",
"import re",
"import sys",
"import gtk",
"import cairo",
"if sys.platform == 'win32':\n from pychess.System.WinRsvg import rsvg\nelse:\n import rsvg",
" from pychess.System.WinRsvg import rsvg",
" import rsvg",
"class OverlayWindow (gtk.Window):\n \"\"\" This class knows ... |
import gtk, cairo
from math import ceil as fceil
ceil = lambda f: int(fceil(f))
from __init__ import NORTH, EAST, SOUTH, WEST, CENTER
from OverlayWindow import OverlayWindow
class HighlightArea (OverlayWindow):
""" An entirely blue widget """
def __init__ (self, parent):
OverlayWindow.__init__(s... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0556,
0.0185,
0,
0.66,
0.2,
526,
0,
1,
0,
0,
526,
0,
0
],
[
14,
0,
0.0741,
0.0185,
0,
0.... | [
"import gtk, cairo",
"from math import ceil as fceil",
"ceil = lambda f: int(fceil(f))",
"from __init__ import NORTH, EAST, SOUTH, WEST, CENTER",
"from OverlayWindow import OverlayWindow",
"class HighlightArea (OverlayWindow):\n \"\"\" An entirely blue widget \"\"\"\n \n def __init__ (self, paren... |
import sys
import gtk
from __init__ import DockComposite
from __init__ import NORTH, EAST, SOUTH, WEST, CENTER
class PyDockComposite (gtk.Alignment, DockComposite):
def __init__ (self, position):
gtk.Alignment.__init__(self, xscale=1, yscale=1)
if position == NORTH or position == SOUTH:
... | [
[
1,
0,
0.012,
0.012,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0361,
0.012,
0,
0.66,
0.25,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.0602,
0.012,
0,
0.66,
... | [
"import sys",
"import gtk",
"from __init__ import DockComposite",
"from __init__ import NORTH, EAST, SOUTH, WEST, CENTER",
"class PyDockComposite (gtk.Alignment, DockComposite):\n def __init__ (self, position):\n gtk.Alignment.__init__(self, xscale=1, yscale=1)\n \n if position == NO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.