src
stringlengths
721
1.04M
import logging import threading import unittest from hpfeeds import client from hpfeeds.protocol import readpublish from .fakebroker import FakeBroker, setup_default_reactor class TestClientIntegration(unittest.TestCase): log = logging.getLogger('hpfeeds.testserver') def _server_thread(self): self...
#!/usr/bin/env python import os import signal import time from respeaker.bing_speech_api import BingSpeechAPI from respeaker.microphone import Microphone from respeaker.player import Player from worker_weather import Worker BING_KEY = '3560976f779d4095a7109bc55a3b0c79' mic = Microphone() bing = BingSpeechAPI(key=BI...
#!/bin/true # # config.py - part of autospec # Copyright (C) 2015 Intel Corporation # # 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 l...
# Copyright 2019 TWO SIGMA OPEN SOURCE, 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 agr...
# -*- codeing: utf-8 -*- class Calculator(object): def calculate(self, src): return self._parse_expression(src) def _parse_expression(self, src): result, src = self._parse_term(src) while src: sign = src[0] num, src = self._parse_term(src[1:]) if si...
# coding: utf-8 from errbot.backends.test import testbot import jenkinsBot class TestJenkinsBot(object): extra_plugin_dir = '.' def test_jenkins_build_no_args(self, testbot): testbot.push_message('!jenkins build') assert ('What job would you like to build?' in testbot.pop_mes...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Blockstack ~~~~~ copyright: (c) 2014-2015 by Halfmoon Labs, Inc. copyright: (c) 2016 by Blockstack.org This file is part of Blockstack Blockstack is free software: you can redistribute it and/or modify it under the terms of the GNU General...
from wtforms import fields from wtforms import Form from wtforms import validators from boilerplate.lib import utils from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras.i18n import ngettext, gettext from boilerplate import forms as forms from config import utils as bayutils FIELD_MAXLENGTH = 50 # ...
# -*- coding: utf-8 -*- import os import sys from configurl import __version__ from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] def initialize_options(self): TestCom...
from itertools import product import matplotlib.pyplot as plt from neupy import algorithms, utils, init from utils import plot_2d_grid, make_circle, make_elipse, make_square plt.style.use('ggplot') utils.reproducible() if __name__ == '__main__': GRID_WIDTH = 4 GRID_HEIGHT = 4 datasets = [ mak...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
from django.db import models class NumberedModel(models.Model): def number_with_respect_to(self): return self.__class__.objects.all() def _renumber(self): '''Renumbers the queryset while preserving the instance's number''' queryset = self.number_with_respect_to() field_name = ...
import logging from typing import List, Optional, Dict, Text from rasa.core.actions.action import ACTION_LISTEN_NAME from rasa.core.domain import PREV_PREFIX, ACTIVE_FORM_PREFIX, Domain from rasa.core.events import FormValidation from rasa.core.featurizers import TrackerFeaturizer from rasa.core.policies.memoization i...
# -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, (C) 2015 Minio, 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/licen...
from django.shortcuts import render_to_response, get_object_or_404 from django.template import Context, loader from stories.models import Story, Sprint from django.http import HttpResponse from django.views.generic import DetailView, ListView class SprintView(DetailView): days = ["", "","Mon", "", "", "", "Tue", "...
import spikes import wall import constants import collectable import data class Board: def __init__(self, game): self.xsize = 10000 self.ysize = constants.HEIGHT self.game = game # create a reference dict for the parser based off of the json dicts of cards + the wall and spikes ...
from apc_data import APCDataSet, APCSample from probabilistic_segmentation import ProbabilisticSegmentationRF, ProbabilisticSegmentationBP import pickle import os import matplotlib.pyplot as plt import numpy as np import copy import rospkg def _fast_hist(a, b, n): k = (a >= 0) & (a < n) hist = np.bincount(n ...
# Copyright 2012 IBM Corp. # # 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 t...
"""empty message Revision ID: 18e9538995d Revises: None Create Date: 2014-04-17 21:39:03.528681 """ # revision identifiers, used by Alembic. revision = '18e9538995d' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
# Webhooks for external integrations. from typing import Any, Dict, Sequence from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_variables from zerver.lib.response impo...
#! /usr/bin/env python # count the taxon number from mothur taxonomy file # by gjr; 080614 """ Count the taxon number for each taxon in mothur taxonomy file % python <thisFile> <sample.gg.taxonomy> <outfile.table> """ import sys import os import collections #EXCLUDE = ['Archaea', 'Eukaryota', 'unknown'] EXCLUDE = [...
import pytest from typing import List, Tuple from opentrons.calibration.tip_length import state_machine valid_transitions: List[Tuple[str, str, str]] = [ ('loadLabware', 'sessionStarted', 'labwareLoaded'), ('moveToMeasureNozzleOffset', 'labwareLoaded', 'measuringNozzleOffset'), ('jog', 'measuringNozzleOffset',...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/crypto.h> """ TYPES = """ static const ...
import module # unique to module import re class Module(module.Module): def __init__(self, params): module.Module.__init__(self, params, query='SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain') self.info = { 'Name': 'SSL SAN Lookup', ...
''' /* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "...
#!/usr/bin/python nctuss_symbol_names = ["nctuss_poll_emacps", "nctuss_xemacps_tx_poll", "xemacps_tx_hwtstamp", "nctuss_xemacps_rx", "nctuss_xemacps_send_skb", "nctuss_xemacps_start_xmit", "xemacps_clear_csum", "nctuss_xemacps_return_skb", "nctuss_skb_pool_return", "nctuss_...
#encoding:utf-8 import os, sys, time start_time = time.time() dicDirectory = sys.argv[1] outPutFile = sys.argv[2] outPutPath = dicDirectory + outPutFile dicArray = [] dicName = [] merge = [] '''get all dictionary in specify directory''' for file in os.listdir(dicDirectory): if file.endswith(".txt"): file...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url from django.contrib.auth.views import ( logout_then_login, login, password_change ) from django.core.urlresolvers import reverse_lazy from django.views import generic from . import views urlpatte...
from __future__ import annotations # remove in Python 3.10 # Needed for forward references, see: # https://stackoverflow.com/a/33533514/2712652 import logging from abc import ABCMeta, abstractproperty, abstractmethod from typing import Union, Iterable, Tuple import math from math import radians as deg2rad from math ...
# Copyright (c) 2015-2017 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
# Copyright 2014 Jon Eyolfson # # This file is part of Eyl Site. # # Eyl Site 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. # # Eyl S...
"""Lexer for messages received by the chat client.""" import ply.lex as lex import copy from ishyChat.Utils.Constants import MENTION, HYPERLINK, NORMAL, WHITESPACE tokens = (MENTION, HYPERLINK, NORMAL, WHITESPACE) t_WHITESPACE = r'\s+' #################### # These functions are in this order for a reason-it is the o...
# -*- coding: utf-8 -*- # # This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for # more information about the licensing of this file. """ Github auth plugin """ import json import os import flask from requests_oauthlib import OAuth2Session from inginious.frontend.user_manager import AuthMeth...
# -*- coding: utf-8 -*- import logging from django import http from django.contrib.auth.decorators import login_required from django.shortcuts import render from .models import LDAPCourse logger = logging.getLogger(__name__) @login_required def main_view(request): """Show the current user's class schedule."""...
#!/usr/bin/env python # File written by pyctools-editor. Do not edit. import argparse import logging from pyctools.core.compound import Compound import pyctools.components.deinterlace.hhiprefilter import pyctools.components.deinterlace.simple import pyctools.components.io.videofilereader import pyctools.components.qt....
from GizmoDaemon import * from GizmoScriptDefault import * import os import ReadSymLink ENABLED = True VERSION_NEEDED = 3.2 INTERESTED_CLASSES = [GizmoEventClass.Standard] MP_CONTROL_FILE = "/dev/shm/mpvfifo" REMOTE_DEVICE = ReadSymLink.readlinkabs("/dev/input/remote") class USBRemoteMP(GizmoScriptDefault): """ US...
# -*- coding: utf-8 -*- """ vm_policies_overview.py is a tool to display the policies that are applied to one or more VMs. The script will try and be intelligent and change the Ether type and Protocols to human readable text. The script will not touch null or None values, because there is a difference between None...
# -*- coding: UTF-8 -*- # Copyright (C) 2012 Dennis Gosnell # # 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...
# -*- coding: utf-8 -*- # Author: Óscar Nájera # License: 3-clause BSD """ Backreferences Generator ======================== Parses example file code in order to keep track of used functions """ from __future__ import print_function, unicode_literals import ast import codecs import collections from html import escape...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
# # # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILIT...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Netbox (http://www.netbox.rs) All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of...
# -*- coding: UTF-8 -*- #! python3 """ Isogeo API v1 - Enums for Limitation types entity accepted values. See: http://help.isogeo.com/api/complete/index.html """ # ############################################################################# # ########## Libraries ############# # ############################...
import simplejson from base import IntegrationTestBase from didthattoday.models import Step from didthattoday.models import Habit class TestStepViews(IntegrationTestBase): def create_habit(self): assert(self.session.query(Habit).count() == 0) habit = {'name': 'woo', 'description': 'hoo'} r...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
__author__ = 'dvir' import tkFileDialog import sqlite3 conn = sqlite3.connect(tkFileDialog.askopenfilename()) c = conn.cursor() # using example db def ex_show_purch(price): l = [] for row in c.execute("SELECT symbol FROM stocks WHERE price > " + str(price) + ""): print row l.append(row) p...
from allennlp.common.testing import AllenNlpTestCase from allennlp.data import Instance from allennlp.data.fields import TextField, LabelField from allennlp.data.token_indexers import PretrainedTransformerIndexer from allennlp.data.tokenizers import Token class TestInstance(AllenNlpTestCase): def test_instance_im...
"""Tree learner widget""" from AnyQt.QtCore import Qt from collections import OrderedDict from Orange.data import Table from Orange.modelling.tree import TreeLearner from Orange.widgets import gui from Orange.widgets.settings import Setting from Orange.widgets.utils.owlearnerwidget import OWBaseLearner class OWTree...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
import sys totalSuccess = 0. totalTime = 0. totalMuscodConverg = 0. totalMuscodWarmStartConverg = 0. totalCrocConverg = 0. totalConf = 0. totalIt = 0. f = open("/local/fernbac/bench_iros18/bench_contactGeneration/walk_noCroc.log","r") line = f.readline() while line.startswith("new"): totalIt += 1. line = f.r...
""" Tests the usecols functionality during parsing for all of the parsers defined in parsers.py """ from io import StringIO import numpy as np import pytest from pandas import ( DataFrame, Index, ) import pandas._testing as tm _msg_validate_usecols_arg = ( "'usecols' must either be list-like " "of al...
import argparse import sys import logging import os import errno import gzip from asyncore import read from Mutect import MutectItem, MutectResult def check_file_exists(file): if not os.path.exists(file): raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), file) def readFileMap(fileName): check_f...
''' Copyright (c) 2015 Chris Doherty, Oliver Nabavian Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
############################################### ### ### This file is generated by wpp. ### ### Input file : /scr_verus/wernerg/vrun/relRecon/relReconRepo/relReconPre.py ### Output file : relRecon.in ### Translation: 2014 Dec 04, 14:26:11 ### ### disthistMac version $Id: disthistMac.py 104 2014-04-29 03:36:27Z wernerg ...
# Copyright 2012 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 requ...
from easydict import EasyDict import requests from soccermetrics import SoccermetricsRestException from soccermetrics import __api_version__ as API_VERSION class Resource(object): """ Represents interactions with a REST API resource. Sets the high-level (versioning) endpoint for the API resource. :p...
#! /usr/bin/python # -*- coding: utf-8 -*- """MobileNet for ImageNet.""" import os import tensorflow as tf from tensorlayer import logging from tensorlayer.layers import Layer from tensorlayer.layers import BatchNormLayer from tensorlayer.layers import Conv2d from tensorlayer.layers import DepthwiseConv2d from tens...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
from setuptools import setup, find_packages from codecs import open from os import path import os here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'readme.md'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, '.library-version'), encoding='utf-8') as f: exis...
#!/usr/bin/env python # from comfychair import main, TestCase, NotRunError from pywbem import * from pywbem.mof_compiler import MOFCompiler, MOFWBEMConnection, MOFParseError from urllib import urlretrieve, urlopen from time import time import os import sys from zipfile import ZipFile from tempfile import TemporaryF...
# -*- coding: UTF-8 -*- ''' magento.customer Customer API for magento :license: BSD, see LICENSE for more details ''' from .api import API class Customer(API): """ Customer API Example usage:: from magento import Customer as CustomerAPI with CustomerAPI(url, username, pas...
# -*- coding: utf-8 -*- # Pimp - A mpd-frontend to be used as a jukebox at parties. # Copyright (C) 2010 Peter Bjørn # Copyright (C) 2010 Thomas Lundgaard # # 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 F...
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
# -*- coding: utf-8 -*- from __future__ import print_function from collections import namedtuple from ethereum import slogging from raiden.settings import DEFAULT_SETTLE_TIMEOUT from raiden.utils import sha3, profiling from raiden.network.transport import UDPTransport from raiden.network.discovery import Discovery f...
#! /usr/bin/env python """ (C) Copyright 2006-2008, by John Dickson Project Info: http://clichart.sourceforge.net/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the ...
#!/usr/bin/python ''' Ravello external inventory script ================================================== Generates inventory that Ansible can understand by making an API request to Ravello. Modeled after https://raw.githubusercontent.com/jameslabocki/ansible_api/master/python/ansible_tower_cloudforms_inventory.py R...
#!/usr/bin/python import sys,warnings import argparse VERSION="0.5" DESCRIPTION=''' circules - checks for circularity in nucleotide sequences version: v.%s # Disclaimer: # The script is currently in the beta phase. Any feedback is much appreciated. ''' %VERSION kmers = [] dic = {} seqs = {} motifs_by_regions = {} ...
# -*- coding: utf-8 -*- # # This file is part of CERN Document Server. # Copyright (C) 2016, 2017 CERN. # # CERN Document Server 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 # Licens...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import sys import os import io from setuptools import setup, find_packages BASE_DIR = os.path.join(os.path.dirname(__file__)) with io.open(os.path.join(BASE_DIR, 'README.md'), encoding='utf-8') as f: README = f.read() VERSIO...
# Copyright 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
''' Candlestick pattern functions in class type. Only need to run output function to build the dataframe for all patterns for one symbol. ''' import numpy as np import pandas as pd import json import pandas.io.data as web from datetime import date, datetime, timedelta from collections import defaultdict star...
# # iohelper.py -- misc routines used in manipulating files, paths and urls. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import os import re from ginga.misc import...
#coding='utf-8' from tkinter import * from tkinter.ttk import * import requests import urllib.parse import os import time import threading class BaiduSpider: def __init__(self): self.getNum = 0 self.failNum = 0 self.decode_dict = [{"_z2C$q": ":", "AzdH3F": "/", "_z&e3B": "."}, {"O": "O", "4...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import mock from pants.pantsd.watchman import Watchman from pants.pantsd.watchman_launch...
""" Author: Chukwubuikem Ume-Ugwa Email: chubiyke@gmail.com MIT License Copyright (c) 2017 CleverChuk 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This script is a simple wrapper which prefixes each i3status line with custom # information. It is a python reimplementation of: # http://code.stapelberg.de/git/i3status/tree/contrib/wrapper.pl # # To use it, ensure your ~/.i3status.conf contains this line: # output_...
__doc__= "Generate specfiles with EADL97 shell transition probabilities" import os import sys import EADLParser Elements = ['H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', ...
from distutils.core import setup import os long_desc = 'Add a fallback short description here' if os.path.exists('README.txt'): long_desc = open('README.txt').read() # Write a versions.py file for class attribute VERSION = "0.0.1" def write_version_py(filename=None): doc = ("\"\"\"\n" + "This is ...
# -*- coding: utf-8 -*- """Base MongoDB models (heavily inspired by Flask-MongoEngine)""" import itertools from collections import Mapping, OrderedDict import mongoengine from flask import abort from mongoengine import ValidationError from mongoengine.base.fields import BaseField from mongoengine.queryset import Mul...
#! /usr/bin/python #-*- coding: utf-8 -*- import datetime today = datetime.datetime.now() Autocompleter = {} Autocompleter["directive"] = ["define", "include", "ifndef", "endif", "undef", "if", "elif", "else", "error", "warning"] #from const.h const = [ "PI", "HALF_PI", "TWO_PI", "DEG_TO_RAD", "RAD_TO_DEG", "NULL", ...
# This file exists under 2 names. The 'real' one is launch.py. # launch.pyw is a hard link to launch.py # (launch.pyw - a .pyw since we're launching without a console window) import appdirs import glob import logging import logging.config import os import platform import sys import subprocess # Just for the launche...
#!/usr/bin/python from convert_line_endings import convert_line_endings import os import re import sys def strip_trailing_whitespace(file_path): with open(file_path, mode='rt') as infile: lines = infile.readlines() with open(file_path, mode='wt') as outfile: for line in lines: str...
#! /usr/bin/env python import os import shlex import shutil import subprocess import sys WGRIB_PATH='./wgrib' EGREP_PATH='egrep' GREP_PATH='grep' NCEP_GRID_TYPE=3 # http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html class DataConverter: FNULL=open(os.devnull, 'w') def __init__(self, wgrib_path=WGRIB_...
import os def executeFormula(fIn, fOu, nrow, n, s): # v=0 #init. not required; it can interfere with the try/except structure pos = s.find("v") if pos == -1: print("missing 'v' in formula, row", nrow, "\nexecution stopped in error") fIn.close() fOu.close() os...
# -*- coding: utf-8 -*- # # PyKMIP documentation build configuration file, created by # sphinx-quickstart on Mon Jan 25 17:12:29 2016. # # 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 file. # # Al...
from argparse import ArgumentParser from typing import Any, Dict, List, Set from django.core.management.base import CommandError from zerver.lib.management import ZulipBaseCommand from zerver.lib.topic_mutes import build_topic_mute_checker from zerver.models import Recipient, Subscription, UserMessage, UserProfile ...
from __future__ import division, print_function, absolute_import, unicode_literals import subprocess from itertools import chain import yaml import six from mog_commons.case_class import CaseClass from mog_commons.functional import oget from javactl.setting import arg_parser from javactl.setting.app_setting import App...
from . import _vmray # noqa import os import sys sys.path.append('{}/lib'.format('/'.join((os.path.realpath(__file__)).split('/')[:-3]))) __all__ = ['cuckoo_submit', 'vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'cve_advanced', 'dns', 'btc_steroids', 'domaintoo...
"Script for everything Order related in the database" import typing from datetime import datetime from utils import first from hlds.definitions import location_definitions from .database import db from .user import User class Order(db.Model): "Class used for configuring the Order model in the database" id = ...
from collections import OrderedDict import json import logging LOG = logging.getLogger(__name__) class ParallelIdentifier(object): def __init__(self, parallel_id=[]): self._entries = OrderedDict([(int(op_id), int(par_idx)) for op_id, par_idx in parallel_id]) @property def index...
import numpy import numpy as np import numpy.random import random import json import time from datetime import datetime import requests from scipy.linalg import norm import time from multiprocessing import Pool import os import sys try: import next.apps.test_utils as test_utils except: sys.path.append('../../.....
#!/usr/bin/env python from __future__ import print_function import argparse import json import os import signal import sys import frida """ Frida BB tracer that outputs in DRcov format. Frida script is responsible for: - Getting and sending the process module map initially - Getting the code execution events - Pars...
#!/usr/bin/python # Make.py tool for managing packages and their auxiliary libs, # auto-editing machine Makefiles, and building LAMMPS # Sytax: Make.py -h (for help) import sys,os,commands,re,copy # switch abbrevs # switch classes = created class for each switch # lib classes = auxiliary package libs # build class...
#!/usr/bin/env python3 ############################################################################### # Module Imports ############################################################################### import arrow import collections import fnmatch import pyscp import re import threading from . import core, lex #####...
################################################################################################## # Python module for IDAPython scripts executed via idascript. # # Copied from the original idascript utility, with minor changes: http://www.hexblog.com/?p=128 # # Craig Heffner # 14-November-2012 # http://www.tacn...
# -*- coding: utf-8 -*- import re from pyload.plugin.internal.MultiHoster import MultiHoster class DebridItaliaCom(MultiHoster): __name = "DebridItaliaCom" __type = "hoster" __version = "0.17" __pattern = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' __config = [("use_premium", "...
# coding: utf-8 # pylint: disable = invalid-name, W0105, C0111, C0301 """Scikit-Learn Wrapper interface for LightGBM.""" from __future__ import absolute_import import numpy as np from .basic import Dataset, LightGBMError from .compat import (SKLEARN_INSTALLED, LGBMClassifierBase, LGBMDeprecated, ...
import logging from mercury.common.configuration import MercuryConfiguration from mercury.common.task_managers.base.manager import Manager from mercury.common.task_managers.redis.task import RedisTask from mercury.common.clients.router_req_client import RouterReqClient from mercury.backend.rpc_client import RPCClient...
# -*- coding:utf-8 -*- from __future__ import division import sys sys.path.append('../../../../../rtl/udm/sw') import time import udm from udm import * sys.path.append('..') import sigma from sigma import * def test_mul_sw(sigma, a, b): sigma.tile.udm.wr32(0x6000, a) sigma.tile.udm.wr32(0x6004, b) corr...
import os.path from bs4 import BeautifulSoup title = "Crime and Punishment" author = "Fyodor Dostoyevsky" name = "crimeandpunishment" short = "fdcp" chapters = [] filenames = [] nfiles = len(os.listdir('_include')) for jm1 in range(nfiles): j = jm1+1 print "-"*20 print "chapter id: %d"%(j) filen...