code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from urbansim.models.events_coordinator import EventsCoordinator from opus_core.datasets.dataset import DatasetSubset from opus_core.store.attribute_cache import AttributeCache class EventsCo...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/models/events_coordinator_and_storing.py
Python
gpl-2.0
964
# coding=utf-8 """cursor.py - Cursor handler.""" from __future__ import absolute_import import gobject import gtk NORMAL, GRAB, WAIT = range(3) class CursorHandler(object): def __init__(self, window): self._window = window self._timer_id = None self._auto_hide = False self._curre...
Cabalist/Comix
src/cursor.py
Python
gpl-2.0
2,337
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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 versi...
NickDaly/GemRB-FixConfig-Branch
gemrb/GUIScripts/bg1/GUICG3.py
Python
gpl-2.0
3,229
# ------------------------------------------------------------------------- # # Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group # # PyREBox: Python scriptable Reverse Engineering Sandbox # Author: Xabier Ugarte-Pedrero # # This program is free software; you can redistribute it and/or mod...
Cisco-Talos/pyrebox
mw_monitor2/ida_scripts/mw_monitor_binary_log_reader.py
Python
gpl-2.0
1,419
# -*- mode: python; py-indent-offset: 4; coding: utf-8-unix; encoding: utf-8 -*- """ This is the advanced syntax for behave testing. This is from OpenERPScenario and may fail, as is not properly ported to Tryton yet. It could be that there's a lot in here that is unused and cleaned out. Or, it just needs some TLC by ...
lampmantech/trytond_scenari
src/behaving/trytond/steps/dsl.py
Python
gpl-2.0
11,405
#!/usr/bin/env python ''' Faraday Penetration Test IDE - Community Version Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/) See the file 'doc/LICENSE' for the license information ''' import os import model.api import model import time import datetime from model.report import ReportManager from model.dif...
Snifer/BurpSuite-Plugins
faraday/model/workspace.py
Python
gpl-2.0
20,725
#!/usr/bin/env python import sys import re import getopt from typing import List, Tuple from feed_maker_util import IO def main(): num_of_recent_feeds = 1000 optlist, _ = getopt.getopt(sys.argv[1:], "n:") for o, a in optlist: if o == '-n': num_of_recent_feeds = int(a) line_list ...
terzeron/FeedMakerApplications
study/_javabeat/capture_item_link_title.py
Python
gpl-2.0
791
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2014 KenV99 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
AmbiBox/kodi.script.ambibox
resources/lib/ambiwincon.py
Python
gpl-2.0
1,568
#!/usr/bin/python # # Copyright (C) 2009 Julian Andres Klode <jak@debian.org> # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. """Unit tests for verifying the correctness of hashsums in a...
mvo5/python-apt
tests/test_hashes.py
Python
gpl-2.0
9,619
# Copyright (c) 2008--2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a cop...
hustodemon/spacewalk
backend/common/rhnCache.py
Python
gpl-2.0
12,026
from checkio.signals import ON_CONNECT from checkio import api from checkio.referees.io import CheckiOReferee from tests import TESTS api.add_listener( ON_CONNECT, CheckiOReferee( tests=TESTS).on_ready)
Bryukh-Checkio-Tasks/checkio-task-mono-captcha
verification/referee.py
Python
gpl-2.0
221
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/journal/journal/components/Device.py
Python
gpl-2.0
1,235
# -*- coding: utf-8 -*- # Copyright (c) 2012-2014 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
sixuanwang/SAMSaaS
wirecloud-develop/src/wirecloud/fiware/marketAdaptor/views.py
Python
gpl-2.0
5,496
import numpy as n import scipy.interpolate import scipy.ndimage def congrid(a, newdims, method='linear', centre=False, minusone=False): '''Arbitrary resampling of source array to new dimension sizes. Currently only supports maintaining the same number of dimensions. To use 1-D arrays, first promote them to...
gsnyder206/synthetic-image-morph
congrid.py
Python
gpl-2.0
3,937
# Copyright (C) 2008 Canonical Ltd # # 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 distributed in ...
Distrotech/bzr
bzrlib/tests/fake_command.py
Python
gpl-2.0
859
import json import shapely.wkb import shapely.geometry import shapely.ops import codecs import os import inspect from osgeo import ogr from osgeo import osr infile = "/Users/kirilllebedev/Maps/ne_110m_admin_0_map_units/ne_110m_admin_0_map_units.shp" outfile = "/Users/kirilllebedev/Maps/continents_wb/continents_wb.shp"...
dbartumeu/bower.jvectormap
converter/processor.py
Python
gpl-2.0
2,409
# -*- coding: utf-8 -*- import pytest from cfme.configure import about from utils import version @pytest.mark.tier(3) @pytest.mark.sauce def test_version(): """Check version presented in UI against version retrieved directly from the machine. Version retrieved from appliance is in this format: 1.2.3.4 V...
dajohnso/cfme_tests
cfme/tests/configure/test_version.py
Python
gpl-2.0
641
# -*- coding: utf-8 -*- from parameterized import parameterized from tests.unittests.utils.base_test_case import BaseTestCase, request_context from tests.unittests.utils.payload.news import NewsPayload class TestNewsCollection(BaseTestCase): """Test News collection""" @parameterized.expand([ [None,...
geokrety/geokrety-api
tests/unittests/api/news/test_news_collection.py
Python
gpl-3.0
933
class HexManager: def __init__(self, world): self.world = world def promptAssignHex(self): hexid = raw_input("Hex id to assign"); networkid = raw_input("Network id to assing this hex"); targethex = self.world.getHexByID(hexid) targetNetwork = self.world.getNetwork(networ...
connor-cash/nesonomics
unused/HexManager.py
Python
gpl-3.0
785
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import unittest import frappe from frappe.utils.data import ( add_days, add_months, add_to_date, date_diff, flt, get_date_str, nowdate, ) from erpnext.accounts.doctype.subscription.subscription import get_prorata_factor te...
frappe/erpnext
erpnext/accounts/doctype/subscription/test_subscription.py
Python
gpl-3.0
24,486
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
XeCycle/indico
indico/web/flask/blueprints/event/display/misc.py
Python
gpl-3.0
2,063
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('changeset', '0021_auto_20160222_2345'), ] operations = [ migrations.AlterField( model_name='suspicionreasons', ...
batpad/osmcha-django
osmchadjango/changeset/migrations/0022_auto_20160222_2358.py
Python
gpl-3.0
428
#!/usr/bin/env python # coding:utf-8 vi:et:ts=2 # parabridge persistent settings module. # Copyright 2013 Grigory Petrov # See LICENSE for details. import xmlrpclib import socket import sqlite3 import uuid import info SQL_CREATE = """ CREATE TABLE IF NOT EXISTS task ( guid TEXT UNIQUE, name TEXT UNIQUE, ...
eyeofhell/parabridge
parabridge/settings.py
Python
gpl-3.0
3,770
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import fnmatch import os import re import s...
ta2-1/pootle
pootle/apps/pootle_fs/finder.py
Python
gpl-3.0
7,406
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, 2013, 2015 Rocky Bernstein rocky@gnu.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
rocky/python2-trepan
trepan/processor/command/set_subcmd/trace.py
Python
gpl-3.0
1,431
../../../../../share/pyshared/apport/crashdb_impl/memory.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/apport/crashdb_impl/memory.py
Python
gpl-3.0
59
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Country' db.create_table('locations_country', ( ('id', self.gf('django.db.mode...
MauHernandez/cyclope
cyclope/apps/locations/migrations/0001_initial.py
Python
gpl-3.0
2,676
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
lahwaacz/qutebrowser
qutebrowser/keyinput/modeman.py
Python
gpl-3.0
13,365
import discord async def overriderategirl(cmd, message, args): if args: collection = 'HotCrazyOverrides' if args[0].lower() == 'disable': if message.mentions: target = message.mentions[0] target_data = {'UserID': target.id} lookup = cmd.d...
aurora-pro/apex-sigma
sigma/plugins/administration/cheats/overriderategirl.py
Python
gpl-3.0
2,537
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
espressomd/espresso
src/python/espressomd/shapes.py
Python
gpl-3.0
9,129
# cloakingWarpSafe # # Used by: # Modules named like: Covert Ops Cloaking Device II (2 of 2) type = "active" runTime = "early" def handler(fit, ship, context): fit.extraAttributes["cloaked"] = True # TODO: Implement
Ebag333/Pyfa
eos/effects/cloakingwarpsafe.py
Python
gpl-3.0
226
import discord from redbot.core.bot import Red from redbot.core import checks, commands, Config from redbot.core.i18n import cog_i18n, Translator, set_contextual_locales_from_guild from redbot.core.utils._internal_utils import send_to_owners_with_prefix_replaced from redbot.core.utils.chat_formatting import escape, pag...
palmtree5/Red-DiscordBot
redbot/cogs/streams/streams.py
Python
gpl-3.0
39,323
../../../../../../../share/pyshared/orca/scripts/apps/soffice/script.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/soffice/script.py
Python
gpl-3.0
71
import numpy as np class AutoParameterModel(): """Model to hold all the necessary information to generate auto-tests, where parameters of components are systematically manipulated """ def __init__(self): self._parameters = [] def nrows(self): """The number of auto-parameters ...
Joel-U/sparkle
sparkle/stim/auto_parameter_model.py
Python
gpl-3.0
15,413
# usr/bin/env python """ Created on Fri Jun 23 @author : Vijayasai S """ def DateMonthYear(data): year = [] ; month = [] ; date = [] for index in range(len(data["packettimestamp"])): year.append(int(data["packettimestamp"][index][0:4])) month.append(int(data["packettimestamp"][index][5:7])) date.append(int(da...
Vijaysai005/KProject
vijay/POI_RLE/timedate.py
Python
gpl-3.0
709
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from calibre.gui2.convert.lrf_output_ui import Ui_Form from calibre.gui2.convert imp...
jelly/calibre
src/calibre/gui2/convert/lrf_output.py
Python
gpl-3.0
1,262
class memoized(object): """Decorator that caches a function's return value each time it is called. If called later with the same arguments, the cached value is returned, and not re-evaluated. """ def __init__(self, func): self.func = func self.cache = {} def __call__(self, *args): try: return self.cache[...
cliburn/flow
src/plugins/io/ReadFCS/memoized.py
Python
gpl-3.0
662
#!/usr/bin/env python # -*- coding: utf-8 -*- import os print "Sana da merhaba %s" % (os.getenv("USER"))
examachine/pisi
tests/buildtests/merhaba-pisi-1.0/usr/bin/merhaba-pisi.py
Python
gpl-3.0
107
# -*- encoding: utf-8 -*- import itertools from abjad.tools import mathtools def sum_consecutive_elements_by_sign(sequence, sign=(-1, 0, 1)): '''Sums consecutive `sequence` elements by `sign`. :: >>> sequence = [0, 0, -1, -1, 2, 3, -5, 1, 2, 5, -5, -6] :: >>> sequencetools.sum_consecut...
mscuthbert/abjad
abjad/tools/sequencetools/sum_consecutive_elements_by_sign.py
Python
gpl-3.0
1,786
# -*- coding: utf-8 -*- """ Created on Thu Apr 03 09:38:19 2014 """ from .PulseBase import Pulse from .beam import OneDBeam from . import beam from . import DerivedPulses from . import PulseBase from .high_V_waveguide import OneDBeam_highV_WG
ycasg/PyNLO
src/pynlo/light/__init__.py
Python
gpl-3.0
245
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Includes all the test modules from this directory and runs the tests. LICENSE: Braille Grade 2 Translation in Python Copyright (C) 2016 Antonis Katzourakis This program is free software: you can redistribute it and/or modify it under the...
ant0nisk/pyUniBraille
tests/test_all.py
Python
gpl-3.0
1,366
class ApplicationError (Exception): '''Base class for all exceptions raised by check_gmond.''' pass class UsageError (ApplicationError): '''Raised if mandatory arguments are not provided.''' pass class NoSuchHost (ApplicationError): '''Raised if hostname looks fail.''' pass class NoSuch...
wikimedia/operations-debs-check_ganglia
check_ganglia/errors.py
Python
gpl-3.0
516
# Created By: Virgil Dupras # Created On: 2009-11-27 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/g...
fokusov/moneyguru
qt/controller/transaction/filter_bar.py
Python
gpl-3.0
843
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestEInvoiceSettings(unittest.TestCase): pass
frappe/erpnext
erpnext/regional/doctype/e_invoice_settings/test_e_invoice_settings.py
Python
gpl-3.0
239
#!/usr/bin/python2.5 # # Copyright 2008 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 or...
google-code-export/cocoslive
cocoslive/configuration.py
Python
gpl-3.0
1,082
import os from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.template.backends.jinja2 import Jinja2 from django.template.loader import render_to_string from django.test import RequestFactory from django.utils import translation from pyquery import PyQuery as pq from . im...
Elchi3/kuma
kuma/core/tests/test_templates.py
Python
mpl-2.0
2,947
__all__ = ["bayes", "cpt", "heuristic", "payoff", "recognition", "rl", "sharing"]
greenape/disclosure-game
python/disclosuregame/disclosuregame/Agents/__init__.py
Python
mpl-2.0
81
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
franek/weboob
modules/youtube/test.py
Python
agpl-3.0
1,394
""" unittests for xmodule Run like this: rake test_common/lib/xmodule """ import json import os import unittest import fs import fs.osfs import numpy from mock import Mock from path import path import calc from xblock.field_data import DictFieldData from xmodule.x_module import ModuleSystem, XModuleDescriptor...
morpheby/levelup-by
common/lib/xmodule/xmodule/tests/__init__.py
Python
agpl-3.0
3,708
from odoo import models, fields class ResUsers(models.Model): _inherit = "res.users" partner_id = fields.Many2one(ondelete='cascade')
eicher31/compassion-switzerland
partner_compassion/models/res_users.py
Python
agpl-3.0
145
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
rcgee/oq-hazardlib
openquake/hazardlib/gsim/akkar_bommer_2010.py
Python
agpl-3.0
21,696
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import ...
akintolga/superdesk-aap
server/aap/publish/formatters/aap_newscentre_formatter_test.py
Python
agpl-3.0
9,537
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Pexego Sistemas Informáticos (http://www.pexego.es) All Rights Reserved # $Jesús Ventosinos Mayor$ # $Javier Colmenero Fernández$ # Copyright (c) 2014 Dido...
odoousers2014/LibrERP
task_time_control/project_task.py
Python
agpl-3.0
7,349
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
dperconti/hexwick_python
hexwick/migrations/0001_initial.py
Python
agpl-3.0
3,992
""" Django admin commands related to verify_student """ from __future__ import absolute_import import logging import os from pprint import pformat from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from lms.djangoapps.verify_student.models import ManualVerif...
ESOedX/edx-platform
lms/djangoapps/verify_student/management/commands/manual_verifications.py
Python
agpl-3.0
3,303
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2016 QUIVAL, S.A. All Rights Reserved # $Pedro Gómez Campos$ <pegomez@elnogal.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
Comunitea/CMNT_00040_2016_ELN_addons
product_price_history_analysis/__init__.py
Python
agpl-3.0
1,005
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/astroid/tests/unittest_inference.py
Python
agpl-3.0
59,256
# Amara, universalsubtitles.org # # Copyright (C) 2016 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your ...
wevoice/wesub
apps/openid_consumer/admin.py
Python
agpl-3.0
1,189
import os from PIL import Image #Requires pillow import time #import json import shutil #Requires shutil import simplejson from decimal import Decimal #python 3 path = 'textures' #E.G The name of a folder everything is in Just set it to bypass The Manual input if not path: path = input('''The name of the folde...
Necromunger/unitystation
Tools/DMI_splitter_and_meta_maker/duplicate_name_renamer.py
Python
agpl-3.0
1,520
#!/usr/bin/env python3 import os.path import json import sys _MY_PATH = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(_MY_PATH, '..', '..', '..')) from qutepart.syntax.loader import loadSyntax from qutepart.syntax import SyntaxManager, Syntax def _add_php(targetFileName, srcFileName)...
andreikop/qutepart
qutepart/syntax/data/regenerate-definitions-db.py
Python
lgpl-2.1
3,241
# 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 MariadbCClient(CMakePackage): """MariaDB turns data into structured information in a wide ...
iulian787/spack
var/spack/repos/builtin/packages/mariadb-c-client/package.py
Python
lgpl-2.1
3,917
#!/usr/bin/env python3 """ librepo - download a package """ import os import sys import shutil from pprint import pprint import librepo DESTDIR = "downloaded_metadata" PROGRESSBAR_LEN = 40 finished = False def callback(data, total_to_download, downloaded): """Progress callback""" global finished if to...
Tojaj/librepo
examples/python/download_package.py
Python
lgpl-2.1
1,388
#!/usr/bin/env python3 # Copyright (C) 2016 Freie Universität Berlin # # 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 os import sys def testfunc(child): child.expect(r"TRACE_SIZE: (\d+...
MichelRottleuthner/RIOT
tests/trace/tests/01-run.py
Python
lgpl-2.1
676
# Copyright (C) 2011 Sam Rushing # Copyright (C) 2012-2014 The python-bitcoinlib developers # Copyright (C) 2015 The python-altcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of...
coinwarp/python-altcoinlib
altcoin/core/key.py
Python
lgpl-3.0
1,510
import os import string import types import time import shutil import log import copy #import logging #import utility from testproblem import TestProblem from mafrw import Agent from .. import config class DataManager(Agent): """ An object of this class is responsable to collect data, support access to...
dpo/opal
opal/core/datamanager.py
Python
lgpl-3.0
3,673
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
agry/NGECore2
scripts/mobiles/talus/aakuan_guardian.py
Python
lgpl-3.0
1,655
from typing import Optional from django.core.exceptions import MultipleObjectsReturned from abonapp.models import Abon from devapp.models import Device, Port def dhcp_commit(client_ip: str, client_mac: str, switch_mac: str, switch_port: int) -> Optional[str]: try: dev = Device.objects.get(...
nerosketch/djing
agent/commands/dhcp.py
Python
unlicense
2,115
import logging import os import socket from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from threading import Thread import requests from docker.transport import UnixHTTPAdapter from tests.acceptance.cli_test import dispatch from tests.integration.testcases import DockerClientTestCase...
thaJeztah/compose
tests/integration/metrics_test.py
Python
apache-2.0
4,620
# Copyright 2015-2016 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...
sinkap/trappy
trappy/wa/results.py
Python
apache-2.0
5,153
import unittest import ray from ray.rllib.agents.pg import PGTrainer, DEFAULT_CONFIG from ray.rllib.utils.test_utils import framework_iterator class LocalModeTest(unittest.TestCase): def setUp(self) -> None: ray.init(local_mode=True) def tearDown(self) -> None: ray.shutdown() def test_l...
richardliaw/ray
rllib/tests/test_local.py
Python
apache-2.0
696
''' New Integration Test for creating KVM VM. @author: Youyk ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import os # import arm.test_stub as test_stub test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_st...
zstackorg/zstack-woodpecker
integrationtest/vm/arm/test_arm_vm.py
Python
apache-2.0
1,342
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
les69/calvin-base
calvin/runtime/south/plugins/storage/twistedimpl/securedht/dht_server.py
Python
apache-2.0
9,399
# 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 applicable ...
hehongliang/tensorflow
tensorflow/contrib/cluster_resolver/python/training/slurm_cluster_resolver.py
Python
apache-2.0
8,923
"""tarball Tool-specific initialization for tarball. """ ## Commands to tackle a command based implementation: ##to unpack on the fly... ##gunzip < FILE.tar.gz | tar xvf - ##to pack on the fly... ##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz import os.path import SCons.Builder import SCons.Node.FS ...
hgl888/TeamTalk
win-client/3rdParty/src/json/scons-tools/targz.py
Python
apache-2.0
3,137
from contextlib import contextmanager from testfixtures import Replacer import os @contextmanager def subprocess_context_helper(temp_dir, cmd): config_file = os.path.join(temp_dir.path, 'tmp_file') import subprocess origing_popen = subprocess.Popen with Replacer() as r: def not_existing_progra...
enkidulan/slidelint
src/slidelint/tests/utils.py
Python
apache-2.0
485
from plenum.common.constants import NODE, NYM from plenum.common.transactions import PlenumTransactions def testTransactionsAreEncoded(): assert NODE == "0" assert NYM == "1" def testTransactionEnumDecoded(): assert PlenumTransactions.NODE.name == "NODE" assert PlenumTransactions.NYM.name == "NYM" ...
evernym/zeno
plenum/test/common/test_transactions.py
Python
apache-2.0
450
# Copyright 2016 Twitter. 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 agree...
streamlio/heron
heron/executor/tests/python/heron_executor_unittest.py
Python
apache-2.0
14,316
from __future__ import absolute_import, unicode_literals import os from itertools import count import pytest from case import Mock, patch from celery.concurrency.base import BasePool, apply_target from celery.exceptions import WorkerShutdown, WorkerTerminate class test_BasePool: def test_apply_target(self): ...
kawamon/hue
desktop/core/ext-py/celery-4.2.1/t/unit/concurrency/test_concurrency.py
Python
apache-2.0
4,669
import functools import html import itertools import pprint from mondrian import term from bonobo import settings from bonobo.config import Configurable, Method, Option, use_context, use_no_input, use_raw_input from bonobo.config.functools import transformation_factory from bonobo.config.processors import ContextProc...
python-bonobo/bonobo
bonobo/nodes/basics.py
Python
apache-2.0
10,187
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import unittest from pants.help.scope_info_iterator import ScopeInfoIterator from pants.option.global_options import GlobalOptions from pants.option.scope import GLOBAL_SCOPE, ScopeInfo f...
tdyas/pants
src/python/pants/help/scope_info_iterator_test.py
Python
apache-2.0
2,564
# coding=utf-8 """ Copyright 2013 LinkedIn Corp. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
linkedin/naarad
src/naarad/metrics/gc_metric.py
Python
apache-2.0
15,945
# Copyright (c) 2014 eBay Software 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 # # Unl...
zhangg/trove
trove/guestagent/strategies/restore/experimental/couchbase_impl.py
Python
apache-2.0
9,593
# Copyright 2016 the Queen's University Biological Station # 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 la...
qubs/climate-data-api
climate_data/tests.py
Python
apache-2.0
664
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
openstack/keystone
keystone/api/system.py
Python
apache-2.0
7,273
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # ugc Summarize garbage collection events in high-level languages. # For Linux, uses BCC, eBPF. # # USAGE: ugc [-v] [-m] [-M MSEC] [-F FILTER] {java,python,ruby,node} pid # # Copyright 2016 Sasha Goldshtein # Licensed under the Apache License, Versi...
romain-intel/bcc
tools/lib/ugc.py
Python
apache-2.0
7,598
## @package convnet_benchmarks # Module caffe2.experiments.python.convnet_benchmarks from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals """ Benchmark for common convnets. (NOTE: Numbers below prior with missing parameter=...
xzturn/caffe2
caffe2/experiments/python/convnet_benchmarks.py
Python
apache-2.0
19,876
# 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...
zhreshold/mxnet
example/distributed_training-horovod/resnet50_imagenet.py
Python
apache-2.0
17,959
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/envisage/tasks/actions.py
Python
apache-2.0
14,692
################################################################################ # 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...
tzulitai/flink
flink-python/pyflink/fn_execution/tests/test_process_mode_boot.py
Python
apache-2.0
6,884
"""Constants for the cloud component.""" DOMAIN = 'cloud' REQUEST_TIMEOUT = 10 PREF_ENABLE_ALEXA = 'alexa_enabled' PREF_ENABLE_GOOGLE = 'google_enabled' PREF_ENABLE_REMOTE = 'remote_enabled' PREF_GOOGLE_ALLOW_UNLOCK = 'google_allow_unlock' PREF_CLOUDHOOKS = 'cloudhooks' PREF_CLOUD_USER = 'cloud_user' CONF_ALEXA = 'al...
molobrakos/home-assistant
homeassistant/components/cloud/const.py
Python
apache-2.0
1,006
# This file is part of the MapProxy project. # Copyright (C) 2014 Omniscale <http://omniscale.de> # # 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...
olt/mapproxy
mapproxy/test/system/test_wms_srs_extent.py
Python
apache-2.0
6,717
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.utils import timezone from django.conf import settings from django.core import validators from django.core.exceptions import ValidationError from django.db import connection from django.db.models import Q from django....
dawran6/zulip
zerver/views/messages.py
Python
apache-2.0
50,733
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
NeCTAR-RC/horizon
openstack_dashboard/test/integration_tests/tests/test_router.py
Python
apache-2.0
8,645
# Copyright 2010-present MongoDB, 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 to in wri...
mongodb/mongo-python-driver
bson/max_key.py
Python
apache-2.0
1,470
""" Initialize models """
myadventure/myadventure-api
app/models/__init__.py
Python
apache-2.0
27
# Copyright (c) 2018 PaddlePaddle 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 app...
reyoung/Paddle
python/paddle/fluid/tests/unittests/test_dropout_op.py
Python
apache-2.0
5,697
# ######################################################################## # Copyright 2013 Advanced Micro Devices, 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.apach...
John-Colvin/clFFT
src/scripts/perf/fftPerformanceTesting.py
Python
apache-2.0
11,827
# 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...
guschmue/tensorflow
tensorflow/contrib/framework/python/ops/variables.py
Python
apache-2.0
29,690
import logging import time import boto3 import dns.resolver from retrying import retry logger = logging.getLogger(__name__) def get_cluster_id(): """Determine EMR cluster ID via DNS""" resolver = dns.resolver.Resolver() cluster_id = resolver.query('dataproc.rasterfoundry.com', 'TXT')[0] return clust...
aaronxsu/raster-foundry
app-tasks/rf/src/rf/utils/emr.py
Python
apache-2.0
1,771
#!/usr/bin/env python # #CustomScript extension # # Copyright 2014 Microsoft Corporation # # 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 # #...
Snesha/azure-linux-extensions
AzureEnhancedMonitor/ext/test/test_aem.py
Python
apache-2.0
15,614