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
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
BorgERP/borg-erp-6of3
base/base_base/res/TODO/smile_access_control/__openerp__.py
Python
agpl-3.0
2,086
#!/usr/bin/env python2.6 #Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # #This file is part of Shinken. # #Shinken 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 Fr...
baloo/shinken
test/test_service_tpl_on_host_tpl.py
Python
agpl-3.0
4,747
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com> # Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com> # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) # Copyright (C) 2013-2014 Camptocamp (<http://www.campto...
OCA/report-print-send
base_report_to_printer/models/printing_printer.py
Python
agpl-3.0
8,539
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by br _at_ re-web _dot_ eu, 2015 # Modified by ferdinand _at_ zickner _dot_ de, 2017 from __future__ import division from events import Event import pygame import pyqrcode try: import pygame.fastevent as EventModule except ImportError: import pygame.eve...
nerdifant/fotobox
lib/display.py
Python
agpl-3.0
10,191
""" Module that provides a connection to the ModuleStore specified in the django settings. Passes settings.MODULESTORE as kwargs to MongoModuleStore """ from __future__ import absolute_import from importlib import import_module import re from django.conf import settings from django.core.cache import get_cache, Inva...
pku9104038/edx-platform
common/lib/xmodule/xmodule/modulestore/django.py
Python
agpl-3.0
5,926
"""Command line display objects""" import sys from namespace import Namespace import display import csv import cStringIO as StringIO class Monthly_Bal(display.Monthly_Bal): def done(self, first_continuous): """This method is called when all the statement periods have been compared to the ledger. O...
OpenTechStrategies/anvil
display_csv.py
Python
agpl-3.0
1,982
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 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 os im...
vied12/superdesk
server/apps/validators/tests.py
Python
agpl-3.0
1,483
""" Load and save a set of chosen implementations. @since: 0.27 """ # Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. import os from zeroinstall import _, zerostore from zeroinstall.injector import model from zeroinstall.injector.policy import get_deprecated_singlet...
dsqmoore/0install
zeroinstall/injector/selections.py
Python
lgpl-2.1
15,088
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
xiangke/pycopia
mibs/pycopia/mibs/CISCO_BUS_MIB.py
Python
lgpl-2.1
9,324
#!/usr/bin/python import os import logging from subprocess import call import psutil INDIHUB_AGENT_OFF = 'off' INDIHUB_AGENT_DEFAULT_MODE = 'solo' try: INDIHUB_AGENT_CONFIG = os.path.join(os.environ['HOME'], '.indihub') except KeyError: INDIHUB_AGENT_CONFIG = '/tmp/indihub' if not os.path.exists(INDIHUB_AGE...
knro/indiwebmanager
indiweb/indihub_agent.py
Python
lgpl-2.1
1,871
# -*- test-case-name: higgins.http.test.test_util -*- ## # Copyright (c) 2005 Apple Computer, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, ...
msfrank/Higgins
higgins/http/dav/util.py
Python
lgpl-2.1
6,565
from __future__ import absolute_import import os path = os.path import unittest import pytest import myhdl from myhdl import * @block def ternary1(dout, clk, rst): @always(clk.posedge, rst.negedge) def logic(): if rst == 0: dout.next = 0 else: dout.next = (dout + 1) i...
juhasch/myhdl
myhdl/test/conversion/general/test_ternary.py
Python
lgpl-2.1
1,409
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import...
binarytemple/debian-vips
swig/vipsCC/VDisplay.py
Python
lgpl-2.1
3,103
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library 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 2.1 of the License, or (at your option) any later version. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/StreamLines/F4.py
Python
lgpl-2.1
1,524
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import avg, ui import libavg import gestures RESOLUTION = avg.Point2D(800, 600) nodeList = [] nodesEnabled = True def abortAll(): for node in nodeList: node.recognizer.abort() def switchNodesEnabled(): global nodesEnabled nodesEnabled =...
pararthshah/libavg-vaapi
src/samples/abort_gestures.py
Python
lgpl-2.1
3,343
#!/usr/bin/python # Check that fullscreen apps during callare decorated. #* Test steps # * simulate an ongoing call # * show a fullscreen application window #* Post-conditions # * the decorator is on top of it import os, re, sys, time if os.system('mcompositor-test-init.py'): sys.exit(1) fd = os.popen('window...
dudochkin-victor/ux-compositor
tests/functional/test20b.py
Python
lgpl-2.1
1,337
import csv import math from collections import defaultdict from utils import * def getPointsInGrid(dataset,gridNW,gridSE): gridP = [] with open(dataset) as csvfile: reader = csv.reader(csvfile) for row in reader: # row is a list if(gridSE[0] <= float(row[4]) <= gridNW[0...
chatziko/libqif
samples/semantic/preproc_foursquare/foursquare_preproc.py
Python
lgpl-2.1
4,254
#!/usr/bin/python """Test of Dojo combo box presentation.""" from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) sequence.append(PauseAction(5000)) sequence.append(KeyComboAction("Tab")) sequence.append(KeyComboAction("Tab")) ...
chrys87/orca-beep
test/keystrokes/firefox/aria_combobox_dojo.py
Python
lgpl-2.1
4,717
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. import _ivideo import new new_instancemethod = new.instancemethod try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. ...
crystalspace/CS
scripts/python/frozen/cspace/ivideo.py
Python
lgpl-2.1
60,284
# 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 Rccl(CMakePackage): """RCCL (pronounced "Rickle") is a stand-alone library of standard...
iulian787/spack
var/spack/repos/builtin/packages/rccl/package.py
Python
lgpl-2.1
2,124
"""Common Nuxeo Automation client utilities.""" import sys import base64 import json import urllib2 import random import time import os import hashlib import tempfile from urllib import urlencode from poster.streaminghttp import get_handlers from nxdrive.logging_config import get_logger from nxdrive.client.common impo...
rsoumyassdi/nuxeo-drive
nuxeo-drive-client/nxdrive/client/base_automation_client.py
Python
lgpl-2.1
34,951
""" Tries different parameter combinations for point-wise interval proposing. """ import sys sys.path.append('..') sys.path.append('../experiments') import numpy as np from collections import OrderedDict from maxdiv import maxdiv, eval import datasets # Constants PROPMETHODS = ['hotellings_t', 'kde'] METHOD = 'gaus...
cvjena/libmaxdiv
tools/optimize_proposals.py
Python
lgpl-3.0
3,137
""" Differential Evolution optimisation Implemented generically, to optimise opaque objects The optimiser copies objects using deepcopy, and manipulates objects using supplied control objects. Copyright 2019 Ben Dudson, University of York. Email: benjamin.dudson@york.ac.uk This file is part of FreeGS. FreeGS is f...
bendudson/freegs
freegs/optimiser.py
Python
lgpl-3.0
5,144
#! /usr/bin/env python ''' Created on Sep 26, 2016 @author: acaproni ''' import argparse import os import socket from subprocess import call import sys from IASLogging.logConf import Log from IASTools.CommonDefs import CommonDefs from IASTools.FileSupport import FileSupport def setProps(propsDict,className,logFil...
IntegratedAlarmSystem-Group/ias
Utils/src/main/python/iasRun.py
Python
lgpl-3.0
11,119
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Rémi Palancher # # This file is part of Cloubed. # # Cloubed 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 L...
rezib/cloubed-deb
cloubed/conf/ConfigurationStorageVolume.py
Python
lgpl-3.0
5,605
# -*- coding: utf-8 -*- { 'name': "Mail as Employee", 'summary': """Send Mail as Employee""", 'author': 'ERP Ukraine', 'website': 'https://erp.co.ua', 'license': 'AGPL-3', 'category': 'Sales', 'depends': ['mail', 'hr'], 'data': [ 'views/views.xml', ], }
lem8r/cofair-addons
mail_employee/__manifest__.py
Python
lgpl-3.0
298
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> """Access a working directory managed by Git - the stupid content tracker.""" # Git: <https://git-scm.com/> # Tested with: git 2.20.1 # Executable: 'git' # # Usage example: # #...
dlu-ch/dlb
src/dlb_contrib/git.py
Python
lgpl-3.0
18,572
# (C) British Crown Copyright 2018, Met Office # # This file is part of cartopy. # # cartopy 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 # (at your option) any la...
pelson/cartopy
lib/cartopy/tests/mpl/test_feature_artist.py
Python
lgpl-3.0
4,837
from __future__ import absolute_import '''Copyright 2015 LinkedIn Corp. 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 ...
xtiankisutsa/MARA_Framework
tools/qark/qark/qarkMain.py
Python
lgpl-3.0
53,373
# -*- coding: utf-8 -*- { 'name': 'Log\Notify Next Action changes', 'version': '1.0.0', 'author': 'IT-Projects LLC, Ivan Yelizariev', 'license': 'LGPL-3', 'category': 'Customer Relationship Management', 'website': 'https://twitter.com/yelizariev', 'price': 9.00, 'currency': 'EUR', 'd...
meta-it/misc-addons
crm_next_action/__openerp__.py
Python
lgpl-3.0
425
"""A demo instrument class""" from .place_timer import PlaceTimer
PALab/PLACE
place/plugins/place_timer/__init__.py
Python
lgpl-3.0
66
#-*-coding:utf-8-*- """ @package itool.cmd.report @brief A command for generating any kind of it report @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ __all__ = ['ReportIToolSubCommand'] from .base import IToolSubCommand from bit.cmd import ReportCom...
Byron/bit
src/python/itool/report.py
Python
lgpl-3.0
758
# coding: utf-8 # pylint: disable=W0201,R0915,R0912 """ Main BDF class. Defines: - BDF see https://docs.plm.automation.siemens.com/tdoc/nxnastran/10/help/#uid:index """ from __future__ import (nested_scopes, generators, division, absolute_import, print_function, unicode_literals) import os i...
saullocastro/pyNastran
pyNastran/bdf/dev_vectorized/bdf.py
Python
lgpl-3.0
150,048
from authentication_core import *
simmons-tech/api
src/utils/authentication_core/__init__.py
Python
lgpl-3.0
34
import unittest from chill.api import _short_circuit class ApiTestCase(unittest.TestCase): def setUp(self): pass def tearDown(self): pass class ShortCircuit(ApiTestCase): def test_short_circuit_skip(self): a = "Johnny" b = _short_circuit(a) assert a == b ...
jkenlooper/chill
src/chill/test_api.py
Python
lgpl-3.0
1,709
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function ''' Created on 13.12.2010 @author: gena ''' ''' This is main run file for locotrack program ''' import sys print("Locotrack software starting") print("Loading PyQt4") from PyQt4.QtGui import QApplication, QIcon from os.path import joi...
GennadiyZakharov/locotrack
locotrack.py
Python
lgpl-3.0
1,025
# -*- encoding: utf-8 -*- # pilas engine - a video game framework. # # copyright 2010 - hugo ruscitti # license: lgplv3 (see http://www.gnu.org/licenses/lgpl.html) # # website - http://www.pilas-engine.com.ar import utils import pilas class Colisiones: "Administra todas las colisiones entre actores." def __i...
irvingprog/pilas
pilas/colisiones.py
Python
lgpl-3.0
4,853
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.31 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. import _ANN import new new_instancemethod = new.instancemethod try: _swig_property = property exc...
EUPSForge/scikits_ann
scikits/ann/ANN.py
Python
lgpl-3.0
2,286
# Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import types from rbnics.utils.decorators import overload def compute_theta_for_stability_factor(compute_theta): from rbnics.problems.elliptic import EllipticCoerciveProblem module...
mathLab/RBniCS
rbnics/backends/dolfin/wrapping/compute_theta_for_stability_factor.py
Python
lgpl-3.0
1,005
""" The hidden tunnel community. Author(s): Egbert Bouman """ import hashlib import logging import os import socket import struct import time from collections import defaultdict from Tribler.Core.DecentralizedTracking.pymdht.core.identifier import Id from Tribler.Core.Utilities.encoding import encode, decode from Tri...
vandenheuvel/tribler
Tribler/community/tunnel/hidden_community.py
Python
lgpl-3.0
38,711
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
haphaeu/yoshimi
C_Extension/SWIG/hello/hello.py
Python
lgpl-3.0
2,229
#! /usr/bin/python import time import zmq from HTMLParser import HTMLParser worker_addr = 'tcp://127.0.0.1:5557' results_addr = 'tcp://127.0.0.1:5558' class FindLinks(HTMLParser): links = [] def __init__(self): HTMLParser.__init__(self) def handle_starttag(self, tag, attrs): at = dict(attrs) if tag == '...
grantmd/BrainSnow
parser.py
Python
unlicense
987
"""Conftest config for pytest.""" import pytest import rsum.loadapps from export.models import ExportDocument from home.models.profile import Profile rsum.loadapps.main() @pytest.fixture(scope="session") def profile(): """Create a profile for testing.""" prof = Profile.create() return prof @pytest.fix...
executive-consultants-of-los-angeles/rsum
rsum/export/tests/conftest.py
Python
unlicense
423
#!/usr/bin/env python # (c) 2013, Jesse Keating <jesse.keating@rackspace.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 ...
sivel/ansible-samples
rax-httpbin/inventory/rax.py
Python
unlicense
9,478
from bitmovin.resources.models import TextFilter from ..rest_service import RestService class Text(RestService): BASE_ENDPOINT_URL = 'encoding/filters/text' def __init__(self, http_client): super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=TextFilter)
bitmovin/bitmovin-python
bitmovin/services/filters/text_filter_service.py
Python
unlicense
307
import os import errno import json import shlex from pathlib import Path def shquote(string): return shlex.quote(string) def to_string(x): if isinstance(x, bytes): return x.decode("utf-8") return x def jsondump(x): j = json.dumps(x, sort_keys=True, indent=4, separators=(",", ": ")) r...
djrobstep/autovenv
autovenv/util.py
Python
unlicense
1,429
# -------------------------------------------------------------------------- # Logic for the 'init' command. # -------------------------------------------------------------------------- import os import sys import shutil from .. import utils # Command help text. helptext = """ Usage: %s init [FLAGS] [ARGUMENTS] ...
dmulholland/ark
malt/cli/init.py
Python
unlicense
1,141
import opencoinage BASE = 'http://opencoinage.org/rdf/' AMOUNT = BASE + 'amount' EXPIRES = BASE + 'expires' IDENTIFIER = BASE + 'identifier' ISSUER = BASE + 'issuer' SIGNATURE = BASE + 'signature' class Vocabulary(object): """An RDFS vocabulary for digital currency issuance.""" pass
opencoinage/opencoinage
src/python/opencoinage/vocabulary.py
Python
unlicense
309
import importlib import json import traceback import time import modular def trackTimeStart(mud, _): if 'honing' in mud.state: skill, counter = mud.state['honing'] mud.send(skill) mud.state['honing'] = (skill, counter + 1) return mud.state['task_start_time'] = time.time() d...
cizra/pycat
coffee.py
Python
unlicense
31,643
from simplesignals.process import WorkerProcessBase from hotqueue import HotQueue from redis.exceptions import ConnectionError from time import sleep, time class HotWorkerBase(WorkerProcessBase): """ Base class for worker processes that handle items from HotQueue Redis queues. """ queue_name = '...
j4mie/hotworker
hotworker.py
Python
unlicense
2,546
import re print("Enter f(x) in (f o g)(x)") e1 = str(raw_input(">>> ")) print("Enter g(x)") e2 = str(raw_input(">>> ")) from math import * import sympy x = sympy.symbols("x") a = sympy.expand(eval(e1.replace("x", "(" + e2 + ")"))) print a
nasonfish/algebra-py
compose.py
Python
unlicense
240
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
skuda/client-python
kubernetes/client/models/v1beta1_replica_set_condition.py
Python
apache-2.0
6,359
# -*- coding: utf-8 -*- # Copyright 2022 Google 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 or...
googleapis/python-deploy
google/cloud/deploy_v1/__init__.py
Python
apache-2.0
3,904
# =============================================================================== # 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...
UManPychron/pychron
pychron/git_archive/repo_manager.py
Python
apache-2.0
38,240
# Importing non-modules that are not used explicitly from .create_backup_strategy import CreateBackupStrategy # noqa
openstack/trove-dashboard
trove_dashboard/content/backup_strategies/workflows/__init__.py
Python
apache-2.0
119
from typing import Optional from plenum.common.constants import DATA from plenum.common.request import Request from plenum.server.database_manager import DatabaseManager from plenum.test.plugin.demo_plugin.constants import AUCTION_START from plenum.test.plugin.demo_plugin.request_handlers.abstract_auction_req_handler ...
evernym/zeno
plenum/test/plugin/demo_plugin/request_handlers/auction_start_handler.py
Python
apache-2.0
791
#!/usr/bin/env python ''' 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")...
arenadata/ambari
ambari-agent/src/main/python/ambari_agent/Register.py
Python
apache-2.0
2,045
from . import astrometry from . import photometry from . import solve from . import sources from . import catalog from . import process from . import pipeline from .process import Process from .sources import SourceTable from .catalog import StarCatalog __all__ = ['astrometry', 'photometry', 'solve', 'sourc...
astrotuvi/pyplate
pyplate/process/__init__.py
Python
apache-2.0
359
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-17 06:58 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
bfrick22/vegaspirates
mysite/polls/migrations/0001_initial.py
Python
apache-2.0
1,230
# @MUNTJAC_COPYRIGHT@ # @MUNTJAC_LICENSE@ """Class for holding information about a mouse click event.""" from muntjac.terminal.gwt.client.mouse_event_details import MouseEventDetails from muntjac.event.component_event_listener import IComponentEventListener from muntjac.ui.component import Event as ComponentEvent c...
rwl/muntjac
muntjac/event/mouse_events.py
Python
apache-2.0
5,824
import os, subprocess, threading def main(): with open("conf.txt") as file: exe = os.path.join(os.getcwd(), "..\\Package\\Google.ProtocolBuffers.2.4.1.555\\tools\\ProtoGen.exe") out = "-output_directory=%s" % (os.path.join(os.getcwd(), "..\\Common\\libs\\protos")) def gen(proto): subprocess.check_call([exe, ...
easily/EasyServer
Protocol/gen.py
Python
apache-2.0
559
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
shahar-stratoscale/nova
nova/tests/virt/libvirt/test_libvirt.py
Python
apache-2.0
400,957
#!/usr/bin/env python # Copyright 2017 Calico 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
calico/basenji
bin/sonnet_sat_vcf.py
Python
apache-2.0
8,142
#! /usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================== # IMPORTS # ============================================================================== import datetime class Base(object): def __init__(self, *a...
alkemics/graphalchemy
graphalchemy/fixture/declarative.py
Python
apache-2.0
2,535
# 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...
precedenceguo/mxnet
tests/python/mkl/test_mkldnn.py
Python
apache-2.0
9,226
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2016 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
titansgroup/python-phonenumbers
python/phonenumbers/geodata/data7.py
Python
apache-2.0
811,011
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manage import models as mmod from . import templater def process_request(request): # Get the Specific category from the url url_request = request.urlparams[0] # Filter al...
brayden2544/Mystuff-final
static_files/catalog/views/category.py
Python
apache-2.0
652
from paypalrestsdk import BillingPlan import logging logging.basicConfig(level=logging.INFO) history = BillingPlan.all({"status": "CREATED", "page_size": 5, "page": 1, "total_required": "yes"}) print(history) print("List BillingPlan:") for plan in history.plans: print(" -> BillingPlan[%s]" % (plan.id))
stafur/pyTRUST
paypal-rest-api-sdk-python/samples/subscription/billing_plans/get_all.py
Python
apache-2.0
311
# Copyright 2020 The TensorFlow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
tensorflow/graphics
tensorflow_graphics/projects/gan/architectures_style_gan_test.py
Python
apache-2.0
3,526
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
google/uncertainty-baselines
uncertainty_baselines/models/rank1_bnn_utils.py
Python
apache-2.0
4,259
from collections import namedtuple from .test_base import CliCommandTest class ListSortTest(CliCommandTest): _resource = namedtuple('Resource', 'name,class_type,sort_order,context') def setUp(self): super(ListSortTest, self).setUp() self.use_manager() self.resources = [ L...
isaac-s/cloudify-cli
cloudify_cli/tests/commands/test_list_sort.py
Python
apache-2.0
3,757
""" .. module: security_monkey.task_scheduler.beat :platform: Unix :synopsis: Sets up the Celery task scheduling for watching, auditing, and reporting changes in the environment. .. version:: $$VERSION$$ .. moduleauthor:: Mike Grima <mgrima@netflix.com> """ import traceback from celery.schedules import crontab...
Netflix/security_monkey
security_monkey/task_scheduler/beat.py
Python
apache-2.0
6,057
from setuptools import setup, find_packages from os import path setup( name='OpenClos', namespace_packages=['jnpr'], # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # http://packaging.python.org/en/latest/tutorial.h...
sysbot/OpenClos
setup.py
Python
apache-2.0
3,687
import logging import time import ray import ray._private.services from ray import ray_constants logger = logging.getLogger(__name__) class Cluster: def __init__(self, initialize_head=False, connect=False, head_node_args=None, shutdown_at_exit=...
pcmoritz/ray-1
python/ray/cluster_utils.py
Python
apache-2.0
9,226
# -*- coding: 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): # Removing unique constraint on 'Question', fields ['simplified_question'] db.delete_unique('questions', ['s...
shh-dlce/pulotu
website/apps/survey/migrations/0050_auto__del_unique_question_simplified_question.py
Python
apache-2.0
13,852
#!/usr/bin/env python import Queue import cStringIO import logging import os.path import time import traceback from PIL import Image from selenium import webdriver from selenium.common import exceptions from selenium.webdriver.common import action_chains import logenv KANCOLLE_URL = 'http://www.dmm.com/netgame/soc...
kcaa/kcaa
server/kcaa/browser.py
Python
apache-2.0
19,316
# Copyright 2016 Pinterest, 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...
pinterest/teletraan
deploy-agent/deployd/common/__init__.py
Python
apache-2.0
640
# 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...
mrkm4ntr/incubator-airflow
airflow/providers/microsoft/azure/hooks/base_azure.py
Python
apache-2.0
2,806
# 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 field 'Item.unusable' db.add_column('Machine_item', 'unusable', self.gf('django.db.models.fields....
abztrakt/labtracker
Machine/migrations/0006_auto__add_field_item_unusable__chg_field_item_mac3__chg_field_item_mac.py
Python
apache-2.0
12,585
"""add metric step Revision ID: 451aebb31d03 Revises: Create Date: 2019-04-22 15:29:24.921354 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "451aebb31d03" down_revision = None branch_labels = None depends_on = None def upgrade(): op.add_column("metrics"...
mlflow/mlflow
mlflow/store/db_migrations/versions/451aebb31d03_add_metric_step.py
Python
apache-2.0
1,201
# -*- coding:utf-8 -*- import csv import MSService import MSMessage import MSSession import MSModule import MSServerLogic import MSItems import math from bson.objectid import ObjectId class MSModuleGameEntrance(MSModule.Module): def __init__(self, network, dbMgr, svrDispatcher, sesTransfer): super(MSModuleGameEntr...
liaow10/MetalStrike
server/MSModuleGameEntrance.py
Python
apache-2.0
30,423
from celery.task import task from celery.log import get_default_logger from celery import group, chain, chord from celeryconfig import config import pyes import urlparse import hashlib import traceback import subprocess import os import copy import pprint log = get_default_logger() conn = pyes.ES( config['e...
navnorth/LR-Data
src/tasks/elasticsearch/save.py
Python
apache-2.0
3,270
# Copyright 2019 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 # # Unless required by applicable law or agreed to in...
Azure/WALinuxAgent
tests/common/osutil/test_suse.py
Python
apache-2.0
1,168
# Copyright 2015 Mirantis 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...
vponomaryov/rally
rally/plugins/openstack/scenarios/manila/utils.py
Python
apache-2.0
13,527
import datetime import pytest from qarnot.status import Status from .mock_status import default_json_status class TestStatusProperties: @pytest.mark.parametrize("property_name, expected_value", [ ("last_update_timestamp", default_json_status["lastUpdateTimestamp"]), ]) def test_create_status_hydr...
qarnot/qarnot-sdk-python
test/test_status.py
Python
apache-2.0
1,610
import pytz import ast import json import urllib import urlparse import datetime as dt from datetime import datetime from time import time from jsonfield import JSONField from django_extensions.db.fields import UUIDField from django.db import models from django.db import transaction from django.conf import settings fro...
Lindy21/CSE498-LRS
lrs/models.py
Python
apache-2.0
39,906
# Copyright 2022 Google # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
quantumlib/ReCirq
recirq/toric_code/optimizers_test.py
Python
apache-2.0
16,503
'''Arsenal client node_group command line helpers. These functions are called directly by args.func() to invoke the appropriate action. They also handle output formatting to the commmand line. ''' # # Copyright 2015 CityGrid Media, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may n...
CityGrid/arsenal
client/arsenalclient/cli/node_group.py
Python
apache-2.0
4,899
#! /usr/bin/env python3 # # Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
google/neural-logic-machines
difflogic/envs/utils.py
Python
apache-2.0
1,895
#!/usr/bin/env python # Copyright 2016 PerfKitBenchmarker 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 # # U...
GoogleCloudPlatform/PerfKitBenchmarker
tools/zip/zip.py
Python
apache-2.0
1,536
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
tensorflow/probability
spinoffs/fun_mc/fun_mc/test_util.py
Python
apache-2.0
4,192
import sys import xbmcgui import xbmcplugin import xbmcaddon import urlparse import xbmc import bmctv import urllib2 try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer("plugin.video.bmctv", 24) plugin_url = sys.argv[0] addon_handle = int(sys.argv[1...
planetmarshall/bmctv_addon
bmctv_main.py
Python
apache-2.0
2,892
"""TcEx Error Codes""" class TcExErrorCodes: """TcEx Framework Error Codes.""" @property def errors(self): """Return TcEx defined error codes and messages. .. note:: RuntimeErrors with a code of >= 10000 are considered critical. Those < 10000 are considered warning or errors...
kstilwell/tcex
tcex/tcex_error_codes.py
Python
apache-2.0
4,240
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
epam/DLab
infrastructure-provisioning/src/general/api/terminate.py
Python
apache-2.0
2,363
#!/usr/bin/env python3 import os, sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cavedb.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
masneyb/cavedbmanager
manage.py
Python
apache-2.0
244
# Copyright (c) 2013 Noa Resare # # 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....
nresare/runasdaemon
setup.py
Python
apache-2.0
1,102
# todo: ABC of api from strands import ArchStrand class HopArch(object): def __init__(self, display, strand_count): self.__display = display self.__strand_count = strand_count x = 0 y = 0 z = 0 strands = [] p = 38 for s in range(0, strand_count): ...
stuart-stanley/stormlight-archive
src/arrangements/hop_arch.py
Python
apache-2.0
540
#!/usr/bin/env python3 # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel 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...
intelxed/xed
pysrc/enc2gen.py
Python
apache-2.0
194,883
#!/usrbin/python #encoding:utf-8 ''' Author: wangxu Email: wangxu@oneniceapp.com 任务更新 ''' import sys reload(sys) sys.setdefaultencoding("utf-8") import logging import tornado.web import json import os CURRENTPATH = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(CURRENTPATH, '../../')) f...
cocofree/azkaban_assistant
schedule/webapp/handler/job_check_exist.py
Python
apache-2.0
868
############################################################################ # Copyright 2017 Albin Severinson # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may no...
severinson/pyrateless
pyrateless/coding/stats.py
Python
apache-2.0
7,334