repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
uw-it-aca/bridge-sis-provisioner
refs/heads/master
sis_provisioner/dao/__init__.py
1
from datetime import datetime import logging import os from restclients_core.exceptions import ( DataFailureException, InvalidNetID, InvalidRegID) logger = logging.getLogger(__name__) def read_gws_cache_file(path): user_set = set() if os.path.isfile(path): with open(path, 'r', encoding='utf8') a...
chiragjogi/odoo
refs/heads/8.0
addons/hr_applicant_document/__init__.py
389
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
wkschwartz/django
refs/heads/stable/3.2.x
tests/deprecation/test_middleware_mixin.py
5
import asyncio import threading from asgiref.sync import async_to_sync from django.contrib.admindocs.middleware import XViewMiddleware from django.contrib.auth.middleware import ( AuthenticationMiddleware, RemoteUserMiddleware, ) from django.contrib.flatpages.middleware import FlatpageFallbackMiddleware from djan...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/django-1.2/django/core/files/uploadedfile.py
402
""" Classes representing uploaded files. """ import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import smart_str __al...
Antiun/odoo
refs/heads/8.0
openerp/addons/test_documentation_examples/extension.py
366
# -*- coding: utf-8 -*- from openerp import models, fields class Extension0(models.Model): _name = 'extension.0' name = fields.Char(default="A") class Extension1(models.Model): _inherit = 'extension.0' description = fields.Char(default="Extended")
veger/ansible
refs/heads/devel
lib/ansible/modules/monitoring/pingdom.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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', ...
Fire-Phone/android_kernel_amazon_kodiak
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# 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...
simod/geonode
refs/heads/master
geonode/people/migrations/0028_auto_20180606_1543.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-06-06 15:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0027_auto_20180414_2120'), ] operations = [ migrations.AlterFiel...
isabernardes/Heriga
refs/heads/master
Herigaenv/lib/python2.7/site-packages/MySQLdb/release.py
5
__author__ = "Andy Dustman <farcepest@gmail.com>" version_info = (1,3,7,'final',1) __version__ = "1.3.7"
lenovo-Kraft-T/android_kernel_lenovo_msm8916
refs/heads/cm-14.0
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...
tiberiucorbu/av-website
refs/heads/master
main/model/config_auth.py
14
# coding: utf-8 from __future__ import absolute_import from google.appengine.ext import ndb from api import fields import model class ConfigAuth(object): bitbucket_key = ndb.StringProperty(default='', verbose_name='Key') bitbucket_secret = ndb.StringProperty(default='', verbose_name='Secret') dropbox_app_key...
Alir3z4/python-sanitize
refs/heads/master
tests/test_sanitize_html.py
1
from unittest import TestCase import sanitize class TestSanitizeHTML(TestCase): def _html(self, html_source, expected_data, base_uri=None, add_nofollow=False): """ :type html_source: str :type expected_data: str :type base_uri: str :type add_nofollow: bool """ ...
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/deed/pet_deed/kusak_deed.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/component/vehicle/disperser.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/space/reactor/collection_reward_reactor_01_mk3.py
85615
import sys def setup(core, object): return
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
cms/djangoapps/contentstore/tests/test_gating.py
11
""" Unit tests for the gating feature in Studio """ from milestones.tests.utils import MilestonesTestCaseMixin from mock import patch from contentstore.signals.handlers import handle_item_deleted from openedx.core.lib.gating import api as gating_api from xmodule.modulestore.tests.django_utils import ModuleStoreTestCas...
tatsuy/ardupilot
refs/heads/master
Tools/ardupilotwaf/uavcangen.py
12
#!/usr/bin/env python # encoding: utf-8 """ generate DSDLC headers for uavcan """ from waflib import Logs, Task, Utils, Node from waflib.TaskGen import feature, before_method, extension import os import os.path from xml.etree import ElementTree as et class uavcangen(Task.Task): """generate uavcan header files"""...
caktus/rapidsms
refs/heads/master
rapidsms/contrib/default/app.py
7
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings from rapidsms.apps.base import AppBase class App(AppBase): def default(self, msg): response = settings.DEFAULT_RESPONSE if response is not None: response = response % {'project_name': settings.PROJ...
simleo/openmicroscopy
refs/heads/develop
examples/Training/python/Json_Api/Login.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016-2017 University of Dundee & Open Microscopy Environment. # All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # import requests from Parse_OMERO_Properties import USERNAME, PASSWORD, OMERO_WEB_HOST, \ ...
bheiskell/logolas
refs/heads/master
logolas/model.py
1
"""Define tables dynamically from configuration.""" from collections import OrderedDict from sqlalchemy import Table, Column, Integer, DateTime, String from sqlalchemy.orm import mapper import logging _LOG = logging.getLogger(__name__) IGNORED_COLUMNS=['id', 'time', 'date'] def get_table(metadata, name, fields, ord...
michkot/benchexec
refs/heads/master
benchexec/tools/aprove.py
2
""" BenchExec is a framework for reliable benchmarking. This file is part of BenchExec. Copyright (C) 2007-2015 Dirk Beyer 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 ...
yiqingj/work
refs/heads/tn-vector
scons/scons-local-2.3.0/SCons/Node/FS.py
11
"""scons.Node.FS File system nodes. These Nodes represent the canonical external objects that people think of when they think of building software: files and directories. This holds a "default_fs" variable that should be initialized with an FS that can be used by scripts or modules looking for the canonical default....
adaussy/eclipse-monkey-revival
refs/heads/master
plugins/python/org.eclipse.eclipsemonkey.lang.python/Lib/unittest/test/test_assertions.py
97
import datetime import unittest class Test_Assertions(unittest.TestCase): def test_AlmostEqual(self): self.assertAlmostEqual(1.00000001, 1.0) self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, self.assertAlmostEqual, 1.0000001, 1.0...
krahman/rethinkdb
refs/heads/next
test/old_regression/gc_verification.py
1
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. from __future__ import division import os, sys, socket, random import time sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) from test_common import * extent_size = 8 * 1024 * 1024 block_size ...
darmaa/odoo
refs/heads/master
addons/account/wizard/account_report_account_balance.py
378
# -*- 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...
jrabbit/ubotu-fr
refs/heads/master
plugins/plugins/ChannelStats/config.py
15
### # Copyright (c) 2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
heli522/scikit-learn
refs/heads/master
sklearn/metrics/metrics.py
233
import warnings warnings.warn("sklearn.metrics.metrics is deprecated and will be removed in " "0.18. Please import from sklearn.metrics", DeprecationWarning) from .ranking import auc from .ranking import average_precision_score from .ranking import label_ranking_average_precision_score fro...
mathspace/django
refs/heads/master
tests/model_permalink/models.py
543
from django.db import models def set_attr(name, value): def wrapper(function): setattr(function, name, value) return function return wrapper class Guitarist(models.Model): name = models.CharField(max_length=50) slug = models.CharField(max_length=50) @models.permalink def url...
ApolloAuto/apollo
refs/heads/master
modules/tools/mapshow/libs/subplot_traj_path.py
3
#!/usr/bin/env python3 ############################################################################### # Copyright 2017 The Apollo 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...
remagio/twarc
refs/heads/master
utils/network.py
2
#!/usr/bin/env python # build a reply, quote, retweet network from a file of tweets and write it # out as a gexf, dot, json or html file. You will need to have networkx # installed and pydotplus if you want to use dot. The html presentation # uses d3 to display the network graph in your browser. # # ./network.py tw...
burk/helgapp
refs/heads/master
sok/forms.py
1
from django import forms from models import Application class ApplicationForm(forms.ModelForm): class Meta: model = Application fields = ['title', 'leader', 'about']
miconof/CouchPotatoServer
refs/heads/master
libs/pyutil/observer.py
106
# -*- test-case-name: allmydata.test.test_observer -*- from twisted.internet import defer try: from foolscap.eventual import eventually eventually # http://divmod.org/trac/ticket/1499 except ImportError: from twisted.internet import reactor def eventually(f, *args, **kwargs): return reactor.cal...
FNST-OpenStack/cloudkitty
refs/heads/master
cloudkitty/storage/sqlalchemy/__init__.py
1
# -*- coding: utf-8 -*- # Copyright 2014 Objectif Libre # # 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 ...
CARocha/ciat_plataforma
refs/heads/master
mapeo/forms.py
3
# -*- coding: UTF-8 -*- from django import forms from django.forms import ModelForm from .models import * from analisis.configuracion.models import SitioAccion, AreaAccion, Plataforma from comunicacion.lugar.models import Pais class MapeoConsulta(forms.Form): pais = forms.ModelChoiceField(queryset=Pais.objects.o...
jaruba/chromium.src
refs/heads/nw12
testing/scripts/nacl_integration.py
75
#!/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 json import os import sys import common def main_run(args): filter_tests = [] if args.filter_file: filter_tests = js...
bbiskup/cpp_benchmarks
refs/heads/dev
vendor/google/googletest/googletest/test/googletest-break-on-failure-unittest.py
122
#!/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...
eadgarchen/tensorflow
refs/heads/master
tensorflow/contrib/data/python/ops/enumerate_ops.py
41
# 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...
w9n/cri-containerd
refs/heads/master
hack/boilerplate/boilerplate.py
1
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
amyvmiwei/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/idlelib/idle_test/htest.py
6
'''Run human tests of Idle's window, dialog, and popup widgets. run(test): run *test*, a callable that causes a widget to be displayed. runall(): run all tests defined in this file. Let X be a global name bound to a widget callable. End the module with if __name__ == '__main__': <unittest, if there is one> f...
gugarosa/app_h
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
# 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. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
pydata/xarray
refs/heads/main
xarray/tests/test_plugins.py
1
from unittest import mock import pkg_resources import pytest from xarray.backends import common, plugins class DummyBackendEntrypointArgs(common.BackendEntrypoint): def open_dataset(filename_or_obj, *args): pass class DummyBackendEntrypointKwargs(common.BackendEntrypoint): def open_dataset(filenam...
kwyoung11/ciml
refs/heads/master
labs/lab6-NaiveBayes/util.py
20
import sys import inspect import random import pylab from numpy import * def raiseNotDefined(): print "Method not implemented: %s" % inspect.stack()[1][3] sys.exit(1) def permute(a): """ Randomly permute the elements in array a """ for n in range(len(a)): m = int(pylab.rand() * (len(a) - n)) + n ...
timchen86/ntulifeguardapp
refs/heads/master
indexes.py
228
from dbindexer import autodiscover autodiscover()
caoning1985/sqt
refs/heads/master
src/strategy_py/google/protobuf/unittest_mset_pb2.py
43
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/unittest_mset.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impor...
EnviroCentre/jython-upgrade
refs/heads/develop
jython/lib/test/test_codecs.py
4
# test_codecs.py from CPython 2.7, modified for Jython from test import test_support import unittest import codecs import locale import sys, StringIO if not test_support.is_jython: import _testcapi class Queue(object): """ queue: write bytes at one end, read bytes from the other end """ def __init_...
baidu/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_lookup_sparse_table_op.py
3
# Copyright (c) 2018 PaddlePaddle 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 app...
api0cradle/Empire
refs/heads/master
lib/modules/exfiltration/Invoke_ExfilDataToGitHub.py
2
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Invoke-ExfilDataToGitHub', # list ...
varuntiwari27/rally
refs/heads/master
todo-api/flask/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py
333
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, detect_encoding, ZipFi...
jlward/django-authority
refs/heads/master
authority/tests.py
3
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission as DjangoPermission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import MultipleObjectsReturned from django.db.models import Q from django.te...
Arcanemagus/SickRage
refs/heads/master
lib/future/moves/http/__init__.py
83
from future.utils import PY3 if not PY3: __future_module__ = True
kustodian/ansible
refs/heads/devel
test/units/module_utils/common/text/formatters/test_lenient_lowercase.py
69
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # 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 from datetime import datetime import pytest ...
ruchee/vimrc
refs/heads/master
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/r/reused_outer_loop_variable.py
8
"""Tests for redefining an outer loop variable.""" from __future__ import print_function __revision__ = 0 # Simple nested loop for i in range(10): for i in range(10): #[redefined-outer-name] print(i) # When outer loop unpacks a tuple for i, i_again in enumerate(range(10)): for i in range(10): #[redefi...
cocoloco69/pynet
refs/heads/master
ANSIBLE/library/cisco_file_transfer.py
13
#!/usr/bin/python ''' Ansible module to transfer files to Cisco IOS devices. ''' from ansible.module_utils.basic import * from netmiko import ConnectHandler, FileTransfer def main(): ''' Ansible module to transfer files to Cisco IOS devices. ''' module = AnsibleModule( argument_spec=dict( ...
40223149/w16b_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/version.py
607
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
allotria/intellij-community
refs/heads/master
python/testData/testRunner/env/unit/test_folder/test_internal_test1.py
161
from unittest import TestCase class UTests(TestCase): def testOne(self): self.assertEqual(4, 2*2) def testTwo(self): self.assertTrue(False or True)
redhat-openstack/nova
refs/heads/f22-patches
nova/api/openstack/compute/plugins/v3/extended_server_attributes.py
23
# Copyright 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 a...
jshiv/turntable
refs/heads/master
test/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_traversal.py
35
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_almost_equal from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\ csgraph_to_dense, csgraph_from_dense def test_graph_breadth_first(): csgraph = np.array([[0, 1, 2, 0,...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py
1
# 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 ...
mboeru/maraschino
refs/heads/master
lib/jinja2/__init__.py
107
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
sounak98/coala-bears
refs/heads/master
bears/jinja2/Jinja2Bear.py
2
import re from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result, RESULT_SEVERITY from coalib.results.Diff import Diff def generate_spacing_diff(file, filename, line, line_number, match_object, required_spacing): """ Generate a diff for incorrectly spa...
1013553207/django
refs/heads/master
tests/generic_relations/tests.py
35
from __future__ import unicode_literals from django import forms from django.contrib.contenttypes.forms import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.db import IntegrityError from django.db.models import Q from ...
blueyed/coveragepy
refs/heads/master
tests/test_summary.py
1
# coding: utf-8 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Test text-based summary reporting for coverage.py""" import glob import os import os.path import py_compile import re import coverage from cove...
Eseoghene/bite-project
refs/heads/master
deps/gdata-python-client/tests/atom_tests/auth_test.py
128
#!/usr/bin/env python # # Copyright (C) 2009 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...
SanPen/GridCal
refs/heads/master
src/research/CIM/CIM_test.py
1
import logging from PyCIM import cimread logging.basicConfig(level=logging.INFO) d = cimread('CIMsamples/cim14/ABB40busModified.xml') pass
bdang2012/taiga-back-casting
refs/heads/branch_casting
taiga/base/api/templatetags/api.py
1
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
stepank/pyws
refs/heads/develop
examples/functions.py
1
from datetime import date, datetime from pyws.functions.args import DictOf from pyws.functions.register import register # = add simple ================================================================ @register() @register('add_integers', return_type=int, args=((int, 0), (int, 0))) @register('add_floats', return_typ...
bolabola/PTVS
refs/heads/master
Python/Tests/TestData/DebugAttach/Program.py
18
from threading import Thread import threading import time from exceptions import KeyboardInterrupt class C(object): pass global thread_abort thread_abort = False def exception_storm(): my_name = threading.current_thread().name my_ident = threading.current_thread().ident i = 0 from weakref...
weolar/miniblink49
refs/heads/master
v8_5_1/tools/eval_gc_nvp.py
6
#!/usr/bin/env python # # Copyright 2015 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script is used to analyze GCTracer's NVP output.""" from argparse import ArgumentParser from copy import deepcopy from gc...
jayceyxc/hue
refs/heads/master
desktop/core/ext-py/guppy-0.1.10/specs/genguppydoc.py
35
#._cv_part genguppydoc.py import guppy,os from os.path import join class GenGuppyDoc: extemplate = """\ .document: gslexample ..output: html ..h1: GSL Document and Test Example ..ul ...li ....a: Source Code .....href= #source ...li ....a: Generated Test Class .....href= #test ...li ....a: Generated Document ........
dianegalloiswong/LoL-stats
refs/heads/master
run_gensim.py
1
import json import data_path from collect_champions_usage import ChampionsUsage from champion_usage_corpus import ChampionUsageCorpus from my_lda_model import MyLdaModel def make_corpus_master(): infos = {'name': 'test_gensim_masters'} with open(data_path.champions_usage_master) as f: summoners_to_st...
Endika/OpenUpgrade
refs/heads/8.0
addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
302
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Corrections & modifications by Noviat nv/sa, (http://www.noviat.be): # - VAT listing based upon year...
mirjalil/DataScience
refs/heads/master
python-stuff/python-sqlite/pagerank/sprank.py
8
import sqlite3 conn = sqlite3.connect('spider.sqlite') cur = conn.cursor() # Find the ids that send out page rank - we only are interested # in pages in the SCC that have in and out links cur.execute('''SELECT DISTINCT from_id FROM Links''') from_ids = list() for row in cur: from_ids.append(row[0]) # Find the i...
ANR-DIADEMS/timeside-diadems
refs/heads/master
timeside/plugins/diadems/irit_diverg2.py
1
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Maxime Le Coz <lecoz@irit.fr> # This file is part of TimeSide. # TimeSide 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 # ...
gavoski/audacity
refs/heads/master
lib-src/lv2/sord/waflib/Node.py
62
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re,sys,shutil from waflib import Utils,Errors exclude_regs=''' **/*~ **/#*# **/.#* **/%*% **/._* **/CVS **/CVS/** **/.cvsignore **/SCCS **/SCCS/** **/vssver.scc **/....
gylian/sickrage
refs/heads/master
lib/hachoir_parser/audio/8svx.py
90
""" Audio Interchange File Format (AIFF) parser. Author: Victor Stinner Creation: 27 december 2006 """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, UInt16, UInt32, Float80, TimestampMac32, RawBytes, NullBytes, String, Enum, PascalString32) from lib.hachoir_core.endia...
bask/or-tools
refs/heads/master
src/ortools/constraint_solver/__init__.py
36
import os as _os __path__.append(_os.path.join(__path__[0], '..', '..', 'gen', 'ortools', 'constraint_solver')) __path__.append(_os.path.join(__path__[0], '..', '..', '..', 'lib'))
emonty/ansible-modules-core
refs/heads/devel
network/nxos/nxos_file_copy.py
19
#!/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 distribut...
eshijia/SUR
refs/heads/SURmagnum
magnum/common/pythonk8sclient/client/models/V1beta3_Endpoints.py
15
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
RuudBurger/CouchPotatoServer
refs/heads/master
libs/tornado/gen.py
64
"""``tornado.gen`` is a generator-based interface to make it easier to work in an asynchronous environment. Code using the ``gen`` module is technically asynchronous, but it is written as a single generator instead of a collection of separate functions. For example, the following asynchronous handler:: class Asy...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_express_route_circuits_operations.py
1
# 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 ...
astro-informatics/s2let
refs/heads/public
src/main/python/pys2let_test_mw.py
1
import healpy as hp from pys2let import * import math import matplotlib.pyplot as plt L = 32 spin = 0 fname = '/Users/bl/Dropbox/Astrodata/SDSS/Fields/Planck_EBV_256rQ.fits' # Read healpix map and compute alms. # f_lm has size L*(L+1)/2 f_hpx = hp.read_map(fname) # Initial map f_lm = hp.map2alm(f_hpx, lmax=L-1) # ...
Ripsnorta/pyui2
refs/heads/master
widgets/entry.py
1
# pyui2 # Copyright (C) 2001-2002 Sean C. Riley # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # bu...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/quickFixes/AddMethodQuickFixTest/addMethodReplacePass_after.py
83
class A: def y(self): pass a = A() a.y()
yoyojacky/upm
refs/heads/master
examples/python/wheelencoder.py
14
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 l...
rcbops/nova-buildpackage
refs/heads/master
nova/api/ec2/faults.py
12
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
helderm/partyu-tornado-app
refs/heads/master
partyu/foursquare.py
1
# -*- coding: utf-8 -*- from tornado.gen import coroutine, Return from tornado.httpclient import HTTPError from tornado.log import app_log as log import json from keys import FOURSQUARE_CLIENT_ID, FOURSQUARE_CLIENT_SECRET class FoursquareError(Exception): ''' Raised for any error communicating with the API ''' ...
dburr/SchoolIdolAPI
refs/heads/master
api/migrations/0039_auto_20150308_2344.py
4
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0038_idol_main'), ] operations = [ migrations.AddField( model_name='card', name='idol', ...
kaleksandrov/python-configurator
refs/heads/master
configurator/environment_configurator.py
1
from config import Configurator, Option def to_env_name(name): import re s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).upper() class EnvironmentConfigurator(Configurator): def __init__(self): super(self.__class__, self).__init__() def _load(sel...
webu/django-cms
refs/heads/develop
cms/test_utils/project/pluginapp/plugins/one_thing/migrations/0001_initial.py
66
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='TestPluginModel3', fields=[ ...
steynovich/ansible-modules-extras
refs/heads/devel
windows/win_unzip.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Phil Schwartz <schwartzmx@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 ...
OceansAus/cosima-cookbook
refs/heads/master
cosima_cookbook/date_utils.py
1
#!/usr/bin/env python """ Copyright 2018 ARC Centre of Excellence for Climate Systems Science author: Aidan Heerdegen <aidan.heerdegen@anu.edu.au> 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 ...
alsrgv/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/svm_test.py
112
# 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...
mancoast/CPythonPyc_test
refs/heads/master
cpython/272_test_base64.py
113
import unittest from test import test_support import base64 class LegacyBase64TestCase(unittest.TestCase): def test_encodestring(self): eq = self.assertEqual eq(base64.encodestring("www.python.org"), "d3d3LnB5dGhvbi5vcmc=\n") eq(base64.encodestring("a"), "YQ==\n") eq(base64.encod...
rgayon/plaso
refs/heads/master
plaso/engine/knowledge_base.py
1
# -*- coding: utf-8 -*- """The artifact knowledge base object. The knowledge base is filled by user provided input and the pre-processing phase. It is intended to provide successive phases, like the parsing and analysis phases, with essential information like the timezone and codepage of the source data. """ from __f...
datadesk/panda
refs/heads/master
config/urls.py
4
#!/usr/bin/env python from django.conf import settings from django.conf.urls.defaults import include, patterns from django.contrib import admin from longerusername.forms import AuthenticationForm # Jumpstart mode if settings.SETTINGS == 'jumpstart': urlpatterns = patterns('', (r'', include('jumpstart.url...
jvanbrug/alanaldavista
refs/heads/master
boto/services/__init__.py
782
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
13pi/HipstaChat
refs/heads/master
HipstaChat/wsgi.py
1
""" WSGI config for a project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HipstaChat.settings") from django.core.wsgi...
godaddy/python-oauth2
refs/heads/master
oauth_v1/clients/imap.py
885
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
andreesg/bda.plone.orders
refs/heads/master
src/bda/plone/orders/permissions.py
2
# -*- coding: utf-8 -*- from Products.CMFCore.permissions import setDefaultRoles # view individual order ViewOrderDirectly = 'bda.plone.orders: View Order Directly' setDefaultRoles(ViewOrderDirectly, ('Manager', 'Site Administrator', 'Authenticated')) # view own orders ViewOwnOrders = 'bda.plone.orde...
ppiotr/Bibedit-some-refactoring
refs/heads/bibedit-hp-change-to-field-with-many-instances
modules/bibindex/lib/bibindex_engine_tests.py
4
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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 versio...