repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
weblabdeusto/weblabdeusto
refs/heads/master
server/launch/sample/main_machine/main_instance/experiment_jsfpga/server_config.py
3
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- xilinx_board_type = '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:\Program Files\Xilinx...
HoLyVieR/http-security-headers
refs/heads/master
output/HTMLOutput.py
1
import re from jinja2 import Template TEMPLATE_HTML = """ <html> <head> <title>{{ title }}</title> {% for file in javascript %} <script type="text/javascript" src="{{ file }}"></script> {% endfor %} {% for file in css %} <link type="text/css" href="{{ file }}" rel="stylesheet" /> {% endfor %} </head> <bod...
eXcomm/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/subdirectory/gyptest-top-all.py
261
#!/usr/bin/env python # Copyright (c) 2009 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 building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
opennode/nodeconductor
refs/heads/develop
waldur_core/server/admin/dashboard.py
1
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from fluent_dashboard.dashboard import modules, FluentIndexDashboard, FluentAppIndexDashboard import six from waldur_core import...
Ban3/Limnoria
refs/heads/master
plugins/Lart/__init__.py
4
### # Copyright (c) 2005, Daniel DiPaolo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condition...
markwang2764/sku
refs/heads/master
node_modules/.3.5.0@node-gyp/gyp/gyptest.py
1752
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner(obje...
schmunk42/compose
refs/heads/master
tests/__init__.py
20
from __future__ import absolute_import from __future__ import unicode_literals import sys if sys.version_info >= (2, 7): import unittest # NOQA else: import unittest2 as unittest # NOQA try: from unittest import mock except ImportError: import mock # NOQA
aurelijusb/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/build/gyp/test/win/gyptest-macro-projectname.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 macro expansion of $(ProjectName) is handled. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.Te...
minhtuancn/odoo
refs/heads/8.0
addons/website_sale/models/product.py
262
# -*- 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 ...
danielvdende/VizServe
refs/heads/master
util/messages.py
1
# This file contains default error messages to be used. notFound = { "status": "error", "type": "404 Not found", "message": "Not found error" } serverError = { "status": "error", "type": "500 Server error", "message": "Unknown internal server error" } badRequest = { "status": "error", ...
yawd/django-sphinxdoc
refs/heads/master
sphinxdoc/models.py
2
# encoding: utf-8 """ Models for django-sphinxdoc. """ from django.db import models from sphinxdoc.validators import validate_isdir class Project(models.Model): """ Represents a Sphinx project. Each ``Project`` has a name, a slug and a path to the root directory of a Sphinx project (where Sphinx’ ``conf...
RAPD/RAPD
refs/heads/master
src/old_agents/subcontractors/xdsme/new/xdsme-0.4.9/XOconv/pycgtypes/vec4.py
12
#################################################################### # vec4 - 4-dimensional vector # # Copyright (C) 2002, Matthias Baas ([email protected]) # # You may distribute under the terms of the BSD license, as # specified in the file license.txt. ##################################################################...
vmindru/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigiq_application_fasthttp.py
21
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
osantana/pactum
refs/heads/master
samples/orders_api.py
1
import pactum from pactum import fields, verbs class SKUField(fields.Field): extensions = {'openapi.type': 'string'} class MoneyField(fields.DecimalField): extensions = {'openapi.type': 'float'} precision = 2 class ItemResource(pactum.Resource): fields = [ fields.IntegerField(name="id"), ...
osin-vladimir/ms-thesis-skoltech
refs/heads/master
mxnet-ssd/train_tir.py
1
import argparse import tools.find_mxnet import mxnet as mx import os import sys from train.train_tir_net import train_tir_net import datetime def parse_args(): parser = argparse.ArgumentParser(description='Train a Single-shot detection network') # data set params parser.add_argument('--dataset', dest='da...
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
third_party/closure_compiler/processor.py
32
# 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. """Process Chrome resources (HTML/CSS/JS) to handle <include> and <if> tags.""" from collections import defaultdict import re import os class LineNumber(o...
cbingos/cpro
refs/heads/master
whoosh/lang/morph_en.py
43
""" Contains the variations() function for expanding an English word into multiple variations by programatically adding and removing suffixes. Translated to Python from the ``com.sun.labs.minion.lexmorph.LiteMorph_en`` class of Sun's `Minion search engine <https://minion.dev.java.net/>`_. """ import re from whoosh.c...
ericpre/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/conftest.py
2
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
hvy/chainer
refs/heads/master
chainer/function_node.py
3
import collections import contextlib import heapq import inspect import traceback import weakref import six import chainer from chainer import _backprop_utils from chainer import backend from chainer.backends import cuda from chainer import configuration from chainer import function_hook from chainer.graph_optimizati...
fyffyt/scikit-learn
refs/heads/master
sklearn/_build_utils.py
280
""" Utilities useful during the build. """ # author: Andy Mueller, Gael Varoquaux # license: BSD from numpy.distutils.system_info import get_info def get_blas_info(): def atlas_not_found(blas_info_): def_macros = blas_info.get('define_macros', []) for x in def_macros: if x[0] == "NO_...
lckung/spark-ec2
refs/heads/branch-1.5
launch-script/lib/boto-2.34.0/tests/integration/cognito/__init__.py
112
# Copyright (c) 2014 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 ...
mozillazg/Unidecode
refs/heads/master
unidecode/x05e.py
250
data = ( 'Za ', # 0x00 'Bi ', # 0x01 'Shi ', # 0x02 'Bu ', # 0x03 'Ding ', # 0x04 'Shuai ', # 0x05 'Fan ', # 0x06 'Nie ', # 0x07 'Shi ', # 0x08 'Fen ', # 0x09 'Pa ', # 0x0a 'Zhi ', # 0x0b 'Xi ', # 0x0c 'Hu ', # 0x0d 'Dan ', # 0x0e 'Wei ', # 0x0f 'Zhang ', # 0x10 'Tang ...
0k/OpenUpgrade
refs/heads/8.0
openerp/report/render/rml2html/__init__.py
381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
ShadowMyst/creativechain-core
refs/heads/master
qa/rpc-tests/rest.py
50
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 REST interface # from test_framework.test_framework import BitcoinTestFramework from test_fram...
40223121/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/logging/handlers.py
736
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
jiwanlimbu/aura
refs/heads/master
keystone/common/sql/expand_repo/versions/004_reset_password_created_at.py
40
# 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 # distributed under t...
techdragon/django
refs/heads/master
tests/expressions/models.py
261
""" Tests for F() query expression syntax. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Employee(models.Model): firstname = models.CharField(max_length=50) lastname = models.CharField...
koobonil/Boss2D
refs/heads/master
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/distributions/python/ops/deterministic.py
64
# 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...
susilehtola/psi4
refs/heads/master
tests/pytests/conftest.py
7
import pytest def pytest_configure(config): # Register marks to avoid warnings in psi4.test() # sync with setup.cfg config.addinivalue_line("markers", "check_triplet") config.addinivalue_line("markers", "dft") config.addinivalue_line("markers", "gga") config.addinivalue_line("markers", "hf") ...
Antiun/connector-magento
refs/heads/8.0
magentoerpconnect/related_action.py
11
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
tools/perf/benchmarks/start_with_ext.py
14
# Copyright 2015 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. from core import perf_benchmark from measurements import startup import page_sets from telemetry import benchmark class _StartWithExt(perf_benchmark.PerfBe...
Kongsea/tensorflow
refs/heads/master
tensorflow/contrib/seq2seq/python/ops/beam_search_ops.py
124
# 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...
optiminimalist/pyphoto
refs/heads/master
pyphoto/flickr_uploader.py
1
""" pyphoto.flickr_uploader ~~~~~~~~~~~~~~~~ Uploads photos to flickr. :copyright: (c) 2013 by Michael Luckeneder. """ from __future__ import absolute_import import flickrapi import logging from urllib2 import HTTPError from flickrapi.exceptions import FlickrError from .retrier import retrier from fun...
advx9600/pjsip-android
refs/heads/master
tests/pjsua/scripts-media-playrec/100_resample_lf_11_8.py
59
# $Id: 100_resample_lf_11_8.py 2052 2008-06-25 18:18:32Z nanang $ # from inc_cfg import * # simple test test_param = TestParam( "Resample (large filter) 11 KHZ to 8 KHZ", [ InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 8000 --play-file wavs/input.11.wav --rec-file wavs/tmp.8.wav") ] )
studio666/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/actions/gyptest-all.py
243
#!/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 simple actions when using an explicit build target of 'all'. """ import glob import os import TestGyp test = TestGyp.TestGyp(...
wangjun/pinry
refs/heads/master
setup.py
7
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() install_requires = [ 'Django', 'Pillow', 'South', 'requests', 'django-taggit', 'django-images', 'django-braces', 'django_compressor', 'dja...
westinedu/wrgroups
refs/heads/master
django/contrib/gis/db/backends/oracle/base.py
623
from django.db.backends.oracle.base import * from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper from django.contrib.gis.db.backends.oracle.creation import OracleCreation from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection from django.contrib.gis.db.backen...
sachintaware/sublime-wakatime
refs/heads/master
packages/wakatime/packages/pygments_py3/pygments/lexers/ecl.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.ecl ~~~~~~~~~~~~~~~~~~~ Lexers for the ECL language. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, words from pygments....
paulthulstrup/moose
refs/heads/master
gui/plug_ins/PeacockApplication.py
8
try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui QtCore.QString = str except ImportError: raise ImportError("Cannot load either PyQt or PySide") import MeshInfoFacto...
jos4uke/getSeqFlankBlatHit
refs/heads/master
lib/python2.7/site-packages/pybedtools/scripts/venn_gchart.py
1
#!/usr/bin/env python """ Given 3 files, creates a 3-way Venn diagram of intersections using the Google \ Chart API; see :mod:`pybedtools.contrib.venn_maker` for more flexibility. The values in the diagram assume: * unstranded intersections * no features that are nested inside larger features """ import argp...
todaychi/hue
refs/heads/master
desktop/core/ext-py/boto-2.46.1/boto/vpc/vpngateway.py
170
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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, modi...
Clumsy-Kernel-Development/HTC_10_Kernel
refs/heads/master
tools/perf/scripts/python/netdev-times.py
1544
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
pe-suke/ansible
refs/heads/devel
lib/ansible/module_utils/urls.py
125
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
bop/foundation
refs/heads/master
lib/python2.7/site-packages/django/contrib/flatpages/views.py
94
from django.contrib.flatpages.models import FlatPage from django.template import loader, RequestContext from django.shortcuts import get_object_or_404 from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.conf import settings from django.core.xheaders import populate_xheaders from dja...
maizy/giiit
refs/heads/master
giiit/models/tree.py
1
# _*_ coding: utf-8 _*_# _*_ coding: utf-8 _*_ # Copyright (c) Nikita Kovaliov, maizy.ru, 2013 # See LICENSE.txt for details. from __future__ import unicode_literals, absolute_import from collections import namedtuple STATUS_CODES = { ' ': 'unmodified', 'M': 'modified', 'A': 'added', 'D': 'deleted', ...
punkkeks/OctoPrint
refs/heads/master
tests/slicing/__init__.py
47
# coding=utf-8 """ Unit tests for ``octoprint.slicing``. """ from __future__ import absolute_import __author__ = "Gina Häußge <[email protected]>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of th...
pjg101/SickRage
refs/heads/master
lib/twilio/rest/resources/conferences.py
51
from .util import parse_date, normalize_dates from . import InstanceResource, ListResource class Participant(InstanceResource): id_key = "call_sid" def mute(self): """ Mute the participant """ self.update_instance(muted="true") def unmute(self): """ Unmut...
shaistaansari/django
refs/heads/master
django/contrib/postgres/lookups.py
199
from django.db.models import Lookup, Transform class PostgresSimpleLookup(Lookup): def as_sql(self, qn, connection): lhs, lhs_params = self.process_lhs(qn, connection) rhs, rhs_params = self.process_rhs(qn, connection) params = lhs_params + rhs_params return '%s %s %s' % (lhs, self...
simonsdave/tor-async-couchdb
refs/heads/master
tor_async_couchdb/async_model_actions.py
1
"""This module contains a collection of classes that implement Tornado async actions against CouchDB. """ import httplib import json import logging import re import urllib import tornado.httputil import tornado.httpclient import tornado.ioloop import tamper _logger = logging.getLogger("async_actions.%s" % __name__...
c0defreak/python-for-android
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/calendar/__init__.py
135
#!/usr/bin/python # # Copyright (C) 2006 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 ...
jaesivsm/the_conf
refs/heads/master
the_conf/__init__.py
1
from .the_conf import TheConf __all__ = ['TheConf']
Aasmi/scikit-learn
refs/heads/master
sklearn/preprocessing/__init__.py
14
""" The :mod:`sklearn.preprocessing` module includes scaling, centering, normalization, binarization and imputation methods. """ from .data import Binarizer from .data import KernelCenterer from .data import MinMaxScaler from .data import MaxAbsScaler from .data import Normalizer from .data import RobustScaler from .d...
o0neup/ibis
refs/heads/master
docs/source/conf.py
8
# -*- coding: utf-8 -*- # # Ibis documentation build configuration file, created by # sphinx-quickstart on Wed Jun 10 11:06:29 2015. # # 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 # autogenerated file. # # All ...
shadyueh/pyranking
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/gis/db/models/sql/aggregates.py
298
from django.db.models.sql import aggregates from django.db.models.sql.aggregates import * # NOQA __all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] + aggregates.__all__ warnings.warn( "django.contrib.gis.db.models.sql.aggregates is deprecated. Use " "django.contrib.gis.db.models.aggregates ins...
rackerlabs/deuce-client
refs/heads/master
deuceclient/tests/test_api_v1.py
1
""" Tests - Deuce Client - API - V1 URLs """ import hashlib import json import os import random from unittest import TestCase import uuid import httpretty import mock import deuceclient.api as api import deuceclient.tests as baseline class DeuceClientV1ApiSupportTests(TestCase): def setUp(self): super(...
markfinger/python-react
refs/heads/master
react/apps.py
2
from django.conf import settings from django.apps import AppConfig import react.conf class ReactConfig(AppConfig): name = 'react' def ready(self): react.conf.settings._PROXY_DJANGO_SETTINGS = True react.conf.settings.configure( **getattr(settings, 'REACT', {}) )
kgururaj/rocks-centos7
refs/heads/master
centos7_ks/scripts/disk.py
1
import sys import os sys.path = [ '/export/rocks/install/rocks-dist/x86_64/build/include/installclass' ] + sys.path; import re import subprocess import shlex #import argparse membership = '&membership;' nodename = '&hostname;' def find_disk_size(disk_size_str): match = re.match(r"([0-9\.]+)([a-z]+)", disk_size_st...
kartikdhar/djangotest
refs/heads/master
virt1/lib/python2.7/site-packages/django/contrib/gis/sitemaps/kml.py
398
from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.sitemaps import Sitemap from django.core import urlresolvers from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' de...
ivanhorvath/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/lib_openshift/library/oc_version.py
6
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
UstadMobile/exelearning-ustadmobile-work
refs/heads/master
twisted/web/http_headers.py
44
# -*- test-case-name: twisted.web.test.test_http_headers # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An API for storing HTTP header names and values. """ from __future__ import division, absolute_import from collections import MutableMapping from twisted.python.compat import comparab...
xxsergzzxx/python-for-android
refs/heads/master
python-modules/twisted/twisted/conch/insults/colors.py
146
""" You don't really want to use this module. Try helper.py instead. """ CLEAR = 0 BOLD = 1 DIM = 2 ITALIC = 3 UNDERSCORE = 4 BLINK_SLOW = 5 BLINK_FAST = 6 REVERSE = 7 CONCEALED = 8 FG_BLACK = 30 FG_RED = 31 FG_GREEN = 32 FG_YELLOW = 33 FG_BLUE = 34 FG_MAGENTA = 35 FG_CYAN = 36 FG_WHITE = 37 BG_BLACK = 40 BG_RED = 41 ...
dudepare/django
refs/heads/master
tests/fixtures_model_package/tests.py
312
from __future__ import unicode_literals import warnings from django.core import management from django.test import TestCase from .models import Article class SampleTestCase(TestCase): fixtures = ['fixture1.json', 'fixture2.json'] def testClassFixtures(self): "Test cases can load fixture objects in...
CoolProp/CoolProp-museum
refs/heads/master
wrappers/Python/CoolProp/Plots/Tests.py
2
# -*- coding: utf-8 -*- """ Created on Thu Sep 12 18:39:22 2013 @author: logan """ from Plots import PropsPlot #TODO: Change to absolute import def main(): fluid_ref = 'n-Pentane' for plot_type in ['Ts']: #['pt', 'ph', 'ps', 'ts', 'pt', 'prho', 'trho']: plt = PropsPlot(fluid_ref, plot_type) ...
jroyal/drafthouse-api
refs/heads/master
drafthouse/cinemas.py
1
from feed import get_feed from films import Film import json def get_cinemas(market_id): cinemas = [] feed = get_feed(market_id) for cinema in feed["Market"]["Dates"][0]["Cinemas"]: cinemas.append({ "cinema_name": cinema["CinemaName"], "cinema_id": cinema["CinemaId"] ...
adamchainz/ansible
refs/heads/devel
lib/ansible/modules/notification/hipchat.py
34
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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. ...
VladKha/CodeWars
refs/heads/master
8 kyu/Name Shuffler/solve.py
1
def name_shuffler(s): return ' '.join(s.split()[::-1])
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
tools/perf/measurements/record_per_area_unittest.py
33
# 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. from measurements import record_per_area from telemetry.core import wpr_modes from telemetry.unittest import options_for_unittests from telemetry.unittest im...
zdary/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_1/_pkg0_0_0_1_0/_mod0_0_0_1_0_1.py
30
name0_0_0_1_0_1_0 = None name0_0_0_1_0_1_1 = None name0_0_0_1_0_1_2 = None name0_0_0_1_0_1_3 = None name0_0_0_1_0_1_4 = None
signed/intellij-community
refs/heads/master
python/testData/keywordCompletion/finallyInExcept.py
83
try: a = 1 except: a = 2 fina<caret>
Hellrungj/CSC-412-Networking
refs/heads/master
Protocol_Buffers/venv/lib/python2.7/site-packages/google/protobuf/descriptor_database.py
88
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
maheshnakarmi/django-zoook-master
refs/heads/master
django_zoook/catalog/templatetags/product_products.py
2
# -*- coding: utf-8 -*- ############################################################################################ # # Zoook. OpenERP e-sale, e-commerce Open Source Management Solution # Copyright (C) 2011 Zikzakmedia S.L. (<http://www.zikzakmedia.com>). All Rights Reserved # $Id$ # # Module Created: 2012...
neutrak/py3_markov
refs/heads/master
confuseus.py
1
#!/usr/bin/env python3 from py3net import * import socket import config import http_cat import markov import random import rpn import diff_tool import sys import time import ssl import json import errno import select import os import bcrypt #for the database backend which significantly reduces RAM use use_pg=False db...
clumsy/intellij-community
refs/heads/master
python/testData/refactoring/changeSignature/addDefaultParam.before.py
415
def bar(a, b): pass bar(1, 2)
mellis13/moose
refs/heads/devel
framework/contrib/nsiqcppstyle/nsiqcppstyle_util.py
43
# Copyright (c) 2009 NHN Inc. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the follow...
junalmeida/Sick-Beard
refs/heads/master
sickbeard/providers/omgwtfnzbs.py
15
# Author: Jordon Smith <[email protected]> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 th...
myusuf3/delorean
refs/heads/master
delorean/exceptions.py
4
class DeloreanError(Exception): """ Base Delorean Exception class """ def __init__(self, msg): self.msg = str(msg) Exception.__init__(self, msg) def __str__(self): return self.msg class DeloreanInvalidTimezone(DeloreanError): """ Exception that is raised when an i...
nicholaslemay/python_koans
refs/heads/master
python3/runner/runner_tests/test_helper.py
244
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from runner import helper class TestHelper(unittest.TestCase): def test_that_get_class_name_works_with_a_string_instance(self): self.assertEqual("str", helper.cls_name(str())) def test_that_get_class_name_works_with_a_4(self): se...
Intel-Corporation/tensorflow
refs/heads/master
tensorflow/python/training/sync_replicas_optimizer_test.py
19
# 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...
kumarshivam675/Mobile10X-Hack
refs/heads/master
irctc.py
1
import urllib2 import hmac from hashlib import sha1 import json def MyPnrTestFn(): #Setting Credentials apiCreds = {} apiCreds["Key"] = "Your public key" apiCreds["Secret"] = "Your api secret/private key" pnr = "1234567890" #Test Pnr requestUrlTemplate = "http://railpnrapi.com/api/check_pnr/pnr/"+pnr+"/format...
codeaudit/pattern-1
refs/heads/master
pattern/web/soup/setup.py
50
from distutils.core import setup import unittest import warnings warnings.filterwarnings("ignore", "Unknown distribution option") import sys # patch distutils if it can't cope with the "classifiers" keyword if sys.version < '2.2.3': from distutils.dist import DistributionMetadata DistributionMetadata.classifie...
sjdv1982/seamless
refs/heads/master
docs/archive/spyder-like-silk/classes/primitives.py
1
# Copyright 2007-2016, Sjoerd de Vries # TODO: primitive arrays import ast import numpy as np from . import SilkObject, SilkStringLike class Float(float, SilkObject): """Wrapper class around a Python float Uses float32 as numpy representation""" dtype = np.float32 def json(self): return sel...
wdv4758h/ZipPy
refs/heads/master
lib-python/3/wsgiref/validate.py
51
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php # Licensed to PSF under a Contributor Agreement """ Middlew...
laurent-george/bokeh
refs/heads/master
examples/charts/file/dots.py
37
from collections import OrderedDict from bokeh.charts import Dot, show, output_file # create some example data xyvalues = OrderedDict( python=[2, 3, 7, 5, 26], pypy=[12, 33, 47, 15, 126], jython=[22, 43, 10, 25, 26], ) # any of the following commented are also valid Dot inputs #xyvalues = pd.DataFrame(xy...
liorvh/raspberry_pwn
refs/heads/master
src/pentest/metagoofil/hachoir_parser/video/asf.py
9
""" Advanced Streaming Format (ASF) parser, format used by Windows Media Video (WMF) and Windows Media Audio (WMA). Informations: - http://www.microsoft.com/windows/windowsmedia/forpros/format/asfspec.aspx - http://swpat.ffii.org/pikta/xrani/asf/index.fr.html Author: Victor Stinner Creation: 5 august 2006 """ from h...
40223108/w18
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/pydoc_data/topics.py
694
# -*- coding: utf-8 -*- # Autogenerated by Sphinx on Sat Mar 23 15:42:31 2013 topics = {'assert': '\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form,...
hongzhouye/frankenstein
refs/heads/master
tests/be_test.py
1
""" This script tests the scf module. """ import os import numpy as np import pytest from frankenstein.be import BE @pytest.mark.parametrize( "geom, basis, fsites, frank, incore, nibath, solver, jac, B0, bad_con, " "good_con, e_ps_ref", [ # Frankenstein BE, FCI solver ("geom/h10.zmat", "st...
AthinaB/synnefo
refs/heads/feature-newui-pithos
snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/versions/2efddde15abf_diefferentiate_hashm.py
10
"""Differentiate hashmap from mapfile Revision ID: 2efddde15abf Revises: e6edec1b499 Create Date: 2014-06-11 10:46:04.116321 """ # revision identifiers, used by Alembic. revision = '2efddde15abf' down_revision = 'e6edec1b499' from alembic import op import sqlalchemy as sa def upgrade(): op.execute(sa.schema.C...
lucassid/ns-3-dev-git
refs/heads/master
src/buildings/bindings/callbacks_list.py
664
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'], ]
jholster/django-birdie
refs/heads/master
appearance/tests.py
1940
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1776
######################## 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. # # Con...
eugena/django
refs/heads/master
django/http/request.py
66
from __future__ import unicode_literals import copy import re import sys from io import BytesIO from itertools import chain from django.conf import settings from django.core import signing from django.core.exceptions import DisallowedHost, ImproperlyConfigured from django.core.files import uploadhandler from django.h...
pllim/astropy
refs/heads/placeholder
astropy/visualization/wcsaxes/tests/test_misc.py
4
# Licensed under a 3-clause BSD style license - see LICENSE.rst from packaging.version import Version import pytest import numpy as np import matplotlib import matplotlib.pyplot as plt from contextlib import nullcontext from matplotlib.contour import QuadContourSet from astropy import units as u from astropy.wcs impo...
bparafina/shadowsocks
refs/heads/master
shadowsocks/shell.py
652
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/plugins/action/set_fact.py
109
# Copyright 2013 Dag Wieers <[email protected]> # # 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 versio...
johnkingsley/aprinter
refs/heads/master
upload.py
1
from __future__ import print_function import argparse import sys import signal def main(): signal.signal(signal.SIGINT, signal.SIG_DFL) parser = argparse.ArgumentParser() parser.add_argument('-l', '--length', type=int, default=1000000) parser.add_argument('-c', '--chunked', action='store_true') ...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/third_party/jinja2/filters.py
598
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import groupby from jinja2.utils...
fritsvanveen/QGIS
refs/heads/master
python/plugins/processing/algs/examplescripts/__init__.py
15
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : July 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ********************************...
LLNL/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-transformers/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyTransformers(PythonPackage): """State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTor...
mmclenna/engine
refs/heads/master
testing/chromoting/download_test_files.py
57
# Copyright (c) 2015 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 script to download files required for Remoting integration tests from GCS. The script expects 2 parameters: input_files: a file containing t...
jmcarp/django
refs/heads/master
django/core/context_processors.py
309
import warnings from django.template.context_processors import * # NOQA from django.utils.deprecation import RemovedInDjango110Warning warnings.warn( "django.core.context_processors is deprecated in favor of " "django.template.context_processors.", RemovedInDjango110Warning, stacklevel=2)