code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
"""Functions for Input/Output (IO) Operations. Classes ------- - Keys - Provide convenience for classes used as enumerated dictionary keys. - StreamCapture - Class to capture/redirect output to stdout and stderr. Functions --------- - bytes_string - Return a humanized ...
lzkelley/zcode
zcode/inout/inout_core.py
Python
mit
30,163
from __future__ import print_function from __future__ import absolute_import import os def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration # path to header files cwd = os.path.dirname(os.path.abspath(__file__)) incdir = os.path.abspath(os.pat...
chrisdjscott/Atoman
atoman/lattice_gen/setup.py
Python
mit
1,398
from mpf.tests.MpfGameTestCase import MpfGameTestCase class TestPlayerVars(MpfGameTestCase): def get_config_file(self): return 'player_vars.yaml' def get_machine_path(self): return 'tests/machine_files/player_vars/' def test_initial_values(self): self.fill_troughs() self...
missionpinball/mpf
mpf/tests/test_PlayerVars.py
Python
mit
2,380
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Nov 14 10:59:19 2017 @author: marcobarsacchi """ import numpy.random as random class MarkovChain(object): """Simple Markov Chain Model. """ def __init__(self, n, P, T, states=None, verbose= False): """Initialize a simple Marko...
mbarsacchi/mbarsacchi.github.com
python/MarkovChain_simple.py
Python
mit
2,443
# flake8: noqa import sys import toml import log from .uploader import DropboxUploader from .file_manager import DirectoryPoller, VolumePoller SECT = 'flysight-manager' class ConfigError(Exception): pass class FlysightConfig(object): pass class DropboxConfig(object): pass class VimeoConfig(object...
richo/flysight-manager
flysight_manager/config.py
Python
mit
6,142
""" addon-voxel-painter.py Copyright (c) 2013 Luke Frisken Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
kellpossible/VoxelEditor
PythonScript/addon-voxel-painter.py
Python
mit
29,381
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from allauth.socialaccount.helpers import render_authentication_error, send_social_connection_error_email from allauth.socialaccount.providers.oauth.client import (OAuthClient, ...
joebos/django-allauth
allauth/socialaccount/providers/oauth/views.py
Python
mit
3,898
__copyright__ = 'Copyright(c) Gordon Elliott 2017' """ """ from a_tuin.db import RelationMap, TableMap, PagedQuery, InstanceQuery from glod.model.statement_item import StatementItem, StatementItemDesignatedBalance from glod.model.statement_item_collection import StatementItemCollection from glod.model.references im...
gordon-elliott/glod
src/glod/db/statement_item.py
Python
mit
944
""" ========== Libsvm GUI ========== A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create data points by point and click and visualize the decision region induced by different kernels and parameter settings. To create positive examples click the left mouse button; to create neg...
diego0020/va_course_2015
SVM/svm_gui.py
Python
mit
11,180
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2015 Leon Jacobs # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
leonjza/weblick
web.py
Python
mit
1,381
#!/usr/local/bin/python3 """OmniFocus export to Dayone. Usage: omnifocus_export_dayone.py omnifocus_export_dayone.py <date> [--show] omnifocus_export_dayone.py (-s | --show) Options: -h --help Show this screen. --version Show version. -s --show Only echo to screen. """ import sys import sqlit...
nsdont/dotfiles
bin/omnifocus_export_dayone.py
Python
mit
6,596
import argparse import sys import unittest from argparse import ArgumentParser, FileType from gooey import GooeyParser from gooey.python_bindings import argparse_to_json from gooey.util.functional import getin from gooey.tests import * from gui.components.options.options import FileChooser from gui.component...
chriskiehl/Gooey
gooey/tests/test_argparse_to_json.py
Python
mit
12,621
import sys import argparse def parseArgument(): # Parse the input parser=argparse.ArgumentParser(description=\ "Filter Homer motifs to remove those with a low % of hits in target sites and a low value of target/background") parser.add_argument("--HomerMotifsFileName", required=True,\ help='Name of file with H...
imk1/IMKTFBindingCode
filterHomerMotifs.py
Python
mit
2,184
""" Odoo Test module. Odoo is an OpenERP framework. A copy of odoo.py with added features that eases testing. Website: http://www.odoo.com """ import logging import os import subprocess import sys # set server timezone in UTC before time module imported os.environ['TZ'] = 'UTC' SHELL_TIMEOUT = None SHELL_ENV_QUIET =...
dozymoe/fireh_runner
modules/odoo_test.py
Python
mit
7,100
#!/usr/bin/env python # -*- coding: utf-8 -*- # # name: settings.py # author: Harold Bradley III # email: harold@bradleystudio.net # created on: 01/23/2016 # # description: The settings file for ww # from __future__ import absolute_import, print_function import os import ti...
hbradleyiii/ww
ww/settings.py
Python
mit
2,079
import dataset import os.path import sys import database.src.contributions.ContributionSvg class SvgCreator: def __init__(self, path_dir_db, usernames=None): self.__SetPathDirDb(path_dir_db) self.__SetUsernames(usernames) """ SVGファイルを作成する。1ユーザ1年毎に1ファイル。 is_overwrite: ファイルが既存でも上書きするか否か。(...
trysrv/GitHub.Uploader.CuiCmd.201706231541
database/src/contributions/SvgCreator.py
Python
cc0-1.0
4,165
#!/usr/bin/env python #-*-coding:utf-8-*- # # @author Meng G. # 2016-03-28 restructed from sqip.config import * from sqip.libs import * dashboard = Blueprint('dashboard', __name__, template_folder='templates') @base.route('/admin/login' , methods=['GET']) @union_bug def admin_login(): template = env.get_templat...
gaomeng1900/SQIP-py
sqip/dashboard/dashboard.py
Python
cc0-1.0
548
"""Support for dynamic COM client support. Introduction Dynamic COM client support is the ability to use a COM server without prior knowledge of the server. This can be used to talk to almost all COM servers, including much of MS Office. In general, you should not use this module directly - see below. ...
Southpaw-TACTIC/Team
src/python/Lib/site-packages/win32com/client/dynamic.py
Python
epl-1.0
21,580
## # .bin.pg_python - Python console with a connection. ## """ Python command with a PG-API connection(``db``). """ import os import sys import re import code import optparse import contextlib from .. import clientparameters from ..python import command as pycmd from .. import project from ..driver import default as p...
zappyk-github/zappyk-python
lib/lib_external/postgresql/bin/pg_python.py
Python
gpl-2.0
3,516
import os __author__ = 'mwelland' class Condenser: """ A class called from fqRunner.py, used to combine several FastQ files into a single file pair For each gene and transcript, the modified contents are combined with the unmodified contents For single transcripts this will mean each variant appear...
MattWellie/FastqSimulator
read_condenser.py
Python
gpl-2.0
6,301
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2020 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
MDAnalysis/mdanalysis
package/MDAnalysis/analysis/hole2/hole.py
Python
gpl-2.0
67,157
""" WSGI config for speak project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTING...
rtancman/speak
speak/wsgi.py
Python
gpl-2.0
387
# # Copyright 2014-2017 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
EdDev/vdsm
tests/vmapi_test.py
Python
gpl-2.0
3,422
#!/user/bin/python ''' This script uses SimpleCV to grab an image from the camera and numpy to find an infrared LED and report its position relative to the camera view centre and whether it is inside the target area. Attempted stabilisation of the output by tracking a circular object instead and altering exposure of t...
dotCID/Graduation
Robot code/Sensors/simpleCV_3.py
Python
gpl-2.0
4,363
''' XBMC LCDproc addon Copyright (C) 2012 Team XBMC This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later v...
DK-Git/script.mdm166a
resources/lib/charset_map_hd44780_a00.py
Python
gpl-2.0
13,625
# # Copyright (c) 2009--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
colloquium/spacewalk
backend/satellite_tools/rhn_ssl_dbstore.py
Python
gpl-2.0
4,252
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import getopt import jsonrpclib import os import time DEFAULT_HOST="localhost" DEFAULT_PORT=3444 def usage(name): print "%s [-s server] temp" % name print "%s [-s server] temp set-name <sensor-id> <name>" % name print "%s [-s server] temp del <sensor-i...
hofors/autohub
ahc.py
Python
gpl-2.0
7,751
from skin import parseColor, parseFont, parseSize from Components.config import config, ConfigClock, ConfigInteger, ConfigSubsection, ConfigYesNo, ConfigSelection, ConfigSelectionNumber from Components.Pixmap import Pixmap from Components.Button import Button from Components.ActionMap import HelpableActionMap from Comp...
noox-/stbgui-1
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
Python
gpl-2.0
40,917
class User(object): def __init__(self, name): self.name = name
epronk/pyfit2
examples/chat/User.py
Python
gpl-2.0
75
from __future__ import division # for <python4 import os, math, sys, csv, urllib2, string, pqdict import pandas as pd import numpy as np from bs4 import BeautifulSoup def normalise(s): s.replace(' and ',' & ') s.replace(' And ',' & ') punc = string.punctuation.replace ('&','') # leave ampersands in! f...
mpadge/bike-correlations
src/getRailDists.py
Python
gpl-2.0
9,386
#!/usr/bin/python """ Program that calculates several hashes for a given CD image. @copyright: Red Hat 2008-2009 """ import os, sys, optparse, logging try: import autotest.common as common except ImportError: import common from autotest_lib.client.common_lib import logging_manager from autotest_lib.client.bin...
libvirt/autotest
client/tools/cd_hash.py
Python
gpl-2.0
1,765
# Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
mulkieran/storage_alerts
tests/sources/generic/by_line/recognizers_test.py
Python
gpl-2.0
7,550
"""Demo shows how to use the brain module. """ import brain # 3 input 2 hidden 2 outputs guess=[ [[1, 2, 3, 0],[3, 4, 5, -1]] , [[8,9,2],[-4,-5,-6]] ] net=brain.FeedForwardBrain(weight=guess) # apply an input out=net.ffwd([.1,.2,-.3]) print out guess=[ [[1, 2, 3, 0],[3, 4, 5, -1]] , [[-4,-5,...
pauljohnleonard/pod-world
CI_2014/ATTIC/CartWithPendulum/brainDemo.py
Python
gpl-2.0
524
# This cluster host should listen on the network for graph execution requests. # Such requests consist out of a language identifier string (lua, python, ...) and a graph to execute as well as optional arguments for the graph. # The graph is executed in is_cluster_server mode, which might restrict some features for secu...
penguinmenac3/GraphProgramming
cluster_server/cluster_host.py
Python
gpl-2.0
446
from django.contrib import admin from django.contrib.auth import views as auth_views from django.conf import settings from django.conf.urls import url, include from . import views urlpatterns = [ url(r'^login/$', auth_views.login, name='login'), url(r'^logout/$', auth_views.logout, name='logout'), url(r'^a...
Akka47/ymcmb
ymc/urls.py
Python
gpl-2.0
591
from PyQt5 import QtCore, QtGui, QtWidgets from ui_testdialogtoollc import Ui_testDialogtoollc class testDialogtoollc(QtWidgets.QDialog): def __init__(self, parent): QtWidgets.QDialog.__init__(self, parent) self.ui = Ui_testDialogtoollc() self.ui.setupUi(self)
sergelhomme/Network_Analysis
Network_Analysis_2_1/network_analysis/tools/testdialogtoollc.py
Python
gpl-2.0
279
# pylint: skip-file # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2010 Rafal Wojtczuk <rafal@invisiblethingslab.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; ei...
kalkin/qubes-core-admin
qubes/tools/qmemmand.py
Python
gpl-2.0
10,143
#!/usr/bin/env python __version__ = "0.1.0" __date__ = "2014-04-11 1:42:05" __author__ = "Dhia Abbassi" __email__ = "dhiaabbassi90@gmail.com" __license__ = "GPL" __maintainer__ = "" __doc__=""" Snippet of code that solves <Problem A. Magic Trick> """
OssecTN/codejam-2014
python/magic_trick/__init__.py
Python
gpl-2.0
251
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2003, 2004, 2005 Edgewall Software # Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # # This software is licensed as described in the file # LICENSE_FOR_PYTHON_BINDINGS, which you s...
bdmod/extreme-subversion
BinarySourcce/subversion-1.6.17/subversion/bindings/swig/python/tests/trac/test.py
Python
gpl-2.0
1,070
# -*- coding: utf-8 -*- ############################################################################### ## # @file kmAnimImpExp.py # @brief AnimファイルとSelectファイル同時書き出し # @version 1.0.1 # @date 2016/04/23 # @note - edit # - cleanup # @todo # #################################################################...
smymc/Maya-Python
kmAnimImpExp.py
Python
gpl-2.0
3,967
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free Softwa...
chetan/cherokee
admin/plugins/proxy.py
Python
gpl-2.0
10,677
from django.contrib.auth.models import User from django.db.models import Q from django.shortcuts import render def demo(request): return render(request, 'demo/demo.html') def demo_autocomplete(request, template_name='demo/autocomplete.html'): q = request.GET.get('q', '') context = {'q': q} queries ...
danithaca/berrypicking
django/autocomplete/demo/views.py
Python
gpl-2.0
569
"""Utilities for running individual tests""" import itertools import os import re import time from cram._diff import esc, glob, regex, unified_diff from cram._process import PIPE, STDOUT, execute __all__ = ['test', 'testfile'] _needescape = re.compile(br'[\x00-\x09\x0b-\x1f\x7f-\xff]').search _escapesub = re.compil...
brodie/cram
cram/_test.py
Python
gpl-2.0
7,518
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2006-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; e...
lehmannro/translate
storage/poxliff.py
Python
gpl-2.0
14,996
from Bio import SeqIO from Bio.Alphabet import IUPAC, ProteinAlphabet from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from optparse import OptionParser def translate_to_six_frame(dnaRecord, translationTable): ''' translate a Bio.SeqRecord of a DNA sequence via the given translation table in...
aerval/de.rki.proteomic_virus_detection
plugin_source/SixFrameTranslation.py
Python
gpl-2.0
2,361
# __author__ = 'Michael Pfister' __version__ = '1.4.0'
pfitzer/youtube2mp3
youtube2mp3/__init__.py
Python
gpl-2.0
55
import os, logging import re from ConfigParser import NoSectionError, NoOptionError from gitosis import group from gitosis.my_fnmatch import fnmatch def haveAccess(config, user, mode, path): """ Map request for write access to allowed path. Note for read-only access, the caller should check for write ...
since2014/gitosis
gitosis/access.py
Python
gpl-2.0
5,018
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_shape.py 26794 2014-01-08 16:02:22Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: WAsP driver testing. # Author: Vincent Mora <vincent dot mora at oslandia dot com> # ####...
nextgis-extra/tests
lib_gdal/ogr/ogr_wasp.py
Python
gpl-2.0
17,685
# # SPDX-License-Identifier: MIT # import os import json import shutil from oeqa.core.utils.test import getCaseFile, getCaseMethod def get_package_manager(d, root_path): """ Returns an OE package manager that can install packages in root_path. """ from oe.package_manager import RpmPM, OpkgPM, DpkgPM ...
schleichdi2/OPENNFR-6.3-CORE
opennfr-openembedded-core/meta/lib/oeqa/utils/package_manager.py
Python
gpl-2.0
6,234
""" /********************************************************** Organization :AsymptopiaSoftware | Software@theLimit Website :www.asymptopia.org Support :www.asymptopia.org/forum Author :Charles B. Cosse Email :ccosse@asymptopia.org Copyright :(C...
asymptopia/stepintochinese
StepIntoChinese/button.py
Python
gpl-2.0
789
hiddenimports = ['ISO', 'ARPA', 'ODMG', 'Locale', 'Feasts', 'Parser', 'NIST']
lebauce/artub
builder/Installer/hooks/hook-DateTime.py
Python
gpl-2.0
79
#!/usr/bin/env python from socketIO_client import SocketIO, BaseNamespace from gimpfu import * import os import time from threading import Thread from array import array import requests import configparser import websocket import _thread import http.client class GimpHubImage(object): def __init__(self, drawabl...
Jolopy/GimpHub
app/Gimp_Plugins_Bak/continious_test.py
Python
gpl-2.0
10,833
if hasattr(context, 'portal_type') and context.portal_type == 'FormSaveData2ContentEntry': index = None if context.getValue('brugia-malayi') != 'None' or ('B. malayi' in context.getValue('a-aegypti-infected-with-filariae')): if context.getValue('brugia-malayi') == '': index = None ...
uwosh/uwosh.filariasis
uwosh/filariasis/skins/uwosh.filariasis/indexByBMalayi.py
Python
gpl-2.0
393
from django.db import models class TastingCategory(models.Model): title = models.CharField(max_length=128) singularTitle = models.CharField(max_length=128) slug = models.SlugField(max_length=128) def __unicode__(self): return self.title class Tasting(models.Model): category = models.For...
aroquemaurel/Cuis-In
cuisin/tasting/models.py
Python
gpl-2.0
1,752
""" This component is modified from https://github.com/marinho/tornado Released under the Apache License http://www.apache.org/licenses/LICENSE-2.0.html """ import time import tornado.web, tornado.escape, tornado.ioloop import hashlib, json class SSEHandler(tornado.web.RequestHandler): _closing_timeout = False ...
Fuzzwah/mplayer-web-rfid-control
sse.py
Python
gpl-2.0
4,199
# -*- coding: utf-8 -*- #= DESCRIZIONE ================================================================= # Qui l'idea è che l'oggetto sia una numero di canovacci a costituire l'item # l'oggetto vede diminuire il suo peso man mano che si prelvano canovacci # quando il peso scende sotto una certa soglia l'oggetto è rim...
Onirik79/aaritmud
data/proto_items/carrozzone-zingaro/carrozzone-zingaro_item_cumulo-stracci.py
Python
gpl-2.0
2,398
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2015 Douglas Blank <doug.blank@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, o...
ennoborg/gramps
gramps/plugins/db/dbapi/dbapi.gpr.py
Python
gpl-2.0
1,381
# # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify ...
smarr/Truffle
vm/mx.vm/mx_vm.py
Python
gpl-2.0
19,478
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
NeilBryant/check_mk
modules/discovery.py
Python
gpl-2.0
52,283
# # Copyright (c) 2010 Matteo Boscolo, Gertwin Groen # # This file is part of PythonCAD. # # PythonCAD is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any...
Csega/PythonCAD3
Interface/cadscene.py
Python
gpl-2.0
15,874
import urllib.request import json origin = input("Origin\n") destination = input("Destination\n") urllib.request.urlretrieve("https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins="+origin+"&destinations="+destination,"abc.json") data=json.load(open("abc.json")) distance=data["rows"][0]["elem...
aaruni96/misc
distance.py
Python
gpl-2.0
379
from taas.reservation.models import Payment def delete_payment_before_last_reservation_delete(sender, instance=None, **kwargs): payment = instance.payment if payment is None: return elif payment.reservation_set.count() == 1 and payment.type == Payment.STAGED: instance.payment.delete()
crypotex/taas
taas/reservation/handlers.py
Python
gpl-2.0
320
''' Definitions of the configuration for correctness testing. ''' import brian2 import os import shutil import sys import brian2genn from brian2.tests.features import (Configuration, DefaultConfiguration, run_feature_tests, run_single_feature_test) __all__ = ['GeNNConfiguration', ...
brian-team/brian2genn
brian2genn/correctness_testing.py
Python
gpl-2.0
1,039
import pygame import intro import game class Intro2(intro.Intro): def load_image(self): self.fondo = pygame.image.load('ima/intro2.png').convert() def go_to_next(self): new_scene = game.Game(self.world) self.world.change_scene(new_scene)
hectorsanchez/acheckersgame
intro2.py
Python
gpl-2.0
274
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2020 Gabriel Ferreira # Copyright (C) 2020 Laurent Monin # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Founda...
musicbrainz/picard
picard/util/progresscheckpoints.py
Python
gpl-2.0
1,663
import unittest from plaintypes import Cell from differ import Differ from engines import Engine def compare(e,c): return e == c class TestDiffer(unittest.TestCase): def test_two_rows_with_difference(self): '''See fitbook Figure 5.3''' computed = [['anna', 'lotr'], ['luke'...
epronk/pyfit2
test_differ.py
Python
gpl-2.0
1,624
#!/usr/bin/env python # encoding: utf-8 # vim:ft=python.django: from django.db import models from django.core.exceptions import ValidationError class Operadora(models.Model): """ Operadores telefónicos. De momento guardamos únicamente el nombre """ nombre = models.CharField(max_length=10) ...
aaloy/curs_estiu_2015_uib
centralita/src/inventario/models.py
Python
gpl-2.0
2,843
# This file is part of pySMPP # Copyright (C) 2003 Damjan Georgievski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. ...
chronomex/pysmpp
pySMPP/pdu.py
Python
gpl-2.0
4,092
"""Add user table Revision ID: 42ad047fd7ff Revises: 5cd786f3176 Create Date: 2014-10-03 12:14:11.091123 """ # revision identifiers, used by Alembic. revision = '42ad047fd7ff' down_revision = '5cd786f3176' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - p...
msimacek/koschei
alembic/versions/42ad047fd7ff_add_user_table.py
Python
gpl-2.0
903
import pygame from pygame.locals import * import random import itertools import state import block import tetros import states from text import Text from colors import Colors from engine import Engine from playfield import Playfield from countdown import Countdown class GameState(state.State): tetro_classes = ...
viswimmer1/PythonGenerator
data/python_files/31890725/gamestate.py
Python
gpl-2.0
5,483
from selenium import webdriver from selenium.webdriver.support.ui import Select driver = webdriver.Chrome('/home/leo/Downloads/chromedriver') driver.get("http://your-url") assert "Post Title" in driver.title link=driver.find_element_by_link_text("Add new") NewWindow=link.click() assert "Save" in driver.page_source #A...
Leo-g/Selenium
python-selenium.py
Python
gpl-2.0
1,713
# -*- coding: utf-8 -*- # # __init__.py - commander # # Copyright (C) 2010 - Jesse van den Kieboom # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (...
sphax3d/gedit-plugins
plugins/commander/commander/commands/__init__.py
Python
gpl-2.0
12,767
from __future__ import print_function from legacypipe.survey import LegacySurveyData class DecamSurvey(LegacySurveyData): def filter_ccd_kd_files(self, fns): return [fn for fn in fns if 'decam' in fn] def filter_ccds_files(self, fns): return [fn for fn in fns if 'decam' in fn] def filter_a...
legacysurvey/pipeline
py/legacypipe/runs.py
Python
gpl-2.0
2,529
# -*- coding:utf-8 -*- from attribute import attribute from ci_type import citype from ci_type_relation import cityperelation from ci_relation import cirelation from ci import ci from history import history from account import account from special import special from dns_record import dnsrecord
kdyq007/cmdb-api
core/__init__.py
Python
gpl-2.0
299
import unittest import maya.cmds as mc import vrayformayaUtils as vfm class TestMeshAttributes(unittest.TestCase): """ This is a generic TestCase for most v-ray mesh attributes. Note that it doesn't test every single case of changes, but it should capture overall changes of the code. """ d...
BigRoy/vrayformayaUtils
tests/attributes_tests.py
Python
gpl-2.0
5,376
#! /usr/bin/python import serial import os import sys import time import re import glob #Output stdout to log file #sys.stdout = open("log.txt", "a") #Port Definitions port = "/dev/ttyACM0" baud = 115200 #counts zCount = 0 #Regular Expression Compilation xRE = re.compile(" X(-?[0-9]+[.]?[0-9]*)") yRE = re.compile(...
bgrig/Rice-Bioe-421-521-Final-Project
master.py
Python
gpl-2.0
7,297
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003-2004 The GemRB Project # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your opt...
ObsidianBlk/GemRB--Unofficial-
gemrb/GUIScripts/DualClass.py
Python
gpl-2.0
19,206
import matplotlib.pyplot as plt from datetime import datetime, timedelta import random # assuming your timing data in a csv file you could import csv and read the data def GetData(samplelen=20): """ As I don't wish to spend the time generating a csv file I will dummy!""" data = {'t':[], 's1':[], 's2':[], 's3':...
trafferty/utils
python/plot_timing.py
Python
gpl-2.0
1,690
import eConsoleImpl import eBaseImpl import enigma enigma.eTimer = eBaseImpl.eTimer enigma.eSocketNotifier = eBaseImpl.eSocketNotifier enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer from Tools.Profile import profile, profile_final profile("PYTHON_START") from enigma import runMainloop, eDVBDB, eTime...
kingvuplus/nn-gui
mytest.py
Python
gpl-2.0
17,117
# Based on http://stackoverflow.com/a/2022629 class Event(list): def __call__(self, *args, **kwargs): for f in self[:]: if "once" in dir(f) and f in self: self.remove(f) f(*args, **kwargs) def __repr__(self): return "Event(%s)" % list.__repr__(self) def once(self, func, name=None): func.once = ...
rarbg/ZeroNet
src/util/Event.py
Python
gpl-2.0
1,306
# # setup.py # Josh Artuso # Setup file to install the jbot module # from distutils.core import setup setup(name='jBot', version='1.2', description='Educational robot simulator', author='Josh Artuso', url='https://github.com/frozenjava/RobotSimulator', packages=['jbot'], package_di...
frozenjava/RobotSimulator
setup.py
Python
gpl-2.0
394
import json from pathlib import Path import omf from omf import feeder class Test_treeToNxGraph: def test_newNetworkxAPI_returns_sameGraphAsOldNetworkXAPI(self): ''' Two unequal objects CAN have the same hash value. - networkx.Graph instances define __eq__ and __hash__, but that does not ...
dpinney/omf
omf/static/testFiles/test_feeder/test_feeder.py
Python
gpl-2.0
1,423
#!/usr/bin/env python # -*- coding: utf-8 -*- # # mdfjr - manage.py # # Created by PyCharm. # User: fajar # Date: 5/13/17 # Time: 3:50 PM # # import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") from django.core.management import execute_fro...
heyost/django-skeleton
manage.py
Python
gpl-2.0
376
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (c) 2016 Gramps Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
ennoborg/gramps
gramps/gen/proxy/cache.py
Python
gpl-2.0
6,358
# rhbugzilla.py - a Python interface to Red Hat Bugzilla using xmlrpclib. # # Copyright (C) 2008-2012 Red Hat Inc. # Author: Will Woods <wwoods@redhat.com> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software ...
abn/python-bugzilla
bugzilla/rhbugzilla.py
Python
gpl-2.0
14,369
# -*- coding: iso-8859-1 -*- # Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. ...
HomeRad/TorCleaner
wc/dns/opcode.py
Python
gpl-2.0
2,630
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
EdLogan18/logan-repository
plugin.video.exodus/resources/lib/sources/uflix_mv_tv.py
Python
gpl-2.0
5,626
# encoding: utf-8 from PyQt4.QtCore import * from PyQt4.QtGui import * class ExceptionDialog(QMessageBox): def __init__(self,parent,exc,t1=None,t2=None): QMessageBox.__init__(self,parent) if t1==None: t1=(exc.args[0] if len(exc.args)>0 else None) self.setText(u'<b>'+exc.__class__.__name__+...
sjl767/woo
gui/qt4/ExceptionDialog.py
Python
gpl-2.0
1,473
# -*- coding: utf-8 -*- """ -------------------------------------------------------------------------- cvglmnet.m: cross-validation for glmnet -------------------------------------------------------------------------- DESCRIPTION: Does k-fold cross-validation for glmnet, produces a plot, and returns a value ...
hanfang/glmnet_python
glmnet_python/cvglmnet.py
Python
gpl-2.0
14,450
import flask from flaskext.csrf import csrf from .basicauth import BasicAuth from .. import config app = flask.Flask(__name__) app.secret_key = config.secret_key csrf(app) basic_auth = BasicAuth(app) from . import views
robhost/UPDIAN
updian/frontend/__init__.py
Python
gpl-2.0
224
# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option...
rossengeorgiev/aprs-python
aprslib/__init__.py
Python
gpl-2.0
1,577
from __future__ import absolute_import import os import shutil from qgis.PyQt import uic from qgis.PyQt.QtGui import QIcon, QPixmap from qgis.PyQt.QtWidgets import QDialog, QMessageBox from os import path from . import extra_sources from .data_source_info import DataSourceInfo from .data_source_serializer import Data...
nextgis/quickmapservices
src/ds_edit_dialog.py
Python
gpl-2.0
10,803
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ...
pierg75/pier-sosreport
sos/plugins/distupgrade.py
Python
gpl-2.0
1,902
#!/usr/bin/python """ Step file creator/editor. :copyright: Red Hat Inc 2009 :author: mgoldish@redhat.com (Michael Goldish) """ import os import glob import shutil import sys import logging import pygtk import gtk from virttest import ppm_utils pygtk.require('2.0') # General utilities def corner_and_size_clippe...
lmr/avocado-vt
virttest/step_editor.py
Python
gpl-2.0
50,744
import time import pyupm_ttp223 as ttp223 import requests import json url = "http://requestb.in/1mj62581?inspect" headers = {'content-type': 'application/json'} touch1 = ttp223.TTP223(4) touch1Pressed = False touch2 = ttp223.TTP223(8) touch2Pressed = False def sendInfo(touch, tId, Pressed): if touch.isPressed()...
OpenParking/Open-Parkinig---Edison
source/touh.py
Python
gpl-2.0
1,004
# -*- coding: utf-8 -*- ######################################################################## # # # python-OBD: A python OBD-II serial module derived from pyobd # # # # C...
brendanwhitfield/python-OBD
obd/protocols/protocol_legacy.py
Python
gpl-2.0
7,623
import os import paramiko import numpy import pyfits import warnings import select class VLTConnection( object ): """ VLTConnection: This object allows python to log into a computer running the VLT SPARTA Light software and do the following: - Send a new flat pattern to the DM - Retrieve d...
soylentdeen/BlurryApple
Tools/VLTTools.py
Python
gpl-2.0
12,298
''' Created by Jeremy Mill, originally for use in the hi tech classrooms at the University of CT Licensed under the GPLv3 jeremymill@gmail.com github.com/livinginsyn ''' import os import shutil as util import _winreg as wreg import subprocess #first thing to find is the version of the OS try: os.environ["PROGRA...
LivingInSyn/RestartMe
v1_python_kivy/installer/installer.py
Python
gpl-2.0
2,173
# =========================================================================== # eXe # Copyright 2004-2005, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
luisgg/iteexe
exe/export/websiteexport.py
Python
gpl-2.0
8,267
# -*- coding: utf-8 -*- """ *************************************************************************** r_null.py --------------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ****************************...
nirvn/QGIS
python/plugins/processing/algs/grass7/ext/r_null.py
Python
gpl-2.0
2,191