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 |
|---|---|---|---|---|---|---|---|---|---|---|
ProfessionalIT/professionalit-webiste | sdk/google_appengine/google/appengine/ext/mapreduce/api/map_job/map_job_config.py | 10 | 6778 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | lgpl-3.0 | -4,056,025,563,831,020,000 | 28.72807 | 78 | 0.658896 | false |
pilou-/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py | 54 | 6486 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -5,008,692,597,655,375,000 | 30.033493 | 127 | 0.575856 | false |
unix1986/scons | engine/SCons/Tool/sunf90.py | 9 | 2127 | """SCons.Tool.sunf90
Tool-specific initialization for sunf90, the Sun Studio F90 compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is... | mit | 3,689,564,681,288,953,300 | 32.234375 | 75 | 0.732017 | false |
ecoal95/servo | tests/wpt/update/tree.py | 20 | 7753 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from distutils.spawn import find_executable
import re
import subprocess
import sys
import tempfile
from wptrunner impo... | mpl-2.0 | -8,162,124,444,462,167,000 | 36.095694 | 109 | 0.586354 | false |
sebrandon1/nova | nova/tests/unit/api/openstack/compute/test_availability_zone.py | 3 | 13714 | # Copyright 2012 IBM Corp.
#
# 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 t... | apache-2.0 | -6,737,270,874,809,953,000 | 41.196923 | 79 | 0.548636 | false |
Bounti/avatar-python | avatar/tests/test_configuration.py | 1 | 3055 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from avatar.configuration.configurationFactory import ConfigurationFactory
from avatar.system impor... | apache-2.0 | -2,162,310,891,302,490,400 | 29.858586 | 104 | 0.523404 | false |
acq4/acq4 | acq4/devices/DAQGeneric/DOChannelTemplate.py | 3 | 5794 | # -*- coding: utf-8 -*-
from __future__ import print_function
# Form implementation generated from reading ui file 'DOChannelTemplate.ui'
#
# Created: Sun Feb 22 13:29:09 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_... | mit | 4,504,421,565,286,832,600 | 42.56391 | 96 | 0.687608 | false |
santoshsahoo/filesync-server | src/backends/filesync/data/tests/test_services.py | 6 | 7010 | # Copyright 2008-2015 Canonical
#
# 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 option) any later version.
#
# This program is distributed... | agpl-3.0 | -573,557,076,008,766,200 | 42.271605 | 79 | 0.648787 | false |
PourroyJean/performance_modelisation | script/data visualisation/venv/lib/python3.6/site-packages/pip/wheel.py | 338 | 32010 | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import functools
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from ba... | gpl-3.0 | -1,969,707,610,205,007,000 | 36.526377 | 79 | 0.574883 | false |
fgesora/odoo | addons/account_analytic_plans/report/__init__.py | 445 | 1084 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | -5,780,951,125,723,360,000 | 42.36 | 79 | 0.612546 | false |
ingo-m/py_pRF_mapping | pyprf/analysis/model_creation_timecourses_par.py | 2 | 7380 | # -*- coding: utf-8 -*-
"""Parallelisation function for crt_prf_tcmdl."""
# Part of py_pRF_mapping library
# Copyright (C) 2016 Ingo Marquardt
#
# 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,... | gpl-3.0 | 6,398,607,155,906,215,000 | 34.142857 | 79 | 0.627778 | false |
RK905/pokedex-1 | pokedex/db/util.py | 4 | 3883 | """Helpers for common ways to work with pokedex queries
These include identifier- and name-based lookup, filtering out base forms
of pokemon, and filtering/ordering by name.
"""
from sqlalchemy.orm import aliased
from sqlalchemy.sql.expression import func
from sqlalchemy.sql.functions import coalesce
from sqlalchemy.... | mit | 4,666,005,619,585,859,000 | 34.3 | 84 | 0.678599 | false |
alangwansui/mtl_ordercenter | openerp/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py | 51 | 2418 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 | -7,148,062,785,133,204,000 | 35.636364 | 132 | 0.591811 | false |
rlizana/l10n-spain | l10n_es_aeat_mod340/__init__.py | 3 | 1249 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 20011 Ting (http://www.ting.es)
# Copyright (c) 2011-2013 Acysos S.L. (http://acysos.com)
# Ignacio Ibeas Izquierdo <ignacio@... | agpl-3.0 | -4,423,908,397,179,833,300 | 42.068966 | 78 | 0.618895 | false |
shakamunyi/neutron | neutron/plugins/ml2/drivers/arista/exceptions.py | 23 | 1036 | # Copyright (c) 2013 OpenStack Foundation
#
# 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 ... | apache-2.0 | 866,278,226,525,375,000 | 28.6 | 69 | 0.750965 | false |
benoitsteiner/tensorflow | tensorflow/contrib/keras/api/keras/callbacks/__init__.py | 30 | 1766 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,139,359,030,901,395,500 | 48.055556 | 81 | 0.785957 | false |
MurpheyLab/trep | examples/dual_pendulums.py | 1 | 1282 | import trep
from trep import tx,ty,tz,rx,ry,rz
import time
import trep.visual as visual
dt = 0.01
tf = 10.0
def simulate_system(system):
# Now we'll extract the current configuration into a tuple to use as
# initial conditions for a variational integrator.
q0 = system.q
# Create and initialize the va... | gpl-3.0 | -5,398,084,173,637,677,000 | 23.653846 | 72 | 0.624805 | false |
crmccreary/openerp_server | openerp/service/netrpc_server.py | 14 | 6163 | # -*- coding: utf-8 -*-
#
# Copyright P. Christeas <p_christ@hol.gr> 2008,2009
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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 F... | agpl-3.0 | -6,396,797,754,713,192,000 | 35.904192 | 95 | 0.577316 | false |
berr/stagger | test/specs.py | 16 | 23395 | #!/usr/bin/env python3
#
# specs.py
# From the stagger project: http://code.google.com/p/stagger/
#
# Copyright (c) 2009-2011 Karoly Lorentey <karoly@lorentey.hu>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following con... | bsd-2-clause | -4,594,603,478,109,644,300 | 43.990385 | 104 | 0.609318 | false |
RubenKelevra/rethinkdb | test/regression/issue_852.py | 36 | 3132 | #!/usr/bin/env python
# Copyright 2010-2014 RethinkDB, all rights reserved.
from __future__ import print_function
import sys, os, time
startTime = time.time()
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, rdb_workload_common, scenario_common, util... | agpl-3.0 | 5,379,628,485,372,741,000 | 40.76 | 159 | 0.661558 | false |
AkademieOlympia/sympy | sympy/geometry/line3d.py | 55 | 40385 | """Line-like geometrical entities.
Contains
========
LinearEntity3D
Line3D
Ray3D
Segment3D
"""
from __future__ import division, print_function
from sympy.core import Dummy, S, nan
from sympy.functions.elementary.trigonometric import acos
from sympy.simplify.simplify import simplify
from sympy.solvers.solveset import... | bsd-3-clause | 2,808,228,251,791,317,500 | 26.528971 | 84 | 0.489662 | false |
windyuuy/opera | chromium/src/third_party/protobuf/python/google/protobuf/service.py | 590 | 9131 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause | -5,647,775,220,123,876,000 | 39.402655 | 79 | 0.74384 | false |
Xperia-Nicki/android_platform_sony_nicki | external/webkit/LayoutTests/http/tests/websocket/tests/hybi/protocol-test_wsh.py | 108 | 1907 | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | apache-2.0 | 6,640,659,295,397,242,000 | 42.340909 | 72 | 0.758783 | false |
VillageAlliance/django-cms | cms/forms/utils.py | 2 | 3495 | # -*- coding: utf-8 -*-
from cms.models import Page
from cms.models.titlemodels import Title
from cms.utils import i18n
from collections import defaultdict
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.db.models.signals import post_save, po... | bsd-3-clause | 8,971,604,213,670,602,000 | 35.416667 | 77 | 0.670672 | false |
pauloschilling/sentry | src/sentry/web/forms/invite_organization_member.py | 22 | 1583 | from __future__ import absolute_import
from django import forms
from django.db import transaction, IntegrityError
from sentry.models import (
AuditLogEntry, AuditLogEntryEvent, OrganizationMember,
OrganizationMemberType
)
class InviteOrganizationMemberForm(forms.ModelForm):
class Meta:
fields = ... | bsd-3-clause | -3,961,896,908,881,814,500 | 28.314815 | 73 | 0.611497 | false |
thatchristoph/namebench | namebench.py | 171 | 2390 | #!/usr/bin/env python
# Copyright 2009 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... | apache-2.0 | 8,967,273,126,083,866,000 | 31.739726 | 98 | 0.686192 | false |
p0psicles/SickRage | lib/sqlalchemy/sql/expression.py | 78 | 5624 | # sql/expression.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
"""Defines the public namespace for SQL expression constructs.
Prior to version 0.9... | gpl-3.0 | 7,187,580,802,345,070,000 | 43.283465 | 97 | 0.744844 | false |
gitromand/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/user_unittest.py | 124 | 7300 | # Copyright (C) 2010 Research in Motion Ltd. 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 conditio... | bsd-3-clause | 2,892,232,867,464,070,700 | 51.517986 | 141 | 0.623151 | false |
tomasreimers/tensorflow-emscripten | tensorflow/python/saved_model/tag_constants.py | 70 | 1120 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 671,662,704,167,744,400 | 30.111111 | 80 | 0.689286 | false |
IEMLdev/ieml-api | ieml/dictionary/script/script.py | 2 | 23759 | import itertools
import numpy as np
from ieml.exceptions import InvalidScriptCharacter, InvalidScript, IncompatiblesScriptsLayers, TooManySingularSequences
from ieml.commons import TreeStructure, DecoratedComponent
from ieml.constants import MAX_LAYER, MAX_SINGULAR_SEQUENCES, MAX_SIZE_HEADER, LAYER_MARKS, PRIMITIVES, ... | gpl-3.0 | -7,907,558,472,729,917,000 | 37.444984 | 173 | 0.581253 | false |
pk400/catering | catering/migrations/0001_initial.py | 1 | 1048 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-22 21:44
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depende... | mit | -2,262,911,701,021,400,600 | 32.806452 | 120 | 0.624046 | false |
sinbazhou/odoo | addons/crm_profiling/crm_profiling.py | 333 | 10527 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -8,842,354,336,528,042,000 | 34.853242 | 157 | 0.575155 | false |
alfayez/gnuradio | gr-digital/python/qa_lms_equalizer.py | 16 | 1728 | #!/usr/bin/env python
#
# Copyright 2006,2007,2010,2011 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 (a... | gpl-3.0 | -4,562,952,311,232,358,000 | 31.603774 | 71 | 0.708333 | false |
ChonchoFronto/sarah | lambda/numpy/tests/test_ctypeslib.py | 87 | 4097 | from __future__ import division, absolute_import, print_function
import sys
import numpy as np
from numpy.ctypeslib import ndpointer, load_library
from numpy.distutils.misc_util import get_shared_lib_extension
from numpy.testing import TestCase, run_module_suite, dec
try:
cdll = load_library('multiarray', np.cor... | mit | 1,620,436,639,739,534,300 | 37.650943 | 78 | 0.579692 | false |
fusionbox/satchless | satchless/order/forms.py | 1 | 2605 | from django import forms
from django.forms.models import modelformset_factory
from django.utils.translation import ugettext_lazy as _
from . import handler
from . import models
class DeliveryMethodForm(forms.ModelForm):
delivery_type = forms.ChoiceField(label=_('Delivery method'), choices=[])
class Meta:
... | bsd-3-clause | 1,070,999,297,574,260,600 | 35.180556 | 80 | 0.639923 | false |
Antiun/odoo | addons/mrp/wizard/change_production_qty.py | 245 | 4852 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,561,122,955,792,444,000 | 46.568627 | 130 | 0.59089 | false |
adoosii/edx-platform | lms/djangoapps/dashboard/views.py | 131 | 3337 | """View functions for the LMS Student dashboard"""
from django.http import Http404
from edxmako.shortcuts import render_to_response
from django.db import connection
from student.models import CourseEnrollment
from django.contrib.auth.models import User
def dictfetchall(cursor):
'''Returns a list of all rows from... | agpl-3.0 | 1,810,198,325,442,337,500 | 37.356322 | 117 | 0.689542 | false |
lerouxb/ni | core/tokenizer.py | 1 | 7558 | import os
import bisect
from pygments.token import Token
from pygments.lexers import get_lexer_by_name, get_lexer_for_filename, \
ClassNotFound
# TODO: these really have to be moved to another file and it should be made
# to be pluggable
def isbacktracetoken_default(ttype, tvalue):
return not ttype in Token.... | mit | -3,365,469,683,975,893,500 | 36.231527 | 78 | 0.523816 | false |
mozilla/kuma | kuma/api/management/commands/unpublish.py | 1 | 1264 | """
Manually schedule the removal of one or more documents from the document API.
"""
from collections import namedtuple
from django.core.management.base import BaseCommand, CommandError
from kuma.api.tasks import unpublish
class Command(BaseCommand):
args = '<document_path document_path ...>'
help = 'Rem... | mpl-2.0 | 5,427,712,416,615,255,000 | 31.410256 | 77 | 0.593354 | false |
landism/pants | tests/python/pants_test/backend/python/test_interpreter_cache.py | 5 | 5652 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from conte... | apache-2.0 | -6,215,272,427,556,044,000 | 40.255474 | 100 | 0.683829 | false |
roessland/PRST | setup.py | 1 | 1197 | # -*- coding: utf-8 -*-
import os
from setuptools import setup, Command, find_packages
class CleanCommand(Command):
"""Custom clean command to tidy up project root."""
# http://stackoverflow.com/questions/3779915/
user_options = []
def initialize_options(self):
pass
def finalize_options(sel... | gpl-3.0 | -4,767,966,503,004,603,000 | 29.666667 | 96 | 0.622074 | false |
ritchyteam/odoo | addons/account_test/account_test.py | 342 | 2169 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: product_expiry.py 4304 2006-10-25 09:54:51Z ged $
#
# WARNING: This program as such is intended to be used by professional
# prog... | agpl-3.0 | -8,920,879,368,086,497,000 | 35.762712 | 85 | 0.65468 | false |
mars-knowsnothing/amos-bot | src/Lib/site-packages/pip/_vendor/requests/api.py | 362 | 5794 | # -*- coding: utf-8 -*-
"""
requests.api
~~~~~~~~~~~~
This module implements the Requests API.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
"""
from . import sessions
def request(method, url, **kwargs):
"""Constructs and sends a :class:`Request <Request>`.
:para... | gpl-3.0 | -1,949,433,663,547,049,700 | 38.148649 | 133 | 0.667069 | false |
rdeheele/odoo | addons/account_followup/account_followup.py | 93 | 28777 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -367,404,896,327,007,200 | 56.210736 | 269 | 0.55381 | false |
alu042/edx-platform | openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py | 7 | 1608 | """
Command to load course overviews.
"""
import logging
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore
from openedx.core.djangoapps... | agpl-3.0 | -3,973,526,804,114,065,000 | 30.529412 | 94 | 0.634328 | false |
woobe/h2o | py/test_junit.py | 2 | 1458 | import unittest, time, sys
import h2o
class TestJUnit(unittest.TestCase):
def test_A_all_junit(self):
try:
h2o.build_cloud(node_count=2, java_heap_GB=3)
# we don't have the port or ip configuration here
# that util/h2o.py does? Keep this in synch with spawn_h2o there.
... | apache-2.0 | 550,028,214,505,164,800 | 35.45 | 92 | 0.465706 | false |
samfoo/servo | tests/wpt/css-tests/tools/wptserve/wptserve/pipes.py | 180 | 13830 | from cgi import escape
import gzip as gzip_module
import re
import time
import types
import uuid
from cStringIO import StringIO
def resolve_content(response):
rv = "".join(item for item in response.iter_content())
if type(rv) == unicode:
rv = rv.encode(response.encoding)
return rv
class Pipeline... | mpl-2.0 | -4,238,221,564,673,157,600 | 29.939597 | 97 | 0.54765 | false |
alexrao/YouCompleteMe | third_party/ycmd/third_party/requests/requests/packages/urllib3/contrib/ntlmpool.py | 1010 | 4507 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
try:
from http.client import HTTPSConnection
except ImportError:
from httplib import HTTPSConnection
from logging import getLogger
from ntlm import ntlm
from urllib3 import HTT... | gpl-3.0 | 7,227,949,184,983,366,000 | 38.535088 | 77 | 0.552474 | false |
benanne/theano-tutorial | 3_logistic_regression.py | 2 | 1394 | import theano
import theano.tensor as T
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
import load
# load data
x_train, t_train, x_test, t_test = load.cifar10(dtype=theano.config.floatX)
labels_test = np.argmax(t_test, axis=1)
# visualize data
plt.imshow(x_train[0].reshape(32, 32), cmap=plt.cm.gray)
... | mit | -2,174,785,870,052,388,600 | 21.868852 | 75 | 0.66571 | false |
ateoto/django-recipebook | recipebook/admin.py | 1 | 1161 | from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from recipebook.models import (
Ingredient, Recipe, RecipeIngredient, IngredientLine
)
class IngredientLineInline(admin.TabularInline):
model = IngredientLine
def get_formset(self, request, obj=None, **kwargs):
... | mit | -7,499,361,277,554,826,000 | 36.451613 | 133 | 0.702842 | false |
xuleiboy1234/autoTitle | tensorflow/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils.py | 113 | 1664 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mit | -4,801,448,066,030,609,000 | 38.619048 | 80 | 0.706731 | false |
henryfjordan/django | django/contrib/flatpages/models.py | 318 | 1556 | from __future__ import unicode_literals
from django.contrib.sites.models import Site
from django.core.urlresolvers import get_script_prefix
from django.db import models
from django.utils.encoding import iri_to_uri, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_... | bsd-3-clause | 5,166,369,419,410,257,000 | 39.947368 | 95 | 0.664524 | false |
sanchezfauste/bPortal | portal/module_definitions/calls.py | 1 | 1413 | #######################################################################
# bPortal is a SuiteCRM portal written using django project.
# Copyright (C) 2017-2018 BTACTIC, SCCL
# Copyright (C) 2017-2018 Marc Sanchez Fauste
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | gpl-3.0 | -5,424,983,856,773,107,000 | 30.4 | 71 | 0.651805 | false |
pvagner/orca | src/orca/scripts/apps/notify-osd/script.py | 4 | 3108 | # Orca
#
# Copyright 2009 Eitan Isaacson
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is ... | lgpl-2.1 | 599,883,511,348,089,300 | 37.85 | 80 | 0.58269 | false |
Foxfanmedium/python_training | OnlineCoursera/mail_ru/Python_1/Week_3/playground/env/Lib/site-packages/pip/index.py | 336 | 39950 | """Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
from collections import namedtuple
import itertools
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.... | apache-2.0 | -7,679,012,112,699,637,000 | 35.252269 | 79 | 0.558573 | false |
rpatel3001/RU-Interested | serve.py | 1 | 6781 | from flask import *
from flask_wtf import FlaskForm
from flask_bootstrap import Bootstrap
from wtforms import validators, TextField, IntegerField, SubmitField, SelectField, SelectMultipleField
from datetime import datetime
import psycopg2
import os
import urllib.parse as urlparse
import subprocess
import time
from math... | mit | 1,118,382,780,724,804,900 | 39.363095 | 164 | 0.642531 | false |
epssy/hue | apps/filebrowser/src/filebrowser/lib/xxd_test.py | 29 | 2104 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | -8,025,781,357,194,504,000 | 33.491803 | 77 | 0.71673 | false |
Andypsamp/CODjunit | beetsplug/filefilter.py | 25 | 2794 | # This file is part of beets.
# Copyright 2015, Malte Ried.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | mit | -2,270,546,910,868,392,400 | 36.253333 | 79 | 0.617394 | false |
mozilla/inventory | vendor-local/src/django-tastytools/tastytools/test/definitions/fields.py | 5 | 8851 | """ Defines the generator function for field test cases """
from django.test import TestCase
from tastytools.test.client import Client, MultiTestCase, create_multi_meta
from datetime import datetime
from helpers import prepare_test_post_data
import random
class FieldNotSupportedException(Exception):
pass
def g... | bsd-3-clause | -1,150,210,148,125,557,500 | 38.869369 | 104 | 0.523896 | false |
hail-is/hail | hail/python/hailtop/hailctl/dataproc/resources/init_notebook.py | 1 | 6766 | #!/opt/conda/default/bin/python3
import json
import os
import subprocess as sp
import sys
import errno
from subprocess import check_output
assert sys.version_info > (3, 0), sys.version_info
if sys.version_info >= (3, 7):
def safe_call(*args, **kwargs):
sp.run(args, capture_output=True, check=True, **kwarg... | mit | -9,208,825,991,952,353,000 | 33.345178 | 199 | 0.586905 | false |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive/08_image/flowersmodeltpu/trainer/preprocess.py | 4 | 8254 | # Copyright 2018 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 | 2,954,874,752,213,449,000 | 32.827869 | 106 | 0.657015 | false |
simobasso/ansible | lib/ansible/inventory/group.py | 66 | 4669 | # (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 | 1,412,142,349,485,686,800 | 27.469512 | 102 | 0.578711 | false |
p4datasystems/CarnotKEdist | dist/Lib/ensurepip/__init__.py | 7 | 6655 | #!/usr/bin/env python2
from __future__ import print_function
import os
import os.path
import pkgutil
import shutil
import sys
import tempfile
__all__ = ["version", "bootstrap"]
_SETUPTOOLS_VERSION = "18.4"
_PIP_VERSION = "7.1.2"
# pip currently requires ssl support, so we try to provide a nicer
# error message w... | apache-2.0 | -6,058,317,082,734,687,000 | 28.317181 | 78 | 0.605259 | false |
cfriedt/gnuradio | gr-digital/python/digital/qa_map.py | 57 | 1778 | #!/usr/bin/env python
#
# Copyright 2012,2013 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 opt... | gpl-3.0 | -8,293,628,275,110,685,000 | 29.135593 | 70 | 0.64117 | false |
tovmeod/anaf | anaf/sales/api/urls.py | 1 | 2683 | # -*- coding: utf-8 -*-
from anaf.sales.api import handlers
from django.conf.urls import url, patterns
from anaf.core.api.auth import auth_engine
from anaf.core.api.doc import documentation_view
from anaf.core.api.resource import CsrfExemptResource
ad = {'authentication': auth_engine}
# sales resources
saleStatusRes... | bsd-3-clause | 7,357,829,620,867,601,000 | 59.977273 | 119 | 0.631755 | false |
amanharitsh123/zulip | zerver/webhooks/airbrake/view.py | 3 | 1508 | # Webhooks for external integrations.
from typing import Dict, Any, Text
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from zerver.lib.actions import check_send_stream_message
from zerver.lib.response import json_success, json_error
from zerver.decorator import REQ... | apache-2.0 | -5,041,777,840,063,393,000 | 40.888889 | 93 | 0.681034 | false |
marc-sensenich/ansible | test/units/module_utils/basic/test_filesystem.py | 113 | 5190 | # -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
... | gpl-3.0 | -971,454,234,675,693,300 | 37.161765 | 104 | 0.595183 | false |
mattvonrocketstein/ymir | docs/fabfile.py | 1 | 4347 | # -*- coding: utf-8 -*-
from fabric import api
import os
import shutil
from fabric import colors
PORT = 8000
PROJECT_NAME = 'ymir'
DOC_ROOT = os.path.dirname(__file__)
SRC_ROOT = os.path.dirname(DOC_ROOT)
GEN_PATH = os.path.join(DOC_ROOT, 'ymir')
DEPLOY_PATH = "~/code/ghio/{0}".format(PROJECT_NAME)
DEPLOY_PATH = os.pa... | mit | -5,335,237,412,302,942,000 | 28.174497 | 96 | 0.573729 | false |
ycaihua/scikit-learn | sklearn/tests/test_pipeline.py | 17 | 12512 | """
Test the pipeline module.
"""
import numpy as np
from scipy import sparse
from sklearn.externals.six.moves import zip
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import assert_true
from skle... | bsd-3-clause | 6,356,793,116,880,931,000 | 30.59596 | 79 | 0.647938 | false |
raajitr/django_hangman | env/lib/python2.7/site-packages/requests/packages/urllib3/util/selectors.py | 86 | 18836 | # Backport of selectors.py from Python 3.5+ to support Python < 3.4
# Also has the behavior specified in PEP 475 which is to retry syscalls
# in the case of an EINTR error. This module is required because selectors34
# does not follow this behavior and instead returns that no dile descriptor
# events have occurred rath... | mit | -5,404,895,748,967,645,000 | 34.946565 | 85 | 0.546984 | false |
calfonso/ansible | lib/ansible/modules/windows/win_file_version.py | 22 | 1738 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Sam Liu <sam.liu@activenetwork.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by'... | gpl-3.0 | 1,940,837,517,754,120,200 | 22.173333 | 92 | 0.689298 | false |
superstack/nova | nova/api/openstack/server_metadata.py | 3 | 3648 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | apache-2.0 | 8,190,786,480,312,652,000 | 37.808511 | 78 | 0.602522 | false |
amisrs/angular-flask | angular_flask/lib/python2.7/site-packages/MySQLdb/__init__.py | 76 | 3229 | """MySQLdb - A DB API v2.0 compatible interface to MySQL.
This package is a wrapper around _mysql, which mostly implements the
MySQL C API.
connect() -- connects to server
See the C API specification and the MySQL documentation for more info
on other items.
For information on how MySQLdb handles type conv... | mit | -3,293,178,046,992,082,000 | 30.94898 | 78 | 0.65624 | false |
longmen21/edx-platform | lms/djangoapps/teams/models.py | 48 | 10408 | """Django models related to teams functionality."""
from datetime import datetime
from uuid import uuid4
import pytz
from model_utils import FieldTracker
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.models import User
from django.db import models
from django.dispatch import receiver
... | agpl-3.0 | 7,737,566,526,345,288,000 | 37.981273 | 109 | 0.650461 | false |
Kalamatee/dhewm3 | neo/sys/linux/runner/runner_lib.py | 19 | 6735 | # run doom process on a series of maps
# can be used for regression testing, or to fetch media
# keeps a log of each run ( see getLogfile )
# currently uses a basic stdout activity timeout to decide when to move on
# using a periodic check of /proc/<pid>/status SleepAVG
# when the sleep average is reaching 0, issue a ... | gpl-3.0 | -2,879,872,415,230,376,000 | 31.22488 | 163 | 0.671566 | false |
HPCGISLab/STDataViz | WorkingVersion/LibTry/Traits/traits_fileDialog.py | 1 | 1490 | #-- Imports --------------------------------------------------------------------
from traits.api \
import HasTraits, File, Button
from traitsui.api \
import View, HGroup, Item
from traitsui.file_dialog \
import open_file, FileInfo, TextInfo, ImageInfo
#-- FileDialogDemo Class --------------------------... | bsd-3-clause | -9,166,927,844,010,023,000 | 27.132075 | 80 | 0.512752 | false |
zero-ui/miniblink49 | third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py | 22 | 11385 | #!/usr/bin/env python
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Release:
- Concatenates autostart modules, application modules' module.json descriptors,
and the application loader into a ... | gpl-3.0 | -20,947,979,897,137,730 | 39.806452 | 171 | 0.626087 | false |
dtroyer/python-openstacksdk | openstack/identity/v3/policy.py | 1 | 1426 | # 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 t... | apache-2.0 | -487,465,670,628,445,440 | 33.780488 | 75 | 0.703366 | false |
d-k-b/udacity-deep-learning | seq2seq/helper.py | 1 | 1420 | import os
def load_data(path):
input_file = os.path.join(path)
with open(input_file, "r", encoding='utf-8', errors='ignore') as f:
data = f.read()
return data
def extract_vocab(data):
special_words = ['<pad>', '<unk>', '<s>', '<\s>']
set_words = set([word for line in dat... | mit | 4,802,038,180,412,981,000 | 34.410256 | 117 | 0.602817 | false |
tinchoss/Python_Android | python-build/python-libs/gdata/src/atom/data.py | 136 | 8060 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... | apache-2.0 | 2,004,090,458,200,150,000 | 22.846154 | 79 | 0.675062 | false |
bswartz/cinder | cinder/volume/drivers/nexenta/nfs.py | 1 | 33897 | # Copyright 2016 Nexenta Systems, 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 req... | apache-2.0 | -1,109,923,852,424,558,300 | 40.287454 | 79 | 0.536537 | false |
mhild/Sick-Beard | lib/hachoir_parser/misc/pifv.py | 90 | 8492 | """
EFI Platform Initialization Firmware Volume parser.
Author: Alexandre Boeglin
Creation date: 08 jul 2007
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet,
UInt8, UInt16, UInt24, UInt32, UInt64, Enum,
CString, String, PaddingBytes, RawBytes, NullBytes)
from lib.hachoir... | gpl-3.0 | 8,731,698,588,895,303,000 | 34.236515 | 80 | 0.615756 | false |
Chenmxs/scrapy | tests/test_linkextractors_deprecated.py | 55 | 9518 | import unittest
from scrapy.linkextractors.regex import RegexLinkExtractor
from scrapy.http import HtmlResponse
from scrapy.link import Link
from scrapy.linkextractors.htmlparser import HtmlParserLinkExtractor
from scrapy.linkextractors.sgml import SgmlLinkExtractor, BaseSgmlLinkExtractor
from tests import get_testdata... | bsd-3-clause | 2,774,792,291,033,463,300 | 48.572917 | 134 | 0.605379 | false |
abadger/Bento | bento/private/_yaku/examples/fortran/conf_fortran.py | 3 | 1061 | import sys
from yaku.scheduler \
import \
run_tasks
from yaku.context \
import \
get_bld, get_cfg
from yaku.conftests.fconftests \
import \
check_fcompiler, check_fortran_verbose_flag, \
check_fortran_runtime_flags, check_fortran_dummy_main, \
check_fortran_mangling... | bsd-3-clause | -4,156,866,918,624,696,000 | 22.577778 | 64 | 0.629595 | false |
markoshorro/gem5 | src/mem/MemChecker.py | 42 | 2752 | # Copyright (c) 2014 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause | -7,922,183,813,586,572,000 | 46.448276 | 72 | 0.777253 | false |
biolab/orange | Orange/testing/regression/tests_20/reference_domain2.py | 6 | 1700 | # Description: Shows how to use orange.Domain for example conversion. Also shows how to add meta-attributes to domain descriptors and use them.
# Category: basic classes, meta-attributes
# Classes: Domain
# Uses: monk1
# Referenced: Domain.htm
import orange
data = orange.ExampleTable("monk1")
d2 = ora... | gpl-3.0 | 7,921,418,230,968,717,000 | 24.373134 | 143 | 0.725294 | false |
RobotGarden/foscam-driver | camscheduler.py | 1 | 4301 | #!/usr/bin/env python
"""
Camera action scheduler.
"""
__author__ = "Daniel Casner <www.danielcasner.org>"
import time
import scheduler
import control
SEEK_TIME = 20.0
class CameraAction:
"""A general class for camera actions to queue"""
def __init__(self, foscam, expire=None):
"""Store basic ac... | bsd-2-clause | -4,699,265,510,564,422,000 | 39.575472 | 107 | 0.635666 | false |
3dfxsoftware/cbss-addons | crm_claim_rma/stock.py | 1 | 3021 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2013 Camptocamp
# Copyright 2009-2013 Akretion,
# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau,
# Benoît Guillot, Joel Grand-Guillaume
#
# This program is free software: y... | gpl-2.0 | 8,498,050,634,114,989,000 | 35.361446 | 80 | 0.569914 | false |
spatial-ucsb/ConceptsOfSpatialInformation | CoreConceptsPy/Astronomic_Spaces/tests/networktest.py | 2 | 2411 | """
Tests for network implementation
:author: Fenja Kollasch, 06/2017
"""
import sys
sys.path.append('../')
import networks as n
import objects as o
# Model the big dipper as unordered graph... because you can observe a constellation only from left to right... or so
big_dipper = n.AstroNetwork("big dipper")
alkaid = ... | apache-2.0 | -7,870,338,284,320,231,000 | 49.229167 | 117 | 0.691829 | false |
xenserver/xsconsole | plugins-base/XSFeatureLogInOut.py | 4 | 2299 | # Copyright (c) 2008-2009 Citrix Systems 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... | gpl-2.0 | -4,181,478,398,566,988,300 | 39.333333 | 95 | 0.642018 | false |
dcroc16/skunk_works | google_appengine/lib/django-1.2/django/contrib/flatpages/tests/csrf.py | 47 | 3425 | import os
from django.conf import settings
from django.test import TestCase, Client
class FlatpageCSRFTests(TestCase):
fixtures = ['sample_flatpages']
urls = 'django.contrib.flatpages.tests.urls'
def setUp(self):
self.client = Client(enforce_csrf_checks=True)
self.old_MIDDLEWARE_CLASSES = ... | mit | -1,671,526,156,695,921,700 | 45.917808 | 118 | 0.678832 | false |
rdo-management/heat | heat/tests/test_api_aws.py | 7 | 10180 | #
# 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
# ... | apache-2.0 | -4,433,370,629,443,429,000 | 45.063348 | 78 | 0.603733 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-servermanager/azure/mgmt/servermanager/models/node_resource.py | 4 | 2535 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 3,996,238,547,198,959,600 | 35.73913 | 112 | 0.581854 | false |
alexholcombe/twoWords | oldData/Alex_16Mar2015_12-04.py | 1 | 48426 | #Alex Holcombe alex.holcombe@sydney.edu.au
#See the github repository for more information: https://github.com/alexholcombe/twoWords
from __future__ import print_function
from psychopy import monitors, visual, event, data, logging, core, sound, gui
import psychopy.info
import numpy as np
from math import atan, log, cei... | mit | -2,697,392,938,752,426,000 | 57.485507 | 209 | 0.681493 | false |
wolfmanstout/dragonfly | dragonfly/test/test_engine_sapi5.py | 2 | 6568 | #
# This file is part of Dragonfly.
# (c) Copyright 2007, 2008 by Christo Butcher
# Licensed under the LGPL.
#
# Dragonfly 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 ... | lgpl-3.0 | -6,483,722,436,316,936,000 | 40.0375 | 76 | 0.628389 | false |
Kilhog/odoo | addons/email_template/ir_actions.py | 281 | 3520 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013 OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | agpl-3.0 | 410,438,209,152,816,830 | 41.409639 | 138 | 0.579261 | false |
h2oai/h2o-2 | scripts/dontrun_r_examples.py | 9 | 5399 | #!/usr/bin/python
#
# This tool goes through every file in the 'man' directory and automatically makes the example \dontrun.
#
import sys
import os
import re
import shutil
STATE_NONE = 1
STATE_IN_EXAMPLES = 2
STATE_IN_CRAN_EXAMPLES = 3
STATE_IN_DONTRUN = 4
class Example:
def __init__(self, dir_name, file_name... | apache-2.0 | 9,150,715,012,750,981,000 | 29.502825 | 104 | 0.505464 | false |
francisco-dlp/hyperspy | hyperspy/samfire_utils/segmenters/histogram.py | 6 | 3203 | # -*- coding: utf-8 -*-
# Copyright 2007-2011 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 | 8,789,949,818,768,898,000 | 38.060976 | 79 | 0.582891 | false |
t794104/ansible | lib/ansible/modules/network/f5/bigip_profile_udp.py | 38 | 14130 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 7,693,000,092,743,739,000 | 29.784314 | 91 | 0.602548 | false |
glogiotatidis/bedrock | tests/redirects/base.py | 9 | 6982 | import re
from urlparse import urlparse, parse_qs
from braceexpand import braceexpand
import requests
def get_abs_url(url, base_url):
try:
if url.pattern.startswith('/'):
# url is a compiled regular expression pattern
return re.compile(''.join([re.escape(base_url), url.pattern]))
... | mpl-2.0 | 8,934,356,407,403,385,000 | 40.559524 | 126 | 0.641364 | 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.