repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
gtko/CouchPotatoServer
refs/heads/develop
libs/pyutil/lineutil.py
106
#!/usr/bin/env python import os, re def lineify_fileobjs(ifo, ofo, strip=False): from pyutil.strutil import pop_trailing_newlines, split_on_newlines for l in ifo: for sl in split_on_newlines(pop_trailing_newlines(l)): if strip: sl = sl.strip() ofo.write(pop_trailing_newlines(sl) + '\n') def lineify_fil...
moazzemi/HAMEX
refs/heads/master
cpu/gem5/ext/ply/example/hedit/hedit.py
165
# ----------------------------------------------------------------------------- # hedit.py # # Paring of Fortran H Edit descriptions (Contributed by Pearu Peterson) # # These tokens can't be easily tokenized because they are of the following # form: # # nHc1...cn # # where n is a positive integer and c1 ... cn are ch...
zlargon/mosquitto
refs/heads/master
test/lib/02-subscribe-qos0.py
19
#!/usr/bin/env python # Test whether a client sends a correct SUBSCRIBE to a topic with QoS 0. # The client should connect to port 1888 with keepalive=60, clean session set, # and client id subscribe-qos0-test # The test will send a CONNACK message to the client with rc=0. Upon receiving # the CONNACK and verifying t...
coursemdetw/2014c2
refs/heads/master
wsgi/static/reeborg/src/libraries/brython/Lib/_sre.py
11
# NOT_RPYTHON """ A pure Python reimplementation of the _sre module from CPython 2.4 Copyright 2005 Nik Haldimann, licensed under the MIT license This code is based on material licensed under CNRI's Python 1.6 license and copyrighted by: Copyright (c) 1997-2001 by Secret Labs AB """ #import array import operator, sys...
dimagol/trex-core
refs/heads/master
scripts/external_libs/urllib3/urllib3/packages/__init__.py
1093
from __future__ import absolute_import from . import ssl_match_hostname __all__ = ('ssl_match_hostname', )
samdowd/drumm-farm
refs/heads/master
drumm_env/lib/python2.7/site-packages/django/contrib/postgres/forms/hstore.py
313
import json from django import forms from django.core.exceptions import ValidationError from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStoreField'] class HStoreField(forms.CharField): """A field for HStore data which accepts JSON input.""" widget = forms.Te...
zyq001/ryu
refs/heads/master
ryu/contrib/ovs/ovsuuid.py
52
# Copyright (c) 2009, 2010, 2011 Nicira, 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 agre...
SmithsonianEnterprises/django-cms
refs/heads/develop
cms/forms/utils.py
21
# -*- coding: utf-8 -*- from collections import defaultdict from django.contrib.sites.models import Site from django.db.models.signals import post_save, post_delete from django.utils.datastructures import SortedDict from django.utils.safestring import mark_safe from cms.cache.choices import (clean_site_choices_cache,...
jiangzhuo/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_docxmlrpc.py
76
from xmlrpc.server import DocXMLRPCServer import http.client import sys from test import support threading = support.import_module('threading') import time import socket import unittest PORT = None def make_request_and_skipIf(condition, reason): # If we skip the test, we have to make a request because the # t...
Endika/odoo
refs/heads/8.0
addons/website_sale_options/__openerp__.py
322
{ 'name': 'eCommerce Optional Products', 'category': 'Website', 'version': '1.0', 'website': 'https://www.odoo.com/page/e-commerce', 'description': """ OpenERP E-Commerce ================== """, 'author': 'OpenERP SA', 'depends': ['website_sale'], 'data': [ 'views/views....
richardfergie/googleads-python-lib
refs/heads/master
examples/dfp/v201411/report_service/run_sales_report.py
4
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
40223119/w17test
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/sys.py
109
# hack to return special attributes from _sys import * from javascript import JSObject has_local_storage=__BRYTHON__.has_local_storage has_session_storage = __BRYTHON__.has_session_storage has_json=__BRYTHON__.has_json argv = ['__main__'] base_exec_prefix = __BRYTHON__.brython_path base_prefix = __BRYTHON__.brython...
lathen/voreen
refs/heads/master
modules/python/ext/python27/modules/sre_constants.py
349
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support modul...
suncycheng/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/BoundedGeneric.py
7
def test(): def f(x): """ :type x: T <= int | str :rtype: T """ pass x = f(10) y = f('foo') z = f(<warning descr="Expected type 'TypeVar('T', int, str)', got 'list' instead">[]</warning>) return x + <warning descr="Expected type 'int', got 'str' instead">y</w...
IntelLabs/numba
refs/heads/master
numba/core/untyped_passes.py
3
from collections import defaultdict, namedtuple from contextlib import contextmanager from copy import deepcopy, copy import warnings from numba.core.compiler_machinery import (FunctionPass, AnalysisPass, register_pass) from numba.core import (errors, types, ir, bytecode, pos...
oleksa-pavlenko/gae-django-project-template
refs/heads/master
django/middleware/locale.py
67
"This is the locale selecting middleware that will look at accept headers" from django.conf import settings from django.core.urlresolvers import (is_valid_path, get_resolver, LocaleRegexURLResolver) from django.http import HttpResponseRedirect from django.utils.cache import patch_...
LubyRuffy/spiderfoot
refs/heads/master
ext/openxmllib/presentation.py
10
# -*- coding: utf-8 -*- """ The presentation module handles a PresentationML Open XML document (read *.pptx) """ # $Id: presentation.py 6800 2007-12-04 11:17:01Z glenfant $ import document from utils import IndexableTextExtractor import contenttypes as ct import namespaces class PresentationDocument(document.Document...
diorcety/intellij-community
refs/heads/master
python/testData/editing/simpleElif.py
83
if 1: pass elif 2<caret>
thaskell1/volatility
refs/heads/master
volatility/plugins/linux/librarydump.py
13
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
deepmind/distrax
refs/heads/master
distrax/_src/distributions/softmax.py
1
# Copyright 2021 DeepMind Technologies Limited. 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 ...
allenp/odoo
refs/heads/9.0
addons/pos_cache/models/pos_cache.py
13
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from ast import literal_eval import cPickle from openerp import models, fields, api class pos_cache(models.Model): _name = 'pos.cache' cache = fields.Binary() product_domain = fields.Text(required=True) ...
artefactual/archivematica-history
refs/heads/master
src/testingTools/createManyDirectories.py
1
#!/usr/bin/python -OO # This file is part of Archivematica. # # Copyright 2010-2012 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, e...
release-project/otp
refs/heads/master
lib/asn1/test/asn1_SUITE_data/String.py
97
String DEFINITIONS IMPLICIT TAGS ::= BEGIN EXPORTS; IA51 ::= IA5String (SIZE (1..128)) (FROM ("0123456789#*,")) END
bmander/dancecontraption
refs/heads/master
django/conf/locale/lt/formats.py
332
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y \m. F j \d.' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = # YEAR_MONTH_F...
khchine5/xl
refs/heads/master
lino_xl/lib/clients/mixins.py
1
# -*- coding: UTF-8 -*- # Copyright 2008-2017 Luc Saffre # License: BSD (see file COPYING for details) from builtins import str from django.conf import settings from lino.api import dd, rt, _ from etgen.html import E from lino.modlib.notify.mixins import ChangeNotifier from lino_xl.lib.contacts.mixins import Contact...
cmeadows/emailer
refs/heads/master
setup.py
1
import setuptools VERSION = "0.1.0" setuptools.setup( name="emailer", packages=["emailer"], version=VERSION, download_url="https://github.com/cmeadows/emailer/archive/v%s.zip" % VERSION, url="https://github.com/cmeadows/emailer", author="Collin Meadows", author_email="cmeadows@eborkdev.c...
benschulz/servo
refs/heads/master
python/mach/mach/commands/settings.py
96
# 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 __future__ import absolute_import, print_function, unicode_literals from textwrap import TextWrapper from mach.de...
mozilla/make.mozilla.org
refs/heads/master
vendor-local/lib/python/kombu/transport/django/models.py
13
from __future__ import absolute_import from django.db import models from django.utils.translation import ugettext_lazy as _ from .managers import QueueManager, MessageManager class Queue(models.Model): name = models.CharField(_("name"), max_length=200, unique=True) objects = QueueManager() class Meta:...
cschenck/SmoothParticleNets
refs/heads/master
tests/test_convsp.py
1
import os import sys # Add path to python source to path. sys.path.append(os.path.join(os.path.dirname( os.path.dirname(os.path.abspath(__file__))), "python")) import SmoothParticleNets as spn import itertools import numpy as np import torch import torch.autograd from gradcheck import gradcheck try: import py...
ILyoan/gdb
refs/heads/master
gdb/python/lib/gdb/__init__.py
100
# Copyright (C) 2010-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
dajohnso/cfme_tests
refs/heads/master
utils/db.py
2
from collections import Mapping from contextlib import contextmanager from itertools import izip from cached_property import cached_property from sqlalchemy import MetaData, create_engine, event, inspect from sqlalchemy.exc import ArgumentError, DisconnectionError, InvalidRequestError from sqlalchemy.ext.declarative i...
Wafflespeanut/servo
refs/heads/master
tests/wpt/css-tests/tools/localpaths.py
114
import os import sys here = os.path.abspath(os.path.split(__file__)[0]) repo_root = os.path.abspath(os.path.join(here, os.pardir)) sys.path.insert(0, os.path.join(here)) sys.path.insert(0, os.path.join(here, "six")) sys.path.insert(0, os.path.join(here, "html5lib")) sys.path.insert(0, os.path.join(here, "wptserve")) ...
jkbradley/spark
refs/heads/master
python/pyspark/__init__.py
10
# # 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 us...
sebastic/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/RandomPointsPolygonsVariable.py
1
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsPolygonsVariable.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot co...
opensourcechipspark/platform_external_chromium_org
refs/heads/master
chrome/test/mini_installer/uninstall_chrome.py
23
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_installer.exe --u...
WalrusCow/cryptopals
refs/heads/master
_EnglishFrequency.py
1
# Character frequencies in English text, as determined from several # random English texts retrieved from the Gutenberg project import collections charFrequency = collections.Counter({ ' ': 0.17685753077841207, '!': 0.00025870323393587983, '"': 0.0015122191043922615, '#': 1.0389688109874691e-07, '$': 5.1948...
campbe13/openhatch
refs/heads/master
vendor/packages/gdata/src/gdata/webmastertools/service.py
79
#!/usr/bin/python # # Copyright (C) 2008 Yu-Jie Lin # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
JustinPercy/BATA-Development
refs/heads/master
qa/rpc-tests/getblocktemplate_longpoll.py
163
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin 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 import BitcoinTestFramework from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCExce...
yuquanshan/customizedMesos
refs/heads/master
src/python/cli/src/mesos/http.py
21
#!/usr/bin/env python # 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 # "L...
huaiping/pandora
refs/heads/master
manage.py
1
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pandora.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Import...
dnguyen0304/clare
refs/heads/master
clare/setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools if __name__ == '__main__': package_name = 'clare' description = '' with open('./README.md', 'r') as file: long_description = file.read() install_requires = ['enum34==1.1.6', 'lxml==3.7.3', ...
Nikea/VisTrails
refs/heads/master
scripts/dist/mac/setup.py
2
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
SelvorWhim/competitive
refs/heads/master
Codewars/LastDigitOfALargeNumber.py
1
# taking advantage of mathematical properties, we can get a constant time (and space) solution that's also fairly simple # last digits of the power of a single-digit number cycle. Same cycle for any number ending in that digit. Here they all are in base 10: cycles = {0:[0], 1:[1], 2:[2,4,8,6], 3:[3,9,7,1], 4:[4,6], 5:[...
silentfuzzle/calibre
refs/heads/master
src/chardet/universaldetector.py
190
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
sergeykolychev/mxnet
refs/heads/master
example/reinforcement-learning/ddpg/run.py
52
# 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...
mark-me/Pi-Jukebox
refs/heads/master
venv/Lib/site-packages/mutagen/asf/__init__.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2005-2006 Joe Wreschnig # Copyright (C) 2006-2007 Lukas Lalinsky # # 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 #...
gamesbrewer/kegger
refs/heads/master
kegger/myapp/libs/werkzeug/testsuite/security.py
102
# -*- coding: utf-8 -*- """ werkzeug.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the security helpers. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.securit...
sander76/home-assistant
refs/heads/dev
homeassistant/components/shelly/const.py
4
"""Constants for the Shelly integration.""" COAP = "coap" DATA_CONFIG_ENTRY = "config_entry" DEVICE = "device" DOMAIN = "shelly" REST = "rest" # Used in "_async_update_data" as timeout for polling data from devices. POLLING_TIMEOUT_SEC = 18 # Refresh interval for REST sensors REST_SENSORS_UPDATE_INTERVAL = 60 # Tim...
ebrelsford/feincms-pagepermissions
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import os import codecs import pagepermissions CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System ...
mitar/django
refs/heads/master
django/contrib/admin/actions.py
98
""" Built-in, globally-available admin actions. """ from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response import TemplateResponse from django.utils...
dariox2/CADL
refs/heads/master
session-4/libs/stylenet.py
4
"""Style Net w/ tests for Video Style Net. Video Style Net requires OpenCV 3.0.0+ w/ Contrib for Python to be installed. Creative Applications of Deep Learning w/ Tensorflow. Kadenze, Inc. Copyright Parag K. Mital, June 2016. """ import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import os fro...
timlinux/QGIS
refs/heads/master
python/gui/auto_additions/qgsdualview.py
46
# The following has been generated automatically from src/gui/attributetable/qgsdualview.h QgsDualView.ViewMode.baseClass = QgsDualView QgsDualView.FeatureListBrowsingAction.baseClass = QgsDualView
omriiluz/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_scaling_policy.py
157
#!/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...
pymedusa/SickRage
refs/heads/master
ext/boto/file/simpleresultset.py
264
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
atreyv/sympy
refs/heads/master
sympy/concrete/expr_with_limits.py
28
from __future__ import print_function, division from sympy.core.add import Add from sympy.core.expr import Expr from sympy.core.mul import Mul from sympy.core.relational import Equality from sympy.sets.sets import Interval from sympy.core.singleton import S from sympy.core.symbol import Symbol from sympy.core.sympify ...
sthirugn/sam-tools
refs/heads/master
fabfile.py
1
""" Python Module for sam tests """ from fabric.api import env from helper import get_host, get_test_username from tasks import create, delete, info, install, manifest, tests, update # Append host from config file env.hosts = get_host(env.hosts) # Override user from config file, if specified env.user = get_test_user...
rvs/gpdb
refs/heads/master
gpMgmt/bin/gppylib/mainUtils.py
14
# Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 """ mainUtils.py ------------ This file provides a rudimentary framework to support top-level option parsing, initialization and cleanup logic common to multiple programs. The primary interface function is 'simple_main'. For an example ...
azureplus/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/script.py
100
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # 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 you...
alaski/nova
refs/heads/master
nova/tests/unit/objects/test_resource_provider.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
mcella/django
refs/heads/master
tests/timezones/models.py
415
from django.db import models class Event(models.Model): dt = models.DateTimeField() class MaybeEvent(models.Model): dt = models.DateTimeField(blank=True, null=True) class Session(models.Model): name = models.CharField(max_length=20) class SessionEvent(models.Model): dt = models.DateTimeField() ...
tomtor/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/PointsToPaths.py
3
# -*- coding: utf-8 -*- """ *************************************************************************** PointsToPaths.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/django_extensions/management/commands/pipchecker.py
2
# -*- coding: utf-8 -*- import json import os from distutils.version import LooseVersion import pip from django.core.management.base import BaseCommand, CommandError from pip.req import parse_requirements from django_extensions.management.color import color_style from django_extensions.management.utils import signalc...
tornadozou/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/basic_gpu_test.py
39
# 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...
shahankhatch/scikit-learn
refs/heads/master
examples/svm/plot_svm_regression.py
249
""" =================================================================== Support Vector Regression (SVR) using linear and non-linear kernels =================================================================== Toy example of 1D regression using linear, polynomial and RBF kernels. """ print(__doc__) import numpy as np ...
Nekrofage/MinecraftPython
refs/heads/master
mcpi/util.py
30
import collections def flatten(l): for e in l: if isinstance(e, collections.Iterable) and not isinstance(e, basestring): for ee in flatten(e): yield ee else: yield e def flatten_parameters_to_string(l): return ",".join(map(str, flatten(l)))
kdeloach/OTM2
refs/heads/develop
opentreemap/treemap/templatetags/instance_config.py
2
from __future__ import print_function from __future__ import unicode_literals from __future__ import division import json from django import template from treemap.json_field import get_attr_from_json_field from treemap.lib import perms register = template.Library() def _get_color_from_config(config, name): col...
dimitdim/ElectronAdventures
refs/heads/master
smu.py
14
import usb.core class smu: def __init__(self): self.SET_FN = 0 self.GET_FN = 1 self.SET_AUTORANGE = 2 self.GET_AUTORANGE = 3 self.SET_IRANGE = 4 self.GET_IRANGE = 5 self.SET_VRANGE = 6 self.GET_VRANGE = 7 self.SET_DAC = 8 ...
jefffohl/nupic
refs/heads/master
src/nupic/frameworks/opf/__init__.py
463
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
eXistenZNL/SickRage
refs/heads/master
lib/github/Team.py
25
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
fafaman/django
refs/heads/master
tests/migrations/test_migrations_initial_false/0001_not_initial.py
315
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = False operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ...
alcamie101/parallaxcoin
refs/heads/master
contrib/seeds/makeseeds.py
3
#!/usr/bin/env python # # Generate pnSeed[] from Pieter's DNS seeder # NSEEDS=600 import re import sys from subprocess import check_output def main(): lines = sys.stdin.readlines() ips = [] pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):7818") for line in lines: m = patte...
catapult-project/catapult-csm
refs/heads/master
third_party/google-endpoints/future/moves/itertools.py
82
from __future__ import absolute_import from itertools import * try: zip_longest = izip_longest filterfalse = ifilterfalse except NameError: pass
madeziius/madeziius.com
refs/heads/master
blog/admin.py
1
from django.contrib import admin __author__ = 'mad' from blog.models import BlogPosts,Comments,Gave class CommentsInline(admin.TabularInline): model = Comments extra = 3 class BlogPostsAdmin(admin.ModelAdmin): model = BlogPosts inlines = [CommentsInline] class GaveAdmin(admin.ModelAdmin): model = ...
brianloveswords/django-badger
refs/heads/master
badger/tests/badger_example/models.py
8
from django.db import models from django.contrib.auth.models import User from django.template.defaultfilters import slugify class GuestbookEntry(models.Model): """Representation of a guestbook entry""" message = models.TextField(blank=True) creator = models.ForeignKey(User, blank=False) created = mod...
dbaty/Poulda
refs/heads/master
poulda/i18n.py
2
"""Define our own locale negotiator that looks at the browser preferences. """ def locale_negotiator(request): """Return a locale name by looking at the ``Accept-Language`` HTTP header. """ settings = request.registry.settings available_languages = settings['pyramid.available_languages'].split() ...
Just-D/chromium-1
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/configservice/test_configservice.py
93
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
jeremiah-c-leary/vhdl-style-guide
refs/heads/master
vsg/tests/attribute_specification/test_rule_502.py
1
import os import unittest from vsg.rules import attribute_specification from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_502_test_input.vhd')) lExpected_lower = [] lExpected_lower.append('') utils.read_...
j-griffith/cinder
refs/heads/master
cinder/tests/unit/test_coordination.py
3
# Copyright 2015 Intel # 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...
OpenCageData/python-opencage-geocoder
refs/heads/master
test/test_reverse.py
1
from opencage.geocoder import _query_for_reverse_geocoding def _expected_output(input_latlng, expected_output): # pylint: disable=no-self-argument def test(): lat, lng = input_latlng assert _query_for_reverse_geocoding(lat, lng) == expected_output return test def test_reverse(): _expected_...
lordakshaya/pyexcel
refs/heads/master
tests/test_io_csvzipbook.py
1
import os import pyexcel as pe import zipfile from _compact import OrderedDict class TestCSVZFromFile: """The fixture here is a test csv file with the following data data = [[1, 4, 9], [2, 5, 8], [3, 6, 7]] was zipped to provide test-single.csvz then was copied three times and its three copies wer...
terrorobe/barman
refs/heads/master
tests/test_utils.py
2
# Copyright (C) 2011-2015 2ndQuadrant Italia (Devise.IT S.r.L.) # # This file is part of Barman. # # Barman 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...
pyfisch/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_assertion.py
30
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import sys import textwrap import _pytest.assertion as plugin import py import pytest from _pytest.assertion import util from _pytest.assertion import truncate PY3 = sys.version_info >= (3, 0) @pytest.fixture def mock_config():...
ShineFan/odoo
refs/heads/8.0
addons/l10n_us/__openerp__.py
341
# -*- 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...
carnby/matta
refs/heads/master
datagramas/sketch.py
2
from __future__ import unicode_literals import uuid import jinja2 import os import copy from IPython.display import HTML from cytoolz.dicttoolz import valmap, merge from IPython.display import display_html from seaborn import color_palette from matplotlib.colors import rgb2hex from .js_utils import _dump_json, d3jsObj...
ryfeus/lambda-packs
refs/heads/master
Tensorflow_LightGBM_Scipy_nightly/source/scipy/odr/add_newdocs.py
153
from numpy import add_newdoc add_newdoc('scipy.odr', 'odr', """ odr(fcn, beta0, y, x, we=None, wd=None, fjacb=None, fjacd=None, extra_args=None, ifixx=None, ifixb=None, job=0, iprint=0, errfile=None, rptfile=None, ndigit=0, taufac=0.0, sstol=-1.0, partol=-1.0, maxit=-1, stpb=None, stpd=None, sclb=None, scld=No...
dhague/vpower
refs/heads/master
tests/test_TacxBlueMotionPowerCalculatorTest.py
1
import unittest from TacxBlueMotionPowerCalculator import TacxBlueMotionPowerCalculator class TacxBlueMotionPowerCalculatorTest(unittest.TestCase): def setUp(self): self.calculator = TacxBlueMotionPowerCalculator() def test_calculation_min(self): power = self.calculator.power_from_speed(0.0)...
qmarlats/pyquizz
refs/heads/master
env-3/lib/python3.5/site-packages/pip/_vendor/cachecontrol/caches/__init__.py
962
from textwrap import dedent try: from .file_cache import FileCache except ImportError: notice = dedent(''' NOTE: In order to use the FileCache you must have lockfile installed. You can install it via pip: pip install lockfile ''') print(notice) try: import redis from .redis_cach...
mastizada/kuma
refs/heads/master
vendor/packages/ipython/IPython/kernel/scripts/ipcluster.py
6
#!/usr/bin/env python # encoding: utf-8 """Start an IPython cluster = (controller + engines).""" #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file ...
jacobkrantz/ProbSyllabifier
refs/heads/master
GeneticAlgorithm/phoneOptimize.py
1
from __future__ import print_function from datetime import datetime from itertools import permutations import logging as log import multiprocessing import os import shutil import zipfile from celex import Celex from chromosome import Chromosome from computeFitness import ComputeFitness from config import settings,GAC...
ameihm0912/MozDef
refs/heads/master
tests/lib/query_models/query_test_suite.py
1
#!/usr/bin/env python # 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/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers bmyers@mozilla.com imp...
mosajjal/mitmproxy
refs/heads/master
test/mitmproxy/data/test_flow_export/locust_task_get.py
8
@task() def path(self): url = self.locust.host + '/path' headers = { 'header': 'qvalue', 'content-length': '7', } params = { 'a': ['foo', 'bar'], 'b': 'baz', } self.response = self.client.request( meth...
nico01f/nifo.github.io
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/bw.py
364
# -*- coding: utf-8 -*- """ pygments.styles.bw ~~~~~~~~~~~~~~~~~~ Simple black/white only style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, Strin...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/admin_inlines/urls.py
150
from __future__ import absolute_import from django.conf.urls import patterns, include from . import admin urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), )
B3AU/waveTree
refs/heads/waveTree
sklearn/preprocessing/tests/test_label.py
9
import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from...
BT-ojossen/odoo
refs/heads/8.0
addons/base_geolocalize/models/__init__.py
1273
import res_partner
BenKybartas/FlashFictionGen
refs/heads/master
FlashFictionGen/Builder.py
1
#!/usr/bin/python # coding: utf-8 # # Something, Somewhere, copyright (c) 2014 Ben Kybartas <b.a.kybartas@tudelft.nl> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear...
GoogleCloudPlatform/training-data-analyst
refs/heads/master
courses/machine_learning/deepdive2/end_to_end_ml/labs/serving/application/lib/rsa/cli.py
15
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
offlinehacker/pyfilesystem
refs/heads/master
fs/expose/serve/threadpool.py
17
import threading import Queue as queue def make_job(job_callable, *args, **kwargs): """ Returns a callable that calls the supplied callable with given arguements. """ def job(): return job_callable(*args, **kwargs) return job class _PoolThread(threading.Thread): """ Internal thread class that...
jswope00/GAI
refs/heads/master
lms/lib/comment_client/commentable.py
59
import models import settings class Commentable(models.Model): base_url = "{prefix}/commentables".format(prefix=settings.PREFIX) type = 'commentable'
barry-scott/git-workbench
refs/heads/master
Source/Git/wb_git_log_history_view.py
2
''' ==================================================================== Copyright (c) 2016-2017 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ======================================================...