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
kinow-io/kinow-python-sdk
kinow_client/apis/countries_api.py
1
4956
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six i...
apache-2.0
8,068,211,777,134,141,000
33.657343
100
0.542978
false
dredgar/ss-info-fetcher
lib/lxml/cssselect.py
57
3366
"""CSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. This is a thin wrapper around cssselect 0.7 or later. """ from __future__ import absolute_import from . import etree try: import cssselect as external_cssselect except I...
gpl-3.0
-5,854,094,587,350,790,000
32
81
0.61022
false
DemokratieInBewegung/abstimmungstool
voty/initproc/migrations/0036_resistance.py
1
1335
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2019-03-20 17:37 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
agpl-3.0
-7,213,332,599,204,851,000
38.264706
151
0.614232
false
khalim19/gimp-plugin-export-layers
export_layers/tests/test_exportlayers.py
1
4934
# -*- coding: utf-8 -*- # # This file is part of Export Layers. # # Copyright (C) 2013-2019 khalim19 <khalim19@gmail.com> # # Export Layers 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 t...
gpl-3.0
-773,194,953,636,898,800
35.820896
91
0.718484
false
bkj/ernest
enrich/compute-ownership.py
2
2228
#!/usr/bin/env python2.7 import argparse from modules.compute_ownership_graph import COMPUTE_OWNERSHIP from modules.compute_symbology import TO_SYMBOLOGY from modules.add_sic_descs import ADD_SIC_DESCRIPTION from modules.enrich_terminal_nodes import ENRICH_TERMINAL_NODES from generic.generic_meta_enrich import GENERI...
apache-2.0
-3,182,591,457,324,976,600
34.935484
71
0.536355
false
noroutine/ansible
lib/ansible/modules/cloud/openstack/os_recordset.py
25
7951
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise # 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_version': '1.1', 'stat...
gpl-3.0
-1,977,147,227,477,218,800
30.180392
106
0.551251
false
bhansa/fireball
pyvenv/Lib/encodings/cp862.py
272
33370
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
gpl-3.0
-7,278,004,024,529,316,000
46.808023
97
0.598262
false
hradec/gaffer
python/GafferDispatchUITest/NodeUITest.py
4
2059
########################################################################## # # Copyright (c) 2021, Cinesite VFX Ltd. 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 ...
bsd-3-clause
371,420,359,697,365,500
40.18
77
0.691598
false
cjqian/incubator-airflow
airflow/operators/sensors.py
1
26221
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
1,593,882,620,043,254,300
36.673851
112
0.6163
false
chenzw95/Discord-Selfbot
cogs/imagedump.py
4
23084
import datetime import asyncio import re import sys import subprocess import json import time import os from datetime import datetime from discord.ext import commands from cogs.utils.checks import cmd_prefix_len '''Module for miscellaneous commands''' class Imagedump: def __init__(self, bot): self.bot =...
gpl-3.0
5,734,375,399,341,756,000
55.717445
262
0.477647
false
3DGenomes/tadbit
_pytadbit/utils/hmm.py
1
6952
from numpy import log, pi as pi_num, exp import sys def best_path(probs, pi, T): """ Viterbi algorithm with backpointers """ n = len(T) m = len(probs[0]) log_V = [[0. for _ in xrange(m)] for _ in xrange(n)] backpt = [[0 for _ in xrange(m)] for _ in xrange(n)] states = [0 fo...
gpl-3.0
-6,100,944,326,685,636,000
32.747573
87
0.487198
false
LoHChina/nova
nova/tests/unit/conductor/tasks/test_live_migrate.py
11
21241
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
2,556,743,288,968,788,500
46.519016
79
0.63095
false
stevenmizuno/QGIS
python/plugins/processing/algs/qgis/TextToFloat.py
4
3145
# -*- coding: utf-8 -*- """ *************************************************************************** TextToFloat.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *************************...
gpl-2.0
-4,025,006,842,242,310,700
34.738636
100
0.496661
false
AppleDash/BuhIRC
modules/urltitle.py
2
2187
# This file is part of BuhIRC. # # BuhIRC 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. # # BuhIRC is distributed in the hope that ...
gpl-3.0
4,117,250,296,914,519,000
34.868852
97
0.630544
false
hosseinmh/Django_learning
djmod/.venv/lib/python3.5/site-packages/pip/_vendor/webencodings/mklabels.py
512
1305
""" webencodings.mklabels ~~~~~~~~~~~~~~~~~~~~~ Regenarate the webencodings.labels module. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ import json try: from urllib import urlopen except ImportError: from urllib.request import urlopen def asser...
mit
-8,453,717,863,302,231,000
21.118644
71
0.604598
false
gonzafirewall/kivy
kivy/tools/stub-gl-debug.py
75
13278
from __future__ import print_function a = '''cdef void glActiveTexture (cgl.GLenum texture) cdef void glAttachShader (cgl.GLuint program, cgl.GLuint shader) cdef void glBindAttribLocation (cgl.GLuint program, cgl.GLuint index, cgl.GLchar* name) cdef void glBindBuffer (cgl.GLenum target, cgl.GLuint buffer) cde...
mit
-5,865,330,339,503,050,000
65.39
212
0.746197
false
habeanf/Open-Knesset
mks/admin.py
7
3764
from django.contrib import admin from django.contrib.contenttypes import generic from django.db.models import Q from models import Member, Membership, MemberAltname from models import CoalitionMembership, Correlation, Party, \ Award, AwardType, Knesset from links.models import Link from video.models import Video f...
bsd-3-clause
-6,924,204,683,239,020,000
29.852459
92
0.67136
false
hadronproject/HadronWeb
apps/frontend/migrations/0003_auto__add_developer__add_frontendimage__add_field_page_published__add_.py
1
8978
# -*- coding: 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 model 'Developer' db.create_table('frontend_developer', ( ('id', self.gf('django.db.mod...
gpl-3.0
-6,404,008,281,551,156,000
63.597122
182
0.557585
false
maxammann/mpv
waftools/checks/generic.py
14
5938
import os import inflector from waflib.ConfigSet import ConfigSet from waflib import Utils __all__ = [ "check_pkg_config", "check_cc", "check_statement", "check_libs", "check_headers", "compose_checks", "check_true", "any_version", "load_fragment", "check_stub", "check_ctx_vars", "check_program"] any_vers...
gpl-2.0
-2,081,876,971,041,424,100
34.987879
81
0.584877
false
bitifirefly/edx-platform
lms/djangoapps/lti_provider/users.py
80
5166
""" LTI user management functionality. This module reconciles the two identities that an individual has in the campus LMS platform and on edX. """ import string import random import uuid from django.conf import settings from django.contrib.auth import authenticate, login from django.contrib.auth.models import User fr...
agpl-3.0
-1,966,937,312,016,751,000
33.211921
83
0.641115
false
zaycev/metaphor-search
sear/sear/lexicon.py
1
2198
# coding: utf-8 # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> import os import leveldb import logging class DictLexicon(object): TERM_FREQ_SEP = chr(255) LEX_DIR_NAME = "dict.lexicon.ldb" def __init__(self, root_dir): self.term_dict = dict() self.root_dir = root_dir self.lexico...
mit
4,819,303,144,299,796,000
32.318182
97
0.578253
false
bitify/raspi
i2c-sensors/bitify/python/sensors/hmc5883l.py
3
4436
import math import bitify.python.utils.i2cutils as I2CUtils class HMC5883L(object): ''' Simple HMC5883L implementation ''' TWO_PI = 2 * math.pi CONF_REG_A = 0 CONF_REG_B = 1 MODE_REG = 2 DATA_START_BLOCK = 3 DATA_XOUT_H = 0 DATA_XOUT_L = 1 DATA_ZOUT_H = 2 DATA_ZOUT_L =...
apache-2.0
-5,703,739,224,478,972,000
32.104478
135
0.545086
false
IllusionRom-deprecated/android_platform_external_chromium_org_tools_grit
grit/gather/regexp.py
62
3380
#!/usr/bin/env python # Copyright (c) 2012 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. '''A baseclass for simple gatherers based on regular expressions. ''' import re from grit.gather import skeleton_gatherer class...
bsd-2-clause
-6,607,082,720,511,164,000
38.764706
81
0.683136
false
eehello/shadowsocks
utils/autoban.py
1033
2156
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 clowwindy # # 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 u...
apache-2.0
-2,538,908,278,617,291,000
39.679245
79
0.641002
false
KibiCoin/kibicoin
qa/rpc-tests/forknotify.py
161
2179
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test -alertnotify # from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy import Aut...
mit
-8,167,411,205,714,721,000
33.046875
108
0.622304
false
YellowGlue/musicbox
netease_musicbox/menu.py
1
14582
#!/usr/bin/env python #encoding: UTF-8 ''' 网易云音乐 Menu ''' import curses import locale import sys import os import json import time import webbrowser from .api import NetEase from .player import Player from .ui import Ui home = os.path.expanduser("~") if os.path.isdir(home + '/netease-musicbox') is False: os.mkd...
mit
-7,385,977,275,981,159,000
31.551887
108
0.467686
false
domob1812/huntercore
test/functional/example_test.py
8
9213
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what the t...
mit
-7,580,782,604,361,735,000
40.5
133
0.668186
false
Distrotech/reportlab
docs/userguide/ch2a_fonts.py
14
19923
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch2a_fonts.py from tools.docco.rl_doc_utils import * from reportlab.lib.codecharts import SingleByteEncodingChart from reportlab.platypu...
bsd-3-clause
5,140,918,684,983,497,000
37.836257
122
0.755408
false
EdLogan18/logan-repository
plugin.video.joao/genesisresolvers.py
266
64370
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
gpl-2.0
7,519,681,922,206,251,000
31.120758
186
0.468588
false
aemal/westcat
api/rest/viewsets/article.py
2
8270
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
-2,322,961,912,563,127,300
42.072917
118
0.568682
false
Passtechsoft/TPEAlpGen
blender/release/scripts/addons_contrib/amaranth/animation/jump_frames.py
3
6967
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful,...
gpl-3.0
1,294,666,576,202,106,600
34.545918
114
0.62021
false
jmartinezchaine/OpenERP
openerp/addons/caldav/wizard/calendar_event_import.py
9
3434
# -*- 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 the GNU...
agpl-3.0
-8,588,536,488,170,764,000
35.489362
123
0.555102
false
johnseekins/carbon
lib/carbon/writer.py
1
6892
"""Copyright 2009 Chris Davis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
apache-2.0
9,193,307,843,264,692,000
34.709845
121
0.69733
false
kz/pybattle
main.py
1
4013
#!/usr/bin/env python from time import sleep import yaml from player import Player from attack import Attack def main(): # Load YAML config config_path = "./attack.yml" f = open(config_path, 'r') attack_config = yaml.load(f) f.close() # Load attacks attacks = {} for name, properties...
mit
4,114,154,287,669,645,000
31.104
118
0.568403
false
mlcommons/training
reinforcement/tensorflow/minigo/oneoffs/joseki/joseki_query.py
5
6293
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
4,437,443,248,438,137,300
31.947644
110
0.57556
false
akashsinghal/Speech-Memorization-App
Python_Backend/lib/urllib3/packages/ordered_dict.py
2040
8935
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_iden...
apache-2.0
-4,659,030,211,457,069,000
33.498069
87
0.548629
false
qevo/py_data_helper
tests/check.py
1
6291
"""Tests for the data_helper.check module""" import sys, unittest from BaseTest import BaseTestWrapper class IsBoolTestCase(BaseTestWrapper.BaseTest): """check.is_bool() test cases""" def test_string(self): """Test if string is False""" x = 'y' self.assertFalse(self._bt['func'](x)) ...
mit
4,683,683,702,517,989,000
21.548387
57
0.541567
false
Prachigarg1/Prachi
flags_test.py
2
2567
import flags import unittest import re import source class FlagTestCase(unittest.TestCase): def testParseParamDescription(self): desc = '{!bbb|ccc?} aaa This \nis the desc. ' self.assertEquals( ('aaa', '!bbb|ccc?', 'This \nis the desc.'), flags.ParseParameterDescription(desc)) desc = '{....
apache-2.0
388,307,795,130,136,450
23.447619
81
0.652902
false
maghoff/node-gyp
gyp/test/mac/gyptest-framework.py
102
1459
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are built correctly. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(fo...
mit
571,214,629,841,039,600
28.18
73
0.669637
false
denisenkom/django
tests/test_runner/test_discover_runner.py
3
2122
from contextlib import contextmanager import os import sys from unittest import expectedFailure from django.test import TestCase from django.test.runner import DiscoverRunner def expectedFailureIf(condition): """Marks a test as an expected failure if ``condition`` is met.""" if condition: return expe...
bsd-3-clause
-973,798,115,016,020,400
29.314286
82
0.627238
false
rdowinton/sphinx-php
sensio/sphinx/bestpractice.py
6
1386
from docutils.parsers.rst import Directive, directives from docutils import nodes from string import upper from sphinx.util.compat import make_admonition from sphinx import addnodes from sphinx.locale import _ class bestpractice(nodes.Admonition, nodes.Element): pass class BestPractice(Directive): has_content...
mit
-1,284,553,176,466,945,500
32
88
0.652237
false
lucidmotifs/auto-aoc
.venv/lib/python3.5/site-packages/pylint/test/functional/inconsistent_returns.py
1
4474
#pylint: disable=missing-docstring, no-else-return, invalid-name, unused-variable, superfluous-parens """Testing inconsistent returns""" import math import sys # These ones are consistent def explicit_returns(var): if var >= 0: return math.sqrt(var) else: return None def explicit_returns2(var)...
mit
-888,160,337,648,733,200
21.258706
101
0.559455
false
jonaqp/heroku
core/utils/uploads.py
1
2729
import os import sys from PIL import Image from django.conf import settings from django.core.files.storage import default_storage as storage from core.utils import resize_image prefix_profile = 'uploads/profiles/' prefix_container = 'uploads/container/' prefix_upload_company = 'upload/logo_company' def upload_loca...
mit
-5,594,751,136,028,800,000
35.878378
81
0.607915
false
saturday-shi/spark
examples/src/main/python/mllib/decision_tree_classification_example.py
106
2372
# # 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
1,565,230,942,365,933,800
41.357143
96
0.730185
false
darkryder/django
django/contrib/staticfiles/utils.py
335
1976
import fnmatch import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patt...
bsd-3-clause
6,922,282,656,528,441,000
31.933333
73
0.624494
false
manuelm/pyload
module/plugins/crypter/EmbeduploadCom.py
5
2449
# -*- coding: utf-8 -*- import re from module.plugins.internal.Crypter import Crypter from module.network.HTTPRequest import BadHeader class EmbeduploadCom(Crypter): __name__ = "EmbeduploadCom" __type__ = "crypter" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www...
gpl-3.0
2,124,118,137,409,080,000
37.873016
118
0.512862
false
xzYue/odoo
addons/account/wizard/account_automatic_reconcile.py
340
11604
# -*- 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 the GNU...
agpl-3.0
-2,222,958,591,154,174,500
44.328125
232
0.511548
false
YcheLanguageStudio/PythonStudy
crpytography/libs/extended_euclidean.py
1
1387
class ExtendedGcdEuclidean: def __init__(self, modulo_num, another_num): self.modulo_num = modulo_num self.r_list = list([modulo_num, another_num]) self.q_list = list([None, None]) self.x_list = list([1, 0]) self.y_list = list([0, 1]) self.iter_list = list([-1, 0]) ...
mit
9,200,197,732,626,949,000
43.741935
95
0.565249
false
0xTony/Web-Filters
merger.py
1
2808
# -*- coding: utf-8 -*- __version__ = "0.0.0.0.1b Pre Alpha Alpha" __author__ = "Tony Martin" # Creating a host file for blocking ads # Based on the idea of various adblocking sw running on TomatoUSB # The goal is to simplify the adblocking sw by having a central point # that merges and hosts the host file - this will...
mit
-8,612,598,517,019,273,000
32.831325
134
0.689815
false
sarakha63/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/oktoberfesttv.py
168
1500
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class OktoberfestTVIE(InfoExtractor): _VALID_URL = r'https?://www\.oktoberfest-tv\.de/[^/]+/[^/]+/video/(?P<id>[^/?#]+)' _TEST = { 'url': 'http://www.oktoberfest-tv.de/de/kameras/video/hb-zelt', 'info...
gpl-3.0
-97,605,924,190,646,800
30.893617
98
0.47565
false
priseborough/InertialNav
code/plot_states.py
6
2287
#!/bin/python import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cbook as cbook import numpy as np import math # State vector: # 0-3: quaternions (q0, q1, q2, q3) # 4-6: Velocity - m/sec (North, East, Down) # 7-9: Position - m (North, East, Down) # 10-12: Delta Angle bias - rad (X,Y,Z) #...
bsd-3-clause
-1,425,829,278,898,417,000
30.342466
92
0.597726
false
ThomasMiconi/nupic.research
projects/l2_pooling/multi_column_convergence.py
2
22360
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
2,722,481,987,579,481,600
33.992175
87
0.635063
false
meego-tablet-ux/meego-app-browser
third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_XML.py
33
24745
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # 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 # ...
bsd-3-clause
-8,889,399,866,411,980,000
24.589452
210
0.666114
false
googleads/google-ads-python
google/ads/googleads/v8/services/services/campaign_shared_set_service/transports/base.py
1
4228
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
7,193,265,001,721,796,000
36.087719
78
0.657285
false
airware/jsbsim
tests/TestScriptOutput.py
2
3376
# TestScriptInputOutput.py # # Check that <output> tags specified in a script are properly handled # # Copyright (c) 2015 Bertrand Coconnier # # 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; eit...
lgpl-2.1
8,415,505,190,192,167,000
38.255814
111
0.651363
false
michaelpacer/scikit-image
skimage/morphology/greyreconstruct.py
36
8409
""" This morphological reconstruction routine was adapted from CellProfiler, code licensed under both GPL and BSD licenses. Website: http://www.cellprofiler.org Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2011 Broad Institute All rights reserved. Original author: Lee Kamentsky """...
bsd-3-clause
4,509,917,172,256,688,000
41.256281
79
0.668926
false
batoulapps/ITL
new_method/tests/run_tests.py
2
2608
#!/usr/bin/env python # This script is used to test the new method implementation # It does that by comparing the computed prayer times for specific # locations on specific dates to the "official" times on these dates. # "official" turns out to be a tricky one for locations in places # that are in non-Muslim countries...
lgpl-2.1
-5,160,872,576,307,337,000
35.732394
69
0.540261
false
sabel83/metashell
3rd/templight/llvm/tools/clang/tools/clang-format/clang-format.py
12
4683
# This file is a minimal clang-format vim-integration. To install: # - Change 'binary' if clang-format is not on the path (see below). # - Add to your .vimrc: # # map <C-I> :pyf <path-to-this-file>/clang-format.py<cr> # imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr> # # The first line enables clang-fo...
gpl-3.0
8,537,568,093,229,174,000
35.874016
82
0.668375
false
astorije/ansible
plugins/inventory/spacewalk.py
137
4999
#!/bin/env python """ Spacewalk external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use thi...
gpl-3.0
3,168,855,842,185,207,000
30.840764
95
0.630126
false
ebertti/nospam
contator.py
1
1974
# coding=utf-8 import socket import json import logging import configuracao logger = logging.getLogger() class Contadores(object): def __init__(self): self.idiomas = {} self.com_link = 0 self.sem_link = 0 # Porta que o Servidor esta self.tcp = socket.socket(socket.AF_INET,...
mit
3,032,336,539,303,487,500
25.333333
113
0.558764
false
tlakshman26/cinder-new-branch
cinder/tests/unit/api/v1/test_volumes.py
2
52093
# Copyright 2013 Josh Durgin # 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 a...
apache-2.0
7,494,260,519,807,856,000
43.753436
79
0.488434
false
LxiaoGirl/wySpider
thirdparty/requests/auth.py
70
6179
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header, ...
gpl-2.0
1,135,727,871,659,408,300
30.365482
88
0.553164
false
LordDamionDevil/Lony
lib/youtube_dl/extractor/cinchcast.py
177
1678
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unified_strdate, xpath_text, ) class CinchcastIE(InfoExtractor): _VALID_URL = r'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)' _TEST = { # Actual test is run in generic,...
gpl-3.0
6,923,353,809,860,776,000
32.56
102
0.553635
false
adit-chandra/tensorflow
tensorflow/lite/testing/op_tests/pack.py
3
2994
# 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
-5,739,736,194,979,463,000
33.022727
80
0.601202
false
RPGOne/Skynet
numpy-master/numpy/distutils/command/build_clib.py
152
12217
""" Modified version of build_clib that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os from glob import glob import shutil from distutils.command.build_clib import build_clib as old_build_clib from distutils.errors import DistutilsSetupError, DistutilsError...
bsd-3-clause
-5,075,110,123,873,611,000
40.413559
93
0.521241
false
CospanDesign/nysa
test/unit/test_sdb_component.py
1
7028
#!/usr/bin/python import unittest import json import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) from nysa.cbuilder import sdb_component SDB_DATA = \ " Set the Vendor ID (Hexidecimal 64-bit Number)\n" \...
mit
-3,753,964,696,032,678,000
33.792079
89
0.463574
false
ghchinoy/tensorflow
tensorflow/python/client/session_partial_run_test.py
14
11707
# 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,431,365,718,109,640,700
36.643087
80
0.69531
false
dangayle/substitutions
templatetags/substitutions.py
1
1593
# encoding: utf-8 """ Make reading the news more fun. http://xkcd.com/1288/ """ from __future__ import unicode_literals import re from django import template from django.template.defaultfilters import stringfilter register = template.Library() substitutes = { "witnesses": "these dudes I know", "Witnesses": "Th...
mit
-898,617,890,547,357,300
26.912281
74
0.637335
false
kvar/ansible
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
14
16746
#!/usr/bin/python # # Copyright (c) 2017 Obezimnaka Boms, <t-ozboms@microsoft.com> # Copyright (c) 2017 Ansible Project # # 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 ...
gpl-3.0
-310,742,925,306,093,300
33.527835
156
0.577153
false
marcellodesales/svnedge-console
svn-server/lib/suds/mx/core.py
210
4839
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
agpl-3.0
5,540,407,443,533,272,000
29.626582
77
0.607977
false
bleib1dj/boto
tests/unit/cloudsearch2/test_connection.py
114
8278
#!/usr/bin env python from tests.unit import AWSMockServiceTestCase from boto.cloudsearch2.domain import Domain from boto.cloudsearch2.layer1 import CloudSearchConnection class TestCloudSearchCreateDomain(AWSMockServiceTestCase): connection_class = CloudSearchConnection def default_body(self): retu...
mit
6,332,307,036,528,732,000
32.112
78
0.550616
false
maartenq/ansible
lib/ansible/module_utils/scaleway.py
4
4064
import json import sys from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url def scaleway_argument_spec(): return dict( api_token=dict(required=True, fallback=(env_fallback, ['SCW_TOKEN', 'SCW_API_KEY', 'SCW_OAUTH_TOKEN', 'SCW_API_TOKEN']), ...
gpl-3.0
-4,726,857,918,169,798,000
31.253968
128
0.585876
false
maxogden/npm-www
node_modules/npm/node_modules/node-gyp/gyp/test/variants/gyptest-variants.py
240
1315
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify handling of build variants. TODO: Right now, only the SCons generator supports this, so the test case is SCons-specific. In pa...
bsd-2-clause
6,357,527,349,214,540,000
28.222222
72
0.647909
false
domalexxx/shop
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
gpl-2.0
4,054,546,691,044,612,000
31.37037
75
0.671053
false
ayuopy/Planbot
src/facebook.py
1
5626
#!/usr/bin/python3 """ Planbot's Facebook application. Handles requests and responses through the Facebook Graph API. Converts location data to postcode with Postcodes.io API. """ import os import logging import requests from bottle import Bottle, request, debug from engine import Engine # set environmental variabl...
gpl-3.0
-4,117,104,996,962,999,000
26.443902
77
0.578031
false
lino-framework/xl
lino_xl/lib/polls/utils.py
1
1281
# -*- coding: UTF-8 -*- # Copyright 2013-2018 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from django.utils.translation import gettext_lazy as _ from lino.mixins import RegistrableState from lino.api import dd class PollStates(dd.Workflow): item_class = Registrabl...
bsd-2-clause
-8,446,853,250,634,474,000
28.113636
78
0.706479
false
mozilla/olympia
src/olympia/lib/akismet/migrations/0001_initial.py
7
2842
# Generated by Django 2.2.5 on 2019-09-12 15:18 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import olympia.amo.models class Migration(migrations.Migration): initial = True dependencies = [ ('bandwagon', '000...
bsd-3-clause
-8,130,607,883,022,860,000
52.622642
161
0.606967
false
schatten/logan
app/wsgi.py
1
1416
""" WSGI config for logan 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_APPLICATION`` se...
mit
-528,082,937,398,807,400
43.25
79
0.792373
false
zeptonaut/catapult
tracing/third_party/tvcm/third_party/rcssmin/_setup/py3/setup.py
29
14135
# -*- coding: ascii -*- # # Copyright 2007 - 2013 # Andr\xe9 Malo or his licensors, as applicable # # 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/LICENS...
bsd-3-clause
1,202,910,630,948,493,300
32.654762
78
0.565971
false
YufeiZhang/Principles-of-Programming-Python-3
Labs/lab6/sum_of_digits.py
1
1045
''' $ python3 sum_of_digits.py Input a number that we will use as available digits: 12234 Input a number that represents the desired sum: 5 There are 4 solutions. $ python3 sum_of_digits.py Input a number that we will use as available digits: 11111 Input a number that represents the desired sum: 5 There is a unique so...
gpl-3.0
7,948,996,362,119,458,000
20.791667
67
0.673684
false
rven/odoo
addons/website_slides_survey/tests/test_course_certification_failure.py
4
6417
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.survey.tests.common import TestSurveyCommon class TestCourseCertificationFailureFlow(TestSurveyCommon): def test_course_certification_failure_flow(self): # Step 1: create a simple certifica...
agpl-3.0
8,601,802,664,071,913,000
51.598361
197
0.613371
false
ruuk/script.web.viewer2
lib/webviewer/bs4/builder/_lxml.py
12
6981
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from StringIO import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from b...
gpl-2.0
-4,067,148,846,928,605,000
34.617347
82
0.60593
false
tatyankaZSGX/addressbook
fixture/db.py
1
1791
__author__ = 'ZSGX' import mysql.connector from model.group import Group from model.contact import Contact import re class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection...
apache-2.0
-3,320,419,998,409,600,500
37.106383
115
0.574539
false
Baumelbi/IntroPython2016
students/darrylsw/session03/list_lab.py
3
1279
#!/usr/bin/env python3 # Author: Darryl Wong # Date: 10/15/2016 # Week 3 homework list = ["apples", "pears", "oranges", "peaches"] print (list) # prompt the user for a fruit to add to our list fruit = input ("Add a fruit: ") list.append(fruit) print (list) # prompt the user for a fruit by index number index = 0 ...
unlicense
7,365,117,910,364,637,000
21.051724
80
0.670055
false
veridiam/Madcow-Waaltz
build/lib/madcow/include/simplejson/tests/test_pass1.py
259
1903
from unittest import TestCase import simplejson as json # from http://json.org/JSON_checker/test/pass1.json JSON = r''' [ "JSON Test Pattern pass1", {"object with 1 member":["array with 1 element"]}, {}, [], -42, true, false, null, { "integer": 1234567890, "real": -...
gpl-3.0
9,009,519,242,368,080,000
24.039474
93
0.457698
false
liuqr/edx-xiaodun
lms/djangoapps/wechat/tests/test_video_handlers.py
12
12263
# -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" from mock import patch import os import tempfile import textwrap import json from datetime import timedelta from webob import Request from xmodule.contentstore.content import StaticContent from xmodule.modulestore import Location from xmodule.contentstore.dj...
agpl-3.0
-677,241,860,027,352,000
33.897436
110
0.598988
false
SerCeMan/intellij-community
plugins/hg4idea/testData/bin/hgext/rebase.py
90
32420
# rebase.py - rebasing feature for mercurial # # Copyright 2008 Stefano Tortarolo <stefano.tortarolo at gmail dot com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''command to move sets of revisions to a different ancestor T...
apache-2.0
-4,699,036,501,873,802,000
40.142132
80
0.552375
false
40223211/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/atexit.py
743
1049
"""allow programmer to define multiple exit functions to be executedupon normal program termination. Two public functions, register and unregister, are defined. """ class __loader__(object): pass def _clear(*args,**kw): """_clear() -> None Clear the list of previously registered exit functions.""" ...
gpl-3.0
2,721,660,913,204,398,000
27.351351
100
0.654909
false
pentestfail/TA-FireEye_TAP
bin/ta_fireeye_tap/solnlib/packages/requests/packages/urllib3/util/retry.py
198
9981
from __future__ import absolute_import import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. ...
mit
1,101,518,150,312,261,400
33.898601
84
0.617874
false
huggingface/transformers
src/transformers/models/roformer/tokenization_utils.py
1
2651
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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 r...
apache-2.0
5,025,555,611,865,873,000
37.985294
97
0.618257
false
hwroitzsch/BikersLifeSaver
lib/python3.5/site-packages/numpy/linalg/info.py
264
1198
"""\ Core Linear Algebra Tools ------------------------- Linear algebra basics: - norm Vector or matrix norm - inv Inverse of a square matrix - solve Solve a linear system of equations - det Determinant of a square matrix - lstsq Solve linear least-squares problem...
mit
-7,677,267,892,696,203,000
31.378378
76
0.661102
false
AndroidOpenDevelopment/android_external_skia
platform_tools/android/gyp_gen/generate_user_config.py
67
3795
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Function for generating the SkUserConfig file, customized for Android.""" import os import shutil AUTOGEN_WARNING = ( """ ///////////////////////////////////////...
bsd-3-clause
-1,352,042,909,924,890,400
35.84466
79
0.655336
false
Lx37/pyqtgraph
examples/ViewBox.py
6
2787
#!/usr/bin/python # -*- coding: utf-8 -*- """ ViewBox is the general-purpose graphical container that allows the user to zoom / pan to inspect any area of a 2D coordinate system. This unimaginative example demonstrates the constrution of a ViewBox-based plot area with axes, very similar to the way PlotItem is built....
mit
-6,368,924,297,909,431,000
26.87
103
0.668102
false
veo-labs/nose-progressive
noseprogressive/plugin.py
4
10478
from functools import partial from os import getcwd import pdb import sys from warnings import warn from nose.plugins import Plugin from noseprogressive.runner import ProgressiveRunner from noseprogressive.tracebacks import DEFAULT_EDITOR_SHORTCUT_TEMPLATE from noseprogressive.wrapping import cmdloop, set_trace, Stre...
mit
-8,494,470,440,132,122,000
49.375
84
0.535503
false
janslow/boto
tests/integration/gs/test_resumable_uploads.py
101
25789
# Copyright 2010 Google Inc. # # 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, modify, merge, publish, dis- # trib...
mit
-5,343,937,129,242,141,000
45.719203
91
0.627361
false
rdonnelly/ultimate-league-app
src/ultimate/leagues/migrations/0017_auto_20200204_2133.py
2
10389
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-02-04 21:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leagues', '0016_fieldnames_hidden'), ] operations = [ migrations.AlterFiel...
bsd-3-clause
8,433,307,000,049,339,000
43.208511
526
0.577726
false
EdgarSun/Django-Demo
django/conf/locale/it/formats.py
232
1838
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 TIME_FORMAT = 'H:i:s' # 14:30:59 DATETIME_FORMAT...
mit
7,247,870,190,826,278,000
38.913043
77
0.502179
false
minhphung171093/GreenERP
openerp/addons/l10n_be_invoice_bba/partner.py
47
1364
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. from openerp.osv import fields, osv import time from openerp.tools.translate import _ class res_partner(osv.osv): """ add field to indicat...
gpl-3.0
-3,835,911,141,750,957,600
36.888889
104
0.633431
false
pbrazdil/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py
1050
7214
#!/usr/bin/env python # # Copyright 2006, 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...
bsd-3-clause
3,180,018,500,504,755,700
32.091743
79
0.656224
false
teamtuga4/teamtuga4ever.repository
plugin.video.pancas/resources/lib/sources/directdl_tv.py
20
4246
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
6,510,204,066,427,162,000
31.914729
201
0.533914
false