code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python from __future__ import division from __future__ import unicode_literals import sys, math import argparse from volk_test_funcs import (create_connection, list_tables, get_results, helper, timeit, format_results) try: import matplotlib import matplotlib.pyplot ...
skoslowski/gnuradio
gnuradio-runtime/examples/volk_benchmark/volk_plot.py
Python
gpl-3.0
6,303
from datetime import datetime import time from mcts.webapi_tests.semiauto import TestCase class TestTime(TestCase): """ This is a test for the `MozTime API`_ which will: - Get the current date/time and ask the test user to verify - Set the current date/time to a user-specified value, and ask the tes...
ShakoHo/fxos-certsuite
mcts/webapi_tests/moztime/test_time.py
Python
mpl-2.0
2,856
# 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 copy from nose.tools import eq_, ok_ from sys import maxint from socorro.lib.util import DotDict from socorro....
m8ttyB/socorro
socorro/unittest/processor/test_support_classifiers.py
Python
mpl-2.0
11,339
def analyze(data, weight_fn=None): """Returns the average and sample variance (s**2) of a list of floats. `weight_fn` is a function that takes a list index and a window width, and returns a weight that is used to calculate a weighted average. For example, see `default_weights` or `linear_weights` belo...
avih/treeherder
treeherder/perfalert/perfalert/__init__.py
Python
mpl-2.0
5,173
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
veterinary/veterinary.py
Python
agpl-3.0
7,094
#!/usr/bin/python # # \file 3_install.py # \brief Install %PreGenProcessName% # \date %PreGenDateTimeStamp% # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Install %PreGenProcessName% # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Li...
osgcc/ryzom
nel/tools/build_gamedata/generators/simple_max_exporter_template/3_install.py
Python
agpl-3.0
1,874
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-19 18:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('judge', '0018_django_1_9'), ] operations = [ migrations.AddField( ...
monouno/site
judge/migrations/0019_og_images.py
Python
agpl-3.0
716
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('program_enrollments.api.grades', 'lms.djangoapps.p...
eduNEXT/edunext-platform
import_shims/lms/program_enrollments/api/grades.py
Python
agpl-3.0
413
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyJunitXml(PythonPackage): """Creates JUnit XML test result documents that can be read by ...
rspavel/spack
var/spack/repos/builtin/packages/py-junit-xml/package.py
Python
lgpl-2.1
688
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyConnectionpool(PythonPackage): """Thread-safe connection pool for python.""" homepa...
LLNL/spack
var/spack/repos/builtin/packages/py-connectionpool/package.py
Python
lgpl-2.1
663
import numpy as np ########################################################################## # # QGIS-meshing plugins. # # Copyright (C) 2012-2013 Imperial College London and others. # # Please see the AUTHORS file in the main source directory for a # full list of copyright holders. # # Dr Adam S. Candy...
adamcandy/QGIS-Meshing
scripts/generate_field_xyz_data.py
Python
lgpl-2.1
12,891
#!/usr/bin/env python3 # Copyright (C) 2019 Benjamin Valentin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys from testrunner import run PRECISION = 1.002 def testfunc(child): c...
bergzand/RIOT
tests/periph_uart_nonblocking/tests/01-run.py
Python
lgpl-2.1
684
from flask import jsonify from flask import redirect from flask import request from flask_classful import FlaskView from flask_classful import route from database import db from database import get_or_create from models import ShortURL from models import BadWord from urllib.parse import unquote from Levenshtein import ...
reimandlab/Visualisation-Framework-for-Genome-Mutations
website/views/short_url.py
Python
lgpl-2.1
2,393
# FreeCAD init script of the Fem module # (c) 2001 Juergen Riegel #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * #* * #* This file i...
timthelion/FreeCAD
src/Mod/Fem/Init.py
Python
lgpl-2.1
2,560
import logging import unittest from gensim.corpora.dictionary import Dictionary from gensim.topic_coherence.text_analysis import \ InvertedIndexAccumulator, WordOccurrenceAccumulator, ParallelWordOccurrenceAccumulator, \ CorpusAccumulator class BaseTestCases(object): class TextAnalyzerTestBase(unittest....
robotcator/gensim
gensim/test/test_text_analysis.py
Python
lgpl-2.1
6,853
##Copyright 2009-2015 Thomas Paviot (tpaviot@gmail.com) ## ##This file is part of pythonOCC. ## ##pythonOCC is free software: you can redistribute it and/or modify ##it under the terms of the GNU Lesser General Public License as published by ##the Free Software Foundation, either version 3 of the License, or ##(...
sven-hm/pythonocc-core
examples/core_topology_edge.py
Python
lgpl-3.0
3,032
from __future__ import nested_scopes from __future__ import division import unittest from test import support x = 2 def nester(): x = 3 def inner(): return x return inner() class TestFuture(unittest.TestCase): def test_floor_div_operator(self): self.assertEqual(7 //...
harmy/kbengine
kbe/res/scripts/common/Lib/test/test_future3.py
Python
lgpl-3.0
596
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.2 # # 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 as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise Runtime...
mdaus/coda-oss
modules/python/math.poly/source/generated/math_poly.py
Python
lgpl-3.0
53,586
# -*- coding: utf-8 -*- import cherrypy import errno from ..describe import Description, autoDescribeRoute, describeRoute from ..rest import Resource, filtermodel from ...constants import AccessType, TokenScope from girder.exceptions import AccessException, GirderException, RestException from girder.models.assetstore ...
RafaelPalomar/girder
girder/api/v1/file.py
Python
apache-2.0
18,950
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited 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 ...
karlp/pyOCD
pyOCD/transport/__init__.py
Python
apache-2.0
687
''' modifier: 02 eqtime: 35 ''' def main(): info("Air Pipette x1-4 bone only") gosub('felix:WaitForMiniboneAccess') gosub('felix:PrepareForAirShot') open(name='N') open(name='Q') open(name='D') open(name='B') gosub('common:EvacPipette2') gosub('common:FillPipette2') go...
USGSDenverPychron/pychron
docs/user_guide/operation/scripts/examples/helix/extraction/felix_air_x2_boneonly.py
Python
apache-2.0
766
#!/usr/bin/python # # Copyright 2015 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 b...
falbassini/googleads-dfa-reporting-samples
python/v2.2/target_ad_to_remarketing_list.py
Python
apache-2.0
2,651
input = """ q(a,b,c). q(b,c,a). q(c,b,c). q(b,b,c). q(a,b,b). q(c,a,a). s(c,b). s(a,b). s(a,c). s(c,c). t(a). t(b). w(b,c). w(b,b). w(a,a). p(X,Y) :- q(X,b,Z), r(Z,b,Y), not r(X,Y,Z). m(X,Y) :- u(a,X,Y,Y,c,X). v(X) :- s(a,X), not t(X). n(X,X) :- q(X,b,X). r(X,Y,Z) :- t(a), s(X,Z), w(X,Y), not p(Z,Y). """ output = ...
Yarrick13/hwasp
tests/wasp1/AllAnswerSets/bug_09.test.py
Python
apache-2.0
491
# 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...
allenlavoie/tensorflow
tensorflow/contrib/learn/python/learn/utils/saved_model_export_utils.py
Python
apache-2.0
34,967
import os.path import sys from setuptools import setup, Command class Tox(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import tox sys.exit(tox.cmdline([])) setup( name="kafka-python", versio...
skyportsystems/kafka-python
setup.py
Python
apache-2.0
990
# Copyright (c) 2012 OpenStack, LLC. # # 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...
aristanetworks/arista-ovs-quantum
quantum/tests/unit/test_common_utils.py
Python
apache-2.0
2,319
# Webhooks for external integrations. from django.http import HttpRequest, HttpResponse from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view from zerver.lib.actions import check_send_stream_message from zerver.lib.response import json_success from zerver.lib.validator import check_dict, ...
amanharitsh123/zulip
zerver/webhooks/travis/view.py
Python
apache-2.0
1,944
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 Takeshi HASEGAWA # # 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/l...
deathmetalland/IkaLog
tools/create_mask.py
Python
apache-2.0
1,712
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
ykim362/mxnet
example/numpy-ops/numpy_softmax.py
Python
apache-2.0
3,028
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.utils import timezone from django.http import HttpResponse, HttpRequest from zilencer.models import Deployment, RemotePushDeviceToken, RemoteZulipServer from zerver.decorator import has_request_variables, REQ from z...
vabs22/zulip
zilencer/views.py
Python
apache-2.0
4,479
# Copyright (c) 2012 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...
dims/nova
nova/cells/state.py
Python
apache-2.0
18,615
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
StackStorm/st2
st2tests/integration/orquesta/test_wiring_functions_task.py
Python
apache-2.0
3,825
from django.conf import settings from django.db import connection from onadata.libs.utils.common_tags import SUBMISSION_TIME def _count_group(field, name, xform): if using_postgres: result = _postgres_count_group(field, name, xform) else: raise Exception("Unsupported Database") return re...
mainakibui/kobocat
onadata/libs/data/query.py
Python
bsd-2-clause
3,369
import unittest import idlelib.CallTips as ct CTi = ct.CallTips() # needed for get_entity test in 2.7 import textwrap import types import warnings default_tip = '' # Test Class TC is used in multiple get_argspec test methods class TC(object): 'doc' tip = "(ai=None, *args)" def __init__(self,...
nmercier/linux-cross-gcc
win32/bin/Lib/idlelib/idle_test/test_calltips.py
Python
bsd-3-clause
7,325
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.wrapper.wrapperbase as ecwb import enum a...
shankari/e-mission-server
emission/core/wrapper/battery.py
Python
bsd-3-clause
1,602
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. """ Module cameras A camera represents both the camera model and the interaction style. A lot of blood sweat and tears went into this module ...
Alwnikrotikz/visvis
core/cameras.py
Python
bsd-3-clause
59,509
from kol.database import ItemDatabase from kol.manager import PatternManager from kol.request.GenericRequest import GenericRequest class BountyHunterRequest(GenericRequest): """Interacts with the Bounty Hunter Hunter in the Forest Village.""" VISIT = None ACCEPT_BOUNTY = 'takebounty' ABANDON_BOUNT...
ijzer/cwbot-ndy
kol/request/BountyHunterRequest.py
Python
bsd-3-clause
3,005
import json import os import unittest import uuid import pytest from six.moves.urllib.error import HTTPError wptserve = pytest.importorskip("wptserve") from .base import TestUsingServer, doc_root class TestFileHandler(TestUsingServer): def test_GET(self): resp = self.request("/document.txt") sel...
youtube/cobalt
third_party/web_platform_tests/tools/wptserve/tests/functional/test_handlers.py
Python
bsd-3-clause
11,798
r""" Time-dependent linear elasticity with a simple damping. Find :math:`\ul{u}` such that: .. math:: \int_{\Omega} c\ \ul{v} \cdot \pdiff{\ul{u}}{t} + \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) = 0 \;, \quad \forall \ul{v} \;, where .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl}+\...
vlukes/sfepy
examples/linear_elasticity/linear_elastic_damping.py
Python
bsd-3-clause
1,983
# encoding: utf-8 """ Test lldb data formatter subsystem. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase class ObjCDataFormatterNSURL(ObjCDataFormatterTestCase): @...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py
Python
bsd-3-clause
1,265
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json, sys from frappe import _ from frappe.utils import cint, flt, now, cstr, strip_html from frappe.model import default_fields from frappe.model.naming import set...
gangadhar-kadam/verve_live_frappe
frappe/model/base_document.py
Python
mit
15,292
# coding: utf-8 from __future__ import print_function import sys from .compat import string_types if False: # MYPY from typing import Dict, Any, Text # NOQA class Node(object): __slots__ = 'tag', 'value', 'start_mark', 'end_mark', 'comment', 'anchor' def __init__(self, tag, value, start_mark, end_ma...
explosion/srsly
srsly/ruamel_yaml/nodes.py
Python
mit
3,716
import urllib import xml.etree.ElementTree as ET serviceurl = 'http://maps.googleapis.com/maps/api/geocode/xml?' while True: address = raw_input('Enter location: ') if len(address) < 1 : break url = serviceurl + urllib.urlencode({'sensor':'false', 'address': address}) print 'Retrieving', url uh =...
johanfrisk/Python_at_web
notebooks/code/geoxml.py
Python
mit
743
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error class perl_WWW_RobotRules(test.test): """ Autotest module for testing basic functionality of perl_WWW_RobotRules @author Hariharan T.S. <harihare@in.ibm.com> ...
rajashreer7/autotest-client-tests
linux-tools/perl_WWW_RobotRules/perl_WWW_RobotRules.py
Python
gpl-2.0
1,298
## # This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild # # Copyright:: Copyright 2012-2019 Uni.Lu/LCSB, NTUA # Authors:: Cedric Laczny <cedric.laczny@uni.lu>, Fotis Georgatos <fotis@cern.ch>, Kenneth Hoste # License:: MIT/GPL # $Id$ # # This work implements a part of the HPCBIOS proj...
akesandgren/easybuild-easyblocks
easybuild/easyblocks/n/ncurses.py
Python
gpl-2.0
1,919
# -*- coding: utf-8 -*- # # Converse.js documentation build configuration file, created by # sphinx-quickstart on Fri Apr 26 20:48:03 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
deependhulla/technomail-debian
files/html_oldx/groupoffice/modules/chat/converse.js-0.8.6/docs/source/conf.py
Python
gpl-3.0
9,866
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Wikipath Extension for Python-Markdown ====================================== Converts [Link Name](wiki:ArticleName) to relative links pointing to article. Requires Python-Markdown 2.0+ Basic usage: >>> import markdown >>> text = "Some text with a [Link Nam...
arjun024/wikicoding
wiki/plugins/links/mdx/djangowikilinks.py
Python
gpl-3.0
5,118
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification import base64 import json log = CPLog(__name__) class Pushbullet(Notification): url = 'https://api.p...
rooi/CouchPotatoServer
couchpotato/core/notifications/pushbullet/main.py
Python
gpl-3.0
2,483
NAME = 'namespace plugin' def register(): pass
getpelican/pelican
pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py
Python
agpl-3.0
53
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) # 2004-2011: Pexego Sistemas Informáticos. (http://pexego.es) # 2013: Top Consultant Software Creations S.L. # (http://www.topconsultant.es/) # 2014: ...
Jortolsa/l10n-spain
l10n_es_aeat_mod349/wizard/export_mod349_to_boe.py
Python
agpl-3.0
13,634
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os.path from spack import * class CromwellWomtool(Package): """Command line utilities for interacting with t...
LLNL/spack
var/spack/repos/builtin/packages/cromwell-womtool/package.py
Python
lgpl-2.1
1,514
import Sofa import particle class Tuto3(Sofa.PythonScriptController): # optionnally, script can create a graph... def createGraph(self,node): particle.oneParticleSample(node) return 0
Anatoscope/sofa
applications/plugins/SofaPython/doc/SofaDays_oct2013/3_OneParticle/controller.py
Python
lgpl-2.1
195
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) # from spack import * class PerlModuleBuild(PerlPackage): """Module::Build is a system for building, testing, and in...
LLNL/spack
var/spack/repos/builtin/packages/perl-module-build/package.py
Python
lgpl-2.1
1,033
""" Tests file importers such as STEP """ #core modules import StringIO from cadquery import * from cadquery import exporters from cadquery import importers from tests import BaseTest #where unit test output will be saved import sys if sys.platform.startswith("win"): OUTDIR = "c:/temp" else: OUTDIR = "/tm...
rento19962/cadquery
tests/TestImporters.py
Python
lgpl-3.0
1,871
# Copyright 2016 Huawei Technologies India Pvt. Ltd. # # 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...
dims/neutron
neutron/tests/unit/api/rpc/agentnotifiers/test_bgp_dr_rpc_agent_api.py
Python
apache-2.0
3,575
# 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...
rew4332/tensorflow
tensorflow/contrib/slim/python/slim/model_analyzer.py
Python
apache-2.0
3,218
input = """ 1 2 2 1 3 4 1 3 2 1 2 4 1 4 0 0 1 5 2 1 6 7 1 6 2 1 5 7 1 7 0 0 1 8 2 0 2 5 1 9 2 1 10 11 1 10 2 1 9 11 1 11 0 0 1 12 2 1 13 14 1 13 2 1 12 14 1 14 0 0 1 15 2 0 9 12 1 16 2 1 17 18 1 17 2 1 16 18 1 18 0 0 1 19 2 1 20 21 1 20 2 1 19 21 1 21 0 0 1 22 2 0 16 19 0 22 c 9 b1 3 n_a1 15 b 6 n_a2 8 a 10 n_b1 5 a2 1...
Yarrick13/hwasp
tests/asp/AllAnswerSets/tight/testcase.3.asp.test.py
Python
apache-2.0
2,531
from __future__ import absolute_import, print_function import numpy as np from .stubs import ( get_global_id, get_global_size, get_local_id, get_local_size, get_group_id, get_work_dim, get_num_groups, barrier, mem_fence, shared, ) from .decorators import ( jit, ) from .hs...
ssarangi/numba
numba/hsa/api.py
Python
bsd-2-clause
1,293
#!/usr/bin/env python import unittest class TestTest(unittest.TestCase): def test_true(self): self.failUnless(True) def main(): unittest.main() if __name__ == '__main__': main()
mgaldzic/antimony
src/bindings/python/doc-converter/test/cases/test_test.py
Python
bsd-3-clause
203
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
tomasy23/evertonkrosnodart
tools/export/blender25/io_scene_dae/__init__.py
Python
mit
6,444
from Screens.MessageBox import MessageBox from Screens.ParentalControlSetup import ProtectedScreen from Components.config import config class FactoryReset(MessageBox, ProtectedScreen): def __init__(self, session): MessageBox.__init__(self, session, _("Factory reset will restore your receiver to its default configur...
Antonio-Team/enigma2
lib/python/Screens/FactoryReset.py
Python
gpl-2.0
1,088
""" .. function:: timeslidingwindow(timewindow, timecolumn) -> query results Returns the query input results annotated with the window id as an extra column. The following arguments can be passed as parameters: timewindow: It can be a numeric value that specifies the time length of the window (in seconds). timecol...
sosguns2002/interactive-mining
interactive-mining-3rdparty-madis/madis/src/functions/vtable/timeslidingwindow.py
Python
gpl-3.0
6,001
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-02 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('pootle_store', '0029_set_unit_creation_revision'), ] ...
unho/pootle
pootle/apps/pootle_store/migrations/0030_remove_extra_indeces.py
Python
gpl-3.0
1,311
# [[[cog import cog; cog.outl('"""\n%s\n"""' % file('README.rst').read()) ]]] """ S-expression parser for Python ============================== `sexpdata` is a simple S-expression parser/serializer. It has simple `load` and `dump` functions like `pickle`, `json` or `PyYAML` module. >>> from sexpdata import loads, du...
ensime/ensime-sublime
dependencies/sexpdata.py
Python
gpl-3.0
18,501
# Copyright (C) 2012,2013, 2017 # 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 term...
govarguz/espressopp
src/interaction/VSphereSelf.py
Python
gpl-3.0
4,028
# 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/. from ctypes import sizeof, windll, addressof, create_unicode_buffer from ctypes.wintypes import DWORD, HANDLE PROCESS_T...
vladikoff/fxa-mochitest
tests/venv/lib/python2.7/site-packages/mozprocess/wpk.py
Python
mpl-2.0
2,115
# This file is part of VoltDB. # Copyright (C) 2008-2015 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
kumarrus/voltdb
lib/python/voltcli/voltdb.d/rejoin.py
Python
agpl-3.0
1,838
# Copyright (c) 2012-2014 Andy Davidoff http://www.disruptek.com/ # # 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...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/boto/mws/connection.py
Python
agpl-3.0
49,807
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
tiexinliu/odoo_addons
smile_module_record/__init__.py
Python
agpl-3.0
1,003
from __future__ import absolute_import, division, print_function from nfldb.db import _upsert class Entity (object): """ This is an abstract base class that handles most of the SQL plumbing for entities in `nfldb`. Its interface is meant to be declarative: specify the schema and let the methods defin...
verdimrc/nfldb
nfldb/sql.py
Python
unlicense
15,501
# Copyright 2014-2015 ARM Limited # # 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 w...
Sticklyman1936/workload-automation
wlauto/workloads/anomaly2/__init__.py
Python
apache-2.0
2,354
# Copyright 2016 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 a...
jiaphuan/models
research/real_nvp/imnet_formatting.py
Python
apache-2.0
3,296
from datetime import datetime import threading import zookeeper PERM_READ = 1 PERM_WRITE = 2 PERM_CREATE = 4 PERM_DELETE = 8 PERM_ADMIN = 16 PERM_ALL = PERM_READ | PERM_WRITE | PERM_CREATE | PERM_DELETE | PERM_ADMIN zookeeper.set_log_stream(open("cli_log.txt","w")) TIMEOUT = 10.0 class ZKClient(object): def __i...
zhoffice/minos
owl/zktree/models.py
Python
apache-2.0
2,485
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
jhsenjaliya/incubator-airflow
airflow/executors/local_executor.py
Python
apache-2.0
2,991
########################################################################## # # Copyright (c) 2021, Cinesite VFX Ltd. 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 ...
hradec/gaffer
python/GafferUI/AnnotationsUI.py
Python
bsd-3-clause
5,068
# -*- coding: utf-8 -*- from __future__ import with_statement, print_function, absolute_import import os from requests_oauthlib import OAuth1Session def create_oauth_token(expiration=None, scope=None, key=None, secret=None, name=None, output=True): """ Script to obtain an OAuth token from Trello. Must ha...
mehdy/py-trello
trello/util.py
Python
bsd-3-clause
4,017
# Copyright 2016 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 os import shutil import tempfile from profile_creators import extension_profile_extender from telemetry import decorators from telemetry.testing impo...
was4444/chromium.src
tools/perf/profile_creators/extension_profile_extender_unittest.py
Python
bsd-3-clause
1,275
SECRET_KEY = 't_piw=&emz%!%*l504dvqor1iy1eu+nss&_^i&!@i@_32qrtl+'
Valuehorizon/valuehorizon-people
people/settings/sphinx_documentation.py
Python
mit
66
def plot_logistic_regression_graph(): import graphviz lr_graph = graphviz.Digraph(node_attr={'shape': 'circle', 'fixedsize': 'True'}, graph_attr={'rankdir': 'LR', 'splines': 'line'}) inputs = graphviz.Digraph(node_attr={'shape': 'circle'}, name="cluster_0") output = gra...
bgroveben/python3_machine_learning_projects
oreilly_GANs_for_beginners/oreilly_GANs_for_beginners/introduction_to_ml_with_python/mglearn/mglearn/plot_nn_graphs.py
Python
mit
3,510
import shelve import pytest import schedule2 as schedule @pytest.yield_fixture def db(): with shelve.open(schedule.DB_NAME) as the_db: if schedule.CONFERENCE not in the_db: schedule.load_db(the_db) yield the_db def test_record_attr_access(): rec = schedule.Record(spam=99, eggs=1...
everaldo/example-code
19-dyn-attr-prop/oscon/test_schedule2.py
Python
mit
1,753
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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...
schlueter/ansible-lint
lib/ansiblelint/rules/MismatchedBracketRule.py
Python
mit
1,497
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license # encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Migrate Cont...
thiagof/treeio
treeio/identities/south_migrations/0003_related_accessentity.py
Python
mit
12,940
from ..base import ShopifyResource from shopify import mixins import shopify class Blog(ShopifyResource, mixins.Metafields, mixins.Events): def articles(self): return shopify.Article.find(blog_id=self.id)
gavinballard/shopify_python_api
shopify/resources/blog.py
Python
mit
220
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2014 Alex Forencich 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...
sephalon/python-ivi
ivi/agilent/agilent8590A.py
Python
mit
1,520
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-01-22 03:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('terminal', '0004_session_remote_addr'), ] operations = [ migrations.AddField(...
eli261/jumpserver
apps/terminal/migrations/0005_auto_20180122_1154.py
Python
gpl-2.0
774
#!/usr/bin/env python3 import os, sys import time from ..utils import (std, strip_site, MGet, urlparse, HTMLParser) class FileDownloader(MGet): def __init__(self, info = {}): self.last_len = 0 self.alt_prog = 0.0 def getLocalFilesize(self, filename): tmp_name = self.temp_name(filename) if os.path.exists(f...
FrogLogics/mget
build/lib.linux-x86_64-3.5/Mget/downloader/common.py
Python
gpl-2.0
3,835
# sqlite/base.py # Copyright (C) 2005-2012 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 """ .. dialect:: sqlite :name: SQLite Date and Time Types ------------------- SQ...
fredericmohr/mitro
mitro-mail/build/venv/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/base.py
Python
gpl-3.0
34,783
import Orange from collections import Counter data = Orange.data.Table("lenses") print Counter(str(d.get_class()) for d in data)
qPCR4vir/orange
docs/tutorial/rst/code/data-instances4.py
Python
gpl-3.0
130
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
garlandkr/ansible
lib/ansible/module_common.py
Python
gpl-3.0
6,752
import squeezeboxserver import time squeezebox = squeezeboxserver.SqueezeboxServer("192.168.1.65:9000") players = squeezebox.players() for p in players: print ("MAC: %s" % p['playerid']) time.sleep(10) squeezebox.power("00:04:20:06:8c:55", "on") squeezebox.playlist("00:04:20:06:8c:55", "play") time...
JoakimLindbom/agocontrol
devices/squeezeboxserver/slimtest.py
Python
gpl-3.0
443
from .main import uTorrent def start(): return uTorrent() config = [{ 'name': 'utorrent', 'groups': [ { 'tab': 'downloaders', 'list': 'download_providers', 'name': 'utorrent', 'label': 'uTorrent', 'description': 'Use <a href="http://www.u...
coolbombom/CouchPotatoServer
couchpotato/core/downloaders/utorrent/__init__.py
Python
gpl-3.0
1,744
"""Test if correct arguments are passed to Whoosh to search indexed content """ from mock import patch from pyramid import testing from unittest import TestCase class TestSearchAttr(TestCase): attr = [] def _return_attr(self, *args, **kwargs): """Saves arguments passed to WhooshFulltext sea...
GreenLunar/Bookie
bookie/tests/test_utils/test_search.py
Python
agpl-3.0
1,797
#the file is left intentionally blank
equalitie/vengeance
src/util/__init__.py
Python
agpl-3.0
38
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
crmccreary/openerp_server
openerp/addons/sale_margin/sale_margin.py
Python
agpl-3.0
4,000
# -*- coding: utf-8 -*- # © 2016 Elico Corp (www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models import report_docx class IrActionReportDocx(models.Model): _inherit = 'ir.actions.report.xml' # @api.model # def _check_selection_field_valu...
luoguizhou/gooderp_addons
report_docx/report/ir_report.py
Python
agpl-3.0
941
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
caio2k/RIDE
src/robotide/searchtests/__init__.py
Python
apache-2.0
608
# 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...
eadgarchen/tensorflow
tensorflow/python/training/saver.py
Python
apache-2.0
79,359
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
caseyching/incubator-airflow
airflow/contrib/operators/bigquery_operator.py
Python
apache-2.0
3,249
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
jestapinski/oppia
core/domain/collection_domain.py
Python
apache-2.0
30,872
"""The DirecTV integration.""" import asyncio from datetime import timedelta from typing import Any, Dict from directv import DIRECTV, DIRECTVError import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import ATTR_NAME, CONF_HOST from homeassistant.core ...
nkgilley/home-assistant
homeassistant/components/directv/__init__.py
Python
apache-2.0
3,350