repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
tdtrask/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/swupd.py
49
#!/usr/bin/python # (c) 2017, Alberto Murillo <alberto.murillo.silva@intel.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
detiber/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam3/ham/bacon.py
298
data = 'spam3'
f-u-n/playtime
refs/heads/master
count_the_ones/g3wanghc/count_ones.py
2
def countTheOnes (number): return len(list(filter(lambda n: n == '1', str(number)))) print(countTheOnes(467)) print(countTheOnes(81511)) print(countTheOnes(123))
aronsky/home-assistant
refs/heads/dev
homeassistant/scripts/credstash.py
7
"""Script to get, put and delete secrets stored in credstash.""" import argparse import getpass from homeassistant.util.yaml import _SECRET_NAMESPACE REQUIREMENTS = ['credstash==1.14.0', 'botocore==1.7.34'] def run(args): """Handle credstash script.""" parser = argparse.ArgumentParser( description=(...
mailhexu/pyDFTutils
refs/heads/master
build/lib/pyDFTutils/abinit/abinit.py
2
#!/usr/bin/env abinit """ abinit calculator helper functions. Set default values for the calculations. See also ase.calculator.abinit, ase_utils.myabinit """ from ase.units import eV, Ha, Bohr from ase_utils.myabinit import Abinit from ase.data import atomic_masses, atomic_numbers, chemical_symbols, atomic_masses from ...
jymannob/CouchPotatoServer
refs/heads/develop
libs/rsa/__init__.py
111
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
Workday/OpenFrame
refs/heads/master
tools/telemetry/telemetry/web_perf/metrics/gpu_timeline.py
15
# 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. import collections import math import sys from telemetry.timeline import model as model_module from telemetry.value import improvement_direction from telemet...
xkmato/casepro
refs/heads/master
casepro/cases/migrations/0028_case_initial_message.py
1
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from django.db import migrations, models def populate_initial_message(apps, schema_editor): Message = apps.get_model('msgs', 'Message') Case = apps.get_model('cases', 'Case') cases = list(Case.objects.all()) num_missing ...
beatrizjesus/my-first-blog
refs/heads/master
pasta/Lib/site-packages/pip/_vendor/colorama/__init__.py
445
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from .initialise import init, deinit, reinit from .ansi import Fore, Back, Style, Cursor from .ansitowin32 import AnsiToWin32 __version__ = '0.3.3'
jeffery9/mixprint_addons
refs/heads/master
l10n_fr/report/__init__.py
15
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
crobby/sahara
refs/heads/master
sahara/utils/edp.py
3
# Copyright (c) 2014 Red Hat 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 agreed to in writi...
knabar/openmicroscopy
refs/heads/develop
components/tools/OmeroPy/test/unit/clitest/test_download.py
15
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 University of Dundee & Open Microscopy Environment. # All rights reserved. # # 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;...
ray-zhong/github_trend_spider
refs/heads/master
ENV/Lib/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1776
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
thurday/sslyze
refs/heads/master
setup.py
5
#!/usr/bin/env python from sys import platform from sslyze import PROJECT_VERSION, PROJECT_URL, PROJECT_EMAIL, PROJECT_DESC from distutils.core import setup NASSL_BINARY = '_nassl.so' if platform == 'win32': NASSL_BINARY = '_nassl.pyd' SSLYZE_SETUP = { 'name' : 'SSLyze', 'version' : PROJECT_VERSION, ...
alisaifee/AutobahnPython
refs/heads/master
examples/twisted/websocket/echo_variants/client_with_params.py
18
############################################################################### ## ## Copyright (C) 2011-2013 Tavendo GmbH ## ## 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 ## ## h...
thebestgirl123/CloudBot
refs/heads/gonzobot
cloudbot/permissions.py
32
from fnmatch import fnmatch import logging logger = logging.getLogger("cloudbot") # put your hostmask here for magic # it's disabled by default, see has_perm_mask() backdoor = None class PermissionManager(object): """ :type name: str :type config: dict[str, ?] :type group_perms: dict[str, list[str]]...
js0701/chromium-crosswalk
refs/heads/master
tools/ipc_fuzzer/scripts/utils.py
38
#!/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. """Utility functions used by Generational and Mutational ClusterFuzz fuzzers.""" import argparse import os import random import string...
echodaemon/Empire
refs/heads/master
lib/modules/powershell/privesc/powerup/service_exe_stager.py
10
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Install-ServiceBinary', 'Author': ['@harmj0y'], 'Description': ("Backs up a service's binary and replaces the original " "with a b...
woshilapin/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/defines/gyptest-defines-env.py
501
#!/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. """ Verifies build of an executable with C++ define specified by a gyp define. """ import os import TestGyp test = TestGyp.TestGyp() # Wi...
glemaitre/protoclass
refs/heads/master
protoclass/extraction/mrsi_spectra_extraction.py
1
"""MRSI spectra extraction from MRSI modality.""" from __future__ import division import numpy as np from scipy.linalg import norm as lnorm from .mrsi_extraction import MRSIExtraction KNOWN_NORMALIZATION = ('l2', 'l1') class MRSISpectraExtraction(MRSIExtraction): """MRSI spectra extraction from MRSI modality...
armando-migliaccio/tempest
refs/heads/master
tempest/services/compute/xml/security_groups_client.py
6
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 IBM Corp. # 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/lice...
beckastar/django
refs/heads/master
django/contrib/gis/db/models/sql/where.py
70
from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sql.where import Constraint, WhereNode from django.contrib.gis.db.models.fields import GeometryField class GeoConstraint(Constraint): ...
curiousguy13/shogun
refs/heads/develop
examples/undocumented/python_modular/tools/generate_circle_data.py
36
from numpy import * import numpy as np import sys import math as m class circle_data: def __init__(self): pass def generate_data(self,number_of_points_for_circle1,number_of_points_for_circle2,row_vector): """ generate_circle_data generates a dataset in the shape of 2 circles.In this particular example we hav...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/unidecode/x077.py
252
data = ( 'Ming ', # 0x00 'Sheng ', # 0x01 'Shi ', # 0x02 'Yun ', # 0x03 'Mian ', # 0x04 'Pan ', # 0x05 'Fang ', # 0x06 'Miao ', # 0x07 'Dan ', # 0x08 'Mei ', # 0x09 'Mao ', # 0x0a 'Kan ', # 0x0b 'Xian ', # 0x0c 'Ou ', # 0x0d 'Shi ', # 0x0e 'Yang ', # 0x0f 'Zheng ', # 0...
AlexStarov/Shop
refs/heads/master
applications/cart/migrations/0005_auto_20170107_2248.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cart', '0004_auto_20170102_2258'), ] operations = [ migrations.AddField( model_name='order', name='c...
IRI-Research/django-templatetag-sugar
refs/heads/master
templatetag_sugar/__init__.py
17
__version__ = "1.0.1"
tkingless/webtesting
refs/heads/master
venvs/dev/lib/python2.7/site-packages/setuptools/command/rotate.py
389
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools.extern import six from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, kee...
shliujing/shadowsocks
refs/heads/master
shadowsocks/encrypt.py
4
#!/usr/bin/env python # Copyright (c) 2014 clowwindy # # 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 rights # to use, copy, modify, me...
2013Commons/HUE-SHARK
refs/heads/master
desktop/core/ext-py/Django-1.2.3/build/lib.linux-i686-2.7/django/contrib/localflavor/id/id_choices.py
65
from django.utils.translation import ugettext_lazy as _ # Reference: http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia # Indonesia does not have an official Province code standard. # I decided to use unambiguous and consistent (some are common) 3-letter codes. PROVINCE_CHOICES = ( ('BLI', _('Bali')), ('...
beiko-lab/gengis
refs/heads/master
bin/Lib/test/sortperf.py
14
"""Sort performance test. See main() for command line syntax. See tabulate() for output format. """ import sys import time import random import marshal import tempfile import os td = tempfile.gettempdir() def randfloats(n): """Return a list of n random floats in [0, 1).""" # Generating fl...
pabloborrego93/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py
86
"""Tests running the delete_orphan command""" import ddt from django.core.management import call_command, CommandError from contentstore.tests.test_orphan import TestOrphanBase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore import ModuleStoreEnum @ddt.ddt class TestDeleteOrph...
justinpotts/mozillians
refs/heads/master
vendor-local/lib/python/unidecode/x024.py
118
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
mikelarre/odoomrp-wip-1
refs/heads/8.0
mrp_machine_manager/__init__.py
18
# -*- encoding: utf-8 -*- ############################################################################## # # Daniel Campos (danielcampos@avanzosc.es) Date: 08/09/2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publi...
rochoa85/pyMIC
refs/heads/master
examples/data_map/data_map.py
1
#!/usr/bin/python # Copyright (c) 2014, Intel Corporation All rights reserved. # # 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, th...
Coder-Yu/RecQ
refs/heads/master
baseclass/SocialRecommender.py
2
from baseclass.IterativeRecommender import IterativeRecommender from data.social import SocialDAO from tool import config from os.path import abspath class SocialRecommender(IterativeRecommender): def __init__(self,conf,trainingSet,testSet,relation,fold='[1]'): super(SocialRecommender, self).__init__(conf,t...
mattjmcnaughton/sdep
refs/heads/master
tests/test_config.py
1
""" Tests for the `config`. """ # pylint: disable=import-error import os import shutil import tempfile import unittest import uuid from collections import namedtuple import simplejson as json from mock import patch from sdep.config import Config, ConfigParseError class ConfigTestCase(unittest.TestCase): """ ...
spnow/grr
refs/heads/master
gui/plugins/wizards.py
2
#!/usr/bin/env python """Implementation of an interactive wizard widget.""" from grr.gui import renderers from grr.gui.plugins import forms from grr.lib import aff4 from grr.lib import rdfvalue class WizardRenderer(renderers.TemplateRenderer): """This renderer creates a wizard.""" current_page = 0 # WizardPag...
engineer0x47/SCONS
refs/heads/master
engine/SCons/Tool/aixcc.py
2
"""SCons.Tool.aixcc Tool-specific initialization for IBM xlc / Visual Age C compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereb...
pierotofy/OpenDroneMap
refs/heads/master
opendm/system.py
2
import os import errno import json import datetime import sys import subprocess import string import signal from opendm import context from opendm import log def get_ccd_widths(): """Return the CCD Width of the camera listed in the JSON defs file.""" with open(context.ccd_widths_path) as f: sensor_da...
resmo/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/tower.py
38
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Ansible Tower documentation fragment DOCUMENTATION = r''' options: tower_host: descr...
iDTLabssl/account-financial-tools
refs/heads/8.0
account_auto_fy_sequence/__openerp__.py
18
# coding=utf-8 ############################################################################## # # account_auto_fy_sequence module for Odoo # Copyright (C) 2014 ACSONE SA/NV (<http://acsone.eu>) # @author Stéphane Bidoul <stephane.bidoul@acsone.eu> # # account_auto_fy_sequence is free software: # you can ...
0sc0d3r/enigma2
refs/heads/master
lib/python/Components/ConfigList.py
13
from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS, config, configfile, ConfigElement, ConfigText, ConfigPassword from Components.ActionMap im...
cderwin/maps
refs/heads/master
api/util/mapping.py
1
from math import sin, cos, asin, sqrt, radians class Point(object): def __init__(self, lat, lon, unit='deg'): self.lat = float(lat) self.lon = float(lon) self.unit = unit def __getitem__(self, key): if key.lower() in ('lat', 'latitude'): return self.lat if ...
nicwest/scudcloud
refs/heads/master
scudcloud-1.0/lib/resources.py
7
import os, re class Resources: APP_NAME = "ScudCloud Slack_SSB" SIGNIN_URL = "https://slack.com/signin" MAINPAGE_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.slack.com/?$') MESSAGES_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.slack.com/messages/.*') SSO_URL_RE = re.compile(r'^http[s]://[a...
xen0l/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_vpn_connection.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, René Moser <mail@renemoser.net> # 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': ...
JuliBakagianni/CEF-ELRC
refs/heads/master
lib/python2.7/site-packages/unidecode/x01d.py
240
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
zak-k/iris
refs/heads/master
lib/iris/tests/experimental/test_raster.py
7
# (C) British Crown Copyright 2014 - 2016, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
mozaik-association/mozaik
refs/heads/8.0
odoo_addons/mozaik_address/tests/__init__.py
2
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of mozaik_address, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # mozaik_address is free software: # you can redistribute it and/or # modify it u...
harshilasu/LinkurApp
refs/heads/master
y/google-cloud-sdk/.install/.backup/lib/requests/packages/chardet/utf8prober.py
2918
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
Kamik423/uni_plan
refs/heads/master
plan/plan/lib64/python3.4/site-packages/setuptools/command/py36compat.py
286
import os from glob import glob from distutils.util import convert_path from distutils.command import sdist from setuptools.extern.six.moves import filter class sdist_add_defaults: """ Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. Do not edit the code ...
zitouni/gnuradio-3.6.1
refs/heads/master
gr-wxgui/src/python/plotter/channel_plotter.py
14
# # Copyright 2008, 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later ...
krintoxi/NoobSec-Toolkit
refs/heads/master
NoobSecToolkit /tools/inject/thirdparty/beautifulsoup/beautifulsoup.py
25
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
qbektrix/pyglet
refs/heads/master
experimental/buffer/test_image.py
28
#!/usr/bin/python # $Id:$ from pyglet.gl import * from pyglet import graphics from pyglet import image from pyglet import window win = window.Window() kitten = image.load('examples/programming_guide/kitten.jpg').texture batch = graphics.Batch() t = kitten.tex_coords w = kitten.width h = kitten.height batch.add(4, G...
johnservinis/node-gyp
refs/heads/master
gyp/gyptest.py
80
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner: "...
MadsJensen/RP_scripts
refs/heads/master
extract_ts_epochs.py
1
import sys import numpy as np import mne from mne.minimum_norm import read_inverse_operator, apply_inverse_epochs from my_settings import (mne_folder, epochs_folder, source_folder, conditions) subject = sys.argv[1] method = "dSPM" snr = 3. lambda2 = 1. / snr**2 # labels = mne.read_labels_from_annot( # subject=s...
trevstanhope/row-assist
refs/heads/master
libs/python-phidget/Phidgets/Devices/PHSensor.py
11
"""Copyright 2012 Phidgets Inc. This work is licensed under the Creative Commons Attribution 2.5 Canada License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/ """ __author__ = 'Adam Stelmack' __version__ = '2.1.8' __date__ = 'May 17 2010' import threading from ctypes ...
kingvuplus/b-p
refs/heads/master
lib/python/Plugins/Extensions/PicturePlayer/ui.py
17
from enigma import ePicLoad, eTimer, getDesktop, gMainDC, eSize from Screens.Screen import Screen from Tools.Directories import resolveFilename, pathExists, SCOPE_MEDIA, SCOPE_CURRENT_SKIN from Components.Pixmap import Pixmap, MovingPixmap from Components.ActionMap import ActionMap, NumberActionMap from Components.So...
pwarren/AGDeviceControl
refs/heads/master
agdevicecontrol/thirdparty/site-packages/linux2/twisted/protocols/gps/rockwell.py
3
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Rockwell Semiconductor Zodiac Serial Protocol Coded from official protocol specs (Order No. GPS-25, 09/24/1996, Revision 11) Maintainer: U{Bob Ippolito<mailto:bob@redivi.com>} The following Rockwell Zodiac messages are currently u...
karanisverma/feature_langpop
refs/heads/master
librarian/lib/confloader.py
2
""" confloader.py: Application configuration loader Copyright 2014-2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ import os import re try: from configparser ...
sbrunner/QGIS
refs/heads/master
tests/src/python/test_qgsnewgeopackagelayerdialog.py
19
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsNewGeoPackageLayerDialog .. 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 ver...
adrianlee/rcon-cs
refs/heads/master
rconsoft/util/classinstance.py
62
# (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 class classinstancemethod(object): """ Acts like a class method when called from a class, like an instance method when called by an instan...
cloudbase/cinder
refs/heads/master
cinder/volume/drivers/infortrend/raidcmd_cli/common_cli.py
5
# Copyright (c) 2015 Infortrend Technology, 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 # # ...
w1ll1am23/home-assistant
refs/heads/dev
homeassistant/components/water_heater/group.py
12
"""Describe group states.""" from homeassistant.components.group import GroupIntegrationRegistry from homeassistant.const import STATE_OFF from homeassistant.core import callback from homeassistant.helpers.typing import HomeAssistantType from . import ( STATE_ECO, STATE_ELECTRIC, STATE_GAS, STATE_HEA...
NYCPython/irclogs
refs/heads/master
manage.py
1
from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.script import Manager from irclogs.core import create_app, db from irclogs.views import frontend app = create_app() manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager....
bobisme/odoo
refs/heads/sp-8.0
addons/account/res_currency.py
340
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
tchernomax/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_pkiprofile.py
20
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/refactoring/unwrap/elseInIfUnwrap_after.py
83
z = 3
intrack/BoofCV-master
refs/heads/master
main/geo/generate/python/P3PFinsterwalder.py
2
# One type-o was found in this section of the paper. Validating other equations in an attempt to hunt down problems from sage.all import * from utilsymbolic import * (A,B,C,D,E,F)=var('A,B,C,D,E,F') (l,cos23,cos12,cos13)=var('l,cos23,cos12,cos13') (a,b,c)=var('a,b,c') # Validating equation (14) eq = C*(A*F - D**2...
DefyVentures/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py
182
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'PaidCourseRegistration.mode' db.add_column('shoppingcart_paidcourseregistration', 'mode', ...
crooks/mixminion
refs/heads/master
lib/mixminion/server/ServerQueue.py
1
# Copyright 2002-2011 Nick Mathewson. See LICENSE for licensing information. """mixminion.server.ServerQueue Facilities for retriable delivery queues, and for mix pools. """ import cPickle import logging import math import os import operator import time import stat import sys import threading import mixminio...
lakshayg/tensorflow
refs/heads/master
tensorflow/python/ops/linalg_grad.py
6
# 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...
espadrine/opera
refs/heads/master
chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hixie75.py
681
# Copyright 2011, 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 of conditions and the f...
alanjw/GreenOpenERP-Win-X86
refs/heads/7.0
python/Lib/site-packages/reportlab/pdfgen/pycanvas.py
3
# a Pythonesque Canvas v0.8 # Author : Jerome Alet - <alet@librelogiciel.com> # License : ReportLab's license # # $Id: pycanvas.py 3777 2010-09-15 15:15:46Z rgbecker $ # __doc__ = """A contributed Canvas class which can also output Python source code to "replay" operations later pycanvas.Canvas class works exa...
Francis-Liu/animated-broccoli
refs/heads/master
nova/tests/unit/fake_pci_device_pools.py
83
# Copyright 2014 IBM Corp. # 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 app...
Pablo126/SSBW
refs/heads/master
Entrega1/lib/python3.5/site-packages/mongoengine/signals.py
7
__all__ = ('pre_init', 'post_init', 'pre_save', 'pre_save_post_validation', 'post_save', 'pre_delete', 'post_delete') signals_available = False try: from blinker import Namespace signals_available = True except ImportError: class Namespace(object): def signal(self, name, doc=None): ...
jmacmahon/invenio
refs/heads/elasticsearch_logging
modules/bibsort/lib/bibsortadminlib.py
3
# This file is part of Invenio. # Copyright (C) 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 option) any later version. # # Inveni...
0k/OpenUpgrade
refs/heads/8.0
addons/account_asset/report/__init__.py
445
# -*- 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...
galad-loth/LearnDescriptor
refs/heads/master
patchmatch/feat_net.py
1
# -*- codingL utf-8-*- """ Created on Tue Sep 25 11:28:35 2018 @author: galad-loth """ import mxnet as mx def featnet1(data, conv_weight, conv_bias, name_prefix): """ Convolutional feature network used for patch descriptor learning. For the case of weight shareing in Siamse/Triplet structure, ...
ntt-sic/neutron
refs/heads/master
neutron/plugins/mlnx/common/__init__.py
139
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, Ltd # # 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 # #...
bfrgoncalves/Online-PhyloViZ
refs/heads/master
node_modules/l/node_modules/hook.io/node_modules/npm/node_modules/node-gyp/gyp/test/same-gyp-name/gyptest-default.py
318
#!/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. """ Build a .gyp that depends on 2 gyp files with the same name. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('all.gyp', chdi...
edensparkles/FIRSTAID
refs/heads/master
FIRST_AID/venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py
514
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import try: from http.client import HTTPSConnection except ImportError: from httplib import HTTPSConnection from logging import getLogger from nt...
stevenewey/django
refs/heads/master
tests/urlpatterns_reverse/included_urls.py
452
from django.conf.urls import url from .views import empty_view urlpatterns = [ url(r'^$', empty_view, name="inner-nothing"), url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"), url(r'^(?P<one>[0-9]+)|(?P<two>[0-9]+)/$', empty_view, name="inner-disjunction"), ]
eduardocereto/pyboleto
refs/heads/master
pyboleto/django/views.py
6027
# Create your views here.
OPM/opm-common
refs/heads/master
python/pybind11/pybind11/_version.py
10
version_info = (2, 3, 0) __version__ = '.'.join(map(str, version_info))
brendandahl/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/testdata/handlers/sub/wrong_transfer_sig_wsh.py
499
# Copyright 2009, 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 of conditions and the f...
bastimeyer/streamlink
refs/heads/master
src/streamlink/plugin/api/mapper.py
7
from functools import partial from itertools import product from operator import eq class StreamMapper(object): """The stream mapper can be used to simplify the process of creating stream objects from data. :param cmp: This callable is used to compare each mapping's key with a value. ...
thnee/ansible
refs/heads/devel
lib/ansible/plugins/callback/skippy.py
83
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' ...
grap/purchase-workflow
refs/heads/8.0
purchase_requisition_delivery_address/model/__init__.py
36
# -*- coding: utf-8 -*- from . import purchase_requisition
ecoal95/servo
refs/heads/master
tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-registration-with-type.py
21
def classic_script(): return """ importScripts('./imported-classic-script.js'); self.onmessage = e => { e.source.postMessage(imported); }; """ def module_script(): return """ import * as module from './imported-module-script.js'; self.onmessage = e => { e.sou...
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/blueprint/__init__.py
3
"""The blueprint integration.""" from . import websocket_api from .const import DOMAIN # noqa from .errors import ( # noqa BlueprintException, BlueprintWithNameException, FailedToLoad, InvalidBlueprint, InvalidBlueprintInputs, MissingInput, ) from .models import Blueprint, BlueprintInputs, Dom...
bmi-forum/bmi-pyre
refs/heads/master
pythia-0.8/packages/blade/blade/components/__init__.py
2
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
40223150/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/pydoc.py
637
#!/usr/bin/env python3 """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydoc <name>" to show documentation ...
wshenx/shadowsocks
refs/heads/master
shadowsocks/asyncdns.py
655
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 r...
codenrhoden/ceph-deploy
refs/heads/master
ceph_deploy/hosts/__init__.py
9
""" We deal (mostly) with remote hosts. To avoid special casing each different commands (e.g. using `yum` as opposed to `apt`) we can make a one time call to that remote host and set all the special cases for running commands depending on the type of distribution/version we are dealing with. """ import logging from cep...
Therp/odoo
refs/heads/8.0
openerp/addons/base/ir/ir_translation.py
7
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
cainmatt/django
refs/heads/master
tests/conditional_processing/urls.py
360
from django.conf.urls import url from . import views urlpatterns = [ url('^condition/$', views.index), url('^condition/last_modified/$', views.last_modified_view1), url('^condition/last_modified2/$', views.last_modified_view2), url('^condition/etag/$', views.etag_view1), url('^condition/etag2/$', ...
adrpar/incubator-airflow
refs/heads/master
airflow/hooks/S3_hook.py
21
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
OpenEdgeComputing/elijah-openstack
refs/heads/master
cloudlet-gateway/caas/provider/views.py
2
# -*- coding: utf-8 -*- """app views.""" import os import pdb import requests from flask import Blueprint, render_template, request, flash, url_for, redirect, current_app, send_from_directory, \ Response, abort, stream_with_context from flask_login import login_required, current_user import ruamel.yaml from caas....
soerendip42/rdkit
refs/heads/master
rdkit/Chem/UnitTestMCS.py
4
import unittest import time from rdkit import Chem from rdkit.Chem import MCS def load_smiles(text): mols = [] for line in text.strip().splitlines(): smiles = line.split()[0] mol = Chem.MolFromSmiles(smiles) assert mol is not None, smiles mols.append(mol) return mols _igno...
fake-name/ReadableWebProxy
refs/heads/master
WebMirror/management/rss_parser_funcs/feed_parse_extractGakuseitranslationsCom.py
1
def extractGakuseitranslationsCom(item): ''' Parser for 'gakuseitranslations.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loit...