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
fritsvanveen/QGIS
python/ext-libs/pygments/formatters/html.py
21
31759
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import os import sys import os.path from ...
gpl-2.0
8,454,842,329,069,202,000
36.319624
86
0.537328
false
sohail-aspose/Aspose_Slides_Cloud
SDKs/Aspose.Slides_Cloud_SDK_for_Python/asposeslidescloud/models/Image.py
4
1028
#!/usr/bin/env python class Image(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value is attribute type. ...
mit
-5,682,097,692,297,491,000
32.16129
128
0.567121
false
seanwisdom/program-with-objects_2
new_section_python_code.py
4
1119
def new_section(concept_title, concept_description): html_a = ''' <div class="concept"> <div class="concept-title"> <h3>''' + concept_title + '</h3>' html_b= ''' </div> <div class="concept-description"> <p> '''...
mit
-675,076,489,734,905,500
29.138889
69
0.521895
false
mluo613/osf.io
scripts/prereg/approve_draft_registrations.py
28
1260
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from framework.celery_tasks.handlers import celery_teardown_request from website.app import init_app from website.project.model import DraftRegistration, Sanction logger =...
apache-2.0
1,072,098,318,091,961,100
31.307692
122
0.670635
false
RussellRiesJr/CoupleComeStatWithMe
ccswm/settings.py
1
3350
""" Django settings for ccswm project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # ...
mit
952,352,824,490,474,600
24.18797
91
0.683284
false
tillrohrmann/flink
flink-python/pyflink/ml/api/ml_environment.py
9
3953
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
apache-2.0
6,706,501,875,009,040,000
41.967391
99
0.676195
false
JCROM-Android/jcrom_external_chromium_org
chrome/test/functional/ispy/ispy_core/tests/rendering_test_manager/mock_cloud_bucket.py
23
1390
# 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. """Subclass of CloudBucket used for testing.""" from tests.rendering_test_manager import cloud_bucket class MockCloudBucket(cloud_bucket.CloudBucket): "...
bsd-3-clause
-1,851,989,278,401,364,500
24.272727
72
0.68777
false
prismskylabs/pycounters
src/pycounters/__init__.py
1
3969
""" PyCounters is a light weight library to monitor performance in production system. It is meant to be used in scenarios where using a profile is unrealistic due to the overhead it requires. Use PyCounters to get high level and concise overview of what's going on in your production code. See #### (read the docs) for...
apache-2.0
-7,862,069,303,668,941,000
34.756757
125
0.712522
false
bitifirefly/edx-platform
common/djangoapps/microsite_configuration/templatetags/microsite.py
107
2058
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration import microsite from django.templatetags.static import static register = template.Library() def page_title_b...
agpl-3.0
4,578,535,191,920,435,000
31.15625
92
0.691934
false
moxon6/chemlab
tests/test_core.py
4
12153
"""Test core types like Molecule and Atom.""" from chemlab.core import Molecule, Atom from chemlab.core import System, subsystem_from_molecules, subsystem_from_atoms from chemlab.core import merge_systems from chemlab.core import crystal, random_lattice_box import numpy as np from nose.tools import eq_, assert_equals f...
gpl-3.0
-861,781,437,958,220,800
30.241645
92
0.544804
false
shtouff/django
django/db/utils.py
12
10612
import inspect import os import pkgutil import warnings from importlib import import_module from threading import local from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils._os import upath from django.utils.deprecation import RemovedIn...
bsd-3-clause
-9,220,071,211,107,226,000
31.854489
92
0.572936
false
Vixionar/django
tests/gis_tests/test_spatialrefsys.py
319
4891
import unittest from django.contrib.gis.gdal import HAS_GDAL from django.db import connection from django.test import skipUnlessDBFeature from django.utils import six from .utils import SpatialRefSys, oracle, postgis, spatialite test_srs = ({ 'srid': 4326, 'auth_name': ('EPSG', True), 'auth_srid': 4326, ...
bsd-3-clause
252,413,862,174,037,730
39.090164
108
0.598651
false
selahssea/ggrc-core
src/ggrc_basic_permissions/migrations/versions/20130627032526_3bf5430a8c6f_add_roles_and_permis.py
7
1751
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Add roles and permissions tables Revision ID: 3bf5430a8c6f Revises: None Create Date: 2013-06-27 03:25:26.571232 """ # revision identifiers, used by Alembic. revision = '3bf5430a8c6f' down_revision = N...
apache-2.0
6,503,071,427,555,925,000
30.836364
78
0.657339
false
shubhdev/edxOnBaadal
lms/djangoapps/commerce/tests/__init__.py
55
3551
# -*- coding: utf-8 -*- """ Commerce app tests package. """ import datetime import json from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from freezegun import freeze_time import httpretty import jwt import mock from ecommerce_api_client import auth from...
agpl-3.0
3,852,776,131,936,167,400
34.49
100
0.641871
false
delinhabit/django
tests/template_tests/filter_tests/test_urlizetrunc.py
201
3348
from django.template.defaultfilters import urlizetrunc from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class UrlizetruncTests(SimpleTestCase): @setup({'urlizetrunc01': '{% autoescape off %}{{ a|urlizetrunc:"8" }} {{ b|urlizetrunc:"8" }}{% en...
bsd-3-clause
1,647,523,641,098,009,000
35.391304
120
0.539128
false
saeedghsh/SSRR13
Andreas/slam6d/3rdparty/lastools/ArcGIS_toolbox/scripts/lasheight_classify.py
2
7125
# # lasheight_classify.py # # (c) 2012, Martin Isenburg # LASSO - rapid tools to catch reality # # uses lasheight to compute the height of LiDAR points above the ground # and uses the height information to classify the points. # # The LiDAR input can be in LAS/LAZ/BIN/TXT/SHP/... format. # The LiDAR output ca...
bsd-3-clause
3,653,056,449,511,013,000
29.113537
130
0.624561
false
pinireznik/antitude
agents/skynet/scripts/restart-proc.py
5
1943
#!/usr/bin/python -u import socket import time import os import sys from subprocess import call import random FILENAME_BREAK = "/tmp/break.tmp" FILENAME_OVERLOAD = "/tmp/load.tmp" IP_ADDRESS = socket.gethostbyname(socket.gethostname()) MEMORY_LIMIT = "50" FIXED_STRING = "event FIXED " +...
apache-2.0
1,522,895,349,766,216,200
36.365385
122
0.583119
false
mesonbuild/meson
mesonbuild/ast/visitor.py
2
4785
# Copyright 2019 The Meson development team # 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 ...
apache-2.0
1,001,997,587,630,288,500
33.42446
81
0.665622
false
robwarm/gpaw-symm
gpaw/analyse/multipole.py
1
2669
import numpy as np from ase.units import Bohr from ase.parallel import paropen from ase.utils import prnt from gpaw.spherical_harmonics import Y from gpaw.utilities.tools import coordinates class Multipole: """Expand a function on the grid in multipole moments relative to a given center. center: Vector...
gpl-3.0
5,799,183,903,450,343,000
28.988764
72
0.517422
false
coxmediagroup/googleads-python-lib
examples/dfp/v201408/report_service/run_inventory_report.py
4
2915
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-6,839,245,679,299,968,000
31.388889
78
0.663808
false
guard163/xen-api
ocaml/idl/binding_sanity_checks/graphxapi.py
34
6851
#!/usr/bin/env python # NOT FINISHED (Needs tidying, can only follow OpaqueRefs, whereas some references are by uuid) # This is supposed to be a general xapi database graphing tool. # I've got a bit distracted, so I'm checking it in so it doesn't get lost. # sample command line # ./graphxapi.py | dot -Tpng >doom.png ;...
lgpl-2.1
7,620,140,726,180,916,000
36.233696
216
0.575828
false
Multimac/ansible-modules-extras
notification/jabber.py
60
4555
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <bcoca@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 by # the Free Software Foundation, either version 3 of the Licen...
gpl-3.0
2,556,304,043,178,934,000
26.606061
90
0.637761
false
harlowja/networkx
examples/drawing/knuth_miles.py
50
2994
#!/usr/bin/env python """ An example using networkx.Graph(). miles_graph() returns an undirected graph over the 128 US cities from the datafile miles_dat.txt. The cities each have location and population data. The edges are labeled with the distance betwen the two cities. This example is described in Section 1.1 in ...
bsd-3-clause
-3,700,146,292,216,659,500
25.972973
72
0.579826
false
MacCearain/HomeDetect
radio.py
1
18735
''' radio module ''' # pylint: disable=line-too-long # pylint: disable=too-many-instance-attributes # pylint: disable=too-many-arguments # pylint: disable=trailing-whitespace import time import serial import sensor ONEBIT = 0b1 #------------------------------------------------------------------- # Let's Setup ...
mit
2,653,022,561,303,180,300
41.871854
186
0.555911
false
ppiotr/Invenio
modules/bibformat/lib/elements/bfe_reprints.py
39
1199
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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...
gpl-2.0
-1,372,137,876,924,099,800
37.677419
75
0.713928
false
Johnzero/OE7
openerp/addons-fg/openerp-magento-master/magento_connect/__init__.py
1
1237
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Raimon Esteve <resteve@zikzakmedia.com> # $Id$ # # ...
agpl-3.0
6,662,293,284,782,553,000
37.65625
86
0.631366
false
jmighion/ansible
lib/ansible/modules/network/eos/eos_system.py
22
11371
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-6,373,140,211,435,566,000
33.7737
102
0.605136
false
holmes/intellij-community
python/lib/Lib/os.py
74
24851
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, or ntpath - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos' - os.curdir is a string representing the current di...
apache-2.0
1,187,429,907,938,893,000
34.149929
83
0.605529
false
salamer/django
tests/forms_tests/tests/test_widgets.py
115
105521
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.forms import ( BooleanField, Char...
bsd-3-clause
-7,325,297,545,080,603,000
51.306356
674
0.583682
false
awkspace/ansible
test/units/executor/test_play_iterator.py
45
18430
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 the License, or # (at your option) an...
gpl-3.0
4,548,741,542,467,710,500
38.549356
105
0.578025
false
ioangogo/Suntimes
suntimes.py
1
1345
#! /bin/python # -*- coding: UTF-8 -*- import urllib2, json, datetime, time import dateutil.parser global latitude global longitude api=json.loads(urllib2.urlopen("http://freegeoip.net/json/").read().decode("UTF-8")) latitude=str(api['latitude']) longitude=str(api["longitude"]) def getsunrise(lat="", lng="", formatt...
bsd-3-clause
-1,005,461,752,309,309,700
28.23913
121
0.657249
false
feibaliang/blog
node_modules/pygmentize-bundled/vendor/pygments/ez_setup.py
181
9709
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
mit
7,574,363,057,419,971,000
34.177536
86
0.645896
false
GustavoHennig/ansible
lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py
21
15423
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-8,924,721,179,718,513,000
33.349666
97
0.575569
false
veger/ansible
lib/ansible/parsing/quoting.py
241
1141
# (c) 2014 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 by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
1,340,394,053,676,036,000
35.806452
107
0.71078
false
CMPUT410W15T02/CMPUT410W15-project
testenv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/site.py
108
2362
def __boot(): import sys, imp, os, os.path PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys,'path_importer_cache',{}) stdpath = sys....
gpl-2.0
-2,014,626,685,309,833,700
27.804878
79
0.542337
false
rishig/zulip
zerver/management/commands/generate_realm_creation_link.py
1
1423
from typing import Any from django.db import ProgrammingError from confirmation.models import generate_realm_creation_url from zerver.lib.management import ZulipBaseCommand, CommandError from zerver.models import Realm class Command(ZulipBaseCommand): help = """ Outputs a randomly generated, 1-time-use link...
apache-2.0
-5,205,162,977,592,898,000
42.121212
95
0.668306
false
mammadori/asteroids
game/physicalobject.py
2
4916
# -*- coding: utf-8 *-* import pyglet from . import util, resources # update and collision helper functions def process_sprite_group(group, dt): """ calls update for the whole group and removes after who returns True """ for item in set(group): try: if item.update(dt): ...
bsd-3-clause
-5,002,630,723,919,972,000
29.345679
104
0.58991
false
andreaso/ansible
lib/ansible/modules/cloud/amazon/ec2_ami.py
51
21956
#!/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
1,892,413,080,744,189,400
33.04031
154
0.64857
false
albertz/music-player
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsuserdefaults.py
3
2840
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class PythonListAsValue (TestCase): def testSettingPythonList(self): defaults = NSUserDefaults.standardUserDefaults() defaults.setObject_forKey_([b'a'.decode('ascii'), b'b'.decode('...
bsd-2-clause
-7,856,398,205,254,523,000
47.965517
145
0.752113
false
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/numpy/fft/info.py
34
7236
""" Discrete Fourier Transform (:mod:`numpy.fft`) ============================================= .. currentmodule:: numpy.fft Standard FFTs ------------- .. autosummary:: :toctree: generated/ fft Discrete Fourier transform. ifft Inverse discrete Fourier transform. fft2 Discrete Fourier tr...
artistic-2.0
-7,611,868,567,570,339,000
37.695187
84
0.711443
false
unix-beard/gloria
service/decorator.py
1
3222
import inspect import logging from gloria.service.runnable import Task, Service on_task_wrapped = None on_service_wrapped = None class _WrapperHelper(object): def __call__(self, klass, base, _enabled, _autostart, _respawn): return type(klass.__name__, (base,), dict(klass.__dict__, enabled=_enabled, autos...
mit
-8,969,074,680,863,516,000
29.685714
124
0.581006
false
jmanday/Master
TFM/library/boost_1_63_0/libs/geometry/doc/make_qbk.py
4
6751
#! /usr/bin/env python # -*- coding: utf-8 -*- # =========================================================================== # Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. # Copyright (c) 2008-2012 Bruno Lalande, Paris, France. # Copyright (c) 2009-2012 Mateusz Loskot (mateusz@loskot.net), Lon...
apache-2.0
-7,518,914,146,392,926,000
33.979275
100
0.641386
false
npiganeau/odoo
addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py
23
9496
# -*- 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
-6,737,287,767,771,691,000
42.962963
166
0.518639
false
tzewangdorje/SIPserv
Twisted-13.1.0/twisted/mail/scripts/mailmail.py
40
9934
# -*- test-case-name: twisted.mail.test.test_mailmail -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the I{mailmail} command. """ import os import sys import rfc822 import getpass from ConfigParser import ConfigParser try: import cStringIO as StringIO ex...
gpl-3.0
4,031,742,067,378,055,700
26.142077
100
0.58184
false
jblackburne/scikit-learn
sklearn/neural_network/rbm.py
46
12291
"""Restricted Boltzmann Machine """ # Authors: Yann N. Dauphin <dauphiya@iro.umontreal.ca> # Vlad Niculae # Gabriel Synnaeve # Lars Buitinck # License: BSD 3 clause import time import numpy as np import scipy.sparse as sp from ..base import BaseEstimator from ..base import TransformerMixi...
bsd-3-clause
-1,363,436,273,807,866,000
32.673973
78
0.566105
false
tschmorleiz/amcat
api/rest/viewsets/task.py
2
5446
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
-1,309,045,671,631,597,300
37.624113
90
0.560228
false
dentaku65/plugin.video.sod
channels/piratestreaming.py
1
15107
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canal para piratestreaming # http://blog.tvalacarta.info/plugin-xbmc/streamondemand. # ------------------------------------------------------------ import re import urlparse from core import config f...
gpl-3.0
6,015,307,041,204,623,000
36.019608
165
0.547537
false
LREN-CHUV/data-factory-airflow-dags
reorganisation_steps/cleanup_all_local.py
2
1473
""" Reorganisation step: cleanup all local data. Cleanup the local data (for the whole data-set) created during copy_to_local step. Configuration variables used: * :reorganisation:copy_to_local section * OUTPUT_FOLDER: destination folder for the local copy """ from datetime import timedelta from textwrap imp...
apache-2.0
-5,086,110,847,583,015,000
26.277778
97
0.698574
false
danielvdao/facebookMacBot
venv/lib/python2.7/site-packages/setuptools/tests/test_find_packages.py
109
5619
"""Tests for setuptools.find_packages().""" import os import sys import shutil import tempfile import unittest import platform import setuptools from setuptools import find_packages from setuptools.tests.py26compat import skipIf find_420_packages = setuptools.PEP420PackageFinder.find def has_symlink(): bad_symli...
mit
-4,610,036,341,079,702,500
35.019231
83
0.590852
false
ozturkemre/programming-challanges
02-temperature_converter/temperature_converter.py
1
1147
print("""Enter 'C' or 'c' for Celsius, 'K' or 'k' for Kelvin, 'F' or 'f' for Fahrenheit\n\n""") converted=0 fr=input("I want converter from: \n") value1=input("Enter value: \n") to=input("to: \n") try: value1=float(value1) if(fr=='C' or fr=='c'): if(to=='F' or to=='f'): ...
mit
-510,726,133,871,561,400
23.934783
52
0.470793
false
Empeeric/dirometer
django/views/generic/edit.py
159
7457
from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.views.generic.base import TemplateResponseMixin, View from django.views.generic.detail import (SingleObjectMixin, SingleObjectTemplateRe...
mit
9,162,839,054,210,751,000
29.81405
76
0.615127
false
ipylypiv/grpc
src/python/grpcio/grpc/_plugin_wrapping.py
19
4602
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
-8,882,402,637,771,358,000
36.414634
80
0.684485
false
bobcyw/django
django/core/management/commands/check.py
316
1892
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.core import checks from django.core.checks.registry import registry from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Checks the entire Django project for p...
bsd-3-clause
7,410,625,854,500,169,000
35.384615
100
0.597252
false
ldbc/ldbc_snb_datagen
tools/get-sizes.py
1
1059
#!/usr/bin/env python3 import argparse import os import sys import boto3 import json def get_entity_sizes(bucket, prefix): s3 = boto3.client("s3") prefix = f"{prefix}social_network/csv/raw/composite-merged-fk/dynamic/" more = True token = None sizes = {} while more: resp = s3.list_obj...
gpl-3.0
5,652,502,450,209,840,000
32.09375
114
0.568461
false
energicryptocurrency/energi
qa/rpc-tests/bipdersig-p2p.py
1
7055
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Energi Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the...
mit
9,093,959,642,825,869,000
35.937173
100
0.60652
false
fidomason/kbengine
kbe/src/lib/python/Lib/test/test_cmd_line.py
72
19246
# Tests invocation of the interpreter with various command line arguments # Most tests are executed with environment variables ignored # See test_cmd_line_script.py for testing of script execution import test.support, unittest import os import shutil import sys import subprocess import tempfile from test.script_helper...
lgpl-3.0
-4,008,383,608,719,768,000
39.689218
93
0.563286
false
CalvinHsu1223/LinuxCNC-HAL-EtherCAT-Driver-with-ILC
configs/gladevcp/probe/probe.py
10
7401
#!/usr/bin/env python # vim: sts=4 sw=4 et # This is a component of EMC # probe.py Copyright 2010 Michael Haberler # # # 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 versi...
gpl-2.0
5,929,274,333,969,834,000
35.279412
139
0.602351
false
brianlsharp/MissionPlanner
Lib/site-packages/numpy/lib/type_check.py
53
17548
## Automatically adapted for numpy Sep 19, 2005 by convertcode.py __all__ = ['iscomplexobj','isrealobj','imag','iscomplex', 'isreal','nan_to_num','real','real_if_close', 'typename','asfarray','mintypecode','asscalar', 'common_type', 'datetime_data'] import numpy.core.numeric as _nx fr...
gpl-3.0
2,043,922,071,066,819,800
26.038521
89
0.55049
false
trolldbois/python-haystack
test/haystack/mappings/test_base.py
1
13863
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests haystack.utils .""" from __future__ import print_function import logging import mmap import os import struct import unittest from haystack import listmodel from haystack import target from haystack.mappings.base import AMemoryMapping from haystack.mappings.proc...
gpl-3.0
8,239,697,111,610,160,000
38.383523
114
0.655558
false
coecms/ARCCSSive
tests/CMIP5/db_fixture.py
1
7548
#!/usr/bin/env python """ file: tests/CMIP5/db_fixture.py author: Scott Wales <scott.wales@unimelb.edu.au> Copyright 2015 ARC Centre of Excellence for Climate Systems Science Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obta...
apache-2.0
2,598,054,568,481,924,000
29.435484
99
0.537493
false
jusdng/odoo
openerp/addons/base/module/wizard/base_import_language.py
337
2644
# -*- 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
-347,243,725,224,010,430
40.3125
116
0.596445
false
EnviroCentre/jython-upgrade
jython/lib/site-packages/pip/commands/uninstall.py
3
2289
from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutil...
mit
-6,908,659,263,130,169,000
34.765625
79
0.58235
false
scality/cinder
cinder/tests/unit/api/contrib/test_volume_replication.py
5
11660
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
7,967,951,313,953,775,000
46.398374
78
0.496055
false
emonty/ansible
lib/ansible/modules/system/iptables.py
20
28339
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Linus Unnebäck <linus@folkdatorn.se> # Copyright: (c) 2017, Sébastien DA ROCHA <sebastien@da-rocha.net> # 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_...
gpl-3.0
-7,721,591,528,611,428,000
34.596734
128
0.623116
false
bratatidas9/Impala-1
tests/unittests/test_file_parser.py
16
2882
# Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Unit tests for the test file parser # import logging import pytest from tests.util.test_file_parser import * from tests.common.base_test_suite import BaseTestSuite test_text = """ # Text before in the header (before the first ====) should be ignored # so put t...
apache-2.0
7,051,374,943,517,164,000
29.989247
89
0.612422
false
TheoChevalier/bedrock
bedrock/mozorg/middleware.py
11
2753
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime from email.utils import formatdate import time from django.conf import settings from django.core.except...
mpl-2.0
-4,599,908,344,236,206,000
33.4125
88
0.626589
false
wcmckee/moejobs-site
cache/.mako.tmp/comments_helper_googleplus.tmpl.py
1
2430
# -*- coding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED STOP_RENDERING = runtime.STOP_RENDERING __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1443802885.4031692 _enable_loop = True _template_filename = '/usr/local/lib/python3.4/dist-package...
mit
-6,546,587,520,571,600,000
35.268657
348
0.617695
false
sesamesushi/desatisrevu
modules/oeditor/oeditor.py
9
10589
# Copyright 2012 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 ...
apache-2.0
4,401,655,552,655,318,500
39.109848
80
0.614317
false
muffinresearch/olympia
conftest.py
6
4031
from django import http, test from django.conf import settings from django.core.cache import cache from django.utils import translation import caching import pytest import amo from access.models import Group, GroupUser from translations.hold import clean_translations from users.models import UserProfile @pytest.fix...
bsd-3-clause
-6,607,943,819,425,651,000
30.992063
78
0.696105
false
m039/Void
third-party/void-boost/tools/build/src/build/scanner.py
8
6258
# Status: ported. # Base revision: 45462 # # Copyright 2003 Dave Abrahams # Copyright 2002, 2003, 2004, 2005 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Implements scanners: objects that compute implicit...
mit
6,886,645,102,377,342,000
36.473054
88
0.675935
false
tellesnobrega/horizon
openstack_dashboard/dashboards/project/access_and_security/security_groups/tests.py
23
34856
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
5,826,310,198,195,604,000
41.559219
79
0.547252
false
dieterich-lab/DCC
DCC/circFilter.py
1
5910
import numpy as np import os import sys import HTSeq from IntervalTree import IntervalTree ########################## # Input of this script # ########################## # This script input a count table: # chr start end junctiontype count1 count2 ... countn # and a repeatitive region file in gtf format # specify...
gpl-3.0
5,880,789,453,425,107,000
37.881579
140
0.573604
false
gx1997/chrome-loongson
net/tools/testserver/chromiumsync.py
9
50327
# 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. """An implementation of the server side of the Chromium sync protocol. The details of the protocol are described mostly by comments in the protocol buff...
bsd-3-clause
-7,226,555,059,539,434,000
38.815665
80
0.686292
false
ncf-ds/chloroform
samples/build_fixtures.py
1
6130
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from chloroform import db from chloroform.models import * #Things this has: #Same client different retail chains #Same retail chain different clients #question_groups containing a question_group #same qquestion_groups across forms #Que...
agpl-3.0
6,657,443,697,487,821,000
31.094241
116
0.748613
false
JFriel/honours_project
venv/lib/python2.7/site-packages/numpy/f2py/f2py2e.py
174
22908
#!/usr/bin/env python """ f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. Copyright 1999--2011 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRAN...
gpl-3.0
-2,306,411,861,323,313,700
33.920732
108
0.549022
false
hackerbot/DjangoDev
tests/template_tests/filter_tests/test_lower.py
388
1155
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import lower from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LowerTests(SimpleTestCase): @setup({'lower01': '{% autoescape off %}{{ a|lower }}...
bsd-3-clause
-8,784,920,865,087,797,000
32.970588
119
0.642424
false
prasen-ftech/pywinauto
doc_src/build_autodoc_files.py
16
2513
"Build up the sphinx autodoc file for the python code" import os import sys docs_folder = os.path.dirname(__file__) pywin_folder = os.path.dirname(docs_folder) sys.path.append(pywin_folder) pywin_folder = os.path.join(pywin_folder, "pywinauto") excluded_dirs = ["unittests"] excluded_files = [ "_men...
lgpl-2.1
3,804,347,580,718,601,000
27.22093
78
0.592121
false
yukoba/sympy
sympy/polys/rootisolation.py
78
55536
"""Real and complex root isolation and refinement algorithms. """ from __future__ import print_function, division from sympy.polys.densebasic import ( dup_LC, dup_TC, dup_degree, dup_strip, dup_reverse, dup_convert, dup_terms_gcd) from sympy.polys.densearith import ( dup_neg, dup_rshift, dup_rem)...
bsd-3-clause
3,254,446,479,256,429,600
28.198738
114
0.481309
false
nest/nest-simulator
examples/NESTServerClient/NESTServerClient.py
17
2145
# -*- coding: utf-8 -*- # # NESTServerClient.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the Licens...
gpl-2.0
6,658,699,441,154,078,000
30.544118
97
0.640093
false
lungetech/luigi
test/scheduler_visualisation_test.py
5
19278
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-8,342,037,425,744,384,000
31.841567
119
0.594564
false
swampbotics/new.swampbotics.org
node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
2710
5094
# 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. """Visual Studio user preferences file writer.""" import os import re import socket # for gethostname import gyp.common import gyp.easy_xml as easy_xml #------...
mit
8,227,031,425,205,786,000
33.653061
79
0.594032
false
peer-node/flex
test/lib/googletest/scripts/gen_gtest_pred_impl.py
2538
21986
#!/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...
agpl-3.0
-2,489,911,931,312,821,000
29.117808
76
0.626672
false
zsjohny/jumpserver
apps/perms/urls/views_urls.py
1
2684
# coding:utf-8 from django.conf.urls import url from django.urls import path from .. import views app_name = 'perms' urlpatterns = [ # asset-permission path('asset-permission/', views.AssetPermissionListView.as_view(), name='asset-permission-list'), path('asset-permission/create/', views.AssetPermissionC...
gpl-2.0
1,337,201,133,897,868,300
77.941176
164
0.754471
false
cctaylor/googleads-python-lib
examples/dfp/v201505/proposal_service/submit_proposals_for_approval.py
3
2395
#!/usr/bin/python # # 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 b...
apache-2.0
-5,491,334,083,840,781,000
31.808219
80
0.675157
false
wtanaka/google-app-engine-django-openid
src/openid/consumer/html_parse.py
167
7161
""" This module implements a VERY limited parser that finds <link> tags in the head of HTML or XHTML documents and parses out their attributes according to the OpenID spec. It is a liberal parser, but it requires these things from the data in order to work: - There must be an open <html> tag - There must be an open...
gpl-3.0
-5,548,681,114,163,012,000
27.759036
75
0.64558
false
davidharvey1986/pyRRG
unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/distlib/scripts.py
7
16998
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, detect_encoding, ZipFi...
mit
2,171,950,388,190,593,300
39.853365
87
0.551044
false
chengdezhi/language_model_for_typing
lm_prediction.py
1
6516
import datrie from data_utils import Vocabulary, Dataset import string import re from flask import Flask from flask_restful import Resource, Api import traceback import time import sys #import thriftpy import os from flask import Flask, request, redirect, url_for from werkzeug.utils import secure_filename from newPyC...
mit
-5,495,016,405,757,070,000
35.606742
104
0.511971
false
alsrgv/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/softplus.py
35
5563
# 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
-4,781,450,353,001,732,000
36.086667
80
0.63401
false
adybbroe/mesan_compositer
mesan_compositer/ctth_quicklooks.py
1
4733
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, 2015, 2019 Adam.Dybbroe # Author(s): # Adam.Dybbroe <a000680@c14526.ad.smhi.se> # 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 Foun...
gpl-3.0
-6,340,232,789,655,544,000
32.097902
103
0.646102
false
rueckstiess/dopamine
adapters/explorers/explorer.py
1
2647
from dopamine.adapters import Adapter import numpy as np class Explorer(Adapter): # define the conditions of the environment inConditions = {} # define the conditions of the environment outConditions = {} def __init__(self): Adapter.__init__(self) ...
gpl-3.0
-3,794,373,032,818,563,600
32.0875
87
0.633925
false
szeged/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py
5
2728
import os from .base import NullBrowser, ExecutorBrowser, require_arg from .base import get_timeout_multiplier # noqa: F401 from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorservo import ServoTestharnessExecutor, ServoRefTestExecutor, ServoWdspecExecutor # noqa: F401 here = o...
mpl-2.0
-6,204,316,042,673,528,000
31.47619
119
0.623534
false
hujiajie/pa-chromium
base/android/jni_generator/jni_generator.py
20
38680
#!/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. """Extracts native methods from a Java file and generates the JNI bindings. If you change this, please run and update the tests."""...
bsd-3-clause
-6,610,376,184,051,497,000
35.319249
80
0.611841
false
BhallaLab/moose-examples
symcomp/symcomp.py
4
3064
# symcompartment.py --- # # Filename: symcompartment.py # Description: # Author: # Maintainer: # Created: Thu Jun 20 17:47:10 2013 (+0530) # Version: # Last-Updated: Wed Jun 26 11:43:47 2013 (+0530) # By: subha # Update #: 90 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # ...
gpl-2.0
-4,284,771,184,869,985,000
27.110092
129
0.642624
false
ojengwa/talk
venv/lib/python2.7/site-packages/django/db/models/__init__.py
82
2439
from functools import wraps import sys import warnings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured # NOQA from django.db.models.query import Q, QuerySet, Prefetch # NOQA from django.db.models.expressions import F # NOQA from django.db.models.manager import Manager # NOQA from django...
mit
-8,811,297,134,599,633,000
37.109375
83
0.712997
false
sznekol/django-cms
cms/management/commands/subcommands/base.py
48
1618
# -*- coding: utf-8 -*- import sys from django.core.management.base import BaseCommand, CommandError class SubcommandsCommand(BaseCommand): subcommands = {} command_name = '' def __init__(self): super(SubcommandsCommand, self).__init__() for name, subcommand in self.subcommands.items(): ...
bsd-3-clause
-2,089,971,199,633,882,000
43.944444
112
0.58529
false
henrykironde/weaverhenry
app/app.py
2
1395
import wx class Frame(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(450, 350)) hbox = wx.BoxSizer(wx.HORIZONTAL) vbox = wx.BoxSizer(wx.VERTICAL) panel1 = wx.Panel(self, -1) panel2 = wx.Panel(self,...
mit
7,659,714,490,347,819,000
33.04878
106
0.602151
false
dhalperi/beam
sdks/python/apache_beam/transforms/window_test.py
2
11729
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
7,469,583,920,428,387,000
40.44523
79
0.631341
false
827992983/yue
yue/urls.py
1
2674
"""yue URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
gpl-3.0
6,424,795,993,814,014,000
46.75
82
0.684368
false
dippatel1994/oppia
core/platform/transactions/gae_transaction_services.py
33
1124
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-8,742,538,995,041,967,000
30.222222
74
0.72153
false
FlorentChamault/My_sickbeard
lib/hachoir_parser/file_system/mbr.py
90
7784
""" Master Boot Record. """ # cfdisk uses the following algorithm to compute the geometry: # 0. Use the values given by the user. # 1. Try to guess the geometry from the partition table: # if all the used partitions end at the same head H and the # same sector S, then there are (H+1) heads and S sectors/cylind...
gpl-3.0
-6,416,897,720,142,389,000
32.843478
99
0.561151
false