repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
svanschalkwyk/datafari
refs/heads/master
windows/python/Lib/bsddb/test/test_cursor_pget_bug.py
112
import unittest import os, glob from test_all import db, test_support, get_new_environment_path, \ get_new_database_path #---------------------------------------------------------------------- class pget_bugTestCase(unittest.TestCase): """Verify that cursor.pget works properly""" db_name = 'test-curs...
romain-li/edx-platform
refs/heads/master
openedx/core/lib/tests/test_time_zone_utils.py
9
"""Tests covering time zone utilities.""" from freezegun import freeze_time from student.tests.factories import UserFactory from openedx.core.lib.time_zone_utils import ( get_display_time_zone, get_time_zone_abbr, get_time_zone_offset, ) from pytz import timezone, utc from unittest import TestCase class T...
shengwen1994/calvin-base
refs/heads/master
calvin/utilities/calvinuuid.py
5
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
robinro/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/baz1/one.py
298
data = 'baz1'
g4borg/ecrterm
refs/heads/master
packets/bitmaps.py
1
# -*- coding: utf-8 -*- """ Implements all known Bitmaps in two Dictionaries: BITMAPS is keyed after the CODE of the bitmap in the protocol. use this if you know "the code" of the bitmap and retrieve its class, keyname (and description) BITMAPS_ARGS is created from BITMAPS, representing bi...
dnkn/rk3188_tablet
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
allotria/intellij-community
refs/heads/master
python/testData/intentions/googleReturnSectionBeforeRaises.py
53
def <caret>f(): """ Raises: RuntimeException """ raise RuntimeException
great-expectations/great_expectations
refs/heads/develop
tests/datasource/batch_kwarg_generator/test_manual_generator.py
1
from great_expectations.datasource.batch_kwargs_generator.manual_batch_kwargs_generator import ( ManualBatchKwargsGenerator, ) def test_manual_generator(basic_pandas_datasource): generator = ManualBatchKwargsGenerator( datasource=basic_pandas_datasource, assets={ "asset1": [ ...
idkwim/pysmt
refs/heads/master
pysmt/solvers/yices.py
2
# # This file is part of pySMT. # # Copyright 2014 Andrea Micheli and Marco Gario # # 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 ...
ahb0327/intellij-community
refs/heads/master
python/testData/inspections/unusedImport/usedLastImport/a.py
193
foo = 0
awohns/selection
refs/heads/master
python_lib/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py
1002
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os...
skyportsystems/vitess
refs/heads/master
py/vtdb/db_object_custom_sharded.py
10
"""Module containing base class for tables in custom sharded keyspace. Vitess sharding scheme is range-sharded. Vitess supports routing for other sharding schemes by allowing explicit shard_name addressing. This implementation is not fully complete as yet. """ from vtdb import db_object from vtdb import dbexceptions f...
noroutine/ansible
refs/heads/devel
lib/ansible/plugins/terminal/ironware.py
76
# # (c) 2016 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 the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
ch3pjw/junction
refs/heads/master
test/test_input_elements.py
1
# Copyright (C) 2013 Paul Weaver <p.weaver@ruthorn.co.uk> # # 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 pro...
samuto/Honeybee
refs/heads/master
src/Honeybee_Lookup Daylighting Folder.py
1
# # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2015, Mostapha Sadeghipour Roudsari <Sadeghipour@gmail.com> # Honeybee is free software; you can redistribute it and/or modify # it under the terms of the GNU Ge...
matthewdeanmartin/kata-python
refs/heads/master
kata/formulae/main.py
1
# coding=utf-8 """ Offer a menu to solve a variety of problems. Any of these could be a stand alone Kata, but the overhead of writing a kata makes it easier to batch them up. Caculate your age given current year and birth year. Do same given exact dates. Caculate gas mileate/fuel efficiency given starting mileate, e...
dwhswenson/mdtraj
refs/heads/master
mdtraj/testing/__init__.py
17
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
divergence082/Externs-Extractor-Wrapper
refs/heads/master
externs-extractor/externsExtractor.py
1
#!/usr/bin/python from optparse import OptionParser from extractors.elementsExtractor import extractElements def getExternsFromFiles(paths): externs = '' for path in paths: for element in extractElements(path): if not (element.isPrivate() or element.isTest()): externs += e...
Outernet-Project/bottle-utils
refs/heads/master
tests/csrf_app.py
2
from __future__ import unicode_literals try: from http.cookiejar import CookieJar except ImportError: from cookielib import CookieJar import bottle from webtest import TestApp from bottle_utils import csrf bottle.debug() bottle.BaseTemplate.defaults.update({ 'csrf_tag': csrf.csrf_tag }) app = bottle.de...
pjenvey/modjy-pjenvey
refs/heads/master
src/modjy_wsgi.py
1
### # # Copyright Alan Kennedy. # # You may contact the copyright holder at this uri: # # http://www.xhaus.com/contact/modjy # # The licence under which this code is released is the Apache License v2.0. # # The terms and conditions of this license are listed in a file contained # in the distribution tha...
ravibhure/ansible
refs/heads/devel
docs/bin/generate_man.py
38
#!/usr/bin/env python import optparse import os import pprint import sys from jinja2 import Environment, FileSystemLoader from ansible.module_utils._text import to_bytes def generate_parser(): p = optparse.OptionParser( version='%prog 1.0', usage='usage: %prog [options]', description='G...
elmerdpadilla/iv
refs/heads/8.0
addons/account_analytic_plans/account_analytic_plans.py
18
# -*- 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...
JerryLead/spark
refs/heads/master
python/pyspark/mllib/clustering.py
59
# # 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 us...
cherokee/webserver
refs/heads/master
admin/server.py
5
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as...
pelya/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/plat-mac/aetools.py
33
"""Tools for use in AppleEvent clients and servers. pack(x) converts a Python object to an AEDesc object unpack(desc) does the reverse packevent(event, parameters, attributes) sets params and attrs in an AEAppleEvent record unpackevent(event) returns the parameters and attributes from an AEAppleEvent record Plus... ...
tf-czu/EFD
refs/heads/master
drawing_ellipses.py
1
""" This is a simple tool for drawing ellipses Usage: python drawing_ellipses.py abcd <number a> <number b> <number c> <number d> python drawung_ellipses.py f <file name> <order> <N> python drawung_ellipses.py f2 <file name> <order> <N> <white list> """ import sys import...
likecoin-dev/likecoin-src
refs/heads/master
contrib/wallettools/walletunlock.py
2299
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:8332") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
Abi1ity/uniclust2.0
refs/heads/master
flask/lib/python2.7/site-packages/tempita/_looper.py
140
""" Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context....
maxtorete/frappe
refs/heads/develop
frappe/patches/v8_0/install_new_build_system_requirements.py
16
from __future__ import print_function from subprocess import Popen, call, PIPE def execute(): # update nodejs version if brew exists p = Popen(['which', 'brew'], stdout=PIPE, stderr=PIPE) output, err = p.communicate() if output: call(['brew', 'upgrade', 'node']) else: print('Please ...
manqala/erpnext
refs/heads/develop
erpnext/config/website.py
44
from frappe import _ def get_data(): return [ { "label": _("Portal"), "items": [ { "type": "doctype", "name": "Homepage", "description": _("Settings for website homepage"), }, { "type": "doctype", "name": "Shopping Cart Settings", "label": _("Shopping Cart Settings"),...
Kalyzee/edx-platform
refs/heads/master
lms/djangoapps/commerce/api/v1/models.py
54
""" API v1 models. """ from itertools import groupby import logging from django.db import transaction from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from course_modes.models import CourseMode from ver...
AndroidGX/SimpleGX-MM-6.0_H811
refs/heads/master
Documentation/target/tcm_mod_builder.py
2358
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
russss/Diamond
refs/heads/master
src/collectors/exim/test/testexim.py
31
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from exim import EximColle...
josiah-wolf-oberholtzer/supriya
refs/heads/master
supriya/synthdefs/controls.py
1
import collections from collections.abc import Sequence from supriya import CalculationRate, ParameterRate, SignalRange from supriya.system import SupriyaValueObject from supriya.typing import UGenInputMap from .bases import MultiOutUGen from .mixins import UGenMethodMixin class Range(SupriyaValueObject): """ ...
Jumpscale/ays_gig_github_dev_process
refs/heads/master
ays/github_milestone/actions.py
1
from JumpScale import j class Actions(ActionsBaseMgmt): def input(self,service,recipe,role,instance,args={}): if "milestone.title" not in args: args['milestone.title']=instance return args
whs/django
refs/heads/master
tests/handlers/urls.py
70
from django.conf.urls import url from . import views urlpatterns = [ url(r'^regular/$', views.regular), url(r'^streaming/$', views.streaming), url(r'^in_transaction/$', views.in_transaction), url(r'^not_in_transaction/$', views.not_in_transaction), url(r'^suspicious/$', views.suspicious), url(...
jjhelmus/adventofcode
refs/heads/master
day04.py
1
from __future__ import print_function import hashlib puzzle_input = 'yzbqklnj' def find_answer(secret_key): for i in xrange(10000000): message = secret_key + str(i) if hashlib.md5(message).hexdigest()[:5] == '00000': return i return None def find_six_zeros(secret_key): for ...
joelstanner/RealPython_book2
refs/heads/master
sqlc.py
1
# executemany() method import sqlite3 with sqlite3.connect("new.db") as connection: c = connection.cursor() #Insert multiple records using a tuple cities = [ ('Boston', 'MA', 600000), ('Chicago', 'IL', 2700000), ('Houston', 'TX', 2100000), ('Phoenix', 'AZ', 1500000) ...
samueldotj/TeeRISC-Simulator
refs/heads/master
src/cpu/IntrControl.py
72
# Copyright (c) 2005-2007 The Regents of The University of Michigan # 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 ...
rnestler/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/echo-headers.py
71
def main(request, response): response.writer.write_status(200) response.writer.write_header("Content-Type", "text/plain") response.writer.end_headers() response.writer.write(str(request.raw_headers)) response.close_connection = True
catapult-project/catapult
refs/heads/master
third_party/google-endpoints/future/backports/email/mime/image.py
83
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing image/* type MIME documents.""" from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import __all__ = ['MIMEImage'] import imghdr from ...
GabrielFortin/ansible-module-f5bigip
refs/heads/develop
library/f5bigip_ltm_monitor_mssql.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016-2018, Eric Jacob <erjac77@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
zackster/HipHopGoblin
refs/heads/master
lib/python2.6/django/contrib/gis/db/backend/__init__.py
307
from django.db import connection if hasattr(connection.ops, 'spatial_version'): from warnings import warn warn('The `django.contrib.gis.db.backend` module was refactored and ' 'renamed to `django.contrib.gis.db.backends` in 1.2. ' 'All functionality of `SpatialBackend` ' 'has been m...
mexicancoin/MXNCore
refs/heads/master
qa/rpc-tests/invalidateblock.py
68
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test InvalidateBlock code # from test_framework.test_framework import BitcoinTestFramework from test...
se4u/genrich
refs/heads/master
src/model/maxent_lm.py
1
# AUTHOR: Pushpendre # The purpose of this module is to use theano to implement a maxent type lm. # This language model uses unigram, bigram, trigram features.
odoobgorg/odoo
refs/heads/9.0
addons/delivery/models/delivery_price_rule.py
33
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import models, fields, api import openerp.addons.decimal_precision as dp class PriceRule(models.Model): _name = "delivery.price.rule" _description = "Delivery Price Rules" _order = 'sequence, l...
xuru/restler
refs/heads/master
lib/usr/sqlalchemy/orm/deprecated_interfaces.py
2
# orm/deprecated_interfaces.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy import event, util from interfaces import EXT_CONTINUE ...
wright8191/pyapi-gitlab
refs/heads/develop
gitlab/exceptions.py
25
class HttpError(Exception): """ An http error occurred """ pass
LubyRuffy/spiderfoot
refs/heads/master
ext/dns/node.py
49
# Copyright (C) 2001-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 "...
Achuth17/scikit-bio
refs/heads/master
skbio/sequence/_nucleotide_sequence.py
1
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
padelt/temper-python
refs/heads/master
temperusb/device_library.py
1
# encoding: utf-8 # # TEMPer USB temperature/humidty sensor device driver settings. # Handles devices reporting themselves as USB VID/PID 0C45:7401 (mine also says # RDing TEMPerV1.2). # # Copyright 2012-2020 Philipp Adelt <info@philipp.adelt.net> and contributors. # # This code is licensed under the GNU public license...
kjordahl/xray
refs/heads/master
xray/convert.py
6
"""Functions for converting to and from xray objects """ import numpy as np from .core.dataarray import DataArray from .conventions import ( maybe_encode_timedelta, maybe_encode_datetime, decode_cf) ignored_attrs = set(['name', 'tileIndex']) def from_cdms2(variable): """Convert a cdms2 variable into an Data...
volcomism/blueprint
refs/heads/master
blueprint/io/server/statsd.py
4
""" Python interface to StatsD, cribbed from Steve Ivy <steveivy@gmail.com>'s python_example.py in the standard distribution. """ from ConfigParser import NoOptionError, NoSectionError import logging import random import socket import sys from blueprint import cfg try: host, port = cfg.get('statsd', 'host'), cf...
MSEMJEJME/ReAlistair
refs/heads/master
renpy/warp.py
1
# Copyright 2004-2010 PyTom <pytom@bishoujo.us> # # 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, mer...
klusark/android_external_chromium_org
refs/heads/cm-11.0
build/android/gyp/generate_v14_compatible_resources.py
25
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Convert Android xml resources to API 14 compatible. There are two reasons that we cannot just use API 17 attributes, so we are ge...
AaronTao1990/scrapy
refs/heads/master
scrapy/utils/sitemap.py
146
""" Module for processing Sitemaps. Note: The main purpose of this module is to provide support for the SitemapSpider, its API is subject to change without notice. """ import lxml.etree class Sitemap(object): """Class to parse Sitemap (type=urlset) and Sitemap Index (type=sitemapindex) files""" def __in...
s3nt27/wireless_security_HW
refs/heads/master
hw1.2v1.py
1
""" Filename: hw1.2v1.py Description: This file generates encryption for caeser cypher decrypts using key and brute force Author: Subharthi Banerjee Ver. : 1.2.1 Dated: 02052016 """ import time import sys import string from collections import OrderedDict from string import digits def encrypt(plaintext, key): textl...
ktyssowski/mea_analysis
refs/heads/master
pymea/spikelists.py
2
import pandas as pd import numpy as np import itertools as it electrode_map = { '1': ['18', '28', '38', '48', '58', '68', '78', '88', '17', '27', '37', '47', '57', '67', '77', '87', '16', '26', '36', '46', '56', '66', '76', '86', '15', '25', '35', '45', '55', '65', '75', '85', ...
switchkiller/ProjDjanko
refs/heads/master
lib/python2.7/site-packages/django/core/files/__init__.py
839
from django.core.files.base import File __all__ = ['File']
cauchycui/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_fastica.py
272
""" Test the fastica algorithm. """ import itertools import warnings import numpy as np from scipy import stats from nose.tools import assert_raises from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from skl...
ronan22/mic
refs/heads/tizen
mic/3rdparty/pykickstart/handlers/f9.py
10
# # Chris Lumens <clumens@redhat.com> # # Copyright 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be usef...
kevin-coder/tensorflow-fork
refs/heads/master
tensorflow/python/training/tracking/base_test.py
16
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mkhuthir/learnPython
refs/heads/master
Book_learning-python-r1.1/ch6/decorators/two.decorators.py
1
from time import sleep, time from functools import wraps def measure(func): @wraps(func) def wrapper(*args, **kwargs): t = time() result = func(*args, **kwargs) print(func.__name__, 'took:', time() - t) return result return wrapper def max_result(func): @wraps(func) ...
jarrahwu/peewee
refs/heads/master
examples/twitter/app.py
16
import datetime from flask import Flask from flask import g from flask import redirect from flask import request from flask import session from flask import url_for, abort, render_template, flash from functools import wraps from hashlib import md5 from peewee import * # config - aside from our database, the rest is f...
agry/NGECore2
refs/heads/master
scripts/mobiles/rori/torton.py
2
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
DeskboxBrazil/Cura
refs/heads/master
cura/CuraActions.py
7
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QUrl from PyQt5.QtGui import QDesktopServices from UM.Event import CallFunctionEvent from UM.Application import Application import webbrowser class CuraActions(QObject): def __init__(self, parent = None): super().__init__(parent) ...
gmimano/commcaretest
refs/heads/master
corehq/apps/tropo/urls.py
2
from django.conf.urls.defaults import * urlpatterns = patterns('corehq.apps.tropo.views', url(r'^sms/?$', 'sms_in', name='sms_in'), url(r'^ivr/?$', 'ivr_in', name='ivr_in'), )
Purg/SMQTK
refs/heads/master
python/smqtk/utils/preview_cache.py
2
import imageio import logging import mimetypes import os import shutil from smqtk.utils import file_utils, video_utils __author__ = "paul.tunison@kitware.com" MIMETYPES = mimetypes.MimeTypes() class PreviewCache (object): """ Create and cache saved located of preview images for data elements. """ ...
sileht/deb-openstack-nova
refs/heads/debian/unstable
contrib/boto_v6/ec2/instance.py
11
''' Created on 2010/12/20 @author: Nachi Ueno <ueno.nachi@lab.ntt.co.jp> ''' from boto.resultset import ResultSet from boto.ec2.instance import Reservation from boto.ec2.instance import Group from boto.ec2.instance import Instance class ReservationV6(Reservation): def startElement(self, name, attrs, connection):...
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/cloud/azure/azure_rm_keyvault_info.py
27
#!/usr/bin/python # # Copyright (c) 2019 Yunge Zhu, <yungez@microsoft.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', ...
stonebig/bokeh
refs/heads/master
bokeh/sampledata/unemployment1948.py
2
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
tracymiranda/pc-scripts
refs/heads/ecf2017
dl.py
1
import os import yaml from subprocess import call import urllib YEAR = 2016 if __name__ == "__main__": p = os.path.join(os.path.expanduser('~'), ".ecf2017") f = yaml.load(open(p, 'r')) usr = urllib.quote_plus(f['user']) pwd = urllib.quote_plus(f['pwd']) cmd = ['wget', '--save-cookies...
violasox/tellurium
refs/heads/master
tellurium/optimization/DiffEvolution.py
1
class DiffEvolution(): def __init__(self, rr, fitnessFcn, simFcn, ASYNC=False, CROSSOVER_RATE=0.5, FITNESS_THRESHOLD=1e-6, MAX_GENS=50, MIXING_RATE=0.8, NON_NEGATIVE=True, paramRangeDict=None, ...
iut-ibk/DynaMind-UrbanSim
refs/heads/master
3rdparty/opus/src/opus_gui/models_manager/run/__init__.py
538
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE
double-y/django
refs/heads/master
django/conf/locale/de_CH/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
RuudBurger/CouchPotatoServer
refs/heads/master
libs/pyutil/test/deprecated/test_dictutil.py
106
#!/usr/bin/env python # Copyright (c) 2002-2009 Zooko "Zooko" Wilcox-O'Hearn # This file is part of pyutil; see README.rst for licensing terms. import random, sys, traceback, unittest from pyutil.assertutil import _assert from pyutil import dictutil class EqButNotIs: def __init__(self, x): self.x = x...
Serag8/Bachelor
refs/heads/master
google_appengine/lib/django-1.3/django/contrib/admin/filterspecs.py
148
""" FilterSpec encapsulates the logic for displaying filters in the Django admin. Filters are specified in models with the "list_filter" option. Each filter subclass knows how to display a filter for a field that passes a certain test -- e.g. being a DateField or ForeignKey. """ from django.db import models from djan...
adit-chandra/tensorflow
refs/heads/master
tensorflow/python/autograph/converters/break_statements_test.py
6
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
eckucukoglu/arm-linux-gnueabihf
refs/heads/master
arm-linux-gnueabihf/libc/usr/lib/python2.7/wave.py
45
"""Stuff to parse WAVE files. Usage. Reading WAVE files: f = wave.open(file, 'r') where file is either the name of a file or an open file pointer. The open file pointer must have methods read(), seek(), and close(). When the setpos() and rewind() methods are not used, the seek() method is not necessary. This ...
JioCloud/cinder
refs/heads/master
cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py
19
# (c) Copyright 2014 Cisco Systems 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 # # Unl...
attakei/ansible
refs/heads/devel
lib/ansible/parsing/utils/addresses.py
18
# Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
fitzgen/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/parse.py
420
#!/usr/bin/env python """usage: %prog [options] filename Parse a document to a tree, with optional profiling """ import sys import os import traceback from optparse import OptionParser from html5lib import html5parser, sanitizer from html5lib.tokenizer import HTMLTokenizer from html5lib import treebuilders, serializ...
cryptickp/libcloud
refs/heads/trunk
libcloud/test/compute/test_elasticstack.py
13
# 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 use ...
Mistobaan/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/initializers_test.py
34
# 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...
jessamynsmith/my_project
refs/heads/master
app1/urls.py
1
from django.urls import path from . import views # Import the views for this app urlpatterns = [ path('', views.index, name="index"), ]
rgaiacs/perprof-py
refs/heads/master
doc/conf.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # perprof-py documentation build configuration file, created by # sphinx-quickstart on Thu Mar 20 11:24:11 2014. # # 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 #...
JianyuWang/neutron
refs/heads/master
neutron/tests/tempest/common/utils/misc.py
60
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
yashsharan/sympy
refs/heads/master
sympy/matrices/expressions/matadd.py
8
from __future__ import print_function, division from sympy.core.compatibility import reduce from operator import add from sympy.core import Add, Basic, sympify from sympy.functions import adjoint from sympy.matrices.matrices import MatrixBase from sympy.matrices.expressions.transpose import transpose from sympy.strat...
nakajimakou1/cvdrone-master_leap
refs/heads/master
src/3rdparty/LeapSDK/lib/Leap.py
23
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.9 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
HeraclesHX/scikit-learn
refs/heads/master
sklearn/datasets/__init__.py
176
""" The :mod:`sklearn.datasets` module includes utilities to load datasets, including methods to load and fetch popular reference datasets. It also features some artificial data generators. """ from .base import load_diabetes from .base import load_digits from .base import load_files from .base import load_iris from ....
sidja/Django_Shop_Lite
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shop_lite.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mikarubi/thunder
refs/heads/master
test/test_decoding.py
8
import shutil import tempfile from numpy import array, vstack from numpy.testing import assert_array_almost_equal from scipy.stats import ttest_ind from thunder.decoding.uniclassify import MassUnivariateClassifier from test_utils import PySparkTestCase from thunder.rdds.series import Series class ClassificationTestCa...
mindbender-studio/setup
refs/heads/master
bin/windows/python36/Lib/string.py
6
"""A collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a ...
rajathkumarmp/numpy
refs/heads/master
numpy/core/tests/test_api.py
92
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.compat import sixu from numpy.testing import ( run_module_suite, assert_, assert_equal, assert_array_equal, assert_raises ) # Switch between new behaviour when NPY_RELAXED_STRIDES_CHECKING is set. NPY_...
aurelijusb/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/command/install_scripts.py
64
"""distutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.""" # contributed by Bastian Kleineidam # This module should be kept compatible with Python 2.1. __revision__ = "$Id: install_scripts.py 37828 2004-11-10 22:23:15Z loewis $" import os from distuti...
wittrup/crap
refs/heads/master
sCRAPing/eiendom/adresse.py
1
import requests import json from distutils.util import strtobool from os.path import isfile, splitext as pathsplitext import pickle import collections import grunnbok import re gatenavn, destfolder, husnrlav = [l.strip() for l in open("ignore/config.txt", encoding='utf-8').readlines()] print('Lagrer grunnbøker for',...
tarunbansal/incubator-quickstep
refs/heads/master
third_party/tmb/third_party/gtest/test/gtest_xml_output_unittest.py
1815
#!/usr/bin/env python # # Copyright 2006, 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...
slohse/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_elementsw_network_interfaces.py
9
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) ''' Element Software Node Network Interfaces - Bond 1G and 10G configuration ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METAD...
saurabhjn76/sympy
refs/heads/master
sympy/utilities/__init__.py
84
"""This module contains some general purpose utilities that are used across SymPy. """ from .iterables import (flatten, group, take, subsets, variations, numbered_symbols, cartes, capture, dict_merge, postorder_traversal, interactive_traversal, prefixes, postfixes, sift, topological_sort, unflatten, has...
bowenliu16/deepchem
refs/heads/master
deepchem/models/tensorflow_models/model_ops.py
3
#"""Ops for graph construction.""" #from __future__ import print_function #from __future__ import division #from __future__ import unicode_literals # #import sys #import traceback #import tensorflow as tf #from keras import backend as K # #def cosine_distances(test, support): # """Computes pairwise cosine distances be...