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 |
|---|---|---|---|---|---|---|---|---|---|---|
hosseinmh/Django_learning | djmod/.venv/lib/python3.5/site-packages/setuptools/site-patch.py | 356 | 2307 | def __boot():
import sys
import os
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform == 'win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys, 'path_importer_cache', {})
stdpath = sys.pat... | mit | -7,169,448,315,799,882,000 | 30.175676 | 81 | 0.550065 | false |
eayunstack/horizon | openstack_dashboard/dashboards/identity/projects/workflows.py | 6 | 37160 | # 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 | 1,162,863,208,443,927,600 | 42.615023 | 79 | 0.523924 | false |
savi-dev/nova | nova/scheduler/chance.py | 6 | 4430 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack, LLC.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | apache-2.0 | 5,369,135,336,323,449,000 | 42.431373 | 79 | 0.595711 | false |
dasseclab/dasseclab | clones/routersploit/tests/exploits/routers/mikrotik/test_winbox_auth_bypass_creds_disclosure.py | 1 | 3375 | from routersploit.modules.exploits.routers.mikrotik.winbox_auth_bypass_creds_disclosure import Exploit
def test_check_success(tcp_target):
command_mock1 = tcp_target.get_command_mock(
b"\x68\x01\x00\x66\x4d\x32\x05\x00\xff\x01\x06\x00\xff\x09\x05\x07"
b"\x00\xff\x09\x07\x01\x00\x00\x21\x35\x2f\x2f... | gpl-2.0 | 680,103,342,078,552,800 | 52.571429 | 102 | 0.647704 | false |
dwks/silvius-backend | kaldigstserver/decoder2.py | 1 | 8962 | """
Created on May 17, 2013
@author: tanel
"""
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
GObject.threads_init()
Gst.init(None)
import logging
import thread
import os
logger = logging.getLogger(__name__)
import pdb
class DecoderPipeline2(object):
def __init__(self, conf=... | bsd-2-clause | -3,667,906,717,819,400,700 | 37.62931 | 106 | 0.625307 | false |
tklaus/ansible | lib/ansible/playbook/role/metadata.py | 80 | 3201 | # (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... | gpl-3.0 | -6,819,741,198,179,548,000 | 33.053191 | 160 | 0.676976 | false |
agiliq/nginx-python-buildpack | vendor/pip-1.5.4/pip/_vendor/html5lib/treebuilders/etree.py | 915 | 12621 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
import re
from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
tag_regexp = re.compile("{([^}]*)}(.*)")
def getETreeBu... | mit | 6,283,369,525,505,267,000 | 36.451039 | 85 | 0.509785 | false |
pdubroy/kurt | build/MacOS/PyInstaller/pyinstaller-svn-r812/Build.py | 1 | 42370 | #!/usr/bin/env python
#
# Build packages using spec files
#
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publishe... | gpl-2.0 | -168,800,585,230,335,500 | 35.244654 | 121 | 0.529785 | false |
gdi2290/django | django/contrib/gis/gdal/tests/test_driver.py | 335 | 1253 | import unittest
from django.contrib.gis.gdal import HAS_GDAL
if HAS_GDAL:
from django.contrib.gis.gdal import Driver, GDALException
valid_drivers = (
# vector
'ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', 'Memory', 'CSV',
'GML', 'KML',
# raster
'GTiff', 'JPEG', 'MEM', 'PNG',
)
in... | bsd-3-clause | -6,406,123,687,512,764,000 | 24.571429 | 77 | 0.60016 | false |
neumerance/cloudloon2 | .venv/lib/python2.7/site-packages/django/forms/extras/widgets.py | 110 | 5251 | """
Extra HTML Widget classes
"""
from __future__ import unicode_literals
import datetime
import re
from django.forms.widgets import Widget, Select
from django.utils import datetime_safe
from django.utils.dates import MONTHS
from django.utils.safestring import mark_safe
from django.utils.formats import get_format
fro... | apache-2.0 | 2,235,405,766,932,765,700 | 35.213793 | 90 | 0.546182 | false |
ismailsunni/healthsites | django_project/localities/tests/test_model_DomainArchive.py | 2 | 1095 | # -*- coding: utf-8 -*-
from django.test import TestCase
from .model_factories import DomainF
from ..models import DomainArchive
class TestModelDomainArchive(TestCase):
def test_domainArchive_fields(self):
self.assertListEqual(
[fld.name for fld in DomainArchive._meta.fields], [
... | bsd-2-clause | 1,310,634,890,075,636,200 | 26.375 | 75 | 0.582648 | false |
ltiao/networkx | networkx/algorithms/tests/test_distance_measures.py | 6 | 2145 | #!/usr/bin/env python
from nose.tools import *
import networkx
class TestDistance:
def setUp(self):
G=networkx.Graph()
from networkx import convert_node_labels_to_integers as cnlti
G=cnlti(networkx.grid_2d_graph(4,4),first_label=1,ordering="sorted")
self.G=G
def test_eccentric... | bsd-3-clause | 4,124,456,332,500,469,000 | 30.086957 | 100 | 0.61958 | false |
idea4bsd/idea4bsd | python/helpers/py2only/docutils/languages/cs.py | 148 | 1928 | # $Id: cs.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Marek Blaha <mb@dat.cz>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each l... | apache-2.0 | -6,255,073,848,322,778,000 | 31.133333 | 76 | 0.617739 | false |
cigroup-ol/metaopt | metaopt/tests/integration/optimizer/singleinvoke.py | 1 | 1233 | # -*- coding: utf-8 -*-
"""
Tests for the single invoke invoker.
"""
# Future
from __future__ import absolute_import, division, print_function, \
unicode_literals, with_statement
# Third Party
import nose
from mock import Mock
# First Party
from metaopt.concurrent.invoker.singleprocess import SingleProcessInvoker... | bsd-3-clause | -9,073,260,673,667,865,000 | 26.4 | 79 | 0.689376 | false |
SuperJohn/scikit-class | grid_search.py | 6 | 1243 | import pandas as pd
import numpy as np
df = pd.read_csv('tweets.csv')
target = df['is_there_an_emotion_directed_at_a_brand_or_product']
text = df['tweet_text']
fixed_text = text[pd.notnull(text)]
fixed_target = target[pd.notnull(text)]
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_b... | gpl-2.0 | 1,503,810,818,064,182,000 | 30.871795 | 69 | 0.695897 | false |
fnouama/intellij-community | python/helpers/pydev/pydev_monkey_qt.py | 47 | 5183 | from __future__ import nested_scopes
def set_trace_in_qt():
import pydevd_tracing
from pydevd_comm import GetGlobalDebugger
debugger = GetGlobalDebugger()
if debugger is not None:
pydevd_tracing.SetTrace(debugger.trace_dispatch)
_patched_qt = False
def patch_qt():
'''
... | apache-2.0 | 8,057,919,266,321,573,000 | 31.597484 | 105 | 0.580745 | false |
donnerluetjen/ardupilot | Tools/LogAnalyzer/tests/TestAutotune.py | 265 | 4748 | from LogAnalyzer import Test,TestResult
import DataflashLog
# from ArduCopter/defines.h
AUTOTUNE_INITIALISED = 30
AUTOTUNE_OFF = 31
AUTOTUNE_RESTART = 32
AUTOTUNE_SUCCESS = 33
AUTOTUNE_FAILED = 34
AUTOTUNE_REACHED_LIMIT = 35
AUTOTUNE_PILOT_TESTING = 36
AUTOTUN... | gpl-3.0 | -6,637,155,107,806,410,000 | 36.984 | 283 | 0.491575 | false |
radiasoft/radtrack | experimental/hermite/testHermite02.py | 1 | 6919 | #
# Test executable #2 to exercise the Gauss-Hermite class
# Here, we fit a Gauss-Hermite expansion to an arbitrary profile.
# The SciPy least squares method is used.
#
# Copyright (c) 2013 RadiaBeam Technologies. All rights reserved
#
# python imports
import math
# SciPy imports
import numpy as np
import matplotlib.p... | apache-2.0 | -6,552,313,150,934,767,000 | 30.45 | 92 | 0.636653 | false |
OpenFacetracker/facetracker-core | lib/youtube-dl/youtube_dl/extractor/shared.py | 31 | 1936 | from __future__ import unicode_literals
import re
import base64
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
int_or_none,
)
class SharedIE(InfoExtractor):
_VALID_URL = r'http://shared\.sx/(?P<id>[\da-... | gpl-2.0 | 649,525,378,515,909,100 | 29.730159 | 79 | 0.551136 | false |
ekwoodrich/nirha | nirhaweb/venv/lib/python2.7/site-packages/pip/req.py | 328 | 83557 | from email.parser import FeedParser
import os
import imp
import locale
import re
import sys
import shutil
import tempfile
import textwrap
import zipfile
from distutils.util import change_root
from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME,
write_delete... | apache-2.0 | 6,842,031,458,859,234,000 | 42.271362 | 184 | 0.532068 | false |
pgonda/servo | tests/wpt/css-tests/tools/pywebsocket/src/test/test_handshake_hybi.py | 413 | 22552 | #!/usr/bin/env python
#
# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | mpl-2.0 | -4,909,348,532,559,709,000 | 41.23221 | 79 | 0.636618 | false |
spanner888/madparts | coffee/library.py | 1 | 1940 | # (c) 2013 Joost Yervante Damad <joost@damad.be>
# License: GPL
import os, os.path, glob
import coffee.pycoffee as pycoffee
class Meta:
def __init__(self, meta):
if not 'desc' in meta:
meta['desc'] = ''
if not 'parent' in meta:
meta['parent'] = None
self.meta = meta
for k in meta:
... | gpl-3.0 | -8,598,978,038,622,864,000 | 29.3125 | 92 | 0.612887 | false |
martynovp/edx-platform | cms/djangoapps/contentstore/features/course-updates.py | 95 | 4707 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from selenium.webdriver.common.keys import Keys
from common import type_in_codemirror, get_codemirror_value
from nose.tools import assert_in # pylint: disable=no-name-in-module
@step(u'I go to the course updat... | agpl-3.0 | -2,502,510,750,937,288,000 | 29.564935 | 100 | 0.673678 | false |
taedla01/MissionPlanner | Lib/unittest/util.py | 60 | 4762 | """Various utility functions."""
from collections import namedtuple, OrderedDict
__unittest = True
_MAX_LENGTH = 80
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
retu... | gpl-3.0 | 1,211,435,173,391,829,500 | 28.525641 | 78 | 0.4958 | false |
aristotle-tek/cuny-bdif | AWS/ec2/lib/boto-2.34.0/boto/cloudfront/origin.py | 153 | 6060 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# w... | mit | -6,619,549,686,793,587,000 | 39.4 | 98 | 0.578548 | false |
xuxiao19910803/edx-platform | cms/djangoapps/contentstore/tests/test_clone_course.py | 147 | 6812 | """
Unit tests for cloning a course between the same and different module stores.
"""
import json
from django.conf import settings
from opaque_keys.edx.locator import CourseLocator
from xmodule.modulestore import ModuleStoreEnum, EdxJSONEncoder
from contentstore.tests.utils import CourseTestCase
from contentstore.task... | agpl-3.0 | -6,159,081,650,392,122,000 | 45.657534 | 136 | 0.655314 | false |
mephizzle/wagtail | wagtail/wagtailadmin/tests/test_account_management.py | 25 | 19261 | from __future__ import unicode_literals
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.core import mail
... | bsd-3-clause | 5,356,536,825,420,037,000 | 40.690476 | 129 | 0.667047 | false |
amisrs/angular-flask | angular_flask/lib/python2.7/site-packages/requests/packages/urllib3/_collections.py | 68 | 2903 | # urllib3/_collections.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 collections import MutableMapping
from threading import Lock
try: # Python 2.7+
... | mit | -4,805,558,773,128,745,000 | 29.882979 | 92 | 0.622804 | false |
vrenaville/project-service | project_stage_state/project.py | 3 | 1221 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Daniel Reis
#
# 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... | agpl-3.0 | -4,785,380,885,133,112,000 | 34.911765 | 78 | 0.593776 | false |
rmoorman/feedhq | feedhq/storage.py | 1 | 2371 | import tempfile
import os
import errno
from django.conf import settings
from django.core.files import locks
from django.core.files.move import file_move_safe
from django.utils.text import get_valid_filename
from django.core.files.storage import FileSystemStorage
class OverwritingStorage(FileSystemStorage):
"""
... | bsd-3-clause | -6,892,540,781,654,032,000 | 35.476923 | 75 | 0.567693 | false |
PhenomX1998/FRACTALX-OP3 | scripts/build-all.py | 162 | 14627 | #! /usr/bin/env python2
# Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# ... | gpl-2.0 | -5,473,670,827,612,744,000 | 33.335681 | 86 | 0.58016 | false |
ritviksahajpal/Py6S | Py6S/SixSHelpers/all_angles.py | 1 | 13499 | # This file is part of Py6S.
#
# Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file.
#
# Py6S is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | lgpl-3.0 | 589,351,517,914,651,600 | 41.05296 | 230 | 0.621009 | false |
Flamacue/pretix | src/tests/plugins/banktransfer/test_actions.py | 2 | 9548 | import json
from datetime import timedelta
import pytest
from django.utils.timezone import now
from pretix.base.models import (
Event, EventPermission, Item, Order, OrderPosition, Organizer, Quota, User,
)
from pretix.plugins.banktransfer.models import BankImportJob, BankTransaction
@pytest.fixture
def env():
... | apache-2.0 | 4,349,866,452,003,900,000 | 44.903846 | 120 | 0.619397 | false |
undefinedv/Jingubang | sqlmap/tamper/equaltolike.py | 2 | 1136 | #!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import os
import re
from lib.core.common import singleTimeWarnMessage
from lib.core.enums import DBMS
from lib.core.enums import PRIORITY
__priority__ = PRIORITY.HIGHEST
de... | gpl-3.0 | -8,846,319,924,585,905,000 | 25.418605 | 135 | 0.65493 | false |
tahnok/react-native | JSCLegacyProfiler/trace_data.py | 375 | 8013 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import re
import unittest
"""
# _-----=> irqs-off
# / _----=> need-resched
# | / _---... | bsd-3-clause | -2,721,583,562,912,352,000 | 31.840164 | 187 | 0.610383 | false |
nop33/indico-plugins | chat/indico_chat/controllers/event.py | 1 | 1645 | # This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | -3,176,928,040,759,831,600 | 42.289474 | 115 | 0.728267 | false |
sertac/django | tests/gis_tests/geo3d/tests.py | 199 | 17484 | from __future__ import unicode_literals
import os
import re
from unittest import skipUnless
from django.contrib.gis.db.models import Extent3D, Union
from django.contrib.gis.db.models.functions import (
AsGeoJSON, AsKML, Length, Perimeter, Scale, Translate,
)
from django.contrib.gis.gdal import HAS_GDAL
from djang... | bsd-3-clause | 7,048,294,840,285,388,000 | 42.064039 | 107 | 0.627431 | false |
KaranToor/MA450 | google-cloud-sdk/platform/gsutil/third_party/boto/boto/cloudsearch2/domain.py | 153 | 21247 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | apache-2.0 | 1,078,780,574,583,607,700 | 38.201107 | 79 | 0.609968 | false |
rigdenlab/SIMBAD | i2/SIMBAD_report.py | 1 | 7959 | """
SIMBAD_report.py: CCP4 GUI Project
This library is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
version 3, modified in accordance with the provisions of the
license to address the requirements of UK law.
... | bsd-3-clause | 6,299,607,690,489,702,000 | 39.815385 | 110 | 0.517653 | false |
Isendir/brython | www/src/Lib/xml/sax/expatreader.py | 870 | 14659 | """
SAX driver for the pyexpat C module. This driver works with
pyexpat.__version__ == '2.22'.
"""
version = "0.20"
from xml.sax._exceptions import *
from xml.sax.handler import feature_validation, feature_namespaces
from xml.sax.handler import feature_namespace_prefixes
from xml.sax.handler import feature_external_... | bsd-3-clause | 8,051,308,389,293,693,000 | 34.153477 | 79 | 0.601542 | false |
ericlink/adms-server | playframework-dist/play-1.1/python/Lib/compiler/syntax.py | 25 | 1490 | """Check for errs in the AST.
The Python parser does not catch all syntax errors. Others, like
assignments with invalid targets, are caught in the code generation
phase.
The compiler package catches some errors in the transformer module.
But it seems clearer to write checkers that use the AST to detect
error... | mit | -8,033,178,810,418,655,000 | 30.391304 | 79 | 0.608054 | false |
ESOedX/edx-platform | openedx/core/djangoapps/enrollments/errors.py | 75 | 1335 | """All Error Types pertaining to Enrollment."""
class CourseEnrollmentError(Exception):
"""Generic Course Enrollment Error.
Describes any error that may occur when reading or updating enrollment information for a user or a course.
"""
def __init__(self, msg, data=None):
super(CourseEnrollmen... | agpl-3.0 | -7,400,700,213,435,550,000 | 24.188679 | 110 | 0.734082 | false |
DmitryYurov/BornAgain | Tests/Functional/Python/PyCore/transform_cube.py | 2 | 7597 | """
Test of rotation/positioning of simple cubic particle. Original particle is compared with the one obtained
"""
from __future__ import print_function
import os, sys, unittest
import utils
from libBornAgainCore import *
class RotationsCubeTest(unittest.TestCase):
"""
Test of rotations and translations of ... | gpl-3.0 | -9,185,068,778,408,198,000 | 43.426901 | 137 | 0.533763 | false |
markYoungH/chromium.src | components/crash/tools/dmp2minidump.py | 129 | 1353 | #!/usr/bin/env python
# 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.
"""A tool to extract minidumps from dmp crash dumps."""
import os
import sys
from cgi import parse_multipart
def ProcessDump(dump_fi... | bsd-3-clause | -4,361,319,377,686,584,300 | 25.529412 | 75 | 0.678492 | false |
hdinsight/hue | desktop/core/ext-py/boto-2.38.0/boto/beanstalk/wrapper.py | 153 | 1078 | """Wraps layer1 api methods and converts layer1 dict responses to objects."""
from boto.beanstalk.layer1 import Layer1
import boto.beanstalk.response
from boto.exception import BotoServerError
import boto.beanstalk.exception as exception
def beanstalk_wrapper(func, name):
def _wrapped_low_level_api(*args, **kwarg... | apache-2.0 | 4,463,652,206,866,657,300 | 36.172414 | 88 | 0.655844 | false |
kiran/bart-sign | venv/lib/python2.7/site-packages/untangle.py | 2 | 4047 | #!/usr/bin/env python
"""
untangle
Converts xml to python objects.
The only method you need to call is parse()
Partially inspired by xml2obj
(http://code.activestate.com/recipes/149368-xml2obj/)
Author: Christian Stefanescu (http://0chris.com)
License: MIT License - http://www.opensource.org/licenses/mit-li... | mit | 4,501,389,996,569,703,400 | 25.801325 | 77 | 0.590067 | false |
auferack08/edx-platform | cms/djangoapps/contentstore/tests/test_permissions.py | 28 | 5759 | """
Test CRUD for authorization.
"""
import copy
from django.contrib.auth.models import User
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from contentstore.tests.utils import AjaxEnabledTestClient
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from contentstore.utils import re... | agpl-3.0 | -5,100,271,570,129,240,000 | 42.300752 | 116 | 0.611217 | false |
X-DataInitiative/tick | tick/survival/simu_sccs.py | 2 | 26354 | # License: BSD 3 clause
from operator import itemgetter
import numpy as np
import scipy.sparse as sps
from scipy.sparse import csr_matrix
from tick.base.simulation import Simu
from tick.hawkes import SimuHawkesExpKernels, SimuHawkesMulti
from tick.preprocessing import LongitudinalFeaturesLagger
from itertools import p... | bsd-3-clause | -8,178,844,875,369,164,000 | 38.334328 | 101 | 0.587463 | false |
spreeker/democracygame | external_apps/docutils-snapshot/test/test_parsers/test_rst/test_directives/test_decorations.py | 19 | 1847 | #! /usr/bin/env python
# $Id: test_decorations.py 4667 2006-07-12 21:40:56Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Tests for the "header" & "footer" directives.
"""
from __init__ import DocutilsTestSupport
def suite():
s = Docuti... | bsd-3-clause | 5,365,550,794,846,383,000 | 20.229885 | 74 | 0.566865 | false |
pxzhenren/flask | tests/test_views.py | 155 | 4202 | # -*- coding: utf-8 -*-
"""
tests.views
~~~~~~~~~~~
Pluggable views.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import pytest
import flask
import flask.views
from werkzeug.http import parse_set_header
def common_test(app):
c = app.test_client()... | bsd-3-clause | -1,334,914,678,959,628,300 | 24.938272 | 76 | 0.566397 | false |
Frulko/AutobahnPython | examples/wamp/rpc/keyvalue/client.py | 12 | 1841 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## ht... | apache-2.0 | -150,212,668,433,214,140 | 32.092593 | 103 | 0.62792 | false |
Godley/MuseParse | MuseParse/tests/testHandlers/testHandlePartsAndPiece.py | 1 | 8150 | import unittest
from MuseParse.classes.Input import MxmlParser
from MuseParse.classes.ObjectHierarchy.TreeClasses.PieceTree import PieceTree
class testSetupPiece(unittest.TestCase):
def setUp(self):
self.handler = MxmlParser.SetupPiece
self.tags = []
self.attrs = {}
self.chars = ... | mit | -6,637,512,166,481,366,000 | 36.385321 | 106 | 0.578037 | false |
areski/django | tests/inspectdb/models.py | 208 | 2737 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class People(models.Model):
name = models.CharField(max_length=255)
parent = models.ForeignKey('self', models.CASCADE)
class Message(models.Model):
from_field = models.ForeignKey(People, models.CASCADE, db_co... | bsd-3-clause | 4,449,508,348,190,260,700 | 34.532468 | 80 | 0.71345 | false |
jorik041/phantomjs | src/qt/qtbase/util/local_database/cldr2qlocalexml.py | 102 | 42691 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
## Contact: http://www.qt-project.org/legal
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License... | bsd-3-clause | -470,703,937,720,312,640 | 51.639951 | 155 | 0.607341 | false |
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools | third_party/pylint/lint.py | 46 | 56500 | # Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... | bsd-3-clause | -3,678,381,702,746,857,000 | 41.385596 | 115 | 0.540035 | false |
onceuponatimeforever/oh-mainline | vendor/packages/docutils/test/test_parsers/test_rst/test_directives/test_figures.py | 16 | 7300 | #! /usr/bin/env python
# $Id: test_figures.py 7062 2011-06-30 22:14:29Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Tests for images.py figure directives.
"""
from __init__ import DocutilsTestSupport
def suite():
s = DocutilsTestSupport... | agpl-3.0 | 128,939,058,580,258,200 | 23.914676 | 120 | 0.483425 | false |
l00py/KML_Lookup | TA-KML_lookup/bin/shapely/topology.py | 18 | 2257 | """
Intermediaries supporting GEOS topological operations
These methods all take Shapely geometries and other Python objects and delegate
to GEOS functions via ctypes.
These methods return ctypes objects that should be recast by the caller.
"""
from ctypes import byref, c_double
from shapely.geos import TopologicalE... | mit | -7,080,651,286,775,177,000 | 27.935897 | 79 | 0.618963 | false |
foreni-packages/golismero | thirdparty_libs/django/conf/locale/lt/formats.py | 104 | 1503 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y \m. E j \d.'
TIME_FORMAT = 'H:... | gpl-2.0 | -312,388,779,386,148,100 | 34.785714 | 80 | 0.526281 | false |
uclouvain/osis_louvain | base/business/education_groups/postponement.py | 1 | 7431 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 5,487,079,154,868,688,000 | 41.457143 | 115 | 0.656393 | false |
wogsland/QSTK | build/lib.linux-x86_64-2.7/QSTK/qstkfeat/classes.py | 8 | 1658 | '''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on Nov 7, 2011
@author: John Cornwell
@contact: JohnWCornwellV@gmail.com
@summary: File containing various c... | bsd-3-clause | -710,117,080,440,805,200 | 29.703704 | 78 | 0.572376 | false |
Gui13/CouchPotatoServer | libs/subliminal/core.py | 46 | 12840 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | gpl-3.0 | -6,847,397,580,241,625,000 | 45.690909 | 175 | 0.671651 | false |
ioram7/keystone-federado-pgid2013 | build/paste/paste/util/ip4.py | 27 | 9271 | # -*- coding: iso-8859-15 -*-
"""IP4 address range set implementation.
Implements an IPv4-range type.
Copyright (C) 2006, Heiko Wundram.
Released under the MIT-license.
"""
# Version information
# -------------------
__author__ = "Heiko Wundram <me@modelnine.org>"
__version__ = "0.2"
__revision__ = "3"
__date__ = "... | apache-2.0 | 4,442,647,899,851,012,600 | 32.959707 | 79 | 0.520764 | false |
Lujeni/ansible | lib/ansible/inventory/manager.py | 4 | 24970 | # (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 | -5,601,324,338,152,402,000 | 38.384858 | 148 | 0.580096 | false |
evansd/django | django/conf/locale/cs/formats.py | 65 | 1635 | # 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 = 'j. E Y'
TIME_FORMAT = 'G:i'
DATETIME_FORMAT = 'j. E Y G:i'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMA... | bsd-3-clause | -6,390,870,274,618,545,000 | 37.928571 | 77 | 0.523547 | false |
AICP/external_chromium_org | tools/win/split_link/install_split_link.py | 146 | 3104 | # Copyright (c) 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 _winreg
import os
import shutil
import subprocess
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def IsExe(fpath):
return ... | bsd-3-clause | 6,032,807,087,503,230,000 | 30.04 | 80 | 0.611147 | false |
imsparsh/python-for-android | python-build/python-libs/gdata/src/gdata/tlslite/errors.py | 333 | 5795 | """Exception classes.
@sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert,
TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError,
TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError
"""
from constants import AlertDescription, AlertLevel
class ... | apache-2.0 | -6,756,249,802,120,865,000 | 37.892617 | 78 | 0.716652 | false |
meduz/scikit-learn | examples/linear_model/plot_ransac.py | 73 | 1859 | """
===========================================
Robust linear model estimation using RANSAC
===========================================
In this example we see how to robustly fit a linear model to faulty data using
the RANSAC algorithm.
"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn import ... | bsd-3-clause | -2,685,503,581,709,986,300 | 31.051724 | 78 | 0.65035 | false |
sandeepraju/git-talk | cli.py | 1 | 1686 | import argparse
import os
from gittalk import GitTalk
from gittalk.utils import which, make_sure_path_exists
def run():
"""
`run` drives the command line interface for Git Talk.
It exposes a command line interface through which users
can interact with Git Talk to configure or invoke various
funct... | bsd-3-clause | 1,389,969,434,073,118,700 | 30.811321 | 98 | 0.616251 | false |
jimi-c/ansible | lib/ansible/plugins/action/add_host.py | 49 | 3384 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright 2012, Seth Vidal <skvidal@fedoraproject.org>
#
# 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, ... | gpl-3.0 | -4,637,411,742,304,762,000 | 35.387097 | 114 | 0.641253 | false |
eliangidoni/rethinkdb | test/regression/issue_4383.py | 12 | 4815 | #!/usr/bin/env python
# Copyright 2015-2016 RethinkDB, all rights reserved.
'''Test that a backfill will resume after restarting a cluster'''
import os, pprint, sys, time
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, scenario_common, utils, vcoptpa... | agpl-3.0 | -6,407,156,258,282,020,000 | 41.610619 | 182 | 0.637591 | false |
prculley/gramps | gramps/gen/filters/rules/person/_matchidof.py | 4 | 1777 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... | gpl-2.0 | 4,904,196,178,665,654,000 | 34.54 | 79 | 0.527856 | false |
optima-ict/odoo | openerp/workflow/service.py | 50 | 4084 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from helpers import Session
from helpers import Record
from openerp.workflow.instance import WorkflowInstance
# import instance
class WorkflowService(object):
CACHE = {}
@classmethod
def clear_cache(cls, d... | agpl-3.0 | -3,959,377,991,663,151,000 | 41.541667 | 146 | 0.620715 | false |
lukas-krecan/tensorflow | tensorflow/python/summary/event_accumulator_test.py | 2 | 21287 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 969,499,024,860,666,100 | 37.424188 | 80 | 0.634425 | false |
nenel83/fuzzy-avenger | src/ibmiotf/device.py | 2 | 6759 | # *****************************************************************************
# Copyright (c) 2014 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution,... | epl-1.0 | 18,999,335,720,013,590 | 35.733696 | 176 | 0.70617 | false |
sunzhxjs/JobGIS | lib/python2.7/site-packages/jinja2/nodes.py | 342 | 28954 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | mit | -570,928,503,058,687,740 | 30.505985 | 81 | 0.600539 | false |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/IPython/utils/tests/test_traitlets.py | 2 | 29996 | # encoding: utf-8
"""
Tests for IPython.utils.traitlets.
Authors:
* Brian Granger
* Enthought, Inc. Some of the code in this file comes from enthought.traits
and is licensed under the BSD license. Also, many of the ideas also come
from enthought.traits even though our implementation is very different.
"""
#---... | gpl-3.0 | -5,250,593,033,654,834,000 | 26.383562 | 88 | 0.520193 | false |
pakal/django-recurly | django_recurly/handlers.py | 1 | 3931 | """
Push notifications are not meant to be actionable and should not be used for
critical account functions like provisioning accounts. Use the receipt of a
push notification to trigger an API query, validating both the push
notification action and the details of the action.
http://docs.recurly.com/push-notifications
... | bsd-3-clause | -1,967,348,816,661,633,800 | 35.738318 | 80 | 0.752226 | false |
kustodian/ansible-modules-core | windows/win_msi.py | 68 | 1736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Matt Martz <matt@sivel.net>, and others
#
# 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 t... | gpl-3.0 | -2,217,112,990,770,587,000 | 28.931034 | 78 | 0.682604 | false |
unaizalakain/django | tests/invalid_models_tests/test_backend_specific.py | 191 | 1024 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.core.checks import Error
from django.db import connections, models
from django.test import mock
from .base import IsolatedModelsTestCase
def dummy_allow_migrate(db, app_label, **hints):
# Prevent checks from being run on the 'other' d... | bsd-3-clause | -7,799,513,931,742,926,000 | 32.032258 | 103 | 0.685547 | false |
ahmadia/bokeh | bokeh/server/views/backbone.py | 29 | 11075 | from __future__ import absolute_import
import logging
log = logging.getLogger(__name__)
from flask import request, jsonify
from bokeh import protocol
from .bbauth import (
handle_auth_error
)
from ..app import bokeh_app
from ..crossdomain import crossdomain
from ..serverbb import get_temporary_docid, BokehServe... | bsd-3-clause | 8,666,370,358,181,657,000 | 35.672185 | 93 | 0.674853 | false |
google/mysql-protobuf | storage/ndb/mcc/tst/unittest2/runner.py | 164 | 6757 | """Running tests"""
import sys
import time
import unittest
from unittest2 import result
try:
from unittest2.signals import registerResult
except ImportError:
def registerResult(_):
pass
__unittest = True
class _WritelnDecorator(object):
"""Used to decorate file-like objects with a handy 'w... | gpl-2.0 | 3,919,053,085,546,482,000 | 31.800971 | 80 | 0.584283 | false |
dstiert/Wox | PythonHome/Lib/site-packages/pip/_vendor/requests/__init__.py | 327 | 1856 | # -*- 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('http://python.org')
>>> r.sta... | mit | -4,502,144,626,769,838,600 | 23.103896 | 77 | 0.631466 | false |
felipenaselva/repo.felipe | plugin.video.salts/scrapers/couchtunerv1_scraper.py | 1 | 4132 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | 7,472,876,776,667,992,000 | 40.737374 | 207 | 0.572604 | false |
sethkontny/blaze | blaze/data/tests/test_usability.py | 1 | 2230 | from unittest import TestCase
import os
from tempfile import mktemp
import gzip
from blaze.utils import filetext, filetexts, tmpfile
from blaze.data import *
from blaze.py2help import skip
class TestResource(TestCase):
def setUp(self):
self.filename = mktemp()
def tearDown(self):
if os.path.e... | bsd-3-clause | -749,344,270,761,291,500 | 34.967742 | 77 | 0.529148 | false |
chainer/chainer | chainer/training/extension.py | 8 | 6662 | from chainer.utils import argument
PRIORITY_WRITER = 300
PRIORITY_EDITOR = 200
PRIORITY_READER = 100
class Extension(object):
"""Base class of trainer extensions.
Extension of :class:`Trainer` is a callable object that takes the trainer
object as the argument. It also provides some default configurati... | mit | 4,676,938,823,934,928,000 | 36.852273 | 79 | 0.669168 | false |
The-end-novel/Freedom-Web | app/main/views.py | 1 | 9447 | from flask import render_template, redirect, url_for, abort, flash, request,\
current_app, make_response
from flask_login import login_required, current_user
from . import main
from .forms import EditProfileForm, EditProfileAdminForm, PostForm,\
CommentForm
from .. import db
from ..models import Permission, Rol... | mit | -5,424,992,443,400,326,000 | 36.339921 | 78 | 0.643379 | false |
nmercier/linux-cross-gcc | linux/lib/python2.7/lib-tk/Tkconstants.py | 375 | 1493 | # Symbolic constants for Tk
# Booleans
NO=FALSE=OFF=0
YES=TRUE=ON=1
# -anchor and -sticky
N='n'
S='s'
W='w'
E='e'
NW='nw'
SW='sw'
NE='ne'
SE='se'
NS='ns'
EW='ew'
NSEW='nsew'
CENTER='center'
# -fill
NONE='none'
X='x'
Y='y'
BOTH='both'
# -side
LEFT='left'
TOP='top'
RIGHT='right'
BOTTOM='bottom'
# -relief
RAISED='rai... | bsd-3-clause | -2,589,145,399,336,889,000 | 12.572727 | 42 | 0.711989 | false |
mrooney/metakv | website/metakv/test_helpers.py | 1 | 3165 | from django.utils import unittest
import django.test
from django.test.client import Client
from lxml import html
from cssselect import HTMLTranslator
class NotOkay(Exception):
def __init__(self, response):
Exception.__init__(self, "%r: %r" % (response.status_code, response))
self.response = respon... | mit | -7,697,701,449,717,117,000 | 35.37931 | 113 | 0.603476 | false |
40223226/2015cdbg80420 | static/Brython3.1.1-20150328-091302/Lib/_thread.py | 740 | 4879 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import _thread
except ImportError:
import _dummy_thread as _thread
"""
# Exports ... | gpl-3.0 | -8,655,068,441,595,852,000 | 30.483871 | 86 | 0.651363 | false |
perimosocordiae/scipy | scipy/signal/tests/test_savitzky_golay.py | 21 | 10203 | import numpy as np
from numpy.testing import (assert_allclose, assert_equal,
assert_almost_equal, assert_array_equal,
assert_array_almost_equal)
from scipy.ndimage import convolve1d
from scipy.signal import savgol_coeffs, savgol_filter
from scipy.signal._savitzky_... | bsd-3-clause | -4,873,323,042,120,880,000 | 32.89701 | 77 | 0.555915 | false |
strobo-inc/pc-nrfutil | nordicsemi/utility/tests/__init__.py | 7 | 1579 | # Copyright (c) 2015, Nordic Semiconductor
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions ... | bsd-3-clause | 5,783,532,005,324,216,000 | 53.448276 | 80 | 0.784041 | false |
jinzo27/infoGrabr | lib/cpp/scons/scons-local-2.0.0.final.0/SCons/__init__.py | 34 | 1629 | """SCons
The main package for the SCons software construction utility.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "S... | mit | 2,683,697,884,442,261,500 | 32.244898 | 95 | 0.740331 | false |
stormbeard/pyvmomi-community-samples | samples/create_snapshot.py | 11 | 2756 | # Copyright 2015 Michael Rice <michael@michaelrice.org>
#
# 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 app... | apache-2.0 | 7,761,043,029,955,407,000 | 31.423529 | 78 | 0.643687 | false |
trustedanalytics/platform-appstack | env_vars_fetcher/cdh_utilities.py | 1 | 15698 | try:
from sshtunnel import SSHTunnelForwarder
except ImportError:
from sshtunnel.sshtunnel import SSHTunnelForwarder
from cm_api.api_client import ApiResource, ApiException
from cm_api.endpoints.services import ApiService, ApiServiceSetupInfo
import paramiko
import json
import yaml
import requests
import subpro... | apache-2.0 | 1,212,905,699,057,743,400 | 53.318339 | 175 | 0.636005 | false |
richard-willowit/odoo | addons/l10n_fr_hr_payroll/report/fiche_paye.py | 14 | 1711 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class FichePayeParser(models.AbstractModel):
_name = 'report.l10n_fr_hr_payroll.report_l10n_fr_fiche_paye'
def get_payslip_lines(self, objs):
res = []
ids = []
... | gpl-3.0 | -2,913,185,774,306,629,600 | 37.886364 | 160 | 0.575687 | false |
BT-ojossen/odoo | addons/mail/mail_group_menu.py | 334 | 2631 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 810,033,660,480,252,000 | 45.157895 | 97 | 0.569745 | false |
synergeticsedx/deployment-wipro | lms/djangoapps/commerce/api/v1/views.py | 60 | 2633 | """ API v1 views. """
import logging
from django.http import Http404
from edx_rest_api_client import exceptions
from rest_framework.authentication import SessionAuthentication
from rest_framework.views import APIView
from rest_framework.generics import RetrieveUpdateAPIView, ListAPIView
from rest_framework.permissions... | agpl-3.0 | -2,213,388,010,154,755,300 | 34.106667 | 97 | 0.731865 | false |
tombstone/models | research/fivo/fivo/models/base.py | 4 | 14517 | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -8,618,805,646,749,898,000 | 41.447368 | 80 | 0.68871 | false |
rhdedgar/openshift-tools | openshift/installer/vendored/openshift-ansible-3.6.173/roles/lib_openshift/src/class/oc_serviceaccount_secret.py | 66 | 4640 | # pylint: skip-file
# flake8: noqa
class OCServiceAccountSecret(OpenShiftCLI):
''' Class to wrap the oc command line tools '''
kind = 'sa'
def __init__(self, config, verbose=False):
''' Constructor for OpenshiftOC '''
super(OCServiceAccountSecret, self).__init__(config.namespace, kubeconfi... | apache-2.0 | 8,433,338,444,175,442,000 | 32.623188 | 119 | 0.531466 | false |
toontownfunserver/Panda3D-1.9.0 | direct/leveleditor/AnimMgrBase.py | 3 | 17489 | """
Defines AnimMgrBase
"""
import os, wx, math
from direct.interval.IntervalGlobal import *
from panda3d.core import VBase3,VBase4
import ObjectGlobals as OG
import AnimGlobals as AG
class AnimMgrBase:
""" AnimMgr will create, manage, update animations in the scene """
def __init__(self, editor):
... | bsd-3-clause | -8,185,697,550,575,294,000 | 46.656676 | 354 | 0.547944 | 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.