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
# -*- coding: utf-8 -*- #search函数,参数为输入文件,输出文件,关键词。关键词与输入文件的每六行进行匹配(六行为一条微博),如果出现该关键词,则把该微博输出到输出文件中 def search(input_file,output_file,key): line = input_file.readline() if line == "\n": line = input_file.readline() while line: #如果文件没有结束,继续读取 lines = "" lines += line ...
wangtaoking1/found_website
项目代码/classification.py
Python
gpl-2.0
6,580
# -*- coding: utf-8 -*- from PyQt4 import QtGui, uic import os #from qgis.utils import iface FORM_CLASS, _ = uic.loadUiType(os.path.join(os.path.dirname(__file__), 'padrohabitants_dialog.ui')) class PadroHabitantsDialog(QtGui.QDialog, FORM_CLASS): def __init__(self, parent=None): """Constructor.""" ...
psigcat/padrohabitants
plugin/ui/padrohabitants_dialog.py
Python
gpl-2.0
844
# -*- coding: iso-8859-1 -*- # mosq.py # Implementation of the square-law MOS transistor model # Copyright 2012 Giuseppe Venturini # # This file is part of the ahkab simulator. # # Ahkab is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
leojohnthomas/ahkab
mosq.py
Python
gpl-2.0
18,308
#! /usr/bin/env python sources = """ eNrsvWt3HEl2IDa7fqy3bK0kW1577WOfnKKpzGwWkiCnJY2wXd3q4ZAjanqaPHxoWgcNFRNVCSAH icpiZhYBaDR7/CP83T/CX/3df8v3Fc+MzCqwu2fkc9zSEEBVxI2IGzfuK+698b//69+9/1Hy9k82 t9miqs+zxaJcl91i8f5fvf276XQawWfn5fo8+vLl8yiJN0292i6Lpo2jfL2K4mW9brdX9Df8ui6W XbGKPpR5dFncXtfNqk0jADKZvP/Xb/8NjtB2q/f/2Zv/81/96Ef...
raptorbird/RAVN
tests/runtests.py
Python
gpl-2.0
227,702
"""The harness interface The interface between the client and the server when hosted. """ __author__ = """Copyright Andy Whitcroft 2006""" import os, sys import common class harness(object): """The NULL server harness Properties: job The job object for this job """ ...
yochow/autotest
client/bin/harness.py
Python
gpl-2.0
2,286
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # Copyright (C) 2006-2015 chimera - observatory automation system # 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 Li...
agati/chimera
src/chimera/instruments/sk/tests/skdrv_OK_25062015.py
Python
gpl-2.0
8,467
import urllib import urllib2 import cookielib import logging class GISTokenGenerator: def __init__(self, email, password): self.cj = cookielib.CookieJar() self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj)) self.email = email self.login_data = urllib.urlencode(...
AIESECGermany/gis-hubspot-sync
gis_token_generator.py
Python
gpl-2.0
825
import sys from time import sleep from colored import stylize, fg, attr def flush(msg, err=None, fast=None, wait=0, code='reg'): codes = dict( error=fg('red') + attr('bold'), reg=fg(28) + attr('bold'), blue=fg('blue') ) if err: if fast: print(stylize('\n[-] {0...
xybydy/kirilim
utils.py
Python
gpl-2.0
934
# -*- coding: utf-8 -*- from __future__ import print_function from .compat import user_input def correct(call_a, call_b): """ Informs the user that the order is correct. :param call_a: first call number - not used at this time but could be important in later versions. :param call...
asmacdo/shelf-reader
shelf_reader/ui.py
Python
gpl-2.0
1,924
# Combination Sum # https://leetcode.com/problems/combination-sum/ class Solution(object): def combinationSum(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ if len(candidates)==0 or target<=0: retu...
ranji2612/leetCode
combinationSum.py
Python
gpl-2.0
622
# Copyright (c) 2008 Shahar Kosti # # 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 distribu...
kshahar/pylaunchy
plugins/PyDiry/pydiry.py
Python
gpl-2.0
4,461
import Gears as gears from .. import * from .Filter import * class CellLti7(Filter) : def applyWithArgs( self, stimulus, ) : sequence = stimulus.getSequence().getPythonObject() stimulus.setLtiMatrix( [ 0, 0.47494, -0.0966925, 0.150786, -...
szecsi/Gears
GearsPy/Project/Components/Temporal/CellLti7.py
Python
gpl-2.0
1,209
# -*- coding: utf-8 -*- """ blohg.tests.vcs_backends.hg.filectx ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module with tests for blohg integration with mercurial (file context). :copyright: (c) 2010-2013 by Rafael Goncalves Martins :license: GPL-2, see LICENSE for more details. """ import codecs import ...
rafaelmartins/blohg
blohg/tests/vcs_backends/hg/filectx.py
Python
gpl-2.0
2,627
# Sketch - A Python-based interactive drawing program # Copyright (C) 1997, 1998, 2001 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the Lice...
shumik/skencil-c
Sketch/UI/command.py
Python
gpl-2.0
7,045
# Copyright (C) 2010-2014 CEA # # This file is part of shine # # 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 ...
cea-hpc/shine
lib/Shine/Configuration/ModelFile.py
Python
gpl-2.0
24,131
#!/usr/bin/env python2 import os import subprocess import argparse from lib import builder from lib import promote current_directory = os.path.realpath(os.path.dirname(__file__)) parser = argparse.ArgumentParser() description = "Used to promote from one branch to another. For example, from 2.6-dev to " \ ...
rbarlow/pulp_packaging
ci/promote-brach.py
Python
gpl-2.0
3,501
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/glodls.py
Python
gpl-2.0
5,797
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sebastian.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
dem4ply/sebastian
manage.py
Python
gpl-2.0
252
# coding: utf-8 ''' Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 1 ** 4 + 6 ** 4 + 3 ** 4 + 4 ** 4 8208 = 8 ** 4 + 2 ** 4 + 0 ** 4 + 8 ** 4 9474 = 9 ** 4 + 4 ** 4 + 7 ** 4 + 4 ** 4 As 1 = 1 ** 4 is not a sum it is not included. The sum of these nu...
adrienbrunet/EulerProject
problem_030.py
Python
gpl-2.0
863
#python # Load this script into a RenderManScript node to create # what is either a Tribble or a really bad-hair-day ... import k3d k3d.check_node_environment(context, "RenderManScript") import sys import ri from ri import * from random import * from cgtypes import vec3 from noise import vsnoise from sl import mix ...
K-3D/k3d
share/k3d/scripts/RenderManScript/tribble.py
Python
gpl-2.0
1,686
import sys, glob sys.path.append('gen-py') from auth_service import Auth_Service from auth_service.ttypes import * from bft2f_pb2 import * from argparse import ArgumentParser from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor from time import sleep, time from Crypto.PublicKey...
akshayka/bft2f
start_client.py
Python
gpl-2.0
10,155
"""Properties once used for transcription and translation (DEPRECATED). This module is deprecated, and is expected to be removed in the next release. If you use this module, please contact the Biopython developers via the mailing lists. """ #NOTE - Adding a deprecation warning would affect Bio.Alphabet.IUPAC # Set up...
BlogomaticProject/Blogomatic
opt/blog-o-matic/usr/lib/python/Bio/Encodings/IUPACEncoding.py
Python
gpl-2.0
5,460
from conceptdb.metadata import Dataset import conceptdb from conceptdb.assertion import Sentence conceptdb.connect_to_mongodb('test') def test_sentence(): dataset = Dataset.create(language='en', name='/data/test') #create test sentence with dataset sentence1 = Sentence.make('/data/test', "This is a ...
commonsense/conceptdb
conceptdb/test/test_sentence.py
Python
gpl-2.0
1,640
from rutinas import * inputdir="ETERNA-INI/" outputdir="ETERNA-OUT/" inputdb=argv[1] f=open(inputdir+"%s-INI/numeracionsismos.dat"%inputdb,"r") for line in f: if "#" in line:continue line=line.strip() numsismo=line.split()[0] print "Generando datos de sismo '%s'..."%numsismo cmd="python prd2dat.py...
seap-udea/tQuakes
util/Legacy/allprd.py
Python
gpl-2.0
391
## ## Permanent Clock ## by AliAbdul ## from Components.ActionMap import ActionMap from Components.config import config, ConfigInteger, ConfigSubsection, ConfigYesNo from Components.MenuList import MenuList from enigma import ePoint, eTimer, getDesktop from os import environ from Plugins.Plugin import PluginDescriptor ...
popazerty/dvbapp2-gui
lib/python/Plugins/Extensions/EGAMIPermanentClock/plugin.py
Python
gpl-2.0
5,326
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005, 2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 ...
claudep/translate
translate/tools/porestructure.py
Python
gpl-2.0
5,484
from scanner import protocols, hci_socket import base64 for pkt in hci_socket.run(): ad = protocols.AdvertEventHandler(pkt) if ad.eddystone_uid: print(f'\nBeacon instance id: {ad.eddystone_uid.instance_id}' f' @ ({ad.address[-5:]})') if ad.eddystone_uid.instance_id == 0xbb: ...
ukBaz/ble_beacon
examples/workshop3.py
Python
gpl-2.0
635
""" A first order approximation to the entropy. Author: Ilias Bilionis Date: 6/3/2014 """ __all__ = ['FirstOrderEntropyApproximation'] import numpy as np from . import MixtureOfMultivariateNormals from . import EntropyApproximation class FirstOrderEntropyApproximation(EntropyApproximation): """ ...
ebilionis/variational-reformulation-of-inverse-problems
vuq/_first_order_entropy_approximation.py
Python
gpl-2.0
1,888
from miro.test.framework import MiroTestCase from miro.frontends.widgets.widgetstatestore import WidgetStateStore from miro.frontends.widgets.itemlist import SORT_KEY_MAP class WidgetStateConstants(MiroTestCase): def setUp(self): MiroTestCase.setUp(self) self.display_types = set(WidgetStateStore.ge...
debugger06/MiroX
lib/test/widgetstateconstantstest.py
Python
gpl-2.0
2,572
# Copyright 2016 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 the ...
EdDev/vdsm
tests/storage_volume_metadata_test.py
Python
gpl-2.0
6,516
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2018 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) #...
MDAnalysis/mdanalysis
testsuite/MDAnalysisTests/lib/test_nsgrid.py
Python
gpl-2.0
15,204
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free ...
flyapen/UgFlu
flumotion/worker/__init__.py
Python
gpl-2.0
962
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QApplication(__PyQt4_QtCore.QCoreApplication): """ QApplication(list-of-str) QApplication(list-of-st...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QApplication.py
Python
gpl-2.0
14,490
# Configuration # Generate key with specific length and chars import string KEY_LENGTH = 50 KEY_REF_SETS = string.ascii_letters + string.digits # When getting last Moos to init map MAX_NUMBER_OF_INITIAL_MOO = 25 # When getting last Moos from last call MAX_NUMBER_OF_MOO = 25 # Do not accept more than 1 (same animal)...
Meuh-Factory/womoobox
settings.py
Python
gpl-2.0
490
# DebFile: a Python representation of Debian .deb binary packages. # Copyright (C) 2007-2008 Stefano Zacchiroli <zack@debian.org> # Copyright (C) 2007 Filippo Giunchedi <filippo@debian.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
CodethinkLabs/firehose
debian/foo/debfile.py
Python
gpl-2.0
11,901
import game import server class tt2(game.Game): class TT2Process(server.GameProcess): def memory_percent_usage(self): return 0.0 def __init__(self, server, name): game.Game.__init__(self, server, name) self.process_class = self.TT2Process def get_option(self, query)...
GamesCrafters/GamesmanClassic
src/py/games/tt2.py
Python
gpl-2.0
963
import sklearn.neighbors as nn import numpy as np import pandas as pd import argparse def find_clusters(geos, tol): hav_tol = tol / 6371.0 used = [False] * len(geos) ball_tree = nn.BallTree(np.radians(geos), metric="haversine") centers = list() for i in xrange(len(geos)): if not used[i]: ...
wallarelvo/mod
scripts/find_stations.py
Python
gpl-2.0
1,624
from __future__ import unicode_literals from django.apps import AppConfig class UserConfig(AppConfig): name = 'user'
M2IS/vendendo
userapp/apps.py
Python
gpl-2.0
124
# -*- coding: utf-8 -*- """ Задание 5: определение типа. УСЛОВИЕ: функция, которая принимает объект и выводит строку с наименованием типа этого объекта. Пример: typer(666) == "int" typer("666") == "str" typer(typer) == "function" """ def typer(variable): return type(variable).__name__ if __name__ == '__main__...
pybursa/homeworks
a_berezovsky/hw1/task05.py
Python
gpl-2.0
560
KEYS = ( '#', 'S-', 'T-', 'K-', 'P-', 'W-', 'H-', 'R-', 'A-', 'O-', '*', '-E', '-U', '-F', '-R', '-P', '-B', '-L', '-G', '-T', '-S', '-D', '-Z', ) IMPLICIT_HYPHEN_KEYS = ('A-', 'O-', '5-', '0-', '-E', '-U', '*') SUFFIX_KEYS = ('-S', '-G', '-Z', '-D') NUMBER_KEY = '#' NUMBERS = { 'S-': '...
Germanika/plover
plover/system/english_stenotype.py
Python
gpl-2.0
6,232
import os import sys import transaction from pyramid.paster import bootstrap import transaction from mojo.models import root_factory from mojo.blog.models import get_blogroot def usage(argv): cmd = os.path.basename(argv[0]) print('usage: %s <config_uri>\n' '(example: "%s development.ini")' % (cmd...
gliheng/Mojo
mojo/scripts/dump_blog_data.py
Python
gpl-2.0
1,041
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- # # This file is part of my scripts project # # Copyright (c) 2013 Marco Antonio Islas Cruz # # This script 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 So...
markuz/scripts
copyemail.py
Python
gpl-2.0
4,573
import socket from selectors import DefaultSelector, EVENT_WRITE, EVENT_READ sock = socket.socket() sock.setblocking(False) selector = DefaultSelector() urls_todo = set(['/']) seen_urls = set(['/']) class Fetcher: def __init__(self, url): self.response = b'' self.url = url self.sock = ...
GreenJoey/My-Simple-Programs
python/500L Async Scraper/simple-url-getter.py
Python
gpl-2.0
1,959
## @file # Module to gather dependency information for ASKAP packages # # @copyright (c) 2006 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKAP ...
ATNF/askapsdp
Tools/Dev/rbuild/askapdev/rbuild/dependencies/dependency.py
Python
gpl-2.0
18,614
# Copyright (C) 2012 Linaro Limited # # Author: Antonio Terceiro <antonio.terceiro@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher 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; eith...
inwotep/lava-dispatcher
lava_dispatcher/tests/test_device_version.py
Python
gpl-2.0
3,007
# -*- coding: utf-8 -*- """ Created on Sun Aug 17 17:44:17 2014 @author: worker """ import numpy as np from numpy.fft import fftshift,ifftshift,fft,ifft from numpy.fft import fft2 as fast_fft2 from numpy.fft import ifft2 as fast_ifft2 from numpy.fft import fftn as fast_fftn from numpy.fft import ifftn as fast_ifftn ...
KryoEM/relion2
python/myutils/image.py
Python
gpl-2.0
43,002
import nengo import numpy as np import redis import struct r = redis.StrictRedis('127.0.0.1') model = nengo.Network() with model: def receive_spikes(t): msg = r.get('spikes') v = np.zeros(10) if len(msg) > 0: ii = struct.unpack('%dI' % (len(msg)/4), msg) v[[ii]] =...
tcstewar/testing_notebooks
show_remote_spikes/sink.py
Python
gpl-2.0
399
#!/usr/bin/env python from __future__ import print_function import numpy as np import argparse import glob import netCDF4 import poppy.metrics import poppy.grid import meta def _get_grid_cell_area(fname, grid, lonlim, latlim): with netCDF4.Dataset(fname) as ds: mask = poppy.grid.get_mask_lonlat(ds, lon...
j08lue/poppy
scripts/save_regavg_timeseries.py
Python
gpl-2.0
2,149
#!/usr/bin/python # -*- coding:utf-8 -*- # 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 distr...
RenZ0/php-show-controller
engine/delta.py
Python
gpl-2.0
14,328
from zope.interface import Interface, Attribute from zope import schema from uwosh.emergency.client.config import mf as _ class IUWOshEmergencyClientLayer(Interface): """Marker interface that defines a browser layer """
uwosh/uwosh.emergency.client
uwosh/emergency/client/interfaces.py
Python
gpl-2.0
228
''' A list of all Exception specific to pulsar library. ''' class PulsarException(Exception): '''Base class of all Pulsar exceptions.''' class MonitorStarted(PulsarException): pass class ImproperlyConfigured(PulsarException): '''A :class:`PulsarException` raised when an inconsistent configuration has ...
Ghost-script/dyno-chat
kickchat/apps/pulsar/utils/exceptions.py
Python
gpl-2.0
3,985
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject class TextWindowType(__gobject.GEnum): # no doc def __init_...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/_gtk/TextWindowType.py
Python
gpl-2.0
767
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response, redirect, render from django.contrib import messages from django.template import RequestContext from django.contrib.auth import forms, authenticate, views, login from django.contrib.auth.decorators import login_required from django import http fro...
agendaTCC/AgendaTCC
tccweb/apps/website/views.py
Python
gpl-2.0
8,944
import sys sys.path.append('/cygdrive/d/yehnan/wr_python_drmaster/python_book_yehnan/ch10') # import package_example.formats.bar # square = package_example.formats.bar.square # from bar import square from . import bar square = bar.square # from .bar import square def sos(a, b): return squar...
yehnan/python_book_yehnan
ch10/package_example/formats/foo.py
Python
gpl-2.0
459
import os, sys up_path = os.path.abspath('..') sys.path.append(up_path) from numpy import * import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib import rc from objects import SimObject from utils import scalar from covar import draw_ellipsoid, vec2cov, cov2vec,\ pr...
viswimmer1/PythonGenerator
data/python_files/30585323/ravebot.py
Python
gpl-2.0
7,909
#!/usr/bin/env python3 """ List images in Docker registry curl http://localhost:5000/v1/_ping curl http://localhost:5000/v1/search curl http://localhost:5000/v1/repositories/<repository>/tags curl -X DELETE http://localhost:5000/v1/repositories/<repository>/tags/<tag> curl http://localhost:5000/v2/ curl http://localh...
drtuxwang/system-config
bin/dockerreg.py
Python
gpl-2.0
13,196
from feat.test import common from feat.database import migration, document from feat.database.interface import NotMigratable from feat.interface.serialization import IVersionAdapter TYPE_NAME = 'nonexisting-type' class A(document.VersionedDocument): type_name = TYPE_NAME version = 6 document.field('f...
f3at/feat
src/feat/test/test_database_migration.py
Python
gpl-2.0
2,345
import sys import re import time import datetime import typesense import typesense.exceptions from unidecode import unidecode import psycopg2 import config from mapping.utils import log BATCH_SIZE = 5000 COLLECTION_NAME_PREFIX = 'mbid_mapping_' def prepare_string(text): return unidecode(re.sub(" +", " ", re.s...
metabrainz/listenbrainz-server
listenbrainz/mbid_mapping/mapping/typesense_index.py
Python
gpl-2.0
4,028
from django.conf.urls import patterns, include from django.contrib import admin from django.views.generic import RedirectView from edc.lab.lab_profile.classes import site_lab_profiles from edc.map.classes import site_mappers from bhp066.apps.bcpp_household.mappers.central_server_mapper import CentralServerMapper from ...
botswana-harvard/bcpp-export
bcpp_export/old_export/urls.py
Python
gpl-2.0
900
#-*- coding:iso-8859-1 -*- """ Clase que modela la información de una cuenta en el sistema """ # NUMERO.valor.punto_atencion,cajero,cuenta,fecha class Operacion(object): def __init__(self, numero, tipo_operacion, cliente, valor, punto_atencion, cajero, cuenta, fecha): self.numero = numero sel...
Llamatech/sis-fibo
model/vos/operacion.py
Python
gpl-2.0
2,405
# -*- coding: utf-8 -*- from math import sqrt, sin, cos from random import random from pytest import XFAIL from tools.testlib import assertAlmostEqual, assertEqual from wxgeometrie.geolib import (Cercle_points, Cercle_diametre, Cercle_rayon, Demicercle, Arc_oriente, Arc_points, Label_...
wxgeo/geophar
wxgeometrie/geolib/tests/test_cercles.py
Python
gpl-2.0
4,490
# engine/url.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the :class:`~sqlalchemy.engine.url.URL` class which encapsulates i...
olivierdalang/stdm
third_party/sqlalchemy/engine/url.py
Python
gpl-2.0
8,113
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; e...
lehmannro/translate
storage/test_ts2.py
Python
gpl-2.0
4,738
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from . import views from . import rest from helpdeskunl.apps.home.views import * from helpdeskunl.apps.home.rest import * urlpatterns = patterns('', url(r'^$', views.index_view, name='view_home'), url(r'^(?P<username>\w+)$', views.panel_view,name =...
dianamor8/helpdeskunl
helpdeskunl/apps/home/urls.py
Python
gpl-2.0
550
import subprocess import sys import time class missingSatellitePredictionError(Exception): def __init__(self): self.description = "predict did not return data for the satellite" def __str__(self): return self.description def aoslos(satname): lines = subprocess.check_output(['...
DrPaulBrewer/rtlsdr-automated-wxsat-capture
pypredict.py
Python
gpl-2.0
1,215
import nest import nest.raster_plot import numpy as np import pylab as pl nest.ResetKernel() nest.SetKernelStatus({"overwrite_files": True}) sim_time = 0. weight = [] if (not 'bcpnn_dopamine_synapse' in nest.Models()): #nest.Install('ml_module') nest.Install('/media/backup/temp_milner/save/17.10.14/modu...
pierreberthet/local-scripts
reduce_dopa.py
Python
gpl-2.0
4,102
import os import shlex import datetime import time import shutil from subprocess import Popen, PIPE home = "/home/tobias/" vm_config = " -XX:+PrintCodeCache " # Benchmark configurations dacapo_names = ("avrora", "batik", "fop", "h2", "jython", "luindex", "lusearch" ,"pmd", "sunflow", "tomcat", "tradebeans", "xalan") ...
TobiHartmann/hotspot
benchmarks/run_tests.py
Python
gpl-2.0
18,824
#!/usr/bin/env python # -*- coding:gbk -*- import sys import re import os import datetime import urllib import urllib2 from openpyxl import Workbook from openpyxl.reader.excel import load_workbook from internal.common import * from internal.ts_common import * #Èç¹ûÐèÒª¼Ç¼µ½csvÎļþÖУ¬ÐÞ¸Äaddcsv=1 addcsv = 0 prepath =...
yudingding6197/fin_script
batchHis.py
Python
gpl-2.0
2,384
from pyramid.security import NO_PERMISSION_REQUIRED def includeme(config): config.add_directive("add_cors_preflight_handler", add_cors_preflight_handler) config.add_route_predicate("cors_preflight", CorsPreflightPredicate) config.add_subscriber(add_cors_to_response, "pyramid.events.NewResponse") class ...
erral/eitbapi
eitbapi/cors.py
Python
gpl-2.0
1,856
# Author: Hubert Kario, (c) 2015 # Released under Gnu GPL v2.0, see LICENSE file for details """Test forcing of export ciphers in SSLv2""" from __future__ import print_function import traceback import sys import re from random import sample import getopt from tlsfuzzer.runner import Runner from tlsfuzzer.messages impo...
tomato42/tlsfuzzer
scripts/test-sslv2-force-export-cipher.py
Python
gpl-2.0
8,593
# -*- coding: utf-8 -*- """ Created on Tue Jan 12 11:57:45 2016 @author: katerinailiakopoulou """ import gensim import logging import sys logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) """ The Finder finds which words are similar to the one given based on the word2vec wo...
matzika/article-tagger-system
words_similarity_detector.py
Python
gpl-2.0
3,189
#-*- coding: utf-8 -*- """ Purevid urlresolver XBMC Addon Copyright (C) 2011 t0mm0, belese, JUL1EN094 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 Licen...
VioletRed/script.module.urlresolver
lib/urlresolver/plugins/purevid.py
Python
gpl-2.0
5,907
#!/usr/bin/env python3 # GStreamer Daemon - gst-launch on steroids # Python client library abstracting gstd interprocess communication # Copyright (c) 2015-2020 RidgeRun, LLC (http://www.ridgerun.com) # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the ...
RidgeRun/gstd-1.x
tests/libgstc/python/test_libgstc_python_list_elements.py
Python
gpl-2.0
2,117
#! /usr/bin/env python """ Distutils setup file for Scapy. """ from distutils import archive_util from distutils import sysconfig from distutils.core import setup from distutils.command.sdist import sdist import os EZIP_HEADER = """#! /bin/sh PYTHONPATH=$0/%s exec python -m scapy.__init__ """ def make_ezipfile(b...
kinap/scapy
setup.py
Python
gpl-2.0
2,657
import pytest from cobbler.cexceptions import CX from cobbler import module_loader from tests.conftest import does_not_raise @pytest.fixture(scope="function") def reset_modules(): module_loader.MODULE_CACHE = {} module_loader.MODULES_BY_CATEGORY = {} @pytest.fixture(scope="function") def load_modules(): ...
cobbler/cobbler
tests/module_loader_test.py
Python
gpl-2.0
5,203
''' Generates contour plot from 3 columns of data. ''' import sys import argparse import yaml import numpy as np from numpy.random import uniform import matplotlib as mpl import matplotlib.pyplot as plt from scipy.interpolate import griddata parser = argparse.ArgumentParser(description='Plots pmf data.') parser.add...
BobbyKim/plotting-scripts
plotcontour538.py
Python
gpl-2.0
2,703
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
50thomatoes50/blender.io_mqo
io_scene_mqo/export_mqo.py
Python
gpl-2.0
12,347
# -*- coding: utf-8 -*- # Copyright 2007 Joe Wreschnig # 2012-2016 Christoph Reiter # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limita...
elbeardmorez/quodlibet
quodlibet/gdist/__init__.py
Python
gpl-2.0
7,360
# -*- coding: utf-8 -*- # Copyright 2012, 2013 Christoph Reiter # # 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. impor...
elbeardmorez/quodlibet
quodlibet/quodlibet/util/dbusutils.py
Python
gpl-2.0
11,310
#!/usr/bin/env python # Transactional wrapping class to interact with an MPD Daemon. Leverages the # smarts of MPDClient2 python library. Stubbing out a lot of the common client from contextlib import contextmanager import logging from mpd import MPDClient, ConnectionError from os import environ log = logging.getLog...
PingPesto/BitList
bitlist/player.py
Python
gpl-3.0
1,319
# Generated by Django 2.0.2 on 2018-03-13 23:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('proposals', '0012_proposal_non_science'), ('sciapplications', '0016_remove_scienceapplication_moon'), ] ope...
LCOGT/valhalla
valhalla/sciapplications/migrations/0017_timerequest_semester.py
Python
gpl-3.0
605
from basetest import * from zfs_autobackup.LogStub import LogStub from zfs_autobackup.ExecuteNode import ExecuteError class TestZfsNode(unittest2.TestCase): def setUp(self): prepare_zpools() # return super().setUp() def test_consistent_snapshot(self): logger = LogStub() descr...
psy0rz/zfs_autobackup
tests/test_zfsnode.py
Python
gpl-3.0
8,088
import importlib import os import subprocess import math import itertools import random def eqValue(gbsv, pyv): return gbsv == str(pyv) def delete_files_in_dir(dir, exceptions=[]): for f in os.listdir(dir): if not f in exceptions: os.remove(os.path.join(dir, f)) def group(lst, n): ...
gobstones/PyGobstones-Lang
tests/utils.py
Python
gpl-3.0
3,644
#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from datetime import datetime # noqa from flask.sessions import SessionInterface, SessionMixin from werkzeug.contrib.sessions import Session as SessionBase, SessionStor...
NaN-tic/nereid
nereid/sessions.py
Python
gpl-3.0
3,596
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class Handler: def button_start_clicked_cb(self, button): print('Start') def button_open_project_clicked_cb(self, button): print('Project') def window_main_delete_event_cb(self, *args): Gtk.main...
alf3r/GidroGraf-Sirius
src/main_gui.py
Python
gpl-3.0
571
#PyInterstate by @pygeek import urllib2 import json class InterstateError(Exception): """Base class for Interstate App Exceptions.""" pass class AuthError(InterstateError): """Exception raised upon authentication errors.""" pass class IdError(InterstateError): """Raised when an operatio...
pygeek/PyInterstate
PyInterstate.py
Python
gpl-3.0
6,996
# This import registers the 3D projection, but is otherwise unused. from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import numpy as np fig = plt.figure() ax = fig.gca(projecti...
shucommon/little-routine
python/python-crash-course/matplot/surface3d.py
Python
gpl-3.0
842
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt import os import sys from lib.utils.dirs import * from lib.utils.printer import * from importlib import impor...
m4ll0k/Spaghetti
lib/handler/attacks.py
Python
gpl-3.0
687
# -*- coding: UTF-8 -*- """ muutama esimerkki komennoista """ import random, time, os from subprocess import call # tähän sanastoon lisätään komennot ja niitä vastaavat oliot command_dict = {} class Test: def main(self, irc, line): irc.send('PRIVMSG %s :Hell World!' % line[2]) command_dict[':!...
ETShax/Coffeebot
pybot/botcommands.py
Python
gpl-3.0
1,196
from vsg.rules import previous_line from vsg import token lTokens = [] lTokens.append(token.if_statement.if_keyword) class rule_031(previous_line): ''' This rule checks for blank lines or comments above the **if** keyword. In the case of nested **if** statements, the rule will be enfoced on the first *...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/if_statement/rule_031.py
Python
gpl-3.0
988
from pymongo import MongoClient from datetime import datetime class DB(object): def __init__(self): pass def init_app(self, app): self.db = MongoClient(host = app.config['DB_HOST'], port = app.config['DB_PORT'])[app.config['DB_NAME']] def get_channels(self, limi...
fcalo/bbqtv
bbqtv/services/db.py
Python
gpl-3.0
1,892
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ # # Copyright (C) 2015 The University of Memphis, # Arizona Board of Regents, # Regents of the University of California. # # This file is part of Mini-NDN. # See AUTHORS.md for a complete list of Mini-NDN authors an...
ndncomm/mini-ndn
ndn/experiments/integration_tests.py
Python
gpl-3.0
3,981
from pptp_auditor import main if __name__ == '__main__': main()
jsebechlebsky/pptp_auditor
pptp_auditor/__main__.py
Python
gpl-3.0
68
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
Pistachitos/Sick-Beard
sickbeard/notifiers/growl.py
Python
gpl-3.0
6,111
from django.utils.translation import ugettext_lazy as _ def get(): """ Site glossary. """ return { 'construction' : [ { 'term' : _('Bienes'), 'text' : _('Objetos o cosas susceptibles de apropiación (art. 333 CC). Los bienes son de domino público o de propied...
Ale-/grrr.tools
apps/views/glossary.py
Python
gpl-3.0
9,637
# -*- coding: utf-8 -*- # a template for making config.json files for functions #import pprint #pp = pprint.PrettyPrinter(indent=4) config = {} # human and machine readable names for the model config['id'] = {} config['id']['DOI'] = '10.1001/archinte.167.10.1068' # DOI tag '99.99...
doirisks/dori
models/10.1001:archinte.167.10.1068/config_gener_a.py
Python
gpl-3.0
6,742
""" Tests that look at the result of specific recipes in test_recipes These may depend on the exact random seed used to run the SLiM simulation. Individual recipes can be specified by decorating with @pytest.mark.parametrize('recipe', ['test_____my_specific_recipe.slim'], indirect=True) """ import msprime import numpy ...
MesserLab/SLiM
treerec/tests/test_specific_recipes.py
Python
gpl-3.0
6,364
import re from iota import * import praw import sqlite3 import random import string from iota.adapter.wrappers import RoutingWrapper import config import urllib.request from urllib.error import HTTPError import json import math node_address = config.node_address class api: def __init__(self,seed,prod=True): ...
normpad/iotatipbot
test/bot_api.py
Python
gpl-3.0
13,535
from Node import Node from Utils import Utils class Data: """description of class""" def __init__(self): pass @staticmethod def cities(): neighbors = {'Arad':('Sibiu','Timisoara','Zerind'),'Zerind':('Arad','Oradea'),'Oradea':('Sibiu','Zerind'),'Timisoara':('Arad','Lugoj'),'Lugoj':('Mehadia','...
pedropva/AIprojects
sources/Data.py
Python
gpl-3.0
5,965
#! /usr/bin/env python # Python script to parse SMStext messages from a Windows 8.0 phone's store.vol file # Author: cheeky4n6monkey@gmail.com (Adrian Leong) # # Special Thanks to Detective Cindy Murphy (@cindymurph) and the Madison, WI Police Department (MPD) # for the test data and encouragement. # Thanks also to Jo...
WindowsPhoneForensics/find_my_texts_wp8
find_my_texts_wp8/wp8_sms_integrated.py
Python
gpl-3.0
24,866