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 |
|---|---|---|---|---|---|---|---|---|---|---|
Zhongqilong/kbengine | kbe/src/lib/python/Lib/distutils/spawn.py | 81 | 7514 | """distutils.spawn
Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
"""
import sys
import os
from distutils.errors import DistutilsPlatformError, D... | lgpl-3.0 | 6,789,913,219,496,959,000 | 37.533333 | 80 | 0.565744 | false |
awkspace/ansible | lib/ansible/modules/network/onyx/onyx_mlag_ipl.py | 118 | 6779 | #!/usr/bin/python
#
# 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',
'status': ['preview'],
... | gpl-3.0 | 6,891,197,390,192,943,000 | 31.280952 | 92 | 0.583124 | false |
alexandrucoman/vbox-nova-driver | nova/tests/functional/v3/test_pci.py | 8 | 7468 | # Copyright 2013 Intel.
#
# 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 i... | apache-2.0 | -5,800,958,422,579,611,000 | 34.226415 | 78 | 0.558382 | false |
hcasse/elfmake | elfmake/recipe.py | 1 | 6836 | """Classes used to represent recipes."""
import env
import action
import io
import os
import os.path
import sys
file_db = { } # file database
ext_db = { } # extension database
# base classes
class File(env.MapEnv):
"""Representation of files."""
path = None
recipe = None
is_goal = False
is_target = False
is_... | gpl-3.0 | -4,019,228,434,657,154,600 | 20.632911 | 104 | 0.646723 | false |
wkschwartz/django | tests/gis_tests/test_spatialrefsys.py | 17 | 5332 | import re
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature
from django.utils.functional import cached_property
test_srs = ({
'srid': 4326,
'auth_name': ('EPSG', True),
'auth_srid': 4326,
# Only the beginning, because there are differences depending on installed li... | bsd-3-clause | -790,373,884,958,211,500 | 38.496296 | 114 | 0.594336 | false |
orezpraw/gensim | gensim/test/test_miislita.py | 83 | 3928 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
This module replicates the miislita vector spaces from
"A Linear Algebra Approach to the Vector Space Model -- A Fast Track Tutorial"
by Dr. E. Garcia, admin@miislita.com
See http://www.miisl... | gpl-3.0 | -6,077,943,060,901,426,000 | 31.733333 | 107 | 0.66166 | false |
gangadharkadam/v4_erp | erpnext/setup/doctype/backup_manager/backup_dropbox.py | 41 | 4776 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# SETUP:
# install pip install --upgrade dropbox
#
# Create new Dropbox App
#
# in conf.py, set oauth2 settings
# dropbox_access_key
# dropbox_access_secret
from __future__ import unicode_... | agpl-3.0 | 8,127,670,572,553,388,000 | 31.060403 | 138 | 0.718802 | false |
btnpushnmunky/cupcake | monsters.py | 1 | 1918 | import pygame
import os
from random import randint
UP = 3
DOWN = 7
RIGHT = 5
LEFT = 9
EXEC_DIR = os.path.dirname(__file__)
class Monster(pygame.sprite.Sprite):
""" This is our main monster class """
def __init__(self, initial_position, type, direction):
pygame.sprite.Sprite.__init__(self)
self... | mit | -746,457,573,432,719,700 | 30.966667 | 58 | 0.529718 | false |
julien78910/CouchPotatoServer | libs/rtorrent/rpc/__init__.py | 158 | 10775 | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# 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, modify, ... | gpl-3.0 | -7,227,469,817,826,214,000 | 32.777429 | 107 | 0.587935 | false |
amir-qayyum-khan/edx-platform | common/djangoapps/request_cache/middleware.py | 9 | 3741 | """
An implementation of a RequestCache. This cache is reset at the beginning
and end of every request.
"""
import crum
import threading
class _RequestCache(threading.local):
"""
A thread-local for storing the per-request cache.
"""
def __init__(self):
super(_RequestCache, self).__init__()
... | agpl-3.0 | 6,397,353,112,441,866,000 | 33.638889 | 118 | 0.64047 | false |
pikeBishop/OMP_gpxReport | examples/geopy/geocoders/opencage.py | 13 | 7091 | """
:class:`.OpenCage` is the Opencagedata geocoder.
"""
from geopy.compat import urlencode
from geopy.geocoders.base import Geocoder, DEFAULT_TIMEOUT, DEFAULT_SCHEME
from geopy.exc import (
GeocoderQueryError,
GeocoderQuotaExceeded,
)
from geopy.location import Location
from geopy.util import logger
__all__... | gpl-2.0 | -2,919,232,206,359,233,500 | 33.590244 | 79 | 0.5813 | false |
atiqueahmedziad/addons-server | src/olympia/legacy_discovery/views.py | 2 | 2723 | from django.db.transaction import non_atomic_requests
from django.forms.models import modelformset_factory
from django.shortcuts import redirect
from olympia import amo
from olympia.amo.utils import render
from olympia.zadmin.decorators import admin_required
from .forms import DiscoveryModuleForm
from .models import ... | bsd-3-clause | 1,007,125,105,423,562,500 | 37.9 | 77 | 0.691149 | false |
TomBaxter/osf.io | osf/models/tag.py | 28 | 1187 | from django.db import models
from .base import BaseModel
class TagManager(models.Manager):
"""Manager that filters out system tags by default.
"""
def get_queryset(self):
return super(TagManager, self).get_queryset().filter(system=False)
class Tag(BaseModel):
name = models.CharField(db_inde... | apache-2.0 | -1,173,475,066,900,773,400 | 25.977273 | 78 | 0.614153 | false |
rprata/boost | tools/build/src/util/set.py | 49 | 1240 | # (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
from utility... | gpl-2.0 | 7,047,256,434,928,357,000 | 28.52381 | 92 | 0.631452 | false |
Lujeni/ansible | lib/ansible/modules/network/cloudengine/ce_interface_ospf.py | 8 | 30951 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -5,195,196,876,943,480,000 | 37.932075 | 105 | 0.5594 | false |
christoph-buente/phantomjs | src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_test_utils.py | 227 | 10685 | #!/usr/bin/env python
#
# Copyright 2006, 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... | bsd-3-clause | -2,731,866,854,677,231,000 | 33.579288 | 79 | 0.672157 | false |
signed/intellij-community | python/helpers/py3only/docutils/languages/da.py | 50 | 1872 | # -*- coding: utf-8 -*-
# $Id: da.py 7678 2013-07-03 09:57:36Z milde $
# Author: E D
# 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... | apache-2.0 | -5,146,300,755,362,303,000 | 29.129032 | 76 | 0.601178 | false |
iamdankaufman/beets | beetsplug/info.py | 2 | 2210 | # This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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, ... | mit | -334,954,068,923,745,860 | 28.078947 | 71 | 0.624887 | false |
anaruse/chainer | tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_nd.py | 1 | 12854 | import unittest
import functools
import math
import numpy
from operator import mul
import six
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
from chaine... | mit | 4,564,800,891,666,489,000 | 35.830946 | 79 | 0.576085 | false |
brennanblue/svgplotlib | svgplotlib/Bar.py | 2 | 6406 | #!python -u
# -*- coding: utf-8 -*-
import sys
import itertools
from svgplotlib import Base
class Bar(Base):
"""
Simple vertical bar plot
Example::
graph = Bar(
(10,50,100),
width = 1000, height = 500,
titleColor = 'blue',
title = 'Simple b... | bsd-3-clause | -993,610,570,614,839,600 | 30.55665 | 100 | 0.482516 | false |
fiji-flo/servo | tests/wpt/web-platform-tests/webdriver/tests/contexts/maximize_window.py | 11 | 8104 | # META: timeout=long
from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
from tests.support.fixtures import create_dialog
from tests.support.inline import inline
alert_doc = inline("<script>window.alert()</script>")
def maximize(session):
return session.transport.send("POST", ... | mpl-2.0 | -8,871,542,050,775,035,000 | 28.256318 | 127 | 0.692991 | false |
code4futuredotorg/reeborg_tw | src/libraries/Brython3.2.3/Lib/encodings/iso8859_10.py | 272 | 13589 | """ Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors... | agpl-3.0 | -3,722,531,130,212,565,500 | 43.263844 | 109 | 0.530871 | false |
xolox/python-deb-pkg-tools | deb_pkg_tools/config.py | 1 | 2091 | # Debian packaging tools: Configuration defaults.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: February 6, 2020
# URL: https://github.com/xolox/python-deb-pkg-tools
"""Configuration defaults for the `deb-pkg-tools` package."""
# Standard library modules.
import os
# External dependencies.
from hum... | mit | 166,451,441,080,455,400 | 31.169231 | 106 | 0.724055 | false |
40223114/2015_g4 | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/sprite.py | 603 | 55779 | ## pygame - Python Game Library
## Copyright (C) 2000-2003, 2007 Pete Shinners
## (C) 2004 Joe Wreschnig
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Library General Public
## License as published by the Free Software Foundation; e... | gpl-3.0 | -909,583,546,123,830,800 | 34.015066 | 95 | 0.597895 | false |
charukiewicz/beer-manager | venv/lib/python3.4/site-packages/pip/commands/__init__.py | 476 | 2236 | """
Package containing all pip commands
"""
from pip.commands.bundle import BundleCommand
from pip.commands.completion import CompletionCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.help import HelpCommand
from pip.commands.list import ListCommand
from pip.commands.search import SearchComman... | mit | 5,329,352,263,952,085,000 | 24.409091 | 63 | 0.7178 | false |
jpirko/lnst | lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py | 1 | 7385 | import logging
from itertools import product
from lnst.Common.Parameters import Param, IntParam, StrParam
from lnst.Common.IpAddress import ipaddress
from lnst.Controller import HostReq, DeviceReq, RecipeParam
from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe
from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConf... | gpl-2.0 | -5,219,096,291,925,064,000 | 37.264249 | 75 | 0.585511 | false |
JonDoNym/peinjector | peinjector/connectors/python/libPePatch.py | 34 | 4600 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Provides de-serialization and in-stream patch applying capabilities for PE Files
"""
__author__ = 'A.A.'
# Unpack binary data
from struct import unpack_from
# Holds an single patch part
class PePatchPart(object):
# Constructor
def __init__(self, mem, ... | unlicense | -4,594,839,702,750,307,300 | 29.666667 | 113 | 0.510652 | false |
fsimkovic/cptbx | conkit/io/tests/test_pdb.py | 2 | 10444 | """Testing facility for conkit.io.PdbIO"""
__author__ = "Felix Simkovic"
__date__ = "26 Oct 2016"
import os
import unittest
from conkit.io.pdb import PdbParser
from conkit.io.tests.helpers import ParserTestCase
class TestPdbIO(ParserTestCase):
def test_read_1(self):
content = """ATOM 1 N TYR A ... | gpl-3.0 | 5,277,282,713,027,556,000 | 60.798817 | 112 | 0.519724 | false |
ncdesouza/bookworm | env/lib/python2.7/site-packages/jinja2/testsuite/core_tags.py | 412 | 11858 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.core_tags
~~~~~~~~~~~~~~~~~~~~~~~~~~
Test the core tags like for and if.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Environment... | gpl-3.0 | 4,455,206,967,161,460,700 | 37.878689 | 90 | 0.48676 | false |
iamroot12C/linux | tools/perf/scripts/python/net_dropmonitor.py | 1812 | 1749 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 | 6,164,876,250,087,427,000 | 22.32 | 90 | 0.641509 | false |
noroutine/ansible | lib/ansible/utils/module_docs_fragments/openstack.py | 133 | 3961 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | gpl-3.0 | -2,224,290,216,266,020,600 | 35.675926 | 94 | 0.70664 | false |
crakensio/django_training | lib/python2.7/site-packages/pip/vcs/bazaar.py | 393 | 4943 | import os
import tempfile
import re
from pip.backwardcompat import urlparse
from pip.log import logger
from pip.util import rmtree, display_path, call_subprocess
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
class Bazaar(VersionControl):
name = 'bzr'
dirname = '.bzr'
repo_na... | cc0-1.0 | -1,570,173,747,630,039,300 | 36.732824 | 90 | 0.544609 | false |
agoravoting/agora-results | agora_results/pipes/pdf.py | 1 | 18370 | # -*- coding:utf-8 -*-
# This file is part of agora-results.
# Copyright (C) 2016-2021 Agora Voting SL <nvotes@nvotes.com>
# agora-results 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 versi... | agpl-3.0 | -5,501,727,474,739,686,000 | 30.507719 | 83 | 0.463008 | false |
PyLearner/tp-qemu | generic/tests/ioquit.py | 9 | 1206 | import logging
import time
import random
from autotest.client.shared import error
@error.context_aware
def run(test, params, env):
"""
Emulate the poweroff under IO workload(dd so far) with signal SIGKILL.
1) Boot a VM
2) Add IO workload for guest OS
3) Sleep for a random time
4) Kill the VM... | gpl-2.0 | 7,649,905,783,876,988,000 | 28.414634 | 74 | 0.687396 | false |
scripteed/mtasa-blue | vendor/google-breakpad/src/tools/gyp/test/mac/gyptest-strip-default.py | 232 | 2448 | #!/usr/bin/env python
# Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the default STRIP_STYLEs match between different generators.
"""
import TestGyp
import re
import subprocess
import sys
i... | gpl-3.0 | 4,680,655,455,321,747,000 | 24.768421 | 80 | 0.684641 | false |
saimn/astropy | astropy/wcs/wcsapi/tests/test_utils.py | 11 | 1548 | import numpy as np
from numpy.testing import assert_allclose
import pytest
from pytest import raises
from astropy import units as u
from astropy.wcs import WCS
from astropy.tests.helper import assert_quantity_allclose
from astropy.wcs.wcsapi.utils import deserialize_class, wcs_info_str
def test_construct():
r... | bsd-3-clause | -1,165,886,237,608,343,800 | 23.967742 | 96 | 0.674419 | false |
arnaudsj/suds | suds/servicedefinition.py | 200 | 8478 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 in the hope that it will ... | lgpl-3.0 | -1,232,254,896,157,656,600 | 33.189516 | 84 | 0.523355 | false |
openstack/ironic | ironic/hacking/checks.py | 1 | 1950 | # Copyright 2018 FUJITSU LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -2,989,298,579,154,447,400 | 35.111111 | 75 | 0.698462 | false |
divio/django | django/test/runner.py | 148 | 14807 | import logging
import os
import unittest
from importlib import import_module
from unittest import TestSuite, defaultTestLoader
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.test import SimpleTestCase, TestCase
from django.test.utils import setup_test_environment, ... | bsd-3-clause | 1,929,785,634,139,747,800 | 37.360104 | 104 | 0.612075 | false |
tiborsimko/invenio-pidstore | invenio_pidstore/providers/base.py | 1 | 3776 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Module storing implementations of PID providers."""
from __future__ import absolu... | mit | -7,757,997,432,618,151,000 | 32.415929 | 79 | 0.628178 | false |
djw8605/htcondor | src/condor_contrib/campus_factory/python-lib/campus_factory/Parsers.py | 7 | 3591 | import logging
import xml.sax.handler
import os
from select import select
from campus_factory.util.ExternalCommands import RunExternal
class AvailableGlideins(xml.sax.handler.ContentHandler, object):
# Command to query the collector for available glideins
command = "condor_status -avail -const '(IsUndef... | apache-2.0 | -8,766,301,105,742,628,000 | 31.351351 | 163 | 0.584238 | false |
linuxlewis/channels | channels/asgi.py | 4 | 3137 | from __future__ import unicode_literals
import django
from django.conf import settings
from django.utils.module_loading import import_string
from .routing import Router
from .utils import name_that_thing
class InvalidChannelLayerError(ValueError):
pass
class ChannelLayerManager(object):
"""
Takes a se... | bsd-3-clause | 1,765,793,476,120,319,700 | 28.87619 | 99 | 0.628626 | false |
dyoung418/tensorflow | tensorflow/python/keras/_impl/keras/applications/xception_test.py | 35 | 2109 | # 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 | 5,480,835,310,949,082,000 | 36 | 80 | 0.655761 | false |
romankagan/DDBWorkbench | python/lib/Lib/HTMLParser.py | 103 | 12662 | """A parser for HTML and XHTML."""
# This file is based on sgmllib.py, but the API is slightly different.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are special)
# and CDAT... | apache-2.0 | -3,431,034,967,023,642,600 | 33.314363 | 76 | 0.50387 | false |
axinging/chromium-crosswalk | third_party/Python-Markdown/markdown/extensions/meta.py | 114 | 2400 | """
Meta Data Extension for Python-Markdown
=======================================
This extension adds Meta Data handling to markdown.
See <https://pythonhosted.org/Markdown/extensions/meta_data.html>
for documentation.
Original code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com).
All changes Copyrigh... | bsd-3-clause | 2,012,320,851,609,054,500 | 29.769231 | 74 | 0.552083 | false |
chanderbgoel/pybrain | pybrain/supervised/evolino/filter.py | 25 | 9839 | from __future__ import print_function
__author__ = 'Michael Isik'
from pybrain.supervised.evolino.gfilter import Filter, SimpleMutation
from pybrain.supervised.evolino.variate import CauchyVariate
from pybrain.supervised.evolino.population import SimplePopulation
from pybrain.tools.validation import Validator
from py... | bsd-3-clause | 4,108,481,745,914,322,400 | 31.57947 | 107 | 0.622828 | false |
Shrews/PyGerrit | webapp/django/contrib/localflavor/es/es_provinces.py | 436 | 1482 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('01', _('Arava')),
('02', _('Albacete')),
('03', _('Alacant')),
('04', _('Almeria')),
('05', _('Avila')),
('06', _('Badajoz')),
('07', _('Illes Balears')),
('08', _('Barcelona')),
(... | apache-2.0 | -4,091,995,794,632,070,700 | 24.551724 | 55 | 0.375169 | false |
abhiQmar/servo | tests/wpt/web-platform-tests/check_stability.py | 9 | 26373 | from __future__ import print_function
import argparse
import logging
import os
import re
import stat
import subprocess
import sys
import tarfile
import zipfile
from abc import ABCMeta, abstractmethod
from cStringIO import StringIO as CStringIO
from collections import defaultdict
from ConfigParser import RawConfigParse... | mpl-2.0 | -409,717,434,014,634,000 | 33.47451 | 136 | 0.591779 | false |
ryano144/intellij-community | python/lib/Lib/encodings/cp1253.py | 593 | 13350 | """ Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | apache-2.0 | -8,835,863,375,360,395,000 | 42.485342 | 119 | 0.545843 | false |
craynot/django | django/core/management/sql.py | 399 | 1890 | from __future__ import unicode_literals
from django.apps import apps
from django.db import models
def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_cascade=False):
"""
Returns a list of the SQL statements used to flush the database.
If only_django is True, then only table n... | bsd-3-clause | -6,653,575,909,798,016,000 | 36.8 | 101 | 0.667196 | false |
dpetzold/django | django/db/backends/sqlite3/operations.py | 106 | 10799 | from __future__ import unicode_literals
import datetime
import uuid
from django.conf import settings
from django.core.exceptions import FieldError, ImproperlyConfigured
from django.db import utils
from django.db.backends import utils as backend_utils
from django.db.backends.base.operations import BaseDatabaseOperatio... | bsd-3-clause | -5,279,970,971,052,905,000 | 41.853175 | 114 | 0.62904 | false |
alexallah/django | tests/template_tests/filter_tests/test_urlizetrunc.py | 105 | 3353 | from django.template.defaultfilters import urlizetrunc
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class UrlizetruncTests(SimpleTestCase):
@setup({
'urlizetrunc01': '{% autoescape off %}{{ a|urlizetrunc:"8" }} {{ b|urlizetrunc:"8" }}{% e... | bsd-3-clause | -3,866,723,017,620,179,500 | 35.053763 | 119 | 0.538324 | false |
mcanningjr/Wallflower | Wallflower_Client.py | 1 | 7796 | '''
This is the chat client wallflower; it connects currently to a server hosted by CaveFox Telecommunications; but that
can be changed to any server hosting the Wallflower_Server.py software package.
'''
import pickle
import requests
import time
import threading
import hashlib
message = ''
startpoint = 0
endpoint = 0
... | mit | 7,149,532,931,238,247,000 | 33.959641 | 126 | 0.51706 | false |
watonyweng/neutron | neutron/db/migration/alembic_migrations/dvr_init_opts.py | 32 | 2933 | # Copyright 2015 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 ... | apache-2.0 | 1,535,259,008,913,660,200 | 44.123077 | 78 | 0.607228 | false |
areski/django | tests/gis_tests/geogapp/tests.py | 20 | 6033 | """
Tests for geography support in PostGIS
"""
from __future__ import unicode_literals
import os
from unittest import skipUnless
from django.contrib.gis.db.models.functions import Area, Distance
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.measure import D
from django.test import TestCase, ign... | bsd-3-clause | 4,099,946,328,874,764,300 | 44.022388 | 105 | 0.65208 | false |
rishiloyola/bedrock | bedrock/mozorg/tests/test_context_processors.py | 29 | 1553 | # 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 http://mozilla.org/MPL/2.0/.
from django.test.client import RequestFactory
from bedrock.base.urlresolvers import reverse
from nose.tools import eq_
... | mpl-2.0 | 4,893,414,477,847,255,000 | 33.511111 | 69 | 0.642627 | false |
jdugge/QGIS | python/plugins/processing/script/ScriptUtils.py | 12 | 4991 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ScriptUtils.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************... | gpl-2.0 | 2,745,231,356,632,388,600 | 36.810606 | 211 | 0.584652 | false |
ChameleonCloud/horizon | openstack_dashboard/test/unit/test_error_pages.py | 10 | 1325 | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | -1,478,395,362,107,723,000 | 35.805556 | 78 | 0.646792 | false |
jesseditson/rethinkdb | test/rql_test/connections/http_support/werkzeug/testsuite/security.py | 145 | 4264 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.security
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the security helpers.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import unittest
from werkzeug.testsuite import WerkzeugTestCase
from werkzeug.securit... | agpl-3.0 | -6,947,125,455,598,610,000 | 39.609524 | 81 | 0.642589 | false |
vermouthmjl/scikit-learn | sklearn/metrics/classification.py | 1 | 69294 | """Metrics to assess performance on classification task given class prediction
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gramf... | bsd-3-clause | -5,425,747,752,748,870,000 | 37.031833 | 87 | 0.607037 | false |
pleaseproject/python-for-android | python3-alpha/python3-src/Lib/encodings/utf_32.py | 180 | 5128 | """
Python 'utf-32' Codec
"""
import codecs, sys
### Codec APIs
encode = codecs.utf_32_encode
def decode(input, errors='strict'):
return codecs.utf_32_decode(input, errors, True)
class IncrementalEncoder(codecs.IncrementalEncoder):
def __init__(self, errors='strict'):
codecs.IncrementalEncoder.__ini... | apache-2.0 | 5,326,642,413,882,388,000 | 33.186667 | 75 | 0.585998 | false |
ianblenke/awsebcli | ebcli/bundled/botocore/vendored/requests/compat.py | 114 | 2601 | # -*- coding: utf-8 -*-
"""
pythoncompat
"""
from .packages import chardet
import sys
# -------
# Pythons
# -------
# Syntax sugar.
_ver = sys.version_info
#: Python 2.x?
is_py2 = (_ver[0] == 2)
#: Python 3.x?
is_py3 = (_ver[0] == 3)
#: Python 3.0.x
is_py30 = (is_py3 and _ver[1] == 0)
#: Python 3.1.x
is_py31 =... | apache-2.0 | 7,107,110,945,369,011,000 | 21.617391 | 132 | 0.639369 | false |
w3nd1go/android_external_skia | platform_tools/android/gyp_gen/makefile_writer.py | 25 | 7208 | #!/usr/bin/python
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Functions for creating an Android.mk from already created dictionaries.
"""
import os
def write_group(f, name, items, append):
"""Helper function to list all n... | bsd-3-clause | 2,863,019,524,601,398,300 | 30.475983 | 80 | 0.626804 | false |
dmitriy0611/django | tests/urlpatterns_reverse/tests.py | 7 | 42428 | # -*- coding: utf-8 -*-
"""
Unit tests for reverse URL lookups.
"""
from __future__ import unicode_literals
import sys
import unittest
from admin_scripts.tests import AdminScriptTestCase
from django.conf import settings
from django.conf.urls import include
from django.contrib.auth.models import User
from django.core... | bsd-3-clause | 8,287,728,707,545,435,000 | 48.96702 | 240 | 0.623898 | false |
pombredanne/dateparser-1 | dateparser/conf.py | 1 | 2222 | # -*- coding: utf-8 -*-
from pkgutil import get_data
from yaml import load as load_yaml
"""
:mod:`dateparser`'s parsing behavior can be configured like below
*``PREFER_DAY_OF_MONTH``* defaults to ``current`` and can have ``first`` and ``last`` as values::
>>> from dateparser.conf import settings
>>> from da... | bsd-3-clause | -6,598,953,299,249,950,000 | 32.164179 | 179 | 0.628263 | false |
luiseduardohdbackup/odoo | addons/crm/crm_phonecall.py | 255 | 14844 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-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 | 1,431,875,314,257,003,000 | 47.990099 | 145 | 0.568243 | false |
ghxandsky/ceph-deploy | ceph_deploy/hosts/__init__.py | 2 | 5008 | """
We deal (mostly) with remote hosts. To avoid special casing each different
commands (e.g. using `yum` as opposed to `apt`) we can make a one time call to
that remote host and set all the special cases for running commands depending
on the type of distribution/version we are dealing with.
"""
import logging
from cep... | mit | 8,559,664,192,564,392,000 | 34.51773 | 115 | 0.650958 | false |
simbs/edx-platform | lms/djangoapps/courseware/management/commands/tests/test_dump_course.py | 44 | 9075 | # coding=utf-8
"""Tests for Django management commands"""
import json
from nose.plugins.attrib import attr
from path import Path as path
import shutil
from StringIO import StringIO
import tarfile
from tempfile import mkdtemp
import factory
from django.conf import settings
from django.core.management import call_comm... | agpl-3.0 | -7,990,228,996,075,651,000 | 37.385593 | 113 | 0.650844 | false |
phaustin/pythermo | code/thermlib/rootfinder.py | 1 | 1456 | #!/usr/bin/env python
import numpy
from scipy import optimize
def find_interval(f, x, *args):
x1 = x
x2 = x
if x == 0.:
dx = 1./50.
else:
dx = x/50.
maxiter = 40
twosqrt = numpy.sqrt(2)
a = x
fa = f(a, *args)
b = x
fb = f(b, *args)
for i in ran... | mit | -2,213,732,340,886,494,200 | 24.54386 | 81 | 0.565247 | false |
alexproca/askbot-devel | askbot/migrations/0095_postize_award_and_repute.py | 18 | 31809 | # encoding: utf-8
import sys
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from askbot.utils.console import ProgressBar
class Migration(DataMigration):
def forwards(self, orm):
# ContentType for Post model should be created no later than in migrati... | gpl-3.0 | -1,976,260,454,712,408,600 | 86.147945 | 226 | 0.557609 | false |
acarmel/CouchPotatoServer | libs/html5lib/filters/optionaltags.py | 1727 | 10500 | from __future__ import absolute_import, division, unicode_literals
from . import _base
class Filter(_base.Filter):
def slider(self):
previous1 = previous2 = None
for token in self.source:
if previous1 is not None:
yield previous2, previous1, token
previous2... | gpl-3.0 | -5,665,446,975,296,884,000 | 50.219512 | 83 | 0.542857 | false |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/examples/decomposition/plot_sparse_coding.py | 1 | 4054 | """
===========================================
Sparse coding with a precomputed dictionary
===========================================
Transform a signal as a sparse combination of Ricker wavelets. This example
visually compares different sparse coding methods using the
:class:`sklearn.decomposition.SparseCoder` esti... | mit | -4,793,937,489,532,785,000 | 39.949495 | 78 | 0.620375 | false |
txominpelu/airflow | airflow/jobs.py | 11 | 24429 | from builtins import str
from past.builtins import basestring
from collections import defaultdict
from datetime import datetime
import getpass
import logging
import signal
import socket
import subprocess
import sys
from time import sleep
from sqlalchemy import Column, Integer, String, DateTime, func, Index
from sqlalc... | apache-2.0 | 6,811,615,128,299,790,000 | 33.749644 | 80 | 0.527406 | false |
agiliq/django-graphos | graphos/renderers/flot.py | 1 | 3255 | import json
from .base import BaseChart
from ..utils import get_default_options, JSONEncoderForHTML
class BaseFlotChart(BaseChart):
""" LineChart """
def get_serieses(self):
# Assuming self.data_source.data is:
# [['Year', 'Sales', 'Expenses'], [2004, 100, 200], [2005, 300, 250]]
dat... | bsd-2-clause | 2,979,096,463,640,294,000 | 29.707547 | 142 | 0.589862 | false |
nammaste6/kafka | system_test/utils/setup_utils.py | 117 | 1848 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -7,173,650,353,860,619,000 | 38.319149 | 86 | 0.623377 | false |
bertucho/moviestalk2 | venv/Lib/encodings/mac_greek.py | 593 | 13977 | """ Python Character Mapping Codec mac_greek generated from 'MAPPINGS/VENDORS/APPLE/GREEK.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,err... | mit | -8,758,782,814,037,390,000 | 44.527687 | 112 | 0.555699 | false |
vbshah1992/microblog | flask/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py | 17 | 13150 | # sqlite/pysqlite.py
# Copyright (C) 2005-2012 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
"""Support for the SQLite database via pysqlite.
Note that pysqlite is the same dr... | bsd-3-clause | -8,966,660,639,384,612,000 | 39.58642 | 98 | 0.700228 | false |
NL66278/odoo | addons/google_account/controllers/main.py | 350 | 1270 | import simplejson
import urllib
import openerp
from openerp import http
from openerp.http import request
import openerp.addons.web.controllers.main as webmain
from openerp.addons.web.http import SessionExpiredException
from werkzeug.exceptions import BadRequest
import werkzeug.utils
class google_auth(http.Controller):... | agpl-3.0 | -5,090,882,520,698,320,000 | 38.6875 | 101 | 0.640945 | false |
repotvsupertuga/repo | plugin.video.TVsupertuga/resources/lib/zsources/xmovies.py | 4 | 4807 | # -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
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 l... | gpl-2.0 | 6,883,103,737,016,534,000 | 35.984615 | 141 | 0.527772 | false |
njase/numpy | numpy/distutils/command/build.py | 187 | 1618 | from __future__ import division, absolute_import, print_function
import os
import sys
from distutils.command.build import build as old_build
from distutils.util import get_platform
from numpy.distutils.command.config_compiler import show_fortran_compilers
class build(old_build):
sub_commands = [('config_cc', ... | bsd-3-clause | -1,218,521,762,569,333,000 | 33.425532 | 77 | 0.582818 | false |
georgyberdyshev/ascend | pygtk/canvas/asclibrary.py | 1 | 2535 | '''Import the SWIG wrapper'''
import os
DEFAULT_CANVAS_MODEL_LIBRARY_FOLDER = os.path.join('..','..','models','test','canvas')
try:
import ascpy
except ImportError as e:
print "Error: Could not load ASCEND Library. Please check the paths \
ASECNDLIBRARY and LD_LIBRARY_PATH\n",e
from blocktype import BlockType
from... | gpl-2.0 | 8,757,188,142,192,394,000 | 25.134021 | 86 | 0.657594 | false |
angelman/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py | 118 | 11747 | # Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of so... | bsd-3-clause | -8,330,437,472,421,778,000 | 44.180769 | 220 | 0.650549 | false |
crazy-cat/incubator-mxnet | example/speech-demo/train_lstm_proj.py | 25 | 13880 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -3,840,874,098,969,915,000 | 41.446483 | 147 | 0.596037 | false |
tectronics/open-ihm | src/openihm/gui/interface/frmproject_configure_wildfoodincome.py | 3 | 6232 | #!/usr/bin/env python
"""
This file is part of open-ihm.
open-ihm 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.
open-ihm is di... | lgpl-3.0 | -8,747,574,203,397,628,000 | 39.825503 | 105 | 0.608633 | false |
c2theg/DDoS_Information_Sharing | libraries/suds-jurko-0.6/suds/serviceproxy.py | 18 | 2838 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 in the hope that it will b... | mit | 1,272,644,993,432,399,600 | 34.475 | 88 | 0.636716 | false |
grupoprog3/proyecto_final | proyecto/flask/Lib/shutil.py | 1 | 41006 | """Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
import fnmatch
import collections
import errno
import tarfile
try:
import bz2
del bz2
_BZ2_SUPPORT... | apache-2.0 | -8,391,137,584,083,190,000 | 33.875766 | 86 | 0.583256 | false |
ChrisBeaumont/brut | bubbly/hyperopt.py | 2 | 2563 | """
A simple interface for random exploration of hyperparameter space
"""
import random
import numpy as np
from scipy import stats
from sklearn.metrics import auc
from sklearn import metrics as met
class Choice(object):
"""Randomly select from a list"""
def __init__(self, *choices):
self._choices = ... | mit | -6,405,223,350,560,046,000 | 25.978947 | 75 | 0.60359 | false |
Zhongqilong/mykbengineer | kbe/src/lib/python/Tools/scripts/fixdiv.py | 94 | 13938 | #! /usr/bin/env python3
"""fixdiv - tool to fix division operators.
To use this tool, first run `python -Qwarnall yourscript.py 2>warnings'.
This runs the script `yourscript.py' while writing warning messages
about all uses of the classic division operator to the file
`warnings'. The warnings look like this:
<fil... | lgpl-3.0 | -8,438,709,539,807,844,000 | 35.678947 | 84 | 0.600947 | false |
wbbeyourself/cn-deep-learning | ipnd-neural-network/NN.py | 6 | 2597 | import numpy as np
class NeuralNetwork(object):
def sigmoid(self, x):
return 1/(1 + np.exp(-x))
def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):
# Set number of nodes in input, hidden and output layers.
self.input_nodes = input_nodes
self.hidden_n... | mit | 2,306,840,412,373,380,000 | 38.348485 | 114 | 0.592992 | false |
EvilKanoa/ardupilot | libraries/AP_OpticalFlow/examples/ADNS3080ImageGrabber/ADNS3080ImageGrabber.py | 53 | 6246 | # File: ADNS3080ImageGrabber.py
import serial
import string
import math
import time
from Tkinter import *
from threading import Timer
comPort = 'COM8' #default com port
comPortBaud = 115200
class App:
grid_size = 15
num_pixels = 30
image_started = FALSE
image_current_row = 0;
se... | gpl-3.0 | 5,385,279,253,711,020,000 | 32.7 | 155 | 0.493276 | false |
CentOS-PaaS-SIG/linchpin | linchpin/provision/action_plugins/gcp_compute_network.py | 3 | 1255 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
import linchpin.MockUtils.MockUtils as mock_utils
class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
"""
Simple action plugin that returns th... | gpl-3.0 | -188,484,870,798,165,470 | 40.833333 | 74 | 0.588845 | false |
ubc/edx-ora2 | openassessment/assessment/worker/training.py | 10 | 12547 | """
Asynchronous tasks for training classifiers from examples.
"""
import datetime
from collections import defaultdict
from celery import task
from celery.utils.log import get_task_logger
from dogapi import dog_stats_api
from django.conf import settings
from django.db import DatabaseError
from openassessment.assessment... | agpl-3.0 | -6,288,596,473,735,781,000 | 38.831746 | 118 | 0.665657 | false |
westinedu/sovleit | django/test/simple.py | 150 | 15012 | import unittest as real_unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models import get_app, get_apps
from django.test import _doctest as doctest
from django.test.utils import setup_test_environment, teardown_test_environment
from django.test.testcases ... | bsd-3-clause | 7,682,456,547,900,616,000 | 39.354839 | 115 | 0.600853 | false |
jrabbit/compose | tests/unit/cli/command_test.py | 9 | 3080 | # ~*~ encoding: utf-8 ~*~
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import pytest
import six
from compose.cli.command import get_config_path_from_options
from compose.config.environment import Environment
from compose.const import IS_WINDOWS_PLATFORM
from tests import m... | apache-2.0 | -7,774,408,549,648,078,000 | 39.368421 | 99 | 0.603977 | false |
thingsinjars/electron | script/dump-symbols.py | 144 | 1962 | #!/usr/bin/env python
import os
import sys
from lib.config import PLATFORM
from lib.util import atom_gyp, execute, rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
CHROMIUM_DIR = os.path.join(... | mit | 4,067,839,435,665,491,500 | 29.65625 | 79 | 0.585627 | false |
tima/ansible | contrib/inventory/vmware.py | 92 | 18476 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
VMware Inventory Script
=======================
Retrieve information about virtual machines from a vCenter server or
standalone ESX host. When `group_by=false` (in the INI file), host systems
are also returned in addition to VMs.
This script will attempt to read conf... | gpl-3.0 | 6,765,515,105,445,990,000 | 38.144068 | 109 | 0.551472 | false |
Nachtfeuer/concept-py | tests/test_vector_2d.py | 1 | 5600 | """
=======
License
=======
Copyright (c) 2017 Thomas Lehmann
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 u... | mit | 1,367,165,466,636,440,300 | 43.8 | 93 | 0.629643 | false |
kickstandproject/python-ripcordclient | ripcordclient/tests/v1/test_subscriber.py | 1 | 2502 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 PolyBeacon, 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 applica... | apache-2.0 | 3,949,065,709,225,430,500 | 26.494505 | 76 | 0.581535 | false |
OpenDataNode/ckanext-odn-ic2pc-sync | ckanext/commands/publishing_cmd.py | 1 | 5849 | '''
Created on 30.10.2014
@author: mvi
'''
from ckan.lib.cli import CkanCommand
import sys
import logging
from ckanext.model.external_catalog import external_catalog_table,\
migrate_to_v0_3, migrate_to_v0_4, migrate_to_v0_6
log = logging.getLogger('ckanext')
class PublishingCmd(CkanCommand):
'''Pushes datas... | agpl-3.0 | 6,183,822,080,887,370,000 | 37.486842 | 94 | 0.574115 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/webapps/tool_shed/model/migrate/versions/0020_add_repository_type_column.py | 1 | 1608 | """Migration script to add the type column to the repository table."""
from sqlalchemy import *
from sqlalchemy.orm import *
from migrate import *
from migrate.changeset import *
# Need our custom types, but don't import anything else from model
from galaxy.model.custom_types import *
import sys, logging
log = loggi... | gpl-3.0 | 7,634,642,149,066,470,000 | 33.956522 | 84 | 0.698383 | 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.