repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
bckwltn/SickRage
sickbeard/databases/failed_db.py
7
2480
# Author: Tyler Fenby <tylerfenby@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 L...
gpl-3.0
henkelis/sonospy
web2py/gluon/template.py
1
6038
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of web2py Web Framework (Copyrighted, 2007-2010). Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>. License: GPL v2 """ import re import os import cStringIO __all__ = ['parse', 'reindent', 'parse_template', 'render'] re_block = re.compile('...
gpl-3.0
Carmezim/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/operator_pd_full_test.py
39
2360
# Copyright 2016 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...
apache-2.0
stevenewey/django
tests/template_tests/test_response.py
38
14384
from __future__ import unicode_literals import pickle import time from datetime import datetime from django.conf import settings from django.template import Context, engines from django.template.response import ( ContentNotRenderedError, SimpleTemplateResponse, TemplateResponse, ) from django.test import ( Re...
bsd-3-clause
mmmikael/vlfeat
python/vlfeat/__init__.py
4
11472
import _vlfeat import numpy from quickshift import vl_quickseg,vl_quickvis def vl_sift( data, frames=numpy.zeros(1), octaves=-1, levels=-1, first_octave=0, peak_thresh=-1.0, edge_thresh=-1.0, norm_thresh=-1.0, magnif=-1.0, window_size=-1.0, orientations=False, verbose=0): """ Computes the...
gpl-2.0
sipsorcery/bitcoin
test/functional/wallet_createwallet.py
23
9799
#!/usr/bin/env python3 # Copyright (c) 2018-2020 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 createwallet arguments. """ from test_framework.address import key_to_p2wpkh from test_framework....
mit
PrasannaVenkadesh/portia
slyd/slyd/gitstorage/projects.py
15
8572
import json from os.path import splitext, split, join, sep from functools import wraps from twisted.internet.threads import deferToThread from twisted.internet.task import deferLater from twisted.internet.defer import inlineCallbacks from twisted.internet import reactor from slyd.projects import ProjectsManager from ...
bsd-3-clause
att-comdev/drydock
drydock_provisioner/drivers/node/maasdriver/models/interface.py
1
17193
# Copyright 2017 AT&T Intellectual Property. All other 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...
apache-2.0
darshanime/scrapy-tutorials
housing/housing/spiders/housing_spider.py
1
3358
from housing.items import HousingItemBuy from scrapy import Spider from scrapy.http.request import Request #To parse the JSON received import json class HousingSpider(Spider): name = "housing" allowed_domains = ["housing.com"] custom_settings = {'USER_AGENT' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10...
mit
umitproject/site-status
permission_backend_nonrel/utils.py
6
2462
from copy import copy from .models import UserPermissionList, GroupPermissionList def add_perm_to(obj, list_cls, filter): obj_list, created = list_cls.objects.get_or_create(**filter) obj_list.permission_list.append('%s.%s' % (obj.content_type.app_label,\ obj.cod...
agpl-3.0
moio/spacewalk
scripts/ncsu-rhntools/rhnstats/pysqlite.py
19
2654
# pysqlite.py - Interface to the SQLite database # Copyright (C) 2002 Hunter Matthews # # 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...
gpl-2.0
porglezomp/coda-oss
build/msvs.py
5
30072
#! /usr/bin/env python # encoding: utf-8 # Avalanche Studios 2009-2011 # Thomas Nagy 2011 """ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this...
lgpl-3.0
mujiansu/pip
tests/functional/test_install_reqs.py
21
8848
import os.path import textwrap import pytest from tests.lib import (pyversion, path_to_url, _create_test_package_with_subdirectory) from tests.lib.local_repos import local_checkout @pytest.mark.network def test_requirements_file(script): """ Test installing from a requirements file. ...
mit
wangzhe0417/guake
src-gtk3/guake/simplegladeapp.py
8
3215
# -*- coding: utf-8; -*- """ Copyright (C) 2007-2013 Guake authors 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 progra...
gpl-2.0
Zarokka/exaile
plugins/daapclient/__init__.py
1
25353
# Copyright (C) 2006-2007 Aren Olson # 2011 Brian Parma # # 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, or (at your option) # any later version. # # This p...
gpl-2.0
sdague/home-assistant
homeassistant/components/deutsche_bahn/sensor.py
7
3790
"""Support for information about the German train system.""" from datetime import timedelta import schiene import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity import homeassistant.util...
apache-2.0
hoatle/odoo
addons/pos_discount/discount.py
315
1468
# -*- 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...
agpl-3.0
Allow2CEO/browser-ios
brave/node_modules/bloom-filter-cpp/vendor/depot_tools/third_party/logilab/common/deprecation.py
92
7417
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
MineID/MineID
mineid/accounts/migrations/0004_auto__chg_field_user_username__add_unique_user_username.py
1
2015
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'User.username' db.alter_column(u'accounts_user', 'user...
gpl-3.0
xingyepei/edx-platform
common/djangoapps/third_party_auth/tests/testutil.py
8
9011
""" Utilities for writing third_party_auth tests. Used by Django and non-Django tests; must not have Django deps. """ from contextlib import contextmanager from django.conf import settings from django.contrib.auth.models import User from provider.oauth2.models import Client as OAuth2Client from provider import consta...
agpl-3.0
alrifqi/django
tests/utils_tests/test_archive.py
372
2386
import os import shutil import tempfile import unittest from django.utils._os import upath from django.utils.archive import Archive, extract TEST_DIR = os.path.join(os.path.dirname(upath(__file__)), 'archives') class ArchiveTester(object): archive = None def setUp(self): """ Create temporar...
bsd-3-clause
noahchense/upm
examples/python/zfm20.py
16
3047
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
mit
msarahan/bokeh
examples/plotting/file/color_sliders.py
4
4866
import colorsys import yaml from bokeh.io import vform from bokeh.models import ColumnDataSource, HoverTool, CustomJS, Slider from bokeh.plotting import Figure, hplot, output_file, show, curdoc from bokeh.themes import Theme # for plot 2: create colour spectrum of resolution N and brightness I, return as list of dec...
bsd-3-clause
omnirom/android_external_chromium-org
native_client_sdk/src/tools/tests/fix_deps_test.py
104
2807
#!/usr/bin/env python # Copyright (c) 2012 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 import sys import tempfile import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.d...
bsd-3-clause
gaojinhua/cocos2d-js
tools/tojs/genbindings.py
23
7081
#!/usr/bin/python # This script is used to generate luabinding glue codes. # Android ndk version must be ndk-r9b. import sys import os, os.path import shutil import ConfigParser import subprocess import re from contextlib import contextmanager def _check_ndk_root_env(): ''' Checking the environment NDK_ROOT, w...
mit
Hydrosys4/Master
selectedplanmod.py
1
31135
# -*- coding: utf-8 -*- """ selected plan utility """ from __future__ import print_function from __future__ import division from builtins import str from builtins import range from past.utils import old_div import logging import os import os.path import threading import string from datetime import datetime,d...
gpl-3.0
treejames/erpnext
erpnext/setup/page/setup_wizard/fixtures/industry_type.py
32
1044
from frappe import _ items = [ _('Accounting'), _('Advertising'), _('Aerospace'), _('Agriculture'), _('Airline'), _('Apparel & Accessories'), _('Automotive'), _('Banking'), _('Biotechnology'), _('Broadcasting'), _('Brokerage'), _('Chemical'), _('Computer'), _('Consulting'), _('Consumer Products'), _('Cosmetics'), _('D...
agpl-3.0
canavandl/bokeh
examples/glyphs/trail.py
33
4656
# -*- coding: utf-8 -*- from __future__ import print_function from math import sin, cos, atan2, sqrt, radians import numpy as np import scipy.ndimage as im from bokeh.document import Document from bokeh.embed import file_html from bokeh.resources import INLINE from bokeh.browserlib import view from bokeh.models.gl...
bsd-3-clause
Basvanstein/OWCK
test.py
1
5239
import time, sys, pdb import numpy as np from numpy import ones from numpy.random import rand from sklearn import cross_validation from sklearn.preprocessing import StandardScaler from sklearn.metrics import r2_score from deap import benchmarks from OWCK import OWCK, GaussianProcess_extra from pyDOE import lhs fro...
gpl-2.0
zwidny/graphite
src/render/utils/tools.py
1
122403
"""tools for utils.""" # -*- coding: utf-8 -*- from __future__ import absolute_import import math import random import re import time from datetime import datetime, timedelta from itertools import izip, imap from os import environ from events import models from utils import epoch from utils.logger import log from .gr...
bsd-3-clause
outofmem0ry/incubator-hawq
tools/bin/gppylib/operations/gpMigratorUtil.py
7
36051
#!/usr/bin/env python # 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 # "Li...
apache-2.0
redhat-openstack/glance_store
glance_store/_drivers/sheepdog.py
4
10959
# Copyright 2013 Taobao 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 a...
apache-2.0
matthiasbeyer/linux
tools/testing/kunit/kunit_kernel.py
16
6758
# SPDX-License-Identifier: GPL-2.0 # # Runs UML kernel, collects output, and handles errors. # # Copyright (C) 2019, Google LLC. # Author: Felix Guo <felixguoxiuping@gmail.com> # Author: Brendan Higgins <brendanhiggins@google.com> import logging import subprocess import os import shutil import signal from contextlib ...
gpl-2.0
JVenberg/PokemonGo-Bot-Desktop
pywin/Lib/whichdb.py
175
3379
# !/usr/bin/env python """Guess which db package to use to open a db file.""" import os import struct import sys try: import dbm _dbmerror = dbm.error except ImportError: dbm = None # just some sort of valid exception which might be raised in the # dbm test _dbmerror = IOError def whichdb(fil...
mit
dbckz/ansible
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
56
17916
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
gpl-3.0
saketkc/rna-seq-snakemake
configs/config_cluster.py
1
1171
CDNA = '/home/cmb-panasas2/skchoudh/genomes/hg19/kallisto/hg19' GENOMES_DIR='/home/cmb-panasas2/skchoudh/genomes' OUT_DIR = '/home/cmb-panasas2/skchoudh/HuR_results/human/rna_seq_star_hg38_annotated' SRC_DIR = '/home/cmb-panasas2/skchoudh/github_projects/clip_seq_pipeline/scripts' RAWDATA_DIR ='/home/cmb-06/as/skchoudh...
bsd-2-clause
YaraslauZhylko/gladiator
tests/test_validate_fn.py
2
2206
import pytest from gladiator.decorators import validate_fn from gladiator.validators import required, type_, gt, length user_dt = ( ('_id', required, type_(int), gt(0)), ('name', required, type_(str), length(5, 16))) client_dt = ( ('_id', required, type_(int), gt(0)), ('user_ids', type_(list), ...
bsd-3-clause
rajalokan/nova
nova/tests/unit/virt/libvirt/volume/test_gpfs.py
12
1302
# 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 # d...
apache-2.0
akretion/account-financial-tools
account_move_template/__init__.py
36
1124
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 - 2014 Agile Business Group sagl # (<http://www.agilebg.com>) # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it...
agpl-3.0
jeanlinux/calibre
src/calibre/ebooks/markdown/__init__.py
16
16189
""" Python Markdown =============== Python Markdown converts Markdown to HTML and can be used as a library or called from the command line. ## Basic usage as a module: import markdown html = markdown.markdown(your_text_string) See <http://packages.python.org/Markdown/> for more information and instructions ...
gpl-3.0
B-MOOC/edx-platform
common/djangoapps/student/migrations/0035_access_roles.py
50
19747
# -*- coding: utf-8 -*- from south.v2 import DataMigration import re from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys import InvalidKeyError import bson.son import logging from django.db.models.query_utils import Q from django.db.utils import IntegrityError from xmodule.modulestore import ...
agpl-3.0
sdgdsffdsfff/TeamTalk
win-client/3rdParty/src/json/scons-tools/targz.py
264
3055
"""tarball Tool-specific initialization for tarball. """ ## Commands to tackle a command based implementation: ##to unpack on the fly... ##gunzip < FILE.tar.gz | tar xvf - ##to pack on the fly... ##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz import os.path import SCons.Builder import SCons.Node.FS import SCons.Ut...
apache-2.0
sridevikoushik31/openstack
nova/api/openstack/compute/contrib/config_drive.py
25
3048
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
apache-2.0
J861449197/edx-platform
cms/djangoapps/contentstore/features/problem-editor.py
116
12757
# disable missing docstring # pylint: disable=missing-docstring import json from lettuce import world, step from nose.tools import assert_equal, assert_true # pylint: disable=no-name-in-module from common import type_in_codemirror, open_new_course from advanced_settings import change_value, ADVANCED_MODULES_KEY from ...
agpl-3.0
axinging/sky_engine
testing/legion/common_lib.py
23
1441
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Common library methods used by both coordinator and task machines.""" import argparse import logging import os import socket LOGGING_LEVELS = ['DEBUG', ...
bsd-3-clause
dremaker/imx6ul_linux
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
lmazuel/azure-sdk-for-python
azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py
1
1581
# 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 ...
mit
hjanime/VisTrails
vistrails/db/versions/v1_0_2/__init__.py
2
1965
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
declarativitydotnet/p2
tests/unitTests/scripts/aggregates.py
1
7500
# # * This file is distributed under the terms in the attached LICENSE file. # * If you do not find this file, copies can be found by writing to: # * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, # * Berkeley, CA, 94704. Attention: Intel License Inquiry. # * Or # * UC Berkeley EECS Computer Science Divis...
bsd-3-clause
koniiiik/django
tests/i18n/sampleproject/update_catalogs.py
344
1780
#!/usr/bin/env python """ Helper script to update sampleproject's translation catalogs. When a bug has been identified related to i18n, this helps capture the issue by using catalogs created from management commands. Example: The string "Two %% Three %%%" renders differently using trans and blocktrans. This issue i...
bsd-3-clause
MobleyLab/Lomap
example_radial_graph.py
2
1098
# Import lomap import lomap import sys import networkx as nx # Create the molecule database by using .mol2 files # The DBMolecule class must be created with a valid # directory name db_mol = lomap.DBMolecules('test/radial/', output=True, radial=True ) #use the radial option with hub ligand set as #db_mol = l...
mit
BenSto/pybikes
pybikes/encicla.py
4
2610
# -*- coding: utf-8 -*- # Copyright (C) 2015, Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com> # Distributed under the AGPL license, see LICENSE.txt import json from .base import BikeShareSystem, BikeShareStation from . import utils, exceptions __all__ = ['Encicla', 'EnciclaStation'] class Encicla(BikeShareS...
lgpl-3.0
chugle/myapp
gluon/contrib/pg8000/interface.py
24
26305
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
gpl-2.0
romain-li/edx-platform
common/djangoapps/enrollment/errors.py
75
1335
"""All Error Types pertaining to Enrollment.""" class CourseEnrollmentError(Exception): """Generic Course Enrollment Error. Describes any error that may occur when reading or updating enrollment information for a user or a course. """ def __init__(self, msg, data=None): super(CourseEnrollmen...
agpl-3.0
LaurentClaessens/mazhe
lst_book.py
1
1277
from pytex.src import PytexTools import commons import plugins_agreg myRequest = PytexTools.Request("mesure") myRequest.ok_hash = commons.ok_hash myRequest.original_filename = "mazhe.tex" # L'ordre dans les plugin est important parce que set_isFrido retourne # un code latex sans les commentaires # alors que keep_scri...
gpl-3.0
Yukarumya/Yukarum-Redfoxes
media/webrtc/trunk/tools/gyp/test/configurations/target_platform/gyptest-target_platform.py
351
1112
#!/usr/bin/env python # Copyright (c) 2009 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. """ Tests the msvs specific msvs_target_platform option. """ import TestGyp import TestCommon def RunX64(exe, stdout): try: test.ru...
mpl-2.0
blankenberg/bioconda-recipes
recipes/searchgui/searchgui.py
1
3632
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
mit
hep-cce/hpc-edge-service
argo/html_forms.py
1
1528
from __future__ import absolute_import, unicode_literals import copy from itertools import chain import warnings #from django.conf import settings #from django.forms.util import flatatt, to_current_timezone #from django.utils.datastructures import MultiValueDict, MergeDict #from django.utils.html import conditional_...
bsd-3-clause
zielmicha/sandboxd
sandbox_d.py
1
2614
#!/usr/bin/env python2.7 # Copyright (c) 2013-2014 Michal Zielinski <michal@zielinscy.org.pl> # Copyright (c) 2015 Husarion Sp. z o.o. # # 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...
mit
jpwarren/holideck
cherrypy/tutorial/tut03_get_and_post.py
36
1733
""" Tutorial - Passing variables This tutorial shows you how to pass GET/POST variables to methods. """ import cherrypy class WelcomePage: def index(self): # Ask for the user's name. return ''' <form action="greetUser" method="GET"> What is your name? <input ...
mit
dcroc16/skunk_works
google_appengine/lib/django-1.5/django/core/cache/__init__.py
98
5086
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
mit
edulramirez/nova
nova/tests/unit/objects/test_aggregate.py
34
7745
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
sshnaidm/ru
plugin.video.serialonline.net/default.py
2
14648
#!/usr/bin/python # -*- coding: utf-8 -*- import httplib import urllib import urllib2 import re import sys import os import Cookie import platform import xbmcplugin import xbmcgui import xbmcaddon import xbmc import xbmcaddon import httplib import re try: from hashlib import md5 except: from md5 import md5 ...
gpl-2.0
toddeye/home-assistant
homeassistant/components/switch/command_switch.py
6
4171
""" homeassistant.components.switch.command_switch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allows to configure custom shell commands to turn a switch on/off. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.command_switch/ """ import logging ...
mit
rayluo/boto
tests/integration/ec2/autoscale/test_cert_verification.py
126
1575
# 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...
mit
40223139/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/collections/abc.py
739
16026
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. """ from abc import ABCMeta, abstractmethod import sys __all__ = ["Hashable", "Iterable", "Iterator", ...
gpl-3.0
srossross/uvio
docs/conf.py
1
9584
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # uvio documentation build configuration file, created by # sphinx-quickstart on Sun Mar 20 17:54:35 2016. # # 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 # autog...
mit
psachin/apc-rock-II-kernel
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
onitake/ansible
lib/ansible/modules/network/voss/voss_config.py
11
17136
#!/usr/bin/python # Copyright: (c) 2018, Extreme 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status':...
gpl-3.0
ahmetabdi/SickRage
lib/unidecode/x050.py
252
4682
data = ( 'Chang ', # 0x00 'Chi ', # 0x01 'Bing ', # 0x02 'Zan ', # 0x03 'Yao ', # 0x04 'Cui ', # 0x05 'Lia ', # 0x06 'Wan ', # 0x07 'Lai ', # 0x08 'Cang ', # 0x09 'Zong ', # 0x0a 'Ge ', # 0x0b 'Guan ', # 0x0c 'Bei ', # 0x0d 'Tian ', # 0x0e 'Shu ', # 0x0f 'Shu ', # 0x10...
gpl-3.0
pandeyadarsh/sympy
examples/intermediate/infinite_1d_box.py
116
2911
#!/usr/bin/env python """ Applying perturbation theory to calculate the ground state energy of the infinite 1D box of width ``a`` with a perturbation which is linear in ``x``, up to second order in perturbation """ from sympy.core import pi from sympy import Integral, var, S from sympy.functions import sin, sqrt de...
bsd-3-clause
apache/incubator-singa
python/singa/tensor.py
1
44524
# 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...
apache-2.0
jessest/hugo-foundation-sass
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
1569
23354
#!/usr/bin/env python # 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. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
mit
pleaseproject/python-for-android
python3-alpha/extra_modules/gdata/media/data.py
132
3803
#!/usr/bin/python # # Copyright (C) 2009 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 ...
apache-2.0
florian-dacosta/OpenUpgrade
addons/portal_project/project.py
103
1769
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
willingc/oh-mainline
vendor/packages/sphinx/sphinx/util/texescape.py
16
2844
# -*- coding: utf-8 -*- """ sphinx.util.texescape ~~~~~~~~~~~~~~~~~~~~~ TeX escaping helper. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ tex_replacements = [ # map TeX special chars (u'$', ur'\$'), (u'%', ur'\%'), (u...
agpl-3.0
podemos-info/odoo
addons/fetchmail_crm_claim/__init__.py
36
1069
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP S.A. (<http://www.openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
credp/lisa
external/workload-automation/wa/workloads/rt_app/__init__.py
3
12212
# Copyright 2015-2018 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...
apache-2.0
styxit/CouchPotatoServer
libs/pyutil/scripts/passphrase.py
92
2747
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse, math, random from pyutil.mathutil import div_ceil from pkg_resources import resource_stream def recursive_subset_sum(entropy_needed, wordlists): # Pick a minimalish set of numbers which sum to at least # entropy_needed. # Okay now what's th...
gpl-3.0
hai8108/infer
infer/lib/capture/buck.py
19
2803
# Copyright (c) 2015 - present Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import argparse import ...
bsd-3-clause
ppiotr/Invenio
modules/websearch/lib/websearch_webinterface.py
2
48072
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 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, or (at your ...
gpl-2.0
suqinhuang/avocado-vt
examples/tests/service.py
8
2606
""" Simple service handling test Please put the configuration file service.cfg into $tests/cfg/ directory. :difficulty: advanced :copyright: 2014 Red Hat Inc. """ import logging import time from avocado.utils import process from avocado.core import exceptions from avocado.utils.service import SpecificServiceManager ...
gpl-2.0
afable/HealthyTweets
src/TweetDict.py
1
2645
""" TweetDict class containts tweet data in a dictionary. """ import json class TweetDict: tweets = [] ## a list of dictionaries containing the tweet data jsondata = [] ## a list for the data ['created_at', 'full_name', 'country', 'text'] mapdata = [] ## a list for the final parsed data to be mapped created_at =...
lgpl-3.0
mmnelemane/neutron
neutron/tests/unit/ipam/test_requests.py
23
15679
# 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 # d...
apache-2.0
djnugent/nuge_utils
cv_utils/threader.py
2
1649
import threading import sys import traceback class Threader(threading.Thread): active_threads = [] #create the thread def __init__(self, target, args, iterations = 1): threading.Thread.__init__(self) self.target = target self.args = args self.iterations = iterations ...
lgpl-3.0
stankovski/AutoRest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py
2
1130
# 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 ...
mit
lucarebuffi/wofrysrw
wofrysrw/beamline/optical_elements/mirrors/srw_plane_mirror.py
1
3621
from wofrysrw.beamline.optical_elements.mirrors.srw_mirror import SRWMirror, Orientation, SimulationMethod, TreatInputOutput from syned.beamline.shape import Plane from oasys_srw.srwlib import SRWLOptMirPl class SRWPlaneMirror(SRWMirror): def __init__(self, name = "U...
mit
pyspace/test
pySPACE/missions/nodes/sink/ssnr_sink.py
2
5690
""" Sink-Node for the Signal-to-Signal-Plus-Noise Ratio. """ from copy import copy, deepcopy import numpy from pySPACE.missions.nodes.base_node import BaseNode from pySPACE.missions.nodes.spatial_filtering.xdawn import SSNR from pySPACE.resources.dataset_defs.metric import BinaryClassificationDataset class SSNRSin...
gpl-3.0
walterbender/turtleart
TurtleArt/tasprite_factory.py
2
57769
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2009-12 Walter Bender # 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 rig...
mit
jsm28/matholymp-py
matholymp/docgen.py
1
42473
# Document generation for matholymp package. # Copyright 2014-2021 Joseph Samuel Myers. # 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) a...
gpl-3.0
40223139/LEGOg7-39
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
66279
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
agpl-3.0
Micronaet/micronaet-contract
contract_manage/contract.py
1
56964
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This prog...
agpl-3.0
lsqtongxin/django
django/db/models/sql/compiler.py
32
50745
import re import warnings from itertools import chain from django.core.exceptions import FieldError from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import OrderBy, Random, RawSQL, Ref from django.db.models.query_utils import QueryWrapper, select_related_descend from django.db.models...
bsd-3-clause
josesanch/django-oscar
src/oscar/apps/catalogue/reviews/south_migrations/0003_auto__chg_field_productreview_name__chg_field_productreview_homepage__.py
8
17450
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'ProductReview.name' ...
bsd-3-clause
ferittuncer/ITU-Turkish-NLP-Pipeline-Caller
tests_pipeline_caller.py
1
1971
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import re import subprocess import sys import unittest from pipeline_caller import PipelineCaller, get_token KATANA = 'Katana\'yı saklarız, dedi Ramiz, ben giderim bahçeye, tüm yeşil erikleri toplar gelirim, sonra da erikleri komşuya götürür, ondan Katana\'yı ele ...
gpl-2.0
unindented/streamcode
client/static/jsrepl/extern/python/closured/lib/python2.7/code.py
256
10189
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] def ...
mit
tquilian/exeNext
exe/webui/mathblock.py
15
3048
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # # 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 versio...
gpl-2.0
coderabhishek/scrapy
scrapy/utils/defer.py
61
3554
""" Helper functions for dealing with Twisted deferreds """ from twisted.internet import defer, reactor, task from twisted.python import failure from scrapy.exceptions import IgnoreRequest def defer_fail(_failure): """Same as twisted.internet.defer.fail but delay calling errback until next reactor loop ...
bsd-3-clause
kevaughan/project4
server/lib/werkzeug/security.py
302
8407
# -*- coding: utf-8 -*- """ werkzeug.security ~~~~~~~~~~~~~~~~~ Security related helpers such as secure password hashing tools. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import hmac import hashlib import posi...
apache-2.0
jelmer/samba
third_party/dnspython/dns/set.py
99
7842
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0