code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
import random
girl_names = []
with open("resources/RandomGirlNames.txt", "rU") as fd:
buff = fd.read()
l = buff.rsplit("\n")
l.pop()
l.pop(0)
girl_names = l
def rand_name():
return random.choice(girl_names)
if __name__ == "__main__":
print rand_name()
print rand_name()
print rand_name()
print rand_name(... | Python |
from PyQt4 import QtCore
#
# WList == Windowed List
#
# holds an array with a window - a width that is visble at any time
#
# also has a cursor indicating the current row
# which sounds like a violaton of the SRP to me
# But I can't see how separating that out would help, so ...
#
class WList(QtCore.QObject):
changed... | Python |
class Job(object):
def __init__(self, name, *args, **kw):
object.__init__(self)
self.name = name
def __str__(self):
return self.name
joblist = [
Job("Cleaning"),
Job("Whoring"),
Job("Streets"),
Job("Assistant"),
Job("Follow"),
Job("Rest"),
Job("Sleep"),
Job("Cabaret"),
Job("Bestiary"),
Job("Mission"... | Python |
import random
from lxml import etree
from glob import glob
from .loaders import UniqueGirlLoader, GenericGirlLoader
from .girl_template import GirlTemplate
class GirlManager(object):
def __init__(self, *args, **kw):
object.__init__(self)
self.uniques = []
self.generics = []
#
# "actives" are active uniques
#
... | Python |
import random
from lxml import etree
class CoreTrait(object):
def __init__(self, *args, **kw):
object.__init__(self)
self.name = kw["name"]
self.desc = kw["desc"]
class CoreTraits(object):
def __init__(self, *args, **kw):
object.__init__(self)
#
# we're going to read trait definitions from
# an xml file
... | Python |
import random
from .ttable import ttable
#
# stat class
#
class Stat(object):
def __init__(self, *args, **kw):
object.__init__(self)
#
# store the namem of the stat and the name as found
# in the xml files for reference
#
self.name = kw["name"]
self.xml_name = ttable[self.name]
#
# value defults to zero.
# ... | Python |
import sys
import math
import pickle
from .ledger import Ledger
data = None
class _brothel_data(list):
_data = [
{ 'cost' : 0,
'upkeep' : 50,
'init_rooms' : 3,
'max_rooms' : 12,
'prestige' : 0
},
{ 'cost' : 2000,
'upkeep' : 100,
'init_rooms' : 5,
'max_rooms' : 18,
'prestige' : 1
},... | Python |
from .girl import Girl
from .trait import Trait
from .stat import Stat
from .girl_names import rand_name
#
# this is what happens to rgirlsx records
#
# this should be all the info needed to create a new random girl
#
class GirlTemplate(object):
def __init__(self, *args, **kw):
object.__init__(self)
self.name = "... | Python |
import random
class _Pair(object):
def __init__(self, w, it, *args, **kw):
object.__init__(self)
self.weight = w
self.item = it
class WeightedList(object):
def __init__(self, *args, **kw):
object.__init__(self)
self.list = []
self.weight = 0
for tup in args:
self.add(*tup)
def add(self, w, it... | Python |
import os
import glob
import pickle
from . import game_data
from operator import itemgetter
#
# list of save file data, contains dicts with name, path and time
#
saves = []
#
# scan the saves folder for files ending in ".sav" and then
# read the header data to get the save name and timestamp
#
# we could probably get... | Python |
#
# The Ledger: all monetary transactions should go through this class
#
# that way we can build statistics about who's earning the most and
# and who's costing the most, and generate financial reports
#
# We should have done this from the start in vanilla WM.
# Let's get it right this time :)
#
class Purchase(object)... | Python |
#
# for some reason, I just don't seem to be able to get on
# with necno's original camelCase attribute names. But I
# do want to be able to use the original girl packs
#
# so here's a translation table. how sad is that?
#
name_pairs = (
( "name", "Name" ),
( "desc", "Desc" ),
( "status", "Status" ),
( "chari... | Python |
from .trait import Trait
from .ttable import ttable
from .girl import Girl
from .girl_template import GirlTemplate
#
# OK, Rather than have the Girl class know how to
# load itself from XML, let's have a loader class
# to do the hard work
#
class UniqueGirlLoader(object):
def __init__(self, *args, **kw):
object.__i... | Python |
import os
import re
import sys
from lxml import etree
from glob import glob
class Stat(object):
def __init__(self, proto, *args, **kw):
object.__init__(self, *args, **kw)
self.name = proto[0]
if len(proto) < 3:
self.attr_key = self.name.capitalize()
else:
self.attr_key = proto[2]
self.value = None
... | Python |
import random
from . import game_data
from .girl_manager import girl_manager
#
# this is the data underlying a slave market
#
# the intention is to have more than one,
# although the auction block in the Souk is the
# only one the initially accessible
#
# different markets are going to have different
# characteristi... | Python |
#
# this is complicated slightly by the fact that the PC can
# effectively work the day shift by shift
#
# so we may not start from shift zero
#
def next_turn():
# turn events
| Python |
import random
from glob import glob
from .ttable import name_pairs
from .trait import Trait
class GirlPics(object):
def __init__(self, *args, **kw):
object.__init__(self)
self.profiles = []
def scan(self, girl):
str = "resources/characters/{}/[Pp]rofile*".format(
girl.arch_name
)
self.profiles = glob(s... | Python |
import functools
@functools.total_ordering
class Time(object):
#TODO, Implement timedelta functions if needed
shifts=range(4)
periods=range(36)
def __init__(self,day,shift,period):
self.day=day # days beginning with 0
self.shift=shift # shifts beginning with 0==morning 6 oclock
self.period=period # 36 pieces ... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
from .slide_gauge import SlideGauge
from .led_bar import LEDBar
import random
class Viewscreen(QWidget):
#
# let's have an array to hold the location images
# one for the snow screens as well
#
images = []
snow = []
def __init__(self, *args, **kw):
QWidg... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class TartImage(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 225, 310)
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 225, 310)
path = "resources/tart_image_back.png"
bg.setPixma... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
class TartBarJobBox(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 90, 40)
#
# background graphic
#
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 90, 40)
path = "resources/ta... | Python |
from PyQt4.QtCore import QTimer
from PyQt4.QtGui import QWidget, QLabel, QPixmap
from .led_lamp import LEDLamp
class LEDBar(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.setGeometry(0,0, 217,30)
self.leds = []
pic = QLabel(self)
path = "work/lightbar.png"
pic.setPix... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from ..widgets.image_button import ImageButton
s = ""
class LabelPair(QtGui.QWidget):
def __init__(self, parent, cap, val, *args, **kw):
QtGui.QWidget.__init__(self, parent, *args, **kw)
self.setGeometry(0, 0, 200, 20)
#font = QtGui.QFon... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from .tart_bar_name import TartBarName
from .tart_bar_lamp import TartBarLamp
from tart_bar_job_box import TartBarJobBox
class TartBar(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args)
self.setGeometry(0, 0, 780, 55)
#... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import *
from PyQt4.QtCore import Qt
class SlaveMarketTitle(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
#
# set the background graphic
#
pic = QLabel(self)
path = "resources/slave_market_title.png"
pic.setPixmap(Q... | Python |
from random import randint, random
from PyQt4.QtGui import QWidget, QLabel, QPixmap
class LEDLamp(QWidget):
loaded = False
leds = []
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
if not LEDLamp.loaded:
self.load_images()
LEDLamp.loaded = True
self.change_chance = 0.001 * randin... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
from .image_button import ImageButton
class LiftPlate(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 214, 83)
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 214, 83)
path = "resource... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class TartFrame(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 218, 657)
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 218, 657)
path = "resources/tart_frame_and_monitor.png"
bg.s... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
class TartBarName(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 323, 40)
self.row = -1
self.girl = None
#
# background ima... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
from .msg_lamp import MsgLamp, MsgLamp_Button
#
# this is basically the standalone test for the lamps
# cut and pasted into a new class
#
class MsgHeader(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, ... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from .tart_header import TartHeader
from .tart_bar import TartBar
from ..data.wlist import WList
from operator import attrgetter
class TartTable(QtGui.QWidget):
new_selection = QtCore.pyqtSignal(object)
job_box_clicked = QtCore.pyqtSignal(object, object)
... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
class StatsPanel(QLabel):
def __init__(self, *args, **kw):
#
# parent constructor and geometry
#
QLabel.__init__(self, *args, **kw)
self.setGeometry(0, 0, 269, 304)
#
# set up a font. I'm not sure Gabrielle works
# so well for ... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, pyqtSignal
class SlaveTraitCell(QtGui.QPushButton):
def __init__(self, *args, **kw):
QtGui.QPushButton.__init__(self, *args, **kw)
self.setGeometry(0, 0, 200, 42)
font = QtGui.QFont("Gabrielle", 18)
self.setFont(font)
self.setStyleSheet... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class TartBarLamp(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 39, 41)
#
# this widget is going to be our viewport
# we set it to be smaller than the grad
# so the grad will be clippe... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
#
# I'm breaking this down into needless levels of widgetry
#
# sometimes it just helps me think about it
#
class TimePanelCell(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
bg = QtGui.QLabel(self... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
class SlideGauge(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
pic = QLabel(self)
pic.setPixmap(QPixmap("work/slide_gauge.png"))
pic.setGeometry(2, 0, 53,158)
ptr = QLabel(self)
ptr.setPixmap(QPixmap("work/gauge_poi... | Python |
import sys
from PyQt4.QtGui import QPushButton, QFont, QApplication, QWidget
class MixedButton(QPushButton):
"""
Print text over a four-image background
Takes a string with the button text
Keywords:
parent: parent widget
images: optional list of images (normal, hover, active, disabled)
"""
def __init__(self... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
class PrinterWidget(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
#
# background image
#
pic = QLabel(self)
s = "work/message_widget.png"
pic.setPixmap(QPixmap(s))
self.setGeometry(0, 0, 665... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
#
# this is one of those little time-stamped buttons
# that represent events
#
# no reason to have it in its own class, except
# that it uses QPainterPath and I want to test it in isolation
#
class MsgCell_Time(QtGui.QWidget):
def __init__(s... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import *
from PyQt4.QtCore import Qt, pyqtSignal
from .slave_trait_cell import SlaveTraitCell
from ..data.trait import Trait
class SlaveTraitWidget(QWidget):
mouse_in = pyqtSignal(bool)
mouse_out = pyqtSignal(bool)
def __init__(self, *args, **kw):
QWidg... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
from .msg_lamp import MiniLed
class BrassPlate(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.inverted = False
def mk_grad(self):
grad = QtGui.QLinearGradient(0, 39, 25, 0)
grad.setC... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap
from .rollers import DayRoller, DateRoller
class DayAndDate(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.date_roller = DateRoller(self)
self.date_roller.setGeometry(87, 12, 136 , 30)
self.day_roller = DayRoller(self)
... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
from .msg_cell import MsgCell
class MsgMain(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0,0,715,564)
bg = QtGui.QLabel(self)
path = "resources/msg_main.png"
bg.setPixm... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from .image_button import ImageButton
class JobMenuItem(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
#
# background - blank menu item
#
bg = QtGui.QLabel(self)
path = "resources/menu_blank.png"
bg.setPix... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from .tart_bar import TartBar
from collections import namedtuple
#
# widget for all the header plates
#
class TartHeader_Item(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
#
# make a label to hold the backgrou... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
class MsgLED(QtGui.QWidget):
def __init__(self, parent, side, colour, cover_img, *args, **kw):
QtGui.QWidget.__init__(self, parent, *args, **kw)
self.colour = colour
self.on = True
self.side = side
self.bg = QtGui.QLabel(self)
s... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import *
from PyQt4.QtCore import Qt, QRect
from random import randint, random
from game_data import data
| Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
from .msg_lamp import MiniLed
from .brass_plate import BrassPlate
class Msg_NewsBar_LEDs(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
#bg = QtGui.QLabel(self)
#path = "resources/mini_led_pa... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import *
from PyQt4.QtCore import Qt
#
# class to make a widget for the "slaves for sale" poster
# in the slave market
#
class SlavePoster(QWidget):
def __init__(self, *args, **kw):
#print "__init__"
QWidget.__init__(self, *args, **kw)
#
# we'll want a... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class Facebox(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 187, 187)
#
# facebox is made up of several layers
#
bg = QtGui.QLabel(self)
bg.setGeometry(8, 8, 171, 171)
path = "re... | Python |
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
class SlaveMarketMonitor(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
#
# background image
#
background = QtGui.QLabel(self)
#path = "resources/slave_market_trait_panel.png"
path = "resources... | Python |
import sys
from PyQt4.QtGui import QPushButton
class ImageButton(QPushButton):
def __init__(self, name, parent, n, h, p, d, *args, **kw):
ssfmt = """
QPushButton {{
background-image : url({0});
border: 1px solid transparent;
}}
QPushButton:hover {{
background-image : url({1});
}}
QPushButton:pre... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt, QString
from .facebox import Facebox
from .image_button import ImageButton
class StoryboxMain(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 1024, 155)
... | Python |
from PyQt4.QtGui import QWidget, QLabel, QFont, QPixmap
from ..data import game_data
class _roller(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
font = QFont("Times", 12)
font.setBold(True)
self.font = font
def digits(self, n):
i0 = n % 10
n -= i0
n /= 10
i1 = n % 1... | Python |
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
class TartMonitor(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 217, 205)
bg = QtGui.QLabel(self)
bg.setGeometry(0, 0, 217, 205)
path = "resources/tart_monitor.png"
bg.setPixmap... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
from .image_button import ImageButton
class TitlePanel(QLabel):
def __init__(self, *args, **kw):
#
# parent constructor and geometry
#
QLabel.__init__(self, *args, **kw)
self.setGeometry(0, 0, 336, 50)
#
# set up a font. I'm not... | Python |
from lib.data.girl_names import rand_name
from lib.data.jobs import joblist
from random import randint, choice
class Girly:
def __init__(self):
self.name = rand_name()
self.health = randint(0, 100)
self.fatigue = randint(0, 100)
self.morale = randint(0, 100)
self.jobs = [ choice(joblist).name for i in ran... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap
from ..widgets.slave_frame import SlaveFrame
from ..widgets.slave_frame import SlaveMarketTitle
from ..widgets.slave_market_monitor import SlaveMarketMonitor
from ..widgets.slave_stat_panel import SlaveStatPanel
from ..widgets.slave_trait_widg... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap
from ..widgets.mixed_button import MixedButton
from ..widgets.image_button import ImageButton
from . import screen_manager
import random
#
# let's have some tooltip text
#
s = ""
s += "Visiting caravans bring slavegirls as well as other goods.\n"
s += "The best of them ... | Python |
from PyQt4.QtCore import QCoreApplication
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFrame
from ..widgets.image_button import ImageButton
from ..data import save_manager
import screen_manager
class MainMenu(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.setGeometry(0, ... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap
class VNScreen(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.setGeometry(0, 0, 1024, 768)
pic = QLabel(self)
pic.setGeometry(0, 0, 1024, 768)
path = "resources/wood.jpg"
pic.setPixmap(QPixmap(path))
def play
| Python |
import random
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from ..widgets.mixed_button import MixedButton
from ..widgets.tart_frame import TartFrame
from ..widgets.tart_table import TartTable
from ..widgets.lift_plate import LiftPlate
from ..data import game_data
from . import screen_manager
from ..widge... | Python |
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from ..widgets.msg_header import MsgHeader
from ..widgets.msg_main import MsgMain
from ..widgets.msg_newsbar import MsgNewspanel
from ..widgets.brass_plate import BrassButton
class MessageScreen(QtGui.QWidget):
def __init__(self, *args, **kw):
QtGui.QWidge... | Python |
import sys
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QLabel, QPixmap, QWidget, QFont, QTableWidget
from ..widgets.mixed_button import MixedButton
from ..data import save_manager
from . import screen_manager
class LoadFileScreen(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **k... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont, QLineEdit, QFrame
from ..widgets.mixed_button import MixedButton
import screen_manager
from ..data import game_data
class NewGameScreen(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.setGeomet... | Python |
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QWidget, QLabel, QPixmap, QFont
from ..widgets.mixed_button import MixedButton
class MsgBox(QWidget):
def __init__(self, *args, **kw):
QWidget.__init__(self, *args, **kw)
self.setGeometry((1024-800)/2, (769-530)/2, 800, 530)
#
# background graphic
#
bg = QL... | Python |
from PyQt4 import QtCore
screens = None
current = None
def add(name, widget):
global screens
print "screen manager: adding ", name
if screens == None:
screens = {}
screens[name] = widget
widget.setFocusPolicy(QtCore.Qt.StrongFocus)
def show(name):
global screens
global current
print "screen manager: sho... | Python |
from PyQt4.QtGui import QWidget, QLabel, QPixmap
from ..widgets.day_and_date import DayAndDate
from ..widgets.title_panel import TitleAndButtons
from ..widgets.stats_panel import StatsPanel
from ..widgets.viewscreen import Viewscreen
from ..widgets.printer import PrinterWidget
from ..widgets.mixed_button import MixedBu... | Python |
from distutils.core import setup
import py2exe
"""
setup(
options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } },
zipfile = None,
windows=["ABC_ihm.py"]
)
"""
setup(zipfile = None,
windows = [{"script": "ABC.py"}],
name='ABC Backup Concept shell exec',
... | Python |
# -*- coding: UTF-8 -*-
import os,sys,gettext,warnings
from Class_ABC_XML import XML_ABC
# ------------------------------------------------------------------------------
# --- Internationalisation
# --- la langue par défaut est le français
# --------------------------------------------------------------------... | Python |
# -*- coding: UTF-8 -*-
#-----------------------------------------------------------------------------
# Name: Class_ABC_Crypt.py
# Purpose: Classe de cryptage des logs
#
#
# Author: ABCPro
#
# Created: 2007/04/18
# Copyright: (c) 2007
# Licence: <your licence>
#-... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx,signal,os,sys
import frm_gestion_Repertoires
modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main =frm_gestion_Repertoires.create(None)
self.main.Show()
... | Python |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#Boa:Frame:Frame1
#-----------------------------------------------------------------------------
# Name: Class_Serv_IHM
# Purpose: Creation d'un socket a chaque lancement de ABC IHM
# Permet de controler le nombre de programme lancer a 1
# ... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx,signal,os,sys
import frm_gestion_Repertoires
modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main =frm_gestion_Repertoires.create(None)
self.main.Show()
... | Python |
#Boa:Dialog:Dialog1
import wx
def create(parent):
return Dialog1(parent)
[wxID_DIALOG1, wxID_DIALOG1TXT_MDP,
] = [wx.NewId() for _init_ctrls in range(2)]
class Dialog1(wx.Dialog):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', ... | Python |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#Boa:Frame:Frame1
#-----------------------------------------------------------------------------
# Name: Class_Serv_IHM
# Purpose: Creation d'un socket a chaque lancement de ABC IHM
# Permet de controler le nombre de programme lancer a 1
# ... | Python |
# -*- coding: UTF-8 -*-
'''
Name: Class_XML_ABC.py
Purpose: Classe de gestion des XML de config
Author: ABCPro
Created: 2007/04/12
Copyright: (c) 2007
Licence: <your licence>
'''
import os,sys
import xml.dom.minidom as m
class XML_ABC :
Path ... | Python |
#Boa:Frame:Frame1
# -*- coding: utf-8 -*-
'''
# -*- coding: iso-8859-15 -*-
'''
import wx,os,os.path,sys,threading,time,shutil,base64,signal
import gettext, Class_Serv_Ihm,dlg_infos_serveur
from wx.lib.wordwrap import wordwrap
from Class_ABC_XML import XML_ABC
from Class_ABC_Crypt import ABC_Crypt
from... | Python |
#Boa:Dialog:Dialog1
# -*- coding: UTF-8 -*-
import wx,base64
import wx.lib.buttons
from subprocess import Popen
def create(parent):
return Dialog1(parent)
[wxID_DIALOG1, wxID_DIALOG1BTN_VALIDER, wxID_DIALOG1LBL_GROUPE,
wxID_DIALOG1LBL_SERVEUR, wxID_DIALOG1TXT_GROUP, wxID_DIALOG1TXT_SERVEUR,
] = [w... | Python |
# -*- coding: UTF-8 -*-
import os,sys,gettext,warnings
from Class_ABC_XML import XML_ABC
# ------------------------------------------------------------------------------
# --- Internationalisation
# --- la langue par défaut est le français
# --------------------------------------------------------------------... | Python |
from distutils.core import setup
import py2app
py2app_options=dict(
iconfile='icone.icns',
)
setup(
app=["ABC.py"],
setup_requires=["py2app"],
options=dict(
py2app=py2app_options,
)
)
| Python |
# -*- coding: UTF-8 -*-
#-----------------------------------------------------------------------------
# Name: Class_ABC_Crypt.py
# Purpose: Classe de cryptage des logs
#
#
# Author: ABCPro
#
# Created: 2007/04/18
# Copyright: (c) 2007
# Licence: <your licence>
#-... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx,signal,os,sys
import frm_gestion_Repertoires
modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main =frm_gestion_Repertoires.create(None)
self.main.Show()
... | Python |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#Boa:Frame:Frame1
#-----------------------------------------------------------------------------
# Name: Class_Serv_IHM
# Purpose: Creation d'un socket a chaque lancement de ABC IHM
# Permet de controler le nombre de programme lancer a 1
# ... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx,signal,os,sys
import frm_gestion_Repertoires
modules ={'Frame1': [1, 'Main frame of Application', 'none://frm_gestion_Repertoires.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main =frm_gestion_Repertoires.create(None)
self.main.Show()
... | Python |
#Boa:Dialog:Dialog1
import wx
def create(parent):
return Dialog1(parent)
[wxID_DIALOG1, wxID_DIALOG1TXT_MDP,
] = [wx.NewId() for _init_ctrls in range(2)]
class Dialog1(wx.Dialog):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', ... | Python |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#Boa:Frame:Frame1
#-----------------------------------------------------------------------------
# Name: Class_Serv_IHM
# Purpose: Creation d'un socket a chaque lancement de ABC IHM
# Permet de controler le nombre de programme lancer a 1
# ... | Python |
# -*- coding: UTF-8 -*-
'''
Name: Class_XML_ABC.py
Purpose: Classe de gestion des XML de config
Author: ABCPro
Created: 2007/04/12
Copyright: (c) 2007
Licence: <your licence>
'''
import os,sys
import xml.dom.minidom as m
if hasattr(sys,"setdefaultenco... | Python |
#Boa:Frame:Frame1
# -*- coding: utf-8 -*-
'''
# -*- coding: iso-8859-15 -*-
'''
import wx,os,os.path,sys,threading,time,shutil,base64,signal
import gettext, Class_Serv_Ihm,dlg_infos_serveur
from wx.lib.wordwrap import wordwrap
from Class_ABC_XML import XML_ABC
from Class_ABC_Crypt import ABC_Crypt
from... | Python |
#Boa:Dialog:Dialog1
# -*- coding: UTF-8 -*-
import wx,base64
import wx.lib.buttons
from subprocess import Popen
def create(parent):
return Dialog1(parent)
[wxID_DIALOG1, wxID_DIALOG1BTN_VALIDER, wxID_DIALOG1LBL_GROUPE,
wxID_DIALOG1LBL_SERVEUR, wxID_DIALOG1TXT_GROUP, wxID_DIALOG1TXT_SERVEUR,
] = [w... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import ABC_Backup_IHM
modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main = ABC_Backup_IHM.create(None)
self.main.Show()
self.SetTopWindow(self.... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import ABC_Backup_IHM
modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main = ABC_Backup_IHM.create(None)
frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import ABC_Backup_IHM
modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main = ABC_Backup_IHM.create(None)
frameicon = wx.Icon("./img/icone.ico", wx.BITMAP_... | Python |
from distutils.core import setup
import py2exe
"""
setup(
options = {"py2exe": {"compressed": 1, "optimize": 0, "bundle_files": 1, } },
zipfile = None,
windows=["ABC_ihm.py"]
)
"""
setup(zipfile = None,
windows = [{"script": "ABC_ihm.py",
"icon_resources": [(1, "icone.ico")]... | Python |
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import ABC_Backup_IHM
modules ={u'ABC_Backup_IHM': [1, 'Main frame of Application', u'ABC_Backup_IHM.py']}
class BoaApp(wx.App):
def OnInit(self):
self.main = ABC_Backup_IHM.create(None)
self.main.Show()
self.SetTopWindow(self.... | Python |
#!/usr/bin/env python
import os,shutil,sys
if len(sys.argv) < 2:
print 'Usage: %s <repertoire>' %(sys.argv[0])
sys.exit()
else:
chemin = sys.argv[1]
# on liste les repertoires presents et on stocke leurs nom dans un tableau
listedir = []
for item in os.listdir(chemin):
if os.path.isdir('%s/%s' % (chemin,item)... | Python |
#!/usr/bin/env python
import os,shutil,sys
if len(sys.argv) < 2:
print 'Usage: %s <repertoire>' %(sys.argv[0])
sys.exit()
else:
chemin = sys.argv[1]
# on liste les repertoires presents et on stocke leurs nom dans un tableau
listedir = []
for item in os.listdir(chemin):
if os.path.isdir('%s/%s' % (chemin,item)... | Python |
# -*- coding: UTF-8 -*-
import os,sys,gettext,warnings
from Class_ABC_XML import XML_ABC
# ------------------------------------------------------------------------------
# --- Internationalisation
# --- la langue par défaut est le français
# --------------------------------------------------------------------... | Python |
# -*- coding: UTF-8 -*-
#-----------------------------------------------------------------------------
# Name: Class_ABC_Crypt.py
# Purpose: Classe de cryptage des logs
#
#
# Author: ABCPro
#
# Created: 2007/04/18
# Copyright: (c) 2007
# Licence: <your licence>
#-... | Python |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#Boa:Frame:Frame1
#-----------------------------------------------------------------------------
# Name: Class_Serv_IHM
# Purpose: Creation d'un socket a chaque lancement de ABC IHM
# Permet de controler le nombre de programme lancer a 1
# ... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.