repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
nrwahl2/ansible
refs/heads/devel
lib/ansible/module_utils/f5_utils.py
31
# # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # An...
linaro-technologies/jobserv
refs/heads/master
jobserv/worker.py
1
# Copyright (C) 2017 Linaro Limited # Author: Andy Doan <andy.doan@linaro.org> import logging import os import time from jobserv.models import db, BuildStatus, Run, Worker from jobserv.stats import CarbonClient logging.basicConfig( level='INFO', format='%(asctime)s %(levelname)s: %(message)s') log = logging.getL...
McNetic/CouchPotatoServer-de
refs/heads/master
libs/guessit/transfo/guess_idnumber.py
102
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
liangazhou/django-rdp
refs/heads/master
packages/Django-1.8.6/build/lib/django/conf/locale/ta/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i A' # D...
octopus-platform/joern
refs/heads/dev
projects/octopus/python/octopus-tools/octopus/shelltool/ResultProcessor.py
2
#!/usr/bin/env python3 class BaseResultProcessor: def __init__(self, result): self.result = result @staticmethod def value(element,key): prop = element['properties'].get(key,[]) if len(prop) == 0: return None return prop[0]['value'] @staticmethod def id(e...
stven/headphones
refs/heads/develop
lib/requests/packages/chardet2/eucjpprober.py
25
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. ...
lucasjoao/exercism_python
refs/heads/master
allergies/allergies.py
1
db = {1: 'eggs', 2: 'peanuts', 4: 'shellfish', 8: 'strawberries', 16: 'tomatoes', 32: 'chocolate', 64: 'pollen', 128: 'cats'} class Allergies: def __init__(self, score): self.lst = self.define_allergies(score) def is_allergic_to(self, thing): return t...
jotes/ansible-modules-core
refs/heads/devel
cloud/amazon/ec2_elb_lb.py
40
#!/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 distributed...
MSOpenTech/edx-platform
refs/heads/master
lms/startup.py
14
""" Module for code that should run during LMS startup """ # pylint: disable=unused-argument from django.conf import settings # Force settings to run so that the python path is modified settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import edxm...
rob356/SickRage
refs/heads/master
sickbeard/metadata/helpers.py
19
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
excid3/chromium
refs/heads/master
spu/tilesort/generator.py
2
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys, os sys.path.append( "../../glapi_parser" ) import apiutil # "mode" is source, header, or table mode = sys.argv[1] keys = apiutil.GetDispatchedFunctions("../../gl...
switchboardOp/ansible
refs/heads/devel
test/units/cli/test_cli.py
75
# (c) 2017, Adrian Likins <alikins@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
jacquev6/MockMockMock
refs/heads/master
MockMockMock/__init__.py
1
# coding: utf8 # Copyright 2013-2015 Vincent Jacques <vincent@vincent-jacques.net> import unittest class MockException(Exception): """ @todoc """ from .expectation_grouping import OrderedExpectationGroup, UnorderedExpectationGroup, AtomicExpectationGroup, OptionalExpectationGroup, AlternativeExpectatio...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/__init__.py
1777
######################## BEGIN LICENSE BLOCK ######################## # 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 ve...
rothnic/bokeh
refs/heads/master
examples/compat/ggplot/line.py
34
from ggplot import aes, geom_line, ggplot, meat import matplotlib.pyplot as plt from bokeh import mpl from bokeh.plotting import output_file, show g = ggplot(aes(x='date', y='beef'), data=meat) + geom_line() g.draw() plt.title("Line ggplot-based plot in Bokeh.") output_file("line.html") show(mpl.to_bokeh())
Jgarcia-IAS/SITE
refs/heads/master
addons/purchase/edi/purchase_order.py
439
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
felipenaselva/felipe.repository
refs/heads/master
script.module.chardet/lib/chardet/version.py
240
""" This module exists only to simplify retrieving the version number of chardet from within setup.py and from chardet subpackages. :author: Dan Blanchard (dan.blanchard@gmail.com) """ __version__ = "3.0.4" VERSION = __version__.split('.')
sanjeevtripurari/hue
refs/heads/master
desktop/core/ext-py/South-1.0.2/south/management/commands/schemamigration.py
94
""" Startmigration command, version 2. """ from __future__ import print_function import sys import os import re import string import random import inspect from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.c...
fs714/drcontroller
refs/heads/master
tools/taskflow/simple_task_eventlet.py
1
import logging from taskflow import engines from taskflow.patterns import linear_flow, unordered_flow from simple_task import AnsibleTask import eventlet eventlet.patcher.monkey_patch(all=True) def func(): hosts = ['10.175.150.16'] module_name = 'shell' module_args = 'echo "Hello World"' pattern = '...
xorgy/packagekit
refs/heads/master
backends/smart/smartBackend.py
2
#!/usr/bin/python # Licensed under the GNU General Public License Version 2 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later ver...
pablovirolainen/fMBT
refs/heads/master
utils/lsts.py
8
#!/usr/bin/env python # Copyright (c) 2006-2010 Tampere University of Technology # # 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 righ...
fxia22/ASM_xf
refs/heads/master
PythonD/site_python/twisted/test/test_http.py
2
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in th...
da1z/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/template/loaders/filesystem.py
229
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, temp...
lammps/lammps
refs/heads/master
python/examples/mc.py
7
#!/usr/bin/env python -i # preceding line should have path for Python on your machine # mc.py # Purpose: mimic operation of example/MC/in.mc via Python # Syntax: mc.py in.mc # in.mc = LAMMPS input script from __future__ import print_function import sys,random,math # set these parameters # make sure neigh s...
kevinmel2000/brython
refs/heads/master
www/benchmarks/performance/bm_html5lib.py
18
#!/usr/bin/env python """Wrapper script for testing the performance of the html5lib HTML 5 parser. The input data is the spec document for HTML 5, written in HTML 5. The spec was pulled from http://svn.whatwg.org/webapps/index. """ #from __future__ import with_statement __author__ = "collinwinter@google.com (Collin...
kevin-coder/tensorflow-fork
refs/heads/master
tensorflow/contrib/gan/python/train_test.py
13
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
evodify/genotype-files-manipulations
refs/heads/master
Ensembl.dat-to-topGO.db.py
1
#! /usr/bin/env python2 ''' This script converts the Ensembl.dat file to the GO reference file used in the topGO R program. #Example input: ID 1 standard; DNA; HTG; 122678785 BP. XX AC chromosome:CanFam3.1:1:1:122678785:1 XX SV 1.CanFam3.1 XX DT 4-SEP-2018 XX DE Canis lupus familiaris chromosome 1 CanFam...
jiachenning/odoo
refs/heads/8.0
openerp/addons/test_inherit/__init__.py
2074
# -*- coding: utf-8 -*- import models # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
mcmdhr/CSOJ
refs/heads/master
utils/captcha/views.py
7
# coding=utf-8 from django.http import HttpResponse from utils.captcha import Captcha def show_captcha(request): return HttpResponse(Captcha(request).display(), content_type="image/gif")
krintoxi/NoobSec-Toolkit
refs/heads/master
NoobSecToolkit - MAC OSX/tools/inject/plugins/dbms/mysql/filesystem.py
9
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import isNumPosStrValue from lib.core.common import isTechniqueAvailable from lib.core.common import popValue from lib.core.common import pushValue from l...
URXtech/scrapy
refs/heads/master
scrapy/http/headers.py
132
import six from w3lib.http import headers_dict_to_raw from scrapy.utils.datatypes import CaselessDict class Headers(CaselessDict): """Case insensitive http headers dictionary""" def __init__(self, seq=None, encoding='utf-8'): self.encoding = encoding super(Headers, self).__init__(seq) de...
BrownDwarf/Starfish
refs/heads/master
tests/__init__.py
12
__author__ = 'ian'
ApuliaSoftware/odoo
refs/heads/8.0
addons/base_import/models.py
222
import csv import itertools import logging import operator try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import psycopg2 from openerp.osv import orm, fields from openerp.tools.translate import _ FIELDS_RECURSION_LIMIT = 2 ERROR_PREVIEW_BYTES = 200 _logger = logging.ge...
pangweishen/rt-thread
refs/heads/master
bsp/upd70f3454/rtconfig.py
36
import os # toolchains options ARCH = 'v850' CPU = '70f34' CROSS_TOOL = 'iar' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': print '================ERROR============================' print 'Not support gcc yet!' print '=======================================...
openstack/cinder
refs/heads/master
cinder/transfer/__init__.py
45
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P. # 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/LICEN...
fernandopcg/pymputator
refs/heads/master
src/requests/packages/urllib3/util/url.py
82
from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value for :func:`parse_url`. """ s...
rfguri/vimfiles
refs/heads/master
bundle/ycm/third_party/pythonfutures/concurrent/futures/thread.py
89
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Implements ThreadPoolExecutor.""" from __future__ import with_statement import atexit import threading import weakref import sys from concurrent.futures import _base try: import queue except ImportError: ...
rawodb/bitcoin
refs/heads/master
test/functional/wallet_encryption.py
16
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Wallet encryption""" import time from test_framework.test_framework import BitcoinTestFramework ...
kdaily/altanalyze
refs/heads/master
misopy/parse_csv.py
4
## ## Helper functions for parsing csv files ## ## Yarden Katz, Sept 7, 2009 ## from numpy import * from scipy import * import time import csv def dictlist2csv(filename, dictlist, header_fields, delimiter='\t'): """ Serialize a list of dictionaries into the output """ str_header_fields = [str(f) for f...
0jpq0/kbengine
refs/heads/master
kbe/src/lib/python/Lib/asyncio/events.py
61
"""Event loop and event loop policy.""" __all__ = ['AbstractEventLoopPolicy', 'AbstractEventLoop', 'AbstractServer', 'Handle', 'TimerHandle', 'get_event_loop_policy', 'set_event_loop_policy', 'get_event_loop', 'set_event_loop', 'new_event_loop', 'get_child_watcher...
Viktor-Evst/fixed-luigi
refs/heads/master
test/contrib/hdfs_test.py
18
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
joeyjojo/django_offline
refs/heads/master
src/django/utils/dateformat.py
82
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print df.format('jS F Y H:i') 7th October 2003 11:39 >>> """ import re import time import calendar import datetime from django.utils.dates import M...
cp16net/virgo-base
refs/heads/master
deps/breakpad/src/third_party/protobuf/protobuf/python/setup.py
226
#! /usr/bin/python # # See README for usage instructions. # We must use setuptools, not distutils, because we need to use the # namespace_packages option for the "google" package. from ez_setup import use_setuptools use_setuptools() from setuptools import setup, Extension from distutils.spawn import find_executable i...
matt-gardner/deep_qa
refs/heads/master
deep_qa/layers/attention/gated_attention.py
4
from keras import backend as K from overrides import overrides from ..masked_layer import MaskedLayer from ...common.checks import ConfigurationError from ...tensors.backend import switch GATING_FUNCTIONS = ["*", "+", "||"] class GatedAttention(MaskedLayer): r""" This layer implements the majority of the Ga...
defionscode/ansible
refs/heads/devel
lib/ansible/modules/network/junos/junos_config.py
22
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
schambers/civmarket
refs/heads/master
civmarket/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/compiler.py
120
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.mysql import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): def resolve_columns(self, row, fields=()): """ Integrate the cases hand...
nelmiux/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/test/inspect_fodder.py
85
# line 1 'A module docstring.' import sys, inspect # line 5 # line 7 def spam(a, b, c, d=3, (e, (f,))=(4, (5,)), *g, **h): eggs(b + d, c + f) # line 11 def eggs(x, y): "A docstring." global fr, st fr = inspect.currentframe() st = inspect.stack() p = x q = y // 0 # line 20 class StupidGit...
stscieisenhamer/ginga
refs/heads/master
ginga/misc/Timer.py
1
# # Timer.py -- GUI independent timers. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function import time import threading from ginga.misc import Bunch, Callback from ginga.util.heaptimer import Timer as HeapTimer, TimerHea...
craftandtheory/ardupilot
refs/heads/master
Tools/autotest/__init__.py
96
"""Autotests tools suite"""
mlperf/training_results_v0.6
refs/heads/master
Google/benchmarks/ssd/implementations/tpu-v3-2048-ssd/mlp_log/__init__.py
31
"""MLP Logging."""
greggyNapalm/lunaport_client
refs/heads/master
lunaport_client/exceptions.py
1
# -*- encoding: utf-8 -*- """ exceptions for Lunaport client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xxx """ import pprint pp = pprint.PrettyPrinter(indent=4) class LunaportClientError(Exception): def __init__(self, msg, url=None, status_code=None, resp_body=None, orig_e=None, resp_obj=None)...
d120/kifplan
refs/heads/master
kiffel/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-14 01:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0007_alter_validators_add_error_messages'), ] operations...
mglukhikh/intellij-community
refs/heads/master
python/helpers/pydev/third_party/wrapped_for_pydev/ctypes/macholib/framework.py
320
""" Generic framework path manipulation """ import re __all__ = ['framework_info'] STRICT_FRAMEWORK_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ """) def framework_info(filename):...
GinnyN/towerofdimensions-django
refs/heads/master
django-allauth/allauth/socialaccount/providers/linkedin/views.py
3
from xml.etree import ElementTree from xml.parsers.expat import ExpatError from django.contrib.auth.models import User from allauth.socialaccount.providers.oauth.client import OAuth from allauth.socialaccount.providers.oauth.views import (OAuthAdapter, OAuthLog...
0xMF/pelican-plugins
refs/heads/master
multi_part/__init__.py
76
from .multi_part import *
mdanielwork/intellij-community
refs/heads/master
python/testData/refactoring/extractsuperclass/multifile/a/b/foo.py
83
# existing module A = 1
aleksandr-bakanov/astropy
refs/heads/master
astropy/coordinates/builtin_frames/fk4_fk5_transforms.py
12
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from astropy.coordinates.baseframe import frame_transform_graph from astropy.coordinates.transformations import DynamicMatrixTransform from astropy.coordinates.matrix_utilities import matrix_product, matrix_tra...
systemovich/scrapy
refs/heads/master
scrapy/tests/test_utils_sitemap.py
7
import unittest from scrapy.utils.sitemap import Sitemap, sitemap_urls_from_robots class SitemapTest(unittest.TestCase): def test_sitemap(self): s = Sitemap("""<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> <url> <loc>http://www.example.com/</loc>...
grivescorbett/heroku-buildpack-python
refs/heads/master
vendor/pip-pop/pip/req/req_uninstall.py
249
from __future__ import absolute_import import logging import os import sys import tempfile from pip.compat import uses_pycache, WINDOWS, cache_from_source from pip.exceptions import UninstallationError from pip.utils import (rmtree, ask, is_local, dist_is_local, renames, normalize_path) from pi...
linuxmaniac/jenkins-job-builder
refs/heads/master
jenkins_jobs/version.py
46
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC # Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the Lice...
wikimedia/labs-tools-wikibugs2
refs/heads/master
manage.py
1
import shlex import sys import click import socket import subprocess tool_name = 'wikibugs' home_dir = '/data/project/{}'.format(tool_name) code_dir = '{}/libera'.format(home_dir) python = '{}/py35-stretch/bin/python'.format(home_dir) job_definitions = { 'libera-phab': [python, code_dir + '/wikibugs.py', '--log...
RichIsMyName/PicklingToolsRepo
refs/heads/master
Xm/ptools161/python/midastalker.py
2
''' A MidasTalker is a client which talks to a server using sockets. This module exists to allow a simplified interface to talk to a Midas system, whether talking to an M2k OpalPythonDaemon or the the MidasServer in either C++ or Python. Most problems when using the MidasTalker are due to socket problems (wrong host ...
EricMuller/mywebmarks-backend
refs/heads/master
requirements/twisted/Twisted-17.1.0/src/twisted/test/test_fdesc.py
13
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.fdesc}. """ import os, sys import errno try: import fcntl except ImportError: skip = "not supported on this platform" else: from twisted.internet import fdesc from twisted.python.util import untilCon...
spotify/luigi
refs/heads/master
luigi/contrib/hdfs/__init__.py
4
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/string_format_error.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
NetApp/cinder
refs/heads/master
cinder/volume/drivers/dell/dell_storagecenter_api.py
3
# Copyright 2016 Dell 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 or agree...
wicky-info/mcrouter
refs/heads/master
mcrouter/test/test_const_shard_hash.py
3
# Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from __future__ import absolute...
pybrain/pybrain
refs/heads/master
pybrain/tests/unittests/structure/networks/test_swiping_network.py
31
""" Build a 2-dimensional BorderSwipingNetwork: >>> n = buildSwipingNetwork(2) Check its gradient: >>> from pybrain.tests import gradientCheck >>> gradientCheck(n) Perfect gradient True Try writing it to an xml file, reread it and determine if it looks the same: >>> from pybrain.tests impo...
QuantConnect/pythonnet
refs/heads/master
src/embed_tests/fixtures/PyImportTest/test/one.py
14224
# -*- coding: utf-8 -*-
vmindru/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/_os_server_actions.py
61
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, 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', ...
kjc/python_koans
refs/heads/master
python2/koans/about_decorating_with_classes.py
97
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import functools class AboutDecoratingWithClasses(Koan): def maximum(self, a, b): if a > b: return a else: return b def test_partial_that_wrappers_no_args(self): """ Before we can...
CitrineInformatics/pypif
refs/heads/develop
docs/src/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pypif documentation build configuration file, created by # sphinx-quickstart on Mon Jan 23 09:27:47 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
Antiun/c2c-rd-addons
refs/heads/8.0
chricar_sale_internal_shippment/wizard/__init__.py
4
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # ...
mhdella/scikit-learn
refs/heads/master
sklearn/externals/joblib/my_exceptions.py
289
""" Exceptions """ # Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org > # Copyright: 2010, Gael Varoquaux # License: BSD 3 clause import sys class JoblibException(Exception): """A simple exception with an error message that you can get to.""" def __init__(self, *args): self.args = a...
mason-bially/windows-installer
refs/heads/master
packages/_7zip_x64/_7zip_x64.py
1
''' Created on Sep 23, 2011 @author: bucherj ''' from ..defaultpackage.package import Package class _7zip_x64(Package): def __init__(self): Package.__init__(self)
slank/ansible
refs/heads/devel
lib/ansible/modules/system/getent.py
48
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Brian Coca <brian.coca+dev@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...
SteveHNH/ansible
refs/heads/devel
lib/ansible/plugins/test/__init__.py
673
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type
Yangqing/caffe2
refs/heads/master
caffe2/python/operator_test/record_queue_test.py
4
# Copyright (c) 2016-present, Facebook, 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 or agreed...
getsentry/django-social-auth
refs/heads/master
social_auth/backends/contrib/fedora.py
14
from social.backends.fedora import FedoraOpenId as FedoraBackend
mumer92/libgdx
refs/heads/master
extensions/gdx-freetype/jni/freetype-2.5.5/src/tools/docmaker/docbeauty.py
877
#!/usr/bin/env python # # DocBeauty (c) 2003, 2004, 2008 David Turner <david@freetype.org> # # This program is used to beautify the documentation comments used # in the FreeType 2 public headers. # from sources import * from content import * from utils import * import utils import sys, os, time, string, getopt ...
Adel-Magebinary/odoo
refs/heads/8.0
addons/point_of_sale/res_users.py
315
import math from openerp.osv import osv, fields import openerp.addons.product.product class res_users(osv.osv): _inherit = 'res.users' _columns = { 'ean13' : fields.char('EAN13', size=13, help="BarCode"), 'pos_config' : fields.many2one('pos.config', 'Default Point of Sale', domain=[('state'...
azavea/nyc-trees
refs/heads/develop
src/nyc_trees/apps/login/tests.py
24
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division
Denisolt/IEEE-NYIT-MA
refs/heads/master
local/lib/python2.7/site-packages/future/backports/xmlrpc/client.py
81
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/IPython/core/oinspect.py
7
# -*- coding: utf-8 -*- """Tools for inspecting Python objects. Uses syntax highlighting for presenting the various information elements. Similar in spirit to the inspect module, but all calls take a name argument to reference the name under which an object is being read. """ #***************************************...
MichaelNedzelsky/intellij-community
refs/heads/master
python/testData/findUsages/UnresolvedClassInit.py
83
class <caret>B(C): def __init__(self): C.__init__(self)
alecklandgraf/gardenio
refs/heads/master
Adafruit_I2C.py
116
#!/usr/bin/python import re import smbus # =========================================================================== # Adafruit_I2C Class # =========================================================================== class Adafruit_I2C(object): @staticmethod def getPiRevision(): "Gets the version number of ...
mlperf/training_results_v0.7
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/implementation_open/mlperf_implementations/common/find_mxnet.py
68
# 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...
gujiawen/flask_web
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py
1730
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.enco...
dims/neutron
refs/heads/master
neutron/scheduler/base_scheduler.py
5
# Copyright (c) 2015 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...
rhdedgar/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.5.127/roles/lib_openshift/src/ansible/oc_version.py
86
# pylint: skip-file # flake8: noqa def main(): ''' ansible oc module for version ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='list', type='str', choices=['l...
luiseduardohdbackup/odoo
refs/heads/8.0
addons/portal_project/project.py
285
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
Artea/p2pool
refs/heads/master
SOAPpy/URLopener.py
294
"""Provide a class for loading data from URL's that handles basic authentication""" ident = '$Id: URLopener.py 541 2004-01-31 04:20:06Z warnes $' from version import __version__ from Config import Config from urllib import FancyURLopener class URLopener(FancyURLopener): username = None passwd = None d...
ubic135/odoo-design
refs/heads/master
addons/google_account/__openerp__.py
312
# -*- 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...
apixandru/intellij-community
refs/heads/master
python/lib/Lib/encodings/iso8859_3.py
593
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.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='...
jeffbaumes/jeffbaumes-vtk
refs/heads/master
Rendering/Testing/Python/TestTkRenderWidget.py
7
# A simple test for a vtkTkRenderWidget. Run it like so: # python TestTkRenderWidget.py -B $VTK_DATA_ROOT/Baseline/Rendering import os import vtk from vtk.test import Testing import Tkinter from vtk.tk.vtkTkRenderWidget import vtkTkRenderWidget class TestTkRenderWidget(Testing.vtkTest): # Stick your VTK ...
salilab/saliweb
refs/heads/main
test/build/testutil.py
1
import warnings import tempfile import os import glob import shutil import contextlib def run_catch_warnings(method, *args, **keys): """Run a method and return both its own return value and a list of any warnings raised.""" warnings.simplefilter("always") oldwarn = warnings.showwarning w = [] ...
jeffery-do/Vizdoombot
refs/heads/master
doom/lib/python3.5/site-packages/skimage/io/__init__.py
17
"""Utilities to read and write images in various formats. The following plug-ins are available: """ from .manage_plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * reset_plugins() WRAP_LEN = 73 def _separator(char, lengths): return [char * separato...
vincentltz/ns-3-dev-git
refs/heads/master
utils/grid.py
189
#!/usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- import cairo import sys import re import gtk class DataRange: def __init__(self, start = 0, end = 0, value = ''): self.start = start self.end = end self.value = value class EventStri...
402231466/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
tadebayo/myedge
refs/heads/master
myvenv/Lib/site-packages/debug_toolbar/__init__.py
12
from __future__ import absolute_import, unicode_literals __all__ = ['VERSION'] try: import pkg_resources VERSION = pkg_resources.get_distribution('django-debug-toolbar').version except Exception: VERSION = 'unknown' # Code that discovers files or modules in INSTALLED_APPS imports this module. # Referen...