repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
lz199144/python
refs/heads/master
renzongxian/0023/mysite/mysite/settings.py
40
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
wozz/electrum
refs/heads/clean
scripts/merchant/merchant.py
5
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
sidnarayanan/BAdNet
refs/heads/master
python/subtlenet/models/__init__.py
12133432
iansprice/wagtail
refs/heads/master
wagtail/wagtailadmin/tests/api/__init__.py
12133432
ujenmr/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/__init__.py
12133432
EricCline/CEM_inc
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/es_NI/__init__.py
12133432
tanmaythakur/django
refs/heads/master
tests/aggregation_regress/__init__.py
12133432
funkybob/formulation
refs/heads/master
formulation/templatetags/__init__.py
12133432
tudyzhb/yichui
refs/heads/master
django/contrib/localflavor/au/__init__.py
12133432
nicoddemus/pytest-xdist
refs/heads/master
setup.py
1
from setuptools import setup, find_packages install_requires = ["execnet>=1.1", "pytest>=6.0.0", "pytest-forked"] with open("README.rst") as f: long_description = f.read() setup( name="pytest-xdist", use_scm_version={"write_to": "src/xdist/_version.py"}, description="pytest xdist plugin for distribu...
Shopify/dd-agent
refs/heads/master
checks.d/etcd.py
1
# 3rd party import requests # project from checks import AgentCheck from util import headers class Etcd(AgentCheck): DEFAULT_TIMEOUT = 5 SERVICE_CHECK_NAME = 'etcd.can_connect' STORE_RATES = { 'getsSuccess': 'etcd.store.gets.success', 'getsFail': 'etcd.store.gets.fail', 'setsSu...
qisanstudio/qsapp-riitc
refs/heads/master
src/riitc/panel/staff.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from wtforms import validators from jinja2 import Markup from studio.core.engines import db from riitc.contrib.fields import ImageUploadField from riitc.contrib.image import thumbnail from riitc.models import LevelModel, StaffModel # from .forms import C...
wanderine/nipype
refs/heads/master
nipype/pipeline/engine.py
1
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Defines functionality for pipelined execution of interfaces The `Workflow` class provides core functionality for batch processing. Change directory to provide relative paths for doctests >>> impo...
meisterpeeps/grpc
refs/heads/master
src/python/src/grpc/_junkdrawer/__init__.py
1496
# Copyright 2015, 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 f...
fbcom/project-euler
refs/heads/master
070_totient_permutation.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # A Solution to "Totient permutation" – Project Euler Problem No. 70 # by Florian Buetow # # Sourcecode: https://github.com/fbcom/project-euler # Problem statement: https://projecteuler.net/problem=70 def is_permutation_of(n, m): n, m = str(n), str(m) if len(m) ...
MarcosCommunity/odoo
refs/heads/marcos-8.0
addons/website_google_map/controllers/__init__.py
728
import main
henriquejensen/marolo
refs/heads/master
setup_project.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- u"""Script para auxiliar instalação e manutenção do projeto.""" import os import glob import argparse from shutil import copy2 def repopulate_db(): u"""Repovoa banco de dados.""" delete_db() populate_db() def populate_db(): u"""Povoa banco de dados.""" ...
amith01994/intellij-community
refs/heads/master
python/testData/refactoring/pushdown/py346.before.py
83
class A: def meth_a1(self, name = {}): pass def meth_a2(self): pass class B(A): def meth_b1(self): pass def meth_b2(self): pass class D(A): def meth_d1(self): pass
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/network/vyos/vyos_banner.py
58
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
CrazeeIvan/namebench
refs/heads/master
nb_third_party/simplejson/tool.py
688
r"""Command-line tool to validate and pretty-print JSON Usage:: $ echo '{"json":"obj"}' | python -m simplejson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -m simplejson.tool Expecting property name: line 1 column 2 (char 2) """ import sys import simplejson as json def main(): ...
weaver-viii/h2o-3
refs/heads/master
h2o-py/tests/testdir_munging/pyunit_interaction.py
1
import sys sys.path.insert(1, "../../") import h2o def interaction_check(ip,port): # Connect to a pre-existing cluster iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris.csv")) # add a couple of factor columns to iris iris = iris.cbind(iris[4] == "Iris-setosa") iris[5] = iris[5].asf...
bagage/cadastre-conflation
refs/heads/master
back/batimap/citydto.py
1
from .db import City class CityDTO: name = None insee = None date = None josm_ready = False details = None def __init__(self, city: City): self.date = city.import_date self.name = city.name self.insee = city.insee self.details = city.import_details self...
ifduyue/sentry
refs/heads/master
tests/sentry/api/endpoints/test_organization_auth_provider_details.py
3
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import PermissionTestCase class OrganizationAuthProviderPermissionTest(PermissionTestCase): def setUp(self): super(OrganizationAuthProviderPermissionTest, self).setUp() self.path = reverse( ...
jakirkham/ilastik
refs/heads/master
ilastik/applets/labeling/labelingSingleLaneApplet.py
4
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
15Dkatz/pants
refs/heads/master
contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/future_compatibility_subsystem.py
18
# coding=utf-8 # Copyright 2015 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) from pants.contrib.p...
spinellic/Mission-Planner
refs/heads/master
Lib/distutils/command/install_headers.py
59
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" __revision__ = "$Id$" from distutils.core import Command # XXX force is never used class install_headers(Command): description = "install C/C+...
3nids/QGIS
refs/heads/master
python/core/additions/qgsgeometry.py
57
# -*- coding: utf-8 -*- """ *************************************************************************** qgsgeometry.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch *************************************...
bashrc/ZeroNet
refs/heads/master
src/util/Noparallel.py
13
import gevent import time class Noparallel(object): # Only allow function running once in same time def __init__(self, blocking=True): self.threads = {} self.blocking = blocking # Blocking: Acts like normal function else thread returned def __call__(self, func): def wrapper(*args, ...
mclaughlin6464/pylearn2
refs/heads/master
pylearn2/scripts/tests/yaml_testing.py
49
""" Methods for testing YAML files """ from pylearn2.utils.serial import load_train_file from pylearn2.termination_criteria import EpochCounter def limited_epoch_train(file_path, max_epochs=1): """ This method trains a given YAML file for a single epoch Parameters ---------- file_path : str ...
qhm123/the10000
refs/heads/master
mapreduce/lib/simplejson/scanner.py
77
#!/usr/bin/env python """JSON token scanner """ import re try: from mapreduce.lib.simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTI...
constKutsy/GeoWiki
refs/heads/master
.compit/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py
353
"""Module for supporting the lxml.etree library. The idea here is to use as much of the native library as possible, without using fragile hacks like custom element names that break between releases. The downside of this is that we cannot represent all possible trees; specifically the following are known to cause proble...
samanehsan/osf.io
refs/heads/develop
website/identifiers/utils.py
58
# -*- coding: utf-8 -*- import re FIELD_SEPARATOR = '\n' PAIR_SEPARATOR = ': ' def encode(match): return '%{:02x}'.format(ord(match.group())) def decode(match): return chr(int(match.group().lstrip('%'), 16)) def escape(value): return re.sub(r'[%:\r\n]', encode, value) def unescape(value): ret...
Noviat/odoo
refs/heads/8.0
addons/website_sale_options/tests/__init__.py
417
import test_customize
pfalcon/micropython
refs/heads/pfalcon
tests/basics/ordereddict2.py
1
# Call to OrderedDict constructor can be optimized and treated as # construction of literal OrderedDict object. This tests that there're # no obvious artifacts in such optimization. try: from collections import OrderedDict except ImportError: try: from ucollections import OrderedDict except ImportEr...
Nitaco/ansible
refs/heads/devel
test/units/modules/network/slxos/test_slxos_command.py
30
# # (c) 2018 Extreme Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
zhuwenping/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/tlslite/Checker.py
48
"""Class for post-handshake certificate checking.""" from .utils.cryptomath import hashAndBase64 from .X509 import X509 from .X509CertChain import X509CertChain from .errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handsha...
DavidGarciaCat/letsencrypt
refs/heads/master
certbot/tests/storage_test.py
4
"""Tests for certbot.storage.""" # pylint disable=protected-access import datetime import os import shutil import tempfile import unittest import configobj import mock import pytz from certbot import configuration from certbot import errors from certbot.storage import ALL_FOUR from certbot.tests import test_util C...
nick-thompson/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/filters/whitespace.py
1730
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/cloud/misc/terraform.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ryan Scott Brown <ryansb@redhat.com> # 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',...
zbyte64/django-dockit
refs/heads/master
dockit/tests/admin/common.py
1
from dockit import schema class ImageEntry(schema.Schema): caption = schema.CharField() image = schema.ImageField(upload_to='images') class SimpleSchema(schema.Schema): #TODO make a more complex testcase charfield = schema.CharField() gallery = schema.ListField(schema.SchemaField(ImageEntry)) class S...
robbiet480/home-assistant
refs/heads/dev
homeassistant/components/config/automation.py
14
"""Provide configuration end points for Automations.""" from collections import OrderedDict import uuid from homeassistant.components.automation import DOMAIN, PLATFORM_SCHEMA from homeassistant.components.automation.config import async_validate_config_item from homeassistant.config import AUTOMATION_CONFIG_PATH from ...
OneBitSoftware/jwtSample
refs/heads/master
src/Spa/env1/Lib/site-packages/flask/testsuite/examples.py
620
# -*- coding: utf-8 -*- """ flask.testsuite.examples ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the examples. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest from flask.testsuite import add_to_path def setup_path(): example_path = os.pat...
hdinsight/hue
refs/heads/master
desktop/core/ext-py/South-1.0.2/south/orm.py
119
""" South's fake ORM; lets you not have to write SQL inside migrations. Roughly emulates the real Django ORM, to a point. """ from __future__ import print_function import inspect from django.db import models from django.db.models.loading import cache from django.core.exceptions import ImproperlyConfigured from sout...
abstract-open-solutions/OCB
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
384
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
xaviercobain88/framework-python
refs/heads/master
openerp/addons/l10n_ma/__openerp__.py
170
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010 kazacube (http://kazacube.com). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
jszwedko/moto
refs/heads/master
tests/test_rds2/test_server.py
21
from __future__ import unicode_literals import sure # noqa import moto.server as server from moto import mock_rds2 ''' Test the different server responses ''' #@mock_rds2 #def test_list_databases(): # backend = server.create_backend_app("rds2") # test_client = backend.test_client() # # res = test_client....
programadorjc/django
refs/heads/master
tests/template_tests/syntax_tests/test_i18n.py
245
# coding: utf-8 from __future__ import unicode_literals from django.template import TemplateSyntaxError from django.test import SimpleTestCase from django.utils import translation from django.utils.safestring import mark_safe from ..utils import setup class I18nTagTests(SimpleTestCase): libraries = { 'c...
sjlehtin/django
refs/heads/master
django/db/models/constants.py
954
""" Constants used across the ORM in general. """ # Separator used to split filter strings apart. LOOKUP_SEP = '__'
alephu5/Soundbyte
refs/heads/master
environment/lib/python3.3/site-packages/pandas/stats/tests/test_math.py
1
import nose from datetime import datetime from numpy.random import randn import numpy as np from pandas.core.api import Series, DataFrame, date_range from pandas.util.testing import assert_almost_equal import pandas.core.datetools as datetools import pandas.stats.moments as mom import pandas.util.testing as tm import...
half-ogre/go-buildpack
refs/heads/master
vendor/virtualenv-1.11.6/virtualenv_embedded/activate_this.py
669
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
jlcarmic/producthunt_simulator
refs/heads/master
venv/lib/python2.7/site-packages/numpy/core/tests/test_multiarray.py
12
from __future__ import division, absolute_import, print_function import collections import tempfile import sys import shutil import warnings import operator import io import itertools if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins from decimal import Decimal import numpy as...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons/website/__init__.py
490
import controllers import models import tests
apache/incubator-airflow
refs/heads/master
tests/api_connexion/endpoints/test_variable_endpoint.py
6
# 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...
simudream/PyDev.Debugger
refs/heads/development
pydevd_attach_to_process/winappdbg/thread.py
100
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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 ...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/override/returnAnnotation_after.py
83
class A(): def some_method(self) -> "return value": pass class B(A): def some_method(self) -> "return value": <selection>super().some_method()</selection>
switowski/invenio
refs/heads/master
invenio/ext/sqlalchemy/types/legacysmallinteger.py
17
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
michhar/flask-webapp-aml
refs/heads/master
env1/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py
1730
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
SoftwareDefinedBuildings/smap
refs/heads/master
python/tx/ipv6/internet/address6.py
6
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. # # Exceedingly minor changes by B. A. Shelton, zancarius@gmail.com # !!! Do not blame Twisted Matrix Laboratories if using this monkey patch breaks # your application. !!! # # This file is based ...
erikr/django
refs/heads/master
django/contrib/postgres/validators.py
115
import copy from django.core.exceptions import ValidationError from django.core.validators import ( MaxLengthValidator, MaxValueValidator, MinLengthValidator, MinValueValidator, ) from django.utils.deconstruct import deconstructible from django.utils.translation import ugettext_lazy as _, ungettext_lazy clas...
10clouds/edx-platform
refs/heads/dev
openedx/core/djangoapps/content/course_structures/signals.py
92
""" Django Signals classes and functions for the Course Structure application """ from django.dispatch.dispatcher import receiver from xmodule.modulestore.django import SignalHandler from .models import CourseStructure @receiver(SignalHandler.course_published) def listen_for_course_publish(sender, course_key, **kwa...
jkandasa/integration_tests
refs/heads/master
scripts/azure_cleanup.py
1
import argparse import sys import traceback as tb from datetime import datetime from cfme.utils.path import log_path from cfme.utils.providers import list_provider_keys, get_mgmt def parse_cmd_line(): parser = argparse.ArgumentParser(argument_default=None) parser.add_argument('--nic-template', ...
dhanunjaya/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py
32
# Copyright 2015 Huawei Technologies India Pvt Ltd, 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 ...
echopen/PRJ-medtec_sigproc
refs/heads/master
echopen-leaderboard/bootcamp/leaderboard/manage.py
194
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mhotwagner/abackend
refs/heads/master
abackend-env/lib/python3.5/site-packages/django/contrib/gis/sitemaps/__init__.py
769
# Geo-enabled Sitemap classes. from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap __all__ = ['KMLSitemap', 'KMZSitemap']
heyfaraday/CMB_test
refs/heads/master
gen_4.py
1
from math import sqrt, pi, sin, cos import numpy as np from lib.fourier import direct_f from lib.minkowski import length, area, type_points L_max_field = 40 L_max_polynom = 40 L_max_back = 40 N = 1028 surf = open('gen_4_dir/surf.dat', 'w') le = open('gen_4_dir/len.dat', 'w') nmax = open('gen_4_dir/max.dat', 'w') nmin...
raqqun/tweetcommander
refs/heads/master
packages/requests/exceptions.py
276
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ class RequestException(RuntimeError): """There was an ambiguous exception that occurred while handling your request.""" class HTTPError(RequestException): """An HTTP error occ...
gameduell/dask
refs/heads/master
dask/array/wrap.py
3
from __future__ import absolute_import, division, print_function from functools import partial from itertools import product import numpy as np from toolz import curry from ..base import tokenize from .core import Array, normalize_chunks from .numpy_compat import full def dims_from_size(size, blocksize): """ ...
alsotoes/vsphere-examples
refs/heads/master
python/.venv/lib/python2.6/site-packages/pip/_vendor/html5lib/trie/datrie.py
1301
from __future__ import absolute_import, division, unicode_literals from datrie import Trie as DATrie from pip._vendor.six import text_type from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): chars = set() for key in data.keys(): if not isinstance(key, te...
bdh1011/cupeye
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/tests/py26compat.py
132
import sys import tarfile import contextlib def _tarfile_open_ex(*args, **kwargs): """ Extend result as a context manager. """ return contextlib.closing(tarfile.open(*args, **kwargs)) if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2): tarfile_open = _tarfile_open_ex else: tarfile...
edx/edx-e2e-tests
refs/heads/master
regression/pages/whitelabel/dashboard_page.py
1
""" Student dashboard page. """ import os from opaque_keys.edx.keys import CourseKey from edxapp_acceptance.pages.lms.dashboard import DashboardPage from regression.pages.whitelabel import LMS_URL_WITH_AUTH from regression.pages.whitelabel.const import DEFAULT_TIMEOUT class DashboardPageExtended(DashboardPage): ...
cntnboys/410Lab6
refs/heads/master
build/django/tests/custom_pk/tests.py
53
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import transaction, IntegrityError from django.test import TestCase, skipIfDBFeature from django.utils import six from .models import Employee, Business, Bar, Foo class CustomPKTests(TestCase): def test_custom_pk(self): dan =...
soad241/django-haystack
refs/heads/master
tests/site_registration_settings.py
4
import os from settings import * INSTALLED_APPS += [ 'site_registration', ] HAYSTACK_SITECONF = 'site_registration.search_sites' HAYSTACK_SEARCH_ENGINE = 'whoosh' HAYSTACK_WHOOSH_PATH = os.path.join('tmp', 'test_whoosh_query') HAYSTACK_INCLUDE_SPELLING = True
ml-lab/pylearn2
refs/heads/master
pylearn2/scripts/icml_2013_wrepl/multimodal/extract_layer_2_kmeans_features.py
5
import numpy as np import os import sys from pylearn2.utils import serial from pylearn2.utils import sharedX from pylearn2.utils.string_utils import preprocess def usage(): print """ Run python extract_layer_2_kmeans_features.py public_test to extract features for the ICML 2013 multimodal learning contest's publi...
RouxRC/weboob
refs/heads/master
modules/banquepopulaire/pages.py
2
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob 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 opti...
awilliam/qemu-kvm
refs/heads/pci-assign-msix
scripts/ordereddict.py
1047
# Copyright (c) 2009 Raymond Hettinger # # 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, merge, # publish,...
ruiting/opencog
refs/heads/master
opencog/python/blending/src/connector/equal_link_key.py
22
from opencog.atomspace import Handle __author__ = 'DongMin Kim' class EqualLinkKey: """Defines the custom unique key of link to evaluate whether links are duplicate or not. Links are treated as duplicated link if they have same properties below: 1. link type, 2. outgoing list(and its order), ...
throwable-one/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/localflavor/pt/__init__.py
12133432
liorvh/infernal-twin
refs/heads/master
build/pillow/PIL/WebPImagePlugin.py
52
from PIL import Image from PIL import ImageFile from io import BytesIO from PIL import _webp _VALID_WEBP_MODES = { "RGB": True, "RGBA": True, } _VP8_MODES_BY_IDENTIFIER = { b"VP8 ": "RGB", b"VP8X": "RGBA", b"VP8L": "RGBA", # lossless } def _accept(prefix): is_riff_file_format = pre...
pexip/os-gyp
refs/heads/master
test/win/gyptest-link-profile.py
213
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
sjb3/python_koans
refs/heads/master
python2/koans/about_with_statements.py
69
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutSandwichCode in the Ruby Koans # from runner.koan import * import re # For regular expression string comparisons class AboutWithStatements(Koan): def count_lines(self, file_name): try: f = open(file_name) try: ...
CyanogenMod/android_external_chromium_org
refs/heads/cm-12.0
build/android/gyp/zip.py
124
#!/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. """Archives a set of files. """ import optparse import sys from util import build_utils def main(): parser = optparse.OptionPars...
xieta/mincoin
refs/heads/master
qa/rpc-tests/wallet.py
2
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2014-2019 The Mincoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import MincoinTe...
jpetto/olympia
refs/heads/master
media/__init__.py
12133432
willingc/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/expressions_regress/__init__.py
12133432
tswsl1989/Minecraft-Overviewer
refs/heads/master
overviewer_core/aux_files/__init__.py
12133432
ryfeus/lambda-packs
refs/heads/master
Selenium_PhantomJS/source/botocore/vendored/__init__.py
12133432
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/south/south/tests/non_managed/__init__.py
12133432
Kiiv/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/_base/providers/automation/__init__.py
12133432
PyCQA/isort
refs/heads/main
tests/unit/profiles/test_pycharm.py
1
from functools import partial from ..utils import isort_test pycharm_isort_test = partial(isort_test, profile="pycharm") def test_pycharm_snippet_one(): pycharm_isort_test( """import shutil import sys from io import StringIO from pathlib import Path from typing import ( Optional, TextIO, Uni...
mc-coal/mc-coal
refs/heads/master
lib/unidecode/x0d3.py
253
data = ( 'tim', # 0x00 'tib', # 0x01 'tibs', # 0x02 'tis', # 0x03 'tiss', # 0x04 'ting', # 0x05 'tij', # 0x06 'tic', # 0x07 'tik', # 0x08 'tit', # 0x09 'tip', # 0x0a 'tih', # 0x0b 'pa', # 0x0c 'pag', # 0x0d 'pagg', # 0x0e 'pags', # 0x0f 'pan', # 0x10 'panj', # 0x11 ...
willingc/pip
refs/heads/develop
pip/_vendor/progress/helpers.py
521
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE A...
fxsjy/galaxy
refs/heads/master2
console/backend/src/console/cluster/urls.py
3
# -*- coding:utf-8 -*- # Copyright (c) 2015, Galaxy Authors. All Rights Reserved # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Author: wangtaize@baidu.com # Date: 2015-04-01 from django.conf import urls urlpatterns = urls.patterns("console.cluster.views", ...
brett-patterson/pyface
refs/heads/master
pyface/ui/qt4/util/__init__.py
12133432
openpli-arm/enigma2-arm
refs/heads/master
lib/python/Plugins/SystemPlugins/__init__.py
12133432
dslomov/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/DecreaseIndent.dst.py
83
class C: def foo(self): x = 1 y = 2 <caret>
etherkit/OpenBeacon2
refs/heads/master
macos/venv/lib/python3.8/site-packages/pip/_internal/network/lazy_wheel.py
10
"""Lazy ZIP over HTTP""" __all__ = ['HTTPRangeRequestUnsupported', 'dist_from_wheel_url'] from bisect import bisect_left, bisect_right from contextlib import contextmanager from tempfile import NamedTemporaryFile from zipfile import BadZipfile, ZipFile from pip._vendor.requests.models import CONTENT_CHUNK_SIZE from ...
mr-niels-christensen/environment-scotland-dot-rural
refs/heads/master
src/main/rdflib/plugins/parsers/pyMicrodata/registry.py
21
# -*- coding: utf-8 -*- """ Hardcoded version of the current microdata->RDF registry. There is also a local registry to include some test cases. Finally, there is a local dictionary for prefix mapping for the registry items; these are the preferred prefixes for those vocabularies, and are used to make the output nicer...
jamesmfriedman/django-primer
refs/heads/master
primer/media/templatetags/__init__.py
12133432
neilLasrado/erpnext
refs/heads/develop
erpnext/crm/report/lead_details/__init__.py
12133432
brandond/ansible
refs/heads/devel
lib/ansible/modules/network/netvisor/__init__.py
12133432