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
piiswrong/mxnet
example/ssd/tools/caffe_converter/compare_layers.py
54
14536
# 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
5,746,854,504,313,520,000
38.934066
100
0.607939
false
nerdknight/beaglebone-black-stuff
n5110.py
1
9178
#!/usr/bin/python # -*- coding: UTF-8 -*- import Adafruit_BBIO.GPIO as GPIO import time PIN_SCE="P9_11" # LCD CS # Pin 3 PIN_RESET="P9_12" # LCD RST # Pin 4 PIN_DC="P9_13" # LCD Dat/Com # Pin 5 PIN_SDIN="P9_14" # LCD SPIDat # Pin 6 PIN_SCLK="P9_15" # LCD SPIClk# Pin 7 # LCD Gnd .... Pin 2 # LCD Vcc .... Pin 1 PIN...
gpl-2.0
5,284,405,530,558,225,000
22.460358
72
0.553036
false
dhhjx880713/GPy
GPy/plotting/gpy_plot/gp_plots.py
3
23670
#=============================================================================== # Copyright (c) 2012-2015, GPy authors (see AUTHORS.txt). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
bsd-3-clause
3,406,426,655,036,419,600
55.223278
209
0.644825
false
gangadhar-kadam/adb-erp
selling/doctype/lead/get_leads.py
5
2503
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # 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 yo...
agpl-3.0
-4,528,631,096,231,753,700
33.777778
99
0.72473
false
bdr00/typedef
typedef/api.py
1
3489
from typedef.type_definition import define_simple_type, define_array, define_struct, define_union from typedef.constants import Endian, Arch from typedef.errors import ArchDependentType, MissingField def sizeof(t, target_arch=Arch.Unknown): """ return the number of bytes the complex-type instance represent...
mit
7,111,667,672,866,274,000
31.305556
116
0.637432
false
spark8103/dlop
app/assets_manage.py
1
18143
#-*- coding: UTF-8 -*- import os, datetime, bson.objectid from flask import Blueprint, request, redirect, render_template, url_for, flash from flask.views import MethodView from wtforms import Form, TextField, validators, SelectField, TextAreaField, BooleanField, SelectMultipleField from app.models import db from app...
apache-2.0
1,741,695,170,881,628,700
43.148241
110
0.531842
false
liuzzfnst/tp-libvirt
libvirt/tests/src/multiqueue.py
6
11761
import logging import time import threading import re from autotest.client.shared import error, utils from virttest import libvirt_vm, virsh, remote from virttest.libvirt_xml import vm_xml from virttest.utils_test import libvirt as utlv def config_xml_multiqueue(vm_name, vcpu=1, multiqueue=4): """ Configure v...
gpl-2.0
542,402,993,461,577,400
32.69914
79
0.567724
false
hanfi/AWS-EC2-Backup
backup.py
1
2850
import boto import boto.utils import boto.ec2 import boto.ec2.cloudwatch import datetime import properties import logging import time logging.basicConfig(filename=properties.log_filename, level=properties.log_lvl) log = logging.getLogger("Aws-EC2-Backup-Tool") log.info("AwsBackupTool Start") def format_name(meta_data...
apache-2.0
2,484,895,568,025,097,000
45.721311
166
0.708772
false
jut-io/jut-python-tools
tests/util.py
1
10111
""" testing utilities """ import os import select import subprocess import tempfile import time from contextlib import contextmanager from jut import config from jut.api import accounts, auth, data_engine, deployments from jut.common import info, error # data service only knows about space changes every 30s SPAC...
mit
6,053,857,919,009,569,000
26.853994
85
0.543962
false
alxgu/ansible
lib/ansible/modules/network/fortios/fortios_log_syslogd2_setting.py
23
12038
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
-3,696,767,529,458,629,600
30.595801
104
0.508805
false
SiLab-Bonn/Scarce
scarce/testing/test_solver.py
1
1458
import unittest import fipy import numpy as np from scarce.examples import potential_1D from scarce import constant, fields from scipy import constants class TestSolver(unittest.TestCase): def test_linear_poison_solver(self): ''' Compare the result of the poison solution with analytical resu...
mit
-2,607,168,113,285,467,600
32.136364
119
0.613855
false
pnorman/mapnik
scons/scons-local-2.4.1/SCons/Tool/mwcc.py
6
6871
"""SCons.Tool.mwcc Tool-specific initialization for the Metrowerks CodeWarrior compiler. 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 - 2015 The SCons Foundation # # Permission is he...
lgpl-2.1
-7,673,003,812,350,718,000
32.193237
103
0.6411
false
aznashwan/heat2arm
heat2arm/constants.py
1
1634
# Copyright 2015 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
-925,301,965,850,339,600
37.904762
78
0.73317
false
lthurlow/Boolean-Constrained-Routing
pycosat-0.6.0/setup.py
1
1391
import sys from distutils.core import setup, Extension version = '0.6.0' ext_kwds = dict( name = "pycosat", sources = ["pycosat.c"], define_macros = [] ) if sys.platform != 'win32': ext_kwds['define_macros'].append(('PYCOSAT_VERSION', '"%s"' % version)) if '--inplace' in sys.argv: ext_kwds['defi...
mit
344,584,170,238,616,960
29.23913
75
0.585909
false
yusaira-khan/Brain-Soother
OpenBCI_Python/scripts/stream_data.py
5
4823
import sys; sys.path.append('..') # help python find open_bci_v3.py relative to scripts folder import open_bci_v3 as bci import streamer_tcp_server import time, timeit from threading import Thread # Transmit data to openvibe acquisition server, intelpolating data (well, sort of) from 250Hz to 256Hz # Listen to new con...
mit
-6,670,059,923,779,559,000
33.697842
153
0.686087
false
Ivoz/ajenti
plugins/filesystems/main.py
17
5244
from ajenti.ui import * from ajenti.com import implements from ajenti.api import * from ajenti.utils import * import backend class FSPlugin(CategoryPlugin): text = 'Filesystems' icon = '/dl/filesystems/icon.png' folder = 'system' def on_init(self): self.fstab = backend.read() def on_ses...
lgpl-3.0
5,433,390,977,734,535,000
33.728477
160
0.46148
false
RondaStrauch/landlab
landlab/graph/dual.py
3
6794
"""Define a graph of nodes-links-patches and its dual. This class should not be used directly. Instead, it should be used as a base class when defining other types of graphs. """ import numpy as np import xarray as xr from ..core.utils import as_id_array from ..utils.decorators import store_result_in_grid, read_only_...
mit
-5,141,477,720,348,146,000
26.617886
80
0.584486
false
prheenan/Research
Perkins/Projects/Protein/bacteriorhodopsin/2017-7-jcp-paper/Manuscript/fulfill_figures.py
1
2727
#! /usr/bin/env python3 """Pandoc filter that replaces labels of format {#?:???}, where ? is a single lower case character defining the type and ??? is an alphanumeric label, with numbers. Different types are counted separately. credit to: blog.hartleygroup.org/2015/11/08/numbering-figures-schemes-and-charts-in-pandoc...
gpl-3.0
-6,397,894,419,634,744,000
36.356164
91
0.591859
false
tensorflow/models
research/object_detection/utils/np_box_ops.py
1
3431
# 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
-3,927,373,574,512,050,700
32.637255
80
0.688429
false
destijl/grr
grr/lib/flows/general/filetypes.py
1
1961
#!/usr/bin/env python """File-type specific flows.""" from grr.client.client_actions import plist as plist_actions from grr.lib import flow from grr.lib.rdfvalues import structs as rdf_structs from grr.proto import flows_pb2 class PlistValueFilterArgs(rdf_structs.RDFProtoStruct): protobuf = flows_pb2.PlistValueFi...
apache-2.0
2,640,817,103,653,268,000
28.268657
79
0.663947
false
markuszoeller/openstack
scripts/launchpad/query_expired.py
2
1982
#!/usr/bin/env python # Displays all Launchpad bugs for OpenStack/Nova which are potentially expired # because they got reported for Nova versions which are not supported anymore. # # Copyright 2016 Markus Zoeller import argparse import datetime import common parser = argparse.ArgumentParser() parser.add_argument('...
mit
7,359,826,331,495,939,000
29.507692
78
0.632694
false
goerz/pelican
pelican/tests/test_utils.py
7
22455
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import import logging import shutil import os import time import locale from sys import platform from tempfile import mkdtemp import pytz from pelican.generators import TemplatePagesGenerator from pelican.writers import Writer f...
agpl-3.0
-249,963,560,626,379,070
39.284685
108
0.563512
false
pbrod/scipy
scipy/io/tests/test_netcdf.py
16
16440
''' Tests for netcdf ''' from __future__ import division, print_function, absolute_import import os from os.path import join as pjoin, dirname import shutil import tempfile import warnings from io import BytesIO from glob import glob from contextlib import contextmanager import numpy as np from numpy.testing import (...
bsd-3-clause
-1,933,642,024,777,391,600
34.354839
103
0.590998
false
neurodata/ndgrutedb
packages/utils/mask_nifti.py
2
2199
#!/usr/bin/env python # Copyright 2015 Open Connectome Project (http://openconnecto.me) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
apache-2.0
-759,839,102,581,999,400
29.541667
95
0.671669
false
williamdev/RatticWeb
cred/migrations/0015_auto__add_field_credicon_xoffset__add_field_credicon_yoffset.py
7
6847
# -*- 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 field 'CredIcon.xoffset' db.add_column('cred_credicon', 'xoffset', self.gf('d...
gpl-2.0
-6,499,106,666,362,851,000
63
212
0.541113
false
VirtueSecurity/aws-extender
BappModules/boto3/resources/factory.py
11
22401
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
mit
-2,070,400,794,844,738,800
40.560297
79
0.604705
false
lavalamp-/ws-backend-community
rest/views/elasticsearch/mixin.py
1
9340
# -*- coding: utf-8 -*- from __future__ import absolute_import import copy from django.conf import settings from rest_framework import authentication from rest_framework.exceptions import PermissionDenied, NotAcceptable from rest_framework.response import Response import rest.responses from rest.views.exception impor...
gpl-3.0
2,869,166,828,440,299,000
37.436214
105
0.65182
false
Pica4x6/megaradrp
megaradrp/core/tests/test_processing.py
1
3104
import shutil from tempfile import mkdtemp import os import astropy.io.fits as fits import numpy as np import pytest from megaradrp.core.processing import trim_and_o from megaradrp.core.processing import apextract_weights from megaradrp.simulation.detector import ReadParams, MegaraDetectorSat from megaradrp.simulatio...
gpl-3.0
5,889,563,368,696,697,000
32.031915
115
0.643363
false
mith1979/ansible_automation
applied_python/applied_python/lib/python2.7/site-packages/ansible/playbook/__init__.py
6
35747
# (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...
apache-2.0
5,962,869,106,696,795,000
39.900458
143
0.554816
false
aferr/TemporalPartitioningMemCtl
src/mem/slicc/ast/ObjDeclAST.py
16
3765
# 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
-370,105,406,688,727,900
39.053191
78
0.64834
false
scottpurdy/nupic
tests/integration/nupic/opf/opf_experiment_results_test.py
10
15627
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
7,133,146,218,512,597,000
37.301471
114
0.592628
false
leandrotoledo/python-telegram-bot
tests/test_conversationhandler.py
2
63261
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2021 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
lgpl-3.0
-6,040,542,914,925,633,000
36.125
99
0.585969
false
CG-F16-4-Rutgers/steersuite-rutgers
steerstats/tools/GetRecordings.py
8
1612
#!/usr/bin/python # Replace <USERNAME_DATABASE>, <USERNAME>, and <PASSWORD> below with your actual DB, user, and password. import psycopg2 import psycopg2.extras import sys # Append parent directory to access steersuite api. sys.path.append("../") from steersuitedb.Recording import Recording from steersuitedb.Util i...
gpl-3.0
-2,643,345,603,503,362,000
25
104
0.693548
false
labase/activnce
main/test/test_evaluation.py
1
15883
# -*- coding: utf-8 -*- """ ################################################ Plataforma ActivUFRJ ################################################ :Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)* :Contact: carlo@nce.ufrj.br :Date: $Date: 2009-2010 $ :Status: This is a "work in progress" :Revision: $Revision: 0.0...
gpl-2.0
-2,253,725,257,032,222,700
50.189542
173
0.667263
false
openspending/spendb
spendb/tests/views/test_home.py
5
3357
import re import json from flask import url_for from spendb.core import db from spendb.model.dataset import Dataset from spendb.tests.base import ControllerTestCase from spendb.tests.helpers import make_account, load_fixture class TestHomeController(ControllerTestCase): def setUp(self): super(TestHomeCo...
agpl-3.0
-1,144,154,089,912,542,500
40.9625
93
0.629431
false
LittleLama/Sick-Beard-BoxCar2
lib/hachoir_parser/image/jpeg.py
90
14363
""" JPEG picture parser. Information: - APP14 documents http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html#color - APP12: http://search.cpan.org/~exiftool/Image-ExifTool/lib/Image/ExifTool/TagNames....
gpl-3.0
1,495,576,732,180,115,500
38.029891
116
0.566177
false
ossxp-com/repo
main.py
3
10274
#!/bin/sh # # Copyright (C) 2008 The Android Open Source Project # # 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
-3,193,361,342,326,652,000
27.940845
74
0.601226
false
bbbenja/SickRage
sickbeard/sab.py
11
8550
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.tv # Git: https://github.com/SiCKRAGETV/SickRage # # This file is part of SickRage. # # SickRage 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, ei...
gpl-3.0
7,463,108,557,253,176,000
32.139535
127
0.63883
false
pyhys/minimalmodbus
setup.py
1
2703
#!/usr/bin/env python # -*- coding: utf-8 -*- # Do not import non-standard modules here, as it will mess up the installation in clients. import re try: from setuptools import setup except ImportError: from distutils.core import setup with open("README.rst") as readme_file: readme = readme_file.read() w...
apache-2.0
-5,849,960,773,327,087,000
37.614286
90
0.631521
false
drakuna/odoo
openerp/osv/fields.py
8
75655
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Fields: - simple - relations (one2many, many2one, many2many) - function Fields Attributes: * _classic_read: is a classic sql fields * _type : field type * _auto_join: ...
gpl-3.0
-2,648,863,562,472,183,000
40.409414
228
0.55991
false
madprog/PyPanel
test.py
1
1206
import Xlib import Xlib.display display = Xlib.display.Display() screen = display.screen() root = screen.root window = root.create_window( 0, 0, 800, 600, 0, screen.root_depth, window_class=Xlib.X.InputOutput, visual=Xlib.X.CopyFromParent, colormap=Xlib.X.CopyFromParent, event_mask=( Xlib.X.ExposureM...
gpl-2.0
3,472,756,760,394,274,300
33.457143
96
0.731343
false
CMPUT410W15T02/CMPUT410W15-project
testenv/lib/python2.7/site-packages/django/contrib/gis/geoip/tests.py
57
4734
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from unittest import skipUnless from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geoip import HAS_GEOIP from django.utils import six if HAS_GEOIP: from . import GeoIP, G...
gpl-2.0
3,687,879,909,385,123,000
37.471545
89
0.60038
false
Williams224/davinci-scripts
ksteta3pi/Consideredbkg/MC_12_11104101_MagUp.py
3
9326
#-- GAUDI jobOptions generated on Fri Jul 17 16:37:45 2015 #-- Contains event types : #-- 11104101 - 106 files - 2116085 events - 602.40 GBytes #-- Extra information about the data processing phases: from Gaudi.Configuration import * from GaudiConf import IOHelper IOHelper('ROOT').inputFiles(['LFN:/lhcb/MC/2012...
mit
-2,458,781,069,985,709,600
79.396552
113
0.79777
false
softak/webfaction_demo
vendor-local/lib/python/rdflib/compare.py
2
7859
# -*- coding: utf-8 -*- """ A collection of utilities for canonicalizing and inspecting graphs. Among other things, they solve of the problem of deterministic bnode comparisons. Warning: the time to canonicalize bnodes may increase exponentially on larger graphs. Use with care! Example of comparing two graphs:: ...
bsd-3-clause
-1,866,312,328,738,348,000
30.947154
91
0.589133
false
damianam/easybuild-framework
easybuild/toolchains/gompic.py
3
1465
## # Copyright 2012-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-6,589,957,370,738,518,000
36.564103
96
0.750853
false
ragnarula/python-osc
pythonosc/osc_bundle_builder.py
5
1732
"""Build OSC bundles for client applications.""" from pythonosc import osc_bundle from pythonosc import osc_message from pythonosc.parsing import osc_types # Shortcut to specify an immediate execution of messages in the bundle. IMMEDIATELY = osc_types.IMMEDIATELY class BuildError(Exception): """Error raised when...
unlicense
5,738,941,090,748,354,000
28.862069
72
0.655312
false
ivanamihalek/tcga
tcga/01_somatic_mutations/032_gene_vs_TP53_background.py
1
19181
#!/usr/bin/python -u # # # This source code is part of tcga, a TCGA processing pipeline, written by Ivana Mihalek. # Copyright (C) 2014-2016 Ivana Mihalek. # # 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...
gpl-3.0
-9,180,114,208,996,389,000
40.697826
132
0.478286
false
sajuptpm/neutron-ipam
neutron/plugins/vmware/api_client/request.py
1
12202
# Copyright 2012 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 applicable law or a...
apache-2.0
-4,152,591,981,171,219,000
41.221453
79
0.527864
false
azizk/dil
scripts/path.py
1
13790
# -*- coding: utf-8 -*- # Author: Aziz Köksal # License: zlib/libpng from __future__ import unicode_literals import os, shutil from re import compile as re_compile from sys import version_info as vi from glob import glob from codecs import open __all__ = ["Path", "Paths"] op = os.path def isiterable(x): """ Returns...
gpl-3.0
-7,201,101,554,351,409,000
25.931641
79
0.581623
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/boot_diagnostics_instance_view_py3.py
5
1413
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-1,333,872,485,965,438,700
43.15625
122
0.634112
false
nerdvegas/rez
src/rez/vendor/pygraph/algorithms/heuristics/chow.py
11
2760
# Copyright (c) 2008-2009 Pedro Matiello <pmatiello@gmail.com> # Salim Fadhley <sal@stodge.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...
lgpl-3.0
8,333,658,013,238,419,000
34.844156
138
0.650362
false
netanelravid/screener
screener/utils/decorators.py
1
3900
from functools import wraps from os import makedirs from os.path import isdir from future.utils import raise_with_traceback from os import path from requests import ( get as http_get_request, HTTPError, ) from requests.exceptions import ( ConnectionError, ConnectTimeout ) from screener.exceptions impo...
apache-2.0
-4,352,944,230,025,209,000
30.707317
108
0.603077
false
UTNkar/moore
src/moore/urls.py
1
1606
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.conf.urls import include, url from django.urls import path from search import views as search_views from wagtail.admin import urls as wagtailadmin_urls from wagtail.core import urls as wagtail_urls from wagtail.docum...
agpl-3.0
8,173,072,607,114,854,000
29.884615
74
0.709215
false
hkariti/ansible
lib/ansible/modules/cloud/amazon/lightsail.py
16
15841
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
5,025,600,697,318,624,000
32.349474
157
0.631021
false
klonage/nlt-gcs
Lib/distutils/fancy_getopt.py
59
18432
"""distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object ...
gpl-3.0
3,998,547,862,423,171,600
36.082645
79
0.531955
false
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/classes/graph.py
1
65308
"""Base class for undirected graphs. The Graph class allows any hashable object as a node and can associate key/value attribute pairs with each undirected edge. Self-loops are allowed but multiple edges are not (see MultiGraph). For directed graphs see DiGraph and MultiDiGraph. """ from copy import deepcopy import ...
gpl-3.0
-3,307,363,310,976,054,300
33.408851
87
0.554297
false
davidsminor/cortex
test/IECore/ImageTests.py
12
1928
########################################################################## # # Copyright (c) 2007, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
5,486,261,741,784,589,000
46.02439
76
0.700726
false
XiaodunServerGroup/medicalmooc
common/lib/xmodule/xmodule/tests/test_lti_unit.py
6
17140
# -*- coding: utf-8 -*- """Test for LTI Xmodule functional logic.""" from mock import Mock, patch, PropertyMock import mock import textwrap import json from lxml import etree import json from webob.request import Request from copy import copy from collections import OrderedDict import urllib import oauthlib import has...
agpl-3.0
-6,699,141,150,232,263,000
41.216749
121
0.614644
false
awmartin/spatialpixel-code
mapping/slippymapper/slippymapper.py
2
10805
import math from ...util import lazyimages from marker import * from tile_servers import tile_servers import sys # TODO Extract the processing-specific code. # Fundamental transformations. Reference: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames def lonToTile(lon, zoom): """Given a longitude and zoom v...
mit
-8,290,212,591,541,616,000
32.246154
103
0.580565
false
qgis/QGIS
tests/src/python/test_qgsprojectionselectionwidgets.py
15
11638
# -*- coding: utf-8 -*- """QGIS Unit tests for various projection selection widgets. .. note:: 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...
gpl-2.0
-2,600,888,642,415,344,600
45.738956
417
0.707682
false
lucas8/MPSI
ipt/int/code.py
1
5446
#!/usr/bin/python3 import numpy as np import random as rd from math import * import matplotlib.pyplot as plt ######################################## ####### Méthode des rectangles ######### ######################################## tests = False ### Exercice 1-a ### def Irg(f, a, b, n): ints = np.linspace(a, b, n...
mit
-8,215,199,403,479,353,000
25.014354
102
0.459077
false
mwmuni/LIGGGHTS_GUI
OpenGL/GL/ARB/texture_cube_map_array.py
9
2171
'''OpenGL extension ARB.texture_cube_map_array This module customises the behaviour of the OpenGL.raw.GL.ARB.texture_cube_map_array to provide a more Python-friendly API Overview (from the spec) The GL_EXT_texture_array extension, and subsequently OpenGL 3.0 have introduced the concept of one- and two-dimension...
gpl-3.0
-3,980,971,157,940,666,400
41.588235
71
0.788577
false
tdgoodrich/inddgo_pure
scripts/inddgo-graph-parser.py
1
2752
#!/usr/bin/env python2 #This file is part of INDDGO. # #Copyright (C) 2012, Oak Ridge National Laboratory # #This product includes software produced by UT-Battelle, LLC under Contract No. #DE-AC05-00OR22725 with the Department of Energy. # #This program is free software; you can redistribute it and/or modify #it under...
bsd-3-clause
6,501,833,771,813,772,000
32.975309
106
0.640625
false
PeterPetrik/QGIS
python/plugins/processing/gui/ExtentSelectionPanel.py
30
7535
# -*- coding: utf-8 -*- """ *************************************************************************** ExtentSelectionPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
gpl-2.0
3,178,467,637,961,001,500
35.567961
116
0.588079
false
joopert/home-assistant
homeassistant/components/opensky/sensor.py
3
5668
"""Sensor for the Open Sky Network.""" import logging from datetime import timedelta import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_NAME, CONF_LATITUDE, CONF_LO...
apache-2.0
8,739,224,805,317,396,000
29.31016
87
0.602329
false
inquisite/Inquisite-Core
lib/managers/ListManager.py
1
15412
from lib.utils.Db import db import re from lib.exceptions.FindError import FindError from lib.exceptions.DbError import DbError from lib.exceptions.ValidationError import ValidationError from lib.exceptions.SettingsValidationError import SettingsValidationError from lib.decorators.Memoize import memoized class ListMan...
gpl-3.0
-2,056,531,698,664,674,300
47.772152
338
0.528355
false
kotobukki/MobSF-Translate
StaticAnalyzer/tools/enjarify/enjarify/jvm/mathops.py
35
5689
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
gpl-3.0
5,167,459,214,392,227,000
43.445313
74
0.682897
false
tejpochiraju/tejpochiraju.github.io
tag_pages.py
1
3013
#!/bin/python import csv data_file = "_data/projects.csv" def add_to_set(input_list,output_set): for el in input_list: el = el.strip() if el: output_set.add(el.strip()) def main(): #Initialise the main dictionary data = {} tags = set() ...
mit
-1,236,609,783,463,576,800
31.397849
98
0.567541
false
mcking49/apache-flask
Python/Lib/site-packages/gevent/_tblib.py
9
9490
# -*- coding: utf-8 -*- # A vendored version of part of https://github.com/ionelmc/python-tblib #### # Copyright (c) 2013-2014, Ionel Cristian Mărieș # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met:...
mit
8,241,235,972,606,930,000
30.210526
125
0.606134
false
PytLab/gaft
gaft/operators/selection/linear_ranking_selection.py
1
2063
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Linear Ranking Selection implementation. ''' from random import random from itertools import accumulate from bisect import bisect_right from ...plugin_interfaces.operators.selection import Selection class LinearRankingSelection(Selection): ''' Selection operato...
gpl-3.0
-8,291,782,990,477,367,000
34.568966
80
0.647601
false
jessrosenfield/pants
src/python/pants/reporting/plaintext_reporter.py
13
9618
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from collections imp...
apache-2.0
-6,395,237,733,280,197,000
38.743802
109
0.674049
false
daniaki/pyPPI
pyppi/tests/test_uniprot.py
1
9938
import os import time from unittest import TestCase from Bio import SwissProt from ..database import create_session, delete_database, cleanup_database from ..database.models import Protein from ..data_mining.uniprot import ( parallel_download, download_record, parse_record_into_protein, go_terms, interpro...
mit
-1,787,943,295,839,534,300
34.366548
79
0.59187
false
centricular/cerbero
cerbero/bootstrap/windows.py
1
8745
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
5,058,039,451,606,990,000
40.056338
93
0.6247
false
hainm/Torsions
torsions/TorsionScanSet.py
1
10496
# -*- coding: utf-8 -*- """ Created on Thu May 7 19:32:22 2015 @author: sternc1 """ import pandas as pd import numpy as np import simtk.openmm as mm import simtk.unit as u import mdtraj as md from copy import copy, deepcopy import re from cclib.parser import Gaussian from cclib.parser.utils import convertor from mdt...
gpl-2.0
-6,031,330,545,912,923,000
35.068729
133
0.588034
false
nijel/stardicter
stardicter/czechenglish.py
1
1575
# -*- coding: utf-8 -*- # # Copyright © 2006 - 2017 Michal Čihař <michal@cihar.com> # # This file is part of Stardicter <https://cihar.com/software/slovnik/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwar...
gpl-3.0
-5,843,448,257,105,317,000
32.913043
71
0.695513
false
lahosken/pants
src/python/pants/java/nailgun_client.py
5
7580
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import errno import ...
apache-2.0
7,815,629,937,154,507,000
41.111111
102
0.653034
false
zbqf109/goodo
openerp/addons/payment_sips/models/sips.py
3
9106
# -*- coding: utf-'8' "-*-" try: import simplejson as json except ImportError: import json import logging from hashlib import sha256 import urlparse import unicodedata from openerp import models, fields, api from openerp.tools.float_utils import float_compare from openerp.tools.translate import _ from openerp...
gpl-3.0
5,179,069,987,020,952,000
38.25
120
0.570174
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/keyword_plan_service/transports/__init__.py
3
1043
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
7,617,299,715,411,346,000
32.645161
89
0.767977
false
tntnatbry/tensorflow
tensorflow/python/ops/nn_test.py
19
33278
# 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
2,544,545,218,948,381,700
36.307175
80
0.594026
false
pyjobs/web
pyjobs_web/pyjobsweb/model/elasticsearch_model/company.py
1
3244
# -*- coding: utf-8 -*- import elasticsearch_dsl as es from pyjobsweb.lib.elasticsearch_ import compute_index_name class Company(es.DocType): class Meta: index = 'companies' doc_type = 'company' french_elision = es.token_filter( 'french_elision', type='elision', artic...
mit
-8,846,263,115,708,567,000
23.515152
69
0.530284
false
tansey/gfl
pygfl/logistic_solver.py
1
2240
import numpy as np from numpy.ctypeslib import ndpointer from ctypes import * from pygfl.utils import * from pygfl.solver import TrailSolver # Load the graph fused lasso library try: logistic_graphfl_lib = cdll.LoadLibrary("libgraphfl.so") except OSError: # If the installation isn't available on LD_LIBRARY_PAT...
lgpl-3.0
-8,542,383,052,167,412,000
42.076923
121
0.623214
false
vinodkc/spark
examples/src/main/python/wordcount.py
27
1418
# # 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
5,795,214,979,285,744,000
32.761905
74
0.673484
false
gimite/personfinder
app/flag_note.py
1
3165
#!/usr/bin/python2.7 # Copyright 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 ...
apache-2.0
-8,312,194,342,809,161,000
40.644737
120
0.61643
false
jessamynsmith/eggtimer-server
eggtimer/settings.py
1
6290
# Django settings for eggtimer project. import os from django.utils.dateparse import parse_datetime import dj_database_url from email.utils import formataddr HOME_DIR = os.path.expanduser("~") BASE_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir)) ADMINS = ( (os.environ.get('ADMIN_...
mit
-4,398,288,394,248,932,000
29.682927
98
0.679968
false
kustodian/ansible
lib/ansible/modules/system/service_facts.py
16
10379
#!/usr/bin/python # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # originally copied from AWX's scan_services module to bring this functionality # into Core from __future__ import absolute_import, division, print_function __metaclass__ = type ...
gpl-3.0
1,744,175,460,716,717,300
40.682731
150
0.561615
false
nrudenko/anarcho
anarchoApp/api_tests/test_team.py
1
3847
from api_tests import AnarchoTestCase from anarcho.models.user import User from anarcho.models.user_app import UserApp test_team_user_email = 'test2@mail.com' test_team_user_name = 'test_name2' class TeamTest(AnarchoTestCase): def setUp(self): AnarchoTestCase.setUp(self) self.register() ...
mit
9,175,762,444,461,935,000
39.505263
104
0.644918
false
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/tensorflow/python/training/training.py
6
11555
# 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...
agpl-3.0
4,014,976,931,703,586,300
36.761438
97
0.792557
false
jiangzhw/SPF
spf/modules/theharvester.py
8
1193
import re import os import subprocess import tempfile from modules.dataCollector import dataCollector class theHarvester(dataCollector): def __init__(self, domain, path, display): dataCollector.__init__(self, domain, path, "theHarvester", display) (garbage, self.outfile) = tempfile.mkstemp(suffix=...
bsd-3-clause
3,164,024,515,377,885,000
33.085714
169
0.610226
false
supermari0/ironic
ironic/common/config.py
17
1141
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # 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 ...
apache-2.0
-3,654,655,260,568,023,000
37.033333
78
0.722174
false
venkat0708/icecream
docs/conf.py
1
7891
# -*- coding: utf-8 -*- # # icecream_project 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 valu...
bsd-3-clause
6,676,328,331,413,885,000
31.208163
80
0.698897
false
Murali-group/GraphSpace
docs/conf.py
1
10096
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # graphspace-manual documentation build configuration file, created by # sphinx-quickstart on Tue Mar 21 01:03:05 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
gpl-2.0
-1,141,918,303,103,142,500
27.681818
80
0.694334
false
crs4/pyEHR
test/pyehr/ehr/services/dbmanager/dbservices/test_version_manager.py
2
10965
import unittest, sys, os, uuid, random, copy from pyehr.ehr.services.dbmanager.dbservices import DBServices from pyehr.ehr.services.dbmanager.dbservices.wrappers import PatientRecord,\ ClinicalRecord, ClinicalRecordRevision, ArchetypeInstance from pyehr.ehr.services.dbmanager.errors import OptimisticLockError,\ ...
mit
1,788,116,691,555,050,800
46.267241
103
0.627086
false
ales-erjavec/anyqt
AnyQt/QtWidgets.py
1
11055
from warnings import warn from . import _api # Names imported from Qt4's QtGui module __Qt4_QtGui = [ 'QAbstractButton', 'QAbstractGraphicsShapeItem', 'QAbstractItemDelegate', 'QAbstractItemView', 'QAbstractScrollArea', 'QAbstractSlider', 'QAbstractSpinBox', 'QAction', 'QActionGrou...
gpl-3.0
-3,937,240,286,949,035,500
29.122616
84
0.691
false
nvoron23/owasp-pysec
pysec/utils.py
4
4467
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec 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...
apache-2.0
6,365,216,507,317,321,000
25.748503
156
0.586971
false
venicegeo/eventkit-cloud
eventkit_cloud/api/tests/test_notifications.py
1
1945
# -*- coding: utf-8 -*- import os from django.contrib.auth.models import Group, User from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from eventkit_cloud.core.helpers import sendnotification, NotificationVerb, NotificationLevel # from ...
bsd-3-clause
-25,658,885,582,931,536
40.382979
104
0.662725
false
Bachmann1234/pytest
_pytest/runner.py
3
16984
""" basic collect and runtest protocol implementations """ import bdb import sys from time import time import py import pytest from _pytest._code.code import TerminalRepr, ExceptionInfo def pytest_namespace(): return { 'fail' : fail, 'skip' : skip, 'importorskip' : importo...
mit
1,096,846,667,274,738,700
32.171875
79
0.604451
false
jebpublic/pybvc
samples/samplenetconf/demos/vr_demo6.py
4
6989
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyright n...
bsd-3-clause
8,553,185,380,699,407,000
33.259804
78
0.60724
false
filipenf/ansible
lib/ansible/plugins/action/__init__.py
3
39271
# (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
2,241,425,962,940,953,900
45.255595
326
0.599654
false
lizardsystem/lizard-damage
lizard_damage/templatetags/formatting.py
1
1321
from django import template register = template.Library() def split_len(seq, length): """splits a string into length sized strings, beginning at the end""" result = [seq[max(i - length, 0):i] for i in range(len(seq), 0, -length)] result.reverse() return result @register.filter() def euroformat(valu...
gpl-3.0
-3,460,470,603,933,927,000
20.306452
77
0.545042
false
tectronics/chimerascan
chimerascan/deprecated/gene_to_genome2.py
12
2125
''' Created on Jan 31, 2011 @author: mkiyer chimerascan: chimeric transcript discovery using RNA-seq Copyright (C) 2011 Matthew Iyer This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version ...
gpl-3.0
8,387,176,535,562,690,000
35.016949
80
0.664471
false