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
drtconway/bioinfosummer2016
solutions/exercise-2/mlst.py
1
2255
from pykmer.basics import kmers from pykmer.file import readFasta import pykmer.kfset as kfset import gzip import sys def isFasta(nm): """does this filename look like a FASTA file?""" if nm.endswith(".fa"): return True if nm.endswith(".fas"): return True if nm.endswith(".fasta"): ...
apache-2.0
1,678,989,841,716,892,000
22.736842
57
0.482483
false
alberto-antonietti/nest-simulator
pynest/examples/hh_phaseplane.py
12
5096
# -*- coding: utf-8 -*- # # hh_phaseplane.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, ...
gpl-2.0
524,197,834,816,448,600
28.287356
80
0.632457
false
sunze/py_flask
migrations/versions/41a93799080_.py
1
2207
"""empty message Revision ID: 41a93799080 Revises: 1a9765a646b Create Date: 2015-07-02 14:38:39.418104 """ # revision identifiers, used by Alembic. revision = '41a93799080' down_revision = '1a9765a646b' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### comm...
mit
-9,024,296,133,338,059,000
38.410714
93
0.673312
false
PyGithub/PyGithub
tests/GitBlob.py
3
3579
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
lgpl-3.0
-428,451,633,630,801,900
54.921875
142
0.487566
false
jordanemedlock/psychtruths
temboo/Library/Klout/User/Score.py
5
3024
# -*- coding: utf-8 -*- ############################################################################### # # Score # Retrieves a user's Klout Score and deltas. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fil...
apache-2.0
3,185,000,152,264,593,400
33.758621
129
0.658399
false
fritsvanveen/QGIS
python/plugins/processing/algs/qgis/DeleteColumn.py
1
2904
# -*- coding: utf-8 -*- """ *************************************************************************** DeleteColumn.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com ************************...
gpl-2.0
-578,896,745,921,854,100
37.210526
98
0.530303
false
willusher/ansible-modules-core
system/authorized_key.py
7
17223
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <brado@movedbylight.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 ...
gpl-3.0
7,703,628,719,907,489,000
33.51503
144
0.600824
false
levinas/assembly
lib/assembly/plugins/bwa.py
2
2226
import os from plugins import BaseAligner from yapsy.IPlugin import IPlugin from asmtypes import ArastDataInputError class BwaAligner(BaseAligner, IPlugin): def run(self, contig_file=None, reads=None, merged_pair=False): ### Data Checks if len(self.data.contigfiles) != 1: raise ArastDa...
mit
6,815,270,316,279,326,000
41
112
0.577718
false
Shrhawk/edx-platform
common/lib/xmodule/xmodule/library_content_module.py
10
24844
# -*- coding: utf-8 -*- """ LibraryContent: The XBlock used to include blocks from a library in a course. """ import json from lxml import etree from copy import copy from capa.responsetypes import registry from gettext import ngettext from lazy import lazy from .mako_module import MakoModuleDescriptor from opaque_key...
agpl-3.0
3,293,100,090,633,693,700
42.275261
120
0.614412
false
2uller/LotF
App/Lib/site-packages/pygame/tests/run_tests__tests/print_stdout/fake_2_test.py
75
1178
if __name__ == '__main__': import sys import os pkg_dir = (os.path.split( os.path.split( os.path.split( os.path.abspath(__file__))[0])[0])[0]) parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'test...
gpl-2.0
7,055,699,882,532,400,000
25.44186
65
0.54584
false
bclau/nova
nova/tests/api/openstack/compute/plugins/v3/test_multiple_create.py
7
19700
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # 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/licen...
apache-2.0
1,470,368,688,260,082,700
37.104449
78
0.560254
false
perkinslr/pypyjs
website/js/pypy.js-0.2.0/lib/modules/test/test_fractions.py
97
24516
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.test_support import run_unittest import math import numbers import operator import fractions import sys import unittest from copy import copy, deepcopy from cPickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd # decorator for sk...
mit
-2,282,906,070,965,819,000
39.522314
79
0.564815
false
ahmadRagheb/goldenHR
erpnext/hr/doctype/job_applicant/job_applicant.py
23
1515
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document import frappe from frappe import _ from frappe.utils impor...
gpl-3.0
-3,867,678,942,172,728,300
33.431818
128
0.714191
false
carljm/django
django/contrib/gis/utils/layermapping.py
137
27371
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: https://docs.djangoproject.com/en/dev/ref/contrib/gi...
bsd-3-clause
7,468,004,842,787,297,000
42.515103
118
0.574586
false
Juniper/nova
nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py
2
3191
# Copyright (c) 2017 Veritas Technologies 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/licenses/LICENSE-2.0 # # Unl...
apache-2.0
-6,664,843,978,268,052,000
37.445783
78
0.677217
false
smasala/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
126
4421
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
8,237,443,013,185,823,000
44.112245
133
0.714997
false
maxplanck-ie/HiCExplorer
hicexplorer/test/long_run/test_hicAggregateContacts_trivial_runs_two.py
1
3482
import warnings warnings.simplefilter(action="ignore", category=RuntimeWarning) warnings.simplefilter(action="ignore", category=PendingDeprecationWarning) import pytest from tempfile import NamedTemporaryFile import os from psutil import virtual_memory import hicexplorer.hicAggregateContacts mem = virtual_memory() me...
gpl-2.0
-9,175,485,401,312,036,000
48.042254
103
0.641011
false
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/nose/commands.py
68
6310
""" nosetests setuptools command ---------------------------- The easiest way to run tests with nose is to use the `nosetests` setuptools command:: python setup.py nosetests This command has one *major* benefit over the standard `test` command: *all nose plugins are supported*. To configure the `nosetests` comman...
bsd-3-clause
-5,693,749,986,511,657,000
35.686047
79
0.595721
false
skozilla/betfair.py
betfair/models.py
2
14047
# -*- coding: utf-8 -*- from __future__ import absolute_import from schematics.types import IntType from schematics.types import LongType from schematics.types import FloatType from schematics.types import StringType from schematics.types import BooleanType from schematics.types.compound import DictType from schemati...
mit
-8,392,419,541,113,884,000
28.203742
77
0.73069
false
jeffery9/mixprint_addons
account_payment/wizard/account_payment_pay.py
54
2479
# -*- 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
-7,802,519,886,993,534,000
41.016949
81
0.601049
false
Qihoo360/luajit-jsonnet
libjsonnet/setup.py
6
1969
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-8,493,252,767,761,570,000
29.765625
82
0.667852
false
grimreaper/parallel-ssh
psshlib/cli.py
58
4364
# Copyright (c) 2009-2012, Andrew McNabb # Copyright (c) 2003-2008, Brent N. Chun import optparse import os import shlex import sys import textwrap from psshlib import version _DEFAULT_PARALLELISM = 32 _DEFAULT_TIMEOUT = 0 # "infinity" by default def common_parser(): """ Create a basic OptionParser wit...
bsd-3-clause
-3,223,738,282,113,586,700
38.315315
77
0.601512
false
mohierf/bottle-webui
alignak_webui/objects/element_state.py
1
13027
#!/usr/bin/env python # -*- coding: utf-8 -*- # Many functions need to use protected members of a base class # pylint: disable=protected-access # Attributes need to be defined in constructor before initialization # pylint: disable=attribute-defined-outside-init # Copyright (c) 2015-2017: # Frederic Mohier, frederic....
agpl-3.0
-1,039,968,103,025,583,700
39.456522
99
0.528287
false
spacy-io/thinc
thinc/neural/_classes/rnn.py
1
8999
# coding: utf8 from __future__ import unicode_literals from .model import Model from ... import describe from ...describe import Dimension, Synapses, Biases, Gradient from ...api import wrap, layerize from .._lsuv import svd_orthonormal from ..util import copy_array def BiLSTM(nO, nI): """Create a bidirectional ...
mit
-4,539,015,842,005,158,400
35.433198
85
0.561285
false
elgambitero/FreeCAD_sf_master
src/Mod/Plot/plotSeries/__init__.py
280
1806
#*************************************************************************** #* * #* Copyright (c) 2011, 2012 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
lgpl-2.1
-9,009,468,356,725,068,000
60.275862
76
0.385382
false
berquist/PyQuante
PyQuante/IO/FormatHandlers/XYZ.py
2
1987
from PyQuante.IO.Data import Data class Handler(object): key = "xyz" description = "XYZ File Format" ext = ".xyz" def read(self,string): """ Arguments: - string: String to parse Return: - data: Data object, with a molecule and a molecul...
bsd-3-clause
-4,525,616,361,123,836,400
29.106061
80
0.491193
false
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/cognito/sync/exceptions.py
135
1648
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
7,616,950,774,703,655,000
29.518519
77
0.78216
false
krafczyk/spack
var/spack/repos/builtin/packages/dyninst/package.py
2
4619
############################################################################## # 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
-8,609,952,003,590,190,000
41.768519
79
0.591037
false
eugeniashurko/ReGraph
docs/source/conf.py
1
5928
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ReGraph documentation build configuration file, created by # sphinx-quickstart on Mon Dec 4 16:51:07 2017. # # 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 # au...
mit
5,154,024,862,437,793,000
28.058824
79
0.668354
false
saeki-masaki/glance
glance/async/flows/convert.py
5
3953
# Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
7,999,114,672,692,065,000
33.373913
79
0.618518
false
roisagiv/webrtc-ios
third_party/jsoncpp/scons-tools/targz.py
264
3055
"""tarball Tool-specific initialization for tarball. """ ## Commands to tackle a command based implementation: ##to unpack on the fly... ##gunzip < FILE.tar.gz | tar xvf - ##to pack on the fly... ##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz import os.path import SCons.Builder import SCons.Node.FS import SCons.Ut...
bsd-3-clause
5,207,807,402,997,100,000
36.256098
124
0.592799
false
llasram/zmforth
zmerge.py
2
2162
#! /usr/bin/python # Copyright (c) 2009 Marshall Vandegrift # # 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. # # Thi...
gpl-3.0
3,755,972,663,610,425,300
31.268657
77
0.59667
false
jbaginski/androguard
elsim/elsim/similarity/simhash.py
44
2143
""" Implementation of Charikar similarity hashes in Python. Most useful for creating 'fingerprints' of documents or metadata so you can quickly find duplicates or cluster items. Part of python-hashes by sangelone. See README and LICENSE. """ from hashtype import hashtype class simhash(hashtype): def create_hash...
apache-2.0
4,767,497,150,254,433,000
32.484375
78
0.54363
false
CuonDeveloper/cuon
cuon_client/cuon/bin/Adressenconv.py
5
2725
# -*- coding: utf-8 -*- import sys,os notconvert=['Autoelektrik','Brauereibedarf', 'Bildhauer', 'Bauelemente', 'Feuerwehren'] format = sys.argv[1] CalcFiles = os.listdir('./') print CalcFiles for onefile in CalcFiles: if onefile[len(onefile)-4:] == '.xls': os.system('unoconvCSV.py ' + one...
gpl-3.0
5,438,178,348,555,077,000
32.195122
87
0.508082
false
DarrenRainey/gpicsync
gpicsync-GUI.py
19
71580
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # # Developer: francois.schnell francois.schnell@gmail.com # http://francois.schnell.free.fr # # Contributors, see: http://code.google.com/p/gpicsync/wiki/Contributi...
gpl-2.0
6,623,295,444,965,535,000
50.533477
245
0.574071
false
jay-lau/magnum
magnum/tests/functional/api/v1/test_baymodel.py
1
7160
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
apache-2.0
-4,001,244,347,553,646,000
37.494624
75
0.662151
false
abhishek-ch/hue
desktop/core/ext-py/Django-1.6.10/tests/admin_util/tests.py
51
11281
from __future__ import absolute_import, unicode_literals from datetime import datetime from django.conf import settings from django.contrib import admin from django.contrib.admin import helpers from django.contrib.admin.util import (display_for_field, flatten_fieldsets, label_for_field, lookup_field, NestedObject...
apache-2.0
-5,333,946,411,166,168,000
32.876877
107
0.577786
false
jilljenn/django-planet
planet/views.py
1
9854
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse, reverse_lazy from django.forms import ValidationError from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext from django.utils.translation i...
bsd-3-clause
-4,727,939,385,286,785,000
31.521452
109
0.636899
false
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/pkg_resources/extern/__init__.py
245
2487
import sys class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. """ def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self.vendored_names = set(v...
gpl-3.0
4,896,046,701,036,025,000
33.068493
78
0.557298
false
OmgOhnoes/Flexget
flexget/plugins/list/pending_list.py
3
8325
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from collections import MutableSet from datetime import datetime from sqlalchemy import Column, Unicode, Integer, DateTime, or_, func, Boolean from sqlalchemy.or...
mit
8,229,410,348,878,435,000
34.275424
116
0.646366
false
bartoldeman/easybuild-framework
easybuild/toolchains/compiler/gcc.py
1
8302
## # Copyright 2012-2018 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
7,465,561,598,875,251,000
46.170455
123
0.642134
false
jf-parent/webbase
{{cookiecutter.project_name}}/admin/app.py
1
11726
import os import importlib import base64 import logging from logging.handlers import TimedRotatingFileHandler import sys import asyncio from cryptography import fernet from pymongo import MongoClient from bson.objectid import ObjectId from wtforms import form, fields, validators from flask import Flask, url_for, redir...
mit
5,518,651,046,875,246,000
27.461165
79
0.607539
false
JetBrains/intellij-community
plugins/hg4idea/testData/bin/mercurial/merge.py
90
28398
# merge.py - directory-level update/merge handling for Mercurial # # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import nullid, nullrev, hex, bin from i18n import _...
apache-2.0
1,096,146,113,929,810,800
36.365789
78
0.508205
false
amisrs/one-eighty
venv2/lib/python2.7/site-packages/sqlalchemy/orm/strategy_options.py
19
35455
# 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 """ """ from .interfaces import MapperOption, PropComparator from .. import util from ..sql.base imp...
mit
-575,918,665,679,060,200
31.557392
84
0.593287
false
CitrineInformatics/python-citrination-client
citrination_client/models/columns/alloy_composition.py
1
2265
from citrination_client.models.columns.base import BaseColumn class AlloyCompositionColumn(BaseColumn): """ An alloy composition column configuration for a data view. Parameterized with the basic column options, plus the balance element for the column and the basis value for the composition. """ ...
apache-2.0
825,635,944,157,802,400
30.458333
97
0.56777
false
wanghaven/nupic
src/nupic/database/Connection.py
49
22041
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 progra...
agpl-3.0
6,291,771,680,114,354,000
31.946188
82
0.660043
false
wvengen/ndg_oauth_server
ndg/oauth/server/lib/authenticate/password_client_authenticator.py
1
2157
"""OAuth 2.0 WSGI server middleware providing MyProxy certificates as access tokens """ __author__ = "W van Engen" __date__ = "01/11/12" __copyright__ = "(C) 2011 FOM / Nikhef" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "wvengen+oauth2@nikhef.nl" __revision__ = "$Id$" from base64 impor...
bsd-3-clause
-3,904,136,881,797,211,000
39.698113
106
0.669448
false
ruacon35/ns3-wireless-planning.ns-3
bindings/python/apidefs/gcc-ILP32/ns3_module_onoff.py
8
5346
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## onoff-application.h: ns3::OnOffApplication [class] module.add_class('OnOffApplication', parent=root_module['ns3::Application']) ## Register a nested...
gpl-2.0
-7,211,888,160,735,546,000
32.622642
122
0.676581
false
apache/incubator-airflow
tests/providers/google/cloud/operators/test_dataproc_system.py
10
2378
# # 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
-7,103,677,334,699,023,000
35.584615
106
0.731287
false
ypwalter/evennia
evennia/server/session.py
4
5214
""" This module defines a generic session class. All connection instances (both on Portal and Server side) should inherit from this class. """ import time #------------------------------------------------------------ # Server Session #------------------------------------------------------------ class Session(objec...
bsd-3-clause
-7,390,156,368,993,411,000
31.792453
80
0.591293
false
numenta/nupic
src/nupic/support/configuration_custom.py
10
10011
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 progra...
agpl-3.0
144,284,257,703,427,520
31.715686
80
0.670762
false
mancoast/CPythonPyc_test
cpython/230_test_unpack.py
9
2513
from test.test_support import TestFailed, verbose t = (1, 2, 3) l = [4, 5, 6] class Seq: def __getitem__(self, i): if i >= 0 and i < 3: return i raise IndexError a = -1 b = -1 c = -1 # unpack tuple if verbose: print 'unpack tuple' a, b, c = t if a != 1 or b != 2 or c != 3: raise TestFail...
gpl-3.0
-7,921,091,551,016,766,000
16.451389
69
0.621568
false
c4fcm/MediaCloud-API-Client
mediacloud/storage.py
1
4358
import copy import logging class StoryDatabase(object): # callbacks you can register listeners against EVENT_PRE_STORY_SAVE = "preStorySave" EVENT_POST_STORY_SAVE = "postStorySave" def __init__(self): self._logger = logging.getLogger(__name__) self._db = None def storyExists(sel...
mit
-3,076,806,770,864,733,700
35.016529
111
0.638825
false
JordiCarreraVentura/spellchecker
lib/WordEmbeddings.py
1
1457
import gensim from collections import ( Counter, defaultdict as deft ) from multiprocessing import cpu_count from tqdm import tqdm class WordEmbeddings: def __init__( self, dimensions=100, window=5, min_count=1, workers=1, # workers=cpu_count(), ...
gpl-3.0
333,558,470,550,284,300
21.765625
63
0.520247
false
DataFighter/Lasagne-tutorial
lasagne/objectives.py
2
6976
import theano import theano.tensor as T from theano.tensor.nnet import binary_crossentropy, categorical_crossentropy def mse(x, t): """Calculates the MSE mean across all dimensions, i.e. feature dimension AND minibatch dimension. :parameters: - x : predicted values - t : target values ...
mit
4,270,483,622,886,933,500
38.636364
77
0.576835
false
kushalbhola/MyStuff
venv/Lib/site-packages/pip/_vendor/chardet/euckrprober.py
290
1748
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
apache-2.0
3,699,644,412,457,661,000
36.191489
69
0.705378
false
jonparrott/gcloud-python
dns/tests/unit/test_resource_record_set.py
3
3290
# Copyright 2015 Google 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 required by applicable law or agreed to in writing, s...
apache-2.0
-2,356,456,485,689,572,400
33.270833
76
0.567173
false
mdehollander/bioconda-recipes
recipes/fgbio/fgbio.py
27
3054
#!/usr/bin/env python # # Wrapper script for invoking the jar. # # This script is written for use with the Conda package manager. import subprocess import sys import os from os import access, getenv, path, X_OK # Expected name of the VarScan JAR file. JAR_NAME = 'fgbio.jar' PKG_NAME = 'fgbio' # Default options pass...
mit
151,476,772,278,223,070
32.933333
150
0.64964
false
shiminsh/youtube_analytics
youtube/youtube/settings.py
1
2602
""" Django settings for youtube project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) f...
mit
8,005,521,276,582,103,000
23.317757
86
0.716372
false
svn2github/django
tests/regressiontests/comment_tests/tests/comment_view_tests.py
15
11790
from __future__ import absolute_import import re from django.conf import settings from django.contrib.auth.models import User from django.contrib.comments import signals from django.contrib.comments.models import Comment from . import CommentTestCase from ..models import Article, Book post_redirect_re = re.compile...
bsd-3-clause
3,459,601,138,663,141,000
40.080139
94
0.63011
false
ZachRiegel/scriptbin
pypyjs/modules/unittest/test/test_assertions.py
52
11961
import datetime import unittest class Test_Assertions(unittest.TestCase): def test_AlmostEqual(self): self.assertAlmostEqual(1.00000001, 1.0) self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, self.assertAlmostEqual, 1.0000001, 1.0...
gpl-3.0
-1,805,920,803,496,353,800
40.244828
92
0.516846
false
TeslaProject/external_chromium_org
tools/auto_bisect/math_utils.py
27
3966
# 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. """General statistical or mathematical functions.""" import math def TruncatedMean(data_set, truncate_percent): """Calculates the truncated mean of a se...
bsd-3-clause
-453,016,139,090,835,840
29.045455
78
0.69289
false
mspark93/VTK
ThirdParty/Twisted/twisted/web/test/test_httpauth.py
41
22445
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web._auth}. """ from zope.interface import implements from zope.interface.verify import verifyObject from twisted.trial import unittest from twisted.python.failure import Failure from twisted.internet.error import Conne...
bsd-3-clause
-5,836,048,962,587,288,000
34.402208
82
0.65186
false
TwilioDevEd/api-snippets
quickstart/python/autopilot/create-joke-samples/create_joke_samples.6.x.py
1
1102
# Download the helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/console # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_...
mit
-3,893,593,381,132,570,000
30.485714
99
0.666062
false
felixma/nova
nova/virt/xenapi/fake.py
47
38557
# Copyright (c) 2010 Citrix Systems, 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 applicab...
apache-2.0
-4,981,026,384,157,369,000
34.340972
79
0.550354
false
jorge2703/scikit-learn
sklearn/utils/tests/test_random.py
230
7344
from __future__ import division import numpy as np import scipy.sparse as sp from scipy.misc import comb as combinations from numpy.testing import assert_array_almost_equal from sklearn.utils.random import sample_without_replacement from sklearn.utils.random import random_choice_csc from sklearn.utils.testing import ...
bsd-3-clause
-4,512,823,433,840,070,700
39.351648
79
0.607843
false
sadad111/leetcodebox
Add Two Numbers II.py
1
1969
# /** # * Definition for singly-linked list. # * public class ListNode { # * int val; # * ListNode next; # * ListNode(int x) { val = x; } # * } # */ # public class Solution { # public ListNode addTwoNumbers(ListNode l1, ListNode l2) { # Stack<Integer> s1 = new Stack<Integer>(); # ...
gpl-3.0
6,177,048,412,703,179,000
25.608108
63
0.445404
false
117111302/iris-panel
iris/packagedb/tests/test_apiviews.py
7
12682
# -*- coding: utf-8 -*- #This file is part of IRIS: Infrastructure and Release Information System # # Copyright (C) 2013 Intel Corporation # # IRIS is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2.0 as published by the Free Software Foundation. "...
gpl-2.0
9,202,089,972,153,407,000
32.026042
78
0.519713
false
ryancoleman/autodock-vina
boost_1_54_0/tools/build/v2/test/build_file.py
44
5117
#!/usr/bin/python # Copyright (C) 2006. Vladimir Prus # Copyright (C) 2008. Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Tests that we explicitly request a file (not target) to be built by #...
apache-2.0
8,897,313,115,203,539,000
29.1
79
0.496775
false
calico/basenji
bin/sonnet_sat_bed.py
1
9499
#!/usr/bin/env python # Copyright 2017 Calico 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
8,643,181,341,499,250,000
31.530822
89
0.622276
false
strahlc/exaile
plugins/somafm/__init__.py
3
6699
# Copyright (C) 2012 Rocco Aliberti # 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, or (at your option) # any later version. # # This program is distributed in the hope that it...
gpl-2.0
-3,578,975,056,690,432,500
29.45
80
0.576205
false
chirilo/airmozilla
airmozilla/manage/views/approvals.py
9
3643
from django import http from django.contrib import messages from django.shortcuts import render, redirect, get_object_or_404 from django.views.decorators.http import require_POST from django.db import transaction from airmozilla.main.models import ( Approval, Event, SuggestedEvent ) from airmozilla.manage ...
bsd-3-clause
-4,055,787,826,145,641,000
30.405172
77
0.640955
false
mhvk/astropy
astropy/tests/command.py
8
13858
"""Implements the wrapper for the Astropy test runner. This is for backward-compatibility for other downstream packages and can be removed once astropy-helpers has reached end-of-life. """ import os import stat import shutil import subprocess import sys import tempfile from contextlib import contextmanager from setu...
bsd-3-clause
-2,619,921,863,733,943,000
37.926966
98
0.58551
false
ryfeus/lambda-packs
H2O/ArchiveH2O/requests/auth.py
73
10206
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading import warnings from base64 import b64encode from .compat import urlparse, str, basestring from .cookies import extract_cookies_...
mit
-3,026,820,618,456,839,000
32.462295
88
0.563688
false
brokenjacobs/ansible
lib/ansible/constants.py
8
2934
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
2,270,429,151,330,155,300
36.139241
150
0.679618
false
dhimmel/networkx
networkx/convert_matrix.py
13
33243
"""Functions to convert NetworkX graphs to and from numpy/scipy matrices. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the to_networkx_graph() function which attempts to guess the input type and convert it automatically. Examples -------- Create a 10...
bsd-3-clause
3,370,414,056,488,200,700
35.813953
95
0.613633
false
sekikn/incubator-airflow
tests/providers/google/marketing_platform/operators/test_search_ads_system.py
10
1707
# # 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
3,191,055,539,375,542,300
37.795455
107
0.753368
false
telwertowski/QGIS
python/plugins/MetaSearch/dialogs/maindialog.py
3
38847
# -*- coding: utf-8 -*- ############################################################################### # # CSW Client # --------------------------------------------------------- # QGIS Catalog Service client. # # Copyright (C) 2010 NextGIS (http://nextgis.org), # Alexander Bruy (alexander.bruy@gmail...
gpl-2.0
-8,230,398,178,174,475,000
37.92485
152
0.581744
false
BrandonY/python-docs-samples
appengine/flexible/sendgrid/main_test.py
8
1447
# 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 required by applicable law or a...
apache-2.0
-549,802,810,155,996,200
28.530612
74
0.707671
false
haowu4682/gem5
src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py
91
6764
# 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
-4,990,986,056,889,680,000
20.819355
72
0.643258
false
webmull/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py
120
2649
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
564,818,721,076,088,100
59.204545
284
0.784824
false
octavioturra/aritial
google_appengine/google/appengine/cron/groctimespecification.py
5
10878
#!/usr/bin/env python # # Copyright 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 o...
apache-2.0
1,262,336,501,722,686,000
31.963636
80
0.650395
false
tarballs-are-good/sympy
sympy/physics/units.py
2
5278
""" Physical units and dimensions. The base class is Unit, where all here defined units (~200) inherit from. """ from sympy import Rational, pi from sympy.core import AtomicExpr class Unit(AtomicExpr): """ Base class for all physical units. Create own units like: m = Unit("meter", "m") """ i...
bsd-3-clause
-4,088,236,530,008,604,000
26.206186
78
0.614627
false
SRabbelier/Melange
thirdparty/google_appengine/google/appengine/api/mail_service_pb.py
1
18516
#!/usr/bin/env python # # Copyright 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 o...
apache-2.0
-1,493,856,708,262,349,800
27.012103
105
0.623353
false
tboyce021/home-assistant
homeassistant/util/ssl.py
9
3197
"""Helper to create SSL contexts.""" from os import environ import ssl import certifi def client_context() -> ssl.SSLContext: """Return an SSL context for making requests.""" # Reuse environment variable definition from requests, since it's already a requirement # If the environment variable has no valu...
apache-2.0
8,173,212,169,947,532,000
31.622449
93
0.645918
false
basysKom/freeopcua
python/examples/inductive_client.py
9
1516
import sys import time sys.path.append(".") from IPython import embed import opcua class SubHandler(opcua.SubscriptionHandler): def __init__(self, *args): opcua.SubscriptionHandler.__init__(self, *args) self.val = MessageSecurityMode::None def data_change(self, handle, node, val, attr): ...
lgpl-3.0
-2,340,285,259,898,079,700
29.938776
76
0.604881
false
twodee/blockly
i18n/json_to_js.py
1
6581
#!/usr/bin/python # Converts .json files into .js files for use within Blockly apps. # # Copyright 2013 Google Inc. # https://developers.google.com/blockly/ # # 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 ...
apache-2.0
4,231,879,628,881,407,500
34.572973
81
0.619663
false
pchauncey/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py
21
12709
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # 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_versio...
gpl-3.0
-5,002,785,810,401,885,000
34.59944
136
0.608702
false
cafe-grader-team/cafe-grader-web
lib/assets/Lib/browser/indexed_db.py
9
3114
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: ...
mit
-5,232,372,363,552,838,000
27.377358
76
0.618818
false
s20121035/rk3288_android5.1_repo
external/skia/platform_tools/android/gyp_gen/vars_dict_lib.py
146
4422
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import types # The goal of this class is to store a set of unique items in the order in # which they are inserted. This is important for the final ...
gpl-3.0
-7,228,216,673,601,048,000
25.638554
79
0.622569
false
Pakketeretet2/lammps
tools/python/dump2pdb.py
51
1217
#!/usr/bin/env python # Script: dump2pdb.py # Purpose: convert a LAMMPS dump file to PDB format # Syntax: dump2pdb.py dumpfile Nid Ntype Nx Ny Nz pdbfile template # dumpfile = LAMMPS dump file in native LAMMPS format # Nid,Ntype,Nx,Ny,Nz = columns #s for ID,type,x,y,z # ...
gpl-2.0
-788,202,980,216,793,600
31.891892
89
0.656532
false
defivelo/db
apps/user/migrations/0064_merge_WS_in_VS.py
1
4091
from django.db import migrations, models import multiselectfield.db.fields from memoize import delete_memoized from defivelo.roles import user_cantons def ws_to_vs(apps, schema_editor): UserManagedState = apps.get_model("user", "UserManagedState") for ums in UserManagedState.objects.filter(canton="WS"): ...
agpl-3.0
4,675,241,915,884,543,000
33.058333
86
0.386592
false
jbeee/jquery-pjaxr
test_app/tests/test_ignored_metatag.py
2
1373
from __future__ import unicode_literals from selenium.common.exceptions import NoSuchElementException from .helpers import SeleniumTestCase class IgnoredMetatagTest(SeleniumTestCase): def test_ignored_metatag_pjaxr(self): self.browser_get_reverse('index') self.assert_title('index-title') ...
mit
2,780,699,122,243,784,000
38.228571
97
0.696286
false
ns950/calibre
src/calibre/ebooks/mobi/debug/headers.py
14
25842
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import struct...
gpl-3.0
-3,935,263,792,578,701,300
41.363934
127
0.538465
false
FusionSP/android_external_chromium_org
tools/telemetry/telemetry/util/cloud_storage.py
25
7906
# 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. """Wrappers for gsutil, for basic interaction with Google Cloud Storage.""" import contextlib import cStringIO import hashlib import logging import os impor...
bsd-3-clause
2,834,067,572,372,143,000
31.008097
80
0.681002
false
eusi/MissionPlanerHM
Lib/encodings/koi8_r.py
593
14035
""" Python Character Mapping Codec koi8_r generated from 'MAPPINGS/VENDORS/MISC/KOI8-R.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
gpl-3.0
-8,983,994,718,702,424,000
44.716612
109
0.561596
false
openstack/oslo.db
oslo_db/sqlalchemy/migration.py
1
7224
# coding=utf-8 # Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
8,839,483,977,600,874,000
38.469945
79
0.685865
false
fyfcauc/android_external_chromium-org
chrome/test/functional/media/media_stat_perf.py
56
3328
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """CPU, Memory, and FPS performance test for <video>. Calculates decoded fps, dropped fps, CPU, and memory statistics while playin...
bsd-3-clause
-2,671,351,352,975,727,000
38.152941
80
0.678786
false
yqm/sl4a
python/src/Lib/encodings/palmos.py
647
2936
""" Python Character Mapping Codec for PalmOS 3.5. Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,inp...
apache-2.0
-5,488,423,319,548,499,000
34.373494
73
0.638624
false
mancoast/CPythonPyc_test
cpython/252_test_pep277.py
34
4098
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import sys, os, unittest from test import test_support if not os.path.supports_unicode_filenames: raise test_support.TestSkipped, "test works only on NT+" filenames = [ ...
gpl-3.0
-566,826,329,937,769,500
34.634783
88
0.578087
false