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
import numpy as np def wzorProst3d(p1,p2): wsp = np.array([p1[0],(p2[0]-p1[0]),p1[1],(p2[1]-p1[1]),p1[2],(p2[2]-p1[2])]) return wsp def plaszczyznaRownolegla(p1,p2,p3): p12 = np.array([p2[0]-p1[0],p2[1]-p1[1],p2[2]-p1[2]]) p13 = np.array([p3[0]-p1[0],p3[1]-p1[1],p3[2]-p1[2]]) wek = np.cross(p12,p1...
Venris/crazyflie-multilink
KM/kamera_testy/3d_position.py
Python
gpl-2.0
2,600
0.030385
# # Copyright 2016 The BigDL 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 ...
intel-analytics/BigDL
python/orca/src/bigdl/orca/cpu_info.py
Python
apache-2.0
2,911
0.000687
# 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...
allenlavoie/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/cholesky_outer_product_test.py
Python
apache-2.0
5,365
0.006151
import textwrap import yaml from schema import SchemaError def test_trivia_lists(): from redbot.cogs.trivia import InvalidListError, get_core_lists, get_list list_names = get_core_lists() assert list_names problem_lists = [] for l in list_names: try: get_list(l) excep...
palmtree5/Red-DiscordBot
tests/cogs/test_trivia.py
Python
gpl-3.0
799
0.001252
# -*- coding: utf-8 -*- from __future__ import unicode_literals __all__ = [ '__version_info__', '__version__', '__author__', '__author_email__', ] __version_info__ = (0, 4, 3) __version__ = '.'.join([unicode(i) for i in __version_info__]) __author__ = 'David Vuong' __author_email__ = 'david@imageinte...
ImageIntelligence/mimiron
mimiron/__init__.py
Python
mit
334
0
#!/usr/bin/python2.7 import os import sys import zlib import base64 import socket import os.path import argparse from datetime import datetime import debug import module import config as CFG from poetsocket import * __version__ = '0.4.4' POSH_PROMPT = 'posh > ' FAKEOK = """HTTP/1.1 200 OK\r Date: Tue, 19 Mar 2013 2...
khanhnnvn/poet
server.py
Python
mit
10,080
0.001091
"""Dictionary Of Keys based matrix""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['dok_matrix', 'isspmatrix_dok'] import functools import operator import numpy as np from scipy._lib.six import zip as izip, xrange, iteritems, itervalues from .b...
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/scipy/sparse/dok.py
Python
mit
17,654
0.000906
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_accounting from . import test_donation
mozaik-association/mozaik
mozaik_account/tests/__init__.py
Python
agpl-3.0
153
0
#!/usr/bin/env python3 # # Copyright 2021 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 # # Unles...
youtube/cobalt
starboard/build/run_bash.py
Python
bsd-3-clause
1,290
0.003101
"""Added a table for timed commands Revision ID: 4db5dc4bc98 Revises: 514f4b9bc74 Create Date: 2015-12-23 00:00:59.156496 """ # revision identifiers, used by Alembic. revision = '4db5dc4bc98' down_revision = '514f4b9bc74' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sql...
gigglearrows/anniesbot
alembic/versions/4db5dc4bc98_added_a_table_for_timed_commands.py
Python
mit
1,034
0.014507
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
changsimon/trove
trove/tests/api/mgmt/malformed_json.py
Python
apache-2.0
12,085
0
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import uni...
ity/pants
tests/python/pants_test/engine/test_fs.py
Python
apache-2.0
7,436
0.007934
# # Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer # Copyright (C) 2006 - 2007 Richard Purdie # # SPDX-License-Identifier: GPL-2.0-only # """ Use this class to fork off a thread to recieve event callbacks from the bitbake server and queue them for the UI to process. This process must be used to avoid client/server...
schleichdi2/OPENNFR-6.3-CORE
bitbake/lib/bb/ui/uievent.py
Python
gpl-2.0
4,475
0.00514
#!/usr/bin/python # -*- coding: utf-8 -*- """File used to unit test the pacifica archive interface.""" import unittest import os from stat import ST_MODE from six import PY2 from pacifica.archiveinterface.archive_utils import bytes_type from pacifica.archiveinterface.backends.posix.archive import PosixBackendArchive im...
dmlb2000/pacifica-archiveinterface
tests/posix_test.py
Python
lgpl-3.0
6,379
0.000314
# coding: utf-8 """ Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-...
artcz/euler
problems/02/2.py
Python
mit
1,241
0.001612
# -*- coding: utf-8 -*- """The QCOW image file-like object.""" import pyqcow from dfvfs import dependencies from dfvfs.file_io import file_object_io from dfvfs.lib import errors from dfvfs.resolver import resolver dependencies.CheckModuleVersion(u'pyqcow') class QcowFile(file_object_io.FileObjectIO): """Class t...
jorik041/dfvfs
dfvfs/file_io/qcow_file_io.py
Python
apache-2.0
1,285
0.003891
#!/home/jt/code/armyguys/venv/bin/python3.4 # $Id: rst2xetex.py 7038 2011-05-19 09:12:02Z milde $ # Author: Guenter Milde # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing XeLaTeX source code. """ try: import locale locale.setlocale(lo...
jtpaasch/armyguys
venv/bin/rst2xetex.py
Python
mit
811
0.001233
# Copyright 2011 Justin Santa Barbara # 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 requ...
Akrog/cinder
cinder/api/v1/snapshots.py
Python
apache-2.0
8,045
0
import xml.sax import unittest import test_utils import xmlreader import os path = os.path.dirname(os.path.abspath(__file__) ) class XmlReaderTestCase(unittest.TestCase): def test_XmlDumpAllRevs(self): pages = [r for r in xmlreader.XmlDump(path + "/data/article-pear.xml", allrevisions=True).parse()] ...
races1986/SafeLanguage
CEM/tests/test_xmlreader.py
Python
epl-1.0
1,809
0.00387
# coding=utf-8 # Module stencil_24 # generated from Stencil 18pt name = "Stencil 24" start_char = '!' end_char = chr(127) char_height = 24 space_width = 12 gap_width = 3 bitmaps = ( # @0 '!' (5 pixels wide) 0x00, # 0x00, # 0x00, # 0x00, # 0x70, # OOO ...
HudsonWerks/OLED-SSD1306
ssd1306/fonts/stencil_24.py
Python
lgpl-3.0
98,068
0.156068
#!/usr/bin/env python import boto from boto.s3.key import Key OrdinaryCallingFormat = boto.config.get('s3', 'calling_format', 'boto.s3.connection.OrdinaryCallingFormat') s3 = boto.connect_s3(host='localhost', port=10001, calling_format=OrdinaryCallingFormat, is_secure=False) b = s3.get_bucket('mocking') k_cool = Ke...
SivagnanamCiena/mock-s3
tests/push.py
Python
mit
652
0.003067
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
ncliam/serverpos
openerp/addons/hr_gamification/wizard/grant_badge.py
Python
agpl-3.0
2,525
0.002376
# -*- coding: utf-8 -*- ''' fantastic Add-on 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) any later version. This pro...
TheWardoctor/Wardoctors-repo
script.module.fantastic/lib/resources/lib/sources/en/rlsbb.py
Python
apache-2.0
5,587
0.013782
class Bunch(dict): """A dict with attribute-access""" def __getattr__(self, key): try: return self.__getitem__(key) except KeyError: raise AttributeError(key) def __setattr__(self, key, value): self.__setitem__(key, value) def __dir__(self): ret...
ellisonbg/ipyleaflet
ipyleaflet/basemaps.py
Python
mit
14,548
0.02997
import hug try: from . import runserver ##to run windowslogonofflogger ##https://github.com/bengjerstad/windowslogonofflogger hug.API(__name__).extend(runserver, '') print('Running windowslogonofflogger Server') except: pass try: from . import logserver ##to run MulitUse Log Server ##https://github.com/ben...
bengjerstad/windowslogonofflogger
logserver/__init__.py
Python
mit
450
0.048889
import os import urlparse from SocketServer import ThreadingMixIn from wsgiref.util import setup_testing_defaults from wsgiref.simple_server import make_server, WSGIServer from lightningjs.http.gzipper import GzipperMiddleware class ThreadedWsgiServer(ThreadingMixIn, WSGIServer): pass class RoutableApplication...
FocusLab/willie
vendor/lightningjs/lib/python/lightningjs/http/__init__.py
Python
bsd-3-clause
2,265
0.001766
import sure # noqa # pylint: disable=unused-import import unittest import boto3 from moto import mock_sqs, mock_ec2 from tests import EXAMPLE_AMI_ID class TestNestedDecoratorsBoto3(unittest.TestCase): @mock_sqs def setup_sqs_queue(self): conn = boto3.resource("sqs", region_name="us-east-1") ...
spulec/moto
tests/test_core/test_nested.py
Python
apache-2.0
736
0
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_kaja_orzee.iff" result.attribute_template_id = 9 result.stfNa...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_kaja_orzee.py
Python
mit
437
0.048055
from django.apps import apps from django.contrib import admin AccessToken = apps.get_model('oauth2', 'AccessToken') Client = apps.get_model('oauth2', 'Client') Grant = apps.get_model('oauth2', 'Grant') RefreshToken = apps.get_model('oauth2', 'RefreshToken') class AccessTokenAdmin(admin.ModelAdmin): list_display ...
depop/django-oauth2-provider
provider/oauth2/admin.py
Python
mit
840
0
# encoding: utf-8 # module zipimport # from (built-in) # by generator 1.130 """ zipimport provides support for importing Python modules from Zip archives. This module exports three objects: - zipimporter: a class; its constructor takes a path to a Zip archive. - ZipImportError: exception raised by zipimporter objects....
akiokio/centralfitestoque
src/.pycharm_helpers/python_stubs/-1807332816/zipimport.py
Python
bsd-2-clause
4,893
0.008379
# -*- coding: utf-8 -*- # This module contains classes to manage EL1USB device # This class reads the content of the EL-USB-1 thermometer import sys import datetime import time class el1_input: "Doc ..." def __init__(self): self.fake = 0 def request(self, text, base_value, min_value, max_value): ...
eltuxusb/eltuxusb
eltuxusb/el_input.py
Python
gpl-3.0
981
0.004077
from kolibri.auth.api import KolibriAuthPermissions, KolibriAuthPermissionsFilter from kolibri.content.api import OptionalPageNumberPagination from rest_framework import filters, viewsets from .models import ContentRatingLog, ContentSessionLog, ContentSummaryLog, UserSessionLog from .serializers import ContentRatingLo...
ralphiee22/kolibri
kolibri/logger/api.py
Python
mit
2,079
0.002886
# Copyright 2015 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. def _RunTests(input_api, output_api): return (input_api.canned_checks.RunUnitTestsInDirectory( input_api, output_api, '.', files_to_check=[r'.+_test...
youtube/cobalt
build/util/lib/common/PRESUBMIT.py
Python
bsd-3-clause
513
0.005848
import sys import unittest from unittest import TestCase try: import faulthandler except ImportError: pass else: try: # May fail in IPython Notebook with UnsupportedOperation faulthandler.enable() except BaseException as e: msg = "Failed to enable faulthandler due to:\n{err}" ...
m-labs/llvmlite
llvmlite/tests/__init__.py
Python
bsd-2-clause
1,433
0.000698
#!/usr/bin/env python # -*- coding: utf-8 -*- MENU_FILE = "File" FILE_NEW = "New" FILE_OPEN = "Open" FILE_EXIT = "Exit" TAB_DATA = "Data" TAB_SQL = "SQL" BUTTON_EXIT = "Exit"
Smaed/pyDbManager
lib/Lang.py
Python
gpl-2.0
228
0.004386
""" WSGI config for 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.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODUL...
djangomini/djangomini
test_project/wsgi.py
Python
mit
373
0
# -*- coding: UTF-8 -*- # Copyright 2013-2014 by Luc Saffre. # License: BSD, see LICENSE for more details. """ Turns a list of items into an endless loop. Useful when generating demo fixtures. >>> from lino.utils import Cycler >>> def myfunc(): ... yield "a" ... yield "b" ... yield "c" >>> c = Cycler(myf...
khchine5/lino
lino/utils/cycler.py
Python
bsd-2-clause
1,929
0.000518
# Local imports from connect import m from crypto import * #NOTE: SQL '?' tuples must use '_t' as var name #NOTE: the tuples that fetch(one|all)() returns should be called 'res' ####################### # USER CLASS # ####################### # IDs and names are stored as fields because they # are used to quer...
shelt/Fries
modules/user.py
Python
apache-2.0
3,458
0.006362
import subprocess import multiprocessing import select import fcntl, os import re import matplotlib.pyplot as plt import numpy as np import time import evolver import logging evolver.logger.setLevel(logging.DEBUG) evolver.logger.addHandler(logging.StreamHandler()) def find_values(fileloc, phrase): wf = open(file...
ulmusic/python-evolver
test/DS_sweep.py
Python
gpl-2.0
1,956
0.00818
# Copyright (C) 2018 # Max Planck Institute for Polymer Research # # This file is part of ESPResSo++. # # ESPResSo++ 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, o...
MrTheodor/espressopp
src/interaction/TabulatedSubEnsAngular.py
Python
gpl-3.0
5,918
0.010645
# Generated by Django 3.0.9 on 2020-08-16 20:47 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('groups', '0042_auto_20200507_1258'), ('activities', '0021_remove_activity_feedback_as_su...
yunity/foodsaving-backend
karrot/activities/migrations/0022_add_activity_types.py
Python
agpl-3.0
1,901
0.00263
#!/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 timehome@corp.globo.com import os import logging from functools import wraps CONTENT_TYPE =...
BetterCollective/thumbor
thumbor/utils.py
Python
mit
2,733
0
import pygame import rospy import time from std_msgs.msg import Float64 from std_msgs.msg import Float64MultiArray #pygame setup pygame.init() pygame.display.set_mode([100,100]) delay = 100 interval = 50 pygame.key.set_repeat(delay, interval) #really this should be passed in or something but for now if you want to ...
robotics-at-maryland/qubo
src/teleop/src/keyboard_controller.py
Python
mit
2,473
0.024262
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ impo...
arth-co/shoop
shoop/simple_cms/__init__.py
Python
agpl-3.0
823
0
from datetime import timedelta from decimal import Decimal import os import shutil from whoosh.fields import TEXT, KEYWORD, NUMERIC, DATETIME, BOOLEAN from whoosh.qparser import QueryParser from django.conf import settings from django.utils.datetime_safe import datetime, date from django.test import TestCase from hayst...
ericholscher/django-haystack
tests/whoosh_tests/tests/whoosh_backend.py
Python
bsd-3-clause
46,194
0.002165
#!/usr/bin/env python3 """Combine logs from multiple bitcore nodes as well as the test_framework log. This streams the combined log output to stdout. Use combine_logs.py > outputfile to write to an outputfile.""" import argparse from collections import defaultdict, namedtuple import heapq import itertools import os i...
LIMXTEC/BitCore
test/functional/combine_logs.py
Python
mit
4,611
0.004121
import models def borradoPlan(sender, **kwargs): borrada = kwargs['instance'] if borrada.tipo == "pr": aBorrar = models.PlanPrepago.objects.filter(codplan=borrada) else: aBorrar = models.PlanPostpago.objects.filter(codplan=borrada) aBorrar.delete() def insertadoServicio(sender, **kwargs): ...
gres147679/IngSoftwareRectaFinal
Tarea5/ServiSoft/ServiSoft/WebAccess/signalActions.py
Python
gpl-2.0
948
0.033755
#!/usr/bin/env python """ AMQP Clock Fires off simple messages at one-minute intervals to a topic exchange named 'clock', with the topic of the message being the local time as 'year.month.date.dow.hour.minute', for example: '2007.11.26.1.12.33', where the dow (day of week) is 0 for Sunday, 1 for Monday, and so on (sim...
mzdaniel/oh-mainline
vendor/packages/amqplib/demo/amqp_clock.py
Python
agpl-3.0
2,344
0.005973
# Natural Language Toolkit: Applications package # # Copyright (C) 2001-2017 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Interactive NLTK Applications: chartparser: Chart Parser chunkpar...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/nltk/app/__init__.py
Python
apache-2.0
1,733
0.000577
# -*- coding: utf-8 -*- ############################################################################### # # CopyObject # Makes a copy of an existing object in S3 Storage. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/S3/CopyObject.py
Python
apache-2.0
9,236
0.005414
# -*- Python -*- import os def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) if attr_value == None: lit_config.fatal( "No attribute %r in test configuration! You may need to run " "tests from your build directory or add this attribute " "to lit.site.cfg....
r0mai/metashell
3rd/templight/llvm/projects/compiler-rt/test/ubsan_minimal/lit.common.cfg.py
Python
gpl-3.0
1,525
0.013115
from steel.fields.base import * from steel.fields.numbers import * from steel.fields.strings import * from steel.fields.compression import * from steel.fields.compound import * from steel.fields.integrity import *
gulopine/steel
steel/fields/__init__.py
Python
bsd-3-clause
214
0
#!/usr/bin/env python # # Copyright Science and Technology Facilities Council, 2009-2012. # # This file is part of ARTEMIS. # # ARTEMIS 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 ...
jrha/artemis
tools/artemis-plot.py
Python
gpl-3.0
5,014
0.008975
from generic_module import BasicModule from equipment.general import SolarPanel, DOCK_EQUIPMENT, WaterTank, CBM, Window, Battery, Comms from equipment.lifesupport import UniversalToilet, WaterPurifier, OxygenElectrolyzer, RegenerableCO2Filter from equipment.computer import DockingComputer, MissionComputer from equipme...
facepalm/bliss-station-game
src/modular_module.py
Python
gpl-3.0
7,899
0.033675
""" Django settings for edc_sms project. Generated by 'django-admin startproject' using Django 3.0.6. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os i...
botswana-harvard/edc-sms
edc_sms/settings.py
Python
gpl-2.0
4,211
0.00095
def generate_ming_models(models): pass
synappio/swagger-pyramid
swagger/models.py
Python
apache-2.0
42
0.02381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
albertosalmeronunefa/tuconsejocomunal
addons/l10n_ve_dpt/models/l10n_ve_dpt.py
Python
gpl-3.0
2,432
0.004934
import sys from sklearn.metrics import roc_curve from sklearn.metrics import auc # Function for All Models to produce Metrics --------------------- def produce_model_metrics(fit, test_set, test_class_set, estimator): """ Purpose ---------- Function that will return predictions and probability metrics ...
raviolli77/machineLearning_breastCancer_Python
src/python/produce_model_metrics.py
Python
mit
2,206
0.006346
import os import unittest import vtk, qt, ctk, slicer import math import sys # # AstroMomentMapsSelfTest # class AstroMomentMapsSelfTest: def __init__(self, parent): parent.title = "Astro MomentMaps SelfTest" parent.categories = ["Testing.TestCases"] parent.dependencies = ["AstroVolume"] parent.cont...
Punzo/SlicerAstro
AstroMomentMaps/Testing/Python/AstroMomentMapsSelfTest.py
Python
bsd-3-clause
6,817
0.008655
from setuptools import setup setup( name = 'pgdumper', description = 'Simple PostgreSQL dumper', author = 'Roman Dolgushin', author_email = 'rd@roman-dolgushin.ru', url = 'https://github.com/rdolgushin/pgdumper', license = 'MIT', version = '0.1', packages = ['pgdumper'], install_requires = ['mydumper...
rdolgushin/pgdumper
setup.py
Python
mit
642
0.034268
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_gui.kivy.i18n import _ Builder.load_string(''' <FeeDialog@Popup> id: popup title: _('Transaction Fees') size_hint: 0.8, 0.8 pos_hint: {'top':0.9} method:...
kyuupichan/electrum
gui/kivy/uix/dialogs/fee_dialog.py
Python
mit
4,529
0.001987
import os import sys import time import exceptions import uuid import logging ''' @author: msune,lbergesio,omoya,CarolinaFernandez @organization: i2CAT, OFELIA FP7 PolicyEngine Rule class Encapsulates logic of a simple Rule ''' from monscale.pypelib.Condition import Condition from monscale.pypelib.persi...
jpardobl/monscale
monscale/pypelib/Rule.py
Python
bsd-3-clause
3,386
0.056113
import re from enum import Enum, auto from fractions import Fraction from io import BufferedIOBase from numbers import Number from typing import Iterable import chardet class CueCmd(Enum): PERFORMER = auto() TITLE = auto() FILE = auto() TRACK = auto() INDEX = auto() REM = auto() EOF = aut...
magicgoose/simple_dr_meter
audio_io/cue/cue_parser.py
Python
gpl-3.0
2,049
0.000488
from raiden.messages import Processed from raiden.tests.utils import factories from raiden.transfer.events import ( EventPaymentReceivedSuccess, EventPaymentSentFailed, EventPaymentSentSuccess, ) from raiden.transfer.state_change import ActionCancelPayment, Block from raiden.utils import sha3 ADDRESS = sha...
hackaugusto/raiden
raiden/tests/unit/test_operators.py
Python
mit
2,554
0.000392
from mock import MagicMock import mock from django.test import override_settings from tests.utilities.utils import SafeTestCase from tests.utilities.ldap import get_ldap_user_defaults from accounts.models import ( User, AccountRequest, Intent ) from projects.models import Project from projects.receivers im...
ResearchComputing/RCAMP
rcamp/tests/test_projects_receivers.py
Python
mit
4,732
0.00317
''' Copyright (C) 2013 Travis DeWolf 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) any later version. This program is distributed in the hope t...
Syralist/yet-another-hexapod
hexapy/Arm.py
Python
mit
6,538
0.008259
# -*- mode: python; coding: utf-8 -*- # Copyright © 2016 by Jeffrey C. Ollie # # This file is part of ceph_exporter. # # ceph_exporter 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 #...
jcollie/ceph_exporter
ceph_exporter/ceph/metrics/ceph_objects_recovered.py
Python
gpl-3.0
908
0
import unittest import mock from reports.tests.base import BaseBidsUtilityTest from copy import copy test_bids_invalid = [ [{ "owner": "test", "date": "2016-03-17T13:32:25.774673+02:00", "id": "44931d9653034837baff087cfc2fb5ac", }], [{ "status": "invalid", "owner": ...
yshalenyk/reports
reports/tests/bids_tests.py
Python
apache-2.0
9,230
0.000108
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import """JSON flat file database system.""" import codecs import os import os.path import re from fcntl import flock, LOCK_EX, LOCK_SH, LOCK_UN import redis import json import time from rophako.settings import Config from roph...
kirsle/rophako
rophako/jsondb.py
Python
gpl-2.0
7,743
0.002583
""" Test the memory module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os import os.path import pickle import sys import time import datetime import pytest from joblib.memory import Memory from job...
lesteve/joblib
joblib/test/test_memory.py
Python
bsd-3-clause
39,966
0.0002
''' Created on Jul 9, 2014 @author: viejoemer HowTo remove an arbitrary element and retrieve that item at the same time? ¿Cómo eliminar un elemento de forma arbitraria y recuperar ese elemento al mismo tiempo? pop() Remove and return an arbitrary element from the set. Raises KeyError if the set is empty. ''' #Cre...
OxPython/Python_set_pop
src/set_pop.py
Python
epl-1.0
574
0.017483
"""Classes that determine convergence of an algorithm run based on population stagnation or max raw score reached""" class Convergence(object): """ Base class for all convergence object to be based on. It is necessary to supply the population instance, to be able to obtain current and former populatio...
suttond/MODOI
ase/ga/convergence.py
Python
lgpl-3.0
3,442
0.000581
#!/usr/bin/python from k5test import * for realm in multipass_realms(create_user=False): # Test kinit with a keytab. realm.kinit(realm.host_princ, flags=['-k']) realm = K5Realm(get_creds=False, start_kadmind=True) # Test kinit with a partial keytab. pkeytab = realm.keytab + '.partial' realm.run([ktutil], inp...
gerritjvv/cryptoplayground
kerberos/kdc/src/krb5-1.16/src/tests/t_keytab.py
Python
apache-2.0
5,482
0.00073
# 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...
openstack/neutron-lib
neutron_lib/tests/unit/api/definitions/test_port.py
Python
apache-2.0
793
0
import ardurpc from ardurpc.handler import Handler class Base(Handler): """Handler for the Base Text-LCD type""" def __init__(self, **kwargs): Handler.__init__(self, **kwargs) def getWidth(self): """ Get the display width as number of characters. :return: Width :...
DinoTools/ArduRPC-python
ardurpc/handler/lcd/__init__.py
Python
lgpl-3.0
1,384
0.001445
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
Akrog/cinder
cinder/volume/drivers/netapp/dataontap/nfs_cmode.py
Python
apache-2.0
24,731
0
# Copyright 2022 The DDSP 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 wri...
magenta/ddsp
ddsp/training/train_util.py
Python
apache-2.0
12,295
0.008459
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os.path import sys import types import unittest from contextlib import contextmanager from django.template import Context, TemplateDoesNotExist from django.template.engine import Engine from django.test import SimpleTestCase, override_settings fro...
abhattad4/Digi-Menu
tests/template_tests/test_loaders.py
Python
bsd-3-clause
8,433
0.00107
# 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...
jbedorf/tensorflow
tensorflow/python/ops/distributions/transformed_distribution.py
Python
apache-2.0
27,637
0.005826
# 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...
apache/arrow
dev/archery/archery/integration/tester_go.py
Python
apache-2.0
3,999
0
""" This module implements connections for MySQLdb. Presently there is only one class: Connection. Others are unlikely. However, you might want to make your own subclasses. In most cases, you will probably override Connection.default_cursor with a non-standard Cursor class. """ from MySQLdb import cursors fr...
skycucumber/Messaging-Gateway
webapp/venv/lib/python2.7/site-packages/MySQLdb/connections.py
Python
gpl-2.0
11,777
0.001359
import phidl.geometry as pg import gdsfactory as gf from gdsfactory.component import Component @gf.cell def outline(elements, **kwargs) -> Component: """ Returns Component containing the outlined polygon(s). wraps phidl.geometry.outline Creates an outline around all the polygons passed in the `elem...
gdsfactory/gdsfactory
gdsfactory/geometry/outline.py
Python
mit
2,655
0.002637
""" Test grade calculation. """ from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory from mock import patch, MagicMock from nose.plugins.attrib import attr from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys.edx.locator import CourseL...
shabab12/edx-platform
lms/djangoapps/courseware/tests/test_grades.py
Python
agpl-3.0
18,523
0.000702
from opensfm.actions import create_submodels from . import command import argparse from opensfm.dataset import DataSet class Command(command.CommandBase): name = "create_submodels" help = "Split the dataset into smaller submodels" def run_impl(self, dataset: DataSet, args: argparse.Namespace) -> None: ...
mapillary/OpenSfM
opensfm/commands/create_submodels.py
Python
bsd-2-clause
454
0
''' Created on Dec 13, 2015 @author: Shannon Litwin ''' import Adafruit_BBIO.GPIO as GPIO import Adafruit_BBIO.PWM as PWM import Lib_LCD as LCD import Lib_Main as BBB import sys import signal import time leftForward = "P8_46" leftBackward = "P8_45" rightForward = "P9_14" rightBackward = "P9_16" def Control_C_Exit(si...
ValRose/Rose_Bone
PythonLibraries/lcd_demo.py
Python
mit
1,617
0.006184
from lib.flowchart.nodes.generalNode import NodeWithCtrlWidget class myNode(NodeWithCtrlWidget): '''This is test docstring''' nodeName = 'myTestNode' uiTemplate = [{'name': 'HNO3', 'type': 'list', 'value': 'Closest Time'}, {'name': 'C2H5OH', 'type': 'bool', 'value': 0}, ...
cdd1969/pygwa
lib/flowchart/nodes/n000_testnode/myNode.py
Python
gpl-2.0
578
0.00519
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Sarielsaz Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of headers messages to announce blocks. Setup: - Two nodes, two p2p connections to n...
sarielsaz/sarielsaz
test/functional/sendheaders.py
Python
mit
24,054
0.003492
#!/usr/bin/env python #------------------------------------------------------------------------------ # Copyright 2014 Esri # 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.apac...
Esri/ops-server-config
Utilities/ListServiceWorkspaces.py
Python
apache-2.0
6,504
0.009533
import math import RingGameGlobals import RingAction import RingTracks import RingTrack import RingTrackGroup from direct.showbase import PythonUtil STATIC = 0 SIMPLE = 1 COMPLEX = 2 def getRandomRingTrackGroup(type, numRings, rng): global trackListGenFuncs funcTable = trackListGenFuncs[type][numRings - 1] ...
ksmit799/Toontown-Source
toontown/minigame/RingTrackGroups.py
Python
mit
8,136
0.004671
#!/usr/bin/env python # -*- coding: utf-8 -*- """ package/module TEST Descripción del test. Autor: PABLO PIZARRO @ github.com/ppizarror Fecha: AGOSTO 2016 Licencia: GPLv2 """ __author__ = "ppizarror" # Importación de librerías # noinspection PyUnresolvedReferences from _testpath import * # @UnusedWildI...
ppizarror/korektor
test/_template.py
Python
gpl-2.0
1,642
0.00061
import os import re from setuptools import setup, find_packages THIS_DIR = os.path.dirname(os.path.realpath(__name__)) def read(*parts): with open(os.path.join(THIS_DIR, *parts)) as f: return f.read() def get_version(): return re.findall("__version__ = '([\d\.]+)'", read('mar...
cstipkovic/spidermonkey-research
testing/marionette/harness/setup.py
Python
mpl-2.0
1,214
0.002471
import oauth2 as oauth import sher.settings as settings import cgi import urlparse import urllib import gdata.youtube import gdata.youtube.service import twitter class TwitterService(object): def __init__(self, consumer_key, consumer_secret): self.consumer_key = consumer_key self.consumer_secret =...
viswimmer1/PythonGenerator
data/python_files/28964260/services.py
Python
gpl-2.0
5,901
0.002542
# PyVision License # # Copyright (c) 2006-2008 David S. Bolme # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, thi...
svohara/pyvision
src/pyvision/point/DetectorROI.py
Python
bsd-3-clause
4,461
0.011432
# -*- encoding: utf-8 -*- """Test class for Architecture UI""" from fauxfactory import gen_string from nailgun import entities from robottelo.datafactory import generate_strings_list, invalid_values_list from robottelo.decorators import run_only_on, tier1 from robottelo.test import UITestCase from robottelo.ui.factory ...
tkolhar/robottelo
tests/foreman/ui/test_architecture.py
Python
gpl-3.0
5,128
0
from Tools.Profile import profile profile("LOAD:ElementTree") import xml.etree.cElementTree import os profile("LOAD:enigma_skin") from enigma import eSize, ePoint, eRect, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, addFont, gRGB, eWindowStyleSkinned, getDesktop from Components.config import ConfigSubsection,...
isslayne/enigma2
skin.py
Python
gpl-2.0
35,736
0.035678
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions related to blackbody radiation.""" from __future__ import (absolute_import, division, print_function, unicode_literals) # LOCAL from ..modeling import blackbody as _bb from ..utils.decorators import deprecated __all_...
AustereCuriosity/astropy
astropy/analytic_functions/blackbody.py
Python
bsd-3-clause
2,225
0
class ValueWrapper(object): xmlEntry = None # Processdata sets this every time before extracting a new Entry. idcounter = 1000 # class variable to generate @staticmethod def reset_id_counter(): ValueWrapper.idcounter = 1000 def __init__(self, val): self._value = val ...
Learning-from-our-past/Kaira
interface/valuewrapper.py
Python
gpl-2.0
1,114
0.002693
#!/usr/bin/env python # Copyright 2017 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. """Merge the PGC files generated during the profiling step to the PGD database. This is required to workaround a flakyness in pgomgr.e...
Passw/gn_GFW
build/win/merge_pgc_files.py
Python
gpl-3.0
5,397
0.008894
# coding=utf-8 """This module contains the abstract class of the MinimumNeeds. The storage logic is omitted here.""" __author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '05/10/2014' __copyright__ = ('Copyright 2014, Australia Indonesia Facility for ' 'Disaster Reduction') from coll...
Jannes123/inasafe
safe/common/minimum_needs.py
Python
gpl-3.0
8,353
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################## # The MIT License (MIT) # Copyright (c) 2018 Kevin Walchko # see LICENSE for full details ############################################## from pygecko.multiprocessing import geckopy from pygecko.multiprocessing import GeckoSim...
walchko/pygecko
dev/cpp-simple/subpub.py
Python
mit
1,370
0.00219