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
William-Hai/volatility
volatility/plugins/gui/desktops.py
46
3253
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
gpl-2.0
131,699,882,683,366,670
42.959459
95
0.542883
false
wrouesnel/ansible
lib/ansible/modules/messaging/rabbitmq_queue.py
39
10166
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1'...
gpl-3.0
-4,289,656,996,814,433,300
34.670175
136
0.579677
false
GianlucaBortoli/krafters
generate_plots.py
1
3214
#!/usr/bin/python3.4 import argparse import matplotlib.pyplot as plt import csv import sys import seaborn as sns PLOT_TYPES = ["distribution", "mass", "raw"] # Format of the chart: # x axis -> append number # y axis -> time for that particular append def generateRawPlot(test): # set figure size plt.figure(...
mit
-78,809,482,188,662,750
28.759259
106
0.59023
false
Edraak/edraak-platform
openedx/core/djangoapps/user_api/urls.py
1
4318
""" Defines the URL routes for this app. """ from django.conf import settings from django.conf.urls import url from ..profile_images.views import ProfileImageView from .accounts.views import ( AccountDeactivationView, AccountRetireMailingsView, AccountRetirementPartnerReportView, AccountRetirementStat...
agpl-3.0
5,759,894,243,375,320,000
25.490798
99
0.635943
false
AlexChesters/emacs
elpa/elpy-20210328.1852/elpy/yapfutil.py
13
1124
"""Glue for the "yapf" library. """ import os import sys from elpy.rpc import Fault YAPF_NOT_SUPPORTED = sys.version_info < (2, 7) or ( sys.version_info >= (3, 0) and sys.version_info < (3, 4)) try: if YAPF_NOT_SUPPORTED: yapf_api = None else: from yapf.yapflib import yapf_api f...
mit
-6,042,055,297,789,718,000
28.578947
81
0.549822
false
takeshineshiro/glance
glance/tests/unit/test_artifact_type_definition_framework.py
6
43838
# Copyright (c) 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 required by applicable law or agreed to in writin...
apache-2.0
-6,811,856,052,854,749,000
38.246195
79
0.506615
false
trashbyte/hungryboys
foodgame/world.py
1
2901
WORLD_SIZE = 1000 ## The game world, which contains all entities. class World(): ## World constructor # @param game The owning Game. def __init__(self, game): ## The owning Game. self.game = game ## The grid which all entities reside in # # All entities in the Worl...
mit
-4,285,768,779,260,532,000
33.547619
98
0.624267
false
akhmadMizkat/odoo
addons/account/report/account_journal.py
28
5504
# -*- coding: utf-8 -*- import time from openerp import api, models class ReportJournal(models.AbstractModel): _name = 'report.account_extra_reports.report_journal' def lines(self, target_move, journal_ids, sort_selection, data): if isinstance(journal_ids, int): journal_ids = [journal_id...
gpl-3.0
-5,280,962,398,201,894,000
46.86087
304
0.558866
false
CMPUT404W17T06/CMPUT404-project
dash/tests.py
1
10713
from django.test import TestCase, Client from django.test.utils import setup_test_environment from django.contrib.auth.models import User from django.urls import reverse from django.db.utils import IntegrityError from dash.models import Author, Post, Comment, Category, Follow from dash.forms import PostForm, CommentFor...
apache-2.0
9,038,525,315,727,686,000
35.315254
98
0.613367
false
bcbrock/fabric
bddtests/steps/peer_logging_impl.py
10
1936
# # Copyright IBM Corp. 2016 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 ...
apache-2.0
3,797,552,833,043,621,400
30.754098
112
0.729855
false
JPWKU/unix-agent
src/dcm/agent/plugins/builtin/remote_tester.py
3
3500
# # Copyright (C) 2014 Dell, 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 wri...
apache-2.0
-8,762,304,372,241,735,000
33.653465
76
0.532286
false
kproductivity/bitsandbobs
twee.py
1
1102
#See http://www.dealingdata.net/2016/07/23/PoGo-Series-Tweepy/ import sys import os import jsonpickle import tweepy #Authentication auth = tweepy.AppAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_secret) #Creating a twitter API wrapper using tweepy #See http://docs.tweepy.org/e...
apache-2.0
-7,262,713,017,241,693,000
26.55
84
0.705989
false
pixelrebel/st2
st2common/st2common/persistence/auth.py
5
3542
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
4,213,699,476,726,928,400
30.90991
88
0.649633
false
AgalmicVentures/Environment
scripts/GenerateConfigs.py
1
4000
#!/usr/bin/env python3 # Copyright (c) 2015-2021 Agalmic Ventures LLC (www.agalmicventures.com) # # 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 limit...
mit
-3,895,368,665,529,425,400
35.697248
142
0.74675
false
ashhher3/pylearn2
pylearn2/sandbox/lisa_rl/bandit/classifier_bandit.py
49
1598
__author__ = "Ian Goodfellow" from pylearn2.sandbox.lisa_rl.bandit.environment import Environment class ClassifierBandit(Environment): """ An n-armed contextual bandit based on a classification problem. Each of the n-arms corresponds to a different class. If the agent selects the correct class for th...
bsd-3-clause
-7,923,004,686,917,408,000
28.054545
86
0.624531
false
ssadedin/seqr
seqr/views/apis/awesomebar_api_tests.py
1
2983
import mock from django.urls.base import reverse from seqr.views.apis.awesomebar_api import awesomebar_autocomplete_handler from seqr.views.utils.test_utils import AuthenticationTestCase, AnvilAuthenticationTestCase, MixAuthenticationTestCase @mock.patch('seqr.views.utils.permissions_utils.safe_redis_get_json', lambd...
agpl-3.0
-1,466,950,515,309,171,500
41.014085
120
0.682199
false
moreati/pylons
pylons/controllers/core.py
4
11067
"""The core WSGIController""" import inspect import logging import types from webob.exc import HTTPException, HTTPNotFound import pylons __all__ = ['WSGIController'] log = logging.getLogger(__name__) class WSGIController(object): """WSGI Controller that follows WSGI spec for calling and return values ...
bsd-3-clause
7,373,699,131,511,862,000
39.097826
81
0.567905
false
code4futuredotorg/reeborg_tw
src/libraries/brython/Lib/encodings/hp_roman8.py
134
13447
""" Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py. Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen) Original source: LaserJet IIP Printer User's Manual HP part no 33471-90901, Hewlet-Packard, June 1989. """#" import codecs ### Codec APIs class ...
agpl-3.0
6,228,216,666,235,393,000
42.099359
85
0.522793
false
Eficent/odoomrp-utils
purchase_order_line_form_button/models/purchase_order.py
12
1144
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, api, _ class PurchaseOrder...
agpl-3.0
-7,555,220,524,338,094,000
30.777778
78
0.458916
false
googleads/google-ads-python
google/ads/googleads/v7/services/services/mobile_app_category_constant_service/transports/__init__.py
2
1135
# -*- 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
203,207,124,086,428,600
33.393939
75
0.779736
false
jonathan-beard/edx-platform
common/djangoapps/embargo/migrations/0002_add_country_access_models.py
102
9237
# -*- 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 model 'Country' db.create_table('embargo_country', ( ('id', self.gf('django.db.models.f...
agpl-3.0
5,502,446,739,976,805,000
64.51773
182
0.579517
false
prachidamle/cattle
tests/integration/cattletest/core/test_local_auth.py
1
7082
from common_fixtures import * # NOQA from requests.auth import AuthBase import requests from cattle import from_env class LocalAuth(AuthBase): def __init__(self, jwt, prj_id=None): # setup any auth-related data here self.jwt = jwt self.prj_id = prj_id def __call__(self, r): #...
apache-2.0
-565,932,879,326,421,900
29.264957
77
0.617763
false
Mrs-X/PIVX
test/functional/test_framework/key.py
24
8481
# Copyright (c) 2011 Sam Rushing """ECC secp256k1 OpenSSL wrapper. WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! This file is modified from python-bitcoinlib. """ import ctypes import ctypes.util import hashlib import sys ssl = ctypes.cdll.LoadLibrary...
mit
371,549,076,221,211,650
35.556034
130
0.632473
false
wjo1212/aliyun-log-python-sdk
aliyun/log/logger_hanlder.py
1
17793
import logging from .logclient import LogClient from .logitem import LogItem from .putlogsrequest import PutLogsRequest from threading import Thread import atexit from time import time from enum import Enum from .version import LOGGING_HANDLER_USER_AGENT import six if six.PY2: from Queue import Empty, Full, Queue...
mit
299,973,442,766,761,800
39.346939
286
0.618726
false
Emergya/icm-openedx-educamadrid-platform-basic
openedx/tests/xblock_integration/test_recommender.py
51
30569
""" This test file will run through some XBlock test scenarios regarding the recommender system """ from copy import deepcopy import json import itertools import StringIO import unittest from ddt import ddt, data from nose.plugins.attrib import attr from django.conf import settings from django.core.urlresolvers impo...
agpl-3.0
-7,721,515,237,809,018,000
37.021144
120
0.581962
false
Alwnikrotikz/raft
dialogs/SimpleDialog.py
11
1159
# # Simple Dialog # # Authors: # Nathan Hamiel # Gregory Fleischer # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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 F...
gpl-3.0
-7,054,324,095,386,241,000
30.194444
70
0.691113
false
ioram7/keystone-federado-pgid2013
build/paste/build/lib.linux-x86_64-2.7/paste/util/classinstance.py
62
1373
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php class classinstancemethod(object): """ Acts like a class method when called from a class, like an instance method when called by an instan...
apache-2.0
-6,702,694,312,632,166,000
35.131579
84
0.581937
false
frewsxcv/WeasyPrint
weasyprint/document.py
1
22947
# coding: utf8 """ weasyprint.document ------------------- :copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division, unicode_literals import io import sys import math import shutil import functools import ...
bsd-3-clause
5,159,283,989,429,436,000
40.384477
78
0.579448
false
alan-unravel/bokeh
examples/plotting/server/burtin.py
42
4826
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from collections import OrderedDict from math import log, sqrt import numpy as np import pandas as pd from six.moves import cStringIO as StringIO from bokeh.plotting import figure, show, output_server antibiotics = """ bacteria,...
bsd-3-clause
9,188,262,904,871,757,000
36.703125
85
0.600497
false
Lh4cKg/kivy
kivy/uix/anchorlayout.py
3
3069
''' Anchor Layout ============= .. only:: html .. image:: images/anchorlayout.gif :align: right .. only:: latex .. image:: images/anchorlayout.png :align: right :class:`AnchorLayout` aligns children to a border (top, bottom, left, right) or center. To draw a button in the lower-right corn...
lgpl-3.0
-6,015,119,392,313,515,000
26.9
78
0.529163
false
pllim/astropy
astropy/io/ascii/basic.py
8
11025
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. basic.py: Basic table read / write functionality for simple character delimited files with various options for column header definition. :Copyright: Smithsonian Astrophysical Observatory (2011) :Author:...
bsd-3-clause
8,926,246,674,725,382,000
26.911392
94
0.627755
false
eayunstack/nova
nova/cmd/baremetal_manage.py
13
7213
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
apache-2.0
-6,500,613,300,114,577,000
33.677885
79
0.653819
false
zofuthan/edx-platform
common/djangoapps/auth_exchange/tests/test_views.py
84
6094
# pylint: disable=no-member """ Tests for OAuth token exchange views """ from datetime import timedelta import json import mock import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase import httpretty import provider.constants from provider import ...
agpl-3.0
2,216,320,539,717,403,100
38.316129
105
0.675747
false
chenjun0210/tensorflow
tensorflow/contrib/factorization/python/kernel_tests/masked_matmul_benchmark.py
136
5711
# 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
-914,204,398,801,076,100
38.659722
80
0.645946
false
Johnzero/erp
openerp/addons/analytic_journal_billing_rate/analytic_journal_billing_rate.py
9
5216
# -*- 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 GNU...
agpl-3.0
-6,787,136,824,028,509,000
42.107438
170
0.604294
false
sqd/NNEZArtFestival2015Sys
backend/myFunction/functions.py
1
3682
from django.http import HttpResponse from django.utils.html import * from datetime import datetime import csv import re ERROR_CODE="error" ILLEGAL_CODE="illegal" FAILURE_CODE="failure" SUCCESS_CODE="success" class MyError(Exception): pass class GuestDataHandler: def __init__(self,columns,request): se...
mit
-784,209,869,304,586,600
26.073529
147
0.593699
false
demonchild2112/travis-test
grr/client/grr_response_client/comms_test.py
2
11973
#!/usr/bin/env python """Test for client comms.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import time from absl import app from future.builtins import range import mock import queue import requests from grr_response_client import comms from grr_...
apache-2.0
-1,605,315,424,443,166,200
30.507895
79
0.6741
false
bhansa/fireball
pyvenv/Lib/site-packages/pip/locations.py
340
5626
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import site import sys from distutils import sysconfig from distutils.command.install import install, SCHEME_KEYS # noqa from pip.compat import WINDOWS, expanduser from pip.utils import appd...
gpl-3.0
614,309,709,537,198,600
29.912088
78
0.645574
false
xkong/wechatbackends
wechat/tests.py
1
3907
#!/usr/bin/env python # coding: utf-8 # # xiaoyu <xiaokong1937@gmail.com> # # 2014/02/18 # """ Tests for wechat backends. Put this file to your/app/, serialize a `test_all.json` which include a model and its instances and run `python manage.py tests yourapp.WeChatTestCase` WeixinMp is a model for your weixin article,...
mit
-8,972,490,978,449,977,000
33.27193
78
0.570003
false
mindnervestech/mnrp
addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
337
3443
# -*- 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 GNU...
agpl-3.0
6,274,640,112,264,805,000
46.819444
131
0.590183
false
synicalsyntax/zulip
zproject/urls.py
1
36115
import os from django.conf import settings from django.conf.urls import include from django.conf.urls.i18n import i18n_patterns from django.contrib.auth.views import ( LoginView, PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, ) from django.urls import path, re_path from dja...
apache-2.0
-1,605,715,396,864,854,000
47.089214
103
0.667202
false
hmronline/home-assistant
homeassistant/components/media_player/squeezebox.py
9
10171
""" Support for interfacing to the Logitech SqueezeBox API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.squeezebox/ """ import logging import telnetlib import urllib.parse from homeassistant.components.media_player import ( DOMAIN, M...
mit
-962,190,450,543,703,700
32.347541
76
0.571822
false
Peddle/hue
desktop/core/ext-py/boto-2.38.0/boto/dynamodb/__init__.py
145
1697
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
apache-2.0
3,140,798,401,527,479,300
39.404762
78
0.740719
false
mfherbst/spack
var/spack/repos/builtin/packages/r-annotate/package.py
2
1790
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-3,197,286,532,736,865,000
43.75
78
0.662011
false
rchatterjee/nocrack
Grammar/word.py
1
509704
W = [753, 607, 59, 501, 1283, 61, 898, 325, 508, 142, 298, 542, 42, 38, 252, 46, 92, 81, 85, 590, 239, 40, 44, 5200, 1403, 170, 34, 77, 52, 304, 120, 37, 42, 902, 125, 13, 98, 135, 30, 18, 12, 91, 460, 335, 12, 19, 12, 206, 17, 12, 13, 20, 12, 14, 11, 31, 10, 15, 10, 12, 545, 66, 11, 12, 10, 11, 12, 32, 10, 446, 30, 27...
mit
6,732,092,481,567,165,000
3.17103
9
0.520494
false
wolfskaempf/ga_statistics
lib/python2.7/site-packages/django/contrib/auth/__init__.py
387
7508
import inspect import re from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.middleware.csrf import rotate_token from django.utils.crypto import constant_time_compare from django.utils.module_loading import i...
mit
-4,775,407,098,789,114,000
34.752381
105
0.670352
false
williamjturkel/Digital-History-Hacks--2005-08-
offence-category.py
1
1823
# offence-category.py # old bailey # # given a directory of trial files each marked with XML # extract a list mapping trial id to offence import os, sys, re from BeautifulSoup import BeautifulStoneSoup # given a directory string, return a list of file names def getFileNames(dirstr): import os dircommand = 'di...
mit
-3,193,101,145,955,107,000
26.621212
60
0.661547
false
epiphany27/NewsBlur
apps/rss_feeds/migrations/0003_remove_page_data.py
18
5747
from south.db import db from django.db import models from apps.rss_feeds.models import * class Migration: def forwards(self, orm): # Deleting field 'Feed.page_data' db.delete_column('feeds', 'page_data') def backwards(self, orm): # Adding field...
mit
-1,189,832,536,619,016,200
64.306818
156
0.536628
false
wanghongjuan/meta-iotqa-1
lib/oeqa/runtime/pnp/disksize.py
3
2271
#[PROTEXCAT] #\License: ALL RIGHTS RESERVED """ @file disksize.py """ ## # @addtogroup pnp pnp # @brief This is pnp component # @{ # @addtogroup disksize disksize # @brief This is disksize module # @{ ## import os import time import re from oeqa.oetest import oeRuntimeTest from oeqa.utils.helper import collect_pnp_l...
mit
6,221,927,693,187,056,000
24.233333
63
0.518274
false
linkaform/linkaform_api
linkaform_api/upload_file.py
1
12588
# -*- coding: utf-8 -*- #!/usr/bin/python ##### # Made by Jose Patricio VM ##### # Script para generar pacos a partir de ordenes de Servicio de PCI Industrial # # ##### import wget import pyexcel import datetime, time, re from sys import argv import simplejson from linkaform_api import network, utils, settings #Nomb...
gpl-3.0
2,908,665,413,075,691,500
41.241611
228
0.558468
false
BeZazz/lamebench
nb_third_party/dns/ttl.py
248
2180
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
2,759,853,485,304,767,000
33.0625
72
0.580734
false
sankhaMukherjee/myCutter
{{cookiecutter.project}}/src/lib/argParsers/config.py
1
5078
from logs import logDecorator as lD import jsonref config = jsonref.load(open('../config/config.json')) logBase = config['logging']['logBase'] + '.lib.argParsers.config' @lD.log(logBase + '.parsersAdd') def addParsers(logger, parser): '''add argument parsers specific to the ``config/config.json`` file Th...
mit
6,636,441,844,411,217,000
35.014184
95
0.617566
false
zhuwenping/python-for-android
python-modules/twisted/twisted/internet/posixbase.py
56
16433
# -*- test-case-name: twisted.test.test_internet,twisted.internet.test.test_posixbase -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Posix reactor base class """ import warnings import socket import errno import os from zope.interface import implements, classImplements fro...
apache-2.0
-3,961,455,153,883,262,500
31.66998
103
0.624232
false
katsko/pybbm
pybb/south_migrations/0025_auto__add_unique_topicreadtracker_topic_user__add_unique_forumreadtrac.py
11
11396
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from pybb.compat import get_image_field_full_name, get_user_model_path, get_user_frozen_models AUTH_USER = get_user_model_path() class Migration(SchemaMigration): def forwards(self, orm):...
bsd-2-clause
-58,205,509,507,481,700
73
215
0.549667
false
runekaagaard/django-contrib-locking
tests/distinct_on_fields/models.py
166
1284
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Tag(models.Model): name = models.CharField(max_length=10) parent = models.ForeignKey('self', blank=True, null=True, related_name='c...
bsd-3-clause
3,626,961,773,078,702,000
24.176471
67
0.678349
false
BaladiDogGames/baladidoggames.github.io
mingw/bin/lib/imputil.py
228
25764
""" Import utilities Exported classes: ImportManager Manage the import process Importer Base class for replacing standard import functions BuiltinImporter Emulate the import mechanism for builtin and frozen modules DynLoadSuffixImporter """ from warnings import warnpy3k warnpy3k("the imputil...
mit
-8,343,908,252,544,494,000
34.536552
88
0.591329
false
jianghuaw/nova
nova/tests/unit/notifications/objects/test_service.py
8
3429
# Copyright (c) 2016 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
4,846,163,168,737,863,000
43.532468
79
0.668708
false
ideadevice/alembic
alembic/compat.py
1
1557
import sys if sys.version_info < (2, 6): raise NotImplementedError("Python 2.6 or greater is required.") py3k = sys.version_info >= (3, 0) py33 = sys.version_info >= (3, 3) if py3k: import builtins as compat_builtins string_types = str, binary_type = bytes text_type = str def callable(fn): ...
mit
-5,626,872,187,468,452,000
26.315789
72
0.614644
false
codrut3/tensorflow
tensorflow/examples/speech_commands/generate_streaming_test_wav_test.py
101
1416
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,398,518,931,385,190,000
35.307692
80
0.696328
false
akkana/scripts
calendarparse.py
1
4723
#!/usr/bin/env python # -*- coding: utf-8 -*- # Parse a text list of events in tabular format. # Tries to be smart about the parsing, assuming the input data # is coming from somebody who's pasting it from a word processor # into some sort of dumb webmail page. # # Output either .ics iCalendar format or HTML list of e...
gpl-2.0
-477,122,916,672,553,600
30.264901
185
0.59839
false
golismero/golismero
thirdparty_libs/requests/packages/charade/langthaimodel.py
206
11475
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Ri...
gpl-2.0
6,979,074,238,372,104,000
55.375
73
0.531503
false
emergence/transmogrifydict
transmogrifydict.py
1
13140
import json import six import re # (?<!\\) - don't match leading slashes # (?:\\\\)* - allow any even number of slashes # (\.) - capture the actual separator PERIOD_SPLIT = re.compile(r'(?<!\\)(?:\\\\)*(\.)') OPEN_SQUARE_BRACKET_SPLIT = re.compile(r'(?<!\\)(?:\\\\)*(\[)') EQUAL_SPLIT = re.compile(r'(?<!\\)(?:\\\\)*(=)...
bsd-3-clause
-2,740,155,609,710,033,000
36.329545
116
0.537367
false
cctaylor/googleads-python-lib
examples/dfp/v201408/creative_service/create_creative_from_template.py
4
3612
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-9,216,876,890,801,132,000
33.730769
80
0.642027
false
rob356/SickRage
lib/cachecontrol/adapter.py
59
4184
import functools from requests.adapters import HTTPAdapter from .controller import CacheController from .cache import DictCache from .filewrapper import CallbackFileWrapper class CacheControlAdapter(HTTPAdapter): invalidating_methods = set(['PUT', 'DELETE']) def __init__(self, cache=None, ...
gpl-3.0
-8,460,540,259,502,423,000
34.760684
75
0.561424
false
ASCrookes/django
tests/messages_tests/test_session.py
368
1870
from django.contrib.messages import constants from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.session import SessionStorage from django.test import TestCase from django.utils.safestring import SafeData, mark_safe from .base import BaseTests def set_session_data(storage, ...
bsd-3-clause
-7,132,812,318,306,161,000
33.62963
93
0.694652
false
sonaht/ansible
lib/ansible/modules/cloud/ovirt/ovirt_users.py
45
4894
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
-6,518,089,579,660,476,000
27.619883
143
0.631385
false
gwh59/cloud-custodian
tests/test_policy.py
1
7158
# Copyright 2016 Capital One Services, 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 agreed to in...
apache-2.0
-639,649,215,533,722,500
33.57971
79
0.458927
false
gquirozbogner/contentbox-master
third_party/unidecode/x071.py
4
4928
data = ( 'Hu ', # 0x00 'Xi ', # 0x01 'Shu ', # 0x02 'He ', # 0x03 'Xun ', # 0x04 'Ku ', # 0x05 'Jue ', # 0x06 'Xiao ', # 0x07 'Xi ', # 0x08 'Yan ', # 0x09 'Han ', # 0x0a 'Zhuang ', # 0x0b 'Jun ', # 0x0c 'Di ', # 0x0d 'Xie ', # 0x0e 'Ji ', # 0x0f 'Wu ', ...
apache-2.0
5,764,484,315,507,199,000
17.100775
21
0.366883
false
Nidylei/azure-linux-automation
remote-scripts/E2E-SIEGE-TEST.py
8
2963
#!/usr/bin/python import re import time import imp import sys import argparse import os import linecache from azuremodules import * parser = argparse.ArgumentParser() parser.add_argument('-u', '--user', help='specifies user to login', required=True, type= str ) parser.add_argument('-p', '--password', help='specifies...
apache-2.0
8,691,096,793,989,844,000
39.60274
122
0.657442
false
meyerson/luigi
luigi/s3.py
2
18771
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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
-281,904,329,869,401,340
29.671569
134
0.580949
false
hbradlow/autograde
autograde/forms.py
1
1440
from django import forms from django.utils.translation import ugettext_lazy as _, ugettext from django.forms.widgets import SplitDateTimeWidget,DateTimeInput from autograde.models import * from autograde.utils import * class ProjectMetaForm(forms.ModelForm): def __init__(self,*args,**kwargs): super(Projec...
gpl-3.0
-6,162,933,941,807,725,000
35
68
0.658333
false
nachandr/cfme_tests
cfme/tests/automate/test_smoke.py
2
1220
"""This test contains necessary smoke tests for the Automate.""" import pytest from cfme import test_requirements pytestmark = [ test_requirements.automate, pytest.mark.smoke, pytest.mark.tier(2), pytest.mark.ignore_stream(("upstream", {"domain_name": "RedHat"})) ] @pytest.mark.rhel_testing @pytest....
gpl-2.0
1,280,056,882,296,540,700
32.888889
81
0.672951
false
CloverHealth/airflow
airflow/example_dags/example_docker_operator.py
20
1937
# -*- coding: 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 Apache License, Version 2.0 (the #...
apache-2.0
-761,546,504,224,554,500
27.485294
88
0.702117
false
EliotBerriot/django-modelstats
tests/test_datasets.py
1
6592
import datetime from .base import TestBase from modelstats import models from modelstats import datasets class TestDateDataSet(TestBase): def test_datedataset(self): self.create_users() queryset = self.user_model.objects.all() dataset = datasets.DateDataSet(field='date_joined', fill_mi...
bsd-3-clause
881,993,767,280,481,500
42.946667
132
0.609678
false
disabler/isida3
lib/chardet/euckrfreq.py
3
45956
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
-2,873,520,752,552,396,300
76.367003
92
0.762599
false
archf/ansible
test/units/modules/network/iosxr/test_iosxr_system.py
62
3738
# (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 dis...
gpl-3.0
-4,990,515,285,141,300,000
38.347368
95
0.675762
false
cdrooom/odoo
addons/base_setup/res_config.py
3
6242
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-2,890,300,533,844,983,000
55.234234
283
0.628805
false
shadowsocksR-private/shadowsocksR
shadowsocks/encrypt_test.py
20
1045
from __future__ import absolute_import, division, print_function, \ with_statement import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../')) from shadowsocks.crypto import rc4_md5 from shadowsocks.crypto import openssl from shadowsocks.crypto import sodium from shadowsocks.crypto i...
apache-2.0
547,605,025,818,783,940
19.490196
67
0.673684
false
raymondxyang/tensorflow
tensorflow/python/framework/op_def_library.py
60
31657
# 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
-8,390,831,084,283,518,000
39.072152
97
0.575765
false
b29308188/MMAI_final
src/utils.py
1
3563
import sys sys.path.append(".") import csv import numpy as np from datasets import Photo import cv2 def f1_score(precision, recall): return 2*precision*recall/(precision+recall) def detect_faces(detector, image): """ Input: a face detector and an image, you may prorivde a detector as this: *** detecto...
gpl-2.0
-3,137,303,542,386,536,000
29.452991
125
0.571429
false
howaboutudance/qweechat
src/qweechat/chat.py
1
4891
#!/usr/bin/python # -*- coding: utf-8 -*- # # chat.py - chat area # # Copyright (C) 2011-2013 Sebastien Helleu <flashcode@flashtux.org> # # This file is part of QWeeChat, a Qt remote GUI for WeeChat. # # QWeeChat is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
gpl-3.0
5,797,853,183,110,693,000
39.090164
89
0.523615
false
asimurzin/hybridFlu
hybridFlu/examples/test_icoFoam_piso_2.py
1
7583
#!/usr/bin/env python #--------------------------------------------------------------------------- ## Copyright (C) 2010- Alexey Petrov ## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU...
gpl-3.0
5,148,757,998,317,926,000
32.852679
122
0.526177
false
wangyum/mxnet
python/mxnet/gluon/rnn/rnn_layer.py
8
23101
# 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
-6,440,017,534,305,236,000
43.510597
97
0.567724
false
gangadharkadam/letzfrappe
frappe/desk/report_dump.py
39
2844
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import json import copy @frappe.whitelist() def get_data(doctypes, last_modified): data_map = {} for dump_report_map in frappe.get_hooks().dump_report_map: ...
mit
4,267,267,742,438,956,500
29.580645
95
0.605134
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/numpy/doc/constants.py
55
8954
""" ========= Constants ========= NumPy includes several constants: %(constant_list)s """ # # Note: the docstring is autogenerated. # from __future__ import division, absolute_import, print_function import textwrap, re # Maintain same format as in numpy.add_newdocs constants = [] def add_newdoc(module, name, doc): ...
apache-2.0
7,501,954,891,330,612,000
21.783715
75
0.583985
false
TouK/vumi
vumi/application/tests/helpers.py
4
3399
# -*- test-case-name: vumi.application.tests.test_test_helpers -*- import os from twisted.internet.defer import inlineCallbacks from twisted.trial.unittest import SkipTest from zope.interface import implements from vumi.tests.helpers import ( MessageHelper, WorkerHelper, MessageDispatchHelper, PersistenceHelper,...
bsd-3-clause
698,113,276,461,774,300
33.683673
79
0.672551
false
rosmo/ansible
test/units/modules/cloud/xenserver/FakeXenAPI.py
94
1996
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) FAKE_API_VERSION = "1.1" class Failure(Exception): def __init__(self, details): self.details = details def __str__(self):...
gpl-3.0
3,565,385,804,311,723,500
29.242424
92
0.59018
false
laxdog/poloniexlendingbot
modules/MaxToLend.py
2
2884
# coding=utf-8 from decimal import Decimal coin_cfg = [] max_to_lend_rate = 0 max_to_lend = 0 max_percent_to_lend = 0 min_loan_size = 0.001 log = None def init(config, log1): global coin_cfg, max_to_lend_rate, max_to_lend, max_percent_to_lend, min_loan_size, log coin_cfg = coin_cfg = config.get_coin_cfg() ...
mit
-8,859,368,869,991,332,000
48.724138
109
0.633148
false
sujithshankar/anaconda
pyanaconda/ui/tui/spokes/__init__.py
1
12990
# The base classes for Anaconda TUI Spokes # # Copyright (C) (2012) Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This progr...
gpl-2.0
-1,778,128,528,747,150,600
35.183844
107
0.593072
false
savoirfairelinux/django
django/db/backends/sqlite3/base.py
5
18697
""" SQLite3 backend for the sqlite3 module in the standard library. """ import decimal import math import re import warnings from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from...
bsd-3-clause
-7,210,708,297,633,846,000
37.550515
105
0.609563
false
Antiun/c2c-rd-addons
chricar_partner_id_number/__init__.py
4
1395
# -*- coding: utf-8 -*- # Python source code encoding : https://www.python.org/dev/peps/pep-0263/ ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL # http://tiny.be # Copyrig...
agpl-3.0
5,960,252,117,734,260,000
47.103448
78
0.587814
false
ng110/PyZDDE
Examples/Scripts/arrayTraceSimple.py
2
3848
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: arrayTraceSimple.py # Purpose: A simple script to demonstrate array ray tracing. We need to use # the two functions from the module pyzdde.arraytrace -- # The first funct...
mit
-7,604,082,044,901,382,000
42.247191
108
0.49896
false
EmanueleCannizzaro/scons
test/MSVS/vs-8.0-clean.py
1
3762
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
mit
1,016,862,066,014,682,200
31.153846
99
0.678097
false
s142857/servo
tests/wpt/web-platform-tests/tools/manifest/manifest.py
144
12349
import json import os from collections import defaultdict from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest from log import get_logger from sourcefile import SourceFile CURRENT_VERSION = 2 class ManifestError(Exception): pass class ManifestVersionMismatch(ManifestErro...
mpl-2.0
1,900,778,588,888,120,800
32.018717
96
0.522471
false
piotr1212/carbon
lib/carbon/client.py
2
24444
from collections import deque, defaultdict from time import time from six import with_metaclass from twisted.application.service import Service from twisted.internet import reactor from twisted.internet.defer import Deferred, DeferredList from twisted.internet.protocol import ReconnectingClientFactory from twisted.pro...
apache-2.0
-2,786,092,867,598,309,400
34.894273
94
0.70954
false
mrquim/repository.mrquim
repo/script.module.schism.common/lib/jsbeautifier/unpackers/__init__.py
173
2316
# # General code for JSBeautifier unpackers infrastructure. See README.specs # written by Stefano Sanfilippo <a.little.coder@gmail.com> # """General code for JSBeautifier unpackers infrastructure.""" import pkgutil import re from jsbeautifier.unpackers import evalbased # NOTE: AT THE MOMENT, IT IS DEACTIVATED FO...
gpl-2.0
-943,030,764,998,237,600
33.567164
79
0.644214
false
graetzer/arangodb
3rdParty/boost/1.62.0/libs/mpl/preprocessed/pp.py
45
9005
# Copyright Aleksey Gurtovoy 2001-2004 # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # # See http://www.boost.org/libs/mpl for documentation. # $Id$ # $Date$ # $Revision$ import fileinput import os import r...
apache-2.0
-1,675,882,103,613,739,800
34.175781
136
0.497057
false
JohnnyKing94/pootle
pootle/apps/pootle_store/migrations/0027_unit_created_by_squashed_0055_fill_unit_source_data.py
5
16954
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-09 15:35 from __future__ import unicode_literals import logging import os import django.db.models.deletion from django.conf import settings from django.db import migrations, models import pootle.core.user from pootle.core.batch import Batch from pootle....
gpl-3.0
347,144,399,874,287,500
38.24537
210
0.613896
false
sander76/home-assistant
homeassistant/components/xbox/media_player.py
3
7802
"""Xbox Media Player Support.""" from __future__ import annotations import re from typing import List from xbox.webapi.api.client import XboxLiveClient from xbox.webapi.api.provider.catalog.models import Image from xbox.webapi.api.provider.smartglass.models import ( PlaybackState, PowerState, SmartglassCo...
apache-2.0
4,478,536,994,789,345,300
30.715447
87
0.628813
false
xuegang/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/aoco_compression/test_runsqls.py
9
29719
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
-1,962,714,505,035,932,000
34.253855
109
0.693967
false