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
samueldotj/TeeRISC-Simulator
tests/quick/se/00.hello/test.py
56
1816
# Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
bsd-3-clause
1,922,590,762,508,636,400
55.75
72
0.768172
false
pokowaka/atreus-firmware
tmk/tmk_core/tool/mbed/mbed-sdk/workspace_tools/paths.py
36
3374
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
gpl-3.0
-1,424,437,508,543,351,800
29.954128
87
0.717546
false
Duraznos/root
interpreter/llvm/src/tools/clang/utils/ABITest/ABITestGen.py
77
30083
#!/usr/bin/env python from pprint import pprint import random, atexit, time from random import randrange import re from Enumeration import * from TypeGen import * #### class TypePrinter: def __init__(self, output, outputHeader=None, outputTests=None, outputDriver=None, headerN...
lgpl-2.1
1,692,771,722,170,362,000
43.766369
170
0.528239
false
holzman/glideinwms-old
creation/lib/cWParams.py
1
17933
# # Project: # glideinWMS # # File Version: # # Desscription: # This module contains the generic params classes # # Extracted from: # cgWParams.py # # Author: # Igor Sfiligoi # import os import copy import sys import os.path import string import socket import types import traceback from glideinwms.lib import ...
bsd-3-clause
-8,056,964,093,119,132,000
36.595388
207
0.568951
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/aio/operations/_vpn_connections_operations.py
1
21995
# 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 may ...
mit
-6,423,437,896,381,666,000
49.563218
220
0.648284
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/sqlvm/__init__.py
5
1864
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
-4,389,754,064,148,998,700
49.378378
134
0.534871
false
Qalthos/ansible
lib/ansible/executor/module_common.py
5
50899
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either...
gpl-3.0
-5,245,933,034,511,005,000
44.937726
157
0.616044
false
Mikkeli222/Nipatus
Nipatus/screen_previous.py
1
2350
""" screen_previous.py - This module contains class PreviousScreen. Copyright © 2015 Mikko Pitkänen mun.lumia900@gmail.com """ import tkinter import tkinter.ttk import data as Data import misc_functions class PreviousScreen(tkinter.Frame): def __init__(self, master, fn, arg): tkinter.Frame._...
apache-2.0
-5,841,486,286,677,880,000
31.583333
106
0.568627
false
AMOboxTV/AMOBox.LegoBuild
script.module.pydevd/lib/pydev_ipython/inputhookglut.py
2
5595
# coding: utf-8 """ GLUT Inputhook support functions """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this ...
gpl-2.0
6,698,461,270,886,765,000
35.568627
79
0.563181
false
emile2016/flaskbb
flaskbb/utils/markup.py
2
2496
import os import re from flask import url_for import mistune from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter _re_emoji = re.compile(r':([a-z0-9\+\-_]+):', re.I) _re_user = re.compile(r'@(\w+)', re.I) def collect_emojis(): """Returns a ...
bsd-3-clause
-4,756,548,123,256,392,000
28.023256
79
0.563301
false
alexforencich/xfcp
lib/eth/tb/test_ip_eth_rx_64.py
2
37694
#!/usr/bin/env python """ Copyright (c) 2014-2018 Alex Forencich 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, modify,...
mit
-8,964,308,664,283,597,000
34.560377
91
0.5555
false
zleap/nestedloops
turtle-loop4.3.py
1
1437
#!/usr/bin/env python #more advanced nested loops program. #this draws a shape starts small repeats getting bigger each time, #change the range x,72 to a bigger number #note turtle.forward(x) is linked to the range or how many import time import turtle import math #set file name #fname= raw_input("Filename (must in...
gpl-2.0
6,102,157,318,396,206,000
19.239437
67
0.729297
false
inteligencia-coletiva-lsd/pybossa
test/test_jobs/test_send_mail.py
6
1426
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa 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...
agpl-3.0
5,602,253,873,254,815,000
36.526316
77
0.693548
false
fishilico/selinux-refpolicy-patched
policy/flask/flask.py
16
14520
#!/usr/bin/python -E # # Author(s): Caleb Case <ccase@tresys.com> # # Adapted from the bash/awk scripts mkflask.sh and mkaccess_vector.sh # import getopt import os import sys import re class ParseError(Exception): def __init__(self, type, file, line): self.type = type self.file = file self.line = line def __s...
gpl-2.0
2,275,156,658,115,813,000
26.089552
168
0.61708
false
mbohlool/client-python
kubernetes/client/models/v1_tcp_socket_action.py
1
4029
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
-7,446,419,965,808,691,000
24.993548
133
0.535865
false
tabo/feedjack
feedjack/urls.py
4
1348
# -*- coding: utf-8 -*- """ feedjack Gustavo Picón urls.py """ from django.conf.urls.defaults import patterns from django.views.generic.simple import redirect_to from feedjack import views urlpatterns = patterns('', (r'^rss20.xml$', redirect_to, {'url':'/feed/rss/'}), (r'^feed/$', redirect_to, ...
bsd-3-clause
7,027,726,029,476,670,000
27.659574
73
0.530809
false
Ragowit/fireplace
fireplace/cards/classic/mage.py
2
3020
from ..utils import * ## # Hero Powers # Fireblast (Jaina Proudmoore) class CS2_034: activate = Hit(TARGET, 1) # Fireblast (Medivh) class CS2_034_H1: activate = CS2_034.activate # Fireblast (Khadgar) class CS2_034_H2: activate = CS2_034.activate ## # Minions # Water Elemental class CS2_033: events = Damage...
agpl-3.0
2,376,840,009,213,906,000
15.324324
74
0.683775
false
efectivo/network_sim
diamond1_basic.py
1
1640
from units import runner, results_to_file def job_gen(): run_num = 1 for dashed in [0, 1]: for N in range(10, 101, 10): k = 3 for run_id in range(run_num): test = { 'test': {}, 'net': {'topology': 'diamond', 'dashed': dashe...
mit
7,274,586,252,964,647,000
30.538462
92
0.414634
false
tristan0x/hpcbench
tests/test_driver.py
1
10271
from collections import namedtuple from functools import reduce import json import logging import os import os.path as osp import shutil import tempfile import unittest from cached_property import cached_property import six import yaml from hpcbench.api import Benchmark from hpcbench.campaign import ReportNode from h...
mit
-7,642,928,388,993,798,000
36.079422
88
0.583974
false
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/distribute/python/prefetching_ops_v2.py
2
6738
# 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...
mit
4,795,807,771,898,680,000
39.107143
97
0.702137
false
Alpistinho/FreeCAD
src/Mod/PartDesign/fcgear/fcgear.py
18
3528
# (c) 2014 David Douard <david.douard@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (LGPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version....
lgpl-2.1
-3,244,727,046,546,419,700
31.666667
76
0.603741
false
kamotos/factory_boy
tests/test_mongoengine.py
1
2393
# -*- coding: utf-8 -*- # Copyright: See the LICENSE file. """Tests for factory_boy/MongoEngine interactions.""" import factory import os from .compat import unittest try: import mongoengine except ImportError: mongoengine = None if os.environ.get('SKIP_MONGOENGINE') == '1': mongoengine = None if mong...
mit
-5,061,643,175,586,691,000
28.54321
67
0.65608
false
cathalmccabe/PYNQ
pynq/lib/pmod/pmod.py
4
5821
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
bsd-3-clause
6,246,514,693,235,974,000
31.887006
79
0.640096
false
lmazuel/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/sku.py
4
1528
# 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
-6,502,103,743,945,068,000
30.833333
96
0.532068
false
hejuna/bite-project
server/models/bite_suite.py
17
10446
# Copyright 2010 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
-4,043,245,308,285,785,000
33.361842
80
0.663508
false
codyparker/channels-obstruction
game/views/views.py
1
3489
from django.contrib.auth.forms import PasswordResetForm from django.shortcuts import redirect from django.views.generic import CreateView, TemplateView, View, FormView from django.contrib.auth import authenticate, login from game.forms import * from game.models import User, Game from django.contrib.auth.forms import Au...
mit
8,649,726,474,509,742,000
39.114943
116
0.687876
false
vitorespindola/home-assistant
tests/test_component_device_sun_light_trigger.py
3
3501
""" tests.test_component_device_sun_light_trigger ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests device sun light trigger component. """ # pylint: disable=too-many-public-methods,protected-access import os import unittest import homeassistant.loader as loader from homeassistant.const import CONF_PLATFORM from homeassistant.compone...
mit
-6,426,477,691,603,118,000
26.566929
78
0.635533
false
DailyActie/Surrogate-Model
01-codes/scipy-master/scipy/stats/tests/test_tukeylambda_stats.py
1
3336
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_allclose, assert_equal, run_module_suite from scipy.stats._tukeylambda_stats import tukeylambda_variance, \ tukeylambda_kurtosis def test_tukeylambda_stats_known_exact(): """Compare results wi...
mit
7,781,818,567,026,962,000
36.066667
75
0.630995
false
semonte/intellij-community
python/helpers/pydev/_pydevd_frame_eval/pydevd_frame_tracing.py
3
4322
import sys import traceback from _pydev_bundle import pydev_log from _pydev_imps._pydev_saved_modules import threading from _pydevd_bundle.pydevd_comm import get_global_debugger, CMD_SET_BREAK from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER def update_globals_d...
apache-2.0
-6,613,420,800,787,674,000
37.247788
120
0.600879
false
nharraud/invenio-oaiharvester
invenio_oaiharvester/upgrades/oaiharvester_2015_07_14_innodb.py
1
1535
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 the # License, or (at your option) any later...
gpl-2.0
3,099,105,697,547,080,000
25.465517
74
0.693811
false
spigwitmer/mysqlproxy
mysqlproxy/binary_protocol.py
1
4250
""" Binary protocol value handling """ from mysqlproxy.types import * from mysqlproxy import column_types as coltypes import struct from datetime import datetime def generate_binary_field_info(val, type_code): """ Returns a list of data types representing the value `val` of type code `type_code` (see mysq...
bsd-3-clause
-2,209,202,731,825,847,600
44.698925
88
0.597647
false
stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/spence/benchmark/python/scipy/benchmark.py
1
2199
#!/usr/bin/env python # # @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 # # ...
apache-2.0
-1,667,017,985,710,595,600
21.670103
74
0.631196
false
pshen/ansible
lib/ansible/modules/files/assemble.py
35
9132
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
gpl-3.0
-8,550,170,045,236,889,000
32.573529
106
0.632501
false
linvictor88/vse-lbaas-driver
quantum/plugins/cisco/nexus/cisco_nexus_network_driver_v2.py
1
9336
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
apache-2.0
-4,213,485,335,659,307,500
39.768559
78
0.59865
false
sharad/calibre
src/calibre/web/feeds/__init__.py
5
12377
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' ''' Contains the logic for parsing feeds. ''' import time, traceback, copy, re from calibre.utils.logging import default_log from calibre import entity_to_unicode, strftime from calibre.utils.date import dt_f...
gpl-3.0
-2,584,616,136,062,738,000
33.572626
105
0.535833
false
simonwydooghe/ansible
lib/ansible/modules/remote_management/ucs/ucs_wwn_pool.py
5
8556
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
-3,517,350,644,316,414,500
34.94958
139
0.571412
false
AzePUG/Data_Structures_Algo_Python
Source_Code/python_kodlar/fesil9/fesil9_problems_solutions.py
2
13705
from queue import Queue class Node: def __init__(self, data): # root node self.data = data # Sol övlad(left child) self.left = None # Sağ övlad(right child) self.right = None def get_data(self): return self.data def get_left_child(self): ret...
mit
-3,437,561,034,992,447,500
32.867168
120
0.540591
false
eclee25/flu-SDI-exploratory-age
scripts/OR_subtype_vaxmatch_v6-16-13.py
1
4864
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: June 16, 2013 ###Function: #### generate a metric that represents the potential interactive effect between the prominent subtype and the vax strain match for the prominent subtype #### draw a plot of ...
mit
2,004,143,897,823,384,000
37.912
196
0.701891
false
credp/lisa
external/workload-automation/wa/framework/exception.py
3
4563
# Copyright 2013-2018 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
2,332,844,489,602,603,000
30.6875
104
0.653079
false
rbarrois/factory_boy
factory/faker.py
1
2223
# -*- coding: utf-8 -*- # Copyright: See the LICENSE file. """Additional declarations for "faker" attributes. Usage: class MyFactory(factory.Factory): class Meta: model = MyProfile first_name = factory.Faker('name') """ from __future__ import absolute_import from __future__ import...
mit
6,703,169,373,619,360,000
25.152941
66
0.622132
false
apinsard/qtile
libqtile/widget/countdown.py
11
2364
# Copyright (c) 2014 Sean Vig # Copyright (c) 2014 roger # Copyright (c) 2014 Tycho Andersen # Copyright (c) 2014 Adi Sieker # # 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 restrict...
mit
-5,469,668,473,567,863,000
37.754098
79
0.653553
false
heimlich1024/OD_CopyPasteExternal
Blender/BLENDER_ExportToExternal.py
2
4435
bl_info = { "name": "Copy To External", "version": (1, 0), "author": "Oliver Hotz", "description": "Copies current object to clipboard for use in other applications / instances", "category": "Object" } import bpy, tempfile, os from mathutils import Vector class CopyToExternal(bpy.types.Operator): ...
apache-2.0
7,388,787,439,722,112,000
37.241379
132
0.488613
false
scottrice/pysteam
pysteam/grid.py
3
2425
# encoding: utf-8 import os import shutil import paths VALID_EXTENSIONS = [ '.png', '.jpg', '.jpeg', '.tga', ] VALID_EXTENSIONS_WITHOUT_DOT = map(lambda ext: ext[1:], VALID_EXTENSIONS) def is_valid_extension(extension): """Returns True is `extension` is a valid image extension to be used with custom St...
mit
8,520,886,058,365,924,000
33.657143
78
0.710515
false
m-sanders/wagtail
wagtail/wagtailadmin/urls.py
4
6431
from django.conf.urls import url from django.contrib.auth.decorators import permission_required from django.contrib.auth import views as django_auth_views from django.views.decorators.cache import cache_control from wagtail.wagtailadmin.forms import PasswordResetForm from wagtail.wagtailadmin.views import account, cho...
bsd-3-clause
3,761,206,188,576,800,300
50.039683
136
0.689006
false
sysalexis/kbengine
kbe/src/lib/python/Lib/ast.py
91
12034
""" ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. ...
lgpl-3.0
6,038,490,974,220,331,000
37.203175
81
0.60703
false
purisc-group/purisc-backend
class_def/conversions/terminator.py
1
4842
import re from helpers import subleq from helpers import next_subleq from helpers import clear def branchParseArgs(argStr): args = []; condition = re.findall("(?<=i1\s)[^,]*(?=,)",argStr); if len(condition) > 0: args.append(condition[0]); args.append(re.findall("(?<=label\s)[^,]*(?=,)",argStr)[0]); args.appe...
gpl-2.0
-4,045,357,002,096,055,000
28.168675
108
0.596448
false
ppaez/flyinghigh-opengl-from-python
flyinghigh/geometry/tests/testOrientation.py
2
3360
try: # Python 2.6 with unittest2 installed from unittest2 import TestCase, main except: # Python 2.7 from unittest import TestCase, main from math import pi from ... import gl from ..vec3 import NegXAxis, NegYAxis, NegZAxis, Vec3, XAxis, YAxis, ZAxis from ..orientation import Orientatio...
bsd-3-clause
6,313,667,862,939,793,000
31.267327
74
0.579464
false
mgax/beancount
lib/python/beancount/fallback/elementtree/SimpleXMLWriter.py
21
8616
# # SimpleXMLWriter # $Id: SimpleXMLWriter.py 3265 2007-09-06 20:42:00Z fredrik $ # # a simple XML writer # # history: # 2001-12-28 fl created # 2002-11-25 fl fixed attribute encoding # 2002-12-02 fl minor fixes for 1.5.2 # 2004-06-17 fl added pythondoc markup # 2004-07-23 fl added flush method (from Jay Grav...
gpl-2.0
5,425,764,246,910,292,000
29.88172
78
0.59552
false
pztrick/django-allauth
allauth/socialaccount/providers/github/views.py
8
2024
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.github.provider import GitHubProvider from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) class GitHubOAuth2Adapter(OAuth2Adapter): provider...
mit
-8,545,775,042,350,054,000
34.508772
74
0.627964
false
CruiseDevice/coala
tests/core/DependencyBearTest.py
4
8499
from concurrent.futures import ThreadPoolExecutor from coalib.core.DependencyBear import DependencyBear from coalib.core.FileBear import FileBear from coalib.core.ProjectBear import ProjectBear from coalib.settings.Section import Section from tests.core.CoreTestBase import CoreTestBase class TestProjectBear(Project...
agpl-3.0
-4,377,442,469,723,759,000
38.165899
79
0.544535
false
Ircam-Web/mezzanine-organization
organization/network/migrations/0138_auto_20190619_2047.py
1
1107
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-06-19 18:47 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('organization-network', '01...
agpl-3.0
4,209,029,235,910,933,000
40
330
0.64589
false
ThiefMaster/indico
indico/modules/events/tracks/forms.py
3
2022
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.ext.sqlalchemy.fields import QuerySelectField from wtforms.fields import StringField from wtf...
mit
-7,091,289,734,348,802,000
42.021277
114
0.691889
false
code-google-com/cortex-vfx
python/IECoreMaya/TemporaryAttributeValues.py
12
4259
########################################################################## # # Copyright (c) 2009-2012, Image Engine Design 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: # # * Redis...
bsd-3-clause
-7,749,179,435,043,762,000
38.435185
91
0.694294
false
JustinDrake/openbazaar-go
qa/smtp_notification.py
1
5877
import requests import json import time import subprocess import re import os from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure from test_framework.smtp_server import SMTP_DUMPFILE class SMTPTest(OpenBazaarTestFramework): def __init__(self): ...
mit
1,382,961,265,109,162,200
38.18
127
0.599456
false
laurent-george/protolab_sound_recognition
tests/test_bell_detection.py
1
1178
__author__ = 'lgeorge' import os import glob import subprocess from sound_classification import classification_service from test_common import _get_training_data, wget_file import pytest def test_classifier_simple(): """ just check that the service is correctly installed :return: """ sound_classi...
mit
-5,147,432,217,201,743,000
34.69697
139
0.7309
false
radosuav/QGIS
python/plugins/processing/algs/gdal/tri.py
15
4495
# -*- coding: utf-8 -*- """ *************************************************************************** tri.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********************...
gpl-2.0
2,633,965,359,591,796,000
40.62037
116
0.541491
false
vasili-v/distcovery
test/test_test.py
1
8160
import unittest import os import sys import StringIO from distutils import log from distutils.cmd import Command from distutils.dist import Distribution from utils import mock_directory_tree, PreserveOs, ImportTrash # Reload module to run its global section under coverage supervision import distcovery.test reload(di...
mit
4,287,282,404,313,422,000
32.719008
79
0.557353
false
ds-hwang/chromium-crosswalk
tools/perf/benchmarks/indexeddb_perf.py
5
3978
# 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. """Runs Chromium's IndexedDB performance test. These test: Databases: create/delete Keys: create/delete Indexes: create/delete Data access: Random r...
bsd-3-clause
-3,815,484,576,776,627,700
27.826087
77
0.734289
false
fhartwig/adhocracy3.mercator
src/adhocracy_core/adhocracy_core/auditing/__init__.py
2
4803
"""Log which user modifies resources in additional 'audit' database.""" import transaction import substanced.util from pyramid.traversal import resource_path from pyramid.request import Request from pyramid.response import Response from BTrees.OOBTree import OOBTree from datetime import datetime from logging import ge...
agpl-3.0
-945,154,538,102,320,400
33.553957
75
0.639808
false
camradal/ansible
test/units/modules/network/ios/test_ios_vrf.py
13
6440
# # (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
-3,982,276,343,558,475,000
36.44186
88
0.643323
false
olivierdalang/stdm
third_party/sqlalchemy/util/__init__.py
1
2405
# util/__init__.py # Copyright (C) 2005-2014 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 from .compat import callable, cmp, reduce, \ threading, py3k, py33, py...
gpl-2.0
4,782,946,644,541,882,000
49.170213
80
0.739293
false
polymonster/pmtech
tools/pmbuild_ext/dependencies.py
1
6375
import os import json default_settings = dict() default_settings["textures_dir"] = "assets/textures/" default_settings["models_dir"] = "assets/mesh/" def delete_orphaned_files(build_dir, platform_data_dir): for root, dir, files in os.walk(build_dir): for file in files: dest_file = os.path.joi...
mit
4,657,659,342,399,912,000
35.428571
94
0.566431
false
trickvi/bdp2ckan
bdp2ckan.py
1
7778
# -*- coding: utf-8 -*- # bdp2ckan.py - Send a budget data package to a CKAN instance # Copyright (C) 2013 Tryggvi Björgvinsson # # 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...
gpl-3.0
-3,805,272,379,955,504,000
38.277778
80
0.650251
false
doug-fish/horizon
openstack_dashboard/dashboards/identity/projects/workflows.py
2
38674
# 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
3,393,413,942,795,748,000
42.307951
79
0.524202
false
PEAT-AI/Crampy
speech_recognition/minimal.py
1
1307
#!/usr/bin/env python # -*- coding: utf-8 -*- # # untitled.py # # Copyright 2014 linaro <linaro@cubietruck> # # 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 Lic...
gpl-3.0
8,081,347,438,708,105,000
28.044444
95
0.696251
false
umitproject/packet-manipulator
umit/pm/backend/umpa/context/send.py
2
3710
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008 Adriano Monteiro Marques # # Author: Francesco Piccinno <stack.box@gmail.com> # ...
gpl-2.0
1,374,351,007,686,992,100
36.1
97
0.504313
false
mozilla/treeherder
treeherder/webapp/api/performance_serializers.py
2
13497
import decimal from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from rest_framework import exceptions, serializers from treeherder.model.models import Repository from treeherder.perf.models import ( BackfillRecord, IssueTracker...
mpl-2.0
1,615,358,247,940,246,500
33.875969
99
0.636586
false
smithev/check_AMQP
check_amqp.py
1
5533
#!/usr/bin/python2.6 ''' Software License Agreement (BSD License) Copyright (c) 2013, Smith Electric Vehicles (Europe) Ltd 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 c...
bsd-3-clause
-3,662,673,592,864,164,000
41.561538
129
0.739743
false
garhivelg/execom
src/execom/commands.py
1
8056
from app import manager, db from faker import Factory import random import yaml from .models import Protocol, Decision, Resolution from case.models import Register, Case @manager.command def fill(): "Fill db with sample data" fake = Factory.create('ru_RU') registers = random.randint(10, 50) for reg...
gpl-3.0
830,730,716,799,628,300
37
106
0.492552
false
delitamakanda/jobboard
inventory/migrations/0001_initial.py
1
2058
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-16 20:31 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
mit
-3,481,898,657,348,503,000
37.830189
143
0.541788
false
buzztroll/unix-agent
src/dcm/agent/cmd/scrubber.py
3
18101
import argparse import hashlib import os import pwd import random import re import string import subprocess import sys import tarfile import tempfile import uuid import Crypto.Cipher.AES as AES import Crypto.Random as Random import Crypto.PublicKey.RSA as RSA import dcm.agent.config as config opts_msg = """DCM Agen...
apache-2.0
8,373,570,479,691,780,000
33.878613
168
0.57041
false
sk7/django-guardian
guardian/migrations/0003_update_objectpermission_object_pk.py
85
5664
# encoding: utf-8 from south.v2 import DataMigration from guardian.compat import user_model_label class Migration(DataMigration): def forwards(self, orm): """ Updates ``object_pk`` fields on both ``UserObjectPermission`` and ``GroupObjectPermission`` from ``object_id`` values. ""...
bsd-2-clause
3,609,451,541,221,750,300
64.860465
182
0.560734
false
roadmapper/ansible
lib/ansible/modules/cloud/azure/azure_rm_resource_info.py
28
17641
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.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
8,602,905,250,575,678,000
39.930394
157
0.453319
false
eaudeweb/lcc-toolkit
lcc/management/commands/import_questions.py
1
3129
from openpyxl import Workbook, load_workbook from django.core.management import call_command from django.core.management.base import BaseCommand from lcc.models import ( TaxonomyClassification, Question, Gap, ) class Command(BaseCommand): help = """ Import Questions and Gaps from an excel f...
gpl-3.0
4,310,738,170,072,382,500
32.287234
78
0.553212
false
chenghao/haoAdmin
models/__init__.py
1
4319
# coding:utf-8 __author__ = "gaunt" import conf from playhouse.pool import PooledMySQLDatabase from peewee import Model, AutoField, BigAutoField, CharField, IntegerField, DateTimeField, SQL database = PooledMySQLDatabase(conf.mysql_db, **conf.mysql_conn_param) class UnknownField(object): def __init__(self, *_,...
apache-2.0
3,332,453,988,538,100,000
30.532847
94
0.671683
false
Ms2ger/servo
tests/heartbeats/characterize.py
27
10487
#!/usr/bin/env python # 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/. import sys import os from os import path import time import datetime import argparse import platf...
mpl-2.0
-4,448,387,784,574,559,000
39.334615
116
0.652141
false
canvasnetworks/canvas
website/canvas/migrations/0107_auto__del_field_userwarning_bantime__add_field_userwarning_disable_use.py
2
16736
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'UserWarning.bantime' db.delete_column('canvas_userwarning', 'bantime') # Adding...
bsd-3-clause
-7,790,802,355,295,737,000
76.124424
195
0.549713
false
szabolcsbalogh/bha
shield/shield_mqtt.py
1
1622
import tornado.log import mosquitto import urlparse __author__ = 'Szabolcs Balogh' __email__ = 'baloghsz@szabi.org' class ShieldMQTT: def __init__(self, url, tc): tornado.log.app_log.info("MQTT: init") self.tc = tc self.url = urlparse.urlparse(url) self.mqttc = None self.t...
gpl-2.0
1,361,567,007,354,177,800
31.44
101
0.583231
false
taknevski/tensorflow-xsmm
tensorflow/contrib/distributions/python/ops/beta.py
11
13333
# 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
5,202,218,043,402,098,000
35.3297
92
0.644791
false
alphagov/icinga_slack_webhook
tests/test_webhook.py
1
4454
import unittest from icinga_slack.webhook import AttachmentField, AttachmentFieldList, Attachment, AttachmentList, Message class TestCommon(unittest.TestCase): def setUp(self): self.example_attachment_field = {"title": "My Title", "value": "My Value"} self.example_attachment_field2 = {"title": "M...
mit
3,610,594,828,868,478,000
45.884211
186
0.695779
false
TimZaman/DIGITS
digits/pretrained_model/test_views.py
2
3703
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. import itertools import json import os import re import shutil import tempfile import time import unittest import urllib import io import tarfile # Find the best implementation available try: from cStringIO import StringIO except ImportError: from...
bsd-3-clause
8,656,965,230,519,094,000
29.858333
114
0.623819
false
BhupeshGupta/frappe
frappe/utils/boilerplate.py
3
6305
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os from frappe.utils import touch_file def make_boilerplate(dest, app_name): if not os.path.exists(dest): print "Destination directory does not exist" ret...
mit
3,771,579,613,394,773,000
25.603376
102
0.647898
false
dwfreed/mitmproxy
test/mitmproxy/addons/test_serverplayback.py
1
9861
import os import urllib from mitmproxy.test import tutils from mitmproxy.test import tflow from mitmproxy.test import taddons import mitmproxy.test.tutils from mitmproxy.addons import serverplayback from mitmproxy import options from mitmproxy import exceptions from mitmproxy import io def tdump(path, flows): w...
mit
-5,098,919,676,358,967,000
25.86921
79
0.588683
false
strands-project/robomongo
src/third-party/mongodb/buildscripts/errorcodes.py
12
5140
#!/usr/bin/env python import os import sys import re import utils assertNames = [ "uassert" , "massert", "fassert", "fassertFailed" ] def assignErrorCodes(): cur = 10000 for root in assertNames: for x in utils.getAllSourceFiles(): print( x ) didAnything = False fi...
gpl-3.0
-4,708,335,960,456,195,000
27.715084
105
0.414008
false
KarolBedkowski/photocat
photocat/stats/basic.py
1
2504
# -*- coding: utf-8 -*- """ Photo Catalog v 1.0 (photocat) Copyright (c) Karol Będkowski, 2004-2010 This file is part of Photo Catalog """ __author__ = 'Karol Będkowski' __copyright__ = 'Copyright (c) Karol Będkowski, 2006-2010' __version__ = "2010-06-11" import os.path from photocat.model import Directory, Coll...
gpl-2.0
-8,680,978,148,205,904,000
28.423529
72
0.654538
false
Distrotech/scons
test/Java/nested-classes.py
4
2835
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, modify, merge, publish, ...
mit
-1,148,696,750,213,192,600
25.009174
73
0.638801
false
CZ-NIC/dionaea
modules/python/util/readlogsqltree.py
3
18542
#!/opt/dionaea/bin/python3.2 from __future__ import print_function from optparse import OptionParser import sqlite3 import json def resolve_result(resultcursor): names = [resultcursor.description[x][0] for x in range(len(resultcursor.description))] resolvedresult = [ dict(zip(names, i)) for i in ...
gpl-2.0
-7,101,606,185,989,129,000
34.453155
177
0.59465
false
hasecbinusr/pysal
pysal/region/components.py
15
4728
""" Checking for connected components in a graph. """ __author__ = "Sergio J. Rey <srey@asu.edu>" __all__ = ["check_contiguity"] from operator import lt def is_component(w, ids): """Check if the set of ids form a single connected component Parameters ---------- w : spatial weights boject i...
bsd-3-clause
-1,147,492,675,959,094,000
28.55
77
0.53786
false
mshirley/dionaea
modules/python/scripts/smb/include/helpers.py
9
6042
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2010 Markus Koetter #* Copyright (C) 2009 Paul Baecher & Markus Koetter & Mark Schloesser #* #* This program is free softw...
gpl-2.0
4,504,917,729,712,036,400
33.135593
226
0.476663
false
huggingface/transformers
src/transformers/models/mpnet/__init__.py
2
3662
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
8,507,149,536,017,073,000
30.568966
115
0.659476
false
GREO/GNU-Radio
gnuradio-examples/python/digital/usrp_options.py
4
5638
# # Copyright 2009 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) # any later version. # #...
gpl-3.0
-2,674,493,377,188,589,600
44.837398
107
0.641717
false
molokov/mezzanine
mezzanine/blog/management/commands/import_posterous.py
10
4468
from __future__ import unicode_literals from datetime import datetime import json import time from django.core.management.base import CommandError from mezzanine.blog.management.base import BaseImporterCommand class Command(BaseImporterCommand): """ Import Tumblr blog posts into the blog app. """ ...
bsd-2-clause
6,661,056,581,738,152,000
33.369231
78
0.455237
false
DoraemonShare/yuqing
src/utils/config_orm.py
1
2679
#-*-coding:utf-8 -*- ''' postgresql configuration table ORM ''' import psycopg2 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy import Column, Integer, String, Table, text, Date, Boolean from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() met...
bsd-3-clause
-4,767,302,841,798,857,000
32.230769
74
0.67346
false
indhub/mxnet
tests/python/unittest/test_sparse_ndarray.py
2
37684
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-9,119,553,058,558,258,000
37.729702
112
0.590277
false
alexjj/photofloat
scanner/PhotoAlbum.py
1
19553
from CachePath import * from datetime import datetime import json import os import os.path from PIL import Image from PIL.ExifTags import TAGS from multiprocessing import Pool import gc import tempfile from VideoToolWrapper import * def make_photo_thumbs(self, original_path, thumb_path, size): # The pool methods use ...
gpl-2.0
-2,343,875,836,871,158,000
37.872763
982
0.662098
false
rgommers/statsmodels
statsmodels/graphics/factorplots.py
28
7596
# -*- coding: utf-8 -*- """ Authors: Josef Perktold, Skipper Seabold, Denis A. Engemann """ from statsmodels.compat.python import get_function_name, iterkeys, lrange, zip, iteritems import numpy as np from statsmodels.graphics.plottools import rainbow import statsmodels.graphics.utils as utils def interaction_plo...
bsd-3-clause
512,731,838,078,959,400
34.830189
89
0.598078
false
cemoody/chainer
chainer/function_set.py
5
4081
import numpy import warnings from chainer import cuda from chainer import link class FunctionSet(link.Chain): """Set of links (as "parameterized functions"). FunctionSet is a subclass of :class:`~chainer.Chain`. Function registration is done just by adding an attribute to :class:` object. .. d...
mit
-3,009,841,584,834,285,000
30.882813
79
0.570693
false
LambdaCast/LambdaCast
portal/migrations/0004_auto__add_field_video_user.py
1
9437
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Video.user' db.add_column('portal_video', 'user', self.gf('django.db.m...
bsd-2-clause
-7,255,439,666,737,504,000
75.112903
203
0.546678
false
chaincoin/chaincoin
qa/rpc-tests/p2p-acceptblock.py
2
11947
#!/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 BitcoinTestFramework from...
mit
-325,994,662,659,658,430
41.820789
107
0.63924
false
baylee/django
tests/gis_tests/rasterapp/test_rasterfield.py
8
13831
import json from django.contrib.gis.db.models.lookups import ( DistanceLookupBase, gis_lookups, ) from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.measure import D from django.contrib.gis.shortcuts import numpy from django.core.exceptions import ...
bsd-3-clause
7,405,782,654,818,391,000
39.560117
119
0.59251
false