repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
zqzhang/crosswalk-test-suite
misc/webapi-service-tests/inst.py
19
3212
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
django-oscar/django-oscar-mws
oscar_mws/migrations/0002_auto__add_field_fulfillmentorderline_shipment__add_field_fulfillmentor.py
1
34713
# -*- 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 'FulfillmentOrderLine.shipment' db.add_column('oscar_mws_fulfillmentorderline', 'shipment', ...
bsd-3-clause
eloquence/unisubs
apps/externalsites/syncing/brightcove.py
4
2423
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your op...
agpl-3.0
xchenum/quantum
quantum/rootwrap/ryu-agent.py
3
1131
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Openstack, LLC. # 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...
apache-2.0
barbarahui/harvester
harvester/post_processing/couchdb_runner.py
3
6598
import datetime import time from redis import Redis from rq import Queue from harvester.config import config from harvester.couchdb_init import get_couchdb from harvester.couchdb_pager import couchdb_pager COUCHDB_VIEW = 'all_provider_docs/by_provider_name' def get_collection_doc_ids(collection_id, url_couchdb_sour...
bsd-3-clause
pdellaert/ansible
test/units/template/test_template_utilities.py
54
4250
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.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 later ...
gpl-3.0
stvstnfrd/edx-platform
pavelib/paver_tests/test_paver_get_quality_reports.py
1
1506
""" Tests to ensure only the report files we want are returned as part of run_quality. """ import unittest from mock import patch import pavelib.quality class TestGetReportFiles(unittest.TestCase): """ Ensure only the report files we want are returned as part of run_quality. """ @patch('os.walk')...
agpl-3.0
n3wb13/OpenNfrGui-5.0-1
lib/python/Components/VolumeControl.py
1
2495
from enigma import eDVBVolumecontrol, eTimer from Tools.Profile import profile from Screens.Volume import Volume from Screens.Mute import Mute from GlobalActions import globalActionMap from config import config, ConfigSubsection, ConfigInteger profile("VolumeControl") #TODO .. move this to a own .py file class VolumeC...
gpl-2.0
yk5/beam
sdks/python/apache_beam/transforms/timeutil.py
9
4081
# # 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...
apache-2.0
yx91490/pgcli
pgcli/packages/pgspecial/iocommands.py
7
4198
import re import logging import click import io from os.path import expanduser from .namedqueries import namedqueries from . import export from .main import special_command _logger = logging.getLogger(__name__) @export def editor_command(command): """ Is this an external editor command? :param command: s...
bsd-3-clause
mrquim/mrquimrepo
script.module.covenant/lib/resources/lib/modules/filmon.py
25
1267
# -*- coding: utf-8 -*- import re,urlparse,json from resources.lib.modules import client def resolve(url): try: if '/vod/' in url: url = re.compile('/(\d+)').findall(url)[-1] url = 'http://www.filmon.com/vod/info/%s' % url elif '/tv/' in url: url = url.replace...
gpl-2.0
sgerhart/ansible
lib/ansible/plugins/action/net_l2_interface.py
648
1057
# (c) 2017, Ansible 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 di...
mit
ykim362/mxnet
benchmark/python/sparse/util.py
32
1452
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
BrAwnyTime/RayTracer
Textures/makeScaledTex.py
1
1585
import numpy as np import time import tables import sys '''---------------------------------------------------------''' ''' Setup PyTables Files ''' '''---------------------------------------------------------''' scale = 2 originalName = "earthScaled8" scaledName = "earthScaled16" ...
mit
pattarapol-iamngamsup/projecteuler_python
problem_011.py
1
6237
""" Copyright 2012, July 31 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Largest product in a grid Problem 11 In the 20 X 20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 ...
gpl-3.0
eduardo-matos/SQLAlchemy-mommy
tests/test_mommy.py
2
4316
from unittest import TestCase from datetime import date, datetime from sqlalchemy import Integer, String, SmallInteger, BigInteger, Boolean, Date, DateTime, Enum, Float from factory_alchemist import factory from . import BaseTest from .dummy_models import Session, Spam, Ham, BaseModel, FishTable factory.BaseModel = B...
mit
xmission/d-note
venv/lib/python2.7/site-packages/Crypto/SelfTest/Random/test_rpoolcompat.py
131
2030
# -*- coding: utf-8 -*- # # SelfTest/Util/test_winrandom.py: Self-test for the winrandom module # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that d...
agpl-3.0
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_available_delegations_operations.py
1
5366
# 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 may ...
mit
Plain-Andy-legacy/android_external_chromium_org
chrome/browser/web_dev_style/regex_check.py
95
1072
# 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. def RegexCheck(re, line_number, line, regex, msg): """Searches for |regex| in |line| to check for a particular style violation, returning a message l...
bsd-3-clause
FusionSP/android_external_chromium_org
third_party/protobuf/python/ez_setup.py
454
10334
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2011/1/21. """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup...
bsd-3-clause
borysiasty/QGIS
python/core/additions/qgssettings.py
44
4986
# -*- coding: utf-8 -*- """ *************************************************************************** qgssettings.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch *************************************...
gpl-2.0
tungvx/deploy
.google_appengine/lib/django_1_2/tests/regressiontests/cache/tests.py
38
28208
# -*- coding: utf-8 -*- # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import os import tempfile import time import unittest import warnings from django.conf import settings from django.core import management from django.core.cache import get_cache from django.core.c...
apache-2.0
semk/voldemort
voldemort/__init__.py
1
19088
# -*- coding: utf-8 -*- # # Voldemort: A static site generator using Jinja2 and Markdown templates # # @author: Sreejith K # Created On 19th Sep 2011 import os import sys import logging import datetime import shutil import urllib from optparse import OptionParser import BaseHTTPServer from SimpleHTTPServer import Sim...
apache-2.0
ThomasMcVay/MediaApp
MediaAppKnobs/KnobElements/FloatWidget.py
1
1798
#=============================================================================== # @Author: Madison Aster # @ModuleDescription: # @License: # MediaApp Library - Python Package framework for developing robust Media # Applications with Qt Library # Copyright (C) 2013 Madison Aster # ...
lgpl-2.1
bluestar-solutions/account-invoicing
stock_invoice_picking_incoterm/account_invoice.py
20
1333
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
agpl-3.0
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/theano/gof/tests/test_toolbox.py
7
2235
from theano.gof.graph import Variable, Apply from theano.gof.type import Type from theano.gof.op import Op from theano.gof.fg import FunctionGraph from theano.gof.toolbox import * # noqa def as_variable(x): assert isinstance(x, Variable) return x class MyType(Type): def __init__(self, name): ...
mit
ARM-software/astc-encoder
Test/astc_quality_test.py
1
3498
#!/usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 # ----------------------------------------------------------------------------- # Copyright 2021 Arm Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain ...
apache-2.0
devendermishrajio/nova
nova/tests/unit/api/openstack/compute/test_floating_ips_bulk.py
35
8763
# Copyright 2012 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...
apache-2.0
felixjimenez/django
tests/admin_filters/tests.py
49
35499
from __future__ import absolute_import, unicode_literals import datetime from django.contrib.admin import (site, ModelAdmin, SimpleListFilter, BooleanFieldListFilter) from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User ...
bsd-3-clause
tensorflow/models
official/vision/image_classification/optimizer_factory.py
1
6894
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
indictranstech/biggift-erpnext
erpnext/patches/v6_4/fix_expense_included_in_valuation.py
44
3182
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr def execute(): for company in frappe.db.sql("select name, expenses_included_in_valuation from tabCompany",...
agpl-3.0
JohnyEngine/CNC
opencamlib/scripts/fiber/fiber_10_offsets.py
8
3748
import ocl import camvtk import time import vtk import datetime import math def generateRange(zmin,zmax,zNmax): if zNmax>1: dz = (float(zmax)-float(zmin))/(zNmax-1) else: dz = 0 zvals=[] for n in xrange(0,zNmax): zvals.append(zmin+n*dz) return zvals def waterline(cutter...
apache-2.0
ChinaMassClouds/copenstack-server
openstack/src/horizon-2014.2/openstack_dashboard/dashboards/admin/flavors/urls.py
6
1297
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
gpl-2.0
zzicewind/nova
nova/tests/unit/keymgr/test_barbican.py
61
8599
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
thinkopensolutions/PySPED
pysped/exemplos/003_versao_1.10_cancelar_nota.py
9
3952
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 2010-2012 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Library General Public Lic...
lgpl-2.1
mshafiq9/django
tests/httpwrappers/tests.py
179
27774
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import copy import json import os import pickle import unittest import uuid from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder from django.core.signals import request_finished from django.d...
bsd-3-clause
supracd/pygal
pygal/graph/xy.py
3
4049
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2015 Kozea # # This library 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...
lgpl-3.0
tectronics/wot-xvm
src/xpm/xpm/mods/lib/tlslite/tlsrecordlayer.py
4
45282
# Authors: # Trevor Perrin # Google (adapted by Sam Rushing) - NPN support # Martin von Loewis - python 3 port # # See the LICENSE file for legal information regarding use of this file. """Helper class for TLSConnection.""" from __future__ import generators from .utils.compat import * from .utils.cryptomath im...
gpl-3.0
Pluto-tv/chromium-crosswalk
tools/telemetry/third_party/gsutilz/third_party/boto/boto/glacier/__init__.py
145
1685
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 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 ...
bsd-3-clause
electrolinux/weblate
weblate/accounts/pipeline.py
2
4640
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
gpl-3.0
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/cs/cspolicylabel_cspolicy_binding.py
1
9664
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
codeprimate/arid
powerline/powerline/bindings/ipython/post_0_11.py
12
3366
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from weakref import ref from warnings import warn try: from IPython.core.prompts import PromptManager has_prompt_manager = True except ImportError: has_prompt_manager = False from IPython.core.magic i...
bsd-2-clause
chirpd/chirpd-platform
node_modules/grunt-coffeelint/node_modules/grunt/node_modules/gzip-js/node_modules/deflate-js/test/runner.py
177
1688
#!/usr/bin/env python import argparse import deflate import inflate from colorama import Fore testDir = 'test-files' outDir = 'test-outs' allPassed = True parser = argparse.ArgumentParser(description='Process command-line arguments') parser.add_argument('--test', metavar='path/to/file', type=str, default='both', na...
mit
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1777
19348
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
mit
ChrisAntaki/phantomjs
src/breakpad/src/tools/gyp/test/generator-output/gyptest-actions.py
151
1953
#!/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 --generator-output= behavior when using actions. """ import TestGyp test = TestGyp.TestGyp() # All the generated files shoul...
bsd-3-clause
KodiColdkeys/coldkeys-addons
repository/plugin.video.christmas/plugintools.py
19
18074
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Plugin Tools v1.0.8 #--------------------------------------------------------------------------- # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Based on code from youtube, parsedom and pelisalacarta addon...
gpl-2.0
makinacorpus/Geotrek
geotrek/feedback/serializers.py
2
1562
from django.contrib.gis.geos import GEOSGeometry from rest_framework import serializers as rest_serializers from rest_framework_gis.fields import GeometryField from rest_framework_gis.serializers import GeoFeatureModelSerializer from geotrek.feedback import models as feedback_models class ReportSerializer(rest_seria...
bsd-2-clause
gfetterman/bark
bark/tools/barkutils.py
1
12062
import os.path from glob import glob import bark import argparse from bark import stream import arrow from dateutil import tz import numpy import sys import subprocess def meta_attr(): p = argparse.ArgumentParser( description="Create/Modify a metadata attribute") p.add_argument("name", help="name of b...
gpl-2.0
JioCloud/oslo.concurrency
oslo_concurrency/tests/unit/test_processutils.py
2
25838
# Copyright 2011 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 req...
apache-2.0
MungoRae/home-assistant
homeassistant/components/downloader.py
10
4207
""" Support for functionality to download files. For more details about this component, please refer to the documentation at https://home-assistant.io/components/downloader/ """ import logging import os import re import threading import requests import voluptuous as vol import homeassistant.helpers.config_validation...
apache-2.0
abergeron/pylearn2
pylearn2/cross_validation/train_cv_extensions.py
30
4560
""" Cross-validation training extensions. """ __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "3-clause BSD" import numpy as np import os from pylearn2.train import SerializationGuard from pylearn2.train_extensions.best_params import MonitorBasedSaveBest from pylearn...
bsd-3-clause
jgcaaprom/android_external_chromium_org
tools/telemetry/examples/measure_trace.py
41
3169
#!/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. import collections import json import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.appen...
bsd-3-clause
zhuwenping/python-for-android
python-modules/twisted/twisted/test/test_defgen.py
80
8182
from __future__ import generators, nested_scopes import sys from twisted.internet import reactor from twisted.trial import unittest, util from twisted.internet.defer import waitForDeferred, deferredGenerator, Deferred from twisted.internet import defer def getThing(): d = Deferred() reactor.callLater(0, d....
apache-2.0
taosheng/jarvis
chatbot/src/socialEnBrain.py
1
2090
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import json import requests import re import random import time import sys import csv from genericKB import genericHandler from esHealth import esHealthHandler from wikiFinder import findWikiEn #from io import open import codecs #from pttChat import pttHandler #from wik...
apache-2.0
manazhao/tf_recsys
tensorflow/python/util/example_parser_configuration_test.py
157
2775
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
EvaSDK/sqlalchemy
test/orm/test_dynamic.py
25
29418
from sqlalchemy import testing, desc, select, func, exc, cast, Integer from sqlalchemy.orm import ( mapper, relationship, create_session, Query, attributes, exc as orm_exc, Session, backref, configure_mappers) from sqlalchemy.orm.dynamic import AppenderMixin from sqlalchemy.testing import ( AssertsCompiledS...
mit
rleadbetter/Sick-Beard
lib/hachoir_parser/misc/msoffice.py
90
4405
""" Parsers for the different streams and fragments found in an OLE2 file. Documents: - goffice source code Author: Robert Xiao, Victor Stinner Creation: 2006-04-23 """ from lib.hachoir_parser import HachoirParser from lib.hachoir_core.field import FieldSet, RootSeekableFieldSet, RawBytes from lib.hachoir_core.endi...
gpl-3.0
guewen/OpenUpgrade
addons/hr_recruitment/report/__init__.py
442
1107
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
fernandezcuesta/ansible
lib/ansible/modules/network/iosxr/iosxr_banner.py
8
4635
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', ...
gpl-3.0
sajuptpm/neutron-ipam
neutron/tests/unit/vmware/nsxlib/test_versioning.py
8
2429
# Copyright (c) 2014 VMware, 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...
apache-2.0
jkitchin/jasp
jasp/jasp_bandstructure.py
3
3749
'''Calculate bandstructure diagrams in jasp''' from jasp import * import os import matplotlib.pyplot as plt from ase.dft import DOS def get_bandstructure(self, kpts_path=None, kpts_nintersections=10): """Calculate band structure along :param kpts_path: :param list...
gpl-2.0
squidsoup/snapcraft
snapcraft/tests/commands/test_history.py
5
6919
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
gpl-3.0
direvus/ansible
test/units/module_utils/facts/test_facts.py
38
22766
# This file is part of Ansible # -*- coding: utf-8 -*- # # # 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 dis...
gpl-3.0
haeusser/tensorflow
tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py
75
29377
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
JioCloud/nova
nova/api/openstack/compute/plugins/v3/extension_info.py
5
8548
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
synologix/enigma2
lib/python/Plugins/Extensions/Infopanel/CamStart.py
20
5928
from Components.config import config, ConfigSubsection, ConfigText, ConfigSelection, ConfigYesNo from enigma import * import os import datetime config.softcam.actCam = ConfigText(visible_width = 200) config.softcam.restartRunning = ConfigYesNo(default=True) config.softcam.restartAttempts = ConfigSelection( ...
gpl-2.0
gypleon/DeepLearningProject
deprecated_codes/read_param_init.py
2
3410
from __future__ import print_function import torchfile import numpy as np EMBEDDING = torchfile.load('../lstm-char-cnn/param_init_1.t7') KERNEL_1_W = torchfile.load('../lstm-char-cnn/param_init_2.t7') KERNEL_1_B = torchfile.load('../lstm-char-cnn/param_init_3.t7') LSTM_1_W = torchfile.load('../lstm-char-cnn/param_i...
apache-2.0
MarkGriffiths/iTerm2
tools/ply/ply-3.4/setup.py
62
1197
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name = "ply", description="Python Lex & Yacc", long_description = """ PLY is yet another implementation of lex and yacc for Python. Some notable features include the fact that its implemented en...
gpl-2.0
apache-spark-on-k8s/spark
python/pyspark/ml/tests.py
3
74389
# # 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...
apache-2.0
fritsch/xbmc
lib/libUPnP/Neptune/Extras/Scripts/GenTrustAnchorsTables.py
264
5364
#! /usr/bin/env python ### ### Generate trust anchor tables from a text file ### like, for example, TLS-Trust-Anchors-base.crt ## and TLS-Trust-Anchors-extended.crt located under Extras/Data ### ### imports import sys import base64 ### generate a C file with bult-in TLS trust anchors FILE_HEADER = """/**************...
gpl-2.0
tmuelle2/phantomjs
src/qt/qtwebkit/Source/JavaScriptCore/KeywordLookupGenerator.py
117
11965
# Copyright (C) 2011 Apple Inc. All rights reserved. # Copyright (C) 2012 Sony Network Entertainment. 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 retai...
bsd-3-clause
jeffmay/google-diff-match-patch
python3/diff_match_patch.py
297
67320
#!/usr/bin/python3 """Diff Match and Patch Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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/lic...
apache-2.0
jas14/khmer
scripts/extract-paired-reads.py
1
3488
#! /usr/bin/env python # # This script is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll.org # # pylint: disable=invalid-name,missing-docstring """ Split up pa...
bsd-3-clause
pattisdr/osf.io
tests/test_registrations/base.py
1
2821
import copy import datetime as dt from django.utils import timezone from framework.auth import Auth from osf.utils import permissions from osf.models import RegistrationSchema from tests.base import OsfTestCase from osf_tests.factories import AuthUserFactory, ProjectFactory, DraftRegistrationFactory class Registra...
apache-2.0
rue89-tech/edx-platform
lms/djangoapps/dashboard/views.py
131
3337
"""View functions for the LMS Student dashboard""" from django.http import Http404 from edxmako.shortcuts import render_to_response from django.db import connection from student.models import CourseEnrollment from django.contrib.auth.models import User def dictfetchall(cursor): '''Returns a list of all rows from...
agpl-3.0
CondensedOtters/PHYSIX_Utils
Projects/Moog_2016-2019/CO2/CO2_NN/analysis.py
1
9175
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 14 05:54:11 2020 @author: mathieumoog """ import cpmd import filexyz import numpy as np import matplotlib.pyplot as plt # MSMbuilder ( lacks CK validation ) from msmbuilder.msm import MarkovStateModel from msmbuilder.msm import BayesianMarkovStateM...
gpl-3.0
sgso/RIOT
dist/tools/pyterm/testbeds/testbeds.py
100
7138
#!/usr/bin/python2 # -*- coding: utf-8 -*- # Copyright (C) 2014 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de> # # This library 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 2...
lgpl-2.1
yannickcr/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/redtube.py
7
1560
from __future__ import unicode_literals import re from .common import InfoExtractor class RedTubeIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?redtube\.com/(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.redtube.com/66418', 'file': '66418.mp4', # md5 varies from time to time, as in...
gpl-3.0
gabrielleLQX/SAM3_codeqemu
tests/qemu-iotests/iotests.py
20
9652
# Common utilities and Python wrappers for qemu-iotests # # Copyright (C) 2012 IBM Corp. # # 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) ...
gpl-2.0
yousafsyed/casperjs
bin/Lib/test/test_importlib/test_locks.py
84
5113
from . import util frozen_init, source_init = util.import_importlib('importlib') frozen_bootstrap = frozen_init._bootstrap source_bootstrap = source_init._bootstrap import sys import time import unittest import weakref from test import support try: import threading except ImportError: threading = None else: ...
mit
x303597316/hue
desktop/core/ext-py/Django-1.6.10/tests/select_related_onetoone/models.py
70
2384
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class User(models.Model): username = models.CharField(max_length=100) email = models.EmailField() def __str__(self): return self.username @python_2_unicode_compatible class Us...
apache-2.0
ntt-sic/neutron
neutron/tests/unit/db/loadbalancer/test_db_loadbalancer.py
5
69291
# Copyright (c) 2012 OpenStack Foundation. # # 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...
apache-2.0
ecosoft-odoo/odoo
openerp/service/common.py
281
1873
# -*- coding: utf-8 -*- import logging import openerp.release import openerp.tools from openerp.tools.translate import _ import security _logger = logging.getLogger(__name__) RPC_VERSION_1 = { 'server_version': openerp.release.version, 'server_version_info': openerp.release.version_info, 's...
agpl-3.0
keithroe/vtkoptix
Examples/DataManipulation/Python/FinancialField.py
8
8599
#!/usr/bin/env python # This example demonstrates the use of fields and use of # vtkProgrammableDataObjectSource. It creates fields the hard way (as # compared to reading a vtk field file), but shows you how to # interface to your own raw data. import os import re import vtk from vtk.util.misc import vtkGetDataRoot V...
bsd-3-clause
donald-pinckney/EM-Simulator
EM Sim/EM SimContent/Lib/imaplib.py
167
47665
"""IMAP4 client. Based on RFC 2060. Public class: IMAP4 Public variable: Debug Public functions: Internaldate2tuple Int2AP ParseFlags Time2Internaldate """ # Author: Piers Lauder <piers@cs.su.oz.au> December 1997. # # Auth...
apache-2.0
stackforge/solum
solum/api/handlers/extension_handler.py
2
1756
# 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 # distributed under t...
apache-2.0
yoer/hue
desktop/core/src/desktop/wsgi.py
35
1055
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
apache-2.0
Ecogenomics/CheckM
checkm/plot/distributionPlots.py
1
2841
############################################################################### # # codingDensityPlots.py - Create a GC histogram and a delta-CD plot. # ############################################################################### # # #...
gpl-3.0
GDGLima/contentbox
third_party/httplib2/socks.py
5
18897
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. 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, ...
apache-2.0
RichardLitt/wyrd-django-dev
tests/regressiontests/extra_regress/tests.py
57
14103
from __future__ import absolute_import, unicode_literals import datetime from django.contrib.auth.models import User from django.test import TestCase from django.utils.datastructures import SortedDict from .models import TestObject, Order, RevisionableModel class ExtraRegressTests(TestCase): def setUp(self): ...
bsd-3-clause
aayushidwivedi01/spark-tk
python/sparktk/graph/graph.py
9
13323
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
apache-2.0
rue89-tech/edx-platform
scripts/hotfix.py
154
1898
#!/usr/bin/env python """ Script to generate alton and git commands for executing hotfixes Commands for: - cutting amis - creating hotfix tag The script should be run with the hotfix's git hash as a command-line argument. i.e. `python scripts/hotfix.py <hotfix hash>` """ from __future__ import print_function from ...
agpl-3.0
KapecK/or-tools
examples/data/nonogram_regular/nonogram_castle.py
74
4019
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
zhangfangyan/devide
modules/filters/EditMedicalMetaData.py
7
8569
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. from module_base import ModuleBase from module_mixins import IntrospectModuleMixin import module_kits.vtk_kit import module_utils import vtk import wx from module_kits.misc_kit.devide_types import MedicalMetaData class EditM...
bsd-3-clause
shastikk/youtube-dl
youtube_dl/utils.py
17
76642
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import calendar import codecs import contextlib import ctypes import datetime import email.utils import errno import functools import gzip import itertools import io import json import locale import math import operator import os im...
unlicense
fidomason/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 ...
lgpl-3.0
Varentsov/servo
tests/wpt/web-platform-tests/referrer-policy/generic/subresource/image.py
55
3859
import os, sys, array, json, math, StringIO sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import subresource class Image: """This class partially implements the interface of the PIL.Image.Image. One day in the future WPT might support the PIL module or another imaging library, so thi...
mpl-2.0
agustin380/django-localflavor
localflavor/mk/mk_choices.py
17
2532
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ #: Macedonian municipalities per the reorganization from 2004. MK_MUNICIPALITIES = ( ('AD', _('Aerodrom')), ('AR', _('Aračinovo')), ('BR', _('Berovo')), ('TL', _('Bitola')), ('BG...
bsd-3-clause
GuoqingJiang/SLE12-clustermd
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
dotmpe/htcache
Protocol.py
1
18422
""" The Protocol object relays the client request, accumulates the server response data, and combines it with the cached. From there the Response object reads this to the client. """ import calendar, os, time, socket, re import Params, Runtime, Response, Resource, Rules import HTTP #from util import * import log ma...
gpl-3.0