text
stringlengths
12
6.59M
#!/usr/bin/python2.4 # # Copyright (c) 2006 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www...
# Copyright 2017 - 2020 by Sergio Valqui. All rights reserved. import sys import getpass import configparser import pathlib import datetime from ldap3 import Server, Connection, ALL, ALL_ATTRIBUTES class LdResponse(object): """ Class holder for the response. """ def __init__(self): self.heade...
#!/usr/bin/python # -*- coding: utf-8 -*- # # obtain pages of municipios of spain from es.wiki # # system imports from wikipedia import * import sqlite3 as lite import webbrowser # bot imports from fixies import * # configure wiki eslang = 'es' family = 'wikipedia' eswiki = getSite(eslang, family) # get all refer...
#! /usr/bin/env python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import os, sys, time, os stat = open(sys.argv[1]) line = stat.readline() while no...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 the TicketML authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE.md file. from __future__ import division, absolute_import, print_function, unicode_literals import lxml.etree f...
#! /usr/bin/env python # -*- encoding: utf-8 -*- """ Measures your typing speed in words per minute (WPM). This file is part of the wpm software. Copyright 2017 Christian Stigen Larsen Distributed under the GNU GPL v3 or later. See the file LICENSE.txt for the full license text. This software makes use of open sourc...
#! /usr/bin/env python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import os, sys, time, os stat = open(sys.argv[1]) line = stat.readline() while no...
# Copyright 2019 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...
# # @lc app=leetcode id=153 lang=python3 # # [153] Find Minimum in Rotated Sorted Array # from typing import List # @lc code=start class Solution: def findMin(self, nums: List[int]) -> int: left, right = 0, len(nums) - 1 while left < right: mid = (left + right) // 2 if nums[...
import base64 import cookielib import re import traceback import urllib import sys from urlparse import parse_qs from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_HTTP_POST from saml2.request import SERVICE2REQUEST from saml2test import CheckError, FatalError from saml2test.check import Check from sam...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re from datetime import datetime, time, timedelta from dateutil import parser from db import create_or_update_db_item from db.common import session_scope from db.game import Game from db.team_game import TeamGame from utils import ( remove_null_...
import os import tornado.web import tornado.wsgi import wsgiref.handlers from tornado.escape import json_encode, json_decode from fom.session import Fluid from fom.db import PRIMITIVE_CONTENT_TYPE import fom.errors import gmemsess class MainHandler(tornado.web.RequestHandler): def get(self, rootns): se...
import asyncio import websockets import datetime import random logLevel = 0 # Data structures clients = dict() # Each entry is one active client outgoing = dict() # Each entry is a list of pending outgoing messages for the corresponding client incoming = dict() # Each entry is a list of pending incoming messag...
import numpy as np import pandas as pd import os try: import pwd except ImportError: print "couldn't import pwd, ignoring" from kid_readout.analysis.noise_measurement import load_noise_pkl import glob import collections import time import kid_readout.analysis.kid_response kid_response = kid_readout.analysis.ki...
# -*- coding: utf-8 -*- # vim: set ts=4 # Copyright 2013, 2014 Rémi Duraffort # This file is part of RandoAmisSecours. # # RandoAmisSecours is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
"""Apache Configuration based off of Augeas Configurator.""" # pylint: disable=too-many-lines import filecmp import itertools import logging import os import re import shutil import socket import subprocess import zope.interface from acme import challenges from letsencrypt import errors from letsencrypt import inter...
""" byceps.services.verification_token.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from datetime import datetime, timedelta from typing import Optional from ...database impo...
version = "0.3.7"
# coding=utf-8 # # Copyright 2018 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 ap...
''' Main helper cog made for antinub-gregbot project. Contains several commands useful for controlling/debugging the bot ''' import logging import os from collections import deque import discord.ext.commands as commands import config def setup(bot): 'Adds the cog to the provided discord bot' bot.add_cog(Co...
#------------------------------------------------------------------------------- # # Controls shed weather station # # The MIT License (MIT) # # Copyright (c) 2015 William De Freitas # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (...
""".""" import numpy as np from pymodels import tb, ts import pyaccel KICK = 1e-5 def get_tb_posang_respm(model=None): """Return TB position and angle correction matrix.""" if model is None: model, _ = tb.create_accelerator() fam_data = tb.families.get_family_data(model) ch_idx = [fam_data[...
# -*- coding: utf-8 -*- # # Copyright (c) 2011 -- Lars Heuer <heuer[at]semagia.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above...
import tkinter as tk from tkinter import ttk import numpy as np import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt from astropy.io import fits import time import os import csv import pdb class Eyecheck(object): def __init__(self, specObj, options): # Store input variables s...
#!/bin/env python import math #import simtk.openmm.app as soa #import simtk.unit as su import sys,os import numpy as np from .fhet import hetnames,cofactors import copy MASS = {'O':15.999, 'N':14.010, 'C':12.010, 'H': 1.008, 'F':19.000, 'Na':22.99, 'NA':22.99, 'P':30.9...
# Copyright 2015 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """OSX specific utility functions.""" import cgi import ctypes import logging import os import platform import plistlib import re import struct i...
# -*- coding: utf-8 -*- # # Copyright (c) 2011 -- Lars Heuer <heuer[at]semagia.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above...
from bottle import route, request, error, abort, static_file from bottle import template, jinja2_view import bottle, waitress, os, glob, string, pprint cache = dict() def find_file(type, name): """ searches file within directory by name, ignoring extension and case """ assert type.isalpha() and name.replace('-', ...
import json import math import os from io import BytesIO import requests import tweepy from django.conf import settings from django.core.files.base import ContentFile, File from django.core.management.base import BaseCommand, CommandError from six.moves.urllib.parse import urlparse from articles.models import Articl...
import datetime import math import cdo import cmor import dateutil.relativedelta # lpjg related import gzip import io import csv # lpjg end import logging import netCDF4 import numpy import os import re # Log object from ece2cmor3 import components log = logging.getLogger(__name__) # Enum utility class class cmo...
from collections import defaultdict from collections import Iterable from collections import namedtuple from contextlib import closing from itertools import chain from jinja2 import Environment from jinja2 import FileSystemLoader from multiprocessing.pool import ThreadPool from tilequeue.config import create_query_boun...
# Webapp framework from flask import Flask, url_for # Database setup and ORM from flask_sqlalchemy import SQLAlchemy from sqlalchemy.sql import func # Support for REST API in Flask from flask_restful import Resource, Api, reqparse, fields, marshal_with # Utilities from datetime import datetime from dateutil import p...
from sh import ErrorReturnCode_1 from functools import partial from test_base import TestBase from docker_host import DockerHost class MultiHostMainline(TestBase): def test_multi_host(self): """ Run a mainline multi-host test. Almost identical in function to the vagrant coreOS demo. ...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2016 by EcpyPulses Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ----------...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.com> # # This file is part of Ansible # # Ansible 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...
from __future__ import absolute_import from collections import defaultdict from collections import namedtuple from contextlib import closing from itertools import chain from ModestMaps.Core import Coordinate from multiprocessing.pool import ThreadPool from random import randrange from tilequeue.config import create_que...
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run(host="0.0.0.0", port=1337)
# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU. # 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 ...
# -*- coding: utf-8 -*- """ edacc.views.accounts -------------------- This module defines request handler functions for user account management such as registration, login and solver submission. :copyright: (c) 2010 by Daniel Diepold. :license: MIT, see LICENSE for details. """ import itertoo...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Deepak Kothandan <deepak.kothandan@outlook.com> # (c) 2015, Stefan Berggren <nsg@nsg.cc> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms o...
#!/usr/bin/env python3 import pickle from time import sleep import argparse import io from ytd.downloader.StockDownloader import StockDownloader from ytd.downloader.ETFDownloader import ETFDownloader from ytd.downloader.FutureDownloader import FutureDownloader from ytd.downloader.IndexDownloader import IndexDownloade...
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_dosta_abcdjm_cspp @file marine-integrations/mi/dataset/parser/test/test_dosta_abcdjm_cspp.py @author Mark Worden @brief Test code for a dosta_abcdjm_cspp data parser """ import os import numpy import yaml import copy from StringIO import StringIO from no...
""" MU.py Handles all MangaUpdates information """ from difflib import SequenceMatcher from typing import List, Optional from urllib.parse import quote from pyquery import PyQuery from roboragi.session_manager import SessionManager async def get_manga_url( session_manager: SessionManager, query: str) -> Opt...
"""Pool Sheet.""" from collections.abc import Iterable from collections import namedtuple from pyramid.traversal import resource_path from pyramid.util import DottedNameResolver from substanced.util import find_catalog import colander from adhocracy_core.interfaces import ISheet from adhocracy_core.interfaces import ...
## Parser for temp_config.txt. Note that this is almost definitely not a final parser to be released, but for current use to become comfortable with ConfigParser module, etc. import os import sys import re from string import whitespace from misc import Model, Genetics from stateFreqs import * class parseConfig: ''' ...
from mothra.settings import INSTALLED_APPS appName = 'workflows' def get_installed_apps(): return [name[len(appName)+1:] for name in INSTALLED_APPS if name.startswith(appName+'.') and len(name)>len(appName)+1] #Following functions deal with imports of libraries as dicts def import_all_packages_libs_as_di...
""" Copyright 2017 Pani Networks 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, soft...
#!/usr/bin/env python # # Copyright information # # Copyright (C) 2010-2012 Dilshod Temirkhodjaev <tdilshod@gmail.com> # # License # # 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 ve...
from osv import osv, fields from tools import debug import time import pooler from dateutil import parser from datetime import date from datetime import timedelta import calendar from tools.translate import _ class ccorp_addons_account_assets(osv.osv): _name = 'account.asset.asset' _inherit = 'account.asset.asset'...
''' Views which are mapped from the URL objects in urls.py ''' import datetime from django.http import HttpResponse, Http404, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext import simplejson from tracker.models import TrackingEntry, Tbluser from utils...
#!/usr/bin/env python import os import sys import getopt import urllib2 import json import re import hashlib import datetime import logging import re import urllib import httplib from logging.handlers import SysLogHandler from ConfigParser import ConfigParser #### CONFIGURATION AND PRE-PROCESSING # The script has to r...
# -*- coding: utf-8 -*- """ edacc.views.frontend -------------------- This module defines request handler functions for the main functionality of the web application. :copyright: (c) 2010 by Daniel Diepold. :license: MIT, see LICENSE for details. """ import csv import datetime try: from c...
import os import logging from collections import defaultdict import csv logging.basicConfig(filename='tfidf_analyzer.log', level=logging.DEBUG) def retrieve_tfidf_scores(): entity_day_dict = dict() # read all files and store their contents on a dictionary for i in os.listdir(os.getcwd() + "/filtered_twee...
#!/usr/bin/python # (c) 2016, Leandro Lisboa Penz <lpenz at lpenz.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # #################################################### # Copyright (C) 2018-2020 DeadSix27 (https://github.com/DeadSix27/python_cross_compile_script) # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not di...
#!/usr/bin/env python from __future__ import print_function, division import re import sys import hashlib import json import os from collections import defaultdict from contextlib import contextmanager import subprocess import time from threading import Thread from multiprocessing import cpu_count from optparse import ...
""" Spatial verification of keypoint matches Notation:: 1_m = img1_matches; 2_m = img2_matches x and y are locations, invV is the elliptical shapes. fx are the original feature indexes (used for making sure 1 keypoint isn't assigned to 2) Look Into:: Standard skimage.transform http://stackover...
#!/usr/bin/env python # # Copyright information # # Copyright (C) 2010-2012 Dilshod Temirkhodjaev <tdilshod@gmail.com> # # License # # 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 ve...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2011 Elico Corp. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
#!/usr/bin/env python # -*- coding: us-ascii -*- # generated by wxGlade 0.6.3 on Wed Nov 12 09:39:35 2008 import wx import Network from Predicate import Predicate, CompoundPredicate # begin wxGlade: extracode # end wxGlade class Finder(wx.Dialog): def __init__(self, *args, **kwds): self.display = args...
#!/usr/bin/env python # coding: utf-8 # Copyright 2013 Abram Hindle # # 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...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from coaster.sqlalchemy import BaseMixin from .fields import FileField from .constants import PRIVACY_TYPE from ..utils import STRING_LEN, GENDER_TYPE, id_generator, object_list_to_named_dict from ..extensions import db from ..telephony import PhoneNu...
""" ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Founda...
import os, re, subprocess, json import xml.dom.minidom from sphinx.addnodes import toctree from docutils import io, nodes, statemachine, utils from docutils.parsers.rst import Directive from jinja2 import Environment, PackageLoader # Holds a cache mapping a service name to a list of regions region_cache = {} def setu...
from mysql import mysql from mysql import DB_Exception from shutil import copyfile from display_api import get_user_id from display_api import display_data_type from PIL import Image import os import os.path import shutil import bcrypt import json import tornado import time import random from tornado.escape import xhtm...
#!/usr/bin/env python3 import re import sys import hashlib import json import os from collections import defaultdict from contextlib import contextmanager import time from argparse import ArgumentParser, Namespace import asyncio from pathlib import Path from asyncio import Queue, LifoQueue from typing import Dict, Any,...
"""Debug Plugin for EasyEngine""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.core.shellexec import EEShellExec from ee.core.mysql import EEMysql from ee.core.services import EEService from ee.core.logging import Log import os def debug_plugin_hook(ap...
# -*- test-case-name: vumi.blinkenlights.tests.test_metrics -*- from twisted.internet.task import LoopingCall from vumi.service import Publisher, Consumer from vumi.blinkenlights.message20110818 import MetricMessage import time class MetricManager(Publisher): """Utility for creating and monitoring a set of met...
""" This module handles dictionary generation of classes for use in the Python environment. Dictionaries are kept in $ROOTPY_DATA for later use so they are not repeatedly regenerated """ import ROOT import os import sys import re import atexit import uuid import subprocess from rootpy.userdata import DATA_ROOT LINKDE...
""" Defines the Exception classes thrown by PyFilesystem objects. Exceptions relating to the underling filesystem are translated in to one of the following Exceptions. Exceptions that relate to a path store that path in `self.path`. All Exception classes are derived from `FSError` which can be used as a catch-all exce...
#!/usr/bin/env python2 # # xpyBuild - eXtensible Python-based Build System # # Copyright (c) 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors # Copyright (c) 2013 - 2018 Ben Spiller and Matthew Johnson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file ex...
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Founda...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The Video Widget example shows how to implement a video widget using QtMultimedia's QAbstractVideoSurface. The following is a translation into PyQt5 from the C++ example found in C:\QtEnterprise\5.1.1\msvc2010\examples\multimediawidgets\customvideosurface\customvideowi...
# coding: utf-8 from twisted.internet.defer import DeferredQueue class Empty(Exception): pass class Closed(Exception): pass class TimeoutDeferredQueue(DeferredQueue): END = object() def _timeout(self, deferred): if not deferred.called: if deferred in self.waiting: ...
import httplib2 import httplib import urllib import os import logging import time import urlparse logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger("eg_cfg") class egcfg: def __init__(s,devurl,username,password,lg): if not devurl.startswith('http'): devurl = "http://"+devurl ...
import json from flask import request, abort from sqlalchemy import and_ from sqlalchemy.orm.exc import NoResultFound from ymir.models import World, Character, Place from ymir.db import session from ymir import app @app.route("/worlds", methods=["GET"]) def worlds_get(): return json.dumps([i.to_dict() for i in ...
""" fs.remote: utilities for interfacing with remote filesystems This module provides reusable utility functions that can be used to construct FS subclasses interfacing with a remote filesystem. These include: RemoteFileBuffer: a file-like object that locally buffers the contents of a re...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import copy import datetime import json import logging import os import random import re import string import sys import argparse import mock import yaml import elastalert.config from elastalert...
""" YTArray class. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------...
# -*- encoding: utf-8 -*- # # Copyright 2015 Rackspace # 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 #...
""" fs.wrapfs: class for wrapping an existing FS object with added functionality This module provides the class WrapFS, a base class for objects that wrap another FS object and provide some transformation of its contents. It could be very useful for implementing e.g. transparent encryption or compression services...
""" YTArray class. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------...
""" fs.wrapfs: class for wrapping an existing FS object with added functionality This module provides the class WrapFS, a base class for objects that wrap another FS object and provide some transformation of its contents. It could be very useful for implementing e.g. transparent encryption or compression services...
# election/views_admin.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .controllers import election_remote_retrieve, elections_import_from_master_server from .models import Election from admin_tools.views import redirect_to_sign_in_page from ballot.models import BallotItemListManager, BallotRetur...
""" YTArray class. """ from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this so...
# -*- coding: utf-8 -*- import os from pyquery import PyQuery as pq from dash import * log = logging.getLogger(__name__) ######################################## # util ######################################## def _read(path): f = open(path, "r") page = f.read() f.close() return page def _write(pa...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) __all__ = ["StellarPopulation", "find_filter"] import numpy as np from ._fsps import driver class StellarPopulation(object): """ This is the main interf...
""" YTArray class. """ from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this so...
from typing import Sequence, Union from annotypes import Anno, Array, add_call_types from malcolm.core import CAMEL_RE, APartName, PartRegistrar from malcolm.modules import builtin, scanning # Pull re-used annotypes into our namespace in case we are subclassed APartName = APartName AMri = builtin.parts.AMri AInitial...
''' Async rework of requests-oauthlib - authors of that package take all credit! import logging from .oauth1_auth import OAuth1 from .oauth1_session import OAuth1Session from .oauth2_auth import OAuth2 from .oauth2_session import OAuth2Session, TokenUpdated __version__ = '0.8.0' import requests if requests.__versio...
# -*- coding: utf-8 -*- """ Example DU task for Dodge, using the logit textual feature extractor Copyright Xerox(C) 2017 JL. Meunier 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...
from typing import Union from annotypes import Anno, Array, add_call_types from malcolm.core import CAMEL_RE, APartName, PartRegistrar from malcolm.modules import builtin, scanning # Pull re-used annotypes into our namespace in case we are subclassed APartName = APartName AMri = builtin.parts.AMri AInitialVisibility...
#!/usr/bin/env python """Tests for the Model Migration feature""" from __future__ import print_function import argparse from contextlib import contextmanager import logging import os from subprocess import CalledProcessError import sys from time import sleep import yaml from urllib2 import urlopen from assess_user_g...
# URL shortener hostnames # # Sources: # * http://www.techmaish.com/list-of-230-free-url-shorteners-services/ # * http://longurl.org/services # # noinspection SpellCheckingInspection URL_SHORTENER_HOSTNAMES = { '0rz.tw', '1link.in', '1url.com', '2.gp', '2big.at', '2pl.us', '2tu.us', '2ya...
import logging from copy import copy from datetime import date, datetime from base64 import b64encode from stdnet import range_lookups from stdnet.utils import DefaultJSONEncoder, DefaultJSONHook, timestamp2date,\ date2timestamp, UnicodeMixin, to_string, string_type,\ ...
""" @package mi.instrument.seabird.sbe16plus_v2.ctdpf_jb.driver @file marine-integrations/mi/instrument/seabird/sbe16plus_v2/ctdpf_jb/driver.py @author Tapana Gupta @brief Driver for the CTDPF-JB instrument Release notes: SBE Driver """ __author__ = 'Tapana Gupta' __license__ = 'Apache 2.0' import re import time imp...
import json import logging import math import time import uuid from datetime import datetime from dateutil.parser import parse from steem.amount import Amount from . import state from .settings import INTERFACE_LINK, SITE_URL from .utils import get_db logger = logging.getLogger('steemrocks') logger.setLevel(logging....
import json import logging import math import time import uuid from datetime import datetime from dateutil.parser import parse from steem.amount import Amount from . import state from .settings import INTERFACE_LINK, SITE_URL from .utils import get_db, get_steem_conn, hbytes logger = logging.getLogger('steemrocks') ...
#!/usr/bin/env python import Command import recalboxFiles import zipfile import shutil from generators.Generator import Generator import fsuaeControllers from os import path class FsuaeGenerator(Generator): # from one file (x1.zip), get the list of all existing files with the same extension + last char (as number...
import dnsdb2 import json from . import check_input_attribute, standard_error_message from pymisp import MISPEvent, MISPObject misperrors = {'error': 'Error'} mispattributes = { 'input': ['hostname', 'domain', 'ip-src', 'ip-dst'], 'format': 'misp_standard' } moduleinfo = { 'version': '0.4', 'author': '...