repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
FlowForwarding/lincx
refs/heads/master
scripts/ryu/remove_flows_v1_3.py
2
"""Deletes all flows using OpenFlow Protocol v1.3.""" from ryu.base.app_manager import RyuApp from ryu.controller.ofp_event import EventOFPSwitchFeatures from ryu.controller.handler import set_ev_cls from ryu.controller.handler import CONFIG_DISPATCHER from ryu.controller.handler import MAIN_DISPATCHER from ryu.ofprot...
onitake/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_snmp.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, ...
TobiasSK/AarhusWebDevCoop
refs/heads/master
AarhusWebDevCoop/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/common.py
1292
# 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. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
bufferapp/buffer-django-nonrel
refs/heads/master
django/utils/copycompat.py
334
""" Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch): copy._deepcopy_dispatch[types.FunctionType] = copy._deepc...
lukecwik/incubator-beam
refs/heads/master
sdks/python/apache_beam/internal/__init__.py
25
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
xinjiguaike/edx-platform
refs/heads/master
lms/djangoapps/teams/api_urls.py
91
"""Defines the URL routes for the Team API.""" from django.conf import settings from django.conf.urls import patterns, url from .views import ( TeamsListView, TeamsDetailView, TopicDetailView, TopicListView, MembershipListView, MembershipDetailView ) TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+...
labpositiva/pyworkplace
refs/heads/develop
pyworkplace/event.py
1
# -*- coding: utf-8 -*- class Event(object): def __init__(self, messaging=None): if messaging is None: messaging = {} self.messaging = messaging self.matched_callbacks = [] @property def sender_id(self): return self.messaging.get('sender', {}).get('id', None)...
lucienfostier/gaffer
refs/heads/master
python/GafferSceneUI/SetFilterUI.py
5
########################################################################## # # Copyright (c) 2014, Image Engine Design 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: # # * Redistrib...
anbangleo/NlsdeWeb
refs/heads/master
Python-3.6.0/Lib/test/test_with.py
3
"""Unit tests for the with statement specified in PEP 343.""" __author__ = "Mike Bland" __email__ = "mbland at acm dot org" import sys import unittest from collections import deque from contextlib import _GeneratorContextManager, contextmanager class MockContextManager(_GeneratorContextManager): def __init__(s...
mrshelly/openerp71313
refs/heads/master
openerp/addons/account_voucher/report/account_voucher_print.py
61
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
beblount/Steer-Clear-Backend-Web
refs/heads/web
env/Lib/site-packages/sqlalchemy/orm/interfaces.py
8
# orm/interfaces.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Contains various base classes used throughout the ORM. Defines some key base...
krische/pychat
refs/heads/master
pychat/api/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
jaredculp/faker
refs/heads/master
faker/providers/job/pl_PL/__init__.py
19
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as BaseProvider class Provider(BaseProvider): jobs = [ "Agent celny", "Agent firmy inwestycyjnej", "Agent literacki", "Agent ubezpieczeniowy", "Agronom", "Aktor", "Aktor dziecięcy...
SimonSickle/android_kernel_htc_primou
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
VielSoft/odoo
refs/heads/8.0
addons/l10n_co/__openerp__.py
256
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) David Arnold (devCO). # Author David Arnold (devCO), dar@devco.co # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Ivan ...
Eric-Gaudiello/tensorflow_dev
refs/heads/master
tensorflow_home/tensorflow_venv/lib/python3.4/site-packages/tensorflow/models/rnn/translate/__init__.py
27
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
pepeportela/edx-platform
refs/heads/master
openedx/core/djangoapps/credit/routers.py
138
""" DRF routers. """ from rest_framework import routers class SimpleRouter(routers.SimpleRouter): """ Simple DRF router. """ # Note (CCB): This is a retrofit of a DRF 2.4 feature onto DRF 2.3. This is, sadly, simpler than # updating edx-ora2 to work with DRF 2.4. See https://github.com/tomchristie/djang...
darktears/chromium-crosswalk
refs/heads/master
build/android/pylib/gtest/gtest_config.py
56
# Copyright (c) 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. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
makacodewalker/etsgh
refs/heads/master
djangoappengine/tests/order.py
72
from .testmodels import OrderedModel from django.test import TestCase class OrderTest(TestCase): def create_ordered_model_items(self): pks = [] priorities = [5, 2, 9, 1] for pk, priority in enumerate(priorities): pk += 1 model = OrderedModel(pk=pk, priority=priority)...
pmateusz/browser-automation
refs/heads/master
source/Python/GetChromiumUrl.py
4
import sys import re import requests import xml.etree.ElementTree as element_tree MAX_ATTEMTPS = 10 def get_last_change(): r = requests.get('http://commondatastorage.googleapis.com/chromium-browser-continuous/Win/LAST_CHANGE') r.raise_for_status() return int(r.text) def remove_default_namespace(xml): return re.s...
sabi0/intellij-community
refs/heads/master
python/testData/toxtest/toxUnitTest/test_foo.py
117
from unittest import TestCase class TheTest(TestCase): def test_arithmetic(self): assert 4 == 5 def test_orthography(self): assert 'a' + 'a' == 'A' def test_ok(self): print 1
CivilHub/CivilHub
refs/heads/master
ideas/migrations/0006_auto_20150609_1350.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_vote_statuses(apps, schema_editor): Vote = apps.get_model("ideas", "Vote") for vote in Vote.objects.all(): if vote.vote: vote.status = 1 else: vote.statu...
temasek/android_external_chromium_org
refs/heads/cm-11.0
content/test/gpu/gpu_tests/hardware_accelerated_feature.py
26
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import hardware_accelerated_feature_expectations as expectations from telemetry import test from telemetry.page import page_set from telemetry.page import pa...
fxia22/ASM_xf
refs/heads/master
PythonD/lib/python2.4/fnmatch.py
194
"""Filename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function...
proxysh/Safejumper-for-Mac
refs/heads/master
buildlinux/env32/lib/python2.7/site-packages/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py
113
# -*- coding: utf-8 -*- # # SelfTest/Cipher/test_pkcs1_oaep.py: Self-test for PKCS#1 OAEP encryption # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone...
hastexo/edx-platform
refs/heads/master
openedx/core/djangoapps/schedules/apps.py
1
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SchedulesConfig(AppConfig): name = 'openedx.core.djangoapps.schedules' verbose_name = _('Schedules') plugin_app = {} def ready(self): # noinspection PyUnresolvedReferences from . import si...
chengdh/openerp-ktv
refs/heads/master
openerp/addons/account_asset/wizard/account_asset_change_duration.py
9
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
sternshus/arelle2.7
refs/heads/master
svr-2.7/arelle/plugin/xbrlDB/XbrlDpmSqlDB.py
1
''' XbrlDpmEbaDB.py implements an SQL database interface for Arelle, based on the DPM EBA database. This is a semantic data points modeling representation of EBA's XBRL information architecture. This module may save directly to a Postgres, MySQL, SEQLite, MSSQL, or Oracle server. This module provides the execution...
bobisme/odoo
refs/heads/sp-8.0
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
erdincay/pjsip-project
refs/heads/master
tests/pjsua/scripts-sipp/uac-ticket-1864-scenario2.py
32
# $Id$ # import inc_const as const PJSUA = ["--null-audio --max-calls=1 --dis-codec=pcma --auto-answer=200"] PJSUA_EXPECTS = []
obimod/taiga-back
refs/heads/master
taiga/mdrender/__init__.py
21
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
spadae22/odoo
refs/heads/chris_master_8
addons/base_import/__openerp__.py
317
{ 'name': 'Base import', 'description': """ New extensible file import for OpenERP ====================================== Re-implement openerp's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import s...
prezi/gunicorn
refs/heads/master
examples/frameworks/django/testing/manage.py
40
#!/usr/bin/env python import os, sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testing.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
tbenthompson/tectosaur
refs/heads/master
examples/progressive_refine.py
1
def refined_free_surface(): w = 10 minsize = 0.02 slope = 400 maxsize = 0.02 pts = np.array([[-w, -w, 0], [w, -w, 0], [w, w, 0], [-w, w, 0]]) tris = np.array([[0, 1, 3], [3, 1, 2]]) addedpts = 4 it = 0 while addedpts > 0: pts, tris = mesh.remove_duplicate_pts((pts, tris)) ...
ChromiumWebApps/chromium
refs/heads/master
tools/perf/benchmarks/endure.py
1
# 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. from telemetry import test from measurements import endure class _EndureBenchmark(test.Test): test = endure.Endure # Default options for endure benchm...
itsjeyd/edx-platform
refs/heads/master
openedx/core/djangoapps/api_admin/migrations/0002_auto_20160325_1604.py
53
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models API_GROUP_NAME = 'API Access Request Approvers' def add_api_access_group(apps, schema_editor): Group = apps.get_model('auth', 'Group') Permission = apps.get_model('auth', 'Permission') ContentType =...
KokareIITP/django
refs/heads/master
tests/file_uploads/models.py
691
from django.db import models class FileModel(models.Model): testfile = models.FileField(upload_to='test_upload')
dastuam/linux37-beaglebone
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
resmo/ansible
refs/heads/devel
test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py
9
# (c) 2018, NetApp Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from ansible.modules.storage.netapp.netapp_e_iscsi_interface import IscsiInterface from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type...
dcowden/cadquery-freecad-module
refs/heads/master
CadQuery/Libs/pyqode/core/tools/console.py
7
""" This script wraps the execution of console program so that a prompt appear after the end of the console program (so that the console does not close as soon as the user program finished). Usage: pyqode-console program [options] Example: $ pyqode-console python /path/to/a/script.py --spam eggs $ ... ...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/IPython/html/widgets/widget_int.py
8
"""IntWidget class. Represents an unbounded int using a widget. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distribu...
moxon6/chemlab
refs/heads/master
build/lib.win32-3.4/chemlab/graphics/postprocessing/fxaa.py
6
import numpy as np import os from OpenGL.GL import * from OpenGL.GL.framebufferobjects import * from OpenGL.arrays import vbo from ..textures import Texture from ..shaders import set_uniform, compileShader from .base import AbstractEffect class FXAAEffect(AbstractEffect): '''Fast Approximate Anti Aliasing. It i...
AICP/external_chromium_org
refs/heads/lp5.0
chrome/test/chromedriver/third_party/googlecode/googlecode_upload.py
160
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
ah-anssi/SecuML
refs/heads/master
scripts/__init__.py
7
# SecuML # Copyright (C) 2018 ANSSI # # SecuML 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. # # SecuML is distributed in the hope t...
Parallel-in-Time/pySDC
refs/heads/master
pySDC/playgrounds/deprecated/pmesh/AllenCahn_Temperatur_monitor_and_dump.py
1
import numpy as np import json from mpi4py import MPI from pySDC.core.Hooks import hooks class monitor_and_dump(hooks): def __init__(self): """ Initialization of Allen-Cahn monitoring """ super(monitor_and_dump, self).__init__() self.init_radius = None self.ndim =...
AO-StreetArt/Python-OSC-Tools
refs/heads/master
OSC_Base/OscClient.py
1
# -*- coding: utf-8 -*- """ Created on Sat Jan 2 10:48:15 2016 Python OSC Client @author: alex """ from pythonosc import osc_message_builder from pythonosc import udp_client class OSC_Client(): #Initialize the OSC Client #param: server_ip - the IP Address of the Server being connected to #param: s...
sarvex/django
refs/heads/master
tests/forms_tests/tests/test_media.py
76
# -*- coding: utf-8 -*- from django.forms import CharField, Form, Media, MultiWidget, TextInput from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.utils.encoding import force_text @override_settings( STATIC_URL='http://media.example.com/static/', ) ...
johnlb/strange_wp
refs/heads/master
strange_bak/layout/inlines.py
1
# coding: utf-8 """ weasyprint.layout.inline ------------------------ Line breaking and layout for inline-level boxes. :copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division, unicode_liter...
lupyuen/RaspberryPiImage
refs/heads/master
home/pi/GrovePi/Software/Python/others/grove_i2c_digital_light_sensor/Adafruit_I2C.py
116
#!/usr/bin/python import re import smbus # =========================================================================== # Adafruit_I2C Class # =========================================================================== class Adafruit_I2C(object): @staticmethod def getPiRevision(): "Gets the version number of ...
frank-tancf/scikit-learn
refs/heads/master
examples/decomposition/plot_image_denoising.py
70
""" ========================================= Image denoising using dictionary learning ========================================= An example comparing the effect of reconstructing noisy fragments of a raccoon face image using firstly online :ref:`DictionaryLearning` and various transform methods. The dictionary is fi...
havt/odoo
refs/heads/8.0
openerp/addons/base/module/wizard/base_update_translations.py
447
# -*- 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...
NEricN/RobotCSimulator
refs/heads/master
Python/App/Tools/Scripts/cvsfiles.py
101
#! /usr/bin/env python """Print a list of files that are mentioned in CVS directories. Usage: cvsfiles.py [-n file] [directory] ... If the '-n file' option is given, only files under CVS that are newer than the given file are printed; by default, all files under CVS are printed. As a special case, if a file does no...
Hoekz/hackness-monster
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py
578
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
otrack/cloud-computing-hands-on
refs/heads/master
spark/code.py
1
# ./bin/pyspark --master local[2] # http://www.debs2015.org/call-grand-challenge.html # http://chriswhong.com/open-data/foil_nyc_taxi/ # http://spark.apache.org/docs/latest/api/python>/pyspark.html # http://spark.apache.org/docs/latest/programming-guide.html # https://developers.google.com/maps/documentation/javascrip...
chacoroot/planetary
refs/heads/master
addons/website_forum/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
iarwain8a/pydlbot
refs/heads/master
pydlbot_ui.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pydlbot.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): rows = 2 cols = 2 def setupUi(self, Mai...
sserrot/champion_relationships
refs/heads/master
venv/Lib/site-packages/win32/lib/win32rcparser.py
1
# Windows dialog .RC file parser, by Adam Walker. # This module was adapted from the spambayes project, and is Copyright # 2003/2004 The Python Software Foundation and is covered by the Python # Software Foundation license. """ This is a parser for Windows .rc files, which are text files which define dialogs and other...
Guneet-Dhillon/mxnet
refs/heads/master
example/speech-demo/io_func/feat_io.py
25
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
oandrew/home-assistant
refs/heads/dev
homeassistant/components/sensor/swiss_hydrological_data.py
22
""" Support for hydrological data from the Federal Office for the Environment FOEN. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.swiss_hydrological_data/ """ import logging from datetime import timedelta import voluptuous as vol import requests...
WZQ1397/automatic-repo
refs/heads/master
project/systemmange/check_account.py
1
#python day 2 #author zach.wang import getpass import time i = flag = 0 account = { "wzq": "123456", "xyc": "123456"} username = input("input your name:") pwd = getpass.getpass("input your password:") for key in account: if username == key and pwd == account[key]: print("\033[52;1mwelcome %s\033[0m;...
Globalcreditsdev/Globalcredits
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
aerickson/jenkinsapi
refs/heads/master
jenkinsapi/plugin.py
7
""" Module for jenkinsapi Plugin """ class Plugin(object): """ Plugin class """ def __init__(self, plugin_dict): assert isinstance(plugin_dict, dict) self.__dict__ = plugin_dict def __eq__(self, other): return self.__dict__ == other.__dict__ def __str__(self): ...
TomT0m/fabulous
refs/heads/master
fabulous/experimental/canvas.py
1
import time import curses class Canvas(object): def __init__(self, encoding='UTF-8'): self.encoding = encoding def __enter__(self): self.win = curses.initscr() curses.start_color() curses.init_color(200, 1000, 300, 0) curses.init_pair(1, 200, curses.COLOR_WHITE) ...
timothycrosley/instantly
refs/heads/develop
instantly/_first_template.py
1
""" instantly/_first_template.py Defines the first template to be included with every new installation of instantly: a template that enables creating new templates instantly! Copyright (C) 2013 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and a...
x3ro/RIOT
refs/heads/master
dist/tools/pyterm/pytermcontroller/pytermcontroller.py
38
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (C) 2014 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versi...
rfinn/LCS
refs/heads/master
paper1code/LCSHalphaObs3.py
1
#!/usr/bin/env python from pylab import * import idlsave,os import matplotlib.patches as mpatches #for marking corners of the 24um image #these represent full coverage of 24um scan, but S/N is max for delta Dec = 2.5 #MKW824um=array([220.16377,3.4883817,1.3137727,3.029165,12.7456],'f') #MKW1124um=array([202.36305,11....
MihaiMoldovanu/ansible
refs/heads/devel
test/units/modules/web_infrastructure/test_jenkins_plugin.py
70
import collections from io import BytesIO from ansible.modules.web_infrastructure.jenkins_plugin import JenkinsPlugin def pass_function(*args, **kwargs): pass GITHUB_DATA = {"url": u'https://api.github.com/repos/ansible/ansible', "response": b""" { "id": 3638964, "name": "ansible", "full_n...
SeleniumHQ/selenium
refs/heads/trunk
common/devtools/convert_protocol_to_json.py
3
#!/usr/bin/env python # Copyright 2017 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 argparse import json import os.path import sys import pdl def main(argv): parser = argparse.ArgumentParser(description=( ...
ryansb/boto
refs/heads/master
tests/integration/cloudsearch/test_cert_verification.py
126
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 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 withou...
gutow/sagenb_slickgrid
refs/heads/master
util/quota.py
10
""" This script determines the users that are using more than a certain amount of disk space and makes them "readonly". """ from subprocess import check_output import os import sys SERVERDIR = os.path.abspath(sys.argv[1]) HOMEDIR=os.path.join(SERVERDIR,'home','') # end in / READONLY_FILE=os.path.join(SERVERDIR, 'reado...
pypa/warehouse
refs/heads/master
tests/unit/forklift/test_init.py
1
# 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 the Li...
mitocw/xsiftx
refs/heads/master
xsiftx/config.py
1
""" This handles getting the application configuration such as the OAuth key list and what sifters are authorized for what key. This uses yaml as the configuration format and tries to load the configuration from $(pwd)/xsiftx.yml then ~/.xsiftx.yml, and then /etc/xsiftx.yml using the first one it finds. It can also be...
sujoykroy/motion-picture
refs/heads/master
editor/MotionPicture/gui_utils/buttons.py
1
from .. import settings from ..commons import * from ..document import Document from gi.repository import Gtk, GdkPixbuf, GObject, Gdk from .name_value_combo_box import NameValueComboBox import os, cairo def create_new_image_button(icon_name, desc=None, border_scale=1., size=20, button_class = Gtk.Butt...
endlessm/chromium-browser
refs/heads/master
third_party/catapult/third_party/gsutil/gslib/vendored/boto/tests/integration/rds/test_db_subnet_group.py
130
# Copyright (c) 2013 Franc Carter franc.carter@gmail.com # 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 right...
barnsnake351/nova
refs/heads/master
nova/tests/unit/virt/xenapi/test_volumeops.py
65
# Copyright (c) 2012 Citrix Systems, 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 ...
arsenovic/galgebra
refs/heads/master
examples/Old Format/matrix_latex.py
1
from __future__ import print_function from sympy import symbols, Matrix from galgebra.printer import xpdf, Format def main(): Format() a = Matrix ( 2, 2, ( 1, 2, 3, 4 ) ) b = Matrix ( 2, 1, ( 5, 6 ) ) c = a * b print(a,b,'=',c) x, y = symbols ( 'x, y' ) d = Matrix ( 1, 2, ( x ** 3, y ** 3...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_mlengine_version.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
ntiufalara/openerp7
refs/heads/master
openerp/report/pyPdf/xmp.py
123
import re import datetime import decimal from generic import PdfObject from xml.dom import getDOMImplementation from xml.dom.minidom import parseString RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" DC_NAMESPACE = "http://purl.org/dc/elements/1.1/" XMP_NAMESPACE = "http://ns.adobe.com/xap/1.0/"...
carsongee/edx-platform
refs/heads/master
lms/djangoapps/courseware/management/commands/dump_course_ids.py
144
# pylint: disable=missing-docstring from optparse import make_option from textwrap import dedent from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore class Command(BaseCommand): """ Simple command to dump the course_ids available to the lms. ...
mluo613/osf.io
refs/heads/develop
scripts/osfstorage/settings/__init__.py
105
# encoding: utf-8 from .defaults import * try: from .local import * except ImportError as error: pass
padelt/temper-python
refs/heads/master
tests/test_temper.py
1
""" pytests for temperusb run from the project root with: pytest --cov=temperusb --cov-report term-missing """ import os import pytest import usb from unittest.mock import MagicMock, patch, Mock import temperusb from temperusb.temper import TIMEOUT @pytest.mark.parametrize( [ "productname", # the fake...
viatoriche/microservices
refs/heads/master
microservices/http/service.py
1
# coding=utf-8 from flask import Blueprint from flask_api import FlaskAPI from microservices.utils import dict_update from microservices.http.settings import MicroserviceAPISettings from microservices.http.resources import ResourceSchema from functools import reduce from flask_api import app try: from flask_api...
jeremycline/pulp_puppet
refs/heads/master
pulp_puppet_plugins/pulp_puppet/forge/releases.py
2
# -*- coding: utf-8 -*- # # Copyright © 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
benjamindeleener/odoo
refs/heads/master
addons/sale_stock/company.py
44
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import fields, models class company(models.Model): _inherit = 'res.company' security_lead = fields.Float('Sales Safety Days', required=True, default = 0.0, help="Margin of error for dates p...
binghongcha08/pyQMD
refs/heads/master
GWP/2D/1.0.5/phase.py
14
##!/usr/bin/python import numpy as np import pylab as plt import seaborn as sns sns.set_context('poster',font_scale=1.5) sns.set_style({'font.family':'Times New Roman'}) #with open("traj.dat") as f: # data = f.read() # # data = data.split('\n') # # x = [row.split(' ')[0] for row in data] # y = [row.spli...
MattsFleaMarket/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/tests/test_bdist_wininst.py
53
"""Tests for distutils.command.bdist_wininst.""" import unittest from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, support.LoggingSilencer, ...
jabesq/home-assistant
refs/heads/dev
tests/components/mqtt/test_legacy_vacuum.py
2
"""The tests for the Legacy Mqtt vacuum platform.""" from copy import deepcopy import json from homeassistant.components import mqtt, vacuum from homeassistant.components.mqtt import CONF_COMMAND_TOPIC from homeassistant.components.mqtt.discovery import async_start from homeassistant.components.mqtt.vacuum import ( ...
Venturi/cms
refs/heads/master
env/lib/python2.7/site-packages/phonenumbers/shortdata/region_MS.py
11
"""Auto-generated file, do not edit by hand. MS metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_MS = PhoneMetadata(id='MS', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='9\\d{2}', possible_number_pattern='\\d{...
charlesvdv/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_usvstring.py
142
# -*- coding: UTF-8 -*- import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestUSVString { attribute USVString svs; }; """) results = parser.finish(); harness.check(len(results), 1, "Should be one production") harness.ok(isinstance(results[0], Web...
nodice73/hspipeline
refs/heads/master
web/env/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.py
1835
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
Zhongqilong/mykbengineer
refs/heads/master
kbe/res/scripts/common/Lib/email/generator.py
83
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Classes to generate plain text from a message object tree.""" __all__ = ['Generator', 'DecodedGenerator', 'BytesGenerator'] import re import sys import time import random from copy import deepcopy from io ...
lem8r/cofair-addons
refs/heads/10.0
account_payment_mode/models/res_partner_bank.py
1
# -*- coding: utf-8 -*- # © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' # I also have to change the label of the field in...
xin3liang/platform_prebuilts_gcc_darwin-x86_mips_mipsel-linux-android-4.8
refs/heads/master
share/gdb/python/gdb/printing.py
75
# Pretty-printer utilities. # Copyright (C) 2010-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any l...
HybridF5/jacket
refs/heads/master
jacket/tests/compute/unit/virt/vmwareapi/stubs.py
1
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 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...
hubert667/AIR
refs/heads/master
build/celery/build/lib.linux-i686-2.7/celery/utils/objects.py
3
# -*- coding: utf-8 -*- """ celery.utils.objects ~~~~~~~~~~~~~~~~~~~~ Object related utilities including introspection, etc. """ from __future__ import absolute_import __all__ = ['mro_lookup'] def mro_lookup(cls, attr, stop=(), monkey_patched=[]): """Return the first node by MRO order that defines ...
aioue/ansible
refs/heads/devel
lib/ansible/modules/network/lenovo/cnos_vlan.py
59
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, Inc. # # 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 # ...
pelson/pelican-plugins
refs/heads/master
txt2tags_reader/__init__.py
58
from .txt2tags_reader import *
uclouvain/osis_louvain
refs/heads/master
base/migrations/0140_auto_20170627_1516.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-06-27 13:16 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0139_learningcontainer_start_year'), ] operations = [ migrations.RenameField( ...
kamal-gade/rockstor-core
refs/heads/master
src/rockstor/smart_manager/views/sprobe_metadata.py
1
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
eldarion/mimesis
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # mimesis documentation build configuration file, created by # sphinx-quickstart on Fri May 28 12:50:21 2010. # # 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...