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
kkdd/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/lib2to3/fixes/fix_intern.py
49
1368
# Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from .. import pytree from .. import fixer_base from ..fixer_util import Name, Attr, touch_import class FixIntern(fixer_base.BaseFix): PATTERN = """ power< '...
apache-2.0
2,993,793,895,475,065,300
30.090909
75
0.483187
false
EvanK/ansible
lib/ansible/modules/network/f5/bigip_data_group.py
14
45084
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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', ...
gpl-3.0
-7,366,429,522,826,226,000
33.626728
110
0.585307
false
oczkers/fut
docs/core.py
2
8519
# -*- coding: utf-8 -*- """ futmarket.core ~~~~~~~~~~~~~~~~~~~~~ This module implements the futmarket's basic methods. """ # Imports ## Relies heavily on fut package. import fut import pandas as pd from time import sleep # Login ## Login to EA Sports. May require two-factor authentication. You will be prompted for ...
gpl-3.0
455,109,698,996,059,700
34.945148
176
0.589271
false
bzbarsky/servo
tests/wpt/css-tests/tools/py/testing/path/test_cacheutil.py
163
2949
import py from py._path import cacheutil class BasicCacheAPITest: cache = None def test_getorbuild(self): val = self.cache.getorbuild(-42, lambda: 42) assert val == 42 val = self.cache.getorbuild(-42, lambda: 23) assert val == 42 def test_cache_get_key_error(self): ...
mpl-2.0
4,740,287,036,384,073,000
34.107143
74
0.613428
false
drawks/ansible
test/units/modules/network/vyos/test_vyos_facts.py
15
3761
# (c) 2016 Red Hat Inc. # # 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 dis...
gpl-3.0
3,445,401,890,997,636,000
36.989899
102
0.637862
false
czcorpus/kontext
lib/kwiclib.py
1
24384
# Copyright (c) 2003-2009 Pavel Rychly # Copyright (c) 2014 Institute of the Czech National Corpus # # 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; version 2 # dated June, 1991. # # This prog...
gpl-2.0
2,145,698,633,209,266,400
36.170732
119
0.549008
false
rsignell-usgs/notebook
pyugrid/pyugrid/util.py
1
2278
""" Miscellaneous util functions. """ from __future__ import (absolute_import, division, print_function) import numpy as np epsilon = 1.e-5 def point_in_tri(face_points, point, return_weights=False): """ Calculates whether point is internal/external to element by comparing summed area of sub triangle...
mit
5,404,936,347,580,752,000
26.119048
78
0.540825
false
ahmedbodi/vertcoin
test/functional/mempool_package_onemore.py
17
4981
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 descendant package tracking carve-out allowing one final transaction in an otherwise-full packa...
mit
-1,925,856,028,782,957,800
53.141304
202
0.648063
false
csparkresearch/eyes-online
app/static/scripts/ExpEYES17/pendulumVelocity.py
1
5409
import sys, time, utils, math if utils.PQT5 == True: from PyQt5.QtCore import Qt, QTimer from PyQt5.QtWidgets import QApplication,QWidget, QLabel, QHBoxLayout, QVBoxLayout,\ QCheckBox, QPushButton from PyQt5.QtGui import QPalette, QColor else: from PyQt4.QtCore import Qt, QTimer from PyQt4.QtGui import QPalette...
gpl-3.0
711,521,681,519,149,700
24.880383
90
0.650397
false
edl00k/omim
3party/protobuf/python/google/protobuf/internal/unknown_fields_test.py
73
9102
#! /usr/bin/python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the f...
apache-2.0
-4,142,966,584,289,389,000
38.402597
80
0.741815
false
wwj718/edx-platform
common/djangoapps/student/management/tests/test_transfer_students.py
122
6240
""" Tests the transfer student management command """ from django.conf import settings from mock import patch, call from opaque_keys.edx import locator import unittest import ddt from shoppingcart.models import Order, CertificateItem # pylint: disable=import-error from course_modes.models import CourseMode from stude...
agpl-3.0
-4,952,302,169,131,893,000
42.943662
111
0.61891
false
dbiesecke/dbiesecke.github.io
repo/service.vpn.manager/infopopup.py
1
1232
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Zomboided # # 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...
mit
-2,769,039,372,682,068,500
34.294118
74
0.693182
false
guettli/django
django/conf/locale/el/formats.py
58
1452
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd/m/Y' TIME_FORMAT = 'P' DATETIME...
bsd-3-clause
8,928,201,224,537,417,000
37.210526
82
0.542011
false
manqala/erpnext
erpnext/setup/doctype/currency_exchange/test_currency_exchange.py
12
3584
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, unittest from erpnext.setup.utils import get_exchange_rate test_records = frappe.get_test_records('Currency Exchange') def save_new_rec...
gpl-3.0
-6,250,988,586,554,336,000
33.805825
100
0.699777
false
Glasgow2015/team-10
env/lib/python2.7/site-packages/django/conf/urls/i18n.py
310
1196
import warnings from django.conf import settings from django.conf.urls import patterns, url from django.core.urlresolvers import LocaleRegexURLResolver from django.utils import six from django.utils.deprecation import RemovedInDjango110Warning from django.views.i18n import set_language def i18n_patterns(prefix, *arg...
apache-2.0
-5,869,982,946,983,725,000
33.171429
81
0.688127
false
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/oauth2_provider/views/generic.py
6
1035
from django.views.generic import View from ..settings import oauth2_settings from .mixins import ProtectedResourceMixin, ScopedResourceMixin, ReadWriteScopedResourceMixin class ProtectedResourceView(ProtectedResourceMixin, View): """ Generic view protecting resources by providing OAuth2 authentication out of...
agpl-3.0
7,256,175,612,912,026,000
34.689655
94
0.77971
false
msebire/intellij-community
python/helpers/pydev/pydev_ipython/inputhookwx.py
50
6386
# encoding: utf-8 """ Enable wxPython to be used interacive by setting PyOS_InputHook. Authors: Robin Dunn, Brian Granger, Ondrej Certik """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the ...
apache-2.0
-1,237,517,693,051,391,500
37.46988
81
0.566708
false
eleonrk/SickRage
lib/pbr/hooks/metadata.py
101
1076
# Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
gpl-3.0
6,072,472,590,036,415,000
32.625
75
0.708178
false
shreesundara/netsnmp
build/lib/pysmi/reader/base.py
6
1338
import os class AbstractReader(object): maxMibSize = 10000000 # MIBs can't be that large fuzzyMatching = True # try different file names while searching for MIB originalMatching = uppercaseMatching = lowcaseMatching = True exts = ['', os.path.extsep + 'txt', os.path.ext...
bsd-2-clause
-9,143,376,048,198,300,000
32.45
80
0.556054
false
LS80/xbmc
addons/service.xbmc.versioncheck/lib/versions.py
25
7009
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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 versio...
gpl-2.0
-5,070,538,996,170,729,000
54.19685
120
0.634755
false
aymanim/rosdep
test/test_rosdep_gbpdistro_support.py
7
8987
# Copyright (c) 2012, Willow Garage, 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 cond...
bsd-3-clause
-5,673,420,948,843,056,000
38.073913
86
0.594414
false
yohanko88/gem5-DC
src/mem/slicc/ast/DeclListAST.py
27
2210
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
-766,704,944,912,901,900
43.2
77
0.723982
false
av8ramit/tensorflow
tensorflow/contrib/gan/python/namedtuples.py
17
6624
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
568,630,970,770,542,500
33.863158
80
0.695803
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/elan/onHoldScripts/-00error__.py
2
1043
from ImageScripter import * from elan import * Configurator.media.Click() Configurator.security.Click() Configurator.system.Click() Configurator.media.Click() Configurator.security.Click() Configurator.system.Click() Configurator.media.Click() Configurator.security.Click() Configurator.system.Click() Configurator.med...
gpl-3.0
6,125,580,519,213,347,000
24.463415
29
0.818792
false
pasiegel/SickGear
lib/hachoir_parser/audio/itunesdb.py
90
17106
""" iPod iTunesDB parser. Documentation: - http://ipodlinux.org/ITunesDB Author: Romain HERAULT Creation date: 19 august 2006 """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, UInt8, UInt16, UInt32, UInt64, TimestampMac32, String, Float32, NullBytes, Enum) from lib.hacho...
gpl-3.0
-1,060,907,783,943,542,000
38.505774
115
0.5812
false
AlexHatesUnicorns/FDTD_Solver
world_lenses_v3/helpers/aspherical_lens.py
8
1352
# -*- coding: utf-8 -*- import math from .dimensions import px2mm, mm2px def aspheric_curve_front(r, lam, lam_px): r = px2mm(r, lam, lam_px) R = 19.371 a1 = 0.027322 a2 = 5.5360 * 10 ** -5 a3 = 1.5599 * 10 ** -7 a4 = 1.0454 * 10 ** -9 a5 = 2.7424 * 10 ** -12 a6 = 0 a = [a1, a2, a3,...
mit
563,309,117,225,707,970
25.346939
111
0.488768
false
michaelBenin/django-jinja
django_jinja/contrib/pipeline/templatetags/_pipeline.py
1
2411
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.staticfiles.storage import staticfiles_storage from django.template.loader import render_to_string from pipeline.conf import settings from pipeline.utils import guess_type from pipeline.packager import Packager, Pack...
bsd-3-clause
5,445,979,639,349,959,000
25.494505
69
0.648279
false
pchmieli/h2o-3
py2/h2o_glm.py
20
29862
import h2o_cmd, h2o_util import h2o2 as h2o import re, random, math from h2o_test import check_sandbox_for_errors, dump_json, verboseprint import h2o_nodes from tabulate import tabulate # recursive walk an object check that it has valid numbers only (no "" or nan or inf def check_obj_has_good_numbers(obj, hierarchy=""...
apache-2.0
7,726,211,370,700,443,000
40.132231
184
0.614225
false
JamesGuthrie/libcloud
libcloud/loadbalancer/drivers/gogrid.py
58
8425
# 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 use ...
apache-2.0
4,726,578,441,737,065,000
34.251046
79
0.571039
false
mbernasocchi/QGIS
python/plugins/processing/modeler/DeleteModelAction.py
30
2782
# -*- coding: utf-8 -*- """ *************************************************************************** DeleteModelAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
-5,873,282,579,961,367,000
39.289855
122
0.529137
false
dinnozap/hebel
hebel/layers/softmax_layer.py
2
11562
# Copyright (C) 2013 Hannes Bretschneider # 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 distribut...
gpl-2.0
-3,084,026,505,359,606,000
34.25
102
0.591766
false
eharney/nova
nova/tests/compute/test_flavors.py
8
1426
# Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
245,386,614,077,413,120
36.526316
78
0.685133
false
TEAM-Gummy/platform_external_chromium_org
build/util/lib/common/util.py
208
3815
# Copyright 2013 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. """Generic utilities for all python scripts.""" import atexit import httplib import os import signal import stat import subprocess import sys import tempfil...
bsd-3-clause
-8,212,992,261,321,262,000
24.264901
78
0.683355
false
MagicStack/vmbench
servers/asyncio_http_server.py
1
5665
import argparse import asyncio import aiohttp from aiohttp import web import sys import httptools import uvloop from socket import * PRINT = 0 _RESP_CACHE = {} class HttpRequest: __slots__ = ('_protocol', '_url', '_headers', '_version') def __init__(self, protocol, url, headers, version): self._p...
mit
3,142,284,773,683,772,000
27.325
76
0.568049
false
angad/libjingle-mac
scons-2.2.0/build/lib/SCons/Tool/hpc++.py
14
2734
"""SCons.Tool.hpc++ Tool-specific initialization for c++ on HP/UX. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The...
bsd-3-clause
-5,603,204,560,784,529,000
31.547619
107
0.681053
false
CoherentLabs/depot_tools
third_party/boto/fps/response.py
69
6255
from decimal import Decimal def ResponseFactory(action): class FPSResponse(Response): _action = action _Result = globals().get(action + 'Result', ResponseElement) # due to nodes receiving their closing tags def endElement(self, name, value, connection): if name != acti...
bsd-3-clause
2,309,474,423,847,031,300
34.742857
78
0.641407
false
F5Networks/f5-ansible-modules
ansible_collections/f5networks/f5_modules/plugins/modules/bigip_monitor_oracle.py
1
27413
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2019, F5 Networks Inc. # 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 DOCUMENTATION = r''' --- module: bigip_monitor_oracle sh...
mit
7,964,361,659,970,862,000
29.905299
116
0.601868
false
elemoine/papyrus
papyrus/__init__.py
1
3162
def add_papyrus_handler(self, route_name_prefix, base_url, handler): """ Add a Papyrus handler, i.e. a handler defining the MapFish HTTP interface. Example:: import papyrus config.include(papyrus) config.add_papyrus_handler( 'spots', '/spots', 'mypackage.handlers.SpotH...
bsd-2-clause
1,912,113,057,973,195,000
38.037037
75
0.627767
false
MiLk/ansible
lib/ansible/modules/cloud/amazon/sqs_queue.py
50
10558
#!/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 distributed...
gpl-3.0
-2,612,583,109,756,020,700
30.993939
136
0.647471
false
jpush/jbox
Server/venv/lib/python3.5/site-packages/pip/_vendor/distlib/resources.py
132
10620
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import bisect import io import logging import os import pkgutil import shutil import sys import ...
mit
-1,796,486,469,421,200,000
29.342857
79
0.577495
false
mwarkentin/django-watchman
tests/test_management.py
1
1542
# -*- coding: utf-8 -*- """ test_django-watchman ------------ Tests for `django-watchman` management commands. """ from __future__ import unicode_literals from io import StringIO import unittest from django.core.management import call_command class TestWatchman(unittest.TestCase): def test_successful_manage...
bsd-3-clause
174,386,829,474,589,120
32.521739
92
0.670558
false
xwolf12/django
tests/test_runner/test_debug_sql.py
210
4048
import sys import unittest from django.db import connection from django.test import TestCase from django.test.runner import DiscoverRunner from django.utils import six from django.utils.encoding import force_text from .models import Person @unittest.skipUnless(connection.vendor == 'sqlite', 'Only run on sqlite so w...
bsd-3-clause
-8,335,743,892,665,429,000
36.481481
101
0.536561
false
lmprice/ansible
lib/ansible/plugins/lookup/mongodb.py
34
8869
# (c) 2016, Marcos Diez <marcos@unitron.com.br> # https://github.com/marcosdiez/ # # 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...
gpl-3.0
8,854,336,431,943,007,000
36.264706
158
0.599729
false
missionpinball/mpf
mpf/platforms/system11.py
1
20512
"""A generic system11 driver overlay. This is based on the Snux platform to generically support all kinds of System11 platforms. """ from typing import Any, Optional, Set, Tuple, Dict from mpf.core.machine import MachineController from mpf.core.platform import DriverPlatform, DriverConfig, SwitchSettings, DriverSetti...
mit
-2,229,849,460,983,550,200
39.377953
120
0.580246
false
usig/normalizador-amba
tests/NormalizadorDireccionesAMBAConCabaTestCase.py
1
4080
# coding: UTF-8 import unittest from usig_normalizador_amba.NormalizadorDireccionesAMBA import NormalizadorDireccionesAMBA from usig_normalizador_amba.Direccion import Direccion from usig_normalizador_amba.settings import CALLE_ALTURA from tests.test_commons import cargarCallejeroEstatico class NormalizadorDirecci...
mit
6,778,326,884,661,302,000
45.701149
107
0.664287
false
klmitch/nutjob
nutjob.py
1
4628
# Copyright 2013 Rackspace # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
8,251,436,478,678,004,000
36.934426
78
0.649309
false
nvoron23/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/lib-tk/tkSimpleDialog.py
54
7590
# # An Introduction to Tkinter # tkSimpleDialog.py # # Copyright (c) 1997 by Fredrik Lundh # # fredrik@pythonware.com # http://www.pythonware.com # # -------------------------------------------------------------------- # dialog base class '''Dialog boxes This module handles dialog boxes. It contains the following pu...
apache-2.0
7,699,728,279,836,819,000
22.793103
77
0.553096
false
bmazin/SDR
DataReadout/ReadoutControls/lib/PulseServer.py
1
4912
#!/usr/bin/env python """ A simple server that ckecks IP throughput """ import socket, struct import sys import time import random import string import os from subprocess import Popen,PIPE,call def mysendall(client,data): size = len(data) totalsent = 0 while totalsent < 32768: sent = client.send(data[totalsent:...
gpl-2.0
-8,589,043,071,844,171,000
25.408602
86
0.547435
false
robmcdan/python-goose
goose/outputformatters.py
13
4704
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
-6,416,225,024,961,395,000
33.335766
100
0.609694
false
mohanprasath/Course-Work
data_analysis/uh_data_analysis_with_python/hy-data-analysis-with-python-spring-2020/part05-e08_bicycle_timeseries/test/test_bicycle_timeseries.py
1
2279
#!/usr/bin/env python3 import unittest from unittest.mock import patch, MagicMock import pandas as pd import numpy as np from tmc import points from tmc.utils import load, get_out, patch_helper module_name="src.bicycle_timeseries" bicycle_timeseries = load(module_name, "bicycle_timeseries") main = load(module_name...
gpl-3.0
-6,859,506,475,669,621,000
35.015873
90
0.613486
false
angelblue05/plugin.video.emby
libraries/emby/core/http.py
3
8440
# -*- coding: utf-8 -*- ################################################################################################# import json import logging import time import requests from exceptions import HTTPException ################################################################################################# LOG...
gpl-3.0
1,511,320,186,846,737,700
31.461538
127
0.501303
false
Rudloff/youtube-dl
youtube_dl/postprocessor/xattrpp.py
19
7229
from __future__ import unicode_literals import os import subprocess import sys import errno from .common import PostProcessor from ..compat import compat_os_name from ..utils import ( check_executable, hyphenate_date, version_tuple, PostProcessingError, encodeArgument, encodeFilename, ) clas...
unlicense
5,522,849,645,700,170,000
39.841808
107
0.509614
false
adit-chandra/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/matching_files_dataset_serialization_test.py
15
2563
# Copyright 2018 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
6,223,340,028,763,717,000
35.614286
106
0.665236
false
jayceyxc/hue
desktop/core/ext-py/ply-3.9/example/closurecalc/calc.py
10
3063
# ----------------------------------------------------------------------------- # calc.py # # A calculator parser that makes use of closures. The function make_calculator() # returns a function that accepts an input string and returns a result. All # lexing rules, parsing rules, and internal state are held inside the ...
apache-2.0
3,084,302,750,565,605,400
22.204545
80
0.462945
false
afandria/mojo
third_party/cython/src/Cython/Compiler/TreeFragment.py
96
8733
# # TreeFragments - parsing of strings to trees # import re from StringIO import StringIO from Scanning import PyrexScanner, StringSourceDescriptor from Symtab import ModuleScope import PyrexTypes from Visitor import VisitorTransform from Nodes import Node, StatListNode from ExprNodes import NameNode import Parsing im...
bsd-3-clause
6,436,535,510,636,551,000
35.086777
115
0.624871
false
tbadgu/Barcamp-Bangalore-Android-App
gcm_flask/werkzeug/contrib/testtools.py
92
2449
# -*- coding: utf-8 -*- """ werkzeug.contrib.testtools ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements extended wrappers for simplified testing. `TestResponse` A response wrapper which adds various cached attributes for simplified assertions on various content types. :copyright:...
apache-2.0
-4,172,262,051,405,832,700
33.492958
76
0.617395
false
tigerking/pyvision
src/pyvision/gui/__init__.py
8
1646
# PyVision License # # Copyright (c) 2006-2008 David S. Bolme # 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, thi...
bsd-3-clause
-8,251,346,627,914,276,000
42.342105
72
0.777643
false
40223226/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/jqueryui/__init__.py
603
3671
"""Wrapper around the jQuery UI library Exposes a single object, jq, to manipulate the widgets designed in the library This object supports : - subscription : js[elt_id] returns an object matching the element with the specified id - a method get(**kw). The only keyword currently supported is "selector". The metho...
gpl-3.0
6,367,918,242,273,976,000
26.402985
78
0.643149
false
mozilla/verbatim
local_apps/pootle_app/management/commands/update_from_templates.py
5
1083
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Zuza Software Foundation # # This file is part of Pootle. # # 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 t...
gpl-2.0
-6,736,691,644,506,394,000
35.1
73
0.751616
false
cylc/cylc
tests/unit/test_job_file.py
1
19323
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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,...
gpl-3.0
2,679,342,790,390,677,000
36.520388
79
0.543601
false
damorim/compilers-cin
antigo/ap3/antlr4-python3-runtime-4.7.2/src/antlr4/Recognizer.py
5
5808
# # Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # from antlr4.RuleContext import RuleContext from antlr4.Token import Token from antlr4.error.ErrorListener import ProxyErrorLis...
mit
1,663,750,978,620,780,500
35.3
113
0.647555
false
Ansahmadiba/bazel
tools/build_defs/docker/rewrite_json.py
14
8084
# 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 ag...
apache-2.0
3,477,207,162,320,955,000
28.611722
80
0.665017
false
lunafeng/django
django/core/files/storage.py
281
13339
import errno import os import warnings from datetime import datetime from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from django.core.files import File, locks from django.core.files.move import file_move_safe from django.utils._os import abspathu, safe_join from django.utils...
bsd-3-clause
8,289,120,993,024,238,000
38.81791
102
0.598021
false
ennoborg/gramps
gramps/gen/utils/resourcepath.py
6
3959
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2013 John Ralls <jralls@ceridwen.us> # # 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, ...
gpl-2.0
7,239,009,186,766,906,000
38.989899
80
0.612528
false
ssarangi/numba
numba/tests/test_cffi.py
3
3140
from __future__ import print_function, division, absolute_import from numba import unittest_support as unittest from numba import jit, cffi_support, types from numba.compiler import compile_isolated, Flags from numba.tests.support import TestCase from numba.tests.cffi_usecases import * import numpy as np enable_pyob...
bsd-2-clause
-8,965,898,331,595,321,000
33.505495
68
0.623567
false
ray-project/ray
ci/travis/build-docker-images.py
1
17503
import argparse import datetime import json import functools import glob import os import re import shutil import subprocess import sys from typing import List, Tuple import docker print = functools.partial(print, file=sys.stderr, flush=True) DOCKER_USERNAME = "raytravisbot" DOCKER_CLIENT = None PYTHON_WHL_VERSION = ...
apache-2.0
4,034,371,445,842,954,000
36.64086
124
0.558076
false
wolfier/incubator-airflow
airflow/migrations/versions/13eb55f81627_for_compatibility.py
9
1162
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
8,452,886,904,901,928,000
28.05
62
0.753012
false
Qalthos/ansible
lib/ansible/plugins/terminal/voss.py
79
3455
# # (c) 2018 Extreme Networks Inc. # # 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. # # Ans...
gpl-3.0
6,832,118,976,249,627,000
37.820225
141
0.627207
false
elky/django
django/templatetags/l10n.py
40
1689
from django.template import Library, Node, TemplateSyntaxError from django.utils import formats register = Library() @register.filter(is_safe=False) def localize(value): """ Force a value to be rendered as a localized value, regardless of the value of ``settings.USE_L10N``. """ return str(formats...
bsd-3-clause
3,629,756,106,715,301,000
25.809524
82
0.619301
false
ahmetabdi/SickRage
lib/unidecode/x08e.py
252
4659
data = ( 'Chu ', # 0x00 'Jing ', # 0x01 'Nie ', # 0x02 'Xiao ', # 0x03 'Bo ', # 0x04 'Chi ', # 0x05 'Qun ', # 0x06 'Mou ', # 0x07 'Shu ', # 0x08 'Lang ', # 0x09 'Yong ', # 0x0a 'Jiao ', # 0x0b 'Chou ', # 0x0c 'Qiao ', # 0x0d '[?] ', # 0x0e 'Ta ', # 0x0f 'Jian ', # 0x10...
gpl-3.0
-6,290,573,592,538,424,000
17.05814
22
0.392788
false
UNIZAR-30226-2017-05/WebVideojuegos
web/proySoftware/controladores/perfilUsuarioVisible.py
1
1218
#!/usr/bin/env python # -*- coding: utf-8 -*- from proySoftware import app from flask import request from flask import render_template from flask import flash from flask_wtf import FlaskForm from wtforms import Form, BooleanField, StringField, PasswordField, validators from wtforms.validators import * from ..model...
mit
-4,214,152,089,581,882,000
30.25641
92
0.734811
false
RydrDojo/Ridr
pylotVenv/lib/python2.7/site-packages/sqlalchemy/util/compat.py
70
6809
# util/compat.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handle Python version/platform incompatibilities.""" import sys try: import ...
mit
-6,991,772,500,031,978,000
24.98855
77
0.595829
false
CSD-Public/stonix
src/tests/rules/unit_tests/zzzTestRuleDisableMediaAutomaticActions.py
1
7734
#!/usr/bin/env python3 ############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contrac...
gpl-2.0
-4,089,003,214,950,913,000
47.641509
113
0.590897
false
spaceone/univention-management-console
univention/umc/util/module.py
1
1305
# -*- coding: utf-8 -*- # # Univention Management Console # # Copyright 2014 Univention GmbH # # http://www.univention.de/ # # All rights reserved. # # The source code of this program is made available # under the terms of the GNU Affero General Public License version 3 # (GNU AGPL V3) as published by the Free Software...
agpl-3.0
-7,929,724,757,540,175,000
38.545455
70
0.762452
false
blueboxgroup/neutron
neutron/tests/unit/vmware/test_nsx_sync.py
9
33059
# Copyright 2013 VMware, 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 a...
apache-2.0
-8,073,108,596,337,880,000
45.043175
79
0.58323
false
Nyker510/scikit-learn
examples/neighbors/plot_classification.py
287
1790
""" ================================ Nearest Neighbors Classification ================================ Sample usage of Nearest Neighbors classification. It will plot the decision boundaries for each class. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColorm...
bsd-3-clause
-7,288,248,496,595,062,000
31.545455
74
0.606704
false
kkamkou/gitmostwanted.com
migration/versions/420f9b8b9e_attitude_constraint_corrections.py
1
1048
"""attitude constraint corrections Revision ID: 420f9b8b9e Revises: 162f93d4393 Create Date: 2015-06-24 16:52:02.606637 """ # revision identifiers, used by Alembic. revision = '420f9b8b9e' down_revision = '162f93d4393' branch_labels = None depends_on = None from alembic import op def upgrade(): op.drop_constr...
mit
5,627,134,195,796,560,000
31.75
89
0.658397
false
repotvsupertuga/tvsupertuga.repository
script.module.resolveurl/lib/resolveurl/plugins/unitplay.py
2
2095
""" resolveurl XBMC Addon Copyright (C) 2018 jsergio 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
6,672,023,279,163,835,000
38.528302
93
0.61957
false
chengdh/openerp-ktv
openerp/addons/l10n_ve/__openerp__.py
8
2013
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 N...
agpl-3.0
-6,020,784,174,927,964,000
41.787234
98
0.597713
false
TimoRoth/oggm
oggm/tests/conftest.py
1
9836
"""Pytest fixtures to be used in other test modules""" import os import shutil import logging import getpass from functools import wraps import numpy as np import pytest import shapely.geometry as shpg import matplotlib.pyplot as plt from oggm.shop import cru, histalp, ecmwf from oggm import cfg, tasks from oggm.cor...
bsd-3-clause
-6,844,716,580,379,379,000
38.031746
83
0.620272
false
mrquim/mrquimrepo
plugin.video.poseidon/resources/lib/modules/log_utils.py
30
3921
""" tknorris shared module Copyright (C) 2016 tknorris 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
5,828,760,951,305,133,000
31.94958
163
0.609538
false
jakar/odoo-bank-statement-reconcile
__unported__/account_statement_ofx_import/parser/ofx_parser.py
15
3538
# -*- coding: utf-8 -*- ############################################################################## # # Author: Pedro Manuel Baeza Romero # Copyright 2013 Servicios Tecnológicos Avanzados # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
agpl-3.0
8,824,398,060,922,578,000
36.62766
78
0.592875
false
yared-bezum/tweepy
tweepy/parsers.py
51
2754
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from __future__ import print_function from tweepy.models import ModelFactory from tweepy.utils import import_simplejson from tweepy.error import TweepError class Parser(object): def parse(self, method, payload): """ Pars...
mit
2,042,200,873,186,493,200
26
74
0.587872
false
food52/thumbor
vows/healthcheck_vows.py
14
1668
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from pyvows import Vows, expect from tornado_pyvows.context import T...
mit
-606,284,105,821,867,900
28.263158
65
0.633693
false
toontownfunserver/Panda3D-1.9.0
direct/distributed/AstronClientRepository.py
4
10641
"""AstronClientRepository module: contains the AstronClientRepository class""" from direct.directnotify import DirectNotifyGlobal from ClientRepositoryBase import ClientRepositoryBase from MsgTypes import * from direct.distributed.PyDatagram import PyDatagram from pandac.PandaModules import STUint16, STUint32 class A...
bsd-3-clause
-127,804,528,039,695,140
38.411111
130
0.604642
false
vrenaville/OCB
addons/website_mail/controllers/email_designer.py
20
3078
# -*- coding: utf-8 -*- from urllib import urlencode from openerp.addons.web import http from openerp.addons.web.http import request from openerp.tools.mail import html_sanitize class WebsiteEmailDesigner(http.Controller): @http.route('/website_mail/email_designer', type='http', auth="user", website=True) ...
agpl-3.0
240,037,119,196,396,480
40.594595
108
0.595517
false
google-research/episodic-curiosity
episodic_curiosity/r_network.py
1
3675
# coding=utf-8 # 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 ...
apache-2.0
-2,871,956,773,729,406,000
34.679612
80
0.691429
false
castroflavio/ryu
ryu/services/protocols/bgp/utils/validation.py
9
6388
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
-8,630,280,585,799,026,000
26.299145
78
0.579054
false
waytai/django
tests/middleware/tests.py
132
34932
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import random import re from io import BytesIO from unittest import skipIf from django.conf import settings from django.core import mail from django.core.exceptions import PermissionDenied from django.http import ( FileResponse, HttpReque...
bsd-3-clause
8,254,641,981,938,094,000
43.440204
114
0.642628
false
dancingdan/tensorflow
tensorflow/python/profiler/option_builder.py
29
16611
# 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
329,113,630,998,670,340
34.722581
128
0.618927
false
BT-astauder/odoo
addons/l10n_ec/__openerp__.py
260
1695
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Cristian Salamea Gnuthink Software Labs Cia. Ltda # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
agpl-3.0
2,681,017,905,418,630,700
35.06383
78
0.562832
false
mezz64/home-assistant
homeassistant/components/homeassistant/triggers/homeassistant.py
9
1725
"""Offer Home Assistant core automation rules.""" import voluptuous as vol from homeassistant.const import CONF_EVENT, CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP from homeassistant.core import HassJob, callback # mypy: allow-untyped-defs EVENT_START = "start" EVENT_SHUTDOWN = "shutdown" TRIGGER_SCHEMA = vol.Schema( ...
apache-2.0
-7,892,468,138,757,016,000
28.741379
83
0.555942
false
wavefrontHQ/python-client
test/test_policy_rule_write_model.py
1
1334
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
395,037,011,224,262,700
32.35
409
0.725637
false
mikewiebe-ansible/ansible
lib/ansible/modules/storage/hpe3par/ss_3par_cpg.py
35
9416
#!/usr/bin/python # Copyright: (c) 2018, Hewlett Packard Enterprise Development LP # 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', ...
gpl-3.0
3,163,212,127,147,609,000
30.491639
113
0.605459
false
wujuguang/scrapy
scrapy/middleware.py
3
2729
from collections import defaultdict, deque import logging import pprint from scrapy.exceptions import NotConfigured from scrapy.utils.misc import create_instance, load_object from scrapy.utils.defer import process_parallel, process_chain, process_chain_both logger = logging.getLogger(__name__) class MiddlewareManag...
bsd-3-clause
-885,767,672,575,631,600
35.386667
82
0.613045
false
ZhangXinNan/tensorflow
tensorflow/contrib/autograph/converters/break_statements.py
3
4731
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,905,422,219,759,382,000
31.40411
80
0.64722
false
mitya57/django
tests/test_client/views.py
26
10894
from urllib.parse import urlencode from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form, ValidationError from django.forms.formsets import BaseFormSet, form...
bsd-3-clause
-7,025,867,364,037,684,000
31.714715
107
0.632366
false
Groupe24/CodeInSpace
tournoi/40/back.py
1
1080
#!/usr/bin/python # -*- coding: utf-8 -*- """ back.py is a part of colored. Copyright 2014-2017 Dimitris Zlatanidis <d.zlatanidis@gmail.com> All rights reserved. Colored is very simple Python library for color and formatting in terminal. https://github.com/dslackw/colored colored is free software: you can redistri...
mit
8,164,106,695,441,986,000
28.189189
75
0.725926
false
obestwalter/obestwalter.github.io
lebut/livereloader.py
1
1176
import logging import subprocess import time from lebut.config import PATH log = logging.getLogger(__name__) class LiveReloader: cmd = "livereload" def start_with_keep_alive(self, **_): self.start() while self._is_alive: log.info("livereload is active") time.sleep(10...
mit
-506,219,041,210,250,500
25.133333
80
0.555272
false
kachick/rubinius
vm/test/cxxtest/cxxtestgen.py
74
21164
#!/usr/bin/python '''Usage: %s [OPTIONS] <input file(s)> Generate test source file for CxxTest. -v, --version Write CxxTest version -o, --output=NAME Write output to file NAME --runner=CLASS Create a main() function that runs CxxTest::CLASS --gui=CLASS Like --runner, with GUI c...
bsd-3-clause
4,304,196,667,405,889,000
34.689713
120
0.585192
false