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
redhat-cip/managesf
managesf/model/__init__.py
2
13220
# # Copyright (c) 2015 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 agreed to in ...
apache-2.0
5,822,224,265,948,238,000
35.120219
79
0.558321
false
mezz64/home-assistant
tests/components/google/test_calendar.py
13
11236
"""The tests for the google calendar platform.""" import copy import httplib2 import pytest from homeassistant.components.google import ( CONF_CAL_ID, CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_DEVICE_ID, CONF_ENTITIES, CONF_NAME, CONF_TRACK, DEVICE_SCHEMA, SERVICE_SCAN_CALENDARS, ...
apache-2.0
-9,001,035,404,504,731,000
34.556962
85
0.645781
false
Chuban/moose
python/peacock/tests/base/test_PeacockCollapsibleWidget.py
4
1304
#!/usr/bin/env python import sys import unittest from PyQt5 import QtWidgets import peacock class TestPeacockCollapsibleWidget(unittest.TestCase): """ Test collapsible regions. """ qapp = QtWidgets.QApplication(sys.argv) def testCollapseDefault(self): collapse = peacock.base.PeacockCollapsi...
lgpl-2.1
-5,773,747,078,971,608,000
30.804878
91
0.685583
false
mgracer48/panda3d
direct/src/actor/DistributedActor.py
1
1281
"""DistributedActor module: contains the DistributedActor class""" __all__ = ['DistributedActor'] from direct.distributed import DistributedNode import Actor class DistributedActor(DistributedNode.DistributedNode, Actor.Actor): def __init__(self, cr): try: self.DistributedActor_initialized ...
bsd-3-clause
-7,648,807,752,967,226,000
33.621622
86
0.650273
false
SUSE/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2015_06_15/models/win_rm_listener.py
2
1341
# 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
-2,387,292,432,891,178,000
38.441176
79
0.624907
false
laffra/pava
pava/implementation/natives/java/util/zip/ZipFile.py
1
2834
def add_native_methods(clazz): def initIDs____(a0): raise NotImplementedError() def getEntry__long__byte____boolean__(a0, a1, a2, a3): raise NotImplementedError() def freeEntry__long__long__(a0, a1, a2): raise NotImplementedError() def getNextEntry__long__int__(a0, a1, a2): ...
mit
-899,454,201,277,582,600
37.297297
115
0.656316
false
CYBAI/servo
tests/wpt/web-platform-tests/tools/third_party/aioquic/tests/test_connection.py
15
74593
import asyncio import binascii import contextlib import io import time from unittest import TestCase from aioquic import tls from aioquic.buffer import UINT_VAR_MAX, Buffer, encode_uint_var from aioquic.quic import events from aioquic.quic.configuration import QuicConfiguration from aioquic.quic.connection import ( ...
mpl-2.0
-6,968,755,915,311,784,000
40.440556
88
0.605901
false
Em-Pan/swift
swift/common/middleware/versioned_writes.py
9
21692
# Copyright (c) 2014 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 law or agreed to ...
apache-2.0
-2,982,273,137,846,533,600
42.733871
79
0.607044
false
cs01/pygdbmi
pygdbmi/IoManager.py
1
12792
"""This module defines the `IoManager` class which manages I/O for file objects connected to an existing gdb process or pty. """ import io import select import time from pprint import pformat from typing import Union, List, Optional, Dict, Any, Tuple from pygdbmi import gdbmiparser import os import logging from pygdbmi...
mit
-5,533,462,441,223,731,000
36.078261
149
0.586304
false
tobiasgehring/qudi
hardware/CTC100_temperature.py
1
5454
# -*- coding: utf-8 -*- """ This module controls the Stanford Instruments CTC100 temperature controller (also rebranded as CryoVac TIC500, etc). Qudi is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version...
gpl-3.0
3,432,810,270,602,299,000
29.988636
104
0.59901
false
m0ppers/arangodb
3rdParty/V8/V8-5.0.71.39/build/gyp/test/win/gyptest-link-base-address.py
102
1817
#!/usr/bin/env python # Copyright 2013 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. """ Make sure the base address setting is extracted properly. """ import TestGyp import re import sys if sys.platform == 'win32': test = Te...
apache-2.0
-6,967,986,929,713,247,000
28.306452
74
0.69235
false
Shao-Feng/crosswalk-test-suite
webapi/tct-csp-w3c-tests/csp-py/csp_default-src_cross-origin_font_allowed-manual.py
25
2631
def main(request, response): _URL = request.url _CSP = "default-src " + \ _URL[:_URL.index( '/csp') + 1] + " self; script-src * 'unsafe-inline'; style-src 'unsafe-inline'" _CSSURL = _URL[:_URL.index('/csp') + 1] + "csp/support/w3c/CanvasTest.ttf" print _CSSURL response.headers.se...
bsd-3-clause
4,863,146,365,784,561,000
43.59322
112
0.717598
false
pranavtbhat/EE219
project5/part2.py
1
2030
import json import numpy as np from os.path import join from tqdm import tqdm import statsmodels.api as stats_api from datetime import datetime import pandas as pd hashtags = { 'gohawks' : 188136, 'nfl' : 259024, 'sb49' : 826951, 'gopatriots' : 26232, 'patriots' : 489713, 'superbowl' : 1348767 ...
unlicense
5,099,998,671,002,346,000
32.278689
129
0.559113
false
vincent-noel/SigNetSim
signetsim/views/edit/ModelAnnotationsView.py
2
3986
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
agpl-3.0
-1,533,106,353,423,201,000
28.094891
81
0.730055
false
yksalun/hugula
Client/tools/site-packages/pyExcelerator/ExcelFormula.py
15
2800
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Roman V. Kiseliov # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must re...
mit
-7,245,997,634,747,897,000
35.842105
76
0.6775
false
apagac/cfme_tests
scripts/apishow.py
2
8432
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This script browses through the REST API and shows all collections, subcollections and their actions. Optionally it can add coverage info taken from cfme log file to each action. """ import argparse import os import random import re import warnings from collections imp...
gpl-2.0
5,759,533,631,186,225,000
32.066667
100
0.584559
false
boegel/easybuild-framework
easybuild/tools/module_naming_scheme/mns.py
2
7667
## # Copyright 2011-2020 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
-1,843,140,398,095,341,800
41.832402
117
0.670145
false
dshlai/oyprojectmanager
tests/utils/test_backup.py
3
17924
# -*- coding: utf-8 -*- # Copyright (c) 2009-2012, Erkan Ozgur Yilmaz # # This module is part of oyProjectManager and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause # #import os #import shutil #import tempfile #import subprocess #import unittest #from xml.dom import minidom #imp...
bsd-2-clause
-5,068,876,282,032,170,000
34.705179
80
0.538496
false
coxmediagroup/nodemeister
enc/api.py
2
2198
""" Classes, serializers, router registration for NodeMeister ENC django-rest-framework API """ from rest_framework import viewsets, routers, serializers from models import * class NodeSerializer(serializers.ModelSerializer): class Meta: model = Node fields = ('hostname', 'descr...
apache-2.0
8,018,006,906,134,616,000
26.135802
73
0.694722
false
mugizico/scikit-learn
sklearn/metrics/tests/test_common.py
43
44042
from __future__ import division, print_function from functools import partial from itertools import product import numpy as np import scipy.sparse as sp from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer from sklearn.utils.multiclass impo...
bsd-3-clause
-917,621,816,276,035,200
38.929284
79
0.612302
false
paolodedios/tensorflow
tensorflow/python/kernel_tests/partitioned_variables_test.py
6
26698
# 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
-3,853,548,554,753,405,400
40.780908
121
0.607424
false
diofant/diofant
diofant/vector/__init__.py
2
1125
""" Package for symbolic vector algebra in 3D. """ from .coordsysrect import CoordSysCartesian from .deloperator import Del from .dyadic import BaseDyadic, Dyadic, DyadicAdd, DyadicMul, DyadicZero from .functions import (curl, divergence, express, gradient, is_conservative, is_solenoidal, matri...
bsd-3-clause
1,192,021,053,387,874,800
45.875
78
0.672
false
dongweiming/code
vilya/models/activity.py
3
3786
# -*- coding: utf-8 -*- from vilya.config import DOMAIN as CODE_URL class Activity(object): def __init__(self, data): self.data = data def to_line(self): return format_activity(self.data) def format_activity(data): type = data.get('type') if type in ('team_created', 'team_joined')...
bsd-3-clause
1,793,018,788,363,888,000
32.504425
78
0.496038
false
jjanssen/django-cms-patches
cms/tests/site.py
2
1530
from django.conf import settings from cms.models import Page from cms.tests.base import CMSTestCase from django.contrib.auth.models import User from django.contrib.sites.models import Site class SiteTestCase(CMSTestCase): """Site framework specific test cases. All stuff which is changing settings.SITE_ID ...
bsd-3-clause
-7,804,570,583,980,815,000
30.244898
89
0.587582
false
zouyapeng/horizon_change
openstack_dashboard/dashboards/project/access_and_security/floating_ips/urls.py
7
1109
# 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 # not use this file except in compliance with the...
apache-2.0
-7,004,164,407,005,683,000
37.241379
78
0.739405
false
marxin/youtube-dl
youtube_dl/extractor/turbo.py
37
2432
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, qualities, xpath_text, ) class TurboIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?turbo\.fr/videos-voiture/(?P<id>[0-9]+)-' _API_URL =...
unlicense
7,689,451,455,776,048,000
35.283582
180
0.558618
false
genome-vendor/cython
build/lib.linux-x86_64-2.6/Cython/Compiler/Symtab.py
7
94602
# # Symbol Table # import copy import re from Errors import warning, error, InternalError from StringEncoding import EncodedString import Options, Naming import PyrexTypes from PyrexTypes import py_object_type, unspecified_type from TypeSlots import \ pyfunction_signature, pymethod_signature, \ get_special_m...
apache-2.0
5,370,810,031,526,427,000
41.961853
120
0.564523
false
Chuck8080/pyspider
pyspider/database/__init__.py
2
3189
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-08 15:04:08 import urlparse def connect_database(url): """ create database object by url mysql: mysql+type://user:passwd@host...
apache-2.0
-3,509,956,590,248,709,600
31.876289
115
0.55127
false
yury-s/v8-inspector
Source/chrome/tools/telemetry/telemetry/util/bootstrap.py
19
5557
# 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. """Bootstrap Chrome Telemetry by downloading all its files from SVN servers. Requires a DEPS file to specify which directories on which SVN servers are requ...
bsd-3-clause
-6,250,481,518,184,842,000
33.73125
80
0.700558
false
bigswitch/horizon
openstack_dashboard/dashboards/project/firewalls/urls.py
8
2530
# Copyright 2013, Big Switch Networks, 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 applic...
apache-2.0
74,863,357,260,858,850
48.607843
79
0.648221
false
brianrodri/oppia
core/storage/auth/gae_models.py
2
10858
# coding: utf-8 # # Copyright 2020 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
-8,613,376,661,223,391,000
34.253247
80
0.649383
false
williechen/DailyApp
11/py201501/userCard/UserResideCard.py
1
3493
''' Created on 2014/5/10 @author: Administrator @deprecated: 外來人口統一證號編碼,共計10碼,前2碼使用英文字母, 第1碼為區域碼(同國民身分證註1) 第2碼為性別碼(註 2)、3至10碼為阿拉伯數字,其中第3至9碼為流水號、第10碼為檢查號碼。 台北市 A、台中市 B、基隆市 C、台南市 D、高雄市 E 新北市 F、宜蘭縣 G、桃園縣 H、嘉義市 I、新竹縣 J 苗栗縣 K、原台中縣 L、南投縣 M、彰化縣 N、新竹市 O 雲林縣 P、嘉義縣 Q、原台南縣 R、原高雄縣 S、屏東縣 T 花蓮縣 U、台東縣 V、金門縣 W、澎湖縣 ...
lgpl-3.0
-8,885,407,845,444,418,000
25.633028
100
0.54337
false
pulsar-chem/Pulsar-Core
test/math/TestUniverse.py
1
3083
import pulsar as psr def run_test(): tester = psr.PyTester("Testing Universe Python Interface") #Constructors and assignment U0, U1=psr.DoubleUniverse(),psr.DoubleUniverse() tester.test_equal("Default constructor",U0,U1) U2=psr.DoubleUniverse([1.0,2.0,3.0]) U3=psr.DoubleUniverse([1.0,2.0,3.0])...
bsd-3-clause
1,687,321,810,387,588,600
46.430769
87
0.697373
false
ghchinoy/tensorflow
tensorflow/contrib/fused_conv/python/ops/fused_conv2d_bias_activation_op_test_base.py
2
43709
# Copyright 2018 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
9,062,528,024,283,166,000
36.582975
84
0.556133
false
ankur-gupta91/horizon-net-ip
openstack_dashboard/dashboards/project/loadbalancers/views.py
9
15842
# Copyright 2013, Big Switch Networks, 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 applic...
apache-2.0
-7,602,421,537,666,447,000
36.363208
79
0.620187
false
MarcosCommunity/odoo
comunity_modules/account_financial_report_webkit/report/common_partner_balance_reports.py
22
16179
# -*- encoding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright Camptocamp SA 2011 # SQL inspired from OpenERP original code # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
5,806,480,750,018,773,000
44.446629
104
0.553743
false
Inspq/ansible
lib/ansible/modules/messaging/rabbitmq_queue.py
1
9738
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@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
-1,233,860,522,779,790,000
34.282609
174
0.577737
false
rupran/ansible
lib/ansible/modules/cloud/openstack/os_subnet.py
33
13522
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # 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
8,650,528,516,379,233,000
33.671795
79
0.60213
false
firebitsbr/raspberry_pwn
src/pentest/sqlmap/tamper/ifnull2ifisnull.py
7
1625
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY __priority__ = PRIORITY.HIGHEST def dependencies(): pass def tamper(payload, **kwargs): """ Replaces instances like 'IFNULL(...
gpl-3.0
-321,504,816,558,163,700
24.793651
74
0.481846
false
justyns/home-assistant
tests/components/notify/test_command_line.py
11
2478
"""The tests for the command line notification platform.""" import os import tempfile import unittest import homeassistant.components.notify as notify from tests.common import get_test_home_assistant from unittest.mock import patch class TestCommandLine(unittest.TestCase): """Test the command line notification...
mit
2,794,977,823,638,760,000
33.416667
75
0.54318
false
nesterione/experiments-of-programming
MongoDB/Python/Week2/Classroom/using_update.py
1
1735
import pymongo import datetime import sys # establish a connection to the database connection = pymongo.MongoClient("mongodb://localhost") # add a review date to a single record using update_one def add_review_date_using_update_one(student_id): print ("updating record using update_one and $set") # g...
apache-2.0
8,412,355,174,187,856,000
27.442623
102
0.602305
false
mahak/packstack
packstack/puppet/modules/packstack/lib/facter/netns.py
6
8175
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 t...
apache-2.0
5,710,294,314,538,621,000
36.5
79
0.557064
false
MrCodeYu/spark
python/pyspark/__init__.py
5
3747
# # 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
-3,309,597,525,621,845,500
33.376147
98
0.689351
false
Andypsamp/CODjunit
test/test_lastgenre.py
25
8245
# This file is part of beets. # Copyright 2015, Fabrice Laporte. # # 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
-6,435,556,565,754,205,000
36.477273
79
0.584718
false
sickkids-ccm/dcc-file-transfer
migrations/versions/6a5d6b8f2d27_.py
1
4480
"""empty message Revision ID: 6a5d6b8f2d27 Revises: None Create Date: 2016-05-12 18:48:06.996525 """ # revision identifiers, used by Alembic. revision = '6a5d6b8f2d27' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ###...
mit
5,050,359,744,333,633,000
39.36036
68
0.645089
false
lahosken/pants
src/python/pants/build_graph/intransitive_dependency.py
11
1380
# coding=utf-8 # Copyright 2016 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 pants.build_gra...
apache-2.0
1,273,221,651,594,387,700
33.5
97
0.752174
false
skoppisetty/idigbio-appliance
lib/sqlalchemy/util/compat.py
17
6273
# util/compat.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handle Python version/platform incompatibilities.""" import sys try: import t...
gpl-3.0
7,171,898,382,078,776,000
25.468354
84
0.570222
false
cooperative-computing-lab/cctools
prune/src/prune/glob.py
8
4688
# Copyright (c) 2010- The University of Notre Dame. # This software is distributed under the GNU General Public License. # See the file COPYING for details. import os, sys, hashlib, time, json from utils import * ready = False shutting_down = False HOME = os.path.expanduser("~") CWD = os.getcwd() base_dir = HOME+...
gpl-2.0
-2,328,705,761,841,673,000
28.118012
76
0.705631
false
couchbase/couchbase-python-client
couchbase_v2/tests/cases/view_t.py
1
6004
# # Copyright 2013, Couchbase, 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 l...
apache-2.0
549,073,283,779,258,560
35.168675
144
0.560127
false
versatica/mediasoup
worker/deps/gyp/test/win/gyptest-link-enable-winrt-app-revision.py
10
1220
#!/usr/bin/env python # Copyright (c) 2013 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. """ Make sure msvs_application_type_revision works correctly. """ from __future__ import print_function import TestGyp import os import s...
isc
-7,206,061,954,289,748,000
27.372093
107
0.70082
false
carthach/essentia
test/src/unittests/audioproblems/test_discontinuitydetector.py
1
4573
#!/usr/bin/env python # Copyright (C) 2006-2019 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
agpl-3.0
875,029,061,283,172,700
39.114035
87
0.61229
false
jordan-wright/talent-match
talent_match/models/invitation.py
1
2820
from talent_match import db from modelUtils import modelToString __author__ = 'Steve' ## # This class represents an invitation from a talent seeker to a talent provider in order to fill the need for a # a given skill that the provider possesses and the seeker needs for an activity. ## class Invitation(db.Model): ...
mit
2,724,002,098,100,378,600
36.6
111
0.691135
false
Stanford-Online/edx-analytics-dashboard
analytics_dashboard/courses/presenters/programs.py
1
2129
from courses.presenters import BasePresenter from django.core.cache import cache class ProgramsPresenter(BasePresenter): """ Presenter for the programs metadata. """ CACHE_KEY = 'programs' NON_NULL_STRING_FIELDS = ['program_id', 'program_type', 'program_title'] @staticmethod def filter_programs(...
agpl-3.0
-7,853,581,976,939,229,000
39.169811
110
0.633631
false
edx/edx-platform
openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py
4
7321
""" Tests the simulate_publish management command. """ from django.core.management import call_command from django.core.management.base import CommandError from testfixtures import LogCapture import lms.djangoapps.ccx.tasks import openedx.core.djangoapps.content.course_overviews.signals from openedx.core.djangoapps.co...
agpl-3.0
-3,991,949,623,043,305,500
38.788043
119
0.639257
false
potatolondon/reportato
reportato/tests.py
1
13817
# coding=utf-8 from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.test import TestCase, RequestFactory from mock import Mock, patch from .reporters ...
bsd-2-clause
-3,281,002,157,787,489,000
31.694313
154
0.613322
false
kyrsjo/AcdOpti
src/acdOptiGui/infoFrames/GeometryInstance.py
1
19652
# -*- coding: utf8 -*- # # Copyright 2011 Kyrre Ness Sjøbæk # This file is part of AcdOpti. # # AcdOpti 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
-5,338,039,519,075,308,000
42.379691
134
0.555623
false
ssorgatem/video4fuze
GUI/AboutDiag.py
6
1135
# -*- coding: utf-8 -*- """ Module implementing About Dialog. """ import codecs from PyQt4.QtGui import QDialog from PyQt4.QtCore import QCoreApplication, SIGNAL, QString from Ui_AboutDiag import Ui_Dialog class AboutV4F(QDialog, Ui_Dialog): """ V4F about dialog """ def __init__(self, parent = None)...
gpl-3.0
4,480,029,232,956,183,000
28.868421
142
0.6
false
Verizon/libcloud
libcloud/storage/base.py
26
28320
# 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 use ...
apache-2.0
-1,782,538,234,636,170,000
32.835125
79
0.573129
false
google/mozc
src/data_manager/gen_data_version.py
2
2665
# -*- coding: utf-8 -*- # Copyright 2010-2021, 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...
bsd-3-clause
2,972,118,535,395,036,000
36.013889
79
0.721576
false
tic-ull/gedea
src/miprimeraplicacion_django/django_cas/views.py
1
3479
"""CAS login/logout replacement views""" from django.contrib import messages from django.contrib.auth import REDIRECT_FIELD_NAME from django.conf import settings from django.http import HttpResponseRedirect, HttpResponseForbidden from urllib.parse import urlencode from urllib.parse import urljoin __all__ = ['login'...
gpl-3.0
7,880,676,389,655,834,000
31.820755
81
0.63639
false
bionoid/kivy
kivy/tests/test_animations.py
17
3847
''' Animations tests ================ ''' import unittest import gc from time import time, sleep from kivy.animation import Animation, AnimationTransition from kivy.uix.widget import Widget from kivy.clock import Clock from kivy.graphics import Scale from kivy.weakproxy import WeakProxy class AnimationTestCase(unitt...
mit
-7,741,140,415,466,226,000
26.478571
75
0.597868
false
bros-bioinfo/bros-bioinfo.github.io
COURS/M1/SEMESTRE1/ALGO_PROG/ALGO/tableau.py
1
2790
#!/usr/bin/env python # coding: utf-8 def creer_pile(): return[] def creer_tableau(): indice = -1 tableau1 = creer_pile() empiler(tableau1, indice) return tableau1 def empiler(pile, element): pile.append(element) def depiler(pile): return pile.pop() def inserer_element(T, id, e): ...
mit
-4,218,748,943,243,527,700
21.119048
143
0.556154
false
mlperf/training_results_v0.6
Google/benchmarks/transformer/implementations/tpu-v3-256-transformer/dataset_preproc/data_generators/cifar.py
7
16305
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
8,912,669,523,249,537,000
28.168157
80
0.654339
false
TRox1972/youtube-dl
youtube_dl/extractor/bilibili.py
10
4425
# coding: utf-8 from __future__ import unicode_literals import hashlib import re from .common import InfoExtractor from ..compat import compat_parse_qs from ..utils import ( int_or_none, float_or_none, unified_timestamp, urlencode_postdata, ) class BiliBiliIE(InfoExtractor): _VALID_URL = r'https...
unlicense
942,922,727,783,032,300
34.224
102
0.506019
false
spark-test/spark
dev/pip-sanity-check.py
12
1309
# # 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
5,066,430,126,901,376,000
36.4
87
0.711994
false
alephu5/Soundbyte
environment/lib/python3.3/site-packages/IPython/extensions/octavemagic.py
7
10627
# -*- coding: utf-8 -*- """ =========== octavemagic =========== Magics for interacting with Octave via oct2py. .. note:: The ``oct2py`` module needs to be installed separately and can be obtained using ``easy_install`` or ``pip``. You will also need a working copy of GNU Octave. Usage ===== To enable the ma...
gpl-3.0
3,071,073,813,817,427,500
26.819372
80
0.514915
false
sacrefies/csc643_bigdata
project1/src/mongodb_connector.py
1
3597
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 team1@course_bigdata, Saint Joseph's University # # 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/li...
apache-2.0
-8,888,494,421,145,992,000
31.116071
118
0.613845
false
cesarmarinhorj/cubes
cubes/providers.py
7
15552
# -*- coding: utf-8 -*- """Logical model model providers.""" import copy import json import re from .logging import get_logger from .errors import * from .model import * from .metadata import * __all__ = [ "ModelProvider", "StaticModelProvider", "link_cube", ] # Proposed Provider API: # Provider.cub...
mit
3,176,609,446,727,866,000
33.078947
95
0.601802
false
craigem/effectivepython
item_09.py
1
1455
#!/usr/bin/env python3 '''Item 9 from Effective Python''' # Example 1 ''' If the file is absolutely enormous or perhaps a never-ending network socket, list comprehensions are problematic. Here, I use a list comprehension in a way that can only handle small input values ''' print('Example 1:\n==========') import rand...
gpl-3.0
1,900,474,966,403,767,800
27.529412
77
0.683162
false
nuagenetworks/vspk-python
vspk/v5_0/fetchers/nugroups_fetcher.py
2
2086
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
-7,684,816,828,351,298,000
38.377358
86
0.721956
false
Theer108/invenio
invenio/base/i18n.py
10
4183
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015 CERN. # # Invenio 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 th...
gpl-2.0
-6,845,603,090,411,437,000
31.679688
79
0.656706
false
SmokinCaterpillar/pypet
examples/example_05_custom_parameter.py
2
10056
__author__ = 'Robert Meyer' import numpy as np import inspect import os # For path names being viable under Windows and Linux from pypet import Environment, Parameter, ArrayParameter, Trajectory import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Here we will see how we can write our own custo...
bsd-3-clause
-4,568,353,429,156,449,300
39.063745
105
0.667363
false
yadayada/acd_cli
acdcli/api/oauth.py
1
11368
import os import json import requests import time import logging import webbrowser import datetime import random import string from requests.auth import AuthBase from urllib.parse import urlparse, parse_qs from threading import Lock logger = logging.getLogger(__name__) TOKEN_INFO_URL = 'https://api.amazon.com/auth/o2...
gpl-2.0
3,480,279,032,755,513,000
35.203822
100
0.584887
false
googleapis/googleapis-gen
google/cloud/sql/v1beta4/sql-v1beta4-py/google/cloud/sql_v1beta4/services/sql_flags_service/async_client.py
1
8796
# -*- 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
7,890,718,213,699,969,000
41.699029
142
0.668827
false
CYBAI/servo
tests/wpt/web-platform-tests/tools/third_party/hyper/hyper/h2/frame_buffer.py
37
7300
# -*- coding: utf-8 -*- """ h2/frame_buffer ~~~~~~~~~~~~~~~ A data structure that provides a way to iterate over a byte buffer in terms of frames. """ from hyperframe.exceptions import UnknownFrameError, InvalidFrameError from hyperframe.frame import ( Frame, HeadersFrame, ContinuationFrame, PushPromiseFrame ) fr...
mpl-2.0
-1,467,161,729,018,229,000
38.673913
79
0.606712
false
pidah/st2contrib
packs/puppet/actions/lib/remote_actions.py
12
1209
import sys import pipes import subprocess __all__ = [ 'PuppetBaseAction' ] class PuppetBaseAction(object): PUPPET_BINARY = 'puppet' def _run_command(self, cmd): cmd_string = ' '.join(pipes.quote(s) for s in cmd) sys.stderr.write('Running command "%s"\n' % (cmd_string)) process = ...
apache-2.0
375,029,634,741,588,740
27.785714
78
0.555004
false
theAprel/Archive
python/resize.py
1
2142
from xml.dom import minidom import os import sys from glob import glob import codecs def resize(filename, directory, md5sumFile): glob_files = glob(os.path.join(directory, u'**'), recursive=True) with codecs.open(filename, 'r', encoding='utf-8') as f: metadata_file_contents = f.read() xmldoc = min...
gpl-3.0
-726,337,320,388,052,500
40.192308
122
0.619981
false
southpawtech/TACTIC-DEV
src/tactic/ui/checkin/file_properties_wdg.py
6
2336
########################################################### # # Copyright (c) 2011, 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
-3,417,283,358,092,973,600
25.850575
98
0.589469
false
heromod/migrid
mig/cgi-bin/grep.py
1
1096
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # grep - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the ...
gpl-2.0
-8,289,459,494,071,087,000
30.314286
81
0.738139
false
diogo149/BooMLet
boomlet/storage.py
1
1985
try: import cPickle as pickle except ImportError: import pickle import joblib import zlib import os import glob import dill def mkdir(filename): """ try to make directory """ try: os.makedirs(os.path.dirname(filename)) except OSError: pass def exists(filename): return os...
gpl-3.0
3,464,592,704,807,118,300
18.271845
67
0.647859
false
angelapper/edx-platform
common/djangoapps/static_replace/admin.py
24
1452
""" Django admin page for AssetBaseUrlConfig, which allows you to set the base URL that gets prepended to asset URLs in order to serve them from, say, a CDN. """ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from .models import AssetBaseUrlConfig, AssetExcludedExtensionsConfi...
agpl-3.0
-2,707,649,998,156,532,000
28.04
86
0.704545
false
EliteTK/qutebrowser
qutebrowser/browser/webkit/webkitinspector.py
4
1310
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-7,392,202,281,232,280,000
31.75
74
0.728244
false
google/certificate-transparency
python/ct/client/reporter_test.py
3
4841
#!/usr/bin/env python import unittest import sys from collections import defaultdict from absl import flags as gflags from ct.client import reporter from ct.client.db import cert_desc from ct.client.db import sqlite_cert_db from ct.client.db import sqlite_connection as sqlitecon from ct.crypto import cert from ct.prot...
apache-2.0
4,958,583,780,802,296,000
39.341667
86
0.650485
false
blueskycoco/zcl-y
rtthread-apps/tools/ua.py
1
4190
# File : ua.py # Tool Script for building User Applications # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # 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 # ...
gpl-2.0
770,119,172,012,355,600
31.230769
79
0.644391
false
krintoxi/NoobSec-Toolkit
NoobSecToolkit /scripts/sshbackdoors/rpyc/experimental/splitbrain.py
16
9095
""" The Magnificent Splitbrain .. versionadded:: 3.3 """ import sys import atexit import threading from contextlib import contextmanager import functools import gc try: import __builtin__ as builtins except ImportError: import builtins # python 3+ from types import ModuleType router = threading.local() route...
gpl-2.0
6,479,792,155,188,995,000
35.821862
111
0.574491
false
trabacus-softapps/openerp-8.0-cc
openerp/addons/report_intrastat/report/__init__.py
65
1068
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
-7,898,483,556,413,244,000
47.545455
79
0.610487
false
hcs/mailman
src/mailman/model/tests/test_uid.py
3
1472
# Copyright (C) 2011-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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
-6,386,960,495,422,640,000
29.040816
78
0.707201
false
martinwicke/tensorflow
tensorflow/contrib/specs/python/summaries_test.py
14
2900
# 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 applicable ...
apache-2.0
-814,147,306,897,229,400
35.25
80
0.633793
false
PATechmasters/techmaster-ctf
api/api/logger.py
8
7209
""" Manage loggers for the api. """ import logging, logging.handlers, time import api from bson import json_util from flask import request, has_request_context from flask import logging as flask_logging from sys import stdout from datetime import datetime critical_error_timeout = 600 log = logging.getLogger(__name...
mit
-1,053,602,422,361,827,800
26.515267
89
0.545013
false
jacobsenanaizabel/shoop
setup.py
2
4305
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import os import sys import setuptools import shoop_setup_utils as utils TOPDIR = os.path.abspath...
agpl-3.0
-4,242,194,638,524,201,500
29.75
75
0.641347
false
sfanous/Pyecobee
pyecobee/objects/device.py
1
2502
""" This module is home to the Device class """ from pyecobee.ecobee_object import EcobeeObject class Device(EcobeeObject): """ This class has been auto generated by scraping https://www.ecobee.com/home/developer/api/documentation/v1/objects/Device.shtml Attribute names have been generated by convert...
mit
2,657,890,437,476,544,000
24.793814
83
0.594724
false
aisipos/django
django/db/models/fields/files.py
9
19297
import datetime import os import posixpath import warnings from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.db.models import signals from django.db.models.fiel...
bsd-3-clause
-693,912,462,279,046,000
38.787629
104
0.627662
false
atilag/qiskit-sdk-py
qiskit/mapper/_coupling.py
1
6637
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. 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
4,709,168,070,103,641,000
33.388601
81
0.598614
false
LeeKamentsky/CellProfiler
cellprofiler/tests/test_workspace.py
2
2460
"""test_workspace.py - test the workspace CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All rights reserved. Please see the AUTHORS file for credits...
gpl-2.0
-2,126,151,733,260,320,500
31.381579
73
0.629268
false
magnusax/ml-meta-wrapper
gazer/visualize.py
1
1824
import sys import pandas as pd import seaborn as sns import matplotlib.pyplot as plt class Visualizer(): def __init__(self, *args): pass def show_performance(self, list_of_tuples, fig_size=(9,9), font_scale=1.1, file=''): """ Parameters: list_of_tuples: ...
mit
-1,814,512,967,789,070,800
34.784314
91
0.51864
false
cisco-openstack/neutron
neutron/policy.py
5
17481
# Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
1,550,712,202,266,313,000
40.228774
79
0.603455
false
zhaochao/fuel-web
fuel_upgrade_system/fuel_upgrade/fuel_upgrade/tests/test_nailgun_client.py
4
4592
# -*- coding: utf-8 -*- # Copyright 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 requi...
apache-2.0
7,770,245,066,555,240,000
33.526316
78
0.612152
false
CIFASIS/pylearn2
pylearn2/cross_validation/train_cv_extensions.py
30
4560
""" Cross-validation training extensions. """ __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "3-clause BSD" import numpy as np import os from pylearn2.train import SerializationGuard from pylearn2.train_extensions.best_params import MonitorBasedSaveBest from pylearn...
bsd-3-clause
729,259,858,154,374,000
33.80916
78
0.602851
false
biocore/pyqi
tests/test_util.py
1
1154
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
bsd-3-clause
-5,579,018,053,600,460,000
31.055556
78
0.582322
false
brigittebigi/proceed
proceed/bin/guimanager.py
1
6375
#!/usr/bin/python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | |\...
gpl-3.0
8,638,812,614,768,123,000
32.031088
138
0.512627
false