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
# -*- coding: utf-8 -*- import sys, os, time from Tools.HardwareInfo import HardwareInfo def getVersionString(): return getImageVersionString() def getImageVersionString(): try: if os.path.isfile('/var/lib/opkg/status'): st = os.stat('/var/lib/opkg/status') else: st = os.stat('/usr/lib/ipkg/status') tm ...
openmb/openblackhole-enigma2
lib/python/Components/About.py
Python
gpl-2.0
2,999
0.037012
""" vg composite command Build composite images from centered images, based on records in composites.csv. See also vgInitComposites.py, which builds initial pass at composites.csv. Note: even single channel images get a composite image (bw). Uses centered image if available, otherwise uses the plain adjusted image. ...
bburns/PyVoyager
src/vgComposite.py
Python
mit
10,684
0.007675
import os import sys import unittest2 import mitogen import mitogen.ssh import mitogen.utils import testlib import plain_old_module def get_sys_executable(): return sys.executable def get_os_environ(): return dict(os.environ) class LocalTest(testlib.RouterMixin, unittest2.TestCase): stream_class =...
ConnectBox/wifi-test-framework
ansible/plugins/mitogen-0.2.3/tests/local_test.py
Python
mit
1,663
0
# # Copyright 2020 University of Washington # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARR...
nsnam/ns-3-dev-git
src/wifi/examples/reference/bianchi11ax.py
Python
gpl-2.0
6,874
0.010038
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('ebets.urls')), url(r'^admin/', include(admin.site.urls)), )
pisskidney/dota
dota/urls.py
Python
mit
222
0.004505
# vpnr 48 run_trial(hori2, duration=4.000, speed=300) run_trial(rws[2], duration=8.0) run_trial(rbs[12], duration=8.0) run_trial(rws[6], duration=8.0) run_trial(rbs[22], duration=8.0) run_trial(cm200, duration=8.0, speed=150) run_trial(cm200, duration=8.0, speed=800) run_trial(rbs[6], duration=8.0) run_trial(msm0, dura...
derNarr/synchronicity
experiment/sessions/ses_vp48.py
Python
mit
5,332
0.001313
from django.test import TestCase from api.helpers import user_service from api.factories import UserFactory, PostFactory class UserServiceTest(TestCase): POSTS_PER_USER = 10 def setUp(self): self.main_user = UserFactory() self.follower = UserFactory() self.test_user = UserFactory() ...
frostblooded/kanq
api/tests/test_user_service.py
Python
mit
1,237
0.000808
# -*- coding: utf-8 -*- # Author: Joris Jensen <jjensen@techfak.uni-bielefeld.de> # # License: BSD 3 clause from __future__ import division import numpy as np from scipy.optimize import minimize from sklearn.utils import validation from .rslvq import RslvqModel class LmrslvqModel(RslvqModel): """Localized Mat...
MrNuggelz/sklearn-glvq
sklearn_lvq/lmrslvq.py
Python
bsd-3-clause
15,649
0.000511
""" Windows Process Control winprocess.run launches a child process and returns the exit code. Optionally, it can: redirect stdin, stdout & stderr to files run the command as another user limit the process's running time control the process window (location, size, window state, desktop) Works on Windows NT, 20...
alexei-matveev/ccp1gui
jobmanager/winprocess.py
Python
gpl-2.0
7,039
0.001421
from __future__ import print_function from twython import Twython import util class TwitterBot(util.SocialMediaBot): """ Social Media Bot for posting updates to Tumblr """ NAME = "twitter" def __init__(self, **kwargs): super(TwitterBot, self).__init__(**kwargs) self.client = Twython(*sel...
thedeadparrot/ficbot
twitterbot.py
Python
mit
555
0.003604
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
d9w/6858-android-intents
analyzer/androguard/core/bytecodes/dvm.py
Python
mit
232,587
0.025272
from gateway import Gateway, get_gateway from integration import Integration, get_integration from utils.credit_card import CreditCard
SimpleTax/merchant
billing/__init__.py
Python
bsd-3-clause
135
0
# -*- coding: utf-8 -*- from datetime import datetime from django.db import models from django.core.urlresolvers import reverse from ..core.models import TimeStampedModel class TipoDiagnosticos(TimeStampedModel): nombre = models.CharField(max_length=150, blank=False, null=False, verbose_name=u'Diagnóstico') ...
btenaglia/hpc-historias-clinicas
hpc-historias-clinicas/diagnosticos/models.py
Python
bsd-3-clause
945
0.003181
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-13 11:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('restaurant', '0014_remove_menuimage_menu_name'), ] ...
midhun3112/restaurant_locator
Restaurant_Finder_App/restaurant_finder_app/restaurant_finder_app/restaurant/migrations/0015_auto_20170213_1116.py
Python
apache-2.0
766
0.002611
#!/usr/bin/env python from Auth import * keyId = plc_api.GetKeys(auth, {'person_id': 249241}, ['key_id', 'key']) for key in keyId: print "A new key:" print "Key value ->", key['key'] print "Key id ->",key['key_id']
onelab-eu/myslice
forge/script/PlcApi/showKeys.py
Python
gpl-3.0
224
0.026786
### # Copyright (c) 2012, Valentin Lorentz # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
kg-bot/SupyBot
plugins/TwitterStream/__init__.py
Python
gpl-3.0
2,725
0.000734
# -*- coding: utf-8 -*- """ Read Tweetworks API users from XML responses. Nicolas Ward @ultranurd ultranurd@yahoo.com http://www.ultranurd.net/code/tweetworks/ 2009.06.19 """ """ This file is part of the Tweetworks Python API. Copyright © 2009 Nicolas Ward Tweetworks Python API is free software: you can redistribut...
UltraNurd/tweetworks-py
tweetworks/User.py
Python
gpl-3.0
3,623
0.002762
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
Azure/azure-sdk-for-python
sdk/storagepool/azure-mgmt-storagepool/setup.py
Python
mit
2,679
0.001493
''' Created on 5/02/2010 @author: henry@henryjenkins.name ''' import datetime class user(object): ''' classdocs ''' dataUp = None dataDown = None macAddress = "" name = "" def __init__(self, mac="", name=""): ''' Constructor ''' self.name = name ...
steakunderscore/Bandwidth-Monitoring
src/user.py
Python
gpl-3.0
4,271
0.012175
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011...
ntt-sic/cinder
cinder/volume/volume_types.py
Python
apache-2.0
5,726
0.000175
import unittest import pystache from pystache import Renderer from examples.nested_context import NestedContext from examples.complex import Complex from examples.lambdas import Lambdas from examples.template_partial import TemplatePartial from examples.simple import Simple from pystache.tests.common import EXAMPLES_...
zzeleznick/zDjango
venv/lib/python2.7/site-packages/pystache/tests/test_simple.py
Python
mit
2,785
0.002154
""" Read graphs in LEDA format. See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain. __author__ = """Aric Hagberg (hagberg@lanl.gov)""...
JaneliaSciComp/Neuroptikon
Source/lib/CrossPlatform/networkx/readwrite/leda.py
Python
bsd-3-clause
2,097
0.023367
from model.contact import Contact from model.group import Group from fixture.orm import ORMFixture import random def test_del_contact_from_group(app): orm = ORMFixture(host="127.0.0.1", name="addressbook", user="root", password="") # check for existing any group if len(orm.get_group_list()) == 0: a...
Lana-Pa/Python-training
test/test_delete_contact_from_group.py
Python
apache-2.0
1,311
0.006865
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------- # jsonrpc - jsonrpc interface for XBMC-compatible remotes # ----------------------------------------------------------------------- # $Id$ # # JSONRPC and XBMC eventserver to be used for XBMC-compatible # remotes. Onl...
freevo/freevo2
src/plugins/jsonrpc/__init__.py
Python
gpl-2.0
8,340
0.003357
#!/usr/bin/env python # # Copyright (C) 2011 Andy Aschwanden # # This file is part of PISM. # # PISM 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 l...
JohannesFeldmann/pism
examples/storglaciaren/sg_create_3d.py
Python
gpl-2.0
7,325
0.006416
#!/usr/bin/python """This script lists classes and optionally attributes from UML model created with Gaphor.""" import optparse import sys from gaphor import UML from gaphor.application import Session # Setup command line options. usage = "usage: %prog [options] file.gaphor" def main(): parser = optparse.Opti...
amolenaar/gaphor
examples/list_classes.py
Python
lgpl-2.1
1,239
0
from .rest import RestClient class Rules(object): """Rules endpoint implementation. Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) t...
auth0/auth0-python
auth0/v3/management/rules.py
Python
mit
4,742
0.002109
import unittest import os from katello.tests.core.action_test_utils import CLIOptionTestCase, CLIActionTestCase from katello.tests.core.organization import organization_data from katello.tests.core.template import template_data import katello.client.core.template from katello.client.core.template import Delete from k...
iNecas/katello
cli/test/katello/tests/core/template/template_delete_test.py
Python
gpl-2.0
1,936
0.002583
from datetime import datetime from flask import Blueprint, jsonify, request from app.dao.fact_notification_status_dao import ( get_total_notifications_for_date_range, ) from app.dao.fact_processing_time_dao import ( get_processing_time_percentage_for_date_range, ) from app.dao.services_dao import get_live_ser...
alphagov/notifications-api
app/performance_dashboard/rest.py
Python
mit
3,531
0.003398
# This file is part of Korman. # # Korman 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. # # Korman is distributed i...
dpogue/korman
korman/properties/modifiers/logic.py
Python
gpl-3.0
5,501
0.003272
__author__ = 'ganeshchand' import re def regex_search(pattern_string, string_source): if re.search(pattern_string,string_source): print("%s matched %s" % (pattern_string, string_source)) else: print("%s did not match %s" % (pattern_string, string_source)) # matching a pattern in one string ...
ganeshchand/python3
advanced/regular_expression/regular_expresion_anchors.py
Python
apache-2.0
1,306
0.011485
#!/usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2012-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 prov...
souravsingh/khmer
sandbox/sweep-reads2.py
Python
bsd-3-clause
3,734
0.000268
#!/usr/bin/env python # encoding: utf-8 # ------------------------------------------------------------------------------- # version: ?? # author: fernando # license: MIT License # contact: iw518@163.com # purpose: views # date: 2016-12-14 # copyright: copyright 2016 Xu, Aiwu # ----...
iw518/fernando
app/main/hr/views.py
Python
gpl-3.0
859
0.001164
#!/usr/bin/env python # encoding: utf-8 'A simple client for accessing api.ly.g0v.tw.' import json import unittest try: import urllib.request as request import urllib.parse as urlparse except: import urllib2 as request import urllib as urlparse def assert_args(func, *args): def inner(*args): required_arg = ar...
zonble/lyg0vtw_client.py
lyg0vtw_client/lyg0vtw_client.py
Python
gpl-2.0
5,779
0.029071
import redis class BetaRedis(redis.StrictRedis): def georadius(self, name, *values): return self.execute_command('GEORADIUS', name, *values) def geoadd(self, name, *values): return self.execute_command('GEOADD', name, *values) def geopos(self, name, *values): return self.execute_...
gdelt-analysis/worker
src/HeatMap.py
Python
gpl-3.0
1,473
0.002716
import copy from corehq.pillows.case import CasePillow from corehq.pillows.mappings.reportcase_mapping import REPORT_CASE_MAPPING, REPORT_CASE_INDEX from django.conf import settings from .base import convert_property_dict class ReportCasePillow(CasePillow): """ Simple/Common Case properties Indexer an ext...
puttarajubr/commcare-hq
corehq/pillows/reportcase.py
Python
bsd-3-clause
1,031
0.00582
from django.urls import include, path from django.contrib import admin urlpatterns = [ path('', include('orcamentos.core.urls', namespace='core')), path('crm/', include('orcamentos.crm.urls', namespace='crm')), path('proposal/', include('orcamentos.proposal.urls', namespace='proposal')), path('admin/',...
rg3915/orcamentos
orcamentos/urls.py
Python
mit
341
0.002933
import imghdr from wsgiref.util import FileWrapper from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.http import ( HttpResponse, HttpResponsePermanentRedirect, StreamingHttpResponse, ) from django.shortcuts import get_object_or_404 from django.urls import reverse from dj...
wagtail/wagtail
wagtail/images/views/serve.py
Python
bsd-3-clause
2,857
0.0014
# # SVGdatashapes_dt 0.3.6 SVGdatashapes.com github.com/pepprseed/svgdatashapes # Copyright 2016-8 Stephen C. Grubb stevegrubb@gmail.com MIT License # # This module provides date / time support for svgdatashapes # import svgdatashapes from svgdatashapes import p_dtformat import collections import datet...
grubbcode/minplot
svgdatashapes_dt.py
Python
mit
9,956
0.028726
"""tictactoe URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
jsonbrazeal/tictactoe
tictactoe/urls.py
Python
mit
1,037
0
# testing/schema.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import exclusions from .. import schema, event from . import config __all_...
wildchildyn/autism-website
yanni_env/lib/python3.6/site-packages/sqlalchemy/testing/schema.py
Python
gpl-3.0
3,556
0
# -*- encoding: utf-8 -*- import argparse import sys import traceback from hashlib import md5 import mailchimp_marketing as MailchimpMarketing import requests from consolemsg import step, error, success from erppeek import Client import time import configdb ERP_CLIENT = Client(**configdb.erppeek) MAILCHIMP_CLIENT =...
Som-Energia/invoice-janitor
admin/Baixa_Socis/unsubscribe_members.py
Python
agpl-3.0
4,279
0.002104
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptDialog.py --------------------- Date : December 2012 Copyright : (C) 2012 by Alexander Bruy Email : alexander dot bruy at gmail dot com *******...
yordan-desta/QgisIns
python/plugins/processing/gui/ScriptEditorDialog.py
Python
gpl-2.0
7,417
0.000404
#!/usr/bin/python """ sieveshell - remotely manipulate sieve scripts SYNOPSIS sieveshell [--user=user] [--authname=authname] [--realm=realm] [--exec=script] [--auth-mech=mechanism] server sieveshell --help sieveshell allows users to manipulate their scripts on a remote server. It works via MANAG...
piger/managesieve-cli
managesieve/sieveshell.py
Python
gpl-3.0
13,053
0.003601
""" Module defining the Spline class, something easy to wrap around SciPy splines. Includes BOK algorithms (Mollinari et al) Some rules of splrep (k = 3) - do not put more then 2 knots between data points. - splrep wants inner knots only, do not give extremal knots, even only "once". """ import numpy as np import ...
COSMOGRAIL/PyCS
pycs/gen/spl.py
Python
gpl-3.0
40,478
0.046766
# -*- coding: utf-8 -*- """ *************************************************************************** FixedDistanceBuffer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
luofei98/qgis
python/plugins/processing/algs/qgis/ftools/FixedDistanceBuffer.py
Python
gpl-2.0
3,213
0
import datetime, json, re from consts.playoff_type import PlayoffType from consts.district_type import DistrictType from consts.event_type import EventType from google.appengine.ext import ndb from google.appengine.ext.ndb.tasklets import Future from models.district import District from models.event_details import E...
phil-lopreiato/the-blue-alliance
models/event.py
Python
mit
20,440
0.002544
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hp.com> # # 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/lice...
openstack/python-designateclient
designateclient/v2/utils.py
Python
apache-2.0
2,334
0
from .. import tool def test_keygen(): def get_keyring(): WheelKeys, keyring = tool.get_keyring() class WheelKeysTest(WheelKeys): def save(self): pass class keyringTest: backend = keyring.backend @classmethod ...
IsCoolEntertainment/debpkg_python-wheel
wheel/test/test_tool.py
Python
mit
746
0.013405
# -*- test-case-name: foolscap.test.test_crypto -*- available = False # hack to deal with half-broken imports in python <2.4 from OpenSSL import SSL # we try to use ssl support classes from Twisted, if it is new enough. If # not, we pull them from a local copy of sslverify. The funny '_ssl' import # stuff is used to...
pexip/os-foolscap
foolscap/crypto.py
Python
mit
4,123
0.003638
# Copyright 2012 OpenStack LLC. # 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...
redhat-openstack/python-neutronclient
quantumclient/tests/unit/test_casual_args.py
Python
apache-2.0
2,739
0
from kvmagent import kvmagent from zstacklib.utils import jsonobject from zstacklib.utils import http from zstacklib.utils import log from zstacklib.utils.bash import * from zstacklib.utils import linux from zstacklib.utils import thread from jinja2 import Template import os.path import re import time import traceback ...
live4thee/zstack-utility
kvmagent/kvmagent/plugins/prometheus.py
Python
apache-2.0
4,603
0.008473
import pytest from tests.support.asserts import assert_error, assert_success def perform_actions(session, actions): return session.transport.send( "POST", "/session/{session_id}/actions".format(session_id=session.session_id), {"actions": actions}) @pytest.mark.parametrize("action_type",...
paulrouget/servo
tests/wpt/web-platform-tests/webdriver/tests/perform_actions/validity.py
Python
mpl-2.0
2,188
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time from geopy.distance import great_circle from s2sphere import Cell, CellId, LatLng from pokemongo_bot import inventory from pokemongo_bot.base_task import BaseTask from pokemongo_bot.item_list import Item from pokemongo_bot.walkers.polyline_w...
cmezh/PokemonGo-Bot
pokemongo_bot/cell_workers/pokemon_hunter.py
Python
mit
6,128
0.003427
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@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 Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_languages_persian.py
Python
gpl-3.0
1,111
0.002705
#! /usr/bin/env python """ Module with simplex (Nelder-Mead) optimization for defining the flux and position of a companion using the Negative Fake Companion. """ from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from .simplex_fmerit import c...
henry-ngo/VIP
vip_hci/negfc/simplex_optim.py
Python
mit
16,676
0.010794
import os.path import logging _logger = logging.getLogger(__name__) from operator import itemgetter from tornado.web import Application, RequestHandler, StaticFileHandler from tornado.ioloop import IOLoop config = { 'DEBUG': True, 'PORT' : 5000 } HANDLERS = [] ROOT_DIR = os.path.abspath(os.path.join(os.pa...
jzitelli/yawvrb.js
test/tornado_server.py
Python
mit
1,909
0.00681
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@gmail.com # Created Time: 2016-06-21 23:14:26 ############################################################################### ## This programs asks a u...
zeroonegit/python
python_programming/password1.py
Python
mit
786
0.005089
import os from unittest import TestCase import mock from marvel.iterables import BaseIterable class FooIterable(BaseIterable): def __init__(self): self.total_pages = 20 super(FooIterable, self).__init__() def get_items(self): if self.total_pages == 0: raise StopIteration...
fernandoe/the-comics
tests/marvel/iterables/test_baseIterable.py
Python
gpl-3.0
816
0
from mqttsqlite.orm.models import Topic import json from mqttsqlite.settings.private_settings import MANAGEMENT_PASSWORD, QUERY_PASSWORD from .utils import Payload, Utils class TopicsController (object): def add_topic(self, msg): received_data = json.loads(msg.payload) payload = Utils().validate_...
rdiaz82/mqttSqlLite
mqttsqlite/core/topics_controller.py
Python
mit
2,034
0.00295
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ZhangXinNan/tensorflow
tensorflow/python/kernel_tests/control_flow_ops_py_test.py
Python
apache-2.0
121,396
0.014259
# 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-batch/azure/batch/models/job_get_options.py
Python
mit
3,278
0.000305
#!/usr/bin/env python # Progressive Cactus Package # Copyright (C) 2009-2012 by Glenn Hickey (hickey@soe.ucsc.edu) # and Benedict Paten (benedictpaten@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...
BD2KGenomics/cactus
src/progressiveCactus.py
Python
gpl-3.0
16,648
0.003844
# profiling_late.py # # Copyright (C) 2015 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 # # ''' Module to enable profiling timepoints. This module is loaded only if the configuration file exists, see profiling.py for more information ''' import os import sys imp...
rcocetta/kano-toolset
kano/profiling_late.py
Python
gpl-2.0
3,436
0.00291
#!/usr/bin/env python # encoding: utf-8 import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="cubehelix", version="0.1.0", author="James Davenport", # author_email="", description="Cubehelix colormaps for matp...
jradavenport/cubehelix
setup.py
Python
bsd-2-clause
605
0
# 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 may ...
Azure/azure-sdk-for-python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_rules_operations.py
Python
mit
12,027
0.004074
import os import socket import sys input_host = '127.0.0.1' input_port = 65000 batch_enabled = int(os.environ.get('_BACKEND_BATCH_MODE', '0')) if batch_enabled: # Since latest Python 2 has `builtins`and `input`, # we cannot detect Python 2 with the existence of them. if sys.version_info.major > 2: ...
lablup/sorna-agent
src/ai/backend/kernel/python/sitecustomize.py
Python
lgpl-3.0
1,693
0.000591
from collections import OrderedDict from django.contrib import admin from edc_export.actions import export_as_csv_action from edc_base.modeladmin.admin import BaseTabularInline from ..forms import MaternalArvPostForm, MaternalArvPostMedForm, MaternalArvPostAdhForm from ..models import MaternalVisit, MaternalArvPost,...
TshepangRas/tshilo-dikotla
td_maternal/admin/maternal_arv_post_admin.py
Python
gpl-2.0
4,570
0.004376
#!/usr/bin/env python ######################################################################## # File : dirac-admin-sync-users-from-file # Author : Adrian Casajus ######################################################################## """ Sync users in Configuration with the cfg contents. Usage: dirac-admin-syn...
yujikato/DIRAC
src/DIRAC/Interfaces/scripts/dirac_admin_sync_users_from_file.py
Python
gpl-3.0
1,909
0.012572
# -*- coding: utf-8 -*- from hangulize import * class Finnish(Language): """For transcribing Finnish.""" __iso639__ = {1: 'fi', 2: 'fin', 3: 'fin'} __tmp__ = ',;%' vowels = 'aAeioOuy' ob = 'bdfgkpstT' notation = Notation([ # Convention: A = ä, O = ö ('å', 'o'), ('ä', ...
Jinwithyoo/han
hangulize/langs/fin/__init__.py
Python
bsd-3-clause
3,370
0
#!/usr/bin/python import os.path import subprocess import sys import urllib KEY_FILE = "submit.token" def main(filename): # Prompt for key if missing if not os.path.exists(KEY_FILE): print "Please visit http://css.csail.mit.edu/6.858/2014/labs/handin.html" print "and enter your API key." ...
wyqwyq/mit6858-lab
submit.py
Python
mit
1,330
0.003008
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free So...
ddurieux/alignak
test/test_service_description_inheritance.py
Python
agpl-3.0
2,454
0.00163
"""Misc helper functions for extracting morphological info from CLTK data structures. """ from typing import List, Optional, Tuple, Union from cltk.core.data_types import Word from cltk.core.exceptions import CLTKException from cltk.morphology.universal_dependencies_features import ( NOMINAL_FEATURES, VERBAL_...
kylepjohnson/cltk
src/cltk/morphology/utils.py
Python
mit
1,473
0.001358
"""A client for the REST API of imeji instances.""" import logging from collections import OrderedDict import requests from six import string_types from pyimeji import resource from pyimeji.config import Config log = logging.getLogger(__name__) class ImejiError(Exception): def __init__(self, message, error): ...
xrotwang/pyimeji
pyimeji/api.py
Python
apache-2.0
4,739
0.002532
# -*- coding: utf-8 -*- import pytest from flask import url_for def test_config(app): assert app.debug, 'App is in debug mode' assert not app.config.get('MINIFY_HTML'), 'App does minify html' assert app.config.get('ASSETS_DEBUG'), 'App does build assets' assert app.config.get('YARR_URL'), 'App d...
bluecap-se/yarr.client
tests/app_tests.py
Python
mit
539
0.001855
#!/usr/bin/env python import unittest from test import test_support import socket import urllib import sys import os import time mimetools = test_support.import_module("mimetools", deprecated=True) def _open_with_retry(func, host, *args, **kwargs): # Connecting to remote hosts is flaky. Make it...
alanjw/GreenOpenERP-Win-X86
python/Lib/test/test_urllibnet.py
Python
agpl-3.0
8,057
0.001614
from setuptools import find_packages, setup from auspost_pac import __version__ as version setup( name='python-auspost-pac', version=version, license='BSD', author='Sam Kingston', author_email='sam@sjkwi.com.au', description='Python API for Australia Post\'s Postage Assessment Calculator (pac)...
sjkingo/python-auspost-pac
setup.py
Python
bsd-2-clause
900
0.001111
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def subtreeWithAllDeepest(self, root: TreeNode) -> TreeNode: def dfs(root): if root is None: return N...
jiadaizhao/LeetCode
0801-0900/0865-Smallest Subtree with all the Deepest Nodes/0865-Smallest Subtree with all the Deepest Nodes.py
Python
mit
610
0
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.utils import simplejson from django.core.serializers.json import DateTimeAwareJSONEncoder from django.utils.xmlutils import SimplerXMLGenerator from django.utils.encoding import smart_unicode EMITTERS = {} def g...
j2a/django-simprest
simprest/emitters.py
Python
bsd-3-clause
1,874
0.001601
"""Virtual environment relocatable mixin.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import shutil class RelocateMixin(object): """Mixin which adds the ability to relocate a virtual environmen...
kevinconway/venvctrl
venvctrl/venv/relocate.py
Python
mit
3,455
0
from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from pandac.PandaModules import * from DistributedNPCToonBase import * from toontown.chat.ChatGlobals import * from toontown.estate import BankGUI, BankGlobals from toontown.nametag.NametagGlobals import * from toontown.toonbase i...
linktlh/Toontown-journey
toontown/toon/DistributedNPCBanker.py
Python
apache-2.0
3,769
0.001592
from . import common import hglib class test_branches(common.basetest): def test_empty(self): self.assertEquals(self.client.branches(), []) def test_basic(self): self.append('a', 'a') rev0 = self.client.commit('first', addremove=True) self.client.branch('foo') self.appe...
beckjake/python3-hglib
tests/test-branches.py
Python
mit
674
0.001484
from django.conf.urls import patterns, include, url urlpatterns = [ url(r'^$', 'clientes.views.clientes', name='clientes'), url(r'^edit/(\d+)$', 'clientes.views.clientes_edit', name='editCliente'), url(r'^delete/(\d+)$', 'clientes.views.clientes_delete', name='deleteCliente'), ]
macs03/autoservicio
clientes/urls.py
Python
mit
293
0.006826
from miasm2.core.asmblock import disasmEngine from miasm2.arch.msp430.arch import mn_msp430 class dis_msp430(disasmEngine): def __init__(self, bs=None, **kwargs): super(dis_msp430, self).__init__(mn_msp430, None, bs, **kwargs)
stephengroat/miasm
miasm2/arch/msp430/disasm.py
Python
gpl-2.0
242
0
# This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # # Copyright (C) 2020 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. from flask import request from ..db import RadioStation from . import get_entity, api_routing from .exceptions import ...
spl0k/supysonic
supysonic/api/radio.py
Python
agpl-3.0
1,836
0.000545
# -*- coding: UTF-8 -*- # Syntax definition automatically generated by hljs2xt.py # source: sml.js name = 'SML' file_patterns = ['*.sml', '*.ml'] built_in = """ array bool char exn int list option order real ref string substring vector unit word """.split() keyword = """ abstype and andalso as case da...
editxt/editxt
resources/syntax/sml.syntax.py
Python
gpl-3.0
1,797
0.003339
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, struct, time from hashlib import md5 import sys import os import random # CONFIG server = '172.16.192.111' username='' password='' CONTROLCHECKSTATUS = '\x00' ADAPTERNUM = '\x00' host_ip = '0.210.30.0' IPDOG = '\x00' host_name = 'DRCOMFUCKER' PRIMARY_DNS = '...
drcoms/drcom-generic
custom/drcom_for_dlnu_520(x).py
Python
agpl-3.0
12,107
0.016519
# Copyright 2012 IBM Corp. # 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 app...
jcsp/manila
manila/api/contrib/services.py
Python
apache-2.0
3,444
0
from __future__ import print_function from psychopy import sound, monitors, core, visual, event, data, gui, logging, info import numpy as np from copy import deepcopy from math import atan, cos, sin, pi, sqrt, pow import time, sys, platform, os, StringIO from pandas import DataFrame from calcUnderOvercorrect import cal...
alexholcombe/spatiotopic-motion
dotLocalize.py
Python
mit
26,405
0.023859
""" Support for RFXtrx switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.rfxtrx/ """ import logging import homeassistant.components.rfxtrx as rfxtrx from homeassistant.components.rfxtrx import ( ATTR_FIREEVENT, ATTR_NAME, ATTR_PACKETID...
justyns/home-assistant
homeassistant/components/switch/rfxtrx.py
Python
mit
5,695
0
from __future__ import print_function from scipy.ndimage import gaussian_filter import numpy as np from PIL import Image img = np.asarray(Image.open('../Klimt/Klimt.ppm')) img_gray = np.asarray(Image.open('../Klimt/Klimt.pgm')) print('img:', img.shape) sigmas = [0.5, 2, 5, 7] for sigma in sigmas: print('sigma:', ...
lagadic/ViSP-images
Gaussian-filter/Gaussian_filter.py
Python
gpl-2.0
838
0.008353
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, m...
eddieruano/Sentinel
assist/Adafruit_Python_MPR121/examples/simpletest.py
Python
apache-2.0
3,622
0.002485
# Copyright (C) 2014 Johnny Vestergaard <jkv@unixcluster.dk> # # 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...
soltraconpotprojectNLDA/SoltraConpot
conpot/protocols/kamstrup/usage_simulator.py
Python
gpl-2.0
4,667
0.000214
#!/usr/bin/python # -*- coding: utf-8 -*- """ In this example, we connect a signal of a QSlider to a slot of a QLCDNumber. """ import sys from PySide.QtGui import * from PySide.QtCore import * class Example(QWidget): def __init__(self): super(Example, self).__init__() lcd = QLCDNumber() ...
madoodia/codeLab
pyside/signal_slot_tests/test_signal_slot.py
Python
mit
752
0.00133
""" Package for managing a ranked ladder, which is a special kind of ongoing League. Package Requirements -------------------- botbase match user Dependencies ------------ cmd_ladder botbase/ commandtype ladder/ ratingsdb match/ cmd_match matchinfo user/ userl...
incnone/necrobot
necrobot/ladder/__init__.py
Python
mit
678
0.004425
from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.testing import eq_ from sqlalchemy.testing import fixtures from sqlalchemy.testing.fixtures import fixture_session from sqlalchemy.testing.schema import Column from sqlalchemy.te...
monetate/sqlalchemy
test/orm/inheritance/test_abc_polymorphic.py
Python
mit
3,596
0
# 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 ...
rjschwei/azure-sdk-for-python
azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_schemas_operations.py
Python
mit
14,610
0.002806
# Copyright 2016 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 by applicable law or agree...
ininex/geofire-python
resource/lib/python2.7/site-packages/gcloud/monitoring/test_timeseries.py
Python
mit
6,799
0
from __future__ import unicode_literals import cgi import codecs import logging import sys from io import BytesIO from threading import Lock import warnings from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.core.urlresolvers impo...
rooshilp/CMPUT410Lab6
virt_env/virt1/lib/python2.7/site-packages/django/core/handlers/wsgi.py
Python
apache-2.0
9,514
0.000736
import mysql.connector from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, dbname, username, password): self.host = host self.dbname = dbname self.username = username self.password = password self.connection = mysql.conn...
0verchenko/Addressbook
fixture/db.py
Python
apache-2.0
1,388
0.005043