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
grundic/yagocd
yagocd/client.py
1
13831
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # The MIT License # # Copyright (c) 2016 Grigory Chernyshev # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
isc
-6,278,391,549,560,444,000
36.080429
120
0.665317
false
softwaresaved/fat
lowfat/migrations/0120_auto_20180206_1505.py
2
1063
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-02-06 15:05 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lowfat', '0119_auto_20171214_0722'), ] operations = [ migrati...
bsd-3-clause
-5,224,543,613,362,958,000
28.527778
71
0.594544
false
brunosantos/Bsan-kodi-repo
plugin.video.kodi/gravador.py
1
10215
import datetime import os import re import sys from default import downloadPath, art, mensagemprogresso, gravadorpath, savefile from requests import abrir_url from resources.lib.daring import selfAddon, tvporpath from utils import limpar, horaportuguesa, normalize, clean, savefile def menugravador(): if downloadP...
gpl-2.0
4,462,778,213,913,674,000
53.340426
270
0.624963
false
benmezger/dotfiles
dot_weechat/python/wee_slack.py
2
224187
# Copyright (c) 2014-2016 Ryan Huber <rhuber@gmail.com> # Copyright (c) 2015-2018 Tollef Fog Heen <tfheen@err.no> # Copyright (c) 2015-2020 Trygve Aaberge <trygveaa@gmail.com> # Released under the MIT license. from __future__ import print_function, unicode_literals from collections import OrderedDict from datetime im...
mit
-9,054,104,212,139,927,000
38.275929
277
0.608653
false
brian-yang/mozillians
vendor-local/lib/python/kombu/tests/test_compression.py
13
1550
from __future__ import absolute_import import sys from nose import SkipTest from kombu import compression from .utils import TestCase from .utils import mask_modules class test_compression(TestCase): def setUp(self): try: import bz2 # noqa except ImportError: self.has...
bsd-3-clause
-5,377,916,114,516,399,000
28.245283
63
0.612903
false
odoobgorg/odoo
addons/payment_authorize/tests/test_authorize.py
27
7898
# -*- coding: utf-8 -*- import hashlib import hmac import time import urlparse from lxml import objectify import openerp from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_authorize.controllers.ma...
gpl-3.0
-351,980,788,649,556,600
42.395604
135
0.559256
false
try-something-new-everyday/blog
kendo romania/scripts/.ipynb_checkpoints/members_loader-checkpoint.py
4
5619
import pandas as pd, numpy as np, json import clubs_loader nyears=8 def get_members(path): members=pd.read_excel(path,header=[1]) members=members[[231, 'Nr. EKF', 'Club', 'Unnamed: 3', 'Numele', ...
mit
-4,046,400,550,572,162,000
40.6
110
0.427961
false
demonchild2112/travis-test
grr/server/grr_response_server/checks/format_test.py
2
1044
#!/usr/bin/env python """Unit test for check definitions.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import glob import os from absl import app from grr_response_core import config from grr_response_server.check_lib import checks_test_lib from gr...
apache-2.0
8,552,300,045,135,161,000
25.1
77
0.688697
false
Intel-tensorflow/tensorflow
tensorflow/compiler/tests/reshape_op_test.py
25
1822
# 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
-1,006,206,323,664,752,100
35.44
80
0.658617
false
matthiascy/panda3d
direct/src/showbase/EventGroup.py
11
4259
"""Undocumented Module""" __all__ = ['EventGroup'] from direct.showbase import DirectObject from direct.showbase.PythonUtil import SerialNumGen, Functor class EventGroup(DirectObject.DirectObject): """This class allows you to group together multiple events and treat them as a single event. The EventGroup wil...
bsd-3-clause
218,800,054,126,819,740
37.718182
90
0.610472
false
wrycu/DiscordCharting
scripts/boot_listener.py
1
1227
import discord import asyncio from configparser import ConfigParser import os class BootListener: def __init__(self, now_playing): config = ConfigParser() config.read(os.path.join('..', 'config.ini')) conf = { 'discord': { 'email': config.get('discord', 'email')...
apache-2.0
-7,679,223,266,241,262,000
31.289474
84
0.538712
false
jmlopez-rod/pyjoint
docs/source/conf.py
1
8413
# -*- coding: utf-8 -*- # # pyjoint documentation build configuration file, created by # sphinx-quickstart on Tue Jan 6 23:49:22 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
bsd-2-clause
-1,821,507,674,786,739,700
30.391791
79
0.706526
false
Matrixeigs/Optimization
unit_commitment/unit_commitment_distributed.py
1
11794
""" Augumented Lagrange decomposition for basic unit commitment problems @author: Zhao Tianyang @e-mail: zhaoty@ntu.edu.sg @date:21 Mar 2018 Note: The mathematical model is taken from the following references. [1] """ from numpy import zeros, shape, ones, diag, concatenate, r_, arange, divide, linalg import matplotlib...
mit
5,418,163,758,514,771,000
35.627329
120
0.518993
false
ojarva/django-websocket-redis
ws4redis/django_runserver.py
2
3380
#-*- coding: utf-8 -*- import six import base64 import select from hashlib import sha1 from wsgiref import util from django.core.wsgi import get_wsgi_application from django.core.servers.basehttp import WSGIServer, WSGIRequestHandler from django.core.handlers.wsgi import logger from django.conf import settings from dja...
mit
3,041,391,749,939,777,500
38.302326
103
0.681953
false
fabrickit/fabkit
core/webapp/web_apps/chat/views.py
1
3023
# coding: utf-8 from django.contrib.auth.models import User from web_apps.chat.models import Comment, UserCluster from web_apps.chat.utils import get_comments, get_cluster from django.shortcuts import render from django.http import HttpResponse, HttpResponseServerError from django.views.decorators.csrf import csrf_exe...
mit
-5,369,956,445,051,854,000
32.21978
96
0.615944
false
olivierdalang/stdm
ui/forms/property_mapper.py
1
4099
""" /*************************************************************************** Name : Generic application for forms Description : forms generator functions Date : 30/June/2013 copyright : (C) 2014 by UN-Habitat and implementing partners. ...
gpl-2.0
-671,776,579,487,693,800
40.278351
108
0.537448
false
matthiasdiener/spack
var/spack/repos/builtin/packages/launchmon/package.py
5
2100
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-81,155,037,442,614,450
39.384615
94
0.651905
false
cedi4155476/QGIS
python/plugins/processing/algs/taudem/dinftranslimaccum2_multi.py
12
5459
# -*- coding: utf-8 -*- """ *************************************************************************** dinftranslimaccum2_multi.py --------------------- Date : March 2015 Copyright : (C) 2015 by Alexander Bruy Email : alexander dot bruy at gmail dot com **...
gpl-2.0
3,714,396,306,898,000,000
43.745902
113
0.588936
false
barseghyanartur/oauthlib
tests/test_common.py
8
7147
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import sys from .unittest import TestCase from oauthlib.common import add_params_to_uri from oauthlib.common import CaseInsensitiveDict from oauthlib.common import extract_params from oauthlib.common import generate_client_id from oauthl...
bsd-3-clause
-2,117,983,232,243,025,400
33.694175
79
0.61998
false
claudep/translate
translate/storage/xml_extract/misc.py
1
2879
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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...
gpl-2.0
4,677,905,624,702,928,000
32.870588
90
0.6471
false
fedora-infra/anitya
anitya/tests/lib/versions/test_base.py
1
8780
# -*- coding: utf-8 -*- # # Copyright © 2017-2020 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 ...
gpl-2.0
-465,989,112,514,938,700
41.410628
88
0.649732
false
vladisac/CheckGuard
src/CheckGuard.py
2
3485
''' * Copyright (C) 2015 Touch Vectron * * Author: Cornel Punga * * 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. * * This program is distributed in the hope that it wil...
gpl-2.0
-5,946,503,362,880,396,000
36.085106
88
0.572453
false
pabulumm/neighbors
lib/python3.4/site-packages/oauth2client/contrib/locked_file.py
62
13391
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
bsd-3-clause
-673,470,291,402,698,100
33.602067
79
0.52946
false
sanguinariojoe/FreeCAD
src/Mod/Ship/shipUtils/Math.py
38
2930
#*************************************************************************** #* * #* Copyright (c) 2011, 2016 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
lgpl-2.1
-3,037,627,146,048,722,400
50.403509
78
0.49727
false
huanpc/IoT-1
gui/controller/controller/iot_platform/admin.py
1
1785
from django.contrib import admin from .models import PlatformModel from django import forms #TODO: Docs here: https://docs.djangoproject.com/en/1.10/ref/contrib/admin class PlatformAdminChangeForm(forms.ModelForm): class Meta: model = PlatformModel fields = '__all__' exclude = ['resource_id...
mit
873,050,636,578,505,300
40.511628
124
0.585434
false
procrasti/electrum
gui/stdio.py
4
7556
from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum.wallet import WalletStorage, Wallet from electrum.util import format_satoshis, set_verbosity, StoreDict from electrum.bitcoin import is_valid, COIN, TYPE_ADDRESS from electrum.network import filter_protocol import sys, getpass, datetime # min...
mit
-5,276,390,945,176,424,000
31.995633
147
0.523425
false
google/shoptimizer
shoptimizer_api/optimizers_builtin/mpn_optimizer_test.py
1
3776
# coding=utf-8 # Copyright 2021 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 agreed ...
apache-2.0
-8,019,107,327,763,407,000
35.660194
91
0.716102
false
anuragkapur/mongo-connector
tests/test_mongo_connector.py
1
5073
# Copyright 2012 10gen, 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, soft...
apache-2.0
5,385,982,325,778,449,000
31.312102
79
0.636113
false
jordanemedlock/psychtruths
temboo/core/Library/LastFm/Artist/GetEvents.py
5
4525
# -*- coding: utf-8 -*- ############################################################################### # # GetEvents # Retrieves a list of upcoming events for this artist. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
apache-2.0
-2,100,165,090,013,714,200
39.401786
221
0.66232
false
livingbio/libsaas
libsaas/services/stripe/invoices.py
3
4954
from libsaas.services import base from libsaas import parsers, http from . import resource class LineItems(resource.StripeResource): path = 'lines' @base.apimethod def get(self, customer=None, count=None, offset=None): """ Fetch all of the objects. :var customer: In the case of...
mit
-9,220,701,440,068,584,000
29.392638
84
0.631813
false
Ircam-Web/mezzanine-organization
organization/magazine/models.py
1
5802
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Ircam # Copyright (c) 2016-2017 Guillaume Pellerin # Copyright (c) 2016-2017 Emilie Zawadzki # This file is part of mezzanine-organization. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
-7,482,229,496,694,557,000
33.742515
207
0.710445
false
damoti/pyjx-gwt
gwt/pyjamas/gmaps/Utils.py
7
5407
# Copyright (C) 2009 Daniel Carvalho <idnael@gmail.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 la...
apache-2.0
6,478,600,338,335,920,000
27.308901
94
0.574995
false
encukou/cython
Cython/Utility/__init__.py
10
1165
def pylong_join(count, digits_ptr='digits', join_type='unsigned long'): """ Generate an unrolled shift-then-or loop over the first 'count' digits. Assumes that they fit into 'join_type'. (((d[2] << n) | d[1]) << n) | d[0] """ return ('(' * (count * 2) + "(%s)" % join_type + ' | '.join( ...
apache-2.0
4,038,455,520,699,946,000
39.172414
114
0.563948
false
jumpstarter-io/neutron
neutron/services/loadbalancer/drivers/embrane/agent/dispatcher.py
15
4590
# Copyright 2014 Embrane, 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
2,938,358,615,519,293,000
41.5
78
0.533115
false
shinken-monitoring/mod-webui
module/plugins/config/config.py
2
2138
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redist...
agpl-3.0
2,850,102,797,286,507,500
30.910448
93
0.689897
false
mrquim/mrquimrepo
repo/script.module.pycryptodome/lib/Crypto/PublicKey/__init__.py
6
3453
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
gpl-2.0
-1,333,315,165,086,527,000
32.524272
73
0.622647
false
sankhesh/VTK
ThirdParty/Twisted/twisted/conch/manhole_tap.py
42
4306
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ TAP plugin for creating telnet- and ssh-accessible manhole servers. @author: Jp Calderone """ from zope.interface import implements from twisted.internet import protocol from twisted.application import service, strports from twisted.conch.s...
bsd-3-clause
-1,717,250,764,189,003,300
33.725806
115
0.644914
false
OpenSourcePolicyCenter/PolicyBrain
webapp/settings.py
2
4780
""" Django settings for webapp project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os import dj_database_url # Quick-start development settings - unsui...
mit
8,374,259,767,958,121,000
28.875
79
0.666946
false
kennedyshead/home-assistant
homeassistant/components/zwave/climate.py
5
21953
"""Support for Z-Wave climate devices.""" # Because we do not compile openzwave on CI from __future__ import annotations import logging from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_...
apache-2.0
58,606,247,259,890,584
34.695935
82
0.583565
false
mjbrewer/testindex
magnum/common/pythonk8sclient/client/models/V1beta3_PersistentVolumeStatus.py
15
1363
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
apache-2.0
1,605,808,413,105,378,000
29.288889
97
0.618489
false
t-animal/sigal
tests/conftest.py
2
1060
import blinker import os import PIL import pytest import shutil from sigal import signals from sigal.settings import read_settings CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) BUILD_DIR = os.path.join(CURRENT_DIR, 'sample', '_build') @pytest.fixture(scope='session', autouse=True) def remove_build(): ...
mit
7,877,713,479,026,657,000
24.238095
78
0.642453
false
echevemaster/fedora-college
pavement.py
2
10779
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-8; -*- from __future__ import print_function import os import sys import time import subprocess # Python 2.6 subprocess.check_output compatibility. Thanks Greg Hewgill! if 'check_output' not in dir(subprocess): def check_output(cmd_args, *args, **...
bsd-3-clause
-1,290,648,177,244,723,000
27.143603
79
0.614621
false
rwaldron/hy
hy/errors.py
3
1259
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modif...
mit
3,160,741,846,954,282,000
45.62963
76
0.764893
false
sreecha/grpc
tools/run_tests/sanity/core_banned_functions.py
3
3033
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
8,939,600,725,976,868,000
41.125
79
0.66337
false
plotly/python-api
packages/python/plotly/plotly/validators/funnel/_textfont.py
2
1863
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="funnel", **kwargs): super(TextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
mit
6,268,432,964,624,635,000
39.5
79
0.534085
false
StephenWeber/ansible
lib/ansible/modules/cloud/webfaction/webfaction_site.py
20
7086
#!/usr/bin/python # # Create Webfaction website using Ansible and the Webfaction API # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015 # # 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 Lic...
gpl-3.0
-114,419,468,734,313,840
31.95814
353
0.600762
false
cledio66/pyglet
experimental/pinch.py
28
1196
#!/usr/bin/env python import sys from pyglet.gl import * from pyglet import window, image import shader w = window.Window(512, 512) kitten = image.load('../examples/programming_guide/kitten.jpg') pinch_f = ''' uniform sampler2D tex; uniform vec2 size; uniform vec2 mouse; uniform float strength; void main() { v...
bsd-3-clause
760,188,271,278,958,700
20.357143
72
0.659699
false
jgsogo/neutron
webapp/server/models/faq.py
1
3656
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.core.validators import ValidationError from django.utils.encoding import python_2_unicode_compatible ...
gpl-2.0
1,941,827,565,070,498,600
35.929293
141
0.6157
false
djgagne/hagelslag-unidata
hagelslag/data/SSEFModelGrid.py
1
1829
from ModelGrid import ModelGrid from glob import glob import pandas as pd import numpy as np import os class SSEFModelGrid(ModelGrid): """ """ def __init__(self, member, run_date, variable, start_date, end_date, path, single_step=False): self.path = path self.member = member foreca...
mit
7,229,422,591,940,580,000
48.432432
108
0.436851
false
dnxbjyj/python-basic
gui/wxpython/wxPython-demo-4.0.1/demo/agw/PyCollapsiblePane.py
1
9514
#!/usr/bin/env python import wx import wx.lib.buttons as buttons import os import sys try: dirName = os.path.dirname(os.path.abspath(__file__)) except: dirName = os.path.dirname(os.path.abspath(sys.argv[0])) sys.path.append(os.path.split(dirName)[0]) try: from agw import pycollapsiblepane as PCP except...
mit
-2,905,981,874,011,165,700
29.88961
96
0.585979
false
jensreeder/scikit-bio
skbio/sequence/_dna.py
1
3982
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
-4,151,907,586,631,150,000
33.929825
79
0.590407
false
leppa/home-assistant
homeassistant/components/nmbs/sensor.py
1
8775
"""Get ride details and liveboard details for NMBS (Belgian railway).""" import logging from pyrail import iRail import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_NAME, CONF_S...
apache-2.0
6,632,218,503,248,311,000
30.451613
86
0.602279
false
MainScientist/raspberry-bluetooth
client/main.py
1
1782
from bluetooth import * import sys import json if sys.version < '3': input = raw_input # search for the SampleServer service uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee" update = True while update: update = False attempts = 0 while attempts < 4: service_matches = find_service(uuid=uuid, addr...
mit
-7,932,918,487,926,437,000
28.213115
79
0.532548
false
apache/incubator-airflow
airflow/contrib/hooks/azure_container_instance_hook.py
7
1252
# # 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
-6,046,939,303,062,299,000
34.771429
86
0.766773
false
anandbhoraskar/Diamond
src/collectors/nagios/test/testnagios.py
31
2540
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from nagios import NagiosS...
mit
-428,946,765,868,991,300
30.358025
74
0.511024
false
gcrahay/fir_irma_plugin
fir_irma/decorators.py
1
4916
from functools import wraps from uuid import UUID from ipware.ip import get_ip from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.utils.decorators import available_attrs from django.utils.six.moves.urllib.parse import urlparse from django.shortcuts import resolve_url, redi...
apache-2.0
1,218,710,751,414,903,000
49.163265
114
0.592148
false
KalVentures/AlertNotifications
setup.py
1
1169
#!/usr/bin/env python import ConfigParser import os path = os.path.dirname(os.path.abspath(__file__)) Config = ConfigParser.ConfigParser() cfgfile = open(path+"/config.ini",'w') serverName = raw_input( 'Enter server name : ') serverEmail = raw_input( 'Server Email : ') serverPassword = raw_inpu...
mit
6,012,178,676,631,908,000
27.512195
60
0.712575
false
RequireSun/spider_888
main.py
1
1687
import unittest import os import codecs from functools import reduce from selenium import webdriver from bs4 import BeautifulSoup import lxml class SeleniumTest(unittest.TestCase): def setUp(self): self.driver = webdriver.PhantomJS("D:\Program_Coding\phantomjs\\bin\phantomjs") def testEle(self): ...
bsd-3-clause
6,909,504,654,843,624,000
33.428571
98
0.558388
false
Hitachi-Data-Systems/org-chart-builder
pptx/shapes/table.py
1
11385
# encoding: utf-8 """ Table-related objects such as Table and Cell. """ from . import Subshape from ..dml.fill import FillFormat from ..text import TextFrame from ..util import lazyproperty, to_unicode class Table(object): """ A table shape. Not intended to be constructed directly, use :meth:`.Slide.sha...
apache-2.0
-2,436,521,445,867,053,000
27.4625
77
0.580061
false
tecan/xchat-rt
plugins/scripts/Supybot-0.83.4.1-bitcoinotc-bot/build/lib/supybot/plugins/Scheduler/config.py
15
2370
### # Copyright (c) 2005, 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 conditi...
gpl-2.0
2,024,887,460,731,238,000
48.375
79
0.76962
false
susam/taskplot
taskplot/test/__init__.py
1
1553
# Copyright (c) 2014 Susam Pal # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
bsd-2-clause
6,228,962,082,598,472,000
40.972973
72
0.758532
false
Lilykos/invenio
invenio/modules/communities/bundles.py
4
1135
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 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
-6,493,565,547,725,836,000
28.102564
74
0.723348
false
damonkelley/django-name
tests/test_feeds.py
1
2433
import pytest from django.core.urlresolvers import reverse from name.feeds import NameAtomFeed from name.models import Name # Give all tests access to the database. pytestmark = pytest.mark.django_db def test_feed_has_georss_namespace(rf): """Check that the georss namespace is present in the response conte...
bsd-3-clause
1,013,191,295,262,192,400
28.670732
77
0.69626
false
jkyeung/XlsxWriter
xlsxwriter/test/worksheet/test_extract_filter_tokens.py
1
2714
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Worksheet class TestExtractFilterTokens(unittest.TestCase): ""...
bsd-2-clause
8,725,232,953,985,692,000
20.712
79
0.271186
false
NewpTone/stacklab-nova
debian/python-nova/usr/share/pyshared/nova/virt/powervm/common.py
9
3935
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM # # 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
-1,958,306,552,171,396,400
34.133929
78
0.638374
false
yujikato/DIRAC
src/DIRAC/Core/scripts/dirac_info.py
2
3315
#!/usr/bin/env python ######################################################################## # File : dirac-info # Author : Andrei Tsaregorodtsev ######################################################################## """ Report info about local DIRAC installation Example: $ dirac-info Option ...
gpl-3.0
5,530,768,076,849,534,000
29.981308
104
0.641327
false
qk4l/Flexget
flexget/plugins/modify/convert_magnet.py
4
4421
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import os import time import logging from flexget import plugin from flexget.event import event from flexget.utils.tools import parse_timedelta from flexget.utils.pathscrub...
mit
6,655,577,053,572,856,000
39.559633
108
0.59059
false
wbcyclist/django-xadmin
xadmin/plugins/details.py
4
2923
from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse, NoReverseMatch from django.db import models from xadmin.sites import site from xadmin.views import BaseAdminPlugin, ListAdminView class DetailsPlugin(BaseAdminPlugin): show_detail_fields = [] show_all_rel_deta...
bsd-3-clause
-283,898,404,691,465,000
45.396825
167
0.522066
false
rakshit-agrawal/sonnet
sonnet/python/modules/base_info_test.py
1
11356
# Copyright 2017 The Sonnet 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 l...
apache-2.0
-8,056,377,779,293,690,000
37.62585
79
0.671715
false
3nids/QGIS
tests/src/python/test_qgsrasterrerderer_createsld.py
30
29657
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsrasterrenderer_createsld.py --------------------- Date : December 2018 Copyright : (C) 2018 by Luigi Pirelli Email : luipir at gmail dot com *****...
gpl-2.0
-567,622,813,537,030,100
50.938704
197
0.664127
false
tensorflow/models
research/object_detection/utils/json_utils.py
2
2694
# 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
720,803,917,854,253,400
31.853659
80
0.67706
false
saukrIppl/seahub
seahub/base/database_storage/database_storage.py
1
9365
# DatabaseStorage for django. # 2011 (c) Mike Mueller <mike@subfocal.net> # 2009 (c) GameKeeper Gambling Ltd, Ivanov E. from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.core.files.storage import Storage from django.core.files import File from django.db import connection, transact...
apache-2.0
-1,862,318,086,356,039,000
38.020833
82
0.595729
false
docee/kodistubs
xbmc.py
2
32093
## @package xbmc # Various classes and functions to interact with XBMC. # """ Various classes and functions to interact with Kodi. """ import xbmcgui CAPTURE_FLAG_CONTINUOUS = 1 CAPTURE_FLAG_IMMEDIATELY = 2 CAPTURE_STATE_DONE = 3 CAPTURE_STATE_FAILED = 4 CAPTURE_STATE_WORKING = 0 DRIVE_NOT_READY = 1 ENGLISH_NAME = 2...
mit
-5,947,889,436,594,857,000
25.545079
129
0.615119
false
vIiRuS/Lagerregal
mail/tests.py
1
2753
import unittest from django.test.client import Client from django.test import TestCase from django.urls import reverse from django.contrib.contenttypes.models import ContentType from model_mommy import mommy from mail.models import MailTemplate, MailTemplateRecipient, MailHistory from users.models import Lageruser ...
bsd-3-clause
2,042,978,328,537,801,700
37.236111
105
0.682528
false
elopio/snapcraft
tests/integration/plugins/test_rust_plugin.py
1
5455
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Marius Gripsgard (mariogrip@ubuntu.com) # Copyright (C) 2017-2018 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 ...
gpl-3.0
-8,654,411,118,230,419,000
38.244604
78
0.631714
false
rghe/ansible
lib/ansible/modules/storage/netapp/na_ontap_lun.py
6
13348
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
-1,568,279,743,045,698,000
31.876847
120
0.548247
false
laserson/hdfs
test/test_util.py
1
2041
#!/usr/bin/env python # encoding: utf-8 """Test Hdfs client interactions with HDFS.""" from hdfs.util import * from nose.tools import eq_, raises import os class TestConfig(object): def test_rcpath(self): rcpath = os.getenv('HDFSCLI_RCPATH') try: with temppath() as tpath: os.environ['HDFSCL...
mit
-8,508,430,482,940,297,000
25.506494
60
0.571779
false
fwpz/WeiPython
wechat/wechatUtil.py
2
3806
# -*- coding:utf-8 -*- """ # Author: Pegasus Wang (pegasuswang@qq.com, http://ningning.today) # Created Time : Wed Feb 18 18:18:10 2015 # File Name: wechatUtil.py # Description: # :copyright: (c) 2015 by Pegasus Wang. # :license: MIT, see LICENSE for more details. """ import hashlib from lxml import etree def chec...
mit
-5,027,645,883,042,683,000
32.385965
96
0.588019
false
citrix-openstack-build/glance
glance/db/sqlalchemy/api.py
1
39768
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010-2011 OpenStack LLC. # Copyright 2012 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, V...
apache-2.0
8,173,759,760,428,653,000
34.76259
79
0.592134
false
dennybaa/st2contrib
packs/nagios/etc/st2service_handler.py
8
5614
#!/usr/bin/env python import httplib try: import simplejson as json except ImportError: import json import os import sys from urlparse import urljoin try: import requests except ImportError: raise ImportError('Missing dependency requests. Do ``pip install requests``.') try: import yaml except Imp...
apache-2.0
4,769,322,794,573,068,000
27.938144
92
0.602066
false
Transkribus/TranskribusDU
TranskribusDU/tasks/TablePrototypes/DU_ABPTableRG.py
1
29902
# -*- coding: utf-8 -*- """ DU task for ABP Table: doing jointly row BIESO and horizontal grid lines Copyright Naver Labs Europe(C) 2018 JL Meunier Developed for the EU project READ. The READ project has received funding from the European Union's Horizon 2020 research and innovation ...
bsd-3-clause
-9,006,351,465,621,018,000
42.269175
173
0.530638
false
klausman/scion
python/sibra_server/main.py
1
10677
# Copyright 2016 ETH Zurich # # 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, sof...
apache-2.0
2,730,924,266,326,352,400
36.996441
80
0.583778
false
lcdb/lcdblib
tests/test_stats.py
1
2338
from textwrap import dedent import numpy as np from lcdblib.stats import fisher table = [12, 5, 29, 2] def fix(s): # Remove common leading whitespace and blank lines at top or bottom ss = [i.rstrip() for i in s.splitlines(False)] if len(ss[0]) == 0: ss = ss[1:] if len(ss[-1]) == 0: ss...
mit
-9,026,949,973,392,746,000
29.763158
75
0.39136
false
legacysurvey/pipeline
bin/dr4/dr4-bootes-status.py
2
1187
from __future__ import print_function import argparse import os import numpy as np from astrometry.util.fits import fits_table, merge_tables parser = argparse.ArgumentParser(description='Generate a legacypipe-compatible CCDs file from a set of reduced imaging.') parser.add_argument('--camera', type=str, default='90pr...
gpl-2.0
-3,081,659,299,685,204,500
32.914286
122
0.649537
false
stgraber/snapcraft
snapcraft/tests/test_tour.py
11
3414
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 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 the h...
gpl-3.0
-5,176,485,900,614,102,000
37.795455
77
0.64382
false
wangmingjob/OnlineJudge
contest/migrations/0001_initial.py
6
3312
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('group', '0004_merge'), ] operati...
mit
4,021,260,478,137,278,000
43.756757
114
0.537742
false
erykoff/redmapper
redmapper/depth_fitting.py
1
11700
"""Classes and routines for simple fits to galaxy catalog depth. """ import fitsio import numpy as np import esutil import scipy.optimize class DepthFunction(object): """ Class to implement function for fitting depth. """ def __init__(self,mag,magErr,zp,nSig): """ Instantiate DepthFu...
apache-2.0
-485,585,583,846,440,260
28.620253
122
0.544872
false
jabesq/home-assistant
homeassistant/components/litejet/__init__.py
7
1402
"""Support for the LiteJet lighting system.""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers import discovery from homeassistant.const import CONF_PORT _LOGGER = logging.getLogger(__name__) CONF_EXCLUDE_NAMES = 'exclude_names' CONF_INCLUDE_SW...
apache-2.0
5,228,681,563,367,983,000
28.208333
79
0.687589
false
newmediamedicine/indivo_server_1_0
codingsystems/data/snomed.py
1
1142
""" SNOMED loading Ben Adida 2010-08-25 """ from django.utils import simplejson from loadutils import create_codingsystem import os.path import csv from codingsystems import models def load(stream, codingsystem, delimiter='|'): """ load data from a file input stream. """ csv_reader = csv.reader(str...
gpl-3.0
1,867,449,296,014,082,000
28.282051
173
0.64711
false
shaun-h/PyDoc
Managers/UserContributedManager.py
1
21125
import requests import re import json import ast import os import ui import threading import tarfile import math import time import plistlib import console import shutil import sqlite3 import base64 import clipboard import os import Image import io import copy import yaml from Managers import DBManager, TypeManager fro...
mit
-8,551,626,419,558,266,000
30.34273
234
0.678249
false
parksandwildlife/borgcollector
tablemanager/migrations/0024_auto_20160226_1239.py
2
1290
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import tablemanager.models class Migration(migrations.Migration): dependencies = [ ('tablemanager', '0023_auto_20160219_1402'), ] operations = [ migrations.AddField( mode...
bsd-3-clause
-906,098,760,160,801,000
32.076923
171
0.581395
false
mozilla/kuma
kuma/scrape/management/commands/__init__.py
1
1882
"""Common methods for scraping management commands.""" import logging from argparse import ArgumentTypeError from urllib.parse import urlparse from django.core.management.base import BaseCommand from kuma.scrape.scraper import Scraper class ScrapeCommand(BaseCommand): """Common base class for scraping managemen...
mpl-2.0
-1,177,034,831,692,715,000
32.017544
67
0.600956
false
Witia1/olympia
apps/translations/tests/test_models.py
14
26237
# -*- coding: utf-8 -*- from contextlib import nested import django from django.conf import settings from django.db import connections, reset_queries from django.test import TransactionTestCase from django.test.utils import override_settings from django.utils import translation from django.utils.functional import lazy...
bsd-3-clause
-4,317,369,250,341,583,000
37.122093
83
0.597873
false
getsentry/raven-aiohttp
raven_aiohttp.py
1
7539
""" raven_aiohttp ~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import abc import asyncio import socket import aiohttp from raven.conf import defaults from raven.exceptions import APIError, RateLimited from raven.transport.ba...
bsd-3-clause
4,017,273,378,549,687,000
27.665399
90
0.543175
false
sagemathinc/smc
src/scripts/storage_gluster.py
3
28864
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
agpl-3.0
-1,152,436,700,362,561,500
35.08
197
0.541159
false
opengeogroep/inasafe
safe/storage/test_clipping.py
9
12702
import unittest import numpy import os from os.path import join from safe.common.testing import TESTDATA from safe.common.polygon import (is_inside_polygon, inside_polygon, populate_polygon, generate_random_points_in_bbox) from safe.storage.vector impor...
gpl-3.0
-5,716,524,877,034,174,000
37.374622
77
0.529444
false
patricklaw/pants
src/python/pants/backend/python/util_rules/pex_from_targets_test.py
3
10222
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import json import subprocess import sys from dataclasses import dataclass from pathlib import Path, PurePath from textwrap import dedent from typing im...
apache-2.0
-3,392,319,371,602,630,000
33.073333
100
0.60497
false
KohlsTechnology/ansible
lib/ansible/modules/database/mssql/mssql_db.py
25
6853
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Vedit Firat Arig <firatarig@gmail.com> # Outline and parts are reused from Mark Theunissen's mysql_db module # 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_functi...
gpl-3.0
7,879,831,622,681,457,000
28.925764
153
0.594338
false
icedaq/dockerfiles
home/files/vim/bundle/deoplete-go/rplugin/python3/deoplete/sources/deoplete_go/clang_index.py
1
13162
class Clang_Index(object): kinds = dict({ # Declarations 1: 't', # CXCursor_UnexposedDecl # A declaration whose specific kind # is not exposed via this interface 2: 'struct', # CXCursor_StructDecl (A C or C++ struct) 3: 'union', # CXCursor_UnionDecl (A C or C++ union) ...
gpl-3.0
1,332,748,181,302,769,000
43.921502
80
0.629008
false
GammaC0de/pyload
src/pyload/core/utils/fs.py
1
9701
# -*- coding: utf-8 -*- # AUTHOR: vuolter import hashlib import io import os import shutil # import portalocker # import psutil from .convert import to_bytes, to_str try: import send2trash except ImportError: send2trash = None try: import magic except ImportError: magic = None from filetype impor...
agpl-3.0
1,738,767,629,270,754,000
24.263021
84
0.60602
false