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
DavidGuben/rcbplayspokemon
app/pywin32-220/com/win32comext/shell/demos/browse_for_folder.py
47
1661
# A couple of samples using SHBrowseForFolder import sys, os from win32com.shell import shell, shellcon import win32gui # A callback procedure - called by SHBrowseForFolder def BrowseCallbackProc(hwnd, msg, lp, data): if msg== shellcon.BFFM_INITIALIZED: win32gui.SendMessage(hwnd, shellcon.BFFM_SETSELECTIO...
mit
tungvx/deploy
.google_appengine/lib/django_1_2/tests/modeltests/defer/tests.py
92
5272
from django.db.models.query_utils import DeferredAttribute from django.test import TestCase from models import Secondary, Primary, Child, BigChild class DeferTests(TestCase): def assert_delayed(self, obj, num): count = 0 for field in obj._meta.fields: if isinstance(obj.__class__.__dic...
apache-2.0
cpritam/moose
gui/utils/mergeLists.py
34
1682
#!/usr/bin/python ''' Merge the lists together preserving the ordering of master. "master" will be the merged list after completion. ''' def mergeLists(master, slave): for slave_value_position in xrange(0,len(slave)): value = slave[slave_value_position] if value in master: continue else: sl...
lgpl-2.1
mapio/prettytable-mirror
prettytable.py
42
62469
#!/usr/bin/env python # # Copyright (c) 2009-2014, Luke Maurits <luke@maurits.id.au> # All rights reserved. # With contributions from: # * Chris Clark # * Klein Stephane # * John Filleau # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
bsd-3-clause
indashnet/InDashNet.Open.UN2000
android/bionic/libc/tools/generate-NOTICE.py
5
5062
#!/usr/bin/python # Run with directory arguments from any directory, with no special setup required. # Or: # for i in libc libdl libm linker libstdc++ libthread_db ; do ./libc/tools/generate-NOTICE.py $i > $i/NOTICE ; done import ftplib import hashlib import os import re import shutil import string import subprocess i...
apache-2.0
renyi533/tensorflow
tensorflow/python/ops/control_flow_v2_func_graphs.py
8
1402
# Copyright 2019 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
petrjasek/superdesk-core
apps/publish/publish_service_tests.py
2
3235
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from b...
agpl-3.0
whereismyjetpack/ansible
test/units/plugins/strategy/test_strategy_base.py
32
20994
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
a-slide/ContaVect
ContaVect_src/Contavect_csv_sum.py
3
2177
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from sys import argv as argv import os, csv, glob """ Draft function to summarize the number of reads mapped in distribution files from several runs of Contavect in a single comprehensive csv file""" def main (): """Find csv files with a common patern fetch the 2 fi...
gpl-2.0
mwiencek/picard
picard/ui/cdlookup.py
1
3277
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006 Lukáš Lalinský # # 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...
gpl-2.0
BorisJeremic/Real-ESSI-Examples
analytic_solution/test_cases/Contact/Coupled_Contact/Steady_State_Single_Foundation_Sysytem_Under_Tension/CoupledSoftContact/n_0.5/compare_txt.py
637
2094
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
cc0-1.0
p2pu/mechanical-mooc
twitter/views.py
1
1825
from django import http from django.conf import settings from django.views.decorators.http import require_http_methods import json from twitter import utils @require_http_methods(['POST']) def get_data(request): if 'twitter_handle' not in request.POST.keys(): return http.HttpResponseServerError() tw...
mit
gsehub/edx-platform
openedx/tests/completion_integration/test_models.py
10
9583
""" Test models, managers, and validators. """ from __future__ import absolute_import, division, unicode_literals from completion import models, waffle from completion.test_utils import CompletionWaffleTestMixin, submit_completions_for_testing from django.core.exceptions import ValidationError from django.test import...
agpl-3.0
noironetworks/nova
nova/scheduler/filters/isolated_hosts_filter.py
60
3357
# Copyright (c) 2011-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 # # Un...
apache-2.0
bolshoibooze/sympy_gamma
app/logic/utils.py
5
16740
from __future__ import division import difflib import collections import traceback import sys import ast import re from StringIO import StringIO import sympy from sympy.core.relational import Relational import sympy.parsing.sympy_tokenize as sympy_tokenize from token import NAME OTHER_SYMPY_FUNCTIONS = ('sqrt',) Arg...
bsd-3-clause
fschwiet/letscodejavascript
node_modules/npm/node_modules/node-gyp/gyp/test/mac/gyptest-postbuild-fail.py
84
1594
#!/usr/bin/env python # 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. """ Verifies that a failing postbuild step lets the build fail. """ import TestGyp import sys if sys.platform == 'darwin': # set |match...
mit
richardxx/mongoctl-service
build/lib.linux-x86_64-2.7/mongoctl/commands/misc/install.py
2
9046
__author__ = 'abdul' import os import platform import urllib import shutil from mongoctl.mongo_version import is_valid_version import mongoctl.config as config from mongoctl.prompt import prompt_execute_task, is_interactive_mode from mongoctl.utils import ensure_dir, dir_exists from mongoctl.mongoctl_logging import...
mit
begoldsm/autorest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/operations/header_operations.py
14
54924
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
DavidNorman/tensorflow
third_party/toolchains/preconfig/ubuntu14.04/gcc-nvcc-cuda10.0/windows/msvc_wrapper_for_nvcc.py
13
6700
#!/usr/bin/env python # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
OCA/carrier-delivery
base_delivery_carrier_label/models/delivery_carrier.py
1
1276
# -*- coding: utf-8 -*- # Copyright 2012 Akretion <http://www.akretion.com>. # Copyright 2013-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class DeliveryCarrier(models.Model): _inherit = 'delivery.carrier' @api.model def _get_carr...
agpl-3.0
nmayorov/scipy
benchmarks/benchmarks/signal_filtering.py
3
2439
import numpy as np import timeit from concurrent.futures import ThreadPoolExecutor, wait try: from scipy.signal import lfilter, firwin, decimate, butter, sosfilt except ImportError: pass from .common import Benchmark class Decimate(Benchmark): param_names = ['q', 'ftype', 'zero_phase'] params = [ ...
bsd-3-clause
mixturemodel-flow/tensorflow
tensorflow/contrib/slim/nets.py
191
1609
# 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 applicable ...
apache-2.0
bigmonachus/Delaunay
site_scons/site_tools/scons_qt4/test/basic/reentrant/sconstest-reentrant.py
6
1599
#!/usr/bin/env python # # Copyright (c) 2001-2010 The SCons Foundation # # 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,...
gpl-3.0
lovexiaov/SandwichApp
venv/lib/python2.7/site-packages/wheel/signatures/__init__.py
565
3779
""" Create and verify jws-js format Ed25519 signatures. """ __all__ = [ 'sign', 'verify' ] import json from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary ed25519ll = None ALG = "Ed25519" def get_ed25519ll(): """Lazy import-and-test of ed25519 module""" global ed25519ll if not ...
apache-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.5.0/Lib/ctypes/test/test_callbacks.py
77
7848
import unittest from ctypes import * from ctypes.test import need_symbol import _ctypes_test class Callbacks(unittest.TestCase): functype = CFUNCTYPE ## def tearDown(self): ## import gc ## gc.collect() def callback(self, *args): self.got_args = args return args[-1] def c...
mit
kornicameister/ansible-modules-extras
cloud/amazon/cloudtrail.py
130
8364
#!/usr/bin/python # 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 distributed...
gpl-3.0
xyguo/scikit-learn
examples/cross_decomposition/plot_compare_cross_decomposition.py
55
4761
""" =================================== Compare cross decomposition methods =================================== Simple usage of various cross decomposition algorithms: - PLSCanonical - PLSRegression, with multivariate response, a.k.a. PLS2 - PLSRegression, with univariate response, a.k.a. PLS1 - CCA Given 2 multivari...
bsd-3-clause
cloudbase/neutron-virtualbox
neutron/tests/unit/notifiers/test_notifiers_nova.py
2
15128
# Copyright 2014 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...
apache-2.0
hardikk/newfies-dialer
newfies/dialer_campaign/tests.py
3
15255
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
mpl-2.0
arocks/steel-rumors
steelrumors/settings.py
1
5450
# Django settings for steelrumors project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'da...
mit
lmprice/ansible
test/units/modules/network/f5/test_bigip_monitor_tcp.py
26
13885
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip imp...
gpl-3.0
favcode/pydht
mysqlmtop/global_functions.py
2
2696
#!/bin/env python #-*-coding:utf-8-*- import MySQLdb import string import sys reload(sys) sys.setdefaultencoding('utf8') import ConfigParser import smtplib from email.mime.text import MIMEText from email.message import Message from email.header import Header def get_config(group,config_name): config = ConfigPa...
gpl-2.0
ta2-1/pootle
pootle/apps/pootle_app/management/commands/schema_commands/__init__.py
2
4219
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os os.environ['DJANGO_SETTINGS_MODULE...
gpl-3.0
alvaroaleman/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg.py
30
12964
#!/usr/bin/python # (c) 2016, NetApp, 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. ...
gpl-3.0
tersmitten/ansible
lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
13
13278
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@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', ...
gpl-3.0
techhat/libcloud
demos/gce_demo.py
13
37094
#!/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 "Licen...
apache-2.0
yashodhank/erpnext
erpnext/config/buying.py
1
4418
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Purchasing"), "icon": "fa fa-star", "items": [ { "type": "doctype", "name": "Material Request", "description": _("Request for purchase."), }, { "type": "doctype", "name":...
agpl-3.0
gavinp/chromium
third_party/protobuf/python/google/protobuf/message.py
261
9669
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
kkragenbrink/node-gyp
gyp/pylib/gyp/msvs_emulation.py
73
31885
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module helps emulate Visual Studio 2008 behavior on top of other build systems, primarily ninja. """ import os import re import subprocess import sys im...
mit
sgraham/nope
third_party/cython/src/pyximport/test/test_pyximport.py
103
1988
import pyximport; pyximport.install(reload_support=True) import os, sys import time, shutil import tempfile def make_tempdir(): tempdir = os.path.join(tempfile.gettempdir(), "pyrex_temp") if os.path.exists(tempdir): remove_tempdir(tempdir) os.mkdir(tempdir) return tempdir def remove_tempdir(t...
bsd-3-clause
heatherleaf/MCFParser.py
test/convert_mcfg_to_py.py
1
1550
import re import json import fileinput # F --> AO a [0,0;1,0] (* C --> /T,C T [0,0;1,0] *) # A --> AL H [0,0;1,0] (* D,-case --> /N,D,-case N [0,0;1,0] *) # I --> m [0,2;0,0][0,1] (* PastPart,-aux;-case --> +v,PastPart,-aux;-case;-v [0,2;0,0][0,1] *) # I --> p [0,1;0,0][0,2] (* PastPart,-aux;-ca...
gpl-3.0
meredith-digops/awsops
volumecleanup/volumecleanup.py
1
3967
#!/usr/bin/env python from __future__ import print_function import boto3 from botocore.exceptions import ClientError from datetime import datetime from datetime import timedelta from datetime import tzinfo DEFAULT_RETENTION_DAYS = None """If None, no default retention is applied""" ZERO = timedelta(0) class UTC(...
mit
gjbex/parameter-weaver
src/vsc/parameter_weaver/c/types.py
1
6550
# # ParameterWeaver: a code generator to handle command line parameters # and configuration files for C/C++/Fortran/R/Octave # Copyright (C) 2013 Geert Jan Bex <geertjan.bex@uhasselt.be> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
gpl-3.0
Affix/CouchPotatoServer
libs/chardet/constants.py
3008
1335
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
varunarya10/rally
rally/benchmark/context/sahara/sahara_image.py
2
3536
# 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 agreed to in writing, software #...
apache-2.0
viveksh13/gymkhana
venv/lib/python2.7/site-packages/pip/req/req_set.py
30
26547
from __future__ import absolute_import from collections import defaultdict import functools import itertools import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlr...
apache-2.0
elingg/tensorflow
tensorflow/contrib/factorization/examples/mnist.py
26
11701
# 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
hiepgia/android_kernel_lge_geeb
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
johncosta/private-readthedocs.org
readthedocs/core/models.py
1
1611
from django.db import models from django.db.models.signals import post_save from django.db.utils import DatabaseError from django.dispatch import receiver from django.contrib.auth.models import User STANDARD_EMAIL = "anonymous@readthedocs.org" class UserProfile (models.Model): """Additional information about a Us...
mit
nvoron23/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/cleanfuture.py
102
8578
#! /usr/bin/env python """cleanfuture [-d][-r][-v] path ... -d Dry run. Analyze, but don't make any changes to, files. -r Recurse. Search for all .py files in subdirectories too. -v Verbose. Print informative msgs. Search Python (.py) files for future statements, and remove the features from such statements th...
apache-2.0
yencarnacion/jaikuengine
appengine_django/management/commands/startapp.py
64
1371
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
codoo/clouder
clouder/clouder_base.py
2
31386
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License with Attribution # ...
gpl-3.0
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/pkg_resources/__init__.py
30
103308
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
mit
qtekfun/htcDesire820Kernel
external/chromium_org/build/android/pylib/uiautomator/setup.py
25
1088
# 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. """Generates test runner factory and tests for uiautomator tests.""" import logging import test_package import test_runner def Setup(test_options): """...
gpl-2.0
FernanOrtega/DAT210x
Module2/assignment3.py
1
1065
import pandas as pd # TODO: Load up the dataset # Ensuring you set the appropriate header column names # df = pd.read_csv('Datasets/servo.data', names=['motor', 'screw', 'pgain', 'vgain', 'class']) print df.head() # TODO: Create a slice that contains all entries # having a vgain equal to 5. Then print the # length ...
mit
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/core/mail/backends/filebased.py
558
2771
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailB...
mit
stacybird/lemur
lemur/defaults/views.py
9
1826
""" .. module: lemur.status.views :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. """ from flask import current_app, Blueprint from flask.ext.restful import Api from lemur.auth.service import AuthenticatedResource mod = Blueprint('default', __name__)...
apache-2.0
perryjrandall/arsenalsuite
cpp/lib/PyQt4/examples/widgets/calculator.py
20
12001
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
inspirehep/invenio
modules/webauthorprofile/lib/webauthorprofile_webinterface.py
2
35083
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2018, 2019 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
gpl-2.0
noplay/aiohttp
tests/test_web_request.py
1
5998
import asyncio import unittest from unittest import mock from aiohttp.web import Request from aiohttp.multidict import MultiDict, CIMultiDict from aiohttp.protocol import HttpVersion from aiohttp.protocol import RawRequestMessage class TestWebRequest(unittest.TestCase): def setUp(self): self.loop = async...
apache-2.0
sankhesh/VTK
ThirdParty/Twisted/twisted/names/test/test_hosts.py
22
8550
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the I{hosts(5)}-based resolver, L{twisted.names.hosts}. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase from twisted.python.filepath import FilePath from twisted.internet.defer impor...
bsd-3-clause
ITNano/WikiSubtitleReader
raw_to_ass.py
1
3753
# -*- coding: utf-8 -*- #Python class to parse lyrics on the form #Singer 1: I am so happy, hear me sing #And write it to an .ass file. (Advanced SubStation Alpha subtitle file) #The string before the separator ':' is used to format the text by mapping it to #a predefined format, the remainder is the actual text to sin...
apache-2.0
group-policy/rally
rally/plugins/openstack/scenarios/heat/stacks.py
5
10683
# Copyright 2014: Mirantis 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 b...
apache-2.0
petricm/DIRAC
Interfaces/scripts/dirac-admin-service-ports.py
4
1118
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-admin-service-ports # Author : Stuart Paterson ######################################################################## """ Print the service ports for the specified setup """ from __future__ ...
gpl-3.0
plotly/python-api
packages/python/plotly/plotly/validators/densitymapbox/__init__.py
1
3954
import sys if sys.version_info < (3, 7): from ._zsrc import ZsrcValidator from ._zmin import ZminValidator from ._zmid import ZmidValidator from ._zmax import ZmaxValidator from ._zauto import ZautoValidator from ._z import ZValidator from ._visible import VisibleValidator from ._uirevi...
mit
projecthamster/hamster
waflib/extras/use_config.py
49
5657
#!/usr/bin/env python # coding=utf-8 # Mathieu Courtois - EDF R&D, 2013 - http://www.code-aster.org """ When a project has a lot of options the 'waf configure' command line can be very long and it becomes a cause of error. This tool provides a convenient way to load a set of configuration parameters from a local file ...
gpl-3.0
agry/NGECore2
scripts/mobiles/tatooine/krayt_cult_ministrant.py
2
1665
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() mobi...
lgpl-3.0
emkael/jfrteamy-playoff
jfr_playoff/gui/tabs.py
1
18307
#coding=utf-8 import os from collections import OrderedDict import Tkinter as tk import ttk import tkFileDialog as tkfd import tkMessageBox as tkmb from .frames import TraceableText, NumericSpinbox from .frames.match import * from .frames.network import * from .frames.team import * from .frames.translations import *...
bsd-2-clause
LeroViten/LerNex-Ancora-Kernel
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
shashank971/edx-platform
common/djangoapps/student/tests/test_email.py
63
17946
import json import django.db import unittest from student.tests.factories import UserFactory, RegistrationFactory, PendingEmailChangeFactory from student.views import ( reactivation_email_for_user, do_email_change_request, confirm_email_change, validate_new_email, SETTING_CHANGE_INITIATED ) from student.model...
agpl-3.0
thaim/ansible
lib/ansible/utils/cmd_functions.py
233
2793
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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 lat...
mit
sdanielf/dictate
dictation/config.py
1
2826
# Copyright (C) 2013 S. Daniel Francis <francis@sugarlabs.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; either version 3 of the License, or # (at your option) any later version. # # Thi...
gpl-3.0
jessrosenfield/pants
contrib/node/src/python/pants/contrib/node/targets/node_module.py
8
1589
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.payl...
apache-2.0
mouadino/scrapy
scrapy/contrib/logstats.py
19
2065
from twisted.internet import task from scrapy.xlib.pydispatch import dispatcher from scrapy.exceptions import NotConfigured from scrapy.conf import settings from scrapy import log, signals class Slot(object): def __init__(self): self.items = 0 self.itemsprev = 0 self.pages = 0 sel...
bsd-3-clause
ealmansi/incc-tp-final
src/gensim/tut2.py
1
1637
#!/usr/bin/env python # -*- coding: utf-8 -*- # https://radimrehurek.com/gensim/tut2.html import logging logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) import os from gensim import corpora, models, similarities if (os.path.exists("/tmp/deerwester.dict")): dictionary = ...
mit
milapour/palm
palm/test/test_blink_model.py
1
3374
import nose.tools from palm.blink_factory import SingleDarkBlinkFactory,\ DoubleDarkBlinkFactory,\ ConnectedDarkBlinkFactory from palm.blink_model import BlinkModel from palm.blink_parameter_set import SingleDarkParameterSet,\ ...
bsd-2-clause
DeepVisionTeam/TensorFlowBook
Titanic/data_processing.py
2
4807
import os import re import pandas as pd import tensorflow as tf pjoin = os.path.join DATA_DIR = pjoin(os.path.dirname(__file__), 'data') train_data = pd.read_csv(pjoin(DATA_DIR, 'train.csv')) test_data = pd.read_csv(pjoin(DATA_DIR, 'test.csv')) # Translation: # Don: an honorific title used in Spain, Portugal, Ital...
apache-2.0
holmes/intellij-community
python/lib/Lib/site-packages/django/contrib/admin/actions.py
83
2968
""" Built-in, globally-available admin actions. """ from django import template from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.shortcuts import render_to_resp...
apache-2.0
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/requests/packages/chardet/chardistribution.py
2755
9226
######################## 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...
bsd-3-clause
ptisserand/ansible
lib/ansible/modules/packaging/os/apt_repository.py
13
19320
#!/usr/bin/python # encoding: utf-8 # Copyright: (c) 2012, Matt Wright <matt@nobien.net> # Copyright: (c) 2013, Alexander Saltanov <asd@mokote.com> # Copyright: (c) 2014, Rutger Spiertz <rutger@kumina.nl> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ imp...
gpl-3.0
MarkTseng/django-farmersale
farmersale-env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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
crodrigues96/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-default.py
399
1260
#!/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 building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
gpl-3.0
tomzw11/Pydrone
route.py
1
2000
import matplotlib.pyplot as plt import matplotlib.patches as patches def route(root): root_height = root[2] coordinates = [\ [0.42*root_height+root[0],0.42*root_height+root[1],root_height/2],\ [-0.42*root_height+root[0],0.42*root_height+root[1],root_height/2],\ [-0.42*root_height+root[0],-0.15*root_height+root[1]...
mit
goodfeli/pylearn2
pylearn2/training_algorithms/tests/test_default.py
44
1798
import numpy as np from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.models.rbm import RBM from pylearn2.models.s3c import S3C, E_Step, Grad_M_Step from pylearn2.training_algorithms.default import DefaultTrainingAlgorithm from pylearn2.training_algorithms.training_algorithm import NoBat...
bsd-3-clause
davidzchen/tensorflow
tensorflow/compiler/tests/eager_test.py
4
26149
# 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...
apache-2.0
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/QVector2D.py
2
5675
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QVector2D(): # skipped bases: <type 'sip.simplewrapper'> """ QVector2D() QVector2D(float, float) QVector2D(QPoint) QVec...
gpl-2.0
SUSE/azure-sdk-for-python
azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_name_status.py
9
1388
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
v1bri/gnuradio
grc/gui/external_editor.py
12
2662
""" Copyright 2015 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
gpl-3.0
nexusz99/boto
tests/integration/sqs/test_bigmessage.py
114
2688
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 res...
mit
sbalde/edx-platform
lms/djangoapps/verify_student/models.py
20
44086
# -*- coding: utf-8 -*- """ Models for Student Identity Verification This is where we put any models relating to establishing the real-life identity of a student over a period of time. Right now, the only models are the abstract `PhotoVerification`, and its one concrete implementation `SoftwareSecurePhotoVerification`...
agpl-3.0
adamtiger/tensorflow
tensorflow/contrib/tensorboard/plugins/projector/projector_api_test.py
94
2122
# 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
PierreBdR/point_tracker
point_tracker/tissue_plot/tracking_plot.py
1
45873
# coding=utf-8 from __future__ import print_function, division, absolute_import """ This module contains the bases classes needed for plotting. """ __author__ = "Pierre Barbier de Reuille <pierre@barbierdereuille.net>" from PyQt4.QtGui import (QColor, QDialog, QFontDialog, QFont, QDoubleValidator, QPicture, ...
gpl-2.0
openhatch/new-mini-tasks
vendor/packages/south/south/introspection_plugins/django_audit_log.py
154
1436
""" South introspection rules for django-audit-log """ from django.contrib.auth.models import User from django.conf import settings from south.modelsinspector import add...
apache-2.0
jeanlinux/calibre
src/calibre/ebooks/oeb/polish/main.py
11
10814
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
MKTCloud/MKTCloud
horizon/test/tests/middleware.py
12
1168
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.org/...
apache-2.0
brokenjacobs/ansible
lib/ansible/modules/cloud/ovirt/ovirt_disks.py
7
24625
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
lakshayg/tensorflow
tensorflow/contrib/slim/python/slim/nets/inception_v1_test.py
112
8960
# 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
eayunstack/nova
nova/tests/compute/test_multiple_nodes.py
7
7378
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
apache-2.0
ryfeus/lambda-packs
Pyrestest_wrk/source/pip/_vendor/cachecontrol/adapter.py
87
3967
import functools from pip._vendor.requests.adapters import HTTPAdapter from .controller import CacheController from .cache import DictCache from .filewrapper import CallbackFileWrapper class CacheControlAdapter(HTTPAdapter): invalidating_methods = set(['PUT', 'DELETE']) def __init__(self, cache=None, ...
mit
marcelovilaca/DIRAC
Resources/Computing/glexecComputingElement.py
2
13887
""" A computing element class that attempts to use glexec if available then defaults to the standard InProcess Computing Element behaviour. """ __RCSID__ = "$Id$" import os import stat import distutils.spawn import DIRAC from DIRAC import S_OK, S_ERROR from DIRA...
gpl-3.0