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
thnee/ansible
lib/ansible/modules/network/f5/bigip_firewall_log_profile.py
23
28678
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2019, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
luogangyi/bcec-nova
nova/compute/task_states.py
96
3443
# Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
trianam/tkLayoutTests
TestRouting/test22/conf/xml/longbarrel_cmsIdealGeometryXML_cff.py
43
6122
import FWCore.ParameterSet.Config as cms from Geometry.CMSCommonData.cmsIdealGeometryXML_cfi import * XMLIdealGeometryESSource.geomXMLFiles = cms.vstring( 'SLHCUpgradeSimulations/Geometry/data/longbarrel/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/no...
gpl-2.0
idem2lyon/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/groupon.py
132
1903
from __future__ import unicode_literals from .common import InfoExtractor class GrouponIE(InfoExtractor): _VALID_URL = r'https?://www\.groupon\.com/deals/(?P<id>[^?#]+)' _TEST = { 'url': 'https://www.groupon.com/deals/bikram-yoga-huntington-beach-2#ooid=tubGNycTo_9Uxg82uESj4i61EYX8nyuf', 'in...
gpl-3.0
xapp-le/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
ropik/chromium
third_party/closure_linter/closure_linter/common/erroraccumulator.py
264
1306
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
bsd-3-clause
walchko/pygecko
retired/old_version/original/tests/test_zmq.py
1
2249
import numpy as np from pygecko import ZmqClass as zmq from pygecko.Messages import Image, Vector, dict_to_class # from pygecko.lib.Messages import serialize, deserialize # import simplejson as json from pygecko import Messages as Msgs def test_pub_sub(): tcp = ('127.0.0.1', 9000) pub = zmq.Pub(tcp) sub = zmq.Sub(...
mit
ppwwyyxx/tensorflow
tensorflow/python/distribute/collective_all_reduce_strategy.py
3
23796
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
resmo/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp.py
13
51281
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
hyperized/ansible
lib/ansible/modules/network/ovs/openvswitch_db.py
5
6771
#!/usr/bin/python # coding: utf-8 -*- # # (c) 2015, Mark Hamilton <mhamilton@vmware.com> # Portions copyright @ 2015 VMware, 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...
gpl-3.0
jgurtowski/ectools
pb_correct.py
1
7907
#!/usr/bin/env python import sys from nucio import * from seqio import fastaIterator from operator import itemgetter from itertools import groupby, repeat, izip_longest, imap, count, chain from collections import namedtuple from cov import getMarkedRanges from misc import create_enum import copy if not len(sys.ar...
bsd-3-clause
40423105/2017springcd_hw
plugin/summary/summary.py
317
2852
""" Summary ------- This plugin allows easy, variable length summaries directly embedded into the body of your articles. """ from __future__ import unicode_literals from pelican import signals from pelican.generators import ArticlesGenerator, StaticGenerator, PagesGenerator def initialized(pelican): from pelican...
agpl-3.0
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/end_to_end_ml/labs/serving/application/lib/pyasn1_modules/rfc5940.py
13
1613
# # This file is part of pyasn1-modules software. # # Created by Russ Housley with assistance from asn1ate v.0.6.0. # Modified by Russ Housley to add map for use with opentypes. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # Additional CMS Revocation Information Choic...
apache-2.0
MoritzS/django
tests/model_fields/test_foreignkey.py
44
3486
from decimal import Decimal from django.apps import apps from django.core import checks from django.db import models from django.test import TestCase, skipIfDBFeature from django.test.utils import isolate_apps from .models import Bar, FkToChar, Foo, PrimaryKeyCharModel class ForeignKeyTests(TestCase): def test...
bsd-3-clause
modsim/redicon-tools
tools/analyze-xyzp.py
1
8976
#!/usr/bin/env python2 # # analyze-xyz.py 2013 S Kondrat aka Valiska <valiska@gmail.com> # Pradeep Burla <pradeepburla91@gmail.com> # # Read the XYZ file and output geo centre position, displaysment, # and mean-square displacemnt, and the 'diffusion coefficient' as a function of time # # Usage...
gpl-3.0
caesar2164/edx-platform
openedx/core/djangoapps/credit/utils.py
130
1202
""" Utilities for the credit app. """ from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore def get_course_blocks(course_key, category): """ Retrieve all XBlocks in the course for a particular category. Returns only XBlocks that are published and haven't been ...
agpl-3.0
cetic/ansible
lib/ansible/module_utils/facts/virtual/freebsd.py
135
1525
# 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 in the hope that ...
gpl-3.0
LedgerHQ/blue-loader-python
ledgerblue/commTCP.py
1
2615
""" ******************************************************************************* * Ledger Blue * (c) 2019 Ledger * * 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-2.0
CSC301H-Fall2013/JuakStore
Storefront/juakstore/juakregister/admin.py
1
1634
from django.contrib import admin from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from juakstore.juakregister.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): actions = ['activate_u...
mit
carsongee/edx-platform
cms/djangoapps/contentstore/views/public.py
41
2264
""" Public views """ from django_future.csrf import ensure_csrf_cookie from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.conf import settings from edxmako.shortcuts import render_to_response from external_auth.views import (s...
agpl-3.0
chiamingyen/pygroup
wsgi/static/Brython2.2.0rc0-20140913-093500/Lib/unittest/test/test_program.py
738
10833
import io import os import sys import unittest class Test_TestProgram(unittest.TestCase): def test_discovery_from_dotted_path(self): loader = unittest.TestLoader() tests = [self] expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__)) self.wasRun = False ...
gpl-2.0
antsmc2/mics
survey/views/location_weights.py
2
3484
from datetime import datetime from django.utils.timezone import utc from django.contrib import messages from django.contrib.auth.decorators import permission_required, login_required from django.http import HttpResponseRedirect from django.shortcuts import render from rapidsms.contrib.locations.models import LocationT...
bsd-3-clause
aarticianpc/greenpointtrees
src/oscar/apps/voucher/admin.py
30
1031
from django.contrib import admin from oscar.core.loading import get_model Voucher = get_model('voucher', 'Voucher') VoucherApplication = get_model('voucher', 'VoucherApplication') class VoucherAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'usage', 'num_basket_additions', 'num_orde...
mit
Cressidai/robotframework-selenium2library
test/unit/locators/test_tableelementfinder.py
71
6873
import unittest from Selenium2Library.locators import TableElementFinder from mockito import * class ElementFinderTests(unittest.TestCase): def test_find_with_implicit_css_locator(self): finder = TableElementFinder() browser = mock() when(browser).find_elements_by_css_selector("table#test1...
apache-2.0
songfj/calibre
src/calibre/gui2/store/stores/mobileread/store_dialog.py
15
3670
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' from PyQt5.Qt import (Qt, QDialog, QIcon, QComboBox) from calibre.gui2.store.stores.m...
gpl-3.0
andymckay/zamboni
apps/amo/decorators.py
1
5996
import datetime import functools import json from django import http from django.conf import settings from django.core.exceptions import PermissionDenied import commonware.log from . import models as context from .utils import JSONEncoder, redirect_for_login from amo import get_user, set_user from mkt.users.utils i...
bsd-3-clause
Icenowy/MissionPlanner
Lib/code.py
62
10499
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_com...
gpl-3.0
remvo/zstt-ros
src/robocup/src/object_detector.py
1
18205
#!/usr/bin/env python import math from math import hypot import cv2 import numpy as np import rospy from cv_bridge import CvBridge, CvBridgeError from numpy.linalg import norm from sensor_msgs.msg import Image from std_msgs.msg import Bool, Float32MultiArray, Int32MultiArray, String GREEN_BGR = (0, 255, 0) YELLOW_BGR...
apache-2.0
SivilTaram/edx-platform
common/lib/capa/capa/inputtypes.py
16
64448
# # File: courseware/capa/inputtypes.py # """ Module containing the problem elements which render into input objects - textline - textbox (aka codeinput) - schematic - choicegroup (aka radiogroup, checkboxgroup) - javascriptinput - imageinput (for clickable image) - optioninput (for option list) - filesubmission (...
agpl-3.0
tmerrick1/spack
var/spack/repos/builtin/packages/quantum-espresso/package.py
1
6095
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
yongshengwang/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/contenttypes/tests.py
113
11127
from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut from django.contrib.sites.models import Site, get_current_site from django.http import HttpRequest, Http404 from django.test import Test...
apache-2.0
maohongyuan/kbengine
kbe/res/scripts/common/Lib/test/test_userlist.py
116
1896
# Check every path through every method of UserList from collections import UserList from test import support, list_tests class UserListTest(list_tests.CommonTest): type2test = UserList def test_getslice(self): super().test_getslice() l = [0, 1, 2, 3, 4] u = self.type2test(l) ...
lgpl-3.0
acshan/odoo
openerp/addons/base/ir/ir_fields.py
194
17664
# -*- coding: utf-8 -*- import cStringIO import datetime import functools import itertools import time import psycopg2 import pytz from openerp import models, api, _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, ustr REFERENCING_FIELDS = set([None, 'id', '.id']) def only_ref_f...
agpl-3.0
will-Do/avocado-vt
virttest/libvirt_xml/vol_xml.py
12
7155
""" Module simplifying manipulation of XML described at http://libvirt.org/formatstorage.html#StorageVol """ from virttest.libvirt_xml import base, accessors from virttest.libvirt_xml.xcepts import LibvirtXMLNotFoundError class VolXMLBase(base.LibvirtXMLBase): """ Accessor methods for VolXML class. Pro...
gpl-2.0
MadsJensen/agency_connectivity
correlation_analysis.py
1
4393
# -*- coding: utf-8 -*- """ @author: mje @emai: mads@cnru.dk """ import numpy as np # import mne import matplotlib.pyplot as plt import pandas as pd from scipy.stats import spearmanr from my_settings import * plt.style.use("ggplot") b_df = pd.read_csv( "/Users/au194693/projects/agency_connectivity/data/" + ...
bsd-3-clause
jdcc2/campussearch
venv/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py
699
9924
import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. Each retry attempt will create a new Re...
gpl-2.0
AdaptiveApplications/carnegie
tarc_bus_locator_client/numpy-1.8.1/doc/source/conf.py
33
9781
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function import sys, os, re # Check Sphinx version import sphinx if sphinx.__version__ < "1.0.1": raise RuntimeError("Sphinx 1.0.1 or newer required") needs_sphinx = '1.0' # ----------------------------------------------------------...
mit
SimeonFritz/aima-python
submissions/aardvark/vacuum2Runner.py
15
2089
import agents as ag import envgui as gui # change this line ONLY to refer to your project import submissions.miles.vacuum2 as v2 # ______________________________________________________________________________ # Vacuum environment class Dirt(ag.Thing): pass class VacuumEnvironment(ag.XYEnvironment): """The ...
mit
Jaesin/OctoPrint
src/octoprint/server/api/languages.py
1
5684
# coding=utf-8 from __future__ import absolute_import, division, print_function __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" im...
agpl-3.0
andyfaff/scipy
scipy/__init__.py
5
5685
""" SciPy: A scientific computing package for Python ================================================ Documentation is available in the docstrings and online at https://docs.scipy.org. Contents -------- SciPy imports all the functions from the NumPy namespace, and in addition provides: Subpackages ----------- Using ...
bsd-3-clause
edlabh/SickRage
sickbeard/notifiers/pushbullet.py
3
4976
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Author: echel0n <sickrage.tv@gmail.com> # URL: http://www.github.com/sickragetv/sickrage/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gpl-3.0
Mte90/remo
remo/featuredrep/models.py
5
1272
from django.contrib.auth.models import User from django.db import models from django.utils.timezone import now class FeaturedRep(models.Model): """Featured Rep model. Featured Rep -or Rep of the Month- relates existing users with some text explaining why they are so cool. """ created_on = models...
bsd-3-clause
cjcjameson/gpdb
gpMgmt/bin/gppylib/operations/test/unit/test_unit_dump.py
10
70055
# # Copyright (c) Greenplum Inc 2012. All Rights Reserved. # import unittest from datetime import datetime from gppylib.commands.base import Command, CommandResult from gppylib.gparray import GpArray, GpDB from gppylib.operations.backup_utils import * from gppylib.operations.dump import * from mock import patch, Magic...
apache-2.0
quarckster/cfme_tests
cfme/tests/cloud_infra_common/test_discovery.py
2
2568
# -*- coding: utf-8 -*- import pytest import time from cfme.common.provider import BaseProvider from cfme.common.vm import VM from cfme.exceptions import CFMEException from cfme.infrastructure.provider.scvmm import SCVMMProvider from cfme.utils.generators import random_vm_name from cfme.utils.log import logger from cfm...
gpl-2.0
tlakshman26/cinder-bug-fix-volume-conversion-full
cinder/volume/drivers/san/san.py
15
6918
# 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
2013Commons/hue
desktop/core/ext-py/Django-1.4.5/django/contrib/localflavor/uy/forms.py
87
2143
# -*- coding: utf-8 -*- """ UY-specific form helpers. """ from __future__ import absolute_import from django.core.validators import EMPTY_VALUES from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.contrib.local...
apache-2.0
luceatnobis/youtube-dl
youtube_dl/extractor/eighttracks.py
91
5868
# coding: utf-8 from __future__ import unicode_literals import json import random from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ( ExtractorError, ) class EightTracksIE(InfoExtractor): IE_NAME = '8tracks' _VALID_URL = r'https?://8tracks\.com/(?P<user>[^/]+...
unlicense
skirsdeda/django
django/contrib/sitemaps/tests/test_https.py
21
3805
from __future__ import unicode_literals from datetime import date import warnings from django.test import override_settings from django.utils.deprecation import RemovedInDjango20Warning from .base import SitemapTestsBase @override_settings(ROOT_URLCONF='django.contrib.sitemaps.tests.urls.https') class HTTPSSitemap...
bsd-3-clause
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/idlelib/CallTips.py
97
5932
"""CallTips.py - An IDLE Extension to Jog Your Memory Call Tips are floating windows which display function, class, and method parameter and docstring information when you type an opening parenthesis, and which disappear when you type a closing parenthesis. """ import __main__ import inspect import re import sys impo...
gpl-3.0
wallrazer/graphite-web
webapp/graphite/account/views.py
31
2176
"""Copyright 2008 Orbitz WorldWide 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
mano3m/CouchPotatoServer
libs/sqlalchemy/dialects/mysql/oursql.py
18
9764
# mysql/oursql.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the MySQL database via the oursql adapter. OurSQL is available at: ...
gpl-3.0
solidgoldbomb/letsencrypt
acme/acme/jose/util.py
13
7092
"""JOSE utilities.""" import collections from cryptography.hazmat.primitives.asymmetric import rsa import OpenSSL import six class abstractclassmethod(classmethod): # pylint: disable=invalid-name,too-few-public-methods """Descriptor for an abstract classmethod. It augments the :mod:`abc` framework with ...
apache-2.0
pgmillon/ansible
test/units/modules/network/f5/test_bigip_monitor_external.py
16
3552
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
mvaled/OpenUpgrade
addons/account_followup/account_followup.py
93
28777
# -*- 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
pong3489/TEST_Mission
Lib/site-packages/scipy/stats/distributions.py
53
207806
# Functions to implement several important functions for # various Continous and Discrete Probability Distributions # # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # import math import warnings from copy import copy from scipy.misc import comb, derivative from s...
gpl-3.0
denisff/python-for-android
python3-alpha/python3-src/Lib/turtledemo/round_dance.py
164
1804
""" turtle-example-suite: tdemo_round_dance.py (Needs version 1.1 of the turtle module that comes with Python 3.1) Dancing turtles have a compound shape consisting of a series of triangles of decreasing size. Turtles march along a circle while rotating pairwise in opposite direction, with one exceptio...
apache-2.0
ogenstad/ansible
lib/ansible/modules/cloud/ovirt/ovirt_external_provider_facts.py
78
6127
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
edx/edx-platform
lms/djangoapps/certificates/services.py
3
1454
""" Certificate service """ import logging from django.core.exceptions import ObjectDoesNotExist from opaque_keys.edx.keys import CourseKey from lms.djangoapps.certificates.generation_handler import is_on_certificate_allowlist from lms.djangoapps.certificates.models import GeneratedCertificate from lms.djangoapps.u...
agpl-3.0
chirilo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py
122
2069
# 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...
bsd-3-clause
konstruktoid/ansible-upstream
lib/ansible/plugins/inventory/openstack.py
8
12130
# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com> # Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P. # Copyright (c) 2016, Rackspace Australia # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING...
gpl-3.0
cmenard/GB_Bullet
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
davidjb/sqlalchemy
test/aaa_profiling/test_pool.py
27
1673
from sqlalchemy.testing import fixtures, AssertsExecutionResults, profiling from sqlalchemy.pool import QueuePool from sqlalchemy import pool as pool_module pool = None class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults): __requires__ = 'cpython', class Connection(object): def rollback(...
mit
rickmendes/ansible-modules-extras
windows/win_file_version.py
65
2187
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get DLL or EXE build version # Copyright © 2015 Sam Liu <sam.liu@activenetwork.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 versi...
gpl-3.0
iandriver/RNA-sequence-tools
FPKM_Parsing/make_align_report_2.py
2
2762
import fnmatch import os import pandas as pd import cPickle as pickle from scipy import stats import matplotlib as mpl import matplotlib.pyplot as plt from collections import OrderedDict path = '/Volumes/Seq_data' result_file_names = ['results_sca_spc', 'results_spc2_n2'] basename = 'sca_spc_combined' cell_list =[] al...
mit
revzim/interactive-tutorials
suds/client.py
5
25972
# 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 ...
apache-2.0
iu5team/rms
app/views/alekseyl/active_record/employee.py
1
1039
from app.views.alekseyl.active_record.model import Model from app.utils.db_utils import * from app.views.alekseyl.active_record.task import Task class Employee(Model): __table__ = 'app_employee' def __init__(self, **kwargs): self.id = None self.name = None self.position_id = None ...
mit
caspartse/QQ-Groups-Spider
vendor/chardet/charsetgroupprober.py
270
3787
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
jounex/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/sessions/backends/cached_db.py
103
2723
""" Cached, database-backed sessions. """ import logging from django.contrib.sessions.backends.db import SessionStore as DBStore from django.core.cache import cache from django.core.exceptions import SuspiciousOperation from django.utils import timezone from django.utils.encoding import force_text KEY_PREFIX = "djan...
apache-2.0
cogmission/nupic
src/nupic/encoders/multi.py
15
7688
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
amatotech/p2pool
wstools/UserTuple.py
295
4047
""" A more or less complete user-defined wrapper around tuple objects. Adapted version of the standard library's UserList. Taken from Stefan Schwarzer's ftputil library, available at <http://www.ndh.net/home/sschwarzer/python/python_software.html>, and used under this license: Copyright (C) 1999, Stefan Schwarzer ...
gpl-3.0
Fogapod/ChatBot
chatbot/textdata.py
1
15555
# Copyright 2015 Conchylicultor. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
mit
kesuki/DexHunter
dalvik/vm/mterp/gen-mterp.py
37
20423
#!/usr/bin/env python # # Copyright (C) 2007 The Android Open Source Project # # 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
bright-sparks/chromium-spacewalk
tools/deep_memory_profiler/visualizer/app_unittest.py
99
2830
# 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. # This file is expected to be used under another directory to use, # so we disable checking import path of GAE tools from this directory. # pylint: disable=F...
bsd-3-clause
gVallverdu/pymatgen
pymatgen/symmetry/groups.py
2
18974
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Defines SymmetryGroup parent class and PointGroup and SpaceGroup classes. Shyue Ping Ong thanks Marc De Graef for his generous sharing of his SpaceGroup data as published in his textbook "Structure of Mater...
mit
DroneQuest/drone-quest
leap_motion/Leap.py
1
89494
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.3 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import d...
mit
agendaTCC/AgendaTCC
tccweb/apps/departamentos/signals.py
1
1329
# from django.db.models.signals import post_save, m2m_changed # from django.contrib.auth.models import Group # from django.db.models import Q # from disciplinas.models import Disciplina # from models import Monitor # def transformar_monitor(sender,**kwargs): # monitor_do_grupo = kwargs['instance'] # monitor =...
gpl-2.0
sdesbure/rfxcom_collectd
node_modules/rfxcom/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
mit
mkmelin/bedrock
tests/functional/firefox/test_family_navigation.py
3
1057
# 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 pytest from pages.firefox.family_navigation import FirefoxPage @pytest.mark.nondestructive @pytest.mark.parame...
mpl-2.0
olgabrani/synnefo
snf-astakos-app/astakos/im/migrations/0077_base_projects.py
10
30281
# encoding: utf-8 import datetime from dateutil.relativedelta import relativedelta from south.db import db from south.v2 import DataMigration from django.db import models CLOSED_POLICY = 3 ACTIVATED = 1 class Migration(DataMigration): def new_chain(self, orm): return orm.Chain.objects.create() def b...
gpl-3.0
groboclown/whimbrel
modules/core/installer/module_core/schema.py
1
1446
""" Describes the core database tables. """ from whimbrel.install.db import DbTableDef CORE_DB_TABLES = { "workflow_exec": DbTableDef( version=1, pk=["workflow_exec_id", "S", "workflow_name", "S"], indexes={ "state": "S", "start_time_epoch": "N" }, a...
apache-2.0
lxneng/incubator-airflow
airflow/contrib/sensors/sagemaker_tuning_sensor.py
3
2439
# -*- 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 under the Apache License, Version 2.0 (the #...
apache-2.0
c0defreak/python-for-android
python3-alpha/python3-src/Tools/msi/msi.py
45
62636
# Python MSI Generator # (C) 2003 Martin v. Loewis # See "FOO" in comments refers to MSDN sections with the title FOO. import msilib, schema, sequence, os, glob, time, re, shutil, zipfile from msilib import Feature, CAB, Directory, Dialog, Binary, add_data import uisample from win32com.client import constants from dist...
apache-2.0
noelbk/neutron-juniper
neutron/db/migration/alembic_migrations/versions/51b4de912379_cisco_nexus_ml2_mech.py
28
2339
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
seanli9jan/tensorflow
tensorflow/contrib/model_pruning/examples/cifar10/cifar10_input.py
46
9613
# 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
adfernandes/pcp
src/pcp/pidstat/test/none_handler_printer_decorator_test.py
6
1463
#!/usr/bin/env pmpython # # Copyright (C) 2016 Sitaram Shelke. # # 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. # # Thi...
lgpl-2.1
solintegra/addons
lunch/wizard/lunch_cancel.py
440
1274
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
salamer/django
django/forms/models.py
72
54654
""" Helper functions for creating Form classes from Django models and database field objects. """ from __future__ import unicode_literals from collections import OrderedDict from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError, ) fro...
bsd-3-clause
proxysh/Safejumper-for-Desktop
buildlinux/env64/lib/python2.7/site-packages/pycparser/c_generator.py
36
13829
#------------------------------------------------------------------------------ # pycparser: c_generator.py # # C code generator from pycparser AST nodes. # # Copyright (C) 2008-2015, Eli Bendersky # License: BSD #------------------------------------------------------------------------------ from . import c_ast class...
gpl-2.0
wetneb/django
tests/utils_tests/test_numberformat.py
307
4049
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal from sys import float_info from unittest import TestCase from django.utils.numberformat import format as nformat class TestNumberFormat(TestCase): def test_format_number(self): self.assertEqual(nformat(1234, '...
bsd-3-clause
dsaraujo/circulante
django/contrib/flatpages/tests/views.py
152
3360
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.test import TestCase class FlatpageViewTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.tests.urls' def setUp(self): ...
bsd-3-clause
ptsneves/ardupilot
mk/PX4/Tools/genmsg/test/test_genmsg_gentools.py
215
9526
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
gpl-3.0
Sterncat/opticspy
opticspy/ray_tracing/CodeV_examples/double_gauss/matrix_double_gauss.py
1
3026
from __future__ import division as __division__ import numpy as np def T(t,n): return np.array([[1,t/n],[0,1]]) def R(c,n_left,n_right): return np.array([[1,0],[-c*(n_right-n_left),1]]) c1 = 1/56.20238 c2 = 1/(152.28580) c3 = 1/(37.68262) c4 = 1/10000000 c5 = 1/24.23130 c6 = 1/(-28.37731) c7 = 1/(1000000) c8 = 1/(...
mit
eldabbagh/gae-boilerplate
bp_includes/external/requests/models.py
33
25349
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import...
lgpl-3.0
arth-co/saleor
saleor/delivery/__init__.py
13
1114
from __future__ import unicode_literals from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from prices import Price from satchless.item import ItemSet class BaseDelivery(ItemSet): group = None name = '' def __iter__(self): return iter(self.group) ...
bsd-3-clause
jtakayama/ics691-setupbooster
makahiki/apps/managers/team_mgr/tests.py
7
18560
"""Tests for team_manager.""" import datetime from django.test import TransactionTestCase from django.contrib.auth.models import User from apps.managers.team_mgr import team_mgr from apps.managers.team_mgr.models import Group, Team from apps.utils import test_utils class DormUnitTestCase(TransactionTestCase): ...
mit
regini/inSquare
inSquareBackend/cloud.insquare/node_modules/node-forge/tests/forge_ssl/forge/ssl.py
169
16598
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """\ This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised for I/O er...
mit
garbersc/keras-galaxies
tests/MLP.py
1
14490
""" This tutorial introduces the multilayer perceptron using Theano. A multilayer perceptron is a logistic regressor where instead of feeding the input to the logistic regression you insert a intermediate layer, called the hidden layer, that has a nonlinear activation function (usually tanh or sigmoid) . One can use ...
bsd-3-clause
shhui/nova
nova/tests/virt/xenapi/client/test_session.py
10
2692
# Copyright (c) 2014 Rackspace Hosting # 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
kiwifb/numpy
numpy/ma/extras.py
1
53181
""" Masked arrays add-ons. A collection of utilities for `numpy.ma`. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ from __future__ import division, absolute_import, print_function __all__ = [ 'apply_along_axis', 'apply_o...
bsd-3-clause
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/unittest/test/test_functiontestcase.py
108
5540
import unittest from unittest.test.support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): # "Return the number of tests represented by the this test object. For # TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest.FunctionTestCase(lamb...
apache-2.0