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
zhangh43/incubator-hawq
tools/bin/ext/pg8000/protocol.py
15
47286
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
apache-2.0
-6,018,158,253,664,066,000
34.28806
173
0.611555
false
sandeepgupta2k4/tensorflow
tensorflow/contrib/keras/python/keras/utils/data_utils.py
25
10259
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
8,883,221,928,144,193,000
33.658784
89
0.649868
false
int19h/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/asn1crypto/csr.py
14
2142
# coding: utf-8 """ ASN.1 type classes for certificate signing requests (CSR). Exports the following items: - CertificatationRequest() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function from .algos import ...
apache-2.0
-9,004,212,906,114,262,000
21.3125
82
0.654062
false
Workday/OpenFrame
tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py
41
21095
#!/usr/bin/env python # Copyright (c) 2012 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. """Unittests for grit.format.policy_templates.writers.admx_writer.""" import os import sys import unittest if __name__ == '__mai...
bsd-3-clause
-5,673,786,201,235,686,000
35.815009
80
0.597203
false
vmax-feihu/hue
desktop/core/ext-py/Django-1.6.10/tests/decorators/tests.py
52
8243
from functools import wraps from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import login_required, permission_required, user_passes_test from django.http import HttpResponse, HttpRequest, HttpResponseNotAllowed from django.middleware.clickjacking import XFram...
apache-2.0
509,149,651,526,826,240
31.972
118
0.645396
false
strands-project/aaf_deployment
aaf_walking_group/scripts/insert_yaml.py
4
1233
#!/usr/bin/env python import std_msgs.msg from mongodb_store.message_store import MessageStoreProxy import yaml import json import pprint import argparse def loadDialogue(inputfile, dataset_name): print "openning %s" % inputfile with open(inputfile) as f: content = f.readlines() print "Done" ...
mit
-2,928,932,509,161,116,700
36.363636
157
0.699108
false
ahmed-mahran/hue
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/authn_context/__init__.py
33
7759
from saml2.saml import AuthnContext, AuthnContextClassRef from saml2.samlp import RequestedAuthnContext __author__ = 'rolandh' from saml2 import extension_elements_to_elements UNSPECIFIED = "urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified" INTERNETPROTOCOLPASSWORD = \ 'urn:oasis:names:tc:SAML:2.0:ac:classes:...
apache-2.0
-7,827,574,503,652,388,000
33.030702
82
0.552777
false
simonwydooghe/ansible
lib/ansible/modules/cloud/amazon/aws_inspector_target.py
6
7846
#!/usr/bin/python # Copyright (c) 2018 Dennis Conrad for Sainsbury's # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', '...
gpl-3.0
8,585,673,368,683,661,000
30.637097
92
0.62414
false
shizeeg/pyicqt
src/services/ConnectUsers.py
1
1807
# Copyright 2004-2006 Daniel Henninger <jadestorm@nc.rr.com> # Licensed for distribution under the GPL version 2, check COPYING for details import utils from twisted.words.xish.domish import Element from twisted.words.protocols.jabber.jid import internJID import jabw import config import lang from debug import LogEven...
gpl-2.0
-1,061,608,070,177,733,500
30.701754
128
0.722745
false
NewpTone/stacklab-nova
debian/python-nova/usr/share/pyshared/nova/tests/integrated/test_servers.py
7
16851
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
apache-2.0
1,706,596,903,855,364,600
37.297727
79
0.6221
false
adviti/melange
app/soc/views/helper/surveys.py
1
4496
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 applic...
apache-2.0
-4,689,414,171,984,274,000
29.585034
79
0.694395
false
base2Services/alfajor
alfajor/get_elb_metrics.py
1
1182
import sys import boto.ec2.cloudwatch import datetime sys.path.append("alfajor") from aws_base import AWS_BASE from boto.exception import BotoServerError class ElbMetrics(AWS_BASE): def init(self): self.set_conn(boto.ec2.cloudwatch.connect_to_region(**self.get_connection_settings())) def get_elb_sta...
mit
-9,160,569,638,259,769,000
33.764706
94
0.572758
false
overxfl0w/BioinspiredIA
langtons_ant.py
1
3107
#!/usr/bin/env python # -*- coding: utf-8 -*- # # langtons_ant.py # # Copyright 2015 Overxflow13 UP,DOWN,RIGHT,LEFT,WHITE,BLACK = 0,1,2,3,0,1 class Ant: def __init__(self,row,col): self.row,self.col,self.ori = row,col,DOWN def getRow(self): return self.row def getCol(self): return self.col def getPos(se...
gpl-2.0
2,344,499,427,747,806,000
29.460784
109
0.650467
false
molobrakos/home-assistant
homeassistant/components/plant/__init__.py
6
13645
"""Support for monitoring plants.""" from collections import deque from datetime import datetime, timedelta import logging import voluptuous as vol from homeassistant.components import group from homeassistant.components.recorder.util import execute, session_scope from homeassistant.const import ( ATTR_TEMPERATUR...
apache-2.0
874,114,372,506,767,600
35.190981
79
0.618587
false
pieleric/odemis
src/odemis/gui/dev/powermate.py
2
9666
# -*- coding: utf-8 -*- """ @author: Rinze de Laat Copyright © 2015 Rinze de Laat, Éric Piel, Delmic This file is part of Odemis. Odemis 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. Odemis is dist...
gpl-2.0
-4,553,344,123,934,675,000
36.02682
99
0.580919
false
forging2012/taiga-back
taiga/projects/custom_attributes/migrations/0006_add_customattribute_field_type.py
13
1156
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('custom_attributes', '0005_auto_20150505_1639'), ] operations = [ migrations.AddField( model_name='issuecustomatt...
agpl-3.0
7,346,973,222,814,061,000
35.125
144
0.58218
false
Mte90/remo
remo/events/tests/test_views.py
1
32178
# -*- coding: utf-8 -*- import datetime import mock from django.core import mail from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.utils.encoding import iri_to_uri from django.utils.timezone import make_aware, now from django_jinja.backend import Template as Jinj...
bsd-3-clause
1,955,599,350,737,202,400
46.177419
95
0.594126
false
coto/beecoss
bp_includes/lib/basehandler.py
1
11353
# *-* coding: UTF-8 *-* # standard library imports import logging import re import pytz import os # related third party imports import webapp2 from webapp2_extras import jinja2 from webapp2_extras import auth from webapp2_extras import sessions # local application/library specific imports from bp_includes import model...
lgpl-3.0
4,911,491,595,828,795,000
33.096096
123
0.594909
false
projectcalico/calico-nova
nova/openstack/common/systemd.py
24
3057
# Copyright 2012-2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
3,678,266,951,559,471,600
27.839623
78
0.63788
false
DeviaVir/slackpy
slackpy/slackpy.py
1
6552
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Takahiro Ikeuchi' import os import requests import json import traceback from argparse import ArgumentParser class SlackLogger: def __init__(self, web_hook_url, channel=None, username='Logger'): self.web_hook_url = web_hook_url self.us...
mit
-6,462,750,520,471,736,000
32.090909
79
0.440324
false
midroid/mediadrop
mediadrop/migrations/util.py
10
8351
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
gpl-3.0
-8,129,118,314,801,690,000
40.137931
100
0.628308
false
jaggu303619/asylum
openerp/addons/account_bank_statement_extensions/wizard/cancel_statement_line.py
52
1508
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
-2,903,428,950,234,175,500
39.756757
78
0.62931
false
edublancas/sklearn-model-evaluation
src/sklearn_evaluation/table.py
1
1872
from . import compute __all__ = ['feature_importances'] # http://ipython.readthedocs.org/en/stable/config/integrating.html class Table(): def __init__(self, content, header): try: self._tabulate = __import__('tabulate').tabulate except: raise ImportError('tabulate is requ...
mit
-6,617,903,667,981,385,000
28.25
78
0.606303
false
oztalha/News-Commentary-Tweets-of-Elites
analysis/tweeps-US.py
1
5757
# coding: utf-8 # # 113th Congress as News Commentators on Twitter # # In this project I am answering the following questions: # # * Who are the most active news commentators among senators and congressmen ? # * Which news got the most attention by the politicians ? # * How many news (of 7376) are commentated by de...
mit
8,331,257,566,190,518,000
36.875
236
0.687163
false
fenginx/django
tests/settings_tests/test_file_charset.py
27
1555
import sys from types import ModuleType from django.conf import FILE_CHARSET_DEPRECATED_MSG, Settings, settings from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango31Warning class DeprecationTests(SimpleTestCase): msg = FILE_CHARSET_DEPRECATED_MSG def ...
bsd-3-clause
6,694,954,358,733,557,000
37.875
78
0.688746
false
simod/geonode
geonode/tests/suite/runner.py
5
21532
import sys import time import logging import multiprocessing from multiprocessing import Process, Queue, Event from Queue import Empty from twisted.scripts.trial import Options, _getSuite from twisted.trial.runner import TrialRunner from django.conf import settings from django.test.runner import DiscoverRunner from...
gpl-3.0
-4,626,556,631,041,679,000
35.869863
102
0.556521
false
pigeonflight/strider-plone
docker/appengine/lib/django-0.96/django/core/context_processors.py
32
2145
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from django.conf...
mit
8,027,223,015,848,888,000
30.086957
83
0.687646
false
chrisspen/burlap
burlap/rsync.py
1
1440
from __future__ import print_function from burlap import Satchel from burlap.constants import * from burlap.decorators import task class RsyncSatchel(Satchel): name = 'rsync' def set_defaults(self): self.env.clean = 1 self.env.gzip = 1 self.env.exclusions = [ '*_local.py'...
mit
1,907,329,350,377,407,500
26.169811
113
0.538194
false
nicovillanueva/obsidian-core
tests/comparator_tests.py
2
1343
#from srComparator.screenshots.Comparator import Comparator import src.screenshots.comparison.Comparator as Comparator chrome_2 = 'images/chrome_2.png' chrome = "images/chrome.png" firefox = "images/firefox.png" pdiff = "images/diff.png" pdiff_inv = "images/diff_invert.png" #c = Comparator() #Comparator.size_differen...
gpl-2.0
2,411,188,459,411,313,700
39.727273
70
0.779598
false
krishnan793/perceptron_learning
perceptron.py
1
1391
import numpy as np def compute_epoch(V,T,W,alpha): for i in range(V.shape[0]): # V_i current input vector # T_i actual output # y predicted output V_i = V[i] T_i = T[i] if (np.dot(W,V_i) >= 0): y = 1 else: y = 0 a = alpha * (T_i-y) #print "a = ",a W_delta = a * V_i #print "W_delta = ",W...
gpl-2.0
26,721,377,981,514,524
20.4
73
0.603163
false
rafaelvalle/MDI
preprocess_data.py
1
4200
#!/usr/bin/python import numpy as np import cPickle as pkl import os import random from scipy import delete from sklearn.preprocessing import StandardScaler from missing_data_imputation import Imputer from processing import impute, perturb_data from params import adult_params, scalers_folder from params import feats_t...
mit
-7,595,130,093,406,176,000
37.888889
81
0.568095
false
brsyuksel/how-to
blog/models.py
1
1774
from types import StringTypes from hashlib import md5 from django.db import models from django.contrib.auth.models import User as authUser from .fields import ObjectIdField class User(authUser): class Meta: proxy = True @property def gravatar(self): return 'http://gravatar.com/avatar/' + md5(self.email).hexd...
gpl-3.0
8,528,493,785,649,637,000
23.652778
69
0.718715
false
expobrain/GitPython
git/objects/submodule/root.py
14
17666
from .base import ( Submodule, UpdateProgress ) from .util import ( find_first_remote_branch ) from git.exc import InvalidGitRepositoryError import git import logging __all__ = ["RootModule", "RootUpdateProgress"] log = logging.getLogger('git.objects.submodule.root') log.addHandler(logging.NullHandler())...
bsd-3-clause
705,845,025,575,164,000
49.474286
120
0.501245
false
liqd/a4-meinberlin
meinberlin/apps/budgeting/migrations/0001_squashed_0004_auto_20170420_1456.py
1
3199
# -*- coding: utf-8 -*- from __future__ import unicode_literals import autoslug.fields import ckeditor.fields import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations from django.db import models import adhocracy4.maps.fields import meinberlin.app...
agpl-3.0
-1,701,514,249,277,070,300
46.746269
261
0.628009
false
harvitronix/rl-rc-car
rl-rc-car/sensors/sensors.py
1
4881
""" This module holds classes for interacting with our sensors. Currently supports: - IR proximity - Sonar - IR distance via Arduino Example: ir_pins = [24, 25, 28] Example: sonar_pins = [[24, 25], [28, 29]] """ import RPi.GPIO as gpio import time from statistics import median import serial # Setup the pi. gpio.setm...
mit
8,593,860,555,225,821,000
28.944785
71
0.549682
false
sfalkner/pySMAC
pysmac/utils/smac_output_readers.py
2
7437
import json import functools import re import operator import numpy as np from pysmac.remote_smac import process_parameter_definitions def convert_param_dict_types(param_dict, pcs): _, parser_dict = process_parameter_definitions(pcs) for k in param_dict: param_dict[k] = parser_dict[k](param_dict[k])...
agpl-3.0
785,916,097,573,593,000
38.349206
238
0.602931
false
zzw922cn/Automatic_Speech_Recognition
speechvalley/feature/wsj/wsj_preprocess.py
1
5018
# encoding: utf-8 # ****************************************************** # Author : zzw922cn # Last modified: 2017-12-09 11:00 # Email : zzw922cn@gmail.com # Filename : wsj_preprocess.py # Description : Feature preprocessing for WSJ dataset # ****************************************************** ...
mit
315,326,521,415,169,800
36.17037
116
0.578717
false
ghandiosm/Test
addons/l10n_in_hr_payroll/report/report_payroll_advice.py
47
2468
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from datetime import datetime from openerp.osv import osv from openerp.report import report_sxw from openerp.tools import amount_to_text_en class payroll_advice_report(report_sxw.rml_parse): def __in...
gpl-3.0
2,207,137,365,483,276,300
36.969231
141
0.561183
false
rjschwei/azure-sdk-for-python
azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py
3
6701
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-7,319,882,818,121,555,000
49.765152
280
0.66214
false
le717/Shutdown-Timer
ShutdownTimer.py
1
11654
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """Shutdown Timer - Small Windows shutdown timer. Created 2013, 2015 Triangle717 <http://Triangle717.WordPress.com> Shutdown Timer 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 Soft...
gpl-3.0
3,401,676,235,553,052,000
30.160428
80
0.56487
false
wschaeferB/autopsy
setupSleuthkitBranch.py
5
4246
# This python script is used to automatically set the branch in The Sleuth Kit repository # for use in automated build environments. # # Basic idea is that it determines what Autopsy branch is being used and then checksout # a corresponding TSK branch. # # TSK_HOME environment variable must be set for this to work. ...
apache-2.0
700,748,941,106,427,100
38.682243
153
0.660386
false
live-clones/dolfin-adjoint
tests_dolfin/ode_tentusscher/tentusscher_2004_mcell.py
4
19942
from __future__ import division import numpy as _np list_types = (_np.ndarray, list) inf = float("infinity") def value_formatter(value, width=0): """ Return a formated string of a value Arguments --------- value : any The value which is formatted width : int A min str length va...
lgpl-3.0
-6,742,335,373,456,474,000
35.793358
83
0.533547
false
magiclab/blender_drone_toolkit
addons/magiclab_uav_io/volume_import.py
1
1884
import csv import bmesh import bpy from io_mesh_ply import import_ply from bpy_extras.io_utils import ImportHelper from bpy.props import StringProperty from bpy.types import Operator def inport_csv_boxes(filename): """ import original csv format bounds as a pointcloud """ cos = [] with open(filename) as ...
gpl-3.0
1,093,681,672,572,365,400
28.4375
80
0.651805
false
weera00/xbmc
addons/service.xbmc.versioncheck/lib/jsoninterface.py
89
1991
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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 versio...
gpl-2.0
7,702,316,556,259,414,000
36.584906
155
0.690105
false
archetipo/server-tools
web_context_tunnel/__openerp__.py
2
4113
{ 'name': 'Web Context Tunnel', 'category': 'Hidden', 'author': "Akretion,Odoo Community Association (OCA)", 'license': 'AGPL-3', 'description': """ Web Context Tunnel. =================== The problem with OpenERP on_changes ----------------------------------- OpenERP uses to pass on_change Ajax e...
agpl-3.0
6,084,684,503,951,155,000
43.225806
93
0.7593
false
thinkWhere/Roadnet
tests/integration/test_params_and_settings.py
1
10845
from textwrap import dedent import unittest import xml.etree.ElementTree as ETree from mock import call, patch, MagicMock, mock_open, sentinel from Roadnet.tests.integration.roadnet_test_cases import QgisTestCase import Roadnet.params_and_settings as p_and_s class TestParamsFileHandler(unittest.TestCase): def s...
gpl-2.0
6,235,684,351,119,655,000
45.148936
95
0.556385
false
HERA-Team/Monitor_and_Control
hera_mc/cm_sysutils.py
1
26804
# -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Methods for handling locating correlator and various system aspects.""" from sqlalchemy import func, and_, or_ import numpy as np from . import mc, cm_partconnect, cm_utils, cm_sysdef, cm_hooku...
bsd-2-clause
-152,592,945,233,629,400
36.124654
100
0.541524
false
fbradyirl/home-assistant
tests/helpers/test_condition.py
1
6075
"""Test the condition helper.""" from unittest.mock import patch from homeassistant.helpers import condition from homeassistant.util import dt from tests.common import get_test_home_assistant class TestConditionHelper: """Test condition helpers.""" def setup_method(self, method): """Set up things t...
apache-2.0
1,700,890,156,897,550,800
31.837838
91
0.489053
false
tomncooper/heron
heronpy/api/tests/python/metrics_unittest.py
4
2861
#!/usr/bin/env python # -*- encoding: 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...
apache-2.0
4,165,216,284,624,127,500
34.7625
88
0.67389
false
nathanielvarona/airflow
tests/utils/test_logging_mixin.py
3
2888
# # 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
-610,835,348,194,508,500
25.990654
72
0.640928
false
ptonner/GPy
GPy/util/normalizer.py
13
1116
''' Created on Aug 27, 2014 @author: t-mazwie ''' import logging import numpy as np class Norm(object): def __init__(self): pass def scale_by(self, Y): """ Use data matrix Y as normalization space to work in. """ raise NotImplementedError def normalize(self, Y): ...
bsd-3-clause
2,688,401,603,414,214,700
23.8
60
0.575269
false
surdy/dcos
conftest.py
8
1055
import os import pytest import release @pytest.fixture def release_config(): if not os.path.exists('dcos-release.config.yaml'): pytest.skip("Skipping because there is no configuration in dcos-release.config.yaml") return release.load_config('dcos-release.config.yaml') @pytest.fixture def release_c...
apache-2.0
7,706,216,305,006,280,000
30.969697
108
0.739336
false
AthinaB/synnefo
snf-cyclades-app/synnefo/logic/management/commands/server-list.py
8
5001
# Copyright (C) 2010-2014 GRNET S.A. # # 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 distributed i...
gpl-3.0
-3,986,686,938,511,067,000
34.978417
75
0.580884
false
f2nd/yandex-tank
yandextank/stepper/missile.py
1
14458
""" Missile object and generators You should update Stepper.status.ammo_count and Stepper.status.loop_count in your custom generators! """ import logging from itertools import cycle from netort.resource import manager as resource from . import info from .module_exceptions import AmmoFileError class HttpAmmo(object...
lgpl-2.1
5,008,206,693,039,682,000
38.395095
125
0.474201
false
seslab/MIPVC
MIPVC/FuenteV.py
1
8648
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-850 -*- #Titulo :FuenteV.py #Descripción :Interfaz de control de fuentes en modo Tensión. #Autor :Javier Campos Rojas #Fecha :Agosto-2017 #Versión :1.0 #Notas : #================================================...
gpl-3.0
614,082,857,715,307,300
24.602374
112
0.63491
false
carl-mastrangelo/grpc
tools/run_tests/run_build_statistics.py
14
10526
#!/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 o...
apache-2.0
1,030,119,117,399,214,600
40.769841
84
0.622744
false
SciTools/cartopy
lib/cartopy/tests/test_img_transform.py
2
3880
# Copyright Cartopy Contributors # # This file is part of Cartopy and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. import numpy as np from numpy.testing import assert_array_equal import pytest import cartopy.img_transform as img_trans...
lgpl-3.0
5,755,524,756,542,709,000
34.272727
76
0.570619
false
openfisca/openfisca-france-indirect-taxation
openfisca_france_indirect_taxation/examples/transports/depenses_par_categories/plot_depenses_par_strate.py
4
1693
# -*- coding: utf-8 -*- """ Created on Fri Sep 18 11:11:34 2015 @author: thomas.douenne """ # L'objectif est de calculer, pour chaque zone de résidence "strate", les dépenses moyennes en carburants. # L'analyse peut être affinée afin de comparer les dépenses en diesel et en essence. # On constate que pour les deux ca...
agpl-3.0
2,423,337,781,783,484,000
36.333333
106
0.667262
false
costadorione/purestream
channels/toonitalia.py
1
7937
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canale per toointalia # http://www.mimediacenter.info/foro/viewforum.php?f=36 # ------------------------------------------------------------ import re from core import config from core import logger ...
gpl-3.0
-4,788,120,387,632,032,000
33.193966
124
0.546199
false
vasiliykochergin/euca2ools
euca2ools/commands/ec2/createvpngateway.py
5
1980
# Copyright 2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 t...
bsd-2-clause
7,845,498,100,838,874,000
48.5
78
0.737374
false
SaikWolf/gnuradio
gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py
2
16170
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
3,292,079,363,314,600,400
31.93279
105
0.541682
false
dbfuentes/update-p2p-lists
update_lists.py
1
4628
#!/usr/bin/env python # title :update_lists.py # description :download multiple lists and make a single result list # author :Daniel Fuentes B. # date :08-06-2014 # version :0.1 # licence :MIT License/X11 license (see COPYING.txt file) # usage :python update_lists.py # =========...
mit
-7,457,388,271,560,356,000
33.266667
97
0.552529
false
lifu-tu/TE_TweeboParser
token_selection/pipeline.py
2
3310
# Copyright (c) 2013-2014 Lingpeng Kong # All Rights Reserved. # # This file is part of TweeboParser 1.0. # # TweeboParser 1.0 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 Lic...
gpl-3.0
-3,171,694,777,585,097,700
25.062992
79
0.548036
false
jmagnusson/ramlfications
tests/test_loader.py
4
8553
# -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB from __future__ import absolute_import, division, print_function import os import json import pytest from six import iteritems from ramlfications import loader from ramlfications.errors import LoadRAMLError from .base import EXAMPLES, JSONREF from .data.fixtur...
apache-2.0
-470,538,562,066,484,860
31.033708
76
0.679177
false
YuxuanLing/trunk
trunk/code/study/python/Fluent-Python-example-code/attic/dicts/strkeydict_dictsub.py
1
2301
"""StrKeyDict always converts non-string keys to `str` This is a variation of `strkeydict.StrKeyDict` implemented as a `dict` built-in subclass (instead of a `UserDict` subclass) Test for initializer: keys are converted to `str`. >>> d = StrKeyDict([(2, 'two'), ('4', 'four')]) >>> sorted(d.keys()) ...
gpl-3.0
-7,410,471,302,178,293,000
22.221053
64
0.498914
false
PhilHarnish/forge
spec/data/warehouse_spec.py
1
2387
import collections import itertools from mock.mock import patch from data import warehouse from spec.mamba import * with description('warehouse'): with before.all: self.warehouse_patch = patch.object( warehouse, '_DATA', collections.ChainMap()) self.warehouse_patch.start() with after.all: se...
mit
-188,881,297,935,912,670
32.152778
80
0.671973
false
zzzeek/mako
test/__init__.py
8
5060
import contextlib import os import re import unittest from mako import compat from mako.cache import CacheImpl from mako.cache import register_plugin from mako.compat import py3k from mako.template import Template from mako.util import update_wrapper template_base = os.path.join(os.path.dirname(__file__), "templates"...
mit
3,002,261,049,196,691,000
22.981043
79
0.568182
false
pgmillon/ansible
test/units/modules/network/f5/test_bigip_device_group_member.py
16
2967
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2, ...
gpl-3.0
-2,699,941,114,701,965,000
26.990566
91
0.642063
false
ZhaoCJ/django
django/db/backends/creation.py
3
20784
import hashlib import sys import time import warnings from django.conf import settings from django.db.utils import load_backend from django.utils.encoding import force_bytes from django.utils.six.moves import input from .utils import truncate_name # The prefix to put on the default database name when creating # the ...
bsd-3-clause
-2,469,110,843,963,781,000
40.818913
105
0.567552
false
cevaris/pants
contrib/go/src/python/pants/contrib/go/tasks/go_go.py
14
3511
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sub...
apache-2.0
2,845,736,358,736,101,000
40.305882
99
0.685844
false
xzturn/tensorflow
tensorflow/python/kernel_tests/linalg/linear_operator_toeplitz_test.py
2
6189
# 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
1,574,812,059,705,161,700
36.737805
80
0.689449
false
sebastianduran/Bolirana
ruleta.py
1
3728
import pygame, random, sys, time, os, subprocess, glob import RPi.GPIO as GPIO from pygame.locals import * screenW=1280 screenH=1000 ######### Configuracion de la pantalla gameDisplay=pygame.display.set_mode((screenW,screenH)) pygame.display.set_caption('Boliranas El Original') pygame.init() greendark=(0,128,0) ...
gpl-3.0
-922,650,006,805,618,700
28.824
118
0.628219
false
crs4/ProMort
promort/slides_manager/serializers.py
2
5115
# Copyright (c) 2019, CRS4 # # 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, modify, merge, publish, distribu...
mit
-935,676,158,968,680,100
30
120
0.687195
false
Maccimo/intellij-community
python/testData/inspections/PyStringFormatInspection/Basic.py
9
6071
'#%(language)s has %(#)03d quote types.' % {'language': "Python", "#": 2} #ok '%d %s' % <warning descr="Too few arguments for format string">5</warning> #Too few arguments for format string 'Hello world' % <warning descr="Too many arguments for format string">25</warning> #Too many arguments for format string "%(name...
apache-2.0
-3,637,054,528,343,223,300
46.80315
227
0.610773
false
brainstorm-ai/DIGITS
digits/dataset/images/generic/views.py
1
4461
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import flask from .forms import GenericImageDatasetForm from .job import GenericImageDatasetJob from digits import utils from digits.dataset import tasks from digits.webapp import app, scheduler from digits.uti...
bsd-3-clause
2,914,148,635,444,790,000
33.053435
105
0.559067
false
gquirozbogner/contentbox-master
third_party/unidecode/x090.py
4
4889
data = ( 'Tui ', # 0x00 'Song ', # 0x01 'Gua ', # 0x02 'Tao ', # 0x03 'Pang ', # 0x04 'Hou ', # 0x05 'Ni ', # 0x06 'Dun ', # 0x07 'Jiong ', # 0x08 'Xuan ', # 0x09 'Xun ', # 0x0a 'Bu ', # 0x0b 'You ', # 0x0c 'Xiao ', # 0x0d 'Qiu ', # 0x0e 'Tou ', # 0x0f 'Z...
apache-2.0
8,185,213,964,507,043,000
16.949612
20
0.368583
false
benjyw/pants
src/python/pants/option/arg_splitter.py
4
10671
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import dataclasses import os.path from abc import ABC from dataclasses import dataclass from pathlib import Path from typing import Dict, Iterable, List, Optional, Sequence, Tuple from pa...
apache-2.0
-2,058,844,401,133,481,200
36.181185
107
0.587855
false
scalingdata/Impala
tests/hs2/test_fetch.py
1
11529
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, 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 requir...
apache-2.0
-7,616,108,649,754,918,000
48.059574
96
0.722266
false
phborba/dsgtoolsop
auxiliar/geopy/exc.py
2
2514
""" Exceptions raised by geopy. """ class GeopyError(Exception): """ Geopy-specific exceptions are all inherited from GeopyError. """ class ConfigurationError(GeopyError): """ When instantiating a geocoder, the arguments given were invalid. See the documentation of each geocoder's ``__init__...
gpl-2.0
1,796,926,098,334,069,200
27.568182
76
0.716786
false
dmitryilyin/mistral
mistral/openstack/common/db/sqlalchemy/models.py
3
3684
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 Cloudscaling Group, Inc. # All Rights Reserved. # # Licens...
apache-2.0
-3,426,992,808,184,027,000
33.111111
79
0.628664
false
erickt/hue
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/sqlcreate.py
35
3180
import sys import socket from optparse import make_option from django.conf import settings from django.core.management.base import CommandError, BaseCommand from django_extensions.management.utils import signalcommand class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('-R...
apache-2.0
5,160,953,285,990,459,000
41.972973
116
0.613836
false
alexteodor/odoo
addons/account_voucher/account_voucher.py
1
85226
# -*- 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
-955,339,748,974,411,000
53.111746
398
0.598773
false
braddockcg/ocropy
ocrolib/psegutils.py
10
7620
from toplevel import * from pylab import * from scipy.ndimage import filters,interpolation import sl,morph def B(a): if a.dtype==dtype('B'): return a return array(a,'B') class record: def __init__(self,**kw): self.__dict__.update(kw) def blackout_images(image,ticlass): """Takes a page image and a tic...
apache-2.0
6,891,751,351,341,753,000
33.170404
121
0.60315
false
amadeusproject/amadeuslms
users/migrations/0001_initial.py
1
3278
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-12-20 18:17 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import re class Migration(migrations.Migration): initial = True dependencies = [ ('...
gpl-2.0
-4,677,485,319,841,285,000
65.897959
371
0.629652
false
noelbk/neutron-juniper
neutron/db/migration/alembic_migrations/versions/27ef74513d33_quota_in_plumgrid_pl.py
18
1989
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 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...
apache-2.0
8,185,182,609,210,244,000
29.6
78
0.700855
false
kidaa/encoded
src/encoded/audit/file.py
1
9132
from contentbase import ( AuditFailure, audit_checker, ) from .conditions import rfa current_statuses = ['released', 'in progress'] not_current_statuses = ['revoked', 'obsolete', 'deleted'] raw_data_formats = [ 'fastq', 'csfasta', 'csqual', 'rcc', 'idat', 'CEL', ] paired_end_assays...
mit
9,053,639,886,180,891,000
34.533074
125
0.590999
false
citrix-openstack-build/python-cinderclient
cinderclient/tests/v2/test_auth.py
2
14395
# Copyright (c) 2013 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 # # Unles...
apache-2.0
-4,373,985,867,180,317,700
35.815857
79
0.46009
false
alff0x1f/Misago
misago/threads/tests/test_moderatedcontent_view.py
8
2636
from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from misago.acl.testutils import override_acl from misago.forums.models import Forum from misago.users.testutils import UserTestCase, AuthenticatedUserTestCase from misago.threads import testutils class AuthenticatedTest...
gpl-2.0
-4,014,043,167,597,863,400
37.202899
78
0.657056
false
A3sal0n/FalconGate
lib/config.py
1
4738
from configparser import SafeConfigParser import threading import os import time import lib.utils as utils import netifaces from lib.logger import * from lib.settings import homenet, lock class CheckConfigFileModification(threading.Thread): def __init__(self, threadID): threading.Thread.__init__(self) ...
gpl-3.0
-3,961,764,385,715,233,000
44.557692
146
0.535458
false
jykntr/rest-cli-client
test/test_config.py
1
2886
import unittest from config import Config class TestConfig(unittest.TestCase): def test_file_does_not_exist(self): self.assertRaises(Exception, Config, 'missing_file.conf') def test_verify_option(self): config = Config('./resources/verifytrue.conf') self.assertTrue(config.get_options(...
mit
-6,331,840,196,142,078,000
37.493333
105
0.668053
false
fogbow/fogbow-dashboard
openstack_dashboard/test/api_tests/keystone_tests.py
15
4964
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
3,915,623,003,545,576,000
41.067797
78
0.619057
false
sayan801/indivo_server
indivo/tests/integration/test_modules/security.py
3
16915
""" Do a bunch of security tests Ben Adida 2010-08-27 """ import os, cgi, uuid import data from lxml import etree from django.utils import simplejson from utils import * PRD = 'prd' RESP_DATA = 'response_data' def test_client_expect_no_access(client, record_id, document_id, run_special_admin_calls=True): """ ...
gpl-3.0
-5,798,742,595,480,910,000
42.70801
160
0.692876
false
Jgarcia-IAS/SAT
openerp/addons-extra/account_invoice_taxes/__openerp__.py
3
1632
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 I.A.S. INGENIERÍA, APLICACIONES Y SOFTWARE Johan Alejandro Olano (<http:http://www.ias.com.co). # # This program is free software: you can r...
agpl-3.0
-9,075,844,190,031,815,000
31.62
119
0.602085
false
tanmaykm/JuliaBox
container/interactive/IJulia/tornado/src/gitsync.py
8
4718
import git import os import datetime import pytz import shutil import string import hashlib class GitSync: """ Keeps folders synchronized with a git repository. Not perfect yet. complex merging problematic. git commands can be brittle across versions. """ def __init__(self, loc): self.loc ...
mit
1,095,560,687,942,013,400
29.25
103
0.534972
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/grove_spdt_relay.py
9
2326
#!/usr/bin/env python # # GrovePi Example for using the Grove SPDT Relay(30A) (http://www.seeedstudio.com/wiki/Grove_-_SPDT_Relay(30A)) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? A...
apache-2.0
-101,050,306,656,767,900
33.716418
139
0.742046
false
soarpenguin/ansible
lib/ansible/modules/cloud/docker/docker_image_facts.py
9
6502
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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.0', 'status': ['prev...
gpl-3.0
-6,833,266,105,009,640,000
26.550847
117
0.496924
false
amakropoulos/nerve-segmentation
misc.py
1
9591
import scipy.misc import numpy as np import glob import config_default as c import pickle import os.path import re import math import img_augmentation as aug import gzip #import skimage import cv2 params_dir = "params" ######################## LOAD/SAVE IMAGE METHODS ######################## def save_image(filename...
mit
-6,661,680,963,492,816,000
28.785714
132
0.563132
false
antonsotin/vkfeedtrue
vkfeed/tools/wall_parser.py
16
20243
# -*- coding: utf-8 -*- '''Parses VKontakte wall pages.''' from __future__ import unicode_literals import cgi import datetime import logging import re import urllib from vkfeed import constants from vkfeed.core import Error from vkfeed.tools.html_parser import HTMLPageParser LOG = logging.getLogger(__name__) LOG.s...
bsd-2-clause
3,941,412,935,544,758,000
32.802698
159
0.483462
false
benob/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/wordnet/cache.py
9
5308
# Natural Language Toolkit: Wordnet Interface: Cache Module # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Oliver Steele <steele@osteele.com> # David Ormiston Smith <daosmith@csse.unimelb.edu.au>> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license informat...
gpl-3.0
7,920,866,844,520,414,000
28.325967
79
0.626225
false
DarkLuk42/hn-ias-race
app/resources/race_evaluation.py
1
3008
# coding: utf-8 from copy import deepcopy from app.resource import Resource from app.validator import Validator class RaceEvaluation(Resource): exposed = True fields = { "time_s": int } def __init__(self, application): self.filename = "race_evaluation" super().__init__(appli...
gpl-2.0
-976,043,208,546,712,700
36.6
115
0.605718
false