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 |
|---|---|---|---|---|---|---|---|---|---|---|
altairpearl/scikit-learn | sklearn/linear_model/perceptron.py | 39 | 3863 | # Author: Mathieu Blondel
# License: BSD 3 clause
from .stochastic_gradient import BaseSGDClassifier
from ..feature_selection.from_model import _LearntSelectorMixin
class Perceptron(BaseSGDClassifier, _LearntSelectorMixin):
"""Perceptron
Read more in the :ref:`User Guide <perceptron>`.
Parameters
-... | bsd-3-clause | -653,435,787,549,262,000 | 35.790476 | 78 | 0.574165 | false |
pkainz/pylearn2 | pylearn2/scripts/jobman/tester.py | 44 | 3126 | """
This an example script inserting a pylearn2 yaml code into a jobman database.
The code below defines a yaml template string in state.yaml_template,
and the values of its hyper-parameters in state.hyper_parameters, and
run the code that is located in state.extract_results on this model
using jobman.
Actually, we a... | bsd-3-clause | -3,797,899,547,524,971,500 | 31.226804 | 109 | 0.590211 | false |
shadda/AutobahnPython | autobahn/autobahn/__init__.py | 7 | 1043 | ###############################################################################
##
## Copyright 2011-2013 Tavendo GmbH
##
## 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 | -8,729,113,815,589,294,000 | 31.645161 | 79 | 0.615532 | false |
esse-io/zen-common | oslo-modules/oslo_context/fixture.py | 3 | 1505 | # 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
# d... | apache-2.0 | -5,009,131,992,932,061,000 | 36.625 | 78 | 0.695681 | false |
ehirt/odoo | addons/mrp/report/__init__.py | 378 | 1122 | # -*- 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,418,274,346,170,354,000 | 39.071429 | 78 | 0.62656 | false |
dob71/x2swn | x2Profiler.py | 1 | 38339 | #!/usr/bin/env python
#
# This file is part of the X2SW bundle. 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.
#
# The software is distributed in the ... | gpl-3.0 | 2,277,148,858,392,293,600 | 40.854803 | 146 | 0.51235 | false |
WholeGrainGoats/servo | tests/wpt/web-platform-tests/tools/html5lib/html5lib/trie/py.py | 817 | 1763 | from __future__ import absolute_import, division, unicode_literals
from six import text_type
from bisect import bisect_left
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
if not all(isinstance(x, text_type) for x in data.keys()):
raise TypeError("All keys m... | mpl-2.0 | 1,897,480,550,322,918,000 | 25.313433 | 66 | 0.551333 | false |
fentas/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py | 115 | 17309 | # Copyright (C) 2012 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 | -5,582,124,142,793,653,000 | 47.89548 | 144 | 0.617944 | false |
quickresolve/accel.ai | flask-aws/lib/python2.7/site-packages/ebcli/containers/commands.py | 5 | 8658 | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | mit | 7,421,618,116,844,425,000 | 28.349153 | 81 | 0.642065 | false |
yasoob/PythonRSSReader | venv/lib/python2.7/dist-packages/pexpect/__init__.py | 1 | 83018 | '''Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be u... | mit | 6,983,308,128,741,956,000 | 39.476841 | 87 | 0.591751 | false |
bwrsandman/OpenUpgrade | addons/stock/report/product_stock.py | 376 | 4868 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,353,771,666,382,752,300 | 37.03125 | 119 | 0.564708 | false |
mhotwagner/abackend | abackend-env/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py | 3121 | 45978 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | mit | 6,151,471,407,183,996,000 | 76.144295 | 92 | 0.762452 | false |
joaormatos/anaconda | Anaconda/standalone/trunk/PyInstaller/lib/altgraph/__init__.py | 12 | 4907 | '''
altgraph - a python graph library
=================================
altgraph is a fork of `graphlib <http://pygraphlib.sourceforge.net>`_ tailored
to use newer Python 2.3+ features, including additional support used by the
py2app suite (modulegraph and macholib, specifically).
altgraph is a python based graph (ne... | gpl-3.0 | 6,541,694,398,967,050,000 | 35.348148 | 147 | 0.707968 | false |
joshblum/django-with-audit | django/core/management/validation.py | 79 | 19846 | import sys
from django.core.management.color import color_style
from django.utils.itercompat import is_iterable
class ModelErrorCollection:
def __init__(self, outfile=sys.stdout):
self.errors = []
self.outfile = outfile
self.style = color_style()
def add(self, context, error):
... | bsd-3-clause | -2,841,106,535,951,618,000 | 63.435065 | 264 | 0.52207 | false |
apache/avro | lang/py/avro/test/test_tether_task_runner.py | 2 | 6739 | #!/usr/bin/env python3
##
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
... | apache-2.0 | -497,161,027,172,772,400 | 34.845745 | 117 | 0.591779 | false |
muff1nman/Vim | vim/eclim/autoload/eclim/python/rope/base/builtins.py | 9 | 23636 | """This module trys to support builtin types and functions."""
import inspect
import rope.base.evaluate
from rope.base import pynames, pyobjects, arguments, utils
class BuiltinModule(pyobjects.AbstractModule):
def __init__(self, name, pycore=None, initial={}):
super(BuiltinModule, self).__init__()
... | mit | -8,516,747,661,055,037,000 | 31.467033 | 95 | 0.605475 | false |
flavour/cert | controllers/cr.py | 3 | 13875 | # -*- coding: utf-8 -*-
"""
Shelter Registry - Controllers
"""
# @ToDo Search shelters by type, services, location, available space
# @ToDo Tie in assessments from RAT and requests from RMS.
# @ToDo Associate persons with shelters (via presence loc == shelter loc?)
module = request.controller
resourcename = reque... | mit | 2,831,012,067,847,777,000 | 38.756447 | 95 | 0.510486 | false |
lmmsoft/LeetCode | LeetCode-Algorithm/1123. Lowest Common Ancestor of Deepest Leaves/1123.py | 1 | 2318 | # Definition for a binary tree node.
from typing import Dict, List
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def lcaDeepestLeaves1(self, root: TreeNode) -> TreeNode:
self.parent: Dict[TreeNode, TreeNode] = {}
... | gpl-2.0 | -2,714,826,590,182,496,000 | 25.232558 | 63 | 0.490248 | false |
sdeepanshu02/microblog | flask/Lib/site-packages/coverage/data.py | 40 | 27599 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Coverage data for coverage.py."""
import glob
import itertools
import json
import optparse
import os
import os.path
import random
import re
import socket
from ... | bsd-3-clause | 2,881,497,314,506,380,000 | 34.936198 | 98 | 0.578717 | false |
cmap/cmapPy | cmapPy/clue_api_client/mock_clue_api_client.py | 1 | 1622 | import logging
import cmapPy.clue_api_client.setup_logger as setup_logger
import cmapPy.clue_api_client.clue_api_client as clue_api_client
__authors__ = "David L. Lahr"
__email__ = "dlahr@broadinstitute.org"
logger = logging.getLogger(setup_logger.LOGGER_NAME)
class MockClueApiClient(clue_api_client.ClueApiClient)... | bsd-3-clause | 1,116,288,068,484,164,100 | 36.72093 | 109 | 0.718249 | false |
maxamillion/ansible-modules-extras | database/vertica/vertica_user.py | 15 | 14712 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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,226,154,136,544,494,800 | 36.057935 | 98 | 0.60488 | false |
baloo/shinken | shinken/webui/plugins/flow/flow.py | 1 | 3289 | ### Will be populated by the UI with it's own value
app = None
import time
from shinken.webui.bottle import redirect
from shinken.modules.webui_broker.helper import hst_srv_sort
from shinken.util import safe_print
try:
import json
except ImportError:
# For old Python version, load
# simple json (it can be... | agpl-3.0 | 9,178,488,943,381,101,000 | 32.222222 | 163 | 0.585892 | false |
brototyp/CouchPotato | library/hachoir_parser/misc/ttf.py | 95 | 9417 | """
TrueType Font parser.
Documents:
- "An Introduction to TrueType Fonts: A look inside the TTF format"
written by "NRSI: Computers & Writing Systems"
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-Chapter08
Author: Victor Stinner
Creation date: 2007-02-08
"""
from hachoir_parser import... | gpl-3.0 | 7,273,182,620,738,885,000 | 32.99639 | 94 | 0.605713 | false |
ahmedbodi/AutobahnPython | examples/twisted/wamp1/rpc/simple/example2/server.py | 17 | 3564 | ###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## 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
##
## h... | apache-2.0 | 342,293,789,144,472,200 | 27.741935 | 79 | 0.600168 | false |
sameetb-cuelogic/edx-platform-test | common/djangoapps/enrollment/tests/fake_data_api.py | 26 | 3120 | """
A Fake Data API for testing purposes.
"""
import copy
import datetime
_DEFAULT_FAKE_MODE = {
"slug": "honor",
"name": "Honor Code Certificate",
"min_price": 0,
"suggested_prices": "",
"currency": "usd",
"expiration_datetime": None,
"description": None
}
_ENROLLMENTS = []
_COURSES = [... | agpl-3.0 | -4,717,372,604,753,869,000 | 28.714286 | 108 | 0.648718 | false |
PrinceShaji/StreamBox | TestCodes/examplecodes/AP-Fucker.py | 1 | 9270 |
#!/usr/bin/env python
# -*- coding: Utf-8 -*-
#
# WIRELESS ACCESS POINT FUCKER
# Interactive, Multifunction, Destruction Mode Included
#
# Thanks to BackTrack crew, especially ShamanVirtuel and ASPJ
#
# USAGE: Launch the script as root using "python AP-Fucker.py", follow instructions, enjoy!
# Prerequisites: Have mdk3... | mit | -1,530,642,497,631,623,200 | 33.206642 | 163 | 0.547033 | false |
igordejanovic/parglare | tests/func/grammar/test_grammar.py | 1 | 10211 | # -*- coding: utf-8 -*-
import pytest
from parglare import Parser, Grammar
from parglare.grammar import ASSOC_LEFT, ASSOC_RIGHT, DEFAULT_PRIORITY
from parglare.exceptions import GrammarError, ParseError
def test_single_terminal():
"""
Test that grammar may be just a single terminal.
"""
grammar = r"""... | mit | -8,498,248,226,509,463,000 | 19.711968 | 79 | 0.565958 | false |
DGrady/pandas | pandas/tests/computation/test_compat.py | 11 | 1308 | import pytest
from distutils.version import LooseVersion
import pandas as pd
from pandas.core.computation.engines import _engines
import pandas.core.computation.expr as expr
from pandas.core.computation import _MIN_NUMEXPR_VERSION
def test_compat():
# test we have compat with our version of nu
from pandas.... | bsd-3-clause | 7,998,924,532,500,616,000 | 27.434783 | 67 | 0.616208 | false |
lunixbochs/fs-uae-gles | launcher/fs_uae_launcher/fsui/wx/choice.py | 1 | 1037 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import wx
from .common import update_class
class Choice(wx.Choice):
def __init__(self, parent, items=[]):
wx.Choice.__init__(self, parent.get_container(), -1,
wx.Defaul... | gpl-2.0 | -8,796,235,951,678,419,000 | 23.292683 | 60 | 0.59595 | false |
YuanYouYuan/FreeCAD | src/Tools/MakeAppTools.py | 32 | 2611 | import os, sys, re,string,FCFileTools
verbose = 0
dcount = fcount = 0
def replaceTemplate(dirName, oldName, newName):
"""
modify contents from dirName and below, replace oldName by newName
"""
for file in os.listdir(dirName):
pathName = os.path.join(dirName, file)
if not os.path.isdir(pathName):
... | lgpl-2.1 | -2,565,172,866,029,309,400 | 31.909091 | 96 | 0.623516 | false |
synasius/django | tests/null_queries/tests.py | 36 | 2939 | from __future__ import unicode_literals
from django.core.exceptions import FieldError
from django.test import TestCase
from .models import Choice, Inner, OuterA, OuterB, Poll
class NullQueriesTests(TestCase):
def test_none_as_null(self):
"""
Regression test for the use of None as a query value.... | bsd-3-clause | -9,054,589,427,036,456,000 | 33.988095 | 87 | 0.601905 | false |
chen0031/Dato-Core | src/unity/python_deps/psutil/examples/pmap.py | 43 | 1983 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
A clone of 'pmap' utility on Linux, 'vmmap' on OSX and 'procstat -v' on BSD.
Report memory map of a process.
$ python examples/... | agpl-3.0 | -2,561,654,710,117,017,600 | 33.189655 | 77 | 0.589007 | false |
wuga214/Django-Wuga | env/lib/python2.7/site-packages/django/contrib/gis/db/backends/oracle/operations.py | 18 | 10848 | """
This module contains the spatial lookup types, and the `get_geo_where_clause`
routine for Oracle Spatial.
Please note that WKT support is broken on the XE version, and thus
this backend will not work on such platforms. Specifically, XE lacks
support for an internal JVM, and Java libraries are required to use... | apache-2.0 | 872,274,038,253,494,000 | 38.447273 | 119 | 0.626383 | false |
lukeiwanski/tensorflow | tensorflow/contrib/cluster_resolver/python/training/gce_cluster_resolver.py | 24 | 5151 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -4,945,389,010,880,792,000 | 36.057554 | 96 | 0.678703 | false |
tcheehow/MissionPlanner | Lib/site-packages/numpy/core/tests/test_npy_arraytypes.py | 54 | 5864 | import sys
import warnings
import numpy as np
from numpy.testing import *
warnings.filterwarnings('ignore',
'Casting complex values to real discards the imaginary part')
types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc,
np.int_, np.uint, np.longlong, np.ulonglong,
... | gpl-3.0 | -904,031,484,609,910,100 | 28.467337 | 77 | 0.496419 | false |
vitan/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/messages/tests/base.py | 104 | 14243 | from django import http
from django.conf import settings, global_settings
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import MessageFailure
from django.contrib.messages.storage import default_storage, base
from django.contrib.messages.storage.base import M... | apache-2.0 | -7,543,876,509,021,500,000 | 37.703804 | 89 | 0.609633 | false |
ContextLogic/luigi | luigi/contrib/ecs.py | 17 | 6185 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Outlier Bio, 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 la... | apache-2.0 | -8,793,460,644,669,075,000 | 32.61413 | 101 | 0.627648 | false |
amghost/myblog | node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/cmdline.py | 95 | 13621 | # -*- coding: utf-8 -*-
"""
pygments.cmdline
~~~~~~~~~~~~~~~~
Command line interface.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import getopt
from textwrap import dedent
from pygments import __version__, highlight
fro... | mit | -6,413,053,661,395,489,000 | 29.886621 | 91 | 0.537552 | false |
RadioFreeAsia/RDacity | lib-src/lv2/suil/waflib/Tools/d_scan.py | 292 | 3029 | #! /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 re
from waflib import Utils,Logs
def filter_comments(filename):
txt=Utils.readf(filename)
i=0
buf=[]
max=len(txt)
begin=0
while i<max:
c=txt[i]
if c=='"'or c=... | gpl-2.0 | -7,910,437,893,230,303,000 | 21.774436 | 102 | 0.614064 | false |
jakereps/qiime2 | qiime2/core/archive/format/tests/test_v0.py | 2 | 2307 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | -4,551,712,732,040,404,000 | 36.209677 | 79 | 0.579541 | false |
angelbot/geoincentives | geoincentives/models.py | 1 | 3064 | from django.db import models
from django.contrib.auth.models import User as DjangoUser
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import UserManager
import hashlib
class User(models.Model):
USER_TYPE = (
(1, 'student'),
(2, 'business'),
(3, 'non... | gpl-2.0 | 2,096,577,816,930,010,000 | 39.315789 | 108 | 0.685705 | false |
zhenv5/scikit-learn | examples/feature_selection/plot_feature_selection.py | 249 | 2827 | """
===============================
Univariate Feature Selection
===============================
An example showing univariate feature selection.
Noisy (non informative) features are added to the iris data and
univariate feature selection is applied. For each feature, we plot the
p-values for the univariate feature s... | bsd-3-clause | 2,629,065,323,852,358,000 | 32.654762 | 79 | 0.645561 | false |
unnikrishnankgs/va | venv/lib/python3.5/site-packages/tensorflow/contrib/keras/api/keras/applications/xception/__init__.py | 57 | 1148 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | bsd-2-clause | 8,161,418,690,972,873,000 | 41.518519 | 90 | 0.736934 | false |
kezabelle/django-sniplates | docs/conf.py | 4 | 8236 | # -*- coding: utf-8 -*-
#
# Django Sniplates documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 6 10:23:25 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | mit | 4,453,535,118,152,873,000 | 30.922481 | 79 | 0.709811 | false |
damianam/easybuild-framework | easybuild/toolchains/linalg/atlas.py | 3 | 1662 | ##
# Copyright 2012-2017 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 | 147,937,814,262,639,360 | 32.24 | 96 | 0.719615 | false |
sunze/py_flask | venv/lib/python3.4/site-packages/pip/req/req_requirement.py | 118 | 1245 | from pip._vendor.packaging.version import parse as parse_version
class InstallationCandidate(object):
def __init__(self, project, version, location):
self.project = project
self.version = parse_version(version)
self.location = location
self._key = (self.project, self.version, self... | mit | 2,986,139,986,441,562,600 | 27.953488 | 69 | 0.585542 | false |
rchlin/ShadowsocksFork | shadowsocks/crypto/util.py | 1032 | 4287 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... | apache-2.0 | 4,535,419,741,656,012,000 | 30.065217 | 79 | 0.585724 | false |
kslundberg/pants | tests/python/pants_test/backend/python/tasks/test_python_repl.py | 2 | 6547 | # coding=utf-8
# Copyright 2015 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)
import os
import sys... | apache-2.0 | -562,845,480,984,442,700 | 35.780899 | 99 | 0.615396 | false |
Castronova/EMIT | utilities/geometry.py | 1 | 9692 | __author__ = 'tonycastronova'
import numpy
from osgeo import ogr
import stdlib
from emitLogging import elog
def fromWKB(wkb):
"""
Builds a stdlib.Geometry object from a WKB string
:param wkb: wkb string
:return: stdlib.Geometry
"""
geom = None
# parse the wkt string into ogr
ogrgeo... | gpl-2.0 | 1,511,304,569,203,282,000 | 25.850416 | 115 | 0.632893 | false |
GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/linux_packages/aws_credentials.py | 1 | 4345 | # Copyright 2018 PerfKitBenchmarker 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 appli... | apache-2.0 | -6,205,260,796,543,492,000 | 32.945313 | 100 | 0.736479 | false |
jshleap/Collaboration | contactList/contacts-classification.py | 1 | 4165 | #!/usr/bin/python
'''
Utility scripts for contacts
Copyright (C) 2012 Alex Safatli, Christian Blouin, Jose Sergio Hleap
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... | gpl-3.0 | 213,429,558,210,596,480 | 34.606838 | 94 | 0.690756 | false |
rlbabyuk/integration_tests | utils/version.py | 2 | 11791 | # -*- coding: utf-8 -*-
import re
from cached_property import cached_property
from collections import namedtuple
from datetime import date, datetime
import multimethods as mm
from fixtures.pytest_store import store
def get_product_version(ver):
"""Return product version for given Version obj or version string
... | gpl-2.0 | -7,340,382,520,080,808,000 | 31.128065 | 100 | 0.592571 | false |
tayfun/django | tests/auth_tests/models/invalid_models.py | 251 | 1340 | from django.contrib.auth.models import AbstractBaseUser, UserManager
from django.db import models
class CustomUserNonUniqueUsername(AbstractBaseUser):
"""
A user with a non-unique username.
This model is not invalid if it is used with a custom authentication
backend which supports non-unique username... | bsd-3-clause | 2,337,087,557,338,380,000 | 27.510638 | 76 | 0.704478 | false |
iw3hxn/LibrERP | revenue_stamp/revenue_stamp.py | 3 | 7654 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2014 Didotech SRL (info at didotech.com)
# All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole re... | agpl-3.0 | 90,073,274,615,023,060 | 41.759777 | 159 | 0.615495 | false |
SivilTaram/edx-platform | lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py | 120 | 15611 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Donation'
db.create_table('shoppingcart_donation', (
('orderitem_ptr', self.gf('... | agpl-3.0 | 196,891,793,819,145,280 | 81.597884 | 182 | 0.558709 | false |
glaudsonml/kurgan-ai | tools/sqlmap/lib/controller/checks.py | 1 | 61798 | #!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import copy
import httplib
import random
import re
import socket
import time
from subprocess import Popen as execute
from extra.beep.beep import beep
from lib.core.agent imp... | apache-2.0 | -3,696,851,722,364,890,600 | 42.704385 | 235 | 0.566264 | false |
lino-framework/welfare | lino_welfare/projects/gerd/tests/dumps/18.8.0/countries_place.py | 2 | 8075 | # -*- coding: UTF-8 -*-
logger.info("Loading 78 objects to table countries_place...")
# fields: id, parent, name, country, zip_code, type, show_type, inscode
loader.save(create_countries_place(1,None,['Eupen', '', ''],u'BE',u'4700',u'50',False,u'63023'))
loader.save(create_countries_place(2,1,['Nispert', '', ''],u'BE',... | agpl-3.0 | 3,086,057,760,075,443,700 | 96.289157 | 132 | 0.648297 | false |
rvraghav93/scikit-learn | sklearn/neighbors/approximate.py | 3 | 22554 | """Approximate nearest neighbor search"""
# Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk>
# Joel Nothman <joel.nothman@gmail.com>
import numpy as np
import warnings
from scipy import sparse
from .base import KNeighborsMixin, RadiusNeighborsMixin
from ..base import BaseEstimator
from ..utils.va... | bsd-3-clause | -1,901,045,247,280,568,600 | 39.711191 | 79 | 0.579365 | false |
stdweird/aquilon | lib/python2.6/aquilon/worker/commands/show_organization_all.py | 2 | 1252 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor
#
# 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... | apache-2.0 | -456,685,246,226,888,300 | 39.387097 | 78 | 0.702077 | false |
wangxianliang/facenet | tmp/mnist_noise_labels.py | 1 | 15390 | # 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... | mit | 8,634,300,840,375,226,000 | 43.479769 | 127 | 0.601105 | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/tensorflow/python/training/adagrad_da.py | 34 | 5998 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | agpl-3.0 | 5,934,173,522,810,177,000 | 42.463768 | 80 | 0.680894 | false |
bregman-arie/ansible | lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py | 15 | 4569 | #!/usr/bin/python
#
# Copyright (c) 2016 Julien Stroheker, <juliens@microsoft.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 5,869,415,297,240,903,000 | 25.410405 | 92 | 0.594003 | false |
jagguli/intellij-community | python/lib/Lib/distutils/file_util.py | 81 | 8341 | """distutils.file_util
Utility functions for operating on single files.
"""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: file_util.py 37828 2004-11-10 22:23:15Z loewis $"
import os
from distutils.errors import DistutilsFileError
from distutils import log
# for generating verbose ou... | apache-2.0 | -6,619,488,077,227,218,000 | 31.968379 | 76 | 0.56492 | false |
dya2/python-for-android | python3-alpha/extra_modules/bs4/testing.py | 46 | 18683 | """Helper classes for tests."""
import copy
import functools
import unittest
from unittest import TestCase
from bs4 import BeautifulSoup
from bs4.element import (
Comment,
Doctype,
SoupStrainer,
)
from bs4.builder import HTMLParserTreeBuilder
default_builder = HTMLParserTreeBuilder
class SoupTest(unitte... | apache-2.0 | 7,447,682,666,164,341,000 | 39.615217 | 237 | 0.614409 | false |
partofthething/home-assistant | homeassistant/components/google_assistant/__init__.py | 2 | 3785 | """Support for Actions on Google Assistant Smart Home Control."""
import logging
from typing import Any, Dict
import voluptuous as vol
# Typing imports
from homeassistant.const import CONF_API_KEY, CONF_NAME
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import config_validation ... | mit | -3,595,111,798,618,168,300 | 30.541667 | 112 | 0.662351 | false |
jendap/tensorflow | tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator_test.py | 20 | 9393 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,859,730,329,530,242,000 | 36.722892 | 101 | 0.692111 | false |
eurosata1/e2 | lib/python/Components/Converter/ClockToText.py | 42 | 3445 | from Converter import Converter
from time import localtime, strftime
from Components.Element import cached
class ClockToText(Converter, object):
DEFAULT = 0
WITH_SECONDS = 1
IN_MINUTES = 2
DATE = 3
FORMAT = 4
AS_LENGTH = 5
TIMESTAMP = 6
FULL = 7
SHORT_DATE = 8
LONG_DATE = 9
VFD = 10
AS_LENGTHHOURS = 11
AS... | gpl-2.0 | 5,178,587,818,289,730,000 | 27.94958 | 132 | 0.6418 | false |
0todd0000/spm1d | spm1d/rft1d/examples/val_max_4_anova1_1d.py | 1 | 2121 |
import numpy as np
from matplotlib import pyplot
from spm1d import rft1d
eps = np.finfo(float).eps
def here_anova1(Y, X, X0, Xi, X0i, df):
Y = np.matrix(Y)
### estimate parameters:
b = Xi*Y
eij = Y - X*b
R = eij.T*eij
### reduced design:
b0 = X0i*Y
eij0 = Y... | gpl-3.0 | 3,806,504,572,669,593,000 | 25.848101 | 73 | 0.602074 | false |
hogarthj/ansible | lib/ansible/plugins/connection/network_cli.py | 5 | 19736 | # (c) 2016 Red Hat Inc.
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
---
author: Ansible Networking Team
connection: network_cli
short_... | gpl-3.0 | -1,402,785,099,885,922,800 | 37.774067 | 157 | 0.624443 | false |
weightedEights/runDBcheck | RADAR_DATA/20170713.001/Source/Shell/proxies/txcProxy.py | 5 | 2285 | """
Txc proxy.
This proxy handles all communication between the Txc and the
shell programs
"""
from shell.proxies.baseProxy import baseProxy
import os,re
import time
from xmlrpclib import ServerProxy
import siteconfig
class txcProxy(baseProxy):
def __init__(self,experiment):
baseProxy.__init__(self,'txc... | gpl-3.0 | -3,221,776,232,844,869,000 | 31.197183 | 91 | 0.550547 | false |
jorgealmerio/QEsg | core/ezdxf/modern/solid3d.py | 1 | 2503 | # Purpose: support for ACIS based 3D entities - BODY, REGION, 3DSOLID
# Created: 24.05.2015
# Copyright (C) 2015, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
__author__ = "mozman <mozman@gmx.at>"
from contextlib import contextmanager
from .graphics import none_subclass, entity_subcl... | gpl-3.0 | -2,290,913,446,886,631,700 | 22.175926 | 102 | 0.679584 | false |
tudorbarascu/QGIS | python/plugins/processing/algs/qgis/BasicStatistics.py | 30 | 13335 | # -*- coding: utf-8 -*-
"""
***************************************************************************
BasicStatistics.py
---------------------
Date : November 2016
Copyright : (C) 2016 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
************... | gpl-2.0 | -4,264,691,436,051,176,400 | 45.954225 | 133 | 0.583952 | false |
manashmndl/kivy | kivy/gesture.py | 50 | 14632 | '''
Gesture recognition
===================
This class allows you to easily create new
gestures and compare them::
from kivy.gesture import Gesture, GestureDatabase
# Create a gesture
g = Gesture()
g.add_stroke(point_list=[(1,1), (3,4), (2,1)])
g.normalize()
# Add it to the database
gdb ... | mit | 5,757,994,173,714,974,000 | 33.509434 | 79 | 0.567387 | false |
chenc10/Spark-PAF | ec2/lib/boto-2.34.0/boto/s3/user.py | 171 | 1968 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | apache-2.0 | 4,328,289,422,621,144,600 | 39.163265 | 74 | 0.655488 | false |
pulinagrawal/nupic | scripts/run_swarm.py | 9 | 7871 | # ----------------------------------------------------------------------
# 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 | 2,867,927,407,687,574,000 | 41.317204 | 96 | 0.677423 | false |
alqfahad/odoo | addons/auth_openid/utils.py | 428 | 1589 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... | agpl-3.0 | 3,679,406,192,559,422,000 | 44.4 | 78 | 0.631215 | false |
TwinkleChawla/nova | nova/db/sqlalchemy/migrate_repo/versions/300_migration_context.py | 44 | 1117 | # 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
# d... | apache-2.0 | 2,894,455,576,971,951,000 | 33.90625 | 78 | 0.709937 | false |
msingh172/youtube-dl | youtube_dl/downloader/common.py | 95 | 13848 | from __future__ import division, unicode_literals
import os
import re
import sys
import time
from ..compat import compat_str
from ..utils import (
encodeFilename,
decodeArgument,
format_bytes,
timeconvert,
)
class FileDownloader(object):
"""File Downloader class.
File downloader objects are... | unlicense | -4,916,545,909,078,302,000 | 36.225806 | 114 | 0.570624 | false |
armink/rt-thread | bsp/k210/rtconfig.py | 6 | 1560 | import os
# toolchains options
ARCH ='risc-v'
CPU ='k210'
CROSS_TOOL ='gcc'
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
else:
RTT_ROOT = r'../..'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'/... | apache-2.0 | 1,494,322,203,547,483,600 | 26.368421 | 103 | 0.571154 | false |
ChenJunor/hue | desktop/core/ext-py/Django-1.6.10/django/db/backends/oracle/creation.py | 104 | 12331 | import sys
import time
from django.conf import settings
from django.db.backends.creation import BaseDatabaseCreation
from django.utils.six.moves import input
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their ass... | apache-2.0 | -8,043,862,175,754,762,000 | 43.516245 | 155 | 0.561268 | false |
bjolivot/ansible | lib/ansible/plugins/action/iosxr_config.py | 79 | 4164 | #
# (c) 2017, 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 version.
#
# Ansible is... | gpl-3.0 | 4,619,096,043,227,065,000 | 36.178571 | 85 | 0.615034 | false |
home-assistant/home-assistant | homeassistant/components/jewish_calendar/sensor.py | 5 | 6627 | """Platform to retrieve Jewish calendar information for Home Assistant."""
import logging
import hdate
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_TIMESTAMP, SUN_EVENT_SUNSET
from homeassistant.helpers.sun import get_astral_event_date
import homeassistant.util... | apache-2.0 | 2,915,521,554,264,026,000 | 34.438503 | 89 | 0.615211 | false |
sharkykh/SickRage | sickbeard/databases/cache_db.py | 5 | 5192 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 L... | gpl-3.0 | -6,024,445,507,122,998,000 | 39.5625 | 188 | 0.699153 | false |
daemonmaker/pylearn2 | pylearn2/space/tests/test_space.py | 32 | 58117 | """
Tests for space utilities.
"""
from __future__ import print_function
import itertools
import warnings
import numpy as np
from theano.compat.six.moves import xrange
import theano
from theano import tensor
# Can't use nose.tools.assert_raises, only introduced in python 2.7. Use
# numpy.testing.assert_raises instea... | bsd-3-clause | 6,151,758,451,863,893,000 | 40.931457 | 79 | 0.541373 | false |
k0001/mediasancion | mediasancion/core/migrations/0001_initial.py | 1 | 15801 | # 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 'Distrito'
db.create_table('core_distrito', (
('id', self.gf('django.db.models.... | agpl-3.0 | -2,885,843,716,758,494,700 | 78.005 | 182 | 0.578508 | false |
py4n6/pyflag | utilities/raid_test.py | 7 | 1982 | # This is a good example of how the sk.c stuff can be integrated into
# the raid stuff to be able to verify the image without unpacking the
# whole thing.
import mapper
import optparse,sys
import sk
if __name__ == '__main__':
parser = optparse.OptionParser()
parser.add_option('-p','--period',default=6, type=... | gpl-2.0 | 1,880,320,108,587,510,800 | 33.77193 | 100 | 0.577699 | false |
muravjov/ansible | v2/ansible/plugins/action/set_fact.py | 15 | 1402 | # Copyright 2013 Dag Wieers <dag@wieers.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 versio... | gpl-3.0 | 6,678,922,070,172,358,000 | 37.944444 | 93 | 0.689016 | false |
efiring/UTide | utide/utilities.py | 1 | 8730 | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
import numpy as np
from scipy.io import loadmat
# This module is an excerpt from the one in python-gsw.
# Based on Robert Kern's Bunch; taken from
# http://currents.soest.hawaii.edu/hgstage/pycurrents/
# pycurrents/system/uti... | mit | -8,632,641,698,840,548,000 | 31.574627 | 83 | 0.568614 | false |
DrkVenom/roots | roots.py | 1 | 9713 | #Name: Tony Ranieri
#Created: October 2014
#Modified: August 2015
import numpy as np
import pylab as py
import matplotlib.pyplot as plt
def roots(f,df,a,b,niter,epsilon):
# Input
# f: the function that we need to find roots for
# df: derivative of the function f
# a: initial left bracket x... | gpl-2.0 | 3,397,281,621,320,606,700 | 40.15678 | 121 | 0.607536 | false |
happyemi/friendlypi | serverpi/src/plugins/test.py | 1 | 1122 | # Copyright 2013-2014 Emiliano Mennucci
#
# This file is part of FriendlyPi.
#
# FriendlyPi 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 yo... | gpl-3.0 | -7,523,172,867,304,118,000 | 35.193548 | 86 | 0.675579 | false |
FranzSchubert92/cw | python/game_of_stones.py | 1 | 2265 | """
Two players (numbered 1 and 2) are playing a game with n stones. Player 1
always plays first, and the two players move in alternating turns. The game's
rules are as follows:
In a single move, a player can remove 2, 3, or 5 stones from the game board.
If a player is unable to make a move, that player loses the ga... | bsd-3-clause | 7,715,425,145,268,505,000 | 24.166667 | 81 | 0.664459 | false |
adlius/osf.io | website/project/views/node.py | 1 | 51221 | # -*- coding: utf-8 -*-
import os
import logging
from rest_framework import status as http_status
import math
from collections import defaultdict
from flask import request
from django.apps import apps
from django.utils import timezone
from django.core.exceptions import ValidationError
from django.db.models import Q, O... | apache-2.0 | 8,229,932,712,436,812,000 | 35.87617 | 180 | 0.624744 | false |
vberaudi/scipy | scipy/io/arff/tests/test_arffread.py | 27 | 7727 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
import datetime
import os
import sys
from os.path import join as pjoin
if sys.version_info[0] >= 3:
from io import StringIO
else:
from cStringIO import StringIO
import numpy as np
from numpy.testing import (TestCase, asse... | bsd-3-clause | 5,890,949,724,965,335,000 | 31.195833 | 97 | 0.57215 | false |
8l/beri | cheritest/trunk/tests/cp2/test_cp2_ctoptr_tag.py | 2 | 1520 | #-
# Copyright (c) 2014 Michael Roe
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research programme.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BER... | apache-2.0 | -6,454,877,715,328,081,000 | 41.222222 | 115 | 0.755921 | false |
coolsvap/dox | dox/tests/test_images.py | 1 | 3848 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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
#
#... | apache-2.0 | 1,702,432,181,039,430,700 | 36 | 78 | 0.600572 | false |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/idlelib/idle_test/test_run.py | 3 | 1099 | import unittest
from unittest import mock
from test.support import captured_stderr
import idlelib.run as idlerun
class RunTest(unittest.TestCase):
def test_print_exception_unhashable(self):
class UnhashableException(Exception):
def __eq__(self, other):
return True
ex1... | apache-2.0 | -1,353,615,728,282,947,300 | 30.4 | 70 | 0.563239 | false |
FCP-INDI/nipype | nipype/interfaces/fsl/tests/test_utils.py | 10 | 10430 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
from tempfile import mkdtemp
from shutil import rmtree
import numpy as np
import nibabel as nb
from nipype.testing import (assert_equal, assert_not_equal,
assert_rai... | bsd-3-clause | 3,577,388,417,943,147,000 | 32.006329 | 132 | 0.63768 | false |
mozilla/verbatim | local_apps/pootle_project/urls.py | 6 | 1178 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 t... | gpl-2.0 | 5,109,115,047,068,025,000 | 39.62069 | 81 | 0.709677 | false |
amarouni/incubator-beam | sdks/python/apache_beam/transforms/sideinputs_test.py | 9 | 11625 | #
# 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 us... | apache-2.0 | -7,915,734,155,681,565,000 | 36.5 | 80 | 0.601032 | false |
edunham/wok | wok/util.py | 11 | 1471 | import re
from unicodedata import normalize
from datetime import date, time, datetime, timedelta
def chunk(li, n):
"""Yield succesive n-size chunks from l."""
for i in xrange(0, len(li), n):
yield li[i:i+n]
def date_and_times(meta):
date_part = None
time_part = None
if 'date' in meta:
... | mit | -5,873,701,981,500,842,000 | 29.645833 | 83 | 0.588035 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.