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
yonglehou/pybrain
examples/supervised/neuralnets+svm/example_mixturedensity.py
26
3548
# $Id$ # Train a mixture of Gaussians to approximate a multi-mode dataset. # It seems fairly easy to fall into some local minimum. Good solutions # have errors around -200. # This example reproduces Fig. 5.21 from Bishop (2006). __author__ = 'Martin Felder' import pylab as p import numpy as np from pybrain.structure....
bsd-3-clause
-6,189,743,814,080,675,000
32.471698
95
0.636415
false
backmari/moose
python/chigger/tests/new_files/old_files.py
6
1873
#!/usr/bin/env python #pylint: disable=missing-docstring ################################################################# # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simulation Environment # # #...
lgpl-2.1
8,773,080,220,732,298,000
37.22449
81
0.493326
false
Nowheresly/odoo
addons/auth_signup/controllers/main.py
26
6356
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
2,591,975,420,994,428,000
47.519084
126
0.617369
false
jarn0ld/gnuradio
gr-uhd/examples/python/freq_hopping.py
36
9337
#!/usr/bin/env python # # Copyright 2014 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 option) # ...
gpl-3.0
6,040,754,754,792,152,000
41.440909
137
0.581236
false
gannetson/sportschooldeopenlucht
env/lib/python2.7/site-packages/django/core/files/images.py
178
1982
""" Utility functions for handling images. Requires PIL, as you might imagine. """ from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ def _get_width(self): ret...
bsd-3-clause
935,335,028,692,892,900
28.58209
79
0.593845
false
bdauvergne/python-oath
oath/_ocra.py
1
14944
import hmac import hashlib import re import random import string from . import _hotp as hotp, _utils ''' Implementation of OCRA See also http://tools.ietf.org/html/draft-mraihi-mutual-oath-hotp-variants-14 ''' __all__ = ( 'str2ocrasuite', 'StateException', 'OCRAChallengeResponseServer', 'OC...
bsd-3-clause
5,992,141,003,724,347,000
34.580952
108
0.5894
false
Denisolt/Tensorflow_Chat_Bot
local/lib/python2.7/site-packages/numpy/f2py/auxfuncs.py
85
21818
#!/usr/bin/env python """ Auxiliary functions for f2py2e. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy (BSD style) LICENSE. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS...
gpl-3.0
-4,103,923,314,297,735,700
24.548009
78
0.550234
false
ydm/eecont
eecont/tests.py
1
24177
#-*- coding: utf-8 -*- # TODO: use fixtures instead of hard coded dictionaries from __future__ import unicode_literals import copy import datetime from django.test import TestCase from django.conf import settings from django.utils import six from django.utils import timezone import pytz from eecont import inserte...
lgpl-3.0
4,706,486,213,888,700,000
34.283784
80
0.460871
false
bjolivot/ansible
lib/ansible/modules/cloud/openstack/os_user.py
26
9043
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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...
gpl-3.0
-2,828,175,989,644,073,000
30.841549
84
0.59195
false
rtucker/sycamore
Sycamore/support/pytz/zoneinfo/Australia/Melbourne.py
9
6234
'''tzinfo timezone information for Australia/Melbourne.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Melbourne(DstTzInfo): '''Australia/Melbourne timezone definition. See datetime.tzinfo for details''' zone = 'Australi...
gpl-2.0
9,032,211,766,788,773,000
19.642384
82
0.592717
false
taoyunxing/trafficserver
tests/gold_tests/logging/ccid_ctid_observer.py
8
1528
''' Examines log generated by ccid_ctid.test.py, returns 0 if valid, 1 if not. ''' # 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 th...
apache-2.0
233,948,907,946,671,680
27.830189
75
0.666885
false
bregman-arie/ansible
lib/ansible/modules/network/vyos/vyos_system.py
68
6307
#!/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
7,821,955,755,139,284,000
28.890995
89
0.633106
false
awni/tensorflow
tensorflow/python/ops/tensor_array_ops.py
4
9808
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-7,584,889,592,228,610,000
34.280576
80
0.682198
false
dynaryu/inasafe
safe/utilities/analysis_handler.py
1
26118
# coding=utf-8 """ InaSAFE Disaster risk assessment tool by AusAid **GUI InaSAFE Wizard Dialog.** Contact : ole.moller.nielsen@gmail.com .. 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 Found...
gpl-3.0
6,048,214,163,546,197,000
36.258203
79
0.619075
false
vwvww/servo
tests/wpt/web-platform-tests/webdriver/tests/sessions/new_session/invalid_capabilities.py
12
4145
#META: timeout=long import pytest from webdriver import error from conftest import product, flatten @pytest.mark.parametrize("value", [None, 1, "{}", []]) def test_invalid_capabilites(new_session, value): with pytest.raises(error.InvalidArgumentException): new_session({"capabilities": value}) @pytest....
mpl-2.0
260,496,830,419,561,900
41.295918
106
0.602171
false
vishalbedi/CollegeScorecard
backend/flask_app/models.py
1
7158
"""All the database related entities are in this module.""" from flask_sqlalchemy import SQLAlchemy from sqlalchemy import text import numpy as np import math from scipy.stats import lognorm from sqlalchemy.ext.hybrid import hybrid_property db = SQLAlchemy() class Ethnicity(db.Model): """Ethnicity Model. We wil...
mit
2,137,919,662,898,776,800
29.202532
136
0.642218
false
av8ramit/tensorflow
tensorflow/python/saved_model/saved_model_test.py
4
44336
# 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
-826,585,268,808,674,700
42.984127
80
0.657524
false
mtnbikenc/ansible-modules-extras
cloud/vmware/vca_vapp.py
72
8888
#!/usr/bin/python # Copyright (c) 2015 Ansible, 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 # (at your option) any lat...
gpl-3.0
2,362,852,585,613,145,600
30.51773
102
0.638389
false
arhik/nupic
examples/opf/clients/hotgym/anomaly/one_gym/remove_tuesdays.py
15
1039
import csv import shutil import datetime ORIGINAL = "rec-center-hourly.csv" BACKUP = "rec-center-hourly-backup.csv" DATE_FORMAT = "%m/%d/%y %H:%M" def isTuesday(date): return date.weekday() is 1 def withinOctober(date): return datetime.datetime(2010, 10, 1) <= date < datetime.datetime(2010, 11, 1) def run(...
agpl-3.0
8,350,437,931,098,279,000
21.586957
80
0.643888
false
abs0/tapiriik
tapiriik/services/Pulsstory/pulsstory.py
3
18516
from tapiriik.settings import PULSSTORY_CLIENT_ID, PULSSTORY_CLIENT_SECRET from tapiriik.services.service_base import ServiceAuthenticationType, ServiceBase from tapiriik.services.service_record import ServiceRecord from tapiriik.services.stream_sampling import StreamSampler from tapiriik.services.auto_pause import Aut...
apache-2.0
3,025,150,104,280,812,500
48.376
240
0.633452
false
kaiyuanheshang/zulip
zerver/management/commands/query_ldap.py
113
1068
from __future__ import absolute_import import sys from django.contrib.auth import authenticate, login, get_backends from django.core.management.base import BaseCommand from django.conf import settings from django_auth_ldap.backend import LDAPBackend, _LDAPUser # Run this on a cronjob to pick up on name changes. de...
apache-2.0
-7,566,586,498,629,721,000
34.6
89
0.646067
false
mapennell/ansible
v1/ansible/runner/lookup_plugins/together.py
174
2135
# (c) 2013, Bradley Young <young.bradley@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 later...
gpl-3.0
3,239,976,267,664,955,000
32.359375
97
0.653864
false
molotof/infernal-twin
build/reportlab/build/lib.linux-i686-2.7/reportlab/platypus/figures.py
29
18747
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/figures.py """This includes some demos of platypus for use in the API proposal""" __version__=''' $Id$ ''' import os from reportlab.lib impo...
gpl-3.0
8,628,322,576,857,284,000
42.295612
131
0.595242
false
jankeromnes/depot_tools
third_party/boto/manage/propget.py
115
2498
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
bsd-3-clause
7,825,586,165,275,569,000
38.03125
74
0.58727
false
egeor/libxsmm
samples/transpose/transpose_opentuner.py
1
6321
#!/usr/bin/env python ############################################################################### # Copyright (c) 2017-2018, Intel Corporation # # All rights reserved. # # ...
bsd-3-clause
8,287,400,994,637,817,000
44.804348
79
0.552919
false
StefanRijnhart/odoo
addons/website_forum/models/forum.py
1
37021
# -*- coding: utf-8 -*- from datetime import datetime import uuid from werkzeug.exceptions import Forbidden import openerp from openerp import api, tools from openerp import SUPERUSER_ID from openerp.addons.website.models.website import slug from openerp.exceptions import Warning from openerp.osv import osv, fields f...
agpl-3.0
-2,341,949,585,749,052,400
53.9273
178
0.604279
false
PluginCafe/cinema4d_py_sdk
scripts/takesystem/takesystem_OverrideGroupMaterials.py
1
1057
import c4d from c4d import gui #Author: s_bach #TakeSystem Example def main(): takeData = doc.GetTakeData() if takeData is None: return # This code creates a take with an override group for each selected material and adds the object "object" to the newly created group. obj = doc.G...
apache-2.0
-3,004,131,683,940,234,000
22.511111
137
0.552507
false
dotcool/zulip
api/integrations/svn/zulip_svn_config.py
124
2363
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, Inc. # # 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 #...
apache-2.0
-1,227,115,365,584,026,600
40.438596
81
0.73624
false
sharhar/USB-Thing
UpdaterFiles/Lib/python-3.5.1.amd64/Lib/site-packages/pip/_vendor/distlib/util.py
224
51518
# # Copyright (C) 2012-2014 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # import codecs from collections import deque import contextlib import csv from glob import iglob as std_iglob import io import json import logging import os import py_compile import re import shutil import socket import...
apache-2.0
8,671,234,135,334,314,000
31.626979
88
0.538336
false
agoose77/hivesystem
hiveguilib/HQt/widgets/connectionHook.py
1
16335
# <license> # Copyright (C) 2011 Andrea Interguglielmi, All rights reserved. # This file is part of the coral repository downloaded from http://code.google.com/p/coral-repo. # # Modified for the Hive system by Sjoerd de Vries # All modifications copyright (C) 2012 Sjoerd de Vries, All rights reserved # # Redistributio...
bsd-2-clause
-93,853,539,413,391,620
34.901099
103
0.607163
false
parag2489/Image-Quality
train_imageQuality_Estmn_multiPatchSmallNetwork.py
1
19578
import numpy as np import pdb import sys from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation, Flatten, Reshape from keras.layers.convolutional import Convolution1D, Convolution2D, MaxPooling2D from keras.layers.convolutional import Convolution3D, MaxPooling3D # from keras.layers...
mit
-8,616,509,354,031,920,000
59.425926
247
0.592706
false
Intel-Corporation/tensorflow
tensorflow/python/keras/layers/dense_attention.py
1
12205
# 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
-6,269,973,700,967,273,000
38.626623
80
0.665219
false
transtone/transconfig
bin/classifier.py
1
2805
#!/usr/bin/env python import os import sys import argparse #list of known formats here can be added """ All format lists were taken from wikipedia, not all of them were added due to extensions not being exclusive to one format such as webm, or raw Audio - https://en.wikipedia.org/wiki/Audio_file_format ...
mit
8,413,820,628,754,477,000
31.392857
120
0.626381
false
davidyezsetz/kuma
vendor/packages/ipython/IPython/external/mglob.py
7
7672
#!/usr/bin/env python r""" mglob - enhanced file list expansion module Use as stand-alone utility (for xargs, `backticks` etc.), or a globbing library for own python programs. Globbing the sys.argv is something that almost every Windows script has to perform manually, and this module is here to help with that task....
mpl-2.0
1,396,778,335,324,722,200
32.502183
87
0.524896
false
erickt/hue
desktop/core/ext-py/python-openid-2.2.5/openid/yadis/xrires.py
157
4268
# -*- test-case-name: openid.test.test_xrires -*- """XRI resolution. """ from urllib import urlencode from openid import fetchers from openid.yadis import etxrd from openid.yadis.xri import toURINormal from openid.yadis.services import iterServices DEFAULT_PROXY = 'http://proxy.xri.net/' class ProxyResolver(object):...
apache-2.0
-8,763,827,657,494,115,000
33.699187
77
0.608247
false
glennq/scikit-learn
sklearn/datasets/__init__.py
72
3807
""" The :mod:`sklearn.datasets` module includes utilities to load datasets, including methods to load and fetch popular reference datasets. It also features some artificial data generators. """ from .base import load_diabetes from .base import load_digits from .base import load_files from .base import load_iris from ....
bsd-3-clause
-5,751,285,373,832,839,000
35.257143
71
0.684003
false
JonathanSeguin/Mariana
Mariana/tests/decorators_tests.py
1
1417
import unittest import Mariana.layers as ML import Mariana.initializations as MI import Mariana.decorators as MD import Mariana.costs as MC import Mariana.regularizations as MR import Mariana.scenari as MS import Mariana.activations as MA import theano.tensor as tt import numpy class DecoratorTests(unittest.TestCase...
apache-2.0
-4,468,858,323,874,257,400
24.763636
108
0.698659
false
cznweb/arkos
arkos/signals.py
2
2713
""" Classes and functions to manage internal signal hooks and listeners. arkOS Core (c) 2016 CitizenWeb Written by Jacob Cook Licensed under GPLv3, see LICENSE.md """ from arkos import storage, logger class Listener: """ Class representing a signal listener. A signal listener is set up to track the emi...
gpl-3.0
-8,944,382,012,017,828,000
26.683673
75
0.618504
false
tm-kn/django-pdf-model
django_pdf/tests/demosite/models.py
1
1859
from django.conf import settings from django.db import models from django.shortcuts import reverse from django_pdf.models import PDFModelMixin from django_pdf import pdf_fields class Report(PDFModelMixin, models.Model): title = models.CharField(max_length=255) introduction = models.CharField(max_length=255) ...
bsd-2-clause
5,501,567,910,132,601,000
35.45098
78
0.662722
false
namjae/AutobahnTestSuite
autobahntestsuite/autobahntestsuite/case/case5_11.py
14
1495
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ## ## ht...
apache-2.0
5,465,726,415,299,835,000
44.71875
157
0.618729
false
SaschaMester/delicium
tools/perf/page_sets/gmail_compose_discard.py
1
2495
# Copyright 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. import re from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story def _CreateXpathFunction...
bsd-3-clause
-925,712,608,211,710,800
34.140845
80
0.67014
false
1ukash/horizon
horizon/api/base.py
4
3984
# 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
6,317,522,755,660,809,000
32.762712
78
0.615713
false
gmatteo/pymatgen
pymatgen/cli/pmg_config.py
3
6633
#!/usr/bin/env python # coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Implementation for `pmg config` CLI. """ import glob import os import shutil import subprocess import sys from urllib.request import urlretrieve from monty.serialization import dump...
mit
-1,190,657,365,089,021,000
29.708333
101
0.553596
false
ApisSys/linux-analogdevicesinc-ap6
Documentation/sphinx/rstFlatTable.py
64
13304
#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- # pylint: disable=C0330, R0903, R0912 u""" flat-table ~~~~~~~~~~ Implementation of the ``flat-table`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1991 see linux/COPYING for details. ...
gpl-2.0
-1,445,332,005,674,547,200
34.859838
80
0.497294
false
tsnoam/Flexget
flexget/plugins/modify/torrent_scrub.py
13
3968
""" Torrent Scrubber Plugin. """ from __future__ import unicode_literals, division, absolute_import import logging from flexget import plugin, validator from flexget.event import event from flexget.plugins.modify.torrent import TorrentFilename from flexget.utils import bittorrent log = logging.getLogger('torrent_scru...
mit
-6,958,163,845,093,072,000
35.40367
108
0.500756
false
IllusionRom-deprecated/android_platform_external_chromium_org_tools_grit
grit/tool/xmb.py
34
9656
#!/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. """The 'grit xmb' tool. """ import getopt import os from xml.sax import saxutils from grit import grd_reader from grit import la...
bsd-2-clause
4,231,268,740,721,393,700
32.182131
80
0.651719
false
maxalbert/ansible
v1/ansible/inventory/script.py
109
5971
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-8,388,021,944,317,173,000
37.772727
110
0.574611
false
dnjohnstone/hyperspy
hyperspy/defaults_parser.py
1
10780
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
970,297,004,833,191,000
34.695364
119
0.60269
false
mozilla/olympia
src/olympia/api/tests/test_pagination.py
4
4205
from unittest import mock from rest_framework import generics, serializers, status from rest_framework.test import APIRequestFactory from olympia.amo.tests import TestCase from olympia.api.pagination import ( CustomPageNumberPagination, ESPageNumberPagination, OneOrZeroPageNumberPagination, ) class Pass...
bsd-3-clause
1,099,250,146,242,258,600
32.110236
71
0.568133
false
alexteodor/odoo
addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py
301
14179
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c): # # 2005 pyopenoffice.py Martin Simon (http://www.bezirksreiter.de) # 2005 Fabien Pinckaers, TINY SPRL. (http://tiny.be) # # This program is free software: you can redistribute it and/or ...
agpl-3.0
7,812,086,782,999,173,000
38.168508
111
0.592214
false
jwren/intellij-community
python/helpers/typeshed/tests/check_consistent.py
5
8367
#!/usr/bin/env python3 # For security (and simplicity) reasons, only a limited kind of files can be # present in /stdlib and /stubs directories, see README for detail. Here we # verify these constraints. # In addition, for various reasons we need the contents of certain files to be # duplicated in two places, for exa...
apache-2.0
9,080,772,275,890,292,000
42.806283
116
0.59149
false
ChanderG/scipy
scipy/signal/tests/test_filter_design.py
63
96267
from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import (TestCase, assert_array_almost_equal, assert_array_equal, assert_array_less, assert_raises, assert_equal, assert_, ...
bsd-3-clause
-1,198,390,249,198,038,300
43.963568
254
0.553263
false
jvrsantacruz/XlsxWriter
xlsxwriter/test/utility/test_xl_rowcol_to_cell.py
8
2341
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...utility import xl_rowcol_to_cell from ...utility import xl_rowcol_to_cell_fast class TestUtility(unittest.TestCase): ...
bsd-2-clause
4,191,723,855,536,026,600
25.908046
79
0.390859
false
wikimedia/operations-debs-kubernetes
cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/common.py
365
1084
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
apache-2.0
-7,586,027,488,062,642,000
29.971429
74
0.696494
false
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201302/contact_service/create_contacts.py
3
2467
#!/usr/bin/python # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-732,395,823,801,803,000
32.794521
80
0.691934
false
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201208/create_video_line_item.py
4
4536
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
7,726,471,534,837,588,000
31.633094
80
0.604718
false
wuxue/altanalyze
SQLInterace.py
2
3693
### SQL Interface import string import time import random import math import sys, os import sqlite3 import export def cleanUpLine(line): line = string.replace(line,'\n','') line = string.replace(line,'\c','') data = string.replace(line,'\r','') data = string.replace(data,'"','') return data def f...
apache-2.0
-4,841,521,511,560,543,000
34.519231
127
0.634714
false
themrmax/scikit-learn
doc/conf.py
10
9807
# -*- coding: utf-8 -*- # # scikit-learn documentation build configuration file, created by # sphinx-quickstart on Fri Jan 8 09:13:42 2010. # # 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. ...
bsd-3-clause
1,465,950,786,126,322,400
32.817241
79
0.694708
false
drglove/SickRage
lib/github/StatsParticipation.py
74
2654
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
gpl-3.0
-8,614,644,706,558,558,000
46.392857
200
0.483044
false
orgito/ansible
lib/ansible/modules/system/seboolean.py
2
10133
#!/usr/bin/python # Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com> # 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
-2,616,935,161,402,536,400
30.76489
96
0.657949
false
Evervolv/android_external_chromium_org
ppapi/native_client/tools/browser_tester/browsertester/rpclistener.py
170
2297
#!/usr/bin/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. import sys import time class RPCListener(object): def __init__(self, shutdown_callback): self.shutdown_callback = shutdown_ca...
bsd-3-clause
-3,758,650,856,508,881,400
33.283582
80
0.679147
false
altsen/diandiyun-platform
common/test/acceptance/fixtures/discussion.py
8
2178
""" Tools for creating discussion content fixture data. """ from datetime import datetime import json import factory import requests from . import COMMENTS_STUB_URL class ContentFactory(factory.Factory): FACTORY_FOR = dict id = None user_id = "dummy-user-id" username = "dummy-username" course_i...
agpl-3.0
3,907,473,268,828,180,500
23.47191
72
0.580808
false
Novasoft-India/OperERP-AM-Motors
openerp/addons/point_of_sale/wizard/pos_box.py
49
2231
from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.addons.account.wizard.pos_box import CashBox class PosBox(CashBox): _register = False def run(self, cr, uid, ids, context=None): if not context: context = dict() active_model = context.get('ac...
agpl-3.0
-9,051,173,938,505,479,000
34.983871
113
0.61273
false
knowsis/django
django/utils/timezone.py
90
9180
""" Timezone-related classes and functions. This module uses pytz when it's available and fallbacks when it isn't. """ from datetime import datetime, timedelta, tzinfo from threading import local import sys import time as _time try: import pytz except ImportError: pytz = None from django.conf import setting...
bsd-3-clause
-2,760,937,381,903,464,000
27.958991
81
0.644444
false
Mzero2010/MaxZone
plugin.video.Mzero/servers/vodbeast.py
4
1968
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vodbeast # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import logger from core import scraper...
gpl-3.0
-2,940,485,705,847,594,500
34.142857
117
0.604982
false
krisht/Krishna-Thesis
Research/src/BrainNet.py
1
43359
from __future__ import print_function import datetime import itertools import matplotlib import os import re os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="0,1" matplotlib.use('Agg') import matplotlib.pyplot as plt plt.rcParams["font.family"] = "FreeSerif" import numpy as np impor...
mit
1,663,453,912,170,723,800
48.271591
261
0.679213
false
yfried/ansible
test/units/modules/network/f5/test_bigip_tunnel.py
4
3345
# -*- 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 sys from nose.plugins.skip import SkipTest...
gpl-3.0
-3,492,228,527,394,680,000
27.836207
91
0.657399
false
Communities-Communications/cc-odoo
addons/report_webkit/wizard/__init__.py
431
1482
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Vincent Renaville # # WARNING: This program as such is intended to be used by professional # programmers who take the...
agpl-3.0
5,709,347,961,021,471,000
42.588235
80
0.688934
false
dataxu/ansible
lib/ansible/modules/cloud/cloudstack/cs_portforward.py
73
12316
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # 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
7,950,389,593,827,382,000
31.405263
116
0.622787
false
fajoy/nova
nova/tests/api/openstack/compute/contrib/test_flavor_swap.py
11
3113
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-8,186,836,478,348,250,000
28.932692
78
0.623193
false
rutum/gensim
gensim/test/test_sharded_corpus.py
54
9571
""" Testing the test sharded corpus. """ import os # For backwards compatibility with setUpClass and tearDownClass: # import sys # if sys.version_info[0] == 2 and sys.version_info[1] <= 6: # import unittest2 as unittest # else: # import unittest import unittest import random import numpy import shutil from s...
lgpl-3.0
210,231,085,868,763,840
34.1875
86
0.566921
false
shepdelacreme/ansible
lib/ansible/modules/network/cloudengine/ce_bfd_session.py
43
20235
#!/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 distribut...
gpl-3.0
7,095,073,087,834,819,000
32.336079
117
0.570151
false
kjs73/pele
pele/transition_states/_find_lowest_eig.py
5
16110
"""tools for finding the smallest eigenvalue and associated eigenvector using Rayleigh-Ritz minimization """ import numpy as np import logging from pele.transition_states import orthogopt from pele.potentials.potential import BasePotential from pele.optimize import MYLBFGS import pele.utils.rotations as rotations __...
gpl-3.0
3,501,370,971,670,316,000
35.447964
110
0.608318
false
rajeev/lifeflow
context.py
1
2195
from lifeflow.models import Entry, Flow, RecommendedSite, Author, Flow, Language from django.contrib.sites.models import Site from django.conf import settings def blog(request): def make_slug(str): return str.lower().replace(" ","-") recent = Entry.current.all()[:3] random = Entry.current.all().or...
mit
5,266,724,992,144,146,000
42.9
102
0.661048
false
goodwinnk/intellij-community
python/lib/Lib/site-packages/django/contrib/sessions/backends/base.py
245
10286
import base64 import os import random import sys import time from datetime import datetime, timedelta try: import cPickle as pickle except ImportError: import pickle from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.utils.hashcompat import md5_constructor from ...
apache-2.0
5,821,446,577,912,585,000
32.180645
96
0.600817
false
dankcoin/dankcoin
qa/rpc-tests/p2p-acceptblock.py
1
12416
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import DankcoinTestFramework fro...
mit
-3,006,688,517,600,953,300
41.666667
107
0.633376
false
DrMeers/django
django/contrib/gis/geos/prototypes/__init__.py
237
1328
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, # NOQA cs_clone, cs_getordinate, cs_setordi...
bsd-3-clause
7,318,084,197,860,958,000
43.266667
91
0.748494
false
SerCeMan/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/jp/jp_prefectures.py
543
2089
from django.utils.translation import ugettext_lazy JP_PREFECTURES = ( ('hokkaido', ugettext_lazy('Hokkaido'),), ('aomori', ugettext_lazy('Aomori'),), ('iwate', ugettext_lazy('Iwate'),), ('miyagi', ugettext_lazy('Miyagi'),), ('akita', ugettext_lazy('Akita'),), ('yamagata', ugettext_lazy('Yamagat...
apache-2.0
-8,543,138,072,100,857,000
39.960784
50
0.587362
false
bfagundez/super_powered_recycle_bin
sprb/views.py
2
1123
from flask import render_template, request from sprb import sprb from classes.signed_request import SignedRequest import json #import ipdb import os from sforce_custom.partner import SforcePartnerClient # load WSDL declaration file sf = SforcePartnerClient('sprb/partner.wsdl') @sprb.route('/canvas', methods=['POST'...
mit
-4,926,342,930,680,539,000
28.552632
96
0.762244
false
himanshu-setia/keystone
keystone/common/validation/__init__.py
3
3875
# 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 # distributed under the Li...
apache-2.0
-6,199,102,591,953,033,000
39.364583
78
0.627355
false
DepthDeluxe/ansible
lib/ansible/modules/cloud/ovirt/ovirt_snapshots_facts.py
45
4381
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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,627,575,015,916,854,800
30.746377
143
0.632276
false
eptmp3/Sick-Beard
lib/jsonrpclib/config.py
188
1418
import sys class LocalClasses(dict): def add(self, cls): self[cls.__name__] = cls class Config(object): """ This is pretty much used exclusively for the 'jsonclass' functionality... set use_jsonclass to False to turn it off. You can change serialize_method and ignore_attribute, or use ...
gpl-3.0
-5,690,501,795,396,540,000
36.315789
70
0.665726
false
Muuo/PanyaFace
server/panya.py
1
1043
import panya import time import serial directions = {'forward': 'w', 'reverse': 's', 'left': 'a', 'right': 'd'} ser = None def init(): global ser try: ser = serial.Serial('/dev/ttyUSB0', 9600) return True except: return False def endit(): global ser ser.close() ser = N...
apache-2.0
-167,172,501,443,500,700
16.677966
72
0.5465
false
popazerty/test-gui
lib/python/Screens/SleepTimerEdit.py
13
5611
from Screens.InfoBar import InfoBar from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.config imp...
gpl-2.0
8,577,878,278,725,793,000
39.956204
185
0.722688
false
amchoukir/YouCompleteMe
third_party/pythonfutures/crawl.py
85
2422
"""Compare the speed of downloading URLs sequentially vs. using futures.""" import functools import time import timeit import sys try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen from concurrent.futures import (as_completed, ThreadPoolExecutor, ...
gpl-3.0
5,000,627,577,588,875,000
31.72973
75
0.523534
false
DazWorrall/ansible-modules-extras
notification/twilio.py
76
5667
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Makai <matthew.makai@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 ...
gpl-3.0
-5,211,286,880,144,343,000
31.757225
77
0.669666
false
GeoscienceAustralia/PyRate
tests/test_prepifg.py
1
37631
# This Python module is part of the PyRate software package. # # Copyright 2020 Geoscience Australia # # 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/...
apache-2.0
6,541,102,380,234,258,000
39.638229
116
0.594164
false
mrb/letsencrypt
letsencrypt-compatibility-test/letsencrypt_compatibility_test/interfaces.py
39
1576
"""Let's Encrypt compatibility test interfaces""" import zope.interface import letsencrypt.interfaces # pylint: disable=no-self-argument,no-method-argument class IPluginProxy(zope.interface.Interface): """Wraps a Let's Encrypt plugin""" http_port = zope.interface.Attribute( "The port to connect to o...
apache-2.0
-4,506,267,429,939,422,000
29.307692
79
0.694162
false
laurent-george/weboob
modules/freegeoip/module.py
5
1892
# -*- coding: utf-8 -*- # Copyright(C) 2015 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
-998,483,509,167,036,500
32.192982
93
0.664376
false
Intel-Corporation/tensorflow
tensorflow/contrib/nn/python/ops/scaled_softplus.py
42
4568
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
5,750,405,843,728,938,000
39.424779
80
0.637259
false
marktwtn/gdb
gdb/python/lib/gdb/function/strfns.py
137
2684
# Useful gdb string convenience functions. # Copyright (C) 2012-2013 Free Software Foundation, Inc. # 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 you...
gpl-2.0
5,264,399,324,693,415,000
23.851852
71
0.668778
false
himanshu-dixit/oppia
extensions/interactions/CodeRepl/CodeRepl.py
3
2687
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-4,907,028,315,920,577,000
30.611765
74
0.56792
false
apigee/edx-platform
lms/djangoapps/analytics/tests/test_csvs.py
44
4688
""" Tests for analytics.csvs """ from django.test import TestCase from nose.tools import raises from analytics.csvs import create_csv_response, format_dictlist, format_instances class TestAnalyticsCSVS(TestCase): """ Test analytics rendering of csv files.""" def test_create_csv_response_nodata(self): ...
agpl-3.0
4,572,470,815,452,910,000
36.806452
140
0.585538
false
homeslike/OpticalTweezer
scripts/p0.1_at0.05/vCOMhistogram.py
28
2448
import math import sys import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab from subprocess import call from scipy.stats import norm # proc = call("ls *.dat",shell=True) # datetime = "170123_2033_" datetime = sys.argv[1]+"_" gasTempDataIn = np.genfromtxt(datetime+"gasTempData.dat",usecols...
mit
2,256,478,968,587,393,500
35.537313
106
0.694036
false
axbaretto/beam
sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/reporters/ureports/text_writer.py
2
3047
# Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Text formatting drivers for ureports""" from __future__ import print_function from pylint.reporters.ur...
apache-2.0
4,403,339,279,815,643,000
34.022989
81
0.581227
false
afk11/bitcoin
test/functional/p2p_sendheaders.py
11
26649
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of headers messages to announce blocks. Setup: - Two nodes: - node0 is the node-und...
mit
-4,169,939,146,830,188,000
42.975248
154
0.613644
false
LaoZhongGu/kbengine
kbe/src/lib/python/Lib/test/test_codecencodings_cn.py
55
3144
#!/usr/bin/env python3 # # test_codecencodings_cn.py # Codec encoding tests for PRC encodings. # from test import support from test import test_multibytecodec_support import unittest class Test_GB2312(test_multibytecodec_support.TestBase, unittest.TestCase): encoding = 'gb2312' tstring = test_multibytecodec...
lgpl-3.0
-8,117,540,221,149,054,000
35.55814
76
0.578244
false
VanirAOSP/external_chromium_org
chrome/test/chromedriver/embed_version_in_cpp.py
69
1114
#!/usr/bin/env python # Copyright 2013 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. """Embeds Chrome user data files in C++ code.""" import optparse import os import sys import chrome_paths import cpp_source sys.path...
bsd-3-clause
795,167,065,373,550,200
25.52381
72
0.658887
false
sametmax/Django--an-app-at-a-time
ignore_this_directory/django/core/management/commands/sendtestemail.py
75
1456
import socket from django.core.mail import mail_admins, mail_managers, send_mail from django.core.management.base import BaseCommand from django.utils import timezone class Command(BaseCommand): help = "Sends a test email to the email addresses specified as arguments." missing_args_message = "You must specif...
mit
5,228,417,177,465,364,000
35.4
111
0.616758
false
fentas/phantomjs
src/breakpad/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-all.py
399
1269
#!/usr/bin/env python # Copyright (c) 2009 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 building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
bsd-3-clause
5,716,958,328,170,417,000
34.25
73
0.668243
false