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
Uberi/The-Mippits
mippits.py
1
12759
#!/usr/bin/env python3 def normalize(value): return value & 0xFFFFFFFF def signed(value): return value - 0x100000000 if value & 0x80000000 else value # from http://code.activestate.com/recipes/577977-get-single-keypress/, MIT licensed try: import tty, termios except ImportError: # Probably Windows. ...
mit
1,875,588,031,979,448,800
59.757143
216
0.61243
false
julietbravo/microhh
schemes/laplbcneu.py
5
3758
from pylab import * xsize = 0.5 igc = 3 def geterror(u, uref, n=2): error = sqrt(sum((uref - u)**2.) / u.size) return error def refdata(n): x = linspace(0.5*xsize/n, xsize-0.5*xsize/n, n) u = cos(2.*pi*x/xsize) return x, u def laplx2nd(x, u): istart = igc iend = u.size + igc dx = xsize / u.s...
gpl-3.0
-3,060,007,071,365,627,000
29.064
117
0.592602
false
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/oauth2client/contrib/devshell.py
8
4990
# Copyright 2015 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 ...
gpl-2.0
7,941,409,118,459,670,000
32.046358
77
0.670341
false
perkinslr/pypyjs
addedLibraries/nevow/test/test_context.py
2
3856
# -*- test-case-name: nevow.test.test_context -*- # Copyright (c) 2004 Divmod. # See LICENSE for details. import itertools import time import zope.interface as zi from twisted.python.components import registerAdapter from nevow import context from nevow import tags from nevow import inevow from nevow.testutil impor...
mit
-3,390,187,045,239,591,400
29.125
80
0.649637
false
jkkummerfeld/1ec-graph-parser
parser/nn-tagger/pre-process.py
1
1342
#!/usr/bin/env python3 import sys import string def map_token(token, pos): # Lowercase token = token.lower() # Alternatives: # - Just change the case of the first letter of the first word # - Also, leave it as is if we've seen this capitalised elsewhere # Replace numbers letters = [] ...
isc
-6,227,678,315,729,307,000
24.320755
69
0.539493
false
Gaia3D/QGIS
python/plugins/db_manager/dlg_table_properties.py
6
11437
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : Oct 13, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
8,228,031,055,116,039,000
32.837278
115
0.577774
false
cd34/apex
examples/apex_example/setup.py
2
1066
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) requires = [ 'pyramid', 'SQLAlchemy', 'transaction', 'repoze.tm2>=1.0b1', # default_commit_veto 'zope.sqlalchemy', 'WebError', 'apex', ] if sys.version_info[:3] < (2,5,0...
mit
2,763,441,838,803,290,600
22.173913
63
0.569418
false
glenndmello/luigi
examples/top_artists.py
4
9103
# -*- coding: utf-8 -*- # # Copyright 2012-2015 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
600,442,336,424,532,200
31.280142
111
0.610568
false
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-administration/tests/blob_container_preparer.py
1
1852
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from datetime import datetime, timedelta from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions from devtools_test...
mit
-8,463,971,972,934,652,000
50.444444
118
0.633909
false
andersonsilvade/python_C
Python32/web2py/applications/examples/controllers/cache_examples.py
2
1542
import time def cache_in_ram(): """cache the output of the lambda function in ram""" t = cache.ram('time', lambda: time.ctime(), time_expire=5) return dict(time=t, link=A('click to reload', _href=URL(r=request))) def cache_on_disk(): """cache the output of the lambda function on disk""" t = ca...
mit
3,043,570,753,729,817,000
31.125
72
0.656291
false
lukeroge/CloudBot
plugins/cypher.py
21
1815
""" cypher.py Ciphers and deciphers strings. Created By: - Tom <https://github.com/instanceoftom> Modified By: - Fletcher Boyd <https://github.com/thenoodle68> - Dabo Ross <https://github.com/daboross> - Luke Rogers <https://github.com/lukeroge> License: GPL v3 """ import base64 import binascii...
gpl-3.0
-4,556,028,604,208,984,000
22.881579
75
0.6
false
praveendareddy21/my-repo
tree_de.py
1
1193
class nod(object): def __init__(self ,elem): self.elem=elem self.le=None self.ri=None def setle(self ,le): self.le=le def getle(self): return self.le def setri(self ,ri): self.ri=ri def getri(self): return self.ri class dll(object): def __i...
mit
598,142,379,606,190,200
17.353846
31
0.524728
false
beni55/edx-platform
lms/djangoapps/django_comment_client/tests/utils.py
15
5494
""" Utilities for tests within the django_comment_client module. """ from datetime import datetime from mock import patch from pytz import UTC from openedx.core.djangoapps.course_groups.models import CourseUserGroupPartitionGroup from openedx.core.djangoapps.course_groups.tests.helpers import CohortFactory from django...
agpl-3.0
8,448,469,694,349,997,000
41.261538
107
0.634874
false
enen92/openxenmanager
src/OXM/window_menuitem.py
1
78142
# ----------------------------------------------------------------------- # OpenXenManager # # Copyright (C) 2009 Alberto Gonzalez Rodriguez alberto@pesadilla.org # Copyright (C) 2014 Daniel Lintott <daniel@serverb.co.uk> # # This program is free software; you can redistribute it and/or # modify it under the terms of t...
gpl-2.0
9,121,037,751,998,276,000
46.56056
120
0.601008
false
usirin/koding
go/src/vendor/github.com/caglar10ur/lxc/src/python-lxc/examples/pyconsole-vte.py
22
2202
#!/usr/bin/env python3 # # pyconsole-vte: Example program showing use of console functions # in the lxc python binding # # (C) Copyright Oracle. 2013 # # Authors: # Dwight Engen <dwight.engen@oracle.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the ...
apache-2.0
8,788,840,997,775,546,000
27.230769
75
0.67257
false
ycool/apollo
modules/tools/map_gen/create_traffic_light_from_event.py
3
5178
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
apache-2.0
-1,153,224,613,218,993,700
34.958333
89
0.637312
false
shirishgoyal/crowdsource-platform
crowdsourcing/migrations/0125_boomeranglog.py
1
1066
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-08-03 03:39 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0124_auto_20160725_2123'), ] operati...
mit
6,136,330,231,292,648,000
34.533333
154
0.586304
false
Mellthas/quodlibet
quodlibet/quodlibet/cli.py
4
10325
# Copyright 2014,2016 Nick Boultbee # # 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. import os from senf import fsn2t...
gpl-2.0
4,336,820,668,269,661,700
35.22807
77
0.534722
false
luogangyi/bcec-nova
nova/api/openstack/compute/contrib/services.py
5
7900
# Copyright 2012 IBM Corp. # # 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 t...
apache-2.0
-668,944,093,662,871,900
33.801762
79
0.587848
false
danidomi/fofix
src/Input.py
3
18074
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
gpl-2.0
-699,863,752,015,638,400
40.26484
136
0.541275
false
chenc10/Spark-PAF
dist/examples/src/main/python/cassandra_outputformat.py
8
3287
# # 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 us...
apache-2.0
769,814,413,818,522,500
36.352273
98
0.652571
false
scality/cinder
cinder/tests/unit/objects/test_volume.py
1
10553
# Copyright 2015 SimpliVity Corp. # # 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...
apache-2.0
499,737,695,942,082,300
46.111607
79
0.608453
false
turbokongen/home-assistant
tests/components/switch/test_device_trigger.py
3
8224
"""The test for switch device automation.""" from datetime import timedelta import pytest import homeassistant.components.automation as automation from homeassistant.components.switch import DOMAIN from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON from homeassistant.helpers import device_registry fro...
apache-2.0
-5,122,585,954,553,566,000
33.995745
87
0.482004
false
tensorflow/tensorflow
tensorflow/compiler/xla/python/tpu_driver/client/tpu_client.py
14
2435
# Copyright 2019 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
992,158,606,129,420,400
40.271186
96
0.685421
false
KureFM/Xenon
src/packages/rsa/pkcs1.py
75
13170
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
mit
-7,070,300,595,042,206,000
32.680307
97
0.644848
false
CloudServer/cinder
cinder/volume/drivers/zfssa/zfssarest.py
2
39133
# Copyright (c) 2014, Oracle and/or its affiliates. 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,506,971,684,102,821,000
43.118377
79
0.450157
false
kubeflow/kfp-tekton
sdk/python/kfp_tekton/_client.py
1
2688
# Copyright 2020 kubeflow.org # # 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
-3,953,413,530,550,328,300
41.666667
97
0.667783
false
IrregularShed/newoldtv
pal.py
1
8583
#!/usr/bin/env python # The GIMP PAL plugin - PAL effect plugin for The GIMP. # Copyright (C) 2009 Dave Jeffery <david.richard.jeffery@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...
gpl-3.0
2,651,493,329,082,831,000
33.748988
79
0.654433
false
calancha/DIRAC
ConfigurationSystem/Client/CSAPI.py
1
22652
######################################################################## # $HeadURL$ ######################################################################## __RCSID__ = "$Id$" import types from DIRAC.ConfigurationSystem.private.Modificator import Modificator from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC....
gpl-3.0
-5,572,035,235,934,651,000
36.816361
139
0.614118
false
Vauxoo/server-tools
excel_import_export/models/xlsx_report.py
2
2264
# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) from odoo import models, fields, api, _ from odoo.exceptions import ValidationError class XLSXReport(models.AbstractModel): """ Common class for xlsx reporting wizard """ _name = 'xl...
agpl-3.0
-9,115,504,572,418,933,000
31.811594
79
0.569346
false
nkrinner/nova
nova/scheduler/filters/aggregate_multitenancy_isolation.py
2
1983
# Copyright (c) 2011-2013 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 # # Un...
apache-2.0
6,100,110,404,066,099,000
39.469388
78
0.666162
false
quizlet/grpc
tools/buildgen/plugins/expand_bin_attrs.py
14
1646
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-7,936,551,944,769,618,000
34.021277
75
0.696233
false
IITBinterns13/edx-platform-dev
lms/djangoapps/instructor_task/tasks_helper.py
5
19005
""" This file contains tasks that are designed to perform background operations on the running state of a course. """ import json from time import time from sys import exc_info from traceback import format_exc from celery import current_task from celery.utils.log import get_task_logger from celery.signals import wor...
agpl-3.0
-2,740,192,363,429,560,300
47.981959
135
0.689555
false
lnielsen/zenodo3
tests/records/test_models.py
1
2781
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo 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 v...
gpl-2.0
5,970,375,540,379,292,000
33.7625
77
0.68141
false
alheinecke/tensorflow-xsmm
tensorflow/python/estimator/checkpoint_utils_test.py
19
3444
# 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
3,721,172,568,312,750,600
37.266667
80
0.686992
false
Qalthos/ansible
test/sanity/code-smell/no-smart-quotes.py
29
1503
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys def main(): skip = set([ 'docs/docsite/rst/dev_guide/testing/sanity/no-smart-quotes.rst', 'test/integration/targets/lookup_properties/lookup-8859-15.ini', 'test/integration/targets/template/files/encoding_1252_ut...
gpl-3.0
3,142,536,504,179,581,000
30.808511
98
0.545819
false
shuxin/androguard
androdd.py
1
7242
#!/usr/bin/env python from __future__ import print_function import os import re import shutil import sys from argparse import ArgumentParser from androguard import session from androguard.misc import clean_file_name from androguard.core import androconf from androguard.core.bytecode import method2dot, method2format ...
apache-2.0
5,372,420,446,172,829,000
40.382857
108
0.519056
false
kailIII/emaresa
trunk.pe.bk/sales_category_report/sale_report.py
3
4367
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of...
agpl-3.0
2,044,744,322,526,266,400
44.020619
145
0.493932
false
p4datasystems/CarnotKE
jyhton/Lib/logging/__init__.py
17
60350
# Copyright 2001-2012 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
apache-2.0
5,706,937,941,857,209,000
33.924769
93
0.581707
false
cyberden/CouchPotatoServer
couchpotato/core/notifications/slack.py
39
4503
import json from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Slack' class Slack(Notification): url = 'https://slack.com/api/chat.postMessage' required_confs = ('token', 'channels',) def notify(self, message='', data=...
gpl-3.0
-7,001,516,713,638,402,000
34.738095
79
0.40795
false
percy-g2/Novathor_xperia_u8500
6.1.1.B.0.253/external/webkit/Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
19
2145
# Copyright (C) 2009 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-2.0
2,118,910,875,156,846,800
52.625
119
0.777622
false
khkaminska/djangoproject.com
contact/tests.py
9
2344
from unittest import skipIf import requests from django.core import mail from django.test import TestCase from django.test.utils import override_settings def check_network_connection(): try: requests.get('https://djangoproject.com') except requests.exceptions.ConnectionError: return False ...
bsd-3-clause
-8,343,157,735,432,976,000
34.515152
87
0.617321
false
fluxw42/youtube-dl
youtube_dl/extractor/iqiyi.py
9
13109
# coding: utf-8 from __future__ import unicode_literals import hashlib import itertools import re import time from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlencode, ) from ..utils import ( clean_html, decode_packed_codes, get_element_by_id, get_elem...
unlicense
-665,217,653,709,193,300
32.582902
159
0.53915
false
stormbeard/pyvmomi-community-samples
samples/tests/interactive_wrapper_tests.py
13
3510
from unittest import TestCase from mock import Mock from samples.tools.interactive_wrapper import ( VM, ESX, get_all_vms_in_folder ) class VMTests(TestCase): def setUp(self): self.raw_vm = Mock() self.wrapped_vm = VM(self.raw_vm) def test_should_passthrough_unwrapped_attributes(...
apache-2.0
-2,916,098,320,874,111,500
30.339286
77
0.622507
false
leiferikb/bitpop
src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
2
3949
# Copyright (C) 2013 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-3.0
4,685,975,626,771,379,000
50.285714
110
0.732591
false
rdipietro/tensorflow
tensorflow/contrib/rnn/python/kernel_tests/gru_ops_test.py
8
23247
# 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
-3,607,559,223,027,243,000
39.150259
80
0.573407
false
lizquilty/roboticarm
commandline.py
1
1269
#!/usr/bin/python # Unsure who wrote this code, found it on a website and cleaned up the wikihow page # at http://www.wikihow.com/Use-a-USB-Robotic-Arm-with-a-Raspberry-Pi-(Maplin) # - Liz Quilty #ROBOT ARM CONTROL PROGRAM #import the USB and Time librarys into Python import usb.core, usb.util, time #Allocate the na...
unlicense
-6,164,347,019,059,424,000
32.394737
84
0.719464
false
MrTheodor/espressopp
contrib/mpi4py/mpi4py-2.0.0/demo/osu_allgather.py
8
1804
# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bcast( BENCHMARH = "MPI Allgather Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.G...
gpl-3.0
-1,122,397,448,340,107,100
24.055556
64
0.508315
false
renesugar/arrow
python/pyarrow/tests/test_cuda_numba_interop.py
11
8730
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-928,748,390,832,582,100
36.148936
79
0.632646
false
tstenner/bleachbit
tests/TestGUI.py
1
5872
# vim: ts=4:sw=4:expandtab # -*- coding: UTF-8 -*- # BleachBit # Copyright (C) 2008-2020 Andrew Ziem # https://www.bleachbit.org # # 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...
gpl-3.0
1,718,997,126,102,214,100
29.905263
91
0.611887
false
milin/faceguard
facebook/views.py
1
6332
import requests import simplejson as json from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.shortcuts import ( HttpResponse, HttpResponseRedirect, render_to_response,...
mit
2,414,990,138,891,924,500
32.151832
91
0.611339
false
MacHu-GWU/uszipcode-project
uszipcode/pkg/sqlalchemy_mate/crud/selecting.py
1
2688
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module provide utility functions for select operation. """ from sqlalchemy import select, func, Column try: from ..pkg.prettytable import from_db_cursor except: # pragma: no cover from sqlalchemy_mate.pkg.prettytable import from_db_cursor def count_ro...
mit
7,582,632,062,057,396,000
20.731092
79
0.609049
false
MacHu-GWU/single_file_module-project
sfm/fingerprint.py
1
6804
# -*- coding: utf-8 -*- """ This module is built on Python standard hashlib, provides utility method to find hash value for a bytes, a string, a Python object or a file. Import this module:: >>> from sfm.fingerprint import fingerprint Example:: >>> fingerprint.of_bytes(bytes(16)) >>> fingerprint....
mit
2,079,036,333,616,093,000
26.412245
80
0.544818
false
reiaaoyama/exabgp
lib/exabgp/configuration/neighbor/parser.py
3
3406
# encoding: utf-8 """ neighbor/parser.py Created by Thomas Mangin on 2014-07-01. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from string import ascii_letters from string import digits from exabgp.bgp.message.open.routerid import RouterID from exabgp.bgp.message.open.holdtime import HoldTime from ...
bsd-3-clause
5,191,455,710,211,270,000
25.818898
144
0.704932
false
dscho/hg
mercurial/dagparser.py
2
14741
# dagparser.py - parser and generator for concise description of DAGs # # Copyright 2010 Peter Arrenbrecht <peter@arrenbrecht.ch> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import re im...
gpl-2.0
-230,478,098,196,292,350
29.710417
80
0.395631
false
JustinHop/volti
src/volti/gtk3/main.py
2
12148
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Milan Nikolic <gen2brain@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 3 of the License, or # (at your opti...
gpl-3.0
-6,756,951,760,547,837,000
33.413598
86
0.57672
false
grnet/snf-image-creator
image_creator/output/composite.py
2
3350
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2017 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Thi...
gpl-3.0
-6,774,745,026,118,358,000
33.536082
79
0.62806
false
lferr/charm
charm/toolbox/PKEnc.py
3
2819
''' Base class for public-key encryption Notes: This class implements an interface for a standard public-key encryption scheme. A public key encryption consists of four algorithms: (paramgen, keygen, encrypt, decrypt). ''' from charm.toolbox.schemebase import * encBaseSecDefs = Enum('OW_CPA','OW_CCA1','OW_CCA','IND_...
lgpl-3.0
-8,467,246,845,154,118,000
41.712121
129
0.656971
false
vegarang/devilry-django
devilry/restful/serializers.py
1
4059
from functools import wraps import json from django.db.models.query import ValuesQuerySet from django.http import HttpResponseBadRequest, HttpResponse, HttpResponseForbidden from devilry.defaults.encoding import CHARSET class SerializableResult(object): """ Stores Python objects for serialization with :class:`dev...
bsd-3-clause
1,314,081,677,700,295,700
40
116
0.664449
false
gurneyalex/odoo
addons/delivery/tests/test_delivery_stock_move.py
3
3418
# -*- coding: utf-8 -*- from odoo.addons.account.tests.account_test_classes import AccountingTestCase from odoo.tests import tagged, Form @tagged('post_install', '-at_install') class StockMoveInvoice(AccountingTestCase): def setUp(self): super(StockMoveInvoice, self).setUp() self.ProductProduct ...
agpl-3.0
933,671,224,996,467,800
40.682927
137
0.625219
false
Landric/PANFeed
panfeed_site/wsgi.py
1
1432
""" WSGI config for panfeed_site project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
gpl-3.0
8,266,313,809,794,317,000
43.75
79
0.793296
false
wso2-incubator/iot-server-appliances
Arduino Robot/PC_Clients/PythonTestClients/PublishDirectToBAM/BAMPythonPublisher/PythonClient.py
15
1100
#!/usr/bin/env python from Publisher import * ip = '10.100.7.38' # IP address of the server port = 7713 # Thrift listen port of the server username = 'admin' # username password = 'admin' # passowrd publisher = Publisher() # Initialize publisher with ip and port of server publisher.init(ip, port) # Connect to s...
apache-2.0
6,848,327,696,808,988,000
38.285714
521
0.694545
false
ptisserand/ansible
lib/ansible/modules/system/filesystem.py
16
11356
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Alexander Bulimov <lazywolf0@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ver...
gpl-3.0
-7,976,133,672,410,698,000
31.726225
137
0.599859
false
kynikos/wiki-scripts
list-problematic-pages.py
1
6013
#! /usr/bin/env python3 # TODO: create an on-wiki report using AutoPage from ws.client import API from ws.db.database import Database from ws.parser_helpers.encodings import dotencode import ws.ArchWiki.lang as lang def valid_sectionname(db, title): """ Checks if the ``sectionname`` property of given title i...
gpl-3.0
-8,877,456,038,966,192,000
36.092593
115
0.661674
false
cyberark-bizdev/ansible
lib/ansible/modules/network/aci/aci_switch_policy_vpc_protection_group.py
1
8260
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
gpl-3.0
-6,030,748,732,098,617,000
29.036364
141
0.581598
false
HyperBaton/ansible
lib/ansible/modules/network/fortios/fortios_firewall_schedule_recurring.py
7
11614
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
-5,218,717,658,303,861,000
30.559783
127
0.579645
false
jonnatas/codeschool
src/djcomponents/jquery/widgets.py
2
1462
from djcomponents import Widget class Accordion(Widget): """ jQuery UI accordion element. An accordion element that shows each sub-element at a time. """ class Autocomplete(Widget): """ jQuery UI autocomplete element. Autocomplete text as you type. """ class Button(Widget): "...
gpl-3.0
-2,558,969,589,898,031,600
14.072165
65
0.627907
false
uffejakobsen/libsigrokdecode
decoders/flexray/pd.py
4
16182
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2019 Stephan Thiele <stephan.thiele@mailbox.org> ## ## 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 ...
gpl-3.0
4,628,058,687,782,680,000
38.181598
92
0.543938
false
sekikn/bigtop
bigtop-packages/src/charm/hadoop/layer-hadoop-resourcemanager/actions/parseBenchmark.py
7
1460
#!/usr/local/sbin/charm-env python3 # 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....
apache-2.0
2,337,092,406,438,506,000
32.181818
74
0.713014
false
AndreasMadsen/tensorflow
tensorflow/contrib/learn/python/learn/monitors_test.py
14
28403
# 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
972,894,082,987,976,000
37.908219
131
0.652713
false
koyuawsmbrtn/eclock
windows/Python27/Lib/site-packages/pywin32-218-py2.7-win32.egg/win32comext/shell/demos/servers/folder_view.py
37
28883
# This is a port of the Vista SDK "FolderView" sample, and associated # notes at http://shellrevealed.com/blogs/shellblog/archive/2007/03/15/Shell-Namespace-Extension_3A00_-Creating-and-Using-the-System-Folder-View-Object.aspx # A key difference to shell_view.py is that this version uses the default # IShellView provi...
gpl-2.0
-7,067,755,187,175,611,000
38.729023
156
0.642662
false
swaprava/matching
advisor_matching_cgi.py
1
3624
#!/usr/bin/env python """ Created on Thu Jul 16 19:57:23 2015 Build a webpage where the inputs are provided by the user This program runs and matches students to advisors using the Gale-Shapley deferred acceptance algorithm @author: swaprava """ import cgi import cgitb cgitb.enable() print 'Content-type:text/html\r...
gpl-2.0
6,272,962,804,356,684,000
44.886076
288
0.633278
false
Just-D/panda3d
direct/src/plugin_npapi/make_osx_bundle.py
11
3004
#! /usr/bin/env python """ This script constructs the bundle directory structure for the OSX web plugin that is built by the code in this directory. It takes no parameters, and produces the plugin bundle in the same place. """ import getopt import sys import os import glob import shutil import direct from pandac....
bsd-3-clause
5,820,778,329,045,054,000
29.969072
104
0.675766
false
vhscampos/range-analysis
prototype/PythonRangeAnalysis/bck/RA7.py
1
19058
class InvalidIntervalException(Exception): def __init__(self, l, u): self.l = l self.u = u def __str__(self): return "Invalid interval [" + str(l) + ", " + str(u) + "]" class ArithmeticException(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg def lt(x...
gpl-2.0
8,896,778,648,553,874,000
32.611993
92
0.5913
false
redhat-openstack/cinder
cinder/version.py
2
1077
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
-1,979,264,150,002,856,000
31.636364
78
0.721448
false
silveregg/moto
tests/test_cloudformation/fixtures/rds_mysql_with_db_parameter_group.py
2
7273
from __future__ import unicode_literals template = { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "AWS CloudFormation Sample Template RDS_MySQL_With_Read_Replica: Sample template showing how to create a highly-available, RDS DBInstance with a read replica. **WARNING** This template creates an Amazon...
apache-2.0
892,798,649,775,853,300
35.18408
386
0.510381
false
sunshinelover/chanlun
vn.trader/ctpGateway/ctpGateway.py
1
55491
# encoding: UTF-8 ''' vn.ctp的gateway接入 考虑到现阶段大部分CTP中的ExchangeID字段返回的都是空值 vtSymbol直接使用symbol ''' import os import json from copy import copy from vnctpmd import MdApi from vnctptd import TdApi from ctpDataType import * from vtGateway import * # 以下为一些VT类型和CTP类型的映射字典 # 价格类型映射 priceTypeMap = {} priceTypeMap[PRICETYP...
mit
-9,124,491,041,075,271,000
33.939516
97
0.414241
false
dsm054/pandas
pandas/tests/tslibs/test_timezones.py
6
2293
# -*- coding: utf-8 -*- from datetime import datetime import pytest import pytz import dateutil.tz from pandas._libs.tslibs import timezones, conversion from pandas import Timestamp @pytest.mark.parametrize('tz_name', list(pytz.common_timezones)) def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): i...
bsd-3-clause
4,047,214,537,856,406,500
33.223881
77
0.676406
false
xfaxca/pymlkit
pymlkit/scripts/spellchecker.py
1
2016
from pymlkit.nlp.spellcheck import SpellChecker TIME_LOOKUPS = True def main(): """ Testing the spellchecker using a corpus based on a couple of chapters from The Hobbit. :return: """ # Docs can be any set of test files to read in to use in the spellchecker datadir = '../../data/lotr/' do...
gpl-3.0
3,557,752,126,215,787,000
38.529412
126
0.583829
false
1844144/django-blog-zinnia
zinnia/tests/utils.py
6
1928
"""Utils for Zinnia's tests""" try: from urllib.parse import parse_qs from urllib.parse import urlparse from xmlrpc.client import Transport except ImportError: # Python 2 from urlparse import parse_qs from urlparse import urlparse from xmlrpclib import Transport from datetime import datetime as...
bsd-3-clause
-5,645,971,459,084,099,000
26.542857
72
0.631224
false
KaranToor/MA450
google-cloud-sdk/platform/bq/third_party/oauth2client/clientsecrets.py
8
4681
#!/usr/bin/env 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...
apache-2.0
-1,867,588,988,385,992,000
27.542683
80
0.655202
false
deebuls/youbot_pykdl
scripts/display_urdf.py
5
2367
#!/usr/bin/python # Copyright (c) 2013-2014, Rethink Robotics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # th...
bsd-3-clause
-1,025,759,241,111,887,600
40.526316
77
0.720744
false
robosafe/table
table_simulator/scripts/human_g.py
2
2799
#!/usr/bin/env python """ This script has the functions to change the gaze (head location) and hand location of the human in Gazebo. Inherited to the human.py script. Created by Dejanira Araiza Illan, July 2015. """ import rospy from bert2_simulator.msg import * from gazebo_msgs.srv import SetModelState from gazebo...
gpl-3.0
-6,432,549,062,762,144,000
37.342466
152
0.676313
false
michaelzzh/LF_PredictionIO
examples/scala-parallel-similarproduct/filterbyyear/data/import_eventserver.py
9
2629
# # 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 us...
apache-2.0
-7,096,045,361,157,417,000
28.211111
74
0.667554
false
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py
13
33171
""" Helpers for embarrassingly parallel code. """ # Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org > # Copyright: 2010, Gael Varoquaux # License: BSD 3 clause from __future__ import division import os import sys from math import sqrt import functools import time import threading import itertools fr...
mit
-288,866,009,799,402,750
40.257463
103
0.589008
false
rafaduran/reqfiles
tests/conftest.py
1
1083
'''pytest conftest moduele''' import pytest from . import common @pytest.fixture def reqfile(): from reqfiles import core return core.Reqfiles(eager=False) @pytest.fixture def parser(): from reqfiles import parsers return parsers.Parser() @pytest.fixture def classifier(): from reqfiles import...
bsd-3-clause
-7,082,745,547,132,856,000
19.826923
75
0.712835
false
luci/luci-py
client/tests/swarming_test.py
3
87686
#!/usr/bin/env vpython # -*- coding: utf-8 -*- # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. from __future__ import print_function import datetime import json import logging import os import S...
apache-2.0
-4,648,114,395,399,296,000
30.19317
80
0.437081
false
repotvsupertuga/tvsupertuga.repository
script.module.resolveurl/lib/resolveurl/plugins/sapo.py
3
1664
""" resolveurl XBMC Addon Copyright (C) 2011 t0mm0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-2.0
-301,775,066,573,403,600
32.959184
94
0.628005
false
CFIS-Octarine/octarine
src/daomop/viewer.py
1
42162
import os import re import logging from multiprocessing.dummy import Pool, Lock from math import atan2, degrees from multiprocessing.pool import ApplyResult from astropy.time import Time from cadcutils.exceptions import NotFoundException from mp_ephem import ObsRecord import tempfile from . import candidate from . imp...
gpl-3.0
-3,999,884,930,713,838,000
41.246493
119
0.568284
false
bratsche/Neutron-Drive
google_appengine/lib/django_1_3/tests/modeltests/model_forms/models.py
49
54171
""" XX. Generating HTML forms from models This is mostly just a reworking of the ``form_for_model``/``form_for_instance`` tests to use ``ModelForm``. As such, the text may not make sense in all cases, and the examples are probably a poor fit for the ``ModelForm`` syntax. In other words, most of these tests should be r...
bsd-3-clause
-1,267,683,232,460,326,100
32.584005
173
0.64972
false
rhcarvalho/kombu
kombu/async/aws/sqs/message.py
9
1028
# -*- coding: utf-8 -*- from __future__ import absolute_import from .ext import ( RawMessage, Message, MHMessage, EncodedMHMessage, JSONMessage, ) __all__ = ['BaseAsyncMessage', 'AsyncRawMessage', 'AsyncMessage', 'AsyncMHMessage', 'AsyncEncodedMHMessage', 'AsyncJSONMessage'] class BaseAsyncMessage(ob...
bsd-3-clause
-2,067,044,155,838,424,600
23.47619
78
0.70428
false
alfa-addon/addon
plugin.video.alfa/lib/cloudscraper/captcha/2captcha.py
3
10487
from __future__ import absolute_import import requests try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from ..exceptions import ( CaptchaServiceUnavailable, CaptchaAPIError, CaptchaTimeout, CaptchaParameter, CaptchaBadJobID, CaptchaReportError )...
gpl-3.0
1,021,921,056,511,593,500
38.874525
159
0.525222
false
BrechtBa/parsenlp
examples/hs101.py
3
1349
#!/usr/bin/env/ python ################################################################################ # Copyright 2016 Brecht Baeten # This file is part of jsonopt. # # jsonopt is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
gpl-3.0
589,607,433,428,681,000
34.459459
80
0.613047
false
ojengwa/grr
config/data_server.py
13
1402
#!/usr/bin/env python """Configuration parameters for the data servers.""" from grr.lib import config_lib # The Data Store server. config_lib.DEFINE_integer("Dataserver.stats_frequency", 60, ("Time interval in seconds for data server " "statistics updates")) confi...
apache-2.0
-6,089,138,912,266,132,000
42.8125
78
0.599857
false
astocko/agpy
agpy/kdist.py
6
4884
from numpy import sqrt, abs, pi, cos, sin, max, ones, array from astropy import coordinates def kdist(l, b, vin, near=True,r0=8.4e3,v0=2.54e2,dynamical=False, kinematic=True,regular=False,rrgal=False,verbose=False, inverse=False,silent=False, returnvtan=False): """ NAME: KINDIST P...
mit
-3,965,084,348,041,777,000
36.282443
153
0.598894
false
tillrohrmann/flink
flink-python/pyflink/datastream/tests/test_stream_execution_environment_completeness.py
3
3043
################################################################################ # 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...
apache-2.0
637,764,542,396,819,300
48.080645
98
0.672034
false
JohnCrickett/Sentiment
modelling/sentiment_model.py
1
3595
from sklearn import model_selection from sklearn.externals import joblib from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.metrics import accuracy_score from sklearn.linear_model import LogisticRegressionCV from sklearn.pipeline import ...
mit
-1,249,370,185,584,871,200
33.567308
80
0.579972
false
willusher/ansible-modules-core
files/fetch.py
40
3516
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
5,792,329,404,254,870,000
37.217391
91
0.701934
false
yongtang/tensorflow
tensorflow/python/keras/utils/generic_utils.py
6
42150
# 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
-8,389,404,340,543,426,000
34.242475
112
0.668185
false
darktears/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
35
18382
# Copyright (c) 2009, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
-411,272,952,947,862,340
44.955
147
0.645577
false