repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
density215/d215-miniblog
refs/heads/master
django/contrib/localflavor/jp/forms.py
333
""" JP-specific Form helpers """ from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.forms.fields import RegexField, Select class JPPostalCodeField(RegexField): """ A form field that validates its input is a Japanese postcode. Accepts 7 digits, wit...
p0psicles/SickGear
refs/heads/master
lib/chardet/euctwprober.py
4
######################## 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. ...
CFIS-Octarine/octarine
refs/heads/master
validate/gui/progress.py
1
__author__ = "David Rusk <drusk@uvic.ca>" import collections import threading from src.daomop import storage from src.validate import auth from . import tasks CANDS = "CANDS" REALS = "REALS" # Constants for local progress manager DONE_SUFFIX = ".DONE" LOCK_SUFFIX = ".LOCK" PART_SUFFIX = ".PART" # Constants for VOS...
LePastis/pyload
refs/heads/stable
module/plugins/hoster/FileboomMe.py
3
# -*- coding: utf-8 -*- import re from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileboomMe(SimpleHoster): __name__ = "FileboomMe" __type__ = "hoster" __version__ = "0.03" __status__ = "testing" __pattern__ = r'https?://f...
musically-ut/statsmodels
refs/heads/master
statsmodels/miscmodels/__init__.py
69
from statsmodels import NoseWrapper as Tester test = Tester().test
moritzschaefer/luigi
refs/heads/master
test/date_parameter_test.py
13
# -*- 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...
xunmengfeng/engine
refs/heads/master
build/android/pylib/device/device_list.py
114
# 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. """A module to keep track of devices across builds.""" import os LAST_DEVICES_FILENAME = '.last_devices' LAST_MISSING_DEVICES_FILENAME = '.last_missing' ...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/mobile/shared_dressed_chef_trainer_human_male_01.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_chef_trainer_human_male_01.iff" result.attribute_templ...
lihui7115/ChromiumGStreamerBackend
refs/heads/master
chrome/common/extensions/docs/server2/compiled_file_system_test.py
79
#!/usr/bin/env python # 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 functools import os from compiled_file_system import Cache, CompiledFileSystem from copy import deepcopy from environment impor...
mistio/libcloud
refs/heads/trunk
libcloud/compute/drivers/cloudstack.py
5
# 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 use ...
sarthakmeh03/django
refs/heads/master
django/conf/urls/__init__.py
133
import warnings from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.urls import ( LocaleRegexURLResolver, RegexURLPattern, RegexURLResolver, ) from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning __all__ = ['handler400', 'ha...
hobarrera/django
refs/heads/master
tests/fixtures/models.py
25
""" Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures are identified by name, and are stored in either a directory named 'fixtures' in the application directory, or in one of the directories named in the ``FIX...
Nabs007/ansible
refs/heads/devel
lib/ansible/plugins/callback/skippy.py
94
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
richardnpaul/FWL-Website
refs/heads/master
lib/python2.7/site-packages/django/contrib/sessions/tests.py
13
from datetime import timedelta import os import shutil import string import tempfile import warnings from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.sessi...
pescobar/easybuild-framework
refs/heads/master
easybuild/tools/options.py
1
## # Copyright 2009-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
manaris/jythonMusic
refs/heads/master
library/jython2.5.3/Lib/test/zxjdbc/runner.py
19
# Jython Database Specification API 2.0 # # Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> """ To run the tests, simply invoke this script from the commandline: jython runner.py <xml config file> [vendor, ...] If no vendors are given, then all vendors will be tested. If a vendor is given, then only that vend...
freedomtan/tensorflow
refs/heads/master
tensorflow/python/framework/subscribe.py
13
# 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...
MrLoick/python-for-android
refs/heads/master
python-modules/twisted/twisted/pair/test/test_ip.py
55
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # from twisted.trial import unittest from twisted.internet import protocol, reactor, error from twisted.python import failure, components from twisted.pair import ip, raw from zope import interface class MyProtocol: interface.imple...
rdno/pardus-service-manager-gtk
refs/heads/master
src/service_manager_gtk/backend.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2009, TUBITAK/UEKAE # # 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...
LaMi-/pmatic
refs/heads/master
ccu_pkg/python/lib/python2.7/encodings/koi8_u.py
593
""" Python Character Mapping Codec koi8_u generated from 'python-mappings/KOI8-U.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='stri...
aml-development/ozp-backend
refs/heads/master
ozpcenter/migrations/0045_storefront_customizations.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-07-06 18:20 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('ozpcenter', '0044_profile_avatar'), ] operations =...
AnhellO/DAS_Sistemas
refs/heads/development
Ago-Dic-2017/Enrique Castillo/Ordinario/test/Lib/site-packages/django/contrib/auth/apps.py
27
from django.apps import AppConfig from django.core import checks from django.db.models.signals import post_migrate from django.utils.translation import gettext_lazy as _ from . import get_user_model from .checks import check_models_permissions, check_user_model from .management import create_permissions from .signals ...
elitest/mitmproxy
refs/heads/master
libmproxy/console/grideditor.py
4
from __future__ import absolute_import import copy import re import os import urwid from . import common, signals from .. import utils, filt, script from netlib import http_uastrings, http_cookies, odict FOOTER = [ ('heading_key', "enter"), ":edit ", ('heading_key', "q"), ":back ", ] FOOTER_EDITING = [ ...
crossbario/txaio
refs/heads/master
test/test_as_future.py
4
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
gnowledge/ISON
refs/heads/master
gstudio/tests/custom_url_shortener.py
3
# Copyright (c) 2011, 2012 Free Software Foundation # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later vers...
ShassAro/ShassAro
refs/heads/master
Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/template/context.py
87
from copy import copy from django.utils.module_loading import import_string # Cache of actual callables. _standard_context_processors = None # We need the CSRF processor no matter what the user has in their settings, # because otherwise it is a security vulnerability, and we can't afford to leave # this to human error...
paul99/clank
refs/heads/chrome-18.0.1025.469
tools/gyp/pylib/gyp/SCons.py
42
# Copyright (c) 2011 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. """ SCons generator. This contains class definitions and supporting functions for generating pieces of SCons files for the different types of GYP targets. """ im...
tensorflow/model-analysis
refs/heads/master
tensorflow_model_analysis/contrib/export_test.py
1
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
iw3hxn/server
refs/heads/master
openerp/pychart/version.py
15
# -*- coding: utf-8 -*- # # Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com) # # Jockey 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, or (at your option) any # later vers...
openconnectome/open-connectome
refs/heads/master
django/stats/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nduser', '0008_auto_20160621_0153'), ] operations = [ migrations.CreateModel( name='Histogram', fiel...
GDGLima/contentbox
refs/heads/master
third_party/oauth2client/file.py
4
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
siddartha1992/cloud-custodian
refs/heads/master
tests/common.py
1
# Copyright 2016 Capital One Services, 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 agreed to in...
msiebuhr/v8.go
refs/heads/master
v8/build/gyp/test/product/gyptest-product.py
290
#!/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 simplest-possible build of a "Hello, world!" program using the default build target. """ import TestGyp # Android does not su...
alff0x1f/Misago
refs/heads/master
misago/threads/tests/test_post_model.py
8
from datetime import timedelta from django.contrib.auth import get_user_model from django.test import TestCase from django.utils import timezone from misago.forums.models import Forum from misago.threads.checksums import update_post_checksum from misago.threads.models import Thread, Post class PostModelTests(TestC...
timkrentz/SunTracker
refs/heads/master
IMU/VTK-6.2.0/ThirdParty/AutobahnPython/autobahn/wamp/router.py
2
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## #...
bcheung92/Paperproject
refs/heads/master
gem5/ext/ply/test/lex_state3.py
174
# lex_state3.py # # Bad state declaration import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] comment = 1 states = ((comment, 'inclusive'), ('example', 'exclusive')) t_PLUS = r'\+' t_MINUS = r'-' t_NUMBER = r'\d+' # C...
Metaswitch/calico-nova
refs/heads/calico-readme
nova/openstack/common/report/views/text/header.py
79
# Copyright 2013 Red Hat, 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...
pwong-mapr/private-hue
refs/heads/HUE-1096-abe
apps/filebrowser/src/filebrowser/urls.py
4
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
ominux/cayley
refs/heads/master
svg/svg.py
39
# Copyright 2014 The Cayley 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 applicable ...
jetskijoe/SickGear
refs/heads/master
sickbeard/providers/btn.py
1
# coding=utf-8 # # This file is part of SickGear. # # SickGear 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. # # SickGear is distribu...
rehabstudio/rehabstudio-gae-scaffold
refs/heads/develop
src/server/tests/test_wsgi.py
1
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
cc-archive/commoner
refs/heads/main
src/commoner/util.py
1
import os from urlparse import urljoin from django.db import connection from django.template.context import RequestContext from django.template import loader from django import http from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse as reverseURL from django.core.urlre...
henrynj/PMLMC
refs/heads/master
plot/euler_old/uq_plot.py
2
import sys import numpy as np import matplotlib.pyplot as plt class mlmc_plot: """ MLMC plotting: read output of mlmc class and plot estimation of \alpha, \beta and \gamma; level vs ns """ def __init__(self, filename): self.fname = filename+'.txt' self.del1, self.del2...
eunchong/build
refs/heads/master
third_party/buildbot_8_4p1/buildbot/util/misc.py
4
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
ahotam/micropython
refs/heads/master
tests/basics/builtin_minmax.py
37
# test builtin min and max functions print(min(0,1)) print(min(1,0)) print(min(0,-1)) print(min(-1,0)) print(max(0,1)) print(max(1,0)) print(max(0,-1)) print(max(-1,0)) print(min([1,2,4,0,-1,2])) print(max([1,2,4,0,-1,2])) # test with key function lst = [2, 1, 3, 4] print(min(lst, key=lambda x:x)) print(min(lst, ke...
supergentle/migueltutorial
refs/heads/master
flask/lib/python2.7/site-packages/migrate/tests/__init__.py
78
# make this package available during imports as long as we support <python2.5 import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__))) from unittest import TestCase import migrate import six class TestVersionDefined(TestCase): def test_version(self): """Test for migrate.__version...
onitu/onitu
refs/heads/develop
drivers/local_storage/onitu_local_storage/tests/driver.py
1
import os import shutil import hashlib import tempfile from tests.utils import driver class Driver(driver.Driver): SPEED_BUMP = 1 def __init__(self, *args, **options): self._root = tempfile.mkdtemp() super(Driver, self).__init__('local_storage', *args, ...
Jgarcia-IAS/localizacion
refs/heads/master
openerp/addons/mass_mailing/models/mail_thread.py
220
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
ytjiang/django
refs/heads/master
django/core/cache/backends/filebased.py
428
"File-based cache backend" import errno import glob import hashlib import io import os import random import tempfile import time import zlib from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.core.files.move import file_move_safe from django.utils.encoding import force_bytes try: f...
jdugge/QGIS
refs/heads/master
python/gui/auto_additions/qgsauthsettingswidget.py
56
# The following has been generated automatically from src/gui/auth/qgsauthsettingswidget.h QgsAuthSettingsWidget.WarningType.baseClass = QgsAuthSettingsWidget
qwcode/pip
refs/heads/develop
pip/_vendor/html5lib/filters/optionaltags.py
1727
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
mdaif/olympia
refs/heads/master
apps/amo/management/commands/smite_unconverted.py
15
import logging from django.core.management.base import BaseCommand from celery.task.sets import TaskSet import bandwagon.tasks import users.tasks from amo.helpers import user_media_path from amo.utils import walkfiles log = logging.getLogger('z.cmd') suffix = '__unconverted' class Command(BaseCommand): help...
jeeftor/alfredToday
refs/heads/master
src/lib/pyasn1/codec/ber/eoo.py
407
from pyasn1.type import base, tag class EndOfOctets(base.AbstractSimpleAsn1Item): defaultValue = 0 tagSet = tag.initTagSet( tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x00) ) endOfOctets = EndOfOctets()
knipknap/SpiffWorkflow
refs/heads/master
SpiffWorkflow/bpmn/workflow.py
1
# -*- coding: utf-8 -*- from __future__ import division # Copyright (C) 2012 Matthew Hampton # # 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 ...
spark0001/spark2.1.1
refs/heads/master
python/pyspark/storagelevel.py
87
# # 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...
niteoweb/libcloud
refs/heads/niteoweb_internal_release
docs/examples/container/ecs/deploy_container.py
30
from libcloud.container.base import ContainerImage from libcloud.container.types import Provider from libcloud.container.providers import get_driver cls = get_driver(Provider.ECS) conn = cls(access_id='SDHFISJDIFJSIDFJ', secret='THIS_IS)+_MY_SECRET_KEY+I6TVkv68o4H', region='ap-southeast-2') for...
bhaskar24/ns-3_RARED
refs/heads/master
src/traffic-control/bindings/callbacks_list.py
181
callback_classes = [ ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::e...
vgupta6/Project-2
refs/heads/master
modules/geopy/location.py
51
from geopy.point import Point class Location(object): def __init__(self, name="", point=None, attributes=None, **kwargs): self.name = name if point is not None: self.point = Point(point) if attributes is None: attributes = {} self.attributes = dict(attributes...
porduna/weblabdeusto
refs/heads/master
server/launch/sample_balanced2_concurrent_experiments/main_machine/lab_and_experiment/experiment4/server_config.py
968
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- weblab_xilinx_experiment_xilinx_device = 'FPGA' weblab_xilinx_experiment_port_number = 1 # This should be something like this: # import os as _os # xilinx_home = _os.getenv('XILINX_HOME') # if xilinx_home == None: # if _os.name == 'nt': # xilinx_home = r'C:...
aallai/gini
refs/heads/master
share/gbuilder/Devices/Bridge.py
6
from Core.Connection import * from Core.Device import * ## # Class: the bridge device. Not fully implemented yet class Bridge(Device): type="Bridge" def __init__(self): Device.__init__(self) self.setProperty("port", "") self.setProperty("monitor", "") self.setProperty("hub", T...
johnjohndoe/spendb
refs/heads/master
spendb/default_settings.py
5
import os SECRET_KEY = 'foo' DEBUG = True SITE_TITLE = 'SpenDB' ASSETS_PATH_PROD = 'https://dfmbkaoi4kurm.cloudfront.net/libs/spendb.ui/latest/build' ASSETS_PATH_DEBUG = '/static/spendb.ui/build' SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/spendb' BABEL_DEFAULT_LOCALE = 'en' MAIL_SERVER = 'localhost' # MAIL...
cloudera/hue
refs/heads/master
desktop/core/ext-py/openpyxl-2.6.4/openpyxl/_constants.py
2
# Copyright (c) 2010-2019 openpyxl """ Package medata """ __author__ = "See AUTHORS" __author_email__ = "charlie.clark@clark-consulting.eu" __license__ = "MIT/Expat" __maintainer_email__ = "openpyxl-users@googlegroups.com" __url__ = "https://openpyxl.readthedocs.io" __version__ = "2.6.4"
siosio/intellij-community
refs/heads/master
python/testData/completion/formatStringWithFormatModifier.py
31
r"{compl<caret>}".format(completed="hood")
zulip/django
refs/heads/master
tests/migrations/test_migrations_run_before/0002_second.py
282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("migrations", "0001_initial"), ] operations = [ migrations.CreateModel( "Book", [ ("...
crs4/omero.biobank
refs/heads/develop
test/tools/importer/make_ssc.py
1
# BEGIN_COPYRIGHT # END_COPYRIGHT import sys, os, csv from random import choice, uniform from bl.core.io import MessageStreamWriter from bl.vl.kb import KnowledgeBase PAYLOAD_TYPE = "core.gt.messages.SampleSnpCall" MAP_FILE = "ssc_map.tsv" def get_ome_env(): ome_env = {} for var in 'OME_HOST', 'OME_USER', 'OME...
collective/eden
refs/heads/master
modules/test_utils/__init__.py
44
from compare_lines import compare_lines from clear_table import clear_table from find_JSON_format_data_structure import * from Web2pyNosePlugin import Web2pyNosePlugin from assert_equal import * from InsertedRecord import * from AddedRole import * from ExpectedException import * from Change import * from ExpectSessio...
frewsxcv/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_treeadapters.py
451
from __future__ import absolute_import, division, unicode_literals from . import support # flake8: noqa import html5lib from html5lib.treeadapters import sax from html5lib.treewalkers import getTreeWalker def test_to_sax(): handler = support.TracingSaxHandler() tree = html5lib.parse("""<html xml:lang="en">...
AllenDowney/ThinkBayes2
refs/heads/master
book/preprocess.py
1
import sys from Filist import Filist def main(name, filename, *argv): # print the contents of the given file ft = Filist(filename) ft.move_indexterms() ft.sub_lines(r'section\*', r'section') ft.sub_lines(r'\\begin{code}', r'\\begin{verbatim}plasTeXpython') ft.sub_lines(r'\\end{code}', r'\\end{...
xiaoyanit/kivy
refs/heads/master
examples/widgets/label_sizing.py
33
""" Label textsize ============ This example shows how to size a Label to its content (texture_size) and how setting text_size controls text wrapping. """ from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.properties import StringProperty, NumericProperty, BooleanProperty #...
pabloborrego93/edx-platform
refs/heads/master
lms/djangoapps/courseware/features/common.py
17
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import import time from lettuce import world, step, before from lettuce.django import django_url from django.contrib.auth.models import User from django.core.urlresolvers import reverse from student.models impo...
MauricioAcosta/Aprendiendo_Python
refs/heads/master
Ejercicios/ejercicio4.py
1
if __name__ == '__main__': a = int(input()) b = int(input()) if a>=1 and a<=10**10 and b>=1 and b<=10**10: print(a+b) print(a-b) print(a*b)
ageron/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/inverse_gamma.py
6
# 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...
LukeM12/samba
refs/heads/AfterGarwing
lib/testtools/testtools/tests/test_compat.py
12
# Copyright (c) 2010 testtools developers. See LICENSE for details. """Tests for miscellaneous compatibility functions""" import linecache import os import sys import tempfile import traceback import testtools from testtools.compat import ( _b, _detect_encoding, _get_source_encoding, _u, reraise...
leb2dg/osf.io
refs/heads/develop
admin/preprint_providers/forms.py
4
import bleach from django import forms from osf.models import PreprintProvider, Subject from admin.base.utils import get_subject_rules, get_toplevel_subjects, get_nodelicense_choices class PreprintProviderForm(forms.ModelForm): toplevel_subjects = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple(),...
m1ck/bookadoptions
refs/heads/master
django/contrib/localflavor/id/forms.py
311
""" ID-specific Form helpers """ import re import time from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode postcode_re = re.compil...
fergalbyrne/nupic
refs/heads/master
tests/swarming/nupic/swarming/swarming_test.py
8
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
Edeleon4/punya
refs/heads/master
appinventor/misc/whitelist/whitelist.py
77
#!/usr/bin/env python # # Tool for managing the App Inventor whitelist. The whitelist # is stored in the App Engine Data Store. However it is only # consulted if "user.whitelist" is set to true in appengine-web.xml # # WhiteListData, an element of the whitelist. This class definition # *MUST* be congruent to the Java ...
landrito/api-client-staging
refs/heads/master
generated/python/proto-google-cloud-spanner-v1/google/cloud/proto/spanner/v1/transaction_pb2_grpc.py
460
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities
alphageek-xyz/site
refs/heads/master
community/apps/app.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import include from django.conf.urls import url from machina.app import BoardApp from community.apps.auth.app import application as auth_app class AGCSForumApp(BoardApp): name = None auth_app = auth_app def get_urls(s...
DataSploit/datasploit
refs/heads/master
config_sample.py
2
#Store all your config's here. #added to gitignore so will not be syned #Backup in ~/Desktop/config.py_backup shodan_api="" bing_api="" github_access_token="" builtwith_api="" censysio_id="" censysio_secret="" facebook_access_token = "" flickr_api="" google_api="" google_cse_key="" google_cse_cx = "" hashes_api="" ip...
lacabr/pyklatt
refs/heads/master
src/languages/__init__.py
4
""" CPSC 599 package: src.languages Purpose ======= Provides a centralised location for language rulesets. """
shaufi/odoo
refs/heads/8.0
addons/portal_sale/__openerp__.py
380
# -*- 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...
damnit/pymite
refs/heads/master
pymite/mite.py
1
# -*- coding: utf-8 -*- # File: mite.py """ mite api base module""" __author__ = 'Otto Hockel' __docformat__ = 'plaintext' import json import urllib.parse import urllib.request as request from pymite.utils import declassify, clean_dict class MiteAPI(object): """ wrap the mite api. """ def __init__(self,...
Conorh97/CA117---Python3
refs/heads/master
week_1/pi_12.py
1
import sys import math def places(s): print('{:.{}f}'.format(math.pi , s)) def main(): return places(int(sys.argv[1])) if __name__ == "__main__": main()
robert-budde/smarthome
refs/heads/master
lib/env/init.py
4
# lib/env/init.py import psutil import socket # version of SmartHomeNG and start time sh.env.core.version(sh.version, logic.lname) sh.env.core.start(shtime.now(), logic.lname) # hostname hostname=socket.gethostname() sh.env.system.name(hostname, logic.lname) # operating system start start=datetime.datetime.fromtime...
pashazz/gtest
refs/heads/master
test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/stats/adnorm.py
4
# -*- coding: utf-8 -*- """ Created on Sun Sep 25 21:23:38 2011 Author: Josef Perktold and Scipy developers License : BSD-3 """ import numpy as np from scipy import stats from numpy import exp def anderson_statistic(x, dist='norm', fit=True, params=(), axis=0): '''calculate anderson-darling A2 statistic Pa...
ptibbetts/paultibbetts.uk
refs/heads/master
trellis/lib/trellis/__init__.py
673
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type
reinout/django
refs/heads/master
tests/custom_managers/models.py
47
""" Giving models a custom manager You can use a custom ``Manager`` in a particular model by extending the base ``Manager`` class and instantiating your custom ``Manager`` in your model. There are two reasons you might want to customize a ``Manager``: to add extra ``Manager`` methods, and/or to modify the initial ``Q...
home-assistant/home-assistant
refs/heads/dev
homeassistant/components/mastodon/__init__.py
36
"""The mastodon component."""
ak2703/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/preferences/views.py
47
""" NOTE: this API is WIP and has not yet been approved. Do not use this API without talking to Christina or Andy. For more information, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import stat...
LIKAIMO/MissionPlanner
refs/heads/master
Lib/dummy_thread.py
73
"""Drop-in replacement for the thread module. Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present. Suggested usage is:: try: import thread except ImportError: import dummy_thread as thread """ ...
benschmaus/catapult
refs/heads/master
telemetry/telemetry/util/statistics.py
16
# 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. """A collection of statistical utility functions to be used by metrics.""" import math def Clamp(value, low=0.0, high=1.0): """Clamp a value between som...
benoit-pierre/mcomix
refs/heads/master
mcomix/bookmark_menu_item.py
1
"""bookmark_menu_item.py - A signle bookmark item.""" import gtk class _Bookmark(gtk.ImageMenuItem): """_Bookmark represents one bookmark. It extends the gtk.ImageMenuItem and is thus put directly in the bookmarks menu. """ def __init__(self, window, file_handler, name, path, page, numpages, archive...
mathspace/libcloud
refs/heads/trunk
docs/examples/compute/ecs/list_sizes.py
29
import pprint from libcloud.compute.providers import get_driver from libcloud.compute.types import Provider ECSDriver = get_driver(Provider.ALIYUN_ECS) region = 'cn-hangzhou' access_key_id = 'CHANGE IT' access_key_secret = 'CHANGE IT' driver = ECSDriver(access_key_id, access_key_secret, region=region) sizes = driv...
wkennington/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/win/gyptest-long-command-line.py
344
#!/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. """ Make sure long command lines work. """ import TestGyp import subprocess import sys if sys.platform == 'win32': test = TestGyp.TestG...
broferek/ansible
refs/heads/devel
lib/ansible/modules/network/onyx/onyx_protocol.py
22
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
MSeifert04/numpy
refs/heads/master
numpy/distutils/command/config.py
4
# Added Fortran compiler support to config. Currently useful only for # try_compile call. try_run works but is untested for most of Fortran # compilers (they must define linker_exe first). # Pearu Peterson from __future__ import division, absolute_import, print_function import os, signal import warnings import sys imp...
marcoceppi/charms.reactive
refs/heads/master
charms/reactive/decorators.py
1
# Copyright 2014-2015 Canonical Limited. # # This file is part of charm-helpers. # # charm-helpers is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 as # published by the Free Software Foundation. # # charm-helpers is distributed in the hope ...
levkar/odoo
refs/heads/10.0
addons/event/wizard/event_confirm.py
40
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api class event_confirm(models.TransientModel): """Event Confirmation""" _name = "event.confirm" @api.multi def confirm(self): events = self.env['event.event'].browse(s...