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
open-power-ref-design-toolkit/cluster-genesis
software/paie112.py
1
74088
#! /usr/bin/env python # Copyright 2019 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
9,169,767,854,707,613,000
43.793229
100
0.513322
false
fabiand/anaconda
pyanaconda/timezone.py
3
6441
# # Copyright (C) 2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
gpl-2.0
5,350,825,474,400,793,000
28.682028
78
0.643844
false
d-plaindoux/fluent-rest
fluent_rest/runtime/filter.py
1
3865
# Copyright (C)2016 D. Plaindoux. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2, or (at your option) any # later version. import inspect from fluent_rest.spec impor...
lgpl-2.1
4,175,094,459,938,144,000
30.942149
78
0.63881
false
tchernomax/ansible
lib/ansible/module_utils/ec2.py
14
28070
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
6,600,999,521,297,061,000
37.986111
152
0.611649
false
normanmaurer/autobahntestsuite-maven-plugin
src/main/resources/autobahntestsuite/case/case1_2_2.py
14
1337
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ## ## ht...
apache-2.0
-8,320,442,274,870,681,000
39.78125
112
0.600598
false
tensorflow/ngraph-bridge
test/python/test_cast.py
1
1774
# ============================================================================== # Copyright 2018-2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
apache-2.0
8,793,015,199,251,692,000
33.115385
80
0.607666
false
grigorisg9gr/menpo3d
menpo3d/rasterize/base.py
3
3482
def rasterize_mesh_from_barycentric_coordinate_images(mesh, bcoords_image, tri_indices_image): r""" Renders an image of a `menpo.shape.TexturedTriMesh` or `menpo.shape.ColouredTriMesh` from a barycentric coordinate image pair. Note that the texture ...
bsd-3-clause
5,081,503,443,686,180,000
46.054054
80
0.664561
false
stimpsonsg/moose
python/MooseDocs/html2latex/MooseExtension.py
4
1500
from Extension import Extension from moose_elements import * class MooseExtension(Extension): """ Aggregates the MOOSE specific element objects into an extension for html to latex conversion. """ def extend(self, translator): config = self.getConfigs() translator.elements.add('moose_i...
lgpl-2.1
3,872,035,656,216,660,000
50.724138
104
0.657333
false
ramon-astudillo/lxmls-toolkit
lxmls/sequences/bak/forward_backward_2.py
3
2093
import numpy as np # ---------- # Computes the forward backward trellis for a given sequence # N - Lenght of sequence # H - Number of hidden states # Receives: # Node potentials (N,H) vector # Edge potentials (N-1,H,H) # ---------- def forward_backward(node_potentials, edge_potentials): H, N = node_potentials.sha...
mit
-145,053,589,913,879,680
38.490566
96
0.599618
false
sloria/modular-odm
tests/queries/test_logical_operators.py
4
1811
from modularodm import fields, StoredObject from modularodm.query.querydialect import DefaultQueryDialect as Q from tests.base import ModularOdmTestCase class LogicalOperatorsBase(ModularOdmTestCase): def define_objects(self): class Foo(StoredObject): _id = fields.IntegerField(required=True, p...
apache-2.0
1,969,003,466,511,118,000
26.029851
78
0.478189
false
nilathak/gentoo-cruft
pylon/ui.py
1
4929
''' provides a ui class which contains all user interface specific code. - a logger based on the logging module - a default parser based on the argparse module - a custom exception handler to control traceback output (eg, during multithreading) - a few stub functions for overloading in a more specific ui class ''' im...
gpl-2.0
5,971,663,844,420,374,000
34.978102
132
0.592209
false
cloudfoundry/php-buildpack
lib/httpd/extension.py
8
1638
# 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,133,047,946,178,950,000
30.5
74
0.643468
false
fqul/scrapy
tests/test_dupefilters.py
15
1661
import hashlib import unittest from scrapy.dupefilters import RFPDupeFilter from scrapy.http import Request from scrapy.utils.python import to_bytes class RFPDupeFilterTest(unittest.TestCase): def test_filter(self): dupefilter = RFPDupeFilter() dupefilter.open() r1 = Request('http://scr...
bsd-3-clause
9,171,064,577,340,593,000
28.660714
74
0.657435
false
uclouvain/OSIS-Louvain
base/views/education_groups/achievement/common.py
1
3445
############################################################################ # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core bu...
agpl-3.0
2,461,939,139,919,578,600
40
109
0.687573
false
jyogi/purvar-agent
tests/checks/mock/test_openstack.py
19
11917
from time import sleep from unittest import TestCase from checks import AgentCheck from tests.checks.common import AgentCheckTest, load_check, load_class from mock import patch OS_CHECK_NAME = 'openstack' OpenStackProjectScope = load_class(OS_CHECK_NAME, "OpenStackProjectScope") KeystoneCatalog = load_class(OS_CHECK...
bsd-3-clause
2,928,608,700,257,250,000
38.989933
146
0.529831
false
ikn/boom
game/player.py
1
7927
from math import atan2, degrees from random import gauss from pygame import Rect from .engine import conf, gfx, util, entity from .engine.evt import bmode from .entity import Entity from .mine import Mine from .util import line_intersects_rects, pt_dist def closest_intersect (src, dest, rects): pts = line_inter...
gpl-3.0
-355,076,024,412,575,300
29.606178
79
0.489845
false
assassinen/sel-3
python_example/test_l07.py
1
1326
__author__ = 'NovikovII' #!/usr/bin/env python3 # -*- coding: utf-8 -*- from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait from python_example.fixture.fixture import driver def test_l07(driver): dr...
apache-2.0
-5,331,407,694,552,531,000
38
85
0.668175
false
JenniferShelton/read-cleaning-format-conversion
KSU_bioinfo_lab/fasta-o-matic/fasta_clean.py
3
4541
#!/usr/bin/env python ########################################################################## # USAGE: import fasta_clean # DESCRIPTION: Makes sure a FASTA file is formatted in the way we expect # with wrapped sequence lines, unix newline characters and # whitespace removed from...
mit
5,302,129,931,158,223,000
37.159664
127
0.499449
false
portaloffreedom/robot-baby
Watcher/watcher.py
2
2003
import time from watchdog.observers import Observer from watchdog.tricks import ShellCommandTrick class Watchdog: SLEEP_TIME = 5 def __init__(self, __cmd_prefix="", __cmd_suffix="", __path='.'): """ Constructor for watchdog mechanism. Given command is executed as terminal command bas...
apache-2.0
2,464,659,066,338,190,300
30.296875
84
0.501747
false
luzpaz/QGIS
tests/src/python/test_authmanager_oauth2_ows.py
15
10092
# -*- coding: utf-8 -*- """ Tests for auth manager WMS/WFS using QGIS Server through OAuth2 enabled qgis_wrapped_server.py. This is an integration test for QGIS Desktop Auth Manager WFS and WMS provider and QGIS Server WFS/WMS that check if QGIS can use a stored auth manager auth configuration to access an OAuth2 Reso...
gpl-2.0
-7,765,616,038,647,268,000
36.348148
161
0.623165
false
ozburo/youtube-dl
youtube_dl/extractor/infoq.py
6
5072
# coding: utf-8 from __future__ import unicode_literals from ..compat import ( compat_b64decode, compat_urllib_parse_unquote, compat_urlparse, ) from ..utils import ( determine_ext, update_url_query, ) from .bokecc import BokeCCBaseIE class InfoQIE(BokeCCBaseIE): _VALID_URL = r'https?://(?:w...
unlicense
-3,598,789,930,153,303,600
35.934307
169
0.561067
false
adam-incuna/imperial-painter
test_app/settings.py
2
1745
import os import dj_database_url BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = bool(os.environ.get('DEBUG', True)) ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ( 'painter', 'test_app', 'django_extensions', 'django.contrib.auth', 'django.contrib.contenttypes', 'd...
mit
-2,089,968,417,175,643,400
23.577465
87
0.65043
false
dhomeier/astropy
astropy/timeseries/periodograms/lombscargle/implementations/utils.py
3
5013
from math import factorial import numpy as np def bitceil(N): """ Find the bit (i.e. power of 2) immediately greater than or equal to N Note: this works for numbers up to 2 ** 64. Roughly equivalent to int(2 ** np.ceil(np.log2(N))) """ return 1 << int(N - 1).bit_length() def extirpolate(x, y...
bsd-3-clause
9,208,805,311,177,000,000
30.727848
79
0.574706
false
rchaber/publishbay
boilerplate/external/babel/messages/checkers.py
19
6417
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software cons...
lgpl-3.0
-4,901,518,939,735,194,000
34.87931
78
0.59919
false
tsuna/tcollector
collectors/0/tcollector.py
2
5473
#!/usr/bin/python # This file is part of tcollector. # Copyright (C) 2013 ProfitBricks GmbH # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at your ...
gpl-3.0
516,319,852,061,195,650
30.454023
79
0.581034
false
trabucayre/gnuradio
gr-blocks/python/blocks/qa_vco.py
1
1819
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks import math def sig_source_f(samp_rate, freq, amp, N): t = [float(x) / samp_rate for x in range(N)] y = [am...
gpl-3.0
527,838,367,891,515,600
24.985714
76
0.556899
false
austin-garrard/Blobber
src/resource.py
1
2541
from random import randint, uniform class Resource: def __init__(self, xy, radius, value): self.xy = xy self.color = (0,255,0) self.radius = radius self.value = value self.name = 'res' def change_pos(self, new_x, new_y): self.xy = (new_x, new_y) def updatePos(self): pass class Cen...
gpl-2.0
1,413,024,260,717,696,500
30
61
0.632822
false
jstepien/spit
spit/network.py
1
21454
import socket, sys, pickle, select, os, zlib, errno import game """A protocol version tuple: major and minor version. The minor version is increased when the protocol changes without breaking the backward compatibility. The major version changes when the protocol becomes incompatible with previous versions. Thus clien...
gpl-3.0
-3,029,758,972,598,041,600
40.577519
84
0.522607
false
ehashman/oh-mainline
vendor/packages/kombu/kombu/serialization.py
20
14799
""" kombu.serialization =================== Serialization utilities. """ from __future__ import absolute_import import codecs import os import sys import pickle as pypickle try: import cPickle as cpickle except ImportError: # pragma: no cover cpickle = None # noqa from collections import namedtuple from ...
agpl-3.0
8,434,037,319,424,792,000
31.525275
79
0.62984
false
nmartensen/pandas
pandas/tests/frame/test_alter_axes.py
4
37525
# -*- coding: utf-8 -*- from __future__ import print_function import pytest from datetime import datetime, timedelta import numpy as np from pandas.compat import lrange from pandas import (DataFrame, Series, Index, MultiIndex, RangeIndex, date_range, IntervalIndex, to_dateti...
bsd-3-clause
-8,005,331,627,058,506,000
37.72549
79
0.489007
false
jbonofre/beam
sdks/python/apache_beam/io/gcp/tests/utils_test.py
4
3827
# # 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,975,059,935,398,905,000
34.766355
78
0.66266
false
rajul/mne-python
examples/visualization/plot_topo_compare_conditions.py
11
2389
""" ================================================= Compare evoked responses for different conditions ================================================= In this example, an Epochs object for visual and auditory responses is created. Both conditions are then accessed by their respective names to create a sensor layout...
bsd-3-clause
4,747,383,452,194,195,000
30.434211
79
0.625366
false
yusufb/file-manager
ui/searchListUI.py
1
2127
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'bookmarkListUI.ui' # # Created: Sun May 25 15:06:30 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui, Qt import sys try: _fromUtf8 = QtCore.QString....
gpl-3.0
4,899,884,728,804,941,000
32.761905
80
0.693465
false
rhurkes/chasegame
venv/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/engine.py
6
6243
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
mit
3,982,424,861,392,290,000
36.836364
79
0.740509
false
datastax/python-driver
cassandra/datastax/graph/types.py
1
5798
# Copyright DataStax, 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 writing, softwa...
apache-2.0
-7,927,502,985,882,278,000
26.609524
148
0.588306
false
abhikeshav/ydk-py
core/ydk/providers/codec_provider.py
1
2490
# ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
apache-2.0
-2,383,996,256,958,830,000
35.086957
98
0.639357
false
acorbe/torrent-migration-helper
torrent_migration_helper.py
1
6268
#!/usr/bin/env python """torrent_migration_helper given a folder containing a set A of .torrent files, a folder containing a set B of downloaded files, [a string STR which is expected to be in the final torrent tracker name] a subset of .torrent in A such that the torrent has been downloaded in B ...
gpl-2.0
2,012,223,801,593,562,400
33.251366
278
0.6388
false
alexryndin/ambari
ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py
5
2437
# -*- coding: utf-8 -*- """ ambari_jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: ...
apache-2.0
-8,816,913,606,122,467,000
32.383562
80
0.691424
false
mammique/django
django/contrib/admin/actions.py
5
3184
""" Built-in, globally-available admin actions. """ from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response import TemplateResponse from django.utils...
bsd-3-clause
-5,815,250,412,941,063,000
37.361446
95
0.673681
false
tcarobruce/us-mayors
mayors.py
1
5192
#!/usr/bin/env python """ mayors.py - scrape information about US Mayors from usmayors.org """ import argparse import csv import json from datetime import datetime from os.path import splitext import requests from lxml import html STATES = { "AK": "Alaska", "AL": "Alabama", "AR": "Arkansas", "AS": "...
mit
1,625,337,328,617,739,800
24.96
86
0.569723
false
cchurch/ansible
lib/ansible/cli/arguments/option_helpers.py
13
16420
# Copyright: (c) 2018, 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 import copy import operator import argparse import os import os.path import sys import time import...
gpl-3.0
4,984,088,760,433,884,000
44.611111
144
0.616626
false
DavidAndreev/indico
indico/util/string_test.py
1
7885
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
6,633,426,769,576,582,000
35.169725
119
0.561953
false
RatulSaha/leetcode
001-050/011-contains-most-water.py
1
1392
""" STATEMENT Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. CLA...
mit
5,954,015,889,920,177,000
36.621622
110
0.660201
false
Nidylei/azure-linux-automation
remote-scripts/RemoteCopy.py
8
1464
#!/usr/bin/python import argparse import sys from azuremodules import * import paramiko import azuremodules parser = argparse.ArgumentParser() parser.add_argument('-c', '--serverip', help='specifies server VIP of server name', required=True) parser.add_argument('-m', '--mode', help='switch : specify "upload" or "dow...
apache-2.0
2,106,124,264,224,992,300
36.538462
151
0.743852
false
nirbheek/cerbero
test/test_cerbero_ide_pkgconfig.py
27
3111
#!/usr/bin/env python # 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 So...
lgpl-2.1
-6,374,893,418,650,670,000
40.48
78
0.661202
false
byterom/android_external_chromium_org
tools/cr/cr/targets/target.py
44
4463
# 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. """Module to hold the Target plugin.""" import operator import re import cr import cr.base.context DEFAULT = cr.Config.From( CR_DEFAULT_TARGET='chrome'...
bsd-3-clause
4,266,460,641,322,779,600
27.980519
78
0.641273
false
GoogleCloudPlatform/training-data-analyst
self-paced-labs/tensorflow-2.x/census/trainer/model.py
4
2904
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
2,626,484,259,290,972,700
33.164706
80
0.689738
false
anderojas1/moodle
moodle/moodle/settings.py
1
3079
""" Django settings for moodle project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths i...
gpl-2.0
2,914,428,871,197,563,400
25.316239
71
0.68204
false
safalNeupane/TestIt
testit.py
1
1963
#!/usr/bin/env python import time import os import sys import argparse import subprocess class TestIt: """Execute test files if they are modified""" def __init__(self, testFiles): self.files = testFiles self.old_time = {} self.cur_time = {} def _getModified(self): """Returns recently modified files""" ...
gpl-3.0
-6,072,755,537,296,116,000
22.369048
99
0.603158
false
dhenrygithub/QGIS
python/plugins/processing/algs/gdal/ogrsql.py
6
3204
# -*- coding: utf-8 -*- """ *************************************************************************** ogrsql.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************************...
gpl-2.0
5,991,469,534,832,261,000
34.208791
89
0.567104
false
semicoyoung/leetcode
solutions/028.Implement_strStr()/AC_rolling_hash_n.py
7
1213
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: illuz <iilluzen[at]gmail.com> # File: AC_rolling_hash_n.py # Create Date: 2015-03-06 15:02:07 # Usage: AC_rolling_hash_n.py # Descripton: class Solution: # @param haystack, a string # @param needle, a string # @return an integer ...
gpl-2.0
-4,085,151,994,210,057,000
26.568182
89
0.535037
false
agileblaze/OpenStackTwoFactorAuthentication
openstack_dashboard/dashboards/project/networks/ports/views.py
16
5037
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
8,972,426,100,918,073,000
37.159091
78
0.618424
false
jamesmcm/luigi
luigi/execution_summary.py
4
20262
# -*- coding: utf-8 -*- # # Copyright 2015-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
5,799,251,319,585,199,000
40.605749
155
0.606752
false
wunderlins/learning
python/zodb/lib/osx/ZConfig/tests/test_datatypes.py
2
15327
############################################################################## # # Copyright (c) 2002, 2003 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
gpl-2.0
-4,808,217,243,733,428,000
35.579952
91
0.578522
false
bcl/anaconda
pyanaconda/ui/categories/customization.py
17
1393
# Localization category classes # # Copyright (C) 2011, 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is d...
gpl-2.0
-2,610,193,471,564,894,000
42.53125
77
0.752333
false
nowls/gnuradio
grc/gui/Colors.py
17
1969
""" Copyright 2008,2013 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
gpl-3.0
4,934,265,944,466,381,000
38.38
83
0.728288
false
MDXDave/ModernWebif
plugin/controllers/models/control.py
1
5595
# -*- coding: utf-8 -*- ############################################################################## # 2011 E2OpenPlugins # # # # This file is open source software; you can redistribute...
gpl-2.0
-6,510,634,847,256,786,000
31.719298
303
0.653798
false
camradal/ansible
lib/ansible/modules/database/postgresql/postgresql_lang.py
25
10095
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014, Jens Depuydt <http://www.jensd.be> # # 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 L...
gpl-3.0
-399,532,289,757,774,500
33.336735
159
0.647647
false
voidcc/POXPOF
pox/lib/recoco/recoco.py
2
25749
# Copyright 2011-2013 James McCauley # # 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 ...
apache-2.0
2,807,824,183,292,650,500
29.080607
82
0.584877
false
guillermooo-forks/Vintageous
tests/commands/test__vi_big_e.py
9
1113
from collections import namedtuple from Vintageous.tests import ViewTest from Vintageous.vi.utils import modes test_data = namedtuple('test_data', 'text startRegion mode expectedRegion msg') ALL_CASES = ( test_data('01. 4', (1, 1), modes.NORMAL, (2, 2), 'Normal'), test_data('012 4', (1, 1), modes.INTERN...
mit
1,162,513,183,405,325,000
38.75
91
0.639712
false
ucloud/uai-sdk
uaitrain/api/get_train_job_predict_start_time.py
1
1951
# Copyright 2017 The UAI-SDK 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
-4,543,918,334,692,889,000
45.452381
124
0.615069
false
andrewcmyers/tensorflow
tensorflow/contrib/keras/python/keras/layers/convolutional_recurrent.py
25
24296
# 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,820,626,537,844,753,000
40.040541
80
0.630762
false
hanlind/nova
nova/virt/hyperv/driver.py
3
15289
# Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # 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
9,137,694,425,202,053,000
41.706704
79
0.595461
false
Cloudzero/cloudzero-reactor-aws
reactor/features/resources/enrich_plugins/ec2/network_interface.py
1
12944
# -*- coding: utf-8 -*- # Copyright (c) 2016-present, CloudZero, Inc. All rights reserved. # Licensed under the BSD-style license. See LICENSE file in the project root for full license information. """ Enrichment plugin for EC2 Network Interface (ENI) resource types. This resource type is explicitly supported by Amazo...
bsd-3-clause
-3,504,019,114,605,472,000
50.569721
120
0.644391
false
elkingtonmcb/cloudbiolinux
cloudbio/cloudbiolinux.py
10
1916
"""CloudBioLinux specific scripts """ import os from fabric.api import * from fabric.contrib.files import * from cloudbio.custom import shared def _freenx_scripts(env): """Provide graphical access to clients via FreeNX. """ home_dir = env.safe_run_output("echo $HOME") setup_script = "setupnx.sh" b...
mit
-2,508,022,323,949,165,000
40.652174
104
0.655532
false
andreaso/ansible
lib/ansible/playbook/play.py
11
12480
# (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
-7,250,526,678,271,705,000
36.253731
137
0.59976
false
akaariai/django
tests/httpwrappers/tests.py
30
26829
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import copy import json import os import pickle import unittest from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder from django.core.signals import request_finished from django.db import clo...
bsd-3-clause
-6,559,107,247,882,449,000
37.511494
94
0.600022
false
jonian/kickoff-player
widgets/streambox.py
1
3755
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject from helpers.gtk import add_widget_class, image_from_path class StreamBox(Gtk.Box): __gtype_name__ = 'StreamBox' stream = GObject.property(type=object, flags=GObject.PARAM_READWRITE) callback = GObject.property(type=object, ...
gpl-3.0
7,803,798,225,231,156,000
27.44697
90
0.677763
false
Ladaniels/censusreporter
censusreporter/apps/census/templatetags/partition.py
10
4524
""" Template filters to partition lists into rows or columns. A common use-case is for splitting a list into a table with columns:: {% load partition %} <table> {% for row in mylist|columns:3 %} <tr> {% for item in row %} <td>{{ item }}</td> {% endfor %} </tr> ...
mit
-786,298,356,566,191,000
23.592391
80
0.46618
false
tomkralidis/GeoHealthCheck
GeoHealthCheck/__init__.py
3
1467
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # 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 ...
mit
-3,211,174,613,477,137,400
37.605263
67
0.687117
false
choderalab/ThermoPyL
thermopyl/thermoml_lib.py
2
7207
import numpy as np import re import copy import pandas as pd from . import thermoml_schema # Obtained by `wget http://media.iupac.org/namespaces/ThermoML/ThermoML.xsd` and `pyxbgen ThermoML.xsd` class Parser(object): def __init__(self, filename): """Create a parser object from an XML filename.""" ...
gpl-2.0
6,158,946,275,024,231,000
44.327044
146
0.584154
false
tchellomello/home-assistant
homeassistant/components/cover/device_action.py
9
6180
"""Provides device automations for Cover.""" from typing import List, Optional import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, CONF_DEVICE_ID, CONF_DOMAIN, CONF_ENTITY_ID, CONF_TYPE, SERVICE_CLOSE_COVER, SERVICE_CLOSE_COVER_TILT, ...
apache-2.0
4,451,048,983,173,102,000
31.698413
86
0.543528
false
btenaglia/hpc-historias-clinicas
hpc-historias-clinicas/fojas_quirurgicas/migrations/0009_auto_20150506_0117.py
1
1096
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('fojas_quirurgicas', '0008_auto_20150505_2053'), ] operations = [ migrations.AlterField( model_na...
bsd-3-clause
2,529,253,372,075,745,000
32.212121
139
0.597628
false
kabakchey/django-annoying
setup.py
1
2610
from annoying import __version__ from setuptools import setup, find_packages setup( name="django-annoying", version=__version__, packages=['annoying'], author="Stavros Korokithakis", author_email="stavros@korokithakis.net", description="This is a django application that tries to eliminate annoy...
bsd-3-clause
4,905,829,680,932,158,000
44
132
0.636782
false
thesuperzapper/tensorflow
tensorflow/contrib/distributions/python/ops/distribution.py
3
38481
# 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
-3,494,982,006,322,052,000
33.698828
80
0.657155
false
KronoSKoderS/CalPack
calpack/models/fields/IntFields.py
1
6249
""" """ import ctypes from calpack.models.fields import Field, BYTE_SIZE from calpack.utils import typed_property __all__ = [ 'IntField', 'IntField8', 'IntField16', 'IntField32', 'IntField64' ] class IntField(Field): """ An Integer field. This field can be configured to be signed or unsigned. It's bit...
mit
-635,531,106,161,597,300
43.956835
99
0.673388
false
rwade42/GameMaster
client.py
1
1774
from flask import Flask, request, make_response, make_response from slackclient import SlackClient from TriviaGame import load_trivia from button_json import generate_button_json from gameplay import * import os import json # App's Slackbot user token SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"] SLACK_VERIFICAT...
mit
-6,435,240,125,242,046,000
30.678571
434
0.695603
false
Arcanemagus/SickRage
tests/sickrage_tests/system/shutdown_tests.py
1
2074
# coding=utf-8 # This file is part of SickRage. # # URL: https://sick-rage.github.io # Git: https://github.com/Sick-Rage/Sick-Rage.git # # 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, either versio...
gpl-3.0
4,476,693,702,913,620,500
26.289474
92
0.635005
false
bohlian/frappe
frappe/utils/jinja.py
3
6075
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals def get_jenv(): import frappe if not getattr(frappe.local, 'jenv', None): from jinja2 import Environment, DebugUndefined # frappe will be loaded last, so app templates wil...
mit
-4,252,877,944,635,622,400
28.066986
107
0.695144
false
mat128/netman
netman/core/objects/exceptions.py
2
9177
# Copyright 2015 Internap. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-1,146,578,154,553,787,100
34.988235
161
0.689005
false
intel-hpdd/intel-manager-for-lustre
chroma_api/utils.py
1
16877
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import sys import traceback import logging import itertools from chroma_core.models.jobs import SchedulingError import bisect from collections import namedtuple from d...
mit
-5,619,192,406,841,260,000
37.269841
137
0.61652
false
karthik339/Agni
MainDemo/flask/lib/python2.7/site-packages/migrate/tests/versioning/test_shell.py
27
25016
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import tempfile from cStringIO import StringIO from sqlalchemy import MetaData, Table from nose.plugins.skip import SkipTest from migrate.exceptions import * from migrate.versioning.repository import Repository from migrate.versioning import genmodel...
apache-2.0
-8,425,603,622,678,057,000
43.992806
141
0.619444
false
immenz/pyload
module/plugins/hoster/CloudzillaTo.py
2
2032
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" __version__ = "0.06" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)' ...
gpl-3.0
8,265,166,232,704,824,000
32.311475
118
0.517224
false
isyippee/ceilometer
ceilometer/storage/sqlalchemy/migrate_repo/versions/024_event_use_floatingprecision.py
9
2206
# # Copyright 2013 eNovance SAS <licensing@enovance.com> # # 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
944,523,893,478,122,100
38.392857
78
0.651405
false
ineiti/cothorities
byzcoin/simulation/plot_sim.py
2
2675
import matplotlib.pyplot as plt import pandas as pd import os data_dir = './test_data/' files = [(data_dir + fname) for fname in os.listdir(data_dir)\ if fname.startswith('coins') and fname.endswith('.csv')] def read_all_files(files): df = pd.DataFrame() for fname in files: data = pd.read_csv...
gpl-2.0
-6,581,748,470,544,917
36.152778
98
0.538692
false
igor-toga/local-snat
neutron/extensions/extraroute.py
5
2402
# Copyright 2013, Nachi Ueno, NTT MCL, 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 # # Unles...
apache-2.0
-192,061,816,716,873,900
31.026667
78
0.659034
false
wjwwood/open-robotics-platform
dash/lib/builders/toolbar.py
1
8747
#!/usr/bin/env python -OO # encoding: utf-8 ########### # ORP - Open Robotics Platform # # Copyright (c) 2010 John Harrison, William Woodall # # 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 Softwa...
mit
7,267,131,997,484,712,000
41.057692
116
0.634275
false
xuweiliang/Codelibrary
nova/conf/quota.py
1
7635
# Copyright 2010 United States Government as represented by the # 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 ...
apache-2.0
-1,850,030,440,321,036,800
29.297619
79
0.65632
false
biln/airflow
tests/operators/subdag_operator.py
6
3517
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-6,480,159,040,743,236,000
35.257732
123
0.661359
false
jawed123/django-stripe-payments
payments/tests/test_middleware.py
9
4083
# pylint: disable=C0301 import decimal from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.utils import timezone from django.contrib.auth import authenticate, login, logout from mock import Mock from ..middleware import ActiveSubscriptionMiddlew...
mit
4,779,521,651,120,723,000
34.504348
90
0.661768
false
Lyleo/nupic
tests/external/asteval_test.py
14
1339
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
gpl-3.0
-4,661,468,881,894,785,000
32.475
80
0.664675
false
EricSekyere/airmozilla
airmozilla/cronlogger/decorators.py
15
1456
import time import sys import functools import contextlib import traceback from StringIO import StringIO from .models import CronLog @contextlib.contextmanager def redirect_streams(stdout, stderr): sys.stdout = stdout sys.stderr = stderr yield sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr...
bsd-3-clause
6,400,474,332,258,922,000
27
71
0.488324
false
harterj/moose
python/MooseDocs/extensions/floats.py
8
6225
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import uuid...
lgpl-2.1
3,005,966,960,112,361,000
36.053571
99
0.631486
false
torbjoernk/easybuild-framework
easybuild/tools/toolchain/variables.py
6
6177
# # # Copyright 2012-2015 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://vscentrum.be/nl/en), # the Hercules foundation (ht...
gpl-2.0
4,122,369,144,506,819,600
33.898305
135
0.639145
false
enikulenkov/PaGMO
PyGMO/core/__init__.py
1
16421
# -*- coding: utf-8 -*- from _core import * import threading as _threading import signal as _signal import os as _os __doc__ = 'PyGMO core module.' __all__ = ['archipelago','base_island','champion','distribution_type','individual','ipy_island','island','local_island','migration_direction','population','py_island'] _o...
gpl-3.0
2,609,840,863,474,202,000
35.010965
170
0.709336
false
walterbender/portfolio
odf/odfmanifest.py
1
3579
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the L...
gpl-3.0
8,217,278,869,497,445,000
29.581197
80
0.609558
false
keskitalo/healpy
doc/create_images.py
3
1125
import healpy as hp import numpy as np import matplotlib.pyplot as plt SIZE = 400 DPI = 60 m = np.arange(hp.nside2npix(32)) hp.mollview(m, nest=True, xsize=SIZE, title="Mollview image NESTED") plt.savefig("static/moll_nside32_nest.png", dpi=DPI) hp.mollview(m, nest=False, xsize=SIZE, title="Mollview image RING") plt...
gpl-2.0
2,684,837,210,397,966,300
24.568182
79
0.682667
false
dntt1/youtube-dl
youtube_dl/extractor/ustudio.py
23
4391
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, unescapeHTML, ) class UstudioIE(InfoExtractor): IE_NAME = 'ustudio' _VALID_URL = r'https?://(?:(?:www|v1)\.)?ustudio\.com/video/(?P<id>[^/]+)/(?P<display_id>[^/...
unlicense
-4,789,828,634,196,561,000
34.128
103
0.513778
false
thefab/cpu_cores
cpu_cores/linux.py
1
2219
# This file is part of cpu_cores released under the MIT license. # See the LICENSE file for more information. from cpu_cores.common import CPUCoresCounter CPUINFO_FILEPATH = "/proc/cpuinfo" def _core_hash(cpu_infos): if 'core id' not in cpu_infos and 'physical id' not in cpu_infos: return "%i" % cpu_inf...
mit
2,211,263,102,269,658,000
40.092593
73
0.561965
false
mmnelemane/nova
nova/compute/monitors/__init__.py
18
3283
# Copyright 2013 Intel Corporation. # 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 requir...
apache-2.0
-4,939,788,704,445,977,000
37.623529
79
0.604021
false