repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
rdnetto/entropy | refs/heads/master | lib/entropy/db/__init__.py | 6 | # -*- coding: utf-8 -*-
"""
@author: Fabio Erculiani <lxnay@sabayon.org>
@contact: lxnay@sabayon.org
@copyright: Fabio Erculiani
@license: GPL-2
B{Entropy Framework repository database module}.
Entropy repositories (server and client) are implemented as relational
databases. Currently, Ent... |
kvar/ansible | refs/heads/seas_master_2.9.5 | lib/ansible/modules/cloud/cloudstack/cs_sshkeypair.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'com... |
LukasBoersma/readthedocs.org | refs/heads/master | readthedocs/core/migrations/0001_initial.py | 36 | # -*- 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... |
antoan2/incubator-mxnet | refs/heads/master | example/fcn-xs/init_fcnxs.py | 52 | # 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... |
lammy/artisan | refs/heads/master | artisanlib/list_ports_osx.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# list_ports_osx.py
#
# Copyright (c) 2013, Paul Holleis, Marko Luther
# All rights reserved.
#
#
# LICENSE
#
# 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 Fo... |
kaarolch/ansible | refs/heads/devel | lib/ansible/modules/files/replace.py | 12 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Evan Kaufman <evan@digitalflophouse.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 t... |
da1z/intellij-community | refs/heads/master | python/testData/stubs/VariableAnnotation.py | 26 | x: int = ...
y: str |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/scripts/mailerdaemon.py | 38 | #!/usr/bin/env python
"""mailerdaemon - classes to parse mailer-daemon messages"""
import rfc822
import calendar
import re
import os
import sys
Unparseable = 'mailerdaemon.Unparseable'
class ErrorMessage(rfc822.Message):
def __init__(self, fp):
rfc822.Message.__init__(self, fp)
self.sub = ''
... |
isrohutamahopetechnik/MissionPlanner | refs/heads/master | Lib/lib2to3/fixes/fix_paren.py | 61 | """Fixer that addes parentheses where they are required
This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``."""
# By Taek Joo Kim and Benjamin Peterson
# Local imports
from .. import fixer_base
from ..fixer_util import LParen, RParen
# XXX This doesn't support nested for loops like [x for x in ... |
antiface/mne-python | refs/heads/master | examples/preprocessing/plot_estimate_covariance_matrix_baseline.py | 22 | """
===============================================
Estimate covariance matrix from Epochs baseline
===============================================
We first define a set of Epochs from events and a raw file.
Then we estimate the noise covariance of prestimulus data,
a.k.a. baseline.
"""
# Author: Alexandre Gramfort <... |
deleporte/plaquettes | refs/heads/master | slow_variations.py | 1 | def inverse_transition_matrix(C,ERROR=1.0e-14):
"""Computes in small time the pseudo inverse of the I-transition matrix.
This matrix should be applied only to vectors with zero sum.
This returns S such that S(I-T)=(I-T)S is the projector on the set
of vectors of zero sum, along the equilibrium matrix.
... |
tchernomax/ansible | refs/heads/devel | test/units/modules/network/eos/test_eos_user.py | 57 | # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... |
qPCR4vir/orange | refs/heads/master | Orange/OrangeWidgets/OWFreeVizOptimization.py | 6 | from OWWidget import OWWidget
from OWkNNOptimization import *
import orange, math, random
import OWGUI, orngVisFuncts, numpy
from math import sqrt
from orngScaleLinProjData import *
from orngLinProj import *
class FreeVizOptimization(OWWidget, FreeViz):
settingsList = ["stepsBeforeUpdate", "restrain", "differenti... |
leighpauls/k2cro4 | refs/heads/master | third_party/python_26/Lib/site-packages/win32/Demos/CopyFileEx.py | 34 | import win32file, win32api
import os
def ProgressRoutine(TotalFileSize, TotalBytesTransferred, StreamSize, StreamBytesTransferred,
StreamNumber, CallbackReason, SourceFile, DestinationFile, Data):
print Data
print TotalFileSize, TotalBytesTransferred, StreamSize, StreamBytesTransferred, StreamNumber, Call... |
istio/envoy | refs/heads/master | docs/generate_extension_db.py | 4 | #!/usr/bin/env python3
# Generate an extension database, a JSON file mapping from qualified well known
# extension name to metadata derived from the envoy_cc_extension target.
import json
import os
import pathlib
import shutil
import subprocess
import sys
from importlib.util import spec_from_loader, module_from_spec... |
qxsch/QXSConsolas | refs/heads/master | examples/CopyThat/copyThat/sqlalchemy/sql/naming.py | 55 | # sqlalchemy/naming.py
# Copyright (C) 2005-2016 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
"""Establish constraint and index naming conventions.
"""
from .schema impor... |
yk5/incubator-airflow | refs/heads/master | tests/utils/test_dag_processing.py | 12 | # -*- coding: utf-8 -*-
#
# 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
#... |
Poplava/react-native | refs/heads/master | JSCLegacyProfiler/trace_data.py | 375 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import re
import unittest
"""
# _-----=> irqs-off
# / _----=> need-resched
# | / _---... |
kopycisko/skt-wagtail | refs/heads/master | demo/migrations/0005_auto_20160531_1736.py | 7 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('demo', '0004_auto_20151019_1351'),
]
operations = [
migrations.AlterField(
model_name='formfield',
n... |
hoangt/gem5v | refs/heads/master | ext/ply/test/yacc_notfunc.py | 174 | # -----------------------------------------------------------------------------
# yacc_notfunc.py
#
# p_rule not defined as a function
# -----------------------------------------------------------------------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.yacc as yacc
from calclex import... |
mvaled/sentry | refs/heads/master | src/sentry/lang/java/__init__.py | 5 | from __future__ import absolute_import
from sentry.plugins import register
from .plugin import JavaPlugin
register(JavaPlugin)
|
nineisk/esp-idf | refs/heads/master | components/idf_test/integration_test/TestCaseScript/UDPStress/UDPMultiSTASendRecv.py | 15 | from TCAction import TCActionBase
from NativeLog import NativeLog
import time
import random
import string
class TestCase(TCActionBase.CommonTCActionBase):
def __init__(self, test_case, test_env, timeout=45, log_path=TCActionBase.LOG_PATH):
TCActionBase.CommonTCActionBase.__init__(self, test_case, test_env... |
larsw/guessit | refs/heads/master | guessit/__version__.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... |
Jasmeet107/serapis | refs/heads/master | sentiment/testing/gen_sentence_data.py | 1 | import pymongo
import csv
import random
import re
from nltk import sent_tokenize, Tree
# db
client = pymongo.MongoClient()
db = client.confessions
# iterate over each confession in random order
parses = list(db.parses.find())
random.shuffle(parses)
texts = []
# take first n confessions
for confession in parses[:100... |
kvaps/vdsm | refs/heads/hostusb-port-based | tests/mountTests.py | 2 | #
# Copyright 2012 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... |
e-gob/plataforma-kioscos-autoatencion | refs/heads/master | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/windows/win_dsc.py | 24 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Trond Hindenes <trond@hindenes.com>, and others
#
# 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... |
js0701/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/internal/platform/profiler/profiler_finder.py | 24 | # 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 os
from telemetry.core import discover
from telemetry.internal.platform import profiler
from telemetry.core import util
def _DiscoverProfilers():
... |
yunify/qingcloud-cli | refs/heads/master | qingcloud/cli/iaas_client/actions/vxnet/leave_vxnet.py | 1 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... |
alsrgv/tensorflow | refs/heads/master | tensorflow/contrib/testing/__init__.py | 178 | # 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... |
rogalski/pylint | refs/heads/master | pylint/test/functional/raising_non_exception_py3.py | 15 | """The following code should emit a raising-non-exception.
Previously, it didn't, due to a bug in the check for bad-exception-context,
which prevented further checking on the Raise node.
"""
# pylint: disable=import-error, too-few-public-methods
from missing_module import missing
class Exc(object):
"""Not an act... |
bcheung92/Paperproject | refs/heads/master | gem5/configs/dram/lat_mem_rd.py | 8 | # Copyright (c) 2015 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... |
whiteclover/Choco | refs/heads/master | examples/wsgi/run_wsgi.py | 1 | #!/usr/bin/python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import cgi, re, os, posixpath, mimetypes
from choco.lookup import TemplateLookup
from choco import errors
root = './'
port = 8000
lookup = TemplateLo... |
earshel/PokeyPyManager | refs/heads/master | POGOProtos/Networking/Responses/UseItemXpBoostResponse_pb2.py | 16 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Networking/Responses/UseItemXpBoostResponse.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
f... |
g19-hs/personfinder | refs/heads/master | tests/test_api.py | 15 | #!/usr/bin/python2.7
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
40223101/w17test | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/__init__.py | 603 | ## pygame - Python Game Library
## Copyright (C) 2000-2001 Pete Shinners
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Library General Public
## License as published by the Free Software Foundation; either
## version 2 of the License, or (... |
ujfjhz/storm | refs/heads/master | dev-tools/jira_github/__init__.py | 28 | # -*- 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, soft... |
rgarcia-herrera/MCAC | refs/heads/master | vep/vep2csv_prob_poss_del.py | 2 | import csv
import argparse
from pprint import pprint
parser = argparse.ArgumentParser(description="Unfold VEP's extra field to create regular CSV files")
parser.add_argument('vep', type=argparse.FileType('r'))
# parser.add_argument('--csv', type=argparse.FileType('w'), required=True )
args = parser.parse_args()
h... |
MichaelCoughlinAN/Odds-N-Ends | refs/heads/master | Python/DNS_configure.py | 1 | # Run as admin/root
import time
with open('C:\Windows\System32\drivers\etc\hosts', 'a') as hosts:
hosts.write('10.83.135.54 pulse.lab\n 10.83.135.113 pulse.lifetest')
print 'Entries added to local DNS'
print 'pulse.lab -> http://10.83.135.54'
print 'pulse.lifetest -> http://10.83.135.113'
while True:
time.sl... |
bameda/lektor | refs/heads/master | lektor/i18n.py | 1 | import os
import json
from lektor.uilink import UI_LANG
translations_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'translations')
KNOWN_LANGUAGES = list(x[:-5] for x in os.listdir(translations_path)
if x.endswith('.json'))
translations = {}
for ... |
consulo/consulo-python | refs/heads/master | plugin/src/test/resources/findUsages/NamespacePackageUsages/b.py | 83 | import nspkg1 |
InakiZabala/odoomrp-wip | refs/heads/8.0 | mrp_bom_through_attributes/models/product.py | 18 | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import fields, models
class ProductAttrib... |
kiwix/kiwix-build | refs/heads/master | kiwixbuild/dependencies/zstd.py | 1 | from .base import (
Dependency,
ReleaseDownload,
MesonBuilder)
from kiwixbuild.utils import Remotefile
class zstd(Dependency):
name = 'zstd'
class Source(ReleaseDownload):
archive = Remotefile('zstd-1.4.4.tar.gz',
'59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918... |
lakshmi-kannan/st2 | refs/heads/master | st2common/st2common/util/schema/__init__.py | 6 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... |
MarcusTan/yncn-grid | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/tests/__init__.py | 412 | """Tests for the 'setuptools' package"""
import sys
import os
import unittest
from setuptools.tests import doctest
import distutils.core
import distutils.cmd
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.errors import DistutilsSetupError
from distutils.core import Extension
fr... |
GeoODK/formhub | refs/heads/master | api/tests/test_data_api.py | 4 | from django.test import RequestFactory
from main.tests.test_base import MainTestCase
from api.views import DataViewSet, XFormViewSet
class TestDataAPI(MainTestCase):
def setUp(self):
MainTestCase.setUp(self)
self._create_user_and_login()
self._publish_transportation_form()
self._... |
cosmoharrigan/rl-glue-ext | refs/heads/master | projects/codecs/Python/src/tests/test_1_environment.py | 8 | #
# Copyright (C) 2008, Brian Tanner
#
#http://rl-glue-ext.googlecode.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 requ... |
nicoboss/Floatmotion | refs/heads/master | OpenGL/raw/GLES2/NV/blend_equation_advanced_coherent.py | 8 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES2 import _types as _cs
# End users want this...
from OpenGL.raw.GLES2._types import *
from OpenGL.raw.GLES2 import _errors
from OpenGL.constant import Constant as _C
import... |
theheros/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/encodings/iso8859_11.py | 37 | """ Python Character Mapping Codec iso8859_11 generated from 'MAPPINGS/ISO8859/8859-11.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... |
timmeinhardt/ProxImaL | refs/heads/master | proximal/algorithms/pock_chambolle.py | 1 | from __future__ import print_function
import tempfile
import os
from proximal.lin_ops import (CompGraph, est_CompGraph_norm, Variable,
vstack)
from proximal.utils.timings_log import TimingsLog, TimingsEntry
from proximal.utils.utils import graph_visualize
from proximal.utils.cuda_codegen i... |
flyfei/python-for-android | refs/heads/master | python-modules/twisted/twisted/test/test_finger.py | 60 | # Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.protocols.finger}.
"""
from twisted.trial import unittest
from twisted.protocols import finger
from twisted.test.proto_helpers import StringTransport
class FingerTestCase(unittest.TestCase):
"""
Tests f... |
dcroc16/skunk_works | refs/heads/master | google_appengine/lib/django-1.2/django/contrib/gis/geos/coordseq.py | 411 | """
This module houses the GEOSCoordSeq object, which is used internally
by GEOSGeometry to house the actual coordinates of the Point,
LineString, and LinearRing geometries.
"""
from ctypes import c_double, c_uint, byref
from django.contrib.gis.geos.base import GEOSBase, numpy
from django.contrib.gis.geos.error impo... |
ashishlal/pjproject-2.0.1 | refs/heads/master | tests/pjsua/scripts-call/150_srtp_1_3.py | 57 | # $Id: 150_srtp_1_3.py 3334 2010-10-05 16:32:04Z nanang $
#
from inc_cfg import *
test_param = TestParam(
"Callee=optional SRTP, caller=optional (with duplicated offer) SRTP",
[
InstanceParam("callee", "--null-audio --use-srtp=1 --srtp-secure=0 --max-calls=1"),
InstanceParam("caller", "--null-audio --use-srt... |
zx8/youtube-dl | refs/heads/master | youtube_dl/extractor/patreon.py | 96 | # encoding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
js_to_json,
)
class PatreonIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?patreon\.com/creation\?hid=(?P<id>[^&#]+)'
_TESTS = [
{
'url': 'http://www.patreon.com/crea... |
postlund/home-assistant | refs/heads/dev | homeassistant/components/bbb_gpio/binary_sensor.py | 3 | """Support for binary sensor using Beaglebone Black GPIO."""
import logging
import voluptuous as vol
from homeassistant.components import bbb_gpio
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME
import homeassistant.... |
laxmikantG/tracecode | refs/heads/master | tracecode/tracecode/browser/models.py | 10644 | from django.db import models
# Create your models here.
|
aioue/ansible | refs/heads/devel | lib/ansible/executor/process/__init__.py | 2520 | # (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... |
andrius-preimantas/odoo | refs/heads/master | addons/point_of_sale/report/pos_invoice.py | 62 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
ORTI3D/ORTI3D_code | refs/heads/master | iliblast/opgeoWriter.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 15 18:21:30 2015
@author: olive
"""
import os
from geometry import *
class opgeoWriter:
def __init__(self,core,fDir,fName):
self.core = core
self.fDir,self.fName = fDir,fName
self.fullPath = fDir+os.sep+fName;#print self.fullPath
def wri... |
ktosiu/lollypop | refs/heads/master | src/player_externals.py | 3 | # Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# 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 later vers... |
axinging/sky_engine | refs/heads/master | third_party/jinja2/_compat.py | 638 | # -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support based on a stripped down
version of six so we don't have to depend on a specific version
of it.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
""... |
asimshankar/tensorflow | refs/heads/master | tensorflow/contrib/quantize/python/quantize_test.py | 18 | # 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... |
denjello/pi-DJex | refs/heads/master | djex_config.py | 1 | import json
import os
class DjexConfig:
data = {
"rmswindowsize": 2,
"threshold": 80,
"gpio_pins": {
"active": 11,
"pwm_warn": 12,
"relay": 22
}
}
last_modified = 0
def update(self):
if os.path.isfile('config.json'):
... |
manisandro/gtkspellmm | refs/heads/master | codegen/tools/defs_gen/docextract.py | 2 | # -*- Mode: Python; py-indent-offset: 4 -*-
'''Simple module for extracting GNOME style doc comments from C
sources, so I can use them for other purposes.'''
import sys, os, string, re
# Used to tell if the "Since: ..." portion of the gtkdoc function description
# should be omitted. This is useful for some C++ modul... |
h2oai/h2o-3 | refs/heads/master | h2o-docs/src/booklets/v2_2015/source/Python_Vignette_code_examples/python_create_frame_from_ordered_dict.py | 6 | df = h2o.H2OFrame({'A': [1, 2, 3],'B': ['a', 'b', 'c'],'C': [0.1, 0.2, 0.3]})
# View the H2OFrame
df
# A C B
# --- --- ---
# 1 0.1 a
# 2 0.2 b
# 3 0.3 c
#
# [3 rows x 3 columns] |
SaschaMester/delicium | refs/heads/master | build/landmine_utils.py | 76 | # 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 functools
import logging
import os
import shlex
import sys
def memoize(default=None):
"""This decorator caches the return value of a parameterles... |
dpaiton/FeedbackLCA | refs/heads/main | utils/__init__.py | 4 | ## Copyright 2015 Yahoo Inc.
## Licensed under the terms of the New-BSD license. Please see LICENSE file in the project root for terms.
|
AdosH1/Python-Scripts | refs/heads/master | binary-to-num.py | 1 | #Binary to Number converter
# By Aden Huen
def bin2num(number):
invalid = False
l_num = list(str(number))
for i in range(0,len(l_num)):
if l_num[i] != '1' and l_num[i] != '0':
invalid = True
else:
pass
if invalid == False:
... |
rfancn/myprojects | refs/heads/master | srportal/spweb/workspace/urls.py | 1 | from django.conf.urls import patterns, include, url
import views as workspace_views
urlpatterns = patterns('',
url(r'^$', workspace_views.my_srque),
url(r'mysrque/$', workspace_views.my_srque),
url(r'fetch_my_srque/$', workspace_views.fetch_my_srque),
url(r'cmsrque/$', workspace_views.cm_srque),
u... |
jbcayrou/scapy | refs/heads/master | scapy/contrib/bgp.py | 6 | #! /usr/bin/env python
# http://trac.secdev.org/scapy/ticket/162
# scapy.contrib.description = BGP
# scapy.contrib.status = loads
from scapy.packet import *
from scapy.fields import *
from scapy.layers.inet import TCP
class BGPIPField(Field):
"""Represents how bgp dose an ip prefix in (length, prefix)"""
def ma... |
behzadnouri/scipy | refs/heads/master | scipy/interpolate/fitpack.py | 22 | #!/usr/bin/env python
"""
fitpack (dierckx in netlib) --- A Python-C wrapper to FITPACK (by P. Dierckx).
FITPACK is a collection of FORTRAN programs for curve and surface
fitting with splines and tensor product splines.
See
http://www.cs.kuleuven.ac.be/cwis/research/nalag/research/topics/fitpack.html
... |
piscesfantasy/SocialNetworkSearchEngine | refs/heads/master | Twitter/oauthlib/oauth2/rfc6749/endpoints/token.py | 71 | # -*- coding: utf-8 -*-
"""
oauthlib.oauth2.rfc6749
~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for consuming and providing OAuth 2.0 RFC6749.
"""
from __future__ import absolute_import, unicode_literals
import logging
from oauthlib.common import Request
from .base import BaseEn... |
fayf/pyload | refs/heads/stable | module/lib/simplejson/__init__.py | 45 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... |
d1b/blockfinder | refs/heads/master | embedded_ipaddr/ipaddr.py | 3 | #!/usr/bin/python
#
# Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
#
# 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/LICE... |
jniediek/combinato | refs/heads/master | tools/common_dropfile.py | 1 | # JN 2016-06-01
"""
given dropfiles, create a common one (lines contained in all files)
"""
def common_dropfile(fnames):
sets = []
for fname in fnames:
with open(fname, 'r') as fid:
sets.append(set([l.strip() for l in fid.readlines()]))
return sorted(sets[0].intersection(*(sets[... |
fake-name/ReadableWebProxy | refs/heads/master | WebMirror/management/rss_parser_funcs/feed_parse_extractYamiTranslations.py | 1 | def extractYamiTranslations(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol or frag) or 'preview' in item['title'].lower():
return None
if 'Tensei Shoujo no Rirekisho' in item['tags']:
return buildReleaseMessageWithType(item, 'Tensei Shoujo no Rireki... |
timoschwarzer/blendworks | refs/heads/master | BlendWorks Server/python/Lib/ctypes/_endian.py | 99 | import sys
from ctypes import *
_array_type = type(Array)
def _other_endian(typ):
"""Return the type with the 'other' byte order. Simple types like
c_int and so on already have __ctype_be__ and __ctype_le__
attributes which contain the types, for more complicated types
arrays and structures are suppo... |
prezi/prezi-suds | refs/heads/master | suds/xsd/query.py | 203 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
wweiradio/django | refs/heads/master | tests/gis_tests/geoadmin/admin.py | 547 | from django.contrib.gis import admin
class UnmodifiableAdmin(admin.OSMGeoAdmin):
modifiable = False
|
Aureliu/keras | refs/heads/master | keras/datasets/mnist.py | 43 | # -*- coding: utf-8 -*-
import gzip
from .data_utils import get_file
from six.moves import cPickle
import sys
def load_data(path="mnist.pkl.gz"):
path = get_file(path, origin="https://s3.amazonaws.com/img-datasets/mnist.pkl.gz")
if path.endswith(".gz"):
f = gzip.open(path, 'rb')
else:
f =... |
fizxmike/qualApp | refs/heads/master | settings.py | 1 | # Django settings for qualPrep project.
PATH_TO_PROJECT = '/home/michael/git/qualSite/'
TEMPORARY_ROOT = PATH_TO_PROJECT + 'db.files/tmp/'
ROOT_URLCONF = 'qualSite.urls' #should be in the format (name of root folder).urls where root folder name is NOT qualApp
DEBUG = True
TEMPLATE_DEBUG = DEBUG
#CUSTOM SETTINGS
LOGI... |
disnesquick/ripley | refs/heads/master | scratch/py/backups/old/serialize.py | 3 | import struct
from abc import ABCMeta
def implements(interface):
""" Convienient function to handle the registration of the fact that a class
is an implementation of an interface.
"""
def inner(implementation):
interface.register(implementation)
return implementation
return inner
class PassByReference:
... |
muntasirsyed/intellij-community | refs/heads/master | python/testData/completion/classNameInDocstring.after.py | 48 | class MyClass:
pass
def f(x):
"""
@param x:
@type x: MyClass
""" |
eternity-group/eternity | refs/heads/master | qa/rpc-tests/txindex.py | 40 | #!/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.
#
# Test txindex generation and fetching
#
import time
from test_framework.test_framework import Bitcoin... |
szaghi/MaTiSSe | refs/heads/master | release/MaTiSSe-0.3.3/matisse/theme/note.py | 1 | #!/usr/bin/env python
"""
note.py, module definition of Note class.
"""
# modules loading
# standard library modules: these should be present in any recent python distribution
import re
# modules not in the standard library
from yattag import Doc
# MaTiSSe.py modules
from ..utils.source_editor import __source_editor__ ... |
c-abird/magnum.fe | refs/heads/master | site-packages/magnumfe/dolfin/expressions/__init__.py | 1 | """This module contains class for the generation of metric matrix
expressions needed for the stray-field transformation method."""
from __future__ import absolute_import
from magnumfe.dolfin.expressions.metric_matrix import *
__all__ = metric_matrix.__all__
|
gxben/linuxmag-authomatic | refs/heads/master | main.py | 2 | #!/usr/bin/env python2.7
import sys, os
import functools
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
import tornado.autoreload
from flask import Flask, render_template, request, url_for, redirect, session, make_response
from authomatic.adapters imp... |
malkavi/Flexget | refs/heads/develop | flexget/components/sites/utils.py | 3 | """ Common tools used by plugins implementing search plugin api
.. NOTE:: Try to avoid using or extending this file!
We have normalizers in way too many places as is ...
"""
import re
from unicodedata import normalize
def normalize_unicode(text):
if isinstance(text, str):
# Convert to combined form f... |
ikresoft/django-youtube-client | refs/heads/master | youtube_client/urls.py | 1 | from django.conf.urls import patterns, url
from views import *
urlpatterns = patterns('',
url(r'playlists/$', playlists, name="youtube-playlists"),
url(r'videos/(?P<playlist>.*)/$', videos, name="youtube-videos"),
) |
julien78910/CouchPotatoServer | refs/heads/develop | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/minhateca.py | 127 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
int_or_none,
parse_duration,
parse_filesize,
)
class MinhatecaIE(InfoExtractor):
_VALID_URL = r'https?://minhate... |
clumsy/intellij-community | refs/heads/master | python/testData/copyPaste/singleLine/Indent21.src.py | 332 | class C:
def foo(self):
<selection> x = 1</selection>
y = 2
|
JCA-Developpement/Odoo | refs/heads/master | addons/stock/procurement.py | 17 | # -*- 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... |
jlcarmic/producthunt_simulator | refs/heads/master | venv/lib/python2.7/site-packages/pip/status_codes.py | 1002 | from __future__ import absolute_import
SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
VIRTUALENV_NOT_FOUND = 3
PREVIOUS_BUILD_DIR_ERROR = 4
NO_MATCHES_FOUND = 23
|
sergio-incaser/bank-payment | refs/heads/8.0 | account_payment_blocking/model/account_invoice.py | 12 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Account Payment Blocking module for Odoo
# Copyright (C) 2014-2015 ACSONE SA/NV (http://acsone.eu)
# @author Adrien Peiffer <adrien.peiffer@acsone.eu>
#
# This program is free software: you can redis... |
Natim/sentry | refs/heads/master | src/sentry/plugins/sentry_useragents/__init__.py | 40 | """
sentry.plugins.sentry_useragents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
|
pombreda/swarming | refs/heads/master | appengine/components/third_party/webtest/app.py | 5 | # (c) 2005 Ian Bicking and contributors; written for Paste
# (http://pythonpaste.org)
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
"""
Routines for testing WSGI applications.
Most interesting is TestApp
"""
from __future__ import unicode_literals
import cgi
import fnmatch
imp... |
SUSE/azure-sdk-for-python | refs/heads/master | azure-mgmt-sql/azure/mgmt/sql/models/partner_info.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 ... |
refeed/coala-bears | refs/heads/master | tests/java/JavaPMDBearTest.py | 24 | from bears.java.JavaPMDBear import JavaPMDBear
from coalib.testing.LocalBearTestHelper import verify_local_bear
good_file = """
package hello;
class Hello {
public String myString;
/* Default Hello constructor */
public Hello(){
myString = "Hello";
}
/* Print string length */
public int test() {
... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/src/reportlab/graphics/testdrawings.py | 32 | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/testdrawings.py
__version__=''' $Id $ '''
__doc__="""Defines some standard drawings to use as test cases
This contains a nu... |
smanolloff/SublimeLinter3 | refs/heads/master | lint/__init__.py | 22 | # flake8: noqa
#
# lint.__init__
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ryan Hileman and Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
"""This module exports the linter classes and the highlight, linter, persist and util s... |
toumorokoshi/tornado-transmute | refs/heads/master | tornado_transmute/route_set.py | 3 | from .handler import convert_to_handler
from .url import url_spec
from transmute_core import default_context
import tornado.web
class RouteSet(object):
def __init__(self, context=default_context):
self._handler_by_path = {}
self._context = context
def add(self, func):
handler = conve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.