code
stringlengths
1
199k
from noisidev import unittest from .key_signature import KeySignature class KeySignatureTest(unittest.TestCase): def test_equal(self): self.assertEqual(KeySignature(name='C major'), KeySignature(name='C major')) self.assertNotEqual(KeySignature(name='C major'), ...
from functools import partial from navmazing import NavigateToSibling, NavigateToAttribute from cfme import Credential from cfme.exceptions import CandidateNotFound, OptionNotAvailable import cfme.fixtures.pytest_selenium as sel import cfme.web_ui.toolbar as tb from cfme.web_ui import ( AngularSelect, Form, Select,...
""" Catch-up TV & More Copyright (C) 2019 SylvainCecchetto This file is part of Catch-up TV & More. Catch-up TV & More 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 t...
from distutils.core import setup from sphinx.setup_command import BuildDoc import arc.version setup(name='arc', version=arc.version.VERSION, description='Autotest RPC Client', author='Cleber Rosa', author_email='cleber@redhat.com', url='http://autotest.github.com', requires=['pygment...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('subscriptions', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( name='personalarticle', unique_together=set([('sub', 'a...
__revision__ = "$Id$" from invenio.config import CFG_SITE_URL, CFG_SITE_RECORD from invenio.websubmit_functions.Shared_Functions import ParamFromFile ## Description: function Print_Success_SRV ## This function displays a message telling the user the ## revised files have been corre...
import uuid import time from hashlib import md5 from ..json_store import LoginTokenStore __author__ = 'bromix' class AccessManager(object): def __init__(self, context): self._settings = context.get_settings() self._jstore = LoginTokenStore() self._json = self._jstore.get_data() self....
from os.path import dirname, join as path_join ADMIN_CONTACT_EMAIL = 'cbogart@cs.cmu.edu' BASE_DIR = dirname(__file__) DATA_DIR = path_join(BASE_DIR, 'data') WORK_DIR = path_join(BASE_DIR, 'work') USER_PASSWORD = { 'discoursedb': 'discoursedb' } MAX_SEARCH_RESULT_NUMBER = 1000 DEBUG = False LL_DEBUG, LL_INF...
from body3 import * function_decl(link='extern',srcp='eval.c:216', body=bind_expr( body=statement_list( E0=decl_expr( ftype=void_type(algn='8',name='126')), E1=decl_expr( ftype=void_type(algn='8',name='126')), E2=modify_expr( OP0=var_decl(algn='32',srcp='eval.c:53',used='...
from ggrade import read_tab_file import argparse def main(): # Parse the input arguments parser = argparse.ArgumentParser() parser.add_argument('infile_name', type=str, default=None, help='Input file name',nargs='?') parser.add_argument('--solutions-file', dest='outfile_name', type=str,\ def...
from smart.interfaces.up2date.progress import Up2dateProgress from smart.interfaces.up2date import rhnoptions from smart.interface import Interface, getScreenWidth from smart.util.strtools import sizeToStr, printColumns from smart.const import OPTIONAL, ALWAYS, DEBUG from smart.fetcher import Fetcher from smart.report ...
import xbmc,xbmcgui,xbmcplugin,sys icondir = xbmc.translatePath("special://home/addons/plugin.audio.radio7ulm/icons/") plugin_handle = int(sys.argv[1]) def add_video_item(url, infolabels, img=''): listitem = xbmcgui.ListItem(infolabels['title'], iconImage=img, thumbnailImage=img) listitem.setInfo('video', infol...
import argparse import logging import logging.handlers import os import shlex import subprocess import sys import traceback import libvirt from virtcli import CLIConfig from . import util from .clock import Clock from .cpu import CPU from .deviceaudio import VirtualAudio from .devicechar import (VirtualChannelDevice, V...
""" WSGI config for elmolino project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "elmolino.settings") from django.core.wsg...
from django.core.urlresolvers import resolve from django.template.loader import render_to_string from django.test import TestCase from django.http import HttpRequest from django.utils.html import escape from unittest import skip from lists.views import home_page from lists.models import Item, List from lists.forms impo...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dns', '0002_auto_20151228_0134'), ] operations = [ migrations.CreateModel( name='Redirection', fields=[ ('id', mo...
import os,sys,cv2,pdb from sklearn.decomposition import TruncatedSVD from pylab import * def get_feature(imgpath): img = cv2.imread(imgpath,0) img = cv2.resize(img,(32,64)) img = np.float32(img) img = img / 255 img = np.reshape(img, (1,32*64)) return img def extract_sample_from_image(imgdir): ...
import fsui class TextArea(fsui.TextArea): pass
from ctypes import * import ctypes from ctypes.wintypes import * from _ssl import SSLError import sys CRYPT32 = windll.Crypt32 SCHANNEL = windll.SChannel SCH_CRED_NO_SYSTEM_MAPPER = 0x00000002 SCH_CRED_NO_DEFAULT_CREDS = 0x00000010 SCH_CRED_REVOCATION_CHECK_CHAIN = 0x00000200 SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROO...
""" """ import cgi, gettext, os, sys import cgitb; cgitb.enable() sys.path.insert(2, sys.path[0] + '/../../..') from pxStats.lib.StatsPaths import StatsPaths from pxStats.lib.GnuQueryBroker import GnuQueryBroker from pxStats.lib.RRDQueryBroker import RRDQueryBroker from pxStats.lib.LanguageTools import LanguageTools fr...
from django.db import models class Tipo_Vehiculo(models.Model): """docstring for Tipo_Vehiculo""" def __init__(self, *args, **kwargs): super(Tipo_Vehiculo, self).__init__(*args, **kwargs) tipo_vehiculo = models.CharField(max_length=100, unique=True) adicional1 = models.CharField(max_length=250, ...
import unittest import time from Communication import Communication class CommunicationTest(unittest.TestCase): def setUp(self): ''' Verify environment is setup properly. ''' self.controller = Communication() self.b_list = self.controller.get_bluetooth_list() def tearDown...
import xbmc import xbmcgui import xbmcaddon import xbmcplugin import sys import urllib import shows import settings def menu(handle): total_items = 4 addDirectory(handle, 'All', 14, True, settings.addon_path + '/manage.png', total_items) addDirectory(handle, 'Continuing', 14, True, settings.addon_path + '/m...
import time import numpy from golib.config.golib_conf import gsize, B, W, E import camkifu.stone from camkifu.core import imgutil class StonesFinderTuto(camkifu.stone.StonesFinder): """ This class has been used to write a tutorial on how to create a new StonesFinder. Run Camkifu with this class as the default S...
from Adafruit_ADS1x15 import ADS1x15 as A2DObject from functools import partial class aiChannel: def __init__(self,confDict): #open connection on physicalChannel self.name = confDict['labelText'] self.i2cAddress = confDict['i2cAddress'] self.connectionType = confDict['connectionType'...
import os, sys class Config: instance = None def __init__(self): self.colours = { # Colours specified as name : (red, green, blue), value range 0..999 'fg_dark' : (400, 400, 360), 'fg_normal' : (600, 600, 550), 'fg_bright' : (999, 999, 800), 'b...
""" Author: Kartamyshev A.I. (Darth Feiwante) """ def inherit_icalc_isotropic(new_structure = '', start_new_version = None, base_calculation = (None, None, None), database = None, min_mult = 1, max_mult = 1, num_points = 2, geo_folder = '', it_folder = '', override = False): """ This function makes set of stru...
import ArtusConfigBase as base def config(): conf = base.BaseConfig('mc', '2012', analysis='ee') conf["InputFiles"] = base.setInputFiles( ekppath="", nafpath="/pnfs/desy.de/cms/tier2/store/user/dhaitz/2014_08_08_data_QCD/kappa_QCD_170-250_*.root" ) conf['EnableLumiReweighting'] = True ...
import asyncio import logging import threading import os import bpy import bgl import blf import pillarsdk from . import async_loop, pillar, cache, blender, utils REQUIRED_ROLES_FOR_TEXTURE_BROWSER = {'subscriber', 'demo'} MOUSE_SCROLL_PIXELS_PER_TICK = 50 ICON_WIDTH = 128 ICON_HEIGHT = 128 TARGET_ITEM_WIDTH = 400 TARG...
import os import sys from optparse import OptionParser from django.core import management import syspath_override KEY_LENGTH = 50 DEFAULT_SETTINGS_PATH = '~/.pootle/pootle.conf' SETTINGS_TEMPLATE_FILENAME = 'settings/90-local.conf.sample' def init_settings(settings_filepath, template_filename): """Initializes a sam...
""" Generic EasyBuild support for building and installing software. The EasyBlock class should serve as a base class for all easyblocks. @author: Stijn De Weirdt (Ghent University) @author: Dries Verdegem (Ghent University) @author: Kenneth Hoste (Ghent University) @author: Pieter De Baets (Ghent University) @author: J...
import os.path from test.picardtestcase import PicardTestCase from picard.i18n import setup_gettext from picard.util import bytes2human class Testbytes2human(PicardTestCase): def setUp(self): super().setUp() # we are using temporary locales for tests self.tmp_path = self.mktmpdir() s...
import math from math import * finger_names = ['thumb', 'index', 'middle', 'ring', 'pinky'] ''' Function that returns the palm orientation @hand: the hand that we're analysing. ''' def palmOrientation (hand): palmNormal = hand.palm_normal y = palmNormal[1] x = palmNormal[0] #We have divided the unit sph...
import benchconfig as cfg from utils import benchutils as bu from os.path import dirname, join as pjoin class _Print: def __init__(self, logfile, maxlevel=10): self._level = 0 self._maxlevel = maxlevel self._logfile = logfile def __call__(self, arg='', end='\n'): printstr = str(a...
from django.conf.urls import patterns, url from rest_framework.urlpatterns import format_suffix_patterns from snippets.v3_0 import views urlpatterns = patterns('', url(r'^v3_0/snippets/$', views.SnippetList.as_view()), url(r'^v3_0/snippets/(?P<pk>[0-9]+)/$', views.SnippetDetail.as_view()), ) urlpatterns = forma...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zeltlager_registration', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='jugendgruppe', name='address', ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'ArtistMedia.is_default_image' db.delete_column(u'artist_artistmedia', 'is_default_image') # Deleting field 'A...
from Personne import * class AgentSpecial(Personne): """ Exemple d'héritage simple --->>>> l'héritage multiple est possible -> hérite des exceptions Classe définissant un agent spécial. Elle hérite de la classe Personne""" def __init__(self, nom, matricule): """Un agent se définit par son no...
import optparse import os import sys from util import build_utils from util import proguard_util _DANGEROUS_OPTIMIZATIONS = [ "class/unboxing/enum", # See crbug.com/625992 "code/allocation/variable", # See crbug.com/625994 "field/propagation/value", "method/propagation/parameter", "method/pr...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "labs_django.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
from django.contrib import admin from eventex.core.models import Talk from eventex.core.models import Course from eventex.core.models import Speaker from eventex.core.models import Contact class ContactInline(admin.TabularInline): model = Contact extra = 1 class SpeakerModelAdmin(admin.ModelAdmin): inlines ...
from braces.views import LoginRequiredMixin from django.views.generic import UpdateView from oauth2_provider.exceptions import OAuthToolkitError from oauth2_provider.http import HttpResponseUriRedirect from oauth2_provider.models import get_application_model as get_oauth2_application_model from oauth2_provider.settings...
from sickbeard import logger from sickbeard import tvcache from sickbeard.providers import generic class STRIKEProvider(generic.TorrentProvider): def __init__(self): generic.TorrentProvider.__init__(self, "Strike") self.supportsBacklog = True self.public = True self.url = 'https://ge...
from gluon.contrib.appconfig import AppConfig myconf = AppConfig(reload=True) if not request.env.web2py_runtime_gae: ## if NOT running on Google App Engine use SQLite or other DB db = DAL(myconf.get('db.uri'), pool_size = myconf.get('db.pool_size'), migrate_enabled = myconf.get('db.mig...
from trueskill import TrueSkill, Rating, rate import argparse from pytba import api as tba import math class FrcTrueSkill: def __init__(self): self.env = TrueSkill(draw_probability=0.02) self.trueskills = {} self.events = {} def update(self, red_alliance, red_score, blue_alliance, blue_s...
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('helpdesk', '0027_auto_20190826_0700'), ] operations = [ migrations.AlterField( model_name='followup', n...
import os from pyramid.httpexceptions import HTTPFound from autonomie.forms.admin import ( ActivityConfigSchema, ) from autonomie.models.activity import ( ActivityType, ActivityMode, ActivityAction, ) from autonomie.views.admin.accompagnement import ( BaseAdminAccompagnement, AccompagnementIndex...
import os import sys from constants import * reload(sys).setdefaultencoding("utf-8") from PyQt4 import QtCore from PyQt4 import QtGui from uiQt_aboutdialog import Ui_aboutDialog class aboutDialog(QtGui.QDialog, Ui_aboutDialog): def __init__(self): QtGui.QDialog.__init__(self) self.setupUi(self) ...
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from models.settingsmodel import SettingsModel from views.clipboardview import ClipBoardView from views.downloadview import DownloadView from views.settingsview import SettingsDialog, SettingsToolBar, ConfigurableToolBar import re from p...
"""Provides class BaseCodeEditor; base class for CodeEditor class in Coder and CodeBox class in dlgCode (code component) """ import wx import wx.stc import sys from pkg_resources import parse_version from psychopy.constants import PY3 from psychopy import logging from psychopy import prefs from ..themes import ...
import re import keyword import logging import builtins from keypad.api import BufferController, autoconnect from keypad.core.syntaxlib import SyntaxHighlighter, lazy _python_kwlist = frozenset(keyword.kwlist) - frozenset('from import None False True'.split()) _python_builtins = frozenset(x for x in dir(builtins) if no...
""" __init__.py ist303-miye Copyright (C) 2017 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. This program is distributed in ...
""" model.py by Ted Morin contains a function to predict 10-year Atrial Fibrilation risks using beta coefficients from 10.1016:S0140-6736(09)60443-8 2010 Development of a Risk Score for Atrial Fibrillation in the Community Framingham Heart Study translated and optimized from FHS online risk calculator's javascript func...
from django.db.models import Q from pootle_statistics.models import SubmissionTypes from pootle_store.constants import FUZZY, TRANSLATED, UNTRANSLATED from pootle_store.util import SuggestionStates class FilterNotFound(Exception): pass class BaseUnitFilter(object): def __init__(self, qs, *args_, **kwargs_): ...
import random from .tiles import base INITIAL_TILES = [ base.ASSASSIN, base.BOWMAN, base.CHAMPION, base.DRAGOON, base.FOOTMAN, base.GENERAL, base.KNIGHT, base.LONGBOWMAN, base.MARSHALL, base.PIKEMAN, base.PIKEMAN, base.PRIEST, base.RANGER, base.SEER, base.WIZARD, ] class Game(object): def __init__(self,...
import sys import re import subprocess from jinja2 import Template import replacements TEMPLATENAME = "base.svg.template" MODIFIERS = [ [], ["SHIFT"], ["MOD3"], ["MOD3", "SHIFT"], ["MOD4"], ["MOD4", "SHIFT"], ["MOD3", "MOD4"], [] ] LAYERNAMES = ["1...
import pygame from vec_2d import Vec2d import time from types import * from graphics_helper import Plotter class TGameMenu: def __init__(self, screen, bg_image, logo1, menu_items, start_vec, spacing=50): # Currently selected menuitem's index self.pos = 0 # List of menuitems self.menu...
import logging import os.path import re import time import urllib.parse import scrapy from spidermonkey import Spidermonkey import django django.setup() from proxy.models import Proxy from proxy.utils import needs_proxy logger = logging.getLogger(__name__) class RetryPartial(object): """Middleware to consider parti...
import os import argparse import datetime import yaml import api.src.common.initial_environment_config from ..models.dense import create_model from ..data_processing.data_generator import DataGenerator from ..common.config import TrainingConfig, DataConfig, Config from ..common.utils import print_info, ensure_dir from ...
import re import urllib import base64 from channelselector import get_thumb from core import httptools from core import jsontools from core import scrapertools from core import servertools from core import tmdb from lib import jsunpack from core.item import Item from channels import filtertools from channels import aut...
""" Unit tests for utility functions. """ import numpy as np import pytest from thrifty import util @pytest.mark.parametrize("num", [15, 16]) def test_fft_bin(num): """Validate fft_bin against numpy's fftfreq function.""" expected = np.fft.fftfreq(num, 1./num) got = np.array([util.fft_bin(i, num) for i in r...
from commands.ServerCommand import ServerCommand from database.action_group_devices import ActionGroupDevices class DeleteActionGroupDevice(ServerCommand): """ Command handler for assigning a device to a group """ def Execute(self, request): device_id = request["args"]["device-id"] group...
from pyrob.api import * @task def task_8_28(): if wall_is_above() != True: while (wall_is_above() != True): move_up() while (wall_is_on_the_left() != True): move_left() while(wall_is_on_the_right() != True and wall_is_beneath() and wall_is_above()): move_right() ...
from unidown.tools import unlink_dir_rec class TestDeleteDirRec: def test_non_existence(self, tmp_path): no_folder = tmp_path.joinpath("./donotexist/") assert not no_folder.exists() unlink_dir_rec(no_folder) assert not no_folder.exists() def test_recursive(self, tmp_path): ...
"""Constants used in Mackup.""" VERSION = '0.8.7' PLATFORM_DARWIN = 'Darwin' PLATFORM_LINUX = 'Linux' APPS_DIR = 'applications' MACKUP_APP_NAME = 'mackup' MACKUP_BACKUP_PATH = 'Mackup' MACKUP_CONFIG_FILE = '.mackup.cfg' CUSTOM_APPS_DIR = '.mackup' ENGINE_DROPBOX = 'dropbox' ENGINE_GDRIVE = 'google_drive' ENGINE_BOX = '...
class Solution(object): def isSelfCrossing(self, x): """ :type x: List[int] :rtype: bool """ inf = float('inf') n = len(x) if n < 3: return False ruld = [0, 0, 0, 0] # right, up, left, down next_max = inf current = [-x[1], x...
from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) exce...
""" This script plots various quantities. """ from __future__ import division, print_function import numpy as np import pandas as pd import matplotlib.pyplot as plt import argparse ylabels = {"cl": r"$C_l$", "cd": r"$C_d$", "cl/cd": r"$C_l/C_d$", "k": "$k$", "omega": r"$\omega$", "epsilon": r"$\epsilon$"} de...
from __future__ import print_function try: from configparser import RawConfigParser except ImportError: from ConfigParser import RawConfigParser import glob import os import shutil import subprocess import sys config = RawConfigParser(allow_no_value=True) config.read(os.path.join('gridsync', 'resources', 'confi...
from objects.orobject import OrObject from objects.function import Function from objects.number import Number from objects.file import File from objects.inheritdict import InheritDict from objects.ordict import OrDict from objects.orddict import ODict import objects.console as console import objects.exception as except...
import sys from wazo_auth_client import Client as AuthClient from wazo_confd_client import Client as ConfdClient from xivo.chain_map import ChainMap from xivo.config_helper import read_config_file_hierarchy, parse_config_file _DEFAULT_CONFIG = { 'config_file': '/etc/wazo-upgrade/config.yml', 'auth': { '...
from server.util import ScriptManager def objectClick2_2213(player, obId, obX, obY): player.getPA().openUpBank() def objectClick2_11758(player, obId, obX, obY): player.getPA().openUpBank()
import pygame def arrow_image(color): img = pygame.Surface((7, 6)) img.fill((226, 59, 252)) img.set_colorkey((226, 59, 252), pygame.RLEACCEL) pygame.draw.polygon(img, color, ((0, 0), (3, 3), (6, 0))) return img class Menu(object): def __init__(self, font, options): self.font = font ...
__author__="jim" __date__ ="$Dec 22, 2010 3:01:06 PM$" import procgame import locale import logging from procgame import * base_path = config.value_for_key_path('base_path') game_path = base_path+"games/indyjones/" speech_path = game_path +"speech/" sound_path = game_path +"sound/" music_path = game_path +"music/" clas...
import os, sys, string import platform import yaml def get_mora_paths(): """ Returns a list of paths with MORA modules, from the env var MORA_PATH """ if not 'MORA_PATH' in os.environ: print('**ERROR** Environment variable MORA_PATH not set') sys.exit(1) sMoraPaths=os.environ['MORA_PATH']; if platform.system()...
""" ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ 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 Foun...
import xml.sax import glob from xml.etree import ElementTree import os debug = 0 currentPath = os.path.dirname(os.path.abspath(__file__)) def printl(string): if debug: print "[xml_parser:Debug] "+ str(string) def main (): p = getProviders() print p[2].getIncomingServers() def getProviderFromFilename...
from django.conf.urls import url from . import views app_name = 'persons' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^contact/$', views.contact, name='contact'), url(r'^thanks/$', views.thanks, name='thanks'), url(r'^upload/$', views.upload_file, name='upload_file'), url(r'^success...
"""Backwards compatible tunnel handler for phpsploit v1 backdoors, aka: <?php eval(base64_decode($_POST[%%PASSKEY%%])); ?> """ __all__ = ["Request_V1_x"] from . import handler from .exceptions import BuildError class Request_V1_x(handler.Request): def __init__(self): """Force default method to POST, bec...
import os.path from django import template FMT = 'JPEG' EXT = 'jpg' QUAL = 75 register = template.Library() def resized_path(path, size, method): "Returns the path for the resized image." dir, name = os.path.split(path) image_name, ext = name.rsplit('.', 1) return os.path.join(dir, '%s_%s_%s.%s' % (imag...
from src import cron from src.api import Api api = Api() def fetch_photo(): api.fetch_photo() @cron.route('/worker', methods=['GET']) def scheduler_worker(): fetch_photo() return 'fetch photo...'
''' Copyright(C) 2016, Stamus Networks Written by Laurent Defert <lds@stamus-networks.com> This file is part of Scirius. Scirius 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 ...
from inspect import isfunction from ranger.ext.signals import SignalDispatcher, Signal from ranger.core.shared import FileManagerAware from ranger.gui.colorscheme import _colorscheme_name_to_class import re import os.path ALLOWED_SETTINGS = { 'automatically_count_files': bool, 'autosave_bookmarks': bool, 'a...
import dbus import avahi import socket from folavirt.networking.NetworkInterface import NetworkInterface """ Klasa służy do rozgłąszania czegoś poprzez Avahi """ class AvahiBroadcaster(): def __init__(self, name, avahiname, avahiport): self._service_name = name self.avahiname = avahiname sel...
import logging from scap.model.oval_5.defs.independent.StateType import StateType logger = logging.getLogger(__name__) class EnvironmentVariable58StateElement(StateType): MODEL_MAP = { 'tag_name': 'environmentvariable58_state', 'elements': [ {'tag_name': 'pid', 'class': 'scap.model.oval_...
"""abydos.distance._strcmp95. The strcmp95 algorithm variant of Jaro-Winkler distance """ from collections import defaultdict from typing import Any, DefaultDict, Tuple from ._distance import _Distance __all__ = ['Strcmp95'] class Strcmp95(_Distance): """Strcmp95. This is a Python translation of the C code for ...
""" Django template tags for Omoma """
from nose.tools import assert_equal, assert_greater, assert_greater_equal, assert_less, assert_raises import time import numpy as np import audioio.playaudio as ap import audioio.audiomodules as am def test_beep(): am.enable_module() print() print('default module...') ap.beep(blocking=True) ap.beep(...
import cgi import sqlite3, re, string, codecs, os def cercaurbano(cNominativo): c = sqlite3.connect('./data/catasto.db') cur = c.cursor() cSele = "select distinct (id_i.foglio || '-' || id_i.numero ||'-'|| id_i.subalterno), \ '<a href=\"http://nominatim.openstreetmap.org/search/' \ || top.decodifica || ' ' || ind....
import os import sys import textwrap from collections import OrderedDict from argparse import ArgumentParser, RawDescriptionHelpFormatter from faice.tools.run.__main__ import main as run_main from faice.tools.run.__main__ import DESCRIPTION as RUN_DESCRIPTION from faice.tools.vagrant.__main__ import main as vagrant_mai...
"""Test class for Foreman Discovery @Requirement: Discoveredhost @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ import subprocess import time from fauxfactory import gen_string from nailgun import entities from robottelo.decorators impo...
import json import pytest from common.utils.attack_utils import ScanStatus from infection_monkey.model import VictimHost from infection_monkey.telemetry.attack.t1197_telem import T1197Telem DOMAIN_NAME = "domain-name" IP = "127.0.0.1" MACHINE = VictimHost(IP, DOMAIN_NAME) STATUS = ScanStatus.USED USAGE_STR = "[Usage in...
import ecs import raidersem import components as comp import constants as cst import utils import assets import math from sfml import sf class DrawMap(ecs.System): def __init__(self, window, mapObstacles, rs): self.window = window self.mapObstacles = mapObstacles self.rs = rs def update(...
import collections import os import sys from librarytrader.librarystore import LibraryStore s = LibraryStore() s.load(sys.argv[1]) n = 20 if len(sys.argv) > 2: n = int(sys.argv[2]) outgoing_calls = set() incoming_calls = collections.defaultdict(int) for l in s.get_library_objects(): for f, names in l.exported_a...
import feedparser import time from Adafruit_LED_Backpack import AlphaNum4 display = AlphaNum4.AlphaNum4() display.begin() RssAddress = "http://feeds.reuters.com/Reuters/domesticNews" Rss = feedparser.parse(RssAddress) display.clear() display.write_display() for i in Rss.entries: #prints title to console print (i.titl...
""" This modules contains functions reading, generating, and segmenting strain data """ import copy import logging, numpy import pycbc.noise import pycbc.types from pycbc.types import TimeSeries, zeros from pycbc.types import Array, FrequencySeries, complex_same_precision_as from pycbc.types import MultiDetOptionAppend...
""" Produce the k-mer abundance distribution for the given file. % python scripts/abundance-dist.py [ -z -s ] <htname> <data> <histout> Use '-h' for parameter help. """ from __future__ import print_function import sys import csv import khmer import argparse import textwrap import os from khmer import __version__ from k...
import datetime import os import wx from gmp.garnisher import do_garnish, BORDER_SIZE_BOTTOM from gmp.utils import GMP_OUTPUT_DIR, GMP_AUTHOR, GMP_FONT, \ GMP_DEFAULT_FONT_SIZE, GMP_OUTPUT_QUALITY, GMP_BORDER, GMP_COLOR, \ GMP_DEFAULT_MAX_SIZE, GMP_TITLE, GMP_TITLE_IMAGE, GMP_EXIF_COPYRIGHT class MyFileDropTarg...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('lizard_efcis', '0065_auto_20150818_1521'), ] operations = [ migrations.AlterField( model_name='mappingfield', name='db_datatype',...
import os import sys import shutil sys.path.insert(0, os.path.abspath('../../')) shutil.copy('../../README.rst', './README.rst') import sphinx_rtd_theme extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.mathjax', 'sphinx.ext.githubpages'] templates_path = ['APItemplates'] source_suffix =...