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 |
|---|---|---|---|---|---|---|---|---|---|---|
krishnazure/Flask | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py | 330 | 3364 | # urllib3/exceptions.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
## Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
... | apache-2.0 | -9,196,344,109,557,528,000 | 25.698413 | 79 | 0.674792 | false |
nodejs/node-gyp | gyp/pylib/gyp/flock_tool.py | 3 | 1859 | #!/usr/bin/env python3
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""These functions are executed via gyp-flock-tool when using the Makefile
generator. Used on systems that don't have a built-in flock."""
... | mit | -1,530,245,504,890,301,700 | 32.8 | 81 | 0.628833 | false |
arrabito/DIRAC | Core/DISET/private/GatewayService.py | 4 | 20150 | """ The gateway service is used for forwarding service calls to the appropriate services.
For this to be used, the following CS option is required:
DIRAC
{
Gateways
{
my.site.org = dips://thisIsAn.url.org:9159/Framework/Gateway
}
}
At the same time, this same gateway ser... | gpl-3.0 | -8,134,120,418,209,853,000 | 39.872211 | 116 | 0.662283 | false |
sauloal/cufflinksviewer | venvwin/Lib/encodings/cp856.py | 93 | 12986 | """ Python Character Mapping Codec cp856 generated from 'MAPPINGS/VENDORS/MISC/CP856.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,i... | mit | -9,167,299,227,858,570,000 | 40.299674 | 107 | 0.517172 | false |
oopy/micropython | tests/float/math_fun.py | 24 | 2538 | # Tests the functions imported from math
try:
from math import *
except ImportError:
print("SKIP")
raise SystemExit
test_values = [-100., -1.23456, -1, -0.5, 0.0, 0.5, 1.23456, 100.]
test_values_small = [-10., -1.23456, -1, -0.5, 0.0, 0.5, 1.23456, 10.] # so we don't overflow 32-bit precision
unit_range_t... | mit | -1,109,621,542,418,095,900 | 39.285714 | 117 | 0.458629 | false |
zrax/moul-scripts | Python/clftYeeshaPage08.py | 6 | 9539 | # -*- coding: utf-8 -*-
""" *==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
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... | gpl-3.0 | -3,568,804,313,210,101,000 | 38.421488 | 150 | 0.670406 | false |
leon-github/cloudlight | mars/common/log.py | 1 | 17223 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 CloudLight, Inc
# All Rights Reserved.
"""Logging handler.
"""
import ConfigParser
import cStringIO
import inspect
import itertools
import logging
import logging.config
import logging.handlers
import os
import sys
import traceback
import json
from oslo.co... | apache-2.0 | 1,128,744,405,669,572,000 | 32.704501 | 78 | 0.582825 | false |
liorvh/golismero | tools/theHarvester/lib/graphs.py | 9 | 28558 | """
+-------------------------------------------------------------------+
| H T M L - G R A P H S (v4.8) |
| |
| Copyright Gerd Tentler www.gerd-tentler.de/tools |
| Created: Sep. 17, 2002 ... | gpl-2.0 | -6,549,902,497,065,745,000 | 51.690037 | 182 | 0.493837 | false |
adamchainz/ansible | test/units/plugins/strategy/test_strategy_base.py | 69 | 21292 | # (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 | 4,507,831,916,795,941,400 | 37.925046 | 157 | 0.626198 | false |
carpyncho/feets | doc/source/JSAnimation/examples.py | 4 | 3126 | import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
from JSAnimation import IPython_display
def basic_animation(frames=100, interval=30):
"""Plot a basic sine wave with oscillating amplitude"""
fig = plt.figure()
ax = plt.axes(xlim=(0, 10), ylim=(-2, 2))
line, = ax.... | mit | -6,624,626,424,762,738,000 | 31.226804 | 75 | 0.564939 | false |
welliam/data-structures | src/test_traversal.py | 1 | 5030 | '''Test traversal of adjacency_list.py.'''
import pytest
from .graph import Graph
@pytest.fixture
def self_looped():
g = Graph()
g.add_edge('a', 'a', 0)
return g
# The following fixtures for graphs have two associated variables:
# <NAME>_DEPTH and <NAME>_BREADTH
# which are lists of tuples of two value... | mit | 2,107,962,297,825,124,900 | 27.258427 | 75 | 0.622068 | false |
seanaedmiston/gensim | gensim/corpora/lowcorpus.py | 73 | 7185 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Corpus in GibbsLda++ format of List-Of-Words.
"""
from __future__ import with_statement
import logging
from gensim import utils
... | gpl-3.0 | 1,105,859,564,387,707,900 | 36.815789 | 123 | 0.597912 | false |
BeATz-UnKNoWN/python-for-android | python3-alpha/python3-src/Lib/abc.py | 52 | 7650 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) according to PEP 3119."""
from _weakrefset import WeakSet
def abstractmethod(funcobj):
"""A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or der... | apache-2.0 | 1,353,834,054,705,804,000 | 35.255924 | 79 | 0.612026 | false |
phillxnet/rockstor-core | src/rockstor/storageadmin/models/user.py | 2 | 3142 | """
Copyright (c) 2012-2021 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | 7,771,979,358,606,026,000 | 35.114943 | 88 | 0.690006 | false |
juniorh/dummyDbGen | postgresql/genDocDb.postgres.testData.py | 1 | 3203 | #!/usr/bin/env python
# How to use
# >python genDocDb.postgres.py -h localhost -P 5432 -u username -p password -d database -t table -n 1000 -r 1
# library:
# pip install psycopg2
import argparse
import psycopg2
import random
import math
import time
import sys
def get_args_parser():
parser = argparse.ArgumentPar... | gpl-2.0 | 4,912,814,830,365,071,000 | 22.725926 | 143 | 0.589447 | false |
asimshankar/tensorflow | tensorflow/contrib/graph_editor/tests/edit_test.py | 132 | 3104 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,853,992,519,027,261,400 | 37.320988 | 80 | 0.633054 | false |
yatish27/mase | src/stockflow.py | 9 | 2560 | from __future__ import print_function, division
import sys
sys.dont_write_bytecode = True
from ok import *
import random
r = random.random
isa = isinstance
"""
# Compartmental Modeling
## Diapers
q +-----+ r +-----+
---->| C |---->| D |--> s
^ +-----+ +-+---+
| |
+-------------... | unlicense | -4,875,680,603,400,262,000 | 22.934579 | 50 | 0.496094 | false |
tonybaloney/st2 | contrib/linux/sensors/file_watch_sensor.py | 1 | 1965 | import os
from logshipper.tail import Tail
from st2reactor.sensor.base import Sensor
class FileWatchSensor(Sensor):
def __init__(self, sensor_service, config=None):
super(FileWatchSensor, self).__init__(sensor_service=sensor_service,
config=config)
s... | apache-2.0 | -604,379,355,046,718,600 | 28.328358 | 82 | 0.573537 | false |
skumar07/Air-Share-Real | boilerplate/external/babel/messages/tests/data/setup.py | 19 | 1044 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: sw=4 ts=4 fenc=utf-8
# =============================================================================
# $Id: setup.py 114 2007-06-14 21:17:14Z palgarvio $
# =============================================================================
# $URL: http://svn.edgewall... | lgpl-3.0 | -5,982,756,631,565,937,000 | 35.285714 | 90 | 0.441571 | false |
mlc0202/ssdb | deps/cpy/antlr3/tokens.py | 99 | 12016 | """ANTLR3 runtime package"""
# begin[licence]
#
# [The "BSD licence"]
# Copyright (c) 2005-2008 Terence Parr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code ... | bsd-3-clause | 8,470,351,317,011,310,000 | 27.884615 | 87 | 0.593792 | false |
paradoxxxzero/pyjade | pyjade/parser.py | 1 | 10534 | from __future__ import absolute_import
from .lexer import Lexer
from . import nodes
import six
class Parser(object):
def __init__(self,str,filename=None,**options):
self.input = str
self.lexer = Lexer(str,**options)
self.filename = filename
self.bloks = {}
self.options = opt... | mit | 3,046,096,047,009,413,600 | 29.622093 | 117 | 0.522594 | false |
highlando/krypy | krypy/recycling/linsys.py | 1 | 5723 | # -*- coding: utf8 -*-
import numpy
from .. import utils, deflation, linsys
from . import factories, evaluators
class _RecyclingSolver(object):
'''Base class for recycling solvers.'''
def __init__(self, DeflatedSolver,
vector_factory=None
):
'''Initialize recycling so... | mit | 4,568,900,102,347,378,000 | 38.743056 | 79 | 0.589376 | false |
apagac/cfme_tests | cfme/common/vm.py | 1 | 41764 | # -*- coding: utf-8 -*-
"""Module containing classes with common behaviour for both VMs and Instances of all types."""
import json
from datetime import date
from datetime import datetime
from datetime import timedelta
import attr
from cached_property import cached_property
from riggerlib import recursive_update
from ... | gpl-2.0 | 622,023,943,164,201,900 | 40.680639 | 100 | 0.614524 | false |
petewarden/tensorflow | tensorflow/python/autograph/pyct/ast_util_test.py | 8 | 8400 | # 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 | 7,127,344,858,476,025,000 | 34 | 80 | 0.623929 | false |
balazssimon/ml-playground | udemy/lazyprogrammer/reinforcement-learning-python/grid_world.py | 1 | 2827 | class Grid: # Environment
def __init__(self, width, height, start):
self.width = width
self.height = height
self.i = start[0]
self.j = start[1]
def set(self, rewards, actions):
# rewards should be a dict of: (i, j): r (row, col): reward
# actions should be a dict of: (i, j): A (row, col): l... | apache-2.0 | -6,391,394,378,777,689,000 | 25.420561 | 81 | 0.553237 | false |
nordri/check_domains | lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py | 31 | 7885 | """
PostgreSQL database backend for Django.
Requires psycopg 2: http://initd.org/projects/psycopg2
"""
from django.conf import settings
from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper,
BaseDatabaseValidation)
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperation... | gpl-3.0 | 5,726,886,290,288,302,000 | 36.369668 | 105 | 0.639442 | false |
knifenomad/django | tests/delete/tests.py | 222 | 18346 | from __future__ import unicode_literals
from math import ceil
from django.db import IntegrityError, connection, models
from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
from django.utils.six.moves import range
from .models import... | bsd-3-clause | -8,799,619,714,270,338,000 | 36.212982 | 95 | 0.610651 | false |
joshmoore/openmicroscopy | components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py | 1 | 76419 | #!/usr/bin/env python
#
# webclient_gateway
#
# Copyright (c) 2008-2011 University of Dundee.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (a... | gpl-2.0 | -7,456,426,245,659,466,000 | 36.570796 | 169 | 0.55935 | false |
ayushagrawal288/zamboni | mkt/commonplace/urls.py | 7 | 3562 | from django.conf import settings
from django.conf.urls import include, patterns, url
import mkt
from . import views
def fireplace_route(path, name=None):
"""
Helper function for building Fireplace URLs. `path` is the URL route,
and `name` (if specified) is the name given to the route.
"""
kwargs ... | bsd-3-clause | 7,800,972,507,997,840,000 | 32.28972 | 76 | 0.614542 | false |
graingert/isort | kate_plugin/isort_plugin.py | 12 | 3174 | """ Sorts Python import definitions, and groups them based on type (stdlib, third-party, local).
isort/isort_kate_plugin.py
Provides a simple kate plugin that enables the use of isort to sort Python imports
in the currently open kate file.
Copyright (C) 2013 Timothy Edmund Crosley
Permission is hereby granted, fre... | mit | 3,649,261,278,003,242,500 | 38.675 | 118 | 0.692187 | false |
baldengineers/mapper | main.py | 1 | 70755 | #easy cs:go mapper: counter-strike: global offensive port of the easy tf2 mapper
#
#in development, not at a working stage.
#DIFFERENCES:
#more prefabrications
#more sections (subsections?)
#improved UI
#improved file count
#multi-game system
# program boots up and variables are set which change what game the progra... | gpl-3.0 | 8,250,403,391,271,463,000 | 40.474209 | 316 | 0.587591 | false |
javachengwc/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/table.py | 96 | 9406 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at you... | apache-2.0 | 5,012,233,178,499,737,000 | 29.635179 | 80 | 0.68453 | false |
sgerhart/ansible | lib/ansible/modules/network/meraki/meraki_device.py | 43 | 15823 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# 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 = {
... | mit | 6,094,491,076,118,871,000 | 37.498783 | 122 | 0.5966 | false |
TheWardoctor/Wardoctors-repo | script.module.liveresolver/lib/liveresolver/__init__.py | 10 | 43372 | # -*- coding: utf-8 -*-
import re
from modules import client,webutils,cloudflare,decryptionUtils,cache,liveresolver_utils,convert
from modules.constants import resolver_dict
from modules.log_utils import log
from modules.liveresolver_utils import *
import urlparse,urllib,base64
from BeautifulSoup import BeautifulSoup a... | apache-2.0 | -6,076,613,945,339,557,000 | 28.768016 | 252 | 0.525224 | false |
jordanaluft/gnome-music | gnomemusic/widgets.py | 1 | 34979 | # Copyright (c) 2013 Vadim Rutkovsky <vrutkovs@redhat.com>
# Copyright (c) 2013 Shivani Poddar <shivani.poddar92@gmail.com>
# Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com>
# Copyright (c) 2013 Seif Lotfy <seif@lotfy.com>
# Copyright (c) 2013 Sai Suman Prayaga <suman.sai14@gmail.com>
# Copyright (c) 2013 Jackso... | gpl-2.0 | 936,807,593,558,934,900 | 37.82242 | 105 | 0.591098 | false |
Richard-Mathie/cassandra_benchmark | vendor/github.com/datastax/python-driver/tests/integration/cqlengine/columns/test_value_io.py | 6 | 7015 | # Copyright 2013-2016 DataStax, 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 or agreed to in writi... | apache-2.0 | -7,603,066,259,584,916,000 | 24.981481 | 134 | 0.664006 | false |
jerbob92/CouchPotatoServer | libs/guessit/transfo/guess_properties.py | 150 | 1273 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 | 6,948,849,929,272,523,000 | 32.5 | 74 | 0.734485 | false |
spaceone/pyjs | examples/infohierarchy/public/services/jsonrpc/http.py | 24 | 1236 | """
Copyright (c) 2006 Jan-Klaas Kollhof
This file is part of jsonrpc.
jsonrpc is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later ... | apache-2.0 | 5,313,945,474,049,252,000 | 36.454545 | 86 | 0.7411 | false |
msultan/mdtraj | mdtraj/utils/test.py | 9 | 6569 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | lgpl-2.1 | 3,972,271,449,462,869,500 | 32.860825 | 90 | 0.594763 | false |
jmathai/elodie | elodie/tests/media/media_test.py | 1 | 5268 | # Project imports
import os
import sys
import hashlib
import random
import re
import shutil
import string
import tempfile
import time
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))))
sys.path.insert(0, os.path.abspath(os.path.dirname(o... | apache-2.0 | -1,791,670,685,919,713,300 | 29.988235 | 131 | 0.655087 | false |
valkjsaaa/sl4a | python/src/Lib/encodings/mac_centeuro.py | 593 | 14358 | """ Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.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,inp... | apache-2.0 | -4,002,140,888,249,020,000 | 45.76873 | 118 | 0.56122 | false |
adamrp/qiime | qiime/nmds.py | 15 | 1417 | #!/usr/bin/env python
from __future__ import division
import numpy
import os.path
import cogent.cluster.nmds as nmds_module
from qiime.format import format_nmds_coords
from qiime.parse import parse_distmat
__author__ = "Justin Kuzynski"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Justin Kuczyns... | gpl-2.0 | 3,933,455,474,679,528,000 | 31.953488 | 77 | 0.666196 | false |
andrebellafronte/stoq | stoqlib/gui/test/test_qualitytesteditor.py | 3 | 1183 | # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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 Foundati... | gpl-2.0 | -7,406,430,197,945,387,000 | 34.848485 | 71 | 0.731192 | false |
leodavesne/leodavesne.net | leodavesne/settings.py | 1 | 3452 | """
Django settings for leodavesne project.
Generated by 'django-admin startproject' using Django 3.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os... | mit | 5,920,516,162,070,657,000 | 23.834532 | 91 | 0.664832 | false |
MobinRanjbar/hue | desktop/core/ext-py/ndg_httpsclient-0.4.0/ndg/httpsclient/subj_alt_name.py | 79 | 6131 | """NDG HTTPS Client package
Use pyasn1 to provide support for parsing ASN.1 formatted subjectAltName
content for SSL peer verification. Code based on:
http://stackoverflow.com/questions/5519958/how-do-i-parse-subjectaltname-extension-data-using-pyasn1
"""
__author__ = "P J Kershaw"
__date__ = "01/02/12"
__copyright_... | apache-2.0 | 4,532,104,727,171,321,300 | 39.071895 | 100 | 0.608384 | false |
stefan-jonasson/home-assistant | homeassistant/components/device_tracker/keenetic_ndms2.py | 6 | 3728 | """
Support for Zyxel Keenetic NDMS2 based routers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.keenetic_ndms2/
"""
import logging
from collections import namedtuple
import requests
import voluptuous as vol
import homeassistant.helper... | mit | 8,196,167,684,461,196,000 | 29.809917 | 75 | 0.628219 | false |
ICromwell/OCaSimTest | 10 - Dentist Screening Appointment.py | 1 | 1935 | # -*- coding: utf-8 -*-
"""
A screening process wherein a person returns for regular checkups at a dentist
"""
# Time interval between appointments
appInt = 6*30
# Create a counter for the number of dental appointments, if one doesn't already exist
if getattr(entity, "count_DentAppt", 0) == 0:
entit... | gpl-3.0 | 3,353,878,584,481,434,000 | 35.941176 | 132 | 0.620672 | false |
hwu25/AppPkg | Applications/Python/Python-2.7.2/Lib/hmac.py | 66 | 4664 | """HMAC (Keyed-Hashing for Message Authentication) Python module.
Implements the HMAC algorithm as described by RFC 2104.
"""
import warnings as _warnings
trans_5C = "".join ([chr (x ^ 0x5C) for x in xrange(256)])
trans_36 = "".join ([chr (x ^ 0x36) for x in xrange(256)])
# The size of the digests returne... | bsd-2-clause | -7,037,095,824,735,547,000 | 33.067669 | 78 | 0.57783 | false |
fxsjy/pybrain | examples/rl/environments/cartpole/cart_all.py | 30 | 2089 | #!/usr/bin/env python
#########################################################################
# Reinforcement Learning with several optimization algorithms
# on the CartPoleEnvironment
#
# Requirements: pylab (for plotting only). If not available, comment the
# last 3 lines out
######################################... | bsd-3-clause | -8,766,883,172,891,091,000 | 39.960784 | 158 | 0.675443 | false |
videetssinghai/Blog-Rest-Api | lib/python2.7/site-packages/pip/_vendor/distlib/util.py | 327 | 52991 | #
# Copyright (C) 2012-2016 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import shutil
import socket
try:
... | mit | 7,577,552,194,039,158,000 | 31.893234 | 88 | 0.535732 | false |
drbild/boto | tests/unit/cloudsearch/test_search.py | 114 | 13726 | #!/usr/bin env python
from tests.compat import mock, unittest
from httpretty import HTTPretty
import json
import requests
from boto.cloudsearch.search import SearchConnection, SearchServiceException
from boto.compat import six, map
HOSTNAME = "search-demo-userdomain.us-east-1.cloudsearch.amazonaws.com"
FULL_URL = '... | mit | -2,314,041,319,793,198,000 | 31.070093 | 108 | 0.602069 | false |
hub-cap/lady-rainicorn | rainicorn/openstack/common/exception.py | 1 | 3454 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apac... | apache-2.0 | 8,148,286,690,390,137,000 | 23.323944 | 78 | 0.64447 | false |
mizzao/ggplot | ggplot/stats/stat_function.py | 12 | 4439 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
from ggplot.utils import make_iterable_ntimes
from ggplot.utils.exceptions import GgplotError
from .stat import stat
class stat_function(stat):
"""
Superimpose a... | bsd-2-clause | -3,369,415,084,848,312,000 | 28.791946 | 85 | 0.548772 | false |
BhavySinghal/qassam-le2 | tools/perf/scripts/python/net_dropmonitor.py | 2669 | 1738 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 | -4,712,390,689,633,006,000 | 22.173333 | 90 | 0.640391 | false |
CiscoSystems/jujucharm-n1k | charms/precise/swift-storage/hooks/misc_utils.py | 1 | 2174 | from charmhelpers.contrib.storage.linux.utils import (
is_block_device,
zap_disk,
)
from charmhelpers.contrib.storage.linux.loopback import (
ensure_loopback_device,
)
from charmhelpers.contrib.storage.linux.lvm import (
deactivate_lvm_volume_group,
is_lvm_physical_volume,
remove_lvm_physical_... | apache-2.0 | 633,189,320,005,733,400 | 24.880952 | 76 | 0.613615 | false |
tammoippen/nest-simulator | pynest/nest/tests/test_split_simulation.py | 13 | 2259 | # -*- coding: utf-8 -*-
#
# test_split_simulation.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 L... | gpl-2.0 | 6,234,758,310,035,019,000 | 26.888889 | 70 | 0.609562 | false |
Kryz/sentry | src/sentry/migrations/0129_auto__chg_field_release_id__chg_field_pendingteammember_id__chg_field_.py | 36 | 26026 | # -*- 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):
"""
This migration skips all bigint upgrades as they're not generally useful
for organizations, and ... | bsd-3-clause | 4,321,307,139,268,779,500 | 82.684887 | 223 | 0.554638 | false |
JohnOrlando/gnuradio-bitshark | gr-radar-mono/src/python/usrp_radar_mono.py | 11 | 3905 | #!/usr/bin/env python
#
# Copyright 2007 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)
... | gpl-3.0 | 327,595,003,981,853,600 | 39.677083 | 113 | 0.648143 | false |
charanpald/APGL | apgl/graph/test/GeneralVertexListTest.py | 1 | 1641 |
from apgl.graph.GeneralVertexList import GeneralVertexList
from apgl.graph.test.AbstractVertexListTest import AbstractVertexListTest
from apgl.util.PathDefaults import PathDefaults
import unittest
import logging
class GeneralVertexListTest(unittest.TestCase, AbstractVertexListTest):
def setUp(self):
self... | bsd-3-clause | -719,073,170,517,018,800 | 30.557692 | 74 | 0.634369 | false |
cdjones32/vertx-web | src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.py | 168 | 26964 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Access to Python's configuration information."""
import codecs
import os
import re
import sys
from os.path import pardir, realpath
try:
import configparser
except ImportError:
import Conf... | apache-2.0 | -8,657,197,615,827,725,000 | 33.218274 | 80 | 0.540795 | false |
lungetech/luigi | luigi/contrib/sge.py | 11 | 11055 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -4,173,189,063,609,959,000 | 35.127451 | 136 | 0.626142 | false |
gauravbose/digital-menu | digimenu2/tests/initial_sql_regress/tests.py | 13 | 1556 | from django.core.management.color import no_style
from django.core.management.sql import custom_sql_for_model
from django.db import DEFAULT_DB_ALIAS, connections
from django.test import TestCase, override_settings
from .models import Simple
class InitialSQLTests(TestCase):
"""
The format of the included SQL ... | bsd-3-clause | 9,166,358,305,554,776,000 | 33.577778 | 75 | 0.641388 | false |
blaxter/hamster-applet | hamster/storage.py | 1 | 4165 | # - coding: utf-8 -
# Copyright (C) 2007 Patryk Zawadzki <patrys at pld-linux.org>
# Copyright (C) 2007-2009 Toms Baugis <toms.baugis@gmail.com>
# This file is part of Project Hamster.
# Project Hamster is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | gpl-3.0 | 7,181,032,993,825,791,000 | 32.861789 | 75 | 0.642977 | false |
Mazecreator/tensorflow | tensorflow/contrib/metrics/python/ops/metric_ops_test.py | 7 | 205973 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,265,827,565,293,071,600 | 38.277841 | 85 | 0.594156 | false |
KeyWeeUsr/kivy | kivy/tests/test_doc_gallery.py | 17 | 1278 | from doc.gallery import *
def test_parse_docstring_info():
assert 'error' in parse_docstring_info("No Docstring")
assert 'error' in parse_docstring_info("'''No Docstring Title'''")
assert 'error' in parse_docstring_info(
"'''No Sentence\n======\nPeriods'''"
... | mit | -8,511,310,327,823,185,000 | 32.631579 | 74 | 0.654147 | false |
jtyr/ansible-modules-core | cloud/openstack/_quantum_floating_ip_associate.py | 6 | 8225 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <benno@ansible.com>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... | gpl-3.0 | 3,004,950,790,051,463,700 | 34.917031 | 142 | 0.634772 | false |
boada/photometrypipeline | pp_combine.py | 2 | 13483 | #!/usr/bin/env python3
""" PP_COMBINE - combine frames based on wcs
v1.0: 2017-10-03, mommermiscience@gmail.com
"""
from __future__ import print_function, division
# Photometry Pipeline
# Copyright (C) 2016-2018 Michael Mommert, mommermiscience@gmail.com
# This program is free software: you can redistribute it ... | gpl-3.0 | -2,672,041,404,341,241,300 | 38.772861 | 84 | 0.557072 | false |
aarsan/azure-sdk-for-python | azure-servicemanagement-legacy/azure/servicemanagement/_common_error.py | 13 | 1505 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | apache-2.0 | 7,633,349,980,039,614,000 | 37.538462 | 78 | 0.646707 | false |
Nitaco/ansible | lib/ansible/modules/network/f5/bigip_device_group_member.py | 8 | 7464 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# 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 | -7,432,941,680,942,992,000 | 28.856 | 91 | 0.634914 | false |
sencha/chromium-spacewalk | tools/telemetry/telemetry/core/platform/profiler/perf_profiler.py | 6 | 8619 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import re
import signal
import subprocess
import sys
import tempfile
from telemetry.core import platform
from telemetry.core import... | bsd-3-clause | -4,435,052,418,082,825,700 | 34.763485 | 79 | 0.623274 | false |
rickerc/nova_audit | nova/api/openstack/compute/views/limits.py | 14 | 3505 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-2011 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-2.0 | 1,521,693,284,542,638,600 | 34.05 | 78 | 0.564907 | false |
tommyip/zulip | zerver/lib/bugdown/api_code_examples.py | 1 | 10016 | import re
import json
import inspect
from markdown.extensions import Extension
from markdown.preprocessors import Preprocessor
from typing import Any, Dict, Optional, List, Tuple
import markdown
import zerver.openapi.python_examples
from zerver.lib.openapi import get_openapi_fixture, openapi_spec, \
get_openapi_p... | apache-2.0 | -3,526,686,930,778,416,000 | 36.796226 | 116 | 0.577476 | false |
binhex/moviegrabber | lib/site-packages/cherrypy/_cpchecker.py | 87 | 14739 | import os
import warnings
import cherrypy
from cherrypy._cpcompat import iteritems, copykeys, builtins
class Checker(object):
"""A checker for CherryPy sites and their mounted applications.
When this object is called at engine startup, it executes each
of its own methods whose names start with ``che... | gpl-3.0 | -1,075,984,245,209,143,600 | 44.073394 | 85 | 0.471063 | false |
nitishaggarwal/wed | wed/users/views.py | 55 | 1681 | # -*- coding: utf-8 -*-
# Import the reverse lookup function
from django.core.urlresolvers import reverse
# view imports
from django.views.generic import DetailView
from django.views.generic import RedirectView
from django.views.generic import UpdateView
from django.views.generic import ListView
# Only authenticated ... | bsd-3-clause | 4,551,063,443,299,605,500 | 28.508772 | 69 | 0.728138 | false |
mcking49/apache-flask | Python/Lib/htmllib.py | 312 | 12869 | """HTML 2.0 parser.
See the HTML 2.0 specification:
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
"""
from warnings import warnpy3k
warnpy3k("the htmllib module has been removed in Python 3.0",
stacklevel=2)
del warnpy3k
import sgmllib
from formatter import AS_IS
__all__ = ["HTMLPars... | mit | 3,196,804,299,953,962,500 | 25.209776 | 76 | 0.572383 | false |
rbalda/neural_ocr | env/lib/python2.7/site-packages/scipy/optimize/tests/test_nonlin.py | 67 | 15160 | """ Unit tests for nonlinear solvers
Author: Ondrej Certik
May 2007
"""
from __future__ import division, print_function, absolute_import
from numpy.testing import assert_, dec, TestCase, run_module_suite
from scipy._lib.six import xrange
from scipy.optimize import nonlin, root
from numpy import matrix, diag, dot
from... | mit | -7,945,108,262,660,079,000 | 33.770642 | 88 | 0.538259 | false |
hydrospanner/DForurm | DForurm/env/Lib/site-packages/django/contrib/auth/base_user.py | 59 | 4973 | """
This module allows importing AbstractBaseUser even when django.contrib.auth is
not in INSTALLED_APPS.
"""
from __future__ import unicode_literals
import unicodedata
from django.contrib.auth import password_validation
from django.contrib.auth.hashers import (
check_password, is_password_usable, make_password,
... | mit | -6,938,767,137,227,467,000 | 32.375839 | 107 | 0.638045 | false |
Chandlercjy/OnePy | OnePy/environment.py | 1 | 5171 | import logging
from collections import defaultdict
import arrow
import OnePy as op
from OnePy.event_engine import EventEngine
from OnePy.utils.easy_func import get_day_ratio
class Environment(object):
"""作为全局共享变量为各模块提供支持"""
# general context
sys_date: str = None
sys_frequency: str = None
instru... | mit | 7,527,293,996,103,642,000 | 31.701389 | 78 | 0.621576 | false |
marco-lancini/Showcase | django/utils/dates.py | 488 | 2237 | "Commonly-used date structures"
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
WEEKDAYS = {
0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
5:_('Saturday'), 6:_('Sunday')
}
WEEKDAYS_ABBR = {
0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')... | mit | 1,775,859,375,883,398,400 | 38.245614 | 89 | 0.549397 | false |
rzhxeo/youtube-dl | youtube_dl/extractor/radiode.py | 22 | 1776 | from __future__ import unicode_literals
import json
from .common import InfoExtractor
class RadioDeIE(InfoExtractor):
IE_NAME = 'radio.de'
_VALID_URL = r'https?://(?P<id>.+?)\.(?:radio\.(?:de|at|fr|pt|es|pl|it)|rad\.io)'
_TEST = {
'url': 'http://ndr2.radio.de/',
'md5': '3b4cdd011bc591745... | unlicense | 4,797,217,983,046,140,000 | 31.290909 | 87 | 0.520833 | false |
andykimpe/chromium-test-npapi | tools/resources/list_resources_removed_by_repack.py | 95 | 3297 | #!/usr/bin/env python
# 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.
import os
import re
import sys
usage = """%s BUILDTYPE BUILDDIR
BUILDTYPE: either chromium or chrome.
BUILDDIR: The path to the outp... | bsd-3-clause | 4,113,470,212,081,949,000 | 32.30303 | 79 | 0.676372 | false |
gitaarik/monkful | tests/tests/basic_resource/put_identifier_field.py | 2 | 5212 | import unittest
import json
from datetime import datetime
from pymongo import MongoClient
from apps.basic_resource import server
from apps.basic_resource.documents import Article, Comment
class ResourcePutIdentifierField(unittest.TestCase):
"""
Test if a HTTP PUT that updates a resource that has an embedded
... | lgpl-3.0 | 1,759,723,128,228,298,200 | 31.17284 | 78 | 0.517843 | false |
nvie/python-mode | pymode/environment.py | 11 | 6338 | """ Define interfaces. """
from __future__ import print_function
import vim
import json
import time
import os.path
from ._compat import PY2
class VimPymodeEnviroment(object):
""" Vim User interface. """
prefix = '[Pymode]'
def __init__(self):
""" Init VIM environment. """
self.curren... | lgpl-3.0 | 5,744,207,367,387,973,000 | 24.453815 | 78 | 0.506311 | false |
ZLLab-Mooc/edx-platform | cms/djangoapps/contentstore/views/program.py | 15 | 2058 | """Programs views for use with Studio."""
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import Http404, JsonResponse
from django.utils.decorators import method_decorator
from django.views.generic import View
from edxmako.shortcuts import render_... | agpl-3.0 | 4,210,757,589,727,792,600 | 41.875 | 94 | 0.68999 | false |
pombredanne/acora | acora/__init__.py | 2 | 10484 | """\
Acora - a multi-keyword search engine based on Aho-Corasick trees.
Usage::
>>> from acora import AcoraBuilder
Collect some keywords::
>>> builder = AcoraBuilder('ab', 'bc', 'de')
>>> builder.add('a', 'b')
Generate the Acora search engine::
>>> ac = builder.build()
Search a string for all occ... | bsd-3-clause | -4,617,662,313,878,696,000 | 32.388535 | 100 | 0.542636 | false |
skerit/shotfactory | shotfactory04/gui/windows/flock.py | 1 | 3182 | # browsershots.org - Test your web design in different browsers
# Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org>
#
# Browsershots 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 ... | gpl-3.0 | -5,403,887,888,551,945,000 | 32.851064 | 78 | 0.625393 | false |
uroybd/parsexl | parsexl.py | 1 | 1228 | """This Module Parse xls/xslx files and return data in json."""
import xlrd, datetime
from collections import OrderedDict
import simplejson as json
""" This function take 5 arguments:
inp = Input file
outp = Output file
sheet = Worksheet to work with in input file.
start = Starting row
end = Endin... | gpl-3.0 | 6,407,074,520,226,245,000 | 29.7 | 84 | 0.566775 | false |
matthiascy/panda3d | direct/src/directscripts/doxygen_filter.py | 9 | 2333 | """ This script converts a file into a format that
doxygen can understand and process. It can be used
as an INPUT_FILTER in doxygen. """
import sys, os
# Explicitly include these files. Besides these, all
# files ending in _src will be explicitly included too.
INCLUDE_FILES = ["fltnames.h", "dblnames.h",
... | bsd-3-clause | 7,423,275,660,277,925,000 | 33.308824 | 86 | 0.499357 | false |
xen0l/ansible | lib/ansible/module_utils/network/f5/common.py | 2 | 18920 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# 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
import os
import re
from ansible.module_utils._text import to_text
from ans... | gpl-3.0 | -6,057,477,038,873,418,000 | 30.798319 | 107 | 0.607822 | false |
yanheven/glance | glance/api/v2/model/metadef_property_type.py | 20 | 2354 | # 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
#
# Unless required by applica... | apache-2.0 | -786,576,585,974,371,700 | 37.590164 | 73 | 0.727273 | false |
buguelos/odoo | addons/lunch/wizard/lunch_order.py | 440 | 1299 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 | 1,602,878,356,410,357,800 | 43.793103 | 85 | 0.618938 | false |
smileboywtu/python-enhance | static/demo/tic-tac-toe.py | 1 | 5575 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Tic-Tac-Toe
# Plays the game of tic-tac-toe against a human opponent
# global constants
X = "X"
O = "O"
EMPTY = " "
TIE = "TIE"
NUM_SQUARES = 9
def display_instruct():
"""Display game instructions."""
print(
"""
Welcome to the greatest intellectual cha... | mit | -6,966,203,909,354,963,000 | 25.42654 | 89 | 0.546726 | false |
OCA/vertical-medical | medical_prescription_sale/models/sale_order_line.py | 2 | 4340 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Dave Lasley <dave@laslabs.com>
# Copyright: 2015 LasLabs, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... | gpl-3.0 | -670,401,346,052,154,600 | 35.166667 | 78 | 0.562212 | false |
zstackio/zstack-woodpecker | integrationtest/vm/installation/upgrade/test_zs_degd_latest_1.5_on_cos7.py | 2 | 1889 | '''
@author: MengLai
'''
import os
import tempfile
import uuid
import time
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
test_stub = test_lib.lib_get_test_stub()
test_obj_dict = test_state.TestStateDict()
tm... | apache-2.0 | 3,769,812,583,138,547,000 | 32.981481 | 106 | 0.66702 | false |
MoonshineSG/OctoPrint | src/octoprint/util/avr_isp/stk500v2.py | 8 | 4705 | from __future__ import absolute_import, division, print_function
import os, struct, sys, time
from serial import Serial
from serial import SerialException
from builtins import range
from . import ispBase, intelHex
class Stk500v2(ispBase.IspBase):
def __init__(self):
self.serial = None
self.seq = 1
self.lastAd... | agpl-3.0 | -5,445,227,204,360,360,000 | 29.160256 | 162 | 0.655473 | false |
pleaseproject/python-for-android | python3-alpha/python3-src/Lib/encodings/raw_unicode_escape.py | 852 | 1208 | """ Python 'raw-unicode-escape' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is ... | apache-2.0 | -8,791,219,121,820,169,000 | 25.844444 | 70 | 0.719371 | false |
ad-uistyleguide/ad-uistyleguide.github.io | node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/flock_tool.py | 604 | 1533 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""These functions are executed via gyp-flock-tool when using the Makefile
generator. Used on systems that don't have a built-in flock."""
... | mit | 8,156,215,216,584,593,000 | 30.285714 | 74 | 0.679061 | false |
naturali/tensorflow | tensorflow/contrib/distributions/python/ops/mvn.py | 1 | 28414 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -4,695,473,008,018,263,000 | 36.239843 | 92 | 0.635461 | false |
pyoceans/pocean-core | pocean/dsg/trajectory/cr.py | 1 | 10376 | #!python
# coding=utf-8
from copy import copy
from collections import OrderedDict
import numpy as np
import pandas as pd
from pocean.utils import (
create_ncvar_from_series,
dict_update,
downcast_dataframe,
generic_masked,
get_default_axes,
get_dtype,
get_mapped_axes_variables,
get_mas... | mit | -8,736,001,294,292,709,000 | 35.664311 | 112 | 0.523419 | false |
scenarios/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/gamma_test.py | 7 | 14250 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,282,272,630,792,596,000 | 39.140845 | 80 | 0.613263 | 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.