text
stringlengths
1
927k
from __future__ import unicode_literals import re from itertools import cycle import six import datetime import time import uuid import logging import docker import threading import dateutil.parser from boto3 import Session from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.iam import iam_back...
import hashlib from xml.dom import NamespaceErr from defusedxml import ElementTree as ET from dojo.models import Endpoint, Finding __author__ = 'dr3dd589' class SslscanParser(object): def get_scan_types(self): return ["Sslscan"] def get_label_for_scan_types(self, scan_type): return scan_t...
import pytest import math import numpy as np from numpy.testing import assert_equal from numtypes import nint32 def test_basic(): x = nint32(3) assert x == 3 assert int(x) == 3 @pytest.mark.parametrize('typ', [np.int8, np.uint8, np.int16, np.uint16, np.int32, np.uint32, ...
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
''' .. module:: skrf.io ======================================== io (:mod:`skrf.io`) ======================================== This Package provides functions and objects for input/output. The general functions :func:`~general.read` and :func:`~general.write` can be used to read and write [almost] any skrf object...
# Copyright (c) MONAI Consortium # 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, so...
import pickle f = open('E:\DQN__T-Rex Rush\data_1\Data_deque_0.pkl', 'rb') data = pickle.load(f) print(len(data))
import json import os import re import pytest from pandas.compat import ( IS64, is_ci_environment, ) from pandas.util._print_versions import ( _get_dependency_info, _get_sys_info, ) import pandas as pd @pytest.mark.filterwarnings( # openpyxl "ignore:defusedxml.lxml is no longer supported:De...
import os import telebot # Initialize bot bot = telebot.TeleBot(os.environ["TELEGRAM_BOT_TOKEN"], parse_mode="MARKDOWN")
import meraki, datetime, json, requests, os.path, shutil, time, threading, os, sys from config_meraki import * from video import * from os import path sys.path.append(os.path.abspath('..')) from config_shared import meraki_api_key #Local path to save Images rooting = os.path.abspath(os.getcwd()) + "/mask-detection" s...
from stu import Student #stu1 = Student("jim", "business", 3.1, False) stu1 = Student("oscar", "accounting", 3.0) stu2 = Student("phylis", "business" , 3.8) print(stu1.name) print(stu1.on_honor_roll())
import os class Config(): DEBUG = False TESTING = False JWT_SECRET_KEY = 'jwt-secret-string' JWT_BLACKLIST_ENABLED = True JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh'] DB_HOST = os.environ.get('DB_HOST') DB_USERNAME = os.environ.get('DB_USERNAME') DB_PASS = os.environ.get('DB_PASS...
from django.shortcuts import render, redirect from django.contrib import messages from .forms import UserRegisterForm def register(request): if request.method == 'POST': form = UserRegisterForm(request.POST) if form.is_valid(): form.save() username = form.cleaned_data.get('...
# Copyright 2015-2018 Capital One Services, 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 agreed ...
from cap_eval.bleu.bleu import Bleu from cap_eval.cider.cider import Cider from cap_eval.meteor.meteor import Meteor import json import numpy as np # initialize the caption evaluators meteor_scorer = Meteor() cider_scorer = Cider() bleu_scorer = Bleu(4) def bleu_eval(refs, cands): print ("calculating bleu_4 score...
import json import time import requests import urllib import re import os from functools import reduce import uuid # in case the error happens from getpass import getpass # import xml.etree.ElementTree as ET # XML parser is not used because the fucking – import inspect # debugging purpose import string from sys i...
""" Module: 'ds18x20' on esp8266 v1.9.4 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.9.4-8-ga9a3caad0 on 2018-05-11', machine='ESP module with ESP8266') # Stubber: 1.1.2 - updated from typing import Any class DS18X20: """""" def convert_temp(self, *argv) -> Any...
import math import numpy as np import torch import data from torch.autograd import Variable from utils import batchify, get_batch, repackage_hidden import argparser args = argparser.args() from utils import Input # Set the random seed manually for reproducibility. np.random.seed(args.seed) torch.manual_seed(args.seed)...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
from scapy.all import * from ccsds_base import CCSDSPacket class MM_HK_TLM_PKT_TlmPkt(Packet): """Housekeeping Packet app = MM command = HK_TLM_PKT msg_id = MM_HK_TLM_MID = 0x0887 = 0x0800 + 0x087 """ name = "MM_HK_TLM_PKT_TlmPkt" fields_desc = [ # APPEND_ITEM CMD_VALID_COUNT 8 U...
import math import random class Vector2D(object): def __init__(self, _x, _y): self.x = _x self.y = _y @staticmethod def UnitRandom(): return Vector2D(random.random(), random.random()) @staticmethod def Zero(): return Vector2D(0,0) @staticmethod ...
'Rough approximation of how slots work' class Member(object): 'Descriptor implementing slot lookup' def __init__(self, i): self.i = i def __get__(self, obj, type=None): return obj._slotvalues[self.i] def __set__(self, obj, value): obj._slotvalues[self.i] = value class Type(type...
import urllib.parse from ..util import ( get_module, LoggingMixin, ) def get_network_module(name): return get_module('.' + name, package='bos_consensus.network') class BaseTransport(LoggingMixin): blockchain = None config = None message_received_callback = None def __init__(self, **co...
# test construction of bytearray from array with float type from array import array print(bytearray(array('f', [1, 2.3])))
# Copyright (C) 2017 The Dagger 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 law or agreed to in w...
# Generated by Django 3.0.5 on 2020-05-05 05:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('school', '0004_auto_20200504_1753'), ] operations = [ migrations.RemoveField( model_name='attendance', name='student...
import komand from .schema import CreateBlockedSenderPolicyInput, CreateBlockedSenderPolicyOutput, Input, Output # Custom imports below from komand_mimecast.util import util class CreateBlockedSenderPolicy(komand.Action): # URI for create blocked sender policy _URI = '/api/policy/blockedsenders/create-policy...
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Copyright 2015 Marco Guazzone (marco.guazzone@gmail.com) # # 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.or...
from setuptools import setup, find_packages VERSION = "0.0.1" setup(name="TraderBetty", version=VERSION, author="iuvbio", author_email="", url="https://github.com/iuvbio/traderbetty.git", test_suite="", tests_require=[], packages=find_packages(exclude=["data", "docs", "tests*"]), insta...
import re import copy import inspect import ast import textwrap """ Utilities for manipulating the Abstract Syntax Tree of Python constructs """ class NameVisitor(ast.NodeVisitor): """ NodeVisitor that builds a set of all of the named identifiers in an AST """ def __init__(self, *args, **kwargs): ...
from newslister.proxy.aws import * from .aws import ProxyPool def factory(cloud, count, **kwargs): if cloud == 'aws': group = ProxyPool(count, **kwargs) return group raise Exception('No factory exists!')
import pandas as pd import numpy as np import pandas_profiling def test_urls(get_data_file): file_name = get_data_file( "whitelist_urls.csv", "https://raw.githubusercontent.com/openeventdata/scraper/master/whitelist_urls.csv", ) df = pd.read_csv( file_name, header=None, names=["s...
# -*- coding: utf-8 -*- """ test_doc_table ~~~~~~~~~~~~~~ Test the Table Document element. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import unittest from chemdataextractor.doc.table import T...
"""The tests for the Recorder component.""" # pylint: disable=protected-access import json from datetime import datetime, timedelta import unittest from unittest.mock import patch, call import pytest from homeassistant.core import callback from homeassistant.const import MATCH_ALL from homeassistant.components import ...
import numpy as np from sklearn import datasets, linear_model import matplotlib.pyplot as plt # Generate a dataset and plot it np.random.seed(0) X, y = datasets.make_moons(200, noise=0.20) plt.scatter(X[:,0], X[:,1], s=40, c=y, cmap=plt.cm.Spectral) print "OK" def plot_decision_boundary(pred_func, X, y): # Set ...
#-*- coding: utf-8 -*- # Author: Matt Earnshaw <matt@earnshaw.org.uk> from __future__ import absolute_import import os import sys import sunpy from PyQt4.QtGui import QApplication from sunpy.gui.mainwindow import MainWindow from sunpy.io import UnrecognizedFileTypeError class Plotman(object): """ Wraps a MainWin...
#!/usr/bin/env python3 import unittest from mock import MagicMock from tests_functional import DoozerRunnerTestCase from doozerlib import metadata class TestMetadata(DoozerRunnerTestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def setUp(self): super().setU...
import logging from concurrent import futures import grpc import base64 from collections import defaultdict from dataclasses import dataclass import os import sys import threading from typing import Any from typing import List from typing import Dict from typing import Set from typing import Optional from typing impor...
import tensorflow as tf import re FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_boolean('use_fp16', False, """Train the model using fp16.""") tf.app.flags.DEFINE_integer('sequence_length', 1200, """Number of batches to run.""") tf.app.flags.DEFINE_integer('embe...
"""add status_as_of column Revision ID: cce9d107c21a Revises: 9f8c327dd506 Create Date: 2021-07-08 19:16:15.975527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "cce9d107c21a" down_revision = "9f8c327dd506" branch_labels = None depends_on = None def upgrade...
class Solution: def groupAnagrams(self, strs): if not strs or len(strs)==0: return strs memo=dict() for i in strs: temp=self.sortString(i) if memo.get(temp): memo[temp].append(i) else: memo[temp]=[i] return memo.values...
#!C:\Python34 print("print(2+4)=", 2+4) print("_+__+__+__+_") print("\n") print("print(3-5)", 3-5) print("_+__+__+__+_") print("\n") print("print(2--5)", 2--5) print("_+__+__+__+_") print("\n") print("print(+2-5)", +2-5) print("_+__+__+__+_") print("\n") print("print(3*8)=", 3*8) print("_+__+__+__+_") print("\n") ...
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") e...
__all__ = ['Map'] class Map(object): '''Represents static elements in the game, such as walls, paths, taverns, mines and spawn points. Attributes: size (int): the board size (in a single axis). ''' def __init__(self, size): '''Constructor. Args: s...
# -*- coding: utf-8 -*- """Python has a very powerful mapping type at its core: the :class:`dict` type. While versatile and featureful, the :class:`dict` prioritizes simplicity and performance. As a result, it does not retain the order of item insertion [1]_, nor does it store multiple values per key. It is a fast, uno...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 5 12:45:44 2019 @author: juangabriel """ # Regresión polinómica # Cómo importar las librerías import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importar el data set dataset = pd.read_csv('Position_Salaries.csv') X = datase...
from importlib import import_module from inspect import getmembers, isclass from netattacker.attacker import AttackerBaseClass base_classes = ['AttackerBaseClass', 'ScannerBaseClass'] def grab(attack_module:str, *args, **kwargs): try: # Need to figure out a better way if ('modules' not in attack_module): mod...
#!/usr/bin/python import random from Crypto.Util import number from functools import reduce TOTAL = 15 THRESHOLD = 10 MAX_COELACANTH = 9 NUM_LOCKS = 5 NUM_TRIES = 250 # substitute for math.prod prod = lambda n: reduce(lambda x, y: x*y, n) def create_key(t, n, size=8): while True: seq = sorted([number.ge...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0007_auto_20150629_1643'), ] operations = [ migrations.AlterField( model_name='value', name...
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # 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-...
# Generated by Django 3.2 on 2021-05-04 07:35 import colorfield.fields from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dep...
"""Generates the offset dictionary for the SVO pipeline.""" from time import time as marktime from typing import List from itertools import groupby from collections import defaultdict def generate_svo_offsets(svo_list: List, time: List, minimum_offsets): """Creates offset dictionary and int-to-string lookup for S...
# Copyright (c) 2019 Georgia Tech Robot Learning Lab # Licensed under the MIT License. from abc import ABC, abstractmethod class OnlineLearner(ABC): """ An abstract interface of iterative algorithms. """ @abstractmethod def update(self, *args, **kwargs): """ Update the state given feedback. """ ...
# coding: utf-8 # In[ ]: """ Numerical Methods, lab 9 """ import sympy as sy from sympy import Rational as syR from sympy import exp, sin, cos, sqrt, log, ln from sympy import pi, cot, sinh, cosh, atan, tan Tasks_db = { 'Task1': [ # 9.1.1 {'f1': lambda x:x**2+2*exp(x), 'a': -2., 'b': 2....
# coding: utf-8 import time import pickle import socket import random import logging import argparse import threading logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M:%S') logger = logging.getLogger('C...
# This artist can be used to deal with the sampling of the data as well as any # RGB blending. import numpy as np from matplotlib.colors import ColorConverter, Colormap from astropy.visualization import (LinearStretch, SqrtStretch, AsinhStretch, LogStretch, ManualInterval, ContrastB...
def replace_slice(input_: tf.Tensor, replacement, begin) -> tf.Tensor: inp_shape = tf.shape(input_) size = tf.shape(replacement) padding = tf.stack([begin, inp_shape - (begin + size)], axis=1) replacement_pad = tf.pad(replacement, padding) mask = tf.pad(tf.ones_like(replacement, dtype=tf.bool), padd...
import rkivacc import os import tempfile import email.utils import requests import openpyxl class RKIReport: def __get_column(row, map, column): if not column in map: return None value = row[map[column]].value if isinstance(value, str): return RKIReport.__strip_st...
from __future__ import absolute_import, division from unittest import TestCase from binascii import hexlify import inbloom class InBloomTestCase(TestCase): def test_functionality(self): bf = inbloom.Filter(20, 0.01) keys = ["foo", "bar", "foosdfsdfs", "fossdfsdfo", "foasdfasdfasdfasdfo", "foasdfasdfasdas...
import math import tf from gennav import utils as utils from gennav.utils import RobotState, Trajectory from gennav.utils.common import Velocity from geometry_msgs.msg import Point, Quaternion, Transform, Twist, Vector3 from trajectory_msgs.msg import MultiDOFJointTrajectory, MultiDOFJointTrajectoryPoint def traj_to...
# 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 core.actionModule import actionModule from core.keystore import KeyStore as kb class crackPasswordHashJohnTR(actionModule): def __init__(self, config, display, lock): super(crackPasswordHashJohnTR, self).__init__(config, display, lock) self.title = "Attempt to crack any password hashes" ...
# encoding: utf-8 """Initializes lxml parser, particularly the custom element classes. Also makes available a handful of functions that wrap its typical uses. """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) import os from lxml import etree from .ns import NamespacePr...
import io import os, sys import threading import numpy as np import base64, string from PIL import Image from threading import Lock from flask import url_for, Flask, request, redirect, render_template, send_from_directory, jsonify import gcodeCompare app = Flask(__name__, template_folder='templates') lock = Lock() @a...
description = 'frequency counter, fg1 and fg2' excludes = ['frequency'] # group = 'lowlevel' tango_base = 'tango://sans1hw.sans1.frm2:10000/sans1/tisane' ARMING_STRING_FC = ( ':FUNC "FREQ";' ':CALC:AVER 1;' ':CALC:SMO:RESP FAST;' ':CALC:SMO 1;' ...
"""Portfolio View""" __docformat__ = "numpy" import logging from typing import List, Optional import os import numpy as np import pandas as pd from matplotlib import pyplot as plt from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.config_plot import PLOT_DPI from gamestonk_terminal.portfoli...
import numpy as np import matplotlib.pyplot as plt from sal_timer import timer def plot_1(): # ... data = { 'a': np.arange(50), 'c': np.random.randint(0, 50, 50), 'd': np.random.randn(50) } data['b'] = data['a'] + 10 * np.random.randn(50) data['d'] = np.abs(data['d']) * ...
# Copyright 2014 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 "license" file accompa...
from __future__ import division from six.moves import range import libtbx import sys class stats_manager(libtbx.slots_getstate_setstate): __slots__ = [ "i_calc", "use_symmetry", "n_indices", "completeness_history", "min_count_history", "counts", "currently_zero", "new_0"] def __in...
# -*- coding: utf-8 -*- ''' Author: Hannibal Data: Desc: local data config NOTE: Don't modify this file, it's build by xml-to-python!!! ''' avatarinfo_map = {}; avatarinfo_map[1] = {"id":1,"info_data":[{"aid":0,"w":512,"h":512,"path":"role/human/stand/all.atlas","total":8,"speed":8,"prefix":"role/human/stand/all/",...
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # 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, merg...
import os import smtplib from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart def SendMail(ImgFileName): img_data = open(ImgFileName, 'rb').read() msg = MIMEMultipart() msg['Subject'] = 'Crash Alert' msg['From'] = 'sample@gmail.com....
# Copyright 2020, The TensorFlow Federated 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 law o...
import sqlite3 connection = sqlite3.connect('banco.db') cursor = connection.cursor() cria_tabela = """ CREATE TABLE IF NOT EXISTS hoteis (hotel_id text PRIMARY KEY, nome text, estrelas real, diaria real, cidade text) """ cria_hotel = ""...
# -*- coding: utf-8 -*- """ chemdataextractor.relex.pattern.py Extraction pattern object """ """ Modify generate_cde_element() function to adapt the changes of phrase.py. If any prefix/middle/suffix are empty (blank), do not add it to the resulting phrase. Modified by jz449 """ import re from ..parse.element...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify the settings that cause a set of programs to be created in a specific build directory, and that no intermediate built files get c...
"""Add Python to the search path on Windows This is a simple script to add Python to the Windows search path. It modifies the current user (HKCU) tree of the registry. Copyright (c) 2008 by Christian Heimes <christian@cheimes.de> Licensed to PSF under a Contributor Agreement. """ import sys import site import os imp...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='familysrc', parent_name='violin.hoverlabel.font', **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plo...
import re from impacket.ldap import ldap, ldapasn1 from impacket.ldap.ldap import LDAPSearchError class CMEModule: ''' Find PKI Enrollment Services in Active Directory and Certificate Templates Names. Module by Tobias Neitzel (@qtc_de) and Sam Freeside (@snovvcrash) ''' name = 'adcs' descript...
# -*- coding: utf-8 -*- """ Created on Tue Feb 14 15:59:11 2017 @author: af5u13 """ # Usage for debugging from raw Python console #exec(open("/Users/af5u13/dev/visr/src/python/scripts/rsao/reverbObjectBinauralisation.py").read()) import visr import signalflows import panning import pml import rbbl import rcl import ...
"""stasians_help URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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...
from build_util import build_directory_recurse, check_visible def build(source_path, build_path, install_path, targets): # normal requirement 'foo' should be visible check_visible('anti', 'build_util') check_visible('anti', 'floob') import floob floob.hello() try: import loco ...
from functools import wraps import os from client import AuthDecorator, HttpClient from flask import Flask, jsonify, request, g from flask_pymongo import PyMongo from auth import create_user, get_user_by_token, login_user from errors import APIError app = Flask(__name__) mongo_uri = 'mongodb://{}:{}@ds259325.mlab.c...
# coding: utf-8 """ Metacore IoT Object Storage API Metacore Object Storage - IOT Core Services # noqa: E501 OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import metacore_api_python_cli fr...
""" Argo Server API You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501 The version of the OpenAPI document: VERSION Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from ...
from config import config from data_utils import CoNLLDataset, get_vocabs, UNK, NUM, \ get_glove_vocab, write_vocab, load_vocab, get_char_vocab, \ export_trimmed_glove_vectors, get_processing_word def build_data(config): """ Procedure to build data Args: config: defines attributes needed ...
from __future__ import absolute_import from hls4ml.writer.writers import Writer, register_writer, get_writer from hls4ml.writer.vivado_writer import VivadoWriter register_writer('Vivado', VivadoWriter)
# Copyright 2014: Mirantis 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 b...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
from lxml.etree import fromstring, tostring from lxml import builder from openpack.basepack import ooxml_namespaces docx_namespaces = { 'w': "http://schemas.openxmlformats.org/wordprocessingml/2006/main", 'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', 've': 'http://schemas.ope...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import pytest from treq.testing import StubTreq from rasa_nlu import config from rasa_nlu.config import RasaNLUModelCo...
from django.apps import apps from django.db.models.signals import post_delete, post_save, pre_delete from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.acls.permissions import permission_acl_edit, permission_acl_view from mayan.apps.common.apps i...
import models, experiments, configs, data print("haha") config = getattr(configs, 'config_'+'DialogWAE_GMP')() args.dataset='DailyDial' args.data_path='./data' data_path=data_path+dataset+'/' print("haha") corpus = getattr(data, dataset+'Corpus')(data_path, wordvec_path='/media/prakhar/Local Disk/glove/'+'glove.twitter...
# Export version number __version__ = "0.1.0"
# encoding=utf8 """Implementation of Ridge benchmark.""" import math from NiaPy.benchmarks.benchmark import Benchmark __all__ = ["Ridge"] class Ridge(Benchmark): r"""Implementation of Ridge function. Date: 2018 Author: Lucija Brezočnik License: MIT Function: **Ridge function** :mat...