repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
rnby-mike/mal
python/printer.py
35
1061
import mal_types as types def _pr_str(obj, print_readably=True): _r = print_readably if types._list_Q(obj): return "(" + " ".join(map(lambda e: _pr_str(e,_r), obj)) + ")" elif types._vector_Q(obj): return "[" + " ".join(map(lambda e: _pr_str(e,_r), obj)) ...
mpl-2.0
icejoywoo/tornado
tornado/testing.py
39
27220
#!/usr/bin/env python """Support classes for automated testing. * `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase with additional support for testing asynchronous (`.IOLoop` based) code. * `ExpectLog` and `LogTrapTestCase`: Make test logs less spammy. * `main()`: A simple test runner (wra...
apache-2.0
sogelink/ansible
test/units/playbook/test_attribute.py
119
1823
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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 vers...
gpl-3.0
JohnnyKing94/pootle
tests/pootle_app/models.py
7
1376
# -*- 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 pytest from pootle.core.delegate imp...
gpl-3.0
ryfeus/lambda-packs
Skimage_numpy/source/scipy/_lib/decorator.py
41
16043
# ######################### LICENSE ############################ # # Copyright (c) 2005-2015, Michele Simionato # 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 so...
mit
jeromewu/bitcoin-abe-opennet
Abe/Chain/Maxcoin.py
28
1308
# Copyright(C) 2014 by Abe developers. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is dist...
agpl-3.0
cosurgi/trunk
examples/FEMxDEM/retainingSmooth.py
2
3940
""" Author: Ning Guo <ceguo@connect.ust.hk> run `mv retainingSmooth.yade.gz 0.yade.gz` to generate initial RVE packing How to run this script: sudo apt install python-escript cd examples/FEMxDEM export PYTHONPATH="/usr/lib/python-escript:../../py/FEMxDEM" export LD_LIBRARY_PATH=/usr/lib/python-...
gpl-2.0
holmes/intellij-community
plugins/hg4idea/testData/bin/mercurial/context.py
90
45249
# context.py - changeset and file context objects for mercurial # # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import nullid, nullrev, short, hex, bin from i18n im...
apache-2.0
manojhirway/ExistingImagesOnNFS
tools/lintstack.py
5
8966
#!/usr/bin/env python # Copyright (c) 2013, AT&T Labs, Yun Mao <yunmao@gmail.com> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
apache-2.0
goloveychuk/compose
compose/config/interpolation.py
30
2625
import logging import os from string import Template import six from .errors import ConfigurationError log = logging.getLogger(__name__) def interpolate_environment_variables(config): mapping = BlankDefaultDict(os.environ) return dict( (service_name, process_service(service_name, service_dict, mapp...
apache-2.0
jmenashe/terminator
terminatorlib/keybindings.py
3
4960
#!/usr/bin/env python2 # Terminator - multiple gnome terminals in one window # Copyright (C) 2006-2010 cmsj@tenshu.net # # 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, version 2 only. # # T...
gpl-2.0
mway08/grpc
src/python/src/grpc/_adapter/__init__.py
1496
1530
# Copyright 2015, 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 of conditions and the f...
bsd-3-clause
marcoserafini/h-store
third_party/python/boto/iam/connection.py
11
37224
# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # 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, includin...
gpl-3.0
JVillella/tensorflow
tensorflow/python/util/tf_contextlib_test.py
141
3075
# 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...
apache-2.0
stwunsch/gnuradio
gr-blocks/python/blocks/qa_vector_insert.py
27
4181
#!/usr/bin/env python # # Copyright 2012-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
stacywsmith/ansible
lib/ansible/plugins/lookup/indexed_items.py
89
1243
# (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...
gpl-3.0
aleczadikian/tweepy
examples/oauth.py
48
1099
from __future__ import absolute_import, print_function import tweepy # == OAuth Authentication == # # This mode of authentication is the new preferred way # of authenticating with Twitter. # The consumer keys can be found on your application's Details # page located at https://dev.twitter.com/apps (under "OAuth sett...
mit
valfirst/selenium
py/selenium/webdriver/common/alert.py
23
3099
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
jaggu303619/asylum
openerp/addons/resource/faces/utils.py
433
3231
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
agpl-3.0
yhoshino11/GuestBook
.venv/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...
mit
direvus/ansible
lib/ansible/modules/monitoring/logicmonitor_facts.py
33
19997
#!/usr/bin/python # Copyright (C) 2015 LogicMonitor # 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': ['previ...
gpl-3.0
quamilek/django
tests/model_regress/tests.py
326
8962
from __future__ import unicode_literals import datetime from operator import attrgetter from django.core.exceptions import ValidationError from django.db import router from django.db.models.sql import InsertQuery from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils.time...
bsd-3-clause
mishfit/ZeroNet
src/lib/pyasn1/compat/octets.py
4
1304
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from sys import version_info if version_info[0] <= 2: int2oct = chr # noinspection PyPep8 ints2octs = lambda s: ''.join([int2oct(x) for x in s]) null = ...
gpl-2.0
PowerShellEmpire/Empire
lib/modules/powershell/collection/clipboard_monitor.py
10
3334
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-ClipboardContents', 'Author': ['@harmj0y'], 'Description': ('Monitors the clipboard on a specified interval for changes to copied text.'), 'B...
bsd-3-clause
Xunius/markdown2zim
zim2markdown.py
1
37891
"""Convert zim wiki syntax to markdown Stripped and modified from markdown2.py Syntax converted: type Markdown <- Zim ---------------------------------------------------- Heading1 # heading ===== heading ===== Heading2 ## heading ==== heading ...
mit
gwhittey23/ComicStreamServer
libs/rumps/__init__.py
6
1829
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rumps: Ridiculously Uncomplicated Mac os x Python Statusbar apps. # Copyright: (c) 2013, Jared Suttles. All rights reserved. # License: BSD, see LICENSE for details. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - """ rumps: Ridiculously...
apache-2.0
scripnichenko/glance
glance/tests/functional/test_wsgi.py
12
1862
# Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
40223245/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/unittest/__init__.py
900
2718
""" Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests and reporting the resu...
gpl-3.0
unknownlamer/xbmc
lib/gtest/test/gtest_color_test.py
3259
4911
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-2.0
bakhtout/odoo-educ
openerp/tools/config.py
24
36804
#openerp.loggers.handlers. -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program...
agpl-3.0
edmstudio/ansible
lib/ansible/plugins/lookup/csvfile.py
82
2628
# (c) 2013, Jan-Piet Mens <jpmens(at)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 later ver...
gpl-3.0
redhat-openstack/ironic
ironic/drivers/modules/amt/common.py
4
7102
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
apache-2.0
Traumflug/simulavr
regress/modules/vcdtestutil.py
5
1881
from os.path import basename, splitext from unittest import TestCase, TestLoader from sys import stderr from vcdreader import VCD, VCDError # time factors, time base is 1ns! uSec = 1000 mSec = 1000000 Sec = 1000000000 __vcds = dict() def getVCD(name): global __vcds if not name in __vcds: __vcds[name] = loadVCD...
gpl-2.0
Filechaser/nzbToMedia
libs/babelfish/tests.py
40
16455
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013 the BabelFish authors. All rights reserved. # Use of this source code is governed by the 3-clause BSD license # that can be found in the LICENSE file. # from __future__ import unicode_literals import re import sys import pickle from unittest import Te...
gpl-3.0
guorendong/iridium-browser-ubuntu
tools/gyp/test/win/gyptest-cl-buffer-security-check.py
344
1612
#!/usr/bin/env python # 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. """ Make sure buffer security check setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = Tes...
bsd-3-clause
getbraincloud/braincloud-cpp
tests/gtest-1.7.0/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 2009 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 of...
apache-2.0
Ensighten/ansible
lib/ansible/plugins/inventory/aggregate.py
237
2266
# (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
ooici/coi-services
examples/bank/test/test_bank.py
1
4461
from interface.services.icontainer_agent import ContainerAgentClient from pyon.core.exception import BadRequest from pyon.core.interceptor.validate import ValidateInterceptor from pyon.net.endpoint import RPCClient from pyon.public import Container from pyon.util.int_test import IonIntegrationTestCase from pyon.util.co...
bsd-2-clause
vishnumani2009/NumZle
nzle.py
1
12043
import pygame, sys, random from pygame.locals import * # Create the constants (go ahead and experiment with different values) BOARDWIDTH = 4 # number of columns in the board BOARDHEIGHT = 4 # number of rows in the board TILESIZE = 80 WINDOWWIDTH = 640 WINDOWHEIGHT = 480 FPS = 30 BLANK = None # R ...
gpl-2.0
CartoDB/mapnik
scons/scons-local-3.0.1/SCons/Tool/gdc.py
5
5669
from __future__ import print_function """SCons.Tool.gdc Tool-specific initialization for the GDC compiler. (https://github.com/D-Programming-GDC/GDC) Developed by Russel Winder (russel@winder.org.uk) 2012-05-09 onwards Compiler variables: DC - The name of the D compiler to use. Defaults to gdc. DPATH - Lis...
lgpl-2.1
edwardzhou1980/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/integration/SMTP_TLS.py
319
4739
"""TLS Lite + smtplib.""" from smtplib import SMTP from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password...
apache-2.0
40023247/W17test
static/Brython3.1.3-20150514-095342/Lib/importlib/basehook.py
608
1396
from javascript import JSObject from browser import window import urllib.request class TempMod: def __init__(self, name): self.name=name #define my custom import hook (just to see if it get called etc). class BaseHook: def __init__(self, fullname=None, path=None): self._fullname=fullname self._p...
agpl-3.0
EduPepperPD/pepper2013
common/lib/symmath/symmath/formula.py
14
24802
#!/usr/bin/python # -*- coding: utf-8 -*- # # File: formula.py # Date: 04-May-12 (creation) # Author: I. Chuang <ichuang@mit.edu> # # flexible python representation of a symbolic mathematical formula. # Acceptes Presentation MathML, Content MathML (and could also do OpenMath) # Provides sympy representation. impor...
agpl-3.0
glennq/scikit-learn
sklearn/linear_model/__init__.py
83
3139
""" The :mod:`sklearn.linear_model` module implements generalized linear models. It includes Ridge regression, Bayesian Regression, Lasso and Elastic Net estimators computed with Least Angle Regression and coordinate descent. It also implements Stochastic Gradient Descent related algorithms. """ # See http://scikit-le...
bsd-3-clause
MKV21/glimpse_client
3rdparty/breakpad/src/tools/gyp/pylib/gyp/sun_tool.py
314
1569
#!/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. """These functions are executed via gyp-sun-tool when using the Makefile generator.""" import fcntl import os import struct import subproces...
bsd-3-clause
SohKai/ChronoLogger
web/flask/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/_vendor/html5lib/utils.py
250
2413
from __future__ import absolute_import, division, unicode_literals from types import ModuleType try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree class MethodDispatcher(dict): """Dict with 2 special properties: On initiation, keys ...
mit
Alpistinho/FreeCAD
src/Tools/generateBase/generateModel_Module.py
26
99847
#!/usr/bin/env python # # Generated Thu Jul 22 14:11:34 2010 by generateDS.py. # import sys import getopt from xml.dom import minidom from xml.dom import Node # # If you have installed IPython you can uncomment and use the following. # IPython is available from http://ipython.scipy.org/. # ## from I...
lgpl-2.1
HiSPARC/station-software
user/python/Lib/site-packages/win32comext/directsound/test/ds_test.py
28
12476
import unittest import struct import sys import os import pywintypes import win32event, win32api import os from pywin32_testutil import str2bytes, TestSkipped import win32com.directsound.directsound as ds # next two lines are for for debugging: # import win32com # import directsound as ds WAV_FORMAT_PCM = 1 WAV_HEADER...
gpl-3.0
cloudbase/cinder
cinder/api/v1/volumes.py
5
11146
# Copyright 2011 Justin Santa Barbara # 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
mglukhikh/intellij-community
python/helpers/py3only/docutils/parsers/rst/languages/it.py
52
3268
# $Id: it.py 7119 2011-09-02 13:00:23Z milde $ # Authors: Nicola Larosa <docutils@tekNico.net>; # Lele Gaifax <lele@seldati.it> # Copyright: This module has been placed in the public domain. # Beware: the italian translation of the reStructuredText documentation # at http://docit.bice.dyndns.org/static/ReST, ...
apache-2.0
vredniiy/Jiayu-G4
Documentation/target/tcm_mod_builder.py
4981
41422
#!/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...
gpl-2.0
crocodilered/insideout
webapp/libs/tools/authtool.py
1
1108
import cherrypy import uuid from webapp.libs.models.user import User __all__ = ["AuthTool"] class AuthTool(cherrypy.Tool): def __init__(self): cherrypy.Tool.__init__(self, "before_handler", self._auth) def _auth(self): if not AuthTool.check_session(): raise cherryp...
mit
Tejal011089/medsyn2_lib
webnotes/model/controller.py
23
3670
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes import msgprint, _ from webnotes.utils import flt, cint, cstr from webnotes.model.meta import get_field_precision error_condition_map = { "=": ...
mit
junbochen/pylearn2
pylearn2/gui/graph_2D.py
10
3278
""" .. todo:: WRITEME """ import numpy as N from theano.compat.six.moves import xrange from theano import config class Graph2D: """ .. todo:: WRITEME Parameters ---------- shape : WRITEME xlim : WRITEME ycenter : WRITEME """ def __init__(self, shape, xlim, ycenter): ...
bsd-3-clause
vivekananda/fbeats
django/core/management/commands/reset.py
78
2540
from optparse import make_option from django.core.management.base import AppCommand, CommandError from django.core.management.color import no_style from django.core.management.sql import sql_reset from django.db import connections, transaction, DEFAULT_DB_ALIAS class Command(AppCommand): option_list = AppCommand....
bsd-3-clause
markrawlingson/SickRage
lib/imdb/parser/sql/dbschema.py
117
20506
#-*- encoding: utf-8 -*- """ parser.sql.dbschema module (imdb.parser.sql package). This module provides the schema used to describe the layout of the database used by the imdb.parser.sql package; functions to create/drop tables and indexes are also provided. Copyright 2005-2012 Davide Alberani <da@erlug.linux.it> ...
gpl-3.0
ayesandarmoe/microblog_flask_tutorial
flask/lib/python2.7/site-packages/migrate/tests/changeset/test_constraint.py
46
10945
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import * from sqlalchemy.util import * from sqlalchemy.exc import * from migrate.changeset.util import fk_column_names from migrate.exceptions import * from migrate.changeset import * from migrate.tests import fixture class CommonTestConstraint(fixture....
gpl-2.0
shail2810/nova
nova/db/sqlalchemy/migrate_repo/versions/293_add_migration_type.py
78
1541
# 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 # d...
apache-2.0
direvus/ansible
lib/ansible/modules/network/onyx/onyx_facts.py
66
6578
#!/usr/bin/python # # 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', 'status': ['preview'], ...
gpl-3.0
VitSalis/ting
API/API/settings.py
3
3164
""" Django settings for API project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths in...
mit
Devgrapher/quotes_twitt_bot
src/lib/twitt_bot.py
1
3882
# -*- coding:utf-8 -*- from twitter import Twitter from twitter import OAuth from threading import Thread import time import unittest from unittest import mock MAX_TWITT = 140 TWITT_NUM_SPACE = 5 # spaces for string of number of twitt class TwittBot(Thread): '''create thread and twitt messages on every interval time...
apache-2.0
tushortz/eventsim
build/lib/eventsim/simevent.py
2
9918
import random try: from tkinter import Tk, N, S, W, E from tkinter.ttk import Frame, Treeview except ImportError: from Tkinter import Tk, N, S, W, E from ttk import Frame, Treeview class Randomsim(): def __init__(self, *args): ''' Initialisation ''' self.stop, self.amount = 10, random.randint(...
mit
spaceof7/QGIS
python/plugins/processing/preconfigured/PreconfiguredAlgorithmProvider.py
23
2803
# -*- coding: utf-8 -*- """ *************************************************************************** PreconfiguredAlgorithmProvider.py --------------------- Date : April 2016 Copyright : (C) 2016 by Victor Olaya Email : volayaf at gmail dot com *********...
gpl-2.0
bhattmansi/Implementation-of-CARED-in-ns3
src/bridge/bindings/modulegen__gcc_LP64.py
10
256119
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
jasonwzhy/django
tests/many_to_one/tests.py
81
30374
import datetime from copy import deepcopy from django.core.exceptions import FieldError, MultipleObjectsReturned from django.db import models, transaction from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import ( Article, Category, Child...
bsd-3-clause
tesidroni/mp
Lib/xml/dom/pulldom.py
322
11974
import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" ...
gpl-3.0
Khroki/pymclevel
items.py
9
2930
from logging import getLogger import json import directories import os import shutil import types logger = getLogger(__name__) class ItemType(object): def __init__(self, id, name, maxdamage=0, damagevalue=0, stacksize=64): self.id = id self.name = name self.maxdamage = maxdamage s...
isc
wadobo/suds
suds/metrics.py
211
2004
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
lgpl-3.0
amitaekbote/dcos
packages/dcos-integration-test/extra/test_service_discovery.py
1
14755
import collections import logging import socket import pytest import requests import retrying import test_helpers from dcos_test_utils import marathon __maintainer__ = 'urbanserj' __contact__ = 'dcos-networking@mesosphere.io' DNS_ENTRY_UPDATE_TIMEOUT = 60 # in seconds def _service_discovery_test(dcos_api_session...
apache-2.0
zaventh/nexus7-kernel-grouper
tools/perf/util/setup.py
560
1379
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
zenodo/zenodo
tests/e2e/conftest.py
2
4120
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo 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 v...
gpl-2.0
solin/hermes2d
python/script/config.py
7
2937
#! /usr/bin/env python """ SfePy configuration script. It is used in the main Makefile to detect the correct python paths and other options that can be specified in site_cfg.py. Prints results to stdout. options: python_version The default Python version that is installed on the system. archlib 'lib' or 'l...
gpl-2.0
seberg/numpy
numpy/_pytesttester.py
7
6302
""" Pytest test running. This module implements the ``test()`` function for NumPy modules. The usual boiler plate for doing that is to put the following in the module ``__init__.py`` file:: from numpy._pytesttester import PytestTester test = PytestTester(__name__) del PytestTester Warnings filtering and...
bsd-3-clause
arabenjamin/scikit-learn
sklearn/feature_selection/tests/test_feature_select.py
143
22295
""" Todo: cross-check the F-value with stats model """ from __future__ import division import itertools import warnings import numpy as np from scipy import stats, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_raises...
bsd-3-clause
datascopeanalytics/fabtools
fabtools/openvz/contextmanager.py
7
9138
""" OpenVZ containers ================= """ from contextlib import contextmanager import hashlib import os import posixpath import tempfile from fabric.api import ( env, hide, output, settings, sudo, ) from fabric.operations import ( _AttributeString, _execute, _prefix_commands, _p...
bsd-2-clause
EricSchles/veyepar
dj/scripts/post_arc.py
1
6945
#!/usr/bin/python # posts to archive.org import archive_uploader import os import datetime import pw from process import process from main.models import Client class post(process): ready_state = 4 def process_ep(self, ep): if self.options.verbose: print ep.id, ep.name if not ep.released: # and not s...
mit
sloanyang/android_external_webkit
Tools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py
15
2820
# Copyright (C) 2010 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 of conditions and the f...
gpl-2.0
supertom/libcloud
libcloud/backup/drivers/dimensiondata.py
7
25824
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
GuessWhoSamFoo/pandas
pandas/core/tools/numeric.py
1
6509
import numpy as np from pandas._libs import lib from pandas.core.dtypes.cast import maybe_downcast_to_dtype from pandas.core.dtypes.common import ( ensure_object, is_datetime_or_timedelta_dtype, is_decimal, is_number, is_numeric_dtype, is_scalar) from pandas.core.dtypes.generic import ABCIndexClass, ABCSeries...
bsd-3-clause
geopython/pycsw
tests/unittests/test_wsgi.py
5
6096
# ================================================================= # # Authors: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com> # # Copyright (c) 2017 Ricardo Garcia Silva # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the...
mit
philsch/ansible
test/units/parsing/utils/test_jsonify.py
119
1499
# -*- coding: utf-8 -*- # (c) 2016, James Cammarata <jimi@sngx.net> # # 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 o...
gpl-3.0
G3-jang/rice-interactive-python
poll/migrations/0003_auto__add_saletype__add_state.py
1
3123
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Saletype' db.create_table(u'poll_saletype', ( ...
gpl-3.0
jamesbdunlop/defaultShotgunLibrary
shd_readXML.py
2
30478
import maya.cmds as cmds #from xml.etree.ElementTree import ElementTree import xml.etree.ElementTree as ElementTree from shotgun import sg_shd_lib as shd_lib from apps.app_logger import log import config_constants as configCONST def createAll(XMLPath = None, parentGrp = None, Namespace = None, Root = 'MaterialNodes',...
apache-2.0
rven/odoo
addons/website_sale_comparison/tests/test_website_sale_comparison.py
3
10077
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import OrderedDict from lxml import etree from odoo import tools import odoo.tests @odoo.tests.tagged('-at_install', 'post_install') class TestWebsiteSaleComparison(odoo.tests.TransactionCase): de...
agpl-3.0
retomerz/intellij-community
python/testData/inspections/PyArgumentEqualDefaultInspection/test.py
19
2016
def foo(a, b = 345, c = 1): pass foo(1, <weak_warning descr="Argument equals to default parameter value">345</weak_warning>, 22) def foo(a = None): pass foo(<weak_warning descr="Argument equals to default parameter value">a = None</weak_warning>) def bar(a = 2, b = 3): pass #PY-3260 bar(<weak_warning desc...
apache-2.0
pypowervm/pypowervm
pypowervm/tasks/sriov.py
2
25588
# Copyright 2016, 2018 IBM Corp. # # 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 require...
apache-2.0
dstroppa/openstack-smartos-nova-grizzly
nova/openstack/common/rpc/service.py
14
2733
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
apache-2.0
jclc/discus-inferno
flaskenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/universaldetector.py
200
6664
######################## 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...
mit
CybOXProject/python-cybox
cybox/objects/win_network_share_object.py
1
1307
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import fields import cybox.bindings.win_network_share_object as win_network_share_binding from cybox.common import ObjectProperties, String, NonNegativeInteger class WinNetworkShare(ObjectProperties):...
bsd-3-clause
sapcc/monasca-agent
tests_to_fix/test_mcache.py
1
4009
import unittest import os import time from subprocess import Popen, PIPE from tests.common import load_check from nose.plugins.skip import SkipTest class TestMemCache(unittest.TestCase): def setUp(self): self.agent_config = { "memcache_server": "localhost", "memcache_instance_1":...
bsd-3-clause
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Standards/Itemizers/Manager/__init__.py
2
13595
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> A Manager completes the list of grand-manage nodes that a child node could have. It acts only at one level. """ #<DefineAugmentation> import ShareYourSystem as SYS BaseModuleStr="ShareYourSy...
mit
pablobesada/tw
frontend/gnip/summarizer.py
1
16677
#encoding: utf-8 import argparse from mongo import MongoManager from pprint import pprint from datetime import datetime, timedelta import time import numbers from collections import Counter from copy import deepcopy import re import sys class SumDict(dict): def __add__(self, o): res = SumDict() ...
apache-2.0
inspirehep/inspire-next
inspirehep/modules/migrator/models.py
1
3482
# -*- 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
LLNL/spack
var/spack/repos/builtin/packages/py-nbformat/package.py
3
1032
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNbformat(PythonPackage): """The Jupyter Notebook format""" homepage = "https://gith...
lgpl-2.1
drsounds/mingus
setup.py
7
2480
from distutils.core import setup setup(name= "mingus", version = "0.5.1", description = "mingus is a music package for Python", long_description = """mingus is a package for Python used by programmers, musicians, \ composers and researchers to make and investigate music. At the core of mingus is mu...
gpl-3.0
fossoult/odoo
addons/website_gengo/__init__.py
316
1024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
agpl-3.0
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/multiprocessing/forking.py
55
14331
# # Module for starting a process object using os.fork() or CreateProcess() # # multiprocessing/forking.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # import os import sys import signal from multiprocessing import util, process __all__ = ['Popen', 'assert_spawning', 'exit', 'duplicate', 'close', 'Fo...
apache-2.0
alxgu/ansible
lib/ansible/modules/network/ironware/ironware_command.py
87
5154
#!/usr/bin/python # # 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', 'status': ['preview'],...
gpl-3.0
BiaDarkia/scikit-learn
examples/classification/plot_classification_probability.py
138
2871
""" =============================== Plot classification probability =============================== Plot the classification probability for different classifiers. We use a 3 class dataset, and we classify it with a Support Vector classifier, L1 and L2 penalized logistic regression with either a One-Vs-Rest or multinom...
bsd-3-clause
TheDegree0/menescraper
menescraper/menescraper/lib/python2.7/site-packages/pip/commands/search.py
344
4736
import sys import textwrap import pip.download from pip.basecommand import Command, SUCCESS from pip.util import get_terminal_size from pip.log import logger from pip.backwardcompat import xmlrpclib, reduce, cmp from pip.exceptions import CommandError from pip.status_codes import NO_MATCHES_FOUND from pip._vendor imp...
gpl-2.0