repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
BedrockDev/Sunrin2017
Software/Web Programming/Project01/test02.py
1
1146
# Chapter 3 def getadditionalworkhour(work_hour): if work_hour >= 40: return float(work_hour + (workHour - 40) * 1.5) else: return work_hour print "Exercise 3.1" workHour = float(input("Enter hours : ")) workRate = float(input("Enter rate : ")) pay = getadditionalworkhour(workHour) * workRate ...
mit
sahutd/youtube-dl
youtube_dl/extractor/nationalgeographic.py
18
1419
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( smuggle_url, url_basename, ) class NationalGeographicIE(InfoExtractor): _VALID_URL = r'http://video\.nationalgeographic\.com/video/.*?' _TEST = { 'url': 'http://video.nationalgeographic.com/video/...
unlicense
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/setuptools/ssl_support.py
86
8131
import os import socket import atexit import re from setuptools.extern.six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_avail...
mit
scs/uclinux
user/python/python-2.4.4/Lib/whrandom.py
12
4910
"""Wichman-Hill random number generator. Wichmann, B. A. & Hill, I. D. (1982) Algorithm AS 183: An efficient and portable pseudo-random number generator Applied Statistics 31 (1982) 188-190 see also: Correction to Algorithm AS 183 Applied Statistics 33 (1984) 123 McLeod, A. I. (1985) ...
gpl-2.0
morissette/devopsdays-hackathon-2016
venv/lib/python2.7/site-packages/alembic/operations/ops.py
9
72690
from .. import util from ..util import sqla_compat from . import schemaobj from sqlalchemy.types import NULLTYPE from .base import Operations, BatchOperations import re class MigrateOperation(object): """base class for migration command and organization objects. This system is part of the operation extensibi...
gpl-3.0
coopsource/taiga-back
taiga/projects/references/permissions.py
21
1070
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
hexlism/css_platform
sleepyenv/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/cloudsearch2/layer2.py
136
3814
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 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...
apache-2.0
NamPNQ/rethinkengine
tests/test_connection.py
1
1550
import sys import os sys.path.append(os.path.abspath('..')) try: import unittest2 as unittest except ImportError: import unittest import rethinkdb from rethinkengine import * import rethinkengine.connection from rethinkengine.connection import get_connection, ConnectionError class ConnectionTest(unittest.T...
mit
Bismarrck/pymatgen
pymatgen/analysis/pourbaix/maker.py
3
12323
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import logging import numpy as np import itertools from scipy.spatial import ConvexHull from pymatgen.analysis.pourbaix.entry import MultiEntry, ion_or_solid_...
mit
DeBortoliWines/Bika-LIMS
bika/lims/utils/analysis.py
1
11236
# -*- coding: utf-8 -*- import math import zope.event from bika.lims.utils import formatDecimalMark from Products.Archetypes.event import ObjectInitializedEvent from Products.CMFCore.WorkflowCore import WorkflowException from Products.CMFPlone.utils import _createObjectByType def create_analysis(context, service, ke...
agpl-3.0
kaplun/invenio-records
requirements.py
148
5904
#!/usr/bin/env python2 # # -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (...
gpl-2.0
SamiHiltunen/invenio-upgrader
invenio_upgrader/upgrades/invenio_2015_01_13_hide_holdings.py
20
1898
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
Kami/libcloud
libcloud/test/dns/test_worldwidedns.py
6
20383
# 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
Elico-Corp/odoo_OCB
openerp/addons/base/tests/test_res_lang.py
40
2036
import unittest import openerp.tests.common as common class test_res_lang(common.TransactionCase): def test_00_intersperse(self): from openerp.addons.base.res.res_lang import intersperse assert intersperse("", []) == ("", 0) assert intersperse("0", []) == ("0", 0) assert interspe...
agpl-3.0
hmrc/wristband
config/settings/common.py
1
9722
# -*- coding: utf-8 -*- """ Django settings for wristband project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_l...
apache-2.0
matthappens/taskqueue
taskqueue/venv_tq/lib/python2.7/site-packages/Crypto/SelfTest/Util/test_asn1.py
113
10239
# -*- coding: utf-8 -*- # # SelfTest/Util/test_asn.py: Self-test for the Crypto.Util.asn1 module # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is ...
mit
jab/lektor
lektor/publisher.py
1
1696
import subprocess from werkzeug import urls from lektor.utils import portable_popen class Publisher(object): def __init__(self, env, output_path): self.env = env self.output_path = output_path def publish(self, target_url): raise NotImplementedError() class ExternalPublisher(Publis...
bsd-3-clause
vrv/tensorflow
tensorflow/contrib/linalg/python/kernel_tests/linear_operator_full_matrix_test.py
12
6651
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
jshufelt/volatility
volatility/plugins/gui/vtypes/vista.py
58
4880
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
gpl-2.0
wwj718/murp-edx
common/test/acceptance/pages/lms/open_response.py
165
4579
""" Open-ended response in the courseware. """ from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise from .rubric import RubricPage class OpenResponsePage(PageObject): """ Open-ended response in the courseware. """ url = None def is_browser_on_page(self): ...
agpl-3.0
DARKPOP/external_chromium_org
tools/telemetry/telemetry/core/platform/profiler/__init__.py
94
2391
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections from telemetry.core import exceptions class Profiler(object): """A sampling profiler provided by the platform. A profiler is starte...
bsd-3-clause
looker/sentry
src/sentry/south_migrations/0345_add_citext.py
3
120001
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from sentry.utils.db import is_postgres class Migration(DataMigration): def forwards(self, orm): db.commit_transaction() try: ...
bsd-3-clause
comiconomenclaturist/libretime
python_apps/media-monitor/mm2/mm2.py
10
1061
# -*- coding: utf-8 -*- import sys import os from media.saas.launcher import setup_global, launch_instance, setup_logger from media.monitor.config import MMConfig def main(global_config, log_config): """ function to run hosted install """ mm_config = MMConfig(global_config) log = setup_logger( log_config, ...
agpl-3.0
tjsavage/full_nonrel_starter
django/test/_doctest.py
152
100621
# This is a slightly modified version of the doctest.py that shipped with Python 2.4 # It incorporates changes that have been submitted to the Python ticket tracker # as ticket #1521051. These changes allow for a DoctestRunner and Doctest base # class to be specified when constructing a DoctestSuite. # Module doctest....
bsd-3-clause
kiddhustle/wiardfmblog
django/template/__init__.py
561
3247
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
bsd-3-clause
MonamAgarwal/final
GTG/gtk/plugins.py
1
12625
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
gpl-3.0
gpoesia/servo
tests/wpt/css-tests/tools/pytest/_pytest/assertion/reinterpret.py
176
15212
""" Find intermediate evalutation results in assert statements through builtin AST. """ import ast import sys import _pytest._code import py from _pytest.assertion import util u = py.builtin._totext class AssertionError(util.BuiltinAssertionError): def __init__(self, *args): util.BuiltinAssertionError.__...
mpl-2.0
hnakamur/ansible
lib/ansible/compat/tests/__init__.py
339
1268
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
svagionitis/youtube-dl
youtube_dl/extractor/normalboots.py
19
2263
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( unified_strdate, ) class NormalbootsIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?normalboots\.com/video/(?P<videoid>[0-9a-z-]*)/?$' _TEST = { 'url': 'http://normalbo...
unlicense
HyperBaton/ansible
lib/ansible/modules/network/check_point/cp_mgmt_wildcard_facts.py
20
3954
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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
feroda/odoo
addons/share/wizard/__init__.py
448
1067
# -*- 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
kawamon/hue
desktop/core/ext-py/Babel-2.5.1/tests/messages/test_extract.py
3
20944
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
apache-2.0
laszlocsomor/tensorflow
tensorflow/python/kernel_tests/constant_op_test.py
3
33411
# 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
sequana/sequana
sequana/assembly.py
1
4934
# -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2018 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # # Distributed under the terms of the 3-clause BSD license. # The full license is in the LICENSE file, distributed with this s...
bsd-3-clause
cyandterry/Python-Study
Interviews/Real_Life/FiveStars.py
1
3303
import datetime yellow_player = None black_player = None black_player_score = 0 yellow_player_score = 0 goals = [] matches = [] players = {} """ players { black_players } data { request_type: register_player/goal, player_color: yellow/black, player_id: 12345, } """ def handle_request(data): ...
mit
hgl888/chromium-crosswalk
components/cloud_devices/tools/prototype/prototype.py
65
30901
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prototype of cloud device with support of local API. This prototype has tons of flaws, not the least of which being that it occ...
bsd-3-clause
ya-yura/snapboard
snapboard/sampledata.py
4
4553
# # Sample data for testing # leadins = """To characterize a linguistic level L, On the other hand, This suggests that It appears that Furthermore, We will bring evidence in favor of the following thesis: To provide a constituent structure for T(Z,K), From C1, it follows that For any tr...
bsd-3-clause
Broadcom/linux-rdma-nxt
tools/perf/scripts/python/check-perf-trace.py
1997
2539
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
shijiaxing/DeepLearningTutorials
code/lstm.py
23
22627
''' Build a tweet sentiment analyzer ''' from collections import OrderedDict import cPickle as pkl import sys import time import numpy import theano from theano import config import theano.tensor as tensor from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams import imdb datasets = {'imdb': (imdb.loa...
bsd-3-clause
matthiaskramm/corepy
corepy/arch/vmx/isa/vmx_fields.py
1
4550
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
bsd-3-clause
ashwinsawant/codejam-commandline
lib/zip_utils.py
20
6568
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
apache-2.0
arnaudsj/mdp-toolkit
mdp/test/test_process_schedule.py
2
4242
from __future__ import with_statement from _tools import * import mdp.parallel as parallel n = numx def test_process_scheduler_shutdown(): """Test that we can properly shutdown the subprocesses""" scheduler = parallel.ProcessScheduler(verbose=False, n_processes=1, ...
bsd-3-clause
lanen/youtube-dl
youtube_dl/extractor/jeuxvideo.py
85
1990
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class JeuxVideoIE(InfoExtractor): _VALID_URL = r'http://.*?\.jeuxvideo\.com/.*/(.*?)\.htm' _TESTS = [{ 'url': 'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita...
unlicense
johngian/remo
vendor-local/lib/python/unidecode/x0c2.py
253
4710
data = ( 'syon', # 0x00 'syonj', # 0x01 'syonh', # 0x02 'syod', # 0x03 'syol', # 0x04 'syolg', # 0x05 'syolm', # 0x06 'syolb', # 0x07 'syols', # 0x08 'syolt', # 0x09 'syolp', # 0x0a 'syolh', # 0x0b 'syom', # 0x0c 'syob', # 0x0d 'syobs', # 0x0e 'syos', # 0x0f 'syoss', #...
bsd-3-clause
jamadorfi18/pulpopaul
pulpopaul/models.py
1
2545
from flask_sqlalchemy import SQLAlchemy, orm db = SQLAlchemy() class Model: def save(self): db.session.add(self) db.session.commit() def delete(self): db.session.delete(self) db.session.commit() class Tournament(db.Model, Model): """ Tournament model """ id = ...
agpl-3.0
waditu/tushare
test/fund_test.py
19
1232
# -*- coding:utf-8 -*- import unittest import tushare.stock.fundamental as fd class Test(unittest.TestCase): def set_data(self): self.code = '600848' self.start = '2015-01-03' self.end = '2015-04-07' self.year = 2014 self.quarter = 4 def test_get_stock_basics(self): ...
bsd-3-clause
WZeke/m2_kernel
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
brownsr/Cinnamon
files/usr/share/cinnamon/cinnamon-looking-glass/page_log.py
21
5224
import datetime from pageutils import * from gi.repository import Gio, Gtk, GObject, Gdk, Pango, GLib class LogEntry(): def __init__(self, category, time, message): self.category = category self.time = int(time) self.timestr = datetime.datetime.fromtimestamp(self.time).strftime("%Y-%m-%dT%H...
gpl-2.0
contactless/wirenboard
contrib/deb/mosquitto/mosquitto-1.3.4/lib/python/build/lib.linux-armv7l-2.6/mosquitto.py
34
80748
# Copyright (c) 2012,2013 Roger Light <roger@atchoo.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this lis...
mit
littlstar/chromium.src
third_party/cython/src/Cython/Compiler/ParseTreeTransforms.py
86
115877
import cython cython.declare(PyrexTypes=object, Naming=object, ExprNodes=object, Nodes=object, Options=object, UtilNodes=object, LetNode=object, LetRefNode=object, TreeFragment=object, EncodedString=object, error=object, warning=object, copy=object) import PyrexTypes import...
bsd-3-clause
dsiddharth/access-keys
keystone/tests/_sql_livetest.py
8
1451
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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 # # Unless requi...
apache-2.0
SmartPeople/zulip
zerver/lib/url_preview/preview.py
27
2235
from __future__ import absolute_import import re import logging import traceback from typing import Any, Optional, Text from typing.re import Match import requests from zerver.lib.cache import cache_with_key, get_cache_with_key from zerver.lib.url_preview.oembed import get_oembed_data from zerver.lib.url_preview.parser...
apache-2.0
nagyistoce/electron-atom-shell
script/upload.py
5
5904
#!/usr/bin/env python import argparse import errno import os import subprocess import sys import tempfile from lib.config import DIST_ARCH, TARGET_PLATFORM from lib.util import execute, get_atom_shell_version, parse_version, \ get_chromedriver_version, scoped_cwd from lib.github import GitHub A...
mit
aioue/ansible
lib/ansible/module_utils/facts/network/freebsd.py
232
1190
# 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
Cheridan/-tg-station
tools/mapmerge/maintloot.py
118
1940
#!/usr/bin/env python3 import argparse import collections import re from map_helpers import parse_map if __name__=='__main__': parser = argparse.ArgumentParser() parser.add_argument("mapfile") args = parser.parse_args() M = parse_map(args.mapfile) # Format of this map parsing # dict(coordinat...
agpl-3.0
t-hey/QGIS-Original
python/plugins/processing/algs/qgis/TinInterpolation.py
2
8218
# -*- coding: utf-8 -*- """ *************************************************************************** TinInterpolation.py --------------------- Date : October 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com ********...
gpl-2.0
palashahuja/pgmpy
pgmpy/models/ClusterGraph.py
2
9575
#!/usr/bin/env python3 from collections import defaultdict import numpy as np from pgmpy.base import UndirectedGraph from pgmpy.exceptions import CardinalityError from pgmpy.factors import factor_product class ClusterGraph(UndirectedGraph): r""" Base class for representing Cluster Graph. Cluster graph...
mit
zhoffice/minos
owl/machine/management/commands/import_xman.py
5
2543
import csv import logging import json import sys import urllib2 from django.conf import settings from django.core.management.base import BaseCommand from machine.models import Machine logger = logging.getLogger(__name__) XMAN_URL = "http://10.180.2.243/api/hostinfo.php?sql=hostname+=+'%s'" IDC_ABBR = { 'shangdi...
apache-2.0
NcLang/vimrc
sources_non_forked/YouCompleteMe/third_party/ycmd/ycmd/hmac_utils.py
5
3286
# Copyright (C) 2015 Google Inc. # # This file is part of ycmd. # # ycmd 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. # # ycmd is di...
mit
p0deje/selenium
py/selenium/webdriver/common/proxy.py
71
10352
# 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
mancoast/CPythonPyc_test
cpython/279_test_compare.py
194
1488
import unittest from test import test_support class Empty: def __repr__(self): return '<Empty>' class Coerce: def __init__(self, arg): self.arg = arg def __repr__(self): return '<Coerce %s>' % self.arg def __coerce__(self, other): if isinstance(other, Coerce): ...
gpl-3.0
npapak/NXT_Labyrinth
toolchain/libnxt-0.3/make_flash_header.py
3
3024
#!/usr/bin/env python # # Take the flash_routine.bin file, and embed it as an array of bytes # in a flash_routine.h, ready for packaging with the C firmware # flasher. # # If a file name is provided on the commandline, load that file as the # firmware flashing routine instead. # import sys import os import os.path imp...
gpl-3.0
tenstream/tenstream
plexrt/gen_lwc_inp.py
1
5860
from pylab import * import netCDF4 as NC import sys def get_z_grid(): # grid info from: https://code.mpimet.mpg.de/projects/icon-lem/wiki/Short_model_description dz = [ 382.208, 327.557, 307.888, 294.912, 285.042, 276.981, 270.110, 264.084, 258.691, 253.790, 249.284, 245.104, 241.195, 237.518, 234.042...
gpl-3.0
kenshay/ImageScripter
Script_Runner/PYTHON/Lib/multiprocessing/managers.py
5
40074
# # Module providing the `SyncManager` class for dealing # with shared objects # # multiprocessing/managers.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ] # # Imports # import sys import threading import ar...
gpl-3.0
GauravSahu/odoo
addons/account_payment/wizard/__init__.py
436
1144
# -*- 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
hsuchifeng/cuda-convnet2
python_util/util.py
181
2825
# Copyright 2014 Google Inc. 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 or...
apache-2.0
bioinformatics-ua/montra
emif/searchengine/management/commands/index_all.py
2
1125
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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 vers...
gpl-3.0
denisenkom/pytds
tests/settings.py
2
1030
import os CONNECT_ARGS = [] CONNECT_KWARGS = {} LIVE_TEST = 'HOST' in os.environ if LIVE_TEST: HOST = os.environ['HOST'] DATABASE = os.environ.get('DATABASE', 'test') USER = os.environ.get('SQLUSER', 'sa') PASSWORD = os.environ.get('SQLPASSWORD', 'sa') USE_MARS = bool(os.environ.get('USE_MARS', Tr...
mit
dagwieers/ansible
lib/ansible/plugins/action/bigiq.py
41
4252
# # (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 # (at your option) any later version. # # Ansible is d...
gpl-3.0
40123210/-2015cd_40123210
static/Brython3.1.1-20150328-091302/Lib/calendar.py
828
22940
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys import da...
gpl-3.0
gadomski/fgt
vendor/googletest-release-1.10.0/googletest/test/gtest_skip_environment_check_output_test.py
91
2209
#!/usr/bin/env python # # Copyright 2019 Google LLC. 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 o...
lgpl-2.1
oandrew/home-assistant
tests/components/sensor/test_mqtt.py
13
2148
"""The tests for the MQTT sensor platform.""" import unittest from homeassistant.bootstrap import setup_component import homeassistant.components.sensor as sensor from tests.common import mock_mqtt_component, fire_mqtt_message from tests.common import get_test_home_assistant class TestSensorMQTT(unittest.TestCase):...
mit
tdsmith/celltool
celltool/command_line/extract_contours.py
1
5720
# Copyright 2007 Zachary Pincus # This file is part of CellTool. # # CellTool is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. """Extract contours from images, optionally rescaling and resampling...
gpl-2.0
kennethlyn/enclustra_zynq_linux
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
pombredanne/pygments-1
pygments/console.py
365
1850
# -*- coding: utf-8 -*- """ pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" cod...
bsd-2-clause
benoitsteiner/tensorflow-opencl
tensorflow/python/kernel_tests/random/random_shuffle_queue_test.py
22
50588
# 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
vmx/perfrunner
perfrunner/tests/index.py
7
4990
from time import sleep from logger import logger from perfrunner.helpers.cbmonitor import with_stats from perfrunner.tests import PerfTest from perfrunner.workloads.viewgen import ViewGen, ViewGenDev class IndexTest(PerfTest): """ The test measures time it takes to build index (views). This is just a base ...
apache-2.0
ehingant/StoBeDo
stobedo.py
1
8786
#!/usr/bin/python import math as m import numpy as np import random # Rate function of coagulation def a(i): return i # Rate function of fragmentation def b(i): return 1. def CalculDistribution(M,T): r = random.seed() t = np.float64(0.0) increment = m.ceil( m.sqrt(M) + 2 ) I_max = increment C = np.z...
gpl-3.0
IllusionRom-deprecated/android_platform_external_chromium_org_testing_gtest
scripts/upload.py
2511
51024
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
bsd-3-clause
d-das/pyethapp
examples/importblock.py
4
1976
from pyethapp.leveldb_service import LevelDB from pyethapp.config import default_data_dir from pyethapp.eth_protocol import TransientBlock from ethereum.chain import Chain from ethereum.slogging import configure import rlp import os configure(':trace') def get_chain(data_dir=default_data_dir): """ returns an e...
mit
za-creature/puls
puls/htmlcompress.py
1
6349
# -*- coding: utf-8 -*- """ jinja2htmlcompress ~~~~~~~~~~~~~~~~~~ A Jinja2 extension that eliminates useless whitespace at template compilation time without extra overhead. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from jinja2.ext import...
mit
clstl/servo
components/script/dom/bindings/codegen/parser/tests/test_conditional_dictionary_member.py
120
3162
def WebIDLTest(parser, harness): parser.parse(""" dictionary Dict { any foo; [ChromeOnly] any bar; }; """) results = parser.finish() harness.check(len(results), 1, "Should have a dictionary") members = results[0].members; harness.check(len(members), 2, "Should have tw...
mpl-2.0
rafalo1333/kivy
kivy/uix/anchorlayout.py
22
3608
''' Anchor Layout ============= .. only:: html .. image:: images/anchorlayout.gif :align: right .. only:: latex .. image:: images/anchorlayout.png :align: right The :class:`AnchorLayout` aligns its children to a border (top, bottom, left, right) or center. To draw a button in the lower-ri...
mit
lz1988/django-web
build/lib/django/contrib/localflavor/hr/forms.py
100
9127
# -*- coding: utf-8 -*- """ HR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.hr.hr_choices import ( HR_LICENSE_PLATE_PREFIX_CHOICES, HR_COUNTY_CHOICES, HR_PHONE_NUMBER_PREFIX_CHOICES) from django.core.validators imp...
apache-2.0
melodous/designate
designate/api/v1/extensions/sync.py
1
1777
# Copyright 2012 Hewlett-Packard Development Company, L.P. All Rights Reserved. # # Author: Kiall Mac Innes <kiall@hp.com> # # 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
SCPR/calif-earthquakes
migrations/versions/30a0d4b22212_.py
1
1081
"""empty message Revision ID: 30a0d4b22212 Revises: 55464a272758 Create Date: 2014-06-27 10:39:14.030414 """ # revision identifiers, used by Alembic. revision = '30a0d4b22212' down_revision = '55464a272758' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
gpl-2.0
Cognexa/cxflow
cxflow/entry_point.py
1
3175
""" This module is **cxflow** framework entry point. The entry point shall be accessed from command line via `cxflow` command. At the moment **cxflow** allows to - train a model with ``cxflow train ...`` - resume training with ``cxflow resume ...`` - generate model predictions with ``cxflow predict ...`` - invoke dat...
mit
ybayle/ReproducibleResearchIEEE2017
src/bayle.py
1
21016
# -*- coding: utf-8 -*- #!/usr/bin/python # # Author Yann Bayle # E-mail bayle.yann@live.fr # License MIT # Created 01/12/2016 # Updated 01/12/2016 # Version 1.0.0 # """ Description of bayle.py ====================== 0 Input the local extracted features from YAAFE 13 MFCC per frame 186 musical p...
mit
WhySoGeeky/DroidPot
venv/lib/python2.7/site-packages/django/conf/locale/pl/formats.py
115
1147
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y' TIME_FORMAT = 'H:i' DATETI...
mit
johnboiles/wicd
gtk/gui.py
2
37524
#!/usr/bin/python """ gui -- The main wicd GUI module. Module containing the code for the main wicd GUI. """ # # Copyright (C) 2007-2009 Adam Blackburn # Copyright (C) 2007-2009 Dan O'Reilly # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-2.0
aarchiba/scipy
scipy/sparse/linalg/isolve/lgmres.py
6
8990
# Copyright (C) 2009, Pauli Virtanen <pav@iki.fi> # Distributed under the same license as SciPy. from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.linalg import LinAlgError from scipy._lib.six import xrange from scipy.linalg import get_blas_funcs, get_lapac...
bsd-3-clause
hmpf/nav
python/nav/smidumps/CPQPOWER-MIB.py
2
550336
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python CPQPOWER-MIB FILENAME = "./CPQPOWER-MIB" MIB = { "moduleName" : "CPQPOWER-MIB", "CPQPOWER-MIB" : { "nodetype" : "module", "language" : "SMIv1", }, "imports" : ( {"module" : "...
gpl-3.0
julianwang/cinder
cinder/api/contrib/snapshot_actions.py
5
4221
# Copyright 2013, 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 # # Unless required by applicable law or agreed ...
apache-2.0
tchernomax/ansible
lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py
52
13353
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, 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 DOCUMENTATION = ''' --- module: proxysql_replication_hostg...
gpl-3.0
envoyproxy/envoy
test/extensions/filters/network/thrift_proxy/driver/generated/example/Example.py
8
20700
# # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impo...
apache-2.0
kajarenc/python-twitter
tests/test_filecache.py
22
1408
import twitter import unittest import time class FileCacheTest(unittest.TestCase): def testInit(self): """Test the twitter._FileCache constructor""" cache = twitter._FileCache() self.assert_(cache is not None, 'cache is None') def testSet(self): """Test the twitter._FileCache....
apache-2.0
goldcoin/gldcoin
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
iuliat/nova
nova/network/ldapdns.py
68
13225
# Copyright 2012 Andrew Bogott for the Wikimedia 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 requi...
apache-2.0
rynomad/CCNx-Federated-Wiki-Prototype
server/express/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
231
6979
#!/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. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ from ctypes imp...
mit
Danfocus/Flexget
flexget/components/notify/notifiers/email.py
4
7177
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.utils import text_to_native_str import logging import smtplib import socket import getpass from email.mime.multipart import MIMEMultipart from email.mime.text i...
mit