text
stringlengths
957
885k
<reponame>grassead/opentitan # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # TODO(drewmacrae) this should be in rules_cc # pending resolution of https://github.com/bazelbuild/rules_cc/issues/75 load("//rules:bugfix.bzl...
import pandas as pd import requests import os.path import bs4 from os import path #Data loader functions belong here. This is where # information about the data files is found. def load_max_quant(version="", level='protein', prefix="Intensity", contains=["_"], sample_type="" ...
<filename>openslides/agenda/views.py from html import escape from django.contrib.auth import get_user_model from django.db import transaction from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from reportlab.platypus import Paragraph from openslides.core.config impor...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio configuration loader. Invenio-Config is a *base package* of the Invenio d...
# -*- coding: utf-8 -*- # This repo is licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
############################################################################### # _ _ _ # # | | (_) | | # # _ __ _ _ | | __ _ _ __ _ __| | # ...
<filename>templates/go/go_system_paths.py<gh_stars>100-1000 imports=["fmt", "os", "path/filepath", "runtime", "strings"] buildcode=""" type fileDesc struct { isDir bool fPath string sName string } var globalFile []fileDesc var sysNativeDone = false //used by the wa...
__author__ = 'nah' import pymongo from bson import Binary def content_decode(s): decoded = s if isinstance(s, str): decoded = unicode(s.decode('ascii', 'ignore')) return decoded class SubmissionStore(): """Stores submissions obtained from the Canvas API.""" def __init__(self, db_ho...
<gh_stars>0 """ Calls GMAP. """ import subprocess # FIXME use pbcommand wrapper (once this is stable) import tempfile import logging import os.path as op import os import sys import pysam from pbcommand.cli.core import pbparser_runner from pbcommand.models import FileTypes, SymbolTypes, get_pbparser from pbcommand...
import tkinter as tk import tkinter.ttk as ttk import subprocess from tkinter import messagebox from tkinter import scrolledtext from PIL import ImageTk, Image import os from xml.etree import ElementTree as ET from tkinter import TOP, BOTTOM, LEFT from pathlib import Path from .gutil import AmiTree from .gutil import ...
# 两种测试模式: # 1. 测试整个文件: # python -m doctest -v hw01.py # 2. 测试单个函数:先进入python交互模式,再使用doctest.run_docstring_examples(f, globs, verbose=False, name="NoName", compileflags=None, optionflags=0)¶ # >>> import doctest # >>> from hw01 import a_plus_abs_b # >>> doctest.run_docstring_examples(a_plus_abs_b, globs=None...
<reponame>bensharkey3/Guess-The-Number<filename>sourcecode.py import random import os import pandas as pd import matplotlib.pyplot as plt from matplotlib.ticker import PercentFormatter def verify_guess(i): '''validates a guess to make sure its a number between 1-100''' while True: try: i = ...
import numpy as np import mahotas as mh from laocoon import equalization as eq class RFP_Pipeline: """ A class that represent the pipeline for RFP analysis. Attributes ---------- dapi_coords : list Coordinates of the cell "centers" in the DAPI channel. Used as a reference. checked : l...
""" Django settings for YDX project. Generated by 'django-admin startproject' using Django 1.11.8. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os imp...
<gh_stars>0 import logging import time import gevent import gevent.socket import Constants import GlobalStore from BotSettingsManager import BotSettingsManager from IrcMessage import IrcMessage from MessageLogger import MessageLogger class DideRobot(object): def __init__(self, serverfolder): self.logger = loggin...
#!/usr/bin/python """ supersid.py version 1.3 Segregation MVC SuperSID class is the Controller. First, it reads the .cfg file specified on the command line (unique accepted parameter) or in ../Config Then it creates its necessary elements: - Model: Logger, Sampler - Viewer: Viewer using...
#!/usr/bin/env python """Standard actions that happen on the client.""" import cStringIO as StringIO import ctypes import gzip import hashlib import os import platform import socket import sys import time import zlib import psutil import logging from grr.client import actions from grr.client import client_utils_c...
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, 2020 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
<gh_stars>1-10 # GA0 DEAP_GA import json import math import numpy as np import os import random import sys import threading import time from deap import base from deap import creator from deap import tools from deap import algorithms import eqpy # Global variable names we are going to set from the JSON settings fi...
import os from models.cdmf import CDMF from models.cdmf2 import CDMF2 from models.convmf import ConvMF from data_load import DataLoad import hyperparams as hp from tqdm import tqdm import numpy as np import tensorflow as tf def load_model(data, model_name): kwargs = { 'num_all_users': data.num_all_users...
<reponame>utanashati/curiosity-recast<gh_stars>0 import torch import torch.nn.functional as F import torch.optim as optim from model import IntrinsicCuriosityModule2 from itertools import chain # ICM import os import signal class Killer: kill_now = False def __init__(self): signal.signal(signal.S...
<filename>foreman/data_refinery_foreman/foreman/management/commands/test_update_experiment_metadata.py from unittest.mock import patch from django.test import TransactionTestCase from data_refinery_common.models import Experiment, ExperimentSampleAssociation, Sample from data_refinery_foreman.foreman.management.comma...
<filename>wpcv/scripts/pil_image_trans_ops.py import os, sys, shutil, math, random, json, multiprocessing, threading import cv2 import numpy as np from PIL import Image, ImageEnhance, ImageFilter, ImageDraw import abc def pilimg(img): if isinstance(img,Image.Image):return img if isinstance(img,np.ndarray): ...
# https://python-course.eu/advanced-python/generators-iterators.php """ Generators are a special kind of function, which enable us to implement or generate iterators. Mostly, iterators are implicitly used, like in the for-loop of Python. """ # An list is not an iterator, but can be used as an iterable import random...
import re with open("data/raw/details.txt") as f: text = f.read() with open("data/raw/geography.txt") as f: geo = f.read() with open("data/raw/publishers.txt") as f: pub = f.read() with open("data/raw/subjects.txt") as f: subj = f.read() MAX = 6562 LOOKAHEAD = 100 STATES = [ "Alabama STATE", ...
# ====================================================================== # Copyright TOTAL / CERFACS / LIRMM (02/2020) # Contributor: <NAME> (<<EMAIL>> # <<EMAIL>>) # <NAME> (<<EMAIL>>) # This software is governed by the CeCILL-B license under French law and # abiding by the ru...
from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework import permissions from rest_framework.decorators import detail_route from rest_framework.response import Response from rest_framework import filters, status from premises.models import Contention, Premise from .ser...
<filename>tests/runtime_benchmark.py<gh_stars>10-100 """Run benchmarks and print benchmark report. This file times various aspects of the environment, such as the physics engine and the renderer, given a task config. It is useful to benchmark new task configs. Note: To run this file, you must install the tqdm package...
<reponame>CyberQueenMara/baseband-research ############################################################################## # Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder). # All rights reserved. # # 1. Redistribution and use of OKL4 (Software) in source and binary # forms, with or without modification, a...
<gh_stars>0 #!/usr/local/bin/python import semver import os import argparse import sys import requests import json import re class GitLab: url = "" default_branch = "" header = "" current_version = "" def __init__(self, project_id, server_host, default_branch, token): self.url = f"https:/...
<gh_stars>0 from __future__ import print_function import collections import os import re import stat import sys from os import path from bs4 import BeautifulSoup MODE_CSS = '--css' MODE_WA = '--wa' MODE_FRAME = '--frame' LENGTH_PROPERTIES = [ 'font-size', 'letter-spacing', 'word-spacing'] def quit(stat...
from copy import deepcopy from bbpyp.message_bus.abstract_publisher import AbstractPublisher from bbpyp.message_bus.abstract_subscriber import AbstractSubscriber from bbpyp.common.exception.bbpyp_value_error import BbpypValueError class TopicChannel: __CONTEXT_ID_KEY = "CONTEXT_ID" __LINKED_DISCONNECT_EVENT_...
import logging import inspect import math import time import numpy as np import pynisher from smac.tae.execute_ta_run import StatusType, ExecuteTARun from smac.utils.constants import MAXINT __author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2015, ML4AAD" __license__ = "3-clause BSD" __maintainer__ = "<NAME>" _...
# -*- coding: utf-8 -*- """ Deep Q-network implementation with chainer and rlglue Copyright (c) 2015 <NAME> All Right Reserved. """ import copy import pickle import numpy as np import scipy.misc as spm from chainer import cuda, FunctionSet, Variable, optimizers import chainer.functions as F from rlglue.agent.Agent ...
<reponame>grodansparadis/vscp-python-sensorpuck<gh_stars>1-10 from bluepy.btle import UUID, Peripheral, DefaultDelegate, AssignedNumbers import struct import math def _TI_UUID(val): return UUID("%08X-0451-4000-b000-000000000000" % (0xF0000000+val)) # Sensortag versions AUTODETECT = "-" SENSORTAG_V1 = "v1" SENSORT...
from flask_jwt import current_identity from flask_potion import ModelResource, fields from flask_potion.routes import ItemRoute, Route from ..app import db from ..app.decorators import auth_required, role_required from .models import Permission, User, UserPermissionLinker, UserRole class UserResource(ModelResource):...
<filename>ziggy/context.py # -*- coding: utf-8 -*- """ ziggy.context ~~~~~~~~ This module provides the concept of 'Context' for collecting data that will generate a log event. :copyright: (c) 2012 by <NAME> :license: ISC, see LICENSE for more details. """ import time import os import random import struct from . im...
<reponame>gieseladev/andesite.py<filename>andesite/transform.py """Transformation utilities. These functions are used to transform the data sent by Andesite into the Python models. These functions aren't exported to the `andesite` namespace, if you want to use them you need to import them from `andesite.transform`. H...
<reponame>alvinwan/lepoop<filename>lepoop/entry/main.py """Entry points manager for command line utility.""" from ..install import get_uninstall_candidates from ..install import get_uninstall_dependencies_for from ..install import get_installed_package_keys from ..uninstall import get_reinstall_candidates from ..downl...
<gh_stars>10-100 import numpy as np import sys from dynaphopy.displacements import atomic_displacements def progress_bar(progress): bar_length = 30 status = "" if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress = 0 status = "Pr...
<gh_stars>0 # -*- coding: utf-8 -*- import json import os from twython import Twython, TwythonError from .config import unittest class TestHtmlForTweetTestCase(unittest.TestCase): def setUp(self): self.api = Twython('', '', '', '') def load_tweet(self, name): f = open(os.path.join( ...
<gh_stars>0 import node import event from leginon import leginondata import time import calibrationclient from pyami import correlator, peakfinder, imagefun, ordereddict import math import gui.wx.Baker import instrument import presets import types import numpy from leginon import leginondata import threading import pla...
<reponame>tnakaicode/ChargedPaticle-LowEnergy<gh_stars>1-10 from logging import warning import numpy as np import scipy.sparse import scipy.sparse.linalg class FieldSolver: def __init__(self, spat_mesh, inner_regions): if inner_regions: print("WARNING: field-solver: inner region support is un...
<reponame>wjguan/phenocell<gh_stars>0 import sys import numpy from clarity.ImageProcessing.BackgroundRemoval import removeBackground from clarity.ImageProcessing.Filter.DoGFilter import filterDoG from clarity.ImageProcessing.MaximaDetection import findExtendedMaxima, findPixelCoordinates, findIntensity, findCenterOfM...
<gh_stars>10-100 # Copyright 2019 Google 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 agree...
import json from unittest.mock import MagicMock import pytest import requests from connexion.exceptions import (BadRequestProblem, ConnexionException, OAuthProblem, OAuthResponseProblem, OAuthScopeProblem) def test_get_tokeninfo_url(monkeypatch, sec...
<reponame>liori/optuna import math from typing import List from typing import Optional from typing import Tuple from optuna.logging import get_logger from optuna.study import Study from optuna.study import StudyDirection from optuna.trial import FrozenTrial from optuna.trial import TrialState from optuna.visualization...
<filename>ciphr.py import tools from PyQt5.QtCore import Qt from PyQt5 import QtWidgets, QtCore from PyQt5.QtGui import QFont, QIcon from PyQt5.QtWidgets import QApplication, QPushButton, QWidget, QLineEdit, QDesktopWidget obj_list = ["Menu", "Backbutton", "Result", "Inputs", "Crypt", "Copy"] class MainUi(QWidget):...
import ipaddress import asyncio from multiprocessing import Queue import asyncio_dgram import datetime,time from vosk import Model, KaldiRecognizer import audioop import auditok from scapy.all import RTP import click import json import motor.motor_asyncio model = Model('/home/alex/vosk-server/model') class DB: ...
<filename>source/LaBSE.py ''' Language-agnostic Sentence BERT Embeddings (LaBSE) utilities ''' __author__ = '<NAME>' import numpy as np import tensorflow as tf import tensorflow_hub as hub import bert from configs import config as cf def get_model(model_url, max_seq_length): ''' loads model given a valid u...
<reponame>kubruslihiga/sst-projeto from seguranca_trabalho.submodels.funcionario import Funcionario from django import forms from django.forms.models import BaseInlineFormSet, inlineformset_factory from seguranca_trabalho.submodels.monitoramento_saude_trabalhador import MonitoramentoSaudeTrabalhador from seguranca_tra...
<reponame>Zac-HD/trio from collections import deque import attr from .. import _core from .._util import aiter_compat from .._deprecate import deprecated __all__ = ["UnboundedQueue"] @attr.s(frozen=True) class _UnboundedQueueStats: qsize = attr.ib() tasks_waiting = attr.ib() class UnboundedQueue: """A...
<filename>enonces/ecoulements_potentiels/module/banque_ecoulements.py # Banque d'ecoulements elementaires import numpy as np # Fonctions pour creer des grilles du plan d'ecoulement # Tous les parametres sont optionnels # Ils permettent de definir les bornes du plan et le nombre de points de discretisation # Les objets...
#!/usr/bin/env python3 """ Prepare images to work with CNN model. Inspired by https://github.com/kylemcdonald/SmileCNN We're using data from https://github.com/hromi/SMILEsmileD/tree/master/SMILEs Download the repository as zip file and put SMILEs/negatives and SMILEs/positives into the data directory in the source d...
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is a part of EM Media Handler Testing Module # Copyright (c) 2014-2021 <NAME> # # 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...
################################################################################ # Copyright 2016-2022 Advanced Micro Devices, Inc. All rights reserved. # # 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 t...
<reponame>rominaoji/ParsiNorm<filename>parsinorm/telephone_number.py<gh_stars>0 import re import random from num2fawords import words, HUNDREDS, ordinal_words from .general_normalization import General_normalization class Telephone_number: def __init__(self): self.general_normalization = General_normaliza...
<reponame>ChampionApe/Abatement_project<gh_stars>0 import os from gams import * from DB2Gams import * import DataBase from dreamtools.gamY import Precompiler import pandas as pd def IfInt(x): try: int(x) return True except ValueError: return False def return_version(x,dict_): if x not in dict_: return x e...
<gh_stars>1-10 import json from flask import jsonify import redis from flask import Flask, request from hmac import HMAC, compare_digest from hashlib import sha1 from redis_benchmarks_specification.__common__.builder_schema import ( commit_schema_to_stream, ) from redis_benchmarks_specification.__common__.env imp...
<reponame>TimothyKlim/rules_scala3 load("//rules:scala.bzl", "scala_binary", "scala_library") load( "@rules_scala3//rules:providers.bzl", _ScalaConfiguration = "ScalaConfiguration", _ScalaInfo = "ScalaInfo", ) load( "//rules/common:private/utils.bzl", _resolve_execution_reqs = "resolve_execution_req...
import frappe @frappe.whitelist() def get_customer_transportation_list(customer_email,role, name): condition = "" selected_load_tracking = [] selected = "" if not role: customer = frappe.db.sql(""" SELECT * FROM `tabCustomer` WHERE user_id=%s """, customer_email, as_dict=1) if len(cus...
# ============================================================================= # --------------------------------------------- # Battery Monitoring System: # --------------------------------------------- # ============================================================================= import random #Declare global ...
from ..utils import appid, have_appserver, on_production_server from ..boot import DATA_ROOT from .creation import DatabaseCreation from django.db.backends.util import format_number from djangotoolbox.db.base import NonrelDatabaseFeatures, \ NonrelDatabaseOperations, NonrelDatabaseWrapper, NonrelDatabaseClient, \ ...
# -*- coding: utf-8 -*- # Smoothing and normal estimation based on polynomial reconstruction # http://pointclouds.org/documentation/tutorials/resampling.php#moving-least-squares import numpy as np from scipy.spatial import KDTree as kdtree import pcl from utils.pointconv_util import knn_point from utils.utils import p...
<gh_stars>1-10 # partly inspired by: https://automaticaddison.com/how-to-draw-contours-around-objects-using-opencv/ # and: https://www.programcreek.com/python/example/89328/cv2.approxPolyDP import numpy as np import cv2 from object_detection_kmeans import process_contours, process_frame from perspective...
#!/usr/bin/env python # coding=utf-8 import requests import os import json import threading import datetime import shutil from use_email import sendmail from zipmyfile import zip_dist """统计的时间区间-开始日期""" git_root_url = "http://gitlab.example.com/" """访问Token""" git_token = "<KEY>2" """统计结果的存储目录""" export_path = "./dist...
""" Copyright 2022 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
import argparse import os import random import time import warnings import utils import sys import numpy as np import pickle import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data import torch.utils.data.distributed import torchvision...
# # 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...
<filename>generate.py import os import json import glob import torch import numpy as np import faiss import PIL from CLIP import clip from argparse import ArgumentParser from pathlib import Path from tqdm import tqdm from PIL import Image from torch.utils.data import DataLoader from torchvision import transforms as T ...
""" @Time: 2021/1/20 16:59 @Author: @File: RdfUtils.py """ from typing import List, Tuple, Dict, Union, Iterable from rdflib import Graph, RDF from rdflib.term import URIRef, Literal, BNode, Identifier from pyfuseki import config from pyfuseki.term import RDFList, Subject, Predicate, Object from pyfuseki.ontology_map...
<gh_stars>1-10 import argparse import datetime import json import os import requests import sys from pycrits import pycrits from configparser import ConfigParser # Crits vocabulary from vocabulary.indicators import IndicatorTypes as it class OTX2CRITs(object): def __init__(self, dev=False, config=None, days=Non...
#!/usr/bin/env python # Copyright (c) 2016-2021, <NAME> # Licensed under the BSD license # https://opensource.org/licenses/BSD-3-Clause # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 # The Regents of the University of California. All rights reserved. # # Redistribution and use in s...
<gh_stars>1-10 import glob import hashlib import os import os.path as osp import pickle import time from abc import ABC from collections import defaultdict from contextlib import ContextDecorator, contextmanager from timeit import default_timer from typing import Any, Callable, Dict, List import cv2 import gym import ...
# -*- coding: utf-8 -*- # Copyright (c) 2019, <NAME> and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ from email_reply_parser import EmailReplyParser from erpnext.hr.doctype.employee....
# Copyright (c) 2015, <NAME> # See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE> from __future__ import print_function, division, absolute_import import pytest import numpy as np from numpy import * import quaternion import spherical_functions as sf import scri from conftest import li...
import unittest from decimal import Decimal from importasol.db import fields from importasol.db.base import SOLFile from importasol.db import contasol from importasol.db.contasol import APU, Asiento, ContaSOL, AutoAcumulador, MAE from importasol.exceptions import ValidationError from importasol.utiles import print_diar...
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import warnings warnings.filterwarnings('ignore') import time import io import glob import scipy.misc import numpy as np from six import BytesIO from PIL import Image, ImageDraw, ImageFont import tensorflow as tf import os, sys # os.environ['P...
# How many species in GBIF? # grep species ../../feed/gbif/in/taxon.txt | grep -v synonym | wc # To test: # ../../bin/jython taxonomy_metrics.py ../../t/tax/aster/ ../../tax/skel/ tmp_test_metrics.json tmp_test_contributions.csv import os, sys, csv, json from org.opentreeoflife.taxa import Taxonomy, Taxon, Rank from...
# coding: utf-8 # to run every hour between 0700 & 2100 using CRON # for instance using pythonanywhere # * 7-21 * * * /home/ubuntu/cron/testwater.py >/dev/null 2>&1 import datetime import sys now = datetime.datetime.now() print(now.hour) #if (now.hour < 6) | (now.hour > 20): #UTC sys.exit() # CONFIG account_sid...
<reponame>comzyh/SRGAN_impl import tensorflow as tf def srresnet_preprocess(images): return (tf.to_float(images) / 127.5) - 1 def srresnet_postprocess(images): return (images + 1) * 127.5 def SRResNet(images, training, reuse=False, residual_blocks_num=16): """ <NAME>., <NAME>., <NAME>., <NAME>., <...
import csv import json import logging import os.path import sys from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from django.contrib.auth.models import User, Group from django.conf import settings from perfiles.models import Perfil user_info = [ { ...
<gh_stars>0 # Copyright 2021 Zilliz. 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 ...
<filename>blender/arm/material/mat_batch.py import bpy import arm.material.cycles as cycles import arm.material.make_shader as make_shader import arm.material.mat_state as mat_state # TODO: handle groups # TODO: handle cached shaders batchDict = None signatureDict = None def traverse_tree(node, sign): sign += no...
<reponame>harishbommakanti/rpl_sb_efforts<filename>experiments-harish/rollout.py # general libraries import numpy as np import matplotlib.pyplot as plt # robosuite libraries import robosuite as suite from robosuite.wrappers import GymWrapper from robosuite import load_controller_config # RL framework libraries from ...
# 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 may ...
<gh_stars>0 import os import numpy as np from pymoo.optimize import minimize from pymoo.util import plotting from pymoo.util.reference_direction import UniformReferenceDirectionFactory from pymop.factory import get_problem from pymop.problem import Problem class Myproblem(Problem): def __init__(self, n_var=2, n_...
from pathlib import Path import os from typing import Union import sys import copy from scipy.io import savemat import spikeextractors as se from ..basesorter import BaseSorter from ..utils.shellscript import ShellScript from ..sorter_tools import recover_recording def check_if_installed(waveclus_path: Union[str, No...
<reponame>sarar0sa/Cisco_Mac_Lookup from time import sleep import csv from datetime import datetime import mac_vendor_lookup import cisco_service class CiscoDnacMacLookupRunner(): headers = {'Content-Type': 'application/json'} def __init__(self): self.cisco = cisco_service.CiscoService() self...
""" Entry point for training and evaluating a lemmatizer. This lemmatizer combines a neural sequence-to-sequence architecture with an `edit` classifier and two dictionaries to produce robust lemmas from word forms. For details please refer to paper: https://nlp.stanford.edu/pubs/qi2018universal.pdf. """ import loggi...
<gh_stars>1-10 """ All rights reserved to cnvrg.io http://www.cnvrg.io cnvrg.io - AI library Written by: <NAME> Last update: Oct 06, 2019 Updated by: <NAME> logistic_regression.py ============================================================================== """ import argparse import pandas as pd from SKTrai...
# -*- coding: utf-8 -*- # keras系 from keras import models from keras import layers from keras.layers import Input,merge from keras.layers.core import Reshape,Dense,Dropout,Activation,Flatten,MaxoutDense,Merge from keras.layers.advanced_activations import LeakyReLU from keras.layers.convolutional import Convolution2D, M...
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Created by magus0219[<EMAIL>] on 2020/4/6 import pytest import copy from artascope.src.lib.user_config_manager import ucm from artascope.src.model.user_config import UserConfig from artascope.src.lib.auth_manager import ( LoginStatusText, LoginSt...
import logging import unittest import requests from requests.exceptions import ConnectionError from mock_services import http_mock from mock_services import is_http_mock_started from mock_services import no_http_mock from mock_services import reset_rules from mock_services import start_http_mock from mock_services i...
# coding:utf-8 # # # # import os import argparse import numpy as np import soundfile as sf import tensorflow as tf from config import load_conf_info from data_utils.data_loader import AudioParser from model_utils.tester import BaseTester from model_utils.utils import AudioReBuild from model_utils.model import FullyCNN...
<filename>LuciferMoringstar_Robot/__init__.py from .Utils import ( get_filter_results, get_file_details, is_subscribed, get_poster, Media ) from .Channel import ( RATING, GENRES ) HELP = """𝙷𝙴𝚈 {} 𝘏𝘦𝘳𝘦 𝘐𝘴 𝘛𝘩𝘦 𝘏𝘦𝘭𝘱 𝘍𝘰𝘳 𝘔𝘺 𝘊𝘰𝘮𝘮𝘢𝘯𝘥𝘴.""" ABOUT =""" ╔════❰ ꪖ᥇ꪮꪊ𝓽 ꪑ𝘴ᧁ ❱═❍⊱...
import glob import os import cv2 import h5py as h5 import utils.coalbp import numpy as np import utils.preprocess as prep SEP = os.path.sep def get_path(is_training=True): if is_training: dataset = "train_release" else: dataset = "test_release" root_path = os.path.join("D:\Database", "CA...
<reponame>zh794390558/lingvo<filename>lingvo/tasks/asr/model_test_input_generator.py # 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 ...
from django.contrib import admin from .models import PerguruanTinggi, JabatanFungsional, Dosen, \ Gelar, Keahlian, MataKuliah, Penelitian, Proyek, DosenGelar, DosenMatakuliah, DosenSkor, \ ProgramStudi, Jenjang, ProgramStudiKeahlian, GlobalVar, DosenJumlahPengajaran, \ DosenJumlahPenelitian, DosenJumlahProy...
#!/usr/bin/python2.7 # # ### These are tests that can be performed with only core Qengine blocks # # import json import unittest class QengineTestCase(unittest.TestCase): @classmethod def setUpClass(self): from pkg.config.qconfig import Config self.config = Config() self.config.init({ 'QENGINE_SALT':'mu...