text
stringlengths
6.04k
39.5k
import semantic.types as CT from parser.ast import * from semantic.types import append_error_semantic def semantic_check(node): if type(node) is ProgramNode: program_visitor(node) def class_visitor(_class: ClassDeclarationNode, index: CT.Tipos, scope: dict): index = CT.TypesByName[_class.type] ...
#!/usr/bin/env python """ BenchIT is a simple Python script for security auditing purposes. It is the most useful for auditing systems by analyzing files collected from remote hosts. It allows you to check certain system settings stored in configuration files by using regular expressions. The simplest check will dete...
#!/usr/bin/env python3 from util import read_osm_data, great_circle_distance, to_local_kml_url # NO ADDITIONAL IMPORTS! ALLOWED_HIGHWAY_TYPES = { 'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'living_street', 'motorway_link', 'trunk_link', 'primary_link', 'secon...
import torch import numpy as np import os import argparse import librosa import re import json import random from string import punctuation from g2p_en import G2p from models.StyleSpeech import StyleSpeech from text import text_to_sequence import audio as Audio import utils import soundfile as sf from torch.autograd i...
import numpy as np import torch from torch import nn from config import global_config as cfg from modules import get_one_hot_input, cuda_ from base_model import BaseModel from metric import BLEUScorer class MultinomialKLDivergenceLoss(nn.Module): def __init__(self): super().__init__() def forward(sel...
import datetime from collections import Counter import re import xml.etree.ElementTree import xml.sax.saxutils import logging import copy import uuid from hangouts_to_sms import hangouts log = logging.getLogger(__name__) def write_sms_backup_and_restore(xml_etree, filepath): """ Export to SMS Backup & Restore F...
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for niftycoind node under test""" import contextlib import decimal import errno from enum import...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os from os.path import join import six import pytest import tempfile import shutil from asv import config from a...
# -*- coding: utf-8 -*- """ gspread.utils ~~~~~~~~~~~~~ This module contains utility functions. """ import sys import re from functools import wraps from collections import defaultdict try: from collections.abc import Sequence except ImportError: from collections import Sequence from itertools import chain...
import storageManager from tkinter import * from os import path from tkinter import filedialog from tkinter import Menu from tkinter import ttk from tkinter import scrolledtext from tkinter import messagebox import os #from sintactico import ejecutar_analisis import reportes.RealizarReportes import reportes.reportesim...
r"""Animate the display or removal of a mobject from a scene. .. manim:: CreationModule :hide_source: from manim import ManimBanner class CreationModule(Scene): def construct(self): s1 = Square() s2 = Square() s3 = Square() s4 = Square() ...
# -*- coding: utf-8 -*- """Generates FAB views.py file from db model. For Dev: Install, Run, Deploy Instructions to test Command Line https://github.com/valhuber/fab-quick-start/wiki/Explore-fab-quick-start cd nw-app python ../fab_quick_start_util/fab_quick_start.py python ../fab_quick_start_util/fab_...
import logging import re import warnings from urllib import urlencode from django.template import Context from django.template.loader import get_template from monocle.cache import cache from monocle.resources import Resource from monocle.settings import settings from monocle.tasks import request_external_oembed from...
### digital_coast.py - NOAA Digital Coast fetch ## ## Copyright (c) 2010 - 2022 Regents of the University of Colorado ## ## digital_coast.py is part of CUDEM ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to de...
# Copyright 2019, Google LLC 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 a...
import multiprocessing as mp import functools import os from collections import OrderedDict from typing import Dict, Optional, List, Tuple, Union import numpy as np from autogluon_contrib_nlp.data import batchify as bf from autogluon_contrib_nlp.utils.preprocessing import get_trimmed_lengths, match_tokens_with_char_spa...
""" I/O for Gmsh's msh format (version 4.1, as used by Gmsh 4.2.2+), cf. <http://gmsh.info/doc/texinfo/gmsh.html#MSH-file-format>. """ import logging from functools import partial import numpy from .._common import _geometric_dimension, cell_data_from_raw, raw_from_cell_data from .._exceptions import ReadError, Write...
# Standard Library from collections.abc import Iterable # Import from third library import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo from eod.models.utils.initializer import initialize_from_cfg from eod.models.utils.normalize import build_norm_layer __all__ = ['ResNet', 'resnet18', 'resne...
import cv2 import numpy as np import pyclipper import torch from numpy.linalg import norm from shapely.geometry import Polygon from skimage.morphology import skeletonize from mmocr.core import points2boundary def filter_instance(area, confidence, min_area, min_confidence): return bool(area < min_area or confiden...
# Copyright (C) 2017 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
""" # pp.py # classes to scrape and parse plyr proflr dot com """ import logging from namematcher.xref import Site from sportscraper.scraper import RequestScraper class Scraper(RequestScraper): """ For use by subscribers """ @property def base_url(self): return "https://www.playerpro...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jul 1 13:49:20 2021 @author: AdminCOOP """ from molmap.utils.logtools import print_info, print_warn, print_error from molmap.utils.matrixopt import Scatter2Grid, Scatter2Array, smartpadding from molmap.utils import summary, calculator from molmap.u...
# -*- coding: utf-8 -*- import sys import os if __package__ is None and not hasattr(sys, 'frozen'): path = os.path.realpath(os.path.abspath(__file__)) sys.path.insert(0, os.path.dirname(os.path.dirname(path))) import requests import re from bs4 import BeautifulSoup import time import timeit from urllib.parse...
# The MIT License (MIT) # # Copyright (c) 2016 <NAME> & <NAME> for Adafruit Industries # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2021 PaddlePaddle 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/lic...
# # Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. #/ from io import StringIO from antlr4.error.Errors import IllegalStateException from antlr4.RuleContext import RuleContext fr...
# Copyright (c) 2019 PaddlePaddle 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 appli...
import relabeling from sortedcontainers import SortedListWithKey from itertools import izip import unittest import sys # Shortcut to keep code more concise. r = relabeling def skipfloats(x, n): for i in xrange(n): x = relabeling.nextfloat(x) return x class Item(object): """ Tests use Item for items of ...
#!/usr/bin/env python """Sparse Equations and Least Squares. The original Fortran code was written by <NAME> and <NAME> as described in <NAME> and <NAME>, LSQR: An algorithm for sparse linear equations and sparse least squares, TOMS 8(1), 43--71 (1982). <NAME> and <NAME>, Algorithm 583; LSQR: Sparse linear equations...
"""Define and create necessary Hadoop users and groups on OneFS.""" from __future__ import absolute_import from __future__ import unicode_literals import logging import os import isilon_hadoop_tools.onefs __all__ = [ # Functions 'cdh_identities', 'cdp_identities', 'hdp_identities', 'iterate_ide...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2019 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2021/12/2 11:22 Desc: 新浪财经-债券-沪深可转债-实时行情数据和历史行情数据 http://vip.stock.finance.sina.com.cn/mkt/#hskzz_z """ import datetime import json import re import pandas as pd import requests from bs4 import BeautifulSoup from py_mini_racer import py_mini_racer from tqdm import...
"""Various debugging functions.""" from __future__ import print_function import sys import os from itertools import product, chain import numpy as np import cProfile from contextlib import contextmanager from six import iteritems, iterkeys, itervalues from collections import Counter from six.moves import zip_longes...
''' Created on Apr 2, 2013 @author: johannes ''' import scipy as SP import scipy.linalg as LA import warnings from . import pySplittingCore as SC from . import parMixedForest from . import mixedForestUtils as utils from . import BLUP import limix_legacy.deprecated as dlimix_legacy class Forest(object): ''' c...
import os import codecs import time import datetime from collections import OrderedDict import grpc from grpc._channel import _Rendezvous from google.protobuf.json_format import MessageToDict import lndmanage.grpc_compiled.rpc_pb2 as lnd import lndmanage.grpc_compiled.rpc_pb2_grpc as lndrpc import lndmanage.grpc_com...
''' Window manager ============== The kivy window manager is a compositing window manager that exposes an interface for creating Kivy widgets from X windows, which can be sized and positioned according to kivy layouts. ''' from kivy.graphics import Color, Rectangle, RenderContext from kivy.logger import Logger from ...
# (c) Copyright [2018-2021] Micro Focus or one of its affiliates. # 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 applicabl...
# -*- coding: utf-8 -*- # Copyright 2018 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 agre...
# -*- coding: utf-8 -*- # the above encoding declaration is needed to have non-ascii characters in this file (anywhere even in comments) # from __future__ import unicode_literals # no, since we want to match the return type of str() which is bytes in py2 import sys import numpy as np import pandas as pd import pytest...
from __future__ import division,print_function import sys,string,re, math,random from collections import defaultdict sys.dont_write_bytecode=True def say(x): sys.stdout.write(str(x)) r= random.random any=random.choice class Num: def __init__(i,txt,col): i.name,i.col, i.lo, i.hi = txt,col,1e32,-1e32 i.n, i....
# TODO: there is still a lot of inconsistency # in a lot of these classes; needs refactor. import asyncio from typing import Any from typing import Iterable from typing import Iterator from typing import Optional from typing import overload from typing import Sequence from typing import Union import databases.core fro...
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # 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 ...
#!/usr/bin/env python """ The :py:mod:`~process.process` module contains two classes that are used to process the data. The first class :py:class:`~process.process.ProcessCCD` is used for active CCD imagers (ACS, STIS, and WFC3). Each of the active CCD imagers has a pythonic interface to their calibration pipelines, wh...
"""Base abstract representations of functions.""" import contextlib import inspect import logging from typing import Type from pytype import utils from pytype.abstract import _base from pytype.abstract import _classes from pytype.abstract import _instance_base from pytype.abstract import _instances from pytype.abstra...
import sys import logging import re import numpy as np import pyqtgraph as pg from PyQt5.QtCore import QThread, pyqtSignal from PyQt5.QtGui import QValidator import log from line import Line from toolbase import ToolBase import fitfunctions from fitgraphitems import * from settingitems import * from functions import b...
import sublime import sublime_plugin import os import subprocess import sys import re from pprint import pprint # GLOBALS APPNAME = "QColor" VERSION = "1.0.6" SETTINGSFILE = "QColor.sublime-settings" CONF_KEY = "q_color" FOUND_WEBVIEW = False def SETTINGS(): return sublime.load_settings(SETTINGSFILE) def DEBUG...
""" Environments and wrappers for Sonic training. """ import gym, random import numpy as np from src.wrapper.atari_wrapper import WarpFrame, FrameStack, WarpFrameRGB import gym_remote.client as grc from retro_contest.local import make from collections import deque import cv2 train_level = [['SonicTheHedgehog-Genesis...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-unsafe """This module contains the class TemporalHierarchicalModel class. """ import logging from math import gcd from typing import Di...
"""Base class used to define the interface for derivative approximation schemes.""" import time import numpy as np from openmdao.core.constants import INT_DTYPE from openmdao.utils.array_utils import get_input_idx_split import openmdao.utils.coloring as coloring_mod from openmdao.utils.general_utils import _convert_au...
# The MIT License (MIT) # # Copyright (c) 2013-2019 SUNSCRAPERS # # 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, ...
from __future__ import absolute_import import warnings import numpy as np import pandas as pd import os import copy from sklearn.preprocessing import StandardScaler from pysurvival import utils from pysurvival.models import BaseModel from pysurvival.models._survival_forest import _SurvivalForestModel from pysurvival im...
import os import string import warnings import time import click import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.stats import linregress import seaborn as sns sns.set(context='paper') with warnings.catch_warnings(): warnings.simplefilter("ignore") mp...
from collections import defaultdict from itertools import product import numpy as np from scipy import signal from ..glyph import G from ..utils import adjacent from .monster_utils import is_monster_faster, is_dangerous_monster, \ ONLY_RANGED_SLOW_MONSTERS, EXPLODING_MONSTERS, WEAK_MONSTERS, consider_melee_only_r...
#!/usr/bin/env python # fit a stellar model atmosphere model + dust extinction model to # observed spectra and photometry import glob import argparse import numpy as np import scipy.optimize as op import matplotlib.pyplot as plt import matplotlib as mpl import astropy.units as u import emcee from measure_extincti...
from __future__ import print_function import bisect import collections import io import json import math import re from decimal import Decimal from pprint import PrettyPrinter pp = PrettyPrinter() class VCDVCD(object): # Verilog standard terminology. _VALUE = set(('0', '1', 'x', 'X', 'z', 'Z')) _VECTOR_...
import pytest import six import os import shutil import tempfile import time from verta._internal_utils.importer import get_tensorflow_major_version @pytest.mark.tensorflow class TestKeras: def test_sequential_api(self, experiment_run): verta_integrations_keras = pytest.importorskip("verta.integrations...
"Turn templates into Cython pyx files." import os import os.path import re NDIM_MAX = int(os.getenv('NDIM_MAX', 3)) TAB = ' ' * 4 def template(func): "Convert template dictionary `func` to a pyx file." codes = [] codes.append(func['main']) select = Selector(func['name']) for key in func['templa...
from __future__ import print_function import sys import numpy as np import matplotlib.pyplot as plt import matplotlib.tri as tri def contourf(*arguments, **kwargs): """ Create a contourf plot of a 2-D llc array (with tricontour). Call signatures:: contourf(X, Y, C, N, **kwargs) contourf(...
#! /usr/bin/env python """This module contains iromlab's cdWorker code, i.e. the code that monitors the list of jobs (submitted from the GUI) and does the actual imaging and ripping """ import sys import os import shutil import time import glob import csv import hashlib import logging import pythoncom import wmi impor...
# Copyright 2020 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 agreed to in writing, ...
# check python version, this script requires python3 import sys if sys.version_info[0] < 3 or (sys.version_info[0] == 3 and sys.version_info[1] < 8): print('ERROR: This script requires Python 3.8 or higher') sys.exit(1) import urllib.request import urllib.error import os import json import time import datetim...
# # Copyright 2015, 2016, 2017 Human Longevity, 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 ...
# Copyright 2017. <NAME>. All rights reserved # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following # dis...
# 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 # # Unless required by applica...
#!/usr/bin/env python3 """ tactus-visualize.py: support functions for tactus-visualize.ipynb usage: import tactus-visualize 20190108 erikt(at)xs4all.nl """ # The first block of code contains the code of the function that # reads the data. import csv import math CLIENT = "CLIENT" COUNSELOR = "COUNSELOR" ...
""" @author <NAME> """ from __future__ import absolute_import from builtins import object from nose.tools import (assert_equal, assert_not_equal, assert_is, raises, assert_true, assert_false) from nose.plugins.skip import Skip, SkipTest from .test_helpers import (CallIdentity, raises_with_messa...
"""Queries on data sets""" import datetime import json import re import subprocess import math import decimal import sqlalchemy from .data_set import find_data_set from sqlalchemy.ext.declarative import declarative_base import mara_db.dbs import mara_db.shell import mara_db.postgresql from mara_page import acl Base...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import tensorflow as tf import tensorflow.contrib.slim as slim from libs.configs import cfgs from libs.networks.resnet import fusion_two_layer DATA_FORMAT = "NHWC" DEBUG = False debug_dict = {} BottleNeck_NUM_DICT = { 'resnet...
# -*- coding: utf-8 -*- # Copyright 2017 Kakao, Recommendation Team # # 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...
import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd import dash import plotly.graph_objects as go import numpy as np from database_connection import connect import dash_bootstrap_components as dbc # connect to database conn = connect() sql = "select * from vehic...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2021 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-...
""" Auto-download of ancillary files. It allows Operations to specify a serious of source locations (http/ftp/rss URLs) and destination locations to download to. This is intended to replace Operations maintenance of many diverse and complicated scripts with a single, central configuration file. """ from __future__ im...
#!/usr/bin/env python from http.server import HTTPServer, BaseHTTPRequestHandler # import SocketServer import base64 import urllib import sys import os import json os.environ['CUDA_VISIBLE_DEVICES']='' import numpy as np import tensorflow as tf import time import a3c S_INFO = 6 # bit_rate, buffer_size, rebuffering_...
import tensorflow as tf from .optimizers import get_regularization_loss import numpy as np from tensorflow.python.ops import manip_ops def _add_loss_summaries(total_loss, losses, summaries=False): """ Add summaries for losses in model. Generates moving average for all losses and associated summaries for ...
# -*- coding: utf-8 -*- """ File containing various support function @author: <NAME> (Jesus) @organization: University of Padua (Italy) """ #%% import numpy as np import matplotlib.pyplot as plt from scipy.io import loadmat import scipy.signal import scipy.linalg as la from sklearn.discriminant_analysis import Lin...
# -*- coding: utf-8 -*- from rest_framework import status as http_status import six from django.db import models from django.db.models.signals import pre_save, post_save, post_delete from django.dispatch import receiver from dropbox.dropbox import DropboxTeam from dropbox.exceptions import DropboxException from osf.m...
# https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb import os import numpy as np import yaml # import cv2 from pathlib import Path from torch.utils import data from PIL import Image from pyquaternion import Quaternion from nuscenes.utils.data_classes import L...
import logging import types import pytest from pytmc import parser, pragmas from pytmc.record import (RecordPackage, BinaryRecordPackage, IntegerRecordPackage, EnumRecordPackage, FloatRecordPackage, WaveformRecordPackage, StringRecordPacka...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# -*- coding: utf-8 -*- """Common views.""" from flask import Blueprint, redirect, url_for, jsonify, make_response, render_template, request from flask_login import login_required, current_user from sqlalchemy import exc from .models import Criticality, Disposition, HardwareType, Company, Reference, Bookmark, AdvancedS...
import sys import os sys.path.append(os.path.abspath('../../stratipy')) from stratipy import biostat import numpy as np import pandas as pd import re import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.lines import Line2D plt.switch_backend('agg') def get_biostat_files(result_...
import time import numpy as np from typing import Union, Tuple, List import pathlib """ In here we have many interpolation routines. Currently there is quite a bit of code repetition since most of this was done to solve a specific application at the time. Hopefully I'll have time one day to make it more abstract. """ ...
import jsonschema from django.contrib.auth import get_user_model from django.db import transaction from django.db.utils import IntegrityError from openslides.core.config import config from openslides.utils.autoupdate import inform_changed_data from openslides.utils.exceptions import OpenSlidesError from openslides.uti...
# I am not a master at Manim, so my code is quite simple. In fact, I only # started using Manim 2 weeks ago. My Complex Fourier Series video was the # first video I made using Manim. I hope you enjoyed it! # The other animations were either made by 3Blue1Brown or Theorem of Beethoven. # The python files that were mad...
from util import flatten, split_and_flatten from tones import tonify, all_pitches, pitch, letter, equivalent_tone, all_tones from keys import keyify from itertools import cycle from copy import deepcopy all_durs = ['\\longa' '\\breve', 1, '1', 2, '2', 4, '4', 8, '8', 16, '16', 32, '32', 64, '64', 128, '128', '1.', '...
from __future__ import print_function, division import itertools from sympy.combinatorics.fp_groups import FpGroup, FpSubgroup, simplify_presentation from sympy.combinatorics.free_groups import FreeGroup from sympy.combinatorics.perm_groups import PermutationGroup from sympy.core.numbers import igcd from sympy.ntheory....
from math import perm import pyttsx3 from requests.api import request import speech_recognition as sr import datetime import os import cv2 as cv2 import random from requests import get import wikipedia import webbrowser import pywhatkit as kit import smtplib import sys import pyjokes import pyautogui import time impor...
import os # os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # os.environ["CUDA_VISIBLE_DEVICES"] = "1" from src.python.consts import * from src.python.preprocess import * from src.python.geneontology import * from src.python.baselines import * from sklearn.metrics import hinge_loss from pymongo import MongoClient ...
# Copyright 2018 The TensorFlow Probability 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...
# Copyright 2015 gRPC 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 writing...
from .blocks import ParameterBlock, CompartmentBlock, ObservableBlock from .blocks import SpeciesBlock, MoleculeTypeBlock from .blocks import FunctionBlock, RuleBlock from .pattern import Pattern, Molecule, Component ###### Base object ###### class XMLObj: """ Base object that contains XMLs that is the paren...
import json #import requests from pathlib import Path import datetime import os import time import torch from PIL import Image import torchvision from torchvision.models.detection.faster_rcnn import FastRCNNPredictor from natsort import natsorted #import inspect import sys import pickle import shutil import copy import...
# Copyright 2017, Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# 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 agreed to in writing, ...
# SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>> # # SPDX-License-Identifier: MIT from monitor_api.enums import Field, MetricScope, CONTEXT_ALL_FIELDS, METRIC_ALL_FIELDS, SESSION_ALL_FIELDS from typing import List, Union, Dict, Optional import datetime import hashlib try: datetime.datetime.fromisoformat(datetime....
import chess import chess.svg as svg import copy import FileIO as io import random as rand def reverseArray(arr): return list(reversed(arr)) # These arrays allow the algorithm to make decisions based on the position of pieces pawnEvalWhite = [ [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [5.0, 5.0, 5.0, ...
import discord from discord.ext import commands from discord.ext import tasks import random from datetime import datetime import re from utilities.helpers.utils import VoteReminder, Votelink,Suicide class BackgroundTasks(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot self.bot...
""" Extensions to lasagne, in terms of convenience functions and new layer types """ __author__ = "sschneider" __email__ = "<EMAIL>" from collections import OrderedDict import pickle import numpy as np import theano import pickle import h5py from theano import tensor as T import lasagne as nn from lasagne.layers im...
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: <NAME> <<EMAIL>>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ****************************************...