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
################################################################# # This file is part of glyr # + a command-line tool and library to download various sort of music related metadata. # + Copyright (C) [2011-2012] [Christopher Pahl] # + Hosted at: https://github.com/sahib/glyr # # glyr is free software: you can redistri...
emillon/glyr-debian
spec/provider/tests/artistphoto.py
Python
gpl-3.0
3,340
0.000599
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
MazaCoin/maza
test/functional/test_framework/messages.py
Python
mit
38,295
0.002141
import os import sys def main(): if len(sys.argv) <= 2: print("This script generates the .expected file from your PS3's debug logs.") print("") print("Usage: convert-ps3-output.py <input> <output>") print("Example: convert-ps3-output.py hello_world.log hello_world.expected") ...
RPCS3/ps3autotests
utils/convert-ps3-output.py
Python
gpl-2.0
868
0.008065
from __future__ import division from collections import Iterable, defaultdict import copy import os import pickle import itertools from numbers import Integral, Real from xml.etree import ElementTree as ET import sys import numpy as np from openmc import Mesh, Filter, Trigger, Nuclide from openmc.cross import CrossS...
mjlong/openmc
openmc/tallies.py
Python
mit
100,934
0.000545
import unittest import os import sys import time import sqlite3 import os.path as op from shutil import rmtree from functools import partial from kivy.clock import Clock main_path = op.dirname(op.dirname(op.abspath(__file__))) sys.path.append(main_path) from main import KrySA, ErrorPop from tasks.basic import Basic ...
KeyWeeUsr/KrySA
krysa/tests/test_tasks_basic_small.py
Python
gpl-3.0
3,977
0.000503
# Copyright 2017 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, s...
google/sling
sling/nlp/parser/trainer/transition_generator.py
Python
apache-2.0
12,819
0.012637
############################################################################## # Copyright (c) 2013-2017, 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...
skosukhin/spack
var/spack/repos/builtin/packages/bpp-suite/package.py
Python
lgpl-2.1
1,771
0.001129
# Copyright 2012 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 in...
rodrigods/keystone
keystone/tests/test_backend.py
Python
apache-2.0
205,792
0.000005
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.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...
xiangke/pycopia
core/pycopia/OS/Linux/firewall.py
Python
lgpl-2.1
1,458
0.006173
#requirements: selenium wget python2.7 Geckodriver import time import sys import wget from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys ...
daverstephens/The-SOC-Shop
Threat_Intel/GScraper.py
Python
gpl-2.0
1,824
0.014254
from bitcoin import network from bitcoin import messages from io import BytesIO from mock import patch from gevent import socket import mock import os import unittest __author__ = 'cdecker' BASENAME = os.path.dirname(__file__) class TestNetworkClient(unittest.TestCase): def test_parser(self): """Test ...
cdecker/pycoin
tests/test_network.py
Python
bsd-3-clause
8,572
0
# -*- coding: utf-8 -*- ''' Created on Nov 30, 2014 @author: Michael Große <mic.grosse@posteo.de> ''' from collections import defaultdict from receipteval.item_cat_dict import ItemCategoryDict class ReceiptCollection(object): ''' Collection of purchases with evaluation and output options. ''' def __...
micgro42/ReceiptEval
receipteval/receipt_collection.py
Python
gpl-3.0
3,399
0
#! /usr/bin/env python sources = """ eNrsvWt3HEl2IDa7fqy3bK0kW1577WOfnKKpzGwWkiCnJY2wXd3q4ZAjanqaPHxoWgcNFRNVCSAH icpiZhYBaDR7/CP83T/CX/3df8v3Fc+MzCqwu2fkc9zSEEBVxI2IGzfuK+698b//69+9/1Hy9k82 t9miqs+zxaJcl91i8f5fvf276XQawWfn5fo8+vLl8yiJN0292i6Lpo2jfL2K4mW9brdX9Df8ui6W XbGKPpR5dFncXtfNqk0jADKZvP/Xb/8NjtB2q/f/2Zv/81/96Ef...
raptorbird/RAVN
tests/runtests.py
Python
gpl-2.0
227,702
0.00004
from typing import Callable from typing import ContextManager from typing import Dict from typing import List from typing import Optional from typing import overload from typing import TextIO from typing import Tuple from typing import TYPE_CHECKING from typing import Union from .migration import MigrationContext from...
sqlalchemy/alembic
alembic/runtime/environment.py
Python
mit
38,523
0
"""<name>Performance Curves</name> <description>Model performance at different thresholds</description> <icon>icons/PerformanceCurves.png</icon> <priority>30</priority> <contact>Janez Demsar (janez.demsar@fri.uni-lj.si)</contact>""" from OWWidget import * from OWGUI import * from PyQt4.QtGui import * from PyQt4.QtCore...
yzl0083/orange
Orange/OrangeWidgets/Prototypes/OWPerformanceCurves.py
Python
gpl-3.0
7,520
0.007314
# http://code.activestate.com/recipes/577263-numerical-integration-using-monte-carlo-method/ # Numerical Integration using Monte Carlo method # FB - 201006137 #pythran export montecarlo_integration(float, float, int, float list, int) #runas montecarlo_integration(1.,10.,100,[x/100. for x in range(100)],100) #bench mont...
serge-sans-paille/pythran
pythran/tests/cases/monte_carlo.py
Python
bsd-3-clause
1,346
0.008915
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_qc.configuration import Configuration class...
Telestream/telestream-cloud-python-sdk
telestream_cloud_qc_sdk/telestream_cloud_qc/models/active_format_test.py
Python
mit
4,684
0
""" Module that provides a connection to the ModuleStore specified in the django settings. Passes settings.MODULESTORE as kwargs to MongoModuleStore """ from __future__ import absolute_import from importlib import import_module import re from django.conf import settings from django.core.cache import get_cache, Inval...
altsen/diandiyun-platform
common/lib/xmodule/xmodule/modulestore/django.py
Python
agpl-3.0
7,244
0.001242
a,b,c = input().split(" ") numbers = [int(a),int(b),int(c)] cnumbers = list(numbers) for j in range(0,len(numbers)): for i in range(0,len(numbers)-1): if numbers[i] > numbers[i+1]: aux = numbers[i+1] numbers[i+1] = numbers[i] numbers[i] = aux for ...
henrywm/URI
src/beginner/1042.py
Python
apache-2.0
431
0.027842
from __future__ import unicode_literals from zope.interface import implements, classProvides from scheme.macro import Macro from scheme.symbol import Symbol from scheme.environment import Environment, SyntaxEnvironment from scheme.syntax import SyntaxSymbol from scheme.PatternMatcher import PatternMatcher # from sche...
perkinslr/schemepy
scheme/syntax_rules.py
Python
lgpl-2.1
1,919
0.007817
from __future__ import unicode_literals from blanc_basic_assets.fields import AssetForeignKey from django.core.exceptions import ValidationError from django.core.urlresolvers import get_script_prefix from django.core.validators import RegexValidator from django.db import models from django.utils.encoding import iri_to...
blancltd/blanc-basic-pages
blanc_basic_pages/models.py
Python
bsd-3-clause
2,112
0.002367
from __future__ import absolute_import, unicode_literals import warnings from django.core.exceptions import ImproperlyConfigured from django.template.loader import render_to_string from django.utils.safestring import mark_safe from wagtail.utils.deprecation import RemovedInWagtail16Warning from wagtail.wagtailadmin....
hamsterbacke23/wagtail
wagtail/wagtailsnippets/edit_handlers.py
Python
bsd-3-clause
2,653
0.001508
import string import ast from state_machine import PSM, Source class SpecialPattern: individual_chars = ('t', 'n', 'v', 'f', 'r', '0') range_chars = ('d', 'D', 'w', 'W', 's', 'S') special_chars = ('^', '$', '[', ']', '(', ')', '{', '}', '\\', '.', '*', '?', '+', '|', '.') rest...
VaysseB/id_generator
src/parser.py
Python
gpl-3.0
15,217
0.00092
# -*- coding: utf-8 -*- u"""Flash Config parser. :copyright: Copyright (c) 2021 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from pykern import pkio from pykern.pkcollections import PKDict from pykern.pkdebug import pkdc, pkdp, pkdlog import inspect import re def...
radiasoft/sirepo
sirepo/template/flash_views.py
Python
apache-2.0
27,201
0.00114
# ================================================================================================== # Copyright 2013 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
abel-von/commons
tests/python/twitter/common/zookeeper/serverset/test_serverset_unit.py
Python
apache-2.0
2,836
0.0067
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from tf2_msgs/FrameGraphRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class FrameGraphRequest(genpy.Message): _md5sum = "d41d8cd98f00b204e9800998ecf8427e" _...
UnbDroid/robomagellan
Codigos/Raspberry/desenvolvimentoRos/devel/lib/python2.7/dist-packages/tf2_msgs/srv/_FrameGraph.py
Python
gpl-3.0
7,187
0.016558
#!/usr/bin/env python import os from runtest import TestBase class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'openclose', serial=True, result=""" # DURATION TID FUNCTION [ 9875] | main() { [ 9875] | fopen() { 14.416 us [ 9875] | sys_open(); 1...
namhyung/uftrace
tests/t139_kernel_dynamic2.py
Python
gpl-2.0
1,228
0.000814
# -*- coding: utf-8 -*- """Python has a very powerful mapping type at its core: the :class:`dict` type. While versatile and featureful, the :class:`dict` prioritizes simplicity and performance. As a result, it does not retain the order of item insertion [1]_, nor does it store multiple values per key. It is a fast, uno...
neuropil/boltons
boltons/dictutils.py
Python
bsd-3-clause
24,228
0.000124
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/security_group_view_result.py
Python
mit
1,116
0.000896
import unittest from test import test_support # Skip this test if the _testcapi module isn't available. test_support.import_module('_testcapi') from _testcapi import _test_structmembersType, \ CHAR_MAX, CHAR_MIN, UCHAR_MAX, \ SHRT_MAX, SHRT_MIN, USHRT_MAX, \ INT_MAX, INT_MIN, UINT_MAX, \ LONG_...
j5shi/Thruster
pylibs/test/test_structmembers.py
Python
gpl-2.0
3,646
0.001646
# singleton tuple <- singleton tuple x, = 0, print(x) # singleton tuple <- singleton list x, = [-1] print(x) # binary tuple <- binary tuple x,y = 1,2 print(x,y) # binary tuple swap x,y = y,x print(x,y) # ternary tuple <- ternary tuple x,y,z = 3,4,5 print(x,y,z) # singleton list <- singleton list [x] = [42] print(x) # s...
bjpop/berp
test/regression/features/assignment/assign_unpack.py
Python
bsd-3-clause
796
0.04397
#!/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...
cloudera/hue
apps/sqoop/src/sqoop/sqoop_properties.py
Python
apache-2.0
1,837
0.009799
# (c) 2013, Ovais Tariq <me@ovaistariq.net> # # This file is part of mha_helper # # 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...
ovaistariq/mha-helper
mha_helper/__init__.py
Python
gpl-3.0
900
0
# -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file './acq4/analysis/old/StdpCtrlTemplate.ui' # # Created: Tue Dec 24 01:49:15 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, ...
meganbkratz/acq4
acq4/analysis/old/StdpCtrlTemplate.py
Python
mit
3,654
0.00301
# coding: utf-8 class ActMail(object): subject = '宝宝云帐号注册激活邮件' content = '感谢您申请注册宝宝云账号! 请点击链接完成注册: ' source = 'enfancemill@gmail.com' secret = 'kwhr8xkq4eoq6bvvh6nvr6267lrdcqb2'
enfancemill/baobaocloud
baobaologic/config.py
Python
gpl-3.0
260
0
"""Update vulnerability sources.""" from selinon import StoragePool from f8a_worker.base import BaseTask from f8a_worker.enums import EcosystemBackend from f8a_worker.models import Ecosystem from f8a_worker.solver import get_ecosystem_solver, OSSIndexDependencyParser from f8a_worker.workers import CVEcheckerTask clas...
miteshvp/fabric8-analytics-worker
f8a_worker/workers/cvedbsync.py
Python
gpl-3.0
4,809
0.004367
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Data access functions to read from and write to the SQLite backend. """ import sqlite3 import codecs import os import re def setup_db(): dbpath = os.path.dirname(os.path.realpath(__file__)) + os.sep +".."+os.sep+"gitdox.db" conn = sqlite3.connect(dbpath) cur = co...
cligu/gitdox
modules/gitdox_sql.py
Python
apache-2.0
8,292
0.032562
import pcf8591read """ This is a barebones script for controlling the work flow of recording EMG words and associating the data with a specific word, captured in the filename. """ reader = pcf8591read.adc_reader() filename = input('Current word:') reader.record = True reader.run(filename)
bwc126/MLND-Subvocal
simple_svr.py
Python
mit
290
0.003448
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="volume", **kwargs): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
plotly/python-api
packages/python/plotly/plotly/validators/volume/_reversescale.py
Python
mit
457
0.002188
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
dims/nova
nova/cmd/dhcpbridge.py
Python
apache-2.0
5,189
0.000193
# 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...
rahulunair/nova
nova/objects/vcpu_model.py
Python
apache-2.0
2,317
0
# -*- coding: utf-8 -*- ''' accpy.simulate.const Felix Kramer (felix.kramer@physik.hu-berlin.de) ''' # ratio of circumference to diameter of circle pi = 3.141592653589793115997963468544185161590576171875 # speed of light----------------------------------------/ (m/s) cl = 299792458. # elementary charge----------------...
accpy/accpy
accpy/simulate/const.py
Python
gpl-3.0
1,881
0
import visualizer as v import os as os import json from shutil import rmtree from os.path import expanduser from os.path import join as OSpathJoin global appLoc appLoc = "C:\Users\john\Desktop\jDesigner"#C:\\Program Files\\aggendo\\jCode\\" configFold = "C:\Users\john\Desktop\jDesigner\config" recent = "" canvas = "" s...
aggendo/jDesigner
configuration.py
Python
gpl-2.0
5,488
0.013484
from django.db import migrations class Migration(migrations.Migration): """ We're changing the stream deactivation process to make it mark all messages in the stream as read. For things to be consistent with streams that have been deactivated before this change, we need a migration to fix those old st...
showell/zulip
zerver/migrations/0301_fix_unread_messages_in_deactivated_streams.py
Python
apache-2.0
909
0.0033
from utils import url_xpath, State from .people import DEPersonScraper from .bills import DEBillScraper # from .events import DEEventScraper # from .committees import DECommitteeScraper class Delaware(State): scrapers = { "people": DEPersonScraper, "bills": DEBillScraper, # 'events': DEEv...
hiteshgarg14/openstates
scrapers/de/__init__.py
Python
gpl-3.0
3,685
0.000271
from django import forms from django.contrib.gis.geos import Point from widgets import AddAnotherWidgetWrapper from django.core.exceptions import ValidationError from .models import (Site, CycleResultSet, Monitor, ProgrammeResources, ProgrammeImage) class SiteForm(forms.ModelForm): latitude ...
Code4SA/umibukela
umibukela/forms.py
Python
mit
5,345
0.001123
#!/usr/bin/env python3 # Copyright 2012-2016 The Meson development team # 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...
thiblahute/meson
run_project_tests.py
Python
apache-2.0
29,483
0.003426
# -*- test-case-name: vumi.transports.smpp.tests.test_smpp_transport -*- import warnings from uuid import uuid4 from twisted.internet import reactor from twisted.internet.defer import ( inlineCallbacks, maybeDeferred, returnValue, Deferred, succeed) from twisted.internet.task import LoopingCall from vumi.reconne...
TouK/vumi
vumi/transports/smpp/smpp_transport.py
Python
bsd-3-clause
25,023
0
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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...
b1-systems/kiwi
kiwi/utils/sync.py
Python
gpl-3.0
3,632
0
# -*- coding: utf-8 -*- # vim: ft=python:sw=4:ts=4:sts=4:et: import requests import decimal from datetime import timedelta from xml.etree import ElementTree from django_bnr.models import Rate def get_bnr_rate(date, currency='USD'): try: rate = Rate.objects.get(date=date, currency=currency) retur...
PressLabs/django-bnr
django_bnr/utils.py
Python
mit
1,519
0.000658
#!/usr/bin/env python2 # Based on example.py from DIGITS # https://github.com/NVIDIA/DIGITS """ Classify an image using individual model files imported from DIGITS This tool is for testing your deployed model with images from the test folder. All the configuration params are removed or commented out as compared to ...
gyurisc/DigitsRest
use_archive.py
Python
mit
8,394
0.005957
"""\ minidom.py -- a lightweight DOM implementation based on SAX. parse( "foo.xml" ) parseString( "<foo><bar/></foo>" ) Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this interface * SAX 2 namespaces ""...
kidmaple/CoolWall
user/python/Lib/xml/dom/minidom.py
Python
gpl-2.0
14,813
0.004186
from pandac.PandaModules import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from ElevatorConstants import * from ElevatorUtils import * import DistributedElevator import DistributedElevatorExt from toontown.toonbase import ToontownGlobals from direct.directnotify import Di...
ToontownUprising/src
toontown/building/DistributedBossElevator.py
Python
mit
3,644
0.004665
# -*- coding: utf-8 -*- """ website.api ~~~~~~~~~~~ website api blueprint. """
alibaba/FlexGW
website/api/__init__.py
Python
bsd-3-clause
92
0
# 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 # distributed under t...
olivierlemasle/keystone-playground
keystoneplayground/tests/base.py
Python
apache-2.0
661
0
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals try: from builtins import * from future import standard_library standard_library.install_aliases() except: # we might be on py3.2, which the future library doesn't support pass import os import sys if sys.versio...
staffanm/layeredconfig
tests/test_withFuture.py
Python
bsd-3-clause
984
0.005081
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in t...
guduchango/pyafipws
wsbfev1.py
Python
gpl-3.0
25,642
0.006318
from Start_up import* from Player import Player, HealthBar from Bullet import Bullet from Enemy import Enemy from Stopper import Stopper from Particle import Particle from Stars import Star, create_stars from Package import EnemyDrop, HealthPack from Notes import NoteController class Game: def __init__(self, play...
YJoe/SpaceShips
Desktop/Python/space_scroll/Game.py
Python
gpl-3.0
11,279
0.002394
"""A torture test to ferret out problems with multi-threading.""" import sys import threading from ndb import tasklets from ndb import eventloop def main(): ##sys.stdout.write('_State.__bases__ = %r\n' % (eventloop._State.__bases__,)) num = 10 try: num = int(sys.argv[1]) except Exception: pass thr...
bslatkin/8-bits
appengine-ndb/mttest.py
Python
apache-2.0
947
0.019007
from struct import pack from sqlite3 import Binary def pts(c): return ["dd",[c.X,c.Y]] def pt4mp(c): return ["Bidd",[1,1,c.X,c.Y]] def mp(coordinates): partCount=coordinates.partCount i=0 out = ["I",[0]] while i<partCount: pt = coordinates.getPart(i) [ptrn,c]=pt4mp(pt...
calvinmetcalf/arcsqlite
wkb.py
Python
mit
3,451
0.031585
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('index', '0004_repository_public'), ] operations = [ migrations.AddField( model_name='project', name=...
pombredanne/project_index
index/migrations/0005_project_related_project.py
Python
gpl-3.0
471
0
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import sys import os import signal import platform from PyQt5.QtCore import Qt, QObject, QCoreApplication, QEvent, pyqtSlot, QLocale, QTranslator, QLibraryInfo, QT_VERSION_STR, PYQT_VERSION_STR from PyQt5.QtQml import Q...
onitake/Uranium
UM/Qt/QtApplication.py
Python
agpl-3.0
13,585
0.005962
# -*- coding:utf-8 -*- """ 一些能够帮你提升效率的辅助函数 """ from __future__ import unicode_literals, division from copy import deepcopy from datetime import timedelta from threading import Thread import requests import requests.exceptions from six.moves import urllib from .log import logger from .value import ENV __all__ = ['ge...
er1iang/hfut_stu_lib
hfut/util.py
Python
mit
8,546
0.000944
# qgis-ol3 Creates OpenLayers map from QGIS layers # Copyright (C) 2014 Victor Olaya (volayaf@gmail.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (...
timlinux/qgis2web
olwriter.py
Python
gpl-2.0
18,993
0.002738
import unittest import modular_core.libfundamental as lfu from modular_core.libsimcomponents import ensemble_manager as mng import os, sys, pdb #log = open(os.path.join(os.getcwd(), 'test_ensemble.log'), 'w') #sys.stdout = log import lattice as mod class dummyTestCase(unittest.TestCase): """Tests for `dummy modul...
ctogle/lattice
tests/test_lattice.py
Python
mit
1,022
0.036204
import re import time from astropy import units as u from astropy.coordinates import SkyCoord from panoptes.utils.time import current_time from panoptes.utils import error as error from panoptes.pocs.mount.serial import AbstractSerialMount class Mount(AbstractSerialMount): """ Mount class for iOptron mo...
panoptes/POCS
src/panoptes/pocs/mount/ioptron/ieq30pro.py
Python
mit
12,613
0.001904
# -*- coding: utf-8 -*- import scrapy from scrapy.selector import Selector from scrapy.loader import ItemLoader from scrapy.xlib.pydispatch import dispatcher from scrapy import signals from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import exp...
hbbhbbh/TmallSingleCrawler
TmallSingleCrawler/spiders/tmall.py
Python
mit
11,888
0.003456
import numpy as np from ._layout import Layout from ._multivector import MultiVector class ConformalLayout(Layout): r""" A layout for a conformal algebra, which adds extra constants and helpers. Typically these should be constructed via :func:`clifford.conformalize`. .. versionadded:: 1.2.0 At...
arsenovic/clifford
clifford/_conformal_layout.py
Python
bsd-3-clause
2,999
0.001
"""deCONZ climate platform tests.""" from unittest.mock import Mock, patch import asynctest from homeassistant import config_entries from homeassistant.components import deconz from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.setup import async_setup_component import homeassistan...
jamespcole/home-assistant
tests/components/deconz/test_climate.py
Python
apache-2.0
6,215
0
# Code from Chapter 18 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by Stephen Marsland (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with n...
Anderson-Lab/anderson-lab.github.io
csc_466_2021_spring/MLCode/Ch18/gp.py
Python
mit
13,209
0.059959
#!/usr/bin/env python from setuptools import setup, find_packages import chagallpy setup( name='chagallpy', version=chagallpy.__version__, packages=find_packages(), license='MIT', description='CHArming GALLery in PYthon', long_description_content_type="text/markdown", long_description=open(...
janpipek/chagallpy
setup.py
Python
mit
782
0
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # DTE Chile OpenERP 7 # Copyright (C) 2016 Cesar Lopez Aguillon Mall Connection # <http://www.mallconnection.org>. # This program is free software: you can redistribute it and/or modify # ...
mallconnectionorg/openerp
DTE/mc_dte_guia/__init__.py
Python
agpl-3.0
1,114
0
"""Read and write configuration settings """ from milc import cli def print_config(section, key): """Print a single config setting to stdout. """ cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) def show_config(): """Print the current configuration to stdout. """ ...
kmtoki/qmk_firmware
lib/python/qmk/cli/config.py
Python
gpl-2.0
3,720
0.002151
from django.contrib import admin from . import models class OrderItemInline(admin.TabularInline): fields = ('product', 'quantity') raw_id_fields = ('product',) model = models.OrderItem extra = 1 class ProductAdmin(admin.ModelAdmin): list_display = ('name', 'price', 'description', 'stock', 'discont...
PrestonMonteWest/compmart
commerce/admin.py
Python
apache-2.0
1,286
0.004666
# -*- coding: utf-8 -*- VERSION = (0, 1, 6, 'final') if VERSION[-1] != "final": # pragma: no cover __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1]))
arteria/django-shop-simplenotifications
shop_simplenotifications/__init__.py
Python
unlicense
222
0.009009
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
josenavas/QiiTa
qiita_db/handlers/tests/oauthbase.py
Python
bsd-3-clause
841
0
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets, trying to take into account motor interference ''' import sys, time, os, math from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser.add_argument("--no-timestamps",dest="notimestamps", action='store_true', help="Log...
barthess/mavlink
pymavlink/tools/magfit_motors.py
Python
lgpl-3.0
4,813
0.009765
import libtcodpy as libtcod from menu import Menu from menu_manager import MenuStatus from menu_game import MenuGame from ui.frame_main_menu import FrameMainMenu class MenuMain(Menu): def __init__(self, width, height): Menu.__init__(self, width, height) self.menu_frame = FrameMainMenu(width, height) def update...
RCIX/RogueP
logic/menu_main.py
Python
mit
668
0.02994
from django.contrib import admin from django.contrib.admin import ModelAdmin from paywall.models import PaymentEntry @admin.register(PaymentEntry) class PaymentEntryAdmin(ModelAdmin): pass
cypreess/django-getpaid
example/paywall/admin.py
Python
mit
195
0
import serial from sys import platform as platform import serial.tools.list_ports import serial.threaded from pymouse import PyMouse from Voice.GoogleTTS import speak import threading import math import copy import time import json data_repository_right = { "id" : [], "name" : [], "short...
ashwinpilgaonkar/Flick
Bluetooth/Bluetooth.py
Python
apache-2.0
25,172
0.012871
import logging # noinspection PyUnresolvedReferences import feature #noqa logging.basicConfig(level=logging.DEBUG) class Rollout(object): __version__ = '0.3.5' def __init__(self, feature_storage=None, user_storage=None, undefined_feature_access=False): """ Manage feature flags for groups, u...
brechin/pyrollout
pyrollout/rollout.py
Python
mit
2,301
0.002608
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('widgetbox', '0010_html'), ] operations = [ migrations.AddField( model_name='button', name='extra_css...
logithr/djangocms-widgetbox
widgetbox/migrations/0011_auto_20150731_0958.py
Python
mit
447
0
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wellspring.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ushatil/wellness-tracker
ws/manage.py
Python
mit
253
0
import sys sys.path.append("../../") from unittest.mock import patch, MagicMock MockRPi = MagicMock() MockSpidev = MagicMock() modules = { "RPi": MockRPi, "RPi.GPIO": MockRPi.GPIO, "spidev": MockSpidev } patcher = patch.dict("sys.modules", modules) patcher.start() from gfxlcd.driver.ssd1306.spi import SP...
bkosciow/gfxlcd
gfxlcd/tests/test_ssd1306.py
Python
mit
464
0.006466
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2010-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
NIASC/VirusMeta
diginorm_module/abundance-dist.py
Python
gpl-3.0
6,918
0
# Generated by Django 3.0.7 on 2020-08-03 08:42 from django.db import migrations, models import weblate.utils.validators class Migration(migrations.Migration): dependencies = [ ("trans", "0093_auto_20200730_1432"), ] operations = [ migrations.AddField( model_name="project",...
nijel/weblate
weblate/trans/migrations/0094_project_language_aliases.py
Python
gpl-3.0
752
0.00266
from django.conf import settings from django.test import TestCase, TransactionTestCase from django.test.simple import DjangoTestSuiteRunner from django.test.runner import reorder_suite from django.utils.importlib import import_module from django.utils.unittest.loader import defaultTestLoader class DiscoveryDjangoTe...
mozilla/moztrap
tests/runner.py
Python
bsd-2-clause
1,224
0.001634
# ---------------------------------------------------------------------- # author : Martin Ruchti # contact : martin.ruchti@tum.de # ---------------------------------------------------------------------- from __future__ import print_function, absolute_import, division from numpy import * from .variables import * '''...
AJBrodie/inflowProject
pyKratos/newton_raphson_strategy.py
Python
bsd-2-clause
6,317
0.015197
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gem/geonode
geonode/layers/views.py
Python
gpl-3.0
29,767
0.000571
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys import os import re import csv import copy import warnings from optparse import OptionParser from gnuradio import filter, fft try: import numpy as np except ImportError:...
sdh11/gnuradio
gr-filter/python/filter/design/filter_design.py
Python
gpl-3.0
91,770
0.004914
from django.conf.urls.defaults import * from corehq import AccountingAdminInterfaceDispatcher from corehq.apps.accounting.views import * urlpatterns = patterns('corehq.apps.accounting.views', url(r'^$', 'accounting_default', name='accounting_default'), url(r'^accounts/(\d+)/$', ManageBillingAccountView.as_vie...
gmimano/commcaretest
corehq/apps/accounting/urls.py
Python
bsd-3-clause
1,305
0.007663
# -*- coding: utf-8 -*- from __future__ import unicode_literals from base64 import b64encode, b64decode import datetime import copy import json from django.conf import settings from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseNotAllowed from gripcontrol import Channel, Ht...
fanout/webhookinbox
api/views.py
Python
mit
12,930
0.030085
""" Instructions on how to put together different kinds of lasagnas """ # builtins from collections import (namedtuple, defaultdict, OrderedDict) from functools import (lru_cache, partial) from weakref import WeakKeyDictionary # pip packages from itertools import chain import sys from theano import tensor as T import...
emillynge/lasagne-caterer
lasagnecaterer/recipe.py
Python
gpl-3.0
50,854
0.001298
__author__ = 'davedash' class WheeljackException(Exception): pass class RepoNotFoundException(WheeljackException): """Exception thrown when we interact with an undefined Repo.""" pass class RepoAlreadyInstalledException(WheeljackException): """Exception thrown when we try to re-install a repo.""" ...
pinterest/wheeljack
wheeljack/exceptions.py
Python
mit
769
0
#!/usr/bin/env python3 # Copyright (c) 2017-2020 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test wallet load on startup. Verify that a fujicoind node can maintain list of wallets loading on sta...
fujicoin/fujicoin
test/functional/wallet_startup.py
Python
mit
2,543
0.00118
from sqlalchemy import Column, ForeignKey, Integer, String, Text, DateTime, Table from sqlalchemy.orm import relationship, backref from models import DecBase from models.document import Document from models.keyword import Keyword from jsonschema import * from json_schemas import * from models.collection_version import ...
FreeJournal/freejournal
models/collection.py
Python
mit
6,736
0.007423
import hashlib import requests import threading import json import sys import traceback import base64 import electrum_vtc as electrum from electrum_vtc.plugins import BasePlugin, hook from electrum_vtc.i18n import _ class LabelsPlugin(BasePlugin): def __init__(self, parent, config, name): BasePlugin....
pknight007/electrum-vtc
plugins/labels/labels.py
Python
mit
5,710
0.001576
""" Integration tests for mac_timezone If using parallels, make sure Time sync is turned off. Otherwise, parallels will keep changing your date/time settings while the tests are running. To turn off Time sync do the following: - Go to actions -> configure - Select options at the top and 'More Options' on the l...
saltstack/salt
tests/integration/modules/test_mac_timezone.py
Python
apache-2.0
7,775
0.00373
# -*- coding: utf-8 -*- # Scrapy settings for appstore project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'appstore' SPIDER_MODULES = ['appstore.spiders'] N...
brucexiejiaming/App_store
part1_crawler/appstore/appstore/settings.py
Python
mit
579
0.005181
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import warnings import numpy as np from itertools import product from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from sklearn import datasets from sklearn.base import clo...
meduz/scikit-learn
sklearn/ensemble/tests/test_gradient_boosting.py
Python
bsd-3-clause
40,613
0.000074