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
amyvmiwei/kbengine
kbe/src/lib/python/Lib/gettext.py
90
17661
"""Internationalization and localization support. This module provides internationalization (I18N) and localization (L10N) support for your Python programs by providing an interface to the GNU gettext message catalog library. I18N refers to the operation by which a program is made aware of multiple languages. L10N r...
lgpl-3.0
2,423,016,130,182,776,300
32.768642
87
0.585244
false
fernandezcuesta/ansible
test/units/modules/network/netscaler/test_netscaler_lb_vserver.py
7
33531
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
gpl-3.0
1,804,822,049,070,154,500
39.156886
133
0.602368
false
fmacias64/keras
tests/auto/test_graph_model.py
22
10705
from __future__ import print_function import unittest import numpy as np np.random.seed(1337) from keras.models import Graph, Sequential from keras.layers import containers from keras.layers.core import Dense, Activation from keras.utils.test_utils import get_test_data X = np.random.random((100, 32)) X2 = np.random.r...
mit
-6,227,203,422,963,254,000
43.053498
118
0.582345
false
pombredanne/rekall
rekall-core/rekall/addrspace_test.py
3
2220
from rekall import addrspace from rekall import obj from rekall import testlib from rekall import session class CustomRunsAddressSpace(addrspace.RunBasedAddressSpace): def __init__(self, runs=None, data=None, **kwargs): super(CustomRunsAddressSpace, self).__init__(**kwargs) self.base = addrspace.B...
gpl-2.0
-6,945,785,807,624,606,000
37.947368
76
0.565766
false
tux-00/ansible
lib/ansible/modules/system/mount.py
60
21299
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Red Hat, inc # Written by Seth Vidal # based on the mount modules from salt and puppet # # 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 ...
gpl-3.0
6,339,664,479,489,836,000
28.297111
87
0.532983
false
erikdejonge/youtube-dl
youtube_dl/extractor/hidive.py
23
4113
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, url_or_none, urlencode_postdata, ) class HiDiveIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hidive\.com/s...
unlicense
-1,835,148,568,576,254,000
33.855932
92
0.529784
false
secondscoin/secondscoin
contrib/pyminer/pyminer.py
385
6434
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
mit
-1,945,500,815,334,753,800
24.531746
84
0.648896
false
stefanreuther/bob
test/test_input_recipeset.py
1
41799
# Bob build tool # Copyright (C) 2016 Jan Klötzke # # SPDX-License-Identifier: GPL-3.0-or-later from tempfile import NamedTemporaryFile, TemporaryDirectory from unittest import TestCase from unittest.mock import Mock import os import textwrap import yaml from bob import DEBUG from bob.input import RecipeSet from bob...
gpl-3.0
4,505,859,482,286,768,000
32.817152
93
0.50646
false
usc-isi/essex-baremetal-support
nova/db/sqlalchemy/migrate_repo/versions/074_change_flavor_local_gb.py
5
4484
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
apache-2.0
4,897,868,114,173,773,000
33.492308
78
0.636708
false
Antreasgr/ol3
bin/check-whitespace.py
29
1633
import logging import re import sys logging.basicConfig(format='%(asctime)s %(name)s: %(message)s', level=logging.INFO) logger = logging.getLogger('check-whitespace') CR_RE = re.compile(r'\r') LEADING_WHITESPACE_RE = re.compile(r'\s+') TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z') NO_NEWLINE_RE...
bsd-2-clause
-5,825,093,877,266,534,000
34.5
79
0.554195
false
stuyCTF/stuyCTF-Platform
api/api/common.py
11
5349
""" The common module contains general-purpose functions potentially used by multiple modules in the system.""" import uuid from pymongo import MongoClient from pymongo.errors import ConnectionFailure, InvalidName from werkzeug.contrib.cache import SimpleCache from voluptuous import Invalid, MultipleInvalid from hashl...
mit
4,714,867,876,233,966,000
23.424658
138
0.617312
false
liberation/sesql
sesql/management/commands/build_search_query_index.py
1
4441
# -*- coding: utf-8 -*- # Copyright (c) Pilot Systems and Libération, 2011 # This file is part of SeSQL. # SeSQL 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 you...
gpl-2.0
-3,469,848,174,415,488,500
33.6875
80
0.562838
false
Antiun/yelizariev-addons
web_sessions_management/main.py
16
3811
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
lgpl-3.0
5,462,133,416,806,512,000
40.423913
90
0.614537
false
hieupham007/Titanium_Mobile
apidoc/generators/jsduck_generator.py
1
19686
#!/usr/bin/env python # # Copyright (c) 2011 Appcelerator, Inc. All Rights Reserved. # Licensed under the Apache Public License (version 2) import os, sys, re this_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.abspath(os.path.join(this_dir, ".."))) from common import dict_has_non_empty_mem...
apache-2.0
-4,725,235,165,777,018,000
34.598553
139
0.636645
false
peoplepower/botengine
com.ppc.Bot/domain.py
1
2296
''' Created on May 25, 2017 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' # Organization short name, which allows us to send emails to this organization's administrators ORGANIZATION_SHORT_NAME = "family" # NOTE...
apache-2.0
8,950,259,843,876,554,000
26.662651
140
0.747822
false
thebongy/MakeMyOutputs
docx/styles/styles.py
12
5625
# encoding: utf-8 """ Styles object, container for all objects in the styles part. """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) from warnings import warn from . import BabelFish from .latent import LatentStyles from ..shared import ElementProxy from .style import Ba...
mit
9,197,335,845,036,747,000
34.828025
77
0.602133
false
lubomir/django-rest-framework
setup.py
47
2970
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import shutil import sys from setuptools import setup def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ init_py = open(os.path.join(package, '__init__.py')).read() return re.search("_...
bsd-2-clause
-6,542,664,716,366,679,000
30.595745
79
0.621549
false
karstenw/nodebox-pyobjc
examples/Extended Application/sklearn/examples/datasets/plot_iris_dataset.py
1
2738
""" ========================================================= The Iris Dataset ========================================================= This data sets consists of 3 different types of irises' (Setosa, Versicolour, and Virginica) petal and sepal length, stored in a 150x4 numpy.ndarray The rows being the samples and t...
mit
-4,049,645,647,576,385,000
25.833333
82
0.624406
false
le9i0nx/ansible
test/units/modules/network/nxos/test_nxos_config.py
5
5079
#!/usr/bin/env python # # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
gpl-3.0
1,309,250,487,451,592,200
36.072993
100
0.66076
false
KarolBedkowski/photomagic
photomagick/filters/exposure.py
1
1270
#!usr/bin/python # -*- coding: utf-8 -*- __plugins__ = ('LowContrast', 'HiContrast', 'OverExposed', 'UnderExposed') __version__ = '2011-03-20' __author__ = 'Karol Będkowski' __copyright__ = "Copyright (c) Karol Będkowski, 2011" import ImageEnhance from photomagick.common.base_filter import BaseFilter from photomagic...
gpl-2.0
-2,965,890,010,644,923,000
21.642857
74
0.698738
false
hasgeek/coaster
coaster/views/classview.py
1
33503
""" Class-based views ----------------- Group related views into a class for easier management. """ from functools import update_wrapper, wraps from typing import Any, Dict, List, Optional, Tuple from urllib.parse import urlsplit, urlunsplit from sqlalchemy.orm.attributes import InstrumentedAttribute from sqlalchemy...
bsd-2-clause
7,673,760,242,782,383,000
37.866589
88
0.57768
false
CalHoll/SoundMoose
server/project/conf/base.py
3
5770
import os import sys # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ROOT_DIR = os.path.dirname(BASE_DIR) sys.path.append( os.path.join(BASE_DIR, 'apps') ) # Quick-start development settings - unsuitable for production...
mit
4,282,894,446,418,767,400
24.990991
93
0.620104
false
Y3K/django
django/middleware/locale.py
358
2983
"This is the locale selecting middleware that will look at accept headers" from django.conf import settings from django.core.urlresolvers import ( LocaleRegexURLResolver, get_resolver, get_script_prefix, is_valid_path, ) from django.http import HttpResponseRedirect from django.utils import translation from django....
bsd-3-clause
8,892,617,960,260,965,000
41.014085
98
0.634596
false
DoubleNegativeVisualEffects/cortex
test/IECoreRI/DoubleSided.py
7
2640
########################################################################## # # Copyright (c) 2008-2013, Image Engine Design 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: # # * Redis...
bsd-3-clause
1,475,070,116,252,203,000
40.904762
79
0.692424
false
vishesh92/redash
old_migrations/0011_migrate_bigquery_to_json.py
20
1391
from base64 import b64encode import json from redash.models import DataSource def convert_p12_to_pem(p12file): from OpenSSL import crypto with open(p12file, 'rb') as f: p12 = crypto.load_pkcs12(f.read(), "notasecret") return crypto.dump_privatekey(crypto.FILETYPE_PEM, p12.get_privatekey()) if __...
bsd-2-clause
-8,830,291,864,657,888,000
30.613636
84
0.553559
false
lache/RacingKingLee
monitor/engine.win64/2.74/python/lib/site-packages/numpy/f2py/auxfuncs.py
75
19979
#!/usr/bin/env python """ Auxiliary functions for f2py2e. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy (BSD style) LICENSE. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS...
mit
7,611,495,620,189,862,000
27.099859
182
0.560539
false
dfdx2/django
tests/many_to_one/tests.py
12
30596
import datetime from copy import deepcopy from django.core.exceptions import FieldError, MultipleObjectsReturned from django.db import models, transaction from django.db.utils import IntegrityError from django.test import TestCase from django.utils.translation import gettext_lazy from .models import ( Article, Ca...
bsd-3-clause
-1,458,729,472,314,240,300
45.92638
119
0.62348
false
DrabWeb/iTerm2
tests/esctest/tests/el.py
31
2319
from esc import NUL, blank import escargs import esccmd import escio from esctypes import Point, Rect from escutil import AssertEQ, AssertScreenCharsInRectEqual, GetCursorPosition, knownBug class ELTests(object): def prepare(self): """Initializes the screen to abcdefghij on the first line with the cursor on ...
gpl-2.0
3,243,512,608,684,006,000
27.9875
87
0.572229
false
dougwig/x-neutron-lbaas
neutron_lbaas/openstack/common/service.py
2
15276
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
6,979,269,728,550,008,000
29.309524
79
0.59564
false
ioram7/keystone-federado-pgid2013
build/lib.linux-x86_64-2.7/keystone/contrib/ec2/backends/kvs.py
9
1820
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
8,435,911,308,602,054,000
38.565217
75
0.685714
false
TMU-VHDL-team2/sqrt
wiki_data/a_dec.py
1
1269
#!/usr/bin/env python3 def func1(): if j < 0: if (32768 >> (-j-1)) < x1: return y2 else: return x1 << -j else: return x1 >> j def func2(): if j < 0: return y >> -j else: return y << j x1 = int(input()) x0 = 0 a = 0 y = 0 ...
mit
-6,097,552,678,139,865,000
17.590909
51
0.356968
false
openid/python-openid
examples/djopenid/consumer/views.py
1
8229
from __future__ import unicode_literals import six from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from openid.consumer import consumer from openid.consumer.discover import DiscoveryFailure from openid.extensions import ax, pape, sreg from openid.server....
apache-2.0
-2,082,647,464,285,074,200
35.901345
89
0.635436
false
jgomezdans/KaFKA
kafka/inference/solvers.py
1
5323
#!/usr/bin/env python """Some solvers""" # KaFKA A fast Kalman filter implementation for raster based datasets. # Copyright (c) 2017 J Gomez-Dans. All rights reserved. # # This file is part of KaFKA. # # KaFKA is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
4,130,343,850,676,558,300
35.458904
106
0.624084
false
hepochen/hoedown_misaka
tests/run_tests.py
4
2663
# -*- coding: utf-8 -*- import importlib import inspect import os import sys from itertools import chain from os.path import dirname, join as jp, splitext CWD = dirname(sys.modules[__name__].__file__) sys.path.insert(0, jp(CWD, '..')) from chibitest import runner, TestCase, Benchmark help_message = """\ Options: ...
mit
-2,168,864,859,217,924,400
26.453608
71
0.553136
false
praekelt/malaria24-django
malaria24/ona/tests/test_admin.py
1
6051
from django.contrib.auth.models import User from django.core import urlresolvers from django.db.models.signals import post_save from django.test import override_settings from mock import patch from malaria24.ona.models import ( ReportedCase, new_case_alert_ehps, new_case_alert_mis, new_case_alert_jembi) f...
bsd-2-clause
-7,128,659,252,724,081,000
47.408
79
0.54239
false
yongshengwang/hue
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/find_template.py
35
1196
from django.core.management.base import LabelCommand from django.template import loader from django.template import TemplateDoesNotExist import sys from django_extensions.management.utils import signalcommand def get_template_path(path): try: template = loader.find_template(path) if template[1]: ...
apache-2.0
7,475,929,403,546,993,000
30.473684
75
0.65301
false
BigBrother-International/gst-cerbero
cerbero/packages/osx/buildtools.py
3
3083
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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; eit...
lgpl-2.1
-8,094,534,842,700,599,000
36.597561
78
0.64807
false
hramrach/osc
tests/test_addfiles.py
15
3192
import osc.core import osc.oscerr import os import sys from common import OscTestCase FIXTURES_DIR = os.path.join(os.getcwd(), 'addfile_fixtures') def suite(): import unittest return unittest.makeSuite(TestAddFiles) class TestAddFiles(OscTestCase): def _get_fixtures_dir(self): return FIXTURES_DIR...
gpl-2.0
-3,599,170,910,826,904,600
36.552941
93
0.593358
false
ubc/edx-platform
common/djangoapps/course_modes/tests/test_views.py
64
15334
import unittest import decimal import ddt from mock import patch from django.conf import settings from django.core.urlresolvers import reverse from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from util.testing import UrlResetMixin from embargo.test_utils import restrict_course from xmodule.modul...
agpl-3.0
1,549,863,987,658,812,700
40.443243
117
0.646472
false
wolfier/incubator-airflow
airflow/sensors/base_sensor_operator.py
5
2739
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
1,882,598,029,010,323,500
35.52
79
0.665571
false
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/twisted/web/test/test_xml.py
10
41831
# -*- test-case-name: twisted.web.test.test_xml -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Some fairly inadequate testcases for Twisted XML support. """ from twisted.trial.unittest import TestCase from twisted.web import sux from twisted.web import microdom from twisted.web import...
mit
-7,277,566,797,823,867,000
37.696577
90
0.582845
false
CKehl/pylearn2
pylearn2/models/tests/test_s3c_inference.py
44
14386
from __future__ import print_function from pylearn2.models.s3c import S3C from pylearn2.models.s3c import E_Step_Scan from pylearn2.models.s3c import Grad_M_Step from pylearn2.models.s3c import E_Step from pylearn2.utils import contains_nan from theano import function import numpy as np from theano.compat.six.moves im...
bsd-3-clause
-8,535,140,528,641,407,000
30.898004
217
0.536424
false
dvklopfenstein/PrincetonAlgorithms
tests/test_Selection.py
1
2392
#!/usr/bin/env python import sys from AlgsSedgewickWayne.Selection import Sort from AlgsSedgewickWayne.testcode.ArrayHistory import chk from AlgsSedgewickWayne.testcode.ArrayHistory import ArrayHistory from AlgsSedgewickWayne.testcode.InputArgs import cli_get_array def test_wk2_lec(prt=sys.stdout): """Example fro...
gpl-2.0
-1,045,273,861,957,242,400
31.767123
153
0.674331
false
svm-zhang/poolseq_tk
poolseq_tk.py
1
12829
import os import sys import argparse import collections import multiprocessing as mp import glob import subprocess import shlex import re import sz_collapse import sz_acount import sz_mergeAC import sz_filter import sz_fisher import sz_cmh import sz_plotting import sz_overlap import sz_prepVCF import sz_view import sz...
gpl-2.0
6,752,140,550,192,854,000
33.956403
133
0.628342
false
scottcunningham/ansible
lib/ansible/plugins/action/pause.py
57
5479
# Copyright 2012, Tim Bielawa <tbielawa@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
-6,424,252,642,390,632,000
39.286765
118
0.556488
false
SnakeJenny/TensorFlow
tensorflow/python/ops/init_ops.py
23
19144
# 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,785,631,063,474,566,000
34.517625
80
0.661356
false
Permutatrix/servo
tests/wpt/web-platform-tests/tools/pytest/_pytest/config.py
166
45047
""" command line options, ini-file and conftest.py processing. """ import argparse import shlex import traceback import types import warnings import py # DON't import pytest here because it causes import cycle troubles import sys, os import _pytest._code import _pytest.hookspec # the extension point definitions from ...
mpl-2.0
5,937,829,036,005,547,000
36.791107
106
0.565276
false
josephnoir/RIOT
cpu/esp32/gen_esp32part.py
15
17009
#!/usr/bin/env python # # ESP32 partition table generation tool # # Converts partition tables to/from CSV and binary formats. # # See http://esp-idf.readthedocs.io/en/latest/api-guides/partition-tables.html # for explanation of partition table structure and uses. # # Copyright 2015-2016 Espressif Systems (Shanghai) PTE...
lgpl-2.1
6,493,035,867,249,300,000
36.547461
110
0.543301
false
mfalcon/edujango
edujango/static/admin/js/compress.py
784
1896
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
apache-2.0
1,626,191,519,628,529,000
39.340426
123
0.602321
false
andyraib/data-storage
python_scripts/env/lib/python3.6/site-packages/numpy/distutils/from_template.py
20
7826
#!/usr/bin/python """ process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according to ...
apache-2.0
4,657,998,032,828,972,000
29.570313
95
0.563762
false
Audacity-Team/Audacity
lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/suncxx.py
134
1459
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Utils from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_sxx(conf): v=conf.env cc=None if v['CXX']:cc=v['CXX']...
mit
3,337,698,530,215,367,000
26.018519
102
0.637423
false
malena/bedrock
scripts/check_calendars.py
18
1596
#!/usr/bin/env python import os from icalendar import Calendar def get_ics(filename): return filename.endswith('ics') def check_if_correct_parse(ics_file): fh = open(ics_file, 'rb') try: # some calendars, such as Austrian ones have multiple # vCalendar entries - we probably don't want ...
mpl-2.0
6,486,856,726,170,703,000
29.692308
76
0.609649
false
LLNL/spack
lib/spack/spack/cmd/modules/lmod.py
5
1702
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import functools import os import llnl.util.filesystem import spack.cmd.common.arguments import spack.cmd.modules def a...
lgpl-2.1
3,430,705,824,732,387,000
33.04
90
0.703878
false
ming0627/foursquared.eclair
util/gen_parser.py
262
4392
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
apache-2.0
1,405,922,200,652,339,000
28.47651
116
0.644581
false
hknyldz/pisitools
pisilinux/pisilinux/cli/listnewest.py
1
2965
# -*- coding:utf-8 -*- # # Copyright (C) 2009, TUBITAK/UEKAE # # 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. # # Pleas...
gpl-3.0
708,454,930,612,070,500
31.944444
139
0.611467
false
dictoon/blenderseed
logger.py
2
1883
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2014-2018 The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
mit
2,159,758,539,076,128,300
32.625
87
0.7265
false
RasPlex/plex-home-theatre
plex/scripts/merge_translations.py
5
2008
#!/usr/bin/env python import sys, os, shutil lang_map = { "af-ZA": "Afrikaans", "cs-CZ": "Czech", "da": "Danish", "de": "German", "en": "English (US)", "es": "Spanish", "es-419" : "Spanish (Argentina)", "fi": "Finnish", "fr": "French", "grk": "Greek", "he": "Hebrew", "hr-HR": "Croatian", "is-IS": "Icelan...
gpl-2.0
1,667,632,191,936,396,800
22.623529
68
0.607072
false
jamestwebber/scipy
scipy/integrate/_ode.py
2
48014
# Authors: Pearu Peterson, Pauli Virtanen, John Travers """ First-order ODE integrators. User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: ...
bsd-3-clause
-8,872,592,165,447,722,000
34.021152
90
0.540655
false
hubig/CSCI121-Final-Project
poetry_gen.py
1
7225
#the_poetry_generator 2017 import random #needed for random selection of words import tkinter as tk from tkinter import ttk from tkinter import filedialog import os def main(): #"""Opens up one of the two random files.""" poem = open("Poem_Generator.txt","w") #Opens up new file "Poem_Generator.txt" ...
apache-2.0
365,445,961,883,083,700
37.917127
127
0.510588
false
zstackio/zstack-woodpecker
integrationtest/vm/mini/multiclusters/paths/multi_path270.py
1
2778
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[ [TestAction.create_mini_vm, 'vm1', 'cluster=cluster2'], [TestAction.destroy_vm, 'vm1'], [TestAction.recover_vm, ...
apache-2.0
3,537,558,680,640,688,000
38.7
104
0.691145
false
britcey/ansible
lib/ansible/modules/cloud/azure/azure_rm_securitygroup.py
36
27324
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
gpl-3.0
-218,122,055,015,500,740
36.95
211
0.549188
false
fastavro/fastavro
fastavro/_validation_py.py
1
11047
import array import numbers from collections.abc import Mapping, Sequence from fastavro.const import INT_MAX_VALUE, INT_MIN_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE from ._validate_common import ValidationError, ValidationErrorData from .schema import extract_record_type, extract_logical_type, schema_name, parse_schema f...
mit
2,820,898,320,142,424,600
24.049887
88
0.576718
false
jpurma/Kataja
kataja/saved/DerivationTree.py
1
9184
# coding=utf-8 # ############################################################################ # # *** Kataja - Biolinguistic Visualization tool *** # # Copyright 2013 Jukka Purma # # This file is part of Kataja. # # Kataja is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
gpl-3.0
669,036,241,590,469,200
36.182186
162
0.59375
false
bxshi/gem5
src/arch/x86/isa/insts/x87/arithmetic/change_sign.py
70
2266
# Copyright (c) 2007 The Hewlett-Packard Development Company # 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 implemen...
bsd-3-clause
-1,265,562,859,332,499,700
47.212766
72
0.784643
false
tedi3231/openerp
build/lib/openerp/addons/account/project/project.py
38
2477
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-4,591,497,084,212,470,000
46.634615
357
0.638272
false
zhanghenry/stocks
django/conf/locale/ml/formats.py
394
1815
# -*- 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 = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
bsd-3-clause
1,410,541,377,115,901,700
41.209302
81
0.516253
false
Luckyseal/wechatpy
wechatpy/client/api/device.py
8
8280
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import base64 import urllib from wechatpy.utils import to_text, to_binary from wechatpy.client.api.base import BaseWeChatAPI class WeChatDevice(BaseWeChatAPI): API_BASE_URL = 'https://api.weixin.qq.com/device/' def send_messag...
mit
1,080,269,611,498,647,300
24.352113
75
0.490556
false
fuhongliang/odoo
addons/document/__init__.py
434
1128
# -*- 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,037,525,495,609,306,000
39.285714
78
0.628546
false
BhallaLab/moose
moose-examples/paper-2015/Fig2_elecModels/Fig2D.py
2
3872
######################################################################### ## This program is part of 'MOOSE', the ## Messaging Object Oriented Simulation Environment. ## Copyright (C) 2015 Upinder S. Bhalla. and NCBS ## It is made available under the terms of the ## GNU Lesser General Public License version 2...
gpl-3.0
-1,466,346,624,588,140,800
34.522936
73
0.490961
false
AlphaCluster/NewsBlur
apps/rss_feeds/migrations/0039_feedicon.py
18
6742
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FeedIcon' db.create_table('rss_feeds_feedicon', ( ('feed', self.gf('utils.fiel...
mit
-2,100,673,499,900,515,800
69.229167
159
0.554583
false
ebaskoro/node-gyp
gyp/test/actions/gyptest-default.py
243
2407
#!/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. """ Verifies simple actions when using the default build target. """ import TestGyp test = TestGyp.TestGyp(workdir='workarea_default') te...
mit
1,248,392,624,794,297,600
33.884058
79
0.727046
false
pudo/aleph
aleph/migrate/versions/666668eae682_refactor_alerts.py
5
1856
"""refactor alerts Revision ID: 666668eae682 Revises: 8526f853643a Create Date: 2016-05-05 16:46:05.656646 """ from datetime import datetime from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '666668eae682' down_revision = '85...
mit
-8,783,233,447,009,741,000
32.142857
80
0.622845
false
Tillsten/PyTournament
src/TourneyModes_v2.py
1
3600
''' Created on 26.01.2010 @author: Tillsten ''' from TeamsAndPlayers import * import random class Round(object): def __init__(self, left_teams, freedraw): self.games_open = [] self.games_finnished = [] self.games_in_progress = [] self.games = [] while left...
gpl-3.0
3,809,631,785,339,774,000
29
71
0.486944
false
orchidinfosys/odoo
addons/website/tests/test_crawl.py
54
3414
# -*- coding: utf-8 -*- import logging import urlparse import time import lxml.html import openerp import re _logger = logging.getLogger(__name__) class Crawler(openerp.tests.HttpCase): """ Test suite crawling an openerp CMS instance and checking that all internal links lead to a 200 response. If a use...
gpl-3.0
1,586,682,772,091,523,800
34.936842
152
0.534564
false
flyfei/python-for-android
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/keyfactory.py
361
8791
"""Factory functions for asymmetric cryptography. @sort: generateRSAKey, parseXMLKey, parsePEMKey, parseAsPublicKey, parseAsPrivateKey """ from compat import * from RSAKey import RSAKey from Python_RSAKey import Python_RSAKey import cryptomath if cryptomath.m2cryptoLoaded: from OpenSSL_RSAKey import OpenSSL_RSAK...
apache-2.0
-8,149,207,193,273,849,000
35.176955
78
0.670458
false
jymannob/CouchPotatoServer
libs/requests/packages/urllib3/util/request.py
304
1924
from base64 import b64encode from ..packages import six ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None): """ Shortcuts for generating request headers. :param keep_alive: If ``True...
gpl-3.0
-8,295,405,752,127,636,000
27.294118
85
0.609148
false
midonet/kuryr
doc/source/conf.py
2
2475
# -*- coding: utf-8 -*- # 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...
apache-2.0
1,122,890,132,518,161,000
31.565789
79
0.688485
false
atty303/pyfilesystem
fs/httpfs.py
1
1659
""" fs.httpfs ========= """ from fs.base import FS from fs.path import normpath from fs.errors import ResourceNotFoundError, UnsupportedError from urlparse import urlparse from urllib2 import urlopen, URLError class HTTPFS(FS): """Can barely be called a filesystem, but this enables the opener system to...
bsd-3-clause
-9,217,931,800,808,576,000
23.397059
76
0.496685
false
maleficarium/youtube-dl
youtube_dl/extractor/rtvnh.py
17
2265
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ExtractorError class RTVNHIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rtvnh\.nl/video/(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.rtvnh.nl/video/131946', 'md5': 'cdbec9f4455...
unlicense
5,644,450,649,177,294,000
35.532258
84
0.52362
false
south-coast-science/scs_mfr
src/scs_mfr/cmd/cmd_csv_logger_conf.py
1
3307
""" Created on 18 Apr 2018 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import optparse # -------------------------------------------------------------------------------------------------------------------- class CmdCSVLoggerConf(object): """unix command line handler""" def __init__(self...
mit
-3,350,149,733,203,430,000
31.421569
118
0.487451
false
proversity-org/edx-platform
cms/djangoapps/contentstore/views/tests/test_tabs.py
24
8492
""" Tests for tab functions (just primitive). """ import json from contentstore.tests.utils import CourseTestCase from contentstore.utils import reverse_course_url from contentstore.views import tabs from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestC...
agpl-3.0
-8,597,676,547,037,847,000
36.409692
120
0.612106
false
IndonesiaX/edx-platform
lms/djangoapps/lms_xblock/mixin.py
21
7673
""" Namespace that defines fields common to all blocks used in the LMS """ #from django.utils.translation import ugettext_noop as _ from lazy import lazy from xblock.fields import Boolean, Scope, String, XBlockMixin, Dict from xblock.validation import ValidationMessage from xmodule.modulestore.inheritance import User...
agpl-3.0
3,660,196,276,737,328,600
42.596591
114
0.607715
false
10clouds/edx-platform
lms/djangoapps/survey/tests/test_views.py
29
5654
""" Python tests for the Survey views """ import json from collections import OrderedDict from django.test.client import Client from django.core.urlresolvers import reverse from survey.models import SurveyForm, SurveyAnswer from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories imp...
agpl-3.0
-1,037,389,096,768,592,800
32.258824
113
0.614255
false
OpenPymeMx/OCB
addons/account/report/account_invoice_report.py
14
12081
# -*- 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,289,301,241,923,004,000
55.71831
200
0.553431
false
apache/airflow
airflow/contrib/sensors/qubole_sensor.py
2
1176
# # 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...
apache-2.0
1,101,788,944,360,246,800
35.75
91
0.761054
false
piran9/Project
bindings/python/ns3modulegen_core_customizations.py
15
19476
import re from pybindgen.typehandlers import base as typehandlers from pybindgen import ReturnValue, Parameter from pybindgen.cppmethod import CustomCppMethodWrapper, CustomCppConstructorWrapper from pybindgen.typehandlers.codesink import MemoryCodeSink from pybindgen.typehandlers import ctypeparser from pybindgen imp...
gpl-2.0
-5,485,775,974,306,110,000
42.376392
119
0.584874
false
brunogamacatao/portalsaladeaula
django/contrib/localflavor/pl/forms.py
46
5225
""" Polish-specific form helpers """ import re from django.forms import ValidationError from django.forms.fields import Select, RegexField from django.utils.translation import ugettext_lazy as _ class PLProvinceSelect(Select): """ A select widget with list of Polish administrative provinces as choices. "...
bsd-3-clause
-4,652,114,944,998,184,000
33.150327
102
0.594833
false
cytec/SickRage
lib/feedparser/datetimes/__init__.py
43
1368
from __future__ import absolute_import from .asctime import _parse_date_asctime from .greek import _parse_date_greek from .hungarian import _parse_date_hungarian from .iso8601 import _parse_date_iso8601 from .korean import _parse_date_onblog, _parse_date_nate from .perforce import _parse_date_perforce from .rfc822 imp...
gpl-3.0
4,233,569,163,551,560,700
32.365854
86
0.726608
false
2014cdbg3/2015cdbg9
static/Brython3.1.1-20150328-091302/Lib/site-packages/spur.py
291
5461
#coding: utf-8 import math # 導入數學函式後, 圓周率為 pi # deg 為角度轉為徑度的轉換因子 deg = math.pi/180. class Spur(object): def __init__(self, ctx): self.ctx = ctx def create_line(self, x1, y1, x2, y2, width=3, fill="red"): self.ctx.beginPath() self.ctx.lineWidth = width self.ctx.moveTo(x1, y1) ...
gpl-3.0
199,738,541,096,231,840
34.680328
84
0.473696
false
makermade/arm_android-19_arm-linux-androideabi-4.8
lib/python2.7/distutils/tests/test_install_scripts.py
95
2652
"""Tests for distutils.command.install_scripts.""" import os import unittest from distutils.command.install_scripts import install_scripts from distutils.core import Distribution from distutils.tests import support from test.test_support import run_unittest class InstallScriptsTestCase(support.TempdirManager, ...
gpl-2.0
-2,939,922,622,268,922,000
31.341463
78
0.544872
false
hanxi/HXGame
libs/external/emscripten/third_party/ply/example/ansic/cparse.py
164
20153
# ----------------------------------------------------------------------------- # cparse.py # # Simple parser for ANSI C. Based on the grammar in K&R, 2nd Ed. # ----------------------------------------------------------------------------- import sys import clex import ply.yacc as yacc # Get the token map tokens = cl...
mit
2,550,662,019,828,215,000
22.35226
111
0.669826
false
rosmo/aurora
src/main/python/apache/aurora/client/api/sla.py
5
12572
# # 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 ...
apache-2.0
-4,513,388,311,178,006,000
37.329268
100
0.685412
false
Lochlan/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
119
23727
# Copyright (C) 2011 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 the f...
bsd-3-clause
71,401,643,696,353,624
41.521505
235
0.62039
false
zookeepr/zookeepr
zkpylons/tests/functional/test_ceiling.py
3
6694
from routes import url_for from zk.model import Product from BeautifulSoup import BeautifulSoup from .fixtures import CeilingFactory, ProductCategoryFactory, ProductFactory, PersonFactory, RoleFactory, RegistrationFactory, InvoiceFactory, InvoiceItemFactory, CompletePersonFactory from .utils import do_login from .cr...
gpl-2.0
-8,251,438,130,191,793,000
43.331126
209
0.591724
false
CMLL/taiga-back
taiga/front/templatetags/functions.py
14
1300
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2015 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
8,873,625,767,029,446,000
37.176471
74
0.738059
false
ehashman/oh-mainline
vendor/packages/Django/django/contrib/gis/tests/relatedapp/tests.py
198
14731
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.tests.utils import mysql, orac...
agpl-3.0
2,062,797,297,182,440,000
47.778146
155
0.638382
false
alxgu/ansible
lib/ansible/plugins/action/dellos9.py
38
4095
# # (c) 2016 Red Hat Inc. # # Copyright (c) 2017 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-7,493,177,357,316,088,000
43.032258
122
0.658364
false
smilusingjavascript/blink
Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_win.py
50
5429
# Copyright (C) 2013 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 the ...
bsd-3-clause
-3,563,751,862,695,588,400
38.919118
97
0.624609
false
heli522/scikit-learn
sklearn/utils/arpack.py
265
64837
""" This contains a copy of the future version of scipy.sparse.linalg.eigen.arpack.eigsh It's an upgraded wrapper of the ARPACK library which allows the use of shift-invert mode for symmetric matrices. Find a few eigenvectors and eigenvalues of a matrix. Uses ARPACK: http://www.caam.rice.edu/software/ARPACK/ """ #...
bsd-3-clause
-2,765,210,434,764,842,000
38.826167
79
0.535728
false
Michaelhobo/ee149-final-project
mavlink/pymavlink/tools/mavextract.py
41
2555
#!/usr/bin/env python ''' extract one mode type from a log ''' import sys, time, os, struct from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser.add_argument("--no-timestamps", dest="notimestamps", action='store_true', help="Log doesn't have timestamps") parser.add_argument("--rob...
gpl-3.0
-3,411,939,758,737,294,000
31.75641
116
0.580039
false