code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.1176, 0.0065, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1373, 0.0065, 0, 0.66, 0.0667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1438, 0.0065, 0, 0.66...
[ "\"\"\"Tool to demonstrate some of the capabilities in lf.win.shell.recyclebin\"\"\"", "import sys", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.shell.recyclebin import INFO2", "VER_MAJOR = 1", "VER_MINOR = 0", "VER...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.0833, 0.0046, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0972, 0.0046, 0, 0.66, 0.0588, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 1, 0, 0.1019, 0.0046, 0, 0.66...
[ "\"\"\"Tool to demonstrate some of the capabilities in lf.win.shell.thumbsdb\"\"\"", "import calendar", "import sys", "from copy import copy", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.ole.cfb import CompoundFile", ...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.1314, 0.0073, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1533, 0.0073, 0, 0.66, 0.0625, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1606, 0.0073, 0, 0.66...
[ "\"\"\"Tool to demonstrate some of the capabilities in lf.win.shell.thumbsdb\"\"\"", "import sys", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.ole.cfb import CompoundFile", "from lf.win.shell.thumbsdb import ThumbsDb", ...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.2289, 0.012, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2651, 0.012, 0, 0.66, 0.0833, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2771, 0.012, 0, 0.66, ...
[ "\"\"\"Tool to demonstrate some of the capabilities in lf.win.shell.thumbsdb\"\"\"", "import sys", "from optparse import OptionParser", "from lf.dec import RawIStream, ByteIStream", "from lf.win.ole.cfb import CompoundFile", "from lf.win.shell.thumbsdb import ThumbsDb", "VER_MAJOR = 1", "VER_MINOR = 0...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.0385, 0.0021, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0449, 0.0021, 0, 0.66, 0.037, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.047, 0.0021, 0, 0.66, ...
[ "\"\"\"Tool to demonstrate some of the capabilities in LibForensics\"\"\"", "import sys", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.objects import HRESULT", "from lf.win.codepage import add_codecs", "from lf.win.ole...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.0738, 0.0041, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0861, 0.0041, 0, 0.66, 0.0625, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 1, 0, 0.0902, 0.0041, 0, 0.66...
[ "\"\"\"Tool to demonstrate some of the capabilities in lf.win.shell.recyclebin\"\"\"", "import calendar", "import sys", "from copy import copy", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.shell.recyclebin import INFO...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.0189, 0.0011, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0221, 0.0011, 0, 0.66, 0.037, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0231, 0.0011, 0, 0.66,...
[ "\"\"\"Displays information about shell link (.lnk) files\"\"\"", "import sys", "from optparse import OptionParser", "from datetime import datetime", "from lf.dec import RawIStream, ByteIStream", "from lf.win.shell.link import (\n ShellLink, ConsoleProps, ConsoleFEProps, DarwinProps, EnvironmentProps,\...
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
[ [ 8, 0, 0.2069, 0.0115, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2414, 0.0115, 0, 0.66, 0.0909, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2529, 0.0115, 0, 0.66...
[ "\"\"\"Tool to demonstrate some of the capabilities in LibForensics\"\"\"", "import sys", "from optparse import OptionParser", "from lf.dec import RawIStream, ByteIStream, SEEK_SET", "from lf.win.ole.cfb import CompoundFile", "VER_MAJOR = 1", "VER_MINOR = 0", "VERSION_STR = \"%prog {ver_major}.{ver_mi...
#!/usr/bin/python import xml.parsers.expat; import sys; import re; parser=xml.parsers.expat.ParserCreate('UTF-8'); values_en = {} values_lang = {} values_hash = {} name='' def parse(lang, values): def start_element(n, attrs): global name; if n != u'string': return name=attrs[u'name'] def end_element(...
[ [ 1, 0, 0.0448, 0.0149, 0, 0.66, 0, 573, 0, 1, 0, 0, 573, 0, 0 ], [ 1, 0, 0.0597, 0.0149, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0746, 0.0149, 0, ...
[ "import xml.parsers.expat;", "import sys;", "import re;", "parser=xml.parsers.expat.ParserCreate('UTF-8');", "values_en = {}", "values_lang = {}", "values_hash = {}", "name=''", "def parse(lang, values):\n def start_element(n, attrs):\n global name;\n if n != u'string': return\n name=attrs...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
[ [ 1, 0, 0.3514, 0.0135, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.3784, 0.0135, 0, ...
[ "import os", "import re", "import tempfile", "import shutil", "ignore_pattern = re.compile('^(.svn|target|bin|classes)')", "java_pattern = re.compile('^.*\\.java')", "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')", "def process_dir(dir):\n files = os.listdir(dir)\n for...
#!/usr/bin/python # -*- coding: utf-8 -*- H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]] M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]] parejas = [-1,-1,-1,-1] mlibre = [3,2,1,0] hlibre = [3,2,1,0] def pareja(): while (hlibre != []): hombre = hlibre.pop() mujer = H[hombre][0] if (mujer in ml...
[ [ 14, 0, 0.1379, 0.0345, 0, 0.66, 0, 890, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.1724, 0.0345, 0, 0.66, 0.1667, 727, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2069, 0.0345, 0, 0...
[ "H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]]", "M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]]", "parejas = [-1,-1,-1,-1]", "mlibre = [3,2,1,0]", "hlibre = [3,2,1,0]", "def pareja():\n while (hlibre != []):\n hombre = hlibre.pop()\n mujer = H[hombre][0]\n if (mujer in mlibre):\n ...
#!/usr/bin/python # -*- coding: utf-8 -*- H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]] M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]] parejas = [-1,-1,-1,-1] mlibre = [True,True,True,True] hlibre = [True,True,True,True] def estable(hombre,mujer,preferencia): """Si hay un soltero que prefiere a la mujer antes que ...
[ [ 14, 0, 0.0976, 0.0244, 0, 0.66, 0, 890, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.122, 0.0244, 0, 0.66, 0.1429, 727, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.1463, 0.0244, 0, 0....
[ "H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]]", "M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]]", "parejas = [-1,-1,-1,-1]", "mlibre = [True,True,True,True]", "hlibre = [True,True,True,True]", "def estable(hombre,mujer,preferencia):\n \"\"\"Si hay un soltero que prefiere a la mujer antes que el\n or...
#!/usr/bin/python # -*- coding: utf-8 -*- H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]] M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]] parejas = [-1,-1,-1,-1] mlibre = [True,True,True,True] hlibre = [True,True,True,True] def estable(hombre,mujer,preferencia): """Si hay un soltero que prefiere a la mujer antes que ...
[ [ 14, 0, 0.0976, 0.0244, 0, 0.66, 0, 890, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.122, 0.0244, 0, 0.66, 0.1429, 727, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.1463, 0.0244, 0, 0....
[ "H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]]", "M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]]", "parejas = [-1,-1,-1,-1]", "mlibre = [True,True,True,True]", "hlibre = [True,True,True,True]", "def estable(hombre,mujer,preferencia):\n \"\"\"Si hay un soltero que prefiere a la mujer antes que el\n or...
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # No...
[ [ 2, 0, 0.4941, 0.9059, 0, 0.66, 0, 770, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 1, 0.0588, 0.0118, 1, 0.41, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.1941, 0.0235, 1, 0.41, ...
[ "def set_prefs(prefs):\n \"\"\"This function is called before opening the project\"\"\"\n\n # Specify which files and folders to ignore in the project.\n # Changes to ignored resources are not added to the history and\n # VCSs. Also they are not returned in `Project.get_files()`.\n # Note that ``?``...
#!/usr/bin/python # -*- coding: utf-8 -*- H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]] M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]] parejas = [-1,-1,-1,-1] mlibre = [3,2,1,0] hlibre = [3,2,1,0] def pareja(): while (hlibre != []): hombre = hlibre.pop() mujer = H[hombre][0] if (mujer in ml...
[ [ 14, 0, 0.1379, 0.0345, 0, 0.66, 0, 890, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.1724, 0.0345, 0, 0.66, 0.1667, 727, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2069, 0.0345, 0, 0...
[ "H = [[0,1,2,3],[3,2,0,1],[3,2,0,1],[1,0,2,3]]", "M = [[0,2,1,3],[3,1,2,0],[0,3,1,2],[2,3,0,1]]", "parejas = [-1,-1,-1,-1]", "mlibre = [3,2,1,0]", "hlibre = [3,2,1,0]", "def pareja():\n while (hlibre != []):\n hombre = hlibre.pop()\n mujer = H[hombre][0]\n if (mujer in mlibre):\n ...
#!/usr/bin/python # Copyright (C) 2007-2009 Mihai Preda. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ [ 14, 0, 0.2727, 0.3147, 0, 0.66, 0, 680, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.458, 0.042, 0, 0.66, 0.0625, 888, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6014, 0.2308, 0, 0.6...
[ "bytecodesStr = '''RESERVED 0\nCONST 0\nCALL -1\nADD 2\nSUB 2\nMUL 2\nDIV 2\nMOD 2", "builtins = \"\"\"rnd sqrt cbrt \nsin cos tan asin acos atan \nsinh cosh tanh asinh acosh atanh \nexp ln \nabs floor ceil sign min max \ngcd comb perm mod real imag\"\"\"", "template = '''// This file is automatically generated...
#!/usr/bin/python """ Build LevelDB dlls, build a zip and upload to s3. Command line arguments: -test : run all tests -upload : upload the zip """ import os import os.path import shutil import sys import time import re import json from util import log, run_cmd_throw, test_for_flag, s3UploadFilePu...
[ [ 8, 0, 0.0306, 0.0408, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0612, 0.0068, 0, 0.66, 0.0303, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.068, 0.0068, 0, 0.66,...
[ "\"\"\"\nBuild LevelDB dlls, build a zip and upload to s3.\nCommand line arguments:\n -test : run all tests\n -upload : upload the zip \n\"\"\"", "import os", "import os.path", "import shutil", "import sys", "import time", "import re", "import json", "from util import log, run_cmd_throw, test_for_...
import os.path import re import shutil import struct import subprocess import sys import zipfile2 as zipfile import bz2 def import_boto(): global Key, S3Connection, awscreds try: from boto.s3.key import Key from boto.s3.connection import S3Connection except: print("You need boto librar...
[ [ 1, 0, 0.0063, 0.0063, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0125, 0.0063, 0, 0.66, 0.037, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0187, 0.0063, 0, 0.6...
[ "import os.path", "import re", "import shutil", "import struct", "import subprocess", "import sys", "import zipfile2 as zipfile", "import bz2", "def import_boto():\n global Key, S3Connection, awscreds\n try:\n from boto.s3.key import Key\n from boto.s3.connection import S3Connection\n excep...
#!/usr/bin/env python from distutils.core import setup import glob setup( name='control_ascensores', version='0.1', description='Simulacion del entorno de un sistema de control de ascensores.', long_description='Presenta una interfaz SCADA para controlar un grupo de ascensores en un edificio.', au...
[ [ 1, 0, 0.15, 0.05, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.2, 0.05, 0, 0.66, 0.5, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 8, 0, 0.625, 0.7, 0, 0.66, 1, ...
[ "from distutils.core import setup", "import glob", "setup(\n name='control_ascensores',\n version='0.1',\n description='Simulacion del entorno de un sistema de control de ascensores.',\n long_description='Presenta una interfaz SCADA para controlar un grupo de ascensores en un edificio.',\n author...
#!/usr/bin/env python from distutils.core import setup import glob setup( name='control_ascensores', version='0.1', description='Simulacion del entorno de un sistema de control de ascensores.', long_description='Presenta una interfaz SCADA para controlar un grupo de ascensores en un edificio.', au...
[ [ 1, 0, 0.15, 0.05, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.2, 0.05, 0, 0.66, 0.5, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 8, 0, 0.625, 0.7, 0, 0.66, 1, ...
[ "from distutils.core import setup", "import glob", "setup(\n name='control_ascensores',\n version='0.1',\n description='Simulacion del entorno de un sistema de control de ascensores.',\n long_description='Presenta una interfaz SCADA para controlar un grupo de ascensores en un edificio.',\n author...
#!/usr/bin/python #from gi.repository import Gtk #from gi.repository import Gdk import gtk from decimal import Decimal import decimal import gobject import threading import math from gtkmvc import View class AscensorVistaPozo(View): def __init__(self, model): #, label): View.__init__(sel...
[ [ 1, 0, 0.0152, 0.003, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0213, 0.003, 0, 0.66, 0.1111, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0244, 0.003, 0, 0.6...
[ "import gtk", "from decimal import Decimal", "import decimal", "import gobject", "import threading", "import math", "from gtkmvc import View", "class AscensorVistaPozo(View): \n def __init__(self, model): #, label):\n View.__init__(self)\n\n self.lock = threading.RLock()\n ...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import gtk import time import random import ascensores from gtkmvc import Controller from gtkmvc.adapters import Adapter class ControladorEdificio(Controller): def __init__(self, model, view, ascensores): Controller.__ini...
[ [ 1, 0, 0.0207, 0.0052, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0311, 0.0052, 0, 0.66, 0.125, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0363, 0.0052, 0, 0...
[ "from __future__ import print_function", "import gtk", "import time", "import random", "import ascensores", "from gtkmvc import Controller", "from gtkmvc.adapters import Adapter", "class ControladorEdificio(Controller):\n def __init__(self, model, view, ascensores):\n Controller.__init__(sel...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import gtk #gtk.gdk.threads_init() import os import sys import time import ascensores import plc import scada_gtk class dialogo(gtk.Dialog): def _cerrar(self, button): self.d.destroy() def _armar_men...
[ [ 1, 0, 0.0179, 0.0045, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0269, 0.0045, 0, 0.66, 0.0714, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0404, 0.0045, 0, ...
[ "from __future__ import print_function", "import gtk", "import os", "import sys", "import time", "import ascensores", "import plc", "import scada_gtk", "class dialogo(gtk.Dialog):\n\n def _cerrar(self, button):\n self.d.destroy() \n\n def _armar_mensaje(self, pasos):\n ...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import os import sys import time import ascensores import controlador import scada_gtk if __name__ == "__main__": e = Edificio('E1',10) ev = EdificioVistaGtk(3) for i in xrange(3): a = Ascensor("A"+str(i+1), 0.2,...
[ [ 1, 0, 0.08, 0.02, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.12, 0.02, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.14, 0.02, 0, 0.66, 0....
[ "from __future__ import print_function", "import os", "import sys", "import time", "import ascensores", "import controlador", "import scada_gtk", "if __name__ == \"__main__\":\n e = Edificio('E1',10)\n\n ev = EdificioVistaGtk(3)\n\n for i in xrange(3):\n a = Ascensor(\"A\"+str(i+1), 0....
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import gtk import time import random import ascensores from gtkmvc import Controller from gtkmvc.adapters import Adapter class ControladorEdificio(Controller): def __init__(self, model, view, ascensores): Controller.__ini...
[ [ 1, 0, 0.0207, 0.0052, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0311, 0.0052, 0, 0.66, 0.125, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0363, 0.0052, 0, 0...
[ "from __future__ import print_function", "import gtk", "import time", "import random", "import ascensores", "from gtkmvc import Controller", "from gtkmvc.adapters import Adapter", "class ControladorEdificio(Controller):\n def __init__(self, model, view, ascensores):\n Controller.__init__(sel...
#!/usr/bin/python #from gi.repository import Gtk #from gi.repository import Gdk import gtk from decimal import Decimal import decimal import gobject import threading import math from gtkmvc import View class AscensorVistaPozo(View): def __init__(self, model): #, label): View.__init__(sel...
[ [ 1, 0, 0.0152, 0.003, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0213, 0.003, 0, 0.66, 0.1111, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0244, 0.003, 0, 0.6...
[ "import gtk", "from decimal import Decimal", "import decimal", "import gobject", "import threading", "import math", "from gtkmvc import View", "class AscensorVistaPozo(View): \n def __init__(self, model): #, label):\n View.__init__(self)\n\n self.lock = threading.RLock()\n ...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function from decimal import Decimal import decimal import datetime import threading import os import sys import time from gtkmvc import Model class TablaDeDemandas: ''' Permite configurar y recuperar la demanda de segun dia,hora,p...
[ [ 1, 0, 0.0085, 0.0021, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0128, 0.0021, 0, 0.66, 0.0769, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.015, 0.0021, 0, 0...
[ "from __future__ import print_function", "from decimal import Decimal", "import decimal", "import datetime", "import threading", "import os", "import sys", "import time", "from gtkmvc import Model", "class TablaDeDemandas:\n '''\n Permite configurar y recuperar la demanda de segun dia,ho...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import gtk #gtk.gdk.threads_init() import os import sys import time import ascensores import plc import scada_gtk class dialogo(gtk.Dialog): def _cerrar(self, button): self.d.destroy() def _armar_men...
[ [ 1, 0, 0.0179, 0.0045, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0269, 0.0045, 0, 0.66, 0.0714, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0404, 0.0045, 0, ...
[ "from __future__ import print_function", "import gtk", "import os", "import sys", "import time", "import ascensores", "import plc", "import scada_gtk", "class dialogo(gtk.Dialog):\n\n def _cerrar(self, button):\n self.d.destroy() \n\n def _armar_mensaje(self, pasos):\n ...
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function import os import sys import time import ascensores import controlador import scada_gtk if __name__ == "__main__": e = Edificio('E1',10) ev = EdificioVistaGtk(3) for i in xrange(3): a = Ascensor("A"+str(i+1), 0.2,...
[ [ 1, 0, 0.08, 0.02, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.12, 0.02, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.14, 0.02, 0, 0.66, 0....
[ "from __future__ import print_function", "import os", "import sys", "import time", "import ascensores", "import controlador", "import scada_gtk", "if __name__ == \"__main__\":\n e = Edificio('E1',10)\n\n ev = EdificioVistaGtk(3)\n\n for i in xrange(3):\n a = Ascensor(\"A\"+str(i+1), 0....
#!/usr/bin/python # -*- encoding: UTF-8 -*- from __future__ import print_function from decimal import Decimal import decimal import datetime import threading import os import sys import time from gtkmvc import Model class TablaDeDemandas: ''' Permite configurar y recuperar la demanda de segun dia,hora,p...
[ [ 1, 0, 0.0085, 0.0021, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0128, 0.0021, 0, 0.66, 0.0769, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.015, 0.0021, 0, 0...
[ "from __future__ import print_function", "from decimal import Decimal", "import decimal", "import datetime", "import threading", "import os", "import sys", "import time", "from gtkmvc import Model", "class TablaDeDemandas:\n '''\n Permite configurar y recuperar la demanda de segun dia,ho...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import json class Carta: def __init__(self, num, nome, era, colore): self.num = num # numero self.nome = nome[:32] # max 32 caratteri self.era = era self.colore = colore self.costo = dict(legno=0, pietra=0, argilla=0, oro=0, stoffa=0, vetro=0, papiri=0, monete...
[ [ 1, 0, 0.0179, 0.0045, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 3, 0, 0.2422, 0.426, 0, 0.66, 0.0476, 238, 0, 13, 0, 0, 0, 0, 15 ], [ 2, 1, 0.0605, 0.0538, 1, 0...
[ "import json", "class Carta:\n\tdef __init__(self, num, nome, era, colore):\n\t\tself.num = num # numero\n\t\tself.nome = nome[:32] # max 32 caratteri\n\t\tself.era = era\n\t\tself.colore = colore\n\t\tself.costo = dict(legno=0, pietra=0, argilla=0, oro=0, stoffa=0, vetro=0, papiri=0, monete=0)\n\t\tself.produzio...
#!/usr/bin/python2 import sys if (len(sys.argv) != 2): print "Usage: {0} /path/to/t/mjin2".format(sys.argv[0]) sys.exit(0) import pymjin2 class Mover(pymjin2.SequenceListener): def __init__(self, timer, node): self.i = 0 self.node = node pymjin2.SequenceListener.__init__(self) ...
[ [ 1, 0, 0.0111, 0.0037, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.0222, 0.0111, 0, 0.66, 0.1429, 0, 0, 0, 0, 0, 0, 0, 4 ], [ 8, 1, 0.0222, 0.0037, 1, 0, ...
[ "import sys", "if (len(sys.argv) != 2):\n print(\"Usage: {0} /path/to/t/mjin2\".format(sys.argv[0]))\n sys.exit(0)", " print(\"Usage: {0} /path/to/t/mjin2\".format(sys.argv[0]))", " sys.exit(0)", "import pymjin2", "class Mover(pymjin2.SequenceListener):\n def __init__(self, timer, node):\n ...
#!/usr/bin/python2 import sys if (len(sys.argv) != 2): print "Usage: {0} /path/to/t/mjin2".format(sys.argv[0]) sys.exit(0) dataDir = sys.argv[1] + "/Renderless" import pymjin2 def printXMLTree(node, level = 0): for i in range(0, level): print " ", print node.name, " ", node.value for a i...
[ [ 1, 0, 0.0333, 0.0167, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.0833, 0.05, 0, 0.66, 0.0303, 0, 0, 0, 0, 0, 0, 0, 4 ], [ 8, 1, 0.0833, 0.0167, 1, 0.18, ...
[ "import sys", "if (len(sys.argv) != 2):\n print(\"Usage: {0} /path/to/t/mjin2\".format(sys.argv[0]))\n sys.exit(0)", " print(\"Usage: {0} /path/to/t/mjin2\".format(sys.argv[0]))", " sys.exit(0)", "dataDir = sys.argv[1] + \"/Renderless\"", "import pymjin2", "def printXMLTree(node, level = 0):...
from Common import * import mjin2 class GamePlayer(object): def __init__(self, application): self.actionController = None self.application = application self.data = {} self.sceneCamera = None self.sceneCameraController = None self.scenePlayer = None self.sce...
[ [ 1, 0, 0.0385, 0.0192, 0, 0.66, 0, 175, 0, 1, 0, 0, 175, 0, 0 ], [ 1, 0, 0.0577, 0.0192, 0, 0.66, 0.5, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 3, 0, 0.5385, 0.9038, 0, 0.6...
[ "from Common import *", "import mjin2", "class GamePlayer(object):\n def __init__(self, application):\n self.actionController = None\n self.application = application\n self.data = {}\n self.sceneCamera = None\n self.sceneCameraController = None\n self.scenePlayer = N...
import mjin2 class GameXML(mjin2.XML): def __init__(self, pathResolver): super(GameXML, self).__init__() self.pathResolver = pathResolver def loadAndDereference(self, fileName): r = self.load(fileName) if (len(r.nodes)): root = r.nodes[0] proceed = True ...
[ [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 3, 0, 0.5833, 0.875, 0, 0.66, 1, 356, 0, 2, 0, 0, 681, 0, 8 ], [ 2, 1, 0.25, 0.125, 1, 0.57, ...
[ "import mjin2", "class GameXML(mjin2.XML):\n def __init__(self, pathResolver):\n super(GameXML, self).__init__()\n self.pathResolver = pathResolver\n def loadAndDereference(self, fileName):\n r = self.load(fileName)\n if (len(r.nodes)):\n root = r.nodes[0]", " def...
""" World of the game """ import mjin2 from GameObject import * from GamePlayer import * from GameScene import * class World(GameObject): scenes = { } def __init__(self, application, pathResolver): super(World, self).__init__(pathResolver) self.player = GamePlayer(application) def finish(s...
[ [ 8, 0, 0.05, 0.075, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.025, 0, 0.66, 0.2, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.15, 0.025, 0, 0.66, 0.4, ...
[ "\"\"\"\nWorld of the game\n\"\"\"", "import mjin2", "from GameObject import *", "from GamePlayer import *", "from GameScene import *", "class World(GameObject):\n scenes = { }\n def __init__(self, application, pathResolver):\n super(World, self).__init__(pathResolver)\n self.player = ...
""" Concrete application containing the World """ import mjin2 import os, sys from GameConfig import * from GameWorld import * class GameApplication(mjin2.InputListener, mjin2.WindowListener): def __init__(self, name, gameCfg, logFileName, worldFileName): self.cfg = gameCfg self.app = mjin2.Applic...
[ [ 8, 0, 0.0364, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0909, 0.0182, 0, 0.66, 0.2, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.1091, 0.0182, 0, 0.66, ...
[ "\"\"\"\nConcrete application containing the World\n\"\"\"", "import mjin2", "import os, sys", "from GameConfig import *", "from GameWorld import *", "class GameApplication(mjin2.InputListener, mjin2.WindowListener):\n def __init__(self, name, gameCfg, logFileName, worldFileName):\n self.cfg = g...
import mjin2 from Common import * from GameXML import * class SceneSerializer(object): def __init__(self, pathResolver, sceneNodeFactory): self.pathResolver = pathResolver self.sceneNodeFactory = sceneNodeFactory def load(self, gameScene, fileName): self.gameScene = gameScene s...
[ [ 1, 0, 0.0213, 0.0106, 0, 0.66, 0, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.0319, 0.0106, 0, 0.66, 0.3333, 175, 0, 1, 0, 0, 175, 0, 0 ], [ 1, 0, 0.0426, 0.0106, 0, ...
[ "import mjin2", "from Common import *", "from GameXML import *", "class SceneSerializer(object):\n def __init__(self, pathResolver, sceneNodeFactory):\n self.pathResolver = pathResolver\n self.sceneNodeFactory = sceneNodeFactory\n def load(self, gameScene, fileName):\n self.gameScen...
""" Base class for World, Scene, and others. """ from GameObjectListener import * class GameObject(object): def __init__(self, pathResolver): self.listeners = {"OnFinish": [], "OnStart": []} self.pathResolver = pathResolver def addListener(self, event, script): ...
[ [ 8, 0, 0.0833, 0.125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2083, 0.0417, 0, 0.66, 0.5, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 3, 0, 0.6458, 0.75, 0, 0.66, ...
[ "\"\"\"\nBase class for World, Scene, and others.\n\"\"\"", "from GameObjectListener import *", "class GameObject(object):\n def __init__(self, pathResolver):\n self.listeners = {\"OnFinish\": [],\n \"OnStart\": []}\n self.pathResolver = pathResolver\n def addListen...
""" GameConfig with registered default values """ import mjin2 class GameConfig(object): def __init__(self): self.cfg = mjin2.ConfigFile() self.defaults = {} def __del__(self): del self.cfg def get(self, key): if (not self.__exists(key)): raise Exception("GameCo...
[ [ 8, 0, 0.0377, 0.0566, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0943, 0.0189, 0, 0.66, 0.5, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 3, 0, 0.5566, 0.8679, 0, 0.66, ...
[ "\"\"\"\nGameConfig with registered default values\n\"\"\"", "import mjin2", "class GameConfig(object):\n def __init__(self):\n self.cfg = mjin2.ConfigFile()\n self.defaults = {}\n def __del__(self):\n del self.cfg\n def get(self, key):\n if (not self.__exists(key)):", " ...
""" Common.cpp extension. Unstable functions. """ import mjin2 def strToBool(s): return s.lower() == "true" def readVec3(node): vec = mjin2.Vec3() for a in node.attrs: if (a.name == "x"): vec.x = float(a.value) elif (a.name == "y"): vec.y = float(a.value) e...
[ [ 8, 0, 0.0606, 0.0909, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1515, 0.0303, 0, 0.66, 0.25, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 2, 0, 0.2273, 0.0606, 0, 0.66, ...
[ "\"\"\"\nCommon.cpp extension. Unstable functions.\n\"\"\"", "import mjin2", "def strToBool(s):\n return s.lower() == \"true\"", " return s.lower() == \"true\"", "def readVec3(node):\n vec = mjin2.Vec3()\n for a in node.attrs:\n if (a.name == \"x\"):\n vec.x = float(a.value)\n ...
from mjin2 import * from Common import * from GameApplication import * from GameConfig import * from GameObject import * from GameObjectListener import * from GamePlayer import * from GameScene import * from GameWorld import * from GameXML import * from SceneSerializer import * from Translator import *
[ [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0.0909, 175, 0, 1, 0, 0, 175, 0, 0 ], [ 1, 0, 0.3077, 0.0769, 0, ...
[ "from mjin2 import *", "from Common import *", "from GameApplication import *", "from GameConfig import *", "from GameObject import *", "from GameObjectListener import *", "from GamePlayer import *", "from GameScene import *", "from GameWorld import *", "from GameXML import *", "from SceneSerial...
""" Subscribes to game objects' events and reacts. """ import imp class GameObjectListener: def __init__(self, parent, fileName): self.parent = parent self.fileName = fileName self.module = imp.load_source(fileName, fileName)
[ [ 8, 0, 0.1818, 0.2727, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4545, 0.0909, 0, 0.66, 0.5, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 3, 0, 0.8182, 0.4545, 0, 0.66, ...
[ "\"\"\"\nSubscribes to game objects' events and reacts.\n\"\"\"", "import imp", "class GameObjectListener:\n def __init__(self, parent, fileName):\n self.parent = parent\n self.fileName = fileName\n self.module = imp.load_source(fileName, fileName)", " def __init__(self, parent, fil...
import mjin2 import os class Translator(object): def __init__(self, defaultLanguage): self.setDefaultLanguage(defaultLanguage) self.translatorDic = {} def defaultLanguage(self): return self.language def id(self, text, language = "default"): lan = language if (languag...
[ [ 1, 0, 0.0208, 0.0208, 0, 0.66, 0, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.0417, 0.0208, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 3, 0, 0.4479, 0.75, 0, 0....
[ "import mjin2", "import os", "class Translator(object):\n def __init__(self, defaultLanguage):\n self.setDefaultLanguage(defaultLanguage)\n self.translatorDic = {}\n def defaultLanguage(self):\n return self.language\n def id(self, text, language = \"default\"):\n lan = langu...
""" World scene. """ import mjin2 from GameObject import * from SceneSerializer import * class GameScene(GameObject): def __init__(self, world, fileName): super(GameScene, self).__init__(world.pathResolver) self.world = world self.scene = mjin2.Scene() self.sceneNodeFactory = mjin2...
[ [ 8, 0, 0.0714, 0.1071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1786, 0.0357, 0, 0.66, 0.25, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.2143, 0.0357, 0, 0.66, ...
[ "\"\"\"\nWorld scene.\n\"\"\"", "import mjin2", "from GameObject import *", "from SceneSerializer import *", "class GameScene(GameObject):\n def __init__(self, world, fileName):\n super(GameScene, self).__init__(world.pathResolver)\n self.world = world\n self.scene = mjin2.Scene()\n ...
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.2727, 0.0909, 0, 0.66, 0.1111, 15, 3, 0, 0, 0, 654, 10, 1 ], [ 14, 0, 0.3636, 0.0909, 0, ...
[ "import time", "t = time.time()", "u = time.gmtime(t)", "s = time.strftime('%a, %e %b %Y %T GMT', u)", "print('Content-Type: text/javascript')", "print('Cache-Control: no-cache')", "print('Date: ' + s)", "print('Expires: ' + s)", "print('')", "print('var timeskew = new Date().getTime() - ' + str(t...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.1667, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, ...
[ "import os", "import optparse", "import subprocess", "import sys", "here = os.path.dirname(__file__)", "def main():\n usage = \"usage: %prog [file1..fileN]\"\n description = \"\"\"With no file paths given this script will automatically\ncompress all jQuery-based files of the admin app. Requires the ...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.1667, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, ...
[ "import os", "import optparse", "import subprocess", "import sys", "here = os.path.dirname(__file__)", "def main():\n usage = \"usage: %prog [file1..fileN]\"\n description = \"\"\"With no file paths given this script will automatically\ncompress all jQuery-based files of the admin app. Requires the ...
#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.12, ...
[ "from django.core.management import execute_manager", "try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.87, ...
[ "from django.core.management import execute_manager", "try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() # Alterado por marvin urlpatterns = patterns('antimicrobiano.views', url('^relatoriomedicos/$', 'relatorio'), # Example: # (r'^cetvida/', include('cetvida.foo...
[ [ 1, 0, 0.0435, 0.0435, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.1739, 0.0435, 0, 0.66, 0.3333, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 8, 0, 0.2174, 0.0435, 0, ...
[ "from django.conf.urls.defaults import *", "from django.contrib import admin", "admin.autodiscover()", "urlpatterns = patterns('antimicrobiano.views',\n url('^relatoriomedicos/$', 'relatorio'),\n\n # Example:\n # (r'^cetvida/', include('cetvida.foo.urls')),\n\n # Uncomment the admin/doc line below...
# Django settings for cetvida project. import os # hack to accommodate Windows CURRENT_PATH = os.path.abspath(os.path.dirname(__file__).decode('utf-8')).replace('\\', '/') DEBUG = True TEMPLATE_DEBUG = DEBUG DIRNAME = os.environ['PWD'] ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS D...
[ [ 1, 0, 0.0316, 0.0105, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0526, 0.0105, 0, 0.66, 0.037, 527, 3, 2, 0, 0, 293, 10, 4 ], [ 14, 0, 0.0842, 0.0105, 0, ...
[ "import os", "CURRENT_PATH = os.path.abspath(os.path.dirname(__file__).decode('utf-8')).replace('\\\\', '/')", "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "DIRNAME = os.environ['PWD']", "ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)", "MANAGERS = ADMINS", "DATABASE_ENGINE = 'mysql' ...
#coding: latin1 from django import forms from antimicrobiano.models import Antimicrobiano from antimicrobiano.models import Posologia from antimicrobiano.models import Solicitacao from antimicrobiano.models import Medico from django.forms.models import ModelForm class AntimicrobianoAdminForm(forms.ModelForm): cla...
[ [ 1, 0, 0.0789, 0.0263, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1053, 0.0263, 0, 0.66, 0.1111, 504, 0, 1, 0, 0, 504, 0, 0 ], [ 1, 0, 0.1316, 0.0263, 0, ...
[ "from django import forms", "from antimicrobiano.models import Antimicrobiano", "from antimicrobiano.models import Posologia", "from antimicrobiano.models import Solicitacao", "from antimicrobiano.models import Medico", "from django.forms.models import ModelForm", "class AntimicrobianoAdminForm(forms.Mo...
# -*- coding: utf-8 -*- from geraldo import Report, ReportBand, ObjectValue, ReportBand, landscape,\ SystemField, BAND_WIDTH, Label, ReportGroup, SubReport from reportlab.lib.units import cm from reportlab.lib.pagesizes import A5 from reportlab.lib.enums import TA_CENTER, TA_RIGHT class RelatorioMedicos(Repo...
[ [ 1, 0, 0.0556, 0.0444, 0, 0.66, 0, 532, 0, 10, 0, 0, 532, 0, 0 ], [ 1, 0, 0.1333, 0.0222, 0, 0.66, 0.25, 871, 0, 1, 0, 0, 871, 0, 0 ], [ 1, 0, 0.1556, 0.0222, 0, 0...
[ "from geraldo import Report, ReportBand, ObjectValue, ReportBand, landscape,\\\n SystemField, BAND_WIDTH, Label, ReportGroup, SubReport", "from reportlab.lib.units import cm", "from reportlab.lib.pagesizes import A5", "from reportlab.lib.enums import TA_CENTER, TA_RIGHT", "class RelatorioMedicos(Repo...
#coding: utf8 from django.db import models from django.forms.fields import CharField from antimicrobiano.ddiscreto import SEXO from antimicrobiano.ddiscreto import STATUS_SOLICITACAO from antimicrobiano.ddiscreto import STATUS_ABERTO from antimicrobiano.ddiscreto import SIM_NAO from antimicrobiano.ddiscreto import NAO...
[ [ 1, 0, 0.0082, 0.0027, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0109, 0.0027, 0, 0.66, 0.0312, 910, 0, 1, 0, 0, 910, 0, 0 ], [ 1, 0, 0.0136, 0.0027, 0, 0....
[ "from django.db import models", "from django.forms.fields import CharField", "from antimicrobiano.ddiscreto import SEXO", "from antimicrobiano.ddiscreto import STATUS_SOLICITACAO", "from antimicrobiano.ddiscreto import STATUS_ABERTO", "from antimicrobiano.ddiscreto import SIM_NAO", "from antimicrobiano....
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
[ [ 8, 0, 0.1522, 0.2609, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3478, 0.0435, 0, 0.66, 0.3333, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5435, 0.2609, 0, 0.66...
[ "\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_a...
#coding: utf8 from django.contrib import admin from django.forms import TextInput from django.db import models from django import forms from django.contrib import messages from antimicrobiano.models import Paciente from antimicrobiano.models import Medico from antimicrobiano.models import Enfermaria from antimicrobi...
[ [ 1, 0, 0.0088, 0.0029, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.0118, 0.0029, 0, 0.66, 0.0139, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 1, 0, 0.0147, 0.0029, 0, ...
[ "from django.contrib import admin", "from django.forms import TextInput", "from django.db import models", "from django import forms", "from django.contrib import messages", "from antimicrobiano.models import Paciente", "from antimicrobiano.models import Medico", "from antimicrobiano.models import Enfe...
from django.http import HttpResponse from reports import RelatorioMedicos from geraldo.generators import PDFGenerator from models import Medico def relatorio(request): resp = HttpResponse(mimetype='application/pdf') medico = Medico.objects.order_by('nome','id','crm') rel = RelatorioMedicos(queryset=medic...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.2143, 0.0714, 0, 0.66, 0.25, 500, 0, 1, 0, 0, 500, 0, 0 ], [ 1, 0, 0.2857, 0.0714, 0, 0....
[ "from django.http import HttpResponse", "from reports import RelatorioMedicos", "from geraldo.generators import PDFGenerator", "from models import Medico", "def relatorio(request):\n resp = HttpResponse(mimetype='application/pdf')\n\n medico = Medico.objects.order_by('nome','id','crm')\n rel = Rela...
#coding: utf8 """ Arquivo utilizado para armazenar as class de Dominio Discreto """ SEXO = ( (u'M',u'Masculino'), (u'F', 'Feminino'), ) DIASANOS = ( (u'D',u'Dias'), (u'A', 'Anos'), ) STATUS_ABERTO='1' STATUS_APROVADO='2' STATUS_RECUSADO='3' STATUS_EM_ANALISE='4' STATUS_SOLICITACAO = ( (STAT...
[ [ 8, 0, 0.0833, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2083, 0.1111, 0, 0.66, 0.1, 187, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.3472, 0.1111, 0, 0.66, ...
[ "\"\"\"\n Arquivo utilizado para armazenar as class de Dominio Discreto\n\"\"\"", "SEXO = (\n (u'M',u'Masculino'),\n (u'F', 'Feminino'),\n)", "DIASANOS = (\n (u'D',u'Dias'),\n (u'A', 'Anos'),\n)", "STATUS_ABERTO='1'", "STATUS_APROVADO='2'", "STATUS_RECUSADO='3'", "STATUS_EM_ANALISE='4'", ...
# # This file defines how to build PyMite using Scons (www.scons.org) # Usage: # scons tags # scons docs # scons PLATFORM=<platform> # import os, string supported_platforms = Glob("src/platform/*") allowed_platforms = [os.path.split(x)[1] for x in map(str, supported_platforms)] vars = Variables() # BUILD ...
[ [ 1, 0, 0.1493, 0.0149, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 14, 0, 0.194, 0.0149, 0, 0.66, 0.25, 922, 3, 1, 0, 0, 753, 10, 1 ], [ 14, 0, 0.209, 0.0149, 0, 0...
[ "import os, string", "supported_platforms = Glob(\"src/platform/*\")", "allowed_platforms = [os.path.split(x)[1] for x in map(str, supported_platforms)]", "vars = Variables()", "if \"tags\" in COMMAND_LINE_TARGETS or \"TAGS\" in COMMAND_LINE_TARGETS:\n vmfiles = Glob(\"src/vm/*\")\n ctags = Command('t...
#!/usr/bin/env python # This file is Copyright 2009 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. """ PyMite Heap Dump ================ Parses a heap dump into human-readable format. The heap dump file is created ...
[ [ 8, 0, 0.032, 0.0436, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0681, 0.0014, 0, 0.66, 0.0833, 688, 0, 6, 0, 0, 688, 0, 0 ], [ 7, 0, 0.0729, 0.0054, 0, 0.66,...
[ "\"\"\"\nPyMite Heap Dump\n================\n\nParses a heap dump into human-readable format.\n\nThe heap dump file is created by inserting a calls to heap_dump()\ninside heap_gcRun(). Using two calls, a before and after, is ideal.", "import os, struct, sys, types, UserDict, collections", "try:\n import cSt...
#!/usr/bin/env python # This file is Copyright 2001 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. """ PyMite Image Creator ==================== Converts Python source files to a PyMite code image library. Performs ...
[ [ 8, 0, 0.0191, 0.0228, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0481, 0.0165, 0, 0.66, 0.0244, 207, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0589, 0.001, 0, 0.66, ...
[ "\"\"\"\nPyMite Image Creator\n====================\n\nConverts Python source files to a PyMite code image library.\nPerforms code filtering to ensure it will run in PyMite.\nFormats the image as a raw binary file or a C file\ncontaining a byte array.", "__usage__ = \"\"\"USAGE:\n pmImgCreator.py -f pmfeatures...
#!/usr/bin/env python # Copyright 2009 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. ## @file # @copydoc pmReplaceCopyright ## @package pmReplaceCopyright # @brief This program naively replaces the copyright head...
[ [ 1, 0, 0.2571, 0.0143, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 14, 0, 0.3786, 0.1714, 0, 0.66, 0.2, 212, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.5643, 0.1714, 0, 0.6...
[ "import os, sys", "PoaC_COPYRIGHT = \"\"\"# This file is Copyright 2003, 2006, 2007, 2009 Dean Hall.\n#\n# This file is part of the Python-on-a-Chip program.\n# Python-on-a-Chip is free software: you can redistribute it and/or modify\n# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.\n#\n...
#!/usr/bin/env python # This file is Copyright 2009 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. """ PyMite Object Descriptor Decoder ================================ Decodes an object descriptor value into its bi...
[ [ 8, 0, 0.104, 0.0594, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2376, 0.0099, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.2772, 0.0297, 0, 0.66,...
[ "\"\"\"\nPyMite Object Descriptor Decoder\n================================\n\nDecodes an object descriptor value into its bit fields.\n\"\"\"", "import sys", "__usage__ = \"\"\"USAGE:\n ./pmOdDecoder.py odvalue\n\"\"\"", "TYPES = (\n 'OBJ_TYPE_NON',\n 'OBJ_TYPE_INT',\n 'OBJ_TYPE_FLT',\n 'OBJ_T...
#!/usr/bin/env python # This file is Copyright 2001 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. """ Python Byte Code utility functions. count(fn) - count the number of times each byte code appears in ...
[ [ 8, 0, 0.1061, 0.0606, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2626, 0.0101, 0, 0.66, 0.1667, 279, 0, 2, 0, 0, 279, 0, 0 ], [ 14, 0, 0.303, 0.0101, 0, 0.66...
[ "\"\"\"\nPython Byte Code utility functions.\n\ncount(fn) - count the number of times each byte code\n appears in a code object.\n\"\"\"", "import dis, types", "MAX_BCODE = 150", "def count(fn):\n \"\"\"\n Compile the python source file named fn.\n Count all the bytecodes in the file.\n ...
#!/usr/bin/env python # This file is Copyright 2009 Dean Hall. # This file is part of the Python-on-a-Chip tools. # This software is licensed under the MIT License. # See the LICENSE file for details. """Creates a release package for PyMite Makes fresh export (no .svn folders), builds the docs, makes pymite-RR.tar.g...
[ [ 8, 0, 0.1786, 0.0893, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3571, 0.0179, 0, 0.66, 0.0833, 688, 0, 5, 0, 0, 688, 0, 0 ], [ 14, 0, 0.4107, 0.0179, 0, 0.6...
[ "\"\"\"Creates a release package for PyMite\n\nMakes fresh export (no .svn folders), builds the docs, makes pymite-RR.tar.gz\nand creates release tag in the svn repository\n\"\"\"", "import os, string, subprocess, sys, tempfile", "REPOS = \"https://python-on-a-chip.googlecode.com/svn/\"", "RELEASE_NUM = sys.a...
# This file is Copyright 2009 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2009 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 1, 0, 0.9286, 0.0714, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 1, 0.0714, 0, 0.66, 1, 327, 3, 1, 0, 0, 0, 0, 2 ] ]
[ "import ipm", "ipm.ipm(globals())" ]
# This file is Copyright 2009 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 8, 0, 0.0141, 0.0109, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0558, 0.0699, 0, 0.66, 0.1, 238, 0, 3, 0, 0, 186, 0, 0 ], [ 2, 1, 0.0353, 0.0263, 1, 0.96, ...
[ "\"\"\"__NATIVE__\n#include \"mbed.h\"\n#include \"TextLCD.h\"\n\nstatic DigitalOut led1(LED1);\nstatic DigitalOut led2(LED2);\nstatic DigitalOut led3(LED3);\nstatic DigitalOut led4(LED4);", "class AnalogIn(object):\n\n def __init__(self, n):\n \"\"\"__NATIVE__\n pPmObj_t pself;\n pPmObj_t...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# # PyMite - A flyweight Python interpreter for 8-bit and larger microcontrollers. # Copyright 2002 Dean Hall. All rights reserved. # PyMite is offered through one of two licenses: commercial or open-source. # See the LICENSE file at the root of this package for licensing details. # # # Runs the interactive interpret...
[ [ 8, 0, 0.7059, 0.0588, 0, 0.66, 0, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.8235, 0.0588, 0, 0.66, 0.3333, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 0.8824, 0.0588, 0, 0....
[ "print(\"Hello\")", "import ipm", "ipm.ipm(globals())", "print(\"Good-bye\")" ]
# to get the Python executable path import sys # pulls in the variables set in the 'master' SConstruct file Import("vars") # these should match up with the source code vars.Add("HEAP_SIZE", "Size of the VM's heap.", 0x2000) vars.Add("IPM", "Add the interactive library to the standard lib", True) CFLAGS = "/DHEAP_SIZ...
[ [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.122, 0.0244, 0, 0.66, 0.0769, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1951, 0.0244, 0, 0.6...
[ "import sys", "Import(\"vars\")", "vars.Add(\"HEAP_SIZE\", \"Size of the VM's heap.\", 0x2000)", "vars.Add(\"IPM\", \"Add the interactive library to the standard lib\", True)", "CFLAGS = \"/DHEAP_SIZE=$HEAP_SIZE /D_CONSOLE\"", "if \"DEBUG\" in vars.args.keys():\n CFLAGS = \"-D_DEBUG=1 \" + CFLAGS", "...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": False,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 8, 0, 0.0384, 0.0186, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.1105, 0.1163, 0, 0.66, 0.0909, 9, 0, 2, 0, 0, 0, 0, 0 ], [ 8, 1, 0.1105, 0.1116, 1, 0.82, ...
[ "\"\"\"__NATIVE__\n#include \"mc1322x.h\"\n#include \"board.h\"\n\n#ifndef HAVE_BYTEARRAY\n#error HAVE_BYTEARRAY must be defined for the Econotag packet implementation\n#endif\n\"\"\"", "def gpio_func_sel(gpio, mode):\n \"\"\"__NATIVE__\n PmReturn_t retval = PM_RET_OK;\n pPmObj_t pgpio, pmode;\n int32...
# # PyMite - A flyweight Python interpreter for 8-bit and larger microcontrollers. # Copyright 2002 Dean Hall. All rights reserved. # PyMite is offered through one of two licenses: commercial or open-source. # See the LICENSE file at the root of this package for licensing details. # import ipm ipm.ipm()
[ [ 1, 0, 0.8889, 0.1111, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 1, 0.1111, 0, 0.66, 1, 327, 3, 0, 0, 0, 0, 0, 1 ] ]
[ "import ipm", "ipm.ipm()" ]
#!/usr/bin/python # This file was written by Andrew Pullin # This file obtained from: http://bmi.berkeley.edu/~pullin/red-bsl.py # No copyright or licensing is claimed # Permission to use this file was granted via correspondence import serial from struct import pack,unpack import os import sys import time from optpa...
[ [ 1, 0, 0.0316, 0.0035, 0, 0.66, 0, 601, 0, 1, 0, 0, 601, 0, 0 ], [ 1, 0, 0.0351, 0.0035, 0, 0.66, 0.0161, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.0386, 0.0035, 0, ...
[ "import serial", "from struct import pack,unpack", "import os", "import sys", "import time", "from optparse import OptionParser", "parser = OptionParser()", "parser.add_option(\"-f\", \"--file\", dest=\"filename\",\n help=\"binary file to program\", metavar=\"FILE\")", "parser.add_o...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2010 Oscar Lindberg. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be usefu...
[ [ 1, 0, 0.1548, 0.0119, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1667, 0.0119, 0, 0.66, 0.0769, 430, 0, 1, 0, 0, 430, 0, 0 ], [ 1, 0, 0.1786, 0.0119, 0, ...
[ "import sys", "import list", "from ma import *", "print(\"MoPync - bringing the Guido goodness to the world of MoSync\")", "LOGO_HANDLE = 1", "logo_width, logo_height = maGetImageSize(LOGO_HANDLE)", "screen_width, screen_height = maGetScrSize()", "background_color = 0x330055", "rectangles = []", "...
# This file contains wrappers that has been automatically # generated from the maapi.h. Some of these has been moved # to ma.py, sometimes they have changed into more a more # Pythonic format. # When some function or constant is missing from ma.h, # it might be here. """__NATIVE__ #include <ma.h> """ TRANS_NONE = 0...
[ [ 8, 0, 0.003, 0.0009, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0041, 0.0003, 0, 0.66, 0.0034, 276, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0047, 0.0003, 0, 0.66,...
[ "\"\"\"__NATIVE__\n#include <ma.h>\n\"\"\"", "TRANS_NONE = 0", "TRANS_ROT90 = 5", "TRANS_ROT180 = 3", "TRANS_ROT270 = 6", "TRANS_MIRROR = 2", "TRANS_MIRROR_ROT90 = 7", "TRANS_MIRROR_ROT180 = 1", "TRANS_MIRROR_ROT270 = 4", "HANDLE_SCREEN = 0", "HANDLE_LOCAL = 0", "RES_OUT_OF_MEMORY = 1", "RES...
# This file contains wrappers for the basic # functions in maapi. # If a function or constant is missing, look in ma_gen.py, it # might be there. """__NATIVE__ #include <ma.h> #define POP_TMPROOT_AND_RETURN_IF_ERROR(retval, objid) \ do \ { \ if ((retval) != PM_RET_OK) \ { \ heap_g...
[ [ 8, 0, 0.0091, 0.0097, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0149, 0.0006, 0, 0.66, 0.0106, 276, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0156, 0.0006, 0, 0.66...
[ "\"\"\"__NATIVE__\n#include <ma.h>\n\n#define POP_TMPROOT_AND_RETURN_IF_ERROR(retval, objid) \\\n do \\\n { \\\n if ((retval) != PM_RET_OK) \\\n { \\", "TRANS_NONE = 0", "TRANS_ROT90 = 5", "TRANS_ROT180 = 3", "TRANS_ROT270 = 6", "TRANS_MIRROR = 2", "TRANS_MIRROR_ROT90 = 7", "TRANS_...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": False,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2007 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 8, 0, 0.5517, 0.0345, 0, 0.66, 0, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.6207, 0.0345, 0, 0.66, 0.1667, 718, 0, 1, 0, 0, 718, 0, 0 ], [ 8, 0, 0.7241, 0.0345, 0, 0....
[ "print(\"Hello world.\")", "import avr", "print(\"Counting from 0 to 249 on portA's pins\")", "avr.ddrA(0xFF)", "i = 0", "while i < 250:\n avr.portA(i)\n avr.delay(250)\n i += 1", " avr.portA(i)", " avr.delay(250)", "print(\"Done.\")" ]
import os Import("vars") vars.Add("IPM", "Add the interactive library to the standard lib", True) vars.Add("MCU", "Type of AVR device; the arg to -mmcu.", "atmega103") vars.Add("F_CPU", "Operating frequency of the AVR device.", "4000000UL") vars.Add("NM", "", "avr-nm") vars.Add("OBJCOPY", "", "avr-objcopy") vars.Add(...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.0638, 0.0213, 0, 0.66, 0.0526, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1064, 0.0213, 0, 0....
[ "import os", "Import(\"vars\")", "vars.Add(\"IPM\", \"Add the interactive library to the standard lib\", True)", "vars.Add(\"MCU\", \"Type of AVR device; the arg to -mmcu.\", \"atmega103\")", "vars.Add(\"F_CPU\", \"Operating frequency of the AVR device.\", \"4000000UL\")", "vars.Add(\"NM\", \"\", \"avr-nm...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# # PyMite - A flyweight Python interpreter for 8-bit and larger microcontrollers. # Copyright 2002 Dean Hall. All rights reserved. # PyMite is offered through one of two licenses: commercial or open-source. # See the LICENSE file at the root of this package for licensing details. # import ipm ipm.ipm() # :mode=c:
[ [ 1, 0, 0.7273, 0.0909, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 0.8182, 0.0909, 0, 0.66, 1, 327, 3, 0, 0, 0, 0, 0, 1 ] ]
[ "import ipm", "ipm.ipm()" ]
import os import glob TCHAIN = "arm-none-eabi" Import("vars") vars.Add("PM_UART_BAUD", "Baud rate of the ipm serial connection.", "19200") vars.Add("IPM", "Add the interactive library to the standard lib", True) vars.Add("MCU", "Type of ARM device; the arg to -mcpu.", "cortex-m3") vars.Add("NM", "", "arm-eabi-nm") v...
[ [ 1, 0, 0.0154, 0.0154, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0308, 0.0154, 0, 0.66, 0.0435, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 14, 0, 0.0615, 0.0154, 0, ...
[ "import os", "import glob", "TCHAIN = \"arm-none-eabi\"", "Import(\"vars\")", "vars.Add(\"PM_UART_BAUD\", \"Baud rate of the ipm serial connection.\", \"19200\")", "vars.Add(\"IPM\", \"Add the interactive library to the standard lib\", True)", "vars.Add(\"MCU\", \"Type of ARM device; the arg to -mcpu.\"...
#!/usr/bin/env python import urllib, zipfile, StringIO from os import path, mkdir extra_headers = ['stm32f10x.h','core_cm3.h','cortexm3_macro.h','system_stm32f10x.h'] extra_sources = ['core_cm3.c','cortexm3_macro.s','system_stm32f10x.c'] startup_files = ['startup_stm32f10x_hd.s'] #stm32liburl = 'http://www.st.com/st...
[ [ 1, 0, 0.0769, 0.0256, 0, 0.66, 0, 614, 0, 3, 0, 0, 614, 0, 0 ], [ 1, 0, 0.1026, 0.0256, 0, 0.66, 0.0909, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1538, 0.0256, 0, ...
[ "import urllib, zipfile, StringIO", "from os import path, mkdir", "extra_headers = ['stm32f10x.h','core_cm3.h','cortexm3_macro.h','system_stm32f10x.h']", "extra_sources = ['core_cm3.c','cortexm3_macro.s','system_stm32f10x.c']", "startup_files = ['startup_stm32f10x_hd.s']", "stm32liburl = \"http://www.st.c...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": False,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
[ [ 8, 0, 0.1939, 0.0102, 0, 0.66, 0, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.2143, 0.0102, 0, 0.66, 0.1667, 718, 0, 1, 0, 0, 718, 0, 0 ], [ 14, 0, 0.2449, 0.0102, 0, 0...
[ "print(\"Hello world.\")", "import avr", "teensyVersion = 1", "morse = {\n# 'A' : '.-',\n# 'B' : '-...',\n# 'C' : '-.-.',\n 'D' : '-..',\n 'E' : '.',\n# 'F' : '..-.',\n# 'G' : '--.',", "def loop():\n for i in range(1,6):\n printMorse(\"SOS\")\n avr.delay(1500)\n prin...
# This file is Copyright 2010 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2007 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 8, 0, 0.1291, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.2088, 0.0604, 0, 0.66, 0.0345, 26, 0, 0, 0, 0, 0, 0, 0 ], [ 8, 1, 0.2088, 0.0495, 1, 0.2, ...
[ "\"\"\"__NATIVE__\n#include <pic24_all.h>\n#include <pps.h>\n#include \"pyToC.h\"\n\n/** Macro to convert a number to a string.\n * Typical usage: <code>TOSTRING(__LINE__)</code>\n */", "def testConfigDigitalPin1():\n \"\"\"__NATIVE__\n PmReturn_t retval = PM_RET_OK;\n\n EXCEPTION_ASSERT(_PCFG3 == 1);\n...
# This file is Copyright 2007 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 8, 0, 0.0728, 0.0192, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.228, 0.2529, 0, 0.66, 0.2, 928, 0, 5, 0, 0, 186, 0, 0 ], [ 2, 1, 0.2184, 0.0192, 1, 0.54, ...
[ "\"\"\"__NATIVE__\n#include <pic24_all.h>\n#include \"pyFuncsInC.h\"\n#include \"dataXfer.h\"\n\"\"\"", "class digital_io(object):\n ## Configures a pin for digital operation.\n # Parameters:\n # @param port The port, specified as a one-letter string,\n # which must be from \"A\" to \"G...
# This file is Copyright 2007 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 1, 0, 0.8947, 0.0526, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 0.9474, 0.0526, 0, 0.66, 0.5, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 1, 0.0526, 0, 0.66, ...
[ "from ipm import ipm", "print(\"Welcome to PIC24/dsPIC33 Python! Starting interactive mode.\")", "ipm()" ]
#! /usr/bin/env python "Replace CRLF with LF in argument files. Print names of changed files." import sys, os def main(): for filename in sys.argv[1:]: if os.path.isdir(filename): print filename, "Directory!" continue data = open(filename, "rb").read() if '\0' in d...
[ [ 8, 0, 0.087, 0.0435, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1739, 0.0435, 0, 0.66, 0.3333, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.5652, 0.6522, 0, 0.66,...
[ "\"Replace CRLF with LF in argument files. Print names of changed files.\"", "import sys, os", "def main():\n for filename in sys.argv[1:]:\n if os.path.isdir(filename):\n print(filename, \"Directory!\")\n continue\n data = open(filename, \"rb\").read()\n if '\\0' ...
# Anything that starts with a # is a comment! # Use lots of comments in your code to explain what you're doing. # Use the PIC-specific Python libraries import pic24_dspic33 as pic # Monitor RAM usage import sys print "\n\nRAM usage: (free, total): ", sys.heap() #####################################################...
[ [ 1, 0, 0.0417, 0.0083, 0, 0.66, 0, 542, 0, 1, 0, 0, 542, 0, 0 ], [ 1, 0, 0.0667, 0.0083, 0, 0.66, 0.0476, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.075, 0.0083, 0, 0...
[ "import pic24_dspic33 as pic", "import sys", "print(\"\\n\\nRAM usage: (free, total): \", sys.heap())", "print(\"Testing line sensors.\",)", "line_sensor_left = pic.digital_io(1, 7, True)", "line_sensor_middle = pic.digital_io(1, 8, True)", "line_sensor_right = pic.digital_io(1, 9, True)", ...
# This file is Copyright 2007 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 1, 0, 0.4872, 0.0256, 0, 0.66, 0, 542, 0, 1, 0, 0, 542, 0, 0 ], [ 14, 0, 0.6667, 0.0256, 0, 0.66, 0.1429, 387, 3, 5, 0, 0, 928, 10, 1 ], [ 8, 0, 0.6923, 0.0256, 0, ...
[ "import pic24_dspic33 as pic", "dio = pic.digital_io(1, 1, False, False, 0)", "dio.set(not dio.get())", "ain = pic.analog_input(0)", "print(ain.getVoltage())", "pwm1 = pic.pwm(1000, True, 2, 0)", "pwm1.set(0.5)", "import main" ]
# This file is Copyright 2009 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]
# This file is Copyright 2009 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, #...
[ [ 1, 0, 0.9474, 0.0526, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 8, 0, 1, 0.0526, 0, 0.66, 1, 327, 3, 0, 0, 0, 0, 0, 1 ] ]
[ "import ipm", "ipm.ipm()" ]
Import("vars") vars.Add("IPM", "Add the interactive library to the standard lib", True) CFLAGS = "-Os -Wall -gstabs -Wstrict-prototypes -Werror" if "DEBUG" in vars.args.keys(): CFLAGS = "-g -ggdb -D__DEBUG__=1 " + CFLAGS SOURCES = ["main.c", "plat.c"] PY_SOURCES = ["main.py"] PM_LIB_ROOT = ["pmvm_%s" % vars.args[...
[ [ 8, 0, 0.0476, 0.0476, 0, 0.66, 0, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1429, 0.0476, 0, 0.66, 0.1, 241, 3, 3, 0, 0, 0, 0, 1 ], [ 14, 0, 0.2381, 0.0476, 0, 0.66, ...
[ "Import(\"vars\")", "vars.Add(\"IPM\", \"Add the interactive library to the standard lib\", True)", "CFLAGS = \"-Os -Wall -gstabs -Wstrict-prototypes -Werror\"", "if \"DEBUG\" in vars.args.keys():\n CFLAGS = \"-g -ggdb -D__DEBUG__=1 \" + CFLAGS", " CFLAGS = \"-g -ggdb -D__DEBUG__=1 \" + CFLAGS", "SO...
# This file is Copyright 2011 Dean Hall. # # This file is part of the Python-on-a-Chip program. # Python-on-a-Chip is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. # # Python-on-a-Chip is distributed in the hope that it will be useful, # ...
[ [ 14, 0, 0.7031, 0.625, 0, 0.66, 0, 965, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "PM_FEATURES = {\n \"HAVE_PRINT\": True,\n \"HAVE_GC\": True,\n \"HAVE_FLOAT\": True,\n \"HAVE_DEL\": True,\n \"HAVE_IMPORTS\": True,\n \"HAVE_DEFAULTARGS\": True,\n \"HAVE_REPLICATION\": True," ]