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
# Copyright (c) 2017 Microsoft Corporation. # # 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, publis...
village-people/flying-pig
malmopy/util/util.py
Python
mit
2,334
from pythonforandroid.toolchain import CompiledComponentsPythonRecipe, warning class PyRXPURecipe(CompiledComponentsPythonRecipe): version = '2a02cecc87b9' url = 'https://bitbucket.org/rptlab/pyrxp/get/{version}.tar.gz' depends = ['python2'] patches = [] recipe = PyRXPURecipe()
wexi/python-for-android
pythonforandroid/recipes/pyrxp/__init__.py
Python
mit
296
from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import Http404 class StaffRequiredMixin(object): @classmethod def as_view(self, *args, **kwargs): vie...
elegant-solutions/django-webstore
products/mixins.py
Python
mit
1,029
#!/usr/bin/env python # Copyright (c) 2015 Antoine Catton # See the LICENSE.txt file. import tempfile import os import unittest import subprocess import contextlib import signal import six from spm import run, pipe, propagate_env class TempFileMixin(object): def setUp(self): super(TempFileMixin, self).s...
acatton/python-spm
test_spm.py
Python
mit
4,624
import unittest from test import support import gc import weakref import operator import copy import pickle from random import randrange, shuffle import sys import warnings import collections class PassThru(Exception): pass def check_pass_thru(): raise PassThru yield 1 class BadCmp: def __hash__(self...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/test/test_set.py
Python
mit
63,683
""" pareto_front.py: tools for building a pareto front in multi-objective optimization Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012 """ def dominates(a,b): dominating = False for i in range(len(a)): if a[i] > b[i]: return False if a[i] < b[i]: dominating = ...
SCIP-Interfaces/PySCIPOpt
examples/unfinished/pareto_front.py
Python
mit
1,143
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-11-01 22:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0038_contentnode_author'), ] operations = [ migrations.Al...
jonboiser/content-curation
contentcuration/contentcuration/migrations/0039_auto_20161101_1555.py
Python
mit
1,012
""" Provides the ability to run test on a standalone Django app. """ import sys from optparse import OptionParser from settings import configure_settings # Configure the default settings configure_settings() # Django nose must be imported here since it depends on the settings being configured from django_nose impor...
ambitioninc/django-issue
run_tests.py
Python
mit
832
# taken (with minor modifications) from pycoin # https://github.com/richardkiss/pycoin/blob/01b1787ed902df23f99a55deb00d8cd076a906fe/pycoin/ecdsa/native/secp256k1.py import os import sys import traceback import ctypes from ctypes.util import find_library from ctypes import ( byref, c_byte, c_int, c_uint, c_char_p,...
fujicoin/electrum-fjc
electrum/ecc_fast.py
Python
mit
9,903
# encoding: utf-8 """Release information about Marrow Schema.""" from collections import namedtuple version_info = namedtuple('version_info', ('major', 'minor', 'micro', 'releaselevel', 'serial'))(1, 0, 0, 'alpha', 1) version = ".".join([str(i) for i in version_info[:3]]) + ((version_info.releaselevel[0] + str(vers...
marrow/task
marrow/task/release.py
Python
mit
640
# -*- coding: utf-8 -*- from pandas import compat import nose from distutils.version import LooseVersion from numpy import nan import numpy as np from pandas import Series, DataFrame from pandas.compat import product from pandas.util.testing import (assert_frame_equal, assert_series_equal) import pandas.util.testing...
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tests/test_stats.py
Python
gpl-2.0
6,481
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QuantumGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush....
polymeris/qgis
python/plugins/db_manager/db_plugins/connector.py
Python
gpl-2.0
6,062
""" Exception subclasses specific to docker subtests """ # Pylint runs from a different directory, it's fine to import this way # pylint: disable=W0403 # The exception names don't need docstrings # pylint: disable=C0111 # Some code runs deep, many ancestors actually needed # pylint: disable=R0901 from autotest.clie...
afomm/autotest-docker
dockertest/xceptions.py
Python
gpl-2.0
3,713
import collections import fibbingnode import utils as _u log = fibbingnode.log class CrossOptimizer(object): def __init__(self, solver): self.solver = solver def solve(self, graph, requirements): lsas = self.solver.solve(graph, requirements) grouped_lsas = collections.defaultdict(li...
Fibbing/FibbingNode
fibbingnode/algorithms/cross_optimizer.py
Python
gpl-2.0
949
# OeQ autogenerated correlation for 'Window/Wall Ratio South in Correlation to the Building Age' import math import numpy as np from . import oeqCorrelation as oeq def get(*xin): # OeQ autogenerated correlation for 'Window to Wall Ratio in Southern Direction' A_WIN_S_BY_AW= oeq.correlation( const= -13703....
UdK-VPT/Open_eQuarter
mole3/stat_corr/window_wall_ratio_south_LMFH_by_building_age_correlation.py
Python
gpl-2.0
520
# -*- coding: iso-8859-15 -*- import unittest import time import sys from selenium import webdriver DRIVER = None def getOrCreateWebdriver(): global DRIVER DRIVER = DRIVER or webdriver.Firefox() return DRIVER def suite(): test_suite = unittest.TestSuite() test_suite.addTest(unittest.defaultTestLoader.load...
virtUOS/mooc.ip
tests/selenium_webdriver/selenium-webdriver-test-quick/mysuite.py
Python
gpl-2.0
1,796
# -*- coding:utf-8 -*- from django.conf import settings from django.utils.translation import ugettext as _ from haystack.views import SearchView class ColabSearchView(SearchView): def extra_context(self, *args, **kwargs): use_language, date_format = settings.DJANGO_DATE_FORMAT_TO_JS.get( se...
rafamanzo/colab
colab/search/views.py
Python
gpl-2.0
6,401
# Copyright (C) 2010 Samuel Abels. # # 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 useful, # but WITHOUT ANY WARRANTY; wi...
xubinzheng/Gelatin
src/Gelatin/compiler/WhenStatement.py
Python
gpl-2.0
1,990
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2010 Raphael Ackermann # # 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; ...
beernarrd/gramps
gramps/gen/filters/rules/_hasgrampsid.py
Python
gpl-2.0
1,923
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License...
nils-tekampe/duplicity
testing/unit/test_dup_time.py
Python
gpl-2.0
6,554
#!/usr/bin/env python3 from time import asctime import psycopg2 from psycopg2.errors import OperationalError, DuplicateTable, UndefinedObject import config from utils import create_schema, dump_similarities, insert_artist_pairs ARTIST_MBIDS_TO_EXCLUDE = [ 'f731ccc4-e22a-43af-a747-64213329e088', # anonymous ...
Freso/listenbrainz-server
relations/create_artist_relations.py
Python
gpl-2.0
4,115
def outahere(): import os print('Bye os world') os._exit(99) print('Never reached') if __name__ == '__main__': outahere()
simontakite/sysadmin
pythonscripts/programmingpython/System/Exits/testexit_os.py
Python
gpl-2.0
146
import os import sys import argparse import numpy as np import cv2 import dlib FACE_DETECTOR = dlib.get_frontal_face_detector() PREDICTOR_PATH = 'shape_predictor_68_face_landmarks.dat' PREDICTOR = dlib.shape_predictor(PREDICTOR_PATH) BLUE = (255, 0, 0) RED = (0, 0, 255) def load_image(img_path, grayscale): if n...
drfreemayn/ml-testing
face-warp/face-warp.py
Python
gpl-2.0
8,709
################################ # These variables are overwritten by Zenoss when the ZenPack is exported # or saved. Do not modify them directly here. NAME = "ZenPacks.community.VMwareDataSource" VERSION = "1.0" AUTHOR = "Eric Enns" LICENSE = "LGPL" NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.community'] PACKAGES = [...
zenoss/Community-Zenpacks
ZenPacks.community.VMwareDataSource/setup.py
Python
gpl-2.0
2,625
from xdrdef.nfs4_const import * from environment import check, fail import nfs_ops op = nfs_ops.NFS4ops() def testHome(t, env): """LOOKUP home directory FLAGS: lookup all CODE: HOME """ c1 = env.c1.new_client(env.testname(t)) sess1 = c1.create_session() res = sess1.compound(env.home + [op....
gilamsalem/pynfs
nfs4.1/server41tests/st_lookup.py
Python
gpl-2.0
12,397
#!/usr/bin/python3 """\ The program groups files into directories based on a date field that is part of the file name. File names are assumed to have a format of nn-yyyymmddnnnnnnn.ccc where n is any integer, yyyy is the four digit year, mm is a two digit month, dd is a two digit day, and c ...
ifermon/weather
util/mk_dirs.py
Python
gpl-2.0
7,819
#!/usr/bin/env python # -*- encoding: utf-8 -*- from GeneticCode import * from Sequence import * def main( gc ): G = GeneticCode( gc ) # G.build_CAI_table( "/Users/paulkorir/Dropbox/Euplotes/FrameshiftPredictionData/E.crassus_CDS.fasta" ) G.build_CAI_table( "/home/paul/bioinf/Resources/H_sapiens/H_sapiens_Ens75_CD...
polarise/BioClasses
test_GeneticCode.py
Python
gpl-2.0
1,494
import copy class Game(object): def __init__(self, states, messages, actions, utility, confusion=None): self.states = states self.messages = messages self.actions = actions self.utility = utility self.confusion = confusion def number_of_states(self): return sel...
carangorango/democritus
democritus/games.py
Python
gpl-2.0
727
#!/usr/bin/env python #TODO: # - Add an option to specify whether we're building libplayerinterface (whose # header gets installed for general use, has copyright boilerplate, # etc.) or a user XDR lib from __future__ import print_function import re import string import sys import os import os.path USAGE = 'U...
sunsided/player
libplayerinterface/playerxdrgen.py
Python
gpl-2.0
21,344
# ----------------------------------------------------------------------- # OpenXenManager # # Copyright (C) 2009 Alberto Gonzalez Rodriguez alberto@pesadilla.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 Soft...
infosiftr/openxenmanager
window_host.py
Python
gpl-2.0
27,126
#-*- coding:utf-8 -*- '''#coding=utf-8''' #以下代码用来打印一个信息 print("hello world") #当行注释 #这里是单行注释,zxxksjdkfjs #djfjksdfsdjflsdjflskjdflsad # 井号是一个单行注释,提醒的内容不能换行,如果换了行,那么,需要在新的一行的 # 行首添加一个# #多行注释 ''' print("hello world") print("hello world") print("hello world") print("hello world") ''' """ print("hello world") print(...
jameswatt2008/jameswatt2008.github.io
python/Python基础/截图和代码/Python基础/04-hellowrold.py
Python
gpl-2.0
471
# -*- coding: utf-8 -*- """ .. module:: .__init__.py :synopsis: .. moduleauthor:: Arthur Moore <arthur.moore85@gmail.com> .. creation date:: 04-11-2017 .. licence:: """ from __future__ import unicode_literals __author__ = "arthur"
ArthurMoore85/pi_romulus
tests/api/__init__.py
Python
gpl-2.0
239
""" WSGI config for Project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, sys sys.path.append('/opt/bitnami/apps/django/django_projects/mhc_dashboard/mhcdashboa...
qliu/mhcdashboard
mhcdashboard/mhcdashboard/wsgi.py
Python
gpl-2.0
610
../../../../../share/pyshared/telepathy/_generated/Connection_Interface_Client_Types.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/telepathy/_generated/Connection_Interface_Client_Types.py
Python
gpl-3.0
87
# ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (C) 2013 Linutronix GmbH # # This file is part of ELBE. # # ELBE 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...
kennethlyn/elbe
elbepack/fstab.py
Python
gpl-3.0
3,041
# coding=utf-8 """Module used to generate context for impact table report. This is useful to do layouting. """ from __future__ import absolute_import from safe.common.utilities import safe_dir from safe.report.extractors.composer import QGISComposerContext from safe.report.extractors.util import ( jinja2_output_a...
Gustry/inasafe
safe/report/extractors/impact_table.py
Python
gpl-3.0
3,228
""" Coinbase OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/coinbase.html """ from social.backends.oauth import BaseOAuth2 class CoinbaseOAuth2(BaseOAuth2): name = 'coinbase' SCOPE_SEPARATOR = '+' DEFAULT_SCOPE = ['user', 'balance'] AUTHORIZATION_URL = 'https://coinbase.com/oa...
HackerEcology/SuggestU
suggestu/social/backends/coinbase.py
Python
gpl-3.0
1,259
# neubot/backend_mlab.py # # Copyright (c) 2012 # Nexa Center for Internet & Society, Politecnico di Torino (DAUIN) # and Simone Basso <bassosimone@gmail.com> # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the...
neubot/neubot
neubot/backend_mlab.py
Python
gpl-3.0
3,161
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| | #| Android's Hooker | #| ...
gaurav9991/hk
hooker_xp/hooker_xp/analysis/ManualAnalysisConfiguration.py
Python
gpl-3.0
4,321
# -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The facts class for eos this file validates each subset of facts and selectively calls the appropriate facts gathering function """ from __future__ import (absolute_import, ...
shsingh/ansible
lib/ansible/module_utils/network/eos/facts/facts.py
Python
gpl-3.0
3,087
# -*- coding: utf-8 -*- """ Mesa Visualization Module ------------------------- TextVisualization: Base class for writing ASCII visualizations of model state. TextServer: Class which takes a TextVisualization child class as an input, and renders it in-browser, along with an interface. """
kleinrap/policyemergencev2
mesa/visualization/__init__.py
Python
gpl-3.0
293
# A Sphinx extension that, in collaboration with the autodoc extension, # parses the docstring format used in this project. import re # Section processing regexes: end_section = re.compile(r'^\s*$') section_title = re.compile(r'^\s*(\w+):') def_line = re.compile(r'(\w+)\s*-\s*(.+)') def setup(app): app.connect('...
casselineau/Tracer
user-doc/format_docstrings.py
Python
gpl-3.0
1,923
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
ninja-ide/ninja-ide
ninja_ide/intellisensei/__init__.py
Python
gpl-3.0
759
""" Concise UUID generation. """ import uuid as _uu class ShortUUID(object): def __init__(self, alphabet=None): if alphabet is None: alphabet = list("23456789ABCDEFGHJKLMNPQRSTUVWXYZ" "abcdefghijkmnopqrstuvwxyz") # Define our alphabet. self._alphabe...
ryepdx/gift_cards
helpers/shortuuid.py
Python
gpl-3.0
2,618
#!/usr/bin/env python # # Copyright 2010 Markus Pielmeier # # This file is part of tagfs. # # tagfs 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 la...
rowhit/tagfs
util/trace_logfiles.py
Python
gpl-3.0
3,573
# -*- coding: utf-8 -*- import os import tempfile import unittest from mock import Mock, patch, call import kodiswift from kodiswift import SortMethod from kodiswift import xbmc from kodiswift.listitem import ListItem from kodiswift.xbmcmixin import XBMCMixin class TestMixedIn(XBMCMixin): storage_path = '/tmp/c...
Sinap/kodiswift
tests/test_xbmcmixin.py
Python
gpl-3.0
15,014
# 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/events/layout/models/legacy_mapping.py
Python
gpl-3.0
2,969
../../../../share/pyshared/apt/cache.py
reinhrst/panda
usr/lib/python2.7/dist-packages/apt/cache.py
Python
gpl-3.0
39
# https://stackoverflow.com/questions/8356689/python-equivalent-of-phps-mcrypt-rijndael-256-cbc class zeropad: def __init__(self, block_size): assert block_size > 0 and block_size < 256 self.block_size = block_size def pad(self, pt): ptlen = len(pt) padsize = self.block_size -...
alfa-jor/addon
plugin.video.alfa/lib/rijndael/rijndael_cbc.py
Python
gpl-3.0
2,096
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Utilities for the Dictionary Editor Widget and Dialog based on Qt """ from __future__ import print_function import re # Local imports from spyderlib.py3compat impor...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/spyderlib/widgets/dicteditorutils.py
Python
gpl-3.0
9,604
../../../../../../share/pyshared/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py
Python
gpl-3.0
82
#!/usr/bin/env python # -*- coding: utf-8 -*- """Parser for Indian Languages. This module provides a parser for major Indian languages including Urdu, Kashmiri and Roman script. Copyright (c) 2015-2016 Riyaz Ahmad Bhat, Irshad Ahmad Bhat <riyaz.bhat@research.iiit.ac.in> <irshad.bhat@research.iiit.ac.in> """ import ...
iscnlp/iscnlp
iscnlp/parser/__init__.py
Python
gpl-3.0
2,785
# nxt.locator module -- Locate LEGO Minstorms NXT bricks via USB or Bluetooth # Copyright (C) 2006, 2007 Douglas P Lau # Copyright (C) 2009 Marcus Wanner # Copyright (C) 2013 Dave Churchill, Marcus Wanner # Copyright (C) 2015, 2016, 2017, 2018 Multiple Authors # # This program is free software: you can redistribute ...
AlanJAS/nxt
nxt/locator.py
Python
gpl-3.0
8,481
"""Update vc room mappings Revision ID: 506ad8bf647c Revises: 221268863b45 Create Date: 2016-03-18 14:42:27.473555 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '506ad8bf647c' down_revision = '221268863b45' def upgrade(): op.execute(""" UPDATE e...
belokop/indico_bare
migrations/versions/201604011105_506ad8bf647c_update_vc_room_mappings.py
Python
gpl-3.0
2,400
from setuptools import setup, find_packages exec(open('thunderfish/version.py').read()) long_description = """ # ThunderFish Algorithms and programs for analysing electric field recordings of weakly electric fish. [Documentation](https://bendalab.github.io/thunderfish) | [API Reference](https://bendalab.github.io/t...
bendalab/thunderfish
setup.py
Python
gpl-3.0
2,248
# Copyright (C) 2009-2015 Contributors as noted in the AUTHORS file # # This file is part of Autopilot. # # Autopilot 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 y...
rogerlindberg/autopilot
src/lib/guinatives/facade.py
Python
gpl-3.0
2,117
import wx from logbook import Logger import eos.db pyfalog = Logger(__name__) class FitChangeDroneVariationCommand(wx.Command): """" Fitting command that changes an existing drone into another variation. """ def __init__(self, fitID, position, itemID): wx.Command.__init__(self, True, "Change ...
blitzmann/Pyfa
gui/fitCommands/calc/fitChangeDroneVariation.py
Python
gpl-3.0
1,088
#BluetoothConnection.py, Project in Ambient Intelligence, Realization of the connection to #SmartSenseo Machine #Copyright (C) 2013 Marco Neumann, Nils Buerkner #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 Softwar...
inko6nito/AmI
SmartSenseo/BluetoothConnection/BluetoothConnection.py
Python
gpl-3.0
2,082
#!/usr/bin/env python ''' This python script is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This python s...
daniel-holder/sleepyhead-cloud
history/cpap.py
Python
gpl-3.0
53,652
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
junghans/espressopp
src/integrator/LBInitConstForce.py
Python
gpl-3.0
2,732
# This file is part of Indico. # Copyright (C) 2002 - 2016 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...
belokop/indico_bare
indico/modules/events/registration/models/legacy_mapping.py
Python
gpl-3.0
2,071
# # This file is part of Checkbox. # # Copyright 2008 Canonical Ltd. # # Checkbox is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # C...
jds2001/ocp-checkbox
plugins/report_prompt.py
Python
gpl-3.0
1,513
#!/usr/bin/env python # included as is from texttest # copyright texttest.org (LGPL according to google cache) import sys, difflib, StringIO, optparse def _getNumberAt(l, pos): start = pos while start > 0 and l[start-1] in "1234567890.eE-": start -= 1 end = pos while end < len(l) and l[end] in ...
cathyyul/sumo-0.18
tests/complex/netconvert/osm_roundtrip/fpdiff.py
Python
gpl-3.0
3,373
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # Rewrite: Dustyn Gibson (miigotu) <miigotu@gmail.com> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
dfalt974/SickRage
sickbeard/providers/newznab.py
Python
gpl-3.0
16,306
# coding=utf-8 from subliminal import ProviderError class TooManyRequests(ProviderError): """Exception raised by providers when too many requests are made.""" pass class APIThrottled(ProviderError): pass class ParseResponseError(ProviderError): """Exception raised by providers when they are not ab...
dantebarba/docker-media-server
plex/Sub-Zero.bundle/Contents/Libraries/Shared/subliminal_patch/exceptions.py
Python
gpl-3.0
358
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
F5Networks/f5-ansible
ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_monitor_oracle.py
Python
gpl-3.0
5,070
from celery.schedules import crontab from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ from kuma.celery import app class WikiConfig(AppConfig): """ The Django App Config class to store information about the wiki app and do startup time things. """ name = "k...
Elchi3/kuma
kuma/wiki/apps.py
Python
mpl-2.0
897
# -*- coding: utf-8 -*- # Copyright(C) 2013 dud # # 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 option) a...
Boussadia/weboob
modules/jcvelaux/__init__.py
Python
agpl-3.0
795
# Copyright 2019 Acysos S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models from . import wizards
factorlibre/l10n-spain
l10n_es_aeat_certificate/__init__.py
Python
agpl-3.0
136
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Camptocamp SA # (C) 2015 Therp BV # # Authors: Guewen Baconnier, Stefan Rijnhart # # This program is free software: you can redistribute it and/or modify # it under the ...
grap/OpenUpgrade
addons/stock_account/migrations/8.0.1.1/post-migrate.py
Python
agpl-3.0
4,546
#!env/python3 # coding: utf-8 import ipdb import os import json import datetime import uuid import psycopg2 import hashlib import asyncio import ped_parser from config import * from core.framework.common import * from core.model import * from core.annso import * # ===============================================...
REGOVAR/Annso
annso/core/annso/sample_manager.py
Python
agpl-3.0
1,400
import pybullet as p import time import math import pybullet_data def getRayFromTo(mouseX, mouseY): width, height, viewMat, projMat, cameraUp, camForward, horizon, vertical, _, _, dist, camTarget = p.getDebugVisualizerCamera( ) camPos = [ camTarget[0] - dist * camForward[0], camTarget[1] - dist * camForw...
nrz/ylikuutio
external/bullet3/examples/pybullet/examples/addPlanarReflection.py
Python
agpl-3.0
4,546
""" Tests of deprecated Locations and SlashSeparatedCourseKeys """ import re from opaque_keys import InvalidKeyError from opaque_keys.edx.locator import AssetLocator, BlockUsageLocator, CourseLocator from opaque_keys.edx.locations import AssetLocation, Location, SlashSeparatedCourseKey from opaque_keys.edx.tests impo...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/opaque_keys/edx/tests/test_deprecated_locations.py
Python
agpl-3.0
5,732
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes, json def execute(): for p in webnotes.conn.sql("""select name, recent_documents from tabProfile where ifnull(recent_documents,'')!=''"""): if...
Yellowen/Owrang
patches/december_2012/move_recent_to_memcache.py
Python
agpl-3.0
422
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license """Superdesk...
petrjasek/superdesk-core
superdesk/notification.py
Python
agpl-3.0
2,435
from functools import partial from math import inf from pandas import Series from analyses import active_driver from analyses.enrichment import active_driver_genes_enrichment from database import db from miscellaneous import make_named_temp_file from models import Mutation, Site, Protein, MC3Mutation, Gene, SiteType,...
reimandlab/Visualistion-Framework-for-Genome-Mutations
website/tests/test_analyses/test_run_active_driver.py
Python
lgpl-2.1
9,432
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyJsonref(PythonPackage): """An implementation of JSON Reference for Python""" homepa...
iulian787/spack
var/spack/repos/builtin/packages/py-jsonref/package.py
Python
lgpl-2.1
587
############################################################################## # 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...
krafczyk/spack
var/spack/repos/builtin/packages/datamash/package.py
Python
lgpl-2.1
1,897
#!/usr/bin/env python """ Unit test for astCalc.py """ import unittest try: from astLib import astCalc except ImportError: print 'Failed to import astCalc. Properly installed?' class KnownValues(unittest.TestCase): dl = ((0, 0.0), (1, 6612.2319979526665), (2, 15550.344054914269), (...
boada/astLib
tests/astCalc_test.py
Python
lgpl-2.1
11,496
#!/usr/bin/python3 # # Copyright (C) 2015 Red Hat # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This libr...
GNOME/ostree
tests/grub2-entries-crosscheck.py
Python
lgpl-2.1
3,580
"""Python protoc plugin for Envoy APIs.""" import cProfile from collections import namedtuple import io import os import pstats import sys from tools.api_proto_plugin import traverse from google.protobuf.compiler import plugin_pb2 OutputDescriptor = namedtuple( 'OutputDescriptor', [ # Output files a...
envoyproxy/envoy
tools/api_proto_plugin/plugin.py
Python
apache-2.0
3,912
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 t...
rd37/horizon
openstack_dashboard/dashboards/project/stacks/tests.py
Python
apache-2.0
18,426
"""Support for Wink sensors.""" import logging from homeassistant.const import TEMP_CELSIUS from . import DOMAIN, WinkDevice _LOGGER = logging.getLogger(__name__) SENSOR_TYPES = ["temperature", "humidity", "balance", "proximity"] def setup_platform(hass, config, add_entities, discovery_info=None): """Set up t...
fbradyirl/home-assistant
homeassistant/components/wink/sensor.py
Python
apache-2.0
3,231
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging import paddle.v2 as paddle from paddle.v2 import layer from paddle.v2 import data_type as dtype from data_provider import field_index, detect_dataset, AvazuDataset parser = argparse.ArgumentParser(description="PaddlePaddle CTR example") pars...
zhaopu7/models
ctr/train.py
Python
apache-2.0
4,513
# Copyright 2011 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 or agreed to in writing,...
flackr/quickopen
src/open_dialog.py
Python
apache-2.0
1,182
import random items = [random.randint(-50, 50) for i in range(100)] expected = 27 print(items) seen = set() for i in items: if expected - i in seen: print(i, expected - i) seen.add(i) print(seen)
lambeau/random-hacking
two_sum.py
Python
apache-2.0
217
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'resources/templates/wizard_depend_flag.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form)...
GandaG/fomod-editor
src/ui_templates/wizard_depend_flag.py
Python
apache-2.0
1,978
import sys def module(): return sys.modules[__name__]
radiasoft/salt-conf
srv/salt/_modules/radia/__init__.py
Python
apache-2.0
59
#!/usr/bin/env python import matplotlib.pyplot as plotlib import numpy import sys DELIMITER = ',' def makePlot(infile, outfile): import matplotlib matplotlib.rcParams.update({'font.size': 12}) (title, headers) = readTitleAndHeaders(infile) data = numpy.genfromtxt(infile, ...
scribble/scribble.github.io
src/main/jbake/assets/docs/lchannels/scripts/plot-benchmark.py
Python
apache-2.0
2,325
# # Copyright (c) 2013-2020 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache License, Version 2.0 whic...
locationtech/geowave
python/src/main/python/pygw/geotools/simple_feature.py
Python
apache-2.0
4,912
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License.\n", # 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 writ...
GoogleCloudPlatform/vertex-ai-samples
community-content/pytorch_text_classification_using_vertex_sdk_and_gcloud/python_package/trainer/model.py
Python
apache-2.0
1,051
# Copyright (c) 2014 OpenStack Foundation. # # 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...
swiftstack/swift
swift/common/middleware/s3api/controllers/s3_acl.py
Python
apache-2.0
2,082
"""Test the iRobot Roomba config flow.""" from roombapy import RoombaConnectionError from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.roomba.const import ( CONF_BLID, CONF_CONTINUOUS, CONF_DELAY, DOMAIN, ) from homeassistant.const import CONF_HOST, CONF_PAS...
tboyce021/home-assistant
tests/components/roomba/test_config_flow.py
Python
apache-2.0
5,205
# Authors: # Trevor Perrin # Google - parsing subject field # # See the LICENSE file for legal information regarding use of this file. """Class representing an X.509 certificate.""" from .utils.asn1parser import ASN1Parser from .utils.cryptomath import * from .utils.keyfactory import _createPublicRSAKey from .ut...
freshplanet/AppEngine-SocketPool
tlslite/x509.py
Python
apache-2.0
3,427
# -*- coding: utf-8 -*- # File: concurrency.py import multiprocessing as mp from ..utils import logger from ..utils.concurrency import StoppableThread, start_proc_mask_signal from .base import Callback __all__ = ['StartProcOrThread'] class StartProcOrThread(Callback): """ Start some threads or processes be...
google-research/ssl_detection
third_party/tensorpack/tensorpack/callbacks/concurrency.py
Python
apache-2.0
2,042
from django_dominate.django_tags import * from dominate.tags import * from dominate.util import text def result(): with span() as content: with a( _class="sg-notification sg-notification-read-{{ is_read }}", href="{{ target_url }}", ): text( "{{...
mnieber/shared-goals
django/notification/templates/notification/notify_updated_review_html.py
Python
apache-2.0
481
#!/usr/bin/env python2.7 from __future__ import print_function import os from toil.job import PromisedRequirement from toil_lib.tools.variant_manipulation import gatk_variant_recalibrator, \ gatk_apply_variant_recalibration from toil_scripts.gatk_germline.common import output_file_job def vqsr_pipeline(job, uui...
jpfeil/toil-scripts
src/toil_scripts/gatk_germline/vqsr.py
Python
apache-2.0
9,219
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import abstractmethod from collections import defaultdict from typing import DefaultDict from pants.base.exceptions import TaskError from pants.build_graph.target import Target f...
tdyas/pants
src/python/pants/task/mutex_task_mixin.py
Python
apache-2.0
5,486
# Copyright 2016 The TensorFlow 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 applica...
nolanliou/tensorflow
tensorflow/contrib/py2tf/converters/builtin_functions.py
Python
apache-2.0
1,941
"""Test the helper method for writing tests.""" import asyncio import collections from collections import OrderedDict from contextlib import contextmanager from datetime import timedelta import functools as ft from io import StringIO import json import logging import os import sys import threading import time import uu...
nkgilley/home-assistant
tests/common.py
Python
apache-2.0
33,654