repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
blademainer/intellij-community
refs/heads/master
python/testData/inspections/PyPep8NamingInspection/argumentName.py
83
def do_stuff(a, <weak_warning descr="Argument name should be lowercase">BCD</weak_warning>): pass
sszlm/MissionPlanner
refs/heads/master
Lib/email/feedparser.py
55
# Copyright (C) 2004-2006 Python Software Foundation # Authors: Baxter, Wouters and Warsaw # Contact: email-sig@python.org """FeedParser - An email feed parser. The feed parser implements an interface for incrementally parsing an email message, line by line. This has advantages for certain applications, such ...
vrenaville/OCB
refs/heads/8.0
addons/point_of_sale/__openerp__.py
53
# -*- 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...
abhiQmar/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/testing/path/test_local.py
160
# -*- coding: utf-8 -*- from __future__ import with_statement import py import pytest import os, sys from py.path import local import common failsonjython = py.test.mark.xfail("sys.platform.startswith('java')") failsonjywin32 = py.test.mark.xfail("sys.platform.startswith('java') " "and getattr(os, '_name', No...
Leonnash21/flask_heroku
refs/heads/master
Tools/scripts/fixps.py
112
#!/usr/bin/env python3 # Fix Python script(s) to reference the interpreter via /usr/bin/env python. # Warning: this overwrites the file without making a backup. import sys import re def main(): for filename in sys.argv[1:]: try: f = open(filename, 'r') except IOError as msg: ...
tvibliani/odoo
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
293
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
zhangjie201412/goldfish_kernel
refs/heads/master
scripts/tracing/draw_functrace.py
170
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
teamtuga4/teamtuga4ever.repository
refs/heads/master
plugin.video.traquinas/resources/lib/libraries/f4mproxy/utils/pem.py
92
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. from .compat import * import binascii #This code is shared with tackpy (somewhat), so I'd rather make minimal #changes, and preserve the use of a2b_base64 throughout. def dePem(s, name): """Decode a PEM string into a...
erinspace/scrapi
refs/heads/develop
api/webview/migrations/0003_version_status.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('webview', '0002_auto_20151113_1515'), ] operations = [ migrations.AddField( model_name='version', na...
mk270/iatidq_model
refs/heads/master
iatidq/inforesult.py
2
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
largelymfs/w2vtools
refs/heads/master
build/scipy/scipy/ndimage/utils/generate_label_testvectors.py
28
import numpy as np from scipy.ndimage import label def generate_test_vecs(infile, strelfile, resultfile): "test label with different structuring element neighborhoods" def bitimage(l): return np.array([[c for c in s] for s in l]) == '1' data = [np.ones((7, 7)), bitimage(["1110111", ...
jarped/QGIS
refs/heads/master
python/plugins/processing/algs/r/RAlgorithm.py
9
# -*- coding: utf-8 -*- """ *************************************************************************** RAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
krintoxi/NoobSec-Toolkit
refs/heads/master
NoobSecToolkit /tools/sqli/tamper/chardoubleencode.py
10
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import string from lib.core.enums import PRIORITY __priority__ = PRIORITY.LOW def dependencies(): pass def tamper(payload, **kwargs): """ Double url-encodes al...
jmagnusson/raven-python
refs/heads/master
raven/contrib/django/models.py
6
""" raven.contrib.django.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Acts as an implicit hook for Django installs. :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # flake8: noqa from __future__ import absolute_import, unicode_literals import copy i...
saurabh6790/med_lib_rels
refs/heads/master
core/page/todo/todo.py
33
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.model.doc import Document @webnotes.whitelist() def get(arg=None): """get todo list""" return webnotes.conn.sql("""select name, owner, descript...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/Paste-2.0.1/tests/urlparser_data/not_found/recur/__init__.py
57
def not_found_hook(environ, start_response): urlparser = environ['paste.urlparser.not_found_parser'] path = environ.get('PATH_INFO', '') if not path: return urlparser.not_found(environ, start_response) # Strip off leading _'s path = '/' + path.lstrip('/').lstrip('_') environ['PATH_INFO']...
ksophocleous/grpc
refs/heads/master
src/python/grpcio/grpc/framework/base/_ends.py
39
# Copyright 2015, 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...
Nextdoor/ndscheduler
refs/heads/master
ndscheduler/corescheduler/scheduler_manager.py
1
"""Represents the core scheduler instance that actually schedules jobs.""" from apscheduler.executors import pool from ndscheduler.corescheduler import constants from ndscheduler.corescheduler import utils class SchedulerManager: def __init__(self, scheduler_class_path, datastore_class_path, ...
vadimsu/ipaugenblick
refs/heads/master
dpdk-2.0.0/tools/cpu_layout.py
72
#! /usr/bin/python # # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. # 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 sou...
scaidermern/topTracks2playlist
refs/heads/master
lastfm/shout.py
1
#!/usr/bin/env python __author__ = "Abhinav Sarkar <abhinav@abhinavsarkar.net>" __version__ = "0.2" __license__ = "GNU Lesser General Public License" __package__ = "lastfm" from lastfm.base import LastfmBase from lastfm.mixin import mixin from lastfm.decorators import cached_property @mixin("cacheable", "...
baberthal/CouchPotatoServer
refs/heads/master
libs/html5lib/treewalkers/lxmletree.py
618
from __future__ import absolute_import, division, unicode_literals from six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from gettext import gettext _ = gettext from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isin...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/docutils/docutils/parsers/rst/languages/en.py
180
# $Id: en.py 7179 2011-10-15 22:06:45Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated f...
INMEGEN/MCAC
refs/heads/master
shared_variation/dendrogram.py
2
import vcf from scipy.cluster.hierarchy import dendrogram from scipy.cluster.hierarchy import linkage import numpy as np import matplotlib matplotlib.use('svg') import matplotlib.pyplot as plt from samples import vcf_paths # computes jacard index for two or mor sets def jaccard_index(first, *others): return floa...
jonyroda97/redbot-amigosprovaveis
refs/heads/develop
lib/raven/contrib/django/celery/__init__.py
34
""" raven.contrib.django.celery ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from raven.contrib.django.client import DjangoClient try: from celery.task import task ex...
nhomar/odoo-mirror
refs/heads/8.0
addons/pos_restaurant/__openerp__.py
311
# -*- 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...
Weicong-Lin/pymo-global
refs/heads/master
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_pwd.py
41
import sys import unittest from test import test_support pwd = test_support.import_module('pwd') class PwdTest(unittest.TestCase): def test_values(self): entries = pwd.getpwall() entriesbyname = {} entriesbyuid = {} for e in entries: self.assertEqual(len(e), 7) ...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/Django-1.6.10/tests/file_uploads/urls.py
145
from __future__ import absolute_import from django.conf.urls import patterns from . import views urlpatterns = patterns('', (r'^upload/$', views.file_upload_view), (r'^verify/$', views.file_upload_view_verify), (r'^unicode_name/$', views.file_upload_unicode_name), (r'^echo/$', ...
Hash--/ICRH
refs/heads/master
WEST_design/plot_currents_vs_Rc.py
2
# -*- coding: utf-8 -*- """ Created on Thu Mar 19 21:39:58 2015 In this script we plot the capacitor currents vs coupling resistance. The currents have been calculated for a input power of 1.5MW per 1/2 antenna. @author: hash """ import pandas as pd from matplotlib.pylab import * # open the excel sheet with pandas...
pprivulet/DataScience
refs/heads/master
12315auto/complainDetail.py
1
# coding: UTF-8 import urllib2 import traceback import MySQLdb from bs4 import BeautifulSoup import time import os def insertData(table, cols, vlist): conn=MySQLdb.connect(host='localhost',user='root',passwd='fnst1234',port=3306, db="autocomplain", charset="utf8") cur=conn.cursor() sql = "insert into...
wd5/jangr
refs/heads/master
django/contrib/gis/geos/prototypes/predicates.py
623
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
jeffery9/mixprint_addons
refs/heads/master
sale_analytic_plans/__init__.py
443
# -*- 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...
mgaitan/django-rest-framework
refs/heads/master
rest_framework/utils/html.py
16
""" Helpers for dealing with HTML input. """ import re from django.utils.datastructures import MultiValueDict def is_html_input(dictionary): # MultiDict type datastructures are used to represent HTML form input, # which may have more than one value for each key. return hasattr(dictionary, 'getlist') de...
wreckJ/intellij-community
refs/heads/master
python/testData/intentions/beforeYieldFrom.py
83
def f(g): yield 'begin' for x in g(): yield <caret>x print('end')
fargalaxy1/geonode-leaflet
refs/heads/master
geonode/api/authorization.py
10
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
h3llrais3r/Auto-Subliminal
refs/heads/master
lib/requests_oauthlib/compliance_fixes/douban.py
91
import json from oauthlib.common import to_unicode def douban_compliance_fix(session): def fix_token_type(r): token = json.loads(r.text) token.setdefault('token_type', 'Bearer') fixed_token = json.dumps(token) r._content = to_unicode(fixed_token).encode('utf-8') return r ...
jelmer/samba
refs/heads/master
third_party/dnspython/dns/rdtypes/ANY/CNAME.py
101
# 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 "...
vijaylbais/boto
refs/heads/develop
tests/unit/s3/test_lifecycle.py
115
# 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 without restriction, including # without limitation the rights ...
hseifeddine/dashviz-mean
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
2767
# Copyright (c) 2011 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. """Applies a fix to CR LF TAB handling in xml.dom. Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293 Working around this: http://bugs.python.or...
sambler/oiio
refs/heads/master
testsuite/texture-cropover/run.py
7
#!/usr/bin/env python # Tests input image which is partial crop, partial overscan! command += oiiotool(parent + "/oiio-images/grid.tif " + "--crop 500x1000+250+0 --fullsize 1000x800+0+100 -o grid-cropover.exr") command += maketx_command ("grid-cropover.exr", "grid-cropo...
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/lib/python2.7/site-packages/jinja2/utils.py
323
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import errno from collections import deque from threading import Lock from jinja2._compat import text_type, string_types, impl...
yigitguler/django
refs/heads/master
tests/validation/test_error_messages.py
398
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from unittest import TestCase from django.core.exceptions import ValidationError from django.db import models class ValidationMessagesTest(TestCase): def _test_validation_messages(self, field, value, expected): with self.assertRaises(Val...
pupboss/xndian
refs/heads/master
deploy/site-packages/setuptools/tests/test_svn.py
300
# -*- coding: utf-8 -*- """svn tests""" import io import os import subprocess import sys import unittest from setuptools.tests import environment from setuptools.compat import unicode, unichr from setuptools import svn_utils from setuptools.tests.py26compat import skipIf def _do_svn_check(): try: subpro...
hyperized/ansible
refs/heads/devel
lib/ansible/modules/network/cnos/cnos_lldp.py
43
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2019 Lenovo. # (c) 2017, Ansible by Red Hat, inc # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of ...
kumarrus/voltdb
refs/heads/master
third_party/python/schemaobject/schemaobject/database.py
15
from schemaobject.option import SchemaOption from schemaobject.table import TableSchemaBuilder from schemaobject.collections import OrderedDict def DatabaseSchemaBuilder(instance): """ Returns a dictionary loaded with all of the databases availale on the MySQL instance. ``instance`` must be an instance Sc...
devinamatthews/molssi-sss-2017
refs/heads/master
blas_exercise/scf.py
1
import numpy as np import psi4 np.set_printoptions(suppress=True, precision=4) mol = psi4.geometry(""" O H 1 1.1 H 1 1.1 2 104 """) # Build a molecule mol.update_geometry() mol.print_out() e_conv = 1.e-6 d_conv = 1.e-6 nel = 5 damp_value = 0.20 damp_start = 5 # Build a basis bas = psi4.core.BasisSet.build(mol, tar...
googleapis/googleapis-gen
refs/heads/master
google/cloud/osconfig/v1beta/osconfig-v1beta-py/google/cloud/osconfig_v1beta/services/os_config_service/transports/grpc.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
a10networks/acos-client
refs/heads/master
acos_client/v21/partition.py
2
# Copyright 2014, Doug Wiegley, A10 Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
suncycheng/intellij-community
refs/heads/master
python/testData/formatter/continuationIndentInIndentingStatement2.py
80
def f(value, value1, value2): if value in ( value1, value2) or value == 0: # <- missing continuation indent here return False
takeshineshiro/cinder
refs/heads/master
cinder/volume/drivers/netapp/dataontap/client/client_base.py
9
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. 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 ob...
bealdav/OpenUpgrade
refs/heads/8.0
addons/google_spreadsheet/__init__.py
436
import google_spreadsheet
jmwenda/geonode
refs/heads/master
geonode/services/tasks.py
35
from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from geonode.services.models import WebServiceHarvestLayersJob, WebServiceRegistrationJob from geonode.services.views import update_layers, register_service_by_type from django.core.mail import send_mail @perio...
aplicatii-romanesti/allinclusive-kodi-pi
refs/heads/master
.kodi/userdata/addon_data/plugin.video.p2p-streams/acestream/ace/ACEStream/Core/APIImplementation/UserCallbackHandler.py
1
#Embedded file name: ACEStream\Core\APIImplementation\UserCallbackHandler.pyo import sys import os import shutil import binascii from threading import currentThread from traceback import print_exc from ACEStream.Core.simpledefs import * from ACEStream.Core.APIImplementation.ThreadPool import ThreadPool from ACEStream.C...
indictranstech/osmosis-frappe
refs/heads/develop
frappe/templates/pages/desk.py
13
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals no_sitemap = 1 no_cache = 1 base_template_path = "templates/pages/desk.html" import os, re import frappe from frappe import _ import frappe.sessions def get_context(context): ...
geometrybase/gensim
refs/heads/develop
gensim/models/lda_dispatcher.py
48
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s SIZE_OF_JOBS_QUEUE Dispatcher process which orchestrates distributed LDA computations. Run this \ script onl...
jaruba/chromium.src
refs/heads/nw12
third_party/google_appengine_cloudstorage/cloudstorage/test_utils.py
248
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
sdlBasic/sdlbrt
refs/heads/master
win32/mingw/opt/lib/python2.7/encodings/iso8859_3.py
593
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
NL66278/odoo
refs/heads/8.0
addons/account/wizard/account_fiscalyear_close.py
81
# -*- 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...
FichteFoll/TelegramIRCImageProxy
refs/heads/master
bots/telegram.py
3
from collections import defaultdict import logging import mimetypes import time from twx import botapi from models.image import ImageInfo from util import wrap IMAGE_EXTENSIONS = ('.jpg', '.png', '.gif') l = logging.getLogger(__name__) class TelegramImageBot(botapi.TelegramBot): _command_handlers = defaultdi...
mila-udem/blocks-examples
refs/heads/master
sqrt/__init__.py
8
import numpy import theano from theano import tensor from blocks.algorithms import GradientDescent, Scale from blocks.bricks import MLP, Tanh, Identity from blocks.bricks.cost import SquaredError from blocks.graph import ComputationGraph from blocks.initialization import IsotropicGaussian, Constant from blocks.model ...
svenstaro/OpenShadingLanguage
refs/heads/master
testsuite/texture-smallderivs/run.py
78
#!/usr/bin/env python command += testshade("-g 256 256 --center -od uint8 -o Cout out.tif test") outputs = [ "out.txt", "out.tif" ]
allenlavoie/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/engine/training_utils.py
1
# Copyright 2018 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...
zennobjects/kivy
refs/heads/master
examples/canvas/canvas_stress.py
16
''' Canvas stress ============= This is just a test for testing the performance of our Graphics engine. ''' from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.app import App from kivy.graphics import Color, Rectangl...
quaddra/engage
refs/heads/master
python_pkg/engage/utils/regexp.py
1
"""A simple dsl for building regular expressions. """ import re class _regexp(object): """base class for regular expression components""" def __init__(self): pass def get_value(self): pass def compile(self): return re.compile(self.get_value()) def match(self, s): ...
denny820909/builder
refs/heads/master
lib/python2.7/site-packages/autobuilder/buildsteps/DeleteGoogleVMs.py
3
''' Created on Aug 13, 2014 __author__ = "California Sullivan" __copyright__ = "Copyright 2014, Intel Corp." __credits__ = ["California Sullivan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.steps.shell import ShellCommand ...
jumpstarter-io/cinder
refs/heads/master
cinder/api/contrib/volume_replication.py
6
# Copyright 2014 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 agreed t...
turbokongen/home-assistant
refs/heads/dev
homeassistant/components/hunterdouglas_powerview/scene.py
8
"""Support for Powerview scenes from a Powerview hub.""" from typing import Any from aiopvapi.resources.scene import Scene as PvScene import voluptuous as vol from homeassistant.components.scene import Scene from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import CONF_HOST, CONF_PLATFOR...
akhilari7/pa-dude
refs/heads/master
lib/python2.7/site-packages/nltk/corpus/reader/timit.py
22
# Natural Language Toolkit: TIMIT Corpus Reader # # Copyright (C) 2001-2007 NLTK Project # Author: Haejoong Lee <haejoong@ldc.upenn.edu> # Steven Bird <stevenbird1@gmail.com> # Jacob Perkins <japerk@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # [xx] this docstring is...
rgommers/statsmodels
refs/heads/master
statsmodels/sandbox/nonparametric/dgp_examples.py
37
# -*- coding: utf-8 -*- """Examples of non-linear functions for non-parametric regression Created on Sat Jan 05 20:21:22 2013 Author: Josef Perktold """ import numpy as np ## Functions def fg1(x): '''Fan and Gijbels example function 1 ''' return x + 2 * np.exp(-16 * x**2) def fg1eu(x): '''Eubank ...
untitaker/pytest
refs/heads/master
testing/acceptance_test.py
8
import sys import py, pytest class TestGeneralUsage: def test_config_error(self, testdir): testdir.makeconftest(""" def pytest_configure(config): import pytest raise pytest.UsageError("hello") """) result = testdir.runpytest(testdir.tmpdir) ...
18padx08/PPTex
refs/heads/master
PPTexEnv_x86_64/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/setup.py
7
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info config = Configuration('lobpcg',parent_package,top_path) conf...
jeremypogue/ansible
refs/heads/devel
lib/ansible/module_utils/iosxr.py
2
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
pranayberry/Git-Snitch
refs/heads/master
script.py
1
from bs4 import BeautifulSoup import requests from datetime import datetime, timedelta def scrape(url): response = requests.get(url) soup = BeautifulSoup(response.content,"lxml") if soup.find_all('title') != []: return soup return None def fname(page): return page.find('div','vcard-fullname').string def cont...
penny4860/SVHN-deep-digit-detector
refs/heads/master
annotation/svhn_json_generator.py
1
# SVHN extracts data from the digitStruct.mat full numbers files. The data can be downloaded # the Street View House Number (SVHN) web site: http://ufldl.stanford.edu/housenumbers. # # This is an A2iA tweak (YG -9 Jan 2014) of the script found here : # http://blog.grimwisdom.com/python/street-view-house-numbers...
google/google-ctf
refs/heads/master
third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/email/generator.py
53
# Copyright (C) 2001-2010 Python Software Foundation # Contact: email-sig@python.org """Classes to generate plain text from a message object tree.""" __all__ = ['Generator', 'DecodedGenerator'] import re import sys import time import random import warnings from cStringIO import StringIO from email.hea...
EmmanuelJohnson/ssquiz
refs/heads/master
flask/lib/python2.7/encodings/iso8859_1.py
593
""" Python Character Mapping Codec iso8859_1 generated from 'MAPPINGS/ISO8859/8859-1.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
xingjian-f/Leetcode-solution
refs/heads/master
382. Linked List Random Node.py
1
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def __init__(self, head): """ @param head The linked list's head. Note that the head is guaranteed to be not null, so it con...
cXhristian/django-wiki
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys from glob import glob from setuptools import find_packages, setup sys.path.append( os.path.join(os.path.dirname(__file__), 'src') ) # noqa from wiki import __version__ # isort:skip # noqa # Utility funct...
hzj123/56th
refs/heads/master
pombola/hansard/views.py
4
import re import datetime from django.shortcuts import render_to_response, get_object_or_404, redirect from django.http import Http404 from django.template import RequestContext from django.views.generic import TemplateView, DetailView, ListView from pombola.hansard.models import Sitting, Entry from pombola.core.m...
nitinitprof/odoo
refs/heads/8.0
openerp/tools/parse_version.py
380
# -*- 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...
chienlieu2017/it_management
refs/heads/master
odoo/odoo/addons/base/tests/test_ir_filters.py
25
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import exceptions from odoo.tests.common import TransactionCase, ADMIN_USER_ID def noid(d): """ Removes values that are not relevant for the test comparisons """ d.pop('id', None) d.pop('action_id'...
metacademy/metacademy-application
refs/heads/master
server/apps/graph/management/commands/ffdb_migrate.py
1
""" Flat file database content manager use content_server_communicator to read previous data and django server api (tastypie api) to commit the data along with the appropriate id and tag NB: the content server must be listening for requests """ import pdb from django.core.management.base import BaseCommand from app...
hmgaudecker/econ-project-templates
refs/heads/master
docs/bld/example/python/python_example/.mywaflib/waflib/extras/relocation.py
61
#! /usr/bin/env python # encoding: utf-8 """ Waf 1.6 Try to detect if the project directory was relocated, and if it was, change the node representing the project directory. Just call: waf configure build Note that if the project directory name changes, the signatures for the tasks using files in that directory wi...
jagguli/intellij-community
refs/heads/master
python/testData/refactoring/changeSignature/parameterNameWithMoreThanTwoStars.py
79
def func(**kwargs): pass
brain-tec/partner-contact
refs/heads/11.0
setup/partner_contact_birthdate/setup.py
7073
import setuptools setuptools.setup( setup_requires=['setuptools-odoo'], odoo_addon=True, )
muchu1983/104_cameo
refs/heads/master
test/test_xxx_sample.py
3
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import unittest import logging """ 測試 """ class XXXXTest(unittest.TestCase): #準備 def setUp(self): logging.basic...
mindcandy/thrift
refs/heads/master
contrib/fb303/py/fb303/FacebookBase.py
173
#!/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 # "L...
shuvozula/crazyflie-clients-python
refs/heads/develop
lib/cfclient/ui/tabs/__init__.py
32
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
google-research/selfstudy-adversarial-robustness
refs/heads/master
defense_knn/attack_linf.py
13
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
EricsonWillians/PyGameWidgets
refs/heads/master
examples/altered_option_chooser.py
1
import sys sys.path.append("..") import pygame import core import widgets # Option chooser example. WINDOW_WIDTH = 1024 WINDOW_HEIGHT = 728 pygame.init() pygame.font.init screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT)) clock = pygame.time.Clock() FPS = 60 running = True if __name__ == "__main__": ...
huguesv/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/http/__init__.py
11
from enum import IntEnum __all__ = ['HTTPStatus'] class HTTPStatus(IntEnum): """HTTP status codes and reason phrases Status codes from the following RFCs are all observed: * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 * RFC 6585: Additional HTTP Status Codes * RF...
vishrutshah/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Header/auto_rest_swagger_bat_header_service/operations/__init__.py
22
# 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 ...
kylon/AndromadusMod-New
refs/heads/master
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
iwxfer/wikitten
refs/heads/master
library/python/exceptions.py
1
## ## try / else ## for arg in sys.argv[1:]: try: f = open(arg, 'r') except IOError: print 'cannot open', arg else: """ if the try clause does not raise an exception """ print arg, 'has', len(f.readlines()), 'lines' f.close() ## ## Custom Error ## class MyError(Excep...
cjds/cron
refs/heads/master
lib/flask/testsuite/config.py
556
# -*- coding: utf-8 -*- """ flask.testsuite.config ~~~~~~~~~~~~~~~~~~~~~~ Configuration and instances. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import flask import pkgutil import unittest from contextlib import contextmanager fr...
tillahoffmann/tensorflow
refs/heads/master
tensorflow/contrib/training/python/training/sampling_ops_test.py
130
# 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...
cvandeplas/plaso
refs/heads/master
plaso/lib/lexer.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2012 The Plaso Project Authors. # Please see the AUTHORS file for details on individual authors. # # 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 L...
grnet/mupy
refs/heads/master
accounts/models.py
1
# Copyright (C) 2010-2014 GRNET S.A. # # 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 version. # # This program is distributed i...
fuhongliang/odoo
refs/heads/8.0
addons/account_budget/wizard/__init__.py
444
# -*- 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...
leechy9/Crumple
refs/heads/master
crumple/pages/test.py
1
import os.path import framework.page as fp import framework.wsgi as wsgi import framework.config as cfg def full_test(environ, start_response): ''' Tests all possible scenarios in Crumple. ''' template = r'test/tests.tmpl' envi = wsgi.Envi(environ, start_response, True) page = fp.TemplatePage(...
Insight-book/data-science-from-scratch
refs/heads/master
first-edition/code-python3/linear_algebra.py
12
# -*- coding: iso-8859-15 -*- import re, math, random # regexes, math functions, random numbers import matplotlib.pyplot as plt # pyplot from collections import defaultdict, Counter from functools import partial, reduce # # functions for working with vectors # def vector_add(v, w): """adds two vectors componentw...