text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
from ... import Endpoint, UrlConfig class TftEndpoint: def __init__(self, url: str, **kwargs): self._url = f"/tft{url}" def __call__(self, **kwargs): final_url = f"{UrlConfig.tft_url}{self._url}" endpoint = Endpoint(final_url, **kwargs) return endpoint(**kwargs)
pseudonym117/Riot-Watcher
src/riotwatcher/_apis/team_fight_tactics/urls/TftEndpoint.py
Python
mit
307
0
# Copyright (2021) Binovo IT Human Project SL # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import base64 from enum import Enum from odoo import models, fields, api, _ from ..lroe.lroe_xml_schema import LROEXMLSchema,\ LROEXMLSchemaModeNotSupported,\ LROEOperationTypeEnum from .lroe_operation...
factorlibre/l10n-spain
l10n_es_ticketbai_api_batuz/models/lroe_operation_response.py
Python
agpl-3.0
16,313
0.001533
""" (c) Copyright 2014. All Rights Reserved. qball module setup and package. """ from setuptools import setup setup( name='qball', author='Matt Ferrante', author_email='mferrante3@gmail.com', description='Python integration for qball', license='(c) Copyright 2014. All Rights Reserved.', packa...
ferrants/qball-python
setup.py
Python
mit
547
0.003656
# vim: set fileencoding=utf-8 : # GNU Solfege - free ear training software # Copyright (C) 2009, 2011 Tom Cato Amundsen # # 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...
allancarlos123/Solfege
solfege/fpeditor.py
Python
gpl-3.0
34,015
0.003381
#!/usr/bin/env python """Generate AMBA AHB specifications for given number of masters. Translated and adapted from Perl original distributed with Anzu. https://www.iaik.tugraz.at/content/research/opensource/anzu/#download """ import argparse import math from omega.logic.syntax import conj def build_state_str(sta...
johnyf/gr1experiments
examples/jcss12/amba_generator.py
Python
bsd-3-clause
15,381
0.00013
import pyowm owm = pyowm.OWM('fa7813518ed203b759f116a3bac9bcce') observation = owm.weather_at_place('London,uk') w = observation.get_weather() wtemp = str(w.get_temperature('celsius')) print(wtemp.strip('{}')) wtemp_list = list(wtemp) print(wtemp_list)
cmac4603/Home-Utilities-App
wx_str_test.py
Python
gpl-2.0
253
0.003953
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # 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 l...
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/network/bridgegroup_nsip6_binding.py
Python
apache-2.0
7,494
0.037764
# =========================================================================== # eXe config # Copyright 2004-2006, University of Auckland # # 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...
kohnle-lernmodule/KITexe201based
exe/engine/config.py
Python
gpl-2.0
25,533
0.005953
# Copyright 2014 Modelling, Simulation and Design Lab (MSDL) at # McGill University and the University of Antwerp (http://msdl.cs.mcgill.ca/) # # 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...
kdheepak89/pypdevs
test/test_realtime.py
Python
apache-2.0
1,022
0.001957
#!/usr/bin/env python3 import csv import argparse FLAG = None def write_file(feats,lab_list, fn): with open(fn,'w') as f: for num, i in enumerate(feats): for j in range(len(i)): f.write(str(i[j]) + ',') f.write(str([len(i)-1]) + '\n') return def transform(...
hoaaoh/Audio2Vec
src/trans_len.py
Python
apache-2.0
1,528
0.013089
#!/usr/bin/env python '''Simple viewer for DDS texture files. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from ctypes import * import getopt import sys import textwrap from SDL import * from pyglet.gl.VERSION_1_1 import * import pyglet.dds import pyglet.event import pyglet.image import pyglet.sprit...
shaileshgoogler/pyglet
tools/ddsview.py
Python
bsd-3-clause
4,680
0.002564
""" Converts argparse parser actions into json "Build Specs" """ import argparse from argparse import ( _CountAction, _HelpAction, _StoreConstAction, _StoreFalseAction, _StoreTrueAction, ArgumentParser, _SubParsersAction) from collections import OrderedDict from functools import partial VALID_WIDGETS = (...
lrq3000/pyFileFixity
pyFileFixity/lib/gooey/python_bindings/argparse_to_json.py
Python
mit
5,242
0.013163
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/jax
jax/interpreters/ad.py
Python
apache-2.0
32,505
0.012121
tile = [[0,1,4,5], [2,3,6,7], [8,9,12,13], [10,11,14,15]] shift = 0 align = 1 value = 0L holder = [] import sys basemask = [0x fd = sys.stdout indent = " "*9 for c in range(4): fd.write(indent + "*pdst++ = \n"); for l,line in enumerate(tile): fd.write(indent + " %s_mm_shuffle_epi8(line%d, (__m128i){"...
zcbenz/cefode-chromium
third_party/mesa/MesaLib/src/gallium/drivers/llvmpipe/lp_tile_shuffle_mask.py
Python
bsd-3-clause
716
0.111732
import asyncio import colorsys import enum import functools import psmove import time import traceback import random SETTINGSFILE = 'joustsettings.yaml' #Human speeds[slow, mid, fast] #SLOW_WARNING = [0.1, 0.15, 0.28] #SLOW_MAX = [0.25, 0.8, 1] #FAST_WARNING = [0.5, 0.6, 0.8] #FAST_MAX = [1, 1.4, 1.8] SLOW_WARNING =...
aangert/PiParty
common.py
Python
mit
5,854
0.01247
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
ressu/SickGear
sickbeard/search.py
Python
gpl-3.0
30,487
0.004395
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as publish...
rogerscristo/BotFWD
env/lib/python3.6/site-packages/telegram/ext/typehandler.py
Python
mit
4,005
0.003745
# -*- coding: utf-8 -*- import sys import time from config import Config from multiprocessing import managers, connection def _new_init_timeout(): return time.time() + 0.2 sys.modules['multiprocessing'].__dict__['managers'].__dict__['connection']._init_timeout = _new_init_timeout from multiprocessing.manage...
noah/riddim
lib/data.py
Python
mit
674
0.014837
class Floor_Object(object): """docstring for Floor_Object""" def __init__(self, coordinates, icon, name, interactions, description): super(Floor_Object, self).__init__() self.coordinates = coordinates self.icon = icon self.name = name self.interactions = interactions self.description = description class ...
Otterpaw/Python-Roguelike
floor_object.py
Python
mit
920
0.029348
import json import urllib2 import time import math from pymongo import MongoClient from pymongo import ASCENDING, DESCENDING def debug(info): print info def log(info): print info def parseJson(url): try: data = json.load(urllib2.urlopen(url)) return data except ValueError as e: ...
hethune/tutorials
pymongo/openweathermap.py
Python
mit
1,579
0.008233
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import frappe, unittest from frappe.defaults import * class TestDefaults(unittest.TestCase): def test_global(self): clear_user_default("key1") set_global_default("key1", "value1") self.assertEqual(get_global_defaul...
frappe/frappe
frappe/tests/test_defaults.py
Python
mit
2,355
0.022505
from nose.tools import eq_ from django.test.client import RequestFactory from airmozilla.base.tests.testbase import DjangoTestCase from airmozilla.base.helpers import abs_static, show_duration class TestAbsStaticHelpers(DjangoTestCase): def tearDown(self): super(TestAbsStaticHelpers, self).tearDown() ...
tannishk/airmozilla
airmozilla/base/tests/test_helpers.py
Python
bsd-3-clause
3,664
0
# Copyright 2017 The Cobalt Authors. All Rights Reserved. # # 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 ...
youtube/cobalt
cobalt/bindings/path_generator.py
Python
bsd-3-clause
7,751
0.004774
from Tkinter import * root = Tk() root.title('first test window') #root.geometry('300x200') frm = Frame(root) frm_l = Frame(frm) Label(frm_l, text='left_top').pack(side=TOP) Label(frm_l, text='left_bottom').pack(side=BOTTOM) frm_l.pack(side=LEFT) frm_r = Frame(frm) Label(frm_r, text='right_top').pack(side=TOP) Label...
NUPT-Pig/python_test
tkinter_gui.py
Python
gpl-2.0
1,385
0.012274
import json import threading import time import traceback import urllib from vtdb import cursor from vtdb import dbexceptions import environment import framework class TestStream(framework.TestCase): def tearDown(self): self.env.conn.begin() self.env.execute("delete from vtocc_big") self.env.conn.commi...
anusornc/vitess
test/queryservice_tests/stream_tests.py
Python
bsd-3-clause
6,435
0.014452
from __future__ import print_function, unicode_literals import importlib import os import sys from django.apps import apps from django.db.models.fields import NOT_PROVIDED from django.utils import datetime_safe, six, timezone from django.utils.six.moves import input from .loader import MIGRATIONS_MODULE_NAME class...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/django/db/migrations/questioner.py
Python
agpl-3.0
7,694
0.002339
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("DecisionTreeClassifier" , "BinaryClass_10" , "db2")
antoinecarme/sklearn2sql_heroku
tests/classification/BinaryClass_10/ws_BinaryClass_10_DecisionTreeClassifier_db2_code_gen.py
Python
bsd-3-clause
149
0.013423
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from preggy import expect from tornado.testing import gen_test from...
thumbor/thumbor
tests/filters/test_watermark.py
Python
mit
10,644
0.000188
# -*- coding: utf-8 -*- """ CommandLine: python -m ibeis.gui.inspect_gui --test-test_review_widget --show """ from __future__ import absolute_import, division, print_function, unicode_literals from functools import partial from ibeis.viz import viz_helpers as vh import guitool_ibeis as gt import numpy as np import ...
Erotemic/ibeis
ibeis/gui/id_review_api.py
Python
apache-2.0
32,750
0.003908
import matplotlib.pyplot as plt import numpy as np import scalpplot from scalpplot import plot_scalp from positions import POS_10_5 from scipy import signal def plot_timeseries(frames, time=None, offset=None, color='k', linestyle='-'): frames = np.asarray(frames) if offset == None: offset = np.max(np.std(frame...
breuderink/psychic
psychic/plots.py
Python
bsd-3-clause
1,878
0.014377
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
minesense/VisTrails
vistrails/packages/spreadsheet/init.py
Python
bsd-3-clause
8,965
0.004016
# -*- coding: utf-8 -*- # # 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 ...
KL-WLCR/incubator-airflow
tests/operators/sensors.py
Python
apache-2.0
11,787
0.000339
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # 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 o...
BladeSmithJohn/nixysa
nixysa/cpp_utils_unittest.py
Python
apache-2.0
1,879
0.002661
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
nop33/indico
indico/modules/networks/util.py
Python
gpl-3.0
1,020
0
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
sxjscience/tvm
python/tvm/relay/op/contrib/arm_compute_lib.py
Python
apache-2.0
12,300
0.000976
#!/usr/bin/env python from distutils.core import setup setup(name='minimalisp', version='1.0', description='An implementation of a small lisp language', author='Joe Jordan', author_email='tehwalrus@h2j9k.org', url='https://github.com/joe-jordan/minimalisp', packages=['minimalisp'], scripts...
joe-jordan/minimalisp
setup.py
Python
mit
377
0.023873
def get_related_fields(model): pass def get_table_size(model): pass def get_row_size(model): pass
unbracketed/snowbird
snowbird/analyzer.py
Python
mit
112
0.017857
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Test.content' db.alter_column(u'itest_test', 'content'...
xuender/test
testAdmin/itest/migrations/0006_auto__chg_field_test_content.py
Python
apache-2.0
1,755
0.006838
from PyQt5.QtCore import pyqtSignal from PyQt5.QtGui import QDragEnterEvent, QDropEvent from urh.signalprocessing.IQArray import IQArray from urh.cythonext import util from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer from urh.signalprocessing.Signal import Signal from urh.ui.painting.SignalSceneMana...
jopohl/urh
src/urh/ui/views/ZoomAndDropableGraphicView.py
Python
gpl-3.0
2,692
0.000743
""" Database Models Library """ from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() # Model to store information about devices class Device(db.Model): __tablename__ = 'clients' id = db.Column(db.Integer, primary_key = True) name = db.Column(db.Text) api_key = db.Column(db.Text) active ...
How2Compute/SmartHome
hub/Models.py
Python
mit
2,593
0.008484
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # 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; eith...
prculley/gramps
gramps/gui/editors/__init__.py
Python
gpl-2.0
4,028
0.001986
#!/usr/bin/env python from __future__ import absolute_import import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "service.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
peragro/peragro-rest
manage.py
Python
bsd-3-clause
289
0
#_PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)_ #_PYTHON_INSERT_GPL_LICENSE_HERE_ from numpy import arange import sherpa.models.basic as basic from sherpa.utils import SherpaFloat, SherpaTestCase from sherpa.models.model import ArithmeticModel def userfunc(pars, x, *args, **kwargs): return x class test_basic(SherpaTes...
brefsdal/sherpa
sherpa/models/tests/test_basic.py
Python
gpl-2.0
1,765
0.005099
from devassistant.command_runners import CommandRunner from devassistant.logger import logger class CR1(CommandRunner): @classmethod def matches(cls, c): return c.comm_type == 'barbarbar' @classmethod def run(cls, c): logger.info('CR1: Doing something ...') x = c.input_res + 'b...
phracek/devassistant
test/fixtures/files/crt/commands/a.py
Python
gpl-2.0
609
0.001642
# # TESTS # from nose.tools import assert_true, assert_equal, assert_raises from mixedges import Edges, EdgeKeys, EdgeData, EdgeItems class BaseEdgeTests(object): def setup_edges(self): self.edlist = [{1:"one"}, {1:"two"}, {1:"three"}, {1:"four"}] ed1, ed2, ed3, ed4 = self.edlist Ge = se...
hagberg/nx3k
test_edges.py
Python
bsd-3-clause
4,105
0.031425
#!/usr/bin/python # Copyright (C) 2013 rapidhere # # Author: rapidhere <rapidhere@gmail.com> # Maintainer: rapidhere <rapidhere@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, ...
rapidhere/snake_game
snake_game.py
Python
gpl-3.0
1,496
0.012032
# $HeadURL$ __RCSID__ = "$Id$" # # VM_WEB_OPERATION = "VmWebOperation" # VM_RPC_OPERATION = "VmRpcOperation" #............................................................................... #EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF
xianghuzhao/VMDIRAC
VMDIRAC/Security/VmProperties.py
Python
gpl-3.0
268
0.011194
import unittest2 import helper import simplejson as json from nose.plugins.attrib import attr PORTAL_ID = 62515 class ListsClientTest(unittest2.TestCase): """ Unit tests for the HubSpot List API Python wrapper (hapipy) client. This file contains some unittest tests for the List API. Questions, comme...
jonathan-s/happy
happy/test/test_lists.py
Python
apache-2.0
11,513
0.001042
# Environment configuration # Copyright (c) 2016, Tieto Corporation # # This software may be distributed under the terms of the BSD license. # See README for more details. # # Currently static definition, in the future this could be a config file, # or even common database with host management. # import logging logge...
s0lst1c3/eaphammer
local/hostapd-eaphammer/tests/remote/config.py
Python
gpl-3.0
3,543
0.011572
from unittest import TestCase import dogma from test_dogma_values import * class TestDogmaExtra(TestCase): def test(self): ctx = dogma.Context() slot = ctx.add_module(TYPE_125mmGatlingAutoCannonII) loc = dogma.Location.module(slot) affectors = ctx.get_affectors(loc) ctx....
jboning/python-dogma
test_dogma_extra.py
Python
agpl-3.0
1,477
0.00677
import datetime from django.contrib.gis.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.core import exceptions from django.db.models import Q from django.conf import settings from django_date_extensions.fields import ApproximateDa...
mysociety/polipop
polipop/popit/models/positions.py
Python
agpl-3.0
7,783
0.010022
a = int(input()) s = "odd" s1 = "even" for i in range(1, a): if i%2==0 : print(str(i) + " even") else: print(str(i)+" odd")
alekseik1/python_mipt_study_1-2
1sem/lesson_1/1.py
Python
gpl-3.0
138
0.043478
import argparse, json import boto3 from boto.mturk.connection import MTurkConnection from boto.mturk.qualification import * from jinja2 import Environment, FileSystemLoader """ A bunch of free functions that we use in all scripts. """ def get_jinja_env(config): """ Get a jinja2 Environment object that we can use...
choltz95/story-understanding-amt
simpleamt.py
Python
mit
2,932
0.011596
"""AutoComplete.py - An IDLE extension for automatically completing names. This extension can complete either attribute names of file names. It can pop a window with all available names, for the user to select from. """ import os import sys import string from configHandler import idleConf import AutoCompleteWindow f...
leighpauls/k2cro4
third_party/python_26/Lib/idlelib/AutoComplete.py
Python
bsd-3-clause
9,041
0.000553
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob 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, either version 3 of the License, or # (at your...
blckshrk/Weboob
weboob/tools/application/qt/qt.py
Python
agpl-3.0
13,100
0.001221
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
timj/scons
test/QT/installed.py
Python
mit
5,726
0.001921
""" Linux on Hyper-V and Azure Test Code, ver. 1.0.0 Copyright (c) Microsoft Corporation All rights reserved 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/LICEN...
adriansuhov/lis-test
WS2012R2/lisa/Infrastructure/lisa-parser/lisa_parser/file_parser.py
Python
apache-2.0
38,829
0.00376
#!/usr/bin/python3 # # Copyright 2018 Google LLC # # 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 a...
GoogleCloudPlatform/healthcare
fhir/immunizations_demo/inference/main.py
Python
apache-2.0
10,155
0.008075
# Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) """ defines few algorithms, that deals with different properties of C++ types Do you aware of boost::type_traits library? pygc...
eile/ITK
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits.py
Python
apache-2.0
44,926
0.02838
def check(msg): if msg == 'hello': print(hello) else: print(goodbye) check('greetings')
erc7as/cs3240-labdemo
check.py
Python
mit
94
0.06383
az.plot_dist(b, rug=True, quantiles=[.25, .5, .75], cumulative=True)
mcmcplotlib/mcmcplotlib
api/generated/arviz-plot_dist-5.py
Python
apache-2.0
69
0
#!/usr/bin/python import os from setuptools import setup, find_packages SRC_DIR = os.path.dirname(__file__) CHANGES_FILE = os.path.join(SRC_DIR, "CHANGES") with open(CHANGES_FILE) as fil: version = fil.readline().split()[0] setup( name="state-machine-crawler", description="A library for following autom...
gurunars/state_machine_crawler
setup.py
Python
apache-2.0
812
0
# This file is part of jobservice. # Copyright 2010 Jacob Peddicord <jpeddicord@ubuntu.com> # # jobservice 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)...
jpeddicord/jobservice
JobService/policy.py
Python
gpl-3.0
2,319
0.004743
from sys import maxsize class Contact: def __init__(self, Firstname=None, Middlename=None, Lastname=None, Nickname=None, Title=None, Company=None, Address=None, Home=None, Mobile=None, Work=None, Fax=None, Email=None, Email2=None, Email3=None, Homepage=None, Bday=None, Bmonth=None, Byear=Non...
IrinaZI/Python_training
model/contact.py
Python
apache-2.0
1,808
0.005531
""" Estimation of the total magnetization vector of homogeneous bodies. It estimates parameters related to the magnetization vector of homogeneous bodies. **Algorithms** * :class:`~fatiando.gravmag.magdir.DipoleMagDir`: This class estimates the Cartesian components of the magnetization vector of homogeneous dipo...
eusoubrasileiro/fatiando
fatiando/gravmag/magdir.py
Python
bsd-3-clause
7,336
0
#!/usr/bin/env python # # asn2wrs.py # ASN.1 to Wireshark dissector compiler # Copyright 2004 Tomas Kukosa # # 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 # ...
weinrank/wireshark
tools/asn2wrs.py
Python
gpl-2.0
308,942
0.01106
#!/usr/bin/env python # vim:fileencoding=utf-8:noet from __future__ import unicode_literals import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.rst'), 'rb').read().decode('utf-8') except IOError: README = ''...
keelerm84/powerline
setup.py
Python
mit
931
0.026853
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-11-22 07:11 from __future__ import unicode_literals from django.core.management.sql import emit_post_migrate_signal from django.db import migrations def add_executive_group(apps, schema_editor): # create group db_alias = schema_editor.connection.al...
uclouvain/osis_louvain
base/migrations/0208_create_role_executive.py
Python
agpl-3.0
935
0.003209
# Twitter profile image updater # http://twitter.com/account/update_profile_image.json # image = [imagefile] import sys import os import random import re import urllib import json import urllib2 import oauth2 as oauth import time import wcommon def encode_file_data(image): boundary = hex(int(time.time()))[2:] he...
mhielscher/wasabiscripts
twitterpic.py
Python
bsd-2-clause
1,695
0.020649
# ptext module: place this in your import directory. # ptext.draw(text, pos=None, **options) # Please see README.md for explanation of options. # https://github.com/cosmologicon/pygame-text from __future__ import division from math import ceil, sin, cos, radians, exp import pygame DEFAULT_FONT_SIZE = 2...
gentooza/Freedom-Fighters-of-Might-Magic
src/gamelib/gummworld2/pygametext.py
Python
gpl-3.0
21,402
0.00271
# -*- coding: utf-8 -*- """ equip.analysis.flow ~~~~~~~~~~~~~~~~~~~ Extract the control flow graphs from the bytecode. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ import opcode from operator import itemgetter, attrgetter from itertools import tee,...
neuroo/equip
equip/analysis/flow.py
Python
apache-2.0
18,228
0.012783
import os import time import hashlib import logging from base64 import b64encode from collections import OrderedDict, defaultdict from twisted.internet.task import LoopingCall from twisted.internet.defer import Deferred from dispersy.authentication import MemberAuthentication from dispersy.candidate import Candidate ...
Tribler/decentralized-mortgage-market
market/community/blockchain/community.py
Python
gpl-3.0
30,409
0.00342
from __future__ import absolute_import import os.path from dpark.util import get_logger logger = get_logger(__name__) # workdir used in slaves for internal files # DPARK_WORK_DIR = '/tmp/dpark' if os.path.exists('/dev/shm'): DPARK_WORK_DIR = '/dev/shm,/tmp/dpark' # uri of mesos master, host[:5050] or or zk://.....
windreamer/dpark
dpark/conf.py
Python
bsd-3-clause
991
0.001009
import cPickle as pickle import numpy as np import re from math import log from dic import Info from config.config import config from tools import tokenlize, comp_tuple, weights class query_voc(object): def __init__(self, tokens, dic): self.tokens = tokens self.dic = dic class query_entry(objec...
Impavidity/SearchEngine
WebSite/engine/query.py
Python
mit
3,939
0.001269
''' Created on 21 Dec 2013 @author: huw ''' from ConfigParser import ConfigParser class TftpudSettings: ''' A class to hold the settings for the TftpudServerGui application. ''' def __init__(self): ''' Constructor ''' self.saveLastUsed = False self.defaultDir...
javert/tftpudGui
src/tftpudgui/qt4/TftpudSettings.py
Python
mit
2,975
0.005714
# -*- coding: utf-8 -*- # EDIS - a simple cross-platform IDE for C # # This file is part of Edis # Copyright 2014-2015 - Gabriel Acosta <acostadariogabriel at gmail> # License: GPLv3 (see http://www.gnu.org/licenses/gpl.html) from PyQt4.Qsci import QsciLexerCPP from PyQt4.QtGui import QColor from src import editor_sc...
centaurialpha/edis
src/ui/editor/lexer.py
Python
gpl-3.0
2,435
0.000411
import pytest from unittest.mock import patch from case import mock from kombu import Connection class test_get_manager: @mock.mask_modules('pyrabbit') def test_without_pyrabbit(self): with pytest.raises(ImportError): Connection('amqp://').get_manager() @mock.module_exists('pyrabbi...
ZoranPavlovic/kombu
t/unit/utils/test_amq_manager.py
Python
bsd-3-clause
1,196
0
# Script Version: 1.0 # Author: Te Chen # Project: AMA3D # Task Step: 1 import sys import urllib2 import time VERSION = '4.0.0' def prepare_cath(): ver = VERSION.replace('.', '_') download_file(ver, 'CathDomainList') download_file(ver, 'CathNames') download_file(ver, 'CathDomainDescriptionFile') def download_fil...
teheavy/AMA3D
Nh3D/1_AMA3D_start.py
Python
gpl-2.0
1,285
0.035798
''' This script helps you scrap stock data avaliable on Bloomberg Finance and store them locally. Please obey applicable local and federal laws and applicable API term of use when using this scripts. I, the creater of this script, will not be responsible for any legal issues resulting from the use of this script. @au...
Michael-Tu/tools
stock_scraping/stock_price_scraping_to_local.py
Python
mit
2,169
0.003688
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Stefan Mauerberger" __copyright__ = "Copyright (C) 2017 Stefan Mauerberger" __license__ = "GPLv3" import numpy as np from sys import stdout from matplotlib import pyplot as plt from matplotlib import animation from plotting import prepare_map, lllat, lllon,...
mauimuc/gptt
src/animation.py
Python
gpl-3.0
2,920
0.012671
class Solution(object): def minPathSum(self, grid): """ :type grid: List[List[int]] :rtype: int """ if not grid or not grid[0]: return 0 m = len(grid) n = len(grid[0]) dp = [] for _ in range(m): dp.append([None] * (n)) ...
daicang/Leetcode-solutions
064-minimum-path-sum.py
Python
mit
877
0.002281
from django.test import TestCase from morelia.decorators import tags from smarttest.decorators import no_db_testcase from tasks.factories import TaskFactory, UserFactory @no_db_testcase @tags(['unit']) class TaskGetAbsoluteUrlTest(TestCase): ''' :py:meth:`tasks.models.Task.get_absolute_url` ''' def test_sh...
dryobates/testing_django
todo/tasks/tests/test_models.py
Python
mit
601
0
"""Offers a simple XML-RPC dispatcher for django_xmlrpc Author:: Graham Binns Credit must go to Brendan W. McAdams <brendan.mcadams@thewintergrp.com>, who posted the original SimpleXMLRPCDispatcher to the Django wiki: http://code.djangoproject.com/wiki/XML-RPC New BSD License =============== Copyright (c) 2007, ...
gnowgi/gnowsys-studio
gstudio/xmlrpc/dispatcher.py
Python
agpl-3.0
3,078
0.00065
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
var/spack/repos/builtin/packages/gmp/package.py
Python
lgpl-2.1
2,575
0.000388
# -*- coding: utf-8 -*- # 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, softw...
openstack/python-tripleoclient
tripleoclient/tests/workflows/test_baremetal.py
Python
apache-2.0
19,069
0
#!/usr/bin/env python # # This file is part of the SSM_LinearArray (Sound Sources Mapping # using a Linear Microphone Array) # developed by Daobilige Su <daobilige DOT su AT student DOT uts DOT edu DOT au> # # This file is under the GPLv3 licence. # import rospy from std_msgs.msg import String from std_msgs.msg impo...
daobilige-su/SSM_LinearArray
ROS/SSM_LinearArray/scripts/ps3_driver.py
Python
gpl-3.0
1,741
0.013211
from __future__ import unicode_literals from logging import getLogger from django.conf import settings from django.core.cache import cache from django.views.generic import View from django.http import JsonResponse, HttpResponseBadRequest from django.template.defaultfilters import slugify from ratelimit.mixins import ...
AASHE/hub
hub/apps/api/views.py
Python
mit
3,271
0
# # LMirror is Copyright (C) 2010 Robert Collins <robertc@robertcollins.net> # # LMirror 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 # versio...
rbtcollins/lmirror
l_mirror/tests/test_logging_support.py
Python
gpl-3.0
2,180
0.004128
# -*- coding: utf-8 -*- # Copyright(C) 2012-2019 Budget Insight # yapf-compatible from weboob.browser import AbstractBrowser class NetfincaBrowser(AbstractBrowser): PARENT = 'netfinca' BASEURL = 'https://www.cabourse.credit-agricole.fr'
laurentb/weboob
modules/cragr/netfinca_browser.py
Python
lgpl-3.0
251
0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # 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.apach...
itskewpie/tempest
tempest/api/identity/base.py
Python
apache-2.0
6,216
0.000161
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
tylertian/Openstack
openstack F/cinder/cinder/tests/test_skip_examples.py
Python
apache-2.0
1,837
0
from concurrent.futures import ThreadPoolExecutor import os import re import gzip try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import logging import mimetypes from collections import defaultdict from flask import url_for as flask_url_for from flask import current_app, r...
spoqa/flask-s3
flask_s3.py
Python
mit
12,801
0.002734
# Generated by Django 2.1 on 2018-08-13 08:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ibms', '0006_auto_20180813_1603'), ] operations = [ migrations.RenameField( model_name='serviceprioritymappings', old_name='co...
parksandwildlife/ibms
ibms_project/ibms/migrations/0007_auto_20180813_1604.py
Python
apache-2.0
391
0
import numpy as np from scipy.interpolate import interp1d from astropy.io import ascii from astropy import units as u from newdust import constants as c from newdust.graindist.composition import _find_cmfile __all__ = ['CmSilicate'] RHO_SIL = 3.8 # g cm^-3 class CmSilicate(object): """ | **ATTRIBUTES...
eblur/newdust
newdust/graindist/composition/cmsilicate.py
Python
bsd-2-clause
3,341
0.00419
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 ...
supunkamburugamuve/mooc2
controllers/lessons.py
Python
apache-2.0
12,062
0.00257
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' group_l10n_in_reseller = fields.Boolean(implied_group='l10n_in.group_l10n_in_reseller', str...
ddico/odoo
addons/l10n_in/models/res_config_settings.py
Python
agpl-3.0
355
0.002817
from __future__ import print_function import flask import os import threading import time import webbrowser from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop _basedir = os.path.join("..", os.path.dirname(__file__)) app = flask.Flask(__name__, static...
phobson/bokeh
sphinx/docserver.py
Python
bsd-3-clause
1,749
0.005146
""" Regression tests for rescinding outstanding subscription requests. """ from twisted.words.protocols.jabber.client import IQ from servicetest import (EventPattern, wrap_channel, assertLength, assertEquals, call_async, sync_dbus) from hazetest import exec_test import constants as cs import ns jid = 'marco@...
fcrozat/telepathy-haze
tests/twisted/roster/removed-from-rp-subscribe.py
Python
gpl-2.0
6,175
0.002591
from django.core import formfields, validators from django.core.mail import mail_admins, mail_managers from django.core.exceptions import Http404, ObjectDoesNotExist from django.core.extensions import DjangoContext, render_to_response from django.models.auth import users from django.models.comments import comments, fre...
tungvx/deploy
Django-0.90/django/contrib/comments/views/comments.py
Python
apache-2.0
16,510
0.006481
import unittest from unittest.mock import patch, MagicMock from twitchcancer.api.pubsubmanager import PubSubManager # PubSubManager.instance() class TestPubSubManagerInstance(unittest.TestCase): # check that we only store one instance of any topic @patch('twitchcancer.api.pubsubmanager.PubSubManager.__new__...
Benzhaomin/TwitchCancer
twitchcancer/api/tests/test_pubsubmanager.py
Python
gpl-3.0
4,912
0.000611