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
dssg/wikienergy
disaggregator/build/pandas/pandas/tests/test_frame.py
1
552242
# -*- coding: utf-8 -*- from __future__ import print_function # pylint: disable-msg=W0612,E1101 from copy import deepcopy from datetime import datetime, timedelta, time import sys import operator import re import csv import nose import functools import itertools from itertools import product from distutils.version imp...
mit
labero/kupfer
kupfer/plugin/skype.py
4
7471
# -*- coding: UTF-8 -*- __kupfer_name__ = _("Skype") __kupfer_sources__ = ("ContactsSource", ) __kupfer_actions__ = ("ChangeStatus", 'Chat', 'Call') __description__ = _("Access to Skype contacts") __version__ = "2011-02-05" __author__ = "Karol Będkowski <karol.bedkowski@gmail.com>" import dbus from kupfer.objects imp...
gpl-3.0
tanmaykm/thrift
test/py/SerializationTest.py
21
17161
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
tszym/ansible
lib/ansible/modules/storage/netapp/netapp_e_host.py
7
17176
#!/usr/bin/python # (c) 2016, NetApp, 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', 'status': ['preview'], ...
gpl-3.0
rooi/CouchPotatoServer
libs/git/repository.py
109
20401
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 li...
gpl-3.0
grupoprog3/proyecto_final
Entrega Final/flask/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2924
3268
######################## 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...
apache-2.0
roadmapper/ansible
lib/ansible/modules/cloud/docker/docker_container.py
6
148054
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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', 'status': ['prev...
gpl-3.0
bholley/servo
tests/wpt/harness/wptrunner/reduce.py
156
6086
# 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/. import sys import tempfile from cStringIO import StringIO from collections import defaultdict import wptrunner import w...
mpl-2.0
DIRACGrid/DIRAC
src/DIRAC/Core/Tornado/scripts/tornado_start_all.py
1
2483
#!/usr/bin/env python ######################################################################## # File : tornado-start-all # Author : Louis MARTIN ######################################################################## # Just run this script to start Tornado and all services # Use CS to change port from __future__ i...
gpl-3.0
oneconvergence/group-based-policy
doc/source/conf.py
4
2465
# -*- coding: utf-8 -*- # 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
aam-at/tensorflow
tensorflow/python/grappler/arithmetic_optimizer_test.py
18
1757
# Copyright 2020 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
barbuza/django
django/contrib/gis/db/backends/spatialite/models.py
510
2946
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper from django.db import connection, models from django.db.backends.signals import connectio...
bsd-3-clause
AnasGhrab/scikit-learn
sklearn/metrics/metrics.py
233
1262
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...
bsd-3-clause
gwdavis/bank-api
models.py
1
6376
#!flask/bin/python ######################################################################## # Table Definitions ######################################################################## Accounts = { 'customer_id': "INTEGER NOT NULL", # integer # 'customer_name': "TEXT NOT NULL", # string 'acc...
mit
ambikeshwar1991/sandhi-2
module/gr36/gr-input/python/gr_step_source.py
7
1035
#!/usr/bin/python import gras import numpy # Serial is imported in __init__ class step(gras.Block): def __init__(self): gras.Block.__init__(self, name="ser", in_sig=[numpy.float32], out_sig=[numpy.float32]) self.flag=T...
gpl-3.0
TieWei/nova
nova/tests/integrated/v3/test_instance_actions.py
11
3739
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # 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...
apache-2.0
DinoCow/airflow
airflow/models/renderedtifields.py
6
6774
# # 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...
apache-2.0
treetrunk/Tuxemon
tuxemon/core/components/event/conditions/npc_facing.py
2
2287
# -*- coding: utf-8 -*- # # Tuxemon # Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
gpl-3.0
MRigal/django
tests/expressions/tests.py
171
36421
from __future__ import unicode_literals import datetime import uuid from copy import deepcopy from django.core.exceptions import FieldError from django.db import DatabaseError, connection, models, transaction from django.db.models import TimeField, UUIDField from django.db.models.aggregates import ( Avg, Count, M...
bsd-3-clause
ric2b/Vivaldi-browser
chromium/chrome/browser/android/vr/PRESUBMIT.py
3
1336
# Copyright 2017 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. """Presubmit script for changes affecting chrome/browser/android/vr See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more det...
bsd-3-clause
burdell/CS4464-Final-Project
django/contrib/admin/templatetags/log.py
310
2270
from django import template from django.contrib.admin.models import LogEntry register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" ...
bsd-3-clause
fjxhkj/Cactus
cactus/plugin/loader.py
9
3295
#coding:utf-8 import os import sys import imp import logging from cactus.plugin import defaults from cactus.utils.filesystem import fileList logger = logging.getLogger(__name__) class BasePluginsLoader(object): def load(self): raise NotImplementedError("Subclasses must implement load") def _initia...
bsd-3-clause
perkinslr/pypyjs
addedLibraries/twisted/python/test/test_inotify.py
50
3584
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python._inotify}. """ from twisted.trial.unittest import TestCase from twisted.python.runtime import platform if platform.supportsINotify(): from ctypes import c_int, c_uint32, c_char_p from twisted.python import ...
mit
janek-warchol/ansible
lib/ansible/plugins/callback/profile_tasks.py
57
3391
# (C) 2015, Tom Paine, <github@aioue.net> # (C) 2014, Jharrod LaFon, @JharrodLaFon # (C) 2012-2013, Michael DeHaan, <michael.dehaan@gmail.com> # # This file 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, eith...
gpl-3.0
lihui7115/ChromiumGStreamerBackend
tools/auto_bisect/ttest.py
90
8859
# 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. """Functions for doing independent two-sample t-tests and looking up p-values. Note: This module was copied from the Performance Dashboard code, and changed...
bsd-3-clause
aikramer2/spaCy
spacy/tests/serialize/test_serialize_vocab.py
3
2563
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...vocab import Vocab import pytest test_strings = [([], []), (['rats', 'are', 'cute'], ['i', 'like', 'rats'])] test_strings_attrs = [(['rats', 'are', 'cute'], 'Hello')] @pytest.mark.parametrize('strings1,strings2', test_...
mit
gabycasper007/CWDCorporateSimplu
node_modules/grunt-css/node_modules/gzip-js/node_modules/deflate-js/test/deflate.py
177
2329
import os from colorama import Fore from helpers import deflate, inflate, run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the full path to the file to run @param level- optional (default: all); the compression level [1-9] @param delete- optional (defaul...
gpl-2.0
hegland/cmepy
cmepy/tests/state_enum_tests.py
1
4574
import unittest import numpy from numpy.testing.utils import assert_array_equal import cmepy.state_enum as state_enum class StateEnumTests(unittest.TestCase): def test_simple_init(self): states = [[0, 0, 1, 1, 2, 1, 2], [0, 1, 0, 1, 1, 2, 2]] enum = st...
bsd-3-clause
obsh/tornado
tornado/test/simple_httpclient_test.py
2
30957
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import ssl import sys from tornado.escape import to_unicode from tornado import gen from tornado.httpclient impor...
apache-2.0
MaineC/elasticsearch
dev-tools/create_bwc_index_with_conficting_mappings.py
217
2963
import create_bwc_index import logging import os import random import shutil import subprocess import sys import tempfile def fetch_version(version): logging.info('fetching ES version %s' % version) if subprocess.call([sys.executable, os.path.join(os.path.split(sys.argv[0])[0], 'get-bwc-version.py'), version]) != ...
apache-2.0
wemanuel/smry
server-auth/ls/google-cloud-sdk/lib/requests/packages/chardet/latin1prober.py
1778
5232
######################## 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...
apache-2.0
marcwebbie/guessit
guessit/plugins/transformers.py
2
5812
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
lgpl-3.0
tectronics/prometeo-erp
core/menus/templatetags/menu.py
3
4516
#!/usr/bin/env python # -*- coding: utf-8 -*- """This file is part of the prometeo project. This program 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 3 of the License, or (at your option...
lgpl-3.0
mydongistiny/external_chromium_org
build/android/pylib/gtest/test_package_exe.py
32
5873
# Copyright (c) 2012 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. """Defines TestPackageExecutable to help run stand-alone executables.""" import logging import os import sys import tempfile from pylib import cmd_help...
bsd-3-clause
nkalodimas/invenio
modules/websearch/lib/search_engine_utils.py
1
7053
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 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; eithe...
gpl-2.0
sebastic/QGIS
python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
12
17507
# -*- coding: utf-8 -*- """ *************************************************************************** FieldsMappingWidget.py --------------------- Date : October 2014 Copyright : (C) 2014 by Arnaud Morvan Email : arnaud dot morvan at camptocamp dot com **...
gpl-2.0
dwin999/Empire
lib/modules/situational_awareness/network/find_localadmin_access.py
10
3749
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-FindLocalAdminAccess', 'Author': ['@harmj0y'], 'Description': ('Finds machines on the local domain where the current user has ' ...
bsd-3-clause
andrelaszlo/qtile
libqtile/xkeysyms.py
1
56893
keysyms = { 'XF86AudioLowerVolume': 0x1008ff11, 'XF86AudioMute': 0x1008ff12, 'XF86AudioRaiseVolume': 0x1008ff13, 'XF86AudioPlay': 0x1008ff14, 'XF86AudioStop': 0x1008ff15, 'XF86AudioPrev': 0x1008ff16, 'XF86AudioNext': 0x1008ff17, 'VoidSymbol': 0xffffff, 'BackSpace': 0xff08, 'Tab':...
mit
AOKP/external_chromium_org
chrome/common/extensions/docs/server2/cron_servlet_test.py
23
8291
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from appengine_wrappers import GetAppVersion from app_yaml_helper import AppYamlHelper from cron_servlet import CronSe...
bsd-3-clause
777jon/g3_kernel
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
John-Boik/Principled-Societies-Project
leddaApp/static/brython/src/Lib/encodings/cp862.py
37
34068
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
gpl-3.0
comptech/atrex
Software/myPeakTableWidget.py
1
3328
from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.uic import * from myPeaks import * from myDetector import * from peakEditDlg import * class myPeakTableWidget (QTableWidget) : numPeaks = 0 #headList = QString("Num;H;K;L;len(XYZ)^-1;2-theta;Gonio[5];nu").split(";...
lgpl-3.0
ajoaoff/django
django/db/models/fields/__init__.py
57
89296
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import math import uuid import warnings from base64 import b64decode, b64encode from functools import total_ordering from django import forms from django.apps import apps from django.conf impo...
bsd-3-clause
songfj/calibre
src/templite/__init__.py
10
3609
#!/usr/bin/env python2 # # Templite+ # A light-weight, fully functional, general purpose templating engine # # Copyright (c) 2009 joonis new media # Author: Thimo Kraemer <thimo.kraemer@joonis.de> # # Based on Templite - Tomer Filiba # http://code.activestate.com/recipes/496702/ # # ...
gpl-3.0
Jgarcia-IAS/localizacion
openerp/addons/purchase/wizard/purchase_order_group.py
376
3379
# -*- 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...
agpl-3.0
jimberlage/servo
components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
142
2793
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" callback interface TestCallbackInterface { attribute boolean bool; }; """) results = parser.finish() iface = results[0] harness.ok(iface.isCallback(), "Interface should be a callback") parser = parser....
mpl-2.0
shaanlan/youtube-dl
youtube_dl/downloader/common.py
95
13848
from __future__ import division, unicode_literals import os import re import sys import time from ..compat import compat_str from ..utils import ( encodeFilename, decodeArgument, format_bytes, timeconvert, ) class FileDownloader(object): """File Downloader class. File downloader objects are...
unlicense
Chilledheart/windycode
python/vimsupport.py
1
6475
#!/usr/bin/env python import vim import os # Given an object, returns a str object that's utf-8 encoded. def ToUtf8IfNeeded(value): if isinstance(value, unicode): return value.encode('utf8') if isinstance(value, str): return value return str(value) def PresentYesOrNoDialog(message): return int(vim.eva...
bsd-3-clause
che0/teh-tracker
trackersite/tracker/feeds.py
2
1990
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from tracker.models import Topic, Ticket, Transaction class LatestTicketsFeed(Feed): descrip...
gpl-2.0
boghison/servo
tests/wpt/harness/wptrunner/update/base.py
196
2148
# 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/. exit_unclean = object() exit_clean = object() class Step(object): provides = [] def __init__(self, logger): ...
mpl-2.0
xyuanmu/XX-Net
python3.8.2/Lib/site-packages/pip/_internal/build_env.py
9
7405
"""Build Environment used for isolation during sdist building """ import logging import os import sys import textwrap from collections import OrderedDict from distutils.sysconfig import get_python_lib from sysconfig import get_paths from pip._vendor.pkg_resources import Requirement, VersionConflict, WorkingSet from ...
bsd-2-clause
SKIRT/PTS
modeling/config/expand.py
1
3493
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
agpl-3.0
demon-ru/iml-crm
addons/crm/base_partner_merge.py
12
30328
#!/usr/bin/env python from __future__ import absolute_import from email.utils import parseaddr import functools import htmlentitydefs import itertools import logging import operator import re from ast import literal_eval from openerp.tools import mute_logger # Validation Library https://pypi.python.org/pypi/validate_e...
agpl-3.0
wolverineav/neutron
neutron/tests/unit/extension_stubs.py
8
2176
# 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
unidesigner/microcircuit
microcircuit/dataset/testconnectome001.py
1
1589
""" Retrieve C.elegans connectivity from Web and parse appropriately """ # see data/ # http://mit.edu/lrv/www/elegans/ from scipy.io import matlab import os.path as op import networkx as nx import microcircuit.constants as const from microcircuit.connectome import Connectome mat = matlab.loadmat(op.join(op.dirname(o...
bsd-3-clause
CuriosityLabTAU/physicial_curiosity_big_experiment
kinect/kinect_pos.py
2
7369
import json import re class KinectPose(): def __init__(self): self.poses_satisfied = [] self.poses_names = [] self.poses_conditions = [] self.positions = { 'head':{}, 'neck':{}, 'torso':{}, 'left_shoulder':{}, 'left_elbow':{}, 'left_hand':{}, 'right_shoulder':{}, ...
apache-2.0
mavit/ansible
lib/ansible/modules/crypto/openssl_privatekey.py
25
10503
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # 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': '...
gpl-3.0
gshirishfree/linux
scripts/gdb/linux/cpus.py
997
3560
# # gdb helper commands and functions for Linux kernel debugging # # per-cpu tools # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import tasks, utils MAX_CPUS = 4096 def get_cu...
gpl-2.0
apache/airflow
tests/models/test_dag.py
2
74100
# # 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...
apache-2.0
Preetwinder/scrapy
tests/test_downloadermiddleware_retry.py
108
3750
import unittest from twisted.internet import defer from twisted.internet.error import TimeoutError, DNSLookupError, \ ConnectionRefusedError, ConnectionDone, ConnectError, \ ConnectionLost, TCPTimedOutError from scrapy import optional_features from scrapy.downloadermiddlewares.retry import RetryMiddlew...
bsd-3-clause
kidaa/mate14
t/deps-base.py
15
2508
#!/usr/bin/env python try: import pacman except ImportError: import alpm pacman = alpm import os, tempfile, shutil, sys if len(sys.argv) > 1 and sys.argv[1] == "--help": print "base packages which depend on packages outsite base (->base is needed)" sys.exit(0) basecats = ['base'] root = tempfile.mkdtemp() pacm...
gpl-2.0
mzizzi/ansible
lib/ansible/plugins/lookup/__init__.py
18
4437
# (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
pprett/scikit-learn
doc/sphinxext/numpy_ext/numpydoc.py
413
6182
""" ======== numpydoc ======== Sphinx extension that handles docstrings in the Numpy standard format. [1] It will: - Convert Parameters etc. sections to field lists. - Convert See Also section to a See also entry. - Renumber references. - Extract the signature from the docstring, if it can't be determined otherwis...
bsd-3-clause
sanguinariojoe/FreeCAD
src/Mod/Draft/draftobjects/layer.py
16
4441
# *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * Th...
lgpl-2.1
mission-liao/pyfunhook
funhook/test/builtin/cls/inherit.py
1
2697
''' Created on Jul 26, 2013 @author: Mission Liao ''' import unittest import funhook from funhook.builtin.cls import adapt_hook_from class TestClsInherit(unittest.TestCase): """ Test cases for built-in hooks for class inheritance """ def test_basic(self): """ Test Basic Usage ...
mit
sandofsky/code_swarm
lib/freebase/api/session.py
3
17231
# ======================================================================== # Copyright (c) 2007, Metaweb Technologies, 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: # * Redistribution...
gpl-3.0
pdee/pdee
python-libs/ropemacs/__init__.py
7
19234
"""ropemacs, an emacs mode for using rope refactoring library""" import sys import ropemode.decorators import ropemode.environment import ropemode.interface from Pymacs import lisp from rope.base import utils class LispUtils(ropemode.environment.Environment): def ask(self, prompt, default=None, starting=None): ...
gpl-3.0
zhujzhuo/openstack-trove
trove/quota/models.py
7
3114
# Copyright 2011 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 l...
apache-2.0
popazerty/zde-e2
lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
51
8416
from Screens.Screen import Screen from Screens.ChoiceBox import ChoiceBox from Screens.InputBox import InputBox from Screens.MessageBox import MessageBox from Screens.HelpMenu import HelpableScreen from Components.ActionMap import HelpableActionMap, ActionMap from Components.Sources.List import List from Components.Sou...
gpl-2.0
rtrouton/Recipes-for-AutoPkg
Shared_Processors/SubDirectoryList.py
1
3324
#!/usr/bin/python # # Copyright 2013 Jesse Peterson # # 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...
bsd-3-clause
kapilt/ansible
test/units/plugins/connections/test_connection.py
79
3978
# (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
ayiis/python
better_tcp_sniffer.py
1
7186
# -*- coding:utf-8 -*- import socket import struct import pcap import traceback from aytool.common.print_table import PrettyTable """ ┌──────────────────────────────────┬──────────────────────────────────┬──────────┐ │ Destination Mac │ Source Mac │Ether ...
mit
rrahn/seqan-mirror
misc/seqan_instrumentation/py2exe/dist/classes/requests/status_codes.py
60
3028
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
bsd-3-clause
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/ThirdParty/libxml/src/check-relaxng-test-suite2.py
343
10578
#!/usr/bin/python import sys import time import os import string import StringIO sys.path.insert(0, "python") import libxml2 # Memory debug specific libxml2.debugMemory(1) debug = 0 quiet = 1 # # the testsuite description # CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/testsuite.xml") LOG="check-relaxng-...
gpl-2.0
agincel/AdamTestBot
unidecode/x06a.py
252
4674
data = ( 'Di ', # 0x00 'Zhuang ', # 0x01 'Le ', # 0x02 'Lang ', # 0x03 'Chen ', # 0x04 'Cong ', # 0x05 'Li ', # 0x06 'Xiu ', # 0x07 'Qing ', # 0x08 'Shuang ', # 0x09 'Fan ', # 0x0a 'Tong ', # 0x0b 'Guan ', # 0x0c 'Ji ', # 0x0d 'Suo ', # 0x0e 'Lei ', # 0x0f 'Lu ', # 0x1...
mit
batxes/4c2vhic
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models2611.py
4
17582
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
mariusbaumann/pyload
module/plugins/hoster/FastixRu.py
1
1986
# -*- coding: utf-8 -*- import re from random import randrange from urllib import unquote from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class FastixRu(MultiHoster): __name__ = "FastixRu" __type__ = "hoster" __version__ ...
gpl-3.0
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/vta/apps/tsim_example/python/tsim.py
1
1886
# 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
Dhivyap/ansible
lib/ansible/modules/remote_management/redfish/redfish_info.py
6
14366
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], ...
gpl-3.0
dahool/vertaal
django_evolution/tests/db/postgresql.py
6
17507
from django.db.models.options import Options autocreate_through_tables = hasattr(Options({}), 'auto_created') add_field = { 'AddNonNullNonCallableColumnModel': '\n'.join([ 'ALTER TABLE "tests_testmodel" ADD COLUMN "added_field" integer DEFAULT 1;', 'ALTER TABLE "tests_testmodel" ...
gpl-3.0
Lujeni/ansible
lib/ansible/modules/packaging/os/svr4pkg.py
95
7684
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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...
gpl-3.0
rikirenz/inspire-next
tests/unit/theme/test_theme_views.py
3
3197
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
gpl-3.0
youknowone/instantauth
python/instantauthtests/test_coder.py
1
1096
import json as json_mod import pytest from instantauth.coders import ConstantCoder, PlainCoder from instantauth.coders.urlquery import URLQueryCoder, SimpleURLQueryCoder from instantauth.coders.json import JsonCoder constant = ConstantCoder('encode', 'decode') plain = PlainCoder() surlquery = SimpleURLQueryCoder() j...
bsd-2-clause
apocquet/django
django/core/management/commands/startapp.py
513
1040
from importlib import import_module from django.core.management.base import CommandError from django.core.management.templates import TemplateCommand class Command(TemplateCommand): help = ("Creates a Django app directory structure for the given app " "name in the current directory or optionally in t...
bsd-3-clause
cytec/SickRage
lib/simplejson/decoder.py
317
12404
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner try: from simplejson._speedups import scanstring as c_scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconst...
gpl-3.0
benfinke/ns_python
build/lib/nssrc/com/citrix/netscaler/nitro/resource/stat/stream/streamidentifier_stats.py
3
9555
# # 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
ric03uec/boto
tests/unit/cloudsearch/test_connection.py
12
8523
#!/usr/bin env python from tests.unit import AWSMockServiceTestCase from boto.cloudsearch.domain import Domain from boto.cloudsearch.layer1 import Layer1 import json class TestCloudSearchCreateDomain(AWSMockServiceTestCase): connection_class = Layer1 def default_body(self): return """ <CreateDomain...
mit
kramwens/order_bot
venv/lib/python2.7/site-packages/jinja2/runtime.py
335
22530
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ import sys from itertools import chain from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, soft_unicode, escape, missing...
mit
cfg2015/EPT-2015-2
addons/stock_picking_wave/__init__.py
374
1105
# -*- 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...
agpl-3.0
nerdvegas/rez
src/rez/data/tests/release/build.py
1
1566
from __future__ import print_function import shutil import os.path import os import sys def build(source_path, build_path, install_path, targets): def _copy(src, dest): print("copying %s to %s..." % (src, dest)) if os.path.exists(dest): shutil.rmtree(dest) shutil.copytree(src...
lgpl-3.0
kanagasabapathi/python-for-android
python-modules/twisted/twisted/cred/checkers.py
61
9334
# -*- test-case-name: twisted.test.test_newcred -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. import os from zope.interface import implements, Interface, Attribute from twisted.internet import defer from twisted.python import failure, log from twisted.cred import error, creden...
apache-2.0
lsqtongxin/django
django/template/engine.py
199
10778
import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import Context, Template f...
bsd-3-clause
matmutant/sl4a
python/src/Lib/test/curses_tests.py
201
1241
#!/usr/bin/env python # # $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $ # # Interactive test suite for the curses module. # This script displays various things and the user should verify whether # they display correctly. # import curses from curses import textpad def test_textpad(stdscr, insert_mode=False): ...
apache-2.0
KnowNo/reviewboard
reviewboard/scmtools/errors.py
7
3560
from __future__ import unicode_literals from django.utils.translation import ugettext as _ from reviewboard.ssh.errors import SSHAuthenticationError class SCMError(Exception): def __init__(self, msg): Exception.__init__(self, msg) class ChangeSetError(SCMError): pass class InvalidChangeNumberErr...
mit
rotofly/odoo
addons/decimal_precision/tests/test_qweb_float.py
335
1986
# -*- coding: utf-8 -*- from openerp.tests import common class TestFloatExport(common.TransactionCase): def setUp(self): super(TestFloatExport, self).setUp() self.Model = self.registry('decimal.precision.test') def get_converter(self, name): converter = self.registry('ir.qweb.field.flo...
agpl-3.0
hoangminhitvn/flask
flask/lib/python2.7/site-packages/setuptools/command/egg_info.py
301
16852
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import os import re import sys try: from setuptools_s...
bsd-3-clause
mglukhikh/intellij-community
plugins/hg4idea/testData/bin/mercurial/simplemerge.py
93
15291
# Copyright (C) 2004, 2005 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribut...
apache-2.0
iismd17/scikit-learn
sklearn/ensemble/tests/test_base.py
284
1328
""" Testing for the base module (sklearn.ensemble.base). """ # Authors: Gilles Louppe # License: BSD 3 clause from numpy.testing import assert_equal from nose.tools import assert_true from sklearn.utils.testing import assert_raise_message from sklearn.datasets import load_iris from sklearn.ensemble import BaggingCla...
bsd-3-clause
ageron/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/chain_test.py
25
8213
# 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
albertomurillo/ansible
lib/ansible/utils/hashing.py
112
3173
# (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