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
2014c2g12/c2g12
wsgi/exts/w2/static/Brython2.0.0-20140209-164925/Lib/_imp.py
115
2013
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
gpl-2.0
-4,836,565,915,423,539,000
38.470588
122
0.686538
false
iDTLabssl/kitsune
kitsune/announcements/tests/test_models.py
17
2316
from datetime import datetime, timedelta from nose.tools import eq_ from kitsune.announcements.models import Announcement from kitsune.announcements.tests import announcement from kitsune.sumo.tests import TestCase from kitsune.users.tests import user, group, profile from kitsune.wiki.tests import locale class Anno...
bsd-3-clause
6,374,682,826,659,778,000
35.1875
74
0.64076
false
fbradyirl/home-assistant
homeassistant/components/vera/sensor.py
2
3569
"""Support for Vera sensors.""" from datetime import timedelta import logging from homeassistant.components.sensor import ENTITY_ID_FORMAT from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT from homeassistant.helpers.entity import Entity from homeassistant.util import convert from . import VERA_CONTROLLER,...
apache-2.0
3,492,466,574,290,693,600
36.568421
80
0.637153
false
Dfelker/ansible
v1/ansible/runner/action_plugins/unarchive.py
109
5211
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # # 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 v...
gpl-3.0
-6,640,036,319,821,657,000
42.066116
160
0.617732
false
hslee16/ansible-modules-extras
system/pam_limits.py
22
8998
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <sebastien.rohaut@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 ...
gpl-3.0
-1,856,031,219,009,805,300
32.325926
206
0.583018
false
open-synergy/reporting-engine
report_qweb_element_page_visibility/__openerp__.py
9
1825
# -*- coding: utf-8 -*- ######################################################################### # # # Copyright (C) 2015 Agile Business Group # # # ...
agpl-3.0
8,406,841,060,218,108,000
48.324324
73
0.416438
false
mingwpy/scipy
scipy/sparse/linalg/matfuncs.py
62
25583
""" Sparse matrix functions """ # # Authors: Travis Oliphant, March 2002 # Anthony Scopatz, August 2012 (Sparse Updates) # Jake Vanderplas, August 2012 (Sparse Updates) # from __future__ import division, print_function, absolute_import __all__ = ['expm', 'inv'] import math import numpy as np imp...
bsd-3-clause
-3,391,806,998,564,126,000
30.122871
93
0.577962
false
bmanojlovic/ansible
lib/ansible/modules/windows/win_package.py
9
5063
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Trond Hindenes <trond@hindenes.com>, and others # # 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 versio...
gpl-3.0
-1,578,237,074,998,903,000
40.162602
316
0.724669
false
TangentMicroServices/ApplicationService
templates/settings.py
2
3541
""" Django settings for hoursservice 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/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
mit
-36,041,193,159,786,080
21.845161
71
0.690201
false
SNET-Entrance/Entrance-KEX
src/bootstrap/oauth.py
1
3710
import json from datetime import datetime, timedelta from flask import request, render_template, make_response, current_app from flask.ext.login import current_user from flask.ext.oauthlib.provider import OAuth2Provider from flask.ext.user import login_required, passwords from werkzeug.security import gen_salt from b...
apache-2.0
-1,996,301,866,244,134,000
25.690647
93
0.659838
false
xiandiancloud/ji
lms/djangoapps/courseware/features/certificates.py
20
9780
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url from course_modes.models import CourseMode from nose.tools import assert_equal UPSELL_LINK_CSS = '.message-upsell a.action-upgrade[href*="edx/999/Certificates"]' def create_cert_course(): world....
agpl-3.0
-2,619,307,497,643,300,400
30.650485
157
0.674029
false
danwent/libvirt-ovs
examples/domain-events/events-python/event-test.py
2
19937
#!/usr/bin/python -u # # # ################################################################################# # Start off by implementing a general purpose event loop for anyones use ################################################################################# import sys import getopt import os import libvirt impor...
lgpl-2.1
8,782,464,583,993,894,000
35.447898
128
0.602949
false
dparlevliet/zelenka-report-storage
server-local/twisted/web/twcgi.py
17
10780
# -*- test-case-name: twisted.web.test.test_cgi -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ I hold resource classes and helper classes that deal with CGI scripts. """ # System Imports import string import os import urllib # Twisted Imports from twisted.web import http from twiste...
lgpl-3.0
-8,445,920,963,727,801,000
35.053512
103
0.571058
false
rmatsuda/invesalius3
invesalius/data/bases.py
5
8288
import numpy as np import invesalius.data.coordinates as dco import invesalius.data.transformations as tr import invesalius.data.coregistration as dcr def angle_calculation(ap_axis, coil_axis): """ Calculate angle between two given axis (in degrees) :param ap_axis: anterior posterior axis represe...
gpl-2.0
2,212,378,794,472,304,600
33.118644
119
0.591458
false
rcbops/opencenter-agent
tests/plugins/output/test_broken.py
1
1755
#!/usr/bin/env python # OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc. ############################################################################## # # OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
apache-2.0
656,072,555,949,799,600
34.816327
79
0.671225
false
COCS4950G7/COSC4950
Source/Network/GUI_WXPythonExamples/GUI_KeyEvent.py
1
1124
__author__ = 'Chris HAmm' #GUI_KeyEvent #when we press a key on our keyboard, wx.KeyEvent is generated. This event is sent to the widget that currently has focus #three different key handlers #wx.EVT_KEY_DOWN #wx.EVT_KEY_UP #wx.EVT_CHAR #common request is to close the application when the ESC key is pressed import ...
gpl-3.0
3,112,796,771,184,039,000
24.545455
121
0.597865
false
JasonKessler/scattertext
scattertext/test/test_PriorFactory.py
1
4207
from unittest import TestCase import numpy as np import pandas as pd from scattertext import LogOddsRatioInformativeDirichletPrior from scattertext.PriorFactory import PriorFactory from scattertext.test.test_semioticSquare import get_test_corpus class TestPriorFactory(TestCase): def test_all_categories(self): ...
apache-2.0
4,020,863,783,460,656,600
42.371134
97
0.56097
false
robbwagoner/ansible-modules-core
files/assemble.py
11
6786
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
gpl-3.0
-7,458,224,431,699,165,000
31.782609
104
0.636163
false
jostep/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/mixture_test.py
9
35750
# 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
2,549,900,676,776,447,500
40.715286
121
0.626378
false
Orange-OpenSource/cf-php-build-pack
vendor/node-semver/semver/tests/test_increment_version.py
5
2371
# -*- coding:utf-8 -*- import pytest # node-semver/test/index.js # import logging # logging.basicConfig(level=logging.DEBUG, format="%(message)s") cands = [ ['1.2.3', 'major', '2.0.0', False], ['1.2.3', 'minor', '1.3.0', False], ['1.2.3', 'patch', '1.2.4', False], ['1.2.3tag', 'major', '2.0.0', True]...
apache-2.0
-9,091,827,519,240,950,000
43.735849
76
0.537748
false
henrytao-me/openerp.positionq
openerp/addons/base/ir/workflow/workflow.py
41
8979
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
3,620,035,172,433,661,400
47.535135
163
0.607529
false
cespare/pastedown
vendor/pygments/pygments/console.py
24
1850
# -*- coding: utf-8 -*- """ pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" cod...
mit
855,732,616,140,292,000
24
70
0.533514
false
sgibbes/carbon-budget
gain/cumulative_gain_mangrove.py
1
2558
### This script calculates the cumulative above and belowground carbon gain in mangrove forest pixels from 2001-2015. ### It multiplies the annual biomass gain rate by the number of years of gain by the biomass-to-carbon conversion. import utilities import datetime import subprocess import sys sys.path.append('../') i...
apache-2.0
-7,360,725,448,605,365,000
45.527273
162
0.710321
false
egenerat/gae-django
django/contrib/localflavor/ca/ca_provinces.py
13
1455
""" An alphabetical list of provinces and territories for use as `choices` in a formfield., and a mapping of province misspellings/abbreviations to normalized abbreviations Source: http://www.canada.gc.ca/othergov/prov_e.html This exists in this standalone file so that it's only imported into memory when...
mit
-6,197,194,251,586,590,000
22.694915
75
0.500344
false
atcemgil/notes
DrawNN.py
1
2429
#Code from https://gist.github.com/craffel/2d727968c3aaebd10359 import matplotlib.pyplot as plt def draw_neural_net(ax, left, right, bottom, top, layer_sizes, bias=0, draw_edges=False): ''' Draw a neural network cartoon using matplotilb. :usage: >>> fig = plt.figure(figsize=(12, 12)) ...
mit
-4,159,593,017,850,739,700
44.849057
97
0.549197
false
zfil/ansible-modules-core
cloud/rackspace/rax_network.py
157
4110
#!/usr/bin/python # 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) any later version. # # Ansible is distributed...
gpl-3.0
2,055,317,577,016,145,200
27.150685
80
0.63163
false
matthijsvk/multimodalSR
code/Experiments/neon-master/examples/whale_calls/make_submission.py
1
2183
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2016 Nervana Systems 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 # # ...
mit
-6,746,910,859,527,146,000
43.55102
92
0.68667
false
Timurdov/bionic
bionic/Lib/site-packages/django/core/management/templates.py
61
13198
import cgi import errno import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from optparse import make_option from os import path import django from django.template import Template, Context from django.utils import archive from django.utils.six.moves.urllib.reques...
apache-2.0
-5,329,462,775,678,317,000
39.609231
81
0.548416
false
alvin319/CarnotKE
jyhton/lib-python/2.7/lib-tk/Tkinter.py
43
157840
"""Wrapper functions for Tcl/Tk. Tkinter provides classes which allow the display, positioning and control of widgets. Toplevel widgets are Tk and Toplevel. Other widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton, Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox LabelFrame and PanedWindow. ...
apache-2.0
8,333,253,471,920,603,000
40.591568
110
0.597643
false
satvikdhandhania/vit-11
moca/mrs/legacy_api.py
3
14520
from __future__ import absolute_import try: import json except ImportError, e: import simplejson as json import logging import urllib2 import telnetlib import urllib from django.conf import settings from django.template import loader from django.http import HttpResponse from django import forms from django.c...
bsd-3-clause
-6,700,678,325,914,634,000
38.672131
95
0.612741
false
xpansa/odoomrp-wip
procurement_service/models/sale_order.py
21
1623
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, api class SaleOrder(models.Mo...
agpl-3.0
2,374,726,274,738,844,700
45.371429
79
0.521257
false
andela/codango
codango/community/models.py
1
3713
from cloudinary.models import CloudinaryField from django.contrib.auth.models import User from django.db import models from multiselectfield import MultiSelectField group_permissions = ( ('INVITE_MEMBER', 'Send invites'), ('DELETE_MEMBER', 'Remove members'), ('BLOCK_MEMBER', 'Block members'), ('SUSPEND...
mit
7,064,964,224,157,061,000
28.007813
79
0.638837
false
uberpye/gwdetchar
gwdetchar/io/tests/test_html.py
1
22674
# -*- coding: utf-8 -*- # Copyright (C) Alex Urban (2019) # # This file is part of the GW DetChar python package. # # GW DetChar 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,...
gpl-3.0
8,948,341,572,279,044,000
40.001808
507
0.633766
false
gspilio/nova
nova/manager.py
2
12022
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
-3,315,017,207,125,170,700
36.92429
79
0.642239
false
danielharbor/openerp
build/lib/openerp/addons/base/tests/test_osv.py
446
4722
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP S.A. http://www.openerp.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
-7,061,996,142,105,839,000
70.545455
360
0.655654
false
virtualopensystems/neutron
neutron/plugins/brocade/nos/nctemplates.py
8
6478
# Copyright (c) 2013 Brocade Communications Systems, 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....
apache-2.0
-4,733,467,710,321,879,000
31.069307
79
0.585829
false
amcgee/pymomo
pymomo/config/site_scons/utilities.py
2
2048
#utilities.py from SCons.Script import * from SCons.Environment import Environment import os import fnmatch import json as json import sys import os.path import pic12 import StringIO sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from pymomo.utilities import build from pymomo.mib.config12 import MIB1...
lgpl-3.0
6,297,943,813,212,660,000
22.011236
82
0.70166
false
xurantju/angr
tests/manual_performance.py
9
1101
#!/usr/bin/env python import time #import nose import logging l = logging.getLogger("angr_tests.counter") l.setLevel(logging.INFO) try: # pylint: disable=W0611,F0401 import standard_logging import angr_debug except ImportError: pass addresses_counter = { 'armel': None, 'armhf': None, # addr...
bsd-2-clause
-7,073,779,975,220,239,000
19.018182
97
0.597639
false
broferek/ansible
test/units/modules/network/check_point/test_cp_mgmt_tag_facts.py
19
2815
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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) any later version. # # Ansible is dist...
gpl-3.0
2,890,438,236,745,131,000
33.329268
133
0.693783
false
dacb/elvizCluster
unit_tests/test_elviz_abundance_utils.py
2
1469
import unittest import pandas as pd class testCompletenessOfSummarisedData(unittest.TestCase): def test_animal_data(self): """ Make sure each sample's fraction of abundance values sums very close to 1. On toy data set only. """ animal_df = pd.read_csv("./summarised_animals...
bsd-3-clause
1,644,267,904,385,233,400
32.386364
76
0.594282
false
liavkoren/djangoDev
django/utils/deconstruct.py
38
1087
def deconstructible(*args, **kwargs): """ Class decorator that allow the decorated class to be serialized by the migrations subsystem. Accepts an optional kwarg `path` to specify the import path. """ path = kwargs.pop('path', None) def decorator(klass): def __new__(cls, *args, **kw...
bsd-3-clause
-3,825,494,238,358,450,700
30.057143
85
0.543698
false
y12uc231/edx-platform
cms/djangoapps/contentstore/tests/test_transcripts_utils.py
16
19943
# -*- coding: utf-8 -*- """ Tests for transcripts_utils. """ import unittest from uuid import uuid4 import copy import textwrap from mock import patch, Mock from django.test.utils import override_settings from django.conf import settings from django.utils import translation from nose.plugins.skip import SkipTest fro...
agpl-3.0
1,956,278,120,985,533,400
35.474359
119
0.576902
false
jlegendary/nupic
nupic/regions/PyRegion.py
8
11217
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
gpl-3.0
-5,803,412,713,237,686,000
34.837061
81
0.711688
false
CTSRD-SOAAP/chromium-42.0.2311.135
tools/grit/grit/gather/admin_template_unittest.py
61
3929
#!/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. '''Unit tests for the admin template gatherer.''' import os import sys if __name__ == '__main__': sys.path.append(os.path.join(o...
bsd-3-clause
2,024,684,446,063,401,000
32.581197
91
0.661491
false
smi96/django-blog_website
lib/python2.7/site-packages/django/conf/locale/fi/formats.py
504
1390
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G.i' DATET...
mit
-1,417,611,570,508,168,700
32.095238
77
0.551079
false
Trois-Six/ansible-modules-core
cloud/rackspace/rax_cdb.py
28
8017
#!/usr/bin/python -tt # 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) any later version. # # Ansible is distrib...
gpl-3.0
3,624,473,217,057,075,000
29.953668
99
0.600848
false
xxd3vin/spp-sdk
opt/Python27/Lib/lib-tk/Tix.py
4
77781
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # # $Id: Tix.py 81008 2010-05-08 20:59:42Z benjamin.peterson $ # # Tix.py -- Tix widget wrappers. # # For Tix, see http://tix.sourceforge.net # # - Sudhir Shenoy (sshenoy@gol.com), Dec. 1995. # based on an idea of Jean-Ma...
mit
-2,127,810,217,321,731,000
38.583206
96
0.603965
false
VitalPet/account-financial-reporting
account_financial_report/report/__init__.py
38
1484
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved # Credits###################################################### # ...
agpl-3.0
4,375,374,219,338,291,700
52
78
0.571429
false
srcLurker/home-assistant
homeassistant/components/qwikswitch.py
9
6190
""" Support for Qwikswitch devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/qwikswitch/ """ import logging import voluptuous as vol from homeassistant.const import (EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_...
mit
6,044,339,940,712,231,000
31.578947
78
0.60517
false
ghedsouza/django
tests/template_tests/syntax_tests/test_filter_syntax.py
29
9422
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import SomeClass, SomeOtherException, UTF8Class, setup class FilterSyntaxTests(SimpleTestCase): @setup({'filter-syntax01': '{{ var|upper }}'}) def test_filter_syntax01(self): """ Basic filter ...
bsd-3-clause
-2,849,505,174,030,412,000
38.258333
100
0.607939
false
tracierenea/gnuradio
gr-vocoder/python/vocoder/qa_g721_vocoder.py
57
1573
#!/usr/bin/env python # # Copyright 2011,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
7,742,224,240,950,932,000
33.195652
70
0.67705
false
phalax4/CarnotKE
jyhton/lib-python/2.7/encodings/iso8859_16.py
593
13813
""" Python Character Mapping Codec iso8859_16 generated from 'MAPPINGS/ISO8859/8859-16.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
apache-2.0
5,912,773,384,737,905,000
43.993485
109
0.538551
false
supermeng/console
apis/utils.py
1
7361
# -*- coding: utf-8 import requests import tarfile import yaml import json import subprocess import re from retrying import retry from time import gmtime, strftime import docker from docker.types import IPAMConfig, IPAMPool from cStringIO import StringIO from commons.miscs import NoAvailableImages import commons.utils...
mit
-7,898,935,848,060,999,000
29.292181
92
0.633066
false
fivejjs/GPy
GPy/testing/likelihood_tests.py
4
30412
# Copyright (c) 2014, Alan Saul # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np import unittest import GPy from GPy.models import GradientChecker import functools import inspect from GPy.likelihoods import link_functions from GPy.core.parameterization import Param from functools import pa...
bsd-3-clause
7,065,791,670,344,823,000
41.833803
137
0.512955
false
Anveling/sp17-i524
project/S17-IR-P013/code/weather_data_analysis/run/wda_mapper.py
19
2000
#!/usr/bin/env python import sys import logging import iu.i524.S17IRP013.hadoop.hbase_to_hdfs as h2h DEFAULT_STATION_ID = 'DST:IND000DEF' logging.basicConfig(format = '%(asctime)s %(message)s',\ datefmt = '%m/%d/%Y %I:%M:%S %p',\ filename = 'wda_app.log',\ ...
apache-2.0
262,057,252,582,693,950
32.915254
86
0.552
false
Mattze96/youtube-dl
test/helper.py
63
8488
from __future__ import unicode_literals import errno import io import hashlib import json import os.path import re import types import sys import youtube_dl.extractor from youtube_dl import YoutubeDL from youtube_dl.utils import ( compat_str, preferredencoding, write_string, ) def get_params(override=No...
unlicense
1,254,007,584,531,334,400
37.581818
157
0.554312
false
stackforge/tricircle
tricircle/network/local_l3_plugin.py
1
2505
# Copyright 2015 Huawei Technologies Co., Ltd. # 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 # # Unl...
apache-2.0
-8,054,735,136,396,250,000
40.75
78
0.681038
false
technicalpickles/zulip
zerver/lib/bugdown/testing_mocks.py
124
8065
from __future__ import absolute_import import ujson NORMAL_TWEET = """{ "coordinates": null, "created_at": "Sat Sep 10 22:23:38 +0000 2011", "truncated": false, "favorited": false, "id_str": "112652479837110273", "in_reply_to_user_id_str": "783214", "text": "@twitter meets @seepicturely at #tcdisrupt c...
apache-2.0
-8,589,130,074,792,404,000
31.784553
129
0.610291
false
totolef/Sick-beard
sickbeard/notifiers/libnotify.py
49
4677
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
gpl-3.0
1,046,425,030,612,774,000
38.635593
107
0.644644
false
maximmbed/mbed
tools/host_tests/hello_auto.py
122
1148
""" mbed SDK Copyright (c) 2011-2013 ARM 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 wr...
apache-2.0
-8,729,304,900,952,592,000
32.764706
77
0.688153
false
rkokkelk/CouchPotatoServer
libs/tornado/testing.py
22
26389
#!/usr/bin/env python """Support classes for automated testing. * `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase with additional support for testing asynchronous (`.IOLoop` based) code. * `ExpectLog` and `LogTrapTestCase`: Make test logs less spammy. * `main()`: A simple test runner (wra...
gpl-3.0
1,363,424,186,070,170,400
36.91523
107
0.621357
false
miminar/openshift-ansible
roles/openshift_openstack/library/os_lbaas_deletion.py
15
3149
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2018 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # 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,737,741,449,258,715,000
29.278846
88
0.654811
false
CingHu/neutron-ustack
neutron/plugins/ml2/drivers/arista/arista_l3_driver.py
3
18083
# Copyright 2014 Arista 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 requ...
apache-2.0
-7,523,166,711,445,684,000
38.568928
79
0.562241
false
fginter/twitter_pp
filter_tw.py
1
1551
#-*- coding: utf-8 -*- import json import sys import re import codecs out8=codecs.getwriter("utf-8")(sys.stdout) focus_h_tags=set((u"pakolaiset",u"refugeecrisis",u"syrianrefugees",u"syria",u"syyria",u"pakolaiskriisi",u"migrantcrisis",u"refugeeswelcome",u"migrants",u"réfugiés",u"syrie")) def keep(tweet): """in go...
mit
5,742,605,736,475,683,000
28.788462
174
0.604261
false
parlar/calls2xls
external/CrossMap/usr/lib64/python2.7/site-packages/bx/seq/seq_tests.py
7
2063
""" Tests for `bx.seq.seq`. """ import unittest import os.path import sys import bx.seq, fasta_tests, nib_tests, qdna_tests test_fa = "test_data/seq_tests/test.fa" test2_fa = "test_data/seq_tests/test2.fa" test_nib = "test_data/seq_tests/test.nib" test_qdna = "test_data/seq_tests/test.qdna" valid_fasta ...
mit
-8,471,760,785,293,937,000
37.203704
128
0.641784
false
boneyao/sentry
src/sentry/migrations/0174_auto__del_field_projectkey_user_added.py
34
37246
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'ProjectKey.user_added' db.delete_column(u'sentry_projec...
bsd-3-clause
8,869,323,824,378,840,000
87.263033
223
0.573001
false
darron/dd-agent
checks.d/sqlserver.py
22
17085
''' Check the performance counters from SQL Server See http://blogs.msdn.com/b/psssql/archive/2013/09/23/interpreting-the-counter-values-from-sys-dm-os-performance-counters.aspx for information on how to report the metrics available in the sys.dm_os_performance_counters table ''' # stdlib import traceback # 3rd party...
bsd-3-clause
4,001,451,739,436,709,000
41.185185
126
0.562657
false
jking6884/RESTapi
app/users/views.py
2
4603
from flask import Blueprint, request, jsonify, make_response from app.users.models import Users, UsersSchema from flask_restful import Api from app.baseviews import Resource from app.basemodels import db from sqlalchemy.exc import SQLAlchemyError from marshmallow import ValidationError from werkzeug.security import gen...
mit
-2,484,723,599,820,436,500
39.026087
227
0.65327
false
mustafat/odoo-1
openerp/addons/base/tests/test_basecase.py
379
3895
# -*- coding: utf-8 -*- import unittest2 from openerp.tests import common class test_single_transaction_case(common.SingleTransactionCase): """ Check the whole-class transaction behavior of SingleTransactionCase. """ def test_00(self): """Create a partner.""" cr, uid = self.cr, self.u...
agpl-3.0
-5,009,655,901,914,638,000
43.261364
110
0.573813
false
haxoza/django
tests/serializers/models/base.py
112
4314
""" Serialization ``django.core.serializers`` provides interfaces to converting Django ``QuerySet`` objects to and from "flat" data (i.e. strings). """ from __future__ import unicode_literals from decimal import Decimal from django.db import models from django.utils import six from django.utils.encoding import pytho...
bsd-3-clause
-9,028,852,482,991,313,000
23.235955
93
0.663653
false
izonder/intellij-community
plugins/hg4idea/testData/bin/mercurial/cmdutil.py
90
77434
# cmdutil.py - help for command processing in mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import hex, nullid, nullrev, short from i18n import _ import ...
apache-2.0
7,027,222,148,788,779,000
36.15643
80
0.517731
false
matthiasdiener/spack
var/spack/repos/builtin/packages/r-xlsx/package.py
5
1669
############################################################################## # 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
-5,652,229,831,529,465,000
42.921053
78
0.666267
false
neurodata/ndstore
test/params.py
2
1086
# Copyright 2014 NeuroData (http://neurodata.io) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-7,777,065,739,853,414,000
30.028571
74
0.683241
false
unnikrishnankgs/va
venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connection.py
511
11617
from __future__ import absolute_import import datetime import logging import os import sys import socket from socket import error as SocketError, timeout as SocketTimeout import warnings from .packages import six try: # Python 3 from http.client import HTTPConnection as _HTTPConnection from http.client import...
bsd-2-clause
1,496,189,264,431,527,400
34.20303
99
0.608677
false
Edu-Glez/Bank_sentiment_analysis
env/lib/python3.6/site-packages/setuptools/command/install_egg_info.py
412
2203
from distutils import log, dir_util import os from setuptools import Command from setuptools import namespaces from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(namespaces.Installer, Command): """Install an .egg-info directory for the package""" description = "In...
apache-2.0
-8,717,581,541,734,638,000
34.532258
78
0.599637
false
SiCKRAGETV/SickRage
sickrage/providers/torrent/torrentz.py
2
3890
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # Git: https://git.sickrage.ca/SiCKRAGE/sickrage # # 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 Software Foundatio...
gpl-3.0
-655,952,683,001,280,400
35.35514
118
0.58329
false
kreatorkodi/repository.torrentbr
plugin.video.yatp/site-packages/hachoir_metadata/image.py
73
10800
from hachoir_metadata.metadata import (registerExtractor, Metadata, RootMetadata, MultipleMetadata) from hachoir_parser.image import ( BmpFile, IcoFile, PcxFile, GifFile, PngFile, TiffFile, XcfFile, TargaFile, WMF_File, PsdFile) from hachoir_parser.image.png import getBitsPerPixel as pngBitsPerPixel from ha...
gpl-2.0
8,661,440,760,853,289,000
35.120401
85
0.567778
false
michaelkourlas/gini
frontend/src/gbuilder/Core/Interfaceable.py
1
10393
"""A device that can have interfaces""" from Device import * from Attachable import * class Interfaceable(Attachable): def __init__(self): """ Create a device that can have interfaces. """ Attachable.__init__(self) self.adjacentRouterList = [] self.adj...
mit
4,355,973,467,313,571,300
35.384892
111
0.512268
false
hryamzik/ansible
lib/ansible/modules/cloud/google/gce.py
43
27529
#!/usr/bin/python # Copyright 2013 Google 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
-5,162,512,008,753,320,000
35.803476
150
0.608522
false
ramcn/demo2
crowdsourcing/models.py
5
14284
from django.contrib.auth.models import User from django.db import models from django.utils import timezone class RegistrationModel(models.Model): user = models.OneToOneField(User) activation_key = models.CharField(max_length=40) created_timestamp = models.DateTimeField(auto_now_add=True, auto_now=False) ...
mit
-196,921,408,862,519,070
42.54878
194
0.721297
false
stackforge/solum
solum/api/controllers/v1/app.py
2
6442
# Copyright 2015 - Rackspace US, 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...
apache-2.0
-4,683,541,368,390,689,000
36.236994
79
0.64747
false
wwj718/murp-edx
lms/djangoapps/courseware/tests/test_grades.py
33
5102
""" Test grade calculation. """ from django.http import Http404 from django.test.utils import override_settings from mock import patch from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactor...
agpl-3.0
-7,686,264,527,679,766,000
40.479675
100
0.661505
false
ajdawson/colormaps
setup.py
1
2163
"""Build and install the colormaps package.""" # Copyright (c) 2012 Andrew Dawson # # 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 right...
mit
-6,720,062,165,630,176,000
44.0625
79
0.676375
false
lammps/lammps
tools/python/neb_combine.py
51
2170
#!/usr/bin/env python # make new dump file by combining snapshots from multiple NEB replica dumps # Syntax: neb_combine.py -switch arg(s) -switch arg(s) ... # -o outfile = new dump file # each snapshot has NEB atoms from all replicas # -r dump1 dump2 ... = replica dump files of NEB atoms # ...
gpl-2.0
-8,951,231,248,319,545,000
23.659091
75
0.645622
false
stefan-balke/librosa
tests/test_display.py
2
9298
#!/usr/bin/env python # -*- encoding: utf-8 -*- # CREATED:2015-02-14 22:51:01 by Brian McFee <brian.mcfee@nyu.edu> '''Unit tests for display module''' import warnings # Disable cache import os try: os.environ.pop('LIBROSA_CACHE_DIR') except KeyError: pass import matplotlib matplotlib.use('Agg') matplotlib.rc...
isc
6,727,248,064,707,562,000
25.339943
86
0.661433
false
hbhzwj/imalse
core/configure/Anomaly.py
2
10446
#!/usr/bin/env python ### -- [2012-03-04 14:56:03] FlowRate and FlowSize anomaly parameter has be changed as ### -- ratio instead of absolute value ##-- [2012-04-08 22:31:20] Add GenAnomalyDot ##-- [2012-04-09 18:31:22] refactoring the whole file ## -- [2012-04-10 01:14:07] FLOW_RATE can work ##-- [2012-04-10 17:16:27...
gpl-3.0
49,268,129,187,494,590
38.718631
114
0.592571
false
solitone/sdsreader
sdsreader.py
1
1549
import arrow, logging, time from pmuploader import PmDataUploader from sdserror import SdsError, SdsNoPacketError from sdssensor import SdsSensor LOGLEVEL = logging.INFO PORT = '/dev/serial0' # Time delta between measurements, in seconds: SAMPLING_PERIOD = 15 URL = "http://dusty.pythonanywhere.com/pm/sav...
gpl-3.0
2,652,609,394,325,329,400
34.023256
75
0.555197
false
oopy/micropython
tests/float/complex1.py
2
2018
# test basic complex number functionality # constructor print(complex(1)) print(complex(1.2)) print(complex(1.2j)) print(complex("1")) print(complex("1.2")) print(complex("1.2j")) print(complex(1, 2)) print(complex(1j, 2j)) # unary ops print(bool(1j)) print(+(1j)) print(-(1 + 2j)) # binary ops print(1j + False) prin...
mit
3,306,552,884,582,727,700
17.18018
59
0.632309
false
dmlc/tvm
tests/python/frontend/mxnet/model_zoo/inception_v3.py
5
11306
# 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 u...
apache-2.0
-8,237,139,444,942,222,000
29.722826
127
0.535822
false
devendermishrajio/nova
nova/scheduler/filters/availability_zone_filter.py
1
2359
# Copyright (c) 2011-2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
-6,657,033,252,988,390,000
35.292308
78
0.663417
false
downpoured/lnzscript
lnzeditor/app/pyversion/python_extension_src/scite225_mainline/scintilla/test/XiteWin.py
5
16993
# -*- coding: utf-8 -*- from __future__ import with_statement import os, sys, unittest import ctypes from ctypes import wintypes from ctypes import c_int, c_ulong, c_char_p, c_wchar_p, c_ushort user32=ctypes.windll.user32 gdi32=ctypes.windll.gdi32 kernel32=ctypes.windll.kernel32 from MessageNumbers import msgs, sgsm...
gpl-3.0
4,808,260,420,203,147,000
25.022971
84
0.649208
false
kytvi2p/tahoe-lafs
setuptools-0.6c16dev4.egg/setuptools/command/alias.py
7
2449
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in ...
gpl-2.0
-7,162,733,645,627,625,000
30
78
0.57697
false
Jaironlanda/yowsup
yowsup/layers/protocol_groups/protocolentities/iq_groups_leave_success.py
39
1424
from yowsup.structs import ProtocolTreeNode from yowsup.layers.protocol_iq.protocolentities import ResultIqProtocolEntity class SuccessLeaveGroupsIqProtocolEntity(ResultIqProtocolEntity): ''' <iq type="result" from="g.us" id="{{ID}}"> <leave> <group id="{{GROUP_JID}}"></group> </le...
gpl-3.0
-6,377,799,502,223,269,000
32.116279
121
0.632022
false
DOAJ/doaj
portality/models/editors.py
1
2710
from portality.dao import DomainObject from portality.models import Account class EditorGroup(DomainObject): __type__ = "editor_group" @classmethod def group_exists_by_name(cls, name): q = EditorGroupQuery(name) res = cls.query(q=q.query()) ids = [hit.get("_source", {}).get("id") ...
apache-2.0
-7,194,454,171,357,292,000
27.229167
115
0.571218
false
p0deje/selenium
py/selenium/webdriver/firefox/service.py
7
2439
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
1,054,044,764,629,778,400
39.65
84
0.682247
false
naves-thiago/mbed-midi
workspace_tools/export/iar.py
8
6321
""" mbed SDK Copyright (c) 2011-2013 ARM 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 wr...
apache-2.0
-5,742,225,144,778,906,000
32.983871
136
0.568423
false
keysona/python
burness/0002/save_to_mysql.py
40
1463
#-*- coding: utf-8-*- import mysql.connector config = { 'user': 'root', 'password': 'root', 'host': '127.0.0.1', 'database': 'test', 'raise_on_warnings': True, } class save_keys_to_mysql: def __init__(self,path): self.path=path print(self.path) def __conn(self,**conf): try: conn=mysql.connector....
mit
5,974,682,465,661,107,000
22.596774
88
0.651401
false
uclaros/QGIS
tests/src/python/test_qgslayoutunitscombobox.py
45
2465
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutUnitsComboBox .. 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....
gpl-2.0
-1,743,286,959,560,804,600
30.602564
78
0.679108
false
proxysh/Safejumper-for-Mac
buildlinux/env32/local/lib/python2.7/sre_compile.py
28
16357
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre, sys import sre_parse from sre_constants impo...
gpl-2.0
-9,168,310,712,959,379,000
30.335249
75
0.507856
false
abagh0703/RetailTrail
flask/lib/python2.7/site-packages/requests/packages/urllib3/util/response.py
199
2167
from __future__ import absolute_import from ..packages.six.moves import http_client as httplib from ..exceptions import HeaderParsingError def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check vi...
mit
-4,032,245,849,443,887,600
28.283784
78
0.674204
false