code
stringlengths
1
199k
""" Django settings for smartoo project. """ import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '24o@tak8xtx)mr*@uia!_(abl5jnru(@-_u^4&t@0c$t$zy=a1' DEBUG = True TEMPLATE_DEBUG = True ADMINS = (('Tomas Effenberger', 'xeffenberger@gmail.com')) ALLOWED_HOSTS = [] INSTALLED_APPS = ( # django ...
""" EasyBuild support for a intel+CUDA compiler toolchain. :author: Ake Sandgren (HPC2N) """ from easybuild.toolchains.iimpic import Iimpic from easybuild.toolchains.iimklc import Iimklc from easybuild.toolchains.fft.intelfftw import IntelFFTW from easybuild.toolchains.linalg.intelmkl import IntelMKL class Intelcuda(Ii...
''' Copyright 2009, 2010 Anthony John Machin. All rights reserved. Supplied subject to The GNU General Public License v3.0 Created on 28 Jan 2009 Last Updated on 10 July 2010 As test20 with tests of: rules instantiation and query inference Related: single dict TS recursion rule plus generic rule + minimal data:...
from barecmaes2_wrap import * from math import * from libarray import * from random import random from function import linspace xmeas = linspace(0, 1.2, step=0.1) def f(x, u0, ua, ub, vth): tox = 1e-1 return u0/(1.0+(ua/tox)*(x-vth)+(ub/tox/tox)*(x-vth)**2) ymeas = array([f(x, 300, -0.04, 0.04, -0.20) for x in ...
""" Config access class @contact: Debian FTPMaster <ftpmaster@debian.org> @copyright: 2008 Mark Hymers <mhy@debian.org> @license: GNU General Public License version 2 or later """ import grp import os import apt_pkg import socket default_config = "/etc/dak/dak.conf" #: default dak config, defines host properties impor...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.auth.forms import UserCreationForm from django.views.generic import TemplateView urlpatterns = patterns('', url(r'^login', 'django.contrib.auth.views.login', {'template_name': 'login.html'}), ...
"""mobiunpack.py - MobiPocket handling (extract pictures) for Comix. Based on code from mobiunpack by Charles M. Hannum et al. """ from __future__ import absolute_import import imghdr import re import struct try: range = xrange # Python2 except NameError: pass class unpackException(Exception): pass class S...
from django.utils import timezone from datetime import date from django.core import serializers from django.test import TestCase from edc_appointment.models import Appointment from edc_constants.constants import YES, POS, COMPLETED_PROTOCOL_VISIT from edc_lab.lab_profile.classes import site_lab_profiles from edc_lab.la...
import gtk import gnome import gnome.ui import gtk.gdk import pango import notemeister class TitleBuffer(gtk.TextBuffer): def __init__(self): gtk.TextBuffer.__init__(self) self.create_tag('welcome', weight=pango.WEIGHT_BOLD, scale=pango.SCALE_LARGE, justification=gtk.JUSTIFY_CENTER) self.create_t...
import re r = re.match(r'^\d{3}\-\d{3,8}$', '010-12345') a = 'a b c' print(r) print(a.split(' ')) print(re.split(r'\s+', a))
""" This file is part of qnotero. qnotero 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. qnotero is distributed in the hope that it will be ...
# -*- encoding: utf-8 -*- import account_move_line
""" Service layer, for storing/retrieving Resulting Figures in TVB. .. moduleauthor:: Ciprian Tomoiaga <ciprian.tomoiaga@codemart.ro> .. moduleauthor:: Lia Domide <lia.domide@codemart.ro> """ import os import Image if not hasattr(Image, 'open'): from Image import Image import base64 import xml.dom.minidom from Stri...
from PySide.QtCore import * class Cursor(QObject): changed = Signal() def __init__(self, address=0, nibble=0): super(Cursor, self).__init__() self._address = address self._nibble = nibble @property def address(self): return self._address @address.setter def addres...
MALICIOUS = 'malicious' BENIGN = 'benign' def labelBooleanToString(label): if label: return MALICIOUS else: return BENIGN def labelStringToBoolean(label): return label == MALICIOUS
__author__ = 'aclima' import sys import re import urllib.request import urllib.error def recursive_url_deepening_search(cur_url): try: content = urllib.request.urlopen(cur_url).read() links = linkregex.findall(content.decode("latin1")) except ValueError: visited_urls[cur_url] = False ...
""" Plugin for UrlResolver Copyright (C) 2021 gujal 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 ...
import pygame from pygame.locals import * import sprite import player from cnst import * def init(g, r, n, *params): s = sprite.Sprite3(g, r, 'blob', (0, 0, 13, 11)) s.rect.bottom = r.bottom s.rect.centerx = r.centerx s.groups.add('solid') s.groups.add('enemy') s.hit_groups.add('player') s.h...
import sys def enabled(): return ('--remote_debug-host' in sys.argv and '--remote_debug-port' in sys.argv) def init(): import nova.conf CONF = nova.conf.CONF # NOTE(markmc): gracefully handle the CLI options not being registered if 'remote_debug' not in CONF: return if not (C...
from itertools import permutations import fnmatch import sys import tempfile import portage from portage import os from portage import shutil from portage.const import (GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH, USER_CONFIG_PATH) from portage.dep import Atom, _repo_separator from portage.package.ebuild.config import confi...
""" epmapper DCE/RPC """ import dcerpc as __dcerpc import talloc as __talloc class epm_rhs_ncalrpc(__talloc.Object): # no doc def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(S, *more): # real signature unknown; restored from __...
from __future__ import unicode_literals from django.db import migrations def add_favors(apps, schema_editor): Flavor = apps.get_model("create", "Flavor") add_flavor = Flavor(label="micro", vcpu="1", memory="512", disk="20") add_flavor.save() add_flavor = Flavor(label="mini", vcpu="2", memory="1024", dis...
""" fanchart report """ from math import pi, cos, sin, log10, acos def log2(val): """ Calculate the log base 2 of a value. """ return int(log10(val)/log10(2)) from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext from gramps.gen.errors import ReportError from gramps.gen.p...
''' Simple XBMC Download Script Copyright (C) 2013 Sean Poyser (seanpoyser@gmail.com) 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 yo...
from nose.tools import * import NAME def setup(): print("SETUP!") def teardown(): print("TEAR DOWN!") def test_basic(): print("I RAN")
import sys import re import string import getopt import os sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../support/')) from spellverb import * scriptname = os.path.splitext(os.path.basename(sys.argv[0]))[0] scriptversion = '0.1' AuthorName="Taha Zerrouki" MAX_LINES_TREATED=1100000; replacement={ "10":"Ta...
background_image_filename = 'sushiplate.jpg' sprite_image_filename = 'fugu.png' import pygame from pygame.locals import * from sys import exit from gameobjects.vector2 import Vector2 from math import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) background = pygame.image.load(background_image_file...
from openrazer_daemon.dbus_services import endpoint @endpoint('razer.device.lighting.logo', 'setLogoStatic', in_sig='yyy') def set_logo_static_naga_hex_v2(self, red, green, blue): """ Set the device to static colour :param red: Red component :type red: int :param green: Green component :type gre...
import math def lcol(a): '''limits the range of a value to 0...255 to prevent overflow/out of range errors''' if a<0: return 0 if a>255: return 255 return a def id_to_color(id): '''calculated unique color from id''' return (id%254+1,(id/254)%255,(id/254/255)%255) def color_to_id(color): ...
from Scene import Scene, SuppressScene import os import time import Player import Dialogs import Song import Config import pygame from OpenGL.GL import * import Version from Menu import Menu from Settings import ConfigChoice, ActiveConfigChoice from Language import _ from Camera import Camera from Mesh import Mesh from...
from gi.repository import Gtk import gettext _ = lambda x: gettext.ldgettext("blivet-gui", x) class ActionsMenu(object): """ Popup context menu for devices """ def __init__(self, blivet_gui): self.blivet_gui = blivet_gui self.menu = Gtk.Menu() # Dict to translate menu item names (str...
import gi gi.require_version("BlockDev", "1.0") from gi.repository import BlockDev as blockdev from ... import udev from ...devices import LUKSDevice from ...errors import DeviceError, LUKSError from ...flags import flags from .devicepopulator import DevicePopulator from .formatpopulator import FormatPopulator import l...
""" Wrapper for "gimp" command """ import glob import os import signal import sys from typing import List import command_mod import subtask_mod class Options: """ Options class """ def __init__(self) -> None: self.parse(sys.argv) def get_pattern(self) -> str: """ Return filte...
class Position(object): ''' Represents a set of trades on the same stock. ''' def __init__(self, trades): self.trades = trades def Quantity(self): ''' The quantity of the position.''' quantity = 0.0 for trade in self.trades: quantity += trade.Quantity() ...
import unittest import sys import os import subprocess import tempfile import shutil from glob import glob try: from configparser import RawConfigParser except ImportError: # python 2 from ConfigParser import RawConfigParser sysv_generator = os.path.join(os.environ.get('builddir', '.'), 'systemd-sysv-genera...
__revision__ = "$Id$" import string import os import time import calendar from invenio.config import CFG_SITE_URL, CFG_SITE_LANG, CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS, CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS_CLIENT_IP_DISTRIBUTION, CFG_WEBDIR from invenio.messages import gettext_set_language from invenio.intbitset import intbitse...
from lrparsing import ( Grammar, Keyword, List, Opt, Prio, Repeat, Ref, Right, THIS, Token, Tokens, TokenRegistry) class Lua52Grammar(Grammar): class T(TokenRegistry): name = Token(re='[a-zA-Z_][a-zA-Z_0-9]*') short_string = Token(re=r'"(?:[^"\\]|\\.)*"' + "|" + r"'(?:[^'\\]|\\.)*'")...
''' Tasks: tasks object model some sort of VDSM task (storage task). A task object may be standalone (unmanaged task), but then it is limited and cannot be automatically persisted or run (asynchronous jobs). A managed task is managed by a TaskManager. Under the task manager a task may persist itself...
""" Django settings for cinema project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '...
import time import random import RPi.GPIO as GPIO MAIL_CHECK_FREQ = 1 # check mail every 60 seconds GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GREEN_LED = 23 RED_LED = 18 BLUE_LED = 24 GPIO.setup(GREEN_LED, GPIO.OUT) GPIO.setup(RED_LED, GPIO.OUT) GPIO.setup(BLUE_LED, GPIO.OUT) the_number = random.randrange(1, 1001)...
import urllib2,urllib,re,os import random import urlparse import sys import xbmcplugin,xbmcgui,xbmc, xbmcaddon, downloader, extract, time import tools from libs import kodi from tm_libs import dom_parser from libs import log_utils import tools from libs import cloudflare from libs import log_utils from tm_libs import d...
import pprint from collections import OrderedDict _missing = object() import networkx as nx from io import BytesIO def graph_to_svg(g): """ return the SVG of a matplotlib figure generated from a graph ref: http://pig-in-the-python.blogspot.com/2012/09/ """ try: import matplotlib.pyplot as pl...
lista = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','ä','ë','ï','ö','ü','á','é','í','ó','ú','â','ê','î','ô','û','à'...
exampleLondonWeather = ''' { "coord":{ "lon":-81.23, "lat":42.98 }, "sys":{ "type":1, "id":3678, "message":0.036, "country":"CA", "sunrise":1410433257, "sunset":1410478901 }, "weather"...
from flask import Flask, jsonify from flask_swagger import swagger from app import app @app.route("/spec") def spec(): swag = swagger(app) swag['info']['version'] = "1.0" swag['info']['title'] = "My API" return jsonify(swag)
import numpy as np import math from copy import deepcopy from gimic_exceptions import NotImplemented from grid import Grid from field import ScalarField, VectorField from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot...
DATA_DIR = 'data-dir' DEFALUT_EXTRACT = 'default-extract' DEFAULT_IDENTIFY = 'default-identify' DEFAULT_RENAME = 'default-rename' PAGINATE = 'paginate' VALID_EXTS = 'valid-extensions'
import urllib import socket socket.setdefaulttimeout(3) import csv import sys import os import random WebServer = sys.argv[1] Port = sys.argv[2] RequestedMetric = sys.argv[3] URL = "/server-status?auto" def getURL(WebServer,Port,URL): try: # Setup connection string ConnectionString = ("http://%s:%s%...
import sys import os current_path = os.path.dirname(os.path.abspath(__file__)) python_path = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir, os.pardir, 'python27', '1.0')) noarch_lib = os.path.abspath( os.path.join(python_path, 'lib', 'noarch')) sys.path.append(noarch_lib) if sys.platform == "win32": ...
__author__ = 'rene' from lxml import etree from iso3166 import countries as countries_codes companies_giantbomb_xml = './data/companies.xml' companies_wikipedia_csv = './data/companies_in_csv2.csv' def parse_giantbomb_companies(): with open(companies_giantbomb_xml, 'r') as file_to_process: file_content = fi...
import argparse import time import numpy from numpy.polynomial import polynomial as poly from scipy.signal import fftconvolve, convolve from scipy.ndimage.morphology import binary_dilation class Canvas(object): class Color: VIOLET = "\033[38;5;92m" GREEN = "\033[38;5;34m" ENDC = "\033[0m" ...
from rule_editor_app import app app.run(host="0.0.0.0", debug=True)
"""Contains basic workflow types for use in workflow definitions.""" import collections from six import string_types class WorkflowMissing(object): """Placeholder workflow definition.""" workflow = [lambda obj, eng: None] class WorkflowBase(object): """Base class for workflow definition. Interface to de...
from django.db import models from sk_core.models import OwnableModel, TimestampableModel from sk_map.models import Map from django.contrib.postgres.fields import JSONField from django.contrib.auth.models import User from django.core.validators import MaxValueValidator, MinValueValidator class UserMapMembership(OwnableM...
""" | Database (Sherrill) of interaction energies for dissociation curves of doubly hydrogen-bonded bimolecular complexes. | Geometries from and original reference interaction energies from Thanthiriwatte et al. JCTC 7 88 (2011). | Revised reference interaction energies from Marshall et al. JCP 135 194102 (2011). - **c...
from mininet.topo import Topo from mininet.net import Mininet from mininet.util import dumpNodeConnections from mininet.log import setLogLevel from mininet.node import OVSController import time from matplotlib import pyplot as plt ''' Creates a star topology in mininet. Even though there are built-in classes for this, ...
import openvswitch import re import os import socket import fcntl import struct import logging import random import math import time import shelve import remote import commands from autotest.client import utils, os_dep from autotest.client.shared import error import propcan import remote import utils_misc import arch i...
""" .. module:: sb.core :synopsis: SB apps core models SB apps core models .. moduleauthor:: Amnon Janiv <amnon.janiv@ondalear.com> """ __revision__ = '$Id: $' __version__ = '0.01' from django.db import models from django.contrib.sites.models import Site from django.contrib.auth.models import User from django.c...
""" rhs : <assoc=right> left=rhs powOp='**' right=rhs """ from pynestml.meta_model.ast_expression import ASTExpression from pynestml.meta_model.ast_simple_expression import ASTSimpleExpression from pynestml.symbols.unit_type_symbol import UnitTypeSymbol from pynestml.utils.either import Either from pynestml.utils.messa...
__author__ = 'dt' class Ipv4Address: def __init__(self, address: str, mask: str="255.255.255.252"): """ Initializes an Ipv4Address Object :param address: The IPv4 address :param mask: The subnet mask """ self.__address = self.string_to_ip(address) self.__mask ...
bl_info = { "name": "Send to 3d printer", "author": "Vilem Novak", "version": (0, 1, 0), "blender": (2, 7, 0), "location": "Render > Engine > 3d printer", "description": "Send 3d model to printer. Needs Cura to be installed on your system.", "warning": "", "wiki_url": "blendercam.blogspot.com", "tracker_url": ...
from flask import Flask from flask.ext.restful import Api from flask.ext.mongoengine import MongoEngine app = Flask(__name__) api = Api(app) app.config['MONGODB_SETTINGS'] = {'DB': 'stars'} db = MongoEngine(app) from . import views
from django.test import TestCase from ..models import l_area_work class test_l_area_work(TestCase): def setUp(self): """ Set up the test subject. """ self.subject = l_area_work() def test__l_area_work__instance(self): self.assertIsInstance(self.subject, l_area_work) d...
import xml.etree.cElementTree as ET import pprint import re import codecs import json """ Your task is to wrangle the data and transform the shape of the data into the model we mentioned earlier. The output should be a list of dictionaries that look like this: { "id": "2406124091", "type: "node", "visible":"true", "cre...
import sys import os import argparse import json from bounding_box import BoundingBox def load_tiles(tiles_spec_fname, bbox): relevant_tiles = [] with open(tiles_spec_fname, 'r') as data_file: data = json.load(data_file) for tile in data: tile_bbox = BoundingBox(tile['boundingBox']) ...
import xbmc import xbmcaddon import xbmcgui import xbmcvfs import os from uuid import uuid4 as uuid4 import Utils as utils class ClientInformation(): def __init__(self): addonId = self.getAddonId() self.addon = xbmcaddon.Addon(id=addonId) self.className = self.__class__.__name__ self...
from django.shortcuts import HttpResponse,redirect from django.conf import settings import re class MiddlewareMixin(object): def __init__(self, get_response=None): self.get_response = get_response super(MiddlewareMixin, self).__init__() def __call__(self, request): response = None ...
import time, socket from multiprocessing import Process, Queue DEBUG=False def checkIPspeed(i, myPORT, mySSL): # function returns the time in msec it took to connect to the IP address specified # Note: i is one element returned by socket.getaddrinfo), so i contains something like # (10, 1, 6, '', ('2001:888...
""" Here we define entities related to user and project. .. moduleauthor:: Lia Domide <lia.domide@codemart.ro> .. moduleauthor:: Bogdan Neacsa <bogdan.neacsa@codemart.ro> .. moduleauthor:: Yann Gordon <yann@tvb.invalid> """ import datetime from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.association...
""" /*************************************************************************** LrsPlugin A QGIS plugin Linear reference system builder and editor ------------------- begin : 2017-5-29 copyright : (C) 2017 by Rad...
import tkinter as tk import os import time try: import serial serialAvail = True except ImportError: serialAvail = False print ("serial module not available!") print ("user interface will not control flypi!") class flypiApp: #global ser #filepath for output: basePath = '/home/pi/Desktop/...
import math import gettext __trans = gettext.translation('yali', fallback=True) _ = __trans.ugettext from PyQt4 import QtGui from PyQt4.QtCore import * import yali.context as ctx from yali.gui import storageGuiHelpers from yali.gui.Ui.partitionshrink import Ui_ShrinkPartitionWidget from yali.gui.YaliDialog import Dialo...
import pygame from transcendence.graphics.widget import Widget from transcendence.graphics.scrollable import ScrollableWidget import transcendence.graphics as graphics import transcendence.util as util def scale(*args, **kwargs): try: return pygame.transform.smoothscale(*args, **kwargs) except Exception...
"""Parsing CLI arguments. """ import os import argparse from hac.commands import app_commands """Parse arguments used in CLI parser. """ _pargs_pack_cli = [ { "names": ("location",), "params": { "help": """Contest or problem identifier. It can be either: - contest/problem URL - strin...
import pageutils from gi.repository import Gtk class ModulePage(pageutils.BaseListView): def __init__(self, parent): store = Gtk.ListStore(int, str, str, str, str, str) pageutils.BaseListView.__init__(self, store) self.parent = parent self.adjust = self.get_vadjustment() colu...
""" @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-2 B{Entropy Command Line Client}. """ import os import sys import argparse from entropy.i18n import _ from entropy.const import etpConst from _entropy.solo.commands.descriptor impor...
"""Test for WebMKS Remote Consoles of VMware Providers.""" import imghdr import socket import pytest from wait_for import wait_for from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import providers from cfme.utils import ssh from cfme.utils.conf import credentials from cfme.u...
from ycmd.completers.general_completer import GeneralCompleter from ycmd import responses class UltiSnipsCompleter( GeneralCompleter ): """ General completer that provides UltiSnips snippet names in completions. """ def __init__( self, user_options ): super( UltiSnipsCompleter, self ).__init__( user_options...
from django.contrib import admin from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile, UserProfile class RegistrationAdmin(admin.ModelAdmin): actions = ['activate_u...
""" (c) 2014 - Copyright Red Hat Inc Authors: Ralph Bean <rbean@redhat.com> Pierre-Yves Chibon <pingou@pingoured.fr> """ import docutils import docutils.core import markupsafe import markdown def modify_rst(rst, view_file_url=None): """ Downgrade some of our rst directives if docutils is too old. """ if...
import versions class Wall(versions.Test): def __init__(self,tpr): self.nwall = tpr.readInteger() if not self.nwall: self.empty = True self.type = tpr.readInteger() self.r_linpot = tpr.readReal() if tpr.version >= 50 else -1 self.atomtype = (tpr.rea...
{ "name": "MRP Workorder Lot", "version": "1.0", "author": "Vauxoo", "website": "http://www.vauxoo.com", "category": "MRP", "description": """ MRP Workorder Lot ================= This module adds two features to the mrp module. Work Order Lot -------------- **First**, create a new model named ``...
from django.urls import path from async_notifications.views import updatenewscontext, fromnewscontext, preview_email_newsletters urlpatterns = [ path('context/<int:pk>', updatenewscontext, name="updatenewscontext"), path('context/<int:pk>/form', fromnewscontext), path('context/<int:pk>/preview', preview_ema...
from __future__ import print_function, unicode_literals from future.builtins import open import os import re import sys from contextlib import contextmanager from functools import wraps from getpass import getpass, getuser from glob import glob from importlib import import_module from posixpath import join from mezzani...
import os, sys, glob if sys.platform == 'darwin': BASEDIR='/Volumes/PLUME/MWA_DATA/' CHANNELS = ['084-085','093-094','139-140','153-154','187-188'] CHANNELS = ['103-104','113-114','125-126'] polarizations=['XX','YY'] OBSIDS=['1130643536','1130643840'] finechans='f8-14' for CHANNEL in CHANNELS: for OBSID in OBSIDS: ...
import matplotlib.pyplot as plt print "Going to plot performance of simulations on Legion" times_l = {} times_l[1] = 118.76 times_l[2] = 41.56 times_l[4] = 19.19 times_l[8] = 9.57 times_l[16] = 5.23 times_l[24] = 4.08 times_l[32] = 3.13 times_l[40] = 3.19 times_l[48] = 2.72 times_l[64] = 2.16 times_s = {} times_s[1] = ...
from textwrap import dedent import attr import fauxfactory from cached_property import cached_property from cfme.utils import db, conf, clear_property_cache, datafile from cfme.utils.conf import credentials from cfme.utils.path import scripts_path from cfme.utils.wait import wait_for from .plugin import AppliancePlugin...
""" Autotest representation of qemu devices. These classes implements various features in order to simulate, verify or interact with qemu qdev structure. :copyright: 2012-2013 Red Hat Inc. """ import logging import re import traceback from collections import OrderedDict from functools import reduce from virttest import...
'''GUI interface for managing a workspace using git and darning''' import os import sys import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk _BUG_TRACK_URL = 'https://github.com/pwil3058/epygibus/issues' _DISCUSSION_EMAIL = 'pwil3058@gmail.com' _REPORT_REQUEST_MSG = \ _('''<b>Please report this prob...
import os from quodlibet.compat import urlsplit import errno from gi.repository import Gtk, GObject, Gdk, Gio, Pango from senf import uri2fsn, fsnative, fsn2text, bytes2fsn from quodlibet import formats, print_d from quodlibet import qltk from quodlibet import _ from quodlibet.util import windows from quodlibet.qltk.ge...
import gdb from linux import constants from linux import utils from linux import tasks from linux import lists from struct import * class LxCmdLine(gdb.Command): """ Report the Linux Commandline used in the current kernel. Equivalent to cat /proc/cmdline on a running target""" def __init__(self): ...
from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('ocorrencias', '0003_auto_20210406_1945'), ] operations = [ migrations.AlterField( model_name='categoria', ...
from .DatabaseEventsSource import DatabaseEventsSource
import socket from hashlib import sha1 from random import randint from struct import unpack, pack from socket import inet_aton, inet_ntoa from threading import Timer, Thread from time import sleep from bencode import bencode, bdecode BOOTSTRAP_NODES = [ ("router.bittorrent.com", 6881), ("dht.transmissionbt.com"...
__author__ = 'alexei' import pprint as pp from data_processing.util import * from data_processing.mongo import MongoORM import nltk from nltk.stem import WordNetLemmatizer as wnl wnl = wnl() ignore_set = {"\\"} import os from nltk.parse import stanford stanford_path = '/home/alexei/stanford-parser-full-2015-04-20' os.e...
import os from orange import setup console_scripts = [ 'conv=orange.utils.path:convert', 'pysdist=orange.pykit.pysetup:pysdist', 'pyupload=orange.pykit.pysetup:pyupload', 'canshu=orange.tools.ggcs:canshu', 'pyver=orange.pykit.pyver:VersionMgr.main', 'plist=orange.tools.plist:main', 'pyinit=o...
''' to test loggin''' import os import sys import string import logging fmt = '%(levelname)s:%(process)d:%(asctime)s:%(pathname)s:%(lineno)s:%(funcName)s:%(message)s' def func12(): ''' to test funcname''' logging.basicConfig(filename='./sharkserver.log', format=fmt, level=logging.DEBUG) logging.debug("debug") loggi...
import logging from telegram import ParseMode from telegram import ReplyKeyboardMarkup from os import environ from commands import botan logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) def statistic(user_id, command): botan.track(environ.get('BOTAN'), user_id, ...
class RPG: def dieRolls(self, dice): values=[0,0,0] for x in dice: dice=x.split("d") values[0]+=int(dice[0]) values[1]+=int(dice[1])*int(dice[0]) values[2]=int((values[0]+values[1])/2) return(values)
import IPy import DNS import string import socket import sys class dns_reverse(): def __init__(self, range, verbose=True): self.range = range self.iplist = '' self.results = [] self.verbose = verbose try: DNS.ParseResolvConf("/etc/resolv.conf") nameser...