repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Cinntax/home-assistant
refs/heads/dev
homeassistant/components/wake_on_lan/__init__.py
2
"""Support for sending Wake-On-LAN magic packets.""" from functools import partial import logging import voluptuous as vol from homeassistant.const import CONF_MAC import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) DOMAIN = "wake_on_lan" CONF_BROADCAST_ADDRESS = "broadcast_a...
funkotron/django-lean
refs/heads/master
src/django_lean/experiments/tests/views.py
7
# -*- coding: utf-8 -*- import logging l = logging.getLogger(__name__) from django.template import Template, RequestContext from django.http import HttpResponse from django.views.decorators.cache import never_cache EXPERIMENT_TEMPLATE = """ {%% load experiments %%} {%% experiment %(experiment_name)s test %%}TEST{%% ...
mfalesni/cfme_tests
refs/heads/master
cfme/storage/object_store_container.py
3
# -*- coding: utf-8 -*- import attr from navmazing import NavigateToSibling, NavigateToAttribute from widgetastic_manageiq import ( Accordion, BaseEntitiesView, BreadCrumb, ItemsToolBarViewSelector, ManageIQTree, SummaryTable, ) from widgetastic_patternfly import Button, Dropdown from widgetast...
dxxb/micropython
refs/heads/upstream-tracking
tests/basics/equal.py
118
# test equality print(None == None) print(False == None) print(False == False) print(False == True) print(() == ()) print(() == []) print([] == []) print(() == {}) print({} == ()) print(() == None) print(() == False) print(() == print) print([] == None) print([] == False) print([] == print) print({} == None) prin...
varlib1/servermall
refs/heads/master
teamcity/check.py
15
# (C) Datadog, Inc. 2015-2016 # (C) Paul Kirby <pkirby@matrix-solutions.com> 2014 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import time # 3p import requests # project from checks import AgentCheck from config import _is_affirmative class TeamCityCheck(AgentCheck): HE...
peterfpeterson/mantid
refs/heads/master
Framework/PythonInterface/plugins/algorithms/RetrieveRunInfo.py
3
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pyl...
Agent007/deepchem
refs/heads/master
deepchem/dock/pose_generation.py
1
""" Generates protein-ligand docked poses using Autodock Vina. """ from __future__ import division from __future__ import unicode_literals from deepchem.utils import mol_xyz_util __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import logging import numpy as ...
eldioschalm/site-eventos
refs/heads/master
portal/core/models.py
10644
from django.db import models # Create your models here.
olapaola/olapaola-android-scripting
refs/heads/master
python/src/Lib/test/test_iter.py
80
# Test iterators. import unittest from test.test_support import run_unittest, TESTFN, unlink, have_unicode # Test result of triple loop (too big to inline) TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 0, 0), (1,...
elainenaomi/sciwonc-dataflow-examples
refs/heads/master
dissertation2017/Experiment 2/instances/8_1_wikiflow_1sh_1s_annot_sec_wm1/outputs/ConfigDB_SessionCompute_0.py
1
HOST = "wfSciwoncWiki:enw1989@172.31.25.253:27001,172.31.25.251:27001,172.31.2.76:27001/?authSource=admin" PORT = "" USER = "" PASSWORD = "" DATABASE = "wiki" READ_PREFERENCE = "secondary" COLLECTION_INPUT = "sessions" COLLECTION_OUTPUT = "user_sessions" PREFIX_COLUMN = "w_" ATTRIBUTES = ["timestamp", "contributor_u...
ocadotechnology/calico
refs/heads/master
calico/test/stub_etcd.py
4
# -*- coding: utf-8 -*- # Copyright 2014, 2015 Metaswitch Networks # # 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 ap...
abhattad4/Digi-Menu
refs/heads/master
django/contrib/gis/geometry/backend/geos.py
622
from django.contrib.gis.geos import ( GEOSException as GeometryException, GEOSGeometry as Geometry, ) __all__ = ['Geometry', 'GeometryException']
drukhil/frappe
refs/heads/master
frappe/tests/test_email.py
4
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest, frappe from frappe.test_runner import make_test_records make_test_records("User") make_test_records("Email Account") class TestEmail(unittest.TestCase): def s...
yawnosnorous/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/encodings/cp875.py
272
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
Big-B702/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/encodings/mac_romanian.py
272
""" Python Character Mapping Codec mac_romanian generated from 'MAPPINGS/VENDORS/APPLE/ROMANIAN.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
yoosw/printrun_etri
refs/heads/master
pronterface.py
13
#!/usr/bin/env python # This file is part of the Printrun suite. # # Printrun 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. # # Prin...
grilo/ansible-1
refs/heads/devel
test/units/mock/generator.py
63
# Copyright 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, either version 3 of the License, or # (at your option) any ...
hujiajie/chromium-crosswalk
refs/heads/master
third_party/WebKit/Source/devtools/scripts/jsdoc-validator/build_jsdoc_validator_jar.py
66
#!/usr/bin/python import hashlib import operator import os import shutil import stat import subprocess import sys import tempfile def rel_to_abs(rel_path): return os.path.join(script_path, rel_path) java_bin_path = os.getenv('JAVA_HOME', '') if java_bin_path: java_bin_path = os.path.join(java_bin_path, 'bi...
deepsrijit1105/edx-platform
refs/heads/master
openedx/core/djangoapps/content/course_structures/api/v0/errors.py
66
""" Errors used by the Course Structure API. """ class CourseStructureNotAvailableError(Exception): """ The course structure still needs to be generated. """ pass
hwroitzsch/BikersLifeSaver
refs/heads/master
lib/python3.5/site-packages/numpy/ma/tests/test_extras.py
14
# pylint: disable-msg=W0611, W0612, W0511 """Tests suite for MaskedArray. Adapted from the original test_ma by Pierre Gerard-Marchant :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ from __future__ import division, absolute...
menardorama/ReadyNAS-Add-ons
refs/heads/master
headphones-1.0.0/debian/headphones/etc/apps/headphones/lib/mako/__init__.py
60
# mako/__init__.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = '1.0.1'
ysarbaev/contrib-python-qubell-client
refs/heads/master
test_qubell_client/__init__.py
1
# Copyright (c) 2013 Qubell Inc., http://qubell.com # # 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 agr...
amwelch/a10sdk-python
refs/heads/master
a10sdk/core/cgnv6/cgnv6_template_policy.py
2
from a10sdk.common.A10BaseClass import A10BaseClass class Dns64(A10BaseClass): """This class does not support CRUD Operations please use parent. :param exclusive_answer: {"default": 0, "type": "number", "description": "Exclusive Answer in DNS Response", "format": "flag"} :param prefix: {"type": "str...
ahuarte47/QGIS
refs/heads/master
tests/src/python/test_qgslayoutmapgrid.py
15
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutItemMapGrid. .. note. 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. "...
grant/algorithm-music
refs/heads/master
misccode/mididump.py
13
#!/usr/bin/env python """ Print a description of a MIDI file. """ import midi import sys if len(sys.argv) != 2: print "Usage: {0} <midifile>".format(sys.argv[0]) sys.exit(2) midifile = sys.argv[1] pattern = midi.read_midifile(midifile) print repr(pattern)
viaembedded/vab1000-kernel-bsp
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
huggingface/transformers
refs/heads/master
src/transformers/modeling_tf_pytorch_utils.py
2
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
liorvh/infernal-twin
refs/heads/master
build/pillow/PIL/GimpGradientFile.py
72
# # Python Imaging Library # $Id$ # # stuff to read (and render) GIMP gradient files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # from math import pi, log, sin, sqrt from PI...
wuzhenda/gaedav
refs/heads/master
pyxml/dom/minicompat.py
4
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # isinstance -- version of the isinstance() function that accepts # tuples as the second parameter regardless of the # Python...
hectord/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/modeltests/field_defaults/models.py
93
# coding: utf-8 """ 32. Callable defaults You can pass callable objects as the ``default`` parameter to a field. When the object is created without an explicit value passed in, Django will call the method to determine the default value. This example uses ``datetime.datetime.now`` as the default for the ``pub_date`` f...
lmorchard/django
refs/heads/master
django/utils/archive.py
562
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
stewartpark/django
refs/heads/master
tests/force_insert_update/models.py
581
""" Tests for forcing insert and update queries (instead of Django's normal automatic behavior). """ from django.db import models class Counter(models.Model): name = models.CharField(max_length=10) value = models.IntegerField() class InheritedCounter(Counter): tag = models.CharField(max_length=10) cla...
jimberlage/servo
refs/heads/master
tests/wpt/webgl/tools/import-conformance-tests.py
6
#!/usr/bin/env python import os import subprocess import sys import tempfile import shutil import bisect import argparse KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git" # Patches for conformance tests 1.0.x PATCHES = [ ("js-test-pre.patch", "js/js-test-pre.js"), ("unit.patch", "conformance/more...
sergi-casbas/xstore-api
refs/heads/master
xapiconnect.py
1
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # xapiconnect.py """ Module with the required classes to handle and automatize connection with xStore """ # # Copyright 2016 Sergi Casbas <sergi@casbas.cat> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
kosgroup/odoo
refs/heads/10.0
addons/portal/models/__init__.py
22
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import res_groups
jayoshih/content-curation
refs/heads/master
contentcuration/manage.py
4
#!/usr/bin/env python import os import sys # Attach Python Cloud Debugger if __name__ == "__main__": #import warnings #warnings.filterwarnings('ignore', message=r'Module .*? is being added to sys\.path', append=True) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "contentcuration.settings") from dj...
DualSpark/ansible
refs/heads/devel
v1/ansible/runner/lookup_plugins/inventory_hostnames.py
173
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Steven Dossett <sdossett@panath.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 versio...
larsoner/mne-python
refs/heads/master
examples/inverse/plot_mne_cov_power.py
15
""" =================================================================== Compute source power estimate by projecting the covariance with MNE =================================================================== We can apply the MNE inverse operator to a covariance matrix to obtain an estimate of source power. This is com...
pkilambi/ceilometer
refs/heads/master
ceilometer/hardware/pollsters/disk.py
9
# # Copyright 2013 ZHAW SoE # Copyright 2014 Intel Corp. # # Authors: Lucas Graf <graflu0@students.zhaw.ch> # Toni Zehnder <zehndton@students.zhaw.ch> # Lianhao Lu <lianhao.lu@intel.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
Vivek-anand-jain/Implementation-of-BLUE-in-ns-3
refs/heads/master
src/sixlowpan/bindings/callbacks_list.py
80
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
gaccob/gres
refs/heads/master
dep/google/protobuf/message_factory.py
228
# 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 conditions are # met: # # * Redistributions o...
project-magpie/enigma2-openpli
refs/heads/master
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
2
from skin import parseColor, parseFont, parseSize from Components.config import config, ConfigClock, ConfigInteger, ConfigSubsection, ConfigYesNo, ConfigSelection, ConfigSelectionNumber from Components.Pixmap import Pixmap from Components.Button import Button from Components.ActionMap import HelpableActionMap from Comp...
mdanielwork/intellij-community
refs/heads/master
python/testData/docstrings/numpySectionBlockBreaksOnDoubleEmptyLine.py
53
def func(): """ Parameters ---------- x First line Second line Line after single break Not included """
bd339/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/wptserve/constants.py
141
from . import utils content_types = utils.invert_dict({"text/html": ["htm", "html"], "application/json": ["json"], "application/xhtml+xml": ["xht", "xhtm", "xhtml"], "application/xml": ["xml"], ...
neudesk/neucloud
refs/heads/master
openstack_dashboard/dashboards/project/images_and_snapshots/snapshots/views.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
wanderknight/tushare
refs/heads/master
tushare/stock/reference.py
2
# -*- coding:utf-8 -*- """ 投资参考数据接口 Created on 2015/03/21 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ from __future__ import division from tushare.stock import cons as ct from tushare.stock import ref_vars as rv from tushare.util import dateu as dt import pandas as pd import time i...
mahyarABS/raspi
refs/heads/master
i2c-sensors/bitify/python/sensors/bmp085.py
3
import bitify.python.utils.i2cutils as I2CUtils import smbus import time class BMP085(object): ''' Simple BMP085 implementation Datasheet: http://www.adafruit.com/datasheets/BMP085_DataSheet_Rev.1.0_01July2008.pdf ''' CALIB_BLOCK_ADDRESS = 0xAA CALIB_BLOCK_SIZE = 22 def __init__(...
petteyg/intellij-community
refs/heads/master
python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromInstance.py
83
class A: def __init__(self): self.x = 1 a = A() a.<caret><warning descr="Unresolved attribute reference 'y' for class 'A'">y</warning>()
alsrgv/tensorflow
refs/heads/master
tensorflow/contrib/opt/python/training/nadam_optimizer_test.py
16
# Copyright 2015 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...
Xeralux/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/learn_runner_lib.py
42
# 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...
cfelton/gizflo
refs/heads/master
setup.py
2
from setuptools import setup, find_packages from gizflo import __version__ # The README is probably a little too long for the # pipy stuff. desc = \ """ Automated FPGA toolflow for MyHDL modules. """ setup(name='gizflo', version=__version__, author="Christopher Felton", author_email="chris.felton...
yandy/sea
refs/heads/master
sea/utils.py
2
import sys from threading import Lock def import_string(import_name): import_name = str(import_name).replace(':', '.') try: __import__(import_name) except ImportError: if '.' not in import_name: raise else: return sys.modules[import_name] module_name, obj_name ...
joke2k/faker
refs/heads/master
faker/providers/person/ja_JP/__init__.py
1
from collections import OrderedDict from operator import itemgetter from .. import Provider as PersonProvider class Provider(PersonProvider): # link: http://dic.nicovideo.jp/a/日本人の名前一覧 # link: http://www.meijiyasuda.co.jp/enjoy/ranking/ first_name_female_pairs = ( ('明美', 'アケミ', 'Akemi'), ...
pimutils/todoman
refs/heads/main
docs/source/conf.py
1
#!/usr/bin/env python3 # # Todoman documentation build configuration file, created by # sphinx-quickstart on Tue Dec 15 22:10:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
yjmade/odoo
refs/heads/8.0
openerp/tools/appdirs.py
376
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
AndroidOpenDevelopment/android_external_chromium_org
refs/heads/lp
third_party/libaddressinput/chromium/tools/require_fields.py
111
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import urllib from sys import exit as sys_exit # Derived from region_data_constants.cc. _COUNTRIES = [ 'AD', 'AE', 'A...
Maximilian-Reuter/SickRage
refs/heads/master
lib/unidecode/x0ad.py
253
data = ( 'gwan', # 0x00 'gwanj', # 0x01 'gwanh', # 0x02 'gwad', # 0x03 'gwal', # 0x04 'gwalg', # 0x05 'gwalm', # 0x06 'gwalb', # 0x07 'gwals', # 0x08 'gwalt', # 0x09 'gwalp', # 0x0a 'gwalh', # 0x0b 'gwam', # 0x0c 'gwab', # 0x0d 'gwabs', # 0x0e 'gwas', # 0x0f 'gwass', #...
fast-project/fast-lib
refs/heads/master
vendor/yaml-cpp/test/gmock-1.7.0/test/gmock_output_test.py
986
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
JetChars/vim
refs/heads/master
vim/bundle/python-mode/pymode/libs2/rope/contrib/fixsyntax.py
8
import rope.base.codeanalyze import rope.base.evaluate from rope.base import exceptions from rope.base import libutils from rope.base import utils from rope.base import worder from rope.base.codeanalyze import ArrayLinesAdapter, LogicalLineFinder class FixSyntax(object): def __init__(self, project, code, resourc...
vtesin/sklearn_tutorial
refs/heads/master
examples/plot_iris_projections.py
3
""" Iris Projections ---------------- This code generates the Iris projection example plots found in the tutorial """ from itertools import cycle import pylab as pl from sklearn.datasets import load_iris from sklearn.decomposition import PCA def plot_2D(data, target, target_names): colors = cycle('rgbcmykw') ...
miltonruelas/cursotecnico
refs/heads/7.0
branch/account_einvoice/__openerp__.py
4
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
fedspendingtransparency/data-act-broker-backend
refs/heads/development
dataactvalidator/health_check.py
1
import logging from flask import Flask from dataactcore.config import CONFIG_SERVICES from dataactcore.logging import configure_logging from dataactcore.utils.jsonResponse import JsonResponse logger = logging.getLogger(__name__) def create_app(): """Create the Flask app.""" flask_app = Flask(__name__.split('...
ironstein1994/IMU-based-pen-mini-project-semester-5
refs/heads/master
reference material/MPU 6050 documents/DMP/motion_driver-5.1.2/simple_apps/msp430/motion-driver-client/motion-driver-client.py
2
#!/usr/bin/python # motion-driver-client.py # A PC application for use with Motion Driver. # Copyright 2012 InvenSense, Inc. All Rights Reserved. import serial, sys, time, string, pygame from ponycube import * # Sensor sensitivities ACCEL_SENS = 16384.0 GYRO_SENS = 16.375 QUAT_SENS = 1073741824.0 # Tap directio...
shujaatak/UAV_MissionPlanner
refs/heads/master
Lib/site-packages/numpy/oldnumeric/linear_algebra.py
102
"""Backward compatible with LinearAlgebra from Numeric """ # This module is a lite version of the linalg.py module in SciPy which contains # high-level Python interface to the LAPACK library. The lite version # only accesses the following LAPACK functions: dgesv, zgesv, dgeev, # zgeev, dgesdd, zgesdd, dgelsd, zgelsd, ...
bathepawan/workload-automation
refs/heads/master
wlauto/resource_getters/__init__.py
48
# Copyright 2013-2015 ARM Limited # # 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 w...
ShashaQin/erpnext
refs/heads/develop
erpnext/controllers/stock_controller.py
1
# 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.utils import cint, flt, cstr from frappe import msgprint, _ import frappe.defaults from erpnext.accounts.utils import get_fisc...
ZHAW-INES/rioxo-uClinux-dist
refs/heads/rtsp
user/python/python-2.4.4/Tools/modulator/ScrolledListbox.py
37
# A ScrolledList widget feels like a list widget but also has a # vertical scroll bar on its right. (Later, options may be added to # add a horizontal bar as well, to make the bars disappear # automatically when not needed, to move them to the other side of the # window, etc.) # # Configuration options are passed to t...
saurabh6790/medsynaptic1-lib
refs/heads/master
website/templates/pages/message.py
68
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals no_cache = True
yasker/cattle
refs/heads/master
tests/integration/cattletest/core/test_ha.py
1
from common_fixtures import * # NOQA import logging def _process_names(processes): return set([x.processName for x in processes]) def test_container_ha_default(client, super_client, user_sim_context): c = client.create_container(imageUuid=user_sim_context['imageUuid'], reque...
unbreakab1e/jenkins-job-builder-addons
refs/heads/master
tests/base.py
2
#!/usr/bin/env python # # Joint copyright: # - Copyright 2012,2013 Wikimedia Foundation # - Copyright 2012,2013 Antoine "hashar" Musso # - Copyright 2013 Arnaud Fabre # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
KellyChan/Python
refs/heads/master
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/contrib/flatpages/middleware.py
641
from django.contrib.flatpages.views import flatpage from django.http import Http404 from django.conf import settings class FlatpageFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a flatpage for non...
otherness-space/myProject003
refs/heads/master
my_project_003/lib/python2.7/site-packages/wheel/signatures/djbec.py
566
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
BigBrother1984/android_external_chromium_org
refs/heads/kitkat
third_party/protobuf/python/google/protobuf/descriptor.py
228
# 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 conditions are # met: # # * Redistributions o...
zanderle/django
refs/heads/master
tests/forms_tests/widget_tests/test_nullbooleanselect.py
179
from django.forms import NullBooleanSelect from django.test import override_settings from django.utils import translation from .base import WidgetTest class NullBooleanSelectTest(WidgetTest): widget = NullBooleanSelect() def test_render_true(self): self.check_html(self.widget, 'is_cool', True, html=...
sambitgaan/nupic
refs/heads/master
src/nupic/data/joiner.py
11
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
Team-M8/android_kernel_htc_msm8974-staging
refs/heads/next
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
jalavik/invenio
refs/heads/master
invenio/legacy/bibindex/engine_utils.py
7
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio 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,...
OCA/vertical-isp
refs/heads/12.0
connector_equipment_service/models/__init__.py
1
# Copyright (C) 2019 Open Source Integrators # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import maintenance_equipment from . import agreement_serviceprofile
j1fig/green-catalyst
refs/heads/master
green-catalyst/probe.py
2
from time import sleep from pigpio import pi from dht11driver import DHT11 class Probe(object): """ A small wrapper class around DHT11 and pigpio drivers that reports info to a web server """ def __enter__(self): class ProbeResource(object): def __init__(self): ...
lyan6/genenetwork2
refs/heads/master
wqflask/wqflask/correlation/correlation_functions.py
1
# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 of the # License, or (at your option) any la...
40023256/2015cdag1man
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/site-packages/editor.py
84
# -*- coding: utf-8 -*- import sys import time import traceback import dis from browser import document as doc, window, alert, ajax # set height of container to 66% of screen _height = doc.documentElement.clientHeight _s = doc['container'] _s.style.height = '%spx' % int(_height * 0.66) has_ace = True try: editor...
leiferikb/bitpop
refs/heads/master
build/third_party/requests_1_2_3/requests/auth.py
78
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import logging from base64 import b64encode from .compat import urlparse, str from .utils import parse_dict_header log = logging.getLogger(__na...
ryfeus/lambda-packs
refs/heads/master
Rasterio_osgeo_shapely_PIL_pyproj_numpy/source/osgeo/_gdal.py
1
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, '_gdal.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
ianatpn/nupictest
refs/heads/master
nupic/regions/extra/GaborNode2.py
8
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
thodoris/djangoPharma
refs/heads/master
djangoPharma/env/Lib/site-packages/django/contrib/gis/db/backends/mysql/base.py
58
from django.db.backends.mysql.base import \ DatabaseWrapper as MySQLDatabaseWrapper from .features import DatabaseFeatures from .introspection import MySQLIntrospection from .operations import MySQLOperations from .schema import MySQLGISSchemaEditor class DatabaseWrapper(MySQLDatabaseWrapper): SchemaEditorCl...
jcfrank/myrepo
refs/heads/master
subcmds/abandon.py
82
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
CatsAndDogsbvba/odoo
refs/heads/8.0
addons/mass_mailing/controllers/main.py
24
import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request class MassMailController(http.Controller): @http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none') def track_mail_open(self, mail_id, **post): """ Email tracking. """ mail_mail_stats...
josecolella/PLD
refs/heads/master
bin/osx/treasurehunters.app/Contents/Resources/lib/python3.4/numpy/numarray/convolve.py
13
from __future__ import division, absolute_import, print_function try: from stsci.convolve import * except ImportError: try: from scipy.stsci.convolve import * except ImportError: msg = \ """The convolve package is not installed. It can be downloaded by checking out the latest source from h...
oroca/SkyRoverNano2-firmware_backup
refs/heads/master
scripts/dfu-convert.py
23
#!/usr/bin/python2 # Written by Antonio Galea - 2010/11/18 # Distributed under Gnu LGPL 3.0 # see http://www.gnu.org/licenses/lgpl-3.0.txt # # Removed ihex functionality and dependency, Bitcraze - 2014-12-11 import sys,struct,zlib,os from optparse import OptionParser DEFAULT_DEVICE="0x0483:0xdf11" def named(tuple,n...
rahuldhote/odoo
refs/heads/8.0
addons/auth_oauth/__openerp__.py
300
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
szebenyib/bookshelf
refs/heads/master
markdown/extensions/__init__.py
65
""" Extensions ----------------------------------------------------------------------------- """ from __future__ import unicode_literals class Extension(object): """ Base class for extensions to subclass. """ def __init__(self, configs = {}): """Create an instance of an Extention. Keyword arg...
Omegaphora/external_chromium_org
refs/heads/lp5.1
tools/telemetry/telemetry/core/backends/adb_commands.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. """Brings in Chrome Android's android_commands module, which itself is a thin(ish) wrapper around adb.""" import logging import os import shutil import stat...
clumsy/intellij-community
refs/heads/master
python/testData/intentions/beforeReturnTypeInEmptyGoogleDocString.py
106
def <caret>f(x, y): """"""
programadorjc/django
refs/heads/master
tests/check_framework/test_security.py
242
from django.conf import settings from django.core.checks.security import base, csrf, sessions from django.test import SimpleTestCase from django.test.utils import override_settings class CheckSessionCookieSecureTest(SimpleTestCase): @property def func(self): from django.core.checks.security.sessions i...
findapad/find_a_pad
refs/heads/master
find_a_pad_app/migrations/0003_auto_20170709_1432.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-09 14:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('find_a_pad_app', '0002_auto_20170709_1414'), ] operations = [ migrations.Al...
Guneet-Dhillon/mxnet
refs/heads/master
example/reinforcement-learning/parallel_actor_critic/train.py
24
# 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...
evodify/genotype-files-manipulations
refs/heads/master
selectSamples_in_callsTab.py
1
#!/usr/bin/env python2 """ This script subsamples a genotype calls file by sample names. It also can be used to rearrange samples in a calls file. # input file: CHROM POS REF sample1 sample2 sample3 sample4 sample5 sample6 sample7 sample8 chr_1 1 A W N N A N N N N chr_1 2 C Y Y N C ...
unicefuganda/ureport_website
refs/heads/master
ureport_website/ureport_website/settings/production.py
1
"""Production settings and globals.""" from os import environ from base import * # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ImproperlyConfigured def get_env_setting(setting): """ Get the envi...
stvstnfrd/edx-platform
refs/heads/master
import_shims/studio/contentstore/views/tests/test_item.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('contentstore.views.tests.test_item', 'cms.djangoap...
chris2286266/c2coin
refs/heads/master
contrib/wallettools/walletchangepass.py
785
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:9332") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)