repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
zepheira/freemix
freemix/dataset/augment/views.py
1
1026
from freemix.dataset.transform import RawTransformView, AkaraTransformClient from freemix.dataset.augment import models from freemix.dataset.augment import conf from django.views.generic.base import View from freemix.views import JSONResponse class JSONView(View): template=None def get_dict(self, *args, **k...
apache-2.0
-6,750,666,305,143,666,000
26
92
0.745614
false
apanda/modeling
tests/examples/withProxySat.py
1
1826
import components def withProxySat (): """ A proxy and a firewall. This results in a SAT result, i.e. the packet goes through since the proxy is used to send information through""" ctx = components.Context (['a', 'b', 'c', 'd', 'fw', 'p'],\ ['ip_a', 'ip_b', 'ip_c', 'ip_d', ...
bsd-3-clause
3,576,125,686,319,637,500
44.65
90
0.459474
false
Tarrasch/luigi
luigi/contrib/external_program.py
19
7177
# -*- coding: utf-8 -*- # # Copyright 2012-2016 Spotify AB # # 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...
apache-2.0
4,729,729,993,393,629,000
34.009756
99
0.630486
false
agodbehere/with-venv
travis_pypi_setup.py
1
3758
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
isc
6,831,854,379,824,786,000
29.803279
79
0.679351
false
w1ll1am23/home-assistant
homeassistant/components/fastdotcom/__init__.py
24
1951
"""Support for testing internet speed via Fast.com.""" from datetime import timedelta import logging from fastdotcom import fast_com import voluptuous as vol from homeassistant.const import CONF_SCAN_INTERVAL import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import async_load_p...
apache-2.0
4,986,699,854,218,640,000
26.871429
84
0.657611
false
torchingloom/edx-platform
cms/envs/test.py
1
7368
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
agpl-3.0
1,389,359,036,859,832,300
30.896104
144
0.649701
false
bilgili/nest-simulator
topology/examples/grid_iaf.py
13
1498
# -*- coding: utf-8 -*- # # grid_iaf.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 # ...
gpl-2.0
5,879,585,912,008,757,000
24.827586
70
0.686248
false
hanlind/nova
nova/api/openstack/compute/keypairs.py
2
13850
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-6,605,378,922,066,640,000
37.579387
79
0.609964
false
turbomanage/training-data-analyst
courses/developingapps/v1.2/python/kubernetesengine/bonus/backend/quiz/gcp/pubsub.py
12
1336
# 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, ...
apache-2.0
-2,091,258,551,746,689,800
26.265306
74
0.758234
false
kfwang/Glance-OVA-OVF
glance/tests/functional/test_sqlite.py
13
1348
# Copyright 2012 Red Hat, 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 ...
apache-2.0
-7,760,043,087,928,661,000
32.7
78
0.702522
false
adrianmugnoz/Documentacion-Divulgame
readthedocs/builds/migrations/0010_add_largest_alias.py
16
9540
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'VersionAlias.largest' db.add_column('builds_versionalias', 'largest', self.gf('django.db.m...
mit
-9,178,276,200,531,165,000
74.11811
182
0.548847
false
sanyaade-teachings/fpys2
setup.py
1
1399
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup(name = "FPyS2", version = "0.6.2", description = "Amazon FPS Library (version 2008-09-17)", author = "Travis Fischer", author_email = "trav.fischer@gmail.com", url = "http://github.com/t...
mit
3,575,750,244,426,801,700
37.861111
88
0.661901
false
aruneral01/auto-sklearn
test/data/test_split_data.py
5
3603
''' Created on Dec 16, 2014 @author: Aaron Klein ''' import unittest import numpy as np from autosklearn.data.split_data import split_data class Test(unittest.TestCase): def test_split_data_regression(self): n_points = 1000 np.random.seed(42) n_dims = np.random.randint(1, 100) X...
bsd-3-clause
6,755,360,988,475,327,000
33.980583
80
0.533999
false
SUNET/eduid-webapp
src/eduid_webapp/personal_data/app.py
1
2998
# -*- coding: utf-8 -*- # # Copyright (c) 2016 NORDUnet A/S # Copyright (c) 2019,2020 SUNET # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must r...
bsd-3-clause
6,407,471,300,470,641,000
37.435897
113
0.738826
false
robovero/python
robovero/lpc17xx_qei.py
2
16790
"""Quadrature encoder interface client library functions. Find implementation details in LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation.""" from internals import robocaller, cstruct __author__ = "Neil MacMunn" __credits__ = ["Neil MacMunn", "NXP MCU SW Application Team"] __...
bsd-2-clause
-4,555,719,060,852,139,500
37.333333
81
0.672781
false
pknight007/electrum-vtc
lib/tests/test_util.py
2
3564
import unittest from lib.util import format_satoshis, parse_URI class TestUtil(unittest.TestCase): def test_format_satoshis(self): result = format_satoshis(1234) expected = "0.00001234" self.assertEqual(expected, result) def test_format_satoshis_diff_positive(self): result = f...
mit
-2,715,683,667,487,076,000
49.914286
226
0.66358
false
ESOedX/edx-platform
openedx/core/djangoapps/cors_csrf/middleware.py
2
6122
""" Middleware for handling CSRF checks with CORS requests CSRF and referrer domain checks ------------------------------- When processing HTTPS requests, the default CSRF middleware checks that the referer domain and protocol is the same as the request's domain and protocol. This is meant to avoid a type of attack ...
agpl-3.0
-606,991,972,538,857,500
40.087248
114
0.672819
false
alheinecke/tensorflow-xsmm
tensorflow/python/ops/embedding_ops.py
18
16718
# 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...
apache-2.0
4,726,363,033,194,994,000
43.820375
82
0.640089
false
RobinQuetin/CAIRIS-web
cairis/cairis/controllers/AttackerController.py
1
23270
import httplib from flask import request, session, make_response from flask.ext.restful import Resource from flask_restful_swagger import swagger from CairisHTTPError import ARMHTTPError from data.AttackerDAO import AttackerDAO from tools.JsonConverter import json_serialize from tools.MessageDefinitions import Attacker...
apache-2.0
-4,933,528,991,966,499,000
33.121701
123
0.521874
false
oceanobservatories/mi-instrument
mi/dataset/driver/vel3d_cd/dcl/vel3d_cd_dcl_telemetered_driver.py
7
1529
#!/usr/bin/env python """ @package mi.dataset.driver.vel3d_cd.dcl @file mi/dataset/driver/vel3d_cd/dcl/vel3d_cd_dcl_telemetered_driver.py @author Emily Hahn @brief Driver for the telemetered vel3d instrument series c and d through dcl """ from mi.dataset.dataset_driver import SimpleDatasetDriver from mi.dataset.parse...
bsd-2-clause
-2,769,532,087,368,393,000
32.977778
93
0.71877
false
hanghang177/robo-i-star
robo-i-star/gui.py
1
1370
import tkinter as tk from PIL import Image,ImageTk import sys import math WIDTH = 1280 HEIGHT = 720 # Grainger, MEL, MSEB, Engineering Hall, Everitt Labratory, Talbot Laboratory coordnames = ["Grainger", "Talbot", "Everitt", "Engineering Hall", "Material Science Building", "Mechanical Engineering Lab"] pixcoords = [...
gpl-3.0
-7,180,925,067,652,118,000
35.052632
141
0.581022
false
nis-sdn/odenos
src/test/python/org/o3project/odenos/core/component/network/packet/test_ofp_in_packet.py
6
5404
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
-7,646,718,790,878,809,000
43.295082
76
0.453368
false
chrisrsantiago/chiplibrary
chiplibrary/__init__.py
1
2756
# -*- coding: utf-8 -*- import os from pyramid.config import Configurator from pyramid.events import BeforeRender, NewRequest from pyramid.session import UnencryptedCookieSessionFactoryConfig from pyramid.scripts.pviews import PViewsCommand from social.apps.pyramid_app.models import init_social from .lib import help...
mit
-3,795,348,171,892,321,000
33.024691
77
0.641147
false
ulope/guardhouse
guardhouse/epio_settings.py
1
1125
from settings import * from bundle_config import config DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "HOST": config['postgres']['host'], "PORT": int(config['postgres']['port']), "USER": config['postgres']['username'], "PASSWORD": config['pos...
bsd-3-clause
4,237,921,371,518,185,500
27.125
81
0.599111
false
aperigault/ansible
lib/ansible/modules/network/nxos/nxos_snmp_user.py
15
12815
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
5,832,756,629,373,410,000
31.361111
81
0.568552
false
SosirisTseng/hearts-of-silicon
hos/ode/ion_rates.py
1
2416
""" Rate of change of ions """ import common_const as cc from config import USE_NUMBA def _get_beta_inv(ca, km, total): """Calculates buffering factor, beta""" return 1.0 + km * total / (km + ca)**2 def get_d_ca_all(ca_in, ca_nsr, ca_jsr, j_up, j_rel, j_trpn, j_xfer, i_cab, i_naca, ...
mit
2,801,133,271,543,708,700
37.349206
114
0.582781
false
OptimusGREEN/repo67beta
service.ogmcupdater/isAddonUpToDate.py
1
2786
import os, xbmcaddon, urllib, urllib2, xbmc from distutils.version import LooseVersion ################################################################################ ################################################################################ ##### Check if addon is up-to-date ...
gpl-3.0
-2,931,127,970,079,315,000
36.16
124
0.43575
false
eskibars/domoticz
plugins/examples/BaseTemplate.py
14
3247
# Basic Python Plugin Example # # Author: GizMoCuz # """ <plugin key="BasePlug" name="Basic Python Plugin Example" author="gizmocuz" version="1.0.0" wikilink="http://www.domoticz.com/wiki/plugins/plugin.html" externallink="https://www.google.com/"> <description> <h2>Plugin Title</h2><br/> Overview.....
gpl-3.0
3,684,882,182,494,771,000
29.641509
191
0.612257
false
tscholl2/smc
src/scripts/push_vm_images_base.py
3
1264
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
agpl-3.0
1,641,609,147,862,512,000
39.774194
129
0.620253
false
tmerrick1/spack
var/spack/repos/builtin/packages/soapsnp/package.py
5
1823
############################################################################## # Copyright (c) 2013-2018, 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...
lgpl-2.1
-5,396,797,654,784,089,000
42.404762
78
0.677455
false
hujiajie/chromium-crosswalk
tools/perf/metrics/network.py
22
2308
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.value import scalar from metrics import Metric NETWORK_DATA_NOT_FOUND = 'Network data could not be found.' # This is experimental. crbug....
bsd-3-clause
7,543,104,522,033,818,000
32.941176
79
0.681542
false
BitcoinUnlimited/BitcoinUnlimited
qa/rpc-tests/test_framework/bumessages.py
1
12392
from .nodemessages import * class QHash(object): """quarter hash""" def __init__(self, shortHash=None): self.hash = shortHash def deserialize(self, f): self.hash = struct.unpack("<Q", f.read(8))[0] return self def serialize(self): r = b"" r += struct.pack("<Q"...
mit
4,719,418,770,639,833,000
28.434679
162
0.585458
false
crsmithdev/arrow
arrow/arrow.py
1
62146
""" Provides the :class:`Arrow <arrow.arrow.Arrow>` class, an enhanced ``datetime`` replacement. """ import calendar import re import sys from datetime import date from datetime import datetime as dt_datetime from datetime import time as dt_time from datetime import timedelta from datetime import tzinfo as dt_tzinfo...
apache-2.0
1,175,093,104,816,348,200
32.411828
147
0.545828
false
oourfali/cloud-init-fedora
cloudinit/DataSourceOVF.py
2
9618
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Hafliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # it ...
gpl-3.0
7,722,041,840,196,651,000
27.96988
79
0.577459
false
valexandersaulys/prudential_insurance_kaggle
venv/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py
9
31424
""" Unit test suite for OLS and PanelOLS classes """ # pylint: disable-msg=W0212 from __future__ import division from datetime import datetime from pandas import compat from distutils.version import LooseVersion import nose import numpy as np from numpy.testing.decorators import slow from pandas import date_range, ...
gpl-2.0
-6,707,586,531,301,820,000
33.646086
79
0.559286
false
mrquim/repository.mrquim
repo/script.module.youtube.dl/lib/youtube_dl/extractor/playtvak.py
36
6794
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urlparse, compat_urllib_parse_urlencode, ) from ..utils import ( ExtractorError, int_or_none, parse_iso8601, qualities, ) class PlaytvakIE(InfoExtractor): IE_DESC = 'Pla...
gpl-2.0
-4,390,604,338,287,343,000
36.436464
171
0.521104
false
elyezer/robottelo
robottelo/ui/contenthost.py
1
10594
"""Utilities to manipulate content hosts via UI.""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class ContentHost(Base): """Manipulates Content Hosts from UI""" is_katello = True def nav...
gpl-3.0
-4,051,547,977,331,056,600
41.546185
79
0.599868
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/lib2to3/fixes/fix_import.py
1
2905
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: fix_import.py """Fixer for import statements. If spam is being imported from the local directory, this import: from spam import eggs Becomes: ...
unlicense
-4,872,746,734,044,116,000
31.651685
126
0.558692
false
vmarteev/amphtml
validator/webui/build.py
22
5761
#!/usr/bin/env python2.7 # # Copyright 2016 The AMP HTML 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 # # ...
apache-2.0
-8,423,039,867,742,467,000
32.494186
82
0.659087
false
ToontownUprising/src
otp/namepanel/NameCheck.py
4
10729
import string from otp.otpbase import OTPLocalizer from direct.directnotify import DirectNotifyGlobal from pandac.PandaModules import NSError from pandac.PandaModules import TextEncoder, TextNode notify = DirectNotifyGlobal.directNotify.newCategory('NameCheck') def filterString(str, filter): result = '' for ch...
mit
508,971,855,783,180,300
31.026866
108
0.540964
false
maestro-hybrid-cloud/horizon
openstack_dashboard/dashboards/identity/domains/tests.py
10
22411
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
apache-2.0
-1,695,528,857,215,956,200
40.968165
78
0.53911
false
gregerhardt/dta
dta/DynameqScenario.py
2
12959
__copyright__ = "Copyright 2011 SFCTA" __license__ = """ This file is part of DTA. DTA 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...
gpl-3.0
-3,406,286,406,759,303,700
42.078231
133
0.566402
false
kakunbsc/enigma2.4
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
1
26333
from Screens.Screen import Screen from Screens.ChannelSelection import * from Components.ActionMap import HelpableActionMap, ActionMap, NumberActionMap from Components.Sources.List import List from Components.Sources.StaticText import StaticText from Components.config import ConfigNothing from Components.ConfigList imp...
gpl-2.0
3,737,866,505,738,427,400
39.57473
197
0.682793
false
octocoin-project/octocoin
share/seeds/generate-seeds.py
2
4298
#!/usr/bin/python # Copyright (c) 2014 Wladmir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory that...
mit
1,106,258,131,989,535,100
30.837037
98
0.576082
false
afaheem88/tempest_neutron
tempest/api/baremetal/admin/test_nodestates.py
8
2363
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
8,783,356,742,742,261,000
39.741379
78
0.650868
false
sigwo/simplecoin_multi
manage.py
3
10705
import argparse import json import os import datetime from simplecoin import create_manage_app, db, currencies, powerpools, redis_conn from simplecoin.scheduler import SchedulerCommand from simplecoin.models import (Transaction, UserSettings, Credit, ShareSlice, DeviceSlice, Block, Credi...
mit
-1,270,621,371,326,269,000
33.98366
112
0.611397
false
eeshangarg/oh-mainline
vendor/packages/twisted/twisted/words/xish/xmlstream.py
18
8526
# -*- test-case-name: twisted.words.test.test_xmlstream -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ XML Stream processing. An XML Stream is defined as a connection over which two XML documents are exchanged during the lifetime of the connection, one for each direction. The unit o...
agpl-3.0
2,892,796,734,866,596,000
31.666667
79
0.638635
false
temetherian/omnomic
comm.py
1
3762
#!/usr/bin/python import base64 import json import os import re import time import uuid from google.appengine.api import app_identity try: from functools import lru_cache except ImportError: from functools32 import lru_cache import httplib2 from oauth2client.client import GoogleCredentials _FIREBASE_SCOPE...
gpl-3.0
3,970,345,660,071,770,600
31.713043
78
0.675439
false
dhcrzf/zulip
zerver/lib/widget.py
2
2238
from typing import MutableMapping, Any, Optional, List, Tuple from django.conf import settings import re import json from zerver.models import SubMessage def get_widget_data(content: str) -> Tuple[Optional[str], Optional[str]]: valid_widget_types = ['tictactoe', 'poll', 'todo'] tokens = content.split(' ') ...
apache-2.0
5,613,467,135,951,827,000
31.434783
77
0.613941
false
PaddlePaddle/Paddle
python/paddle/distributed/fleet/base/distributed_strategy.py
1
62903
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2021 NVIDIA Corporation. 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://ww...
apache-2.0
-8,822,285,084,877,831,000
34.883058
324
0.608985
false
projecthamster/hamster-dbus
docs/conf.py
1
8937
#!/usr/bin/env python # -*- coding: utf-8 -*- # # hamster-dbus documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
gpl-3.0
-4,234,435,585,753,774,000
29.397959
83
0.70113
false
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/amp.py
27
3480
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, mimetype2ext, determine_ext, ) class AMPIE(InfoExtractor): # parse Akamai Adaptive Media Player feed def _extract_feed_info(self, url): item = se...
gpl-3.0
-4,717,861,870,326,563,000
38.101124
106
0.527586
false
rapidhere/rpbtman_autosign
pytz/zoneinfo/Africa/Casablanca.py
9
1184
'''tzinfo timezone information for Africa/Casablanca.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Casablanca(DstTzInfo): '''Africa/Casablanca timezone definition. See datetime.tzinfo for details''' zone = 'Africa/Casa...
gpl-3.0
1,986,346,365,785,845,500
19.413793
80
0.606419
false
inaz2/deluge-hack
deluge/httpdownloader.py
1
8499
# # httpdownloader.py # # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 late...
gpl-3.0
7,980,435,034,071,178,000
38.901408
118
0.650665
false
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/cryptography-0.9.3/tests/hazmat/primitives/test_blowfish.py
9
2801
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import binascii import os import pytest from cryptography.hazmat.backen...
mit
-4,129,838,176,619,132,000
32.345238
79
0.685826
false
ashhher3/cvxpy
cvxpy/tests/test_convolution.py
11
4153
""" Copyright 2013 Steven Diamond, Eric Chu This file is part of CVXPY. CVXPY 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. CVXPY is dis...
gpl-3.0
5,661,699,444,197,006,000
34.194915
75
0.586564
false
jrha/aquilon
tests/broker/test_update_machine.py
2
23821
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...
apache-2.0
-6,669,703,521,060,064,000
44.546845
81
0.559464
false
ydre/kit-soft
ImageProcessing/soobash/scanconverter.py
1
1674
__author__ = 'mehdibenchoufi' from filereader import FileReader from data import Data import constants import sys sys.path.append('/usr/local/lib/python2.7/site-packages') import cv2 class ScanConverter: def get_input(self, value): return self.input def set_input(self, value): self.input = ...
bsd-3-clause
401,495,650,909,379,650
28.892857
186
0.641577
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.7/Lib/test/test_winreg.py
3
17729
# Test the windows specific win32reg module. # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey import os, sys import unittest from test import test_support threading = test_support.import_module("threading") from platform import machine # Do this first so test will be skipped if module doesn't exi...
mit
-8,097,605,125,872,690,000
41.823671
79
0.585538
false
toxygen-project/toxygen
toxygen/list_items.py
2
24327
from toxcore_enums_and_consts import * from PyQt5 import QtCore, QtGui, QtWidgets import profile from file_transfers import TOX_FILE_TRANSFER_STATE, PAUSED_FILE_TRANSFERS, DO_NOT_SHOW_ACCEPT_BUTTON, ACTIVE_FILE_TRANSFERS, SHOW_PROGRESS_BAR from util import curr_directory, convert_time, curr_time from widgets import Dat...
gpl-3.0
6,860,497,635,885,465,000
43.636697
146
0.591688
false
ShadowKyogre/mypaint
gui/factoryaction.py
4
3718
# This file is part of MyPaint. # Copyright (C) 2013 by Andrew Chadwick <a.t.chadwick@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 # (at your ...
gpl-2.0
1,078,321,670,498,157,000
35.811881
79
0.661108
false
kwierman/osf.io
website/addons/twofactor/models.py
34
2189
from base64 import b32encode from binascii import unhexlify from random import SystemRandom from modularodm.fields import BooleanField, StringField, IntegerField from oath import accept_totp from website.addons.base import AddonUserSettingsBase class TwoFactorUserSettings(AddonUserSettingsBase): totp_secret = St...
apache-2.0
5,361,219,291,257,130,000
27.802632
77
0.570123
false
traveloka/ansible
lib/ansible/modules/cloud/docker/docker_network.py
12
13146
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
gpl-3.0
462,739,406,585,472,900
33.413613
136
0.609767
false
matthagy/Jamenson
jamenson/tests/runtime/atypes/etypes.py
1
1969
import unittest from jamenson.runtime.atypes import * from jamenson.runtime.atypes.etypes import * class TestETypes(unittest.TestCase): def chkt(self, tp, op): self.failUnless(typep(op, tp), "%r is not of type %s" % (op, tp)) def chkf(self, tp, op): self.failIf(typep(op, tp), "%r is of ty...
apache-2.0
7,941,851,142,259,293,000
30.253968
74
0.53936
false
AlexanderKaluzhny/instanotifier
instanotifier/api/notification/filters.py
1
1970
from django_filters import rest_framework as filters from django.core.validators import EMPTY_VALUES from instanotifier.notification.models import Ratings class RatingDownvotedFilter(filters.BooleanFilter): def filter(self, qs, value): if not value or value in EMPTY_VALUES: return qs ...
mit
-7,402,247,083,607,435,000
27.970588
98
0.648223
false
pgroudas/pants
src/python/pants/backend/jvm/targets/jvm_binary.py
1
14476
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import re from hashl...
apache-2.0
330,148,365,574,405,400
38.769231
100
0.670696
false
ktosiek/spacewalk
client/tools/rhncfg/config_management/rhncfg-manager.py
2
1360
#!/usr/bin/python # # Copyright (c) 2008 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have ...
gpl-2.0
-1,645,302,312,042,023,000
26.2
73
0.644853
false
etherkit/OpenBeacon2
macos/venv/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py
20
1152
import sys from pip._internal.cli.main import main from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, List def _wrapper(args=None): # type: (Optional[List[str]]) -> int """Central wrapper for all old entrypoints. Historically pip has had se...
gpl-3.0
-3,861,451,368,770,873,300
36.16129
79
0.700521
false
dneg/cortex
python/IECoreHoudini/TestCase.py
12
2146
########################################################################## # # Copyright (c) 2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
bsd-3-clause
-6,953,863,693,120,572,000
45.652174
76
0.701305
false
grdlok/UStar-dl
src/youtube_dl/extractor/ustream.py
3
3623
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urlparse, ) class UstreamIE(InfoExtractor): _VALID_URL = r'https?://www\.ustream\.tv/(?P<type>recorded|embed|embed/recorded)/(?P<videoID>\d+)' IE_NAME = 'ustream' _TEST = { 'url':...
unlicense
151,072,246,938,129,340
34.871287
102
0.548441
false
osuripple/lets
handlers/osuSearchHandler.py
1
1836
import tornado.gen import tornado.web from common.sentry import sentry from common.web import requestsManager from common.web import cheesegull from constants import exceptions from common.log import logUtils as log class handler(requestsManager.asyncRequestHandler): """ Handler for /web/osu-search.php """ MODULE...
agpl-3.0
-4,759,483,761,404,035,000
30.118644
143
0.705338
false
feschmidt/stcad
testing_scripts/rick_drum.py
1
2218
import numpy as np from stcad.source_dev.utilities import * from stcad.source_dev.objects import * from stcad.source_dev.chip import * import gdsCAD as cad from stcad.source_dev.drums import * chip = Base_Chip('drum_selection', 1200, 300,label=False) position = [0,0] array_separation = 50 drum1 = circ_gap_drum(dru...
gpl-3.0
-2,610,892,884,584,815,600
37.929825
107
0.719116
false
eruffaldi/pyoni
src/xndec/xndec.py
1
3965
import ctypes,os # XnStatus XnStreamUncompressDepth16ZWithEmbTable(const XnUInt8* pInput, const XnUInt32 nInputSize, XnUInt16* pOutput, XnUInt32* pnOutputSize) # XnStatus XnStreamUncompressDepth16Z(const XnUInt8* pInput, const XnUInt32 nInputSize, XnUInt16* pOutput, XnUInt32* pnOutputSize) # XnStatus XnStreamUncompres...
mit
-2,357,825,303,375,275,500
38.66
187
0.775032
false
pierreg/tensorflow
tensorflow/contrib/training/__init__.py
4
3073
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,635,632,978,905,022,000
40.527027
87
0.764725
false
Sylrob434/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/downloader/hls.py
8
1527
import os import subprocess from .common import FileDownloader from ..utils import ( encodeFilename, ) class HlsFD(FileDownloader): def real_download(self, filename, info_dict): url = info_dict['url'] self.report_destination(filename) tmpfilename = self.temp_name(filename) ar...
gpl-3.0
-1,986,815,887,468,632,000
32.195652
117
0.53962
false
Kupoman/Fafnir
fafnir/resolve_intersections_pass.py
1
4158
import os from OpenGL import GL as gl import panda3d.core as p3d from panda3d_render_pass import RenderPass SHADER_DIR = os.path.join(os.path.dirname(__file__), 'shaders', '') class ResolveIntersectionsPass(RenderPass): def __init__( self, name, graphics_context, ...
apache-2.0
-4,998,169,536,203,676,000
32.532258
87
0.587061
false
bertucho/epic-movie-quotes-quiz
dialogos/build/Twisted/twisted/internet/test/test_protocol.py
8
17096
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.protocol}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyObject from zope.interface import implementer from twisted.python.failure import Failure from twisted.inter...
mit
8,421,303,479,318,667,000
35.220339
96
0.637401
false
habibmasuro/moneta-1.0.1.0
share/qt/extract_strings_qt.py
5
1841
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/monetastrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xg...
mit
-8,046,745,637,854,879,000
24.569444
80
0.570885
false
oktayacikalin/pyglet
contrib/layout/tests/layout/base_layout.py
29
1069
#!/usr/bin/env python '''Base class for layout tests. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import sys from pyglet.gl import * from layout import * from pyglet.window import * from pyglet.window.event import * class LayoutTestBase(unittest.TestCase): # Supply either XHTM...
bsd-3-clause
1,601,160,540,436,226,300
21.270833
62
0.585594
false
mindbody/API-Examples
SDKs/Python/test/test_get_client_referral_types_response.py
1
1072
# coding: utf-8 """ MINDBODY Public API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import impo...
bsd-2-clause
-3,727,456,310,154,148,000
25.8
121
0.723881
false
batxes/4Cin
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/SHH_WT_models_highres42525.py
4
88239
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
5,074,963,802,422,595,000
47.804757
76
0.70266
false
Zluurk/pypeman
pypeman/conf.py
1
2483
#!/usr/bin/env python # # Copyright : (C) 2014 by MHComm. All rights reserved # # Name : conf.py """ Summary : TBD... """ from __future__ import absolute_import __author__ = "jeremie" __copyright__ = "(C) 2016 by MHComm. All rights reserved" __email__ = "info@mhcomm.fr" import sys import importlib impo...
apache-2.0
2,246,862,227,573,352,400
30.0375
100
0.583971
false
gamernetwork/gn-django
examples/view_registry/project/settings/base.py
1
3717
""" Django settings for view_registry project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
mit
-8,052,822,851,751,771,000
26.131387
91
0.664245
false
ThomasYeoLab/CBIG
stable_projects/fMRI_dynamics/Kong2021_pMFM/part1_pMFM_main/scripts/CBIG_pMFM_step7_perturbation_analysis.py
1
23030
# /usr/bin/env python ''' Written by Kong Xiaolu and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md ''' import os import numpy as np import torch import time import math import scipy.io as sio import CBIG_pMFM_basic_functions_main as fc import warnings def torch_max(A, B): if...
mit
-2,650,524,098,235,753,000
36.145161
79
0.533608
false
ptisserand/ansible
lib/ansible/modules/cloud/cloudstack/cs_loadbalancer_rule_member.py
13
9648
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Darren Worrall <darren@iweb.co.uk> # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
gpl-3.0
-5,431,027,037,259,169,000
26.95942
128
0.619013
false
pavelchristof/gomoku-ai
tensorflow/contrib/keras/python/keras/engine/topology_test.py
2
26468
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
9,215,489,870,715,391,000
37.415094
80
0.611984
false
fomars/yandex-tank
yandextank/plugins/Pandora/plugin.py
1
12105
import datetime import logging import subprocess import time import os import shutil from threading import Event import yaml from netort.resource import manager as resource_manager from netort.resource import HttpOpener from .reader import PandoraStatsReader from ..Console import Plugin as ConsolePlugin from ..Conso...
lgpl-2.1
-508,664,481,288,662,140
36.828125
109
0.582239
false
amyshi188/osf.io
api_tests/nodes/views/test_node_draft_registration_detail.py
11
31591
import hashlib, binascii from nose.tools import * # flake8: noqa from modularodm import Q from website.models import MetaSchema from website.project.metadata.schemas import LATEST_SCHEMA_VERSION from api.base.settings.defaults import API_BASE from website.settings import PREREG_ADMIN_TAG from website.project.model im...
apache-2.0
-2,112,192,858,533,233,200
44.520173
208
0.588174
false
GiantSteps/essentia
test/src/unittest/highlevel/test_onsets.py
10
3820
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 # Software Foundation (FSF), e...
agpl-3.0
-1,917,014,051,743,897,600
35.037736
81
0.596073
false
UMD-DRASTIC/drastic-web
nodes/views.py
1
3309
"""Node views """ __copyright__ = "Copyright (C) 2016 University of Maryland" __license__ = "GNU AFFERO GENERAL PUBLIC LICENSE, Version 3" import uuid import datetime from django.core.exceptions import PermissionDenied from django.shortcuts import render from django.core.urlresolvers import reverse from django.http...
agpl-3.0
1,164,303,273,820,435,500
32.09
112
0.669387
false
WPMedia/dd-agent
agent.py
3
18251
#!/opt/datadog-agent/embedded/bin/python """ Datadog www.datadoghq.com ---- Cloud-Scale Monitoring. Monitoring that tracks your dynamic infrastructure. Licensed under Simplified BSD License (see LICENSE) (C) Boxed Ice 2010 all rights reserved (C) Datadog, Inc. 2010-2016 all rights reserved ...
bsd-3-clause
-6,912,382,500,656,276,000
35.796371
110
0.596351
false
KostasLifeboy/RyzomCore
nel/tools/build_gamedata/processes/tiles/1_export.py
3
3219
#!/usr/bin/python # # \file 1_export.py # \brief Export tiles # \date 2009-03-10-21-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export tiles # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is free s...
agpl-3.0
5,192,780,766,586,293,000
37.321429
123
0.699596
false
alessandrod/twiggy
twiggy/logger.py
1
9580
from .message import Message from .lib import iso8601time import twiggy as _twiggy import levels import outputs import formats import warnings import sys import time import traceback from functools import wraps def emit(level): """a decorator that emits at `level <.LogLevel>` after calling the method. The method ...
bsd-3-clause
-4,509,792,448,662,158,300
34.746269
114
0.595616
false
pozetroninc/micropython
ports/nrf/boards/make-pins.py
6
14336
#!/usr/bin/env python """Creates the pin file for the nRF5.""" from __future__ import print_function import argparse import sys import csv SUPPORTED_FN = {"UART": ["RX", "TX", "CTS", "RTS"]} def parse_pin(name_str): """Parses a string and returns a pin-num.""" if len(name_str) < 1: raise ValueError...
mit
-2,772,880,457,850,103,300
31.880734
106
0.495536
false
PolicyStat/django
tests/i18n/patterns/tests.py
27
13685
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, clear_url_caches, set_script_prefix from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.test impor...
bsd-3-clause
-8,116,618,428,998,594,000
38.897959
112
0.65232
false
Caseyftw/astronet
astronet/util/process.py
1
1274
''' Created on 26.07.2016 @author: fgieseke ''' import multiprocessing def _wrapped_task(proc_num, task, args, kwargs, return_dict): return_dict[proc_num] = task(*args, **kwargs) def start_via_single_process(task, args, kwargs): manager = multiprocessing.Manager() return_dict = manager...
gpl-2.0
5,518,267,185,580,809,000
22.181818
106
0.60832
false
PaulWay/insights-core
insights/parsers/dumpe2fs_h.py
1
2755
""" DumpE2FS - Command ``dumpe2fs -h`` ================================== This parser handles ``dumpe2fs`` output. The object provides access to this data using a dictionary. Particular keys are stored as lists: * Filesystem features * Filesystem flags * Default mount options Other keys are stored as strings. The...
apache-2.0
-8,473,828,247,939,801,000
30.666667
178
0.621779
false
namecoin/namecoin-core
test/functional/test_framework/blocktools.py
1
9711
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for manipulating blocks and transactions.""" from binascii import a2b_hex import struct impo...
mit
8,934,684,380,001,036,000
36.35
108
0.679436
false
willprice/weboob
modules/allrecipes/pages.py
6
4721
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
-7,999,287,810,841,263,000
36.468254
101
0.617878
false
jinmm1992/moose
framework/scripts/cluster_launcher.py
11
5999
#!/usr/bin/env python import os, sys, re, shutil from optparse import OptionParser, OptionGroup, Values # Get the real path of cluster_launcher if(os.path.islink(sys.argv[0])): pathname = os.path.dirname(os.path.realpath(sys.argv[0])) else: pathname = os.path.dirname(sys.argv[0]) pathname = os.path.abspath(pathn...
lgpl-2.1
-3,176,024,060,669,204,500
31.080214
139
0.645274
false