repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
MatthewWilkes/mw4068-packaging
refs/heads/master
src/melange/src/soc/models/base.py
1
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange authors. # # 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 appl...
hms-dbmi/fourfront
refs/heads/master
src/encoded/visualization.py
2
from pyramid.response import Response from pyramid.view import view_config from pyramid.httpexceptions import HTTPBadRequest from snovault import CONNECTION from snovault.util import debug_log from copy import ( copy, deepcopy ) import json from urllib.parse import ( parse_qs, urlencode, ) from datetime...
3dfxsoftware/cbss-addons
refs/heads/master
portal_crm/__init__.py
55
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
Distrotech/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/ta/formats.py
434
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT ...
skosukhin/spack
refs/heads/esiwace
var/spack/repos/builtin/packages/libxkbui/package.py
1
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/cloud/amazon/ec2_group.py
1
#!/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. # ...
Narrat/eispice
refs/heads/master
module/subckt.py
3
# # Copyright (C) 2006-2007 Cooper Street Innovations Inc. # Charles Eidsness <charles@cooper-street.com> # # 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,...
Fiware/ops.Fuel-main-dev
refs/heads/master
fuelweb_ui_test/tests/test_deploy.py
4
import time from selenium.webdriver import ActionChains import browser from pageobjects.environments import DeployChangesPopup from pageobjects.header import TaskResultAlert from pageobjects.node_disks_settings import DisksSettings from pageobjects.node_interfaces_settings import InterfacesSettings from pageobjects.nod...
stackforge/tricircle
refs/heads/master
tricircle/common/restapp.py
1
# 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 or agreed to in...
LeMaker/RPi.GPIO_BP
refs/heads/bananapro
test/wait_for_edge.py
3
#!/usr/bin/env python import RPi.GPIO as GPIO import time from threading import Timer PIN_NUM = 12 channel = 7 GPIO.setmode(GPIO.BOARD) GPIO.setup(PIN_NUM,GPIO.OUT) GPIO.output(PIN_NUM,True) print "\n value_%d = %d\n" %(PIN_NUM,GPIO.input(PIN_NUM)) GPIO.setup(channel,GPIO.IN,GPIO.PUD_DOWN) print "\n value_%d = %d\n"...
theflofly/tensorflow
refs/heads/master
tensorflow/python/autograph/pyct/qual_names.py
24
# 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...
rlugojr/django
refs/heads/master
tests/model_package/models/__init__.py
580
# Import all the models from subpackages from .article import Article from .publication import Publication __all__ = ['Article', 'Publication']
aYukiSekiguchi/ACCESS-Chromium
refs/heads/master
chrome_frame/combine_libs.py
79
#!/usr/bin/env python # Copyright (c) 2011 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. # TODO(slightlyoff): move to using shared version of this script. '''This script makes it easy to combine libs and object files to...
Pragmatismo/Pigrow
refs/heads/master
scripts/gui/graph_modules/graph_day_night.py
1
def read_graph_options(): ''' Returns a dictionary of settings and their default values for use by the remote gui ''' graph_module_settings_dict = { "use_time":"lamp", # sun or lamp "latitude":"51.50", "longitude":"0.12", "light_on_time_hour":"...
sinmaniphel/py_isear_dataset
refs/heads/master
py_isear/isear_loader.py
1
import py_isear.enums as enums import csv class IsearSubset: def __init__(self, labels, values): self.labels = labels self.values = values class IsearDataSet: def __init__(self, data=IsearSubset([], []), target=IsearSubset...
methoxid/micropystat
refs/heads/master
tests/extmod/uheapq1.py
70
try: import uheapq as heapq except: import heapq try: heapq.heappop([]) except IndexError: print("IndexError") try: heapq.heappush((), 1) except TypeError: print("TypeError") def pop_and_print(h): l = [] while h: l.append(str(heapq.heappop(h))) print(' '.join(l)) h = [] h...
flodolo/bedrock
refs/heads/master
bedrock/mozorg/tests/test_hierarchy.py
9
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from mock import patch from bedrock.mozorg.hierarchy import PageNode, PageRoot from bedrock.mozorg.tests import TestCas...
Bodidze/21v-python
refs/heads/master
unit_02/calc/9.py
2
# Program make a simple calculator that can add, subtract, multiply and divide using functions # define functions def add(x, y): """This function adds two numbers""" return x + y def subtract(x, y): """This function subtracts two numbers""" return x - y def multiply(x, y): """This function multiplie...
seibert/numba
refs/heads/master
numba/tests/test_dataflow.py
2
import warnings import unittest from numba.core.compiler import compile_isolated, Flags from numba.core import types, errors from numba.tests.support import (TestCase, CompilationCache, skip_tryexcept_supported) enable_pyobj_flags = Flags() enable_pyobj_flags.set("enable_pyobject") ...
tarballs-are-good/sympy
refs/heads/master
sympy/concrete/tests/test_gosper.py
5
def test_normal(): pass def test_gosper(): pass
IronLanguages/ironpython2
refs/heads/master
Src/StdLib/Lib/test/leakers/test_ctypes.py
173
# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test(). from ctypes import Structure, c_int, POINTER import gc def leak_inner(): class POINT(Structure): _fields_ = [("x", c_int)] class RECT(Structure): _fields_ = [("a", POINTER(POINT))] def leak(): leak_inner() gc.c...
smmribeiro/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/filemerge.py
90
# filemerge.py - file-level merge handling for Mercurial # # Copyright 2006, 2007, 2008 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import short from i18n import _ import util, simpleme...
edx/course-discovery
refs/heads/master
course_discovery/apps/course_metadata/migrations/0171_historicalcourserun.py
1
# Generated by Django 1.11.15 on 2019-04-24 16:33 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import djchoices.choices import simple_history.models import uuid class Migration(migrations.Migration): dependencies =...
noroot/zulip
refs/heads/master
zerver/test_messages.py
114
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.db.models import Q from django.conf import settings from sqlalchemy.sql import ( and_, select, column, compiler ) from django.test import TestCase from zerver.lib import bugdown from zerver.decorator import JsonableError from zerver.lib.test...
shingonoide/odoo
refs/heads/deverp_8.0
addons/l10n_ar/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
patryk4815/django-jinja-bootstrap-form
refs/heads/master
example/app/models.py
10644
from django.db import models # Create your models here.
wilvk/ansible
refs/heads/devel
test/units/modules/network/nuage/nuage_module.py
57
# -*- coding: utf-8 -*- # (c) 2017, Nokia # 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. #...
orestkreminskyi/taf
refs/heads/master
taf/plugins/pytest_onsenv.py
2
# Copyright (c) 2011 - 2017, Intel Corporation. # # 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...
Pexego/odoo
refs/heads/master
openerp/tools/misc.py
17
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
hideaki-t/whoosh-igo
refs/heads/master
setup.py
1
#!/usr/bin/env python # encoding: utf-8 import io from setuptools import setup setup( name='whoosh-igo', version='0.7', description='tokenizers for Whoosh designed for Japanese language', long_description= io.open('README', encoding='utf-8').read() + "\n\n" + io.open('CHANGES', encoding='utf-8').read...
dubvulture/tensor_fcn
refs/heads/master
tensor_fcn/dataset_reader/__init__.py
1
from __future__ import absolute_import from tensor_fcn.dataset_reader.ade_dataset import ADE_Dataset
ddki/my_study_project
refs/heads/master
language/python/frameworks/flask/venv/lib/python2.7/site-packages/setuptools/command/build_ext.py
27
import os import sys import itertools import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler, get_config_var from distutils.errors import DistutilsError from d...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/mobile/shared_shear_mite_broodling.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_shear_mite_broodling.iff" result.attribute_template_id = 9 re...
davgibbs/django
refs/heads/master
tests/unmanaged_models/tests.py
296
from __future__ import unicode_literals from django.db import connection from django.test import TestCase from .models import A01, A02, B01, B02, C01, C02, Managed1, Unmanaged2 class SimpleTests(TestCase): def test_simple(self): """ The main test here is that the all the models can be created w...
zzrcxb/Pugoo
refs/heads/master
DataManagement/gobase.py
1
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import * TableBase = declarative_base() class GoBase(TableBase): __tablename__ = 'training' filehash = Column(String(44), primary_key=True) fileformat = Column(String(10), default=None) filesource = Column(String(64), default=None...
Lagfix/skynet
refs/heads/master
study.py
1
# Hello World 파이썬 테스트 # study.py print("안녕하세요 테스트 입니다.")
RentennaDev/partial
refs/heads/master
partial/templating.py
1
from jinja2 import Environment, BaseLoader, TemplateNotFound from partial.bundleComponent import BundleComponent from partial.scanner import ClassNotFound class TemplateBundleComponent(BundleComponent): type = 'template' def renderTemplate(template, context=None): if context is None: context = {} templa...
RedhawkSDR/integration-gnuhawk
refs/heads/master
components/streams_to_stream_cc_1i/tests/test_streams_to_stream_cc_1i.py
1
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by ...
timblechmann/supercollider
refs/heads/novacollider/tip
editors/sced/scedwin/py/ConfigurationDialog.py
44
# sced (SuperCollider mode for gedit) # # Copyright 2012 Jakob Leben # Copyright 2009 Artem Popov and other contributors (see AUTHORS) # # sced 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, ei...
rlugojr/django
refs/heads/master
tests/forms_tests/widget_tests/test_selectdatewidget.py
24
from datetime import date from django.forms import DateField, Form, SelectDateWidget from django.test import override_settings from django.utils import translation from django.utils.dates import MONTHS_AP from .base import WidgetTest class SelectDateWidgetTest(WidgetTest): maxDiff = None widget = SelectDate...
Spanarchie/pyRest
refs/heads/master
pyRest/lib/python2.7/site-packages/pkg_resources.py
64
"""Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipula...
daodaoliang/python-phonenumbers
refs/heads/dev
python/phonenumbers/shortdata/region_LK.py
10
"""Auto-generated file, do not edit by hand. LK metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_LK = PhoneMetadata(id='LK', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2}', possible_number_pattern='\\d{...
130s/bloom
refs/heads/master
test/system_tests/common.py
1
""" Common tools for system tests """ from __future__ import print_function import os from ..utils.common import bloom_answer from ..utils.common import change_directory from ..utils.common import user def create_release_repo(upstream_url, upstream_type, upstream_branch='', rosdistro='groov...
chenokay/ripozo
refs/heads/master
ripozo_tests/__init__.py
4
__author__ = 'Tim Martin' import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)s - [%(module)s - %(filename)s ' '- %(lineno)d - %(levelname)s]: %(message)s') logger = logging.getLogger(__name__) from ripozo_tests import unit, integration
rghe/ansible
refs/heads/devel
contrib/inventory/lxc_inventory.py
79
#!/usr/bin/env python # # (c) 2015-16 Florian Haas, hastexo Professional Services GmbH # <florian@hastexo.com> # Based in part on: # libvirt_lxc.py, (c) 2013, Michael Scherer <misc@zarb.org> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the...
cessationoftime/nixops
refs/heads/efsMountSecurityGroups
tests/functional/test_encrypted_links.py
22
from os import path from nose import tools, SkipTest from tests.functional import generic_deployment_test from nixops.ssh_util import SSHCommandFailed from nixops.util import devnull import sys import time import signal import subprocess parent_dir = path.dirname(__file__) logical_spec = '%s/encrypted-lin...
saeki-masaki/glance
refs/heads/master
glance/tests/functional/v1/test_copy_to_file.py
11
# Copyright 2011 OpenStack Foundation # Copyright 2012 Red Hat, 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/...
hamzehd/edx-platform
refs/heads/master
lms/djangoapps/notifier_api/serializers.py
61
from django.contrib.auth.models import User from django.http import Http404 from rest_framework import serializers from openedx.core.djangoapps.course_groups.cohorts import is_course_cohorted from notification_prefs import NOTIFICATION_PREF_KEY from lang_pref import LANGUAGE_KEY class NotifierUserSerializer(serializ...
wweiradio/django
refs/heads/master
django/core/serializers/pyyaml.py
439
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import collections import decimal import sys from io import StringIO import yaml from django.core.serializers.base import DeserializationError from django.core.serializers.python import ( Deserializer as PythonDes...
kustodian/ansible
refs/heads/devel
lib/ansible/module_utils/pure.py
56
# -*- coding: utf-8 -*- # 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 lic...
CoinProjects/XDE2
refs/heads/master
contrib/linearize/linearize-hashes.py
1
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2015 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import json import struct ...
campbe13/openhatch
refs/heads/master
vendor/packages/gdata/src/gdata/analytics/__init__.py
261
#!/usr/bin/python # # Original Copyright (C) 2006 Google Inc. # Refactored in 2009 to work for Google Analytics by Sal Uryasev at Juice 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 # ...
simar7/build-mozharness
refs/heads/master
configs/unittests/linux_unittest.py
3
import os import platform # OS Specifics ABS_WORK_DIR = os.path.join(os.getcwd(), 'build') BINARY_PATH = os.path.join(ABS_WORK_DIR, "firefox", "firefox-bin") INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.tar.bz2") XPCSHELL_NAME = "xpcshell" EXE_SUFFIX = '' DISABLE_SCREEN_SAVER = True ADJUST_MOUSE_AND_SCREEN =...
Russell-IO/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcspanner.py
88
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
IronLanguages/ironpython3
refs/heads/master
Src/StdLib/Lib/unittest/suite.py
22
"""TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(parent, attr, lambda: None) func() class BaseTestSuite(object): """A simple test suite that doesn't provide class or module shared fixtures. """ _cleanup = True...
aruizramon/alec_erpnext
refs/heads/master
erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
19
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.hr.doctype.leave_application.leave_application \ import get_leave_allocation_records, get_leave_balance...
nacc/autotest
refs/heads/master
server/base_utils_unittest.py
2
#!/usr/bin/python __author__ = 'raphtee@google.com (Travis Miller)' import unittest try: import autotest.common as common except ImportError: import common from autotest.server import utils class UtilsTest(unittest.TestCase): def setUp(self): # define out machines here self.machines = [...
mingkaic/rocnnet
refs/heads/master
app/pylib/tf_rl/utils/event_queue.py
1
import time from queue import PriorityQueue class EqItem(object): """Function and sechduled execution timestamp. This class is needed because if we use tuple instead, Python will ocassionally complaint that it does not know how to compare functions""" def __init__(self, ts, f): self.ts = ts self.f = f ...
40423131/2016fallcadp_hw
refs/heads/gh-pages
course/onshape.py
39
# https://www.onshape.com/ 只有對特定的非營利機構, 才可免費使用 # 為何使用 OnShape? 全雲端, 用瀏覽器或手機平板的 App 就能開啟使用 # OnShape 開放 FeatureScript 系統程式碼, 代表什麼意義? # 利用 OnShape 所提供的 12 週課程教材學習 OnShape, 但是要如何有效利用協同與網路來呈現教材內容或者學習成果?
bouthilx/fuel
refs/heads/master
fuel/bin/fuel_info.py
19
#!/usr/bin/env python """Fuel utility for extracting metadata.""" import argparse import os import h5py message_prefix_template = 'Metadata for {}' message_body_template = """ The command used to generate this file is {} Relevant versions are H5PYDataset {} fuel.converters {} "...
Thomsen22/MissingMoney
refs/heads/master
Day Ahead Market - 24 Bus/main.py
1
# -*- coding: utf-8 -*- """ Created on Tue Feb 9 14:13:34 2016 @author: Søren """ # Own modules import optimization as results # Runs the optimization gen_dataframe, wind_penetration, solar_penetration, totalwindcost, totalsolarcost = results.marketoptimization()
zhaochl/python-utils
refs/heads/master
verify_code/Imaging-1.1.7/Sane/demo_numarray.py
8
#!/usr/bin/env python # # Shows how to scan a 16 bit grayscale image into a numarray object # # Get the path set up to find PIL modules if not installed yet: import sys ; sys.path.append('../PIL') from numarray import * import sane import Image def toImage(arr): if arr.type().bytes == 1: # need to swap ...
jaimeMF/youtube-dl
refs/heads/master
youtube_dl/extractor/rtbf.py
23
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unescapeHTML, ) class RTBFIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rtbf\.be/(?:video/[^?]+\?.*\bid=|ouftivi/(?:[^/]+/)*[^?]+\?.*\bvideoId=)(?P<id>\d+)' _TESTS = [{ ...
pilou-/ansible
refs/heads/devel
lib/ansible/modules/notification/snow_record.py
24
#!/usr/bin/python # Copyright (c) 2017 Tim Rightnour <thegarbledone@gmail.com> # 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', 'sta...
nikhilsaraf/Twitter-Analytics
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.py
152
from __future__ import absolute_import, division, unicode_literals try: from collections import OrderedDict except ImportError: try: from ordereddict import OrderedDict except ImportError: OrderedDict = dict import re from pip._vendor.six import text_type from . import _base from ..utils...
gspilio/nova
refs/heads/master
nova/conductor/__init__.py
9
# Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
CitizenB/ansible
refs/heads/devel
test/units/parsing/test_data_loader.py
1
# (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...
Ashvio/ProPlayerInfoBot
refs/heads/master
src/DatabaseCreater.py
1
from src.DatabaseManager import DatabaseManager, load_db if __name__ == "__main__": print("Building database...", end = "") manager = DatabaseManager() print("[DONE]") print("Finding videos...") manager.find_videos() print("[DONE]") print("Saving database...", end = "") manager.save_db...
aam-at/tensorflow
refs/heads/master
tensorflow/python/data/benchmarks/filter_benchmark.py
22
# 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...
yati-sagade/incubator-airflow
refs/heads/master
airflow/contrib/hooks/wasb_hook.py
15
# -*- coding: utf-8 -*- # # 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 ...
bitkwan/mcupdater
refs/heads/master
updater.py
1
# -*- coding: utf-8 -*- import os,tempfile,platform,urllib.request,sys,threading,getpass,config,hashlib,json,requests,random,string,lang,subprocess os.system("@title "+config.NAME+" "+config.VER) pwd = os.getcwd() r = requests.get(config.TEST_URL) if r.status_code!=204: print(lang.NETWORK_ERROR) input() sy...
bbqsrc/txjsonrpc
refs/heads/master
txjsonrpc/auth.py
1
from zope.interface import Interface, implements try: from twisted import web except ImportError: web = None try: from twisted import web2 except ImportError: web2 = None from twisted.cred.portal import IRealm, Portal class HTTPAuthRealm(object): implements(IRealm) def __init__(self, resou...
rsdevgun16e/energi
refs/heads/energi_v0
qa/rpc-tests/keypool.py
6
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the wallet keypool, and interaction with wallet encryption/locking # Add python-bitcoinrpc to...
vladmm/intellij-community
refs/heads/master
python/helpers/pycharm_generator_utils/module_redeclarator.py
19
import keyword from pycharm_generator_utils.util_methods import * from pycharm_generator_utils.constants import * class emptylistdict(dict): """defaultdict not available before 2.5; simplest reimplementation using [] as default""" def __getitem__(self, item): if item in self: return dict...
Proggie02/TestRepo
refs/heads/master
django/core/management/commands/startapp.py
205
from django.core.management.base import CommandError from django.core.management.templates import TemplateCommand from django.utils.importlib import import_module class Command(TemplateCommand): help = ("Creates a Django app directory structure for the given app " "name in the current directory or opt...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-web/azure/mgmt/web/models/identifier_paged.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
bencmbrook/home-assistant
refs/heads/master
homeassistant/components/thermostat/demo.py
10
""" homeassistant.components.thermostat.demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Demo platform that offers a fake thermostat. """ from homeassistant.components.thermostat import ThermostatDevice from homeassistant.const import TEMP_CELCIUS, TEMP_FAHRENHEIT def setup_platform(hass, config, add_devices, discover...
rpisarev/guestbook
refs/heads/master
guestbook/guestbook/settings.py
1
# Django settings for guestbook project. import os.path DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('ruslan pisarev', 'ruslan@rpisarev.org.ua'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. ...
ff0000/red-fab-deploy
refs/heads/master
fab_deploy/local/config.py
1
from fabric.api import local, env, execute from fabric.tasks import Task from fab_deploy.functions import get_answer, get_remote_name class InternalIps(Task): """ Updates your server.ini config with the correct internal ip addresses for all hosts This is a serial task, that should not be called w...
iotaledger/iota.lib.py
refs/heads/master
iota/commands/core/get_trytes.py
1
import filters as f from iota import TransactionHash from iota.commands import FilterCommand, RequestFilter, ResponseFilter from iota.filters import StringifiedTrytesArray, Trytes __all__ = [ 'GetTrytesCommand', ] class GetTrytesCommand(FilterCommand): """ Executes ``getTrytes`` command. See :py:me...
ivanbusthomi/inasafe
refs/heads/develop
safe/definitions/font.py
2
# coding=utf-8 """Fonts which are used in InaSAFE.""" from PyQt4.QtGui import QFont big_font = QFont() big_font.setPointSize(80) bold_font = QFont() bold_font.setItalic(True) bold_font.setBold(True) bold_font.setWeight(75)
lmregus/Portfolio
refs/heads/master
python/design_patterns/env/lib/python3.7/site-packages/sphinx/transforms/i18n.py
1
""" sphinx.transforms.i18n ~~~~~~~~~~~~~~~~~~~~~~ Docutils transforms used by Sphinx when reading documents. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from textwrap import indent from typing import Any, TypeVar...
Nolski/olympia
refs/heads/master
apps/files/tests/test_utils_.py
11
import json from contextlib import contextmanager from tempfile import NamedTemporaryFile import pytest from nose.tools import eq_ import amo import amo.tests from addons.models import Addon from applications.models import AppVersion from files.models import File from files.utils import find_jetpacks, is_beta, Packag...
mhahn/stacker
refs/heads/master
stacker/hooks/iam.py
1
import copy import logging import boto3 from botocore.exceptions import ClientError from awacs.aws import Statement, Allow, Policy from awacs import ecs from awacs.helpers.trust import get_ecs_assumerole_policy from . import utils logger = logging.getLogger(__name__) def create_ecs_service_role(region, namespace,...
bl4ckic3/ARMSCGen
refs/heads/master
setup.py
1
#!python from setuptools import setup, find_packages setup( name = 'ARMSCGen', version = '0.0.13', packages = find_packages() + ['examples'], data_files = [('', ['LICENSE-ARMSCGen.txt'])], py_modules = ['ARMSCGen'], author = 'alex.park', author_email = 'saintlinu07+github@gmail.com', u...
zivia/grove
refs/heads/master
simulation/__init__.py
4
__author__ = 'Troy Squillaci'
bohlian/frappe
refs/heads/develop
frappe/desk/report/todo/todo.py
18
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import getdate def execute(filters=None): priority_map = {"High": 3, "Medium": 2, "Low": 1} todo_list = frappe.get_list('T...
OrlyMar/gasistafelice
refs/heads/master
gasistafelice/rest/views/urls.py
3
# Copyright (C) 2011 REES Marche <http://www.reesmarche.org> # taken from SANET by Laboratori Guglielmo Marconi S.p.A. <http://www.labs.it> # # This file is part of GASISTA FELICE # GASISTA FELICE is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as ...
dhamaniasad/mythbox
refs/heads/master
resources/lib/themoviedb/test_tmdb.py
7
#!/usr/bin/env python2.5 #encoding:utf-8 #author:dbr/Ben #project:themoviedb import unittest import tmdb class test_search(unittest.TestCase): def setUp(self): self.m = tmdb.MovieDb() def test_simple_search(self): """Simple test search """ self.assertEquals( type(...
mmabey/Adafruit_Soundboard
refs/heads/master
conf.py
1
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensi...
greyhill/proust
refs/heads/master
python/proust.py
1
import ctypes as ct import numpy as np import ctypes.util libpath = ctypes.util.find_library('proust') if libpath is None: libpath = './libproust.so' lib = ct.CDLL(libpath) size_t = ct.c_size_t class DPtr(object): def __init__(self, ptr, dtor): self.ptr = ct.c_voidp(ptr) self.dtor = dtor ...
alexlo03/ansible
refs/heads/devel
test/units/modules/cloud/amazon/test_ec2_utils.py
231
import unittest from ansible.module_utils.ec2 import map_complex_type class Ec2Utils(unittest.TestCase): def test_map_complex_type_over_dict(self): complex_type = {'minimum_healthy_percent': "75", 'maximum_percent': "150"} type_map = {'minimum_healthy_percent': 'int', 'maximum_percent': 'int'} ...
cartesiantheatre/narayan-designer
refs/heads/master
apport.py
1
''' Narayan Designer, a modelling tool for the Narayan simulation engine. Copyright (C) 2017-2018 Cartesian Theatre™. All rights reserved. Apport hook for narayan-designer. Note: This isn't usable yet since at this time Apport submits bug reports only to Launchpad. We do not host our issue...
NamanCMU/Robot-Autonomy-Assignments
refs/heads/master
Hw2/hw2/run.py
1
#!/usr/bin/env python import argparse, numpy, openravepy, time from HerbRobot import HerbRobot from SimpleRobot import SimpleRobot from HerbEnvironment import HerbEnvironment from SimpleEnvironment import SimpleEnvironment from RRTPlanner import RRTPlanner from RRTConnectPlanner import RRTConnectPlanner import time ...
ARMmbed/yotta_osx_installer
refs/heads/master
workspace/lib/python2.7/site-packages/yotta/list.py
2
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , from __future__ import print_function import logging import os # colorama, BSD 3-Clause license, cross-platform terminal colours, pip install colorama import colorama # vali...
mcstrother/dicom-sr-qi
refs/heads/master
unported scripts/plot_duration.py
2
"""Write a .csv file that allows us to easily make a box plot of the duration of the most common CPT code combinations. """ import srdata import csv XML_FILE_NAME = 'all bjh.xml' CPT_FILE_NAMES = CPT_FILE_NAMES = ['./GetCPT Data/April_Output_Org.xls', './GetCPT Data/May_Output_Org.xls'] def main(): procs...
wistoch/meego-app-browser
refs/heads/master
third_party/protobuf/python/google/protobuf/internal/reflection_test.py
253
#! /usr/bin/python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
laurianed/scheduling
refs/heads/master
dist/scripts/ec2/params.py
16
#!/usr/bin/python ########################################################################### 80 # # # params.py # # reads instance user-data and meta-data to build parts # of the Java command required to run the node. # the other part is environment specific and can hardly be guessed from here # import urllib2 impor...
stvstnfrd/edx-platform
refs/heads/master
import_shims/lms/course_api/blocks/transformers/tests/test_milestones.py
2
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('course_api.blocks.transformers.tests.test_mileston...
ujdhesa/unisubs
refs/heads/staging
apps/socialauth/models.py
6
from django.db import models from auth.models import CustomUser as User class AuthMeta(models.Model): """Metadata for Authentication""" def __unicode__(self): return '%s - %s' % (self.user, self.provider) user = models.OneToOneField(User) provider = models.CharField(max_length = 30) is...