code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# # This file is part of the CCP1 Graphical User Interface (ccp1gui) # # (C) 2002-2007 CCLRC Daresbury Laboratory # # 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 ...
alexei-matveev/ccp1gui
interfaces/mndo.py
Python
gpl-2.0
43,261
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import sqlite3 from functools import partialmethod from asian_word_analyzer.login import connection_string from asian_word_analyzer.tools import detect_language class DbUtil: def __init__(self): if not os.path.isfile(connection_string): ra...
jbfiot/AsianWordAnalyzer
asian_word_analyzer/korean/db.py
Python
gpl-2.0
2,385
import pygame import tiles_basic from tile import * # NOTE: If you add new tiles, use t_init for regular tiles. # tl_init and tr_init are for tiles that take up only half of the # 16x16 tile, on the left or right side respectively. TILES = { # general purpose tiles 0x00: [t_init, [], None, ], ...
PerroTron/HostilPlanet
lib/tiles.py
Python
gpl-2.0
5,826
import datetime import json from classrank.database.wrapper import Query """add_to_database.py: adds courses from Grouch to the ClassRank DB.""" def add_to_database(grouch_output, db): """ Add courses from Grouch's output to a db. Keyword arguments: grouch_output -- the output of Grouch (the scrap...
classrank/ClassRank
classrank/grouch/grouch_util.py
Python
gpl-2.0
3,951
"""Fork of urllib2. When reading this, don't assume that all code in here is reachable. Code in the rest of mechanize may be used instead. Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Python Software Foundation; All Rights Reserved Copyright 2002-2009 John J Lee <jjl@pobox.com> This code is f...
ppizarror/korektor
bin/mechanize/_urllib2_fork.py
Python
gpl-2.0
49,523
from setuptools import setup, find_packages setup( name="wei-dev", version="0.2.0", packages=find_packages(), description="DevTool for weichat development and testing, " "GUI and CLI tool and testing util-library included.", install_requires=( "cmdtree", "requests", ...
winkidney/wei-dev
setup.py
Python
gpl-2.0
329
import conedy as co N = co.network() newNodeNumber = N.addNode( co.roessler() ) N.observeTime("output/evolve3.py.series") N.observe(newNodeNumber, "output/evolve3.py.series") N.evolve(0.0,3.0) N.evolve(5.0,13.0) N.evolve (-0.1, 0.0)
Conedy/Conedy
testing/dynNetwork/evolve3.py
Python
gpl-2.0
241
# This file contains the description of base options CONFIG_OPTIONS = { 'general': {'g': "Gravitational constant. Default is 981 cm/s^2. Type:float."}, 'experiment': \ {'exp_type': ("Identifier of type of experiment do determine which " "module should be used. Type: string"), ...
bmcage/centrifuge-1d
centrifuge1d/modules/base/options.desc.py
Python
gpl-2.0
16,567
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
gecos-team/gecos-firstboot
firstboot/pages/linkToChef/LinkToChefConfEditorPage.py
Python
gpl-2.0
7,126
""" @summary: Module contain matrix base classes @author: CJ Grady @version: 1.0 @status: alpha @license: gpl2 @copyright: Copyright (C) 2014, University of Kansas Center for Research Lifemapper Project, lifemapper [at] ku [dot] edu, Biodiversity Institute, 1345 Jayhawk Boulevard, Lawre...
cjgrady/compression
src/matrix/matrix.py
Python
gpl-2.0
3,131
""" nustar-caldb is a set of python functions which can help update the nustar caldb Version 0.1 (20160720) """ from nustar_caldb_patch import * from nustar_clockcor import *
mfacorcoran/pycaldb
nustar_caldb/__init__.py
Python
gpl-2.0
179
import logging, os, re from autotest_lib.client.common_lib import error from autotest_lib.client.virt import virt_utils, rss_client, aexpect def run_whql_submission(test, params, env): """ WHQL submission test: 1) Log into the client machines and into a DTM server machine 2) Copy the automation progra...
libvirt/autotest
client/virt/tests/whql_submission.py
Python
gpl-2.0
12,255
# -*- coding: utf-8 -*- """ *************************************************************************** OutputNumber.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
camptocamp/QGIS
python/plugins/processing/outputs/OutputExtent.py
Python
gpl-2.0
1,632
import usb2ax import time import math import sys with usb2ax.Controller(fix_sync_read_delay = True) as dxl: servo_list = dxl.servo_list if len(servo_list) == 0: raise "Nothing connected..." sys.exit() print "Servo: \t" + "\t".join( [str(x) for x in servo_list] ) + "\tRead rate (Hz)\tNumbe...
jthorniley/pyusb2ax
example.py
Python
gpl-2.0
1,401
""" Django settings for CELLAR project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths i...
SonienTaegi/CELLAR
CELLAR/settings.py
Python
gpl-2.0
2,762
a = 'sdlbapm' b = 'alam' for d in a: print d + b
motealle/python
01.py
Python
gpl-2.0
53
# Find primes up to a certain number and output a list of them as strings def primes(top): seive = range(2, top+1) for m in range(2, top+1): for n in range(m, top//m+1): p = m*n if p<=top: seive[p-2] = 0 primes = [] for i in range(top-1): if seive[i] != 0: primes.append(str(seive[i])) return primes prim...
cabanm/project-euler
problem35.py
Python
gpl-2.0
1,207
from scipy.interpolate import RectBivariateSpline as rbs from itertools import islice import numpy as np class eos: def __init__(self, path_to_data=None): if not path_to_data: import os path_to_data = os.environ['ongp_data_path'] npts_t = 121 npts_t -= 60 # skip lo...
chkvch/on_GP
v2/eos/chabrier.py
Python
gpl-2.0
7,299
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License...
CloudBrewery/duplicity-swiftkeys
duplicity/tempdir.py
Python
gpl-2.0
9,197
# RussianSquare - Tetris like block game # Copyright (C) 2011 Joseph Grasser # # 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...
jgrasser/pyRussianSquare
russianSquare.py
Python
gpl-2.0
27,299
#!/usr/bin/env python #coding:utf-8 """ Digit canceling fractions The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. We shall consider fractions like, 30/50 = 3/5, to be...
Urinx/Project_Euler_Answers
033.py
Python
gpl-2.0
995
# -*- coding: utf-8 -*- # Copyright 2015-2016 Pavel_M <plprgt@gmail.com>, # released under the GNU GPL version 3. # This plugin is for Zim program by Jaap Karssenberg <jaap.karssenberg@gmail.com>. # # This plugin uses an icon from Tango Desktop Project (http://tango.freedesktop.org/) # (the Tango base icon theme is re...
Osndok/zim-desktop-wiki
zim/plugins/bookmarksbar.py
Python
gpl-2.0
18,469
# Copyright (C) 2010-2012 Red Hat, Inc. # This work is licensed under the GNU GPLv2 or later. import threading import time import libvirt import json from libvirt import libvirtError from libvirttestapi.repos.domain import domain_common from libvirttestapi.utils import utils from libvirttestapi.utils import process r...
libvirt/libvirt-test-API
libvirttestapi/repos/migration/migrate_parallel.py
Python
gpl-2.0
5,426
#!/usr/bin/env python # -*- coding: UTF-8 -*- import cgi, cgitb import sys sys.path.insert(0, "../planetoplot/modules") import ppplot import ppclass ######################################## import numpy as np xx = np.arange(25) yy = 3.*xx fig = ppplot.figuref(x=8,y=6) pl = ppplot.plot1d() pl.fig = fig # have ...
aymeric-spiga/planetoplot
html/cgi-bin/maincgi.py
Python
gpl-2.0
1,620
from User import User from Room import Room class ChatRoom(object): def __init__(self): self.users = {} self.rooms = {} def connectUser(self, userName): if self.users.has_key(userName): return False self.users[userName] = User(userName) return True def ...
epronk/pyfit2
examples/chat/ChatRoom.py
Python
gpl-2.0
901
''' practicar trilateracion ''' # %% import numpy as np import numpy.linalg as ln import matplotlib.pyplot as plt import numdifftools as ndf from scipy.special import chdtri # %% kml_file = "/home/sebalander/Code/VisionUNQextra/trilateration/trilat.kml" # %% texto = open(kml_file, 'r').read() names = list() data...
sebalander/trilateration
trilatera.py
Python
gpl-2.0
11,639
""" Managing Gateway Groups and interactions with multiple channels. (c) 2008-2014, Holger Krekel and others """ import sys, atexit from execnet import XSpec from execnet import gateway_io, gateway_bootstrap from execnet.gateway_base import reraise, trace, get_execmodel from threading import Lock NO_ENDMARKER_WANTE...
LaoQi/icode
mypylib/remoto/lib/vendor/execnet/multi.py
Python
gpl-2.0
10,046
""":mod:`libearth.sanitizer` --- Sanitize HTML tags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import cgi try: import htmlentitydefs import HTMLParser except ImportError: from html import entities as htmlentitydefs, parser as HTMLParser import re try: import urlparse except ImportError: ...
earthreader/libearth
libearth/sanitizer.py
Python
gpl-2.0
5,176
"""Generate reports no holdings. """ __author__ = "Martin Blais <blais@furius.ca>" import csv from beancount.core.number import D from beancount.core.number import ZERO from beancount.core import account from beancount.core import data from beancount.core import flags from beancount.parser import options from beancou...
iocoop/beancount
src/python/beancount/reports/holdings_reports.py
Python
gpl-2.0
13,561
# FreeSpeak - a GUI frontend to online translator engines # freespeak/ui/translation.py # ## Copyright (C) 2005, 2006, 2007, 2008, 2009 Luca Bruno <lethalman88@gmail.com> ## ## This file is part of FreeSpeak. ## ## FreeSpeak is free software; you can redistribute it and/or modify ## it under the terms of the GNU Ge...
BackupTheBerlios/freespeak
freespeak/ui/translation_label.py
Python
gpl-2.0
6,576
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
fluxer/spm
nuitka/nuitka/tree/ComplexCallHelperFunctions.py
Python
gpl-2.0
102,656
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'joins.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), )
felipechaulet/mailcollector
lwc/src/lwc/urls.py
Python
gpl-2.0
294
""" Clean up the website log table. """ # pylint: disable=C0301,C0103,W1201 from apiary.tasks import BaseApiaryTask import logging import datetime LOGGER = logging.getLogger() class DeleteWebsiteLogsTask(BaseApiaryTask): """Delete old entries from the bot_log.""" def run(self): """Execute the task....
apexkid/Wikiapiary
apiary/tasks/bot/deletewebsitelogs.py
Python
gpl-2.0
837
#!/usr/bin/env python from builtins import zip, map import struct import collections import sys import logging import os from gevent import monkey; monkey.patch_all() import gevent import gevent.server import leveldb # Ref: ../../include/pttstruct.h IDLEN = 12 FNLEN = 28 COMMENTLEN = 80 # Ref: ../../include/daemon...
ptt/pttbbs
daemon/commentd/commentd.py
Python
gpl-2.0
6,640
import Aplicacion import random import os import time from Generales import Generales from Letras import Letras from Menu import * from Variable import * from validador import * #------------------------------------------------ #--------------- TODO --------------------------- #------------------------------...
pepitogithub/PythonScripts
Crucigrammer.py
Python
gpl-2.0
16,271
from .catalog import LcCatalog
bkuczenski/lca-tools
antelope_catalog/catalog/__init__.py
Python
gpl-2.0
32
# Bugs Everywhere, a distributed bugtracker # Copyright (C) 2008-2012 Chris Ball <cjb@laptop.org> # Gianluca Montecchi <gian@grys.it> # W. Trevor King <wking@drexel.edu> # # This file is part of Bugs Everywhere. # # Bugs Everywhere is free software: you can redistribute i...
ned14/Bugs-Everywhere-for-BEurtle
libbe/ui/util/editor.py
Python
gpl-2.0
3,579
# -*- coding: utf-8 -*- #Copyright (C) 2015 David Delgado Hernandez # 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. ...
lokiteitor/ikol
ikol/config.py
Python
gpl-2.0
7,992
import numpy as np import matplotlib.pyplot as plt from wwb_scanner.scan_objects.spectrum import compare_spectra from wwb_scanner.file_handlers import BaseImporter class BasePlot(object): def __init__(self, **kwargs): self.filename = kwargs.get('filename') if self.filename is not None: ...
nocarryr/rtlsdr-wwb-scanner
wwb_scanner/ui/plots.py
Python
gpl-2.0
3,912
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Nick Hall # Copyright (C) 2011 Tim G L Lyons # # 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 th...
arunkgupta/gramps
gramps/plugins/gramplet/backlinks.py
Python
gpl-2.0
7,865
__author__ = 'rhay'
RussTheAerialist/zensitting
daemon/zend/__init__.py
Python
gpl-2.0
20
# -*- coding: utf-8 -*- """ Flixnet Add-on 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) an...
azumimuo/family-xbmc-addon
plugin.video.showboxarize/resources/lib/sources_de/meinkino.py
Python
gpl-2.0
6,397
''' Created on Oct 7, 2014 @author: xiaocunqi ''' class Solution: # @param num, a list of integer # @return a list of lists of integers def permute(self, num): if(len(num) == 1): return [num] result = [] self.perm(result, num, 0, len(num)) return result ...
Cunqi/leetcode
PLeetcode/com/cx363/Permutations.py
Python
gpl-2.0
1,148
from audioop import reverse from time import sleep import pytest import requests from utils import * from conftest import file_dir as test_home from conftest import ref_version import json import datetime class TestsortMajor: def test_sort_with_reminderState_1(self): filter_response = call_ref_url("get", make_book...
soumyaslab/pythonlab
py2/excel_example/test_planner_extended_filters.py
Python
gpl-2.0
83,909
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2010, TUBITAK/UEKAE # # 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 ...
PisiLinux-PyQt5Port/package-manager
src/packagedelegate.py
Python
gpl-2.0
17,880
# -*- coding: utf-8 -*- from buchi import check_label_for_buchi_edge from networkx.classes.digraph import DiGraph class ProdAut(DiGraph): def __init__(self, ts, buchi, beta=100): DiGraph.__init__(self, ts=ts, buchi=buchi, beta=beta, initial=set(), accept=set(), type='ProdAut') def build_full(self): for f_ts_...
MengGuo/mix_initiative
hil_mix_control/src/ltl_tools/product.py
Python
gpl-2.0
9,442
## This file is part of Invenio. ## Copyright (C) 2012 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 later version. ## ## Inv...
pombredanne/openaire
miscutil/lib/validators.py
Python
gpl-2.0
2,759
import asyncio import json import aiocoap.resource as resource import aiocoap from pyWL.database import Station, Line from pyWL.realtime import Departures import json_serializer class DepartureResource(resource.ObservableResource): def __init__(self): super().__init__() self.notify() def not...
kelvan/coapWL
coapserver.py
Python
gpl-2.0
2,068
from parsimonious import Grammar from parsimonious import NodeVisitor from grammar_dev.grammars.CustomNodeVisitorFactory import CustomVisitorFactory grammars = [ r""" # Nonterminals case_info = (new_line? assigned_filed_initiated the_rest) / (new_line? line assigned_filed_initiated the_rest) / ...
NateV/GrammarDev
grammar_dev/grammars/case_info_grammar.py
Python
gpl-2.0
2,165
#!/usr/bin/env python # Copyright (C) Nicolas J. Bouliane - 2012 # dsctl - Directory Service Control import signal import socket import ssl import pprint import sys from dnds import * class Connection: sock = None ssl_sock = None connected = False loggedin = False ClientId = 0 def signal_handle...
aboudreault/dnds-debian
dsc/dsctl.py
Python
gpl-2.0
12,699
# Deletes the temp files and Compiler-Generated Directory import os import shutil """ Gets a list of files using a extension filter""" def getFiles(relevant_path): included_extenstions = ['pdb','txt','config','xml' ] file_names = [fn for fn in os.listdir(relevant_path) if any([fn.endswith(ext) for ext in inclu...
samarjeet27/ynoteclassic
Code/Clean.py
Python
gpl-2.0
894
# # Copyright 2010 (C) Norwegian University of Science and Technology # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # Thi...
alexanderfefelov/nav
python/nav/web/portadmin/views.py
Python
gpl-2.0
20,814
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Diceware documentation build configuration file, created by # sphinx-quickstart on Mon Oct 26 22:19:13 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
Treggats/DicewarePassphrase
docs/conf.py
Python
gpl-2.0
11,767
#!/usr/bin/python #even or odd program in python #Written by: Diogo Garcia de Freitas x = 5 if x % 2 == 0: print('Even') else: print('Odd')
daiogo/python2perl
test09.py
Python
gpl-2.0
146
""" pyNEAT Copyright (C) 2007-2008 Brian Greer 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 ...
liquidkarma/pyneat
pyNEAT/Mutator.py
Python
gpl-2.0
790
# coding = utf-8 __AUTHOR__ = 'Abdul Somat Budiaji' import logging import os import sys import pandas as pd import numpy as np from qgis.core import NULL import asumsi import config from error import * import hazard import shape logger = logging.getLogger('jakservice.post_processing.dala') class Dala(): """ ...
frzdian/jaksafe-engine
jaksafe/jaksafe/jakservice/post_processing/dala.py
Python
gpl-2.0
29,206
""" This core.py module is part of the Jaide (Junos Aide) package. It is free software for use in manipulating junos devices. To immediately get started, take a look at the example files for implementation guidelines. More information can be found at the github page found here: https://github.com/NetworkAutomation/ja...
NetworkAutomation/jaide
jaide/core.py
Python
gpl-2.0
43,240
n, k, l, c, d, p, nl, np = map(int,raw_input().split()) a = k*l x = a/nl y = c*d z = p/np print min(x,y,z)/n
Sarthak30/Codeforces
soft_drinking.py
Python
gpl-2.0
109
#!/usr/bin/env python # -*- coding: utf-8 -*- # # OMERO Grid Processor # Copyright 2008 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # import os import time import signal import logging import traceback import killableprocess as subprocess from path import pat...
mtbc/openmicroscopy
components/tools/OmeroPy/src/omero/processor.py
Python
gpl-2.0
35,039
# -*- coding: utf-8 -*- """ Created on Tue Jul 22 07:54:05 2014 @author: charleslelosq Carnegie Institution for Science """ import sys sys.path.append("/Users/charleslelosq/Documents/RamPy/lib-charles/") import csv import numpy as np import scipy import matplotlib import matplotlib.gridspec as gridspec from pylab ...
charlesll/RamPy
legacy_code/IR_dec_comb.py
Python
gpl-2.0
6,585
#!/usr/bin/env python # (C) 2014, Leigh Maddock, <awesomesourcesoftware@gmail.com> # Please see https://github.com/leighmaddock/Monitor-Agent/LICENSE for license information # import SocketServer, subprocess, sys, os, signal from threading import Thread # listen on all interfaces IPADDR = '' cmdfile = "/etc/.monitor...
leighmaddock/Monitor-Agent
monitor-agent.py
Python
gpl-2.0
2,893
def fitness(string, length) : strSum = 0.0 newAlpha = convert(string.gene) fhCrypt = open("crypto.txt") flippedCrypt = "" flippedCrypt = flip(fhCrypt.readline(),newAlpha) flippedCrypt = flippedCrypt.split() for word in flippedCrypt : #print "Word: %s" % word if len(word) == 1 : fhDict = open("1.txt") e...
csmtco10/SRshare
Reyn/AI/Generic/crypto_fitness.py
Python
gpl-2.0
4,583
# -*- 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...
kaynfiretvguru/Eldritch
plugin.video.ex0dus/resources/lib/sources/en/projectfree.py
Python
gpl-2.0
3,751
import random def bio(age): Im = ["нищим", "купцом", "торговцем", "сенатором", "шутом", "шахтёром", "солдатом", "генералом", "полководцем", "вором", "наёмным убийцей", "охранником", "охотником"] ret = "Ты родился в " + str(0 - age) + " году в пригороде страны. Твои родители - небогатые люди. Ты вырос и стал " + rand...
Brounredo/Revolution
Biography.py
Python
gpl-2.0
626
# GNU Enterprise Forms - wx 2.6 UI Driver - Menu widget # # Copyright 2001-2007 Free Software Foundation # # This file is part of GNU Enterprise # # GNU Enterprise 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 Foundatio...
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/forms/uidrivers/java/widgets/menu.py
Python
gpl-2.0
4,060
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import dclab import numpy as np from shapeout import analysis from helper_methods import example_data_dict def test_basic(): ddict = example_data_dict(size=8472) ds = dclab.new_dataset(ddict) anal = analysis.A...
ZellMechanik-Dresden/ShapeOut
tests/test_analysis.py
Python
gpl-2.0
3,450
from twisted.python import reflect # note that schema modules are not loaded unless an upgrade is taking place CURRENT_VERSION = 5 class DBSchemaManager(object): """ This class is responsible for managing the database schema and upgrading it as necessary. This includes both the *actual* database and the...
centrumholdings/buildbot
buildbot/db/schema/manager.py
Python
gpl-2.0
2,394
import abc import json import codecs from rest_framework import serializers from django.utils.translation import ugettext_lazy as _ from rest_framework.parsers import BaseParser from rest_framework import status from rest_framework.exceptions import ParseError, APIException from common.utils import get_logger logger =...
skyoo/jumpserver
apps/common/drf/parsers/base.py
Python
gpl-2.0
4,553
# -*- coding: utf-8 -*- """ Servo 2.0 Plugin Copyright (C) 2020 Olaf Lüke <olaf@tinkerforge.com> servo_v2.py: Servo Bricklet 2.0 Plugin implementation 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;...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/servo_v2/servo_v2.py
Python
gpl-2.0
14,915
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib,urllib2,re,xbmcplugin,xbmcgui,sys,xbmcaddon,socket socket.setdefaulttimeout(30) pluginhandle = int(sys.argv[1]) xbox = xbmc.getCondVisibility("System.Platform.xbox") addon = xbmcaddon.Addon(id='plugin.video.break_com') translation = addon.getLocalizedString force...
AddonScriptorDE/plugin.video.break_com
default.py
Python
gpl-2.0
9,189
# 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 law or agreed to in writing, software # d...
ChinaMassClouds/copenstack-server
openstack/src/horizon-2014.2/openstack_dashboard/dashboards/admin/aggregates/forms.py
Python
gpl-2.0
2,999
#!/usr/bin/python # -*- coding: utf-8 -*- # # mrsltoxrsl: translate MiG job to ARC job # # (C) 2009 Jost Berthold, grid.dk # adapted to usage inside a MiG framework # # 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...
heromod/migrid
mig/shared/mrsltoxrsl.py
Python
gpl-2.0
13,916
from contextlib import contextmanager import logging import os.path import traceback from kazoo.client import KazooClient from kazoo.exceptions import ( LockTimeout, NodeExistsError, NoNodeError, KazooException, ZookeeperError, ) from kazoo.retry import KazooRetry, RetryFailedError from mastermind....
yandex/mastermind
src/cocaine-app/sync/kazoo_impl/__init__.py
Python
gpl-2.0
8,087
# -*- coding: utf-8 -*- import os,math from qgis.core import NULL from mole import oeq_global from mole.project import config from mole.extensions import OeQExtension from mole.stat_corr import rb_contemporary_base_uvalue_by_building_age_lookup def calculation(self=None, parameters={},feature = None): from math i...
UdK-VPT/Open_eQuarter
mole/extensions/eval_enev/oeq_AHDE.py
Python
gpl-2.0
1,413
#!python from __future__ import with_statement from __future__ import division from __future__ import absolute_import from __future__ import print_function import pandas as pd import wordbatch.batcher def decorator_apply(func, batcher=None, cache=None, vectorize=None): def wrapper_func(*args, **kwargs): return Appl...
anttttti/Wordbatch
wordbatch/pipelines/apply.py
Python
gpl-2.0
2,258
from random import randrange import fractions def get_primes(n): numbers = set(range(n, 1, -1)) primes = [] while numbers: p = numbers.pop() primes.append(p) numbers.difference_update(set(range(p*2, n+1, p))) return primes def egcd(a, b): if a == 0: return (b, 0, 1) else: g, y, x =...
Qwaz/solved-hacking-problem
SharifCTF/2016/RSA-Keygen/generate-key.py
Python
gpl-2.0
2,346
#!/usr/bin/python import syslog from flask import Flask, request, render_template, send_from_directory, Response, jsonify from flask.ext.bootstrap import Bootstrap import json import re, os, sys from datetime import timedelta from flask import make_response, request, current_app from functools import update_wrapper f...
jmeehan16/voter-demo
voter.py
Python
gpl-2.0
22,031
def rigmarole(instr): print("rigmarole %s" % instr) i = 0 out = "" while i < len(instr): c1 = instr[i:i+2] c2 = instr[i+2:i+4] cc = int(c1,16) - int(c2, 16) out += chr(cc) # print("%s %s" % (c1, c2)) i += 4 return out def ca...
gray-panda/grayrepo
2020_flareon/04_report/soln.py
Python
gpl-2.0
2,149
## # Copyright 2012-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gppezzi/easybuild-framework
easybuild/toolchains/gqacml.py
Python
gpl-2.0
1,671
#!/usr/bin/env python # Copyright (c) 2015, Robot Control and Pattern Recognition Group, # Institute of Control and Computation Engineering # Warsaw University of Technology # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the ...
dseredyn/velma_planners
scripts/tf_pub.py
Python
gpl-2.0
2,492
# # Copyright 2016-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
lib/vdsm/throttledlog.py
Python
gpl-2.0
3,750
# -*- coding: utf-8 -*- # # GoogleAppsAccountManager: group/data # Copyright (C) 2012-2013 KAMEI Yutaka # # License: GNU General Public License version 2 or later # Date: 2012-12-28, since 2012-12-28 # from GoogleAppsAccountManager import XMLNS_ATOM, XMLNS_APPS from GoogleAppsAccountManager import data, errors class ...
comparemetrics/GoogleAppsAccountManager
src/GoogleAppsAccountManager/group/data.py
Python
gpl-2.0
1,308
from django.contrib import messages from django.views.generic.base import ContextMixin from edc_constants.constants import OPEN from ..models import DataActionItem from ..model_wrappers import DataActionItemModelWrapper from .user_details_check_view_mixin import UserDetailsCheckViewMixin class DataActionItemsViewMi...
botswana-harvard/edc-data-manager
edc_data_manager/view_mixins/data_manager_view_mixin.py
Python
gpl-2.0
2,162
from xml.dom import minidom import codecs inxml = minidom.parse(r'm_persons.xml') outcsv = codecs.open(r'person_quads.csv', 'w', 'utf-8') outcsv.write('id,assert_type,subject,predicate,object\r\n') i=1 for person in inxml.getElementsByTagName('personk'): pid = 'I'+person.getElementsByTagName('PERSON_ID')[0].childN...
earlysaints/database
datasets/nauvoo_deeds/persons2quad.py
Python
gpl-2.0
892
# -*- coding: utf-8 -*- import pytest import sys import os import logging import itertools import glob import subprocess from flexmock import flexmock try: from cStringIO import StringIO except: try: from StringIO import StringIO except: from io import StringIO from devassistant.dapi import ...
hroncok/devassistant
test/dapi/test_dap.py
Python
gpl-2.0
21,493
#!/usr/bin/python # coding: utf-8 ''' Fiesta 2 Unnoficial Ranking Copyright (C) 2014 HUEBR's 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 optio...
racerxdl/f2rank
serverside/postexptop.py
Python
gpl-2.0
908
from Tab import SETTING_COLUMN, SETTING_COLUMN_PAD from Row import Row from EnumButton import EnumMode import colors import pyxbmct.addonwindow as pyxbmct from src.li.visual import FullTextSettings from src.li.visual.FullTextSettings import Location from src.li.visual import TextSettings from src.tools.addonSettings im...
SportySpice/Collections
src/gui/ListItemTable.py
Python
gpl-2.0
11,659
from tools.load import LoadMatrix from numpy import double lm=LoadMatrix() traindat = double(lm.load_numbers('../data/fm_train_real.dat')) testdat = double(lm.load_numbers('../data/fm_test_real.dat')) traindna = lm.load_dna('../data/fm_train_dna.dat') testdna = lm.load_dna('../data/fm_test_dna.dat') parameter_list =...
ratschlab/ASP
examples/undocumented/python_modular/kernel_combined_modular.py
Python
gpl-2.0
1,900
#!/usr/bin/env python #-*- coding:utf-8 -*- import unittest import logging from miasm2.ir.symbexec import symbexec from miasm2.arch.msp430.arch import mn_msp430 as mn, mode_msp430 as mode from miasm2.arch.msp430.sem import ir_msp430 as ir_arch from miasm2.arch.msp430.regs import * from miasm2.expression.expression im...
rom1sqr/miasm
test/arch/msp430/sem.py
Python
gpl-2.0
8,710
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # # Geoprocessing functions adap...
imincik/pkg-qgis-1.8
python/plugins/fTools/tools/doGeoprocessing.py
Python
gpl-2.0
66,760
################################################################################ # Copyright (C) 2015 Surfacingx # # # # This Program is free software; you can redistribute it and/or modify ...
kodibx/kodibx
plugin.program.teverzwizard/resources/libs/wizard.py
Python
gpl-2.0
117,008
# -*- coding: utf-8 -*- # launcher.py # Copyright (C) 2017 LEAP # # 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 later version. # # Th...
leapcode/soledad
src/leap/soledad/server/launcher.py
Python
gpl-3.0
1,831
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains the implementations of abstract base class :py:class:`Escpos`. :author: `Manuel F Martinez <manpaz@bashlinux.com>`_ and others :organization: Bashlinux and `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2012-2017 Bashlin...
manpaz/python-escpos
src/escpos/printer.py
Python
gpl-3.0
12,101
"""make banner url longger Revision ID: e567bd5c0b Revises: 23ab90c01600 Create Date: 2015-02-01 13:15:59.075956 """ # revision identifiers, used by Alembic. revision = 'e567bd5c0b' down_revision = '23ab90c01600' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('banners', 'link_ur...
toway/towaymeetups
mba/alembic/versions/20150201_e567bd5c0b_make_banner_url_long.py
Python
gpl-3.0
479
''' Created on Apr 20, 2011 @author: michel ''' import os from lxml import etree from FeatureServer.WebFeatureService.FilterEncoding.Operator import Operator class LogicalOperator(Operator): def __init__(self, node): super(LogicalOperator, self).__init__(node) self.type = 'LogicalOperator' ...
guolivar/totus-niwa
service/thirdparty/featureserver/FeatureServer/WebFeatureService/FilterEncoding/LogicalOperators/LogicalOperator.py
Python
gpl-3.0
1,243
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2017-12-12 17:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_20171212_1252'), ] operations = [ migrations.AlterField...
linea-it/dri
api/product/migrations/0005_auto_20171212_1723.py
Python
gpl-3.0
523
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>' import unittest, os, argparse, time, functools try: import init_calibre...
timpalpant/calibre
src/calibre/srv/tests/main.py
Python
gpl-3.0
3,722
# -*- coding:utf-8 -*- from sqlalchemy import desc, func from atlas.modeles.entities.vmSearchTaxon import VmSearchTaxon def listeTaxons(session): """ revoie un tableau de dict : label = nom latin et nom francais concatene, value = cd_ref TODO Fonction inutile à supprimer !!! """ ...
PnEcrins/GeoNature-atlas
atlas/modeles/repositories/vmSearchTaxonRepository.py
Python
gpl-3.0
1,550
# -*- coding: utf8 -*- # # Copyright 2011 Kyrre Ness Sjøbæk # This file is part of AcdOpti. # # AcdOpti 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 you...
kyrsjo/AcdOpti
src/acdOpti/analysis/Omega3P_modeInfo.py
Python
gpl-3.0
6,060
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of utext # # Copyright (C) 2012-2016 Lorenzo Carbonell # lorenzo.carbonell.cerezo@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 Softw...
atareao/utext
src/utext/preferences_dialog.py
Python
gpl-3.0
17,473