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
# Script Version: 1.0 # Author: Te Chen # Project: AMA3D # Task Step: 1 import sys import urllib2 import time VERSION = '4.0.0' def prepare_cath(): ver = VERSION.replace('.', '_') download_file(ver, 'CathDomainList') download_file(ver, 'CathNames') download_file(ver, 'CathDomainDescriptionFile') def download_fil...
teheavy/AMA3D
Nh3D/1_AMA3D_start.py
Python
gpl-2.0
1,285
# -*- coding: utf-8 -*- ''' oware para windows :@ alternativa 1 (idea 1, con 2 listas para cada jugador) open(nombre del archivo,modo) ''' import os import random # 0 1 2 3 4 5 6 --> j2 = [4,4,4,4,4,4,0] # Esta sera la lista del jugador dos, j1 = [4,4,4,4,4,4,0] # jugador 1 # 0 1 2 3 4 5 6 --> en el ...
fabianmg/Tareas-1-2014
JuegoOware.py
Python
gpl-2.0
12,611
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
ypid-bot/check_mk
web/htdocs/table.py
Python
gpl-2.0
15,132
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/textobject.py __version__=''' $Id$ ''' __doc__=""" PDFTextObject is an efficient way to add text to a Canvas. Do not instantiate directly, obtai...
BackupTheBerlios/pixies-svn
pixies/reportlab/pdfgen/textobject.py
Python
gpl-2.0
14,031
#!/usr/bin/python ''' Example of zmq client. Can be used to record test data on remote PC Nacho Mas January-2017 ''' import sys import zmq import time import json from config import * # Socket to talk to server context = zmq.Context() socket = context.socket(zmq.SUB) #socket.setsockopt(zmq.CONFLATE, 1) socket....
nachoplus/cronoStamper
zmqClient.py
Python
gpl-2.0
568
import time from java.lang import Thread, Runnable from java.awt import Canvas, Dimension from java.awt.event import KeyListener, KeyEvent, ComponentListener from java.awt.image import MemoryImageSource from synchronize import make_synchronized import jgl.GL import jgl.GLU import jgl.GLUT from Game import Game import ...
borsboom/babal
src/JGLBabalCanvas.py
Python
gpl-2.0
3,751
''' Created on May 8, 2015 @author: markos ''' import json import logging import requests from net.hydromon.config import ConfigurationUtil import os from requests.exceptions import ConnectionError, RequestException import sys import traceback from time import strftime import datetime log = logging.getLogger(__name_...
markosa/hydromon-client
net/hydromon/client/serverclient.py
Python
gpl-2.0
2,086
from __future__ import unicode_literals import copy import os from django import forms from django.test import TestCase from django.test.client import RequestFactory from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.co...
ShassAro/ShassAro
Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/wizardtests/tests.py
Python
gpl-2.0
18,372
# -*- coding: utf-8 -*- """ RED Plugin Copyright (C) 2014 Matthias Bolte <matthias@tinkerforge.com> Copyright (C) 2014 Olaf Lüke <olaf@tinkerforge.com> program_wizard_new.py: New Program Wizard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as...
D4wN/brickv
src/brickv/plugin_system/plugins/red/program_wizard_new.py
Python
gpl-2.0
7,091
import unittest from ziphmm import _mann from _internal import create_hmm from _internal import create_seq class TestMann(unittest.TestCase): def test0(self): self.__test('test0', 'test0', -12.4766) def test1(self): self.__test('test1', 'test1', -12.5671) def test2(self): self....
jade-cheng/Jocx
tests/ziphmm/test_mann.py
Python
gpl-2.0
1,967
import logging from django.db import connection from django.contrib.auth.models import User from tenant_schemas.utils import get_tenant_model from tenant_schemas.test.cases import TenantTestCase import pytest logger = logging.getLogger('tests.util') def make_tenant(schema='test', domain='tenant.test.com', userna...
Applied-GeoSolutions/geokit
geokit/tests/util.py
Python
gpl-2.0
1,699
__author__ = 'erobinson'
erobinson/cloop
device/processes/test/__init__.py
Python
gpl-2.0
25
# encoding: utf-8 # module samba.dcerpc.dnsserver # from /usr/lib/python2.7/dist-packages/samba/dcerpc/dnsserver.so # by generator 1.135 """ dnsserver DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class DNS_RPC_ZONE_INFO_W2K(__talloc.Object): # no doc def __init__(self, *args, **k...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/dnsserver/DNS_RPC_ZONE_INFO_W2K.py
Python
gpl-2.0
3,177
from fabric.api import * from fabric.utils import * from fabric.contrib import * class Apt(object): def __init__(self): return def update(self): cmd = 'sudo apt update' run(cmd) print(cmd) def purge(self, package): cmd = 'sudo apt purge -y %(package)s' % {'packag...
stregatto/fabric_lib
apt.py
Python
gpl-2.0
651
# Solution is available in the other "sandbox_solution.py" tab import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from quiz import get_weights, get_biases, linear def mnist_features_labels(n_labels): """ Gets the first <n> labels from the MNIST dataset :param n_labels: Numb...
jabeerahmed/testrepo
term1/Lessons/TensorFlow/Digits/sandbox.py
Python
gpl-2.0
2,343
import os import time maze = [[1,1,1,1,1,1,1,1,1,1,1], [1,0,0,0,0,0,1,0,0,0,1], [1,0,1,0,1,1,1,0,1,0,1], [1,0,1,0,1,0,0,0,1,0,1], [1,0,1,0,1,1,1,0,1,1,1], [1,0,1,0,0,0,0,0,0,0,1], [1,0,1,0,1,1,1,0,1,0,1], [1,0,1,0,1,0,0,0,1,0,1], [1,1,1,0,1,0,1,1,1,0,1], ...
4thegr8just1ce/maze_py
main.py
Python
gpl-2.0
2,067
#Chuong trinh Quan ly hoc sinh. Xay dung ham tim kiem, them moi #haind #python import json import os #tao menu lua chon def menu(): print ''' Chao mung ban den voi chuong trinh Quan ly hoc sinh! Su dung: 1. Them moi hoc sinh 2. Tim kiem hoc sinh 3. Thoat chuong trinh (quit) ''' return input("Moi ban lu...
pythonvietnam/pbc082015
NguyenCongDuc/QuanLySV-JSON.py
Python
gpl-2.0
2,031
# # jython examples for jas. # $Id$ # import sys; from jas import Ring, Ideal from jas import startLog, terminate # sicora, e-gb example r = Ring( "Z(t) L" ); print "Ring: " + str(r); print; ps = """ ( ( 2 t + 1 ), ( t**2 + 1 ) ) """; f = r.ideal( ps ); print "Ideal: " + str(f); print; #startLog(); g = f.eGB...
breandan/java-algebra-system
examples/sicora.py
Python
gpl-2.0
382
# # Copyright (C) 2006-2019 Nexedi SA # # 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...
Nexedi/neoppod
neo/storage/database/manager.py
Python
gpl-2.0
35,801
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Stephane Charette # # 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 optio...
Forage/Gramps
gramps/gen/filters/rules/event/_hasreferencecountof.py
Python
gpl-2.0
1,730
# /org/bluez/hci0/dev_18_7A_93_02_C5_A9 #address 18:7A:93:02:C5:A9 # Device 18:7A:93:02:C5:A9 UUIDs: # 00001800-0000-1000-8000-00805f9b34fb # 00001802-0000-1000-8000-00805f9b34fb # 00001803-0000-1000-8000-00805f9b34fb # 00001804-0000-1000-8000-00805f9b34fb # 0000180a-0...
madongo/Intel-i-gent-Pet-Feeder
scan.py
Python
gpl-2.0
1,801
from __future__ import print_function from __future__ import absolute_import from Components.Converter.Converter import Converter from Components.Element import cached from Components.config import configfile class ConfigEntryTest(Converter, object): def __init__(self, argstr): Converter.__init__(self, argstr) a...
atvcaptain/enigma2
lib/python/Components/Converter/ConfigEntryTest.py
Python
gpl-2.0
1,749
import os import re import json import pprint EMPTY = '4b825dc642cb6eb9a060e54bf8d69288fbee4904' repo = str(input('Enter clone url to git repo: ')) repo_folder = repo.split('/')[-1].split('.git')[0] os.system('git clone ' + repo) os.system('cd ' + repo_folder) log = os.popen('git --git-dir ./' + repo_folder + '/....
vivekmumbles/git-ledger
data.py
Python
gpl-2.0
3,254
import os import sys from distutils.sysconfig import get_python_lib import shutil def _get_installation_dir(): """Returns installation location. Works also with easy_install.""" try: import rdb except ImportError: # Workaround for Windows installer problem with Python 2.6.1 # http:/...
deonwu/robotframework-debuger
rdb_postinstall.py
Python
gpl-2.0
1,398
zone_file = '/etc/bind/zones/db.circulospodemos.info'
Podemos-TICS/Creaci-n-Wordpress
scripts/deploy/Constants.py
Python
gpl-2.0
54
"""Test the colorlog.colorlog module.""" import sys import pytest import colorlog def test_colored_formatter(create_and_test_logger): create_and_test_logger() def test_custom_colors(create_and_test_logger): """Disable all colors and check no escape codes are output.""" create_and_test_logger( ...
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/colorlog/tests/test_colorlog.py
Python
gpl-2.0
3,146
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2007-2009 Brian G. Matherly # Copyright (C) 2009 Gary Burton # Copyright (C) 2010 Peter Landgren # Copyright (C) 2011 Adam Stein <adam@csh.rit.edu> # # This program is free software; you...
beernarrd/gramps
gramps/plugins/docgen/rtfdoc.py
Python
gpl-2.0
21,776
import os from rednotebook.util.filesystem import get_journal_title def test_journal_title(): root = os.path.abspath(os.sep) dirs = [ ("/home/my journal", "my journal"), ("/my journal/", "my journal"), ("/home/name/Journal", "Journal"), ("/home/name/jörnal", "jörnal"), ...
jendrikseipp/rednotebook
tests/test_filesystem.py
Python
gpl-2.0
420
# -*- coding: utf-8 -*- # # Copyright © 2009- The Spyder Development Team # Copyright © 2014-2015 Colin Duquesnoy # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) """ **QtPy** is a shim over the various Python Qt bindings. It is used to write Qt binding indenpendent libraries or applicat...
antoniodemora/git-cola
qtpy/__init__.py
Python
gpl-2.0
5,141
from __future__ import absolute_import from Components.Converter.Converter import Converter from Components.Converter.Poll import Poll from time import time from Components.Element import cached, ElementError from Components.config import config from enigma import eEPGCache class EventTime(Poll, Converter, object): S...
atvcaptain/enigma2
lib/python/Components/Converter/EventTime.py
Python
gpl-2.0
7,587
# # Copyright 2015-2017 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 in t...
EdDev/vdsm
lib/vdsm/network/netinfo/nics.py
Python
gpl-2.0
2,807
#!/usr/bin/env python import sys import re #Escape code for a color escape='\[\033[{}m\]' normal=escape.format(0) #Special effects effects = { 'normal': '0', 'bold': '1', 'underline': '4' } #8-color mode colors colors8 = { 'black': '30', 'red': '31', 'green': '32', 'yellow': '33', 'blue'...
ptrgags/linux-login
prompt/prompt.py
Python
gpl-2.0
2,429
#!/usr/bin/python from mod_python import apache from mod_python import util import simplejson import os #path relative to app ( e.g. /var/www/licensetest/ <jsonfile> ) jsonfile = 'denyall/testdata.json' #get cwd abspath = os.path.dirname(os.path.realpath(__file__)) #cd .. (second os.path.dirname) and add rel. dir fil...
timomiao/timomiao.github.io
licensetestv1.0/py/servequestion.py
Python
gpl-2.0
1,083
#!/usr/bin/env python ### # Simple python API server for honeypot stats # # Copyright (c) 2012 by ManiacTwister # ### # GNU General Public Licence (GPL) # # 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 # Fo...
ManiacTwister/dionaea
server.py
Python
gpl-2.0
2,347
from spectre.syntax import * class SMU2P(Netlist): __name__ = "SMU2P" __type__ = "netlist" def __init__(self, name='SMU2P', nodes=('1', '2'), V1=0, V2=0): Netlist.__init__(self) self.name = name self.nodes = nodes self.V1 = V1; self.V2 = V2 save = dict(V1=nodes[0], V...
raphaelvalentin/Utils
spectre/syntax/smu.py
Python
gpl-2.0
4,809
import gzip import os import numpy as np import cPickle as pickle import six from six.moves.urllib import request import scipy from scipy import io # from sklearn import decomposition ''' BVH ''' def load_bvh_data(file_path): frames = 0 frame_time = 0.0 with open(file_path, "rb") as f: lines...
ruohoruotsi/Wavelet-Tree-Synth
nnet/keeper_LSTMVRAE-JayHack-RyotaKatoh-chainer/dataset.py
Python
gpl-2.0
7,469
import urllib.request import json from modules import userDatabase def get_what_pulse_url(param: str): return "http://api.whatpulse.org/user.php?user=" + str(param) + "&formatted=yes&format=json" # noinspection PyUnusedLocal def on_channel_pm(irc, user_mask, user, channel, message): command = message.split(...
pbombnz/IRCBot
modules/whatPulse.py
Python
gpl-2.0
4,737
#!/usr/bin/env python import sys class Particle: def __init__( self, particle ): self.speciesName = particle[0] self.id = particle[1] def __eq__( self, other ): return self.speciesName == other.speciesName and self.id == other.id def __str__( self ): return "( '%s', %d ...
gfrd/gfrd
samples/mapk/rebind_ratio.py
Python
gpl-2.0
6,986
from datetime import datetime, timedelta from random import choice from kivy.animation import Animation from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.lang import Builder from kivy.metrics import dp, sp from kivy.properties import NumericProperty from kivy.uix.gridl...
RedXBeard/kivy-1010
main.py
Python
gpl-2.0
24,667
import pytest import yaml from dapp import update_ctxt, protocol_version, DAPPCommunicator, DAPPException, \ DAPPBadMsgType, DAPPBadProtocolVersion class TestUpdateCtxt(object): @pytest.mark.parametrize('old, new', [ ({'a': 'a', 'b': 'b'}, {}), ({'a': 'a'}, {'b': 'b'}), ({}, {'a': 'a',...
devassistant/dapp
test/test_general.py
Python
gpl-2.0
3,168
#!/usr/bin/python #coding:utf-8 import logging logger = logging.getLogger("simple_example") logger.setLevel(logging.DEBUG) # create file handler whistreamhandler logs even debug messages filehandler = logging.FileHandler("spam.log") filehandler.setLevel(logging.DEBUG) # create console handler with a higher log level s...
gensmusic/test
l/python/test/logging/multiple-loger-and-formatter.py
Python
gpl-2.0
870
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygtk pygtk.require('2.0') import gtk import json from collections import namedtuple from array import * import pango import random from gettext import gettext as _ import copy ''' Scales ''' IMAGES_SCALE = [100, 100] LETTERS_SCALE = [100, 100] '''Color Selec...
ggimenez/HomeworkDesigner.activity
template.activity/simpleassociation.py
Python
gpl-2.0
17,950
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import subprocess import time import re import shlex from display_array import * from optparse import OptionParser fileSize=int(4) loop=int(32) process=int(8) EXPORT_SID_NB=int(8) STORCLI_SID_NB=int(8) nbGruyere=int(256) stopOnFailure=True fuseTrace...
rozofs/rozofs
tests/IT/IT.py
Python
gpl-2.0
44,593
#!/usr/bin/env python from api.camara.orgaos import * from api.camara.deputados import * from core.models import * import django django.setup() ## Orgaos Webservice orgaos = OrgaosCamara() orgaos.importar_tipos_orgaos() orgaos.importar_orgaos() orgaos.importar_cargos() ## Deputados Webservice deputados = DeputadosC...
beraldoleal/entendaobrasil
scripts/import.py
Python
gpl-2.0
642
# -*- coding: utf-8 -*- """ Bubbles Addon Copyright (C) 2016 Viper2k4 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...
azumimuo/family-xbmc-addon
plugin.video.bubbles/resources/lib/sources/german/hoster/open/kinow.py
Python
gpl-2.0
7,022
## PyZUI 0.1 - Python Zooming User Interface ## Copyright (C) 2009 David Roberts <d@vidr.cc> ## ## 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 you...
davidar/pyzui
pyzui/ferntileprovider.py
Python
gpl-2.0
4,684
# 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 in the hope that it will be useful, # bu...
lujinda/iotop
iotop/ui.py
Python
gpl-2.0
24,215
# encoding: utf-8 # module samba.dcerpc.netlogon # from /usr/lib/python2.7/dist-packages/samba/dcerpc/netlogon.so # by generator 1.135 """ netlogon DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class netr_ChangeLogEntry(__talloc.Object): # no doc def __init__(self, *args, **kwargs...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/netlogon/netr_ChangeLogEntry.py
Python
gpl-2.0
1,801
# -*- coding: utf-8 -*- from django.db import models from django.core.urlresolvers import reverse class Stadium(models.Model): name = models.CharField(max_length=200, unique=True) def __unicode__(self): return self.name class Judge(models.Model): name = models.CharField(max_length=200, unique=...
LuanP/futebolistica
futebolistica/games/models.py
Python
gpl-2.0
1,773
# -*- coding: utf-8 -*- # # Some functions about dates # # This file is part of Invenio. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. # # Invenio 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 ...
kasioumis/invenio
invenio/utils/date.py
Python
gpl-2.0
22,706
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio 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...
dset0x/invenio
invenio/modules/previewer/utils.py
Python
gpl-2.0
2,899
#!/usr/bin/env python from distutils.core import setup, run_setup, Command import zmq.auth import shutil import os OSAD2_PATH = os.path.dirname(os.path.realpath(__file__)) OSAD2_SERVER_CERTS_DIR = "/etc/rhn/osad2-server/certs/" OSAD2_SERVER_PUB_KEY = os.path.join(OSAD2_SERVER_CERTS_DIR, "public_keys/server.key") OSA...
SUSE/spacewalk-osad2
setup.py
Python
gpl-2.0
4,111
from thrift.protocol import TBinaryProtocol from thrift.transport import TTransport import pickle import bz2 def SerializeThriftMsg(msg, protocol_type=TBinaryProtocol.TBinaryProtocol): """Serialize a thrift message using the given protocol. The default protocol is binary. Args: msg: the...
wayetender/whip
whip/src/adapter/util/serialization.py
Python
gpl-2.0
1,453
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # view.py # # Copyright 2011 Bidossessi Sodonon <bidossessi.sodonon@yahoo.fr> # # 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...
bidossessi/brss
brss/view.py
Python
gpl-2.0
7,267
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/ajax/boxinfo.py
Python
gpl-2.0
18,406
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
stuart-knock/tvb-framework
tvb/core/code_versions/code_update_scripts/4750_update_code.py
Python
gpl-2.0
2,378
# Copyright (C) 2008, 2009 Jochen Voss <voss@seehuhn.de> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions ...
seehuhn/wisent
template.py
Python
gpl-2.0
10,909
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS (Oracle) Date : Aug 27, 2014 copyright : (C) 2014 by Médéric RIBREUX email : meder...
SebDieBln/QGIS
python/plugins/db_manager/db_plugins/oracle/plugin.py
Python
gpl-2.0
22,853
# 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 in the hope that it will be useful, # but...
pierg75/pier-sosreport
sos/plugins/nss.py
Python
gpl-2.0
1,276
#!/usr/bin/env python #coding: utf8 import MySQLdb as mdb import MySQLdb.cursors SRC_HOST = '127.0.0.1' SRC_USER = 'root' SRC_PASS = '' DATABASE_NAME = '' DST_HOST = '127.0.0.1' DST_USER = 'root' DST_PASS = '' src_conn = mdb.connect(SRC_HOST, SRC_USER, SRC_PASS, DATABASE_NAME, charset='utf8', cursorc...
banwagong-news/ssbc
workers/clean_rubbish_res.py
Python
gpl-2.0
1,384
#!/usr/bin/env python # # vim: sw=2 ts=2 sts=2 # # Copyright 2007 The Python-Twitter Developers # # 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-...
hemalchevli/TwitterBot
twitter.py
Python
gpl-2.0
155,437
# Copyright (C) 2013 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 in ...
zultron/virt-manager
tests/capabilities.py
Python
gpl-2.0
11,259
from scipy import * import random import scipy.linalg as la import cPickle import pylab class Sample: def __init__ (self,pars, like, glikes): self.pars=pars self.like=like self.glikes=glikes class Gaussian: def __init__(self,mean,cov, fastpars=None): self.cov=cov ...
slosar/GMSampler
game.py
Python
gpl-2.0
11,404
import itertools from google.appengine.ext import db from google.appengine.ext.db import StringProperty import logging import urllib import models import time def expired(startTime, period): return time.time() - startTime > period def isMac(request): return request.META['HTTP_USER_AGENT'].find('Mac') !=...
adamfisk/littleshoot-client
server/appengine/littleshoot/util.py
Python
gpl-2.0
3,265
# ********************************************************************** <==== from artmgr.transport.basew import BaseWTransport # ********************************************************************** ====> import os import sys import errno import stat import re # chunksize for reading/writing local files CHUNK = ...
paulovn/artifact-manager
lib/artmgr/transport/local.py
Python
gpl-2.0
4,422
# Configure SP Shasta CTC machine support # # Exensively uses the jmri.jmrit.ussctc package capabilities # # Author: Bob Jacobsen, copyright 2016-17 # import jmri from jmri.jmrit.ussctc import * import jarray import java.util def arrayList(contents) : retval = java.util.ArrayList() for item in contents : ...
bobjacobsen/SPShasta
userfiles/ConfigureCtcControlLogic.py
Python
gpl-2.0
21,226
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio 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 ve...
pombredanne/invenio
modules/miscutil/lib/dateutils_tests.py
Python
gpl-2.0
8,759
def range_list( parser, *args ): if len( args ) < 2: raise Exception( 'Insufficient arguments.' ) if len( args ) == 3: sep = args[2] else: sep = ' ' items = list( str( i ) for i in range( int( args[0] ), int( args[1] ) + 1 ) ) return sep.join( items )
bogobog/hierarchy_config_parser
bin/config_variable_processor/range_list.py
Python
gpl-2.0
299
#!/usr/bin/env python # -*-coding:utf8-*- from __future__ import division import re import six from six.moves import reprlib re_unicode = re.compile(r'\\u[0-9a-f]{4}') def fixunicode(str, encoding=''): if six.PY2: newstr = str.decode('unicode_escape') if encoding: return newstr.decode...
WorldException/v7py
v7/utils.py
Python
gpl-2.0
3,168
## ## This copyrighted software is distributed under the GPL v2.0 license. ## See the LICENSE file for more details. ## ## Yeast workspace configuration file import numpy as np import WorkspaceModules.YeastApplicatorPlate import WorkspaceModules.YeastArena import WorkspaceModules.YeastArena3x3 YeastWorkspace = { 'b...
FlySorterLLC/SantaFeControlSoftware
Examples/ExampleYeastWorkspace.py
Python
gpl-2.0
585
# Copyright (C) 2008 One Laptop Per Child # Copyright (C) 2010 Sugar Labs # # 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 versi...
nemesiscodex/JukyOS-sugar
src/jarabe/desktop/favoriteslayout.py
Python
gpl-2.0
21,062
# test_help.py - Ensure scripts can run --help. # # Copyright (C) 2010, Stefano Rivera <stefanor@ubuntu.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all c...
Debian/devscripts
scripts/devscripts/test/test_help.py
Python
gpl-2.0
2,924
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'slidersd.ui' # # Created: Tue Mar 17 23:31:52 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
MSHallOpenSoft/plotter
Thesidetab/sliderder.py
Python
gpl-2.0
2,815
from guytracker.models import Lilguy, Chapter from django.contrib import admin admin.site.register(Lilguy) admin.site.register(Chapter)
cmcneil/lilguys
guytracker/admin.py
Python
gpl-2.0
137
# coding: utf-8 from django.conf.urls import patterns, url urlpatterns = patterns( 'sigi.apps.eventos.views', # Painel de ocorrencias url(r'^calendario/$', 'calendario', name='eventos-calendario'), url(r'^alocacaoequipe/$', 'alocacao_equipe', name='eventos-alocacaoequipe'), # Carrinho url(r'^e...
interlegis/sigi
sigi/apps/eventos/urls.py
Python
gpl-2.0
830
# -*- coding: utf-8 -*- # Copyright (C) 2012-2015 Stéphane Graber # Author: Stéphane Graber <stgraber@ubuntu.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 Licens...
dmitry-sinina/samba4-manager
plugins/tree.py
Python
gpl-2.0
3,478
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer WMS GetLegendGraphic. From build dir, run: ctest -R PyQgsServerWMSGetLegendGraphic -V .. note:: 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 Foundati...
blazek/QGIS
tests/src/python/test_qgsserver_wms_getlegendgraphic.py
Python
gpl-2.0
32,351
# gcompris - guessnumber # # Copyright (C) 2005, 2008 Bruno Coudoin / Clement Coudoin # # 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 op...
afenkart/gcompris-devel
src/guessnumber-activity/guessnumber.py
Python
gpl-2.0
10,736
import numpy as np from . import logger from duckietown_utils.expand_variables import expand_environment import os __all__ = [ 'd8n_read_images_interval', 'd8n_read_all_images', 'd8n_get_all_images_topic', ] def d8n_read_images_interval(filename, t0, t1): """ Reads all the RGB data from the ba...
hyunoklee/turtlebot3_RBIZ
line_detect/include/duckietown_utils/bag_logs.py
Python
gpl-2.0
6,453
from edc_base.model.models import BaseListModel class InfantVaccines (BaseListModel): class Meta: app_label = 'mb_list' verbose_name = "Infant Vaccines" verbose_name_plural = "Infant Vaccines"
botswana-harvard/microbiome
microbiome/apps/mb_list/models/infant_vaccines.py
Python
gpl-2.0
224
# # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2019, 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 it # u...
graalvm/mx
mx_javacompliance.py
Python
gpl-2.0
12,586
# -*- coding: utf-8 -*- """ /*************************************************************************** FiltersMarsisViewerDialog A QGIS plugin MARSIS radargram viewer ------------------- begin : 2015-08-14 git sha ...
eSpaceEPFL/marsissharadviewer
filters_marsis_viewer_dialog.py
Python
gpl-2.0
3,357
#!/usr/bin/python3 # -*- coding: utf-8 -*-import stations import datetime import random import stations import os now = datetime.date.today() curMonth = datetime.date(now.year, now.month, 1) nextMonth = datetime.date(now.year+curMonth.month//12, (now.month%12)+1, 1) for city, info in stations.city.items(): if inf...
endlisnis/weather-records
updateAccuWeather.py
Python
gpl-3.0
1,064
#!/usr/bin/python #------------------------------------------------------------------------------ # # This file is a part of autils. # # Copyright 2011-2016 Andrew Lamoureux # # autils is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
lwerdna/alib
py/logic/BoolExpr.py
Python
gpl-3.0
16,510
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Моделирование процесса распространения гриппа на основе системы ДУ Идентификация параметров модели на основе данных измерений градиентным методом локального поиска -*- Flu Model -*- S - Susceptible (восприимчивые к болезни) E - Exposed (латентные - первые зар...
vnleonenko/Influenza
core/models/seir.py
Python
gpl-3.0
14,250
#!/usr/bin/python # contains configuration, parameters can be accessed as attributes class Config: # init from argparse.ArgumentParser def __init__(self, parser): self.args = vars(parser.parse_args()) def __getattr__(self, name): return self.args[name]
artem-smotrakov/httpooh
config.py
Python
gpl-3.0
285
n = int(input()) p = int(input()) with open('data.txt') as input_file: content = str(input_file.read()) content = list(content.split(' ')) content = list(map(int, content)) content_of_out_file_1 = list(filter(lambda x: (x % n) == 0, content)) content_of_out_file_1 = list(map(str, content_of_out_file_1)) content_of...
PavlovVitaly/python__homework_ITMO
task_04_01.py
Python
gpl-3.0
722
from common import common_global from sanic import Blueprint blueprint_user_hardware = Blueprint('name_blueprint_user_hardware', url_prefix='/user') @blueprint_user_hardware.route('/user_hardware', methods=['GET']) @common_global.jinja_template.template('bss_user/hardware/bss_user_hardware.html') @common_global.auth...
MediaKraken/MediaKraken_Deployment
source/web_app_sanic/blueprint/user/bp_user_hardware.py
Python
gpl-3.0
982
import src class PoisonBloom(src.items.Item): """ a poisonous plant """ type = "PoisonBloom" name = "poison bloom" description = "Its spore sacks shriveled and are covered in green slime" usageInfo = """ You can eat it to die. """ walkable = True dead = False bolted = False ...
MarxMustermann/OfMiceAndMechs
src/itemFolder/plants/poisonBloom.py
Python
gpl-3.0
1,539
# -*- coding: utf-8 -*- __version__ = '$Id: 11c92177ab93084552b8d68021da6545c4b7674f $' from pywikibot import family # The Wikimedia Incubator family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'incubator' self.langs = { ...
wpoa/wiki-imports
lib/python2.7/site-packages/pywikibot-2.0b1-py2.7.egg/pywikibot/families/incubator_family.py
Python
gpl-3.0
373
# Copyright (C) 2015-2022: The University of Edinburgh # Authors: Craig Warren and Antonis Giannopoulos # # This file is part of gprMax. # # gprMax is free software: you can redistribute it and/or modify # it under the terms of the GNU GenRAl Public License as published by # the Free Software Foundation...
gprMax/gprMax
gprMax/pml_updates/pml_updates_electric_HORIPML_gpu.py
Python
gpl-3.0
47,831
from pandas import compat import sys import itertools import functools import numpy as np from pandas.core.common import isnull, notnull, _values_from_object, is_float import pandas.core.common as com import pandas.lib as lib import pandas.algos as algos import pandas.hashtable as _hash import pandas.tslib as tslib ...
alephu5/Soundbyte
environment/lib/python3.3/site-packages/pandas/core/nanops.py
Python
gpl-3.0
18,949
# (void)walker command line interface # Copyright (C) 2012 David Holm <dholmster@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 3 of the License, or # (at your option...
dholm/voidwalker
voidwalker/framework/interface/__init__.py
Python
gpl-3.0
1,391
from daeso.string.smith_waterman import smith_waterman from daeso.string.needleman_wunsch import print_scores, print_alignment import unittest class TestSmithWatermanExample(unittest.TestCase): """ reproduces the example in Figure1 from the Waterman & Eggert paper """ def sim_score(self, e1, e2):...
emsrc/daeso-framework
test/string/test_smith_waterman.py
Python
gpl-3.0
2,031
# BEGIN_COPYRIGHT # # Copyright (C) 2009-2013 CRS4. # # This file is part of biodoop-core. # # biodoop-core 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 optio...
crs4/biodoop-core
test/all_tests.py
Python
gpl-3.0
1,125
# (C) British Crown Copyright 2010 - 2014, Met Office # # This file is part of Iris. # # Iris 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 l...
scollis/iris
docs/iris/src/sphinxext/generate_package_rst.py
Python
gpl-3.0
7,563
#!/usr/bin/python # -*- coding: UTF-8 -*- ''' xmlObject.py XXX Metodos publicos XXX Dependencias (dentro do projeto) ''' from lxml.etree import XML class aluno: xmlData = None alunoData = None def get(self, key): try: return self.alunoData[...
mscansian/SigmaWebPlus
plus/xmlparser.py
Python
gpl-3.0
4,326
# Copyright (C) 2019 Mark Clarkstone <mpmc@disroot.org> # # This file is part of hs602. # # hs602 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 late...
mpmc/HS602
hs602/controller.py
Python
gpl-3.0
26,909
from mock import patch from pytest import raises from kiwi.system.root_import import RootImport from kiwi.exceptions import KiwiRootImportError class TestRootImport: @patch('kiwi.system.root_import.RootImportOCI') def test_docker_import(self, mock_docker_import): RootImport('root_dir', 'file:///imag...
b1-systems/kiwi
test/unit/system/root_import/init_test.py
Python
gpl-3.0
998
import unittest import os from mock import MagicMock, patch from pyxva.cmd import xva class TestXVAUpdate(unittest.TestCase): OVA_XML = "data/ova.xml" @patch("pyxva.cmd.xva.extract_xva") def setUp(self, mock_extract): ova_xml_path = "%s/%s" % ( os.path.dirname(os.path.realpath(__fi...
rdobson/xva-tools
pyxva/cmd/tests/test_xva.py
Python
gpl-3.0
924