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
nhejazi/scikit-learn
sklearn/decomposition/tests/test_online_lda.py
38
16445
import sys import numpy as np from scipy.linalg import block_diag from scipy.sparse import csr_matrix from scipy.special import psi from sklearn.decomposition import LatentDirichletAllocation from sklearn.decomposition._online_lda import (_dirichlet_expectation_1d, _diri...
bsd-3-clause
-43,854,654,418,281,530
38.154762
79
0.603588
false
BigDataehealthTools/GNOME_Viewer
GNOME_Viewer/urls.py
1
1584
# 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
-4,319,339,034,601,719,300
41.810811
200
0.743056
false
heavyengineer/p2pool
p2pool/test/bitcoin/test_getwork.py
275
4273
import unittest from p2pool.bitcoin import getwork, data as bitcoin_data class Test(unittest.TestCase): def test_all(self): cases = [ { 'target': '0000000000000000000000000000000000000000000000f2b944000000000000', 'midstate': '5982f893102dec03e374b472647c4f19b1b...
gpl-3.0
-8,288,844,754,965,315,000
60.927536
284
0.699743
false
theonewolf/siegvswolf
lib/requests/status_codes.py
695
3136
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
mit
-1,723,737,459,044,702,700
34.590909
89
0.583333
false
southpawtech/TACTIC-DEV
src/tactic/ui/container/menu_wdg.py
1
18674
########################################################### # # Copyright (c) 2005, 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,245,987,681,956,657,700
34.637405
168
0.516012
false
wimac/home
Dropbox/skel/bin/sick-beard/cherrypy/_cpconfig.py
35
10328
"""Configuration system for CherryPy. Configuration in CherryPy is implemented via dictionaries. Keys are strings which name the mapped value, which may be of any type. Architecture ------------ CherryPy Requests are part of an Application, which runs in a global context, and configuration data may apply ...
gpl-2.0
8,235,600,426,648,475,000
36.394052
87
0.620643
false
cul-it/Invenio
modules/bibencode/lib/bibencode_tester.py
3
26130
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011 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) a...
gpl-2.0
-6,590,992,286,486,445,000
64.81864
335
0.672637
false
BayanGroup/ansible
lib/ansible/module_utils/netcfg.py
11
2329
# # (c) 2015 Peter Sprygada, <psprygada@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 version 3 of the License, or # (at your option) any late...
gpl-3.0
6,445,202,066,248,779,000
26.4
70
0.561185
false
cebrusfs/217gdb
pwndbg/color/enhance.py
5
1128
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pwndbg.color.theme as theme import pwndbg.config as config from pwndbg.color import generateColorFunction config_int...
mit
-873,764,384,863,253,600
40.777778
120
0.765957
false
rajalokan/nova
nova/api/openstack/compute/config_drive.py
4
2374
# Copyright 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 requ...
apache-2.0
-7,087,561,594,135,205,000
37.290323
78
0.664701
false
rednach/krill
test/test_regenerator.py
14
7568
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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 F...
agpl-3.0
-3,493,715,651,708,150,300
35.384615
136
0.559461
false
Jorge-Rodriguez/ansible
test/units/modules/network/f5/test_bigip_vcmp_guest.py
21
5777
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2, ...
gpl-3.0
-6,807,701,467,115,952,000
29.728723
91
0.611217
false
aidanhs/blockade
blockade/state.py
1
3590
# # 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
2,611,780,911,017,262,000
28.42623
79
0.614206
false
mashrin/processing.py
mode/examples/Topics/Simulate/SmokeParticleSystem/particle.py
6
1187
# A simple Particle class, renders the particle as an image. class Particle(object): def __init__(self, l, img): self.acc = PVector(0, 0) self.vx = randomGaussian() * 0.3 self.vy = randomGaussian() * 0.3 - 1.0 self.vel = PVector(self.vx, self.vy) self.loc = l.get() ...
apache-2.0
-6,862,858,166,457,708,000
25.377778
71
0.577085
false
pombredanne/SourceForge-Allura
ForgeBlog/forgeblog/main.py
2
15894
#-*- python -*- import logging from datetime import datetime import urllib2 # Non-stdlib imports import pkg_resources import pymongo from tg import expose, validate, redirect, flash from tg.decorators import with_trailing_slash, without_trailing_slash from pylons import g, c, request, response import formencode from f...
apache-2.0
6,853,056,835,869,905,000
34.959276
102
0.604253
false
surajssd/kuma
vendor/packages/pygments/formatters/__init__.py
44
3597
# -*- coding: utf-8 -*- """ pygments.formatters ~~~~~~~~~~~~~~~~~~~ Pygments formatters. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pygments.form...
mpl-2.0
-6,160,765,586,962,942,000
29.483051
76
0.633584
false
twhyntie/image-heatmap
make_image_heatmap.py
1
3834
#!/usr/bin/env python # -*- coding: utf-8 -*- #...for the plotting. import matplotlib.pyplot as plt #...for the image manipulation. import matplotlib.image as mpimg #...for the MATH. import numpy as np # For scaling images. import scipy.ndimage.interpolation as inter #...for the colours. from matplotlib import col...
mit
-938,205,093,421,123,800
25.625
109
0.684142
false
yury-s/v8-inspector
Source/chrome/tools/checkbins/checkbins.py
77
4325
#!/usr/bin/env python # Copyright (c) 2011 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. """Makes sure that all EXE and DLL files in the provided directory were built correctly. In essense it runs a subset of BinScope t...
bsd-3-clause
-1,353,432,719,957,876,500
35.041667
77
0.653642
false
zygh0st/terminator
terminatorlib/debugserver.py
10
5015
#!/usr/bin/python # # Copyright (c) 2008, Thomas Hurst <tom@hur.st> # # Use of this file is unrestricted provided this notice is retained. # If you use it, it'd be nice if you dropped me a note. Also beer. from terminatorlib.util import dbg, err from terminatorlib.version import APP_NAME, APP_VERSION import socket i...
gpl-2.0
-2,316,882,822,824,076,300
27.821839
97
0.631705
false
MiLk/ansible
lib/ansible/modules/monitoring/zabbix_group.py
35
7601
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013-2014, Epic Games, 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
-8,544,295,028,499,567,000
31.762931
127
0.606104
false
patrickstocklin/chattR
lib/python2.7/site-packages/django/contrib/auth/management/__init__.py
91
6477
""" Creates permissions for all installed apps that need permissions. """ from __future__ import unicode_literals import getpass import unicodedata from django.apps import apps from django.contrib.auth import get_permission_codename from django.core import exceptions from django.core.management.base import CommandErr...
gpl-2.0
2,636,625,298,189,954,600
34.587912
100
0.645052
false
jorgeslima/files_copier
dependencies/tinydb/tests/test_tinydb.py
2
12809
# coding=utf-8 import sys import pytest from tinydb import TinyDB, where from tinydb.storages import MemoryStorage from tinydb.middlewares import Middleware def test_purge(db): db.purge() db.insert({}) db.purge() assert len(db) == 0 def test_all(db): db.purge() for i in range(10): ...
mit
8,575,894,408,587,923,000
23.344106
79
0.557439
false
gnmiller/craig-bot
craig-bot/lib/python3.6/site-packages/discord/http.py
1
32593
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2019 Rapptz 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 u...
mit
-4,504,667,148,161,097,000
38.458838
124
0.586353
false
nealtodd/django
tests/contenttypes_tests/models.py
172
2882
from __future__ import unicode_literals from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.http import urlquote...
bsd-3-clause
-1,800,262,540,788,437,200
23.632479
76
0.688411
false
DNFcode/edx-platform
cms/djangoapps/contentstore/management/commands/check_course.py
160
2722
from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml_importer import check_module_metadata_editability from opaque_keys.edx.keys import CourseKey from opaque_keys import InvalidKeyError from opaque_keys.edx.locations import Sla...
agpl-3.0
-8,212,171,054,045,775,000
40.876923
112
0.64989
false
cdegroc/scikit-learn
sklearn/linear_model/setup.py
1
1289
from os.path import join import numpy def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info config = Configuration('linear_model', parent_package, top_path) # cd fast needs CBLAS blas_info = get_in...
bsd-3-clause
1,793,200,755,840,630,500
29.690476
68
0.586501
false
TheTypoMaster/chromium-crosswalk
tools/perf/benchmarks/dromaeo.py
4
9390
# 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. import math import os from core import perf_benchmark from telemetry import benchmark from telemetry import page as page_module from telemetry.page import ...
bsd-3-clause
5,337,652,464,672,315,000
27.36858
80
0.678062
false
evensonbryan/yocto-autobuilder
lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/locks.py
4
12354
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
196,445,530,669,264,450
38.851613
85
0.619718
false
neilhan/tensorflow
tensorflow/contrib/learn/python/learn/dataframe/transforms/in_memory_source.py
4
6151
# 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
4,078,858,469,524,545,500
32.983425
84
0.584946
false
ahamilton55/ansible
lib/ansible/modules/cloud/vmware/vmware_migrate_vmk.py
57
7360
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
5,097,675,049,369,072,000
35.616915
86
0.641712
false
tedlaz/pyted
sms/requests/packages/idna/codec.py
426
3299
from .core import encode, decode, alabel, ulabel, IDNAError import codecs import re _unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]') class Codec(codecs.Codec): def encode(self, data, errors='strict'): if errors != 'strict': raise IDNAError("Unsupported error handling \"{0}\"".for...
gpl-3.0
2,457,533,562,383,308,300
26.957627
80
0.538345
false
informatik-mannheim/Moduro-CC3D
Simulation/ModuroModel/Spa/SpaSdbCdiInDa.py
1
1536
# Copyright 2016 the original author or 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
-6,439,966,897,205,599,000
33.931818
76
0.610026
false
pong3489/TEST_Mission
Lib/site-packages/numpy/NumpyDotNet/bin/Tests/test_dtype.py
141
5362
import numpy as np from numpy.testing import * class TestBuiltin(TestCase): def test_run(self): """Only test hash runs at all.""" for t in [np.int, np.float, np.complex, np.int32, np.str, np.object, np.unicode]: dt = np.dtype(t) hash(dt) class TestRecord(Tes...
gpl-3.0
3,338,197,354,221,235,000
35.97931
111
0.504103
false
beepaste/beepaste
beepaste/views/viewPaste/views.py
1
1832
from pyramid.response import Response from pyramid.view import view_config from beepaste.models.pastes import Pastes from beepaste.pasteFunctions import pasteExists from pyramid.httpexceptions import HTTPNotFound, HTTPFound import base64 @view_config(route_name='view_raw', renderer='templates/pasteRaw.jinja2') def vie...
gpl-3.0
5,932,458,512,958,988,000
49.888889
153
0.715611
false
erkanay/django
tests/syndication_tests/urls.py
42
1028
from django.conf.urls import url from . import feeds urlpatterns = [ url(r'^syndication/rss2/$', feeds.TestRss2Feed()), url(r'^syndication/rss2/guid_ispermalink_true/$', feeds.TestRss2FeedWithGuidIsPermaLinkTrue()), url(r'^syndication/rss2/guid_ispermalink_false/$', feeds.TestRss2FeedWith...
bsd-3-clause
-6,611,504,939,006,788,000
43.695652
73
0.695525
false
cernopendata/opendata.cern.ch
cernopendata/modules/sitemap/generators.py
3
2158
# -*- coding: utf-8 -*- # # This file is part of CERN Open Data Portal. # Copyright (C) 2018 CERN. # # CERN Open Data Portal 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, o...
gpl-2.0
-6,698,601,145,222,488,000
37.535714
78
0.692771
false
petemounce/ansible
test/sanity/validate-modules/test_validate_modules_regex.py
162
2807
#!/usr/bin/env python # This is a standalone test for the regex inside validate-modules # It is not suitable to add to the make tests target because the # file under test is outside the test's sys.path AND has a hyphen # in the name making it unimportable. # # To execute this by hand: # 1) cd <checkoutdir> # 2) so...
gpl-3.0
4,462,878,971,629,052,400
42.859375
123
0.547916
false
sodexis/odoo
openerp/report/print_xml.py
338
11063
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
-48,826,567,224,932,440
38.794964
131
0.480521
false
mrquim/mrquimrepo
repo/script.module.trakt/lib/trakt/interfaces/shows/__init__.py
4
2756
from __future__ import absolute_import, division, print_function from trakt.interfaces.base import Interface from trakt.mapper.summary import SummaryMapper import requests class ShowsInterface(Interface): path = 'shows' def get(self, id, extended=None, **kwargs): response = self.http.get(str(id), q...
gpl-2.0
5,643,379,177,758,823,000
26.287129
68
0.588534
false
neuroo/equip
tests/test_bz_1.py
1
6303
import pytest from itertools import tee, izip from testutils import get_co, get_bytecode from equip import BytecodeObject from equip.bytecode.utils import show_bytecode import equip.utils.log as logutils from equip.utils.log import logger logutils.enableLogger(to_file='./equip.log') from equip.analysis import Control...
apache-2.0
6,077,347,106,035,982,000
32.705882
89
0.477074
false
juliusbierk/scikit-image
skimage/morphology/grey.py
24
15043
""" Grayscale morphological operations """ import functools import numpy as np from scipy import ndimage as ndi from .misc import default_selem from ..util import pad, crop __all__ = ['erosion', 'dilation', 'opening', 'closing', 'white_tophat', 'black_tophat'] def _shift_selem(selem, shift_x, shift_y): ...
bsd-3-clause
2,065,155,682,482,734,600
31.916849
120
0.560792
false
rbaindourov/v8-inspector
Source/chrome/tools/telemetry/telemetry/benchmark_runner.py
5
15380
# 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. """Parses the command line, discovers the appropriate benchmarks, and runs them. Handles benchmark configuration, but all the logic for actually running the...
bsd-3-clause
-6,465,389,175,313,052,000
34.114155
80
0.663784
false
ahamilton55/ansible
lib/ansible/plugins/action/include_vars.py
18
10053
# (c) 2016, Allen Sanabria <asanabria@linuxdynasty.org> # # 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 l...
gpl-3.0
-6,289,491,099,928,947,000
35.556364
118
0.558938
false
MiniSEC/GRR_clone
client/client_test.py
1
5467
#!/usr/bin/env python # Copyright 2010 Google Inc. All Rights Reserved. """Tests for the client.""" # Need to import client to add the flags. from grr.client import actions # Load all the standard actions. # pylint: disable=unused-import from grr.client import client_actions # pylint: enable=unused-import from grr.c...
apache-2.0
8,191,160,117,040,486,000
29.713483
76
0.671666
false
yongshengwang/builthue
desktop/core/ext-py/Django-1.4.5/django/contrib/auth/management/commands/changepassword.py
97
1881
import getpass from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.db import DEFAULT_DB_ALIAS class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--database', action='stor...
apache-2.0
7,808,376,166,529,036,000
32.589286
110
0.602339
false
FlashXT/XJTU_WorkLog
2017.9/Programing/CodeSet/list&dictionary.py
1
1180
#coding=utf-8 #2017.9.22,Flash,list & dictionary 嵌套 alien_0={"color":"green","points":5} alien_1={"color":"yellow","points":10} alien_2={"color":"red","points":15} aliens=[alien_0,alien_1,alien_2] for alien in aliens: print (alien) pizza={ 'crust':'think', 'toppings':['mushrooms','extra cheese'], } print("You ord...
gpl-3.0
2,710,474,816,626,173,000
28.4
58
0.570578
false
neilLasrado/frappe
frappe/utils/html_utils.py
1
8928
import frappe import json, re import bleach, bleach_whitelist.bleach_whitelist as bleach_whitelist from six import string_types from bs4 import BeautifulSoup def clean_html(html): if not isinstance(html, string_types): return html return bleach.clean(clean_script_and_style(html), tags=['div', 'p', 'br', 'ul', '...
mit
-1,483,913,237,767,771,400
42.55122
136
0.629032
false
Saurabh7/shogun
examples/undocumented/python_modular/graphical/preprocessor_kpca_graphical.py
26
1893
from numpy import * import matplotlib.pyplot as p import os, sys, inspect path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../tools')) if not path in sys.path: sys.path.insert(1, path) del path from generate_circle_data import circle_data cir=circle_data() number_of_points_for_circle1=42 number_of_p...
mit
1,970,223,157,282,100,700
36.86
131
0.735869
false
google/clusterfuzz
src/python/platforms/android/ui.py
1
1362
# Copyright 2019 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 agreed to in writing, ...
apache-2.0
-3,415,252,165,160,166,400
32.219512
74
0.714391
false
dhananjay92/servo
tests/wpt/web-platform-tests/tools/html5lib/parse.py
420
8783
#!/usr/bin/env python """usage: %prog [options] filename Parse a document to a tree, with optional profiling """ import sys import os import traceback from optparse import OptionParser from html5lib import html5parser, sanitizer from html5lib.tokenizer import HTMLTokenizer from html5lib import treebuilders, serializ...
mpl-2.0
-4,707,701,327,228,700,000
36.695279
128
0.548218
false
mikhtonyuk/pyhk2
hk2/kernel/habitat.py
1
2150
from interfaces import IStartup from hk2.injection import Container, NoScope from plugin_loaders.sysmod_plugin_loader import SysmodPluginLoader from hk2.annotations import Service from hk2.types import Annotations import logging log = logging.getLogger('hk2') #=======================================================...
mit
8,446,575,532,834,386,000
28.452055
93
0.586047
false
shootstar/novatest
nova/api/openstack/compute/contrib/extended_availability_zone.py
15
3810
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Netease, LLC. # 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/licens...
apache-2.0
6,514,489,079,860,114,000
38.6875
79
0.675066
false
hackbutty/git-repo
subcmds/forall.py
48
7781
# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
-9,021,670,626,438,474,000
28.926923
74
0.599666
false
jsoref/django
django/core/checks/security/csrf.py
477
1796
from django.conf import settings from .. import Tags, Warning, register W003 = Warning( "You don't appear to be using Django's built-in " "cross-site request forgery protection via the middleware " "('django.middleware.csrf.CsrfViewMiddleware' is not in your " "MIDDLEWARE_CLASSES). Enabling the middle...
bsd-3-clause
6,226,195,278,044,596,000
31.071429
85
0.702116
false
40423217/2016fallcadp_hw
plugin/liquid_tags/test_flickr.py
278
2466
from . import flickr try: from unittest.mock import patch except ImportError: from mock import patch import os import pytest import re PLUGIN_DIR = os.path.dirname(__file__) TEST_DATA_DIR = os.path.join(PLUGIN_DIR, 'test_data') @pytest.mark.parametrize('input,expected', [ ('18873146680 large "test 1"', ...
agpl-3.0
1,511,935,001,124,932,900
30.21519
76
0.586375
false
finalion/WordQuery
src/service/remotemdx.py
1
3508
#-*- coding:utf-8 -*- # # Copyright © 2016–2017 Liang Feng <finalion@gmail.com> # # Support: Report an issue at https://github.com/finalion/WordQuery/issues # # 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...
gpl-3.0
4,022,138,843,391,940,600
37.097826
83
0.611127
false
sbalde/edxplatform
common/djangoapps/embargo/admin.py
154
1315
""" Django admin page for embargo models """ from django.contrib import admin import textwrap from config_models.admin import ConfigurationModelAdmin from embargo.models import IPFilter, CountryAccessRule, RestrictedCourse from embargo.forms import IPFilterForm, RestrictedCourseForm class IPFilterAdmin(Configuration...
agpl-3.0
5,667,789,222,964,555,000
30.309524
87
0.717871
false
40423147/2017springcd_hw
plugin/liquid_tags/test_audio.py
273
1456
from . import audio import pytest import re @pytest.mark.parametrize('input,expected', [ ('http://foo.bar https://bar.foo', ('http://foo.bar', 'https://bar.foo', None)), ('http://test.foo', ('http://test.foo', None, None)), ('https://test.foo', ('https://test.foo', None, None)), ('http:...
gpl-3.0
-4,136,373,309,461,535,000
37.315789
67
0.600962
false
cornelvlad/qualitybots
src/webdriver/appengine_communicator.py
26
11159
#!/usr/bin/python2.6 # # Copyright 2011 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...
apache-2.0
6,753,141,748,077,499,000
33.547988
80
0.673358
false
matrixise/odoo
openerp/service/websrv_lib.py
380
7780
# -*- coding: utf-8 -*- # # Copyright P. Christeas <p_christ@hol.gr> 2008-2010 # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking ...
agpl-3.0
3,936,537,440,187,666,400
32.106383
87
0.630977
false
Hack42/BusNotifier
webscraping/pdict.py
1
15581
__doc__ = """ pdict has a dictionary like interface and a sqlite backend It uses pickle to store Python objects and strings, which are then compressed Multithreading is supported """ import os import sys import datetime import sqlite3 import zlib import threading import md5 import shutil import glob try: import cP...
mit
777,492,203,199,136,400
30.797959
159
0.559592
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/application_gateway_firewall_rule_set.py
1
2892
# 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
1,773,816,435,454,436,400
38.616438
105
0.608921
false
momikey/pyrge
examples/asteroid/asteroidexample.py
1
8101
import random from pyrge import * MAX_X = 640 MAX_Y = 420 class Asteroid(Entity, mixin.Wrapper): LARGE = 0 MEDIUM = 1 SMALL = 2 def __init__(self, position=Vector(0,0), velocity=Vector(0,0), size=0): super(Asteroid, self).__init__() self.sizetype = size self.reset(position,ve...
lgpl-2.1
-1,759,057,837,947,509,500
29.003704
88
0.542772
false
sadaf2605/django
django/db/migrations/operations/base.py
127
4888
from __future__ import unicode_literals from django.db import router class Operation(object): """ Base class for migration operations. It's responsible for both mutating the in-memory model state (see db/migrations/state.py) to represent what it performs, as well as actually performing it agains...
bsd-3-clause
-4,363,301,086,035,084,000
35.477612
103
0.640957
false
jmesteve/saas3
openerp/report/render/rml2pdf/utils.py
381
7143
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2003, Fabien Pinckaers, UCL, FSA # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesse...
agpl-3.0
1,614,298,269,406,253,600
36.793651
149
0.50623
false
MihaiMoldovanu/ansible
test/units/playbook/test_play.py
185
4200
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-3,828,465,429,918,381,000
29
81
0.58619
false
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/numpy-1.9.2/numpy/testing/tests/test_decorators.py
67
4134
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import * from numpy.testing.noseclasses import KnownFailureTest import nose def test_slow(): @dec.slow def slow_func(x, y, z): pass assert_(slow_func.slow) def test_setastest(): @dec.setast...
mit
4,588,537,476,073,065,000
21.345946
70
0.605467
false
hainm/statsmodels
statsmodels/tsa/tests/results/arima211_css_results.py
36
44583
import numpy as np llf = np.array([-240.29558272688]) nobs = np.array([ 202]) k = np.array([ 5]) k_exog = np.array([ 1]) sigma = np.array([ .79494581155191]) chi2 = np.array([ 1213.6019521322]) df_model = np.array([ 3]) k_ar = np.array([ 2]) k...
bsd-3-clause
6,627,451,559,379,191,000
33.533695
229
0.400422
false
EvanK/ansible
test/sanity/code-smell/update-bundled.py
24
4649
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2018, Ansible Project # # 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 ...
gpl-3.0
-124,667,222,501,051,000
34.48855
98
0.639492
false
iwob/pysv
pysv/parsers/ply/yacc.py
44
137322
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2017 # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
mit
-9,201,143,721,163,080,000
38.302232
119
0.467354
false
pfhayes/boto
boto/directconnect/__init__.py
145
1679
# Copyright (c) 2013 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 restriction, including # without limitation the rights...
mit
5,241,195,171,284,282,000
39.95122
79
0.747469
false
barca/Nano_Tournament
tournament.py
1
5742
#!/usr/bin/env python # # tournament.py -- implementation of a Swiss-system tournament # import psycopg2 #connects to db def connect(): """Connect to the PostgreSQL database. Returns a database connection.""" return psycopg2.connect("dbname=tournament") #deltes match records from database def deleteMatches(...
mit
8,595,985,632,215,180,000
36.285714
135
0.642111
false
ICTU/quality-time
components/collector/tests/source_collectors/quality_time/test_missing_metrics.py
1
3549
"""Unit tests for the Quality-time missing metrics collector.""" from .base import QualityTimeTestCase class QualityTimeMissingMetricsTest(QualityTimeTestCase): """Unit tests for the Quality-time missing metrics collector.""" METRIC_TYPE = "missing_metrics" def setUp(self): """Set up test data....
apache-2.0
-4,978,303,494,861,019,000
40.752941
115
0.476472
false
nttks/edx-platform
common/djangoapps/util/keyword_substitution.py
148
2343
""" keyword_substitution.py Contains utility functions to help substitute keywords in a text body with the appropriate user / course data. Supported: LMS: - %%USER_ID%% => anonymous user id - %%USER_FULLNAME%% => User's full name - %%COURSE_DISPLAY_NAME%% => display name of the course ...
agpl-3.0
2,283,595,018,468,699,100
30.662162
80
0.672215
false
kingvuplus/Test-OBH
lib/python/Components/Element.py
47
2938
from Tools.CList import CList # down up # Render Converter Converter Source # a bidirectional connection def cached(f): name = f.__name__ def wrapper(self): cache = self.cache if cache is None: return f(self) if name not in cache: cache[name] = (True, f(self)) return cache[name]...
gpl-2.0
-3,303,258,262,268,398,600
25.709091
102
0.702178
false
switchboardOp/ansible
test/integration/cleanup_ec2.py
25
6920
''' Find and delete AWS resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure. ''' import boto import boto.ec2.elb import optparse import os import os.path impor...
gpl-3.0
5,916,014,013,529,119,000
33.427861
132
0.595954
false
arante/pyloc
microblog/flask/lib/python3.5/site-packages/flask/__init__.py
47
1673
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.12.2' # utilities we import from Werkzeug and...
gpl-3.0
-3,331,006,780,351,438,000
33.142857
78
0.745368
false
wisner23/serenata-de-amor
src/xml2csv.py
1
2314
import json import sys from csv import DictWriter from datetime import datetime from io import StringIO from bs4 import BeautifulSoup from lxml.etree import iterparse XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] HTML_FILE_PATH = 'data/2016-08-08-datasets-format.html' def output(*args, **kwargs): """H...
mit
-7,623,785,687,065,449,000
27.567901
77
0.644339
false
ichuang/sympy
sympy/physics/tests/test_gaussopt.py
3
3686
from sympy import atan2, factor, Float, I, Matrix, N, oo, pi, sqrt, symbols from sympy.physics.gaussopt import (BeamParameter, CurvedMirror, CurvedRefraction, FlatMirror, FlatRefraction, FreeSpace, GeometricRay, RayTransferMatrix, ThinLens, conjugate_gauss_beams, gaussian_conj , geometric_conj_ab, geometric_conj...
bsd-3-clause
-5,315,364,058,844,657,000
43.95122
145
0.573521
false
transitland/mapzen-gtfs
mzgtfs/serviceperiod.py
3
2661
"""GTFS ServicePeriod entity.""" import datetime import entity import geom import util import validation class ServicePeriod(entity.Entity): KEY = 'service_id' REQUIRED = [ 'service_id', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'start_date',...
mit
1,956,243,477,750,591,200
30.678571
92
0.663284
false
onceuponatimeforever/oh-mainline
mysite/search/migrations/0031_cache_contributor_count.py
17
4562
# This file is part of OpenHatch. # Copyright (C) 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
-368,811,419,379,835,800
57.487179
145
0.594915
false
AOKP/external_chromium_org
content/browser/tracing/generate_trace_viewer_grd.py
48
2407
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates a grd file for packaging the trace-viewer files. This file is modified from the devtools generate_devtools_grd.py file. ...
bsd-3-clause
-585,814,309,154,873,700
28.716049
77
0.70752
false
ahaym/eden
languages/ne.py
7
327294
# -*- coding: utf-8 -*- { '# of International Staff': '# अन्तराष्ट्रिय स्टाफ', '# of National Staff': '# राष्ट्रिय स्टाफ', '# selected': '# छानियो', '%(app)s not installed. Ask the Server Administrator to install on Server.': '%(app)s इन्स्टल हुन सकेन । सर्भरलाई इन्स्टल गर्नको निम्ति सर्भरको एडमिनिस्ट्राटरलाई सोध्नुहोस...
mit
-5,564,291,067,132,241,000
56.047619
477
0.59904
false
foxban/qemu-1.1.1-centos5-rpm
scripts/tracetool/format/h.py
98
1062
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate .h file. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __email__ ...
gpl-2.0
2,351,921,579,179,212,000
22.555556
71
0.512264
false
hdinsight/hue
desktop/core/ext-py/boto-2.38.0/boto/ec2/image.py
92
16222
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # w...
apache-2.0
-3,806,931,644,120,604,700
35.868182
89
0.549254
false
kazemakase/scikit-learn
examples/ensemble/plot_voting_decision_regions.py
230
2386
""" ================================================== Plot the decision boundaries of a VotingClassifier ================================================== Plot the decision boundaries of a `VotingClassifier` for two features of the Iris dataset. Plot the class probabilities of the first sample in a toy dataset pred...
bsd-3-clause
-1,503,487,658,797,689,600
32.138889
77
0.626572
false
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
Splunk_TA_paloalto/bin/splunk_ta_paloalto/aob_py2/solnlib/acl.py
6
6169
# Copyright 2016 Splunk, 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 writing,...
isc
-6,135,775,579,586,729,000
35.94012
79
0.55941
false
tdtrask/ansible
lib/ansible/modules/windows/win_firewall_rule.py
27
2799
#!/usr/bin/env python # Copyright (c) 2017 Artem Zinenko <zinenkoartem@gmail.com> # Copyright (c) 2014 Timothy Vandenbrande <timothy.vandenbrande@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 's...
gpl-3.0
3,202,874,313,363,748,000
24.678899
94
0.650232
false
flotre/sickbeard-vfvo
lib/requests/packages/chardet2/langgreekmodel.py
63
12651
######################## 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
974,559,182,802,252,900
55.226667
70
0.548889
false
newcastlecy/shadowsocks
shadowsocks/common.py
57
4530
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # 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 u...
mit
285,619,134,606,538,900
33.06015
79
0.570419
false
dynaryu/rmtk
rmtk/vulnerability/derivation_fragility/R_mu_T_no_dispersion/dolsek_fajfar/__init__.py
67
1875
# -*- coding: utf-8 -*- # # LICENSE # # Copyright © 2014-2015, GEM Foundation, Chiara Casotto, Anirudh Rao, # Vitor Silva. # # The Risk Modeller's Toolkit 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,...
agpl-3.0
-8,617,636,058,246,381,000
41.295455
75
0.770016
false
hryamzik/ansible
lib/ansible/modules/database/vertica/vertica_role.py
55
7933
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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
-3,752,470,086,835,566,600
31.917012
105
0.622715
false
mcfletch/AutobahnPython
examples/asyncio/wamp/basic/pubsub/basic/backend.py
5
1250
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http:/...
apache-2.0
-7,325,271,326,270,844,000
30.25
79
0.6112
false
manazhao/tf_recsys
tensorflow/contrib/learn/python/learn/dataframe/transforms/example_parser.py
26
2407
# 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
-2,185,623,189,124,441,000
34.397059
78
0.716244
false
ThinkingBridge/platform_external_chromium_org
chrome/test/functional/media/media_basic_playback.py
65
2975
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Basic playback test. Checks playback, seek, and replay based on events. This test uses the bear videos from the test matrix in...
bsd-3-clause
3,755,034,432,352,727,600
37.141026
80
0.673613
false
yuyuyu101/VirtualBox-NetBSD
src/libs/libxml2-2.6.31/python/tests/reader2.py
87
5179
#!/usr/bin/python -u # # this tests the DTD validation with the XmlTextReader interface # import sys import glob import string import StringIO import libxml2 # Memory debug specific libxml2.debugMemory(1) err="" expect="""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute...
gpl-2.0
3,849,612,375,126,978,000
19.230469
114
0.654953
false
aronsky/home-assistant
homeassistant/components/camera/canary.py
2
3622
""" Support for Canary camera. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.canary/ """ import asyncio import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.camera import Camera, PLATFORM_SCHEMA f...
apache-2.0
-8,339,544,278,221,560,000
31.927273
79
0.663998
false
maohongyuan/kbengine
kbe/src/lib/python/Lib/turtledemo/peace.py
99
1066
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_peace.py A simple drawing suitable as a beginner's programming example. Aside from the peacecolors assignment and the for loop, it only uses turtle commands. """ from turtle import * def main(): peacecolors = ("red3", "orange", "yellow"...
lgpl-3.0
482,212,369,095,860,500
16.47541
61
0.532833
false
ahamilton55/ansible
lib/ansible/modules/messaging/rabbitmq_vhost.py
69
4384
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.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...
gpl-3.0
-740,539,128,196,644,500
27.102564
88
0.609033
false
nikkisquared/servo
tests/wpt/harness/wptrunner/update/tree.py
142
11075
# 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 os import re import subprocess from .. import vcs from ..vcs import bind_to_repo, git, hg def get_unique_name(...
mpl-2.0
4,120,726,235,243,094,500
27.617571
113
0.540316
false