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 os import battlenet try: import unittest2 as unittest except ImportError: import unittest as unittest PUBLIC_KEY = os.environ.get('BNET_PUBLIC_KEY') PRIVATE_KEY = os.environ.get('BNET_PRIVATE_KEY') class RegionsTest(unittest.TestCase): def setUp(self): self.connection = battlenet.Connecti...
vishnevskiy/battlenet
tests/test_regions.py
Python
mit
1,132
0.001767
"""Disassembler of Python byte code into mnemonics.""" import sys import types from opcode_25 import * from opcode_25 import __all__ as _opcodes_all __all__ = ["dis","disassemble","distb","disco"] + _opcodes_all del _opcodes_all def dis(x=None): """Disassemble classes, methods, functions, or code. With no ...
whymirror/unholy
decompyle/decompyle/dis_23.py
Python
mit
6,551
0.005343
#coding:utf-8 import sys,os import copy import re import itertools import net """basic from web.py: makes web apps (http://webpy.org)""" __version__ = "0.37" __author__ = [ "Aaron Swartz <me@aaronsw.com>", "Anand Chitipothu <anandology@gmail.com>" ] __license__ = "public domain" __contributors__ = "see https:...
davislidaqing/Mcoderadius
toughradius/console/libs/pyforms/__init__.py
Python
agpl-3.0
12,706
0.009762
#!/usr/bin/env python """ @package ion.agents.platform.platform_agent_stream_publisher @file ion/agents/platform/platform_agent_stream_publisher.py @author Carlos Rueda @brief Stream publishing support for platform agents. """ __author__ = 'Carlos Rueda' import logging import uuid from coverage_model.paramet...
ooici/coi-services
ion/agents/platform/platform_agent_stream_publisher.py
Python
bsd-2-clause
10,637
0.003572
############################################################################## # 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
lib/spack/spack/cmd/__init__.py
Python
lgpl-2.1
9,998
0.0004
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 使用paramiko模块远程管理服务器 通过key登录 ''' import paramiko private_key_path = 'D:\workspace\Python-oldboy\day07\zhangyage_pass' #key = paramiko.RSAKey.from_private_key_file(filename, password) key = paramiko.RSAKey.from_private_key_file(private_key_path,'12345678') #private_ke...
zhangyage/Python-oldboy
day07/ssh_client2.py
Python
apache-2.0
880
0.025074
import exifread import os import shutil import dmcutils from dmcutils import mylog report = {} trashFiles = [ '.DS_Store', 'Thumbs.db', '.picasa.ini' ] def processVideo(file): vp = os.path.join(args.targetFolder,'videos') if not os.path.exists(vp): os.mkdir(vp) outPath = os.path.j...
HaBaLeS/digital-mess-cleaner
filesorter.py
Python
mit
4,411
0.009522
# Copyright 1999-2000 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patches by Mike Poidinger to support multiple databases. # Updated by Peter Cock in 2007...
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/Blast/NCBIStandalone.py
Python
apache-2.0
74,333
0.000592
#! /usr/bin/python # Python ctypes bindings for VLC # # Copyright (C) 2009-2012 the VideoLAN team # $Id: $ # # Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr> # Jean Brouwers <MrJean1 at gmail.com> # Geoff Salmon <geoff.salmon at gmail.com> # # This library is free software; you can redistr...
vr2262/framer
vlc/vlc.py
Python
mit
256,336
0.004837
#!/usr/bin/env python # # Jetduino Example for using the Grove Thumb Joystick (http://www.seeedstudio.com/wiki/Grove_-_Thumb_Joystick) # # The Jetduino connects the Jetson and Grove sensors. You can learn more about the Jetduino here: http://www.NeuroRoboticTech.com/Projects/Jetduino # # Have a question about t...
NeuroRoboticTech/Jetduino
Software/Python/grove_thumb_joystick.py
Python
mit
3,602
0.003609
# -*- coding: utf-8 -*- """ .. module:: MyCapytain.errors :synopsis: MyCapytain errors .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ class MyCapytainException(BaseException): """ Namespacing errors """ class JsonLdCollectionMissing(MyCapytainException): """ Error thrown when ...
Capitains/MyCapytain
MyCapytain/errors.py
Python
mpl-2.0
2,639
0.003412
# Copyright 2016 Internap # # 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, sof...
mat128/python-ubersmith-remote-module-server
ubersmith_remote_module_server/server.py
Python
apache-2.0
915
0.002186
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
levibostian/myBlanky
googleAppEngine/google/appengine/tools/old_dev_appserver.py
Python
mit
133,803
0.007593
PORT = {} PORT['metaManager'] = 10087 CGI_SOCK = {} CGI_SOCK[ 'metaManager' ] = '/tmp/metaManager_fcgi_sock' SOCK = {} SOCK[ 'logqueue' ] = '/tmp/logqueue_sock' PIDPATH = {} PIDPATH[ 'metaManager' ] = '/var/run/metaManager.server.pid' PIDPATH[ 'managerChewer' ] = '/var/run/data.chewer.pid'
hackshel/metaCollecter
src/metaManager/modules/defines.py
Python
bsd-3-clause
312
0.032051
#!/usr/bin/env python3 """ bootstrap.py will set up a virtualenv for you and update it as required. Usage: bootstrap.py # update virtualenv bootstrap.py fake # just update the virtualenv timestamps bootstrap.py clean # delete the virtualenv bootstrap.py -h | --help # p...
oriel-hub/api
deploy/bootstrap.py
Python
gpl-2.0
2,753
0.00109
# 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...
cp16net/trove
trove/guestagent/datastore/mysql/service.py
Python
apache-2.0
43,814
0.000023
# The MIT License (MIT) # # Copyright (c) 2016 WUSTL ZPLAB # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
erikhvatum/RisWidget
ris_widget/examples/simple_point_picker.py
Python
mit
6,323
0.003163
import abc import re from typing import Union as U, Iterator, Optional as O from pymongo import ASCENDING, DESCENDING from sqlparse import tokens, parse as sqlparse from sqlparse.sql import Token, Identifier, Function, Comparison, Parenthesis, IdentifierList, Statement from . import query as query_module from ..excepti...
nesdis/djongo
djongo/sql2mongo/sql_tokens.py
Python
agpl-3.0
12,682
0.000552
# 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...
helifu/kudu
examples/python/basic-python-example/basic_example.py
Python
apache-2.0
2,977
0.00168
import os import json from ss_rule_scheme import update_outbound_rules, init_inbound_rules, init_outbound_rules, msg_clear_all_outbound, ss_process_policy_change base_path = os.path.abspath(os.path.join(os.path.realpath(__file__), "..")) test_file = os.path.join(base_path, "blackholin...
h2020-endeavour/iSDX
pctrl/policy_loader.py
Python
apache-2.0
1,264
0.015032
############################################################################## # # Copyright (C) 2018-2020 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 __manifest__.py # ###############...
CompassionCH/compassion-accounting
donation_report_compassion/__init__.py
Python
agpl-3.0
409
0
# -*- coding: utf-8 -*- """ Validators for wx widgets. Copyright (c) Karol Będkowski, 2006-2013 This file is part of wxGTD This 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, version 2. """ __author...
KarolBedkowski/wxgtd
wxgtd/wxtools/validators/__init__.py
Python
gpl-2.0
638
0.004724
#!/usr/bin/env python import scipy.sparse as sps from apgl.graph.GeneralVertexList import GeneralVertexList from apgl.graph.SparseGraph import SparseGraph numVertices = 10 vList = GeneralVertexList(numVertices) Wght = sps.lil_matrix((numVertices, numVertices)) graph = SparseGraph(vList, W=Wght, undirected=False) # A...
showa-yojyo/notebook
source/_sample/apgl/distribution.py
Python
mit
553
0
import numpy as np from scipy.stats import skew, kurtosis, shapiro, pearsonr, ansari, mood, levene, fligner, bartlett, mannwhitneyu from scipy.spatial.distance import braycurtis, canberra, chebyshev, cityblock, correlation, cosine, euclidean, hamming, jaccard, kulsinski, matching, russellrao, sqeuclidean from sklearn.p...
diogo149/autocause
autocause/autocause_settings.py
Python
mit
7,414
0.001619
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
bdang2012/taiga-back-casting
taiga/projects/custom_attributes/services.py
Python
agpl-3.0
2,749
0.001092
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import os import logging import tempfile from flexget import plugin from flexget.event import event log = logging.getLogger('check_subtitles') class MetainfoSubs(object): ...
oxc/Flexget
flexget/plugins/metainfo/subtitles_check.py
Python
mit
2,678
0.003361
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE # This is a simple test variable for the interaction of gridcells and households. from opus_core.variables.variable import Variable from urbansim.functions import attribute_label class hhnp...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/paris/household_x_neighborhood/hhnper2_nbnper2.py
Python
gpl-2.0
1,879
0.031932
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation 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 sou...
IntelLabs/hpat
examples/series/series_lt.py
Python
bsd-2-clause
1,748
0
#!/usr/bin/env python ''' ##BOILERPLATE_COPYRIGHT ##BOILERPLATE_COPYRIGHT_END ''' import unittest, copy from testRoot import RootClass from noink.user_db import UserDB from noink.entry_db import EntryDB class AddEntry(RootClass): def test_AddEntry(self): userDB = UserDB() entryDB = EntryDB()...
criswell/noink
src/tests/test_DelEntry.py
Python
agpl-3.0
740
0.005405
import io import pytest from contextlib import redirect_stdout from mock import patch from mythril.mythril import MythrilLevelDB, MythrilConfig from mythril.exceptions import CriticalError @patch("mythril.ethereum.interface.leveldb.client.EthLevelDB.search") @patch("mythril.ethereum.interface.leveldb.client.ETH_DB",...
b-mueller/mythril
tests/mythril/mythril_leveldb_test.py
Python
mit
2,235
0.003579
# -*- coding: utf-8 -*- """ Contains functions to plot the results of the dustydiffusion test. @author: ibackus """ import matplotlib.pyplot as plt import numpy as np import pynbody import diskpy #sim, epsEstimator, ts, runpars = analyze.loadSim(simdir) def crossSection(sim, ts, crossSectionTimes=[0, 1, 10]): ""...
ibackus/testdust
testdust/diffusion/plot.py
Python
mit
4,000
0.009
import sys, unittest, struct, math, ctypes from binascii import hexlify from ctypes import * def bin(s): return hexlify(memoryview(s)).decode().upper() # Each *simple* type that supports different byte orders has an # __ctype_be__ attribute that specifies the same type in BIG ENDIAN # byte order, and a...
Suwmlee/XX-Net
Python3/lib/ctypes/test/test_byteswap.py
Python
bsd-2-clause
11,726
0.000768
# coding: utf-8 """ An API to insert and retrieve metadata on cloud artifacts. No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ ...
grafeas/client-python
grafeas/models/discovery_discovered_details.py
Python
apache-2.0
3,542
0.000282
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
quarkslab/irma
common/src/ftp/sftpv2.py
Python
apache-2.0
3,911
0
#/usr/bin/env python import QtTesting import QtTestingImage object1 = 'pqClientMainWindow/MainControlsToolbar/actionOpenData' QtTesting.playCommand(object1, 'activate', '') object2 = 'pqClientMainWindow/FileOpenDialog' QtTesting.playCommand(object2, 'filesSelected', '$PARAVIEW_DATA_ROOT/SPCTH/Dave_Karelitz_Small/spct...
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/Applications/ParaView/Testing/Python/CTHAMRClip.py
Python
gpl-3.0
1,836
0.003813
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class PluginrepoConfig(AppConfig): name = 'pluginrepo'
weichen2046/IntellijPluginDevDemo
enterprise-repo/enterprepo/pluginrepo/apps.py
Python
apache-2.0
160
0
from ritoapi.endpoints.match_v3 import MatchV3 import threading def _load_matches(match_v3, sample_region, sample_match_id, count): for i in range(count): data = match_v3.matches(sample_region, sample_match_id) assert(data['gameId'] == sample_match_id) def test_matches_stress(sample_api_key, sam...
FancyRice/RitoAPI
ritoapi/tests/test_stress.py
Python
mit
655
0.003053
from future import standard_library standard_library.install_aliases() from builtins import object import threading from time import time import random import queue from ..common import log class Scheduler(object): """ A simple scheduler which schedules the periodic or once event """ import sortedcon...
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
Splunk_TA_paloalto/bin/splunk_ta_paloalto/aob_py3/cloudconnectlib/splunktalib/schedule/scheduler.py
Python
isc
4,153
0.001445
import unittest import warnings from collections import OrderedDict import numpy as np import numpy.testing as np_test from pgmpy.extern.six.moves import range from pgmpy.factors.discrete import DiscreteFactor from pgmpy.factors.discrete import JointProbabilityDistribution as JPD from pgmpy.factors import factor_divi...
khalibartan/pgmpy
pgmpy/tests/test_factors/test_discrete/test_Factor.py
Python
mit
56,244
0.004054
from collections import deque from threading import RLock, Condition, currentThread import sys import time class OnRequestQueue: ListUsedModFunctions = ("append", "popleft") class QueueEnd: def __init__(self, queueList=None): if queueList is not None: self.q = queueList else: self.q = deque() se...
albertz/music-player
src/Events.py
Python
bsd-2-clause
2,934
0.039877
import random from cloudbot.util import http, formatting def api_get(kind, query): """Use the RESTful Google Search API""" url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \ 'v=1.0&safe=moderate' return http.get_json(url % kind, q=query) # @hook.command("googleimage", "gis", "image...
weylin/CloudBot
plugins/google.py
Python
gpl-3.0
1,653
0.00242
#!/usr/bin/env python2 import os import sys import json import yaml def main(): with open(sys.argv[1], 'rb') as f: known_issues = yaml.safe_load(f.read()) skipstrings = [ 'passed in strict mode', 'passed in non-strict mode', 'failed in strict mode as expected', 'failed...
svaarala/duktape
util/filter_test262_log.py
Python
mit
3,455
0.002894
import unittest from katas.kyu_6.longest_2_character_substring import substring class SubstringTestCase(unittest.TestCase): def test_equals(self): self.assertEqual(substring(''), '') def test_equals_2(self): self.assertEqual(substring('a'), 'a') def test_equals_3(self): self.ass...
the-zebulan/CodeWars
tests/kyu_6_tests/test_longest_2_character_substring.py
Python
mit
1,191
0
import sip sip.setdestroyonexit(0) import os, shutil import numpy as np from sparkle.QtWrapper import QtGui tempfolder = os.path.join(os.path.abspath(os.path.dirname(__file__)), u"tmp") app = None # executes once before all tests def setup(): if not os.path.exists(tempfolder): os.mkdir(tempfolder) n...
portfors-lab/sparkle
test/tests/gui/__init__.py
Python
gpl-3.0
599
0.013356
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.7.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x05\x96\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x0...
phborba/dsgtoolsop
numericalVertexEdit/resources.py
Python
gpl-2.0
7,700
0.000649
#!/usr/bin/env python from efl import evas import unittest class TestBoxBasics(unittest.TestCase): def setUp(self): self.canvas = evas.Canvas(method="buffer", size=(400, 500), viewport=(0, 0, 400, 500)) self.canvas.engine_info_se...
maikodaraine/EnlightenmentUbuntu
bindings/python/python-efl/tests/evas/test_04_object_box.py
Python
unlicense
1,720
0.001163
# Copyright (C) 2012 Alex Nitz, Josh Willis, Andrew Miller, Tito Dal Canton # # 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 ve...
hagabbar/pycbc_copy
pycbc/types/array.py
Python
gpl-3.0
33,597
0.004643
#!/usr/bin/env python import socket, ssl # This is a copy of _RESTRICTED_SERVER_CIPHERS from the current tip of ssl.py # <https://hg.python.org/cpython/file/af793c7580f1/Lib/ssl.py#l174> except that # RC4 has been added back in, since it was removed in Python 2.7.10, # but SSLStreamConnection only supports RC4 cipher...
marco-c/pluotsorbet
tests/sslEchoServer.py
Python
gpl-2.0
2,382
0.00084
from pystorm.bolt import BasicBolt class SentenceSplitterBolt(BasicBolt): def process(self, tup): sentence = tup.values[0] for word in sentence.split(' '): BasicBolt.emit(word) if __name__ == '__main__': SentenceSplitterBolt().run()
thedrow/streamparse
examples/wordcount/multilang/resources/sentence_splitter.py
Python
apache-2.0
274
0
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
coxmediagroup/googleads-python-lib
examples/adwords/adwords_appengine_demo/views/add_campaign_view.py
Python
apache-2.0
2,387
0.005027
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
gilt/incubator-airflow
airflow/migrations/versions/947454bf1dff_add_ti_job_id_index.py
Python
apache-2.0
1,041
0.001921
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-08 19:59 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
geo2tag-logistics/Geo2Logistics
logistics/migrations/0001_initial.py
Python
apache-2.0
5,033
0.004769
import sys def find_motif_locations(dna, motif): motif_locations = [] if len(dna) < len(motif): raise ValueError('Motif can\'t be shorter than sequence') if len(motif) == len(dna) and motif != dna: return motif_locations for _ in range(len(dna) - len(motif) + 1): if dna[_:_ ...
afreeorange/rosalind
SUBS/motif.py
Python
mit
684
0.001462
""" ============== Blob Detection ============== Blobs are bright on dark or dark on bright regions in an image. In this example, blobs are detected using 3 algorithms. The image used in this case is the Hubble eXtreme Deep Field. Each bright dot in the image is a star or a galaxy. Laplacian of Gaussian (LoG) -------...
paalge/scikit-image
doc/examples/features_detection/plot_blob.py
Python
bsd-3-clause
2,997
0
__author__ = 'yusaira-khan' import unittest import un_iife_ize.un_iife_ize as un_iife_ize class CheckVar(unittest.TestCase): def test_simple(self): statement = [('var hello,world=5;', 0)] exp = [('hello=undefined,world=5;', 0)] v = un_iife_ize.Var(statement) v.extract_all() ...
yusaira-khan/un-iife-ize
tests/vars.py
Python
mit
2,836
0.000705
#! /usr/bin/python2.4 # # 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 # (at your option) any later version. # # This program is distributed in the hope t...
JacobJacob/pyew
jdisasm.py
Python
gpl-2.0
19,835
0.013511
import socket from selectors import DefaultSelector, EVENT_WRITE, EVENT_READ sock = socket.socket() sock.setblocking(False) selector = DefaultSelector() urls_todo = set(['/']) seen_urls = set(['/']) class Fetcher: def __init__(self, url): self.response = b'' self.url = url self.sock = ...
GreenJoey/My-Simple-Programs
python/500L Async Scraper/simple-url-getter.py
Python
gpl-2.0
1,959
0.001021
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/burst-denoising
kpn_data_provider.py
Python
apache-2.0
21,051
0.018241
#!/usr/bin/python __version__ = '0.0.1' import pysimplesoap.client import pysimplesoap.simplexml from zimbrasoap.soap import soap,admin,mail
Secretions/zmdomainexport
zimbrasoap/__init__.py
Python
gpl-2.0
144
0.013889
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('lumos', '0009_proglang_slug'), ] operations = [ migrations.AddField( model_name='softskills', name='...
darth-dodo/project_lumos
lumos/migrations/0010_softskills_slug.py
Python
mit
428
0
from __future__ import absolute_import import momoko from tornado import gen from psycopg2.extras import RealDictConnection def initialize_database(): db = momoko.Pool( dsn='''dbname=nightson user=vswamy password=vswamy host=localhost port=5432''', size=5, connection_factory=RealDictConne...
vswamy/nightson
nightson/managers/base_entity_manager.py
Python
apache-2.0
1,373
0.002185
from enum import Enum class EnumContainerStatus(Enum): running = "running" halted = "halted" networkKilled = "networkKilled"
zero-os/0-orchestrator
pyclient/zeroos/orchestrator/client/EnumContainerStatus.py
Python
apache-2.0
139
0
# # This file is part of pysmi software. # # Copyright (c) 2015-2016, Ilya Etingof <ilya@glas.net> # License: http://pysmi.sf.net/license.html # import os import sys import time from pysmi.reader.base import AbstractReader from pysmi.mibinfo import MibInfo from pysmi.compat import decode from pysmi import debug from py...
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/pysmi/reader/localfile.py
Python
gpl-3.0
4,425
0.003164
# -*- coding: utf-8 -*- # This file is part of emesene. # # emesene 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. # #...
tiancj/emesene
emesene/gui/gtkui/RichWidget.py
Python
gpl-3.0
4,161
0.004086
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('My Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import tempfile, os from django import contrib tempdata = tempfile.mkdtemp() approot = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) adminroot = os.path.join(contrib.__path__[0], 'admin') DATAB...
fish2000/django-signalqueue
signalqueue/settings/__init__.py
Python
bsd-3-clause
4,884
0.006347
# -*- coding:utf-8 -*- ''' fio测试工具执行脚本 ''' import os,shutil,re,time,sys,copy from test import BaseTest from lpt.lib.error import * from lpt.lib import lptxml from lpt.lib import lptlog from lpt.lib.share import utils from lpt.lib import lptreport class TestControl(BaseTest): ''' 继承BaseTest属性和方法 ''' ...
ShaolongHu/lpts
tests/fio.py
Python
gpl-2.0
4,566
0.007627
from __future__ import division import sys if sys.version_info.major > 2: from importlib import reload from PySide import QtGui, QtCore import traceback import numpy as np import FreeCAD as App import FreeCADGui as Gui from ._tools import BaseTool, input_field, text_field from ._glider import draw_glider, draw_l...
booya-at/freecad_glider
freecad/freecad_glider/tools/line_tool.py
Python
lgpl-2.1
36,337
0.001431
from proboscis import test @test(groups=['benchmark.discovery']) class BenchmarkDiscoveryTests(object): def __init__(self): pass
jlongever/RackHD
test/benchmark/api_v2_0/discovery_tests.py
Python
apache-2.0
142
0.007042
''' Created on May 26, 2012 @author: Charlie ''' class MyPackageMod01(object): def __init__(self): pass
donlee888/JsObjects
Python/ComplexPaths02/src/main/mypackage/MyPackageMod01.py
Python
mit
122
0.02459
"""Controllers for the mozzarella application."""
ColoradoSchoolOfMines/acm-website
mozzarella/controllers/__init__.py
Python
gpl-3.0
50
0
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-12 17:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('themes', '0002_auto_20170110_1809'), ] operations = [ migrations.AlterField( ...
amadeusproject/amadeuslms
themes/migrations/0003_auto_20170112_1408.py
Python
gpl-2.0
560
0.001786
from django.shortcuts import redirect from django.template.response import TemplateResponse from ..forms import AnonymousUserShippingForm, ShippingAddressesForm from ...userprofile.forms import get_address_form from ...userprofile.models import Address from ...teamstore.utils import get_team def anonymous_user_shipp...
jonathanmeier5/teamstore
saleor/checkout/views/shipping.py
Python
bsd-3-clause
3,737
0.00107
"""Integration with the Rachio Iro sprinkler system controller.""" from abc import abstractmethod from contextlib import suppress from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from ho...
rohitranjan1991/home-assistant
homeassistant/components/rachio/switch.py
Python
mit
19,041
0.00084
#!/usr/bin/python import time import RPi.GPIO as GPIO # remember to change the GPIO values below to match your sensors # GPIO output = the pin that's connected to "Trig" on the sensor # GPIO input = the pin that's connected to "Echo" on the sensor def reading(sensor): # Disable any warning message such as GPIO pins...
LinuCC/sturo
src/lib/usonic.py
Python
gpl-2.0
3,134
0.021378
import configparser CONFIG_PATH = 'accounting.conf' class MyConfigParser(): def __init__(self, config_path=CONFIG_PATH): self.config = configparser.ConfigParser(allow_no_value=True) self.config.read(config_path) def config_section_map(self, section): """ returns all configuration op...
Stiliyan92/accounting-system
common/config_parser.py
Python
gpl-2.0
828
0.001208
import os from bs4 import BeautifulSoup count = pd.DataFrame(columns = ['filename', 'count']) for folder, subs, files in os.walk('data/xml'): for filename in files: try: if ('.xml' in filename) and (filename[0] != '.'): f = open(os.path.join(folder, filename)) soup = BeautifulSoup(f.read()) to...
fahadsultan/CausalRelations
to_txt.py
Python
apache-2.0
551
0.039927
#!/usr/bin/env python """ Jedi EPC server. Copyright (C) 2012 Takafumi Arakaki Author: Takafumi Arakaki <aka.tkf at gmail.com> This file is NOT part of GNU Emacs. Jedi EPC server 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 So...
kyon-bll/.dotfiles
.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py
Python
mit
15,847
0.000252
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. #!/usr/bin/env python # -*- coding:utf-8 -*- import urllib.parse import requests from testutils import prefix, api_v0 HOUR = 60 * 60 DAY = HOUR * 24 @prefix...
diegocepedaw/oncall
e2e/test_schedules.py
Python
bsd-2-clause
6,315
0.002375
# Copyright (c) 2010 ActiveState Software Inc. All rights reserved. """ pypm.common.util ~~~~~~~~~~~~~~~~ Assorted utility code """ import os from os import path as P import sys import re from contextlib import contextmanager import logging import time import textwrap from datetime import datetime f...
igemsoftware/SYSU-Software2013
project/Python27_32/Lib/site-packages/pypm/common/util.py
Python
mit
7,802
0.003204
from typing import Any # Copyright (c) 2016 Google Inc. (under http://www.apache.org/licenses/LICENSE-2.0) # If not annotate_pep484, info in pyi files is augmented with heuristics to decide if un-annotated # arguments are "Any" or "" (like "self") class B(object): def __init__(self): pass def f(self, ...
google/merge_pyi
testdata/heuristics.comment.py
Python
apache-2.0
631
0.006339
# Copyright: (c) 2018, Toshio Kuratomi <tkuratomi@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type """ Context of the running Ansible. In the...
vmindru/ansible
lib/ansible/context.py
Python
gpl-3.0
2,049
0.003416
from django.test.testcases import SimpleTestCase from corehq.apps.app_manager.const import APP_V2 from corehq.apps.app_manager.models import Application, Module, OpenCaseAction, ParentSelect, OpenSubCaseAction, \ AdvancedModule, LoadUpdateAction, AdvancedOpenCaseAction from mock import patch class CaseMetaTest(Si...
puttarajubr/commcare-hq
corehq/apps/app_manager/tests/test_case_meta.py
Python
bsd-3-clause
2,721
0.00147
import aifc import sndhdr import utils class Aiff: def __init__(self, filename): assert sndhdr.what(filename).filetype == 'aiff' x = aifc.open(filename) data = x.readframes(x.getnframes()) self.nchannels = x.getnchannels() self.sampwidth = x.getsampwidth() self.f...
viniciusd/DCO1008---Digital-Signal-Processing
projeto3/aiff.py
Python
mit
913
0.001095
from pythonforandroid.recipe import PythonRecipe class Asn1cryptoRecipe(PythonRecipe): name = 'asn1crypto' version = '0.23.0' url = 'https://pypi.python.org/packages/31/53/8bca924b30cb79d6d70dbab6a99e8731d1e4dd3b090b7f3d8412a8d8ffbc/asn1crypto-0.23.0.tar.gz#md5=97d54665c397b72b165768398dfdd876' depend...
wexi/python-for-android
pythonforandroid/recipes/asn1crypto/__init__.py
Python
mit
426
0.002347
# -*- coding: utf-8 -*- """Video is ungraded Xmodule for support video content. It's new improved video module, which support additional feature: - Can play non-YouTube video sources via in-browser HTML5 video player. - YouTube defaults to HTML5 mode from the start. - Speed changes in both YouTube and non-YouTube video...
ESOedX/edx-platform
common/lib/xmodule/xmodule/video_module/video_module.py
Python
agpl-3.0
51,311
0.002904
"""Provide functionality to keep track of devices.""" import asyncio import voluptuous as vol from homeassistant.loader import bind_hass from homeassistant.components import group from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv from homeassistant.helpers.typing import ...
Cinntax/home-assistant
homeassistant/components/device_tracker/__init__.py
Python
apache-2.0
5,372
0.000931
import logging import os from tempfile import mkdtemp from .repositories import Repository, AuthenticatedRepository log = logging.getLogger(__name__) class RepoManager(object): """ Manages creation and deletion of `Repository` objects. """ to_cleanup = {} def __init__(self, authenticated=False,...
richtier/imhotep
imhotep/repomanagers.py
Python
mit
4,477
0
"""Default website configurations, used only for testing. """ from donut import environment # Public Test Database TEST = environment.Environment( db_hostname="localhost", db_name="donut_test", db_user="donut_test", db_password="public", debug=True, testing=True, secret_key="1234567890", ...
ASCIT/donut-python
donut/default_config.py
Python
mit
472
0
# -*- coding: utf-8 -*- # Copyright (c) 2017-2020 Richard Hull and contributors # See LICENSE.rst for details. """ Simplified sprite animation framework. .. note:: This module is an evolving "work-in-progress" and should be treated as such until such time as this notice disappears. """ from time import sle...
rm-hull/luma.core
luma/core/sprite_system.py
Python
mit
8,896
0.000787
#------------------------------------------------------------------------------ # pycparser: c_parser.py # # CParser class: Parser and AST builder for the C language # # Copyright (C) 2008-2013, Eli Bendersky # License: BSD #------------------------------------------------------------------------------ import re from ...
BartoszCichecki/onlinepython
onlinepython/pypy-2.4.0-win32/lib_pypy/cffi/_pycparser/c_parser.py
Python
gpl-2.0
59,384
0.001381
# Copyright 2017 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...
tensorflow/tensorflow
tensorflow/python/autograph/pyct/static_analysis/activity_test.py
Python
apache-2.0
23,693
0.006078
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.wrapper.transition as et import emission...
shankari/e-mission-server
emission/net/usercache/formatters/ios/transition.py
Python
bsd-3-clause
3,275
0.006107
#!/usr/bin/env python """ A toolkit for identifying and advertising service resources. Uses a specific naming convention for the Task Definition of services. If you name the Task Definition ending with "-service", no configuration is needed. This also requires that you not use that naming convention for task definiti...
simonluijk/aws-ecs-service-discovery
register.py
Python
mit
6,803
0.001029
# -*- coding: utf8 -*- from urllib.request import Request, urlopen import logging import parsing __author__ = 'carlos' class Downloader(object): def __init__(self, url): self.url = url def read(self): request = Request( self.url ) request.add_header('Accept-encoding', 't...
carlosvin/pricecalculator
data_input/__init__.py
Python
apache-2.0
1,020
0.015686
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
AllanYangZhou/oppia
core/controllers/suggestion.py
Python
apache-2.0
5,721
0.001049
# SPDX-FileCopyrightText: 2020 The Kapitan Authors <kapitan-admins@googlegroups.com> # # SPDX-License-Identifier: Apache-2.0 import logging logger = logging.getLogger(__name__) class Validator(object): def __init__(self, cache_dir, **kwargs): self.cache_dir = cache_dir def validate(self, validate_o...
ademariag/kapitan
kapitan/validator/base.py
Python
apache-2.0
369
0.00271
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch class GradMultiply(...
mlperf/training_results_v0.5
v0.5.0/nvidia/submission/code/translation/pytorch/fairseq/modules/grad_multiply.py
Python
apache-2.0
550
0
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class WagtailTestsAppConfig(AppConfig): name = 'wagtail.tests.modeladmintest' label = 'modeladmintest' verbose_name = _("Test Wagtail Model Admin")
kaedroho/wagtail
wagtail/tests/modeladmintest/apps.py
Python
bsd-3-clause
251
0
# Copyright 2017 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...
tensorflow/tensorflow
tensorflow/python/data/kernel_tests/from_sparse_tensor_slices_test.py
Python
apache-2.0
8,944
0.007603
from __future__ import absolute_import, division, print_function from builtins import * # @UnusedWildImport from mcculw import ul from mcculw.ul import ULError from mcculw.enums import (BoardInfo, InfoType, ErrorCode, EventType, ExpansionInfo) from .ai_info import AiInfo from .ao_info import...
mccdaq/mcculw
mcculw/device_info/daq_device_info.py
Python
mit
4,437
0