src
stringlengths
721
1.04M
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
## # Copyright 2009-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
#!/usr/bin/python3 # -*- coding: utf-8 -*- class DataTypes: @staticmethod def char(num_chars) -> str: return f'CHAR({num_chars})' @staticmethod def varchar(num_chars=None) -> str: if num_chars: return f'VARCHAR({num_chars})' else: return 'VARCHAR' ...
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # Copyright (C) 2013-2014 Zuher ELMAS. All Rights Reserved # # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
import re from lnst.Common.Parameters import IntParam from lnst.Controller.Recipe import RecipeError from lnst.Controller.RecipeResults import ResultLevel from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import BaseHWConfigMixin class DevInterruptHWConfigMixin(BaseHWConfigMixin): """ This class is an ex...
try: import queue except ImportError: import Queue as queue # fallback for Python 2.x import time import traceback import testvibe.api_controller as api_controller import testvibe.core.utils as utils import testvibe.asserts as asserts import testvibe.logger as logger try: import settings except ImportEr...
# Generated by Django 2.2.6 on 2020-03-02 00:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0037_positionpaper_graded_file'), ] operations = [ migrations.AddField( model_name='com...
#===--- stock.py - OpenSim Stock widget -----------------===# # # Copyright 2008 Bobby Powers # # This file is part of OpenSim. # # OpenSim 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 ...
'''Tests for the ckan.lib.email_notifications module. Note that email_notifications is used by an action function, so most of the tests for the module are done by testing the action function in ckan.test.functional.api. This test module contains some additional unit tests. ''' import datetime import nose.tools impo...
from bs4 import BeautifulSoup import helper from datetime import datetime import click import time import calendar #Example values #START_DATE = datetime(2014, 05, 15) #END_DATE = datetime(2015, 05, 15) #DAY_DELTA = 7 #TIMEOUT_SECONDS = 30 #Example Command #python Scraper.py 2014/05/25 2015/05/15 4 0 YYZ POS @click....
# Copyright 2016 United States Government as represented by the Administrator # of the National Aeronautics and Space Administration. All Rights Reserved. # # Portion of this code is Copyright Geoscience Australia, Licensed under the # Apache License, Version 2.0 (the "License"); you may not use this file # except in c...
# This Python file uses the following encoding: utf-8 # coding: utf-8 import sys # Print iterations progress def printProgress (iteration, total, prefix = '', suffix = '', decimals = 1, barLength = 20): """ Call in a loop to create terminal progress bar @params: iteration - Required : current i...
# coding: utf8 from __future__ import unicode_literals, division, print_function import json from pathlib import Path from ..scorer import Scorer from ..tagger import Tagger from ..syntax.parser import Parser from ..gold import GoldParse, merge_sents from ..gold import read_json_file as read_gold_json from .. import ...
# vim:ts=4:sts=4:sw=4:et import logging from satori.client.common import want_import want_import(globals(), '*') from satori.tools import catch_exceptions, options, setup from satori.tools.params import parser_from_xml from satori.tools.problems.common import copy_file from satori.tools.problems.download_problem imp...
import logging from cim.common import LoggingObject from cim import CIM from cim import is_index_page_number_valid logging.basicConfig(level=logging.DEBUG) g_logger = logging.getLogger("cim.printer") class Printer(LoggingObject): def __init__(self, cim): super(Printer, self).__init__() self._cim...
''' TO DO: - Further abstract states (maybe find some way of removing reliance on indices) - Add comments to provide full information on code - Create unit tests for script (view with mixin, view w/out mixin with decorators, no mixin no decorators) ''' import os import re import sys from os.pa...
import MDAnalysis try: from MDAnalysisTests.datafiles import TPR, XTC except: pass try: from MDAnalysis.analysis.rdf import InterRDF except: pass class SimpleRdfBench(object): """Benchmarks for MDAnalysis.analysis.rdf """ params = ([20,75,200], [[0,5], [0,15], [0,20]], ...
#!/usr/bin/env python3 """ This test script verifies that the random ordering of tests inside Catch2 is invariant in regards to subsetting. This is done by running the binary 3 times, once with all tests selected, and twice with smaller subsets of tests selected, and verifying that the selected tests are in the same r...
import applications.users as users import applications.graphs as graphs from graphspace.exceptions import UserNotAuthorized from graphspace.utils import get_request_user class UserRole: ADMIN = 3 LOGGED_IN = 2 LOGGED_OFF = 1 # When user is not logged in to GraphSpace. def user_role(request): """ Returns the us...
# This can be used to push raw transaction (in hex) to a crypto network # # USAGE: # python pushtx.py <crypto> <number of peers to send tx to> <transaction1 in hex> <transaction2 in hex> ... # import sys import socket import cryptoconfig import peersockets def pushtx(crypto,num_peers_to_send,tx_list): if crypto ...
#!/usr/bin/env python # apps.py # # Copyright (C) 2014, 2015 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 # import os from kano.utils import read_json, write_json, get_date_now, ensure_dir, \ chown_path, run_print_output_error from kano.logging import logge...
import sys import scipy.io as scpy import numpy as np import msgpack from file_methods import * #Python Script to read Eye Data, extract desired information and then create a .mat structure where rows are times, columns are: # 1. timestamp # 2. gaze x # 3. gaze y # 4. confidence #input: #...
# -*- coding: utf-8 -*- # pyswip -- Python SWI-Prolog bridge # Copyright (c) 2007-2012 Yüce Tekol # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without ...
from kvmagent import kvmagent from zstacklib.utils import jsonobject from zstacklib.utils import http from zstacklib.utils import log from zstacklib.utils import shell from zstacklib.utils import linux from zstacklib.utils import lvm from zstacklib.utils import thread import os.path import time import traceback import ...
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to us...
# -*- coding: utf-8 -*- # Copyright 2016 Ryan Dellenbaugh # # 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. import os ...
""" Steady-state channel flow in 3D =============================== Steady state flow in a channel subject to bottom friction. This test reproduces the "channel" test case found in GOTM test suite [1] and also [2]. This case tests the turbulence closure model, vertical viscosity and bottom boundary layer. Water colu...
# -*- coding: utf-8 -*- """ Created on Wed Dec 7 16:23:52 2016 Copyright 2015 Nicolo' Navarin This file is part of count-mean-sketch based on https://github.com/rafacarrascosa/countminsketch. count-mean-sketch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
''' Created on Jan 17, 2015 @author: owwlo ''' from PyQt5 import QtGui, QtCore, QtQml, QtQuick from PyQt5.QtCore import QObject, QUrl, Qt, QVariant, QMetaObject, Q_ARG import threading import websocket import json import logging from time import sleep import coloredlogs WS_URL = "ws://localhost:88...
import copy, hashlib, logging from bunch import Bunch from django.conf import settings from django.core.cache import DEFAULT_CACHE_ALIAS from django.core.urlresolvers import reverse from .cache import cached_data from .utils import buf_to_unicode CACHE_NAME=getattr(settings, 'RELOCATION_CACHE', DEFAULT_CACHE_ALIAS) ...
"""Add new output options Revision ID: af5891792291 Revises: 561621f634cb Create Date: 2020-07-06 18:31:35.210777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'af5891792291' down_revision = '561621f634cb' branch_labels = None depends_on = None def upgrade(...
# common crypto functions (mostly specific to XEP-0116, but useful elsewhere) # -*- coding:utf-8 -*- ## src/common/crypto.py ## ## Copyright (C) 2007 Brendan Taylor <whateley AT gmail.com> ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the ...
AUTHOR = 'Chris Dent' AUTHOR_EMAIL = 'cdent@peermore.com' MAINTAINER = 'Ben Paddock' MAINTAINER_EMAIL = 'pads@thisispads.me.uk' NAME = 'tiddlywebplugins.jsondispatcher' DESCRIPTION = 'A TiddlyWeb plugin to allow the dispatching of tiddlers to non-Python handlers by serialising tiddler data to JSON' VERSION = '0.1.4' i...
from supriya.nonrealtime.SessionObject import SessionObject class Moment(SessionObject): """ A moment-in-time referencing a singleton non-realtime state. :: >>> import supriya.nonrealtime >>> session = supriya.nonrealtime.Session() >>> moment = session.at(10.5) """ ### ...
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2014 Bitcraze AB # # Cr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Feature', fields=[ ('id', models.AutoField(verb...
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### end...
import luigi import pandas as pd from augment_data import AppendFeaturesAggregatedFromTeachersDatasetToSchool class SplitSchoolOutliersData(luigi.Task): input_task = AppendFeaturesAggregatedFromTeachersDatasetToSchool() def requires(self): return self.input_task def output(self): return...
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2013 Ivo Tzvetkov # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # This file is part of Medusa. # # Medusa 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) a...
import sqlite3 from db import get_connection, get_from_datamaster, get_equip_keys from db.tables import equips, traits requirements = [equips, traits] def build(): with get_connection() as con: con.row_factory = sqlite3.Row cur = con.cursor() equip_ids_by_name = get_equip_keys(cur) ...
from g1.apps import parameters from g1.apps import utils from .. import clusters from . import bases SESSION_LABEL_NAMES = ( # Input. 'stubs', 'executor', # Output. 'session', # Private. 'session_params', ) STUB_LABEL_NAMES = ( # Output. 'stub', # Private. 'stub_params', )...
from helperFunctions.data_conversion import make_bytes from test.common_helper import TEST_FW, TEST_FW_2, TEST_TEXT_FILE from test.unit.web_interface.base import WebInterfaceTest class TestAppShowAnalysis(WebInterfaceTest): def test_app_show_analysis_get_valid_fw(self): result = self.test_client.get('/an...
"""Unit test for network_service - Treadmill Network configuration service. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import tempfile import unittest # Disable W0611: Unused import i...
# -*- coding: utf-8 -*- from __future__ import division import numpy as np import matplotlib.pyplot as plt import progressbar as pbar pb = pbar.ProgressBar() __name__ = 'SpectralEstimation' __author__ = 'Luca Penasa' def mtm_from_R(x, K=3, NW=6, nFFT='default', plot=0, deltat=0.001, jkCIProb = 0.95, maxf=10, plotf...
from __future__ import absolute_import from mock import Mock, patch from celery.bin.amqp import ( AMQPAdmin, AMQShell, dump_message, amqp, main, ) from celery.tests.case import AppCase, WhateverIO class test_AMQShell(AppCase): def setup(self): self.fh = WhateverIO() self.ad...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import unicode_literals import pickle, io, os, sys # If you like to create a translation, you do the following. # - copy this file to a file with the two letter short for that language replacing "en". # - also fill this two letter short in the lang variab...
#!/usr/bin/env python ##===-----------------------------------------------------------------------------*- Python -*-===## # _ # | | # __| | __ ___ ___ ___ # / _` |/ _` \ \ /\ / / '_ | # | (_| | (_| |\ V V /| | | | # \__,_|\__,_| \_/\_/ |_| |_| - Compiler Toolchain ## ## # This file is distributed under the MIT...
# -*- coding: utf-8 -*- """Date data and manipulation module.""" # # (C) Rob W.W. Hooft, 2003 # (C) Daniel Herding, 2004 # (C) Ævar Arnfjörð Bjarmason, 2004 # (C) Andre Engels, 2004-2005 # (C) Yuri Astrakhan, 2005-2006 (<Firstname><Lastname>@gmail.com) # (years/decades/centuries/millenniums str <=> int conversion...
from StringIO import StringIO import json from django.core.serializers.json import DjangoJSONEncoder, DateTimeAwareJSONEncoder from django.core.serializers.base import DeserializationError from riv.serializers import base_serializer as base class Serializer(base.Serializer): internal_use_only = False def get...
# -*- coding: utf-8 -*- import jinja2 import sys import os import shutil import contents import json absolute_path = os.path.dirname(os.path.abspath(__file__)) reload(sys) sys.setdefaultencoding("utf-8") absolute_template_path = absolute_path + '/templates' absolute_output_path = absolute_path + '/output' print('...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # Portello membership system # Copyright (C) 2014 Klubb Alfa Romeo Norge # # 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 # t...
#!/usr/bin/env python3 """ Common build class for generating ninjafiles. """ import os import subprocess from build import ninja_syntax PLATFORM = "linux_amd64" GOSRC = "gocode/src/cuauv.org" GOPKG = "gocode/pkg/%s/cuauv.org" % PLATFORM def strip_ext(filename): """ Remove the extension from a filename. """ ...
# ex04.py: Variables And Names # variable named cars equals 100 cars = 100 # variable named space_in_a_car equals 4.0 space_in_a_car = 4.0 # variable named drivers equals 30 drivers = 30 # variable named passengers equals 90 passengers = 90 # variable named cars_not_driven stores the value of cars minus drivers cars_n...
""" Files test provider cases """ import pytest from sssd.testlib.common.utils import SSHClient def get_sss_entry(multihost, db, ent_name): cmd = multihost.master[0].run_command( 'getent %s -s sss %s' % (db, ent_name), raiseonerr=False) r...
import re from typing import Optional, Union import rdflib.namespace from rdflib.namespace import Namespace, OWL, RDF, XSD from rdflib import URIRef import warnings from etk.etk_exceptions import WrongFormatURIException, PrefixNotFoundException, PrefixAlreadyUsedException from etk.etk_exceptions import SplitURIWithUnkn...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2008-2009 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> # Copyright (c) 2008-2009 Center for Bioinformatics, University of Hamburg # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, prov...
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 later version. This prog...
# coding:utf-8 import random import config import json from db.DataStore import sqlhelper __author__ = 'qiye' import requests import chardet class Html_Downloader(object): @staticmethod def download(url): try: r = requests.get(url=url, headers=config.get_header(), timeout=config.TIMEOUT...
# from pytigon_js.tools import load_css, load_many_js def set_state(component, state): spec = ("!", "?", "*", "0", "+", "-", "%") if component.options.hasOwnProperty("state_actions"): state_actions = component.options["state_actions"] else: state_actions = [] for key in Object.keys(sta...
# from cbktree import BkHammingTree, explicitSignCast import pyximport print("Have Cython") pyximport.install() import deduplicator.cyHamDb as hamDb int_bits = lambda b: hamDb.explicitSignCast(int(b, 2)) TEST_DATA = { # Format: id -> bitstring 1: int_bits('1011010010010110110111111000001000001000100011110001010...
from __init__ import * import sys sys.path.insert(0, ROOT) from polymage_common import set_zero_ghosts from compiler import * from constructs import * def residual(U, V, l, app_data, name): pipe_data = app_data['pipe_data'] z = pipe_data['z'] y = pipe_data['y'] x = pipe_data['x'] extent = pipe_...
""" The redis protocol only knows about bytes, but we like to have strings inside Python. This file contains some helper classes for decoding the bytes to strings and encoding the other way around. We also have a `BytesEncoder`, which provides raw access to the redis server. """ __all__ = ( 'BaseEncoder', 'Byt...
# -*- coding: utf-8 -*- ''' Management of languages/locales ==============================+ The locale can be managed for the system: .. code-block:: yaml en_US.UTF-8: locale.system ''' def __virtual__(): ''' Only load if the locale module is available in __salt__ ''' return 'locale' if '...
# -*- coding: utf-8 -*- # Copyright 2020 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...
""" Qt ship management dialog """ import logging from gui.common import ListEdit import qt_ship from PyQt5.QtWidgets import QDialog class Ship(): def __init__(self, main_window): self.dialog = QDialog(main_window.window) self.ui = qt_ship.Ui_Dialog() self.ui.setupUi(self.dialog) ...
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import unittest from pants.build_graph.address_lookup_error import AddressLookupError fr...
import cgi import datetime import os import wsgiref.handlers from google.appengine.ext import db from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp import template # Model classes class Message(db.Model): user = db.UserProperty() email = db.St...
import data import time import mido import playback def main(): # initialize a PlaybackUtility for each midi file, put them into a list -> playback_utils playback_utils = [] for f in ['mid/owl.mid', 'mid/lost.mid']: musicpiece = data.piece(f) pbu = playback.PlaybackUtility() pbu.add...
__all__ = [ # Paths to binaries we depend on. 'FFMPEG', 'FFPROBE', # Various "constants" used in configuration. 'OVERLAY', 'CROP', 'PAD', 'PAN', 'DISPLAY_STYLES,' 'DOWN', 'LEFT', 'RIGHT', 'UP', 'OVERLAY_DIRECTIONS', 'ALTERNATE', 'PAN_DIRECTIONS', ...
from rply.errors import ParsingError class LRParser(object): def __init__(self, lr_table, error_handler): self.lr_table = lr_table self.error_handler = error_handler def parse(self, tokenizer, state=None): from rply.token import Token lookahead = None lookaheadstack =...
''' winspec.py - read SPE files created by WinSpec with Princeton Instruments' cameras. ''' from __future__ import print_function import ctypes, os import numpy as np __all__ = ['SpeFile'] __author__ = "Anton Loukianov" __email__ = "anton.loukianov@gmail.com" __license__ = "BSD" __version__ = "0.1" # Definitions of...
from typing import Dict from Src.BioDataManagement.DataAccess.Entities.BiologicalMeasureType import BiologicalMeasureType from Src.Core.Entity.EntityBase import EntityBase class MicroRnaExpressionLevel(BiologicalMeasureType, EntityBase): """description of class""" def __init__(self, **kargs): """ ...
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports from __future__ import print_function import argparse import ctypes as ct import os import platform import re import signal import sys from bcc import BPF from datetime import datetime from time import strftime # # exitsnoop Trace all process termination...
#################################################################################################### # neuropythy/util/__init__.py # This file defines the general tools that are available as part of neuropythy. from .core import (ObjectWithMetaData, normalize, denormalize, to_hemi_str, to_af...
from distutils.version import StrictVersion import datetime import hashlib import os import re import socket import shutil import time import sys import urllib try: import requests except ImportError: print('Please install or update the requests module.') sys.exit(1) import seesaw from seesaw.config import...
import sys import codecs import lcs #the lcs module is in extension folder import time import json import re import Levenshtein class answerCandidate: def __init__(self, sub = ['',''], pre = '', qRaw = '', score = 0, kbDict = [], wS = 1, wP = 10, wAP = 10): self.sub = sub[0] self.e...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsPalLabeling: base suite setup From build dir, run: ctest -R PyQgsPalLabelingBase -V See <qgis-src-dir>/tests/testdata/labeling/README.rst for description. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gen...
# !/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import print_function from itertools import count from .utils import * class RDF_Entity(object): """ Pythonic representation of an RDF resource - normally not instantiated but used for inheritance purposes <triples> : a structure like...
# Copyright 2017 Noah Krim # 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, softw...
# Copyright 2016 Autodesk 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 writing...
from __future__ import absolute_import from distutils.version import LooseVersion import numpy as np import pandas as pd from shapely.geometry import Point, Polygon import geopandas from geopandas import GeoDataFrame, GeoSeries, read_file, base from geopandas import sjoin import pytest from pandas.util.testing impo...
from openerp.osv import osv, fields from openerp.tools.translate import _ class account_asset_depreciation_wizard(osv.TransientModel): """Order the depreciation of a selection of assets for a given period""" _name = 'account.asset.depreciation.wizard' def _get_asset_domain(self, cr, uid, period_id, cont...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-21 07:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Feedb...
# 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...
"""Test for Remote Execution related Upgrade Scenario's :Requirement: Upgraded Satellite :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: API :TestType: Functional :CaseImportance: High :Upstream: No """ from nailgun import entities from robottelo.constants import DEFAULT_LOC, DEFAULT_ORG, DISTR...
from conans import ConanFile, CMake, tools class MuninConan(ConanFile): name = "munin" license = "MIT" author = "KazDragon" url = "https://github.com/KazDragon/munin" description = "A text-based gui component library build on Terminal++" topics = ("ansi-escape-codes", "text-ui") settings =...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Donald N. Allingham # Copyright (C) 2010 Jerome Rapinat # # 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 ...
""" The MIT License (MIT) Copyright (c) 2014 Melissa Gymrek <mgymrek@mit.edu> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
#coding: utf-8 ## Copyright 2008-2009 Luc Saffre. ## This file is part of the Lino project. ## Lino 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) a...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Don't use "from appname.models import ModelName". # Use orm....
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # Copyright Saab AB, 2014 (http://safirsdkcore.com) # # Created by: Lars Hagstrom (lars@foldspace.nu) # ############################################################################### # # This...
#!/usr/bin/env python3 # @Author: Wei Lu <weilu> # @Date: 25-Jan-2017 # @Email: wl45@rice.edu # @Last modified by: weilu # @Last modified time: 25-Jan-2017 # @Copyright: Free import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datet...
import tkinter as tk import pytest from tk_tools import ButtonGrid from tests.test_basic import root @pytest.fixture def btn_grid_3col(root): eg = ButtonGrid(root, 3, headers=['a', 'b', 'c']) yield eg eg._redraw() def test_creation_with_header(root): ButtonGrid(root, 3, headers=['a', 'b', 'c']) ...
from __future__ import print_function, absolute_import, division import cmath import itertools import math import sys from numba import unittest_support as unittest from numba.compiler import compile_isolated, Flags, utils from numba import types from .support import TestCase, tag from .complex_usecases import * ena...
# -*- encoding: utf-8 -*- from ckeditor.widgets import CKEditorWidget, json_encode from django import forms from django.contrib import admin from django.contrib.admin import widgets from django.contrib.admin.options import get_ul_class from django.forms import ChoiceField, ModelForm from django.template.loader import r...
""" Django settings for bookmarks project. Generated by 'django-admin startproject' using Django 2.1.2. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ from djang...
try: from xmlsec_location import xmlsec_path except ImportError: xmlsec_path = '/opt/local/bin/xmlsec1' CONFIG={ "entityid" : "urn:mace:example.com:saml:roland:sp", "name" : "urn:mace:example.com:saml:roland:sp", "description": "My own SP", "service": { "sp": { "endpoints":{...
import sys import time import serial try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET saveFileName = "SwitchTime.xml" def list2xml(stList): if len(stList) != 7: print "DayOfWeek num error!" return weekname = "sunday", "monday", "tuesd...