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 |
|---|---|---|---|---|---|---|---|---|---|---|
ljgabc/lfs | usr/lib/python2.7/test/test_zipimport.py | 128 | 16817 | import sys
import os
import marshal
import imp
import struct
import time
import unittest
from test import test_support
from test.test_importhooks import ImportHooksBaseTestCase, test_src, test_co
# some tests can be ran even without zlib
try:
import zlib
except ImportError:
zlib = None
from zipfile import Zi... | gpl-2.0 | 1,491,015,417,671,275,500 | 34.629237 | 92 | 0.572635 | false |
dylanparsons/Sample-Code | python/pickle.py | 1 | 3287 | import pickle
import math
import random
def arrow(n):
return str(n)+"--> "
def isPositive(aNumber):
return aNumber > 0
def abs(aNumber):
if aNumber >= 0:
return aNumber
return -aNumber
def main2():
""" test two build in high order functions: map and filter functions"""
... | gpl-3.0 | -9,101,805,047,187,935,000 | 22.714286 | 75 | 0.55826 | false |
MiLk/youtube-dl | youtube_dl/extractor/ign.py | 12 | 4549 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class IGNIE(InfoExtractor):
"""
Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com.
Some videos of it.ign.com are also supported
"""
_VALID_URL = r'https?://.+?\.ign\.com/(?P<type>video... | unlicense | 2,949,120,538,659,179,000 | 35.685484 | 146 | 0.503847 | false |
abenzbiria/clients_odoo | addons/website_hr_recruitment/controllers/main.py | 19 | 5703 | # -*- coding: utf-8 -*-
import base64
from openerp import SUPERUSER_ID
from openerp import http
from openerp.tools.translate import _
from openerp.http import request
from openerp.addons.website.models.website import slug
class website_hr_recruitment(http.Controller):
@http.route([
'/jobs',
'/job... | agpl-3.0 | 6,112,785,869,621,328 | 42.534351 | 132 | 0.585306 | false |
sargas/scipy | scipy/stats/tests/test_mstats_extras.py | 4 | 4790 | # pylint: disable-msg=W0611, W0612, W0511,R0201
"""Tests suite for maskedArray statistics.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
from __future__ import division, print_function, absolute_import
__author__ = "Pierre GF Gerard-Marchant ($Author: backtopop $)"
import numpy as np
import ... | bsd-3-clause | -2,797,681,729,237,534,000 | 44.619048 | 82 | 0.586639 | false |
cohortfsllc/cohort-cocl2-sandbox | buildbot/buildbot_lib.py | 2 | 21805 | #!/usr/bin/python
# Copyright (c) 2012 The Native Client 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 optparse
import os.path
import shutil
import subprocess
import stat
import sys
import time
import traceback
ARCH_MAP = {
... | bsd-3-clause | 3,788,711,817,935,895,000 | 30.693314 | 80 | 0.654804 | false |
supriyantomaftuh/syzygy | third_party/numpy/files/numpy/polynomial/legendre.py | 16 | 33731 | """
Objects for dealing with Legendre series.
This module provides a number of objects (mostly functions) useful for
dealing with Legendre series, including a `Legendre` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in th... | apache-2.0 | 1,426,182,987,365,717,800 | 28.536778 | 80 | 0.581038 | false |
ghchinoy/tensorflow | tensorflow/contrib/boosted_trees/python/training/functions/gbdt_batch_test.py | 2 | 80753 | # 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 | 6,053,921,406,122,958,000 | 37.307875 | 88 | 0.600027 | false |
PhilippeTillet/DSHF-ICA | python/examples/infomax_.py | 2 | 14364 | # Authors: Lukas Breuer <l.breuer@fz-juelich.de>
# Juergen Dammers <j.dammers@fz-juelich.de>
# Denis A. Engeman <denis.engemann@gemail.com>
#
# License: BSD (3-clause)
import math
import logging
import numpy as np
logger = logging.getLogger('mne') # one selection here used across mne-python
logger... | mit | -9,035,385,017,390,951,000 | 37.716981 | 101 | 0.563492 | false |
otype/myip | setup.py | 1 | 8799 | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import imp
import subprocess
## Python 2.6 subprocess.check_output compatibility. Thanks Greg Hewgill!
if 'check_output' not in dir(subprocess):
def check_output(cmd_args, *args, **kwargs):
proc = subprocess.Popen(
... | mit | -8,029,327,746,469,997,000 | 30.537634 | 113 | 0.652233 | false |
pyokagan/gyp | buildbot/buildbot_run.py | 10 | 8342 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Argument-less script to select what to run on the buildbots."""
import filecmp
import os
import shutil
import subprocess
import sys
i... | bsd-3-clause | 8,599,390,430,592,484,000 | 32.23506 | 117 | 0.630904 | false |
Dioptas/Dioptas | dioptas/model/MaskModel.py | 1 | 11647 | # -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
... | gpl-3.0 | -1,486,751,670,052,096,800 | 34.401216 | 97 | 0.560488 | false |
craigcitro/apitools | apitools/base/py/compression_test.py | 8 | 5319 | #!/usr/bin/env python
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 8,986,278,953,602,595,000 | 34.697987 | 79 | 0.650498 | false |
seslattery/django-sample-app | bin/fabfile.py | 1 | 3028 | from fabric.api import cd, run, env, local, sudo, require
from fabric.operations import _prefix_commands, _prefix_env_vars
from lib.fabric_helpers import *
import os
import string
env.hosts = ['djtut2.example.com']
env.code_dir = '/srv/www/djtut2'
env.virtualenv = '/srv/www/djtut2/.virtualenv'
env.code_repo = 'git@gi... | bsd-3-clause | -6,400,100,869,345,203,000 | 25.330435 | 131 | 0.624174 | false |
Ademan/NumPy-GSoC | numpy/core/tests/test_umath.py | 3 | 38130 | import sys
from numpy.testing import *
import numpy.core.umath as ncu
import numpy as np
class TestDivision(TestCase):
def test_division_int(self):
# int division should follow Python
x = np.array([5, 10, 90, 100, -5, -10, -90, -100, -120])
if 5 / 10 == 0.5:
assert_equal(x / 1... | bsd-3-clause | -7,408,767,103,966,507,000 | 35.176471 | 133 | 0.534645 | false |
eligoenergy/git-repo | subcmds/overview.py | 83 | 2727 | #
# Copyright (C) 2012 The Android Open Source Project
#
# 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 | -4,360,187,061,002,202,000 | 31.464286 | 76 | 0.643198 | false |
cfei18/incubator-airflow | tests/www/api/experimental/test_endpoints.py | 15 | 11876 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 62,575,648,720,219,300 | 35.318043 | 79 | 0.591192 | false |
JakeBrand/CMPUT410-E3 | lab4/lib/python2.7/site-packages/jinja2/testsuite/debug.py | 415 | 1935 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.debug
~~~~~~~~~~~~~~~~~~~~~~
Tests the debug system.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase, filesystem_loader
from jinja2 import Environment,... | apache-2.0 | -7,357,588,250,277,985,000 | 32.362069 | 192 | 0.643411 | false |
halberom/ansible-modules-extras | cloud/cloudstack/cs_loadbalancer_rule.py | 31 | 11531 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Darren Worrall <darren@iweb.co.uk>
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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 So... | gpl-3.0 | 5,792,683,900,132,157,000 | 28.637532 | 118 | 0.6259 | false |
sujeet4github/MyLangUtils | LangPython/oreilly-intro-to-flask-video/venv/lib/python3.6/site-packages/sqlalchemy/ext/serializer.py | 32 | 5586 | # ext/serializer.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Serializer/Deserializer objects for usage with SQLAlchemy query structures,
all... | gpl-3.0 | 6,848,698,411,109,407,000 | 34.132075 | 79 | 0.642678 | false |
bobintetley/asm3 | src/asm3/locales/locale_th.py | 1 | 126059 | # th.po
val = {" days." : "",
"(all)" : "",
"(any)" : "",
"(anyone)" : "(ไม่มี)",
"(available)" : "",
"(blank)" : "",
"(both)" : "",
"(everyone)" : "",
"(master user, not editable)" : "",
"(no change)" : "",
"(no deduction)" : "",
"(none)" : "(ไม่มี)",
"(unkn... | gpl-3.0 | 5,236,897,417,865,618,000 | 36.076176 | 288 | 0.605891 | false |
ammaradil/fibonacci | Lib/site-packages/pip/_vendor/requests/__init__.py | 412 | 1861 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> ... | mit | 7,766,339,881,211,058,000 | 23.168831 | 77 | 0.631918 | false |
wolverineav/neutron | neutron/db/migration/autogen.py | 11 | 3994 | # Copyright (c) 2015 Red Hat
#
# 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... | apache-2.0 | 1,266,508,480,665,518,800 | 31.209677 | 78 | 0.674011 | false |
Swimlane/sw-python-client | functional_tests/driver_tests/test_user_group_fields.py | 1 | 57102 | import pytest
from swimlane import exceptions
@pytest.fixture(autouse=True, scope='module')
def my_fixture(helpers):
# setup stuff
defaultApp = 'user group fields'
pytest.swimlane_instance = helpers.swimlane_instance
pytest.app, pytest.appid = helpers.findCreateApp(defaultApp)
pytest.testUsers = l... | mit | -2,311,866,798,916,364,300 | 59.170706 | 214 | 0.673689 | false |
kamijawa/ogc_server | bayesian/test/test_gaussian_bayesian_network.py | 2 | 2497 | from __future__ import division
import pytest
import os
from bayesian.gaussian import MeansVector, CovarianceMatrix
from bayesian.gaussian_bayesian_network import *
from bayesian.examples.gaussian_bayesian_networks.river import (
f_a, f_b, f_c, f_d)
def pytest_funcarg__river_graph(request):
g = build_graph(... | mit | 5,904,261,758,801,329,000 | 29.45122 | 82 | 0.487385 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/visualization/data_providers/registry.py | 1 | 5462 | from galaxy.visualization.data_providers.basic import ColumnDataProvider
from galaxy.visualization.data_providers import genome
from galaxy.model import NoConverterException
from galaxy.visualization.data_providers.phyloviz import PhylovizDataProvider
from galaxy.datatypes.tabular import Tabular, Vcf
from galaxy.dataty... | gpl-3.0 | 1,753,964,727,899,154,000 | 48.654545 | 123 | 0.584218 | false |
artur-shaik/qutebrowser | scripts/hostblock_blame.py | 8 | 2305 | #!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... | gpl-3.0 | 43,653,116,805,956,380 | 35.015625 | 76 | 0.678525 | false |
AIML/scikit-learn | examples/cluster/plot_feature_agglomeration_vs_univariate_selection.py | 218 | 3893 | """
==============================================
Feature agglomeration vs. univariate selection
==============================================
This example compares 2 dimensionality reduction strategies:
- univariate feature selection with Anova
- feature agglomeration with Ward hierarchical clustering
Both metho... | bsd-3-clause | -555,851,774,725,712,640 | 35.046296 | 79 | 0.670434 | false |
darisandi/geonode | geonode/maps/forms.py | 18 | 1263 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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 versio... | gpl-3.0 | -1,376,420,441,732,966,000 | 33.135135 | 73 | 0.619161 | false |
napkindrawing/ansible | lib/ansible/modules/network/f5/bigip_hostname.py | 26 | 5767 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 F5 Networks 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
# ... | gpl-3.0 | 7,913,415,885,864,399,000 | 26.461905 | 82 | 0.615918 | false |
Toshakins/wagtail | wagtail/wagtailsnippets/views/snippets.py | 2 | 8601 | from __future__ import absolute_import, unicode_literals
from django.apps import apps
from django.core.urlresolvers import reverse
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect, render
from django.utils.text import capfirst
from django.utils.translation import ugettext as _
... | bsd-3-clause | -1,387,253,162,009,588,500 | 33.542169 | 101 | 0.63202 | false |
germanovm/vdsm | vdsm/gluster/storagedev.py | 1 | 13988 | #
# Copyright 2015 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... | gpl-2.0 | 6,225,482,757,189,328,000 | 39.544928 | 79 | 0.600729 | false |
pgjones/jinja | tests/test_security.py | 23 | 6015 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.security
~~~~~~~~~~~~~~~~~~~~~~~~~
Checks the sandbox and other security features.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import pytest
from jinja2 import Environment
from jinja2.sandbox import Sandboxe... | bsd-3-clause | -4,719,486,722,143,064,000 | 36.360248 | 84 | 0.544306 | false |
magfest/ubersystem | alembic/versions/e1d3c11eb9dd_add_adult_panels_and_tables.py | 1 | 1928 | """Add adult panels and tables
Revision ID: e1d3c11eb9dd
Revises: 1f862611ba04
Create Date: 2018-06-21 23:06:32.678061
"""
# revision identifiers, used by Alembic.
revision = 'e1d3c11eb9dd'
down_revision = '1f862611ba04'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
try:
... | agpl-3.0 | -673,961,587,485,319,400 | 30.606557 | 115 | 0.631224 | false |
jspan/Open-Knesset | laws/forms.py | 8 | 8038 | from django import forms
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from datetime import date
from tagging.models import Tag
from models import (Vote, Bill, KnessetProposal, BillBudgetEstimation,
CONVERT_TO_DISCUSSION_HEADERS)
from vote_choices import (ORD... | bsd-3-clause | 6,818,616,644,079,561,000 | 40.220513 | 107 | 0.56631 | false |
edx/ecommerce | ecommerce/extensions/api/v2/views/refunds.py | 1 | 6962 | """HTTP endpoints for interacting with refunds."""
import logging
from django.contrib.auth import get_user_model
from django.db import transaction
from django.utils.decorators import method_decorator
from oscar.core.loading import get_model
from rest_framework import generics, status
from rest_framework.exceptions i... | agpl-3.0 | -7,274,515,693,310,179,000 | 39.71345 | 117 | 0.669779 | false |
jcoady9/python-for-android | python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/rijndael.py | 359 | 11341 | """
A pure python (slow) implementation of rijndael with a decent interface
To include -
from rijndael import rijndael
To do a key setup -
r = rijndael(key, block_size = 16)
key must be a string of length 16, 24, or 32
blocksize must be 16, 24, or 32. Default is 16
To use -
ciphertext = r.encrypt(plaintext)
plai... | apache-2.0 | -4,625,957,302,812,123,000 | 27.931122 | 116 | 0.432854 | false |
TanPhongPhan/ABC4GSD | ABC v3/library/basic_frames/ApplicationList.py | 2 | 6114 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import wx
import sys, os
sys.path.append(os.getcwd())
import library.constants as CO
from library.utils import utils as UT
from library.client.ABCAppInterface import ABCAppInterface
class ApplicationList(wx.Frame, ABCAppInterface):
def __init__(self, parent, id, tit... | mit | -8,339,285,038,717,697,000 | 32.048649 | 209 | 0.535002 | false |
aabbox/kbengine | kbe/res/scripts/common/Lib/test/test_code_module.py | 79 | 3009 | "Test InteractiveConsole and InteractiveInterpreter from code module"
import sys
import unittest
from contextlib import ExitStack
from unittest import mock
from test import support
code = support.import_module('code')
class TestInteractiveConsole(unittest.TestCase):
def setUp(self):
self.console = code.... | lgpl-3.0 | 4,484,334,654,329,402,400 | 33.988372 | 73 | 0.615155 | false |
dorotan/pythontraining | env/Lib/base64.py | 15 | 20442 | #! /usr/bin/env python3
"""Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings"""
# Modified 04-Oct-1995 by Jack Jansen to use binascii module
# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support
# Modified 22-May-2007 by Guido van Rossum to use bytes everywhere
import re
import struc... | apache-2.0 | 5,730,906,868,646,942,000 | 33.013311 | 84 | 0.608551 | false |
larks/mbed | workspace_tools/host_tests/udpecho_server_auto.py | 101 | 2515 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... | apache-2.0 | 7,854,504,982,349,431,000 | 35.985294 | 113 | 0.608748 | false |
vitan/hue | desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/validate_templates.py | 35 | 3355 | import os
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.core.management.color import color_style
from django.template.base import add_to_builtins
from django.template.loaders.filesystem import Loader
from django_extensions.utils import validatingtemplatet... | apache-2.0 | -1,038,923,111,988,380,800 | 44.958904 | 117 | 0.584203 | false |
c0defreak/python-for-android | python3-alpha/python3-src/Tools/unicode/mkstringprep.py | 47 | 10046 | import re, unicodedata, sys
if sys.maxunicode == 65535:
raise RuntimeError("need UCS-4 Python")
def gen_category(cats):
for i in range(0, 0x110000):
if unicodedata.category(chr(i)) in cats:
yield(i)
def gen_bidirectional(cats):
for i in range(0, 0x110000):
if unicodedata.bidir... | apache-2.0 | 6,488,502,835,338,982,000 | 22.637647 | 85 | 0.594167 | false |
Daniex/horizon | openstack_dashboard/dashboards/project/data_processing/jobs/tabs.py | 38 | 1172 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | 12,117,635,423,639,100 | 29.051282 | 69 | 0.71843 | false |
wd5/jangr | djangoappengine/tests/not_return_sets.py | 36 | 4303 | import datetime
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.test import TestCase
from .testmodels import FieldsWithOptionsModel, OrderedModel, \
SelfReferenceModel
class NonReturnSetsTest(TestCase):
floats = [5.3, 2.6, 9.1, 1.58, 2.4]
emails = ['app-engine@... | bsd-3-clause | -755,480,898,497,230,200 | 39.214953 | 78 | 0.616314 | false |
GREO/GNU-Radio | gnuradio-examples/python/digital_voice/encdec.py | 10 | 2029 | #!/usr/bin/env python
#
# Copyright 2005 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 | 9,143,325,763,615,766,000 | 33.982759 | 83 | 0.646624 | false |
yakky/django | tests/check_framework/test_caches.py | 249 | 1114 | from django.core.checks.caches import E001
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckCacheSettingsAppDirsTest(SimpleTestCase):
VALID_CACHES_CONFIGURATION = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
... | bsd-3-clause | -8,606,499,409,156,496,000 | 30.828571 | 79 | 0.653501 | false |
westinedu/newertrends | django/conf/locale/pt_BR/formats.py | 231 | 1530 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \de N \de Y'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = r'j \de N \de Y à\s... | bsd-3-clause | 951,488,050,521,827,200 | 37.225 | 90 | 0.527796 | false |
TixLo/kademlia | lib/jsoncpp/devtools/antglob.py | 3 | 7695 | #!/usr/bin/env python
# encoding: utf-8
# Baptiste Lepilleur, 2009
from __future__ import print_function
from dircache import listdir
import re
import fnmatch
import os.path
# These fnmatch expressions are used by default to prune the directory tree
# while doing the recursive traversal in the glob_impl method of gl... | gpl-3.0 | 2,982,295,225,310,341,600 | 37.094059 | 114 | 0.495257 | false |
crr0004/taiga-back | taiga/users/services.py | 2 | 3912 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | agpl-3.0 | 8,420,372,464,591,207,000 | 33.298246 | 101 | 0.690793 | false |
huihoo/reader | vendor/appdotnet.py | 19 | 9191 | import json
import requests
# To add
# - Identity Delegation
# - Streams (in dev by app.net)
# - Filters (in dev by app.net)
class Appdotnet:
''' Once access has been given, you don't have to pass through the
client_id, client_secret, redirect_uri, or scope. These are just
to get the authentication token.... | mit | 6,203,805,073,119,702,000 | 34.762646 | 94 | 0.573278 | false |
fga-verival/2017-1Grupo2 | backend/game/tests/acceptance/test_13.py | 1 | 1980 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | gpl-3.0 | 7,939,839,606,976,226,000 | 35.666667 | 73 | 0.640404 | false |
giggsey/SickRage | lib/github/Permissions.py | 74 | 3027 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 | -2,401,500,693,479,580,000 | 44.179104 | 101 | 0.471093 | false |
Sh4kE/ofm_helper | core/tests/unit/views/ofm_views/test_ofm_finances_view.py | 2 | 4895 | import json
from django.core.urlresolvers import reverse
from django.test import TestCase
from core.factories.core_factories import MatchdayFactory, FinanceFactory
from users.models import OFMUser
class OFMFinancesViewTestCase(TestCase):
def setUp(self):
self.matchday = MatchdayFactory.create()
... | agpl-3.0 | 5,398,088,682,602,229,000 | 45.619048 | 90 | 0.630031 | false |
whip112/Whip112 | vendor/packages/lockfile/symlinklockfile.py | 487 | 2613 | from __future__ import absolute_import
import time
import os
from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout,
AlreadyLocked)
class SymlinkLockFile(LockBase):
"""Lock access to a file using symlink(2)."""
def __init__(self, path, threaded=True, timeout=None):
# s... | mpl-2.0 | 3,509,958,178,352,571,000 | 36.869565 | 74 | 0.52124 | false |
cedk/odoo | addons/website_sale_options/controllers/main.py | 236 | 3610 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website_sale.controllers.main import website_sale
class website_sale_options(website_sale):
@http.route(['/shop/product/<model("product.template"):product>'... | agpl-3.0 | -8,846,457,390,886,843,000 | 47.133333 | 131 | 0.634072 | false |
andreimacavei/coala | coalib/tests/bearlib/abstractions/SectionCreatableTest.py | 2 | 2504 | import sys
sys.path.insert(0, ".")
import unittest
from coalib.bearlib.abstractions.SectionCreatable import SectionCreatable
from coalib.settings.Section import Section, Setting
class TestObject(SectionCreatable):
def __init__(self,
setting_one: int,
raw_setting,
... | agpl-3.0 | 7,747,048,642,713,402,000 | 36.939394 | 79 | 0.622204 | false |
kingsamchen/Eureka | crack-data-structures-and-algorithms/leetcode/populating_next_right_pointers_in_each_node_II_q117.py | 1 | 1821 | """
# Definition for a Node.
class Node(object):
def __init__(self, val=0, left=None, right=None, next=None):
self.val = val
self.left = left
self.right = right
self.next = next
"""
# 核心思路
# 递归处理,因为题目已经说过递归调用栈不算extra space
# 对于每一个节点,首先找到这个节点的不为空的,最靠右的孩子节点,作为下一层连接操作的左端
# 然后在这一层往右扫描,找... | mit | -8,504,431,898,645,499,000 | 28.18 | 85 | 0.604524 | false |
Changaco/oh-mainline | vendor/packages/Django/django/contrib/admin/templatetags/admin_modify.py | 101 | 2428 | from django import template
register = template.Library()
@register.inclusion_tag('admin/prepopulated_fields_js.html', takes_context=True)
def prepopulated_fields_js(context):
"""
Creates a list of prepopulated_fields that should render Javascript for
the prepopulated fields for both the admin form and in... | agpl-3.0 | 6,413,520,125,397,554,000 | 39.466667 | 85 | 0.632208 | false |
codeforamerica/skillcamp | ENV/lib/python2.7/site-packages/psycopg2/tests/test_extras_dictcursor.py | 62 | 17404 | #!/usr/bin/env python
#
# extras_dictcursor - test if DictCursor extension class works
#
# Copyright (C) 2004-2010 Federico Di Gregorio <fog@debian.org>
#
# psycopg2 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... | mit | -5,147,085,961,778,336,000 | 35.033126 | 87 | 0.634969 | false |
MaxStrange/ArtieInfant | scripts/plotaudio/plotaudio.py | 1 | 2598 | """
This is code that I find I use a LOT while debugging or analyzing.
"""
import audiosegment
import math
import matplotlib.pyplot as plt
import numpy as np
import os
import sys
#################################################
#### These are the parameters I have been using #
#######################################... | mit | 4,521,299,774,523,878,000 | 33.64 | 122 | 0.566205 | false |
glaubitz/fs-uae-debian | arcade/launcher/ui/floppiesgroup.py | 2 | 4358 | import fsui
from launcher.cd_manager import CDManager
from launcher.floppy_manager import FloppyManager
from launcher.i18n import gettext
from launcher.option import Option
from launcher.ui.behaviors.platformbehavior import (
AMIGA_PLATFORMS,
CDEnableBehavior,
FloppyEnableBehavior,
)
from launcher.ui.floppy... | gpl-2.0 | -6,323,017,166,057,155,000 | 35.016529 | 79 | 0.59844 | false |
kalvdans/scipy | scipy/io/matlab/tests/test_mio.py | 14 | 42133 | # -*- coding: latin-1 -*-
''' Nose test generators
Need function load / save / roundtrip tests
'''
from __future__ import division, print_function, absolute_import
import os
from os.path import join as pjoin, dirname
from glob import glob
from io import BytesIO
from tempfile import mkdtemp
from scipy._lib.six impor... | bsd-3-clause | -5,561,465,797,958,377,000 | 33.225833 | 83 | 0.596649 | false |
sschnug/pyeda | pyeda/parsing/pla.py | 5 | 4136 | """
PLA
This is a partial implementation of the Berkeley PLA format.
See extension/espresso/html/espresso.5.html for details.
Exceptions:
Error
Interface Functions:
parse
"""
# Disable 'no-name-in-module', b/c pylint can't look into C extensions
# pylint: disable=E0611
import re
from pyeda.boolalg.espre... | bsd-2-clause | 2,750,904,232,134,338,600 | 26.210526 | 75 | 0.465909 | false |
watonyweng/horizon | openstack_dashboard/dashboards/project/images/images/urls.py | 65 | 1264 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 | -7,291,472,935,780,299,000 | 36.176471 | 78 | 0.718354 | false |
janeloveless/mechanics-of-exploration | neuromech/util.py | 1 | 11756 | #! /usr/bin/env python
import os
import itertools as it
import sys
import textwrap
#import gtk
import numpy as np
import sympy as sy
import sympy.stats
import odespy as ode
import matplotlib
import matplotlib.pyplot as plt
import sympy.physics.mechanics as mech
"""
Pretty plotting code.
"""
_all_spines = ["top", "r... | unlicense | 7,497,102,598,660,154,000 | 35.396285 | 116 | 0.544233 | false |
ms-iot/python | cpython/Lib/test/test_file.py | 83 | 11367 | import sys
import os
import unittest
from array import array
from weakref import proxy
import io
import _pyio as pyio
from test.support import TESTFN, run_unittest
from collections import UserList
class AutoFileTests:
# file tests for which a test file is automatically set up
def setUp(self):
self.f... | bsd-3-clause | 3,760,448,264,455,755,000 | 33.550152 | 79 | 0.512888 | false |
vv1133/home_web | django/contrib/gis/tests/relatedapp/tests.py | 58 | 14918 | from __future__ import absolute_import
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite
from django.test import TestCase
from django.utils.unittest import skipUnless
if HAS_GEOS:
from django.contrib.gis.db.mod... | bsd-3-clause | -6,670,540,781,343,956,000 | 47.911475 | 155 | 0.639362 | false |
google/contentbox | third_party/modeltranslation/manager.py | 5 | 13076 | # -*- coding: utf-8 -*-
"""
The idea of MultilingualManager is taken from
django-linguo by Zach Mathew
https://github.com/zmathew/django-linguo
"""
from django.db import models
from django.db.models import FieldDoesNotExist
from django.db.models.fields.related import RelatedField, RelatedObject
from django.db.models.s... | apache-2.0 | 5,549,695,872,246,741,000 | 38.267267 | 100 | 0.62282 | false |
payjp/payjp-python | payjp/test/helper.py | 1 | 3831 | import datetime
import json
import os
import random
import re
import string
import unittest
from mock import patch, Mock
from six import string_types
import payjp
NOW = datetime.datetime.now()
DUMMY_CARD = {
'number': '4242424242424242',
'exp_month': NOW.month,
'exp_year': NOW.year + 4
}
DUMMY_CHARGE ... | mit | 9,127,578,366,974,042,000 | 24.885135 | 106 | 0.623858 | false |
millaguie/Vernam | vernam/message.py | 1 | 4778 | # -*- coding: utf-8 -*-
"""
Message module holds all methods to work with message files
"""
import sys
import os
import array
from struct import pack
from struct import unpack
import uuid
import hashlib
import keymanagement
import yaml
import ownbase32
from util import hashSum
L2RHEADER = bytearray([222, 210, 7, 163, ... | bsd-3-clause | 4,168,946,275,354,322,000 | 32.412587 | 101 | 0.626831 | false |
dhruvagarwal/django | django/utils/_os.py | 502 | 3581 | from __future__ import unicode_literals
import os
import sys
import tempfile
from os.path import abspath, dirname, isabs, join, normcase, normpath, sep
from django.core.exceptions import SuspiciousFileOperation
from django.utils import six
from django.utils.encoding import force_text
if six.PY2:
fs_encoding = sy... | bsd-3-clause | 6,270,224,937,032,313,000 | 34.107843 | 81 | 0.677464 | false |
leejir/darkforce | juggle/codegen/deletenote.py | 3 | 1137 | # 2014-12-17
# build by qianqians
# deletenote
def deletenote(filestr):
genfilestr = []
count = 0
errornote = ""
for i in xrange(len(filestr)):
str = filestr[i]
while(1):
if count == 1:
indexafter = str.find("*/")
if indexafter is not -1:
... | gpl-3.0 | 7,870,676,413,077,104,000 | 24.840909 | 69 | 0.40985 | false |
Ivoz/pip | pip/_vendor/requests/packages/urllib3/util.py | 248 | 21407 | # urllib3/util.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
from base64 import b64encode
from binascii import hexlify, unhexlify
from collections import name... | mit | 4,341,497,358,461,269,500 | 32.035494 | 105 | 0.614332 | false |
mohamed--abdel-maksoud/chromium.src | mojo/public/third_party/jinja2/environment.py | 614 | 47244 | # -*- coding: utf-8 -*-
"""
jinja2.environment
~~~~~~~~~~~~~~~~~~
Provides a class that holds runtime and parsing time options.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from jinja2 import nodes
from jinja2.defaults import BLOCK_S... | bsd-3-clause | 7,780,591,161,596,931,000 | 38.667506 | 82 | 0.604881 | false |
R4stl1n/allianceauth | allianceauth/services/modules/smf/views.py | 5 | 5057 | import logging
from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_required
from django.shortcuts import render, redirect
from allianceauth.services.forms import ServicePasswordForm
from .manager import SmfManager
from .models import SmfUser
from .tasks import Smf... | gpl-2.0 | 1,110,023,437,999,826,400 | 45.394495 | 113 | 0.667985 | false |
pmoulon/TheiaSfM | docs/make_docs.py | 19 | 2872 | #!/usr/bin/python
#
# Ceres Solver - A fast non-linear least squares minimizer
# Copyright 2013 Google Inc. All rights reserved.
# http://code.google.com/p/ceres-solver/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#... | bsd-3-clause | -9,084,123,006,244,607,000 | 34.45679 | 79 | 0.731198 | false |
cloudify-cosmo/softlayer-python | SoftLayer/managers/sshkey.py | 5 | 2631 | """
SoftLayer.sshkey
~~~~~~~~~~~~~~~~
SSH Key Manager/helpers
:license: MIT, see LICENSE for more details.
"""
from SoftLayer import utils
class SshKeyManager(utils.IdentifierMixin, object):
"""Manages account SSH keys.
:param SoftLayer.API.Client client: an API client instance
"""
... | mit | -4,295,229,147,732,616,000 | 27.912088 | 74 | 0.582668 | false |
TheMOOCAgency/edx-platform | openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py | 7 | 16239 | """
Test the partitions and partitions service
"""
import json
from django.conf import settings
import django.test
from mock import patch
from nose.plugins.attrib import attr
from unittest import skipUnless
from courseware.masquerade import handle_ajax, setup_masquerade
from courseware.tests.test_masquerade import S... | agpl-3.0 | 7,696,015,459,569,116,000 | 38.13012 | 113 | 0.636985 | false |
coberger/DIRAC | DataManagementSystem/scripts/dirac-dms-show-se-status.py | 7 | 1713 | #!/usr/bin/env python
from DIRAC.Core.Base import Script
Script.setUsageMessage( """
Get status of the available Storage Elements
Usage:
%s [<options>]
""" % Script.scriptName )
Script.parseCommandLine()
import DIRAC
from DIRAC import gConfig,gLogger
from DIRAC.Resour... | gpl-3.0 | 1,564,461,439,718,285,800 | 29.589286 | 89 | 0.614711 | false |
nafraf/spreads | spreadsplug/intervaltrigger.py | 5 | 2788 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Johannes Baiter <johannes.baiter@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | agpl-3.0 | 3,905,821,402,085,475,300 | 34.74359 | 79 | 0.639885 | false |
alexalemi/battleship | players/util.py | 1 | 3217 | """
Author: Alex Alemi
Some utility routines for python players
"""
import logging
import socket
import os
import sys
from random import randrange
ship_sizes = {"A": 5, "B": 4, "D": 3, "S": 3, "P": 2}
def board_str(board):
""" Return the many lined string for a board """
boardstr = ""
for i in xrange(10):... | mit | -2,937,155,664,503,200,300 | 27.219298 | 69 | 0.535903 | false |
GorK-ChO/selenium | py/test/selenium/webdriver/chrome/chrome_network_emulation_tests.py | 29 | 1252 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -2,553,425,591,509,324,000 | 39.387097 | 62 | 0.742013 | false |
OpenPymeMx/account-financial-reporting | account_financial_report_webkit/report/partner_balance.py | 29 | 4238 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright Camptocamp SA 2011
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | agpl-3.0 | -8,863,846,583,735,864,000 | 40.960396 | 78 | 0.589429 | false |
itkinside/ufs | itkufs/common/views/display.py | 1 | 3418 | from operator import itemgetter
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.shortcuts import render
from itkufs.common.decorators import limit_to_group, limit_to_owner
from itkufs.accounting.models import Account, Group
@login_required
@limit_to_group
de... | gpl-2.0 | -8,872,298,342,209,795,000 | 27.722689 | 80 | 0.559391 | false |
bbbenja/SickRage | lib/sqlalchemy/dialects/oracle/zxjdbc.py | 79 | 7744 | # oracle/zxjdbc.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: oracle+zxjdbc
:name: zxJDBC for Jython
:dbapi: zxjdbc
:c... | gpl-3.0 | -1,441,098,352,703,462,700 | 34.522936 | 97 | 0.608471 | false |
sleepinghungry/wwif | students/simone/aiy yiy yiy.py | 1 | 1028 | Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> file
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
file
NameError: name 'file' is not defined
>>>
RESTART: Z:\Coding Cl... | mit | 4,861,723,265,608,576,000 | 41.833333 | 94 | 0.751946 | false |
ganxueliang88/idracserver | idrac/log_api.py | 3 | 2265 | # coding: utf-8
from argparse import ArgumentParser, FileType
from contextlib import closing
from io import open as copen
from json import dumps
from math import ceil
import re
from os.path import basename, dirname, exists, join
from struct import unpack
from subprocess import Popen
from sys import platform, prefix, ... | gpl-2.0 | -1,840,176,926,045,570,000 | 28.415584 | 100 | 0.640177 | false |
LIS/lis-tempest | tempest/tests/cmd/test_tempest_init.py | 3 | 4205 | # Copyright 2015 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 applicabl... | apache-2.0 | 1,012,579,020,108,612,700 | 42.802083 | 75 | 0.645898 | false |
Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/tools/metrics/histograms/update_bad_message_reasons.py | 31 | 1275 | # Copyright 2015 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.
"""Updates the various BadMessage enums in histograms.xml file with values read
from the corresponding bad_message.h files.
If the file was pretty-printed, ... | mit | 3,903,276,838,310,042,600 | 36.5 | 79 | 0.697255 | false |
autosportlabs/kivy | kivy/core/clipboard/__init__.py | 9 | 4563 | '''
Clipboard
=========
Core class for accessing the Clipboard. If we are not able to access the
system clipboard, a fake one will be used.
Usage example:
.. code-block:: kv
#:import Clipboard kivy.core.clipboard.Clipboard
Button:
on_release:
self.text = Clipboard.paste()
Cl... | mit | 2,617,446,477,459,466,000 | 28.063694 | 78 | 0.591059 | false |
abelfunctions/abelfunctions | examples/riemanntheta_demo.py | 2 | 8564 | """
Grady Williams
January 28, 2013
This module provides functions for displaying graphs of the Riemann-Theta
function. There are 12 different graphs that can be generated, 10 of them
correspond to the graphics shown on the Digital Library of Mathematical
Functions page for Riemann Theta (dlmf.nist.gov/21.4) and the ... | mit | -8,656,464,474,544,515,000 | 31.074906 | 95 | 0.579636 | false |
laurent-george/bokeh | examples/glyphs/data_tables.py | 41 | 3178 | from bokeh.io import vplot
from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid, Circle, HoverTool, BoxSelectTool
from bokeh.models.widgets import DataTable, TableColumn, StringFormatter, NumberFormatter, StringEditor, IntEditor, NumberEditor, SelectEditor
from bokeh.embed import file_html
fro... | bsd-3-clause | 7,155,318,669,208,179,000 | 45.735294 | 150 | 0.679673 | false |
Gabrielcarvfer/NS3 | src/bridge/bindings/modulegen__gcc_LP64.py | 4 | 283981 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | -2,653,983,618,763,929,000 | 63.234562 | 458 | 0.612375 | false |
viniciusgama/blog_gae | django/contrib/gis/gdal/prototypes/srs.py | 321 | 3378 | from ctypes import c_char_p, c_int, c_void_p, POINTER
from django.contrib.gis.gdal.libgdal import lgdal, std_call
from django.contrib.gis.gdal.prototypes.generation import \
const_string_output, double_output, int_output, \
srs_output, string_output, void_output
## Shortcut generation for routines with known p... | bsd-3-clause | 5,370,249,436,834,026,000 | 45.916667 | 112 | 0.736827 | false |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/social/backends/nk.py | 70 | 2723 | from urllib import urlencode
import six
from requests_oauthlib import OAuth1
from social.backends.oauth import BaseOAuth2
class NKOAuth2(BaseOAuth2):
"""NK OAuth authentication backend"""
name = 'nk'
AUTHORIZATION_URL = 'https://nk.pl/oauth2/login'
ACCESS_TOKEN_URL = 'https://nk.pl/oauth2/token'
... | agpl-3.0 | 4,359,600,533,709,399,600 | 35.797297 | 85 | 0.576937 | false |
Senseg/Py4A | python-modules/twisted/twisted/python/urlpath.py | 81 | 3431 | # -*- test-case-name: twisted.test.test_paths -*-
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
import urlparse
import urllib
class URLPath:
def __init__(self, scheme='', netloc='localhost', path='',
query='', fragment=''):
self.scheme = scheme or 'h... | apache-2.0 | 7,563,191,472,397,032,000 | 27.122951 | 83 | 0.498688 | false |
48thct2jtnf/P | contrib/linearize/linearize-hashes.py | 18 | 3037 | #!/usr/bin/python
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import pri... | mit | 216,618,072,909,147,650 | 25.876106 | 90 | 0.663813 | false |
RPGOne/Skynet | scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/examples/linear_model/plot_ridge_path.py | 254 | 1655 | """
===========================================================
Plot Ridge coefficients as a function of the regularization
===========================================================
Shows the effect of collinearity in the coefficients of an estimator.
.. currentmodule:: sklearn.linear_model
:class:`Ridge` Regressi... | bsd-3-clause | 6,326,107,182,332,831,000 | 27.050847 | 79 | 0.59577 | false |
wwfifi/uliweb | uliweb/orm/__init__.py | 1 | 148065 | # This module is used for wrapping SqlAlchemy to a simple ORM
# Author: limodou <limodou@gmail.com>
__all__ = ['Field', 'get_connection', 'Model', 'do_',
'set_debug_query', 'set_auto_create', 'set_auto_set_model',
'get_model', 'set_model', 'engine_manager',
'set_auto_transaction_in_web', 'set_auto_trans... | bsd-2-clause | 3,979,961,714,335,375,000 | 34.868459 | 179 | 0.552089 | 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.