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
sagersmith8/ai_graph_coloring
ai_graph_color/algorithms/min_conflicts.py
1
3360
import random params = {} def run(graph, setup, params): """ Color a graph using min-conflicts: First generate a random coloring for the graph. Until there are no conflicts in the graph, choose a random node in the graph, and change it to have the color which reduces the number of co...
mit
-5,968,637,789,788,050,000
30.401869
74
0.639286
false
camptocamp/ngo-addons-backport
addons/account/wizard/account_move_line_reconcile_select.py
56
2399
# -*- 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
-4,828,834,533,599,793,000
42.545455
119
0.598747
false
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/editor_subscribe_label_deleted.py
1
1251
""" .. module:: editor_subscribe_label_deleted The **Editor Subscribe Label Deleted** Model. PostgreSQL Definition --------------------- The :code:`editor_subscribe_label_deleted` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE editor_subscribe_label_deleted ( editor...
gpl-2.0
6,204,609,620,109,610,000
26.8
89
0.686651
false
legnaleurc/tornado
demos/facebook/facebook.py
12
4412
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-4,845,263,619,395,074,000
34.869919
79
0.637353
false
Vrturo/FrontEndLabz
techTutorials/webpack/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
1446
65937
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the MSVSSettings.py file.""" import StringIO import unittest import gyp.MSVSSettings as MSVSSettings class TestSequence...
mit
-8,932,218,891,725,674,000
43.461902
81
0.555985
false
SunghanKim/numpy
numpy/_import_tools.py
93
13292
from __future__ import division, absolute_import, print_function import os import sys import warnings __all__ = ['PackageLoader'] class PackageLoader(object): def __init__(self, verbose=False, infunc=False): """ Manages loading packages. """ if infunc: _level = 2 else...
bsd-3-clause
4,811,259,706,840,937,000
36.654391
87
0.500527
false
Moth-Tolias/LetterBoy
backend/jumbles nontrobo/jumbles nontrobo - last working.py
1
3870
"""return a jumbled version of a string. eg, the lazy hamster is jumping becomes the lzay hmasetr si jmunipg shuffles insides of words. """ import random #okay, so this will be the jmuble algorythim #variables, passed #string_to_jumble = "" #yeah #jumble_mode = true # do u switch words of two letters d...
gpl-3.0
-3,482,883,484,410,717,000
43
108
0.435142
false
jsaveta/Lance
src/rescal/build/lib.linux-x86_64-2.7/setuptools/tests/test_resources.py
42
24620
#!/usr/bin/python # -*- coding: utf-8 -*- # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh import os, pkg_resources, sys, StringIO, tempfile, shutil t...
apache-2.0
3,188,961,884,927,254,000
37.168992
94
0.557171
false
vxsx/django-cms
cms/tests/test_plugins.py
1
80142
# -*- coding: utf-8 -*- import base64 import datetime import json import os from django import http from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.core import urlresolvers from django.core.cache import cache from django.core.exceptions import ( Valida...
bsd-3-clause
-2,128,556,834,963,605,500
41.971582
148
0.611989
false
kedz/cuttsum
trec2015/sbin/l2s/apsal-dev.py
1
9067
import cuttsum.events import cuttsum.corpora from cuttsum.pipeline import InputStreamResource from cuttsum.classifiers import NuggetRegressor import cuttsum.judgements import pandas as pd import numpy as np from datetime import datetime from cuttsum.misc import event2semsim from sklearn.cluster import AffinityPropagat...
apache-2.0
-570,951,169,855,178,500
35.708502
131
0.5209
false
loco-odoo/localizacion_co
openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/purchase_requisition_analytic/__init__.py
10
1507
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
553,114,039,402,153,660
42.057143
78
0.689449
false
ekasitk/sahara
sahara/swift/utils.py
1
2014
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-1,414,392,039,323,449,600
31.483871
76
0.610228
false
vipulkanade/EventbriteDjango
lib/python2.7/encodings/iso8859_10.py
593
13845
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
mit
4,073,350,683,409,094,000
44.09772
109
0.539545
false
codrut3/tensorflow
tensorflow/contrib/specs/python/params_ops.py
186
3104
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-5,145,872,436,486,963,000
34.678161
80
0.718428
false
linucks/ample
ample/ensembler/truncation_util.py
1
17337
"""Truncation utility module""" __author__ = "Jens Thomas, and Felix Simkovic" __date__ = "10 Jul 2018" __version__ = "1.0" import collections from enum import Enum import logging import os import sys from ample.ensembler._ensembler import model_core_from_fasta from ample.util import ample_util, pdb_edit, theseus lo...
bsd-3-clause
-1,135,117,132,576,512,600
40.476077
139
0.634597
false
hizardapp/Hizard
hyrodactil/customisable_emails/views.py
1
1940
from django.core.urlresolvers import reverse_lazy from django.template import Context, Template, TemplateSyntaxError from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import View from braces.views import LoginRequiredMixin, AjaxResponseM...
mit
5,798,853,685,719,682,000
32.448276
91
0.716495
false
knowledgepoint-devs/askbot-devel
askbot/management/commands/createsuperuser.py
6
4589
from django.contrib.auth.management.commands.createsuperuser import * from django.db.models.signals import pre_save, post_save class Command(Command): def handle(self, *args, **options): username = options.get('username', None) email = options.get('email', None) interactive = options.get('...
gpl-3.0
-329,512,719,542,613,570
40.342342
120
0.504903
false
gamahead/nupic
nupic/encoders/scalar.py
8
25295
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
gpl-3.0
-7,130,799,813,994,129,000
32.998656
131
0.613481
false
jamespcole/home-assistant
homeassistant/components/weather/__init__.py
10
5177
"""Weather component that handles meteorological data for your location.""" from datetime import timedelta import logging from homeassistant.const import PRECISION_TENTHS, PRECISION_WHOLE, TEMP_CELSIUS from homeassistant.helpers.config_validation import ( # noqa PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE) from homeass...
apache-2.0
6,879,434,826,418,162,000
28.08427
79
0.636662
false
ksmit799/Toontown-Source
toontown/coghq/PromotionManagerAI.py
1
3193
from otp.ai.AIBaseGlobal import * from direct.directnotify import DirectNotifyGlobal import random from toontown.suit import SuitDNA import CogDisguiseGlobals from toontown.toonbase.ToontownBattleGlobals import getInvasionMultiplier MeritMultiplier = 0.5 class PromotionManagerAI: notify = DirectNotifyGlobal.direct...
mit
-3,792,264,735,216,179,700
39.935897
114
0.539931
false
SlimRoms/android_external_chromium
net/tools/testserver/testserver.py
66
51380
#!/usr/bin/python2.4 # 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. """This is a simple HTTP server used for testing Chrome. It supports several test URLs, as specified by the handlers in TestPageHan...
bsd-3-clause
6,005,705,382,061,677,000
33.716216
79
0.630518
false
riddlezyc/geolab
src/structure/metricC.py
1
12965
import pickle import matplotlib.pyplot as plt from datetime import datetime criteriaA = 4.0 criteriaB = 4.0 criteriaC = 10.0 dirName = r'F:\simulations\asphaltenes\production\longtime\athInHeptane\nvt\analysis\fullmatrix/' # dirName = r'F:\simulations\asphaltenes\production\longtime\athInHeptane-illite\nvt\a...
gpl-3.0
-8,479,721,767,991,081,000
35.471098
135
0.661859
false
LChristakis/chalice-hunter
lib/python3.4/site-packages/scss/extension/compass/helpers.py
4
19696
"""Miscellaneous helper functions ported from Compass. See: http://compass-style.org/reference/compass/helpers/ This collection is not necessarily complete or up-to-date. """ from __future__ import absolute_import from __future__ import unicode_literals import logging import math import os.path import six from . i...
mit
-6,332,614,891,195,810,000
29.301538
319
0.561434
false
HydrelioxGitHub/home-assistant
homeassistant/components/weather/metoffice.py
2
3688
"""Support for UK Met Office weather service.""" import logging import voluptuous as vol from homeassistant.components.sensor.metoffice import ( CONDITION_CLASSES, ATTRIBUTION, MetOfficeCurrentData) from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity from homeassistant.const import ( C...
apache-2.0
-8,348,720,328,298,643,000
29.479339
79
0.656725
false
bbc/kamaelia
Sketches/RJL/Packages/Kamaelia/Community/RJL/Kamaelia/Util/LineSplit.py
9
1318
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
apache-2.0
-4,028,228,055,655,163,400
38.939394
90
0.683612
false
ecohealthalliance/EpiTator
epitator/annospan.py
1
6496
#!/usr/bin/env python # coding=utf8 from __future__ import absolute_import EMPTY_LIST = [] class AnnoSpan(object): """ A span of text with an annotation applied to it. """ __slots__ = ["start", "end", "doc", "metadata", "label", "base_spans"] def __init__(self, start, end, doc, label=None, meta...
apache-2.0
-3,490,529,948,418,873,000
31.318408
94
0.54141
false
christabor/MoAL
MOAL/software_engineering/problem_solving/design_patterns/grasp/pattern_polymorphism.py
1
1104
# -*- coding: utf-8 -*- __author__ = """Chris Tabor (dxdstudio@gmail.com)""" if __name__ == '__main__': from os import getcwd from os import sys sys.path.append(getcwd()) from MOAL.helpers.display import Section DEBUG = True if __name__ == '__main__' else False class BlobOfMatter(object): def __s...
apache-2.0
1,281,385,520,188,333,800
20.647059
80
0.63587
false
syrrim/werkzeug
examples/plnt/views.py
52
1145
# -*- coding: utf-8 -*- """ plnt.views ~~~~~~~~~~ Display the aggregated feeds. :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ from datetime import datetime, date from plnt.database import Blog, Entry from plnt.utils import Pagination, expose, render_te...
bsd-3-clause
-1,374,270,286,777,117,200
27.625
76
0.631441
false
saulpw/visidata
visidata/loaders/html.py
1
4860
import html from visidata import * option('html_title', '<h2>{sheet.name}</h2>', 'table header when saving to html') def open_html(p): return HtmlTablesSheet(p.name, source=p) open_htm = open_html class HtmlTablesSheet(IndexSheet): rowtype = 'sheets' # rowdef: HtmlTableSheet (sheet.html = lxml.html.HtmlEle...
gpl-3.0
-5,332,443,202,079,372,000
34.735294
125
0.519753
false
krisdages/ultisnips
test/test_MultipleMatches.py
29
2438
from test.vim_test_case import VimTestCase as _VimTest from test.constant import * # Selecting Between Same Triggers {{{# class _MultipleMatches(_VimTest): snippets = (('test', 'Case1', 'This is Case 1'), ('test', 'Case2', 'This is Case 2')) class Multiple_SimpleCaseSelectFirst_ECR(_MultipleMa...
gpl-3.0
-4,793,135,993,250,300,000
32.861111
69
0.539787
false
zhukaixy/kbengine
kbe/src/lib/python/Lib/test/test_mimetypes.py
111
4279
import io import locale import mimetypes import sys import unittest from test import support # Tell it we don't know about external files: mimetypes.knownfiles = [] mimetypes.inited = False mimetypes._default_mime_types() class MimeTypesTestCase(unittest.TestCase): def setUp(self): self.db = mimetypes.M...
lgpl-3.0
-48,235,949,864,132,260
37.54955
78
0.618836
false
weizhenwei/qemu
scripts/qapi.py
66
19807
# # QAPI helper library # # Copyright IBM, Corp. 2011 # Copyright (c) 2013 Red Hat Inc. # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-level directory. import re from o...
gpl-2.0
3,588,182,292,378,564,000
32.011667
104
0.515171
false
Duoxilian/home-assistant
homeassistant/components/switch/orvibo.py
29
3065
""" Support for Orvibo S20 Wifi Smart Switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.orvibo/ """ import logging import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.con...
mit
-3,876,386,289,761,472,000
27.64486
76
0.615008
false
jlegendary/Dato-Core
src/unity/python/graphlab/meta/asttools/visitors/cond_symbol_visitor.py
13
11320
''' Created on Aug 4, 2011 @author: sean ''' from __future__ import print_function from graphlab.meta.asttools.visitors import Visitor, visit_children from graphlab.meta.asttools.visitors.symbol_visitor import get_symbols import ast from graphlab.meta.utils import py2op class ConditionalSymbolVisitor(Visitor): ...
agpl-3.0
-7,196,478,085,233,548,000
25.082949
93
0.617314
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib_pypy/pyrepl/simple_interact.py
3
2395
# Copyright 2000-2010 Michael Hudson-Doyle <micahel@gmail.com> # Armin Rigo # # All Rights Reserved # # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose is hereby granted without fee, # provided that the above copyrigh...
agpl-3.0
5,640,851,622,745,702,000
35.846154
77
0.650522
false
liukaijv/XlsxWriter
xlsxwriter/test/app/test_app02.py
8
2248
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...app import App class TestAssembleApp(uni...
bsd-2-clause
-38,802,672,305,794,560
33.060606
190
0.488434
false
bobisme/odoo
addons/mrp_operations/mrp_operations.py
17
26993
# -*- 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
-8,339,859,435,494,765,000
48.167577
184
0.566925
false
jabesq/home-assistant
tests/components/rflink/test_switch.py
11
10068
"""Test for RFlink switch components. Test setup of rflink switch component/platform. State tracking and control of Rflink switch devices. """ from homeassistant.components.rflink import EVENT_BUTTON_PRESSED from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_ON, STATE_OFF)...
apache-2.0
-6,600,692,773,719,534,000
27.521246
78
0.548669
false
hdinsight/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/chart/axis.py
10
12070
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Float, NoneSet, Bool, Integer, MinMax, NoneSet, Set, String, Alias, ) from openpyxl.descriptors.excel i...
apache-2.0
7,736,900,992,384,913,000
30.67979
103
0.599503
false
aperigault/ansible
lib/ansible/modules/windows/win_updates.py
2
10479
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Matt Davis <mdavis_ansible@rolpdog.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of ...
gpl-3.0
4,209,360,081,230,910,500
38.394737
142
0.67287
false
AgentN/namebench
libnamebench/nameserver.py
173
18079
#!/usr/bin/env python # Copyright 2009 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
3,055,970,365,721,893,400
30.606643
122
0.653355
false
hynekcer/django
tests/model_fields/models.py
210
12155
import os import tempfile import uuid from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models.fields.files import Imag...
bsd-3-clause
4,913,840,367,956,697,000
30.246787
85
0.647964
false
xiaoyaozi5566/GEM5_DRAMSim2
src/mem/slicc/generate/tex.py
92
2816
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
1,660,621,592,695,280,600
38.661972
72
0.681818
false
pygeo/geoval
tests/test_mintrend.py
1
3310
# -*- coding: utf-8 -*- """ This file is part of GEOVAL. (c) Alexander Loew For COPYING and LICENSE details, please refer to the LICENSE file """ import sys sys.path.append('..') import unittest from geoval.core import GeoData from geoval.statistic.mintrend import MintrendPlot try: import cPickle # p2 except: ...
apache-2.0
-3,712,419,466,829,709,000
26.583333
70
0.549547
false
nvoron23/socialite
jython/Lib/test/test_classdecorators.py
23
1192
# This test is temporary until we can import test_decorators from CPython 3.x # The reason for not doing that already is that in Python 3.x the name of a # function is stored in func.__name__, in 2.x it's func.func_name import unittest from test import test_support class TestClassDecorators(unittest.TestCase): de...
apache-2.0
-1,258,820,889,081,050,400
24.913043
77
0.562919
false
ishay2b/tensorflow
tensorflow/tools/docs/generate_lib_test.py
52
4345
# 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
-6,510,345,988,901,072,000
31.185185
80
0.648101
false
nvbn/python-social-auth
social/backends/dropbox.py
3
1431
""" Dropbox OAuth support. This contribution adds support for Dropbox OAuth service. The settings DROPBOX_APP_ID and DROPBOX_API_SECRET must be defined with the values given by Dropbox application registration process. By default account id and token expiration time are stored in extra_data field, check OAuthBackend ...
bsd-3-clause
7,237,916,902,855,774,000
36.657895
72
0.662474
false
blorgon9000/pyopus
pyopus/misc/sobol.py
1
1725
""" .. inheritance-diagram:: pyopus.misc.sobol :parts: 1 **Sobol sequence generator** Details can be found in [joekuo1] S. Joe and F. Y. Kuo, Remark on Algorithm 659: Implementing Sobol's quasirandom sequence generator, ACM Trans. Math. Softw. 29, 49-57 (2003). [joekuo2] S. Joe and F. Y. Kuo, Const...
gpl-3.0
680,694,450,508,106,900
21.697368
89
0.641739
false
prospwro/odoo
addons/irsid_edu_training/models/core.py
2
7407
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution Addon # Copyright (C) 2009-2013 IRSID (<http://irsid.ru>), # Paul Korotkov (korotkov.paul@gmail.com). # # This program is free software: you can redistribute it...
agpl-3.0
7,192,824,673,130,082,000
35.131707
161
0.563656
false
lucker6666/m4loc
corpus/corpus-cleaning-tool/src/scripts/corpustool/common/weird_align_clean.py
3
7477
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 Adobe Systems Incorporated # # This file is part of TMX to Moses Corpus Tool. # # TMX to Moses Corpus Tool 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 Sof...
lgpl-3.0
4,525,497,297,986,014,000
34.103286
115
0.647586
false
yakky/django-cms
cms/tests/test_page_user_group_admin.py
3
18350
# -*- coding: utf-8 -*- from django.contrib.messages.storage.cookie import CookieStorage from django.forms.models import model_to_dict from django.test.utils import override_settings from cms.models.permissionmodels import PageUserGroup from cms.test_utils.testcases import CMSTestCase from cms.utils.urlutils import ad...
bsd-3-clause
2,386,079,561,028,959,700
37.389121
86
0.614223
false
dcroc16/skunk_works
google_appengine/google/appengine/_internal/django/utils/translation/trans_real.py
23
20698
"""Translation helper functions.""" import locale import os import re import sys import warnings import gettext as gettext_module from cStringIO import StringIO from google.appengine._internal.django.utils.importlib import import_module from google.appengine._internal.django.utils.safestring import mark_safe, SafeDat...
mit
-7,977,274,258,106,971,000
36.632727
110
0.609189
false
freaker2k7/chalice
chalice/local.py
1
7587
"""Dev server used for running a chalice app locally. This is intended only for local development purposes. """ import functools from collections import namedtuple from BaseHTTPServer import HTTPServer from BaseHTTPServer import BaseHTTPRequestHandler from chalice.app import Chalice # noqa from typing import List,...
apache-2.0
2,327,571,466,530,337,000
35.830097
79
0.601292
false
eoss-cloud/madxxx_catalog_api
catalog/manage/sentinelcatalog.py
1
4889
#-*- coding: utf-8 -*- """ EOSS catalog system Implementation of ESA sentinel1/2 catalog access (https://scihub.copernicus.eu) Users need to register at the scihub page to get access to their catalog system. These credentials are set by SENTINEL_USER and SENTINEL_PASSWORD """ __author__ = "Thilo Wehrmann, Steffen Ge...
mit
-7,856,861,038,545,234,000
38.112
145
0.598486
false
antb/TPT----My-old-mod
src/python/stdlib/test/test_cookie.py
3
3429
# Simple test suite for Cookie.py from test.test_support import run_unittest, run_doctest, check_warnings import unittest import Cookie class CookieTests(unittest.TestCase): # Currently this only tests SimpleCookie def test_basic(self): cases = [ { 'data': 'chips=ahoy; vienna=finger', ...
gpl-2.0
8,155,990,406,007,631,000
37.1
83
0.5331
false
ArcherSys/ArcherSys
Lib/site-packages/nbformat/v3/__init__.py
18
2328
"""The main API for the v3 notebook format. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. __all__ = ['NotebookNode', 'new_code_cell', 'new_text_cell', 'new_notebook', 'new_output', 'new_worksheet', 'new_metadata', 'new_author', 'new_head...
mit
-6,399,792,202,177,073,000
32.257143
79
0.640034
false
barryrobison/arsenalsuite
cpp/apps/absubmit/cinema4d/submit.py
10
9966
#!/usr/bin/python from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.uic import * from blur.Stone import * from blur.Classes import * from blur.absubmit import Submitter from blur.Classesui import * import sys, os class Cinema4DRenderDialog(QDialog): def __init__(self,parent=None): QDialo...
gpl-2.0
7,488,257,979,023,897,000
34.911111
121
0.686835
false
sivel/ansible
test/integration/targets/module_utils_urls/library/test_peercert.py
29
2346
#!/usr/bin/python # Copyright: (c) 2020, 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 DOCUMENTATION = r''' --- module: test_perrcert short_description: Test getting t...
gpl-3.0
4,521,649,772,704,292,000
22.938776
92
0.589088
false
lammps/lammps
tools/i-pi/ipi/utils/softexit.py
41
2190
"""Utility functions for killing the wrapper softly. Copyright (C) 2013, Joshua More and Michele Ceriotti 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...
gpl-2.0
3,158,669,356,810,013,000
29
109
0.69863
false
alcobar/asuswrt-merlin
release/src/router/samba-3.5.8/source4/heimdal/lib/wind/UnicodeData.py
22
2225
#!/usr/local/bin/python # -*- coding: iso-8859-1 -*- # $Id: UnicodeData.py,v 1.1.1.1 2011/06/10 09:34:43 andrew Exp $ # Copyright (c) 2004 Kungliga Tekniska Högskolan # (Royal Institute of Technology, Stockholm, Sweden). # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
gpl-2.0
6,080,877,680,592,532,000
38.017544
77
0.695594
false
jay-lau/magnum
magnum/tests/functional/api/v1/models/baypatch_model.py
1
2317
# 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, software # distributed under the Li...
apache-2.0
-1,759,443,867,520,639,200
29.486842
79
0.6612
false
benoitsteiner/tensorflow
tensorflow/contrib/data/python/kernel_tests/sequence_dataset_op_test.py
39
8034
# 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
3,328,055,249,171,803,000
37.075829
80
0.659821
false
tanmaykm/edx-platform
common/test/acceptance/tests/lms/test_programs.py
13
6048
"""Acceptance tests for LMS-hosted Programs pages""" from nose.plugins.attrib import attr from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogConfigMixin from common.test.acceptance.fixtures.programs import ProgramsFixture, ProgramsConfigMixin from common.test.acceptance.fixtures.course import C...
agpl-3.0
-1,313,271,414,891,047,700
35.878049
92
0.671792
false
frankvdp/django
django/conf/locale/zh_Hans/formats.py
140
1745
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' # 2016年9月5日 TIME_FORMAT = 'H:i' # 20:45 DATETIME_FORMAT ...
bsd-3-clause
6,058,085,921,634,286,000
37.738095
78
0.532883
false
TallonRain/horsefaxbot
horsefax/telegram/connections/polling.py
1
1484
import requests import threading import time import traceback from . import TelegramConnection, MessageHandler class LongPollingConnection(TelegramConnection): def __init__(self, token: str, handler: MessageHandler) -> None: super().__init__(token, handler) self._connected = False self.la...
mit
-8,236,183,927,230,833,000
31.977778
120
0.574124
false
v-iam/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/express_route_circuit_sku.py
2
1546
# 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
8,841,200,829,822,611,000
38.641026
79
0.613195
false
MQQiang/kbengine
kbe/src/lib/python/Lib/http/cookiejar.py
63
75791
r"""HTTP cookie handling for web clients. This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly from Pyt...
lgpl-3.0
-2,230,302,964,128,416,800
35.437981
83
0.539127
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/segmentation/tests/test_clear_border.py
4
4369
import numpy as np from skimage.segmentation import clear_border from skimage._shared.testing import assert_array_equal, assert_ def test_clear_border(): image = np.array( [[0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [1, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1,...
gpl-3.0
-6,396,565,381,073,427,000
25.640244
63
0.389105
false
adobe/chromium
third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_table.py
33
7098
#!/usr/bin/python2 # (C) Copyright IBM Corporation 2004 # 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 # on the ri...
bsd-3-clause
5,519,281,530,516,113,000
29.995633
147
0.636658
false
rossburton/yocto-autobuilder
lib/python2.7/site-packages/buildbot_slave-0.8.8-py2.7.egg/buildslave/test/fake/slavebuilder.py
4
1411
# 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
-6,571,383,395,002,076,000
36.131579
79
0.710843
false
an7oine/WinVHS
Cygwin/lib/python2.7/xml/sax/handler.py
230
13921
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ """ version ...
gpl-3.0
-6,895,307,079,925,075,000
39.704678
82
0.678471
false
glenn-edgar/local_controller_3
io_control_py3/click_controller_class_py3.py
1
8632
# # # File: io_controller_class.py # # # # # import struct import os import sys import time import select import socket import json import redis class Click_Controller_Base_Class(object): def __init__(self,instrument, click_io = [], m_tags = {}): self.instrument = instrument s...
mit
-3,978,368,981,707,315,700
31.700758
92
0.550046
false
eggplantbren/ExperimentalNS
TwoScalars/DNest/postprocess.py
1
7100
# Copyright (c) 2009, 2010, 2011, 2012 Brendon J. Brewer. # # This file is part of DNest3. # # DNest3 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 ...
gpl-3.0
1,783,324,148,497,494,000
30.555556
118
0.647465
false
raymondxyang/tensorflow
tensorflow/python/saved_model/loader.py
127
2726
# 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
-2,773,952,534,587,945,000
34.402597
81
0.696258
false
111t8e/h2o-2
src/test/python/take_one_test.py
9
1096
import unittest from proboscis.asserts import assert_equal from proboscis.asserts import assert_false from proboscis.asserts import assert_raises from proboscis.asserts import assert_true from proboscis import after_class from proboscis import before_class from proboscis import SkipTest from proboscis import test impo...
apache-2.0
-6,494,309,842,735,631,000
25.095238
74
0.65146
false
vgupta6/Project-2
tests/unit_tests/modules/s3/s3gis/TrueCodePaths.py
20
13547
import unittest class TrueCodePaths(unittest.TestCase): def setUp(self): vars = request.vars vars["lat"] = 0 vars["lon"] = 0 vars["zoom"] = 1 self.old_s3roles = list(session.s3.roles) session.s3.roles.append(1) def tearDown(self): ...
mit
-6,588,868,119,941,779,000
43.127036
126
0.455008
false
gvangool/django-extensions
django_extensions/management/commands/drop_test_database.py
25
5810
import logging from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from six.moves import configparser, input from django_extensions.management.utils import signalcommand try: from django.db.backends.base.creation import TEST_DATABASE...
mit
-1,182,647,226,884,021,500
37.223684
97
0.559725
false
caot/intellij-community
python/edu/interactive-learning-python/resources/com/jetbrains/python/edu/user_tester.py
41
1825
import sys import imp import os import subprocess USER_TESTS = "userTests" TEST_FAILED = "FAILED" TEST_PASSED = "PASSED" INPUT = "input" OUTPUT = "output" def get_index(logical_name, full_name): logical_name_len = len(logical_name) if full_name[:logical_name_len] == logical_name: return int(full_n...
apache-2.0
-7,792,621,368,915,255,000
30.482759
89
0.631781
false
koolventure/replicator
dnaEncoder.py
1
1184
#Software to encode binary information to DNA nucleotides import binascii import re class DNAEncoder: def __init__(self): self.binaryArray = [] self.nucleotideArray = [] #This section of code is used for the express purpose of encoding binary information #Creates a demilited binary array ...
mit
-6,776,970,214,308,494,000
31.916667
88
0.587838
false
nickpack/reportlab
tests/test_platypus_tables.py
1
38444
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __version__=''' $Id: test_platypus_tables.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__='Test script for reportlab.tables' from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocatio...
bsd-3-clause
-5,431,156,032,419,355,000
42.963743
216
0.50809
false
sbesson/PyGithub
tests/PullRequest1375.py
3
2693
############################ Copyrights and license ############################ # # # Copyright 2019 Olof-Joachim Frahm <olof@macrolet.net> # # ...
lgpl-3.0
-197,754,754,950,084,400
57.543478
90
0.476049
false
chihyaoma/Activity-Recognition-with-CNN-and-RNN
textOverlay/TextOverlay.py
1
4692
# This is a Python code using OpenCV to print the probabilities and predictions on videos # # I am working for a deadline. It's still messed up... # # Contact: Chih-Yao Ma at cyma@gatech.edu import numpy as np import cv2 import random import re n = 3 # number of predictions per video nVideo = 3754 # number of tota...
mit
3,586,530,434,550,360,000
34.014925
139
0.672421
false
rmcgibbo/msmbuilder
msmbuilder/tests/test_vmhmm.py
2
3951
from __future__ import print_function, division import numpy as np from msmbuilder.hmm import VonMisesHMM from msmbuilder.example_datasets import AlanineDipeptide from msmbuilder.featurizer import DihedralFeaturizer from scipy.stats.distributions import vonmises from itertools import permutations import random def t...
lgpl-2.1
7,580,943,498,590,068,000
36.990385
102
0.625411
false
evaschalde/odoo
addons/membership/report/__init__.py
432
1079
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
-653,762,815,682,500,400
45.913043
79
0.612604
false
nathanielcompton/actuallypittsburgh
actuallypittsburgh/ap_bot.py
1
1562
""" Run through comments in a specified list of subreddits, look for typos, and if a typo is found, post a new comment with the corrected spelling. """ import praw import time import logging from . import ap_config logger = logging.getLogger(__name__) # User agent info so Reddit can track the bot r = pra...
mit
518,651,527,120,299,400
32.956522
83
0.62548
false
sigma-random/numpy
tools/win32build/prepare_bootstrap.py
81
3648
from __future__ import division, print_function import os import subprocess import shutil from os.path import join as pjoin, split as psplit, dirname from zipfile import ZipFile import re def get_sdist_tarball(): """Return the name of the installer built by wininst command.""" # Yeah, the name logic is harcod...
bsd-3-clause
-6,533,877,941,702,918,000
31.864865
203
0.591831
false
DJMuggs/ansible-modules-extras
notification/twilio.py
8
5726
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Makai <matthew.makai@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
gpl-3.0
6,242,811,138,412,966,000
31.908046
77
0.676039
false
nvoron23/statsmodels
statsmodels/sandbox/tsa/diffusion2.py
38
13366
""" Diffusion 2: jump diffusion, stochastic volatility, stochastic time Created on Tue Dec 08 15:03:49 2009 Author: josef-pktd following Meucci License: BSD contains: CIRSubordinatedBrownian Heston IG JumpDiffusionKou JumpDiffusionMerton NIG VG References ---------- Attilio Meucci, Review of Discrete and Contin...
bsd-3-clause
8,891,499,505,035,902,000
25.467327
112
0.571375
false
logithr/django-htpayway
htpayway/tests.py
1
2885
# -*- coding: utf-8 -*- from django.test import TestCase, RequestFactory from django.core import exceptions from django.contrib.auth.models import AnonymousUser from .utils import get_payway_class, begin_transaction, format_amount, PayWay from .models import Transaction from decimal import Decimal, InvalidOperation ...
mit
-5,274,580,493,776,877,000
32.546512
80
0.662045
false
wil/pyroman
pyroman/nat.py
1
5751
#Copyright (c) 2011 Erich Schubert erich@debian.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, pu...
mit
-4,800,927,281,825,913,000
41.6
169
0.689445
false
tonihr/pyGeo
Geometrias/PuntoGeodesico.py
1
6474
#!/usr/bin/env python # -*- coding: utf-8 -*- '''! Created on 5/2/2015 @author: Antonio Hermosilla Rodrigo. @contact: anherro285@gmail.com @organization: Antonio Hermosilla Rodrigo. @copyright: (C) 2015 by Antonio Hermosilla Rodrigo @version: 1.0.0 ''' from Geometrias.Angulo import Angulo class PuntoGeodesico(object)...
gpl-2.0
2,668,640,108,811,212,300
35.435028
169
0.569169
false
dosiecki/NewsBlur
vendor/feedvalidator/channel.py
16
9663
"""$Id: channel.py 711 2006-10-25 00:43:41Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 711 $" __date__ = "$Date: 2006-10-25 00:43:41 +0000 (Wed, 25 Oct 2006) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim" from ...
mit
1,205,504,065,043,989,500
33.634409
110
0.667288
false
Max-Vader/namebench
nb_third_party/dns/tokenizer.py
246
17962
# 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
-7,378,620,689,027,716,000
31.837294
108
0.525721
false
Jonadabe/letsencrypt
letsencrypt-nginx/letsencrypt_nginx/tests/obj_test.py
55
3978
"""Test the helper objects in letsencrypt_nginx.obj.""" import unittest class AddrTest(unittest.TestCase): """Test the Addr class.""" def setUp(self): from letsencrypt_nginx.obj import Addr self.addr1 = Addr.fromstring("192.168.1.1") self.addr2 = Addr.fromstring("192.168.1.1:* ssl") ...
apache-2.0
-82,145,044,376,886,750
36.885714
75
0.613122
false
charlesweir/BrickPython
test/TestSensor.py
1
3630
# Tests for Sensor # # Copyright (c) 2014 Charles Weir. Shared under the MIT Licence. import unittest from BrickPython.BrickPi import PORT_1 from BrickPython.Sensor import Sensor, TouchSensor, UltrasonicSensor, LightSensor import TestScheduler class TestSensor(unittest.TestCase): 'Tests for the Sensor classes' ...
mit
6,725,066,906,977,706,000
37.210526
122
0.610744
false
jswope00/GAI
common/djangoapps/django_comment_common/models.py
15
3806
import logging from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from django.utils.translation import ugettext_noop from student.models import CourseEnrollment from xmodule.modulestore.django import modulestore...
agpl-3.0
8,739,094,341,315,440,000
39.924731
118
0.696795
false
benoitsteiner/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/k_feature_decisions_to_data_then_nn.py
189
1874
# 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,349,032,215,539,671,600
42.581395
83
0.692102
false
ntiufalara/openerp7
openerp/addons/sale_stock/stock.py
27
8014
# -*- 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...
mit
-7,818,228,392,840,332,000
51.379085
150
0.631145
false
aclifton/cpeg853-gem5
src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.py
15
3122
# Copyright (c) 2016 Georgia Institute of Technology # 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 conditi...
bsd-3-clause
-5,521,753,135,242,393,000
53.77193
73
0.69827
false
SmartInfrastructures/fuel-web-dev
nailgun/nailgun/orchestrator/provisioning_serializers.py
1
13570
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-3,141,218,317,114,917,000
38.911765
79
0.586367
false