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
dsavoiu/kafe2
examples/005_convenience/customize.py
1
4059
""" kafe2 example: Plot Customization ================================= This example is a cheat sheet for plot/report customization. It briefly demonstrates methods that modify the optics of kafe2 output. """ from kafe2 import XYContainer, Fit, Plot import matplotlib.pyplot as plt # The same setup as in 001_line_fit...
gpl-3.0
5,711,633,710,796,409,000
45.125
99
0.698448
false
tkaitchuck/nupic
external/common/lib/python2.6/site-packages/logilab/astng/test/unittest_regrtest.py
1
5380
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redi...
gpl-3.0
-6,657,232,164,024,697,000
36.103448
85
0.659851
false
jmontgom10/Mimir_pyPol
oldCode/04a_analyzeBackgroundLevels.py
1
9158
import os import sys import subprocess import datetime import numpy as np from astropy.io import ascii from astropy.table import Table, Column, vstack from astropy.wcs import WCS from astropy.wcs.utils import proj_plane_pixel_scales from astropy.coordinates import SkyCoord, ICRS from astropy.stats import gaussian_fwhm_...
mit
-186,222,741,989,341,950
37.478992
86
0.683009
false
SolusOS-discontinued/pisi
pisi/cli/remove.py
2
2076
# -*- coding:utf-8 -*- # # Copyright (C) 2005 - 2007, 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. # ...
gpl-2.0
588,452,316,152,080,900
29.985075
111
0.644509
false
bxlab/HiFive_Paper
Scripts/HiCLib/bx-python-0.7.1/build/lib.linux-x86_64-2.7/bx/align/maf_tests.py
7
8301
""" Tests for `bx.align.maf`. """ import unittest import sys import bx.align as align import bx.align.maf as maf from StringIO import StringIO # A simple MAF from the rat paper days test_maf = """##maf version=1 scoring=humor.v4 # humor.v4 R=30 M=10 /cluster/data/hg15/bed/blastz.mm3/axtNet300/chr1.maf # /cluster/dat...
bsd-3-clause
185,809,693,163,886,140
42.694737
155
0.58511
false
twilio/twilio-python
tests/integration/conversations/v1/test_role.py
1
8325
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base import serialize from twilio.base.exceptions import TwilioException from twilio.http.response import Response...
mit
-948,747,413,364,128,500
34.425532
137
0.525165
false
RealTimeWeb/wikisite
MoinMoin/script/maint/reducewiki.py
1
3025
# -*- coding: iso-8859-1 -*- """ MoinMoin - reducewiki script @copyright: 2005-2006 MoinMoin:ThomasWaldmann @license: GPL, see COPYING for details """ import os, shutil, codecs from MoinMoin import config, wikiutil from MoinMoin.Page import Page from MoinMoin.action import AttachFile from MoinMoin.script import Moi...
apache-2.0
1,400,899,292,419,346,000
32.241758
84
0.63438
false
adrn/streams
streams/rewinder/sampler.py
2
2596
# coding: utf-8 """ Special emcee sampler for Rewinder. """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os import sys import time # Third-party from emcee import EnsembleSampler import numpy as np from astropy import log as logger __all__...
mit
-5,250,285,706,520,452,000
29.541176
86
0.555085
false
mmlacak/crochess
book/py/fs.py
1
4102
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 - 2020 Mario Mlačak, mmlacak@gmail.com # Licensed under 3-clause (modified) BSD license. See LICENSE for details. import os import os.path SUBFOLDERS = [ \ 'boards', \ \ 'castlings', ...
bsd-3-clause
4,197,805,374,679,246,000
30.546154
74
0.333333
false
gityopie/odoo-addons
website_google_address_form/controllers/main.py
1
1416
# -*- coding: utf-8 -*- # License AGPL-3 from odoo import http from odoo.http import request from odoo.tools.safe_eval import safe_eval class WebsiteGoogleAddressForm(http.Controller): @http.route('/my/account/get_country', type='json', auth='public') def get_country(self, country): country_id = requ...
lgpl-3.0
-5,059,540,205,622,902,000
40.647059
76
0.59887
false
jeffery9/mixprint_addons
sale/wizard/sale_make_invoice_advance.py
4
10409
############################################################################## # # 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 Affero General Public L...
agpl-3.0
9,213,265,935,563,653,000
47.413953
118
0.561245
false
KevinOConnor/klipper
klippy/extras/display/menu.py
1
36379
# -*- coding: utf-8 -*- # Basic LCD menu support # # Copyright (C) 2020 Janar Sööt <janar.soot@gmail.com> # # This file may be distributed under the terms of the GNU GPLv3 license. import os, logging, ast, re from string import Template from . import menu_keys class sentinel: pass class error(Exception): p...
gpl-3.0
-7,977,170,827,967,675,000
33.092784
79
0.546114
false
nelango/ViralityAnalysis
model/lib/pandas/tools/util.py
9
2780
import numpy as np import pandas.lib as lib import pandas as pd from pandas.compat import reduce from pandas.core.index import Index from pandas.core import common as com def match(needles, haystack): haystack = Index(haystack) needles = Index(needles) return haystack.get_indexer(needles) def cartesian...
mit
7,139,247,261,411,718,000
25.730769
76
0.576978
false
jspilker/visilens
visilens/triangleplot.py
1
8939
import matplotlib.pyplot as pl; pl.ioff() import matplotlib.cm as cm from matplotlib.ticker import MaxNLocator import scipy.ndimage import numpy as np import re import copy __all__ = ['TrianglePlot_MCMC','marginalize_2d','marginalize_1d'] def TrianglePlot_MCMC(mcmcresult,plotmag=True,plotnuisance=False): """ ...
mit
3,057,328,484,673,881,600
43.695
132
0.553194
false
TeamPeggle/ppp-helpdesk
core/reload.py
2
5214
from __future__ import print_function from future import standard_library standard_library.install_aliases() import collections import glob import os import re import sys import traceback if 'mtimes' not in globals(): mtimes = {} if 'lastfiles' not in globals(): lastfiles = set() def make_signature(f): ...
unlicense
5,963,575,439,260,024,000
30.6
88
0.493479
false
kjohnsson/modality
modality/util/frequency_polygon_blurring.py
1
2765
from __future__ import unicode_literals import numpy as np def sample_linear_density(nsamp, x0, w, y0, y1): ''' Input: nsamp - number of samples x0 - left boundary w - interval length y0 - density at left boundary y1 ...
mit
-5,759,943,636,172,562,000
31.529412
95
0.510307
false
Endika/LaZagne
Windows/src/LaZagne/softwares/sysadmin/cyberduck.py
11
2264
import sqlite3 import win32crypt import sys, os, platform, base64 import xml.etree.cElementTree as ET from config.write_output import print_output, print_debug from config.constant import * from config.header import Header from config.moduleInfo import ModuleInfo class Cyberduck(ModuleInfo): def __init__(self): opt...
lgpl-3.0
-8,486,084,563,818,609,000
31.826087
214
0.670053
false
williamfeng323/py-web
flask/lib/python3.6/site-packages/sqlalchemy/orm/sync.py
33
5451
# orm/sync.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used for copying data between instances based on ...
mit
2,865,210,851,805,501,400
37.935714
77
0.609429
false
yestech/gae-django-template
djangoappengine/boot.py
33
7809
import logging import os import sys PROJECT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) DATA_ROOT = os.path.join(PROJECT_DIR, '.gaedata') # Overrides for os.environ env_ext = {'DJANGO_SETTINGS_MODULE': 'settings'} def setup_env(): """Configures app engine environment for command-line apps."...
bsd-3-clause
6,872,104,691,817,585,000
42.143646
147
0.628121
false
gminds/rapidnewsng
django/http/multipartparser.py
19
23043
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import cgi from django.conf import settings from django.core.exceptions import SuspiciousOperation fro...
bsd-3-clause
-1,504,735,567,018,942,200
35.061033
109
0.545025
false
yanheven/cinder
cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py
3
14776
# (c) Copyright 2014 Cisco Systems 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 # # Unl...
apache-2.0
1,509,850,864,616,719,000
40.622535
78
0.509204
false
bjarnoldus/django-roa
examples/twitter_roa/models.py
1
1274
from django.db import models from django_roa import Model, Manager from django_roa.db.query import RemoteQuerySet class User(Model): name = models.CharField(max_length=255) screen_name = models.CharField(max_length=255) description = models.TextField() def __unicode__(self): return '%s (%s)' ...
bsd-3-clause
-4,442,288,461,831,171,000
26.106383
131
0.673469
false
cyberpunkych/NoSQLMap
nosqlmap.py
1
27589
#!/usr/bin/python #NoSQLMap Copyright 2013 Russell Butturini #This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at your option) any later version. #This program...
gpl-3.0
6,197,109,014,494,695,000
30.821223
209
0.662837
false
Snflow/market
market.py
1
5924
import urllib import simplejson import xlwt import sys import getopt import os.path from pprint import pprint def get_price(typeID=34, scale='regionlimit', scaleID=10000043): # Generate api address on eve-central api_address = "http://api.eve-central.com/api/marketstat/json?typeid="+str(typeID)+"&"+scale+"="+s...
mit
3,605,402,687,740,820,500
32.468927
159
0.591492
false
pvtodorov/indra
indra/databases/chembl_client.py
2
10360
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import logging import requests from sympy.physics import units from indra.databases import chebi_client, uniprot_client from indra.statements import Inhibition, Agent, Evidence from collections import defaultdict lo...
bsd-2-clause
1,453,831,027,947,524,400
28.431818
79
0.592568
false
volpino/Yeps-EURAC
static/june_2007_style/make_style.py
1
3931
#!/usr/bin/env python #from galaxy import eggs #import pkg_resources #pkg_resources.require("Cheetah") import sys, string, os.path, tempfile, subprocess #from galaxy import eggs import pkg_resources pkg_resources.require( "Cheetah" ) from Cheetah.Template import Template from subprocess import Popen, PIPE assert sy...
mit
-27,098,766,214,723
46.939024
149
0.59247
false
ging/keystone-oauth2-extension
oauth2/migrate_repo/versions/007_on_delete_cascade_on_consumer_credentials_client_id.py
2
2648
# Copyright (C) 2014 Universidad Politecnica de Madrid # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
676,433,779,511,974,300
39.121212
98
0.700151
false
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/openshift_logging/library/openshift_logging_facts.py
11
15078
''' --- module: openshift_logging_facts version_added: "" short_description: Gather facts about the OpenShift logging stack description: - Determine the current facts about the OpenShift logging stack (e.g. cluster size) options: author: Red Hat, Inc ''' import copy import json # pylint: disable=redefined-builtin, ...
apache-2.0
8,371,110,768,455,680,000
41.473239
120
0.582239
false
crazyskady/ai-game-python
Chapter05/Improvement.py
1
4989
# -*- coding: utf-8 -*- import random MUTATION_RATE = 0.2 def ChooseSection(max_span, min_span): beg = random.randint(0, max_span-min_span) end = random.randint(min_span + beg, max_span) return beg, end # 散播变异 # 1. 在染色体上随机的选择一对位置 # 2. 将这一对位置中间的值进行随机的位置交换 def MutateSM(chromo): #if random.random() > MUTATION_RATE...
mit
-2,734,002,503,878,678,000
22.089005
109
0.655251
false
roopali8/tempest
tempest/api/compute/admin/test_servers.py
6
8750
# Copyright 2013 IBM Corp. # # 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 t...
apache-2.0
1,860,584,231,885,031,200
42.969849
79
0.631886
false
koery/win-sublime
Data/Packages/IMESupport/imesupportplugin.py
1
18485
# -*- coding: utf-8 -*- import sublime import sublime_plugin import math try: from imesupport.sublime_utility import fix_cloned_view except ImportError: from .imesupport.sublime_utility import fix_cloned_view import ctypes from ctypes import windll, byref from ctypes import Structure, c_ulong from ctypes.wint...
mit
-7,997,261,403,739,738,000
30.598291
102
0.593995
false
noba3/KoTos
addons/plugin.video.phstreams/resources/lib/resolvers/grifthost.py
3
2065
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any ...
gpl-2.0
-3,521,125,499,870,504,000
32.852459
106
0.588862
false
pombreda/director
docs/conf.py
1
5855
# -*- coding: utf-8 -*- # # Director documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pick...
gpl-3.0
-3,505,479,435,465,421,000
29.65445
79
0.715628
false
Toshakins/wagtail
wagtail/wagtailusers/views/users.py
6
6214
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.db.models import Q from django.shortcuts import get_object_or_404, re...
bsd-3-clause
3,845,206,048,990,028,000
33.331492
95
0.638236
false
ingted/crmsh
modules/ui_cib.py
1
8787
# Copyright (C) 2008-2011 Dejan Muhamedagic <dmuhamedagic@suse.de> # Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. import os import glob from . import command from . import xmlutil from . import utils from . import ui_cibstatus from . import constants from . import ...
gpl-2.0
1,797,367,856,346,419,000
38.940909
93
0.57255
false
googlei18n/TachyFont
run_time/src/gae_server/third_party/old-fonttools-master/Lib/fontTools/ttLib/tables/_h_d_m_x.py
11
3008
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.misc import sstruct from . import DefaultTable hdmxHeaderFormat = """ > # big endian! version: H numRecords: H recordSize: l """ class table__h_d_m_x(DefaultTable.DefaultTable): def decompile(sel...
apache-2.0
-7,661,074,452,810,834,000
29.08
64
0.651263
false
openconnectome/ndod
maca/packages/theano_membrane_segmentation/em_evaluate.py
5
13425
################################################################################ # (c) [2013] The Johns Hopkins University / Applied Physics Laboratory All Rights Reserved. # Contact the JHU/APL Office of Technology Transfer for any additional rights. www.jhuapl.edu/ott # # Licensed under the Apache License, Version ...
apache-2.0
-4,521,729,864,298,892,300
45.134021
165
0.597542
false
cafecivet/django_girls_tutorial
Lib/site-packages/django/test/runner.py
6
11523
from importlib import import_module import os from optparse import make_option import unittest from unittest import TestSuite, defaultTestLoader from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, TestCase from django.test.utils import setup_...
gpl-2.0
1,334,041,034,199,654,000
35.932692
104
0.601059
false
chromium/chromium
native_client_sdk/src/tools/lib/get_shared_deps.py
4
6932
# Copyright 2014 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. """Helper script to close over all transitive dependencies of a given .nexe executable. e.g. Given A -> B B -> C B -> D C -> E where "A -> B" means A depen...
bsd-3-clause
-5,328,695,073,726,777,000
29.008658
79
0.655366
false
dougfelt/nototools
nototools/gen_cplist.py
2
3608
#!/usr/bin/env python # # Copyright 2016 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 require...
apache-2.0
8,612,731,639,528,319,000
31.8
79
0.674612
false
hideaki-t/sqlite-fts-python
tests/test_fts5.py
1
12135
# coding: utf-8 from __future__ import print_function, unicode_literals import sqlite3 import re from collections import Counter from sqlitefts import fts5, fts5_aux import pytest from cffi import FFI ffi = FFI() class SimpleTokenizer(fts5.FTS5Tokenizer): _p = re.compile(r'\w+', re.UNICODE) def tokenize(s...
mit
-4,572,678,191,763,336,700
35.26935
138
0.571148
false
nash-x/hws
nova/huawei/compute/affinity_api.py
1
10643
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache Lic...
apache-2.0
6,548,163,418,314,135,000
48.273148
85
0.569764
false
Sorsly/subtle
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/deploymentmanager/alpha/deploymentmanager_alpha_messages.py
1
83769
"""Generated message classes for deploymentmanager version alpha. The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages ...
mit
-3,509,249,219,554,926,600
41.094975
100
0.735296
false
LLNL/spack
lib/spack/spack/compilers/xl.py
3
4386
# 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) from spack.compiler import Compiler, UnsupportedCompilerFlag from spack.version import ver class Xl(Compiler): # Sub...
lgpl-2.1
-4,210,612,487,192,557,600
32.738462
77
0.546968
false
TetraAsh/baruwa2
baruwa/controllers/organizations.py
1
17571
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net> # # 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 S...
gpl-3.0
-7,609,831,463,490,971,000
39.025057
79
0.544818
false
jace/mxsniff
mxsniff/__init__.py
1
19707
# -*- coding: utf-8 -*- """ MX Sniff identifies common email service providers from an address or domain. """ from __future__ import absolute_import, print_function from six import string_types, text_type from six.moves.urllib.parse import urlparse from collections import namedtuple from email.utils import parseaddr...
bsd-2-clause
-7,346,651,478,814,154,000
33.499124
194
0.581095
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtNetwork/__init__/QHttpHeader.py
2
4106
# encoding: utf-8 # module PyQt4.QtNetwork # from /usr/lib/python2.7/dist-packages/PyQt4/QtNetwork.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QHttpHeader(): # skipped bases: <type 'sip.simplewrapper'> """ QHttpHeader() QHttpHeader(QHttpHeader) QHttpHeader(Q...
gpl-2.0
-6,210,554,165,270,295,000
34.396552
106
0.628105
false
cshallue/models
research/cognitive_planning/tasks.py
5
59475
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
4,448,068,774,327,045,000
38.465826
80
0.646759
false
Donkyhotay/MoonPy
zope/server/http/publisherhttpserver.py
1
2732
############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
gpl-3.0
1,636,733,148,539,408,000
37.478873
78
0.617496
false
EICT/C-BAS
src/plugins/ofed1/omavonedelegateguard.py
1
2181
from eisoil.config import expand_eisoil_path import eisoil.core.pluginmanager as pm import eisoil.core.log logger=eisoil.core.log.getLogger('ofed') from omavonedelegate import OMAv1Delegate gfed_ex = pm.getService('gfedv1exceptions') config = pm.getService('config') geniutil = pm.getService('geniutil') class OMAv1De...
bsd-3-clause
-7,023,253,175,945,145,000
50.928571
141
0.699679
false
mugurrus/superdesk-core
superdesk/io/feed_parsers/rfc822.py
5
20464
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license*. import da...
agpl-3.0
8,895,409,023,777,085,000
51.071247
117
0.449765
false
jtrobec/pants
tests/python/pants_test/backend/core/tasks/test_dependees.py
1
7068
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from textwrap import...
apache-2.0
-5,422,344,793,211,565,000
27.047619
96
0.614884
false
cherrygirl/micronaet-mx8
l10n_it_ddt_report_aeroo/report/__init__.py
3
1203
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Associazione OpenERP Italia # (<http://www.openerp-italia.org>). # Copyright(c)2008-2010 SIA "KN dati".(http://kndati.lv) All Rights Reserved. # ...
agpl-3.0
4,866,673,099,820,616,000
43.555556
80
0.613466
false
huijunwu/heron
heron/tools/common/src/python/utils/config.py
1
16852
#!/usr/bin/env python # -*- encoding: 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...
apache-2.0
7,029,551,338,896,319,000
30.97723
100
0.646689
false
mfherbst/spack
var/spack/repos/builtin/packages/py-pygobject/package.py
5
2283
############################################################################## # 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
-5,986,603,020,777,331,000
41.277778
151
0.674551
false
naokimiyasaka/sublime-text
Backup/20130918101225/BracketHighlighter/bh_modules/tagattrselect.py
8
1881
import bh_plugin class SelectAttr(bh_plugin.BracketPluginCommand): def run(self, edit, name, direction='right'): if self.left.size() <= 1: return tag_name = r'[\w\:\-]+' attr_name = r'''([\w\-\.:]+)(?:\s*=\s*(?:(?:"((?:\.|[^"])*)")|(?:'((?:\.|[^'])*)')|([^>\s]+)))?''' t...
mit
-4,504,091,623,196,249,600
33.833333
106
0.472621
false
teknologkoren/Strequelistan
strecklista/forms.py
1
4378
from django import forms from django.core.exceptions import ValidationError from django.forms import DateInput, DateTimeInput, ModelForm from datetime import datetime, timedelta from .models import Quote, RegisterRequest, Suggestion class LoginForm(forms.Form): username = forms.CharField( label="Username...
mpl-2.0
5,802,402,802,947,574,000
26.708861
117
0.586341
false
therealbnut/swift
utils/swift_build_support/swift_build_support/toolchain.py
4
5948
# swift_build_support/toolchain.py ------------------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
2,413,251,762,167,321,000
31.326087
78
0.559011
false
ActiveState/code
recipes/Python/576441_modificatiblogger_exemple_adding/recipe-576441.py
1
11672
#!/usr/bin/python # # Copyright (C) 2007 Google 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 ...
mit
5,251,647,294,224,849,000
35.136223
122
0.680946
false
harlowja/Zake
zake/fake_storage.py
2
10514
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 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 # # ...
apache-2.0
-179,977,517,755,504,350
35.891228
79
0.509701
false
bq/bitbloq-offline
app/res/web2board/linux/platformio/builder/scripts/frameworks/arduino.py
5
6855
# Copyright 2014-2015 Ivan Kravets <me@ikravets.com> # # 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...
gpl-3.0
4,259,678,504,592,114,700
29.065789
143
0.59008
false
aaannndddyyy/deep_q_rl
deep_q_rl/rl_glue_ale_agent.py
3
16387
""" This uses the skeleton_agent.py file from the Python-codec of rl-glue as a starting point. Author: Nathan Sprague """ # # Copyright (C) 2008, Brian Tanner # #http://rl-glue-ext.googlecode.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wit...
bsd-3-clause
-229,187,849,025,680,800
33.940299
79
0.549399
false
IsCoolEntertainment/debpkg_libcloud
libcloud/common/base.py
1
27569
# 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
-4,774,518,767,764,823,000
29.734671
79
0.565418
false
galak/zephyr
doc/_scripts/gen_kconfig_rest.py
3
26821
#!/usr/bin/env python3 """ Generates an alphabetical index of Kconfig symbols with links in index.rst, and a separate CONFIG_FOO.rst file for each Kconfig symbol. The generated symbol pages can be referenced in RST as :kconfig:`foo`, and the generated index page as `configuration options`_. Optionally, the documenta...
apache-2.0
2,115,952,332,719,019,300
30.740828
110
0.60475
false
saurabh6790/omn-lib
webnotes/tests/test_nested_set.py
37
3754
import unittest, webnotes class TestNSM(unittest.TestCase): def setUp(self): webnotes.conn.sql("delete from `tabItem Group`") self.data = [ ["t1", None, 1, 20], ["c0", "t1", 2, 3], ["c1", "t1", 4, 11], ["gc1", "c1", 5, 6], ["gc2", "c1", 7, 8], ["gc3", "c1", 9, 10], ["c2", "t1", 12, ...
mit
-6,099,264,567,639,548,000
22.46875
95
0.486947
false
apache/incubator-allura
ForgeGit/forgegit/tests/__init__.py
3
1048
# -*- 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 Apach...
apache-2.0
-4,043,995,509,077,892,000
42.666667
68
0.69084
false
vecnet/om
website/apps/ts_om_edit/views/ScenarioDeploymentsView.py
1
6440
# -*- coding: utf-8 -*- # # This file is part of the VecNet OpenMalaria Portal. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/om # # This Source Code Form is subject to the terms of t...
mpl-2.0
2,472,985,344,018,509,000
37.333333
112
0.647516
false
upconsulting/IsisCB
isiscb/isisdata/migrations/0078_auto_20180623_0200.py
1
1055
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-06-23 02:00 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): dependencies = [ migrations.swappable_depend...
mit
-4,456,069,879,641,526,000
36.678571
208
0.664455
false
trabacus-softapps/openerp-8.0-cc
openerp/addons/website_mail/__openerp__.py
3
1696
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
4,391,138,260,093,430,300
34.333333
78
0.574882
false
donalm/webtest
lib/python/webtest/session_factory.py
1
4655
#!/usr/bin/env python from txredisapi import UnixConnectionPool from webtest.session_dict import PersistentSessionDict from webtest import log logger = log.get_logger() def logging_errback(f, label="logging_errback"): logger.error("%s: %s" % (label, f.getBriefTraceback())) class RedisSessionFactory(object): ...
mit
2,445,796,118,297,768,400
28.839744
93
0.610956
false
pinkavaj/gnuradio
gr-utils/python/modtool/modtool_newmod.py
51
4256
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
gpl-3.0
-72,103,753,874,746,850
40.72549
103
0.611607
false
Acehaidrey/incubator-airflow
airflow/providers/apache/hdfs/sensors/hdfs.py
2
7151
# # 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
-5,695,859,827,206,844,000
40.097701
110
0.620892
false
jiwanlimbu/aura
keystone/identity/shadow_backends/base.py
3
2845
# Copyright 2012 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 or agreed to in...
apache-2.0
-1,451,795,136,754,261,500
30.966292
78
0.669947
false
jennifersalas/3D_CA
objefileviewer.py
1
2135
# Basic OBJ file viewer. needs objloader from: # http://www.pygame.org/wiki/OBJFileLoader # LMB + move: rotate # RMB + move: pan # Scroll wheel: zoom in/out import sys, pygame from pygame.locals import * from pygame.constants import * from OpenGL.GL import * from OpenGL.GLU import * # IMPORT OBJECT LOADER from objloa...
agpl-3.0
1,352,245,264,052,173,600
26.025316
77
0.600468
false
stackforge/solum
solum/tests/api/camp/test_camp_v1_1_endpoint.py
2
1330
# 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 t...
apache-2.0
-2,591,464,329,070,112,000
39.30303
77
0.741353
false
STRML/OpenBazaar
node/constants.py
3
1485
# ######## KADEMLIA CONSTANTS ########### BIT_NODE_ID_LEN = 160 HEX_NODE_ID_LEN = BIT_NODE_ID_LEN // 4 # Small number representing the degree of # parallelism in network calls alpha = 3 # Maximum number of contacts stored in a bucket # NOTE: Should be an even number. k = 80 # Maximum number of contacts stored in th...
mit
2,030,193,322,990,321,700
25.517857
70
0.723906
false
halberom/ansible-modules-extras
packaging/os/zypper.py
6
13421
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Patrick Callahan <pmc@patrickcallahan.com> # based on # openbsd_pkg # (c) 2013 # Patrik Lundin <patrik.lundin.swe@gmail.com> # # yum # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # # This...
gpl-3.0
8,136,235,898,409,910,000
34.981233
215
0.615602
false
madchills/hubble
hubblestack/files/hubblestack_nova/win_secedit.py
1
15598
# -*- encoding: utf-8 -*- ''' :maintainer: HubbleStack / madchills :maturity: 2016.7.0 :platform: Windows :requires: SaltStack ''' from __future__ import absolute_import import copy import fnmatch import logging import salt.utils from pprint import pprint try: import codecs import uuid HAS_WINDOWS_MODUL...
apache-2.0
-2,018,792,189,611,448,600
36.405276
127
0.501282
false
BridgesLab/mousedb
mousedb/animal/urls/strain.py
2
1299
"""This module is the url dispatcher for strain related views. It takes the root */strain...* and generates strain-list, strain-new, strain-edit, strain-delete, strain-detail and views from animal.views.""" from django.conf.urls import url from mousedb.animal import views from mousedb.data.views import StrainData, S...
bsd-3-clause
-7,035,022,910,947,002,000
45.392857
143
0.617398
false
rcrowder/nupic
tests/unit/nupic/encoders/sdrcategory_test.py
10
10958
# ---------------------------------------------------------------------- # 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...
agpl-3.0
-6,725,890,087,020,795,000
32.613497
78
0.633966
false
cwisecarver/osf.io
admin/spam/views.py
13
5073
from __future__ import unicode_literals from django.views.generic import FormView, ListView, DetailView from django.contrib.auth.mixins import PermissionRequiredMixin from django.http import Http404 from osf.models.comment import Comment from osf.models.user import OSFUser from osf.models import SpamStatus from osf....
apache-2.0
246,785,988,212,605,500
35.235714
85
0.632367
false
datacratic/StarCluster
starcluster/commands/spothistory.py
4
6149
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 3 of the License, or (at your option) any # later ...
gpl-3.0
3,046,816,515,218,756,600
43.23741
79
0.547081
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/soyuz/tests/test_archive_agent.py
1
1395
# Copyright 2010-2012 Canonical Ltd. This software is licensed under the GNU # Affero General Public License version 3 (see the file LICENSE). """Test Archive software center agent celebrity.""" from zope.component import getUtility from lp.app.interfaces.launchpad import ILaunchpadCelebrities from lp.testing impor...
agpl-3.0
359,916,961,174,090,050
38.857143
77
0.706093
false
ContinuumIO/dynd-python
dynd/ndt/test/test_dtype.py
5
8514
import sys import ctypes import unittest from dynd import ndt class TestType(unittest.TestCase): def test_tuple(self): tp = ndt.tuple(ndt.int32, ndt.float64) def test_struct(self): tp = ndt.struct(x = ndt.int32, y = ndt.float64) def test_callable(self): tp = ndt.callable(ndt.void,...
bsd-2-clause
-8,403,474,971,097,990,000
39.350711
79
0.633192
false
OCM-Lab-PUC/switch-chile
switch_mod/Chile/capacity_margin.py
1
1848
from pyomo.environ import * def define_components(mod): """ Add the planning reserve factor for capacity This is just a translation of the AMPL code. I assume there are no storage projects and that flexible baseload plants are dispatchable. TODO: -Test this. -Add a loading ...
apache-2.0
2,931,847,859,504,690,000
44.25
100
0.579545
false
niftynei/zulip
zerver/tests/test_type_debug.py
15
5086
from __future__ import print_function import sys from unittest import TestCase from six.moves import cStringIO as StringIO from zerver.lib.type_debug import print_types from typing import Any, Callable, Dict, Iterable, Tuple, TypeVar T = TypeVar('T') def add(x=0, y=0): # type: (Any, Any) -> Any return x + ...
apache-2.0
-1,924,752,163,495,212,000
37.240602
132
0.451435
false
WellDone/pymomo
pymomo/config/site_scons/test_summary.py
2
1801
import os.path def build_summary_cmd(target, source, env): """ Build a text file with the status results for all of the unit tests in sources. sources should point to an array of strings corresponding to .status files. """ some_failed = False targets = {} for node in source: path = str(node) name, targ,...
lgpl-3.0
3,122,456,705,946,558,500
23.684932
105
0.646863
false
toomoresuch/pysonengine
parts/google_appengine/lib/django/django/contrib/admin/templatetags/admin_modify.py
32
10224
from django import template from django.contrib.admin.views.main import AdminBoundField from django.template import loader from django.utils.text import capfirst from django.db import models from django.db.models.fields import Field from django.db.models.related import BoundRelatedObject from django.conf import setting...
mit
2,964,084,063,973,223,000
40.392713
118
0.634781
false
ssrl/go
misc/dashboard/godashboard/gobuild.py
3
17794
# Copyright 2009 The Go 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 the server part of the continuous build system for Go. It must be run # by AppEngine. from django.utils import simplejson from google.appengine.api impo...
bsd-3-clause
3,911,460,761,777,126,000
30.888889
108
0.570754
false
cathyyul/sumo-0.18
tools/route/route2poly.py
2
2792
#!/usr/bin/env python """ @file route2poly.py @author Jakob Erdmann @date 2012-11-15 @version $Id: route2poly.py 14425 2013-08-16 20:11:47Z behrisch $ From a sumo network and a route file, this script generates a polygon (polyline) for every route which can be loaded with sumo-gui for visualization SUMO, Simul...
gpl-3.0
-629,852,987,685,948,400
36.226667
120
0.64649
false
GaretJax/coolfig
coolfig/providers.py
1
2341
import errno import os from functools import partial NOT_PROVIDED = object() class ConfigurationProvider(object): def get(self, key): raise NotImplementedError() def iterprefixed(self, prefix): raise NotImplementedError() class DictConfig(ConfigurationProvider): """ Loads configur...
mit
-3,658,767,841,437,671,000
26.541176
66
0.567706
false
harterj/moose
modules/porous_flow/doc/content/modules/porous_flow/tests/fluidstate/fluidstate.py
12
5385
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
lgpl-2.1
-285,013,033,532,436,960
39.488722
152
0.647354
false
ercchy/coding-events
web/views/events.py
1
11422
from django.contrib.gis.geoip import GeoIPException from django.shortcuts import render_to_response from django.template import RequestContext from django.template import loader from django.template import Context from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required fro...
mit
4,533,266,203,250,255,400
28.979003
101
0.717913
false
kuke/models
fluid/PaddleCV/caffe2fluid/kaffe/paddle/transformer.py
1
13679
import numpy as np from ..errors import KaffeError, print_stderr from ..graph import GraphBuilder, NodeMapper from ..layers import NodeKind from ..transformers import (DataInjector, DataReshaper, NodeRenamer, SubNodeFuser, ReLUFuser, BatchNormScaleBiasFuser, Batc...
apache-2.0
-6,877,129,686,947,310,000
33.984655
97
0.570948
false
thepaul/uftrace
tests/t222_external_data.py
1
1773
#!/usr/bin/env python from runtest import TestBase import subprocess as sp TDIR='xxx' class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'abc', """ # DURATION TID FUNCTION [28141] | main() { [28141] | /* external-data: user message */ [28141] ...
gpl-2.0
-4,265,747,211,153,739,300
30.660714
89
0.48731
false
vwbusguy/beefy-connection
beefyconnection/beefyflask.py
1
2707
import os,re from flask import * from beefy_db import BeefyDatabase app = Flask(__name__) def globals(): return { 'title' : 'Beefy Connection!', 'logo' : '/static/images/beefy.png'} @app.route("/") def form(): return render_template('mainform.html',**globals()) @app.route("/bc-post",methods=['P...
gpl-3.0
5,017,488,346,320,035,000
41.296875
106
0.533062
false
bgshin/vddc
src/train_single.py
1
5219
#! /usr/bin/env python import os import argparse import tensorflow as tf import numpy as np import datetime # from utils import cnn_data_helpers from src.utils.butils import Timer from sklearn.metrics import precision_score, recall_score, f1_score # from cnn_models.w2v_cnn import W2V_CNN from src.models.cnn_model imp...
apache-2.0
-6,664,904,199,226,402,000
36.285714
112
0.643801
false
jungx098/BingRewards
test/test_gt.py
2
1613
#!/usr/bin/python2 import os import sys import random sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pkg/queryGenerators")) from googleTrends import queryGenerator if __name__ == '__main__': G = queryGenerator("nothing") T = queryGenerator("nothing2") history = set("nothing") #print ...
lgpl-3.0
3,604,711,186,154,659,300
35.659091
85
0.676379
false
bretth/djset
djset/commands.py
1
1634
from docopt import docopt import os import sys from .djset import DjSecret, DjConfig from .utils import _locate_settings COMMAND = """ Usage: dj%(cmd)s add <key>=<value> [--global] [--name=<name> | --settings=<settings>] dj%(cmd)s remove <key> [--global] [--name=<name> | --settings=<settings>] """ def _c...
mit
-980,778,445,093,819,100
22.681159
86
0.563035
false
dvhbru/dvhb-hybrid
dvhb_hybrid/amodels/convert.py
1
6278
import logging import sqlalchemy as sa import sqlalchemy.types as sa_types from django.db.models import ForeignKey, ManyToManyField, ManyToManyRel, OneToOneField from sqlalchemy.dialects.postgresql import ARRAY as SA_ARRAY, JSONB as SA_JSONB, UUID as SA_UUID from .model import Model from .relations import ManyToManyR...
mit
5,080,585,300,669,108,000
34.072626
96
0.587608
false