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
zangree/ryu
ryu/services/protocols/bgp/rtconf/base.py
4
25357
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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
-8,062,770,780,220,454,000
34.120499
79
0.606736
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/asyncio/base_events.py
1
72001
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
apache-2.0
-3,916,017,537,165,643,000
37.52381
83
0.554909
false
kave/collab
core/search_indexes.py
4
1208
import datetime from haystack import indexes from core.models import Person class PersonIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.EdgeNgramField(document=True, use_template=True) user = indexes.CharField(model_attr='user') org_group = indexes.CharField(model_attr='org_group', null=True...
cc0-1.0
5,563,580,700,484,831,000
32.555556
68
0.699503
false
special/telepathy-qt-upstream
tools/glib-ginterface-gen.py
12
30017
#!/usr/bin/python # glib-ginterface-gen.py: service-side interface generator # # Generate dbus-glib 0.x service GInterfaces from the Telepathy specification. # The master copy of this program is in the telepathy-glib repository - # please make any changes there. # # Copyright (C) 2006, 2007 Collabora Limited # # This ...
lgpl-2.1
4,937,660,815,411,856,000
36.427681
83
0.513909
false
AlpacaDB/chainer
tests/chainer_tests/function_hooks_tests/test_timer.py
10
2986
import unittest import numpy import chainer from chainer import cuda from chainer import function_hooks from chainer import functions from chainer.functions.connection import linear from chainer import links from chainer import testing from chainer.testing import attr def check_history(self, t, function_type, retur...
mit
2,024,507,142,029,024,000
28.27451
79
0.625251
false
mikeboers/PyAV
tests/test_doctests.py
1
1491
from unittest import TestCase import doctest import pkgutil import re import av def fix_doctests(suite): for case in suite._tests: # Add some more flags. case._dt_optionflags = ( (case._dt_optionflags or 0) | doctest.IGNORE_EXCEPTION_DETAIL | doctest.ELLIPSIS...
bsd-3-clause
3,947,449,277,095,484,000
23.442623
114
0.570758
false
mozilla/treeherder
treeherder/etl/artifact.py
2
3467
import logging import simplejson as json from django.db import transaction from django.db.utils import IntegrityError from treeherder.model import error_summary from treeherder.etl.perf import store_performance_artifact from treeherder.etl.text import astral_filter from treeherder.model.models import Job, TextLogErro...
mpl-2.0
-7,114,368,446,797,099,000
33.67
95
0.56908
false
baylee-d/osf.io
osf/migrations/0163_populate_conference_submissions.py
10
1608
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-06-08 15:12 from __future__ import unicode_literals import logging from django.db import migrations logger = logging.getLogger(__file__) def forward(state, *args, **kwargs): """ For every conference, fetches all AbstractNodes with a case-insensitiv...
apache-2.0
5,176,610,038,532,886,000
36.395349
110
0.692786
false
elin-moco/ffclub
ffclub/person/migrations/0004_copied_email_data.py
1
4736
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for profile in orm.Person.objects.all(): if not profile.email: profile.email = profile.user....
bsd-3-clause
8,386,407,393,023,537,000
64.777778
182
0.551731
false
hkariti/ansible
lib/ansible/modules/cloud/openstack/os_flavor_facts.py
5
7061
#!/usr/bin/python # Copyright (c) 2015 IBM # 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
2,900,197,149,758,664,700
28.919492
125
0.618184
false
bowang/tensorflow
tensorflow/contrib/slim/python/slim/data/dataset_data_provider.py
47
4039
# 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
3,926,764,833,057,020,400
36.747664
80
0.672939
false
legumeinfo/lis_context_viewer
search/microservices/chromosome_region/chromosomeregion_pb2.py
2
5741
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: chromosomeregion.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as ...
gpl-3.0
-110,379,991,950,546,560
35.335443
525
0.732973
false
CyberReboot/vent
vent/menus/help.py
2
7957
import npyscreen class HelpForm(npyscreen.ActionFormWithMenus): """ Help form for the Vent CLI """ @staticmethod def switch(page): def popup(page): info_str = '' if page == 'Menu': info_str = """ Menu interactions are simple! Here is a quick...
apache-2.0
4,892,065,726,473,548,000
51.006536
79
0.588538
false
tmn505/source
scripts/dl_github_archive.py
15
14565
#!/usr/bin/env python # # Copyright (c) 2018 Yousong Zhou <yszhou4tech@gmail.com> # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. import argparse import calendar import datetime import errno import fcntl import hashlib import json import os import os.pa...
gpl-2.0
660,150,907,824,915,300
33.11007
127
0.549125
false
ctalbert/mozharness
mozharness/base/vcs/vcsbase.py
1
3096
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** """Generic VCS support. """ from...
mpl-2.0
-1,395,021,398,997,968,600
30.917526
82
0.585271
false
x2nie/odoo
addons/gamification/models/challenge.py
13
42861
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-7,284,109,915,812,551,000
47.650397
187
0.569072
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py
1
24972
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-4,941,298,559,367,331,000
51.133612
153
0.799215
false
jules185/IoT_Hackathon
.homeassistant/deps/aiohttp_cors/resource_options.py
3
5931
# Copyright 2015 Vladimir Rutsky <vladimir@rutsky.org> # # 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...
mit
6,539,294,440,362,301,000
37.764706
79
0.59619
false
wolverineav/horizon
openstack_dashboard/test/integration_tests/tests/test_projects.py
8
3093
# 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 # d...
apache-2.0
1,711,310,178,869,288,000
40.797297
78
0.690915
false
sharad/calibre
src/calibre/ebooks/pdf/render/graphics.py
1
14463
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
7,913,336,814,895,095,000
29.006224
86
0.508539
false
eayunstack/fuel-web
nailgun/nailgun/extensions/cluster_upgrade/tests/test_objects.py
3
2007
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, 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 requi...
apache-2.0
-2,190,093,603,358,828,000
40.8125
78
0.714499
false
yokose-ks/edx-platform
lms/djangoapps/pgreport/tests/test_views.py
1
30880
from django.test import TestCase from mock import MagicMock, patch, ANY from contextlib import nested from pgreport.views import ( ProgressReport, UserDoesNotExists, InvalidCommand, get_pgreport_csv, create_pgreport_csv, delete_pgreport_csv, get_pgreport_table, update_pgreport_table ) from pgreport.models i...
agpl-3.0
3,124,031,571,454,364,000
38.539052
131
0.579275
false
paulbellamy/docker-py
tests/test.py
1
95769
# Copyright 2013 dotCloud 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 w...
apache-2.0
-3,702,290,130,594,926,600
35.400228
79
0.519364
false
tquilian/exelearningTest
twisted/scripts/tkmktap.py
16
17390
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """Implementation module for the graphical version of the `mktap` command. """ # System imports import Tkinter, tkMessageBox, tkFileDialog, StringIO, os import traceback # Twisted imports from twisted.application import service fro...
gpl-2.0
2,626,503,716,499,862,500
30.164875
94
0.555492
false
jroltgen/aqua-gesture-framework
samples/SampleGesture/scons-local-1.3.0/SCons/Variables/BoolVariable.py
5
3082
"""engine.SCons.Variables.BoolVariable This file defines the option type for SCons implementing true/false values. Usage example: opts = Variables() opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) ... if env['embedded'] == 1: ... """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, ...
gpl-3.0
-2,273,738,489,320,727,300
32.868132
95
0.693381
false
LukeC92/iris
lib/iris/tests/unit/analysis/test_WPERCENTILE.py
7
9671
# (C) British Crown Copyright 2015 - 2016, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
lgpl-3.0
-8,163,767,714,099,672,000
40.506438
76
0.612553
false
prasadtalasila/INET-Vagrant-Demos
Nonce_Demo/impacket-0.9.12/impacket/crypto.py
3
18139
# Copyright (c) 2003-2012 CORE Security Technologies) # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: crypto.py 915 2013-11-09 22:47:13Z bethus $ # # Author: Alberto Solino (beto@coresecurity.com) ...
gpl-2.0
-2,276,810,774,761,027,000
37.348837
138
0.423452
false
LFPy/LFPy
LFPy/test/test_imem.py
1
3578
#!/usr/bin/env python # -*- coding: utf-8 -*- """Copyright (C) 2020 Computational Neuroscience Group, NMBU. 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-3.0
-1,022,368,455,699,087,500
36.663158
74
0.486864
false
esikachev/sahara-backup
sahara/plugins/cdh/v5_3_0/edp_engine.py
2
2917
# Copyright (c) 2014 Mirantis 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 writ...
apache-2.0
-1,117,714,960,142,602,400
40.084507
79
0.671238
false
discos/basie
src/receiver.py
1
4844
#coding=utf-8 # # # Copyright (C) 2013 INAF -IRA Italian institute of radioastronomy, bartolini@ira.inaf.it # # 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 th...
bsd-3-clause
-1,834,140,680,836,344,800
36.261538
93
0.588976
false
migueldiascosta/easybuild-framework
easybuild/toolchains/iimpi.py
3
1516
## # Copyright 2012-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
4,494,261,878,069,330,000
35.97561
98
0.746702
false
anastasia-tarasova/indy-sdk
wrappers/python/tests/ledger/test_build_cred_def_request.py
2
1044
from indy import ledger import json import pytest @pytest.mark.asyncio async def test_build_cred_def_request_works_for_correct_data_json(did_trustee): data = { "ver": "1.0", "id": "cred_def_id", "schemaId": "1", "type": "CL", "tag": "TAG_1", "value": { ...
apache-2.0
168,730,944,043,497,300
25.1
113
0.41954
false
wilvk/ansible
lib/ansible/plugins/action/vyos.py
10
3792
# # (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 # (at your option) any later version. # # Ansible is d...
gpl-3.0
-7,368,075,518,938,175,000
42.586207
125
0.661129
false
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Tumblr/Post/RetrieveQueuedPosts.py
5
4598
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveQueuedPosts # Retrieves a list of queued posts for a specified Tumblr blog. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
gpl-3.0
7,872,661,366,429,173,000
41.971963
180
0.684645
false
akubicharm/openshift-ansible
roles/lib_openshift/library/oc_storageclass.py
1
57202
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
5,901,550,826,576,815,000
32.967933
118
0.534614
false
pombredanne/kitchen-1
kitchen2/tests/test_collections.py
2
5970
# -*- coding: utf-8 -*- # import unittest from nose import tools from kitchen.pycompat24.sets import add_builtin_set add_builtin_set() from kitchen import collections def test_strict_dict_get_set(): '''Test getting and setting items in StrictDict''' d = collections.StrictDict() d[u'a'] = 1 d['a'] = 2...
gpl-2.0
4,488,348,237,246,046,700
36.54717
99
0.497822
false
vlegoff/tsunami
src/primaires/joueur/editeurs/descedit/__init__.py
1
5115
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 CORTIER Benoît # 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 # ...
bsd-3-clause
-1,847,908,519,395,218,700
39.8
82
0.647647
false
fvcproductions/dotfiles
bin/alfred/Alfred.alfredpreferences/workflows/user.workflow.DEDF5652-6FEF-4776-80D8-ACEDF577D06A/bs4/builder/_html5lib.py
22
13672
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import ( NamespacedAttribute, whitespace_r...
mit
6,823,206,357,496,521,000
37.404494
159
0.618856
false
yufish/youtube-dl
youtube_dl/downloader/http.py
21
9547
from __future__ import unicode_literals import errno import os import socket import time from .common import FileDownloader from ..compat import ( compat_urllib_request, compat_urllib_error, ) from ..utils import ( ContentTooShortError, encodeFilename, sanitize_open, ) class HttpFD(FileDownloade...
unlicense
1,127,488,728,651,014,700
39.799145
140
0.517754
false
parkbyte/electrumparkbyte
lib/tests/test_mnemonic.py
19
1293
import unittest from lib import mnemonic from lib import old_mnemonic class Test_NewMnemonic(unittest.TestCase): def test_prepare_seed(self): seed = 'foo BAR Baz' self.assertEquals(mnemonic.prepare_seed(seed), 'foo bar baz') def test_to_seed(self): seed = mnemonic.Mnemonic.mnemonic_to...
mit
8,330,715,429,898,601,000
37.029412
98
0.661253
false
amueller/scipy-2017-sklearn
notebooks/figures/ML_flow_chart.py
26
4745
""" Tutorial Diagrams ----------------- This script plots the flow-charts used in the scikit-learn tutorials. """ import matplotlib.pyplot as plt from matplotlib.patches import Circle, Rectangle, Polygon, FancyArrow def create_base(box_bg='#CCCCCC', arrow1='#88CCFF', arrow2='#88FF88'...
cc0-1.0
6,111,477,441,315,748,000
34.94697
76
0.493151
false
synergeticsedx/deployment-wipro
openedx/core/djangoapps/programs/tests/test_utils.py
7
36258
"""Tests covering Programs utilities.""" import copy import datetime import json from unittest import skipUnless import uuid import ddt from django.conf import settings from django.core.cache import cache from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import overri...
agpl-3.0
-3,417,082,932,535,076,000
38.62623
126
0.608776
false
gewaltig/cython-neuron
pynest/examples/CampbellSiegert.py
2
5435
# -*- coding: utf-8 -*- # # CampbellSiegert.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
gpl-2.0
-3,278,509,550,077,527,000
33.18239
150
0.562833
false
sgzsh269/django
tests/forms_tests/field_tests/test_datefield.py
33
8191
# -*- coding: utf-8 -*- from datetime import date, datetime from django.forms import ( DateField, Form, HiddenInput, SelectDateWidget, ValidationError, ) from django.test import SimpleTestCase, override_settings from django.utils import translation class GetDate(Form): mydate = DateField(widget=SelectDateWid...
bsd-3-clause
3,422,494,213,169,096,700
42.094737
94
0.586957
false
marcore/edx-platform
lms/djangoapps/certificates/management/commands/create_fake_cert.py
44
3520
"""Utility for testing certificate display. This command will create a fake certificate for a user in a course. The certificate will display on the student's dashboard, but no PDF will be generated. Example usage: $ ./manage.py lms create_fake_cert test_user edX/DemoX/Demo_Course --mode honor --grade 0.89 """ ...
agpl-3.0
6,453,031,393,438,975,000
31
110
0.57017
false
mkhuthir/learnPython
Book_pythonlearn_com/code3/bs4/element.py
16
65678
__license__ = "MIT" from pdb import set_trace import collections import re import sys import warnings from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = re.compile("\s+") def _alias(attr): """Alias one attribute name to another for backwa...
mit
7,376,766,775,267,727,000
37.074203
114
0.557691
false
weizhenwei/iTerm2
tests/esctest/tests/decstr.py
31
5412
from esc import BS, CR, ESC, LF, NUL import esccmd import escio import esclog from escutil import AssertEQ, AssertScreenCharsInRectEqual, GetCursorPosition, GetScreenSize, intentionalDeviationFromSpec, knownBug from esctypes import Point, Rect class DECSTRTests(object): """The following settings are reset: DECTCE...
gpl-2.0
-8,559,708,736,953,043,000
28.413043
133
0.604767
false
rmaestre/SVM-for-domains-detection
svm-training.py
1
4129
# -*- coding: utf-8 -*- import pickle import re import string from sklearn import svm from sklearn import cross_validation from sklearn.feature_extraction.text import CountVectorizer from sklearn.externals import joblib from numpy import array def insert_processed_review(corpus_result, labels_result, review, label, v...
apache-2.0
2,173,177,710,875,253,800
38.538462
116
0.690418
false
tensorflow/ngraph-bridge
examples/mnist/mnist_softmax_distributed.py
1
5698
# 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,507,513,872,154,648,600
35.525641
103
0.641102
false
jaor/python
bigml/tests/test_26_statistical_test.py
2
3058
# -*- coding: utf-8 -*- # # Copyright 2015-2021 BigML # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
636,229,009,120,483,300
42.685714
100
0.61053
false
mattaustin/django-thummer
setup.py
1
3784
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2018 Matt Austin # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
4,495,303,831,342,000,000
24.567568
75
0.615751
false
otfbot/otfbot
otfbot/services/config.py
1
15720
#!/usr/bin/python # -*- coding: UTF-8 -*- # # 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. # # This program is distribu...
gpl-2.0
3,308,782,397,604,642,000
38.898477
101
0.560941
false
sjones4/eutester
testcases/cloud_user/cloudwatch/monitor_command.py
5
3619
#!/usr/bin/python import subprocess from eucaops import Eucaops from eucaops import EC2ops from eutester.eutestcase import EutesterTestCase from eutester.sshconnection import CommandExitCodeException class CloudWatchCustom(EutesterTestCase): def __init__(self, extra_args= None): self.setuptestcase() ...
bsd-2-clause
-4,465,803,839,468,287,500
45.410256
130
0.617021
false
davidbstein/moderator
src/model/org.py
1
1449
import os import json from model.helpers import ( r2d, DB, PermissionError, ) from model.user import User _DOMAIN_MAPS = json.loads(os.environ.get("DOMAIN_MAPS", "{}")) class Org: def __init__(self): raise Exception("This class is a db wrapper and should not be instantiated.") @classmethod def get(...
mit
3,625,527,651,113,419,300
25.833333
119
0.622498
false
ptkool/spark
python/pyspark/sql/session.py
2
29686
# # 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 us...
apache-2.0
7,578,671,752,249,879,000
38.476064
100
0.594422
false
SchoolIdolTomodachi/SchoolIdolAPI
api/migrations/0010_auto_20150123_1809.py
4
1174
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0009_account_ownedcard'), ] operations = [ migrations.AlterField( model_name='account', name=...
apache-2.0
-3,213,157,145,857,444,400
29.894737
159
0.553663
false
amnona/heatsequer
oldver/amnonutils.py
1
6500
#!/usr/bin/env python """ amnonscript amnonutils.py various utility functions """ import sys import numpy as np from sys import getsizeof, stderr from itertools import chain from collections import deque try: from reprlib import repr except ImportError: pass __version__ = "0.2" def Debug(dlevel,*args): if dlev...
bsd-3-clause
-8,276,015,355,563,108,000
17.84058
133
0.656769
false
jmwatte/beets
test/helper.py
24
18275
# This file is part of beets. # Copyright 2015, Thomas Scholtes. # # 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,...
mit
-4,736,847,655,937,431,000
31.287986
75
0.591683
false
wujuguang/django-admin-honeypot
admin_honeypot/admin.py
4
1519
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from admin_honeypot.models import LoginAttempt class LoginAttemptAdmin(admin.ModelAdmin): list_display = ('username', 'get_ip_address', 'get_session_key', 'timestamp', 'get_path') list_filter = ('timestamp',) readonl...
mit
-668,208,277,629,130,600
36.975
93
0.654378
false
ssut/choco
choco/endpoint.py
1
3452
#-*- coding: utf-8 -*- """ Python endpoint implementation with regular expression https://gist.github.com/ssut/6ecf93fac9457dd623b0 """ import inspect import re from .kakao.request import KakaoRequest from .kakao.room import KakaoRoom from .kakao.session import KakaoSession def endpoint_from_func(func): assert fu...
mit
3,752,773,583,168,019,000
32.201923
90
0.529838
false
gooofy/nlp
examples/voice_assistant_de/toplevel.py
6
1729
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 Guenter Bartsch # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
lgpl-3.0
2,363,411,443,272,559,600
27.816667
74
0.45749
false
Jobava/zamboni
mkt/websites/tests/test_models.py
1
4322
import mock from nose.tools import eq_, ok_ from django.core.files.storage import default_storage as storage from lib.utils import static_url from mkt.constants.applications import (DEVICE_DESKTOP, DEVICE_GAIA, DEVICE_TYPE_LIST) from mkt.constants.regions import URY, USA from m...
bsd-3-clause
-185,489,397,345,421,900
40.961165
77
0.611985
false
uranusjr/django
tests/str/tests.py
106
1229
import datetime from django.db import models from django.test import TestCase from django.test.utils import isolate_apps from .models import InternationalArticle class SimpleTests(TestCase): def test_international(self): a = InternationalArticle.objects.create( headline='Girl wins €12.500 i...
bsd-3-clause
8,806,628,094,382,898,000
32.108108
75
0.620408
false
jostep/tensorflow
tensorflow/contrib/layers/python/layers/optimizers.py
16
18901
# 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,788,787,624,206,360,600
41.665914
80
0.644887
false
porksmash/swarfarm
herders/autocomplete.py
1
1327
from django.db.models import Q from django.template import loader from dal import autocomplete from .models import MonsterTag, MonsterInstance class MonsterInstanceAutocomplete(autocomplete.Select2QuerySetView): paginate_by = 15 def get_queryset(self): qs = MonsterInstance.objects.filter(owner__use...
apache-2.0
-5,766,654,569,417,694,000
27.234043
104
0.595328
false
gemalto/pycryptoki
pycryptoki/cryptoki/func_defs.py
1
45634
""" PKCS11 & CA Extension ctypes function bindings. Note to maintainers: This is where new functions added to the libCryptoki C API should be defined. """ from pycryptoki.cryptoki._ck_func_list import ( CK_SFNT_CA_FUNCTION_LIST_PTR_PTR, CK_NOTIFY, CK_FUNCTION_LIST_PTR_PTR, ) from pycryptoki.cryptoki.ck_def...
apache-2.0
6,327,332,039,044,497,000
36.100813
100
0.693233
false
jieyu/maple
script/maple/idiom/history.py
1
3745
"""Copyright 2011 The University of Michigan 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...
apache-2.0
-706,543,157,349,273,000
34
84
0.569559
false
qma/pants
src/python/pants/backend/jvm/targets/java_agent.py
14
4062
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from six import stri...
apache-2.0
-4,477,075,875,195,826,000
39.62
100
0.649434
false
cjaymes/expatriate
src/expatriate/model/xs/NMTokensType.py
1
1113
# Copyright 2016 Casey Jaymes # This file is part of Expatriate. # # Expatriate is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
lgpl-3.0
7,696,769,641,600,931,000
32.727273
77
0.754717
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/samba3/libsmb_samba_internal.py
1
1533
# encoding: utf-8 # module samba.samba3.libsmb_samba_internal # from /usr/lib/python2.7/dist-packages/samba/samba3/libsmb_samba_internal.so # by generator 1.135 """ libsmb wrapper """ # no imports # no functions # classes from object import object class Conn(object): """ libsmb connection """ def close(self,...
gpl-2.0
-3,532,237,089,675,072,500
26.872727
77
0.587736
false
vrv/tensorflow
tensorflow/tensorboard/backend/http_util_test.py
27
6514
# -*- coding: utf-8 -*- # 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 # # Un...
apache-2.0
-1,895,963,755,092,176,100
40.435897
80
0.662902
false
googleapis/googleapis-gen
google/cloud/websecurityscanner/v1alpha/websecurityscanner-v1alpha-py/google/cloud/websecurityscanner_v1alpha/types/crawled_url.py
1
1644
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-8,863,311,507,948,790,000
27.344828
74
0.65146
false
garimakhulbe/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/storage_account.py
4
6450
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
619,175,889,139,228,500
51.439024
305
0.686512
false
NSLS-II-CHX/ipython_ophyd
startup/80-pseudomotors.py
2
1216
from ophyd import (EpicsMotor, PseudoPositioner, PseudoSingle) from ophyd import Component as Cpt class SamplePositioner(PseudoPositioner): ''' Maintains an offset between a master/slave set of positioners such that the slave movement is the negative of the master's relative motion (i.e. maintains con...
bsd-2-clause
-6,584,200,962,176,377,000
38.225806
77
0.683388
false
qsantos/spyce
spyce/coordinates.py
1
3209
import math class CelestialCoordinates: """Celestial coordinates of a point or a direction Celestial coordinates are spherical coordinates. The referential is thus given by an origin, a fundamental plane and a primary direction. * ecliptic coordinates: planet center, ecliptic, vernal equinox * e...
gpl-3.0
9,017,531,885,622,832,000
41.223684
78
0.644438
false
krzychb/rtd-test-bed
tools/tiny-test-fw/TinyFW.py
1
8904
# Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD # # 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 ...
apache-2.0
4,582,388,539,374,974,000
37.713043
119
0.615004
false
open-geotechnical/ogt-ags-py
ogtgui/xwidgets.py
1
19365
# -*- coding: utf-8 -*- """ @author: Peter Morgan <pete@daffodil.uk.com> """ from Qt import Qt, QtCore, QtGui, pyqtSignal from img import Ico DEFAULT_SPACING = 0 DEFAULT_MARGIN = 0 DEFAULT_BUTTON_WIDTH = 80 #===================================================== # Layouts def hlayout(spacing=DEFAULT_SPACING, mar...
gpl-2.0
-6,770,655,444,690,900,000
27.688889
125
0.582804
false
boada/ICD
sandbox/plot_snippets/p1.py
1
1504
#!/usr/bin/env python # File: plot_icd_vs_mass.py # Created on: Mon 12 Mar 2012 11:50:09 AM CDT # Last Change: Fri Sep 28 15:47:02 2012 # Purpose of script: <+INSERT+> # Author: Steven Boada import pylab as pyl from mk_galaxy_struc import mk_galaxy_struc def plot_icd_vs_mass(): galaxies = mk_galaxy_struc() #...
mit
7,918,454,572,545,530,000
25.857143
76
0.539894
false
nlu90/heron
heron/tools/cli/src/python/main.py
4
12421
#!/usr/bin/env python2.7 # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apa...
apache-2.0
4,054,049,120,241,187,000
30.767263
98
0.656469
false
etombini/wlister
tests/wlister-items.py
1
9806
try: import unittest2 as unittest except ImportError: import unittest import requests import json import telnetlib class ProxyTest(unittest.TestCase): def test_flask_ok(self): r = requests.get('http://localhost:5000') self.assertEqual(r.status_code, 200, 'HTTP ta...
isc
7,142,214,089,603,350,000
36.715385
102
0.610239
false
trabucayre/gnuradio
gr-blocks/python/blocks/qa_selector.py
2
5882
#!/usr/bin/env python # # Copyright 2019 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks class test_selector(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def tearDow...
gpl-3.0
-6,100,212,019,102,513,000
26.876777
94
0.539442
false
chrinide/FrequentPatternMining
code/timing.py
2
2942
#!/usr/bin/env python2.6 ###################################################################### # timing.py ###################################################################### # A script for comparative timings of FP algorithms. ###################################################################### # For license inf...
isc
-6,962,409,095,318,493,000
27.563107
72
0.482325
false
SphinxKnight/kuma
docs/conf.py
2
8785
# -*- coding: utf-8 -*- # # Kuma documentation build configuration file, created by # sphinx-quickstart on Mon Aug 5 15:41:51 2013. # # 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. # # All co...
mpl-2.0
-2,913,056,370,596,294,700
30.945455
80
0.683779
false
moxon6/chemlab
build/lib/chemlab/io/handlers/mol.py
5
1539
'''Mol file handler''' import numpy as np from .base import IOHandler from ...core import Molecule class MolIO(IOHandler): '''Reader for MDL molfile http://en.wikipedia.org/wiki/Chemical_table_file. **Features** .. method:: read("molecule") Read the molecule in a :py:class:`~chemlab.co...
gpl-3.0
-4,905,559,166,525,913,000
24.229508
69
0.54256
false
manahl/arctic
tests/unit/store/test_pandas_ndarray_store.py
1
2759
import numpy as np from mock import Mock, sentinel, patch from pytest import raises # Do not remove PandasStore from arctic.store._pandas_ndarray_store import PandasDataFrameStore, PandasPanelStore, PandasStore from tests.util import read_str_as_pandas def test_panel_converted_to_dataframe_and_stacked_to_write(): ...
lgpl-2.1
-7,561,901,930,065,368,000
47.403509
120
0.657122
false
JustinWingChungHui/okKindred
suggested_image_tagging/views.py
2
2414
from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.exceptions import PermissionDenied, ParseError from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from suggested_image_tagging.models import SuggestedTag from sugges...
gpl-2.0
4,217,405,247,969,513,000
29.556962
94
0.690969
false
lbdreyer/iris
tools/generate_std_names.py
4
3295
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ A script to convert the standard names information from the provided XML file into a Python dictionary format. Takes two a...
lgpl-3.0
5,025,103,709,835,514,000
30.682692
126
0.688012
false
robwarm/gpaw-symm
gpaw/response/base.py
1
21011
import sys from time import time, ctime import numpy as np from math import sqrt, pi from datetime import timedelta from ase.units import Hartree, Bohr from gpaw import GPAW, extra_parameters from gpaw.utilities import unpack, devnull from gpaw.utilities.blas import gemmdot, gemv from gpaw.mpi import world, rank, size,...
gpl-3.0
7,385,269,783,080,632,000
38.718336
109
0.48527
false
rex-xxx/mt6572_x201
build/tools/generate-notice-files.py
9
6550
#!/usr/bin/env python # # Copyright (C) 2012 The Android Open Source Project # # 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 req...
gpl-2.0
1,316,537,114,454,833,700
33.840426
109
0.619695
false
shubhamgupta123/erpnext
erpnext/setup/doctype/global_defaults/global_defaults.py
16
2813
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals """Global Defaults""" import frappe import frappe.defaults from frappe.utils import cint from frappe.custom.doctype.property_setter.property_setter impo...
gpl-3.0
-8,289,260,682,832,391,000
36.506667
101
0.713118
false
kevinjqiu/goal
goal/db/competition.py
1
1721
from sqlalchemy import Column, String, ForeignKey, Integer from sqlalchemy.orm import relationship from .base import Base class Competition(Base): __tablename__ = 'competition' competition_id = Column(String(10), primary_key=True) country_id = Column( String(3), ForeignKey('country.country_id'), n...
bsd-3-clause
3,090,250,009,907,261,400
31.471698
77
0.617664
false
morrisonwudi/zipline
tests/test_assets.py
8
31178
# # Copyright 2015 Quantopian, 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 wr...
apache-2.0
4,139,048,185,345,944,000
35.085648
79
0.541632
false
chemelnucfin/tensorflow
tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator.py
16
38554
# 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
-2,076,465,372,930,137,900
43.882421
81
0.660217
false
mind1master/aiohttp
tests/test_web_exceptions.py
1
5041
import collections import re from unittest import mock import pytest from multidict import CIMultiDict from aiohttp import signals, web from aiohttp.protocol import HttpVersion11, RawRequestMessage from aiohttp.web import Request @pytest.fixture def buf(): return bytearray() @pytest.fixture def request(buf): ...
apache-2.0
4,417,213,948,842,629,600
28.138728
78
0.596509
false
fengbohello/practice
python/project/flasky/p036_wtf_form/hello.py
1
1189
#!/bin/env python from flask import Flask, render_template from flask.ext.bootstrap import Bootstrap from flask.ext.script import Manager from flask.ext.moment import Moment from datetime import datetime from flask.ext.wtf import Form from wtforms import StringField, SubmitField from wtforms.validators import Required...
lgpl-3.0
-8,779,289,926,343,582,000
23.770833
100
0.686291
false
araichev/kml2geojson
kml2geojson/main.py
1
18553
import os import shutil import xml.dom.minidom as md import re from pathlib import Path import json #: Atomic KML geometry types supported. #: MultiGeometry is handled separately. GEOTYPES = [ 'Polygon', 'LineString', 'Point', 'Track', 'gx:Track', ] #: Supported style types STYLE_TYPES = [ 'svg', 'leaf...
mit
8,119,090,203,167,894,000
30.495756
188
0.554579
false
sanja7s/SR_Twitter
src_taxonomy/extract_user_score_for_top_topics.py
1
3078
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' extract top taxons for each user: movies music sex humor school ''' import codecs from collections import defaultdict, OrderedDict import json import glob, os f_in = "tweets_taxonomy_clean.JSON" f_in_user_ids = "user_IDs.dat" IN_DIR = "../../../DATA/taxonomy_stat...
mit
-2,001,876,251,306,540,500
27.247706
79
0.558804
false
karmix/blivet
blivet/devicelibs/raid.py
2
23633
# # raid.py # representation of RAID levels # # Copyright (C) 2009 Red Hat, Inc. All rights reserved. # # 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 # (a...
gpl-2.0
-10,154,364,625,650,508
33.805596
99
0.643676
false
amyshi188/osf.io
api/base/utils.py
4
5561
# -*- coding: utf-8 -*- from modularodm import Q from modularodm.exceptions import NoResultsFound from rest_framework.exceptions import NotFound from rest_framework.reverse import reverse import furl from website import util as website_util # noqa from website import settings as website_settings from framework.auth i...
apache-2.0
-3,444,579,962,994,643,500
33.974843
113
0.671462
false
cfjhallgren/shogun
examples/undocumented/python/preprocessor_prunevarsubmean.py
5
1052
#!/usr/bin/env python from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_numbers('../data/fm_train_real.dat') testdat = lm.load_numbers('../data/fm_test_real.dat') parameter_list = [[traindat,testdat,1.5,10],[traindat,testdat,1.5,10]] def preprocessor_prunevarsubmean (fm_train_real=traindat,fm_test...
gpl-3.0
2,999,298,772,026,677,000
29.057143
103
0.765209
false