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
isohybrid/dotfile
vim/bundle/git:--github.com-klen-python-mode/pylibs/pylint/checkers/variables.py
1
22720
# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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, o...
bsd-2-clause
3,748,439,751,988,389,000
41.626642
103
0.56831
false
eicher31/compassion-modules
child_compassion/wizards/staff_notification_settings.py
4
1670
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
2,917,492,189,364,163,600
32.4
78
0.547904
false
CarlFK/steve
setup.py
2
1740
####################################################################### # This file is part of steve. # # Copyright (C) 2012-2014 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### from setuptools import ...
bsd-2-clause
-5,565,610,777,165,876,000
27.52459
72
0.551149
false
orlenko/bccf
src/bccf/migrations/0001_initial.py
1
70338
# -*- 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 model 'HomeMarquee' db.create_table(u'bccf_homemarquee', ( (u'id', self.gf('django.db.m...
unlicense
-6,630,989,827,381,660,000
78.569005
195
0.583284
false
awni/tensorflow
tensorflow/python/ops/string_ops.py
6
1228
# 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 a...
apache-2.0
-1,586,660,511,133,297,400
37.375
80
0.730456
false
LifeDJIK/S.H.I.V.A.
containers/shiva/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py
2
2254
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.replicated_map_message_type import * from hazelcast.protocol.event_response_const import * ...
mit
5,864,954,393,946,489,000
37.20339
187
0.704082
false
Ion-Petcu/StockTrainer
prices/service/stream.py
1
1498
import json import time import tornado.web from pymongo import CursorType from sse import Sse from tornado.iostream import StreamClosedError class StreamHandler(tornado.web.RequestHandler): def initialize(self): self.set_header('Content-Type', 'text/event-stream') self.set_header('Cache-Control'...
apache-2.0
6,930,875,075,670,951,000
30.208333
100
0.581442
false
Proper-Job/django-mobile-app-distribution
django_mobile_app_distribution/settings.py
2
4366
# -*- coding: utf-8 -*- from __future__ import unicode_literals from os.path import join from django.conf import settings def get(key, default): return getattr(settings, key, default) IOS = 'iOS' IOS_PLIST = 'iOS Plist' ANDROID = 'Android' OS_CHOICES = ( (IOS, 'iOS'), (ANDROID, 'Android'), ) MOBILE_APP_...
mit
4,237,352,674,075,330,000
28.261745
102
0.540596
false
j831/zulip
zerver/lib/db.py
8
2145
from __future__ import absolute_import import time from psycopg2.extensions import cursor, connection from typing import Callable, Optional, Iterable, Any, Dict, List, Union, TypeVar, \ Mapping, Text from zerver.lib.str_utils import NonBinaryStr CursorObj = TypeVar('CursorObj', bound=cursor) ParamsT = Union[Iter...
apache-2.0
-2,516,256,073,900,357,000
37.303571
125
0.672727
false
marcocor/smaph
data/collapse_wid_title_redirect_anchors.py
1
3894
import glob from collections import Counter import re EXCLUDED = ("Category:", "Wikipedia:", "Portal:", "Help:", "Template:", "File:", ":Template:", "Draft:", "Wikipedia talk:", "Talk:") def normalized(title): title = title[0].upper() + title[1:] return re.sub("_+", " ", title) def read_tsv_files(glob_pattern): f...
apache-2.0
-71,704,289,065,870,210
35.392523
132
0.674628
false
dwdm/mitro
browser-ext/login/test/chrome/pyperclip.py
26
6657
# ***************************************************************************** # Copyright (c) 2012, 2013, 2014 Lectorius, Inc. # Authors: # Vijay Pandurangan (vijayp@mitro.co) # Evan Jones (ej@mitro.co) # Adam Hilss (ahilss@mitro.co) # # # This program is free software: you can redistribute it and/or modify # ...
gpl-3.0
-844,730,150,828,919,900
35.78453
138
0.673877
false
Vizzuality/gfw-api
lib/ee_/collection.py
5
6555
"""Common representation for ImageCollection and FeatureCollection. This class is never intended to be instantiated by the user. """ # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name import apifunction import customfunction import ee_exception import ee_types import elem...
gpl-2.0
-4,379,493,211,230,267,000
31.29064
79
0.671396
false
commaai/openpilot
tools/zookeeper/__init__.py
1
2505
#!/usr/bin/env python3 # Python library to control Zookeeper import ft4222 import ft4222.I2CMaster DEBUG = False INA231_ADDR = 0x40 INA231_REG_CONFIG = 0x00 INA231_REG_SHUNT_VOLTAGE = 0x01 INA231_REG_BUS_VOLTAGE = 0x02 INA231_REG_POWER = 0x03 INA231_REG_CURRENT = 0x04 INA231_REG_CALIBRATION = 0x05 INA231_BUS_LSB =...
mit
4,308,744,571,174,942,700
29.54878
111
0.698603
false
chris48s/mapit
mapit/tests/test_middleware.py
3
2512
from unittest import skipIf import django from django.test import TestCase from django.test.client import RequestFactory from django import http from ..middleware import JSONPMiddleware class JSONPMiddlewareTest(TestCase): def setUp(self): self.middleware = JSONPMiddleware() self.factory = Requ...
agpl-3.0
4,043,871,853,515,969,000
47.307692
116
0.699045
false
srishanbhattarai/Harbor-CLI
packages/cli/lib/services/config.py
1
1633
''' Harbor allows for a configuration files called harborConfig.json usually for managing plugins supplied out of the box. This module has methods to parse the config file, and additional plugin specific helpers. ''' import os from lib.logger import logger from lib.utils.json_parser import json_parse from lib.exceptio...
mpl-2.0
215,201,545,096,694,880
24.515625
71
0.669933
false
SmartJog/lift
tests/test_loader.py
1
17720
# LIFT Integration-Functional Testing - A meta test framework # Copyright © 2014-2015 Arkena S.A and Nicolas Delvaux # # 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 L...
gpl-2.0
-8,396,012,383,819,652,000
49.338068
95
0.483774
false
huaweiswitch/neutron
neutron/extensions/securitygroup.py
4
12563
# Copyright (c) 2012 OpenStack Foundation. # 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...
apache-2.0
-3,842,301,650,651,750,400
34.488701
79
0.6032
false
mahajrod/MACE
scripts/draw_coverage.py
1
10865
#!/usr/bin/env python __author__ = 'Sergei F. Kliver' import os import argparse import pandas as pd from RouToolPa.Collections.General import SynDict, IdList from MACE.Routines import Visualization, StatsVCF parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", action="store", dest="input", required...
apache-2.0
-6,989,710,610,397,599,000
62.911765
143
0.598619
false
MarcJoan/django
tests/schema/tests.py
40
73096
import datetime import itertools import unittest from copy import copy from django.db import ( DatabaseError, IntegrityError, OperationalError, connection, ) from django.db.models import Model from django.db.models.deletion import CASCADE from django.db.models.fields import ( AutoField, BigIntegerField, Binary...
bsd-3-clause
-60,109,495,912,727,040
41.571928
114
0.612893
false
fredkingham/blog-of-fred
django/contrib/gis/shortcuts.py
79
1198
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import zipfile from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = StringIO() ...
bsd-3-clause
-6,849,048,282,991,977,000
32.277778
79
0.701169
false
machinecoin-project/machinecoin
test/functional/feature_uacomment.py
2
1717
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Machinecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -uacomment option.""" import re from test_framework.test_framework import MachinecoinTe...
mit
1,757,753,062,241,055,500
41.875
150
0.670554
false
helenst/django-extensions
django_extensions/templatetags/syntax_color.py
5
2758
r""" Template filter for rendering a string with syntax highlighting. It relies on Pygments to accomplish this. Some standard usage examples (from within Django templates). Coloring a string with the Python lexer: {% load syntax_color %} {{ code_string|colorize:"python" }} You may use any lexer in Pygments. ...
mit
4,418,357,065,918,744,000
28.031579
97
0.72045
false
phobson/statsmodels
statsmodels/genmod/tests/test_glm.py
1
69398
""" Test functions for models.GLM """ from statsmodels.compat import range import os import numpy as np from numpy.testing import (assert_almost_equal, assert_equal, assert_raises, assert_allclose, assert_, assert_array_less, dec) from scipy import stats import statsmodels.api as sm from st...
bsd-3-clause
1,776,161,249,503,312,400
37.943883
112
0.584109
false
jamielennox/tempest
tempest/api/compute/images/test_images.py
3
1901
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-7,578,484,877,094,253,000
38.604167
79
0.650184
false
fmgvalente/agent
modules/split.py
1
1110
import numpy as np import os def create_execution_script(**options): script_string = "python " + os.path.realpath(__file__)+ " "+options['input'][0].workdir + " " +options['workdir'] return script_string #needs to handle more divisions def data(workdir,channel, **options): print("data channel:"+str(cha...
gpl-3.0
5,429,041,445,281,223,000
22.617021
117
0.593694
false
kingvuplus/New
lib/python/Plugins/SystemPlugins/VideoClippingSetup/plugin.py
32
5675
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, getConfigListEntry config.plugins.VideoClippingSetup = ConfigSubsection() config.plugins.VideoClippingSetup.clip_left = ConfigInteger(default = 0) co...
gpl-2.0
3,669,645,376,071,575,000
42.320611
238
0.732511
false
ghchinoy/tensorflow
tensorflow/python/framework/indexed_slices_tensor_spec.py
1
2744
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-6,749,957,431,046,183,000
41.215385
80
0.658528
false
ddehghan/django-bootstrap-starter-project2
myproject/urls.py
1
1594
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.contrib.staticfiles.urls import staticfiles_urlpatterns from myproject import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^login-f...
mit
-3,673,439,238,842,627,000
42.108108
119
0.560226
false
mozilla/fjord
bin/in_review.py
6
10660
#!/usr/bin/env python import datetime import subprocess import sys import textwrap import urllib import requests BUGZILLA_API_URL = 'https://bugzilla.mozilla.org/rest/' BUGZILLA_PRODUCT = 'Input' QUARTERS = { 1: [(1, 1), (3, 31)], 2: [(4, 1), (6, 30)], 3: [(7, 1), (9, 30)], 4: [(10, 1), (12, 31)] } ...
bsd-3-clause
809,671,896,056,999,300
28.94382
79
0.539962
false
jerjorg/dft
tests/planewave_tests.py
1
6585
"""Various tests for the Crystal class and its methods. """ import numpy as np import pytest from operator import mod from itertools import product from pydft.crystal import * from pydft.bases.planewave import * from numpy.fft import fftn, ifftn def test_I_matrix(): """Verify the I matrix acting on the N matrix i...
gpl-3.0
892,348,165,306,560,100
30.357143
96
0.492938
false
anentropic/kombu-django-json-serializer
testing/tests/py3-dj19_testproject/py3-dj19_testproject/settings.py
6
2017
""" Django settings for dj17_testproject project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR...
mit
1,260,965,042,554,439,000
23.301205
71
0.725335
false
saga-project/bliss
bliss/plugins/sftp/sftpfile.py
1
25003
# -*- coding: utf-8 -*- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 __author__ = "Ole Christian Weidner" __copyright__ = "Copyright 2011, Ole Christian Weidner" __license__ = "MIT" from bliss.interface import FilesystemPluginInterface import os, pwd import time import bliss.saga import logging impor...
mit
-871,854,779,187,895,000
37.824534
126
0.4977
false
shurihell/testasia
cms/djangoapps/contentstore/tests/test_course_settings.py
15
53377
""" Tests for Studio Course Settings. """ import datetime import ddt import json import copy import mock from mock import patch import unittest from django.conf import settings from django.utils.timezone import UTC from django.test.utils import override_settings from contentstore.utils import reverse_course_url, reve...
agpl-3.0
-9,199,589,584,677,479,000
46.111209
130
0.641981
false
GeoscienceAustralia/PF3D
testing/merapi.py
1
3982
"""Configuration file for eruption scenario Tephra modelling validation worksheet Scenario Name: Mount Merapi 2010 (probabilistic_scenario) Run Date: 2010_11_01 Run number:1 ...
gpl-3.0
-968,604,508,843,427,600
40.915789
501
0.589905
false
Devyani-Divs/mirrormanager2
mirrormanager2/__init__.py
1
1108
# -*- coding: utf-8 -*- # # Copyright © 2014 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 t...
mit
7,784,550,271,506,510,000
38.535714
72
0.745257
false
borjam/exabgp
src/exabgp/application/validate.py
3
2683
# encoding: utf-8 """exabgp configuration validation""" import sys import syslog import argparse from exabgp.environment import getenv from exabgp.environment import getconf from exabgp.debug import trace_interceptor from exabgp.logger import log from exabgp.reactor.loop import Reactor from exabgp.configuration.c...
bsd-3-clause
9,171,071,886,434,635,000
31.325301
165
0.644801
false
Beeblio/django
django/forms/extras/widgets.py
65
5104
""" Extra HTML Widget classes """ from __future__ import unicode_literals import datetime import re from django.forms.widgets import Widget, Select from django.utils import datetime_safe from django.utils.dates import MONTHS from django.utils.encoding import force_str from django.utils.safestring import mark_safe fro...
bsd-3-clause
3,807,166,782,976,018,000
33.958904
90
0.543103
false
chemreac/chemreac
examples/four_species.py
2
4304
#!/usr/bin/env python # -*- coding: utf-8 -*- r""" Four species two reactions -------------------------- :download:`examples/four_species.py` demonstrates how to use the plotting utilities ``plot_per_reaction_contribution`` and ``plot_jacobian``. The reaction system is as follows: .. math:: A &\rightarrow B ~~~...
bsd-2-clause
-3,547,343,968,789,288,400
28.278912
75
0.560177
false
FujitsuEnablingSoftwareTechnologyGmbH/tempest
tempest/api/network/admin/test_external_network_extension.py
15
5937
# 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 # d...
apache-2.0
3,748,743,144,215,471,000
45.748031
78
0.63837
false
nharraud/b2share
invenio/modules/formatter/format_elements/bfe_video_selector.py
13
5100
# -*- coding: utf-8 -*- # # 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,...
gpl-2.0
-5,295,628,060,999,598,000
45.788991
169
0.61098
false
ksrajkumar/openerp-6.1
openerp/osv/fields.py
5
70115
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
7,416,750,268,578,293,000
42.226264
228
0.554747
false
joachimmetz/plaso
plaso/cli/views.py
3
11522
# -*- coding: utf-8 -*- """View classes.""" import abc try: import win32console except ImportError: win32console = None class BaseTableView(object): """Table view interface.""" def __init__(self, column_names=None, title=None, title_level=3): """Initializes a table view. Args: column_names (...
apache-2.0
-7,285,405,944,170,245,000
28.243655
80
0.637216
false
jparyani/pycapnp
benchmark/addressbook.capnp.orphan.py
1
1282
import os import capnp this_dir = os.path.dirname(__file__) addressbook = capnp.load(os.path.join(this_dir, 'addressbook.capnp')) print = lambda *x: x def writeAddressBook(): addressBook = addressbook.AddressBook.new_message() people = addressBook.init_resizable_list('people') alice = people.add() ...
bsd-2-clause
8,830,026,652,708,462,000
24.137255
69
0.634165
false
jonparrott/gcloud-python
bigtable/docs/snippets.py
2
13515
#!/usr/bin/env python # Copyright 2018, 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 ag...
apache-2.0
4,949,598,559,463,995,000
31.723971
79
0.679245
false
neozhangthe1/scraper
douban/movie/items.py
1
2444
#encoding: utf-8 from scrapy import Field, Item class MovieItem(Item): subject_id = Field() poster = Field() website = Field() type = Field() name = Field() year = Field() directors = Field() actors = Field() languages = Field() genres = Field() #类型 runtime = Field() sta...
gpl-2.0
-8,433,797,360,988,898,000
24.827586
93
0.527605
false
duncanwp/iris
docs/iris/example_tests/test_COP_1d_plot.py
11
1518
# (C) British Crown Copyright 2010 - 2016, Met Office # # This file is part of Iris. # # Iris 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 option) any l...
lgpl-3.0
-6,237,513,566,760,710,000
36.02439
74
0.685771
false
williballenthin/synapse
synapse/tests/common.py
1
3596
import os import shutil import logging import tempfile import unittest import threading import contextlib logging.basicConfig(level=logging.WARNING) import synapse.cortex as s_cortex import synapse.eventbus as s_eventbus import synapse.lib.scope as s_scope import synapse.lib.ingest as s_ingest import synapse.lib.out...
apache-2.0
8,455,169,574,769,471,000
23.462585
78
0.598999
false
Robobench/rapman-subuser
logic/subuserlib/classes/repository.py
1
4243
#!/usr/bin/env python # This file should be compatible with both Python 2 and 3. # If it is not, please file a bug report. """ A repository is a collection of ``ImageSource`` s which are published in a git repo. """ #external imports import os,shutil,io,json #internal imports import subuserlib.git,subuserlib.classes....
lgpl-3.0
-5,682,451,956,898,099,000
34.957627
161
0.692906
false
sjoshua270/subreddit-bot
prediction_lib/cmd_line.py
1
4668
#!/sw/bin/python #by Martin Kay """comand_line class parses command-line switches and returns a dictionary containing their values plus the remainder of the command line. call: comand_line(self, h_switch='', h_string='', lg=[], \ nd=[], ags=sys.argv[1:]) Parameters of the object can b...
apache-2.0
6,650,556,038,335,996,000
27.290909
75
0.56491
false
gooddata/openstack-nova
nova/virt/hyperv/migrationops.py
7
15779
# Copyright 2013 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
5,515,282,793,737,577,000
44.604046
79
0.575385
false
MerlinZhang/osf.io
scripts/dataverse/connect_external_accounts.py
44
1295
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import logging from modularodm import Q from website.app import init_app from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.addons.dataverse.model import AddonDataverseNodeSettings logger = logging...
apache-2.0
-6,727,850,412,677,131,000
30.585366
101
0.669498
false
SteelPangolin/flask-oidc
tests/test_flask_oidc.py
2
8523
from pkg_resources import resource_filename, resource_stream import json import time import codecs from base64 import urlsafe_b64encode try: from unittest.mock import Mock, patch except ImportError: from mock import Mock, patch from six.moves.urllib.parse import urlsplit, parse_qs, urlencode from nose.tools im...
bsd-2-clause
-1,381,887,009,455,973,600
35.423077
77
0.605069
false
jahrome/viper
modules/pymacho/MachOThreadCommand.py
3
5157
# encoding: utf-8 """ Copyright 2013 Jérémie BOUTOILLE This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distri...
bsd-3-clause
-7,903,710,673,895,521,000
55.648352
136
0.620757
false
Crypto-Expert/Electrum-obsolete
lib/wallet.py
2
60321
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
gpl-3.0
-3,310,297,437,277,379,600
33.331816
193
0.527843
false
SRabbelier/Melange
thirdparty/google_appengine/google/appengine/ext/gql/__init__.py
5
39472
#!/usr/bin/env python # # Copyright 2007 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 o...
apache-2.0
-3,461,551,713,568,038,000
32.707942
80
0.634095
false
TagnumElite/VectorBot
cogs/music/__init__.py
1
10071
from discord.ext import commands from ..utils import checks, config import discord import asyncio if not discord.opus.is_loaded(): discord.opus.load_opus('opus') class VoiceEntry: def __init__(self, message, player): self.requester = message.author self.channel = message.channel self.p...
gpl-3.0
3,501,656,603,484,443,600
33.138983
111
0.585642
false
deuxpi/pytrainer
extensions/wordpress/points.py
4
2699
"""Encode/decode Google Maps points encoding Matt King, 2005-06-16 """ import random def decodePoints(points): """Decodes a string of locations encoded using the GMap encoding Accepts the encoded string and returns an array of lat/lon pairs [lat1,lon1,lat2,lon2,...]""" if not points: return []...
gpl-2.0
7,679,768,455,600,878,000
23.536364
76
0.473879
false
the-black-eagle/script.cu.lrclyrics
resources/lib/mutagen_culrc/ogg.py
2
19114
# -*- coding: utf-8 -*- # Copyright (C) 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Read and write Ogg bitstreams and pages. This module reads and write...
gpl-2.0
-5,075,534,035,614,691,000
33.879562
79
0.564717
false
mbrukman/gamebuilder
src/py/connect5_test.py
1
1902
#!/usr/bin/python # # Copyright 2009 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 a...
apache-2.0
8,683,580,705,972,504,000
31.793103
80
0.65878
false
skoppisetty/hackathon
packaging/build.py
3
4717
#!/usr/bin/env python # Running this script will build an exe if executed on Windows, and an # application bundle (.app) if executed on Mac OS X # Note that icons should be built before running this script. (We don't do this # automatically because the icon-building script wouldn't work on Windows) import sys import o...
gpl-3.0
8,451,909,015,828,961,000
38.638655
81
0.61607
false
ConcurrenyLabs/aws-pricing-tools
awspricecalculator/awslambda/pricing.py
1
2847
import json import logging from ..common import consts, phelper from ..common.models import PricingResult import tinydb log = logging.getLogger() def calculate(pdim): log.info("Calculating Lambda pricing with the following inputs: {}".format(str(pdim.__dict__))) ts = phelper.Timestamp() ts.start('totalCalcu...
gpl-3.0
3,339,662,163,317,263,000
41.492537
155
0.748507
false
Canaan-Creative/Avalon-Management-System
server/setup.py
1
2039
#!/usr/bin/env python3 import os import shutil import errno from setuptools import setup, find_packages from setuptools.command.install import install as _install import ams class install(_install): def run(self): _install.run(self) virtual = os.environ.get('VIRTUAL_ENV') if virtual is ...
gpl-3.0
-1,746,430,979,095,269,400
28.550725
80
0.533595
false
Linaro/squad
squad/plugins/gerrit.py
1
7009
import json import logging import re import requests import subprocess from urllib.parse import urlparse from django.conf import settings from squad.core.models import ProjectStatus from squad.core.plugins import Plugin as BasePlugin from squad.frontend.templatetags.squad import build_url as __build_url__ logger ...
agpl-3.0
357,963,700,670,403,140
36.281915
118
0.571266
false
Alexey-T/CudaText
app/cudatext.app/Contents/Resources/py/cuda_multi_installer/__init__.py
2
11440
import os from cudatext import * import cudax_lib as apx from cudax_lib import get_translation import cuda_addonman import urllib.request import tempfile _ = get_translation(__file__) # I18N URL_DB = 'https://raw.githubusercontent.com/Alexey-T/CudaText-registry/master/multi_inst/db.py' COLUMN_LEN = 20 COLUMN_W =...
mpl-2.0
3,578,086,589,383,074,300
31.77937
123
0.429371
false
HoSnoopy/rasdaq_gasjet
mainwindow.py
1
4272
""" A client/server code for Raspberry Pi ADC input Xaratustrah 2016 Modificated by HoSnoopy for the internal Gastarget in the ESR in GSI 2016 """ from PyQt5.QtWidgets import QMainWindow, QDialog, QInputDialog, QLineEdit from PyQt5.QtCore import Qt, QCoreApplication, QThread, QTimer from mainwindow_ui import Ui_M...
gpl-3.0
8,000,064,147,878,878,000
28.455172
131
0.597752
false
anbangr/trusted-nova
nova/notifier/capacity_notifier.py
5
2731
# Copyright 2011 OpenStack LLC. # 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
-4,728,226,966,872,645,000
32.716049
78
0.652142
false
huziyizero/godot
platform/haiku/detect.py
12
1749
import os import sys def is_active(): return True def get_name(): return "Haiku" def can_build(): if (os.name != "posix"): return False if (sys.platform == "darwin"): return False return True def get_opts(): return [ ('debug_release', 'Add debug symbols to release version','no') ] def get_flags(): ...
mit
7,838,995,548,146,056,000
26.761905
131
0.631218
false
laosiaudi/tensorflow
tensorflow/python/kernel_tests/tensor_array_ops_test.py
3
42929
# 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
7,043,392,811,497,222,000
35.535319
80
0.598383
false
rohitwaghchaure/New_Theme_frappe
frappe/website/router.py
9
4547
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os from frappe.website.utils import can_cache, delete_page_cache from frappe.model.document import get_controller def get_route_info(path): sitemap_options = ...
mit
-8,896,415,669,275,508,000
27.961783
81
0.67715
false
cfn-sphere/cfn-sphere
src/main/python/cfn_sphere/template/transformer.py
2
10628
import re from six import string_types from cfn_sphere.exceptions import TemplateErrorException class CloudFormationTemplateTransformer(object): @classmethod def transform_template(cls, template, additional_stack_description=None): description = template.description conditions = template.cond...
apache-2.0
406,095,165,156,613,300
34.66443
113
0.550151
false
chemelnucfin/tensorflow
tensorflow/contrib/kernel_methods/python/mappers/dense_kernel_mapper.py
18
1877
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
5,325,361,325,430,481,000
31.362069
80
0.70325
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/git/diff.py
5
18201
# diff.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import re from git.cmd import handle_process_output from git.compat import ( defenc, PY3 ) from...
gpl-3.0
6,686,637,874,324,148,000
35.184891
107
0.544311
false
petewarden/tensorflow
tensorflow/python/keras/benchmarks/benchmark_util.py
3
7604
# Copyright 2020 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,998,798,715,606,205,400
33.721461
80
0.638348
false
sillydan1/WhatEverEngine
openglcsharp/Lib/json/decoder.py
41
13790
"""Implementation of JSONDecoder """ import re import sys import struct from json.scanner import make_scanner try: from _json import scanstring as c_scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = ...
apache-2.0
3,501,878,652,424,499,000
34.818182
78
0.532125
false
julietbravo/microhh
cases/bomex/bomex_test.py
5
1459
from copy import deepcopy import sys import os import copy import shutil sys.path.append('../../python/') import microhh_tools as mht # Case configuration dicts no_opts = {} opt_mpi = { 'master': {'npx': 2, 'npy': 2}} opt_small = { 'grid': {'itot': 8, 'jtot': 8}, 'time': {'endtime': 3600, 's...
gpl-3.0
1,100,199,516,062,405,600
26.528302
87
0.58122
false
ybellavance/python-for-android
python3-alpha/python3-src/Lib/test/test_csv.py
53
37191
# Copyright (C) 2001,2002 Python Software Foundation # csv package unit tests import io import sys import os import unittest from io import StringIO from tempfile import TemporaryFile import csv import gc from test import support class Test_Csv(unittest.TestCase): """ Test the underlying C csv parser in ways ...
apache-2.0
290,069,618,452,289,340
38.145263
108
0.539475
false
rc500/ardrone_archive_aarons_laptop
ac622-control_characterisation/impulse_response.py
1
6014
""" Script to setup loggers to log a drone's sensor outputs in response to an impulse in pitch. This script creates an application which sets up loggers to record sensor outputs, does nothing for a period, applies an impulse to the drone, then waits a period before finishing (and therefore removing the logger objects)...
apache-2.0
1,925,105,070,873,145,600
33.170455
224
0.578816
false
MKLab-ITI/prophet
rdflib/util.py
10
13131
""" Some utility functions. Miscellaneous utilities * list2set * first * uniq * more_than Term characterisation and generation * to_term * from_n3 Date/time utilities * date_time * parse_date_time Statement and component type checkers * check_context * check_subject * check_predicate * check_object * check_stat...
apache-2.0
-6,142,557,065,561,052,000
25.157371
79
0.577488
false
jphalip/django-treemenus
treemenus/admin.py
1
11132
import re import django try: from django.conf.urls import patterns, url from django.views.generic import RedirectView except ImportError: # Django < 1.4 from django.conf.urls.defaults import patterns, url from django.contrib import admin from django.contrib.admin.util import unquote from django.core.excep...
bsd-3-clause
-7,106,472,684,129,489,000
48.039648
116
0.572494
false
uclouvain/osis_louvain
base/migrations/0015_auto_20160223_0921.py
3
1052
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-23 08:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0014_auto_20160222_1124'), ] operations = [ migrations.AddField( ...
agpl-3.0
2,031,900,444,381,602,600
29.057143
74
0.588403
false
jianghuaw/nova
nova/tests/unit/virt/ironic/test_patcher.py
2
6815
# Copyright 2014 Red Hat, 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...
apache-2.0
-8,238,945,091,949,749,000
43.253247
78
0.592076
false
jgrassler/mkdocs-pandoc
mkdocs_pandoc/filters/tables.py
1
8173
#!/usr/bin/python # # Copyright 2015 Johannes Grassler <johannes@btw23.de> # # 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
5,562,437,197,525,962,000
33.92735
107
0.53897
false
ejspina/Gene_expression_tools
Python/miRNA_validate_targets2.py
1
2165
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Eli # # Created: 04/04/2014 # Copyright: (c) Eli 2014 # Licence: <your licence> #------------------------------------------------------------------------------- def m...
gpl-2.0
5,434,584,081,694,915,000
28.492958
90
0.498383
false
telerik/cloudbase-init
cloudbaseinit/openstack/common/rpc/__init__.py
1
10623
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
apache-2.0
-2,998,007,954,191,507,500
38.344444
79
0.625435
false
ChristophKirst/ClearMap
ClearMap/Analysis/Voxelization.py
2
5247
# -*- coding: utf-8 -*- """ Converts point data into voxel image data for visulaization and analysis """ #:copyright: Copyright 2015 by Christoph Kirst, The Rockefeller University, New York City #:license: GNU, see LICENSE.txt for details. import numpy import math import pyximport; pyximport.install(setup_args={"incl...
gpl-3.0
5,103,869,633,361,954,000
38.164179
161
0.577473
false
uchuugaka/anaconda
anaconda_lib/jedi/evaluate/precedence.py
33
6101
""" Handles operator precedence. """ import operator from jedi._compatibility import unicode from jedi.parser import tree from jedi import debug from jedi.evaluate.compiled import (CompiledObject, create, builtin, keyword_from_value, true_obj, false_obj) from jedi.evaluate import an...
gpl-3.0
9,158,509,468,920,089,000
34.063218
88
0.593345
false
zseder/hunmisc
hunmisc/gensim/save_model.py
1
2080
""" Copyright 2011-13 Attila Zseder Email: zseder@gmail.com This file is part of hunmisc project url: https://github.com/zseder/hunmisc hunmisc 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 versi...
gpl-3.0
4,826,500,062,975,928,000
39
78
0.682212
false
stephane-martin/salt-debian-packaging
salt-2016.3.3/tests/integration/modules/grains.py
2
6338
# -*- coding: utf-8 -*- ''' Test the grains module ''' # Import python libs from __future__ import absolute_import import os import time # Import Salt Testing libs from salttesting import skipIf from salttesting.helpers import destructiveTest, ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import ...
apache-2.0
8,837,692,987,580,672,000
29.76699
102
0.549542
false
rohangoel96/IRCLogParser
IRCLogParser/lib/deprecated/svdOnKeywords.py
2
4982
import createKeyWords as CKW import nltk.cluster.util import numpy import math def svdOnKeywords(log_directory, channel_name, output_directory, startingDate, startingMonth, endingDate, endingMonth): """[Deprecated] uses createKeyWords function and then tries to form clusters by extracting more meaningful keywords. P...
mit
-374,670,855,599,438,400
33.590278
367
0.709036
false
cysnake4713/wechatpy
examples/echo/app.py
8
1250
from __future__ import absolute_import, unicode_literals import os from flask import Flask, request, abort, render_template from wechatpy import parse_message, create_reply from wechatpy.utils import check_signature from wechatpy.exceptions import InvalidSignatureException # set token or get from environments TOKEN = ...
mit
3,280,485,881,075,463,700
28.761905
75
0.6512
false
mickaelsilva/pythonscripts
AlleleCalling/cluster_versions/callAlleles_probe_based.py
1
19778
#!/usr/bin/python import HTSeq import sys from Bio import SeqIO from Bio.Seq import Seq from Bio.Alphabet import generic_dna from Bio.Blast import NCBIXML from Bio.Blast.Applications import NcbiblastnCommandline from Bio.Blast.Applications import NcbiblastpCommandline import os import os.path import string from Commo...
gpl-2.0
7,027,458,983,204,816,000
32.408784
210
0.615937
false
yanchen036/tensorflow
tensorflow/tools/docs/py_guide_parser.py
5
3130
# 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
7,812,861,042,676,269,000
30.938776
80
0.616613
false
yatsu/react-tornado-graphql-example
tornado/tornado_graphql_example/jobserverapp.py
1
3036
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging from multiprocessing import Process from traitlets import Bool, Integer, List, Unicode from traitlets.config.application import Application, catch_config_error from zmq.eventloop import ioloop from .version import ...
mit
7,288,786,042,306,790,000
26.107143
79
0.587286
false
cr-marcstevens/fplll
tools/plot_gso_dump.py
4
1222
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import json def do_plot(filename): import matplotlib.pyplot as plt x1,x2,y1,y2 = None,None,None,None i = 0 filer = open(filename, "r") data_json = json.load(filer) filer.close() for d in data_json: plt.clf...
lgpl-2.1
5,762,357,959,361,886,000
22.056604
52
0.5
false
qiuzhong/test-suite-build-service
nightly/detect_ver.py
1
4317
#!/usr/bin/env python3 import sys import urllib.parse import requests from bs4 import BeautifulSoup import config def get_request_url(url): conn = requests.get(url, verify = False) if not conn or not conn.content: sys.stderr.write('Failed to request {url}'.format(url = url)) sys.exit(1) ...
gpl-3.0
-3,488,084,824,855,173,600
31.712121
105
0.546908
false
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/prompt_toolkit/layout/dimension.py
24
3154
""" Layout dimensions are used to give the minimum, maximum and preferred dimensions for containers and controls. """ from __future__ import unicode_literals __all__ = ( 'LayoutDimension', 'sum_layout_dimensions', 'max_layout_dimensions', ) class LayoutDimension(object): """ Specified dimension (...
apache-2.0
-1,090,733,359,159,236,400
33.282609
78
0.626823
false
fource/fource
lib/fource/feedengine/stashboard.py
1
3291
#!/usr/bin/env python # # Stashboard client for updating knowlarity status board # # Author - @rohit01 # ----------------- import oauth2 as oauth import json import urllib import unittest # Google App engine application id APP_ID = "fource-007" BASE_URL = "https://%s.appspot.com/admin/api/v1" % APP_ID # Credentials ...
mit
2,579,352,292,550,545,400
28.648649
92
0.613491
false
sfeltman/pygobject
gi/__init__.py
2
5507
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org> # # 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 Founda...
lgpl-2.1
7,809,859,535,617,892,000
31.204678
94
0.676049
false
rabipanda/tensorflow
tensorflow/python/eager/core.py
16
1680
# 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
6,696,832,805,199,202,000
33.285714
80
0.699405
false
jingwangian/tutorial
python/filetransport/file.py
1
3400
#!/usr/bin/env python """ EndPoint Definition """ import datetime MAX_UNCHANGED_TIME = 120s class File: ST_NEW = 1 ST_UPLOADED = 2 ST_MOVING = 3 ST_MOVED = 4 ST_MOVING_FAILED = 4 def __init__(self, pathname, size, src_point_name, dest_point_name): self.id = UUID() #Transaction ID ...
gpl-3.0
2,555,005,669,386,185,700
25.161538
115
0.576471
false