repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
flexiant/xen
refs/heads/master
tools/python/logging/logging-0.4.9.2/test/log_test7.py
42
#!/usr/bin/env python # # Copyright 2001-2002 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 n...
alphafoobar/intellij-community
refs/heads/master
python/testData/psi/MissingDefaultValue.py
83
def fa(a=): pass
bckwltn/SickRage
refs/heads/master
lib/fanart/errors.py
63
class FanartError(Exception): def __str__(self): return ', '.join(map(str, self.args)) def __repr__(self): name = self.__class__.__name__ return '%s%r' % (name, self.args) class ResponseFanartError(FanartError): pass class RequestFanartError(FanartError): pass
DeanSherwin/django-dynamic-scraper
refs/heads/master
example_project/example_project/settings.py
2
from __future__ import unicode_literals # Django settings for example_project project. import os, sys DEBUG = True PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(PROJECT_ROOT, "../..")) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASE...
Tesora/tesora-horizon
refs/heads/master
openstack_dashboard/dashboards/project/images/panel.py
34
# Copyright 2012 Nebula, Inc. # Copyright 2012 OpenStack Foundation # # 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 # # Unle...
metacloud/molecule
refs/heads/master
test/unit/command/test_idempotence.py
1
# Copyright (c) 2015-2018 Cisco Systems, 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...
ysekky/GPy
refs/heads/devel
GPy/kern/src/ODE_UYC.py
5
# Copyright (c) 2013, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from .kern import Kern from ...core.parameterization import Param from paramz.transformations import Logexp import numpy as np from .independent_outputs import index_to_slices class ODE_UYC(Kern): def ...
luci/luci-py
refs/heads/master
client/third_party/rsa/rsa/core.py
96
# -*- 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...
Lektorium-LLC/edx-platform
refs/heads/master
lms/djangoapps/instructor_task/tests/test_models.py
10
""" Tests for instructor_task/models.py. """ import copy import time from cStringIO import StringIO import boto from django.conf import settings from django.test import SimpleTestCase, TestCase, override_settings from mock import patch from opaque_keys.edx.locator import CourseLocator from common.test.utils import Mo...
obtusecoin/obtusecoin
refs/heads/master
contrib/wallettools/walletchangepass.py
2299
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:8332") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
rupran/ansible
refs/heads/devel
lib/ansible/cli/__init__.py
8
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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, eithe...
pandaoknight/leetcode
refs/heads/master
resolved/min-cost-climbing-stairs.py
1
#-*- coding: utf-8 -*- class Solution(object): def minCostClimbingStairs(self, cost): """ :type cost: List[int] :rtype: int """ # special input if 1 == len(cost): return 0 # init status 起始条件 best_map = {0: cost[0], 1: cost[1]} # ...
saintbird/django-cms
refs/heads/develop
cms/utils/page.py
48
# -*- coding: utf-8 -*- from django.conf import settings from django.db.models import Q import re from cms.exceptions import NoHomeFound APPEND_TO_SLUG = "-copy" COPY_SLUG_REGEX = re.compile(r'^.*-copy(?:-(\d+)*)?$') def is_valid_page_slug(page, parent, lang, slug, site, path=None): """Validates given slug depen...
liang42hao/bokeh
refs/heads/master
bokeh/server/storage/shelve.py
13
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #----------------------------------------...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib-tk/test/runtktests.py
62
""" Use this module to get and run all tk tests. Tkinter tests should live in a package inside the directory where this file lives, like test_tkinter. Extensions also should live in packages following the same rule as above. """ import os import sys import unittest import importlib import test.test_support this_dir_...
trondhindenes/ansible-modules-extras
refs/heads/devel
cloud/amazon/ecs_taskdefinition.py
60
#!/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...
jasonwzhy/django
refs/heads/master
django/contrib/gis/db/backends/postgis/base.py
366
from django.db.backends.base.base import NO_DB_ALIAS from django.db.backends.postgresql.base import \ DatabaseWrapper as Psycopg2DatabaseWrapper from .features import DatabaseFeatures from .introspection import PostGISIntrospection from .operations import PostGISOperations from .schema import PostGISSchemaEditor ...
hiuwo/acq4
refs/heads/master
acq4/analysis/modules/DatabaseExplorer/DatabaseExplorer.py
4
from PyQt4 import QtGui, QtCore from acq4.analysis.AnalysisModule import AnalysisModule #import acq4.analysis.modules.EventDetector as EventDetector #import MapCtrlTemplate import acq4.util.DatabaseGui as DatabaseGui #from flowchart import * #import flowchart.library.EventDetection as FCEventDetection import os from co...
vkscool/nupic
refs/heads/master
tests/integration/nupic/opf/opf_checkpoint_test/experiments/non_temporal_multi_step/base.py
4
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2012-2015, 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 p...
saisaizhang/Food
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/certifi/__main__.py
126
from pip._vendor.certifi import where print(where())
Livit/Livit.Learn.EdX
refs/heads/labster/develop
common/djangoapps/util/help_context_processor.py
10
""" Common functionality for Django Template Context Processor for Online Contextual Help. """ import ConfigParser from django.conf import settings import logging log = logging.getLogger(__name__) def common_doc_url(request, config_file_object): # pylint: disable=unused-argument """ This function is added...
ndingwall/scikit-learn
refs/heads/master
doc/sphinxext/github_link.py
15
from operator import attrgetter import inspect import subprocess import os import sys from functools import partial REVISION_CMD = 'git rev-parse --short HEAD' def _get_git_revision(): try: revision = subprocess.check_output(REVISION_CMD.split()).strip() except (subprocess.CalledProcessError, OSError...
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
third_party/jinja2/nodes.py
623
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
MontrealCorpusTools/MFA-reorganization-scripts
refs/heads/main
SCOTS/clean_scots.py
1
#!/usr/bin/env python # Cleans up SCOTS textgrids to be used with the MFA # [CENSORED: forename] # <vocallex desc=""eh"" /> # <gap reason=""inaudible"" /> # <unclear></unclear> # <falsestart>wor-</falsestart> # <trunc>wor-</trunc> # [non lexical items, non linguistic events] import os import sys import re import su...
zachcp/qiime
refs/heads/master
scripts/denoise_wrapper.py
15
#!/usr/bin/env python # File created on 09 Feb 2010 from __future__ import division """Denoising of 454 *.sff.txt files""" __author__ = "Jens Reeder" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Jens Reeder", "Greg Caporaso", "Jose Antonio Navas Molina"] __license__ = "GPL" __version__ = "1.9.1...
mathjazz/pontoon
refs/heads/master
pontoon/projects/forms.py
4
from django import forms from django.core import validators from pontoon.base.forms import HtmlField class NotificationsForm(forms.Form): message = HtmlField() selected_locales = forms.CharField( validators=[validators.validate_comma_separated_integer_list] )
jhawkesworth/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_evpn_vni.py
27
#!/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 distribut...
ex1usive-m4d/TemplateDocx
refs/heads/master
controllers/phpdocx/lib/openoffice/openoffice.org/basis3.4/program/python-core-2.6.1/lib/encodings/raw_unicode_escape.py
852
""" Python 'raw-unicode-escape' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is ...
eteq/bokeh
refs/heads/master
bokeh/mplexporter/__init__.py
11
from __future__ import absolute_import from .renderers import Renderer from .exporter import Exporter
acutesoftware/AIKIF
refs/heads/master
aikif/toolbox/zip_tools.py
1
#!/usr/bin/python3 # coding: utf-8 # zip_tools.py import os import zipfile import gzip import tarfile import fnmatch def extract_all(zipfile, dest_folder): """ reads the zip file, determines compression and unzips recursively until source files are extracted """ z = ZipFile(zipfile) prin...
VasuAgrawal/tartanHacks2015
refs/heads/master
site/flask/lib/python2.7/site-packages/coverage/parser.py
160
"""Code parsing for Coverage.""" import dis, re, sys, token, tokenize from coverage.backward import set, sorted, StringIO # pylint: disable=W0622 from coverage.backward import open_source, range # pylint: disable=W0622 from coverage.backward import reversed # pylint: disable=W0622 from coverage.backwa...
dhp-denero/server-tools
refs/heads/8.0
base_report_auto_create_qweb/__init__.py
104
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models from . import wizard
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/django/contrib/messages/tests/test_session.py
226
from django.contrib.messages import constants from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.session import SessionStorage from django.utils.safestring import SafeData, mark_safe from django.test import TestCase de...
chudaol/edx-platform
refs/heads/master
lms/djangoapps/dashboard/sysadmin_urls.py
60
""" Urls for sysadmin dashboard feature """ # pylint: disable=no-value-for-parameter from django.conf.urls import patterns, url from dashboard import sysadmin urlpatterns = patterns( '', url(r'^$', sysadmin.Users.as_view(), name="sysadmin"), url(r'^courses/?$', sysadmin.Courses.as_view(), name="sysadmin_...
django-py/django-openid-provider
refs/heads/master
oidc_provider/lib/utils/token.py
1
from datetime import timedelta import time import uuid from django.utils import timezone import jwt from oidc_provider.lib.utils.common import get_issuer from oidc_provider.models import * from oidc_provider import settings def create_id_token(user, aud): """ Receives a user object and aud (audience). T...
nocarryr/vidhub-control
refs/heads/master
vidhubcontrol/config.py
1
import os import json import asyncio from loguru import logger import jsonfactory from pydispatch import Dispatcher, Property from pydispatch.properties import ListProperty, DictProperty from vidhubcontrol.discovery import BMDDiscovery from vidhubcontrol.backends import ( DummyBackend, SmartViewDummyBackend, ...
barry-scott/git-workbench
refs/heads/master
Source/Scm/wb_scm_main_window.py
2
''' ==================================================================== Copyright (c) 2003-2018 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. ======================================================...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/Django/django/utils/checksums.py
113
""" Common checksum routines (used in multiple localflavor/ cases, for example). """ __all__ = ['luhn',] from django.utils import six LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2) def luhn(candidate): """ Checks a candidate number for validity according to the Luhn algorith...
smurfix/DaBroker
refs/heads/master
dabroker/util/json.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function,absolute_import import sys from time import mktime from json.encoder import JSONEncoder from json.decoder import JSONDecoder from zuko import config from . import attrdict, TZ,UTC, format_dt import datetime as dt from collections.abc impor...
mitya57/django
refs/heads/master
tests/migrations/test_migrations_squashed/0002_second.py
266
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")] operations = [ migrations.DeleteModel("Tribble"), migrations.RemoveField("Author", "silly_field"), migrations.AddField("Author", "rating", models.Integer...
scrollback/kuma
refs/heads/master
vendor/src/elasticsearch-dsl-py/elasticsearch_dsl/aggs.py
5
from .utils import DslBase, _make_dsl_class def A(name_or_agg, **params): # {"terms": {"field": "tags"}, "aggs": {...}} if isinstance(name_or_agg, dict): if params: raise ValueError('A() cannot accept parameters when passing in a dict.') # copy to avoid modifying in-place a...
artemh/asuswrt-merlin
refs/heads/master
release/src/router/wget/testenv/Test-c-full.py
23
#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ Test Wget's response when the file requested already exists on disk with a filesize greater than or equal to the requested file. """ TEST_NAME = "Test continue option" ############# File Defi...
Carpetsmoker/qutebrowser
refs/heads/master
qutebrowser/browser/webkit/rfc6266.py
2
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
socialsweethearts/django-allauth
refs/heads/master
allauth/socialaccount/providers/soundcloud/models.py
4209
# Create your models here.
rockyzhang/zhangyanhit-python-for-android-mips
refs/heads/master
python3-alpha/python3-src/Lib/test/test_dict.py
50
import unittest from test import support import collections, random, string import gc, weakref class DictTest(unittest.TestCase): def test_invalid_keyword_arguments(self): class Custom(dict): pass for invalid in {1 : 2}, Custom({1 : 2}): with self.assertRaises(TypeError):...
agry/NGECore2
refs/heads/master
scripts/object/tangible/component/item/quest_item/corrective_inducer.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/armor/armor_appearance_mandalorian_imperial_bicep_l.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/component/bio/bio_component_clothing_field_intimidate.py
85615
import sys def setup(core, object): return
hoehnp/navit_test
refs/heads/master
lib/python2.7/site-packages/pip/utils/glibc.py
350
from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the retur...
lietk12/fermentor
refs/heads/master
fermenter.py
2
#!/usr/bin/env python2 """ Drives an Arduino to control a fermenter. """ import time from datetime import datetime from array import array import numpy as np from Arduino import Arduino import threading from threading import Thread import signal import sys #############################################################...
eladnoor/small-molecule-regulation
refs/heads/master
python/reaction_thermodynamics.py
1
# -*- coding: utf-8 -*- """ Created on Fri Dec 9 13:37:50 2016 @author: noore calculates dG'0 and dG'm for reaction from a Cobra model """ import settings import bigg import kegg import numpy as np import pandas as pd import sys sys.path.append('/home/noore/git/component-contribution') from component_contribution...
HenrikSolver/micropython
refs/heads/master
tests/extmod/uctypes_native_le.py
26
# This test is exactly like uctypes_le.py, but uses native structure layout. # Codepaths for packed vs native structures are different. This test only works # on little-endian machine (no matter if 32 or 64 bit). import sys try: import uctypes except ImportError: print("SKIP") raise SystemExit if sys.byteo...
shinn16/WAN-Tracker
refs/heads/stable
Setup.py
1
#! /usr/bin/python3 """ @author Patrick Shinn @version 2 Last Updated: 4/8/16 This is the setting setup for WAN_Checker.py, run this before running WAN_Checker.py This program will ask a series of ten questions to the user to get the proper settings. """ import os done = False # Boolean for loops # Settings file to b...
Brainbuster/openpli-buildumgebung
refs/heads/master
openembedded-core/meta/lib/oeqa/runtime/skeletoninit.py
3
# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284 testcase # Note that the image under test must have meta-skeleton layer in bblayers and IMAGE_INSTALL_append = " service" in local.conf import unittest from oeqa.oetest import oeRuntimeTest, skipModule from oeqa.utils.decorators im...
smvv/trs
refs/heads/master
src/rules/absolute.py
1
# This file is part of TRS (http://math.kompiler.org) # # TRS 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 version. # # TRS is distrib...
ShadmanAhmmed/UniSec
refs/heads/master
lib/common/messages.py
1
#!/usr/bin/python import os import sys import textwrap def title(version): os.system('clear') print '=====================================================' print ' UniSec: UniVersal Network Scanner | [Version]: Beta' print '=====================================================' print 'A Shadman Ahmme...
n4hy/gnuradio
refs/heads/master
gr-uhd/apps/uhd_fft.py
1
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
Autoplectic/dit
refs/heads/master
dit/example_dists/tests/test_dependencies.py
1
""" Tests of dit.example_dists.dependencies """ from __future__ import division import pytest from dit.example_dists.dependencies import mixed, stacked from dit.multivariate import coinformation, intrinsic_mutual_information def test_mixed1(): """ Test against known values. """ i = coinformation(mi...
mccheung/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_grp.py
88
"""Test script for the grp module.""" import unittest from test import support grp = support.import_module('grp') class GroupDatabaseTestCase(unittest.TestCase): def check_value(self, value): # check that a grp tuple has the entries and # attributes promised by the docs self.assertEqual(...
itsnauman/jumprun
refs/heads/master
test_jumprun.py
1
import unittest import jumprun from docopt import docopt # get docstring for docopt doc = jumprun.__doc__ class TestJumprun(unittest.TestCase): def test_add(self): """ Test the add command """ args = docopt(doc, ['add', 'Test', 'test_file.py']) self.assertEqual(args['add'...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/Hash/MD2.py
124
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
ghandiosm/Test
refs/heads/master
addons/procurement_jit/sale.py
26
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import api, fields, models, _ class SaleOrderLine(models.Model): _inherit = "sale.order.line" @api.multi def _action_procurement_create(self): res = super(SaleOrderLine, self)._action_p...
dhylands/micropython
refs/heads/master
tests/basics/builtin_issubclass.py
96
# test builtin issubclass class A: pass print(issubclass(A, A)) print(issubclass(A, (A,))) try: issubclass(A, 1) except TypeError: print('TypeError') try: issubclass('a', 1) except TypeError: print('TypeError')
cybernet14/scikit-learn
refs/heads/master
examples/decomposition/plot_incremental_pca.py
244
""" =============== Incremental PCA =============== Incremental principal component analysis (IPCA) is typically used as a replacement for principal component analysis (PCA) when the dataset to be decomposed is too large to fit in memory. IPCA builds a low-rank approximation for the input data using an amount of memo...
tedye/leetcode
refs/heads/master
Python/leetcode.117.populating-next-right-pointers-in-each-node-ii.py
1
# Definition for binary tree with next pointer. # class TreeLinkNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution(object): def connect(self, root): """ :type root: TreeLinkNode :...
fagiani/dokku
refs/heads/master
tests/apps/multi/app.py
118
import os from flask import Flask, render_template from werkzeug.wsgi import SharedDataMiddleware app = Flask(__name__) @app.route('/') def hello_world(): return render_template('index.html') app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { '/': os.path.join(os.path.dirname(__file__), 'static') }) app.wsgi_ap...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/tools/perf/benchmarks/memory_benchmark.py
1
# 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. import re from core import perf_benchmark from telemetry import benchmark from telemetry.timeline import tracing_category_filter from telemetry.web_perf im...
yasir1brahim/OLiMS
refs/heads/master
lims/browser/widgets/analysisspecificationwidget.py
2
from dependencies.dependency import ClassSecurityInfo from dependencies.dependency import registerWidget, registerPropertyType from dependencies.dependency import TypesWidget from dependencies.dependency import getToolByName from lims.browser import BrowserView from lims import bikaMessageFactory as _ from lims.utils i...
mlufei/depot_tools
refs/heads/master
tests/git_common_test.py
10
#!/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. """Unit tests for git_common.py""" import binascii import collections import os import signal import sys import tempfile import time i...
jellyDean/flaskell-master
refs/heads/master
flaskell/__init__.py
1
# -*- coding: utf-8 -*- from .app import create_app
AK-Kernel/AK-OnePone
refs/heads/ak-12.1-official
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 version. # # This program i...
Prototanium/Pr
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...
SerCeMan/intellij-community
refs/heads/master
python/testData/refactoring/introduceField/py4414.after.py
83
class SomeClass(): def a(self): self.a = 1
hatRiot/clusterd
refs/heads/master
src/platform/tomcat/fingerprints/Tomcat7.py
8
from src.platform.tomcat.interfaces import AppInterface class FPrint(AppInterface): def __init__(self): super(FPrint, self).__init__() self.version = "7.0"
tomkralidis/OWSLib
refs/heads/master
owslib/namespaces.py
3
class Namespaces(object): """ Class for holding and maniputlating a dictionary containing the various namespaces for each standard. """ namespace_dict = { 'atom': 'http://www.w3.org/2005/Atom', 'csw': 'http://www.opengis.net/cat/csw/2.0.2', 'csw30': 'http://www.openg...
quantopian/zipline
refs/heads/master
zipline/protocol.py
1
# # Copyright 2016 Quantopian, 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 in wr...
ArduPilot/ardupilot
refs/heads/master
Tools/scripts/decode_ICSR.py
5
#!/usr/bin/env python ''' decode an stm32 ICSR register value AP_FLAKE8_CLEAN ''' import sys import optparse class DecodeICSR(object): # https://www.st.com/content/ccc/resource/technical/document/programming_manual/6c/3a/cb/e7/e4/ea/44/9b/DM00046982.pdf/files/DM00046982.pdf/jcr:content/translations/en.DM0004698...
x303597316/hue
refs/heads/master
desktop/core/ext-py/pysaml2-2.4.0/example/sp-wsgi/sp.py
29
#!/usr/bin/env python import logging import re import argparse import service_conf from Cookie import SimpleCookie from urlparse import parse_qs import sys from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_SOAP from saml2 import time_util from saml2 import ecp from saml2 import BINDING_HTTP_ARTIFACT f...
Dinsmoor/python-somagic
refs/heads/master
cammanager.py
1
# easycap frame alternator import os import time import sys import subprocess import Image, ImageDraw import sys from struct import * import array import schedule import multiprocessing as mp import threading from datetime import datetime if os.geteuid() != 0: exit("You need to have root privileges to run this scr...
moul/splitfs
refs/heads/master
fusepy/memory3.py
22
#!/usr/bin/env python from fuse3 import FUSE, Operations, LoggingMixIn from collections import defaultdict from errno import ENOENT from stat import S_IFDIR, S_IFLNK, S_IFREG from sys import argv, exit from time import time import logging class Memory(LoggingMixIn, Operations): """Example memory filesystem. Su...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/docker/docker/docker/client.py
7
# Copyright 2013 dotCloud 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 t...
MER-GROUP/intellij-community
refs/heads/master
python/testData/quickFixes/PyRemoveDictKeyQuickFixTest/first_after.py
80
a = {"y":2, 'x':1}
yencchen/quokka_epus
refs/heads/master
quokka/modules/accounts/utils.py
12
from flask import current_app SWATCH_KEY = "ADMIN_SWATCH" class ThemeChanger(object): def set_swatch(self, swatch): # update returns empty list when not exists data = {"name": SWATCH_KEY, "rawvalue": swatch} self.values.update(data, name=SWATCH_KEY) or self.values.create(**data) @pro...
GunoH/intellij-community
refs/heads/master
python/testData/inspections/PySetFunctionToLiteralInspection/test.py
83
my_set = set() my_set = <warning descr="Function call can be replaced with set literal">set([1,2,3])</warning> my_set = <warning descr="Function call can be replaced with set literal">set((1,2,3))</warning> my_set = set(var) def set(fake=None): pass my_fake_set = set() my_fake_set = set([1,2,3])
a301-teaching/a301_code
refs/heads/master
notebooks/python/resample.py
1
# coding: utf-8 # ## working with projections # # We have been using [fast_hist](https://github.com/a301-teaching/a301_code/blob/f8c2e8cc8dce36c9852ca99ccfe19250d1405b50/a301lib/geolocate.py#L124) # and [fast_avg](https://github.com/a301-teaching/a301_code/blob/f8c2e8cc8dce36c9852ca99ccfe19250d1405b50/a301lib/geoloc...
awemulya/fieldsight-kobocat
refs/heads/master
onadata/apps/users/migrations/0014_userprofile_task_last_view_date.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('users', '0013_userprofile_timezone'), ] operations = [ migrations.AddF...
balint256/gnuradio
refs/heads/master
gr-audio/examples/python/dial_tone.py
58
#!/usr/bin/env python # # Copyright 2004,2005,2007,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
daivietpda/android_kernel_huawei_y210
refs/heads/master
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
amith01994/intellij-community
refs/heads/master
python/testData/completion/dictKeyPrefix.py
83
s = { 'a': 'b', 'kkkappa': 'd', 'lambda': 'foo' } s['k]kap<caret>']
paramite/glance
refs/heads/master
glance/db/sqlalchemy/migrate_repo/versions/003_add_disk_format.py
19
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
cfg2015/EPT-2015-2
refs/heads/master
addons/auth_signup/__init__.py
446
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
joebowen/movement_validation_cloud
refs/heads/master
djangodev/lib/python2.7/site-packages/boto/cognito/sync/exceptions.py
15
# 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 ...
slevenhagen/odoomrp-wip-npg
refs/heads/8.0
mrp_byproduct_operations/__init__.py
29
# -*- encoding: utf-8 -*- ############################################################################## # # Daniel Campos (danielcampos@avanzosc.es) Date: 29/09/2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publi...
zubron/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
26
from .. import manifest, item as manifestitem, sourcefile def test_local_reftest_add(): m = manifest.Manifest() s = sourcefile.SourceFile("/", "test", "/") test = manifestitem.RefTest(s, "/test", [("/ref", "==")]) m.local_changes.add(test) m.update_reftests() assert list(m) == [(test.path, {te...
elizahyde/goog-python-learning
refs/heads/master
basic/string1.py
1
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
chromium/chromium
refs/heads/master
third_party/blink/web_tests/external/wpt/fetch/connection-pool/resources/network-partition-key.py
16
#!/usr/bin/env python import mimetypes import os from wptserve.utils import isomorphic_decode, isomorphic_encode # Test server that tracks the last partition_id was used with each connection for each uuid, and # lets consumers query if multiple different partition_ids have been been used for any socket. # # Server a...
18padx08/PPTex
refs/heads/master
PPTexEnv_x86_64/lib/python2.7/site-packages/numpy/version.py
21
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY short_version = '1.9.2' version = '1.9.2' full_version = '1.9.2' git_revision = '762c6f15bf57506e21239a4dd68192e4da6014f7' release = True if not release: version = full_version
deehzee/cs231n
refs/heads/master
assignment2/cs231n/layers.py
1
from __future__ import absolute_import, division, print_function import numpy as np def affine_forward(x, w, b): """ Computes the forward pass for an affine (fully-connected) layer. The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N examples, where each example x[i] has shape (d_...
bobintetley/asm3
refs/heads/master
import/rescueconnection.py
1
#!/usr/bin/python import asm, os """ Import script for RescueConnection animal files exported as CSV A customer did this, so I don't know how close it is to what RescueConnection actually give out (so we shouldn't advertise as being able to necessarily do RC). 27th January, 2020 """ # The shelter's petfinder ID fo...
serensoner/CouchPotatoServer
refs/heads/develop
libs/gntp/shim.py
123
# Copyright: 2013 Paul Traylor # These sources are released under the terms of the MIT license: see LICENSE """ Python2.5 and Python3.3 compatibility shim Heavily inspirted by the "six" library. https://pypi.python.org/pypi/six """ import sys PY3 = sys.version_info[0] == 3 if PY3: def b(s): if isinstance(s, byt...