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
Theer108/invenio
invenio/modules/search/searchext/services/WeatherService.py
13
2738
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
2,069,509,968,441,975,600
34.532468
99
0.67288
false
mojaves/convirt
convirt/events.py
1
3067
# # Copyright 2015-2016 Red Hat, Inc. # # 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 of the License, or # (at your option) any later version. # # This program is distr...
lgpl-2.1
-3,548,377,456,366,662,000
29.979798
78
0.605804
false
bbcf/bsPlugins
tests/test_Combine.py
1
2180
from unittest2 import TestCase, skip from bbcflib.track import track from bsPlugins.Combine import IntersectPlugin,UnionPlugin,ComplementPlugin,SubtractPlugin import os path = 'testing_files/' # nosetests test_Combine.py --logging-filter=-tw2.core.middleware class Test_CombinePlugin(TestCase): def setUp(self): ...
gpl-3.0
-2,526,528,855,127,327,000
37.928571
89
0.581193
false
cmsdaq/hltd
python/inotifywrapper.py
1
3642
# # wrapper around the python-inotify library # import logging import threading import inotify.watcher as watcher import inotify._inotify as inotify #import select #import sys #from time import sleep class InotifyWrapper(threading.Thread): def __init__(self, parent, recursive = False, logger = None): thr...
lgpl-3.0
-70,419,509,579,368,990
33.685714
96
0.528556
false
barak/autograd
setup.py
1
3261
from __future__ import absolute_import from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext from setuptools.command.sdist import sdist as _sdist from distutils.errors import CompileError from warnings import warn import os # use cython if it is importable and the env...
mit
1,073,133,455,304,495,600
37.364706
99
0.65624
false
oceanobservatories/mi-instrument
mi/dataset/parser/ctdmo_ghqr_imodem.py
5
16927
#!/usr/bin/env python """ @package mi.dataset.parser @file mi-dataset/mi/dataset/parser/ctdmo_ghqr_imodem_telemetered_driver.py @author Maria Lutz, Mark Worden @brief Parser for the ctdmo_ghqr_imodem dataset driver Release notes: Initial release """ __author__ = 'Mark Worden' __license__ = 'Apache 2.0' import arra...
bsd-2-clause
-2,267,324,767,024,270,300
36.449115
88
0.640633
false
percy-g2/Novathor_xperia_u8500
6.1.1.B.0.253/external/webkit/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
15
5891
#!/usr/bin/env python # Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
gpl-2.0
-8,333,944,719,202,859,000
45.753968
95
0.681548
false
rnestler/servo
tests/wpt/web-platform-tests/worklets/resources/credentials.py
5
1386
# Returns a valid response when a request has appropriate credentials. def main(request, response): credentials_mode = request.GET.first("mode") cookie = request.cookies.first("cookieName", None) source_origin = request.headers.get("origin", None); is_cross_origin = request.GET.first("is_cross_origin", ...
mpl-2.0
-9,004,022,894,006,329,000
42.3125
80
0.660895
false
hallpower/AsanaSync
AsanaSync.py
1
2021
#!/usr/bin/env python # -*- coding: utf-8 -*- """ AsanaSync: get data from Asana and update projects in Omnifocus Python Asana: https://github.com/Asana/python-asana/blob/master/asana/resources/gen/stories.py Omnifocus: """ __author__ = 'markhallbauer' __copyright__ = 'Copyright 2015, Windeln.de AG' __credits__ = [''...
gpl-2.0
-3,964,619,136,171,065,300
30.092308
114
0.60663
false
thatcr/knowed
notes/itch_parser.py
1
1850
import re import inspect from ply import lex from ply import yacc from area51.namd.base import NamdObject class name(str): pass class StringThing(NamdObject): def __init__(self, arg : name): super().__init__(arg) class IntThing(NamdObject): def __init__(self, arg : int): super().__init__(...
mit
-1,956,291,373,246,258,200
20.264368
101
0.558378
false
joshwalawender/POCS
pocs/tests/test_base_scheduler.py
1
5627
import pytest import yaml from astropy import units as u from astropy.coordinates import EarthLocation from astroplan import Observer from pocs.scheduler.scheduler import BaseScheduler as Scheduler from pocs.scheduler.constraint import Duration from pocs.scheduler.constraint import MoonAvoidance # Simple constrain...
mit
-975,355,140,854,280,700
26.052885
96
0.66483
false
ViderumGlobal/ckanext-requestdata
ckanext/requestdata/controllers/user.py
1
10305
import json from paste.deploy.converters import asbool from pylons import config from email_validator import validate_email from ckan.lib import base from ckan import logic, model from ckan.plugins import toolkit from ckan.common import c, _, request from ckan import authz import ckan.lib.helpers as h from ckanext.requ...
agpl-3.0
-8,903,541,987,186,469,000
29.945946
79
0.509364
false
halfdime/MarksmanshipTracker
application/models/menu.py
1
6215
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### response.logo...
mit
6,012,683,133,417,120,000
43.71223
79
0.475945
false
Gehn/JustAChatBot
sleekxmpp/plugins/xep_0203/stanza.py
12
1139
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import datetime as dt from sleekxmpp.jid import JID from sleekxmpp.xmlstream import ElementBase from sleekxmpp.plugins import ...
mit
1,731,721,621,755,753,000
23.76087
63
0.630378
false
MasterofKnuth/Nanoinformatics
LSI/ScratchModelRunners/LsiEnvironmentvsCharacterization.py
2
4407
from sys import argv import numpy from gensim import corpora, models, similarities from gensim.corpora import MmCorpus from nltk.corpus import stopwords import os from pprint import pprint from numpy import median # Enables ease of recall in the future modelFile = '.' + os.sep + 'EnvironmentModel' os.makedirs(modelFi...
apache-2.0
-2,143,955,746,853,781,200
41.384615
136
0.704561
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython-2.2.0-py2.7.egg/IPython/qt/console/call_tip_widget.py
9
10728
# Standard library imports import re from unicodedata import category # System library imports from IPython.external.qt import QtCore, QtGui class CallTipWidget(QtGui.QLabel): """ Shows call tips by parsing the current text of Q[Plain]TextEdit. """ #------------------------------------------------------...
apache-2.0
-247,743,207,563,143,200
38.010909
80
0.533091
false
agdsn/pycroft
pycroft/model/alembic/versions/ce8c8cebcbf4_make_address_state_and_addition_not_null.py
1
1095
"""Make address.state and addition not null Revision ID: ce8c8cebcbf4 Revises: 38fa5154b920 Create Date: 2019-10-13 21:24:39.752497 """ from alembic import op import sqlalchemy as sa import pycroft # revision identifiers, used by Alembic. revision = 'ce8c8cebcbf4' down_revision = '5b6f5a33e426' branch_labels = None...
apache-2.0
6,689,476,650,030,395,000
27.076923
74
0.589954
false
grupoprog3/proyecto_final
proyecto/run.py
1
1790
""" Esta aplicación muestra el nombre de una ciudad y su respectiva temperatura real y relativa en °F y °C" Módulos principales para leer datos de URLs en Python: urllib y urllib2. """ import urllib.request import urllib.error import json #replace the x's with your key key = "825c5d1711422429" """ Introduc...
apache-2.0
-2,800,112,079,077,977,600
47.583333
151
0.655076
false
senuido/stash-scanner
lib/CompiledFilter.py
1
14547
from lib.ModFilter import ModFilterType from lib.ModFilterGroup import get_mod_val from lib.Utility import RE_COMPILED_TYPE from lib.CurrencyManager import cm _FILTER_PRIO = { 'base': 1, 'name': 1, 'price_min': 1, 'price_max': 1, 'ilvl_min': 1, 'ilvl_max': 1, 'corrupted': 1, 'modifiable...
gpl-3.0
8,659,797,206,489,170,000
36.984334
632
0.493366
false
Freestila/dosage
dosagelib/rss.py
4
3157
# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # TODO: Not sure if this RSS output is "valid", should be though. # Might also be nice categorise Comics under one Item import xml.dom.minidom import time from .configuration import App class Feed(object): """Write ...
mit
-9,108,766,082,760,175,000
37.036145
87
0.621476
false
Anislav/Stream-Framework
stream_framework/feeds/aggregated_feed/notification_feed.py
8
6040
from stream_framework.feeds.aggregated_feed.base import AggregatedFeed from stream_framework.serializers.aggregated_activity_serializer import \ NotificationSerializer from stream_framework.storage.redis.timeline_storage import RedisTimelineStorage import copy import json import logging import warnings logger = lo...
bsd-3-clause
3,108,849,614,935,676,400
34.529412
87
0.639404
false
llvmpy/llvmpy
llpython/opcode_util.py
1
7508
# ______________________________________________________________________ import dis import opcode # ______________________________________________________________________ # Module data hasjump = opcode.hasjrel + opcode.hasjabs hascbranch = [op for op in hasjump if 'IF' in opcode.opname[op] ...
bsd-3-clause
2,143,788,762,899,097,000
32.368889
75
0.485615
false
ricardogsilva/QGIS
tests/src/python/test_qgsmargins.py
45
4148
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMargins. .. 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 later version. """ __auth...
gpl-2.0
1,979,495,973,901,329,200
33
86
0.605111
false
jaxxer/aivm
lib/Guest.py
1
3474
#!/usr/bin/python #-*- coding: utf-8 -*- import os import subprocess import libvirt import ConfigParser from System import System from Units import Units from VirtInstall import VirtInstall from DefaultConfig import DC from Logging import Logging import Location import IP class Storage: defaultBus = "virtio" ...
gpl-2.0
-206,919,440,645,142,270
19.684524
75
0.676454
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/feed_mapping_service/transports/grpc.py
1
11392
# -*- 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
-1,115,260,094,783,275,400
43.5
112
0.61157
false
Azure/azure-sdk-for-python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py
1
7309
# 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 may ...
mit
3,479,988,237,883,860,000
30.369099
100
0.598988
false
riggtravis/SINS
sins/models/ban.py
1
1659
import datetime # For default dates on models from sins.models.meta import Base # We need to import our metadata. # Right now all of the datatypes will will need for any table is being imported # every time. Before shipping a public release this should be fixed. from sqlalchemy import ( Column, Integer, Unicod...
mit
9,129,894,009,130,716,000
26.213115
79
0.725738
false
MatthewShao/mitmproxy
mitmproxy/tools/console/flowlist.py
3
2637
import urwid from mitmproxy.tools.console import common from mitmproxy.tools.console import layoutwidget import mitmproxy.tools.console.master # noqa class FlowItem(urwid.WidgetWrap): def __init__(self, master, flow): self.master, self.flow = master, flow w = self.get_text() urwid.Widget...
mit
-2,262,978,120,734,076,000
28.3
84
0.598407
false
dafei2015/hugular_cstolua
Client/tools/site-packages/PIL/ImtImagePlugin.py
14
2265
# # The Python Imaging Library. # $Id: ImtImagePlugin.py 2134 2004-10-06 08:55:20Z fredrik $ # # IM Tools support for PIL # # history: # 1996-05-27 fl Created (read 8-bit images only) # 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.2) # # Copyright (c) Secret Labs AB 1997-2001. # Copyright (c) Fredrik L...
mit
-460,873,404,654,311,800
23.354839
70
0.443267
false
mbauskar/erpnext
erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
7
11671
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe, erpnext import frappe.defaults from frappe.utils import cint, flt, cstr, today, random_string from erpnext.stock.doctype...
gpl-3.0
8,834,078,645,202,874,000
35.471875
113
0.706795
false
thedrow/pymemcache
pymemcache/client/hash.py
2
11102
import socket import time import logging from pymemcache.client.base import Client, PooledClient, _check_key from pymemcache.client.rendezvous import RendezvousHash logger = logging.getLogger(__name__) class HashClient(object): """ A client for communicating with a cluster of memcached servers """ d...
apache-2.0
100,011,814,332,040,220
34.356688
79
0.530355
false
tsdgeos/snapcraft
snapcraft/tests/test_plugin_go.py
1
15237
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
gpl-3.0
-3,210,348,675,763,302,400
34.270833
79
0.563562
false
sowe9385/qiime
qiime/relatedness_library.py
15
6837
#!/usr/bin/env python # File created on 02 May 2012 from __future__ import division __author__ = "William Van Treuren" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["William Van Treuren"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "William Van Treuren" __email__ = "wdwvt1@gmail...
gpl-2.0
-6,233,226,829,329,929,000
42
112
0.657745
false
Livefyre/livefyre-python-utils
livefyre/src/core/site/__init__.py
1
1767
from livefyre.src.core.collection import Collection from livefyre.src.core.collection.type import CollectionType from .model import SiteData from .validator import SiteValidator class Site(object): def __init__(self, network, data): self.network = network self.data = data @staticmethod...
mit
-385,033,772,264,866,500
41.071429
86
0.68987
false
brettlangdon/dd-agent
tests/core/test_watchdog.py
8
4224
# stdlib import os from random import random, randrange import subprocess import sys import time import unittest import urllib as url # 3p from nose.plugins.attrib import attr # project # needed because of the subprocess calls sys.path.append(os.getcwd()) from ddagent import Application from util import Watchdog @a...
bsd-3-clause
1,533,408,602,586,338,600
27.540541
99
0.570549
false
mitchellrj/touchdown
touchdown/aws/rds/subnet_group.py
1
1673
# Copyright 2014 Isotoma Limited # # 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...
apache-2.0
7,280,674,922,325,121,000
29.418182
76
0.756127
false
rg3/youtube-dl
youtube_dl/extractor/medici.py
57
2298
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unified_strdate, update_url_query, urlencode_postdata, ) class MediciIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?medici\.tv/#!/(?P<id>[^?#&]+)' _TEST = { 'url': 'http:/...
unlicense
3,792,505,253,122,038,000
31.828571
107
0.525674
false
xuru/pyvisdk
pyvisdk/do/array_update_spec.py
1
1283
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ArrayUpdateSpec(vim, *args, **kwargs): '''An ArrayUpdateSpec data object type is a co...
mit
2,919,851,443,129,252,400
33.702703
124
0.628215
false
BackupGGCode/llvm-py
test/example-jit.py
4
1046
#!/usr/bin/env python # Import the llvm-py modules. from llvm import * from llvm.core import * from llvm.ee import * # new import: ee = Execution Engine # Create a module, as in the previous example. my_module = Module.new('my_module') ty_int = Type.int() # by default 32 bits ty_func = Type.function(ty_int...
bsd-3-clause
-4,717,716,125,294,381,000
30.69697
68
0.701721
false
yanheven/dpark
dpark/cache.py
6
6855
import os import multiprocessing import logging import marshal import cPickle import shutil import struct import urllib import msgpack from dpark.env import env from dpark.util import mkdir_p from dpark.tracker import GetValueMessage, AddItemMessage, RemoveItemMessage logger = logging.getLogger(__name__) class Cach...
bsd-3-clause
-4,440,370,140,497,158,000
27.326446
89
0.538001
false
dionysiac-endeavors/bacch
archive/builders.py
2
6399
""" Provides the Bacch and Gnomon builder classes, as well as the Base superclass to organize common methods between them. """ # Copyright (c) 2017, Kenneth P. J. Dyer <kenneth@avoceteditors.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
bsd-3-clause
-8,448,570,392,365,623,000
32.502618
89
0.644788
false
bozzzzo/quark
quarkc/test/emit/expected/py/parameterized-defaults/docs/conf.py
1
1143
# -*- coding: utf-8 -*- # # parameterized_defaults documentation build configuration file, created by Quark extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon' ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'parameterized_defaults' copyright = u'2015, parameteriz...
apache-2.0
-7,714,430,658,843,225,000
30.75
89
0.71916
false
jrcohen02/brainx_archive2
brainx/version.py
4
2781
"""brainx version/release information""" # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 1 _version_micro = '' # use '' for first of series, number for 1 and above _version_extra = 'dev' #_version_extra = '' # Uncomment this for full releases # Construc...
bsd-3-clause
9,088,633,368,006,735,000
32.914634
79
0.628191
false
itudoben/devops
src/security.py
1
2945
__author__ = 'hujol' __name__ = 'security' import base64 import os import subprocess from Crypto.Cipher import AES from Crypto.Hash import SHA256 class SecurityHelper: _encrypted_file = None _encrypted_file_path = None _plain_file_path = None # The password name to decrypt the data _encrypted_f...
lgpl-3.0
-1,697,058,148,881,387,300
34.481928
107
0.629542
false
Johnzero/OE7
openerp/addons-modules/crm_todo/__openerp__.py
57
1459
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
5,009,549,612,879,500,000
36.410256
78
0.58122
false
microcom/odoo
addons/base_import_module/models/ir_module.py
7
5253
import logging import os import sys import zipfile from os.path import join as opj import openerp from openerp import fields from openerp.osv import osv from openerp.tools import convert_file, exception_to_unicode from openerp.tools.translate import _ from openerp.exceptions import UserError _logger = logging.getLogg...
agpl-3.0
-3,731,417,427,836,881,000
43.897436
156
0.537598
false
endlessm/chromium-browser
tools/metrics/structured/model.py
2
3935
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) import models # Helpers # A key for sorting XML nodes by the...
bsd-3-clause
8,964,784,442,267,453,000
31.520661
77
0.637611
false
Austin503/pyglet
pyglet/window/carbon/__init__.py
34
40600
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # 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
-6,875,524,605,669,687,000
36.908497
97
0.6
false
holub008/skiscraper
scraper/ManualUtils.py
1
1551
""" utilities for one-off mantainence tasks """ import sys import mysql.connector USAGE = """ -d <comma separated race ids to be cleared from db> """ def remove_race_by_id(race_id): cnx = mysql.connector.connect(user=self.config.get_as_string("DB_USER"), password=self.config.ge...
mit
-7,867,187,705,938,359,000
31.333333
109
0.577692
false
zhakui/QMarkdowner
utildialog/numinputdialog.py
4
2695
#!/usr/bin/python # -*- coding: utf-8 -*- import os from PyQt4 import QtGui from PyQt4 import QtCore from basedialog import BaseDialog class numinputDialog(BaseDialog): def __init__(self, styleoptions, parent=None): super(numinputDialog, self).__init__(styleoptions, parent) # url内容输...
mit
-6,300,323,014,967,343,000
34.152778
102
0.626585
false
DrOctogon/unwash_ecom
oscar/apps/address/migrations/0003_auto__add_field_country_display_order.py
16
7246
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Country.display_order' d...
bsd-3-clause
1,750,534,186,186,523,100
74.479167
182
0.557687
false
simgislab/dhi
general/calc_valid.py
2
6095
#!/usr/bin/env python # -*- coding: utf-8 -*- #****************************************************************************** # # calc_valid.py # --------------------------------------------------------- # 'Good pixels' calculation script # More: http://github.com/nextgis/dhi # # Usage: # calc_valid.py [-h] [-if ...
mit
-2,063,716,165,256,883,500
35.279762
183
0.570304
false
arthur-gouveia/DAT210x
Module2/wrangling-wrong-data-types.py
1
1575
# -*- coding: utf-8 -*- """ Created on Wed Nov 2 15:32:57 2016 Reading and changing the datatype of html files @author: Arthur Gouveia """ import pandas as pd def prepare_anos_df(uclhtml): df = uclhtml[4].iloc[1:].copy() df2 = uclhtml[5].iloc[1:].copy() cnames = uclhtml[4].ix[0].copy() cnames[5] = ...
mit
3,246,618,336,950,457,000
24.274194
79
0.635609
false
smaccm/camkes-tool
camkes/internal/version.py
1
2020
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # # Versioning functionality from memoization import memoized import hashlib, os, re @memoized...
bsd-2-clause
-1,630,169,518,463,516,400
34.438596
79
0.639604
false
fenglu-g/incubator-airflow
tests/contrib/operators/test_gcs_acl_operator.py
4
2613
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-3,854,115,446,139,703,300
35.291667
84
0.665136
false
nvoron23/hue
desktop/core/src/desktop/redaction/engine.py
5
5909
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
1,722,783,637,971,162,000
25.737557
89
0.659333
false
DoubleNegativeVisualEffects/cortex
test/IECoreRI/Instancing.py
2
9634
########################################################################## # # Copyright (c) 2007-2013, 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: # # * Redis...
bsd-3-clause
-3,122,997,482,492,336,000
27.844311
90
0.63961
false
gaolichuang/neutron-fwaas
neutron_fwaas/services/firewall/fwaas_plugin.py
1
16741
# Copyright 2013 Big Switch Networks, 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...
apache-2.0
-262,958,158,888,922,530
42.03599
79
0.605818
false
buchbend/astrolyze
build/lib/astrolyze/lte/moleculeParameter.py
3
3586
from numpy import interp # This file generates a dictionary to store the information of Molcules molDict = {} class Molecule: def __init__(self,nu,Q,T,Eu,Aul,gu,mu,name=''): self.nu = nu self.Q = Q self.T = T self.Eu = Eu self.Aul = Aul self.gu = gu self.na...
bsd-3-clause
-1,942,450,188,557,948,000
26.79845
91
0.610708
false
Xperia-Nicki/android_platform_sony_nicki
external/webkit/Tools/Scripts/webkitpy/layout_tests/port/test_files_unittest.py
15
4158
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
apache-2.0
-6,987,520,879,275,068,000
40.168317
94
0.687109
false
jdahlin/pygobject
tests/test_pygtkcompat.py
3
4088
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab import unittest import sys sys.path.insert(0, "../") from gi.repository import Gdk from gi.repository import Gtk import gi.pygtkcompat gi.pygtkcompat.enable() gi.pygtkcompat.enable_gtk(version='3.0') import atk import pango import...
lgpl-2.1
-2,883,310,631,152,615,000
29.969697
73
0.640656
false
prashantpawar/supybot-rothbot
plugins/ChannelStats/test.py
7
4359
### # Copyright (c) 2002-2004, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
bsd-3-clause
-9,214,991,890,196,904,000
46.380435
79
0.695114
false
memsharded/conan
conans/client/generators/__init__.py
1
5351
import traceback from os.path import join from conans.client.generators.cmake_find_package import CMakeFindPackageGenerator from conans.client.generators.cmake_find_package_multi import CMakeFindPackageMultiGenerator from conans.client.generators.compiler_args import CompilerArgsGenerator from conans.client.generators...
mit
-7,384,945,609,745,070,000
43.591667
94
0.727714
false
UNINETT/nav
python/nav/mibs/netswitch_mib.py
2
1752
# # Copyright (C) 2013 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # This program is distributed in the hope...
gpl-2.0
-2,684,750,077,748,304,400
34.04
80
0.699772
false
letsgoexploring/economicData
usProductionData/python/usProductionData.py
1
15820
#!/usr/bin/env python # coding: utf-8 # In[2]: import numpy as np import matplotlib.pyplot as plt plt.style.use('classic') import matplotlib.dates as dts import fredpy as fp import pandas as pd import runProcs # get_ipython().run_line_magic('matplotlib', 'inline') # In[3]: # 0. Setup: Formatting commands and def...
mit
4,067,780,851,468,366,000
31.55144
406
0.709355
false
Danielhiversen/home-assistant
homeassistant/components/notify/message_bird.py
8
2062
""" MessageBird platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.message_bird/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.notify imp...
mit
2,435,739,182,990,394,000
30.723077
75
0.667313
false
LLNL/spack
var/spack/repos/builtin/packages/revocap-refiner/package.py
2
2288
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RevocapRefiner(MakefilePackage): """The University of Tokyo, CISS Project: Geometr...
lgpl-2.1
7,162,539,687,777,075,000
35.903226
73
0.563374
false
unt-libraries/django-controlled-vocabularies
tests/settings.py
1
1483
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'o+3_7(mv&ae@snp13(7!6ujk-p%p3gfem0+gt0ur4e%c0^yppw' SITE_ID = 1 DEBUG = True INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib....
bsd-3-clause
-9,007,541,134,058,168,000
21.469697
70
0.640593
false
nilsgrabbert/spark
python/pyspark/sql/__init__.py
63
2498
# # 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
6,290,937,869,785,486,000
40.633333
89
0.744596
false
connectIOT/iottoolkit
iottoolkit/interfaces/restlite/restObject.py
1
7423
''' restObject module Based on the restdata module from restlite, the Request object sequences the URL path by resource and authenticates at each level. The bind method walks the SmartObject directory structures according to the path segments exposes methods for HTTP verbs that can be overridden in the service laver ...
apache-2.0
6,316,322,084,137,114,000
41.66092
113
0.609727
false
MichSchli/QuestionAnsweringGCN
old_version/candidate_selection/tensorflow_models/components/extras/target_comparator.py
1
1657
import tensorflow as tf from candidate_selection.tensorflow_models.components.abstract_component import AbstractComponent class TargetComparator(AbstractComponent): variable_prefix = None variables = None comparison = None def __init__(self, variables, variable_prefix="", comparison="dot_product"):...
mit
-127,378,578,442,666,140
41.487179
148
0.701267
false
rjawor/concordia-server
cat/publish.py
1
2523
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, os, shutil, re def config_file(config, file_name, root_dir): with open(file_name+'_pattern', 'r') as pattern_file, open(root_dir+'/'+file_name, 'w') as out_file: for line in pattern_file: for field, value in config.iteritems(): ...
lgpl-3.0
-6,825,068,001,721,769,000
30.5375
172
0.571938
false
hforge/itools
itools/xml/dublin_core.py
3
2189
# -*- coding: UTF-8 -*- # Copyright (C) 2005-2010 J. David Ibáñez <jdavid.ibp@gmail.com> # Copyright (C) 2007 Sylvain Taverne <taverne.sylvain@gmail.com> # Copyright (C) 2008 David Versmisse <versmisse@lil.univ-littoral.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of...
gpl-3.0
8,934,109,831,505,031,000
31.641791
75
0.654778
false
AbhishekShah212/School_Projects
esDay/rfcat_150225/rflib/ccspecan.py
2
12535
#!/usr/bin/env python # # Copyright 2012 atlas # # This file was adapted from a part of Project Ubertooth written by Jared Boone # # 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 ...
mit
4,338,367,214,818,494,500
38.793651
173
0.554607
false
ikassi/menpo
menpo/image/spatial.py
3
16811
import abc from copy import deepcopy import numpy as np from menpo.image.masked import MaskedImage from menpo.visualize.base import ImageViewer, DepthImageHeightViewer class AbstractSpatialImage(MaskedImage): r""" A 2D image that represents spatial data in some fashion in it's channel data. As a result, ...
bsd-3-clause
1,859,500,944,364,819,700
36.192478
79
0.576289
false
ballouche/navitia
source/jormungandr/jormungandr/parking_space_availability/bss/bss_provider_manager.py
1
3023
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
5,068,450,412,459,816,000
38.25974
94
0.65994
false
egabancho/invenio
invenio/legacy/oaiharvest/web/admin/oaiharvestadmin.py
1
29631
## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2012, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any ...
gpl-2.0
8,242,107,522,798,747,000
42.897778
187
0.522257
false
chrisglass/django-cms
cms/migrations/0012_publisher.py
8
28909
# -*- coding: utf-8 -*- from south.db import db from django.db import models from cms.models import * class Migration: def forwards(self, orm): # Adding model 'PublicCMSPlugin' db.create_table('cms_publiccmsplugin', ( ('rght', orm['cms.publiccmsplugin:rght']), ...
bsd-3-clause
4,583,367,918,619,731,500
60.771368
188
0.533502
false
blaquee/crits
crits/vocabulary/relationships.py
7
4151
from crits.vocabulary.vocab import vocab class RelationshipTypes(vocab): """ Vocabulary for Relationship Types. """ COMPRESSED_FROM = "Compressed From" COMPRESSED_INTO = "Compressed Into" CONNECTED_FROM = "Connected From" CONNECTED_TO = "Connected To" CONTAINS = "Contains" CONTA...
mit
-5,448,890,076,713,730,000
29.522059
69
0.606842
false
armando-migliaccio/neutron
neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py
4
4455
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions SRL # Copyright 2013 Pedro Navarro Perez # 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...
apache-2.0
4,250,890,610,325,259,300
39.5
78
0.630527
false
YarnSeemannsgarn/pyshorteners
pyshorteners/shorteners/awsm.py
1
1568
# encoding: utf-8 """ Aw.sm Shortener Implementation Needs a API_KEY Optional Params `tool` - String `channel` - 'twitter' 'facebook'. 'twitter' default value """ from ..exceptions import ShorteningErrorException from .base import BaseShortener class AwsmShortener(BaseShortener): api_url = 'http://api.awe.sm/' ...
mit
2,202,264,663,732,893,700
30.36
77
0.559311
false
blaix/tdubs
setup.py
1
1713
from setuptools import find_packages, setup # We need the following dependenices so that setup.py's command nosetests will # run correclty without manually installing all dev dependencies. Note that # these requirements cannot be specified as setup's tests_require param # because tests_require dependencies are not ins...
mit
-8,184,099,197,160,716,000
33.26
78
0.61296
false
robovm/robovm-studio
python/helpers/docutils/statemachine.py
40
56996
# $Id: statemachine.py 6388 2010-08-13 12:24:34Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A finite state machine specialized for regular-expression-based text filters, this module defines the following classes: - `StateMachine`, a state m...
apache-2.0
-7,691,237,320,926,191,000
36.374426
80
0.585673
false
CG-F16-27-Rutgers/steersuite-rutgers
steerstats/steersuitedb/PprAI.py
8
51273
import psycopg2 from steersuitedb import AlgorithmData from steersuitedb.BaseAI import BaseAI class PprAI(BaseAI): """Class used to encapsulate the metric data for the PPRAI steering algorithm""" _id_name = "ppr_ai_id" _algorithm_reff = "pprAI" _table_name = "ppr_ai_data" _insert_order = "...
gpl-3.0
-645,902,545,350,490,100
54.43027
144
0.608917
false
shantanu561993/volatility
volatility/plugins/mac/notesapp.py
12
4766
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
6,534,237,608,809,608,000
33.28777
138
0.49958
false
HyperBaton/ansible
lib/ansible/playbook/task.py
22
20870
# (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
740,921,983,091,540,600
38.828244
153
0.594011
false
tvieira/mr.bob
mrbob/tests/test_cli.py
2
3571
import unittest import tempfile import os import shutil import mock import pkg_resources class TestCLI(unittest.TestCase): def setUp(self): self.output_dir = tempfile.mkdtemp() def tearDown(self): shutil.rmtree(self.output_dir) def call_FUT(self, *args): from ..cli import main ...
bsd-3-clause
-5,109,901,507,040,308,000
30.60177
93
0.621395
false
jjffryan/pymtl
pymtl/tools/integration/verilog_parser_test_todo.py
8
6172
#======================================================================= # verilog_parser #======================================================================= import pytest import os from verilog_parser import header_parser #----------------------------------------------------------------------- # test cases #--...
bsd-3-clause
6,269,570,293,648,515,000
22.290566
78
0.542126
false
Rogentos/legacy-anaconda
textw/welcome_text.py
4
2027
# # welcome_text.py: text mode welcome window # # Copyright (C) 2001, 2002 Red Hat, Inc. All rights reserved. # # 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,...
gpl-2.0
-8,303,778,487,189,991,000
42.12766
79
0.546621
false
coderbone/SickRage
sickbeard/subtitles.py
2
22946
# Author: Nyaran <nyayukko@gmail.com>, based on Antoine Bertin <diaoulael@gmail.com> work # URL: http://code.google.com/p/sickbeard/ # # 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 S...
gpl-3.0
-6,000,791,108,541,199,000
43.042226
145
0.620849
false
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/networkx/drawing/tests/test_layout.py
10
6162
"""Unit tests for layout functions.""" import sys from nose import SkipTest from nose.tools import assert_equal import networkx as nx class TestLayout(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global numpy try: ...
mit
-5,020,075,331,910,638,000
37.037037
76
0.583901
false
douban/code
vilya/views/uis/settings.py
3
6161
# -*- coding: utf-8 -*- from __future__ import absolute_import from quixote.errors import AccessError, TraversalError from vilya.libs.template import st from vilya.models.user import User from vilya.models.project import CodeDoubanProject from vilya.models.sphinx_docs import SphinxDocs from vilya.models.team import Te...
bsd-3-clause
-9,215,735,106,853,626,000
34.005682
79
0.585295
false
adazey/Muzez
libs/nltk/corpus/reader/verbnet.py
1
17009
# Natural Language Toolkit: Verbnet Corpus Reader # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ An NLTK interface to the VerbNet verb lexicon For details about VerbNet see: http://verbs.colorado.e...
gpl-3.0
-6,979,672,427,203,154,000
39.688725
79
0.555412
false
nocko/cfmi
cfmi/admin/views.py
1
11513
from datetime import datetime, timedelta from flask import (Blueprint, render_template, request, session, g, redirect, url_for, abort, flash, send_file, escape, current_app) from sqlalchemy import or_, and_ from cfmi import cache, db from cfmi.database.newsite import User, Proje...
bsd-3-clause
2,902,561,442,106,225,700
37.505017
145
0.600452
false
peak6/st2
st2common/st2common/util/virtualenvs.py
3
7155
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
8,953,635,022,443,518,000
33.902439
96
0.672537
false
nathanielvarona/airflow
airflow/contrib/hooks/gcp_natural_language_hook.py
1
1203
# # 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...
apache-2.0
1,298,402,396,743,962,400
40.482759
105
0.773899
false
public-ink/public-ink
server/appengine/lib/numpy/core/function_base.py
12
12104
from __future__ import division, absolute_import, print_function import warnings import operator from . import numeric as _nx from .numeric import (result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError,asanyarray) __all__ = ['logspace', 'linspace', 'geomspace'] def _index_deprecate(...
gpl-3.0
3,504,226,876,710,594,000
33.48433
83
0.586418
false
whinedo/sdnlb
old/parser.py
2
1301
import re from services import Services from service import Service from server import Server class Parser: def __init__(self,configFile): self.configFile = configFile self.weightRe = re.compile('(\d+) (\w+) (\d+) (\d+)') self.noWeightRe = re.compile('(\d+) (\w+) (\d+)') def parse(self): fd = None try: ...
gpl-3.0
3,151,533,201,513,588,000
20.327869
55
0.647194
false
PowerHMC/HmcRestClient
src/shared_storage_pool/ModifySharedStoragePool.py
1
2470
# Copyright 2015, 2016 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 require...
apache-2.0
4,141,409,198,244,365,000
40.864407
97
0.654656
false
mrunge/horizon_lib
horizon_lib/browsers/base.py
1
5986
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-4,060,809,758,199,854,000
40
79
0.641831
false