text
stringlengths
1
927k
import os import tempfile from pathlib import Path import pytest from typing import Callable from _pytest.pytester import RunResult import rasa.shared.utils.io from rasa import model from rasa.nlu.model import Metadata from rasa.shared.nlu.training_data import training_data # noinspection PyProtectedMember from rasa...
from pandas import Series data = [1000, 2000, 3000] index = ["메로나", "구구콘", "하겐다즈"] s = Series(data=data, index=index) print(s.loc['메로나':'구구콘'])
import re from .field_renderable import FieldRenderable __all__ = ("Field", ) default_error_messages = { "required": "This field is required.", "type": "Invalid type.", "min_num": "You need at least {num} values.", "max_num": "You can have at most {num} values.", } HARD_MAX_NUM = 1000 class Fiel...
expected_output = { "interface":{ "if_id":"2a", "clock_mode":"BOUNDARY CLOCK", "delay_mechanism":"End-to-End", "delay_req_seq_num":0, "domain_value":0, "log_mean_delay_interval":0, "log_mean_sync_interval":0, "num_info":{ "num_delay_requests_received":0, "num_d...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
from typing import Counter from prometheus_client import start_http_server, Summary, Counter, Gauge ,__all__ ,Histogram import random import time from requests import get import requests from requests.api import post urls =["https://httpstat.us/503","https://httpstat.us/200"] sitestatus = Gauge('sample_external_url_...
# module for heart rate monitor
import json import requests import sys import os import socket import fcntl import struct #info_device={"MAC_ADDRESS":"xx","IP_ADDRESS":"xxx","BLOCK_ID":"01","STOP_ID":"xxx"} #info_buncher={"BUNCHER_ID":"xx","BUNCH_ID":"xx","COMPOSITION_ID":"xx","TUB_ID":"xx","TxR":"xx","GR":"xx","VARIETY_ID":"xx","BLOCK_ID":"xx"} d...
import abc import json import subprocess import sys import tempfile import time from pathlib import Path from typing import Text, List, Tuple, Optional, Union import memory_profiler import psutil import pytest import rasa import rasa.shared.utils.io PROFILING_INTERVAL = 0.1 # Enable this to plot the results locally...
from django.conf.urls import url app_name = 'hostel_management' urlpatterns = []
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='pickle-storage', version='0.1', description='Python Pickle-Based Data Storage', author='Tatenda Tambo', author_email='tatendatambo@gmail.com', packages=find_packages(), install_requires=['wrapt>=1.12.1'] ...
import torch import torch.nn as nn try: from torch.hub import load_state_dict_from_url except ImportError: from torch.utils.model_zoo import load_url as load_state_dict_from_url from torchsummary import summary import numpy as np class X_Enc(nn.Module): def __init__(self, layers, num_classes=1000, init_we...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-30 23:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Gradin...
for x in range(0, 11): for c in range(0, 11): print(x, 'x', c, '= {}'.format(x * c)) print('\t')
from pathlib import Path import ijson import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from json import JSONDecoder, JSONDecodeError # for reading the JSON data files import re # for regular expressions import os # for os related operations from sklearn.pre...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ################################################################################## # File: c:\Projects\KENYA ONE PROJECT\CORE\engines\constraint.py # # Project: c:\Projects\KENYA ONE PROJECT\CORE\engines # # Created Date: Thursday,...
# Copied from https://github.com/downloadam/client/blob/master/client/registry/win.py import logging import sys import os from contextlib import contextmanager import subprocess import _winreg as winreg from _winreg import HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER, \ KEY_QUERY_VALUE, REG_SZ, KEY_ALL_ACC...
# Generated by Django 3.0.4 on 2020-04-18 12:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Car', fields=[ ...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.20 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
from typing import (Any, Dict, Generic, Hashable, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Union, cast, overload) from ._compatibility.typing import final, Protocol from ._internal import API from ._internal.utils import AbstractMeta, Default, FinalImmutable, FinalMeta, debug_repr from ._inte...
import pandas as pd import os curve_name = '5_k7' data = pd.read_csv(os.path.join('result', curve_name+'.csv')) timestamp = data['timestamp'] value = data['value'] mag = data['mag'] isAnomaly = data['isAnomaly'] import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt plt.subplot(3, 1, 1) plt.plot(t...
# Generated by Django 2.2.5 on 2019-10-07 08:27 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('species', '0002_auto_20190908_0902'), ...
""" This script creates an instance of a sacred experiment and defines default configurations for training a neural network or a regression model. """ from src.neural_nets.models import get_model from src.neural_nets.load_data import get_loader from src.neural_nets.metrics import MaskedBCE, Accuracy, compute_acc, comp...
# -*- encoding:utf8 -*- """A deep MNIST classifier using convolutional layers. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import math import tempfile import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_dat...
import pandas as pd import numpy as np from sklearn.datasets import dump_svmlight_file df1 = pd.read_csv("./dataset/input_label.csv") df2 = pd.read_csv("./dataset/input.csv") res = pd.merge(df1, df2, how='left', left_on='id', right_on='id') X = res[np.setdiff1d(res.columns,['label','id'])] y = res.label dump_svmligh...
# plot_micinput_spectrum.py import pyaudio import struct import numpy as np from matplotlib import pyplot as plt from matplotlib.backends.backend_pdf import PdfPages pp = PdfPages('logarithmatic_spectrum.pdf') plt.ion() # Turn on interactive mode so plot gets updated WIDTH = 2 # bytes per sample ...
#! /usr/bin/python # pyscan.py - Python based SYN scanner. A SYN packet is sent through a raw socket. # If a SYN/ACK is received, the Linux TCP stack sends a RST/ACK, and an open # port is assumed. Otherwise, a closed or filtered port is assumed. # Does not rely on scapy, rather creates its own packets and raw socket...
# -*- coding: utf-8 -*- ########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # #####################################################################...
from django.conf.urls import patterns, url from django.contrib.admin.views.decorators import staff_member_required from django.utils.translation import ugettext_lazy as _ from oscar.core.application import Application from oscar.apps.dashboard.ranges import views from oscar.apps.dashboard.nav import register, Node no...
from concurrent.futures import ThreadPoolExecutor, as_completed from google.cloud import bigquery as bq from datetime import datetime as dt import argparse import json import logging import time if __name__ == "__main__": start_time = time.time() threads = [] results = [] parser = argparse.Argum...
""" Copyright 2020 The OneFlow 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 applicable law or agr...
# Copyright 2019 MilaGraph. 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 applicable law or ag...
#!/usr/bin/python import json import sys import traceback import os import requests import argparse SLEEP_TIME = 60*5 debug = False key_loc = '~/.atlas/auth' class MeasurementBase(object): def __init__(self, target, key, probe_list=None, sess=None): self.target = target self.description ...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
import math file = open('input.txt','r') for line in file: initialMemory = line.split(',') bruteforce = -1 result = 0 while result != 19690720: memory = initialMemory.copy() bruteforce = bruteforce + 1 opcode = 0 pc = 0 memory[1] = int(bruteforce/100) memory[2] = int(bruteforce%100) while True: ...
from NIENV import * # API METHODS # self.main_widget <- access to main widget # self.update_shape() <- recomputes the whole shape and content positions # Ports # self.input(index) <- access to input data # self.set_output_val(index, val) <- set output data port value # self.exec_outp...
# Time: ctor: O(n), n is number of words in the dictionary. # lookup: O(1) # Space: O(k), k is number of unique words. class ValidWordAbbr(object): def __init__(self, dictionary): """ initialize your data structure here. :type dictionary: List[str] """ self.lookup...
import os import pytest import asyncio from jina import __default_host__ from daemon.clients import AsyncJinaDClient cur_dir = os.path.dirname(os.path.abspath(__file__)) CLOUD_HOST = 'localhost:8000' # consider it as the staged version success = 0 failure = 0 client = AsyncJinaDClient(host=__default_host__, port=...
# coding: utf-8 # # Copyright 2021 The Oppia 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 requi...
# Generated by Django 3.1.7 on 2021-04-26 08:28 import uuid from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("core", "0007_art_thumb_render_squashed_0008_art_uuid"), ] operations = [ migrations.AlterField( ...
# Copyright 2018 Braxton Mckee # # 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...
import pytest from robocop.rules import RuleSeverity, Rule def get_severity_enum(value): for sev in RuleSeverity: if sev.value == value: return sev return RuleSeverity.INFO def get_message_with_id_sev(rule_id, sev): for char in RuleSeverity: rule_id = rule_id.replace(char.val...
__all__ = [] from .resnet import ResNetTorch from .vgg import VGGTorch from .alexnet import AlexNetTorch from .squeezenet import SqueezeNetTorch from .densenet import DenseNetTorch from .mobilenet import MobileNetV2Torch from .resnext import ResNeXtTorch from .seblocks import SEBasicBlockTorch, SEBottleneckTorch, \ ...
#!/usr/bin/env python3 # # Copyright 2020 IBM # 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...
# # 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, software # ...
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import pytest import platform import functools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.c...
# Lint as: python2, python3 # Copyright 2018 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 # ...
import pytest import torch from gym.spaces import Discrete, MultiDiscrete, MultiBinary, Dict, Tuple, Box from blobrl.agents import AgentInterface class MOCKAgentInterface(AgentInterface): def __init__(self, observation_space, action_space, device): super().__init__(observation_space, action_space, device...
""" WSGI config for apps project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS...
# -*- coding: utf-8 -*- from flask import url_for, request, session from oleander import app from gdata.client import Unauthorized as UnauthorizedError from gdata.gauth import OAuth2Token, Error as ConnectionError, token_to_blob, token_from_blob from gdata.contacts.client import ContactsClient from gdata.calendar.cli...
import pytest from django.conf.urls import url from django.test import RequestFactory, TestCase, override_settings from django.utils.translation import gettext_lazy as _ from rest_framework import filters, generics, pagination, routers, serializers from rest_framework.compat import uritemplate from rest_framework.pars...
AUTH_SUCCESS_RESPONSES = { "register_success": "You have successfully registered to TrackMe", "login_success": "User logged in successfully" } AUTH_ERROR_RESPONSES = { "register_error": "Something went wrong while creating an account: {}", "invalid_credentials": "Incorrect email or password", "not_...
from datetime import datetime import numpy as np import pytest from pandas import DataFrame, Index, MultiIndex, RangeIndex, Series import pandas.util.testing as tm class TestSeriesAlterAxes: def test_setindex(self, string_series): # wrong type msg = (r"Index\(\.\.\.\) must be called with a coll...
from typing import List, Optional, Tuple, Union from beagle.common import logger, split_path, split_reg_path from beagle.nodes import File, Process, RegistryKey, IPAddress from beagle.transformers.base_transformer import Transformer # Custom Node classes to use the UUID in TC class TCProcess(Process): key_fields...
import datetime from django.contrib import admin from django.db.models import Count from django.db.models.functions import TruncDay from django.urls import path from django.http import JsonResponse from .app_settings import app_settings from .models import APIRequestLog class APIRequestLogAdmin(admin.ModelAdmin): ...
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
import csv import json from random import gauss import random import datetime import numpy as np import sys import pandas as pd df = pd.DataFrame(columns=['Timestamp', 'ID', 'Temperature(celsius)', 'Target_Temperature(celsius)', 'Amp', 'CumulativePowerConsumption', 'ContentType', 'Humidity', 'CO2', 'Time_Door_Open', ...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogengine.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. A...
import pandas as pd def cols_choice (df, include): return df.select_dtypes(include=include).columns.to_list() def cols_header (data_records): if (len(data_records) == 0): return [] return [{'name': v, 'id': v} for v in data_records[0].keys()]
class Solution: def smallestRepunitDivByK(self, k: int) -> int: if k % 2 == 0 or k % 5 == 0: return -1 if k == 1: return 1 count = 1 n = 1 while (n % k > 0): n = (n % k) * 10 + 1 count += 1 return count
# -*- coding: utf-8 -*- def isBadVersion(n): return n >= 3 class Solution: def firstBadVersion(self, n): first, last = 1, n while first <= last: mid = (first + last) // 2 if isBadVersion(mid): last = mid - 1 else: first = m...
#!/usr/bin/env python from __future__ import with_statement import sys, string, operator def get_cpu2net_vcs(num_vcs): assert num_vcs <= 8 return range(0,num_vcs) def get_net2cpu_vcs(num_vcs): assert num_vcs <= 8 return range(8,8+num_vcs) def concat(xs): return reduce(operator.add, xs, []) # VC ...
from tensorflow import keras def classify(path): model = keras.models.load_model("Cat_Dog_Classification.h5") load_image = keras.preprocessing.image.load_image(path,target_size=(200,200)) image_array = keras.preprocessing.image.img_to_array(load_image) reshape_array = image_array.reshape(1,200,200,3) ...
x = 1 while x < 3: break x = x + 1 print x
from django import template from ..forms import PlanForm register = template.Library() @register.inclusion_tag("drfstripe/_change_plan_form.html", takes_context=True) def change_plan_form(context): context.update({ "form": PlanForm(initial={ "plan": context["request"].user.customer.current_...
# Copyright 2018 Alibaba Inc. All Rights Conserved from __future__ import absolute_import from __future__ import division from __future__ import print_function import ctypes import os import tensorflow as tf from tf_euler.python.euler_ops import base get_node_type = base._LIB_OP.get_node_type
# -*- coding: utf-8 -*- # # Copyright (c) 2016, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Unit tests for writer xyzwriter module.""" import os import unittest import cclib __filedir__ = os.path.dirname(__f...
# -*- coding: utf-8 -*- """Specifies the version of the featurewiz package.""" __title__ = "featurewiz" __author__ = "Ram Seshadri" __description__ = "Advanced Feature Engineering and Feature Selection for any data set, any size" __url__ = "https://github.com/Auto_ViML/featurewiz.git" __version__ = "0.0.51" __license_...
# Copyright 2019 Extreme 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 i...
import os from base64 import b64encode from socket import gethostname, gethostbyname class Config: SECRET_KEY = os.environ.get("SECRET_KEY") or b64encode(os.urandom(24)).decode() SERVER_URL = os.environ.get("SERVER_URL") or f"http://{gethostbyname(gethostname())}:8000" CI_SECURITY = True if os.environ.get...
import os import glob import torch import pandas as pd import seaborn as sn import torch.nn as nn import torch.optim as optim import matplotlib.pyplot as plt from torch.optim.lr_scheduler import _LRScheduler from sklearn.metrics import confusion_matrix from PIL import Image def set_lr(optimizer, lrs): if(len(lrs) == ...
#!/usr/bin/env python3 """ @author T. Paysan-Lafosse @brief This script searches unintegrated proteins for a given organism or taxid in InterPro signatures, if they are not found in signatures, they are clustered based on UniRef clusters @arguments [-u USER]: database user [-p PASSWORD]: database...
from itunes_app_scraper.scraper import AppStoreScraper from itunes_app_scraper.util import AppStoreException, AppStoreCollections, AppStoreCategories, AppStoreUtils import json import pytest import os def test_term_no_exception(): scraper = AppStoreScraper() results = scraper.get_app_ids_for_query("mindful", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime import logging import unittest import os import shutil from modules import Datastore, GoogSuggestMe __author__ = 'Giannis Dzegoutanis' TEMP_FOLDER = u'tmp' TEST_DATABASE = u'testdatastore.tmp' TEST_QUERY = u'test' module_name = u'test_modu...
from .modeling import meta_arch
# 10001st prime # Problem 7 # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, # we can see that the 6th prime is 13. # What is the 10 001st prime number? # as of solving this challenge the largest prime number known is 24,862,048 def is_prime(n): i = 2 while i*i <= n: if n % i == 0: ...
from flask import Flask, json import pyodbc conn = pyodbc.connect('DRIVER={PostgreSQL Unicode};SERVER=10.4.28.183;DATABASE=postgres;UID=postgres;PWD=developer2020') app = Flask(__name__) def random_products(conn): cnxn = conn.cursor() cnxn.execute('select categoryid, name from categories c where parentid is...
from enum import Enum class AlgorithmType(Enum): ITERATIVE = 1 RECURSIVE = 2 if __name__ == '__main__': pass
# model settings model = dict( type='CascadeRCNN', num_stages=3, pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch', dcn=dict( type='DCN'...
def comp_9th(n): """takes a decimal number (n) in string fomat returns the 9's complement of the number""" n=str(n) result=[] for digit in n: a=str(9-int(digit)) result.append(a) return "".join(result) def comp_1st(n): """takes a binary number (n) in string fomat ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Generate a i18n file from a given script. run IDLE at topmost level: >>> import pwb >>> from scripts.maintenance.make_i18n_dict import i18nBot >>> bot = i18nBot('<scriptname>', '<msg dict>') >>> bot.run() If you have more than one message dictionary, give all these names...
from flask import render_template, send_from_directory, request, jsonify from app import app import hashlib, uuid import game from app import __config__ as config def compare_password(password, correct_hash): """ Compares password with hash """ hashed_password = hashlib.sha512(password).hexdigest() ...
#----------------------------------------------------------------------------# # APP CONFIGURATION #----------------------------------------------------------------------------# # standard library imports import os import logging from logging import Formatter, FileHandler import json # dependencies import requests fr...
# Next permutation def nextPermutation(self, n: int) -> int: digits = list(str(n)) i, j = len(digits)-2, len(digits)-1 # Find the first digit that is smaller than the digit next to it while i >= 0 and digits[i] >= digits[i+1]: i -= 1 # If not found, then all digits are in descending or...
# Generated by Django 3.1.3 on 2020-11-28 15:05 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(setting...
import uuid import auth from api.socket.constants import GAME_NS from app import app, sio from models import PlayerRoom from models.role import Role from state.game import game_state from utils import logger @sio.on("Room.Info.InviteCode.Refresh", namespace=GAME_NS) @auth.login_required(app, sio) async def refresh_i...
def extract_history(input): """extract the past metrics""" prev = input['prev'] prev['prev'] = True return input['_id'], prev def extract_update(input): """extract the update data, from which we compute new metrics""" update = input['update'] update['_id'] = input['_id'] return update ...
import pyperclip while True: print("input URL(end:n)") photo_url = input(">> ") if photo_url == "n": break paste_code = "<span itemtype=\"http://schema.org/Photograph\" itemscope=\"itemscope\"><img class=\"magnifiable\" src=\"{}\" itemprop=\"image\"></span>".format(photo_url) pyperclip.c...
import unittest class CacheTestMixin: Cache = None def test_defaults(self): cache = self.Cache(maxsize=1) self.assertEqual(0, len(cache)) self.assertEqual(1, cache.maxsize) self.assertEqual(0, cache.currsize) self.assertEqual(1, cache.getsizeof(None)) self.ass...
## # 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, software # distributed under the...
import bibclean.utils.cleaning as cleaner import bibclean.utils.formatting as formatter import bibclean.config.constants as constants from bibtexparser.customization import splitname from Levenshtein import distance as levenshtein_distance import requests from crossref.restful import Works, Etiquette import bibclean.cr...
import numpy as np from sklearn import metrics as sk_metrics import torch class PersonReIDMAP: ''' Compute Rank@k and mean Average Precision (mAP) scores Used for Person ReID Test on MarKet and Duke ''' def __init__(self, query_feature, query_cam, query_label, gallery_feature, gallery_cam, gal...
import sys import getpass from boliau import cmdlib from boliau.plugins.gspread import actionlib def do_insert(): cmd = cmdlib.as_command(actionlib.Upsert(), require_stdin=True) cmd.add_argument('spreadsheet', help="spreadsheet name.") cmd.add_argument('--email', help = "us...
# atombot.py import time from atom import Element PUBLISH_FREQUENCY = 100 TIME_FOR_WAVEFORM = 5 if __name__ == "__main__": element = Element("voice_demo") # Wait for the record element to start up and launch the VNC. # this can and should be fixed with a heartbeat! time.sleep(10) # Start the...
from . import unittest, shapely20_deprecated import pytest from shapely.geometry import shape from shapely.geometry.multipoint import MultiPoint from shapely.geometry.linestring import LineString from shapely.geometry.multilinestring import MultiLineString from shapely.geometry.polygon import LinearRing, Polygon from...
# Copyright (c) 2018 StackHPC 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-2.0 # # Unless required by applicable law or agreed to in wr...
import nipunn_IQR.outliers
# -*- coding: utf-8 -*- print("Hello Mikel") print("test") print("working on amy branch") print(" Hello this is mikel. SO i created a branche and i want to be sure i did the right thing")
# -*- coding: utf-8 -*- # Copyright 2010-2020, Google Inc. # 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 copyright # notice, this...
# Copyright 2017 The Forseti Security 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 a...