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
openstack/tacker
tacker/db/migration/__init__.py
3
3774
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
apache-2.0
3,403,528,042,031,222,300
38.726316
79
0.629041
false
zrong/wpcmd
wpcmd/mde/ditaa.py
2
4539
""" A Python Markdown extension to convert plain-text diagrams to images. """ # The MIT License (MIT) # # Copyright (c) 2014 Sergey Astanin # # 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...
bsd-3-clause
-5,705,855,473,612,955,000
35.312
91
0.623926
false
c2corg/v6_api
c2corg_api/views/user_follow.py
1
4832
import logging from c2corg_api import DBSession from c2corg_api.models.feed import FollowedUser from c2corg_api.views import cors_policy, restricted_json_view from c2corg_api.views.document_listings import get_documents_for_ids from c2corg_api.views.document_schemas import user_profile_documents_config from c2corg_api...
agpl-3.0
-5,470,727,215,828,370,000
28.463415
75
0.612583
false
saurabh6790/omni-apps
patches/may_2013/p02_update_valuation_rate.py
30
1376
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes def execute(): from stock.stock_ledger import update_entries_after item_warehouse = [] # update valuation_rate in transaction doc...
agpl-3.0
102,612,489,715,879,600
39.5
91
0.670058
false
openstack/heat
heat/tests/autoscaling/test_heat_scaling_policy.py
1
8756
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
6,347,586,116,568,195,000
41.921569
78
0.613522
false
raymondgom/pmip6ns3.13new
src/network/bindings/modulegen__gcc_ILP32.py
32
498757
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
-2,329,994,842,073,469,000
62.844982
426
0.604485
false
maxive/erp
addons/l10n_eu_service/__manifest__.py
26
2279
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'EU Mini One Stop Shop (MOSS)', 'category': 'Localization', 'description': """ EU Mini One Stop Shop (MOSS) VAT for telecommunications, broadcasting and electronic services =========================...
agpl-3.0
2,004,400,643,340,232,200
35.758065
93
0.716981
false
Hawaii-Smart-Energy-Project/Smart-Grid-PV-Inverter
test/test_insert_single_meter_data_file.py
1
5700
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2014, University of Hawaii Smart Energy Project' __license__ = 'https://raw.github.com/Hawaii-Smart-Energy-Project/Smart-Grid' \ '-PV-Inverter/master/BSD-LICENSE.txt' import unittest from inser...
bsd-3-clause
-93,411,469,757,494,100
38.818182
102
0.567615
false
imruahmed/microblog
flask/lib/python2.7/site-packages/pip/exceptions.py
280
1257
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
bsd-3-clause
-8,862,171,454,575,108,000
23.647059
78
0.746221
false
abdulbaqi/quranf
venv/lib/python2.7/site-packages/werkzeug/exceptions.py
148
18577
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
mit
-2,466,692,818,210,942,000
29.10859
79
0.646391
false
jmouriz/sanaviron
doc/api/source/conf.py
3
9479
# -*- coding: utf-8 -*- # # Sanaviron documentation build configuration file, created by # sphinx-quickstart on Mon Sep 17 17:01:35 2012. # # 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...
apache-2.0
-1,942,385,923,860,571,600
31.686207
193
0.705349
false
sambitgaan/nupic
external/linux32/lib/python2.6/site-packages/pytz/__init__.py
69
30648
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database has historically been updated about 4 times a year OLSON_VERSI...
agpl-3.0
-3,484,383,658,359,607,300
20.813523
81
0.66112
false
felipenaselva/felipe.repository
script.module.placenta/lib/resources/lib/modules/trakt.py
1
17250
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
gpl-2.0
-689,592,721,035,571,500
35.469345
185
0.601043
false
nside/appcrawl
appcrawl/spiders/playstore.py
1
3616
from scrapy.selector import HtmlXPathSelector from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.contrib.spiders import CrawlSpider, Rule from appcrawl.items import AppItem, AppStoreItem from scrapy.http import Request import datetime import re class PlaystoreSpider(CrawlSpider): def gen...
bsd-2-clause
2,205,364,849,234,729,200
53.787879
505
0.61781
false
prutseltje/ansible
lib/ansible/plugins/callback/stderr.py
59
3194
# (c) 2017, Frederic Van Espen <github@freh.be> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callbac...
gpl-3.0
-1,762,108,654,163,185,200
38.432099
133
0.61052
false
srvg/ansible-modules-extras
identity/ipa/ipa_sudocmdgroup.py
28
8567
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
6,082,881,859,837,278,000
33.405622
103
0.63908
false
cgwalters/anaconda
pyanaconda/ui/gui/spokes/storage.py
1
41626
# Storage configuration spoke classes # # Copyright (C) 2011-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program...
gpl-2.0
4,752,424,531,771,857,000
41.913402
150
0.607265
false
pbrunet/pythran
pythran/analyses/range_values.py
3
10642
""" Module Analysing code to extract positive subscripts from code. """ # TODO check bound of while and if for more occurate values. import ast import copy from pythran.analyses import Globals, Aliases from pythran.intrinsic import Intrinsic from pythran.passmanager import FunctionAnalysis from pythran.range import ...
bsd-3-clause
3,094,377,842,183,470,600
31.445122
79
0.511464
false
supertom/ansible
lib/ansible/plugins/callback/context_demo.py
29
2079
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com> # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
1,484,611,275,987,105,000
34.237288
97
0.63925
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/contrib/staticfiles/management/commands/runserver.py
243
1343
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import Command as RunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(RunserverCommand): option_list = RunserverCommand.option_list + ( make_optio...
mit
5,166,146,093,612,658,000
45.310345
96
0.698436
false
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls.py
105
3133
from django.conf.urls.defaults import * from views import empty_view, absolute_kwargs_view other_patterns = patterns('', url(r'non_path_include/$', empty_view, name='non_path_include'), ) urlpatterns = patterns('', url(r'^places/(\d+)/$', empty_view, name='places'), url(r'^places?/$', empty_view, name="pl...
gpl-3.0
4,116,499,614,388,982,000
48.730159
80
0.569741
false
sniperyen/MyDjango
xadmin/plugins/editable.py
9
6739
from django import template from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponse from django.utils.encoding import force_unicode, smart_unicode from django.utils.h...
apache-2.0
6,013,316,570,899,070,000
41.11875
131
0.59445
false
elysium001/zamboni
mkt/feed/tests/test_models.py
9
10673
# -*- coding: utf-8 -*- import random import string from itertools import cycle from django.core.exceptions import ValidationError import mock from nose.tools import eq_, ok_ import mkt.site.tests import mkt.feed.constants as feed from mkt.feed.models import (FeedApp, FeedBrand, FeedCollection, FeedItem, ...
bsd-3-clause
-7,016,449,288,444,239,000
34.57
78
0.578484
false
leiferikb/bitpop
src/third_party/WebKit/Source/bindings/scripts/idl_validator.py
1
5029
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-3.0
-6,825,456,615,714,710,000
45.564815
110
0.673891
false
Livit/Livit.Learn.EdX
common/test/acceptance/tests/studio/test_import_export.py
13
16914
""" Acceptance tests for the Import and Export pages """ from nose.plugins.attrib import attr from datetime import datetime from flaky import flaky from abc import abstractmethod from bok_choy.promise import EmptyPromise from .base_studio_test import StudioLibraryTest, StudioCourseTest from ...fixtures.course import...
agpl-3.0
-9,093,546,574,179,088,000
37.440909
114
0.640594
false
sfromm/ansible-report
alembic/versions/2f3bd55d88a_base_tables.py
1
1299
"""base tables Revision ID: 2f3bd55d88a Revises: None Create Date: 2013-04-22 15:26:47.296443 """ # revision identifiers, used by Alembic. revision = '2f3bd55d88a' down_revision = None from ansiblereport.model import JSONEncodedDict from alembic import op import sqlalchemy as sa def upgrade(): ### commands au...
gpl-3.0
7,288,569,300,795,682,000
28.522727
63
0.661278
false
vFense/vFenseAgent-nix
agent/deps/rpm6-32/Python-2.7.5/lib/python2.7/lib-tk/test/test_ttk/test_extensions.py
88
9186
import sys import unittest import Tkinter import ttk from test.test_support import requires, run_unittest import support requires('gui') class LabeledScaleTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def test_widget_des...
lgpl-3.0
-351,469,206,361,310,340
32.525547
77
0.59373
false
Jeff20/sklearn_pycon2015
notebooks/fig_code/svm_gui.py
47
11549
""" ========== Libsvm GUI ========== A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create data points by point and click and visualize the decision region induced by different kernels and parameter settings. To create positive examples click the left mouse button; to create neg...
bsd-3-clause
4,971,655,977,755,502,000
32.868035
79
0.565157
false
Dima73/pli-openmultibootmanager
src/OMBManagerAbout.py
1
2459
############################################################################# # # Copyright (C) 2014 Impex-Sat Gmbh & Co.KG # Written by Sandro Cavazzoni <sandro@skanetwork.com> # All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
gpl-2.0
-904,339,241,326,673,500
33.633803
116
0.669784
false
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/logilab/common/table.py
93
31408
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
agpl-3.0
-1,865,526,839,058,620,000
32.808396
81
0.547345
false
joshloyal/scikit-learn
examples/feature_selection/plot_f_test_vs_mi.py
75
1647
""" =========================================== Comparison of F-test and mutual information =========================================== This example illustrates the differences between univariate F-test statistics and mutual information. We consider 3 features x_1, x_2, x_3 distributed uniformly over [0, 1], the targ...
bsd-3-clause
-6,642,357,052,161,931,000
32.612245
97
0.660595
false
foo123/sikuli-framework
examples/calculator/baseline/os/mac/Calculator/Calculator,lcdDisplay-0.py
2
1952
""" Copyright (c) 2013, SMART Technologies ULC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions an...
bsd-3-clause
1,600,121,264,138,907,600
43.44186
72
0.753586
false
groundhogxc/XCSoar
python/test/test_xcsoar.py
37
2408
#!/usr/bin/env python import xcsoar import argparse from pprint import pprint # Parse command line parameters parser = argparse.ArgumentParser( description='Please give me a IGC file name...') parser.add_argument('file_name', type=str) args = parser.parse_args() print "Init xcsoar.Flight, don't store flight in...
gpl-2.0
8,727,714,687,335,501,000
25.755556
112
0.669435
false
CanalTP-Cityway/apii_sim_engine
source/apiisim/tests/mis_translator/test_mis_api_stub.py
1
4320
#!/usr/bin/python # -*- encoding: utf8 -*- import os import unittest import json from datetime import timedelta, datetime from apiisim import tests from apiisim.common import AlgorithmEnum, TransportModeEnum from apiisim.common.plan_trip import LocationStructure from apiisim.common.mis_plan_trip import ItineraryRespon...
agpl-3.0
-1,395,001,047,732,850,000
42.636364
108
0.668287
false
spring-week-topos/nova-week
nova/tests/api/openstack/compute/test_limits.py
12
35781
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-5,357,864,286,038,564,000
35.436864
79
0.532433
false
jswope00/GAI
lms/envs/acceptance.py
2
6284
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .test import * from .sauce import * # You ...
agpl-3.0
8,061,897,684,150,476,000
32.604278
98
0.695576
false
justbrowsing/justbrowsing-adeskbar
src/adesk/0bar.py
1
33894
# -*- coding: utf-8 -*- # python modules import os import sys # extra modules import gtk import cairo import gobject import traceback try: import keybinder KEYBINDER_PRESENT = True except: KEYBINDER_PRESENT = False # adeskbar modules import ui import barconf import config import desktop import core ...
gpl-3.0
-2,067,622,214,144,890,400
35.602592
225
0.549773
false
obulpathi/reversecoin
misc/tools/bitcoin_genesis.py
2
4836
#!/usr/bin/env python import binascii from bitcoin.core import COutPoint, CTxIn, CTxOut, CTransaction, CBlock coinbase = "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73" scriptPubKeyHex = "4104678afdb0fe55482...
gpl-2.0
-7,545,839,946,766,482,000
33.791367
177
0.766956
false
electrolinux/weblate
weblate/trans/views/source.py
9
4827
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
gpl-3.0
-6,867,921,458,512,830,000
30.529412
76
0.664801
false
savi-dev/nova
nova/db/sqlalchemy/migrate_repo/versions/101_security_group_instance_association_uses_uuid.py
8
2540
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright 2012 Michael Still and Canonical 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 ...
apache-2.0
2,779,751,424,503,015,400
30.75
78
0.648031
false
INNUENDOCON/INNUca
src/SPAdes-3.10.1-Linux/share/spades/joblib2/format_stack.py
18
16314
""" Represent an exception with a lot of information. Provides 2 useful functions: format_exc: format an exception into a complete traceback, with full debugging instruction. format_outer_frames: format the current position in the stack call. Adapted from IPython's VerboseTB. """ # Authors: Gael Varoqua...
gpl-3.0
-5,230,174,639,504,592,000
36.331808
79
0.533223
false
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/nltk/featstruct.py
12
100854
# Natural Language Toolkit: Feature Structures # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu>, # Rob Speer, # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sourceforge.net> # For license information, see LICENSE.TXT """ Basic data classes for...
agpl-3.0
-561,273,284,066,415,940
40.030919
117
0.57617
false
r3tard/BartusBot
lib/setuptools/command/egg_info.py
301
16852
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import os import re import sys try: from setuptools_s...
apache-2.0
-9,098,054,325,669,304,000
34.108333
79
0.599454
false
jjinux/party-playlist-picker
third-party/gdata/tlslite/VerifierDB.py
359
3104
"""Class for storing SRP password verifiers.""" from utils.cryptomath import * from utils.compat import * import mathtls from BaseDB import BaseDB class VerifierDB(BaseDB): """This class represent an in-memory or on-disk database of SRP password verifiers. A VerifierDB can be passed to a server handshake...
apache-2.0
1,424,599,307,344,914,700
33.5
71
0.632088
false
evgchz/scikit-learn
sklearn/ensemble/gradient_boosting.py
6
63474
"""Gradient Boosted Regression Trees This module contains methods for fitting gradient boosted regression trees for both classification and regression. The module structure is the following: - The ``BaseGradientBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regressio...
bsd-3-clause
-1,396,673,558,145,351,000
37.988943
91
0.581829
false
lfz/Guided-Denoise
Attackset/Iter8_v3_resv2_inresv2_random/attack_iter.py
4
10757
"""Implementation of sample attack.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from scipy.misc import imread from scipy.misc import imsave from nets import inception_v3, inception_v4, inception_resnet_v2, resnet_v2 fro...
apache-2.0
3,506,776,663,877,861,400
37.417857
121
0.629915
false
nanophotonics/nplab
nplab/utils/array_with_attrs.py
1
3536
# -*- coding: utf-8 -*- """ Created on Tue May 26 08:08:14 2015 @author: rwb27 """ import numpy as np class AttributeDict(dict): """This class extends a dictionary to have a "create" method for compatibility with h5py attrs objects.""" def create(self, name, data): self[name] = data ...
gpl-3.0
-164,220,774,799,381,980
36.231579
98
0.630656
false
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/db/backends/postgresql_psycopg2/base.py
81
9415
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from...
mit
-233,190,633,907,065,180
38.725738
105
0.629421
false
snowdream1314/scrapy
tests/test_spider.py
53
13990
import gzip import inspect import warnings from io import BytesIO from testfixtures import LogCapture from twisted.trial import unittest from scrapy import signals from scrapy.settings import Settings from scrapy.http import Request, Response, TextResponse, XmlResponse, HtmlResponse from scrapy.spiders.init import In...
bsd-3-clause
1,410,957,226,837,916,700
35.623037
140
0.605075
false
archf/ansible
lib/ansible/modules/network/f5/bigip_monitor_tcp_echo.py
16
16338
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # 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 # ...
gpl-3.0
-1,554,223,833,871,160,000
30.001898
94
0.584955
false
sebrandon1/nova
nova/db/sqlalchemy/migrate_repo/versions/229_add_extra_resources_in_compute_nodes.py
25
1358
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
-6,431,888,702,800,318,000
37.8
78
0.73785
false
danmergens/mi-instrument
mi/dataset/driver/moas/gl/dosta/driver_common.py
7
1132
## # OOIPLACEHOLDER # # Copyright 2014 Raytheon Co. ## __author__ = "mworden" from mi.core.log import get_logger from mi.dataset.dataset_driver import DataSetDriver from mi.dataset.parser.glider import GliderParser class DostaAbcdjmGliderDriver: def __init__(self, source_file_path, particle_data_handler, parse...
bsd-2-clause
-4,193,161,188,427,083,000
26.609756
79
0.60689
false
lukeiwanski/tensorflow
tensorflow/python/ops/losses/losses.py
61
1102
# Copyright 2016 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,567,462,894,064,323,000
39.814815
80
0.712341
false
5GExchange/escape
mininet/examples/test/test_multipoll.py
2
1105
#!/usr/bin/env python """ Test for multipoll.py """ import unittest import pexpect class testMultiPoll( unittest.TestCase ): def testMultiPoll( self ): "Verify that we receive one ping per second per host" p = pexpect.spawn( 'python -m mininet.examples.multipoll' ) opts = [ "\*\*\* (h\d)...
apache-2.0
-5,339,093,238,142,895,000
28.078947
67
0.482353
false
albertomurillo/ansible
lib/ansible/modules/network/f5/bigip_config.py
15
13150
#!/usr/bin/python # -*- 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
1,630,164,974,763,817,500
29.868545
91
0.59346
false
Beyond-Imagination/BlubBlub
ChatbotServer/ChatbotEnv/Lib/site-packages/konlpy/tag/_mecab.py
1
3616
#! /usr/bin/python # -*- coding: utf-8 -*- import sys try: from MeCab import Tagger except ImportError: pass from .. import utils __all__ = ['Mecab'] attrs = ['tags', # 품사 태그 'semantic', # 의미 부류 'has_jongsung', # 종성 유무 'read', # 읽기 'type', # 타입 ...
gpl-3.0
2,614,760,195,193,435,000
31.019048
154
0.538667
false
CenturylinkTechnology/ansible-modules-extras
network/dnsimple.py
16
11833
#!/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
-4,552,723,886,163,365,400
37.543974
246
0.568833
false
cherylyli/stress-aid
env/lib/python3.5/site-packages/pymongo/server_selectors.py
20
5307
# Copyright 2014-2016 MongoDB, 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 writi...
mit
3,430,962,506,653,999,000
33.019231
76
0.664029
false
mcanthony/rethinkdb
external/v8_3.30.33.16/build/gyp/test/mac/gyptest-installname.py
244
2512
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled correctly. """ import TestGyp import re import subprocess ...
agpl-3.0
1,958,927,814,491,359,500
30.797468
78
0.675557
false
jmptrader/dirigible-spreadsheet
dirigible/sheet/tests/parser/test_fl_cell_reference_parse_node.py
2
6314
# Copyright (c) 2005-2010 Resolver Systems Ltd, PythonAnywhere LLP # See LICENSE.md # try: import unittest2 as unittest except ImportError: import unittest from sheet.parser.parse_node import ParseNode from sheet.parser.fl_cell_reference_parse_node import FLCellReferenceParseNode from sheet.parser.fl_referenc...
mit
-921,135,956,750,384,800
45.426471
140
0.663605
false
cristiandima/highlights
highlights/extractive/erank.py
1
3576
""" This is in many ways identical to the textrank algorithms. The only difference is that we expand the sentence graph to also include the title of the text, the topics associated with the text, and the named entitites present The output is still an importance score for each sentence in the original text but these ne...
mit
-583,513,381,419,460,200
35.489796
90
0.691555
false
SerialShadow/SickRage
autoProcessTV/lib/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2360
3778
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
gpl-3.0
5,962,808,152,702,438,000
34.980952
80
0.610905
false
jbzdak/edx-platform
cms/djangoapps/contentstore/views/tests/test_course_index.py
5
35844
""" Unit tests for getting the list of courses and the course outline. """ import ddt import json import lxml import datetime import mock import pytz from django.conf import settings from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext as _ from contentstore.courseware_ind...
agpl-3.0
-2,721,059,396,229,328,000
41.070423
119
0.644989
false
ujenmr/ansible
lib/ansible/modules/database/misc/kibana_plugin.py
52
7252
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2016, Thierno IB. BARRY @barryib # Sponsored by Polyconseil http://polyconseil.fr. # # 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__ = t...
gpl-3.0
3,521,916,468,770,162,700
26.366038
120
0.634308
false
nhejazi/scikit-learn
sklearn/neural_network/_base.py
50
6856
"""Utilities for the neural network modules """ # Author: Issam H. Laradji <issam.laradji@gmail.com> # License: BSD 3 clause import numpy as np from scipy.special import expit as logistic_sigmoid def identity(X): """Simply return the input array. Parameters ---------- X : {array-like, sparse matri...
bsd-3-clause
-8,872,579,794,825,533,000
26.206349
79
0.618728
false
isyippee/oslo.messaging
oslo_messaging/_drivers/protocols/amqp/drivertasks.py
7
4058
# Copyright 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
-7,825,941,226,630,720,000
36.925234
79
0.635042
false
amenonsen/ansible
lib/ansible/modules/storage/netapp/netapp_e_facts.py
4
27761
#!/usr/bin/python # (c) 2016, 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
-609,340,091,246,414,700
50.219557
140
0.503224
false
Mactory/easy-thumbnails
easy_thumbnails/south_migrations/0009_auto__del_storage.py
20
2337
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'Storage' db.delete_table('easy_thumbnails_storage') def backwards(self, orm): ...
bsd-3-clause
5,434,401,292,106,068,000
46.693878
146
0.569961
false
embray/numpy
numpy/core/tests/test_ufunc.py
1
43039
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.testing import * import numpy.core.umath_tests as umt import numpy.core.operand_flag_tests as opflag_tests from numpy.compat import asbytes from numpy.core.test_rational import * class TestUfunc(TestCase): d...
bsd-3-clause
5,173,443,560,941,612,000
38.777264
81
0.490299
false
diorcety/intellij-community
plugins/hg4idea/testData/bin/mercurial/help.py
91
18018
# help.py - help data for mercurial # # Copyright 2006 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 i18n import gettext, _ import itertools, sys, os, error import extensions, revset, fileset,...
apache-2.0
3,370,541,433,408,960,500
34.75
80
0.513542
false
toslunar/chainerrl
chainerrl/links/empirical_normalization.py
1
3685
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA import chainer import numpy as np class EmpiricalNormaliza...
mit
1,164,823,547,270,884,000
30.495726
77
0.593487
false
jgiannuzzi/pypi-server
pypi_server/handlers/pypi/proxy/client.py
2
4592
# encoding: utf-8 import hashlib import logging from copy import copy from slimurl import URL from tornado.gen import coroutine, Return from tornado.httpclient import AsyncHTTPClient from tornado.ioloop import IOLoop from tornado.locks import Lock from tornado.options import options from tornado_xmlrpc.client import Se...
mit
4,552,339,786,821,855,700
27.7
98
0.567291
false
talha81/TACTIC-DEV
src/client/tactic_client_lib/tactic_server_stub.py
4
146424
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
8,299,705,416,211,653,000
36.439018
433
0.579768
false
JaronArmiger/tenshi
angel-player/src/chrome/content/angelic/test.py
11
4815
#!/usr/bin/env python # Licensed to Pioneers in Engineering under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Pioneers in Engineering licenses # this file to you under the Apache License, Version 2.0 (the #...
apache-2.0
2,831,676,987,181,664,000
28.539877
76
0.593977
false
binhqnguyen/lena-local
src/visualizer/visualizer/higcontainer.py
189
3560
import gtk import gobject try: from gazpacho.widgets.base.base import SimpleContainerAdaptor except ImportError: pass #root_library = 'hig' class HIGContainer(gtk.Bin): __gtype_name__ = 'HIGContainer' __gproperties__ = { 'title': (str, 'Group Title', 'the group title', '', g...
gpl-2.0
-3,056,126,745,749,747,700
35.701031
84
0.595225
false
dednal/chromium.src
net/data/ssl/scripts/crlsetutil.py
75
5856
#!/usr/bin/env python # Copyright (c) 2014 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. """ This utility takes a JSON input that describes a CRLSet and produces a CRLSet from it. The input is taken on stdin and is a di...
bsd-3-clause
5,961,189,099,905,720,000
28.28
79
0.663593
false
apagac/cfme_tests
cfme/scripting/appliance.py
2
6850
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ from functools import partial import click from cached_property import cached_property from cfme.utils.conf import cfme_dat...
gpl-2.0
-6,823,417,460,662,708,000
36.027027
99
0.668613
false
glemaitre/UnbalancedDataset
imblearn/ensemble/tests/test_classifier.py
2
17981
"""Test the module ensemble classifiers.""" # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # Christos Aridas # License: MIT import numpy as np from sklearn.datasets import load_iris, make_hastie_10_2 from sklearn.model_selection import (GridSearchCV, ParameterGrid, ...
mit
2,519,711,170,101,688,300
38.693157
78
0.58395
false
iddqd1/django-cms
cms/models/titlemodels.py
50
5426
# -*- coding: utf-8 -*- from datetime import timedelta from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from cms.constants import PUBLISHER_STATE_DIRTY from cms.models.managers import Ti...
bsd-3-clause
-3,959,758,635,465,392,000
36.427586
115
0.623111
false
savfod/ptset
ptset.py
1
14571
#!/usr/bin/python3 DESCRIPTION = ''' Program for ptset drawing. Some examples of usage: python ptset.py -h python ptset.py --curve 9 --draw_points A,0.199,True B,0.412,True python ptset.py --curve 8 --draw_points A,-0.36,True X1,-0.26 B,0,True X2,0.26 C,0.36,True python ptset.py --curve 7 --tangent_curve python ...
mit
-2,547,403,635,658,296,000
33.858852
176
0.547732
false
nwchandler/ansible
lib/ansible/cli/__init__.py
15
33623
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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, eithe...
gpl-3.0
8,905,803,994,542,137,000
46.223315
160
0.574785
false
kaustubh-kabra/modified-xen
tools/python/logging/logging-0.4.9.2/test/log_test12.py
42
1951
#!/usr/bin/env python # # Copyright 2001-2002 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright n...
gpl-2.0
-3,919,620,158,034,893,300
40.510638
78
0.737058
false
markpudd/logistic_regression
logisticReg.py
1
1904
# Helper functions to do logistic regression # To use the logRegCost function needs to be minimised, use the logRegGrad method to provide derivative # import cv2 import numpy as np import scipy.io as sio import csv as csv from sklearn.preprocessing import normalize def featureNormalize(data): mu = data.mean(0) ...
mit
8,888,893,005,371,620,000
21.666667
103
0.56145
false
tinloaf/home-assistant
homeassistant/components/media_player/cast.py
3
24944
""" Provide functionality to interact with Cast devices on the network. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cast/ """ import asyncio import logging import threading from typing import Optional, Tuple import attr import voluptuous...
apache-2.0
3,968,205,885,144,293,400
35.628488
79
0.643281
false
Juniper/nova
nova/virt/powervm/host.py
2
2812
# Copyright 2014, 2017 IBM Corp. # # 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
805,997,186,879,891,300
40.352941
78
0.706259
false
raildo/nova
nova/tests/unit/test_cinder.py
14
6997
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
7,415,518,022,476,962,000
35.253886
79
0.60726
false
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/twisted/python/_shellcomp.py
15
24327
# -*- test-case-name: twisted.python.test.test_shellcomp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ No public APIs are provided by this module. Internal use only. This module implements dynamic tab-completion for any command that uses twisted.python.usage. Currently, only zsh is s...
mit
7,625,184,498,486,815,000
35.472264
88
0.612324
false
MadCat34/Sick-Beard
sickbeard/clients/requests/status_codes.py
252
3043
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
gpl-3.0
-6,465,533,652,602,509,000
34.337209
89
0.58177
false
richardgroves/namebench
nb_third_party/jinja2/environment.py
199
43213
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import * from ...
apache-2.0
2,180,516,693,026,373,600
38.463927
82
0.605998
false
smartshark/serverSHARK
smartshark/urls.py
1
1884
from django.conf.urls import url from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login, logout from smartshark.views import analysis, common, collection, visualizations, remote urlpatterns = [ # Frontend url(r'^login/$', login, name='mysite_login'), url(r'^logout/$'...
apache-2.0
-4,563,876,464,949,703,000
59.774194
135
0.705945
false
pawaranand/phr_frappe
frappe/website/statics.py
17
5584
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os, time def sync_statics(rebuild=False): s = sync() s.verbose = True # s.start(rebuild) # frappe.db.commit() while True: s.start(rebuild) frappe.db.c...
mit
-7,153,857,291,017,994,000
31.277457
136
0.6601
false
kbran420/android-quill
jni/libhpdf-2.3.0RC2/if/python/demo/slide_show_demo.py
32
6231
### ## * << Haru Free PDF Library 2.0.6 >> -- slideshow_demo.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that ...
gpl-3.0
3,287,125,042,290,296,300
30.805263
80
0.610175
false
thepug/Speeqe
speeqeweb/speeqe/templatetags/splib.py
1
1687
from django.contrib.sites.models import Site from django.template import Library, Node import speeqeweb.xmpp.muc as muc import speeqeweb.settings as settings register = Library() @register.simple_tag def current_domain(): return settings.HTTP_DOMAIN #return all active muc rooms class ActiveRoomsNode(Node): ...
agpl-3.0
-5,732,071,145,099,429,000
23.808824
74
0.614108
false
calberti/models
resnet/resnet_main.py
2
7036
# Copyright 2016 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,408,642,753,262,316,500
34.004975
80
0.614412
false
thurt/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_datetime.py
52
133995
"""Test date/time type. See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases """ import os import pickle import cPickle import unittest from test import test_support from datetime import MINYEAR, MAXYEAR from datetime import timedelta from datetime import tzinfo from datetime import time from datetime impo...
apache-2.0
907,643,222,827,289,300
38.96272
80
0.565566
false
sexroute/commandergenius
project/jni/python/src/Lib/encodings/iso2022_kr.py
816
1053
# # iso2022_kr.py: Python Unicode Codec for ISO2022_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncod...
lgpl-2.1
3,049,885,450,164,686,000
26
74
0.703704
false
GustavoHennig/ansible
lib/ansible/modules/cloud/misc/xenserver_facts.py
69
5402
#!/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,760,561,686,781,296,000
24.125581
87
0.593854
false
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/email/mime/message.py
73
1320
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing message/* MIME documents.""" __all__ = ['MIMEMessage'] from email import message from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart):...
mit
-3,318,329,596,595,224,600
35.742857
78
0.657576
false
yjmade/odoo
openerp/addons/base/res/res_partner.py
22
39855
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,265,273,204,571,432,400
48.570896
186
0.584795
false
dgoedkoop/QGIS
python/plugins/processing/algs/gdal/proximity.py
2
8834
# -*- coding: utf-8 -*- """ *************************************************************************** proximity.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
gpl-2.0
-5,947,998,920,742,397,000
44.071429
146
0.508603
false