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
candrews/portage
pym/portage/tests/dep/test_get_required_use_flags.py
18
1431
# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase from portage.dep import get_required_use_flags from portage.exception import InvalidDependString class TestCheckRequiredUse(TestCase): def testCheckRequiredUse(self): test_...
gpl-2.0
-1,298,328,410,242,048,500
31.522727
87
0.461216
false
jtakayama/makahiki-draft
makahiki/apps/widgets/bonus_points/admin.py
7
3615
"""Admin definition for Bonus Points widget.""" from django.shortcuts import render_to_response from django.template import RequestContext from apps.admin.admin import challenge_designer_site, challenge_manager_site, developer_site ''' Created on Aug 5, 2012 @author: Cam Moore ''' from django.contrib import admin f...
mit
4,632,840,344,670,161,000
33.759615
92
0.676072
false
matthijsvk/multimodalSR
code/Experiments/neon-master/neon/backends/cuda_batchnorm.py
3
14722
from pycuda.tools import context_dependent_memoize # from neon.backends.cuda_templates import (_ew_template, # _stage_template, # _fin_template, # _init_rand_func, # ...
mit
1,876,698,193,698,282,500
33.157773
96
0.479894
false
Dklotz-Circle/security_monkey
security_monkey/views/user_settings.py
7
6398
# Copyright 2014 Netflix, 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...
apache-2.0
-8,932,920,740,953,357,000
32.150259
144
0.472335
false
NoahFlowa/glowing-spoon
venv/lib/python2.7/site-packages/psycopg2/tests/test_transaction.py
7
9235
#!/usr/bin/env python # test_transaction - unit test on transaction behaviour # # Copyright (C) 2007-2011 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundat...
apache-2.0
-7,506,273,814,172,407,000
35.646825
78
0.613102
false
alhashash/odoo
addons/mrp/__init__.py
8
1098
# -*- 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
521,504,473,826,075,700
36.862069
78
0.625683
false
digimarc/django
tests/m2m_through_regress/tests.py
25
9146
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import management from django.test import TestCase from django.utils.six import StringIO from .models import ( Car, CarDriver, Driver, Group, Membership, Person, UserMembership, ) class M2MThroughTestCase(TestCa...
bsd-3-clause
-8,723,538,028,509,625,000
37.590717
360
0.603871
false
christophlsa/odoo
addons/website_mail_group/controllers/main.py
306
7883
# -*- coding: utf-8 -*- import datetime from dateutil import relativedelta from openerp import tools, SUPERUSER_ID from openerp.addons.web import http from openerp.addons.website.models.website import slug from openerp.addons.web.http import request class MailGroup(http.Controller): _thread_per_page = 20 _r...
agpl-3.0
8,533,092,553,908,299,000
51.553333
182
0.59419
false
smartdevice475/sdl_core
tools/InterfaceGenerator/test/generator/parsers/test_SDLRPCV2.py
14
17475
"""SDLRPCV2 XML parser unit test.""" import os import unittest import generator.Model import generator.parsers.SDLRPCV2 class TestSDLRPCV2Parser(unittest.TestCase): """Test for SDLRPCV2 xml parser.""" class _Issue: def __init__(self, creator, value): self.creator = creator s...
bsd-3-clause
1,349,733,835,912,469,200
40.906475
78
0.610529
false
BenTheElder/test-infra
gubernator/filters.py
14
8242
# Copyright 2016 The Kubernetes 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 law or agreed to ...
apache-2.0
-669,064,552,855,797,500
29.639405
83
0.586751
false
jsoref/django
django/db/backends/oracle/base.py
20
24998
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import os import platform import sys import warnings from django.conf import settings from django.db import utils from django.db.backends.base.base ...
bsd-3-clause
-3,278,042,799,849,264,000
40.115132
110
0.592607
false
xuleiboy1234/autoTitle
tensorflow/tensorflow/contrib/predictor/saved_model_predictor.py
55
6579
# 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...
mit
4,567,240,406,883,969,000
38.39521
81
0.668947
false
lucc/alot
alot/widgets/search.py
1
7118
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file """ Widgets specific to search mode """ import urwid from ..settings.const import settings from ..helper import shorten_author_string ...
gpl-3.0
8,841,554,747,410,669,000
30.776786
79
0.605507
false
rahku/coreclr
src/ToolBox/SOS/tests/t_cmd_bpmd_methoddesc.py
43
1308
import lldb import re import testutils as test # bpmd -md <MethodDesc pointer> def runScenario(assembly, debugger, target): process = target.GetProcess() res = lldb.SBCommandReturnObject() ci = debugger.GetCommandInterpreter() # Run debugger, wait until libcoreclr is loaded, # set breakpoint at ...
mit
4,104,002,611,073,469,000
28.066667
77
0.691131
false
kkozarev/mwacme
synchrotron_fitting/GS_kappa_function.py
1
2634
import Get_MW import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np N=10 #number of frequencies #These values are starting positions for coronal CME radio observations ParmIn=29*[0] # input array ParmIn[0] =8e19 # Area, cm^2 ParmIn[1] =5e9 # Depth, cm ParmIn[2] =3...
gpl-2.0
8,581,899,702,963,685,000
35.628571
101
0.635156
false
eenchev/idea-note-taking-app
env/lib/python2.7/site-packages/werkzeug/posixemulation.py
364
3519
# -*- coding: utf-8 -*- r""" werkzeug.posixemulation ~~~~~~~~~~~~~~~~~~~~~~~ Provides a POSIX emulation for some features that are relevant to web applications. The main purpose is to simplify support for systems such as Windows NT that are not 100% POSIX compatible. Currently this only imple...
mit
2,454,830,130,427,693,600
32.198113
78
0.539642
false
jcftang/ansible
lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels.py
12
6828
#!/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
8,548,192,868,156,203,000
31.985507
128
0.612332
false
Gateworks/platform-external-chromium_org
tools/telemetry/telemetry/core/discover_unittest.py
25
1836
# Copyright (c) 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 os import unittest from telemetry.core import discover from telemetry.core import util class DiscoverTest(unittest.TestCase): def setUp(self): ...
bsd-3-clause
-4,714,378,293,815,855,000
34.307692
74
0.686819
false
andersk/zulip
zerver/lib/cache.py
2
28356
# See https://zulip.readthedocs.io/en/latest/subsystems/caching.html for docs import hashlib import logging import os import re import secrets import sys import time import traceback from functools import lru_cache, wraps from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterable, List, ...
apache-2.0
-7,385,823,118,788,663,000
32.959281
98
0.655875
false
leoliujie/odoo
addons/l10n_hn/__openerp__.py
343
2260
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Salvatore Josué Trimarchi Pinto <salvatore@trigluu.com> # (http://trigluu.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
agpl-3.0
-9,086,664,144,931,744,000
37.862069
83
0.639752
false
jonfoster/pyxb-upstream-mirror
doc/conf.py
3
6355
# -*- coding: utf-8 -*- # # PyXB documentation build configuration file, created by # sphinx-quickstart on Tue May 19 03:28:52 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
apache-2.0
5,365,618,532,357,052,000
31.589744
80
0.709677
false
Moriadry/tensorflow
tensorflow/python/lib/io/python_io.py
112
1273
# 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,112,572,014,698,157,600
32.5
80
0.720346
false
z1gm4/desarrollo_web_udp
env/lib/python2.7/site-packages/django/conf/locale/cs/formats.py
504
1702
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i' DATET...
gpl-3.0
-1,611,089,585,953,104,600
36.822222
77
0.528202
false
akash1808/glance
glance/tests/unit/v2/test_image_tags_resource.py
18
4136
# 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
-302,333,761,914,808,260
38.769231
78
0.666828
false
grdlok/UStar-dl
src/youtube_dl/extractor/screencast.py
12
4228
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, compat_parse_qs, compat_urllib_request, ) class ScreencastIE(InfoExtractor): _VALID_URL = r'https?://www\.screencast\.com/t/(?P<id>[a-zA-Z0-9]+)' _TES...
unlicense
-4,414,803,871,771,628,000
36.75
118
0.515847
false
willingc/oh-mainline
vendor/packages/python-social-auth/social/backends/rdio.py
79
2468
""" Rdio OAuth1 and OAuth2 backends, docs at: http://psa.matiasaguirre.net/docs/backends/rdio.html """ from social.backends.oauth import BaseOAuth1, BaseOAuth2, OAuthAuth RDIO_API = 'https://www.rdio.com/api/1/' class BaseRdio(OAuthAuth): ID_KEY = 'key' def get_user_details(self, response): ful...
agpl-3.0
2,030,584,576,457,099,800
33.277778
67
0.576985
false
roshan/thrift
lib/py/src/protocol/TProtocolDecorator.py
145
1540
# # 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
8,322,687,308,669,466,000
35.666667
123
0.727273
false
hgijeon/the_PLAY
test_gameapi.py
1
2612
import pygame as gameapi import pygame.midi as piano import sys, random import pygame.locals as apiVar gameapi.init() fpsClock = gameapi.time.Clock() windowSurfaceObj = gameapi.display.set_mode((640, 480)) gameapi.display.set_caption('set_caption') redColor = gameapi.Color(255,0,0) greenColor = gameapi.Color(0,255,0...
mit
4,477,830,631,700,586,500
28.348315
98
0.632466
false
amwelch/a10sdk-python
a10sdk/core/logging/logging_host.py
2
2576
from a10sdk.common.A10BaseClass import A10BaseClass class Host(A10BaseClass): """Class Description:: Set remote syslog host DNS name or ip address. Class host supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param ipv6ad...
apache-2.0
3,944,507,077,873,680,400
66.789474
842
0.634317
false
xujun10110/MITMf
core/sslstrip/ServerConnectionFactory.py
26
1930
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This...
gpl-3.0
6,826,442,213,485,487,000
36.843137
115
0.684974
false
Kvle/ardupilot
mk/PX4/Tools/genmsg/src/genmsg/command_line.py
217
1887
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above ...
gpl-3.0
-9,092,119,296,888,728,000
45.02439
70
0.745628
false
daniel198730/reposdmgv
proyectofinal/app/personaMain.py
1
1667
''' Created on 19/2/2015 @author: PC29 ''' from app import app from ec.edu.itsae.dao import PersonaDAO from flask import render_template, request, redirect, url_for @app.route("/mainPersona") def personamain(): objR=PersonaDAO.PersonaDAO().reportarPersona() return render_template("prueba.html"...
lgpl-2.1
3,173,741,083,152,962,600
27.803571
126
0.686863
false
venicegeo/eventkit-cloud
eventkit_cloud/utils/stats/geomutils.py
1
3906
from mapproxy import grid as mapproxy_grid from eventkit_cloud.tasks.models import ExportRun import logging import json import math logger = logging.getLogger(__name__) _dbg_geom_cache_misses = 0 def _create_cache_geom_entry(job): """ Constructs a geometry cache entry :param job: job contains the geomet...
bsd-3-clause
-7,206,371,908,155,125,000
29.507813
115
0.626376
false
jmarshallnz/xbmc
tools/EventClients/lib/python/ps3/keymaps.py
245
2329
# -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. ...
gpl-2.0
-3,101,409,142,541,438,500
27.753086
75
0.519536
false
WeblateOrg/weblate
weblate/trans/stats.py
2
1465
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
4,287,441,481,533,199,400
37.473684
72
0.662791
false
ravi-sharma/python-api-library
src/kayako/tests/test_api.py
3
6831
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2011, Evan Leis # # Distributed under the terms of the Lesser GNU General Public License (LGPL) #----------------------------------------------------------------------------- ''' Created on May 5, 2011...
bsd-2-clause
-4,984,744,415,136,577,000
34.393782
107
0.609281
false
kylepjohnson/cltk
tests/test_morphology.py
4
28253
"""Test cltk.morphology.""" import unittest from cltk.core.exceptions import CLTKException from cltk.morphology.lat import CollatinusDecliner class TestMorphology(unittest.TestCase): def test_collatinus_decline(self): """ Ensure lemmatization works well """ decliner = CollatinusDeclin...
mit
-5,816,317,965,406,286,000
40.358321
110
0.342017
false
SuperTango/TangoLogger
Uploader/requests/requests/compat.py
1039
1469
# -*- coding: utf-8 -*- """ pythoncompat """ from .packages import chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplejson as json except (ImportError, SyntaxError): # si...
gpl-3.0
-6,216,641,335,774,923,000
22.693548
132
0.676651
false
nilqed/root
tutorials/pyroot/first.py
28
1524
from ROOT import TCanvas, TF1, TPaveLabel, TPad, TText from ROOT import gROOT nut = TCanvas( 'nut', 'FirstSession', 100, 10, 700, 900 ) nut.Range( 0, 0, 20, 24 ) nut.SetFillColor( 10 ) nut.SetBorderSize( 2 ) pl = TPaveLabel( 3, 22, 17, 23.7, 'My first PyROOT interactive session', 'br' ) pl.SetFillColor( 18 ) pl.Draw...
lgpl-2.1
385,312,365,967,908,160
30.102041
90
0.619423
false
auready/django
django/contrib/auth/context_processors.py
3
1824
# PermWrapper and PermLookupDict proxy the permissions system into objects that # the template system can understand. class PermLookupDict: def __init__(self, user, app_label): self.user, self.app_label = user, app_label def __repr__(self): return str(self.user.get_all_permissions()) def...
bsd-3-clause
-8,592,740,546,633,336,000
27.952381
79
0.609649
false
ZhangXinNan/tensorflow
tensorflow/contrib/tpu/python/tpu/tpu_system_metadata.py
13
5734
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-6,773,715,563,003,639,000
35.993548
80
0.648239
false
samueldotj/TeeRISC-Simulator
tests/configs/realview-switcheroo-full.py
6
2411
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
1,143,308,448,108,865,800
49.229167
72
0.793861
false
YihaoLu/statsmodels
statsmodels/tools/grouputils.py
25
22518
# -*- coding: utf-8 -*- """Tools for working with groups This provides several functions to work with groups and a Group class that keeps track of the different representations and has methods to work more easily with groups. Author: Josef Perktold, Author: Nathaniel Smith, recipe for sparse_dummies on scipy user ma...
bsd-3-clause
-8,709,583,423,084,470,000
33.273973
79
0.552136
false
mgrygoriev/CloudFerry
tests/cloudferrylib/os/actions/test_keypair_migration.py
1
6887
# Copyright 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
4,797,559,157,881,220,000
36.227027
75
0.58095
false
AstroPrint/AstroBox
src/ext/sockjs/tornado/transports/jsonp.py
9
3642
# -*- coding: utf-8 -*- """ sockjs.tornado.transports.jsonp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JSONP transport implementation. """ import logging from tornado.web import asynchronous from sockjs.tornado import proto from sockjs.tornado.transports import pollingbase from sockjs.tornado.util import bytes_to_s...
agpl-3.0
-534,404,830,478,798,600
27.677165
84
0.576881
false
EvgeneOskin/taiga-back
taiga/projects/userstories/apps.py
14
5623
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
agpl-3.0
-134,019,683,328,046,600
56.357143
168
0.6723
false
endlessm/chromium-browser
third_party/angle/src/libANGLE/gen_overlay_fonts.py
5
10022
#!/usr/bin/env vpython # # [VPYTHON:BEGIN] # wheel: < # name: "infra/python/wheels/freetype-py/${vpython_platform}" # version: "version:2.1.0.post1" # > # [VPYTHON:END] # Copyright 2019 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found ...
bsd-3-clause
8,678,031,032,273,313,000
33.321918
109
0.598084
false
lucasmiqueias/speakerfight-1
deck/migrations/0001_initial.py
20
3687
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('jury', '__first__'), migrations.swappable_dependency(settings.AUT...
mit
-6,755,807,652,525,710,000
49.506849
189
0.56984
false
sonnyhu/scikit-learn
sklearn/externals/joblib/numpy_pickle.py
37
23222
"""Utilities for fast persistence of big data, with optional compression.""" # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import pickle import os import sys import warnings try: from pathlib import Path except ImportError:...
bsd-3-clause
-3,702,681,519,317,451,000
39.246101
79
0.5928
false
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/dispeak.py
23
4368
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, remove_end, xpath_element, xpath_text, ) class DigitallySpeakingIE(InfoExtractor): _VALID_URL = r'https?://(?:s?evt\.dispeak|events\.digitallyspeaking)\.com/...
gpl-3.0
-644,573,189,458,565,600
36.016949
112
0.540751
false
damianam/easybuild-framework
easybuild/toolchains/craypgi.py
5
1596
## # Copyright 2014-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Hercules foundation (http:...
gpl-2.0
-7,995,501,323,763,502,000
43.333333
115
0.764411
false
quamilek/django
tests/admin_inlines/tests.py
118
44045
from __future__ import unicode_literals import datetime import warnings from django.contrib.admin import ModelAdmin, TabularInline from django.contrib.admin.helpers import InlineAdminForm from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.auth.models import Permission, User from...
bsd-3-clause
4,721,046,444,730,954,000
51.12426
233
0.656533
false
dbkaynor/PyCopyMoveTk
auxfiles/Send2Trash/Send2Trash-1.3.0/send2trash/plat_win.py
2
1655
# Copyright 2013 Hardcoded Software (http://www.hardcoded.net) # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses/bsd_license from __future__ import unicode_literals ...
gpl-2.0
6,834,559,875,260,292,000
26.583333
87
0.670091
false
timonwong/foo_uie_wsh_panel_mod.scintilla
test/simpleTests.py
4
74073
# -*- coding: utf-8 -*- # Requires Python 2.7 or later from __future__ import with_statement from __future__ import unicode_literals import codecs, ctypes, os, sys, unittest if sys.platform == "win32": import XiteWin as Xite else: import XiteQt as Xite class TestSimple(unittest.TestCase): def setUp(self): sel...
isc
-2,735,364,442,869,949,000
33.864814
122
0.72912
false
qedsoftware/commcare-hq
corehq/apps/app_manager/tests/test_translations.py
1
2099
# coding=utf-8 import os from lxml import etree from django.test import TestCase from corehq.apps.app_manager.models import Application from corehq.apps.app_manager.tests.util import SuiteMixin from corehq.apps.app_manager.translations import escape_output_value import commcare_translations class AppManagerTransla...
bsd-3-clause
907,193,766,072,327,000
45.177778
142
0.619346
false
uannight/reposan
plugin.video.tvalacarta/lib/youtube_dl/extractor/swrmediathek.py
64
4375
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, int_or_none, determine_protocol, ) class SWRMediathekIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?swrmediathek\.de/(?:content/)?player\.htm\?show=(?P<id>[\da-f]{8}-[...
gpl-2.0
2,760,507,603,684,567,000
37.017391
150
0.51441
false
HydrelioxGitHub/home-assistant
tests/components/sensor/test_rest.py
2
12631
"""The tests for the REST sensor platform.""" import unittest from pytest import raises from unittest.mock import patch, Mock import requests from requests.exceptions import Timeout, MissingSchema, RequestException import requests_mock from homeassistant.exceptions import PlatformNotReady from homeassistant.setup imp...
apache-2.0
-8,433,154,817,086,836,000
40.963455
79
0.543267
false
MaxTyutyunnikov/lino
lino/modlib/cal/__init__.py
1
1851
# -*- coding: UTF-8 -*- ## Copyright 2011-2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 y...
gpl-3.0
-8,836,564,157,821,136,000
35.77551
77
0.605078
false
josephsnyder/VistA
Scripts/DefaultKIDSBuildInstaller.py
1
30883
#--------------------------------------------------------------------------- # Copyright 2012-2019 The Open Source Electronic Health Record Alliance # # 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 Licen...
apache-2.0
-6,796,245,939,135,587,000
40.903664
96
0.667455
false
jxta/cc
vendor/Twisted-10.0.0/twisted/web/test/test_domhelpers.py
53
11063
# -*- test-case-name: twisted.web.test.test_domhelpers -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Specific tests for (some of) the methods in L{twisted.web.domhelpers}. """ from xml.dom import minidom from twisted.trial.unittest import TestCase from twisted.web import ...
apache-2.0
5,335,483,112,513,000,000
35.153595
146
0.610775
false
PaulKinlan/cli-caniuse
site/app/scripts/bower_components/jsrepl-build/extern/python/closured/lib/python2.7/json/encoder.py
103
16014
"""Implementation of JSONEncoder """ import re try: from _json import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from _json import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x...
apache-2.0
-5,823,712,314,674,305,000
35.230769
78
0.523917
false
halfcrazy/sqlalchemy
lib/sqlalchemy/dialects/mysql/mysqlconnector.py
59
5323
# mysql/mysqlconnector.py # Copyright (C) 2005-2015 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 """ .. dialect:: mysql+mysqlconnector :name: MySQL Connector/Python ...
mit
-4,307,490,482,341,100,500
29.244318
77
0.623708
false
ApplauseOSS/djangoevents
djangoevents/__init__.py
1
1816
import warnings from eventsourcing.domain.model.entity import EventSourcedEntity from eventsourcing.domain.model.entity import entity_mutator from eventsourcing.domain.model.entity import singledispatch from eventsourcing.domain.model.decorators import subscribe_to from eventsourcing.domain.model.events import publish...
mit
7,118,697,928,873,848,000
31.428571
99
0.752203
false
4ON91/KnickKnacks
Boolean Algebra Notes/LogicGates.py
1
10004
import copy import csv import os class Gate: def __init__(self, Sockets): self.Sockets = Sockets self.Inputs = [] self.UniqueInputs = "" def canPass(self): return(True) def getInput(self, I): if( (type(I) == Input) & (I.sym().casefold() not ...
mit
-6,370,016,343,645,416,000
18.692913
113
0.495202
false
PrashntS/scikit-learn
examples/calibration/plot_compare_calibration.py
241
5008
""" ======================================== Comparison of Calibration of Classifiers ======================================== Well calibrated classifiers are probabilistic classifiers for which the output of the predict_proba method can be directly interpreted as a confidence level. For instance a well calibrated (bi...
bsd-3-clause
8,407,790,638,423,949,000
40.04918
80
0.70607
false
Ophiuchus1312/enigma2-master
lib/python/Tools/Downloader.py
3
1714
from twisted.web import client from twisted.internet import reactor, defer from twisted.python import failure class HTTPProgressDownloader(client.HTTPDownloader): def __init__(self, url, outfile, headers=None): client.HTTPDownloader.__init__(self, url, outfile, headers=headers, agent="STB_BOX HTTP Downloader") se...
gpl-2.0
-3,469,827,636,337,851,000
31.339623
102
0.736873
false
pbaesse/Sissens
lib/python2.7/site-packages/eventlet/support/dns/query.py
2
22949
# Copyright (C) 2003-2017 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 "AS IS" AND ...
gpl-3.0
-1,404,223,086,796,775,000
33.406297
80
0.601377
false
terranodo/geonode
geonode/security/tests.py
13
19666
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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
7,167,866,050,882,535,000
38.649194
108
0.613902
false
keitaroyam/yamtbx
dxtbx_formats/FormatEMD.py
1
7738
# Class for reading .emd file by Velox. # This code was written based on FormatSER.py from https://github.com/cctbx/dxtbx/blob/master/format/FormatSER.py from __future__ import absolute_import, division, print_function import struct import h5py import numpy import os import json from scitbx.array_family import flex f...
bsd-3-clause
-5,182,075,166,759,346,000
31.512605
113
0.586069
false
ec-geolink/glharvest
glharvest/tests/test_scenarios.py
1
6841
"""test_scenarios.py End-end-end tests for the Harvester. """ import sys import os import RDF from glharvest import jobs, registry, void def test_can_update_a_provider_with_a_new_resource(repository): """This test tests the case where a provider gives informationa about one resource at time t0 then, at tim...
apache-2.0
-1,854,745,154,394,514,700
30.671296
80
0.66423
false
Duoxilian/home-assistant
homeassistant/helpers/event_decorators.py
7
2746
"""Event Decorators for custom components.""" import functools import logging # pylint: disable=unused-import from typing import Optional # NOQA from homeassistant.core import HomeAssistant # NOQA from homeassistant.helpers import event HASS = None # type: Optional[HomeAssistant] _LOGGER = logging.getLogger(__nam...
mit
-2,787,413,112,130,598,000
31.305882
78
0.606701
false
imply/chuu
build/android/pylib/constants.py
23
3998
# 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. """Defines a set of constants shared by test runners and other scripts.""" import os import subprocess import sys DIR_SOURCE_ROOT = os.path.abspath(os...
bsd-3-clause
23,727,958,607,356,470
37.442308
80
0.723112
false
Laurawly/tvm-1
python/tvm/te/hybrid/preprocessor.py
4
4750
# 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,144,004,332,674,614,000
38.583333
98
0.616421
false
Klafyvel/ISN_2015
nom molecule.py
1
5422
# Nomenclature # Copyright (C) 2015 BOUVIN Valentin, HONNORATY Vincent, LEVY-FALK Hugo # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
gpl-3.0
5,759,920,663,039,216,000
25.753846
116
0.624908
false
seann1/portfolio5
.meteor/dev_bundle/python/Lib/lib-tk/Dialog.py
187
1567
# dialog.py -- Tkinter interface to the tk_dialog script. from Tkinter import * from Tkinter import _cnfmerge if TkVersion <= 3.6: DIALOG_ICON = 'warning' else: DIALOG_ICON = 'questhead' class Dialog(Widget): def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self....
gpl-2.0
-4,216,742,266,629,097,500
30.979592
58
0.435227
false
prathik/thrift
lib/py/setup.py
46
3406
#!/usr/bin/env python # # 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 # "L...
apache-2.0
-5,553,007,174,621,648,000
29.963636
87
0.630358
false
jonashagstedt/swampdragon
chat_example/chat_example/settings.py
13
2576
import os BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '))%*y#of%4cnju5=$-1sab!k...
bsd-3-clause
4,166,193,999,530,727,000
24.76
77
0.720885
false
Shao-Feng/crosswalk-test-suite
webapi/tct-csp-w3c-tests/csp-py/csp_object-src_cross-origin_multi_blocked_int-manual.py
30
2479
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "object-src " + url2 +...
bsd-3-clause
-5,222,405,871,400,813,000
43.267857
83
0.720048
false
erudit/eruditorg
eruditorg/erudit/migrations/0089_thesisprovider.py
1
1911
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-04-24 15:15 from __future__ import unicode_literals from django.db import migrations, models def populate_thesis_providers(apps, schema_editor): ThesisProvider = apps.get_model("erudit", "ThesisProvider") Collection = apps.get_model("erudit", "Coll...
gpl-3.0
-5,948,758,977,435,991,000
34.981132
98
0.559518
false
117111302/PyGithub
github/tests/GitBlob.py
39
2801
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
-3,403,871,653,206,204,000
67.317073
181
0.531953
false
tbeadle/django
tests/forms_tests/widget_tests/test_checkboxselectmultiple.py
13
4796
from django.forms import CheckboxSelectMultiple from .base import WidgetTest class CheckboxSelectMultipleTest(WidgetTest): widget = CheckboxSelectMultiple def test_render_value(self): self.check_html(self.widget(choices=self.beatles), 'beatles', ['J'], html=( """<ul> <li><lab...
bsd-3-clause
-3,166,111,628,266,635,000
41.070175
117
0.5196
false
itsjeyd/edx-platform
openedx/core/djangoapps/api_admin/decorators.py
27
1127
"""Decorators for API access management.""" from functools import wraps from django.core.urlresolvers import reverse from django.http import HttpResponseNotFound from django.shortcuts import redirect from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, ApiAccessConfig def api_access_enabled_or_404...
agpl-3.0
-6,156,260,784,306,147,000
36.566667
91
0.698314
false
eduNEXT/edunext-platform
openedx/core/lib/gating/tests/test_api.py
3
17438
""" Tests for the gating API """ import unittest import six from completion.models import BlockCompletion from ddt import data, ddt, unpack from django.conf import settings from milestones import api as milestones_api from milestones.tests.utils import MilestonesTestCaseMixin from mock import Mock, patch from lms.d...
agpl-3.0
8,644,120,898,333,883,000
42.595
118
0.658046
false
autosportlabs/podium-api
podium_api/types/venue.py
1
2122
#!/usr/bin/env python # -*- coding: utf-8 -*- class PodiumVenue(object): """ Object that represents a Venue. **Attributes:** **venue_id** (int): Venue Id **uri** (string): URI for the Venue. **name** (string): The Venue's name. """ def __init__(self, venue_i...
mit
6,597,366,962,457,001,000
30.646154
77
0.465598
false
vegetableman/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py
121
5674
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
bsd-3-clause
-3,226,710,740,719,380,000
47.495726
198
0.709552
false
demon-ru/iml-crm
addons/report_webkit/company.py
431
2562
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
-2,091,172,529,773,448,000
45.581818
93
0.510148
false
jkonecki/autorest
AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/custom_domain.py
2
1213
# 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
5,302,520,000,750,764,000
33.657143
76
0.587799
false
pombreda/https-gitorious.org-appstream-software-center
softwarecenter/ui/gtk3/widgets/cellrenderers.py
4
18064
# Copyright (C) 2011 Canonical # # Authors: # Matthew McGowan # Michael Vogt # # 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; version 3. # # This program is distributed in the hope that it wi...
gpl-3.0
7,838,097,763,595,269,000
30.470383
79
0.549878
false
tx137884746/IzayoiMiku
toughradius/tools/livecd.py
4
4933
#!/usr/bin/env python #coding:utf-8 from toughradius.tools.secret import gen_secret def echo_radiusd_cnf(): return '''[DEFAULT] debug = 0 tz = CST-8 secret = %s ssl = 1 privatekey = /var/toughradius/privkey.pem certificate = /var/toughradius/cacert.pem [database] dbtype = mysql dburl = mysql://radiusd:root@127.0....
agpl-3.0
7,071,285,846,787,794,000
20.928889
79
0.750659
false
shumik/skencil-c
Sketch/UI/gradientedit.py
1
9796
# Sketch - A Python-based interactive drawing program # Copyright (C) 1998, 1999, 2000, 2002 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of th...
gpl-2.0
-2,294,719,440,032,112,400
29.141538
74
0.667211
false
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Utilities/DataConversions/XMLToXLS.py
5
2894
# -*- coding: utf-8 -*- ############################################################################### # # XMLToXLS # Converts an XML file to a Base64 encoded Excel file. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
gpl-3.0
7,555,716,233,608,682,000
34.292683
183
0.671044
false
umitproject/openmonitor-aggregator
simplejson/tests/test_fail.py
136
3555
from unittest import TestCase import simplejson as json # Fri Dec 30 18:57:26 2005 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_...
agpl-3.0
9,055,653,390,019,539,000
38.076923
87
0.587342
false
sadmansk/servo
components/script/dom/bindings/codegen/parser/tests/test_constructor.py
23
9627
import WebIDL def WebIDLTest(parser, harness): def checkArgument(argument, QName, name, type, optional, variadic): harness.ok(isinstance(argument, WebIDL.IDLArgument), "Should be an IDLArgument") harness.check(argument.identifier.QName(), QName, "Argument has the right QName") ...
mpl-2.0
-2,174,718,412,636,529,200
34.393382
135
0.608185
false
taktik/account-invoicing
account_invoice_shipping_address/tests/test_invoice_shipping_test.py
30
2274
# -*- coding: utf-8 -*- ############################################################################## # This file is part of account_invoice_shipping_address, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # account_invoice_line_sort is free software: you can redistribute it # ...
agpl-3.0
5,404,146,399,965,696,000
39.607143
79
0.62577
false
josiah-wolf-oberholtzer/supriya
tests/commands/test_commands_SynthNewRequest.py
1
3544
import pytest import uqbar.strings import supriya def test_do_not_coerce_arguments(): synth = supriya.realtime.Synth() group = supriya.realtime.Group() assert synth.node_id is None assert group.node_id is None request = supriya.commands.SynthNewRequest( node_id=synth, synthdef=synth.synth...
mit
573,024,230,306,719,400
32.433962
84
0.625
false
zsoltdudas/lis-tempest
tempest/services/object_storage/object_client.py
4
9809
# 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
-5,059,720,037,875,156,000
37.01938
79
0.567132
false
adamncasey/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_parser.py
451
3612
from __future__ import absolute_import, division, unicode_literals import os import sys import traceback import warnings import re warnings.simplefilter("error") from .support import get_data_files from .support import TestData, convert, convertExpected, treeTypes from html5lib import html5parser, constants # Run t...
mpl-2.0
3,338,820,939,834,580,000
36.625
98
0.576689
false
chrishokamp/fuel
fuel/transformers/image.py
6
12409
from __future__ import division from io import BytesIO import math import numpy from PIL import Image from six import PY3 try: from ._image import window_batch_bchw window_batch_bchw_available = True except ImportError: window_batch_bchw_available = False from . import ExpectsAxisLabels, SourcewiseTransfo...
mit
-2,894,919,595,764,940,300
44.621324
79
0.606737
false
jandom/rdkit
rdkit/Chem/FeatMaps/FeatMapParser.py
12
5307
# $Id$ # # Copyright (C) 2006 Greg Landrum # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from rdkit import Geometry from rdkit.Chem.FeatMaps imp...
bsd-3-clause
5,239,492,474,791,536,000
26.78534
100
0.557754
false
xingyepei/edx-platform
common/lib/capa/capa/safe_exec/lazymod.py
193
1200
"""A module proxy for delayed importing of modules. From http://barnesc.blogspot.com/2006/06/automatic-python-imports-with-autoimp.html, in the public domain. """ import sys class LazyModule(object): """A lazy module proxy.""" def __init__(self, modname): self.__dict__['__name__'] = modname ...
agpl-3.0
2,710,745,150,038,104,600
26.906977
84
0.526667
false