src
stringlengths
721
1.04M
import sys, os, reconcore as RC, recontree as RT, global_vars as globs ############################################################################# def readSpecTree(spec_tree_input, starttime): if os.path.isfile(spec_tree_input): spec_tree = open(spec_tree_input, "r").read().replace("\n", "").replace("\r",""); e...
from ll1_symbols import * class RmRecurEngine(object): """docstring for RmRecurEngine""" def __init__(self, prodc_list, non_term_set): self.prodc_list = prodc_list self.non_term_list = list(non_term_set) # self.non_term_prodc_map = {non_term: [] for non_term in self.non_term_list} # self.update_non_term_map...
""" Tests for course utils. """ import ddt import mock from django.conf import settings from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from common.djangoapps.util.course import get_link_for_about_page from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.d...
""" GAVIP Example AVIS: Simple AVI @req: SOW-FUN-010 @req: SOW-FUN-040 @req: SOW-FUN-046 @req: SOW-INT-001 @comp: AVI Web System This is a simple example AVI which demonstrates usage of the GAVIP AVI framework Here in views.py, you can define any type of functions to handle HTTP requests. Any of these functions can ...
# -*- coding: utf-8 -*- # # Copyright 2016 dpa-infocom GmbH # # 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...
import sys from PyQt4 import QtCore, QtGui #from AlarmSetupDialog_ui import Ui_DialogAlarmSetup from Resources.AlarmSetupDialog_ui import Ui_DialogAlarmSetup from AlarmTimer import AlarmTimer class AlarmSetup(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) ...
# -*- coding: utf-8 -*- import random import string from itertools import cycle from django.core.exceptions import ValidationError import mock from nose.tools import eq_, ok_ import amo.tests import mkt.feed.constants as feed from mkt.feed.models import (FeedApp, FeedBrand, FeedCollection, FeedItem, ...
from django.shortcuts import render_to_response from django.template import RequestContext import os from django.conf import settings from django.template import Context from django.template.loader import get_template from xhtml2pdf import pisa #INSTALAR ESTA LIBRERIA from django.templatetags.static import static from...
# -*- coding: utf-8 -*- # # DiveIntoOpenstack documentation build configuration file, created by # sphinx-quickstart on Fri Jan 6 10:00:22 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import time from mcrouter.test.mock_servers import MockServer from mcrouter.test.McrouterTestCase import McrouterTestCase class TkoServer(MockServer): def __init__(...
# -*- coding: UTF-8 -*- from unittest import TestCase from lagesonum.bottle_app import application, DB_PATH from lagesonum.dbhelper import initialize_database from webtest import TestApp import os from bottle import debug debug(True) class LagesonumTests(TestCase): def setUp(self): if os.path.exists(DB_...
from enum import Enum from gi.repository import Aravis as ar import aravis as pyar class AravisEnv: def __init__(self): ''' Get device IDs and initialize Camera objects ''' ar.update_device_list() self.device_ids = pyar.get_device_ids() self.cameras = {i: pyar.Camera(i) for i in sel...
import unittest import os import xml.etree.ElementTree as ET import translation_helper as localizr import filecmp class TestLocalizationHelperFunctions(unittest.TestCase): def setUp(self): # constants self.LANGS = ['de', 'es', 'fr', 'zh-rTW'] # save cwd so we can revert back to it when w...
# Description: General-purpose functions for personal use. # Author: André Palóczy # E-mail: paloczy@gmail.com __all__ = ['seasonal_avg', 'seasonal_std', 'deseason', 'blkavg', 'blkavgdir', 'blkavgt', 'blkapply', 'stripmsk', ...
from sympy.core.function import Function from sympy.core import sympify, S from sympy.utilities.decorator import deprecated ############################################################################### ###################### Kronecker Delta, Levi-Civita etc. ###################### ###################################...
import os import sys import json import time from iddt.dispatcher import Dispatcher import logging logging.basicConfig(filename='iddt.cli.log', level=logging.DEBUG) logger = logging.getLogger('iddt.cli') class CLIDispatcher(Dispatcher): def __init__(self): super(CLIDispatcher, self).__init__() if _...
import collections import random import numpy as np class ExperienceReplay(object): SARS = collections.namedtuple('SARS', ['S1', 'A', 'R', 'S2', 'T']) def __init__(self, state_shape=(1,), max_size=1000000): self.max_size = max_size self.cur_size = 0 self.next_ind = 0 self.S1 ...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
import sublime import sublime_plugin import os.path is_sublime_text_3 = int(sublime.version()) >= 3000 if is_sublime_text_3: from .settings import Settings from .status_bar import StatusBar from .insert_in_output_view import insert_in_output_view from .timeout import set_timeout, defer_sync else: ...
# Copyright 2014 Tecnativa S.L. - Pedro M. Baeza # Copyright 2015 Tecnativa S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Antonio Espinosa # Copyright 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class EventRe...
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) setup( name="BIDS2ISATab", # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # http://packaging.python.org/en/latest/tutorial.html#...
import bpy from bpy.props import * from bpy.types import ShapeKey from .. events import propertyChanged from .. base_types.socket import AnimationNodeSocket from .. utils.id_reference import tryToFindObjectReference class ShapeKeySocket(bpy.types.NodeSocket, AnimationNodeSocket): bl_idname = "an_ShapeKeySocket" ...
#!/usr/bin/env python """ Wait for a certain PID to terminate and check for PID existance (POSIX). """ import os import time import errno class TimeoutExpired(Exception): pass def pid_exists(pid): """Check whether pid exists in the current process table.""" if pid < 0: return False try: ...
# -*- coding: utf-8 -*- """ OCR Utility Functions @copyright: 2009-2016 (c) Sahana Software Foundation @license: MIT 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 ...
# # txt2tags test-suite library (http://txt2tags.org) # See also: run.py, */run.py # import os, time # Path for txt2tags (change here if your txt2tags is in a different location) TXT2TAGS = '../txt2tags' CONFIG_FILE = 'config' CSS_FILE = 'css' DIR_OK = 'ok' DIR_ERROR = 'error' OK = FAILED = 0 ERROR_FILES = [] MSG_...
#!/usr/bin/python2.5 # # Copyright 2009 the Melange 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...
#!/usr/bin/env python # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. See LICENSE file for more detail. # """ SPECEXTRACT extracts a 1-D spectrum from a 2-D data file. Author Version Date ----------------------------------------...
# -*- coding: utf-8 -*- import os # noqa: F401 import re import shutil import time import unittest from os import environ from configparser import ConfigParser # py3 from installed_clients.WorkspaceClient import Workspace as workspaceService from GenomeFileUtil.GenomeFileUtilImpl import GenomeFileUtil from GenomeFi...
from __future__ import unicode_literals, print_function from unittest import TestCase from packed import translate class TestTranslate(TestCase): def test_whitespace(self): code = """ """ expected = code result = translate(code) self.assertMultiLineEqual(expected, result)...
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
from django.test import TestCase from django.conf import settings from django.template.loader import render_to_string from django.core.urlresolvers import reverse from gargoyle.testutils import switches from identityprovider.models.openidmodels import OpenIDRPConfig from identityprovider.readonly import ReadOnlyManag...
"""Unit tests for the doorstop.core.builder module.""" import unittest from unittest.mock import patch, Mock from doorstop.core.tree import Tree from doorstop.core.builder import build, find_document, find_item, _clear_tree from doorstop.core.test import FILES, EMPTY from doorstop.core.test import MockDocumentSkip, ...
# # Copyright (C) 2015 INRA # # 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 program is distributed in the h...
"""Testing the imager_images models.""" from django.test import TestCase import factory from imager_images.models import Photo, Album from imager_profile.models import User from datetime import datetime class UserFactory(factory.django.DjangoModelFactory): """Define a User factory with a single user.""" clas...
import unittest import io import taskqueue.confparser TEST_CONFIG = """ [DEFAULT] non_override = defvalue key1 = value1 override = defvalue [section] key1 = section_value1 key2 = section_value2 """ class TestConfigParser(unittest.TestCase): """Tests for ConfigParser.""" def setUp(self): pass d...
import sys import os import numpy as np import sqlite3 import mysql.connector #connect to sqlite database conn = sqlite3.connect('C:/projects/dbs/SP2_data.db') c = conn.cursor() #connect to mysql database cnx = mysql.connector.connect(user='root', password='Suresh15', host='localhost', database='black_carbon') curs...
#!/usr/bin/env python ########################################################################## # # getusers.py -- scoped by US criteria # report c_ESPID field values on feature and epic # # --rallyConfig=<config_file_name> name of the file with settings for pyral # --config=<config_file_name> ditto #...
#!/bin/python # Class for tweeps # # HOW TO OOP ? import numpy as np import database.db as db import database.models as models class tweep(object): """ oh god """ def __init__(self, tweep_author): """ wat """ # need interaction with the database here # for now ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-11 16:52 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('profiles', '0001_initial...
#!/usr/bin/env python ############################################################################### # $Id: ngsgeoid.py 32002 2015-12-05 06:03:16Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for NGSGEOID driver. # Author: Even Rouault <even dot rouault at mines dash paris dot org>...
""" Stochastic Gradient Descent. TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import numpy import time import logging import theano import th...
# pythonpath modification to make hytra and empryonic available # for import without requiring it to be installed from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals import os import sys sys.path.insert(0, os.path.abspath('..')) # standard impor...
""" The script is designed for scraping hotel prices from Trivago website. It saves scraping result in easy to read HTML file. """ import argparse import time from selenium.common.exceptions import NoSuchElementException, \ StaleElementReferenceException from tqdm import tqdm from browser import Browser fr...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/inference_results.ui' # # Created: Tue Nov 19 19:57:44 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ...
# -*- coding: utf-8 -*- """ Provides constants common in the Bluetooth HCI protocol. """ import enum HCI_MAX_EVENT_SIZE = 260 class Status(enum.IntEnum): """ Collection of HCI return states. """ Success = 0x00 UnknownHciCommand = 0x01 UnknownConnectionIdentifier = 0x02 HardwareFailure =...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') os.system('python setup.py bdist_wheel upload') sys.exit() with open("...
# Copyright (C) 2016 Fan Long, Martin Rianrd and MIT CSAIL # Prophet # # This file is part of Prophet. # # Prophet 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 y...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Thomas Amland # # 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 ...
#!/usr/bin/env python3 # This file is part of OpenSoccerManager-Editor. # # OpenSoccerManager 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 la...
#!/usr/bin/env python """ @package mi.dataset.test.test_single_dir_harvester.py @file mi/dataset/test/test_single_dir_harvester.py @author Emily Hahn @brief Test code to exercize the single directory harvester """ import os import glob import gevent import time import shutil import hashlib from mi.core.log import get...
DEBUG_MODE = True #DEBUG_MODE = False # GNUPlot options DEFAULT_IMAGE_TYPE = "png" # png, eps SUPPRESS_PLOT_TITLES = True DB_NAME = "eea" DB_PORT = ":5432" TEST_SCHEMA = "test" # schema for creating verification tables PROJECT_ROOT = __PROJECT_ROOT__ # things below here probably don't need to be changed much DAT...
# ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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 rest...
from nflpool.viewmodels.viewmodelbase import ViewModelBase class PlayerPicksViewModel(ViewModelBase): def __init__(self): self.afc_east_winner_pick = None self.afc_east_second = None self.afc_east_last = None self.afc_north_winner_pick = None self.afc_north_second = None ...
# Copyright (c) 2013, Web Notes 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 flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document ...
import struct from asyncio import IncompleteReadError from async_generator import async_generator, yield_ from nacl.secret import SecretBox from .util import inc_nonce, split_chunks HEADER_LENGTH = 2 + 16 + 16 MAX_SEGMENT_SIZE = 4 * 1024 TERMINATION_HEADER = (b'\x00' * 18) def get_stream_pair(reader, writer, **kwa...
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import pymysql import jctconv from pit import Pit def main(argv=sys.argv[1:]): parser = argparse.ArgumentParser() parser.add_argument('--limit', type=int, default=10) parser.add_argument('table') parser.add_argument('columns', n...
import os import logging from PyQt5 import QtCore from PyQt5.QtWidgets import * import vqt.cli as vq_cli import vqt.main as vq_main import vqt.saveable as vq_save import vqt.hotkeys as vq_hotkeys import vqt.menubuilder as vq_menu from vqt.saveable import compat_isNone logger = logging.getLogger(__name__) class VQDo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from os.path import exists as path_exists import pytest from pyscaffold.api import create_project, get_default_options from pyscaffold.cli import parse_args, run from pyscaffold.extensions import namespace from pyscaffold.extensions.namespace import ( add_n...
from nsbaseresource import NSBaseResource __author__ = 'Aleksandar Topuzovic' class NSSSLVServer(NSBaseResource): def __init__(self, json_data=None): """ Supplied with json_data the object can be pre-filled """ super(NSSSLVServer, self).__init__(...
from rez import __version__, module_root_path from rez.package_repository import package_repository_manager from rez.solver import SolverCallbackReturn from rez.resolver import Resolver, ResolverStatus from rez.system import system from rez.config import config from rez.util import shlex_join, dedup from rez.utils.sour...
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. # -*- coding: utf-8 -*- """Views for the RainApp, mostly a page to upload new region shapefiles.""" # Python 3 is coming from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from __future__ import...
# 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 os import re ...
from ..interpreterWorker import * from common.tools import tools from lang.gbs_board import Board import common.utils import common.i18n as i18n import lang import logging class GUIGobstonesApi(lang.GobstonesApi): def __init__(self, communicator): self.comm = communicator def read(self): self.c...
"""Command line creation for egtaonline scheduler""" import argparse from egtaonline import api from gameanalysis import rsgame from egta import eosched from egta.script import utils def add_parser(subparsers): """Create eosched parser""" parser = subparsers.add_parser( "eo", help="""Egtaonl...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB from __future__ import absolute_import, division, print_function import os import pytest from six import iteritems from ramlfications.config import setup_config from ramlfications.config import ( AUTH_SCHEMES, HTTP_RESP_CODES, MEDIA_TYPES, PROTOCOLS, HTTP_...
import unittest """ Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ def check_binary_search_tree_(root): if not root: return True lower, upper = float('-inf'), float('inf') return (check_node(root, lower, ...
__source__ = 'https://leetcode.com/problems/license-key-formatting/' # Time: O(n) # Space: O(n) # # Description: 482. License Key Formatting # # Now you are given a string S, # which represents a software license key which we would like to format. # The string S is composed of alphanumerical characters and dashes. # T...
# 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...
# public imports import flask from flask import Flask from flask import request # private imports from ..config.qconfig import Config config = Config() if not config.initialized: config.init(None) app = Flask(__name__) # route hooks @app.before_request def log_request(): if config.QENGINE_LOG_REQUESTS: with ope...
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. """HITAP Ünvan Sorgula Hitap üzerinden personelin ünvan bilgilerinin sorgulamasını yapar. """ from ulakbus.services.personel.hitap.hitap_sorgula impo...
from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand from flask_truss.factory import create_app from flask_truss.conf.app import Config from flask_truss.async.base import celery_instance from flask_truss.models.base import db config = Config() app = create_app(config) manager =...
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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...
#!/usr/bin/python # local imports import credentials # python modules import MySQLdb import urllib import json class ParticipantStat(object): def __init__(self, match_id, participant_id): self.match_id = match_id self.participant_id = participant_id self.kills = 0 s...
""" Module :mod:`pyesgf.search.context` =================================== Defines the :class:`SearchContext` class which represents each ESGF search query. """ import copy from ..multidict import MultiDict from .constraints import GeospatialConstraint from .consts import (TYPE_DATASET, TYPE_FILE, TYPE_AGGREGATI...
import dynesty.bounding as db import numpy as np import scipy.stats from utils import get_rstate def test_sample(): # test sampling of two overlapping ellipsoids that samples are uniform # within rad = 1 shift = 0.75 ndim = 10 cen1 = np.zeros(ndim) cen2 = np.zeros(ndim) cen2[0] = shift...
# Copyright (C) 2013 Korei Klein <korei.klein1@gmail.com> # Constants for gl rendering of basic are collected here. from ui.render.gl import colors epsilon = 0.0001 divider_spacing = 15.0 notThickness = 22.0 notShiftThickness = notThickness + 21.0 # Amount by which to shift the value contained inside a Not. notShi...
from datetime import datetime, timedelta import pytz from flask import url_for from notifications_utils.template import ( BroadcastMessageTemplate, HTMLEmailTemplate, LetterPrintTemplate, SMSMessageTemplate, ) from notifications_utils.timezones import convert_utc_to_bst from sqlalchemy import func DAT...
""" All sort of tests for the University ID app. """ import datetime import pytz from django.db.models import Q from django.test import TestCase, override_settings from django.core.urlresolvers import NoReverseMatch, reverse from django.conf import settings from django.contrib.auth.models import AnonymousUser from bs4...
#! /usr/bin/env python3 """ Command-line script used to retrieve the last base AMI ID used for an environment/deployment/play. """ # pylint: disable=invalid-name from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from os import path import io import sy...
# import nnpy # import time # s=nnpy.Socket(nnpy.AF_SP,nnpy.REP) # # # s.bind('tcp://127.0.0.1:5555') # # # s.setsockopt(option=nnpy.RCVBUF,level=nnpy.SOL_SOCKET,value=1024*1024) # # s.getsockopt(option=nnpy.RCVBUF,level=nnpy.SOL_SOCKET) # # counter=0 # while True: # try: # res=s.recv(flags=nnpy.DONTWAIT) ...
#!/usr/bin/python # coding: UTF-8 from tweepy.error import TweepError import random import re from const import * from words import * from replies import replies import datetime import logging from API import GetAPI logging.basicConfig(level=LOGLEVEL) api = None # 説明 # 関数リスト # FUNCTION_NAME(args) > Returns(SUCCES...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('books', '0002_auto_20150710_0324'), ] operations = [ migrations.AddFie...
from functools import wraps from re import search from subprocess import call from logging import getLogger from core.exceptions import TokenizationError log = getLogger("Tokenizer") def exception_decorator(func): @wraps(func) def func_wrapper(*args, **kw): try: return func(*args, **kw) ...
# ------------------------------------------------------------------------------- # Copyright (c) 2012 Gael Honorez. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0 # which accompanies this distribution, and is available at # http://...
#!/usr/bin/env python3 import pyaudio import socket import sys import zlib import time import threading from threading import Thread import argparse import audioop from threading import Timer import RPi.GPIO as gpio dicIPSO = {} #Diccionario IP - StreamOutput recordEvent = threading.Event() clientEvent = threading.Ev...
import unittest from enos.utils.network_constraints import * from enos.provider.host import Host class TestExpandDescription(unittest.TestCase): def test_no_expansion(self): desc = { 'src': 'grp1', 'dst': 'grp2', 'delay': 0, 'rate': 0, 'symetric'...
# -*- 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...
"""Functions and classes for communication with Dawn.""" import asyncio import os import socket import threading import time import sys import selectors import csv import aio_msgpack_rpc as rpc from . import runtime_pb2 from . import ansible_pb2 from . import notification_pb2 from .util import * UDP_SEND_PORT = 1235 ...
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import codecs import os import re import urllib2 import urlparse from xml.dom.minidom import Document # Path to the XML file with signatures MSSQL_XML = os.path.abspath("../...
#!/usr/bin/python # -*- coding: utf-8 -*- possibleLanguages = { "Afar": "a", "Abkhazian": "ab", "Afrikaans": "af", "Akan": "ak", "Albanian": "sq", "Amharic": "am", "Arabic": "ar", "Aragonese": "an", "Armenian": "hy", "Assamese": "as", "Avaric": "av", "Avestan": "ae", ...
import signal import unittest import time from . import website as w class EulerProblem(unittest.TestCase): problem_id = None def solver(self, input_val): raise NotImplementedError() simple_input = None simple_output = None real_input = None def solve_real(self): """ ...
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Create certificates for a cluster. """ from twisted.python.filepath import FilePath from subprocess import check_call class CertAndKey(object): """ Paths to a matching pair of certificate and key files. :ivar FilePath certificate: Path to th...
# Copyright 2016 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. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class _NoGpuSharedPageState(shared_p...
#!/usr/bin/python3 # -*- coding: UTF-8 -*- # -------------------------------------------------------------------------------- # Libraries # -------------------------------------------------------------------------------- import os import sys # -------------------------------------------------------------------------...
# Copyright (c) 2017, the ElectrumX authors # # All rights reserved. # # The MIT License (MIT) # # 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 limit...
################################################################################ # # Copyright 2015-2020 Félix Brezo and Yaiza Rubio # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwa...
# vim: set fileencoding=utf-8 # Mountpoint selector accordion and page classes # # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your o...
# Copyright (c) 2015 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/licenses/LICENSE-2.0 # # Unless ...
#!/usr/bin/env python '''pytopo module: display tiled maps from a variety of sources, along with trackpoints, waypoints and other useful information. Copyright 2005-2021 by Akkana Peck. Feel free to use, distribute or modify this program under the terms of the GPL v2 or, at your option, a later GPL versio...
# Copyright 2013 Google 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 applicable law or a...