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
sagemath/git-trac-command
git_trac/cmdline.py
1
12216
## -*- encoding: utf-8 -*- """ Handle Command Line Options """ ############################################################################## # The "git trac ..." command extension for git # Copyright (C) 2013 Volker Braun <vbraun.name@gmail.com> # # This program is free software: you can redistribute it and/or mo...
gpl-3.0
1,164,262,400,669,942,300
40.979381
102
0.597823
false
gaboflowers/mallador_v3
unidecode/x059.py
252
4644
data = ( 'Shou ', # 0x00 'Yi ', # 0x01 'Zhi ', # 0x02 'Gu ', # 0x03 'Chu ', # 0x04 'Jiang ', # 0x05 'Feng ', # 0x06 'Bei ', # 0x07 'Cay ', # 0x08 'Bian ', # 0x09 'Sui ', # 0x0a 'Qun ', # 0x0b 'Ling ', # 0x0c 'Fu ', # 0x0d 'Zuo ', # 0x0e 'Xia ', # 0x0f 'Xiong ', # 0x10 ...
gpl-3.0
-2,013,848,095,006,463,200
17
20
0.390827
false
neuront/redis-ctl
models/cluster_plan.py
2
1308
import json from werkzeug.utils import cached_property from base import db, Base, DB_TEXT_TYPE from cluster import Cluster class ClusterBalancePlan(Base): __tablename__ = 'cluster_balance_plan' cluster_id = db.Column(db.ForeignKey(Cluster.id), unique=True, nullable=False) bala...
mit
8,133,717,082,645,176,000
26.829787
79
0.649083
false
gboone/wedding.harmsboone.org
rsvp/migrations/0019_auto__chg_field_guest_notes.py
1
5628
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Guest.notes' db.alter_column(u'rsvp_guest', 'notes', self.gf('django.db.models.fields.Tex...
mit
4,548,199,276,618,365,000
64.453488
165
0.539801
false
YuriGural/erpnext
erpnext/hr/doctype/salary_slip/salary_slip.py
8
16266
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words from frappe.model.naming import ...
gpl-3.0
817,172,144,035,190,800
36.56582
176
0.695254
false
jnez71/demos
signals/gaussian_markov_kernel.py
1
1646
#!/usr/bin/env python3 """ Kernel of Gaussian-transition scalar Markov process? """ import numpy as np from matplotlib import pyplot npr = np.random np.set_printoptions(suppress=True) pyplot.rcParams["font.size"] = 16 pyplot.rcParams["axes.grid"] = True ################################################## SYSTEM def...
mit
6,670,597,085,459,015,000
25.548387
89
0.580194
false
rananda/cfme_tests
cfme/infrastructure/config_management.py
1
19414
from functools import partial from cached_property import cached_property from navmazing import NavigateToSibling, NavigateToAttribute import cfme import cfme.fixtures.pytest_selenium as sel import cfme.web_ui.flash as flash import cfme.web_ui.tabstrip as tabs import cfme.web_ui.toolbar as tb from cfme.web_ui import ...
gpl-2.0
3,822,269,521,155,331,000
35.220149
100
0.62151
false
rawls238/planout
planout-editor/planout-editor-kernel.py
9
2393
from flask import Flask, jsonify, render_template, request, url_for app = Flask(__name__) from planout.interpreter import Interpreter import traceback import json import sys def testPlanOutScript(script, inputs={}, overrides=None, assertions=None): payload = {} # make sure experiment runs with the given inputs ...
bsd-3-clause
8,410,829,750,947,377,000
27.152941
74
0.634768
false
hbrunn/hr
hr_contract_hourly_rate/tests/test_hr_contract_hourly_rates.py
23
7450
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publish...
agpl-3.0
-9,060,705,282,690,150,000
36.437186
78
0.437315
false
mfherbst/spack
var/spack/repos/builtin/packages/r-affxparser/package.py
2
2101
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
4,594,564,581,564,383,000
47.860465
78
0.693003
false
twz915/django
tests/migrations/test_optimizer.py
2
26004
from django.db import migrations, models from django.db.migrations import operations from django.db.migrations.optimizer import MigrationOptimizer from django.test import SimpleTestCase from .models import EmptyManager, UnicodeModel class OptimizerTests(SimpleTestCase): """ Tests the migration autodetector. ...
bsd-3-clause
-8,217,871,205,433,163,000
35.780764
110
0.48754
false
bikong2/django
tests/null_fk_ordering/tests.py
381
2012
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Author, Comment, Forum, Post, SystemInfo class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
bsd-3-clause
-4,001,505,499,062,184,000
46.904762
90
0.684394
false
a-doumoulakis/tensorflow
tensorflow/contrib/tensor_forest/python/tensor_forest.py
5
26323
# 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
6,557,969,534,409,780,000
37.260174
92
0.670288
false
sh1nu11bi/sulley
utils/crash_binning.py
12
10341
# # Crash Binning # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: crash_binning.py 193 2007-04-05 13:30:01Z cameron $ # # 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; e...
gpl-2.0
-3,872,107,706,934,015,500
33.913194
120
0.511846
false
grangier/xhtml2pdf
xhtml2pdf/version.py
61
1551
# -*- coding: utf-8 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 ...
apache-2.0
-8,486,325,982,242,563,000
36.829268
74
0.718246
false
toert/django-shop-template
myshop/urls.py
1
1142
"""myshop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
mit
3,241,782,335,727,302,000
38.413793
80
0.704028
false
Johnetordoff/osf.io
addons/github/api.py
9
5246
from future.moves.urllib.parse import urlencode import github3 import cachecontrol from requests.adapters import HTTPAdapter from requests.exceptions import ConnectionError from addons.github import settings as github_settings from addons.github.exceptions import NotFoundError # Initialize caches https_cache = cach...
apache-2.0
4,574,463,879,318,881,300
30.04142
88
0.601029
false
asmodehn/catkin
test/unit_tests/test_setup_util.py
2
6374
import os import shutil import sys import tempfile import unittest from catkin_pkg.cmake import configure_file data = configure_file(os.path.join(os.path.dirname(__file__), '..', '..', 'cmake', 'templates', '_setup_util.py.in'), { 'CATKIN_LIB_ENVIRONMENT_PATHS': "'lib'"...
bsd-3-clause
-3,447,286,103,721,762,000
45.867647
120
0.543458
false
cherylyli/stress-aid
env/lib/python3.5/site-packages/markupsafe/tests.py
674
6107
# -*- coding: utf-8 -*- import gc import sys import unittest from markupsafe import Markup, escape, escape_silent from markupsafe._compat import text_type class MarkupTestCase(unittest.TestCase): def test_adding(self): # adding two strings should escape the unsafe one unsafe = '<script type="appl...
mit
1,928,791,351,044,493,300
33.117318
82
0.502866
false
wuga214/Django-Wuga
env/lib/python2.7/site-packages/whoosh/lang/snowball/bases.py
96
4874
# Base classes class _ScandinavianStemmer(object): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scan...
apache-2.0
-9,069,660,661,931,592,000
35.646617
77
0.564423
false
Ziemin/telepathy-gabble
tests/twisted/muc/chat-states.py
2
5219
""" Regression test for <https://bugs.freedesktop.org/show_bug.cgi?id=32952>, wherein chat states in MUCs were misparsed, and MUC chat states in general. """ from servicetest import assertEquals, assertLength, EventPattern from gabbletest import exec_test, elem, make_muc_presence, sync_stream from mucutil import join_...
lgpl-2.1
-799,849,711,795,539,800
34.263514
82
0.65798
false
hushaoqing/my_notes
Python/Scrapy/mytest/testScrapyGraphite/settings.py
1
3248
# -*- coding: utf-8 -*- # Scrapy settings for mytest project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/...
mit
-629,166,847,869,914,000
33.553191
109
0.768165
false
rodrigods/keystone
keystone/token/controllers.py
2
19819
# Copyright 2013 OpenStack Foundation # # 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
-9,215,433,027,710,838,000
37.408915
79
0.566123
false
rahul-c1/scrapy
scrapy/contrib/downloadermiddleware/robotstxt.py
15
1856
""" This is a middleware to respect robots.txt policies. To activate it you must enable this middleware and enable the ROBOTSTXT_OBEY setting. """ import robotparser from scrapy import signals, log from scrapy.exceptions import NotConfigured, IgnoreRequest from scrapy.http import Request from scrapy.utils.httpobj im...
bsd-3-clause
779,046,458,928,687,500
33.37037
76
0.655172
false
crazy-cat/incubator-mxnet
python/mxnet/module/bucketing_module.py
20
20458
# 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
-1,090,213,141,985,674,100
39.916
98
0.60959
false
HyperBaton/ansible
lib/ansible/modules/cloud/univention/udm_group.py
37
4839
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright: (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # 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...
gpl-3.0
1,430,512,566,803,135,200
26.965318
92
0.54382
false
google-research/language
language/tek_representations/utils/mrqa_official_eval.py
1
3638
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
apache-2.0
-1,437,262,390,485,069,800
30.634783
79
0.694338
false
MostlyOpen/odoo_addons_jcafb
myo_lab_test_cst/models/lab_test_result_urina.py
1
4485
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
agpl-3.0
5,958,855,959,438,270,000
25.636905
102
0.560447
false
systemd/casync
doc/conf.py
1
3578
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SPDX-License-Identifier: LGPL-2.1+ # # casync documentation build configuration file, created by # sphinx-quickstart on Tue Jun 20 16:46:39 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configura...
lgpl-2.1
4,648,395,466,651,347,000
30.946429
79
0.698155
false
oikoumene/wcc.api
wcc/api/api.py
1
2196
# -*- coding: utf-8 -*- from plone.jsonapi.routes import add_plone_route # CRUD from plone.jsonapi.routes.api import get_items from plone.jsonapi.routes.api import create_items from plone.jsonapi.routes.api import update_items from plone.jsonapi.routes.api import delete_items from plone.jsonapi.routes.api import url...
lgpl-3.0
-5,587,490,180,324,059,000
30.826087
92
0.656648
false
TalShafir/ansible
lib/ansible/modules/cloud/docker/docker_image_facts.py
7
7425
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['prev...
gpl-3.0
-437,710,135,116,650,100
28.819277
115
0.51596
false
mahak/neutron
neutron/tests/unit/services/logapi/drivers/test_manager.py
2
7789
# Copyright (c) 2017 Fujitsu Limited # 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 requi...
apache-2.0
-316,675,875,089,911,600
40.21164
79
0.605598
false
wwj718/edx-platform
common/test/acceptance/tests/discussion/helpers.py
46
4061
""" Helper functions and classes for discussion tests. """ from uuid import uuid4 import json from ...fixtures import LMS_BASE_URL from ...fixtures.course import CourseFixture from ...fixtures.discussion import ( SingleThreadViewFixture, Thread, Response, ) from ...pages.lms.discussion import DiscussionTa...
agpl-3.0
-2,008,490,233,469,499,000
37.67619
127
0.632849
false
groschovskiy/keyczar
cpp/src/tools/swtoolkit/site_scons/site_tools/environment_tools.py
11
10726
#!/usr/bin/python2.4 # Copyright 2009, 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...
apache-2.0
-9,214,205,022,342,615,000
36.767606
79
0.692616
false
smips/Temporary_Insanity
TI/src/TI.py
1
4468
import libtcodpy as libtcod import sys from time import sleep import os, math, random sys.path.insert(0, os.path.realpath(__file__).replace("TI.py","World")) sys.path.insert(0, os.path.realpath(__file__).replace("TI.py","Engine")) sys.path.insert(0, os.path.realpath(__file__).replace("TI.py","Scripts")) imp...
mit
85,711,425,074,374,270
26.628205
112
0.592476
false
HubLot/PBxplore
pbxplore/tests/test_regression.py
2
21493
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Regression tests for PBxplore. This test suite run the various PBxplore programs with various argument, and makes sure the output is the expected one. The aim is to check that the programs are not broken during development. Be careful this test suite does not test th...
mit
-6,514,076,797,168,018,000
39.939048
92
0.528172
false
rjschof/gem5
src/dev/BadDevice.py
69
1789
# Copyright (c) 2005-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
bsd-3-clause
-460,308,259,115,228,300
50.114286
72
0.787032
false
haya14busa/alc-etm-searcher
nltk-3.0a3/build/lib/nltk/classify/tadm.py
2
3527
# Natural Language Toolkit: Interface to TADM Classifier # # Copyright (C) 2001-2013 NLTK Project # Author: Joseph Frazee <jfrazee@mail.utexas.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, unicode_literals import sys import subprocess from nltk import...
mit
4,864,610,011,136,842,000
30.491071
72
0.625461
false
gavin-feng/odoo
addons/document/odt2txt.py
435
2110
#!/usr/bin/python # -*- 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 unde...
agpl-3.0
-8,180,575,962,094,107,000
38.811321
79
0.601422
false
Venturi/oldcms
env/lib/python2.7/site-packages/django/db/models/fields/related.py
10
114783
from __future__ import unicode_literals import warnings from operator import attrgetter from django import forms from django.apps import apps from django.core import checks, exceptions from django.core.exceptions import FieldDoesNotExist from django.db import connection, connections, router, transaction from django.d...
apache-2.0
-1,119,114,136,893,352,100
42.860527
119
0.568621
false
rallylee/gem5
configs/ruby/GPU_VIPER.py
12
25726
# # Copyright (c) 2011-2015 Advanced Micro Devices, Inc. # All rights reserved. # # For use for simulation and test purposes only # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source co...
bsd-3-clause
-8,977,783,867,979,160,000
37.169139
101
0.654241
false
Suwings/Yeinw
src/Crypto/Random/OSRNG/posix.py
125
2835
# # Random/OSRNG/posix.py : OS entropy source for POSIX systems # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain i...
gpl-3.0
-2,062,888,866,573,278,700
31.965116
82
0.591182
false
WoLpH/EventGhost
lib27/site-packages/curl/__init__.py
8
7023
'''A high-level interface to the pycurl extension''' # ** mfx NOTE: the CGI class uses "black magic" using COOKIEFILE in # combination with a non-existant file name. See the libcurl docs # for more info. import sys, pycurl py3 = sys.version_info[0] == 3 # python 2/3 compatibility if py3: import urllib.par...
gpl-2.0
-6,667,848,693,521,195,000
37.587912
90
0.639186
false
h3biomed/ansible
lib/ansible/modules/network/cnos/cnos_reload.py
52
3430
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, 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 Licens...
gpl-3.0
8,173,355,663,336,433,000
29.353982
77
0.682799
false
AbsentMoniker/ECE463Honors
web2py/gluon/contrib/fpdf/template.py
40
11941
# -*- coding: iso-8859-1 -*- "PDF Template Helper for FPDF.py" __author__ = "Mariano Reingart <reingart@gmail.com>" __copyright__ = "Copyright (C) 2010 Mariano Reingart" __license__ = "LGPL 3.0" import sys,os,csv from fpdf import FPDF def rgb(col): return (col // 65536), (col // 256 % 256), (col% 256) class Te...
gpl-2.0
-1,002,259,036,913,638,900
38.671096
104
0.499874
false
sadanandb/pmt
src/pyasm/application/common/dependency.py
6
2711
########################################################### # # 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,597,987,080,122,693,600
28.791209
74
0.559941
false
switchboardOp/ansible
lib/ansible/modules/packaging/os/pkg5.py
29
5253
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014 Peter Oliver <ansible@mavit.org.uk> # # 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 o...
gpl-3.0
7,785,762,709,391,093,000
27.090909
151
0.560632
false
40123148/w17b
static/Brython3.1.1-20150328-091302/Lib/opcode.py
714
5442
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG", "hasnargs"] ...
agpl-3.0
-2,839,968,717,421,256,700
26.21
80
0.635061
false
mars-knowsnothing/amos-bot
src/Lib/site-packages/pip/download.py
334
32171
from __future__ import absolute_import import cgi import email.utils import getpass import json import logging import mimetypes import os import platform import re import shutil import sys import tempfile try: import ssl # noqa HAS_TLS = True except ImportError: HAS_TLS = False from pip._vendor.six.move...
gpl-3.0
1,788,143,703,886,796,300
34.50883
79
0.600385
false
mrunge/horizon
openstack_dashboard/dashboards/admin/routers/panel.py
43
1067
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
apache-2.0
2,891,312,357,989,939,000
34.566667
78
0.731959
false
proggy/uic
doc/conf.py
1
7924
# -*- coding: utf-8 -*- # # uic documentation build configuration file, created by # sphinx-quickstart on Mon Jun 9 23:00:14 2014. # # 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 con...
gpl-2.0
-5,592,889,928,623,766,000
31.211382
124
0.703306
false
LordSputnik/mbws3
ws/schema/artist.py
1
1672
import datetime from sqlalchemy.dialects.postgresql import UUID from ws import db class Artist(db.Model): id = db.Column(db.Integer, primary_key=True) gid = db.Column(UUID, unique=True, nullable=False) name = db.Column(db.UnicodeText, nullable=False) sort_name = db.Column(db.UnicodeText, nullable=Fa...
gpl-3.0
2,722,513,207,775,684,600
34.574468
90
0.688995
false
Xilinx/hopper
hopper/commands/CommandHopperBase.py
1
3733
# Copyright (c) 2015 Xilinx 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 without limitation the rights # to use, copy, modify, merge, publish, distrib...
mit
1,581,784,744,065,346,800
34.552381
122
0.746049
false
swenson/sagewiki
unidecode/unidecode/x058.py
252
4678
data = ( 'Ku ', # 0x00 'Ke ', # 0x01 'Tang ', # 0x02 'Kun ', # 0x03 'Ni ', # 0x04 'Jian ', # 0x05 'Dui ', # 0x06 'Jin ', # 0x07 'Gang ', # 0x08 'Yu ', # 0x09 'E ', # 0x0a 'Peng ', # 0x0b 'Gu ', # 0x0c 'Tu ', # 0x0d 'Leng ', # 0x0e '[?] ', # 0x0f 'Ya ', # 0x10 'Qian ', ...
gpl-2.0
7,406,078,624,884,944,000
17.131783
20
0.392048
false
twitchyliquid64/misc-scripts
s3tool/boto-develop/boto/services/sonofmmm.py
170
3498
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.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, modi...
mit
9,052,836,612,045,018,000
42.185185
80
0.641509
false
v-iam/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/fabric_error.py
2
1515
# 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
660,511,733,324,183,300
30.5625
95
0.629043
false
coderfi/ansible-modules-extras
net_infrastructure/bigip_monitor_tcp.py
33
16829
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, serge van Ginderachter <serge@vanginderachter.be> # # 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 vers...
gpl-3.0
-6,946,240,441,992,531,000
33.415133
158
0.57294
false
s0undt3ch/sorbic
sorbic/db.py
2
7598
''' Interface to interact on a database level ''' # Import python libs import os import io import shutil # Import sorbic libs import sorbic.ind.hdht import sorbic.stor.files import sorbic.utils.traverse # Import third party libs import msgpack DB_OPTS = ( 'key_delim', 'hash_limit', 'key_hash', ...
apache-2.0
9,061,666,680,189,123,000
31.059072
89
0.51553
false
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/twisted/test/test_rebuild.py
10
7749
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. import sys, os import types from twisted.trial import unittest from twisted.python import rebuild import crash_test_dummy f = crash_test_dummy.foo class Foo: pass class Bar(Foo): pass class Baz(object): pass class Buz(Bar, Baz): pass class Ha...
mit
-4,069,525,868,831,994,400
29.75
107
0.595432
false
BryanQuigley/sos
sos/report/plugins/buildah.py
5
1873
# Copyright (C) 2018 Red Hat, Inc., Jake Hunsaker <jhunsake@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU Gen...
gpl-2.0
-1,552,753,387,998,770,400
33.685185
77
0.584624
false
lebabouin/CouchPotatoServer-develop
libs/tmdb3/cache_file.py
10
13285
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: cache_file.py # Python Library # Author: Raymond Wagner # Purpose: Persistant file-backed cache using /tmp/ to share data # using flock or msvcrt.locking to allow safe concurrent # access. #----------------------- import s...
gpl-3.0
894,537,346,810,222,000
32.976982
80
0.54332
false
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awxkit/awxkit/api/pages/organizations.py
1
1807
from awxkit.api.mixins import HasCreate, HasInstanceGroups, HasNotifications, DSAdapter from awxkit.utils import random_title, suppress, PseudoNamespace from awxkit.api.resources import resources import awxkit.exceptions as exc from . import base from . import page class Organization(HasCreate, HasInstanceGroups, Has...
apache-2.0
-7,692,307,553,024,060,000
34.431373
104
0.664084
false
canaltinova/servo
etc/ci/performance/set_s3_policy.py
22
1108
#!/usr/bin/env python3 # 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 argparse import boto3 def main(): parser = argparse.ArgumentParser( descrip...
mpl-2.0
-7,621,816,651,125,992,000
21.16
69
0.550542
false
xasopheno/audio_visual
audio/venv/lib/python2.7/site-packages/wheel/archive.py
62
2376
""" Archive tools for wheel. """ import os import os.path import time import zipfile from distutils import log def archive_wheelfile(base_name, base_dir): """Archive all files under `base_dir` in a whl file and name it like `base_name`. """ olddir = os.path.abspath(os.curdir) base_name = os.path....
mit
100,369,475,405,908,210
28.7
78
0.607744
false
vmturbo/nova
nova/tests/unit/virt/libvirt/storage/test_lvm.py
8
8203
# Copyright 2012 NTT Data. All Rights Reserved. # Copyright 2012 Yahoo! 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/li...
apache-2.0
8,972,324,500,791,158,000
42.173684
79
0.560405
false
ain7/www.ain7.org
ain7/annuaire/migrations/0002_auto_20160331_0126.py
1
8973
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-30 23:26 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('annuair...
lgpl-2.1
-175,399,658,491,438,530
49.982955
239
0.632453
false
PSUdaemon/trafficserver
tests/tools/traffic-replay/h2Replay.py
2
13166
#!/bin/env python3 ''' ''' # 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 ...
apache-2.0
5,364,924,808,349,940,000
38.776435
160
0.609904
false
pvagner/orca
src/orca/scripts/apps/gnome-mud/script.py
3
6038
# Orca # # Copyright 2005-2008 Sun Microsystems Inc. # # This library 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 Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This...
lgpl-2.1
-5,981,183,722,259,072,000
33.502857
79
0.575356
false
jfterpstra/bluebottle
bluebottle/utils/staticfiles_finders.py
2
1192
from django.utils._os import safe_join import os from django.conf import settings from django.contrib.staticfiles.finders import FileSystemFinder from bluebottle.clients.models import Client class TenantStaticFilesFinder(FileSystemFinder): def find(self, path, all=False): """ Looks for files in th...
bsd-3-clause
1,089,561,849,296,188,200
35.121212
77
0.564597
false
themarkypantz/kafka
tests/kafkatest/services/security/security_config.py
8
14918
# 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 use ...
apache-2.0
8,458,064,236,308,150,000
49.398649
274
0.666577
false
andyliuliming/WALinuxAgent
azurelinuxagent/common/protocol/imds.py
2
10005
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); import json import re import azurelinuxagent.common.utils.restutil as restutil from azurelinuxagent.common.exception import HttpError from azurelinuxagent.common.future import ustr import azure...
apache-2.0
779,066,349,977,622,700
30.363636
110
0.526737
false
noamelf/Open-Knesset
persons/migrations/0005_auto__add_field_person_img_url__add_field_person_phone__add_field_pers.py
14
19706
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Person.img_url' db.add_column('persons_person', 'img_url', self.gf('dj...
bsd-3-clause
8,754,403,834,531,386,000
65.130872
200
0.555973
false
JPFrancoia/scikit-learn
sklearn/preprocessing/data.py
13
70436
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # Giorgio Patrini <giorgio.patrini@anu.edu.au> # Lic...
bsd-3-clause
1,813,260,841,768,625,000
34.973442
84
0.593049
false
bcui6611/healthchecker
Cheetah/Utils/Indenter.py
17
4145
""" Indentation maker. @@TR: this code is unsupported and largely undocumented ... This version is based directly on code by Robert Kuzelj <robert_kuzelj@yahoo.com> and uses his directive syntax. Some classes and attributes have been renamed. Indentation is output via $self._CHEETAH__indenter.indent() to prevent '_i...
apache-2.0
-313,503,457,145,121,600
32.699187
110
0.525935
false
xkmato/rapidpro-tools
fix-contact-names.py
2
1954
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import os from docopt import docopt from rapidpro_tools import logger, change_logging_level from rapidpro_tools.contacts import (e...
cc0-1.0
4,315,070,449,713,544,000
29.53125
75
0.582907
false
Russell-IO/ansible
lib/ansible/modules/remote_management/oneview/oneview_san_manager.py
146
7717
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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
-5,382,514,417,054,802,000
34.237443
137
0.640145
false
amitgroup/parts-net
scripts/scripy1.py
1
5953
from __future__ import division, print_function, absolute_import #from pnet.vzlog import default as vz import numpy as np import amitgroup as ag import itertools as itr import sys import os import pnet import time def test(ims, labels, net): yhat = net.classify(ims) return yhat == labels if pnet.parallel....
bsd-3-clause
2,311,712,381,770,744,000
34.434524
195
0.566101
false
scripni/rethinkdb
external/v8_3.30.33.16/build/gyp/pylib/gyp/MSVSVersion.py
486
15539
# Copyright (c) 2013 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. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp import glob class VisualStudi...
agpl-3.0
-1,196,246,266,234,046,200
36.992665
80
0.555184
false
l1ll1/cvl-fabric-launcher
pyinstaller-2.1/PyInstaller/lib/unittest2/case.py
11
43241
"""Test case implementation""" import sys import difflib import pprint import re import unittest import warnings if sys.version_info[:2] == (2,3): from sets import Set as set from sets import ImmutableSet as frozenset from unittest2 import result from unittest2.util import\ safe_repr, safe_str, strclass,...
gpl-3.0
3,306,664,263,377,698,000
38.489498
114
0.570015
false
achang97/YouTunes
lib/python2.7/site-packages/werkzeug/contrib/fixers.py
104
10179
# -*- coding: utf-8 -*- """ werkzeug.contrib.fixers ~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module includes various helpers that fix bugs in web servers. They may be necessary for some versions of a buggy web server but not others. We try to stay updated with the status of the bug...
mit
-4,742,932,228,699,254,000
39.074803
82
0.630219
false
OptiPop/external_chromium_org
tools/telemetry/telemetry/core/browser_credentials_unittest.py
47
2272
# Copyright 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. import os import tempfile import unittest from telemetry.core import browser_credentials SIMPLE_CREDENTIALS_STRING = """ { "google": { "username": "e...
bsd-3-clause
6,395,106,982,241,786,000
30.555556
79
0.68618
false
sbidoul/buildbot
worker/buildbot_worker/compat.py
9
2329
# coding=utf-8 # 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 WARRAN...
gpl-2.0
-2,601,795,805,233,596,400
29.246753
79
0.691284
false
incaser/odoo-odoo
addons/procurement_jit/procurement_jit.py
244
1543
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 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
-1,846,236,737,409,919,200
41.861111
94
0.625405
false
ProjectSWGCore/NGECore2
scripts/mobiles/generic/faction/imperial/hardened_swamp_trooper_25.py
2
1496
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(co...
lgpl-3.0
-2,915,669,621,269,030,400
33.813953
126
0.832219
false
ActiveState/code
recipes/Python/576531_Circle/recipe-576531.py
1
15215
#On the name of ALLAH and may the blessing and peace of Allah #be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam. #Author :Fouad Teniou #Date : 08/10/08 #Version : 2.4 """ Class of an equation of a circle of the form Ax^2 + Ay^2 + Dx + Ey + F = 0 (A !=0) it represents a circle or a point or has no g...
mit
2,432,161,598,260,453,000
29.325349
246
0.506747
false
jdramani/servo
python/mach/mach/registrar.py
46
3774
# 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/. from __future__ import absolute_import, unicode_literals from .base import MachError INVALID_COMMAND_CONTEXT = r''' It...
mpl-2.0
3,775,675,039,502,286,000
32.105263
89
0.606518
false
jm-begon/scikit-learn
examples/cluster/plot_kmeans_silhouette_analysis.py
242
5885
""" =============================================================================== Selecting the number of clusters with silhouette analysis on KMeans clustering =============================================================================== Silhouette analysis can be used to study the separation distance between the...
bsd-3-clause
-7,326,693,292,645,972,000
40.737589
79
0.66644
false
ruchikd/Algorithms
Python/CreateLLFromBST/CreateLLFromBST.py
1
1529
#************************************************************** # 9 # / \ # 5 11 # / \ / \ # 2 7 10 15 # / / \ # 1 4 6 # / # ...
gpl-3.0
4,327,146,627,324,118,500
18.367089
63
0.498365
false
sccblom/vercors
deps/dafny/1.9.6/windows/z3/bin/z3util.py
4
11933
############################################ # Copyright (c) 2012 Microsoft Corporation # # Z3 Python interface # # Authors: Leonardo de Moura (leonardo) # ThanhVu (Vu) Nguyen <tnguyen@cs.unm.edu> ############################################ """ Usage: import common_z3 as CM_Z3 """ from z3 imp...
mpl-2.0
-56,820,460,629,510,800
21.490157
97
0.492919
false
jvkops/django
django/db/models/signals.py
399
2734
from django.apps import apps from django.dispatch import Signal from django.utils import six class_prepared = Signal(providing_args=["class"]) class ModelSignal(Signal): """ Signal subclass that allows the sender to be lazily specified as a string of the `app_label.ModelName` form. """ def __in...
bsd-3-clause
-4,204,846,581,283,849,700
38.623188
114
0.613753
false
kevin8909/xjerp
openerp/addons/account_anglo_saxon/invoice.py
12
12123
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) # 2004-2010 Tiny SPRL (<http://tiny.be>). # 2009-2010 Veritos (http://veritos.nl). # All Rights Reserved # # This program is free software: you can redistri...
agpl-3.0
-7,345,047,987,591,609,000
65.245902
205
0.522065
false
HiSPARC/station-software
user/python/Lib/lib-tk/test/test_tkinter/test_images.py
40
13352
import unittest import Tkinter as tkinter import ttk import test.test_support as support from test_ttk.support import AbstractTkTest, requires_tcl support.requires('gui') class MiscTest(AbstractTkTest, unittest.TestCase): def test_image_types(self): image_types = self.root.image_types() self.ass...
gpl-3.0
-4,823,958,381,111,532,000
39.707317
75
0.584632
false
TheR3ason/map-your-location-history
LatitudePlot.py
1
4022
#!/usr/bin/env python # LatitudePlot.py # Created 30 July 2013 # Created by snowdonjames@googlemail.com import os, time, math from datetime import datetime from time import mktime import xml.etree.ElementTree as ET from PIL import Image, ImageDraw def GetKmlFiles(): """Locates and reads local .kml files, returns...
apache-2.0
-6,708,847,753,446,356,000
36.588785
145
0.617355
false
erseco/ugr_desarrollo_aplicaciones_internet
Practica_01/Soluciones Practica 1/ej_01_01.py
2
1972
#!/usr/bin/python # -*- coding: utf-8 -*- # Practicas de Desarrollo de Aplicaciones para Internet (DAI) # Copyright (C) 2013 - Zerjillo (zerjioi@ugr.es) # # 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 Softwar...
gpl-3.0
-4,609,483,100,046,658,600
33.421053
147
0.710352
false
felipetomm/POX-Django
pox/web/jsonrpc.py
45
8357
# Copyright 2011,2012 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
6,321,770,912,790,769,000
28.634752
75
0.608951
false
tedder/ansible
lib/ansible/modules/network/cloudengine/ce_netconf.py
15
5948
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
5,066,605,171,228,497,000
28.74
118
0.555145
false
jasonbot/django
tests/template_tests/filter_tests/test_dictsort.py
342
1477
from django.template.defaultfilters import dictsort from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsort( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {'name': 'Jonny B...
bsd-3-clause
-2,733,055,657,204,998,700
32.568182
75
0.498984
false
rahulsharma1991/scrapy
tests/test_utils_deprecate.py
140
10526
# -*- coding: utf-8 -*- from __future__ import absolute_import import inspect import unittest import warnings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils.deprecate import create_deprecated_class, update_classpath from tests import mock class MyWarning(UserWarning): pass class SomeB...
bsd-3-clause
8,439,653,246,269,451,000
36.459075
87
0.610583
false
Outernet-Project/librarian
tests/utils/test_route_mixins.py
1
4074
import mock from bottle_utils import csrf import librarian.utils.route_mixins as mod # Common test helper class MockedRouteBase(object): def __init__(self, *args, **kwargs): # this way all tests will get a separate instance of the mock # object when they instantiate their routes, because othe...
gpl-3.0
-3,701,229,933,204,108,300
26.527027
77
0.687285
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/encodings/iso8859_5.py
4
5385
""" Python Character Mapping Codec generated from '8859-5.TXT' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,erro...
mit
-2,776,399,918,202,030,000
37.464286
80
0.736305
false