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
renyi533/tensorflow
tensorflow/python/compiler/tensorrt/test/lru_cache_test.py
3
2916
# 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
5,306,845,209,180,850,000
36.384615
93
0.636145
false
saurabh3949/mxnet
python/mxnet/executor.py
16
20077
# 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
3,758,335,755,871,449,600
39.315261
100
0.562933
false
tunneln/CarnotKE
jyhton/out/production/CarnotKE/shell/jython.py
20
15050
#!/usr/bin/env python2.7 -E # -*- coding: utf-8 -*- # Launch script for Jython. It may be wrapped as an executable with # tools like PyInstaller, creating jython.exe, or run directly. The # installer will make this the default launcher under the name # bin/jython if CPython 2.7 is available with the above shebang # in...
apache-2.0
-4,220,705,912,842,211,000
32.896396
131
0.569767
false
Vixionar/django
django/contrib/gis/geos/prototypes/coordseq.py
485
3049
from ctypes import POINTER, c_double, c_int, c_uint from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import ( GEOSException, last_arg_byref, ) # ## Error-checking routines specific to coordinate sequences. ## def check_cs_op(result, fu...
bsd-3-clause
-9,104,634,533,182,220,000
31.43617
84
0.677599
false
OpenAcademy-OpenStack/project-docs
samples/helloworld/helloworld/openstack/common/eventlet_backdoor.py
1
4797
# Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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 a...
apache-2.0
-8,185,052,470,044,282,000
32.3125
79
0.646237
false
benthomasson/ansible
lib/ansible/modules/storage/zfs/zfs.py
9
7895
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren <johan.wiren.se@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_version': '1.0...
gpl-3.0
-722,712,597,891,066,500
28.240741
123
0.564535
false
foodszhang/kbengine
kbe/res/scripts/common/Lib/test/test_fileio.py
80
15460
# Adapted from test_file.py by Daniel Stutzbach import sys import os import io import errno import unittest from array import array from weakref import proxy from functools import wraps from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd, cpython_only from collections import UserList from _io ...
lgpl-3.0
1,946,373,839,762,001,000
31.208333
88
0.533053
false
jangorecki/h2o-3
h2o-py/tests/testdir_misc/pyunit_create_frame.py
6
2597
#!/usr/bin/env python # -*- encoding: utf-8 -*- from collections import defaultdict import random import sys sys.path.insert(1, "../../") import h2o from h2o.exceptions import H2OValueError from h2o.utils.compatibility import viewvalues from tests import pyunit_utils def create_frame_test(): """Test `h2o.create_fr...
apache-2.0
-8,315,266,614,942,137,000
38.348485
113
0.620716
false
HiroIshikawa/21playground
microblog/flask/lib/python3.5/site-packages/whoosh/lang/snowball/swedish.py
96
2760
from .bases import _ScandinavianStemmer from whoosh.compat import u class SwedishStemmer(_ScandinavianStemmer): """ The Swedish Snowball stemmer. :cvar __vowels: The Swedish vowels. :type __vowels: unicode :cvar __s_ending: Letters that may directly appear before a word final 's'. :type __s...
mit
4,207,938,987,816,281,600
33.5
79
0.493478
false
vfasky/BlogCatke
virtualenv.bundle/requests/packages/chardet2/langhungarianmodel.py
25
12784
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Ri...
apache-2.0
8,002,789,356,286,525,000
54.817778
70
0.545291
false
frainfreeze/studying
home/python/microblog/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py
74
2533
from io import BytesIO class CallbackFileWrapper(object): """ Small wrapper around a fp object which will tee everything read into a buffer, and when that file is closed it will execute a callback with the contents of that buffer. All attributes are proxied to the underlying file object. Thi...
mit
-1,115,229,914,908,962,700
30.6625
83
0.598105
false
peergradeio/mongoengine-objectidmapfield
setup.py
1
1158
# -*- coding: utf-8 -*- from setuptools import find_packages, setup DESCRIPTION = "A MongoEngine MapField that allows and requires ObjectIds as " \ "keys." try: LONG_DESCRIPTION = open('README.md').read() except: LONG_DESCRIPTION = DESCRIPTION setup( name='mongoengine-objectidmapfield', ...
bsd-3-clause
555,337,419,497,423,500
28.666667
79
0.642178
false
kularny/GeniSys.Kernel
toolchain/arm-cortex-a9/share/gcc-4.9.4/python/libstdcxx/v6/printers.py
56
41551
# Pretty-printers for libstdc++. # Copyright (C) 2008-2014 Free Software Foundation, 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 License, or # (at your option)...
gpl-2.0
8,035,663,499,812,533,000
34.943772
97
0.565089
false
bpupadhyaya/kafka
tests/kafkatest/services/verifiable_producer.py
34
3924
# 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
7,675,422,106,867,830,000
34.351351
116
0.616972
false
EduPepperPDTesting/pepper2013-testing
common/lib/xmodule/setup.py
3
3346
from setuptools import setup, find_packages setup( name="XModule", version="0.1", packages=find_packages(exclude=["tests"]), install_requires=[ 'distribute', 'docopt', 'capa', 'path.py', ], package_data={ 'xmodule': ['js/module/*'] }, # See http:...
agpl-3.0
-1,609,117,391,766,811,000
50.476923
97
0.660191
false
caseyrygt/osf.io
website/addons/figshare/views/hgrid.py
39
1145
# -*- coding: utf-8 -*- from website.util import rubeus from ..api import Figshare def figshare_hgrid_data(node_settings, auth, parent=None, **kwargs): node = node_settings.owner if node_settings.figshare_type == 'project': item = Figshare.from_settings(node_settings.user_settings).project(node_setti...
apache-2.0
6,130,103,934,191,163,000
41.407407
179
0.650655
false
wood-galaxy/FreeCAD
src/Mod/OpenSCAD/OpenSCAD2Dgeom.py
7
21048
#*************************************************************************** #* * #* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> * #* * #* This pr...
lgpl-2.1
1,780,251,240,204,381,700
40.679208
120
0.572216
false
leki75/ansible
lib/ansible/modules/network/netvisor/pn_show.py
59
5460
#!/usr/bin/python """ PN CLI show commands """ # # 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 ver...
gpl-3.0
-6,359,092,345,751,376,000
26.437186
80
0.64011
false
SaranyaKarthikeyan/boto
boto/services/service.py
170
6632
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
-7,173,976,357,469,458,000
40.192547
100
0.614897
false
brandond/ansible
lib/ansible/modules/cloud/google/gcp_dns_managed_zone_facts.py
10
5224
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
-3,211,920,465,348,341,000
29.729412
102
0.571401
false
huchoi/edx-platform
lms/djangoapps/django_comment_client/permissions.py
19
4384
""" Module for checking permissions with the comment_client backend """ import logging from types import NoneType from django.core import cache from opaque_keys.edx.keys import CourseKey CACHE = cache.get_cache('default') CACHE_LIFESPAN = 60 def cached_has_permission(user, permission, course_id=None): """ C...
agpl-3.0
2,435,934,427,816,488,400
36.152542
95
0.630703
false
jordanemedlock/psychtruths
temboo/core/Library/Zillow/GetZestimate.py
5
3437
# -*- coding: utf-8 -*- ############################################################################### # # GetZestimate # Retrieve estimate information for a specified property. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you ...
apache-2.0
-6,418,815,272,843,409,000
36.358696
137
0.670061
false
nagyistoce/edx-platform
lms/djangoapps/dashboard/support.py
50
4528
""" Views for support dashboard """ import logging from django.contrib.auth.models import User from django.views.generic.edit import FormView from django.views.generic.base import TemplateView from django.utils.translation import ugettext as _ from django.http import HttpResponseRedirect from django.contrib import mes...
agpl-3.0
-8,572,093,705,057,529,000
35.516129
136
0.628313
false
ruslanloman/nova
nova/network/ldapdns.py
68
13225
# Copyright 2012 Andrew Bogott for the Wikimedia 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 requi...
apache-2.0
-5,379,091,742,123,133,000
33.986772
79
0.552817
false
hronoses/vispy
vispy/geometry/tests/test_generation.py
4
1541
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from numpy.testing import assert_array_equal, assert_allclose from vispy.testing import run_tests_if_main from vispy.geometry import (create_box, create_cub...
bsd-3-clause
-5,935,570,024,741,872,000
31.787234
73
0.667099
false
stephane-caron/rss-2015
lib/pymanoid_sage/ik.py
1
7773
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid. # # pymanoid 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 # Foundatio...
gpl-3.0
2,097,180,534,718,961,400
33.242291
79
0.571723
false
Harmon758/Harmonbot
Discord/utilities/logging.py
1
5836
import asyncio import datetime import logging import logging.handlers import sys from aiohttp.web_log import AccessLogger from utilities.database import create_database_connection sys.path.insert(0, "..") from units.files import create_folder sys.path.pop(0) class ConsoleLogger(object): '''Console Logger''' ...
mit
-8,542,494,399,230,757,000
37.394737
163
0.728067
false
procangroup/edx-platform
openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py
12
4490
"""Management command for backpopulating missing program credentials.""" import logging from collections import namedtuple from django.contrib.sites.models import Site from django.core.management import BaseCommand from django.db.models import Q from opaque_keys.edx.keys import CourseKey from lms.djangoapps.certifica...
agpl-3.0
-5,412,439,450,699,112,000
38.043478
120
0.630735
false
raildo/nova
nova/tests/unit/cells/test_cells_state_manager.py
17
11725
# Copyright (c) 2013 Rackspace Hosting # 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 req...
apache-2.0
5,151,996,302,641,863,000
35.871069
79
0.612111
false
azaghal/ansible
test/units/module_utils/basic/test_run_command.py
5
10520
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division) __metaclass__ = type import errno from itertools import product from io import Byt...
gpl-3.0
-7,839,747,515,692,990,000
37.189091
102
0.595696
false
ageron/tensorflow
tensorflow/python/training/adagrad_test.py
22
15078
# 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,348,217,308,968,889,000
41.59322
80
0.620573
false
beeftornado/sentry
tests/sentry/integrations/msteams/test_client.py
1
2323
from __future__ import absolute_import import responses from six.moves.urllib.parse import urlencode from sentry.models import Integration from sentry.integrations.msteams.client import MsTeamsClient from sentry.testutils import TestCase from sentry.utils.compat.mock import patch class MsTeamsClientTest(TestCase):...
bsd-3-clause
-6,664,871,209,970,689,000
34.19697
84
0.583728
false
Opentrons/labware
api/tests/opentrons/hardware_control/test_calibration_functions.py
2
2931
import numpy as np from opentrons import config from opentrons.calibration_storage import file_operators as io from opentrons.hardware_control import robot_calibration from opentrons.util.helpers import utc_now from opentrons.types import Mount def test_migrate_affine_xy_to_attitude(): affine = [[1.0, 2.0, 3.0, ...
apache-2.0
4,904,870,576,069,631,000
31.932584
74
0.576936
false
beeftornado/sentry
src/sentry/migrations/0039_delete_incidentsuspectcommit.py
1
1478
# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-03 22:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): # This flag is used to mark that a migration shouldn't be automatically run in # production. We set this to True for operat...
bsd-3-clause
-5,717,206,945,254,266,000
43.787879
88
0.705683
false
firebitsbr/pwn_plug_sources
src/metagoofil/extractors/metadataPDF.py
9
1554
#!/usr/bin/env python # # metadataPDF.py - dump pdf metadata # # Copy of Yusuke's dumppdf to add dumpmeta import sys, re from pdfminer.psparser import PSKeyword, PSLiteral from pdfminer.pdfparser import PDFDocument, PDFParser from pdfminer.pdftypes import PDFStream, PDFObjRef, resolve1, stream_value # dumpmeta class...
gpl-3.0
-3,903,394,562,403,697,000
22.19403
74
0.699485
false
huguesmayolle/famille
famille/tests/test_templates.py
1
2004
from django.test import TestCase from famille import models from famille.templatetags import helpers, users __all__ = ["TemplateTagsTestCase", ] class TemplateTagsTestCase(TestCase): def test_get_class_name(self): obj = models.Prestataire() self.assertEqual(helpers.get_class_name(obj), "Presta...
apache-2.0
-170,730,694,322,244,320
39.08
95
0.649202
false
chrisndodge/edx-platform
lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py
17
8904
""" Provide tests for git_add_course management command. """ import logging import os import shutil import StringIO import subprocess import unittest from uuid import uuid4 from nose.plugins.attrib import attr from django.conf import settings from django.core.management import call_command from django.core.management....
agpl-3.0
-7,504,121,841,382,259,000
37.214592
113
0.628482
false
monkeysecurity/npyscreen
npyscreen/wgannotatetextbox.py
15
3116
from . import wgwidget from .wgtextbox import Textfield class AnnotateTextboxBase(wgwidget.Widget): """A base class intented for customization. Note in particular the annotationColor and annotationNoColor methods which you should override.""" ANNOTATE_WIDTH = 5 def __init__(self, screen, value =...
bsd-2-clause
1,274,025,273,780,559,000
31.123711
142
0.603979
false
a-doumoulakis/tensorflow
tensorflow/python/debug/cli/debugger_cli_common.py
68
38908
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
1,412,724,572,730,546,400
30.970419
80
0.647142
false
himikof/aiohttp_debugtoolbar
aiohttp_debugtoolbar/tbtools/tbtools.py
2
14461
# -*- coding: utf-8 -*- """ werkzeug.debug.tbtools ~~~~~~~~~~~~~~~~~~~~~~ This module provides various traceback related utility functions. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import re import os import sys import inspect import traceback imp...
apache-2.0
-8,156,052,282,664,294,000
32.946009
79
0.543807
false
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/core/management/commands/showmigrations.py
440
4901
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections from django.db.migrations.loader import MigrationLoader class Command(BaseCommand): help = "Shows all available migrations for the ...
artistic-2.0
335,658,683,072,804,000
41.25
103
0.552336
false
jms/FlyNi-API
docs/conf.py
1
7787
# -*- coding: utf-8 -*- # # FlyNi-API documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have...
bsd-3-clause
-4,546,382,804,996,326,000
30.783673
80
0.695133
false
HashAppsLabs/TiCairo
plugins/ti.alloy/plugin.py
229
4668
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
-5,307,467,920,733,413,000
37.578512
143
0.503428
false
slashback/handsome-echo-backend
tests/feed.py
1
5157
from tornado import testing from mainWebserver import make_app import json from echo.feeds.feed import Feed HTTP_SUCCESS_CODE = 200 HTTP_NOT_FOUND_CODE = 404 class CustomFeedTest(testing.AsyncHTTPTestCase): def get_app(self): return make_app() def test_crud_feed(self): payload = { ...
mit
-5,273,016,904,307,574,000
31.031056
90
0.357766
false
jgressmann/sc2links
addon.py
1
11878
__author__ = 'jgressmann' from datetime import date import pickle import sys import traceback import urllib import urlparse #import urlresolver import xbmc import xbmcaddon import xbmcgui import xbmcplugin import zlib import resources.lib.sc2links as sc2links addon = xbmcaddon.Addon() #__addonname__ = addon.getAddon...
mit
7,328,084,158,772,807,000
28.844221
133
0.533592
false
xenigmax/seqan
util/py_lib/seqan/dox/validation.py
9
6106
#!/usr/bin/env python2 """Some validation for proc_doc.Proc*""" __author__ = 'Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>' class ProcDocValidator(object): """Validate proc_doc.Proc* objects. Implements the visitor pattern. """ def __init__(self, msg_printer): self.msg_printer = msg_prin...
bsd-3-clause
-4,841,564,712,670,785,000
42.928058
109
0.605634
false
egabancho/invenio-ext
invenio_ext/jasmine/bundles.py
6
1520
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio 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...
gpl-2.0
-2,102,266,313,499,735,800
30.666667
74
0.690789
false
OpenFacetracker/facetracker-core
lib/youtube-dl/youtube_dl/compat.py
5
13628
from __future__ import unicode_literals import collections import getpass import optparse import os import re import shutil import socket import subprocess import sys try: import urllib.request as compat_urllib_request except ImportError: # Python 2 import urllib2 as compat_urllib_request try: import u...
gpl-2.0
4,272,129,880,380,800,500
30.841121
89
0.583358
false
alexeyum/scikit-learn
sklearn/cluster/tests/test_spectral.py
72
7950
"""Testing for Spectral Clustering methods""" from sklearn.externals.six.moves import cPickle dumps, loads = cPickle.dumps, cPickle.loads import numpy as np from scipy import sparse from sklearn.utils import check_random_state from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_a...
bsd-3-clause
1,077,297,503,254,230,700
39.561224
77
0.566289
false
bgris/ODL_bgris
lib/python3.5/idlelib/idle_test/test_formatparagraph.py
2
14331
# Test the functions and main class method of FormatParagraph.py import unittest from idlelib import FormatParagraph as fp from idlelib.EditorWindow import EditorWindow from tkinter import Tk, Text from test.support import requires class Is_Get_Test(unittest.TestCase): """Test the is_ and get_ functions""" te...
gpl-3.0
-5,799,055,631,308,157,000
37.114362
89
0.586281
false
IONISx/edx-platform
common/djangoapps/config_models/tests.py
11
13830
# -*- coding: utf-8 -*- """ Tests of ConfigurationModel """ import ddt from django.contrib.auth.models import User from django.db import models from django.test import TestCase from rest_framework.test import APIRequestFactory from freezegun import freeze_time from mock import patch, Mock from config_models.models i...
agpl-3.0
664,332,066,088,413,300
35.555556
109
0.627515
false
zhangxq5012/sky_engine
mojo/tools/check_mojom_golden_files.py
10
3768
#!/usr/bin/env python # Copyright 2014 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. import argparse import os.path import sys from filecmp import dircmp from shutil import rmtree from tempfile import mkdtemp from mopy.p...
bsd-3-clause
6,979,634,573,486,326,000
35.582524
80
0.658705
false
cchurch/ansible
test/units/cli/test_galaxy.py
2
40697
# -*- coding: utf-8 -*- # (c) 2016, Adrian Likins <alikins@redhat.com> # # 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 you...
gpl-3.0
8,954,696,320,933,825,000
42.134677
151
0.646007
false
spatialdev/onadata
onadata/apps/main/migrations/0012_auto__add_unique_metadata_xform_data_type_data_value.py
8
9948
# -*- 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 unique constraint on 'MetaData', fields ['xform', 'data_type', 'data_value'] db.create_unique(u'mai...
bsd-2-clause
4,046,060,749,849,488,000
76.124031
187
0.549558
false
ysekky/chainer
chainer/functions/theano/theano_function.py
4
2370
import numpy import six from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check class TheanoFunction(function.Function): def __init__(self, forward_func, backward_func): utils.experimental('chainer.functions.TheanoFunction') self.forwa...
mit
4,326,598,460,476,542,000
32.857143
76
0.609705
false
pkilambi/ceilometer
ceilometer/compute/pollsters/instance.py
4
1618
# # Copyright 2012 eNovance <licensing@enovance.com> # Copyright 2012 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
203,963,811,165,729,660
32.020408
75
0.647095
false
sebastienhupin/qxrad
qooxdoo/tool/pylib/generator/code/DependencyLoader.py
1
19794
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2006-2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
lgpl-3.0
3,951,746,594,640,905,700
36.136961
165
0.551985
false
BrianHicks/probe
probe/cli.py
1
3949
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from argparse import ArgumentParser from datetime import datetime from dateutil.rrule import rrulestr import os import sys from textwrap import dedent from .config import ConfigHandler from .errors import AnswerError CONFIG_LOCATION =...
bsd-3-clause
8,366,005,832,298,343,000
30.34127
92
0.517853
false
Arcanfel/whatToPlay
openid/fetchers.py
10
13415
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'] import urll...
apache-2.0
-4,020,898,558,403,733,500
31.48184
79
0.599255
false
ChristopherHogan/pip
pip/_vendor/requests/packages/chardet/sbcharsetprober.py
2927
4793
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
9,070,017,009,240,898,000
38.941667
77
0.572084
false
alfonsodev/ansible-modules-extras
system/puppet.py
51
6731
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
gpl-3.0
-8,227,017,551,631,217,000
30.453271
114
0.603625
false
runeksvendsen/btcdice
privaddr.py
1
1333
import hashlib import Crypto.Hash.SHA256 as sha256 import binascii from bitcoin import key as ecdsa from bitcoin import base58 from baseconv import dice_to_10 def dsha256(s): return sha256.new(sha256.new(s).digest()).digest() def rhash(s): h1 = hashlib.new('ripemd160') h1.update(hashlib.sha256(s).digest()) retu...
mit
-8,179,988,349,648,275,000
25.137255
101
0.697674
false
fuzzysteve/yamlloader
tableloader/tableFunctions/dogmaEffects.py
1
3091
# -*- coding: utf-8 -*- import sys import os reload(sys) sys.setdefaultencoding("utf-8") from sqlalchemy import Table from yaml import load,dump try: from yaml import CSafeLoader as SafeLoader print "Using CSafeLoader" except ImportError: from yaml import SafeLoader print "Using Python SafeLoader" distribution={...
mit
2,186,808,295,423,389,400
48.063492
108
0.55516
false
maxteufel/weechat
doc/docgen.py
1
32544
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2018 Sébastien Helleu <flashcode@flashtux.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 3 of the License, or # (at your opt...
gpl-3.0
-5,020,251,484,471,602,000
40.868726
79
0.5154
false
ernado/infosessions
infosessions/migrations/0001_initial.py
1
1741
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
bsd-3-clause
1,398,158,541,766,823,200
46.054054
198
0.604825
false
vrv/tensorflow
tensorflow/python/kernel_tests/random_shuffle_queue_test.py
65
50664
# 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
-5,645,579,507,354,673,000
34.183333
80
0.618447
false
jasonmccampbell/numpy-refactor-sprint
numpy/f2py/tests/test_return_character.py
59
3768
from numpy.testing import * from numpy import array from numpy.compat import asbytes import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tname in ['t0','t1','s0','s1']: assert t(23)==asbytes('2') r = t('ab');asse...
bsd-3-clause
-5,348,875,457,063,438,000
25.914286
75
0.529724
false
wscullin/spack
var/spack/repos/builtin/packages/libvorbis/package.py
3
1890
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
5,841,940,770,964,750,000
41.954545
81
0.678307
false
mhotwagner/abackend
abackend-env/lib/python3.5/site-packages/psycopg2/_json.py
48
7836
"""Implementation of the JSON adaptation objects This module exists to avoid a circular import problem: pyscopg2.extras depends on psycopg2.extension, so I can't create the default JSON typecasters in extensions importing register_json from extras. """ # psycopg/_json.py - Implementation of the JSON adaptation object...
mit
-8,098,765,904,058,427,000
34.618182
85
0.669857
false
indrajitr/ansible-modules-extras
notification/sns.py
44
5736
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Michael J. Schultz <mjschultz@gmail.com> # # 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 ...
gpl-3.0
-3,405,284,317,878,516,000
28.720207
119
0.655509
false
egoldchain/egoldchain-master
test/functional/invalidtxrequest.py
50
2621
#!/usr/bin/env python3 # Copyright (c) 2015-2016 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 node responses to invalid transactions. In this test we connect to one node over p2p, and test tx...
mit
-67,961,174,106,589,220
34.90411
98
0.637161
false
simbs/edx-platform
openedx/core/djangoapps/credit/exceptions.py
60
2281
"""Exceptions raised by the credit API. """ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from rest_framework import status from rest_framework.exceptions import APIException # TODO: Cleanup this mess! ECOM-2908 class CreditApiBadRequest(Exception): """ Could...
agpl-3.0
6,088,758,249,793,569,000
25.523256
111
0.672512
false
Koulio/rietveld
third_party/oauth2client/file.py
253
3160
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-6,782,036,111,645,071,000
24.483871
74
0.681329
false
jiachenning/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
384
12556
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
-3,191,770,914,136,839,000
46.203008
163
0.424498
false
Belxjander/Kirito
Python-3.5.0-main/Lib/json/encoder.py
8
15978
"""Implementation of JSONEncoder """ import re try: from _json import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from _json import encode_basestring as c_encode_basestring except ImportError: c_encode_basestring = None try: from _j...
gpl-3.0
-7,191,188,819,785,547,000
35.313636
78
0.530166
false
xcgd/account_voucher_sepa
account_sepa_purpose.py
1
1468
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 XCG Consulting # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
agpl-3.0
1,606,522,172,143,396,400
33.139535
79
0.580381
false
minhphung171093/GreenERP
openerp/addons/base/tests/test_translate.py
10
6065
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import unittest from openerp.tools.translate import quote, unquote, xml_translate class TranslationToolsTestCase(unittest.TestCase): def test_quote_unquote(self): def test_string(str): quoted =...
gpl-3.0
-6,628,838,453,216,648,000
41.118056
118
0.492828
false
maartenq/ansible
lib/ansible/plugins/action/ironware.py
21
4380
# # (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 d...
gpl-3.0
-5,133,765,949,706,579,000
43.242424
134
0.650913
false
saifrahmed/bokeh
examples/plotting/server/markers.py
42
1618
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from numpy.random import random from bokeh.plotting import figure, show, output_server def mscatter(p, x, y, typestr): p.scatter(x, y, marker=typestr, line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, si...
bsd-3-clause
7,379,364,639,379,749,000
30.115385
80
0.61063
false
rainslytherin/ansible
plugins/inventory/collins.py
22
18049
#!/usr/bin/env python """ Collins 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. Collins ...
gpl-3.0
-5,634,885,389,437,136,000
38.931416
109
0.603136
false
f-prettyland/angr
tests/test_director.py
5
2232
import os import sys import logging import nose.tools import angr from angr.sim_type import SimTypePointer, SimTypeChar test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests')) def test_execute_address_brancher(): p = angr.Project(os.path.join(test_locati...
bsd-2-clause
8,210,407,864,506,435,000
30
114
0.636201
false
chengdh/openerp-ktv
openerp/addons/base_module_doc_rst/wizard/tech_rst_guide.py
9
17321
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
7,374,333,632,974,426,000
35.312369
140
0.467294
false
coinkeeper/2015-04-19_21-21_nautiluscoin
contrib/testgen/base58.py
4
2833
''' Nautiluscoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return...
mit
3,326,346,799,003,614,700
26.240385
97
0.609601
false
immenz/pyload
module/plugins/hoster/FilepostCom.py
2
4945
# -*- coding: utf-8 -*- import re from time import time from module.common.json_layer import json_loads from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __t...
gpl-3.0
-6,718,733,223,809,296,000
36.180451
141
0.53913
false
guschmue/tensorflow
tensorflow/contrib/slim/nets.py
191
1609
# 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 applicable ...
apache-2.0
5,986,116,131,256,417,000
33.978261
80
0.737725
false
mpvoss/RickAndMortyWeatherTweets
env/lib/python3.5/site-packages/pyowm/webapi25/stationparser.py
1
2291
""" Module containing a concrete implementation for JSONParser abstract class, returning a Station instance """ import json import time from pyowm.webapi25 import station from pyowm.webapi25 import weather from pyowm.abstractions import jsonparser from pyowm.exceptions import parse_response_error, api_response_error ...
mit
8,117,851,406,153,228,000
34.796875
80
0.578787
false
sda2b/youtube-dl
youtube_dl/extractor/hotnewhiphop.py
129
2306
from __future__ import unicode_literals import base64 from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, HEADRequest, ) class HotNewHipHopIE(InfoExtractor): _VALID_URL = r'http://www\.hotnewhiphop\.com/.*\....
unlicense
-1,177,489,427,954,418,200
32.42029
89
0.574154
false
RealTimeWeb/wikisite
MoinMoin/formatter/text_html.py
1
51473
# -*- coding: iso-8859-1 -*- """ MoinMoin - "text/html+css" Formatter @copyright: 2000-2004 by Juergen Hermann <jh@web.de> @license: GNU GPL, see COPYING for details. """ import os.path, re from MoinMoin import log logging = log.getLogger(__name__) from MoinMoin.formatter import FormatterBase from MoinMo...
apache-2.0
-8,183,867,365,169,581,000
36.736804
175
0.543664
false
petewarden/tensorflow
tensorflow/python/debug/lib/check_numerics_callback_test.py
9
17920
# 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
-9,223,174,905,262,487,000
40.290323
80
0.68817
false
NetApp/manila
manila/share/drivers/huawei/v3/rpcapi.py
1
1665
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # 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....
apache-2.0
-3,122,194,868,106,368,500
34.195652
78
0.632432
false
dkubiak789/OpenUpgrade
addons/website_certification/certification.py
385
1789
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-691,759,806,872,673,700
40.604651
96
0.634433
false
blakfeld/ansible
lib/ansible/galaxy/api.py
82
5143
#!/usr/bin/env python ######################################################################## # # (C) 2013, James Cammarata <jcammarata@ansible.com> # # 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 ...
gpl-3.0
7,057,374,818,797,188,000
35.475177
113
0.555318
false
efortuna/AndroidSDKClone
ndk/prebuilt/linux-x86_64/lib/python2.7/distutils/tests/test_build_ext.py
11
20233
import sys import os from StringIO import StringIO import textwrap from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support from distutils.errors import (DistutilsSetupError, CompileError, ...
apache-2.0
7,437,294,059,277,044,000
37.760536
107
0.586616
false
svn2github/exiv2_
website/bin/gen.py
2
1779
#! /usr/bin/env python # ---------------------------------------------------------------------- # Settings vardir = "./var" date_format = "%d-%b-%Y" # ---------------------------------------------------------------------- # functions def usage(): print("""Usage: gen.py file.in [...] Substitute placeholders in in...
gpl-2.0
-7,980,625,394,926,564,000
28.163934
98
0.546936
false
a-pertsev/flask-security
tests/test_configuration.py
21
1379
# -*- coding: utf-8 -*- """ test_configuration ~~~~~~~~~~~~~~~~~~ Basic configuration tests """ import base64 import pytest from utils import authenticate, logout @pytest.mark.settings( logout_url='/custom_logout', login_url='/custom_login', post_login_view='/post_login', post_logout_v...
mit
-5,057,542,476,949,330,000
29.644444
79
0.683104
false
381426068/MissionPlanner
Lib/gzip.py
50
18735
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.""" # based on Andrew Kuchling's minigzip.py distributed with the zlib module import struct, sys, time, os import zlib import io import __builtin__ __all__ =...
gpl-3.0
-204,039,254,462,188,300
34.807466
79
0.532426
false
shawger/s-kape
lib/requests/packages/urllib3/util/url.py
713
5879
from __future__ import absolute_import from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value f...
gpl-3.0
-4,483,291,899,685,894,700
26.092166
86
0.538187
false
TheMadCoder1/Spambot
commands/data.py
2
1974
from classes import * from helper_functions import * def method(servers_and_threads, arguments): print # Line break # Argument Check if len(arguments) != 0: email = arguments[0] if not helpers_for_commands.email_is_valid(email): print "You did not enter a valid email." ...
mit
2,386,370,806,191,771,600
42.866667
187
0.616515
false
rogersprates/word2vec-financial-sentiment
pmi/pmi.py
1
3966
#BRUNO IOCHINS GRISCI import json import sys import math import os def create_vocabulary(news): vocabulary = [] for ide in news: vocabulary = vocabulary + news[ide]["text"] return set(vocabulary) def count_labels(news): n_positive_news = 0.0 n_negative_news = 0.0 for ide in news: ...
mit
5,397,394,700,741,115,000
33.486957
177
0.647252
false
sameeptandon/sail-car-log
mapping/pipeline/ldr_to_h5.py
1
2958
import os import argparse import numpy as np import h5py from Q50_config import LoadParameters from GPSReader import GPSReader from GPSTransforms import IMUTransforms from LidarTransforms import loadLDR from pipeline_config import LANE_FILTER, PARAMS_TO_LOAD, OPT_POS_FILE from LidarIntegrator import transform_points_in...
bsd-2-clause
3,903,683,829,038,686,700
32.235955
99
0.592292
false