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
""" A SAX driver for xmlproc $Id: drv_xmlproc.py,v 1.9 1999/10/15 07:55:33 larsga Exp $ """ version="0.95" from xml.sax import saxlib,saxutils,saxmisc from xml.parsers.xmlproc import xmlproc import os pre_parse_properties={"http://xml.org/sax/properties/namespace-sep":1, "http:/...
fxia22/ASM_xf
PythonD/bin/python/drv_xmlproc.py
Python
gpl-2.0
11,377
#!/usr/bin/env python from Quantum import * import random class myBot(): """ rotate-cipher bot """ def __init__(self): self.name = "Rotate Cipher Bot" # initialise any persistent data structures (if needed) def do_setup(self, game): self.delta = 26 - game.number_of_words self.turn = game.turn def do_...
SouravJaiswal/saber
bots/bot3.py
Python
gpl-2.0
806
from autotest.client.virt import virt_test class kvm(virt_test.virt_test): """ Suite of KVM virtualization functional tests. Contains tests for testing both KVM kernel code and userspace code. @copyright: Red Hat 2008-2009 @author: Uri Lublin (uril@redhat.com) @author: Dror Russo (drusso@redh...
nacc/autotest
client/tests/kvm/kvm.py
Python
gpl-2.0
663
import hashlib import struct class DNSparam: """Class to encapsulate some DNS parameter types (type, class etc)""" def __init__(self, prefix, name2val): self.name2val = name2val self.val2name = dict([(y,x) for (x,y) in name2val.items()]) self.prefix = prefix self.prefix_offset...
thomasleveil/pydig
pydiglib/dnsparam.py
Python
gpl-2.0
3,623
""" Test the pulp.server.db.manage module. """ from argparse import Namespace from cStringIO import StringIO import os from mock import call, inPy3k, MagicMock, patch from mongoengine.queryset import DoesNotExist from ... import base from pulp.common.compat import all, json from pulp.server.db import manage from pulp...
ulif/pulp
server/test/unit/server/db/test_manage.py
Python
gpl-2.0
40,647
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire X # # Copyright (C) 2006 Sami Kyöstilä ...
Linkid/fofix
fofix/game/Lobby.py
Python
gpl-2.0
37,782
import nest import numpy as np nest.ResetKernel() nest.SetKernelStatus({'overwrite_files': True, 'local_num_threads': 4, 'resolution': 0.1}) number_of_neuron = 18567530 DEFAULT = 10 raphenucleus = ( ) lateralcortex_5HT_NN = int(1000 / 18567530 * number_of_neuron) if lateralcortex_5HT_NN < DEFAULT : lateralcortex_5...
vitaliykomarov/NEUCOGAR
nest/code_generator/run/generated/data.py
Python
gpl-2.0
11,367
""" Responsible for selecting candidates. """ #!/usr/bin/env python def get_surroundings(follow, followed, nodes): """ Gets all followers and followees of a given sets of nodes. """ followers_and_followees = set() for node in nodes: followers_and_followees.update(follow[node]) followers_a...
bharcode/MachineLearning
FacebookMissingLinks/candidate.py
Python
gpl-2.0
1,009
#!/usr/bin/python -O # # /usr/sbin/webapp-config # Python script for managing the deployment of web-based # applications # # Originally written for the Gentoo Linux distribution # # Copyright (c) 1999-2007 Authors # Released under v2 of the GNU GPL # # Author(s) Stuart Herbert # ...
gentoo/webapp-config
WebappConfig/ebuild.py
Python
gpl-2.0
6,937
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
argivaitv/argivaitv
repo/plugin.video.phstreams/resources/lib/resolvers/videowood.py
Python
gpl-2.0
1,483
import re import os import logging import tarfile from autotest.client.shared import utils, error from virttest import data_dir, utils_test def test_tar_in(vm, params): """ 1) Fall into guestfish session w/ inspector 2) Write a tempfile on host 3) Copy file to guest with tar-in 4) Delete created f...
spiceqa/virt-test
libguestfs/tests/guestfs_file_operations.py
Python
gpl-2.0
7,575
#-*- coding:utf-8 -*- import re from miasm2.expression.expression import * from pyparsing import * from miasm2.core.cpu import * from collections import defaultdict import miasm2.arch.x86.regs as regs_module from miasm2.arch.x86.regs import * from miasm2.core.asmblock import AsmLabel log = logging.getLogger("x86_arch...
stephengroat/miasm
miasm2/arch/x86/arch.py
Python
gpl-2.0
136,563
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from dateutil.relativedelta import relativedelta from odoo.exceptions import AccessError, ValidationError from odoo.tools import mute_logger, test_reports from odoo.addons.hr_holidays.tests...
ayepezv/GAD_ERP
addons/hr_holidays/tests/test_holidays_flow.py
Python
gpl-3.0
11,913
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This file is part of MoaT, the Master of all Things. ## ## MoaT is Copyright © 2007-2016 by Matthias Urlichs <matthias@urlichs.de>, ## it is licensed under the GPLv3. See the file `README.rst` for details...
smurfix/MoaT
modules/wago.py
Python
gpl-3.0
25,482
../../../../../share/pyshared/checkbox/lib/log.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/checkbox/lib/log.py
Python
gpl-3.0
49
"""Utilities to manipulate hosts via UI.""" from robottelo.ui.base import Base from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Hosts(Base): """Provides the CRUD functionality for Host.""" def navigate_to_entity(self): """Nav...
ares/robottelo
robottelo/ui/hosts.py
Python
gpl-3.0
16,646
#!/usr/bin/env python # -*- coding: utf-8 -*- """Classes for signals to be sent upon voice-key trip events. """ from __future__ import absolute_import, print_function import threading class _BaseVoiceKeySignal(threading.Thread): """Class to support sending a signal upon detection of an event. Non-blocking...
psychopy/versions
psychopy/voicekey/signal.py
Python
gpl-3.0
1,069
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <steve.english@navetas.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
b0ttl3z/SickRage
lib/github/Organization.py
Python
gpl-3.0
29,379
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para megadrive # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # by DrZ3r0 # ------------------------------------------------------------ import re from core import logger from core...
orione7/Italorione
servers/megadrive.py
Python
gpl-3.0
1,956
import os import stat from io import open from shutil import SpecialFileError, _samefile try: from shutil import SameFileError except ImportError: from shutil import Error as SameFileError BUFFER_SIZE = 1024 * 1024 if os.name == 'nt' else 16 * 1024 def copyfile_custom(src, dst): """Copy data from src to...
pymedusa/Medusa
lib/shutil_custom/__init__.py
Python
gpl-3.0
963
# noinspection PyPackageRequirements import wx # noinspection PyPackageRequirements from wx.lib.buttons import GenBitmapButton import gui.builtinMarketBrowser.pfSearchBox as SBox import gui.display as d from gui.bitmap_loader import BitmapLoader from gui.marketBrowser import SearchBox from service.market import Market...
blitzmann/Pyfa
gui/builtinViews/implantEditor.py
Python
gpl-3.0
9,701
from app.users.models import * from datetime import datetime def create_client(client_IP, containers): pass def add_container(client_IP, container_id): pass def purge_container(client_IP, container_id): # if user modified the config on the fly # then remove one of the containers and # update this o...
arcolife/dockerComp
src/server/app/controller.py
Python
gpl-3.0
555
#!/usr/bin/env python3 # # Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center # Distributed under the terms of the 3-clause BSD License. import os import getpass import subprocess import pytest from sos import execute_workflow from sos._version import __version__ from sos.utils import env, loa...
BoPeng/SOS
test/test_config.py
Python
gpl-3.0
5,574
from __future__ import print_function # THIS IS A TEST import cPickle as pickle # import pickle class Param(object): """ Class that allows you to store values when training and retrieve values when testing as either a function result, or a value. """ class ParamStore(object): def __init__(s...
diogo149/CauseEffectPairsChallenge
code/param.py
Python
gpl-3.0
2,724
#!/usr/bin/env python """ Send message to '#gis.lab' IRC chat room. Requires to run script 'utils/join-gislab-network.py' first to get connection with server. USAGE: send-message.py <message> """ import os, sys import re import socket try: message = sys.argv[1] except IndexError: print __doc__ sys.exit(0...
imincik/gis-lab
utils/send-message.py
Python
gpl-3.0
1,440
#!/usr/bin/env python import os import sys import gzip import tempfile from src.version import VERSION from distutils.core import setup def getResources(dst, sourceDir): """ Provides a list of tuples of the form... [(destination, (file1, file2...)), ...] for the given contents of the src directory (that's r...
refnode/arm
setup.py
Python
gpl-3.0
4,358
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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...
robocomp/robocomp
tools/rcmonitor/examples/pyramidRoiRGB.py
Python
gpl-3.0
2,369
# -*- encoding: utf-8 -*- """Test class for installer (UI)""" from robottelo.common.decorators import stubbed from robottelo.test import UITestCase class TestSSOUI(UITestCase): # Notes for SSO testing: # Of interest... In some test cases I've placed a few comments prefaced # with "devnote:" These are -- ...
apagac/robottelo
tests/foreman/ui/test_sso.py
Python
gpl-3.0
10,139
from couchpotato.core.downloaders.base import Downloader from couchpotato.core.helpers.encoding import isInt from couchpotato.core.logger import CPLog import httplib import json import urllib import urllib2 log = CPLog(__name__) class Synology(Downloader): type = ['torrent_magnet'] log = CPLog(__name__) ...
jayme-github/CouchPotatoServer
couchpotato/core/downloaders/synology/main.py
Python
gpl-3.0
3,961
''' Given: A positive integer N≤100000, a number x between 0 and 1, and a DNA string s of length at most 10 bp. Return: The probability that if N random DNA strings having the same length as s are constructed with GC-content x (see “Introduction to Random Strings”), then at least one of the strings equals s. We allo...
jr55662003/My_Rosalind_solution
RSTR.py
Python
gpl-3.0
1,176
import unittest import numpy as np str_nobond = """AU 3 1 2 1 1 0.00000000 0.00000000 0.00000000 -0.66387672 0.00000000 -0.00000000 0.34509720 3.78326969 -0.00000000 -0.00000000 3.96610412 0.00000000 3.52668267 0.00000000 -0.00000000 -2.98430053 0.00000000 ...
fishstamp82/loprop
test/test_bond.py
Python
gpl-3.0
5,042
def testcodec( txt, destination="utf_8" ): "Testet blind alle Codecs mit encode und decode" codecs = ['ascii', 'big5', 'big5hkscs', 'cp037', 'cp424', 'cp437', 'cp500', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp860', 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', '...
CuonDeveloper/cuon
cuon_client/cuon_newclient/bin/cuon/AI/testcodec.py
Python
gpl-3.0
1,790
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'_seqmapping.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/bx/_seqmapping.py
Python
gpl-3.0
281
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: ts=4:sw=4:sts=4:ai:et:fileencoding=utf-8:number import sys if sys.version_info < (3, 0): python_OldVersion = True else: python_OldVersion = False import pprint from sqlalchemy import Column, ForeignKey, Integer, String, Boolean, Table, or_, CHAR, Enum ...
jiquintana/proxy-final
db_model/db_layer.py
Python
gpl-3.0
30,743
# -*- coding: UTF-8 -*- from django.db.models.signals import post_save from django.core.mail import send_mail from django.template.loader import render_to_string from django.dispatch import receiver from matricula.models import Enroll from .models import Bill from django.utils.translation import ugettext_lazy as _ from...
luisza/academica
matricula/contrib/bills/signals.py
Python
gpl-3.0
2,438
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import csv import xlrd from optparse import OptionParser def xls2csv(infilepath, outfile, sheetid=1, delimiter=",", sheetdelimiter="--------", encoding="cp1251"): writer = csv.writer(outfile, dialect='excel', quoting=csv.QUOTE_ALL, delimiter=delimiter) ...
rpelizzi/websheets
app/xls2csv.py
Python
gpl-3.0
7,056
# -*- encoding: utf-8 -*- """Test class for Domain CLI :Requirement: Domain :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_string from robottelo.cli.base import CLIReturnCodeError from robottelo.cli....
ares/robottelo
tests/foreman/cli/test_domain.py
Python
gpl-3.0
11,616
# python wc_mapfinal.py local -l wc_mapfinal.py --output=wc_out.dat # from the command line, does wordcount on itself import re, job, sys WORD_RE = re.compile(r"[\w']+") class WordFreqCount(job.SashaJob): def __init__(self): job.SashaJob.__init__(self) self.psum = 0 def mapper(se...
burakbayramli/classnotes
work/mrsvd/sasha/wc_mapfinal.py
Python
gpl-3.0
737
# # This file is part of pysmi software. # # Copyright (c) 2015-2016, Ilya Etingof <ilya@glas.net> # License: http://pysmi.sf.net/license.html # import os import sys import time from pysmi.reader.base import AbstractReader from pysmi.mibinfo import MibInfo from pysmi.compat import decode from pysmi import debug from py...
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/pysmi/reader/localfile.py
Python
gpl-3.0
4,425
#!/usr/bin/env python3 import locale import os import sys try: # suppress warnings from GI import gi gi.require_version('Gtk', '3.0') gi.require_version('Poppler', '0.18') gi.require_version('PangoCairo', '1.0') except: pass try: from gi.repository import GLib from gi.repository impor...
Starch/paperwork
src/paperwork/deps.py
Python
gpl-3.0
7,285
import os import tempfile import sys import shutil import pyfastaq from circlator import common, external_progs class Error (Exception): pass class Assembler: def __init__(self, reads, outdir, threads=1, spades_kmers=None, careful=True, only_assembler=True, verbose=False,...
sanger-pathogens/circlator
circlator/assemble.py
Python
gpl-3.0
6,316
# Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
bgris/ODL_bgris
odl/test/largescale/tomo/analytic_slow_test.py
Python
gpl-3.0
7,939
""" Copyright 2019 Glen Harmon RPSL Common Attributes https://www.ripe.net/manage-ips-and-asns/db/support/documentation/ripe-database-documentation/rpsl-object-types/4-1-description-of-attributes-common-to-all-objects """ class Rpsl: def __init__(self): self.organisation = list() self.admin_con...
heyglen/sublime-network
lib/iana/ripe/objects/rpsl.py
Python
gpl-3.0
2,010
""" Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
phillxnet/rockstor-core
src/rockstor/cli/iscsi_console.py
Python
gpl-3.0
1,794
langs = [ "ca", "cs", "cy", "da", "de", "en-US", "es", "es-CL", "et", "eu", "fr", "fy", "he", "hu", "id", "it", "ja", "ko", "lt", ...
karlht/services-tools
fxa-l10n/genContentPages.py
Python
mpl-2.0
752
def has_valid_explicit_days(func): def wrapper(*args, **kwargs): days = kwargs.get('days') if days is not None: raise ValueError('Cannot override performance data retention parameters.') func(*args, **kwargs) return wrapper
jmaher/treeherder
treeherder/model/data_cycling/utils.py
Python
mpl-2.0
269
# # Paasmaker - Platform as a Service # # 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 uuid import os import re import paasmaker import tornado import torna...
kaze/paasmaker
paasmaker/pacemaker/scm/base.py
Python
mpl-2.0
4,827
#! /usr/bin/env python # -*- coding: utf-8 -*- # ZADANIE: wykonaj wykres funkcji f(x), gdzie x = <-10;10> z krokiem 0.5 # f(x) = x/-3 + a dla x <= 0 # f(x) = x*x/3 dla x >= 0 import pylab x = pylab.arange(-10, 10.5, 0.5) # lista argumentów x a = int(raw_input("Podaj współczynnik a: ")) y1 = [i / -3 + a for i in x i...
koduj-z-klasa/pylab
zadania/fun2_z04.py
Python
agpl-3.0
517
from django.db import models from django.utils.timezone import now from iati.models import Activity # Networks should be based upon orgs in the org standard # class Network(models.Model): # class NetworkLink(models.Model): # class NetworkError(models.Model): # class NetworkOrganisation(models.Model): class Chai...
openaid-IATI/OIPA
OIPA/traceability/models.py
Python
agpl-3.0
3,823
# -*- coding: utf-8 -*- ''' (c) Copyright 2013 Telefonica, I+D. Printed in Spain (Europe). All Rights Reserved. The copyright to the software program(s) is property of Telefonica I+D. The program(s) may be used and or copied only with the express written consent of Telefonica I+D or in accordance with the terms...
hilgroth/fiware-IoTAgent-Cplusplus
tests/e2e_tests/common/gw_configuration.py
Python
agpl-3.0
1,230
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import nowdate, cstr, flt, now, getdate, add_months from frappe import throw, _ from frappe.utils import formatdate imp...
gmarke/erpnext
erpnext/accounts/utils.py
Python
agpl-3.0
16,635
# Copyright 2015, Province of British Columbia # License: https://github.com/bcgov/ckanext-bcgov/blob/master/license from ckan.common import c, _ import pylons.config as config import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from routes.mapper import SubMapper from ckanext.bcgov.util.util im...
wardi/ckanext-bcgov
ckanext/bcgov/plugin.py
Python
agpl-3.0
17,626
from bears.c_languages.CPPLintBear import CPPLintBear from tests.LocalBearTestHelper import verify_local_bear test_file = """ int main() { return 0; } """ CPPLintBearTest = verify_local_bear(CPPLintBear, valid_files=(), invalid_files=(test_fi...
sounak98/coala-bears
tests/c_languages/CPPLintBearTest.py
Python
agpl-3.0
843
# -*- coding: utf-8 -*- """ This files tests the performance of the test runner of openfisca-run-test on a subset of YAML tests. It is placed in openfisca-france because it is the largest set we currently have. Usage example: python openfisca_france/scripts/performance/measure_tests_performance.py """ import os...
antoinearnoud/openfisca-france
openfisca_france/scripts/performance/measure_tests_performance.py
Python
agpl-3.0
1,894
from django import template register = template.Library() def easy_tag(func): """Decorator to facilitate template tag creation""" def inner(parser, token): """deal with the repetitive parts of parsing template tags""" try: return func(*token.split_contents()) except TypeErr...
Turupawn/website
games/templatetags/append_to_get.py
Python
agpl-3.0
1,303
# # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated 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 option) any later version. # # Pixelated is distrib...
pixelated/pixelated-user-agent
service/pixelated/adapter/services/draft_service.py
Python
agpl-3.0
1,456
import pytest from dotenv import load_dotenv from flask_testing import TestCase if __name__ == '__main__' and __package__ is None: load_dotenv() from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from call_server.app import create_app, db from call_server.config ...
OpenSourceActivismTech/call-power
tests/run.py
Python
agpl-3.0
684
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Deltatech All Rights Reserved # Dorin Hongu <dhongu(@)gmail(.)com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
yoyo2k/l10n-romania
l10n_ro_invoice_report/__init__.py
Python
agpl-3.0
1,102
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-11-26 15:15 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0098_blank_annotation'), ] operations = [...
Linaro/squad
squad/core/migrations/0099_metricthreshold.py
Python
agpl-3.0
995
import json import logging from lxml.html.clean import Cleaner, autolink_html import re import open_ended_image_submission from xmodule.progress import Progress import capa.xqueue_interface as xqueue_interface from capa.util import * from .peer_grading_service import PeerGradingService, MockPeerGradingService import c...
PepperPD/edx-pepper-platform
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
Python
agpl-3.0
26,802
""" WSGI config for polychart project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
Polychart/builder
server/polychart/wsgi.py
Python
agpl-3.0
1,058
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA 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 op...
PyBossa/pybossa
pybossa/flickr_client.py
Python
agpl-3.0
2,464
# This file is part of Shuup. # # Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import pytest from decimal import Decimal from django.test import override_settings from ...
shoopio/shoop
shuup_tests/campaigns/test_multiple_campaigns.py
Python
agpl-3.0
4,185
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
camptocamp/ngo-addons-backport
addons/account/account.py
Python
agpl-3.0
191,194
#!/usr/bin/python """Test of label presentation.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(KeyComboAction("<Control>f")) sequence.append(TypeAction("Dialog and Message Boxes")) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(3000)) sequence.app...
pvagner/orca
test/keystrokes/gtk3-demo/role_label.py
Python
lgpl-2.1
6,801
from io import BytesIO, UnsupportedOperation import os import pickle import random import unittest from test.support import ( _4G, TESTFN, import_module, bigmemtest, run_unittest, unlink ) lzma = import_module("lzma") from lzma import LZMACompressor, LZMADecompressor, LZMAError, LZMAFile class Com...
Orav/kbengine
kbe/src/lib/python/Lib/test/test_lzma.py
Python
lgpl-3.0
74,237
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() mobi...
agry/NGECore2
scripts/mobiles/tatooine/bantha_matriarch.py
Python
lgpl-3.0
1,676
import sys def setup(core, object): object.setAttachment('radial_filename', 'ring/unity') object.setAttachment('objType', 'ring') object.setStfFilename('static_item_n') object.setStfName('item_ring_set_commando_dps_01_01') object.setDetailFilename('static_item_d') object.setDetailName('item_ring_set_commando_dps...
ProjectSWGCore/NGECore2
scripts/object/tangible/wearables/ring/item_ring_set_commando_dps_01_01.py
Python
lgpl-3.0
1,070
from distutils.core import setup setup(name='OPAL - OPtimization of ALgorithm', version='1.3', description='Algorithmic Parameter Optimization', author='Charles Audet, Cong-Kien Dang, Dominique Orban', author_email='cong-kien.dang@polymtl.ca', url='http://www.gerad.ca/~kiendc/build/hmtl',...
dpo/opal
setup.py
Python
lgpl-3.0
495
''' WeakMethod: implementation of weakref for function and bounded method. This class is used in Clock class, to prevent the clock of taking memory if the object is deleted. Check examples/core/clock_method.py for more informations. This WeakMethod class is taken from the recipe http://code.activestate.com/recipes/81...
nuigroup/pymt-widgets
pymt/weakmethod.py
Python
lgpl-3.0
1,945
from __future__ import division from __future__ import print_function from datetime import datetime import sys, string, os import logging sys.path.insert(0, "/home/lom/users/cll/pytroll/install/lib/python2.6/site-packages") from mpop.satellites import GeostationaryFactory from mpop.projector import get_area_def from m...
meteoswiss-mdr/monti-pytroll
scripts/plot_hrw.py
Python
lgpl-3.0
12,338
# # 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 us...
cin/spark
python/pyspark/sql/readwriter.py
Python
apache-2.0
49,040
# scripts can set this to True before lrrbot.main is imported, if they want to # be able to call utility functions without actually creating the bot object FRAMEWORK_ONLY = False
mrphlip/lrrbot
common/__init__.py
Python
apache-2.0
179
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket 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 applica...
illicitonion/synapse
synapse/handlers/events.py
Python
apache-2.0
5,220
from PySide2.QtGui import * from PySide2.QtCore import * from PySide2.QtWidgets import * class HR(QFrame): def __init__(self, parent = None): """ Builds a horizontal line for uis to use""" QFrame.__init__(self, parent) self.setFrameShape(QFrame.HLine) self.setFrameShadow(QFrame.S...
jamesbdunlop/Nebula
nebula_ui/nCoreui/hr.py
Python
apache-2.0
327
''' Input : n=1 Output: {} Input : n=2 Output: {}{} {{}} https://www.geeksforgeeks.org/print-all-combinations-of-balanced-parentheses/ ''' def printParenthesis(string, openP, closeP): if(openP==0 and closeP==0): # all opening and closing are done print string else: if(openP>closeP): ...
saurabhkumar1989/programming_question_python
my_question/all-valid-bracket-permutation.py
Python
apache-2.0
545
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.utils.typechecks import assert_is_type from random import randrange import numpy as np def h2o_H2OFrame_levels(): """ Python API test: h2o.frame.H2OFrame.levels() """ pyth...
h2oai/h2o-3
h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_levels.py
Python
apache-2.0
683
#!/usr/bin/env python # we're using python 3.x style print but want it to work in python 2.x, from __future__ import print_function import re, os, argparse, sys, math, warnings from collections import defaultdict try: # since gzip will only be needed if there are gzipped files, accept import gzip # ...
keli78/pocolm
scripts/get_word_counts.py
Python
apache-2.0
3,255
#!/usr/bin/python # Compresses the core Blockly files into a single JavaScript file. # # Copyright 2012 Google Inc. # http://blockly.googlecode.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
sernaleon/charlie
Others/BlocklyProbatinas/hello/www/build.py
Python
apache-2.0
14,864
# 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 (t...
apache/allura
Allura/allura/lib/utils.py
Python
apache-2.0
27,100
# Copyright 2012 VMware, 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 ...
alexandrucoman/vbox-neutron-agent
neutron/tests/unit/plugins/openvswitch/test_ovs_tunnel.py
Python
apache-2.0
28,505
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
artwr/airflow
airflow/contrib/operators/gcs_operator.py
Python
apache-2.0
5,140
"""Twilio Call platform for notify component.""" import logging import urllib import voluptuous as vol from homeassistant.components.twilio import DATA_TWILIO import homeassistant.helpers.config_validation as cv from homeassistant.components.notify import ( ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationS...
fbradyirl/home-assistant
homeassistant/components/twilio_call/notify.py
Python
apache-2.0
1,891
from __future__ import absolute_import, unicode_literals from mopidy.core import PlaybackState from mopidy.internal import deprecation from mopidy.mpd import exceptions, protocol @protocol.commands.add('consume', state=protocol.BOOL) def consume(context, state): """ *musicpd.org, playback section:* ...
ali/mopidy
mopidy/mpd/protocol/playback.py
Python
apache-2.0
13,957
# Copyright (c) 2013 Intel, Inc. # Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
openstack/nova
nova/tests/unit/pci/test_utils.py
Python
apache-2.0
15,220
# Copyright 2013 Google Inc. All Rights Reserved. """Sets the password of the MySQL root user.""" from googlecloudsdk.calliope import base from googlecloudsdk.core import log from googlecloudsdk.core import remote_completion from googlecloudsdk.sql import util @base.ReleaseTracks(base.ReleaseTrack.GA) class SetRoot...
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/sql/tools/instances/set_root_password.py
Python
apache-2.0
4,026
""" # Name: cms/admin.py # Description: # Created by: Phuc Le-Sanh # Date Created: N.A # Last Modified: Nov 21 2016 # Modified by: Phuc Le-Sanh """ from django.contrib import admin from django.contrib.admin import ModelAdmin from apiv2.models import * class QuestionAdmin(ModelAdmin): fields ...
deka108/mathqa-server
cms/admin.py
Python
apache-2.0
1,772
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License...
termie/nova-migration-demo
nova/api/openstack/extensions.py
Python
apache-2.0
15,632
""" Utilities for validating inputs to user-facing API functions. """ from textwrap import dedent from types import CodeType from functools import wraps from inspect import getargspec from uuid import uuid4 from toolz.curried.operator import getitem from six import viewkeys, exec_, PY3 _code_argorder = ( ('co_ar...
bartosh/zipline
zipline/utils/preprocess.py
Python
apache-2.0
7,205
from a10sdk.common.A10BaseClass import A10BaseClass class DeviceGroup(A10BaseClass): """Class Description:: configure scaleout device groups. Class device-group supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param devi...
amwelch/a10sdk-python
a10sdk/core/acos/acos_scaleout_cluster_config_device_groups_device_group.py
Python
apache-2.0
1,370
""" Support for Tahoma sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.tahoma/ """ import logging from datetime import timedelta from homeassistant.helpers.entity import Entity from homeassistant.components.sensor import ENTITY_ID_FORMAT...
ewandor/home-assistant
homeassistant/components/sensor/tahoma.py
Python
apache-2.0
1,957
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import os from benchexec.tools.sv_benchmarks_util import get_data_model_from_task, ILP32, ...
sosy-lab/benchexec
benchexec/tools/esbmc.py
Python
apache-2.0
2,560
import os import subprocess import yaml from django.views.generic import View from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.core.urlresolvers import reverse from django.core import serializers from django.conf import settings from django.template.loader i...
Havate/havate-openstack
proto-build/gui/horizon/openstack-dashboard/config/views.py
Python
apache-2.0
15,052
# Copyright 2015 datawire. 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 agr...
bozzzzo/quark
quarkc/test/test_parse.py
Python
apache-2.0
1,856
# =============================================================================== # 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/pipeline/plot/editors/isochron_editor.py
Python
apache-2.0
3,053
# Copyright 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 or agr...
usc-isi/extra-specs
nova/db/sqlalchemy/migrate_repo/versions/097_quota_usages_reservations.py
Python
apache-2.0
4,073
import pymysql class DBResult: ''' database return result object ''' # execute success or fail suc = False # execute result, usually is querry set, is a list nesting dict structure result = None # error information error = None # effect row number rows = None def in...
tongxindao/shiyanlou
shiyanlou_cs885/pyflk/dbconnector/__init__.py
Python
apache-2.0
5,573
""" Support for Lutron lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.lutron/ """ import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light) from homeassistant.components.lutron import ( ...
PetePriority/home-assistant
homeassistant/components/lutron/light.py
Python
apache-2.0
2,793
from collections import Counter import numpy as np def run(word_gen, index, window_size, out_file): context = [] pair_counts = Counter() for word in word_gen: context.append(index[word]) if len(context) > window_size * 2 + 1: context.pop(0) pair_counts = _process_context...
williamleif/histwords
representations/cooccurgen.py
Python
apache-2.0
944
# pylint: disable-msg=W0232 # Copyright 2008 German Aerospace Center (DLR) # # 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 # # Unle...
DLR-SC/RepoGuard
src/repoguard/handlers/hudson.py
Python
apache-2.0
1,478