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
lthurlow/Network-Grapher
proj/external/numpy-1.7.0/numpy/core/tests/test_umath.py
8
45076
import sys import platform from numpy.testing import * import numpy.core.umath as ncu import numpy as np def on_powerpc(): """ True if we are running on a Power PC platform.""" return platform.processor() == 'powerpc' or \ platform.machine().startswith('ppc') class _FilterInvalids(object): d...
mit
RNAcentral/rnacentral-import-pipeline
tests/rnacentral/lookup_test.py
1
4679
# -*- coding: utf-8 -*- """ Copyright [2009-2019] EMBL-European Bioinformatics Institute 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...
apache-2.0
caisq/tensorflow
tensorflow/contrib/data/python/ops/random_ops.py
13
1779
# 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
hayesgm/cerberus
scripts/cerberus_run.py
1
1413
#!/usr/bin/env python import syslog from subprocess import call import urllib2 import json import re import docker_login from user_data import get_user_data # Starts a docker run for a given repo # This will effectively call `docker run <flags> <repo>:<tag>` # This service is monitored by Upstart # User Data # docker....
mit
xuweiliang/Codelibrary
openstack_dashboard/dashboards/project/containers/tables.py
14
14970
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
soarpenguin/ansible
lib/ansible/modules/windows/win_reboot.py
78
2860
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
gpl-3.0
APSL/kaneda
django_kaneda/settings.py
1
2814
from django.conf import settings BACKEND = getattr(settings, 'KANEDA_BACKEND', None) QUEUE = getattr(settings, 'KANEDA_QUEUE', None) # Elasticsearch backend settings ELASTIC_INDEX_NAME = getattr(settings, 'KANEDA_ELASTIC_INDEX_NAME', 'kaneda') ELASTIC_APP_NAME = getattr(settings, 'KANEDA_ELASTIC_APP_NAME', 'default')...
mit
drammock/mne-python
tutorials/inverse/20_dipole_fit.py
5
5301
# -*- coding: utf-8 -*- """ ============================================================ Source localization with equivalent current dipole (ECD) fit ============================================================ This shows how to fit a dipole :footcite:`Sarvas1987` using mne-python. For a comparison of fits between MN...
bsd-3-clause
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/boto/kinesis/__init__.py
145
1652
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights...
mit
dkarakats/edx-platform
lms/djangoapps/survey/tests/test_utils.py
62
3963
""" Python tests for the Survey models """ from collections import OrderedDict from django.test.client import Client from django.contrib.auth.models import User from survey.models import SurveyForm from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import Modul...
agpl-3.0
niharparikh/Projects
QuantAnalysis/src/Analytics.py
1
3559
__author__ = 'Nihar' __project__ = 'QuantAnalysis' import talib import os import numpy as np # DEFINE THRESHOLD FOR SUCCESS success = 0.60 # HARD CODE PARAMETERS right = 0.005 veryright = 0.015 delta = 30 upperbound = 80 lowerbound = 20 class Loader: def runtest(self, filename, success): # READ PRICES...
apache-2.0
mzdaniel/oh-mainline
vendor/packages/gdata/src/gdata/tlslite/integration/AsyncStateMachine.py
238
7198
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readabl...
agpl-3.0
ishanic/scikit-learn
sklearn/manifold/tests/test_isomap.py
226
3941
from itertools import product import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from sklearn import datasets from sklearn import manifold from sklearn import neighbors from sklearn import pipeline from sklearn import preprocessing from sklearn.utils.testing import assert_less ...
bsd-3-clause
bjolivot/ansible
lib/ansible/modules/cloud/rackspace/rax_mon_alarm.py
70
7932
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
elkingtonmcb/scikit-learn
examples/decomposition/plot_incremental_pca.py
244
1878
""" =============== Incremental PCA =============== Incremental principal component analysis (IPCA) is typically used as a replacement for principal component analysis (PCA) when the dataset to be decomposed is too large to fit in memory. IPCA builds a low-rank approximation for the input data using an amount of memo...
bsd-3-clause
mzwiessele/mzparam
paramz/transformations.py
2
8925
#=============================================================================== # Copyright (c) 2012 - 2014, GPy authors (see AUTHORS.txt). # Copyright (c) 2015, Max Zwiessele # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
bsd-3-clause
spacewalkproject/spacewalk
client/rhel/rhnlib/test/06-leaking-ssl-fd.py
30
2090
#!/usr/bin/python # # tests leaking file descriptors # # # USAGE: $0 SERVER SYSTEMID import os import sys sys.path.append('..') from rhn.rpclib import Server from threading import Thread import time SERVER = "xmlrpc.rhn.redhat.com" HANDLER = "/XMLRPC" system_id_file = '/etc/sysconfig/rhn/systemid' try: SERVER =...
gpl-2.0
DinoTools/python-overpy
tests/test_xml.py
1
7175
import pytest import overpy from tests import read_file from tests.base_class import BaseTestAreas, BaseTestNodes, BaseTestRelation, BaseTestWay class TestAreas(BaseTestAreas): def test_node01(self): api = overpy.Overpass() # DOM result = api.parse_xml(read_file("xml/area-01.xml"), parse...
mit
achang97/YouTunes
lib/python2.7/site-packages/wheel/signatures/djbec.py
62
7035
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
mit
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/topi/python/topi/opengl/dense.py
1
1564
# pylint: disable=invalid-name, unused-variable """Schedule for dense operator""" from __future__ import absolute_import as _abs import tvm from .. import tag from .. import generic @generic.schedule_dense.register(["opengl"]) def schedule_dense(outs): """Schedule for dense operator. Parameters ----------...
apache-2.0
Mortifix/SM-G920T
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
AlkamiCode/snake-game
node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
9586
#!/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 the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
mit
epic-math/sfvue2
registration/backends/default/views.py
8
5367
from django.conf import settings from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from registration import signals from registration.forms import RegistrationFormUniqueEmail from registration.models import RegistrationProfile from registration.views import ActivationView...
mit
openstack/tempest
tempest/tests/lib/services/image/v1/test_image_members_client.py
7
3322
# Copyright 2016 NEC Corporation. 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 ...
apache-2.0
delMar43/wcmodtoolsources
WC1_clone/tim/BlockUnpacker.py
1
2014
""" block header filesize table bytes data sub-blocks """ def SwapEndian(bytes): retval = 0 for i in range(0, len(bytes)): b = bytes[i] #retval += b*256**(len(bytes)-1-i) retval += b*256**(i) return retval class Table: def __init__(self, bytes): self.bytes = bytes self.offsets = [] self.off...
mit
BellScurry/gem5-fault-injection
src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_mask.py
91
2391
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
GeoscienceAustralia/PF3D
source/aim/interface.py
1
28688
"""Public interface to Ash Impact Modelling (AIM) This module publishes one function, run_scenario() which will execute Fall3d based on volcanological parameters specified in a scenario script (e.g. merapi.py), a topographic data file and a wind profile dataset. The format of these files is described in (FIXME: Add re...
gpl-3.0
tensorflow/probability
tensorflow_probability/python/distributions/gaussian_process.py
1
28387
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
apache-2.0
lixt/lily2-gem5
src/cpu/hybrid/BaseSimpleCPU.py
10
2208
# Copyright (c) 2008 The Hewlett-Packard Development Company # 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...
bsd-3-clause
saeki-masaki/glance
glance/tests/functional/v2/test_tasks.py
9
4767
# Copyright 2013 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 required by a...
apache-2.0
chruck/cpsc8220
linux-4.3.3/scripts/gdb/linux/tasks.py
630
2892
# # gdb helper commands and functions for Linux kernel debugging # # task & thread 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 utils task_type = utils.CachedType(...
gpl-2.0
gregdek/ansible
test/units/modules/network/f5/test_bigip_gtm_topology_region.py
17
4038
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
mammo0/qtsixa
qtsixa/gui/qtsixa_main.py
9
52767
#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports import dbus, os, sys from commands import getoutput from functools import partial from PyQt4.QtCore import QFile, QTimer, SIGNAL from PyQt4.QtGui import QAction, QCursor, QIcon, QMainWindow, QMenu, QMessageBox, QSystemTrayIcon, QWizard import shared, qtsixa_abo...
gpl-2.0
amaas/stanford-ctc
ctc_fast/debug-utils/rnnetcpu.py
2
7023
import ctc_fast as ctc import numpy as np import pdb class RNNet: def __init__(self,inputDim,outputDim,layerSize,numLayers,maxBatch, train=True,temporalLayer=-1): self.outputDim = outputDim self.inputDim = inputDim self.layerSize = layerSize self.numLayers = numLayers ...
apache-2.0
windofthesky/ansible
contrib/inventory/zone.py
111
1463
#!/usr/bin/env python # (c) 2015, Dagobert Michelsen <dam@baltic-online.de> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
gpl-3.0
CodingJonas/visualize-facebook-chat
code/my_excepthook.py
1
1711
# @package constants # For better error messages import sys import traceback import os import re DARK_BLUE="\033[34m" RED = '\033[91m' GREEN = '\033[92m' YELLOW = '\033[93m' LIGHT_PURPLE = '\033[94m' PURPLE = '\033[95m' CYAN = '\033[96m' END = '\033[0m' ## # @brief overwrite the system exception output for a more re...
gpl-3.0
reiniervdwindt/power-rangers-api
src/api/v1/series/tests.py
1
1380
from django.test import TestCase from rest_framework.reverse import reverse class SeriesTestCase(TestCase): fixtures = ['series.json'] def test_series_list(self): resp = self.client.get(reverse('api:v1:series-list')) self.assertEqual(resp.status_code, 200) self.assertIsInstance(resp....
mit
junghans/espressopp
src/ParticleGroup.py
2
2257
# Copyright (C) 2012,2013,2015 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms...
gpl-3.0
janebeckman/gpdb
gpMgmt/bin/gppylib/test/unit/test_unit_heapchecksum.py
7
9499
from mock import Mock, patch from gparray import GpDB, GpArray from gppylib.commands.base import CommandResult from gppylib.heapchecksum import HeapChecksum, REMOTE from gppylib.test.unit.gp_unittest import GpTestCase class GpHeapChecksumTestCase(GpTestCase): def setUp(self): self.gparray = self.createGp...
apache-2.0
rosudrag/eve-wspace
evewspace/POS/templatetags/posstatus.py
16
1826
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option...
gpl-3.0
pferreir/indico
indico/modules/events/contributions/fields.py
3
3138
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.db.sqlalchemy.util.session import no_autoflush from indico.modules.events.contributions.m...
mit
Ictp/indico
indico/MaKaC/webinterface/rh/categoryMod.py
1
21859
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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
pappasam/latexbuild
latexbuild/jinja2_extension.py
1
1926
"""Latex-specific Jinja2 configurations and functions This module provides a template-rendering function for Jinja2 that overrides Jinja2 defaults to make it work more seamlessly with Latex. """ import jinja2 from .utils import recursive_apply from .latex_parse import escape_latex_str_if_str ########################...
mit
botioni/aml_linux_kernel
tools/perf/scripts/python/syscall-counts.py
944
1429
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
hkawasaki/kawasaki-aio8-1
cms/djangoapps/contentstore/views/tests/test_transcripts.py
10
26441
"""Tests for items views.""" import os import json import tempfile from uuid import uuid4 import copy import textwrap from pymongo import MongoClient from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.conf import settings from xmodule.video_module import transcri...
agpl-3.0
opengeogroep/inasafe
safe/messaging/test_messaging.py
4
12485
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Paragraph.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 Foundatio...
gpl-3.0
hatwar/buyback-erpnext
erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
6
3562
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt, today from erpnext.accounts.utils import get_fiscal_year from erpnext.accounts.doctype.jour...
agpl-3.0
zhaodelong/django
django/templatetags/static.py
197
4052
from django import template from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __init__(self, varname=None, name=None): ...
bsd-3-clause
davidzchen/tensorflow
tensorflow/python/keras/preprocessing/sequence.py
8
6783
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Endika/c2c-rd-addons
chricar_product_gtin/tests/test_product_gtin.py
4
2077
# -*- encoding: utf-8 -*- # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.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 # published...
agpl-3.0
hzlf/openbroadcast
website/apps/wikisyntax/templatetags/wiki_tags.py
1
1668
import re from django import template from wikisyntax.helpers import wikify_string, wikisafe_markdown register = template.Library() @register.filter @template.defaultfilters.stringfilter def wikimarkdown(value): return wikisafe_markdown(value) @register.filter @template.defaultfilters.stringfilter def wikilink(val...
gpl-3.0
VIJAYCHARAN/MapStore
mapcomposer/app/static/externals/proj4js/tools/pjjs.py
250
3061
#!/usr/bin/env python # # TODO explain # # -- Copyright 2007 IGN France / Geoportail project -- # import sys import os import re SUFFIX_JAVASCRIPT = ".js" def _pjcat2js_remove(rezDirectory,catName,targetDirectory): pjCatFilename = os.path.join(rezDirectory, catName) pjCat = open(pjCatFilename,'r') commen...
gpl-3.0
encukou/samba
third_party/dnspython/dns/rdtypes/ANY/RRSIG.py
76
5736
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
atsao72/sympy
sympy/polys/sqfreetools.py
103
11127
"""Square-free decomposition algorithms and related tools. """ from __future__ import print_function, division from sympy.polys.densebasic import ( dup_strip, dup_LC, dmp_ground_LC, dmp_zero_p, dmp_ground, dup_degree, dmp_degree, dmp_raise, dmp_inject, dup_convert) from sympy.polys.densea...
bsd-3-clause
pelorusjack/BlockDX
contrib/spendfrom/spendfrom.py
1
10140
#!/usr/bin/env python # # Use the raw transactions API to spend PIVs received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a blocknetdxd or bloc...
mit
axbaretto/beam
sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.py
7
4321
# -*- coding: utf-8 -*- """ sphinx.websupport.storage ~~~~~~~~~~~~~~~~~~~~~~~~~ Storage for the websupport package. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ class StorageBackend(object): def pre_build(self): """Calle...
apache-2.0
coala/coala
tests/output/LoggingTest.py
33
1255
import json import logging import unittest from coalib.output.Logging import configure_json_logging class LoggingTest(unittest.TestCase): def test_json_logging(self): log_stream = configure_json_logging() logging.debug('This is debug log.') logging.info('This is info log.') logg...
agpl-3.0
vbelakov/h2o
py/testdir_single_jvm/test_GLM2_trisum.py
9
1984
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm def define_params(): paramDict = { 'family': ['binomial'], 'lambda': [1.0E-4], 'alpha': [0.5], 'max_iter': [2000], 'n_folds': [1], ...
apache-2.0
Ryan-K/flask-oauthlib
tests/_base.py
17
2379
# coding: utf-8 import os import sys import tempfile import unittest from flask_oauthlib.client import prepare_request try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse if sys.version_info[0] == 3: python_version = 3 string_type = str else: python_version = 2...
bsd-3-clause
leleobhz/scripts
python/others_utilities/msnp/net.py
3
4372
# net.py -- Connection, HttpProxyConnection classes # # Copyright (C) 2003 Manish Jethani (manish_jethani AT yahoo.com) # # 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 o...
gpl-2.0
ehashman/pelican
pelican/tests/test_pelican.py
3
8924
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import collections import locale import logging import os import subprocess import sys from shutil import rmtree from tempfile import mkdtemp from pelican import Pelican from pelican.generators import StaticGenerator from pelican.setting...
agpl-3.0
ihmeuw/vivarium
tests/framework/test_population.py
1
2608
import pandas as pd import pytest from vivarium.framework.population import PopulationView, InitializerComponentSet, PopulationError, PopulationManager class DummyPopulationManager: def __init__(self): self.get_population = lambda _ : pd.DataFrame({'age': [0, 10, 20, 30, 40, 50, 60, 70], 'sex': ['Male', ...
gpl-3.0
Quicksteve/meteor
examples/unfinished/python-ddp-client/ddp-client.py
169
10313
#!/usr/bin/env python2.7 import sys import json import time import argparse import thread import threading import traceback from ws4py.client.threadedclient import WebSocketClient from cmd import Cmd DDP_VERSIONS = ["pre1"] def log(msg): """A shortcut to write to the standard error file descriptor""" sys.s...
mit
massie/avro
lang/py3/avro/tests/run_tests.py
17
2274
#!/usr/bin/env python3 # -*- mode: python -*- # -*- coding: utf-8 -*- # 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...
apache-2.0
tylertian/Openstack
openstack F/cinder/cinder/tests/test_iscsi.py
4
3795
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Red Hat, 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 # #...
apache-2.0
heromod/migrid
mig/shared/valuecheck.py
1
1451
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # valuecheck - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms o...
gpl-2.0
public-ink/public-ink
server/appengine-staging/lib/graphql/validation/rules/possible_fragment_spreads.py
3
2193
from ...error import GraphQLError from ...utils.type_comparators import do_types_overlap from ...utils.type_from_ast import type_from_ast from .base import ValidationRule class PossibleFragmentSpreads(ValidationRule): def enter_InlineFragment(self, node, key, parent, path, ancestors): frag_type = self.co...
gpl-3.0
ianyh/heroku-buildpack-python-opencv
vendor/pip-1.5.4/pip/vcs/bazaar.py
393
4943
import os import tempfile import re from pip.backwardcompat import urlparse from pip.log import logger from pip.util import rmtree, display_path, call_subprocess from pip.vcs import vcs, VersionControl from pip.download import path_to_url class Bazaar(VersionControl): name = 'bzr' dirname = '.bzr' repo_na...
mit
tbinjiayou/Odoo
addons/note/note.py
153
8900
# -*- 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
botswana-harvard/edc-bhp074
bhp074/apps/eit/eit_app_configuration.py
1
8612
from datetime import datetime try: from config.labels import aliquot_label except ImportError: aliquot_label = None from edc.apps.app_configuration.classes import BaseAppConfiguration from edc.core.bhp_variables.models import StudySpecific, StudySite from edc.lab.lab_packing.models import DestinationTuple fro...
gpl-2.0
apache/airflow
tests/providers/sftp/hooks/test_sftp.py
2
11617
# # 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
rghe/ansible
lib/ansible/modules/monitoring/zabbix/zabbix_hostmacro.py
36
8385
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, 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.1', ...
gpl-3.0
tyndare/osmose-backend
plugins/Name_Saint_FR.py
1
2826
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2011 ## ## ...
gpl-3.0
keen99/SickRage
tornado/concurrent.py
65
16799
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
gpl-3.0
selboo/SimpleBookMarks
src/tornado/concurrent.py
39
8381
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
gpl-2.0
fritzstauff/trigger
trigger/packages/tftpy/TftpContexts.py
12
14419
"""This module implements all contexts for state handling during uploads and downloads, the main interface to which being the TftpContext base class. The concept is simple. Each context object represents a single upload or download, and the state object in the context object represents the current state of that transf...
bsd-3-clause
TeamValvrave/Cloud-Gomoku
toolbox/tools.py
1
10598
import pygame as pg import os import shutil import random import sys import json class DB: dirname = 'save' if not os.path.exists(dirname): os.mkdir(dirname) path = os.path.join(dirname, 'database{}'.format(sys.version.split()[0])) #key = 'database' @staticmethod def exists():...
mit
hueboy/client
node_modules/edison-io/node_modules/galileo-io/node_modules/mraa/tests/mock/general_checks.py
21
1554
#!/usr/bin/env python # Author: Costin Constantin <costin.c.constantin@intel.com> # Copyright (c) 2015 Intel Corporation. # # Contributors: Alex Tereschenko <alext.mkrs@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the...
mit
metacloud/molecule
molecule/logger.py
1
5513
# Copyright (c) 2015-2018 Cisco 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, including without limitation the # rights to use, copy, modify, merge...
mit
gsmartway/odoo
addons/account_followup/tests/__init__.py
261
1088
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
ruilin/RLMap
search/pysearch/run_search_server.py
11
2565
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- from __future__ import print_function from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer import argparse import json import os import pysearch import urlparse DIR = os.path.dirname(__file__) RESOURCE_PATH = os.path.realpath(os.path.join(DIR, '..', '..', 'data...
apache-2.0
jstammers/EDMSuite
NavPython/IronPython/Lib/distutils/log.py
255
1686
"""A simple log mechanism styled after PEP 282.""" # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 import sys class Log: def __init__(self, threshold=WARN): self.threshold = thre...
mit
raphaelmerx/django
tests/gis_tests/geoapp/test_functions.py
262
21654
from __future__ import unicode_literals import re from decimal import Decimal from django.contrib.gis.db.models import functions from django.contrib.gis.geos import ( LineString, Point, Polygon, fromstr, geos_version_info, ) from django.db import connection from django.test import TestCase, skipUnlessDBFeature fr...
bsd-3-clause
LohithBlaze/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
jasonbot/django
django/template/context_processors.py
204
2465
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the 'context_processors' option of the configuration of a DjangoTemplates backend and use...
bsd-3-clause
jangorecki/h2o-3
h2o-py/tests/testdir_algos/deepwater/pyunit_custom_alexnet_deepwater.py
4
3737
from __future__ import print_function import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils from h2o.estimators.deepwater import H2ODeepWaterEstimator import importlib """ Reference: Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification...
apache-2.0
roopali8/tempest
tempest/scenario/test_encrypted_cinder_volumes.py
23
3119
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
apache-2.0
40323212/bg7_cdw11
users/b/g4/bg4_40323208.py
5
22240
# 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步) from flask import Blueprint, render_template, make_response # 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄 bg4_40323208 = Blueprint('bg4_40323208', __name__, url_prefix='/bg4_40323208', template_folder='templates') @bg4_40323208.route('/taskaaaa') def taskaaaa(): o...
agpl-3.0
ardi69/pyload-0.4.10
pyload/plugin/internal/MultiHook.py
1
9901
# -*- coding: utf-8 -*- import re import time import traceback from pyload.plugin.Hook import Hook from pyload.utils import decode, remove_chars class MultiHook(Hook): __name = "MultiHook" __type = "hook" __version = "0.45" __config = [("pluginmode" , "all;listed;unlisted", "Use for plugi...
gpl-3.0
letsencrypt/letsencrypt
certbot-ci/setup.py
1
1295
from setuptools import setup from setuptools import find_packages version = '0.32.0.dev0' install_requires = [ 'pytest', 'pytest-cov', 'pytest-xdist', 'pytest-sugar', 'coverage', 'requests', 'pyyaml', ] setup( name='certbot-ci', version=version, description="Certbot continuou...
apache-2.0
karthik339/Agni
MainDemo/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.py
915
12621
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import re from . import _base from .. import ihatexml from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory tag_regexp = re.compile("{([^}]*)}(.*)") def getETreeBu...
apache-2.0
akubicharm/openshift-ansible
roles/lib_openshift/src/ansible/oc_label.py
84
1037
# pylint: skip-file # flake8: noqa def main(): ''' ansible oc module for labels ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='present', type='str', choices=[...
apache-2.0
agoose77/hivesystem
demonstration/tetris1/tetrishive-panda.py
13
1415
from __future__ import print_function # Load any custom data models for this project import spyder, Spyder import spydermodels, spyderhives # Load the hivemap (visual hive, edited with HiveGUI) import bee #defines the Hivemap datamodel hivemap = Spyder.Hivemap.fromfile("tetrishive-panda.hivemap") #Put the hivemap ...
bsd-2-clause
abdoosh00/edx-platform
cms/djangoapps/contentstore/features/advanced_settings.py
15
5080
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611 from common import type_in_codemirror, press_the_notification_button, get_codemirror_value KEY_CSS = '.key h3.title' DISPLAY_NAME_KEY = "Cou...
agpl-3.0
amaniak/fabric
fabric/decorators.py
42
7538
""" Convenience decorators for use in fabfiles. """ from __future__ import with_statement import types from functools import wraps from Crypto import Random from fabric import tasks from .context_managers import settings def task(*args, **kwargs): """ Decorator declaring the wrapped function to be a new-st...
bsd-2-clause
kfox1111/horizon
openstack_dashboard/dashboards/identity/groups/tests.py
41
8437
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
apache-2.0
richardwhiuk/ns-moose
bindings/python/apidefs/gcc-ILP32/ns3_module_bulk_send.py
8
6010
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## bulk-send-application.h: ns3::BulkSendApplication [class] module.add_class('BulkSendApplication', parent=root_module['ns3::Application']) ## Registe...
gpl-2.0
swangui/ggrid
mako/_ast_util.py
57
25615
# mako/_ast_util.py # Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
mit
rajalokan/nova
nova/policies/agents.py
1
1291
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
DamnWidget/anaconda_php
anaconda_lib/sublime.py
1
1980
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details from functools import partial import sublime as st3_sublime from .helpers import get_settings, active_view from .anaconda_plugin import anaconda_sublime, Worker, Callback def run_linter(v...
gpl-3.0