gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for checks.""" import os import yaml from grr.lib import config_lib from grr.lib import flags from grr.lib import test_lib from grr.lib.checks import checks from grr.lib.checks import checks_test_lib from grr.lib.checks import filters from grr.lib.rdfvalues impor...
"""Decorator functions """ class Var(object): """A variable, consisting of a name and potentially an assignment""" def __init__( self, name ): """Create a variable with the given name >>> v = Var('name') >>> v Var('name') >>> v.name 'name' """ self.name = name de...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from twisted.trial import unittest from twisted.internet import defer from coherence.dispatcher import Dispatcher, UnknownSignal, Receiver, \ SignalingProperty, ChangedSignalingProperty, CustomSignalingProperty class TestDispatcher(Dispatcher): __signals__ = {'test': 'Test signal'} class SimpleTarget(o...
# Webhooks for external integrations. from __future__ import absolute_import from typing import Any, Dict, List, Optional, Text, Tuple from django.utils.translation import ugettext as _ from django.db.models import Q from django.conf import settings from django.http import HttpRequest, HttpResponse from zerver.models...
from __future__ import unicode_literals import os import urlparse import re from lxml import etree from docutil.etree_util import get_text from docutil.commands_util import download_html_tree from channel.syncer.generic_syncer import MessageSyncer, ThreadSyncer class ApacheMailSyncer(MessageSyncer): reverse_entr...
# # Cython - Compilation-wide options and pragma declarations # from __future__ import absolute_import class ShouldBeFromDirective(object): known_directives = [] def __init__(self, options_name, directive_name=None, disallow=False): self.options_name = options_name self.directive_name = dir...
#!/usr/bin/env python from __future__ import with_statement import unittest from datetime import datetime import flask import sqlalchemy as sa from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import sessionmaker import flask_sqlalchemy as fsa def make_todo_model(db): class Todo(db.Model...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Autocompletion config for YouCompleteMe in Chromium. # # USAGE: # # 1. Install YCM [https://github.com/Valloric/YouCompleteMe] # (Googlers s...
""" Implements a special view to visualize and stage pieces of a project's current diff. """ import os import re import bisect import sublime from sublime_plugin import WindowCommand, TextCommand, EventListener from .navigate import GsNavigate from ..git_command import GitCommand from ..exceptions import GitSavvyErr...
#!/usr/bin/python # ---------------------------------------------------------------------------- # cocos "new" plugin # # Copyright 2013 (C) cocos2d-x.org # # License: MIT # ---------------------------------------------------------------------------- ''' "new" plugin for cocos command line tool ''' __docformat__ = 're...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
# # 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
"""Pinball domain for reinforcement learning """ from .Domain import Domain import numpy as np from itertools import tee, izip import itertools from Tkinter import Tk, Canvas import os from rlpy.Tools import __rlpy_location__ __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = ["Alborz Geramif...
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/markers.py __version__=''' $Id: markers.py 3660 2010-02-08 18:17:33Z damian $ ''' __doc__="""This modules defines a collection of mar...
# Licensed as BSD by Yuriy Chushkin of the ESRF on 2014-08-06 ################################################################################ # Copyright (c) 2014, the European Synchrotron Radiation Facility # # All rights reserved. # # ...
#!/usr/bin/env python #===-- x86_64_linux_target_definition.py -----------------------------*- C++ -*-===// # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===------...
r"""A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. json exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding basic Py...
from __future__ import division import numpy as np from astropy import units as u from astropy.coordinates import Longitude, Latitude, Angle from sunpy.time import parse_time, julian_day from sunpy.wcs import convert_hpc_hg, convert_hg_hpc from sunpy.sun import constants, sun __author__ = ["Jose Ivan Campos Rozo", "...
import os from ..java import ( Class as JavaClass, Field as JavaField, Method as JavaMethod, Code as JavaCode, opcodes as JavaOpcodes, SourceFile, Signature, # LineNumberTable ) from .blocks import Block, IgnoreBlock from .methods import MainMethod, Method, extract_parameters from .opco...
# Copyright (c) 2016 IBM # 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 appli...
from flask import Blueprint, render_template, session, request, redirect, url_for, flash, jsonify from plaid import Client from application.services import stripe_client from forms import * from application.db.model import * import traceback import random from datetime import datetime from flask.ext.login import curren...
#!/usr/bin/env python from PyQt4 import QtGui, QtCore from pandas import read_csv import subprocess import psutil import time import sys, os from Views import ui_mainrefactor as mw from poplerGUI import ui_logic_session as sesslogic from poplerGUI import ui_logic_site as sitelogic from poplerGUI import ui_logic_main as...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: runtime.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_d...
# 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...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" DGL-based GCN for graph property prediction. """ import torch.nn as nn import torch.nn.functional as F from deepchem.models.losses import Loss, L2Loss, SparseSoftmaxCrossEntropy from deepchem.models.torch_models.torch_model import TorchModel class GCN(nn.Module): """Model for Graph Property Prediction Based on...
# -*- coding: utf-8 -*- from branca.element import Element, Figure from folium.elements import JSCSSMixin from folium.map import Layer from folium.utilities import none_max, none_min from jinja2 import Template class HeatMapWithTime(JSCSSMixin, Layer): """ Create a HeatMapWithTime layer Parameters ...
# -*- 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...
from __future__ import print_function, division import os import tempfile import shutil from copy import deepcopy import numpy as np import pytest from .. import Model from .test_helpers import random_id, get_test_dust, get_realistic_test_dust from ...grid import CartesianGrid, CylindricalPolarGrid, SphericalPolarGr...
# Copyright 2015 Red Hat, 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 agre...
#!/usr/bin/env python from __future__ import print_function import argparse import calendar import codecs import datetime import io import os.path import re import subprocess import sys from pycoin.convention import tx_fee, satoshi_to_mbtc from pycoin.encoding import hash160 from pycoin.key import Key from pycoin.ke...
import asyncio import contextlib import tempfile import pytest from py import path from aiohttp.web import Application from .test_utils import unused_port as _unused_port from .test_utils import (RawTestServer, TestClient, TestServer, loop_context, setup_test_loop, teardown_test_loop) try: ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import numpy from matplotlib import pyplot import advection import weno_coefficients from scipy.integrate import ode def weno(order, q): """ Do WENO reconstruction Parameters ---------- order : int The stencil width q : numpy array Scalar data to reconstruct ...
import ConfigParser import sys import time import logging import logging.handlers import os import signal import pwd import shutil from campus_factory.ClusterStatus import ClusterStatus from campus_factory.util.ExternalCommands import RunExternal from campus_factory.OfflineAds.OfflineAds import OfflineAds from campus...
""" Utilities to simplify the boilerplate for native lowering. """ from __future__ import print_function, absolute_import, division import collections import contextlib import inspect import functools import warnings from enum import Enum from .. import typing, cgutils, types, utils, errors from .. typing.templates ...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2017 QuantRocket - 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 ...
from datetime import datetime from unittest import skipIf import copy import uuid from cassandra.cqlengine import ValidationError as CQLValidationError from django.core import validators from django.forms import fields from common.models import CassandraFamilyMember from django_cassandra_engine.test import TestCase a...
########################################################################## # # Copyright 2011 Jose Fonseca # 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 res...
#!/usr/bin/env python import datetime import random import os import logging import unittest2 from dateutil.relativedelta import relativedelta class KardboardTestCase(unittest2.TestCase): def setUp(self): if os.environ.get('KARDBOARD_SETTINGS'): os.environ['KARDBOARD_SETTINGS'] = '' ...
import unittest from reactivex import operators as ops from reactivex.testing import ReactiveTest, TestScheduler on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribed disposed = ReactiveTest.disp...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
from django.test import TestCase from django.utils.unittest import skipIf import reversion import yawf from yawf.exceptions import MessageSpecNotRegisteredError, UnhandledMessageError import yawf.creation import yawf.dispatch from yawf.handlers import Handler from yawf.revision.utils import ( diff_fields, versions...
"""Module containing the application logic for Flake8.""" from __future__ import print_function import logging import sys import time import flake8 from flake8 import checker from flake8 import defaults from flake8 import exceptions from flake8 import style_guide from flake8 import utils from flake8.main import optio...
import json import copy import time import signal from benchmark.monitor import TestMonitor from benchmark.launcher import TestLauncher def _recursive_macro_replace(val, macros): """ Iterate over the items of val and replace the macros with the properties of macros dictionary """ # Iterate over dicts if isins...
from sys import argv import minimum_vertex_cover as mvc from Genetic import Pop, Solucao def run(): # open File try: file_name = argv[1] except IndexError: file_name = input("Enter a file name: ") graph, n_vertices, n_arestas = read_file(file_name) full_graph = {**graph[0], **gra...
from __future__ import division import numpy as np from scipy import ndimage as nd from ..morphology import dilation, erosion, square from ..util import img_as_float, view_as_windows, pad from ..color import gray2rgb def _find_boundaries_subpixel(label_img): """See ``find_boundaries(..., mode='subpixel')``. ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
"""Test UniFi Controller.""" from collections import deque from copy import deepcopy from datetime import timedelta import aiounifi from asynctest import Mock, patch import pytest from homeassistant.components import unifi from homeassistant.components.unifi.const import ( CONF_CONTROLLER, CONF_SITE_ID, U...
#!/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...
import asyncio import weakref from bokeh.layouts import row, column from bokeh.models import ( ColumnDataSource, DataRange1d, HoverTool, Range1d, Button, Select, NumeralTickFormatter, ) from bokeh.palettes import Spectral9 from bokeh.plotting import figure import dask from tornado import ge...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Note that the dataset must be already downloaded for this script to work, do: # $ cd data/ # $ python download_dataset.py # quoc_trinh import tensorflow as tf import numpy as np import matplotlib import matplotlib.pyplot as plt from sklearn import metrics import os import sys import datetime # get current...
from datetime import datetime, timedelta from random import shuffle from bin import yt_title import re def create_yt_url(_youtube_id): return 'https://www.youtube.com/watch?v={}'.format(_youtube_id) def usage_msg(_cmd, _mention, _cmdchar): return ':warning: {} **USAGE:** {}{}'.format(_mention, _cmdchar, _cm...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
# 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...
# 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 or agreed to in writing, ...
from itertools import chain from django.apps import apps from django.conf import settings from django.contrib.admin.utils import ( NotRelationField, flatten, get_fields_from_path, ) from django.core import checks from django.core.exceptions import FieldDoesNotExist from django.db import models from django.db.model...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Entity state machines. These are state machines that perform CRUD operations on entities. """ import hszinc import fysom from ...util import state from ...util.asyncexc import AsynchronousException from ...exception import HaystackError class EntityRetrieveOperati...
from sympy import S, sin, cos, pi, sqrt, symbols from sympy.physics.mechanics import (Dyadic, Particle, Point, ReferenceFrame, RigidBody, Vector) from sympy.physics.mechanics import (angular_momentum, cross, dot, dynamicsymbols, express, inertia,...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Hewlett-Packard Development Company, L.P. # 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 # # ...
from scipy.linalg import norm import numpy as np from .result import LucasKanadeAlgorithmResult # TODO: implement Inverse Additive Algorithm? # TODO: implement sampling? class LucasKanade(object): r""" Abstract class for a Lucas-Kanade optimization algorithm. Parameters ---------- template : `me...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
"""Support for Tesla cars.""" import asyncio from collections import defaultdict from datetime import timedelta import logging import async_timeout import httpx from teslajsonpy import Controller as TeslaAPI from teslajsonpy.exceptions import IncompleteCredentials, TeslaException import voluptuous as vol from homeass...
#!/usr/bin/env python import unittest from .. import Parser from .. import Interpreter from ..tokens import Bool, Cons, EmptyList, Identifier, Number, String def parseOne(arg): return Parser.parse(arg)[0] def run(arg): return Interpreter.Interpreter().run(Parser.parse(arg)) def runOne(arg): return Inte...
# # Author: Pearu Peterson, March 2002 # # w/ additions by Travis Oliphant, March 2002 # and Jake Vanderplas, August 2012 from __future__ import division, print_function, absolute_import __all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded', 'solve_toeplitz', 'solve_circulant...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import logging from django.contrib import auth from django.contrib.auth.models import User from django.core.exceptions import (PermissionDenied, ObjectDoesNotExist, ValidationError) from django.db.models import Q from djblets.util.decorators impor...
# Copyright 2022 The Magenta 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 or agreed to in ...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# 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 use ...
from __future__ import absolute_import from django.conf import settings from django.contrib.auth import authenticate, login, get_backends from django.contrib.auth.views import login as django_login_page, \ logout_then_login as django_logout_then_login from django.core.urlresolvers import reverse from zerver.decora...
import os import os.path as op import platform import re import shutil from operator import itemgetter from werkzeug import secure_filename from flask import flash, url_for, redirect, abort, request from wtforms import fields, validators from flask.ext.admin import form, helpers from flask.ext.admin._compat import ...
# -*- coding: utf8 -*- """ unpack ipynb Tested 2015 March """ import os import re def dont_do_anything(fw, cell_dict): print("won't do anything about", cell_dict["cell_type"]) print(cell_dict) def handle_heading(fw, cell_dict): output = convert_heading(cell_dict) fw.write(output) return output...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
#!/usr/bin/python # # Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
from __future__ import unicode_literals import re import logging import functools from copy import deepcopy import six import pytz import xmltodict from lxml import etree from dateutil import parser from pycountry import languages from nameparser import HumanName from scrapi import requests URL_REGEX = re.compile(...
# 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...
# # 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...
#!/usr/bin/env python # # Unit tests for the multiprocessing package # import unittest import Queue import time import sys import os import gc import signal import array import socket import random import logging from test import test_support from StringIO import StringIO _multiprocessing = test_support.import_module...
__author__ = "Jens Thomas & Felix Simkovic" __date__ = "10 June 2019" __version__ = "1.0" import argparse import os from ample.modelling.multimer_definitions import MULTIMER_MODES class BoolAction(argparse.Action): """Class to set a boolean value either form a string or just from the use of the command-line flag...
# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # Complutense de Madrid (dsa-research.org) # # 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 ...
# # 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...
# file eulfedora/xml.py # # Copyright 2010,2011 Emory University Libraries # # 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...
import os import six import shutil import tempfile import contextlib try: from unittest import mock except ImportError: import mock from twisted.trial import unittest from twisted.protocols.policies import WrappingFactory from twisted.python.filepath import FilePath from twisted.internet import reactor, defer,...
#! -*- codign: utf-8 -*- import argparse import contextlib import os.path import re import shutil import signal import subprocess import sys import tempfile import traceback import yaml from . import utils """ Main code, runner """ class Runner(object): BASEDIR_TEMP = 'TEMP' signals = [ signal.S...
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2015, Jesse Keating <jlk@derpops.bike> # # This module 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 opti...
# Copyright 2019 Aerospike, 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, ...
# # coding: utf-8 # Copyright (c) 2018 DATADVANCE # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge,...
# Copyright 2019 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 or agreed to in writing, ...
# Copyright 2013: 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 b...
# Copyright 2013 Intel Corporation # 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 require...
# # 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...
from datetime import datetime as py_datetime import decimal import random from faker.generators.address import * from faker.generators.company import * from faker.generators.date import datetime as f_datetime from faker.generators.internet import * from faker.generators.lorem import * from faker.generators.name import...
#!/usr/bin/env python from generator.actions import Actions import random import struct def random_bytes(cnt): return ''.join([chr(random.randint(0,255)) for x in xrange(cnt)]) def generate_bmp(data): width = random.randint(1, 30) height = (len(data) / 3 / width) + 1 nbytes = width * height * 3 pa...