text
stringlengths
1
927k
import os def test_picture(bot): bot.send(os.getcwd() + "\\Temp\\selenium-python.png","This is a test") def test_text(bot): bot.typer(' '.join(bot.message.split(' ')[1:]),bot.textbox)
# Copyright (c) 2022, NVIDIA CORPORATION. from .mixin_factory import _create_delegating_mixin Reducible = _create_delegating_mixin( "Reducible", "Mixin encapsulating reduction operations.", "REDUCTION", "_reduce", { "sum", "product", "min", "max", "count", ...
# General import torch import torch.nn as nn import torch.nn.functional as F # Setup from setups import CategoricalImageFlowSetup # Data from pixelflow.data import CategoricalCIFAR10 # Model from pixelflow.flows import AutoregressiveSubsetFlow2d from pixelflow.transforms.subset import QuadraticSplineAutoregressiveSu...
from isegm.utils.exp_imports.default import * from isegm.model.modeling.transformer_helper.cross_entropy_loss import CrossEntropyLoss MODEL_NAME = 'pascal_segformerb5' def main(cfg): model, model_cfg = init_model(cfg) train(model, cfg, model_cfg) def init_model(cfg): model_cfg = edict() model_cfg.c...
# # See top-level LICENSE.rst file for Copyright information # # -*- coding: utf-8 -*- """ desispec.pipeline.db =========================== Pipeline processing database """ from __future__ import absolute_import, division, print_function import os import re from collections import OrderedDict from contextlib impor...
from RestrictionTypeDetector import RestrictionTypeDetector from RestrictionTypeDetector import TYPE_INT from RestrictionTypeDetector import MEASURE_OCCURRENCE class IrreflexiveObjectPropertiesDetector(RestrictionTypeDetector): """ This class serves as interface for all Restriction Type Statistics of irreflexi...
import tkinter as tk from tkinter import filedialog, messagebox from os import path import pickle from utils import MyKeyboardV001 import time import threading from functools import partial class Application(tk.Frame): class MyButton(tk.Button): def __init__(self, *args, **kwargs): tk.Button....
# The MIT License (MIT) # Copyright (c) 2014-2017 University of Bristol # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s OUTPUT_DIRECTORY URL1 [URL2 ...] Download all files pointed at by the given URLs, into OUTPUT_DIRECTORY (which must...
import operator import pandas as pd import pytest from numba import cuda import cudf from cudf.core.udf.pipeline import nulludf from cudf.testing._utils import NUMERIC_TYPES, assert_eq arith_ops = [ operator.add, operator.sub, operator.mul, operator.truediv, operator.floordiv, operator.mod, ...
"""Generate a time space diagram for some networks. This method accepts as input a csv file containing the sumo-formatted emission file, and then uses this data to generate a time-space diagram, with the x-axis being the time (in seconds), the y-axis being the position of a vehicle, and color representing the speed of...
import re import copy import time from .common_functions import GLOSS_EMPTY, GLOSS_STEM, GLOSS_STEM_FORCED, GLOSS_STARTWITHSELF, POS_NONFINAL from .paradigm import Paradigm, Inflexion from .wordform import Wordform from .clitic import SIDE_ENCLITIC, SIDE_PROCLITIC, SIDE_OTHER from .morph_fst import MorphFST class Par...
"""GUI call back functions and related helper functions.""" from functools import partial from pathlib import Path from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.filechooser import FileChooserIconView from kivy.uix.modalview import ModalView from kivy.uix.rst import RstDocum...
# 1484 # <a[a-zA-Z0-9 ="'.:;?]*(href=[\"\'](http:\/\/|\.\/|\/)?\w+(\.\w+)*(\/\w+(\.\w+)?)*(\/|\?\w*=\w*(&\w*=\w*)*)?[\"\'])*(>[a-zA-Z0-9 ="'<>.:;?]*</a>) # POLYNOMIAL # nums:4 # POLYNOMIAL AttackString:"<a"+"href="0""*5000+"! _1_POA(i)" import re from time import perf_counter regex = """<a[a-zA-Z0-9 ="'.:;?]*(href=[\...
""" This contains the tests (unit and integration) for the requirements module. It currently contains: """ from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth import authenticate from django.contrib.auth.models import User from mig_main.tests.factories import Academi...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: second/protos/optimizer.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import refl...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool persistence. By default, bitcoind will dump mempool on shutdown and then reload it on sta...
from passlib.context import CryptContext pwd_context = CryptContext(schemes=['bcrypt'],deprecated='auto') def hash(password: str): return pwd_context.hash(password) def verify(plain_password,hashed_password): return pwd_context.verify(plain_password,hashed_password)
"""command: .hack to create a false hack""" from telethon import events import asyncio @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) async def _(event): if event.fwd_from: return animation_interval = 2 animation_ttl = range(0, 11) input_str = event.pattern_match.grou...
"""plot_stuff script to plot things Just temporary code to plot things. Not for producing results, but for testing code. """ import numpy as np import scipy from stonesoup.types.state import GaussianState from matplotlib import pyplot as plt from matplotlib.patches import Ellipse from trackers.kalman_filter_dependen...
from habu.lib import dnsx def test_mx(): assert 'aspmx.l.google.com.' in dnsx.mx('google.com') def test_ns(): assert 'ns1.google.com.' in dnsx.ns('google.com') def test_axfr_fail(): assert not dnsx.axfr('google.com') def test_axfr_success(): assert dnsx.axfr('zonetransfer.me')
from typing import Dict, List, Optional, Union from psqlextra.types import PostgresPartitioningMethod, SQLWithParams class PostgresPartitionedModelOptions: """Container for :see:PostgresPartitionedModel options. This is where attributes copied from the model's `PartitioningMeta` are held. """ d...
from sympy.testing.pytest import raises from sympy.external.gmpy import HAS_GMPY from sympy.polys import ZZ, QQ from sympy.polys.matrices.ddm import DDM from sympy.polys.matrices.exceptions import ( DMShapeError, DMNonInvertibleMatrixError, DMDomainError, DMBadInputError) def test_DDM_init(): items = [[...
import warnings from typing import List, Callable, Union from sharpy.plans.require.methods import merge_to_require from sharpy.plans.require import RequireBase from typing import TYPE_CHECKING if TYPE_CHECKING: from sharpy.knowledges import Knowledge class Any(RequireBase): """Check passes if any of the con...
# Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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 t...
import config from flask import Flask, render_template, jsonify, url_for from novaclient import client app = Flask(__name__) nt = client.Client(config.VERSION, config.USER, config.PASSWORD, config.TENANT, config.AUTH_URL, insecure=True) # print nt.flavors.list() @app.route('/') def index(): instances = nt.serv...
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
import unittest from src.Presenter.main_presenter import MainPresenter import os class SamplePackageTestCase(unittest.TestCase): def setUp(self): os.chdir('../') self.main_presenter = MainPresenter() self.package_presenter = self.main_presenter.load_package( 'sample_package')...
''' Copyright (c) 2020, Martel Lab, Sunnybrook Research Institute Codes inspired by Hugging Face Transformers package code run_mlm.py https://github.com/huggingface/transformers/blob/main/examples/pytorch/ language-modeling/run_mlm.py Description: Training code used to train a BERT embedding in Masked Language Modelin...
import json import random import string import traceback from tests.cephfs.cephfs_utilsV1 import FsUtils from utility.log import Log log = Log(__name__) def run(ceph_cluster, **kw): """ Test operation: 1. Create a subvolume 2. Check info for the subvolume 3. Check if gid and uid are set to 0 ...
class Verifications(object): def __init__(self): pass def correct_functionality(self, user_input, keywords, functionalities): for functionality in functionalities: functionality['keywords_found'] = [] for keyword in keywords: if keyword['value'] in user_input: ...
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface import pymysql from pymysql import cursors DB_HOST = '172.20.52.114' DB_PORT = 33...
#!/usr/bin/env python import argparse import json def main(): parser = argparse.ArgumentParser() parser.add_argument('--config-file') parser.add_argument('--value') parser.add_argument('--dbkey') parser.add_argument('--name') parser.add_argument('--subdir') parser.add_argument('--data-tab...
import socket import sys sock = socket.socket() sock.bind(("", 8765)) sock.listen(1) while True: con, addr = sock.accept() while True: c = con.recv(1024) print(c) r = c.decode().upper().encode() print(r) con.sendall(r)
# -*- coding: utf-8 -*- import keras.applications as app def get_model(name='vgg16'): if name == 'vgg16': model = app.vgg16.VGG16(weights='imagenet') preprocess_input = app.vgg16.preprocess_input if name == 'vgg19': model = app.vgg19.VGG19(weights='imagenet') preprocess_input =...
# Copyright (c) 2015 Tom Barron. 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...
''' A trip to mystical land is going to be organized in ByteLand, the city of Bytes. Unfortunately, there are limited seats say A and there are N number of groups of people. Every group can have old person o, child c, man m and woman w. The organizing committee wants to maximize the happiness value of the trip. Happine...
import asyncio import copy import glob import os import pathlib import uuid from datetime import time import yaml from aiohttp import web from app.objects.c_adversary import Adversary from app.objects.c_operation import Operation from app.objects.c_schedule import Schedule from app.objects.secondclass.c_fact import F...
from django.db.models import fields from rest_framework import serializers from clients.models import Client from clients.validators import * class ClientSerializer(serializers.ModelSerializer): class Meta: model = Client fields = '__all__' def validate(self, data): if not name_valid(d...
import json def str_2_json(str): return json.loads(str, encoding="utf-8") class MapInfo: def __init__(self): self.max_x = 0 self.max_y = 0 self.golds = [] self.obstacles = [] self.numberOfPlayers = 0 self.maxStep = 0 def init_map(self, gameInfo): ...
from sys import path path.append('/home/joerojas/Desarrollo/Curso-Basico-Python/102_misPaquetes/packages') from extra.iota import FunI print(FunI())
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @File :constants.py @Author :frankdevhub@gmail.com @Blog : http://blog.frankdevhub.site @Date :2021/9/4 18:34 """ class Xpath: """ selenium dicts web element attribute name 页面对象常用属性参数 """ def __init__(self): pass ATTRIBUTE_NAM...
# This file will generate a synthetic dataset to predict employee attrition # Like most datasets it will have a feature vector and a Y label for each instance. # However, unlike most datasets it will also have an Explanation (E) for each instance, encoded as an non-negative integer. # This is motivated by the TED frame...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import subprocess import sys from trace_viewer import trace_viewer_project class AffectedFile(object): def __init__(self, input_ap...
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org> # # types.py: base types for introspected items. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public...
import os.path import tensorflow as tf import helper import ImageProcessor import warnings from distutils.version import LooseVersion import project_tests as tests import scipy.misc from glob import glob from moviepy.editor import VideoFileClip import time import timeit # Check TensorFlow Version assert LooseVersion(t...
# Copyright (c) 2022 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 applic...
# Copyright 2022 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 """ Convert an ONNX model to a LBANN model Run "./onnx2lbann.py --help" for more details. """ import argparse import onnx import google.protobuf.text_format as txtf import lbann.onnx.o2l from lbann.lbann_proto import lbann_pb2 dataLayerName = "image" labelLayerName = "label" probLayerName = "...
# Copyright 2015 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...
""" Copyright (C) 2018-2020 Intel Corporation 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 sys import stdio MIN = 1e-10 c = float(sys.argv[1]) t = c while abs(t - c/(t*t)) > MIN*t: t = (c/(t*t) +2*t)/3 stdio.writeln(t)
import logging import urllib import csv import http import xml.etree.ElementTree as etree from dipper.sources.Source import Source from dipper.models.Model import Model from dipper.models.Genotype import Genotype from dipper.models.BiolinkVocabulary import BioLinkVocabulary as blv from datetime import datetime LOG = ...
# -*- coding: utf-8 -*- from django.db import models from ..core.models import TimeStampedModel, ModelStatus from ..edificios.models import Edificios class Contactos(TimeStampedModel, ModelStatus): """ Contáctos de un edificio """ edificio = models.ForeignKey(Edificios, verbose_name='Edificio') ...
import sys import slurm try: observatory = sys.argv[1] except: print("Specify observatory! (apo, lco, or both)") sys.exit() try: startat = sys.argv[2] except: startat = 'rs_fields' plan = 'zeta-0' if((observatory == 'apo') | (observatory == 'lco')): observatories = [observatory] elif(observa...
import os from setuptools import setup PACKAGE = "allure-behave" VERSION = "2.5.5" classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Topic :: Software Development :: Quality Assurance', 'Topic ::...
def main(filepath): with open(filepath) as file: rows = [x.strip() for x in file.readlines()] count1 = 0 count2 = 0 part_a = set() part_b = [] for i in range(len(rows)): if rows[i] == "" or i+1 == len(rows): count1 += len(part_a) count2 += len(set.intersec...
import os import time import numpy as np from scipy import ndimage as nd from numpy.testing import assert_array_equal, assert_array_less from gala import morpho rundir = os.path.dirname(__file__) def time_me(function): def wrapped(*args, **kwargs): start = time.time() r = function(*args, **kwargs...
from .. import xsd from ..core import SOAPResponse from ..lib.attribute_dict import AttrDict from ..soap import Service, SOAPVersion __all__ = ['echo_handler', 'echo_service', 'EchoInputHeader', 'EchoOutputHeader'] class EchoType(xsd.ComplexType): INHERITANCE = None INDICATOR = xsd.Sequence value = xsd.E...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
# Generated by Django 3.2.6 on 2021-08-24 04:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0004_auto_20210820_0954'), ] operations = [ migrations.AddField( model_name='user', name='is_email_verified'...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from refinery.units.encoding.esc import esc from .. import TestUnitBase class TestEscaping(TestUnitBase): def test_quoted_string_01(self): unit = esc(quoted=True) self.assertEqual(unit.process(RB'"r\x65\x66\x69\x6ee\x72\x79"'), B'refinery') def ...
# -*- coding: utf-8 -*- # Copyright 2022 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...
from setuptools import setup setup( name='gym_walk', version='0.0.1', description='Gym walk environment - useful to replicate Random Walk experiments', url='https://github.com/mimoralea/gym-walk', author='Miguel Morales', author_email='mimoralea@gmail.com', packages=['gym_walk', 'gym_walk.e...
''' Using tclean to image the regridded 14B-088 HI data and the archival data together. ''' from tasks import tclean vis = ["14B-088_HI_LSRK_AT0206_regrid.ms.contsub", "M33_b_c_LSRK.ms"] imagename = "M33_AT0206_14B-088_HI.clean" model = "M33_model.image" mask = "M33_newmask.image" tclean(vis=vis, imagename=im...
# # Copyright (c) 2020 Triad National Security, LLC # All rights reserved. # # This file is part of the bueno project. See the LICENSE file at the # top-level directory of this distribution for more information. # ''' Mathematical expression evaluation module. ''' import ast import operat...
from typing import Optional, List, Dict from mal import config from mal.mal import _MAL class Anime(_MAL): def __init__(self, mal_id: int, timeout: int = config.TIMEOUT): """ Anime query by ID :param mal_id: MyAnimeList ID :param timeout: Timeout in seconds """ sup...
import numpy import collections import sys def compute_precision(ts_true, ts_prediction, verbose = False): numerator = 0 # In precision, the numerator is the number of true # positives which are predicted correctly. denominator = 0 # In precision, the denominator is the total number # of predicted p...
# Copyright (c) 2015, Dataent Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import dataent from dataent.utils import strip from dataent.website.doctype.website_theme.website_theme import get_active_theme no_sitemap = 1 base_template_path = "templates/ww...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
def contab_ACTIVSg500(*args,nout=1,oc=None): if oc == None: from ...oc_api import oc_matpower oc = oc_matpower() return oc.contab_ACTIVSg500(*args,nout=nout)
import base64 import os import random import re import shutil import string import subprocess import sys import traceback from datetime import datetime, timedelta from random import randint from subprocess import PIPE from time import sleep import colorama from colorama import Fore, Style, AnsiToWin32 import insomnia...
#!/usr/bin/python import traceback import os import sys import re import argparse import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.dates as mdates import numpy as np import datetime def movingaverage(interval, window_size): window= np.ones(int(window_size))/float(windo...
import math import numpy as np import torch import torch.nn as nn from ....ops.pointnet2.pointnet2_stack import pointnet2_modules as pointnet2_stack_modules from ....ops.pointnet2.pointnet2_stack import pointnet2_utils as pointnet2_stack_utils from ....utils import common_utils def bilinear_interpolate_torch(im, x, ...
# -*- coding: utf-8 -*- """ Test for the binary FBCSP algorithm. I used the dataset 1 fo BCI competition IV. @author: Alberto Zancanaro (Jesus) @organization: University of Padua (Italy) """ #%% from FBCSP_support_function import cleanWorkspaec # cleanWorkspaec() #%% from FBCSP_support_function import loadDatasetD1_...
from setuptools import setup with open("README.md","r") as f: long_description = f.read() setup(name="vivludo", version="0.0.1", description="A cellular automaton library.", long_description=long_description, long_description_content_type="text/markdown", author="Avery Hiebert", ...
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is 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/ # # This file is d...
import re from helpers import run hlp = run('--help') stdout = hlp.stdout def test_usage(): assert stdout.startswith('Usage: ghia.py [OPTIONS] REPOSLUG') def test_description(): assert ( 'CLI tool for automatic issue assigning of GitHub issues' in stdout ) def test_strategy(): assert re....
#!/usr/bin/env python import requests import json from time import sleep import base64 import rospy from std_msgs.msg import string from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import cv2 bridge = CvBridge() # Fix this to get an image file as a parameter (subscribe to a Node), and a...
import cv2 as cv import argparse import sys import numpy as np import os.path #set constants FRONT_CAMERA = 1 BACK_CAMERA = 0 i = 0 confThreshold = 0.5 #Confidence threshold nmsThreshold = 0.4 #Non-maximum suppression threshold inpWidth = 416 #Width of network's input image inpHeight = 416 #Height of network's in...
# -*- coding: utf-8 -*- import argparse import sys IS_PY2 = sys.version_info.major == 2 def connect_db(host, port, user, passwd): import pymysql try: wconn = pymysql.connect( host=host, user=user, password=passwd, port=port, charset='utf8mb...
#!/usr/bin/env python # Licensed to the StackStorm, Inc ('StackStorm') 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 "Licens...
# -*- coding: utf-8 -*- """ Created on Wed Jun 20 10:59:28 2018 @author: Thomas Schatz Code for managing the analysis of a set of ABXpy minimal-pair scores for ABX tasks with the following structure: ON phone BY speaker, previous and following phonetic context) The main function is apply_analysis, see readme.md f...
#!/usr/bin/env python3 import struct from pykms_Base import kmsBase from pykms_Misc import ErrorCodes #--------------------------------------------------------------------------------------------------------------------------------------------------------- class kmsRequestUnknown(kmsBase): def executeReques...
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
from os import path from urlparse import urlparse import requests from tornado.httpclient import AsyncHTTPClient from tornado.simple_httpclient import SimpleAsyncHTTPClient from tornalet import asyncify def get_version_string(): return open(path.join(path.dirname(__file__), 'trequests_v...
# -*- coding: utf-8 -*- """Test utilities.""" # # (C) Pywikibot team, 2013-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals import inspect import json import locale import os import re import subprocess import sys import tempfile import time import tra...
#!/usr/bin/env python3 #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
# # Copyright © 2020 Intel Corporation. # # This software and the related documents are Intel copyrighted # materials, and your use of them is governed by the express # license under which they were provided to you (License). Unless # the License provides otherwise, you may not use, modify, copy, # publish, distrib...
import base64 import bz2 import gzip import io import json import lzma from typing import TYPE_CHECKING, Any, Callable, Dict, Tuple import zlib import cloudpickle import pendulum if TYPE_CHECKING: import pandas as pd __all__ = ( "Serializer", "PickleSerializer", "JSONSerializer", "DateTimeSeriali...
from ui.base_gui import BaseGUI if __name__ == "__main__": app_gui = BaseGUI() app_gui.start_gui()
# Database MONGODB_SERVER = '127.0.0.1' MONGODB_PORT = 27017 MONGODB_DB = 'nlc' # neural_loop_combiner MONGO_USERNAME = '' MONGO_PASSWORD = '' MONGODB_TRACK_COL = 'tracks' MONGODB_LOOP_COL = 'loops' MONGODB_TAG_COL = 'tags' MONGODB_DATASET_COL = 'datasets' MONGODB_MODEL_COL = 'models' # Directory I...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2019 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/di...
import datetime import discord import math import random from discord.ext import commands from utils import crud from utils.checks import is_staff class Memes(commands.Cog): """ Meme commands """ def __init__(self, bot): self.bot = bot async def _meme(self, ctx, msg, directed: bool = Fal...
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2015 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file LICENSE, which # you should have received as part of this distribution. # import imp import os import sys from os.path import join from setuptools import setup, find_packag...
import hashlib import itertools import urllib import sys import os import re import pipes import AssetPackager from bs4 import BeautifulSoup # Packager! # Puts CSS and JavaScript files referenced in your html together as one, compressed # (via YUI compressor) and concatenated, with the help of the AssetPackager. # # H...
# Generated by Django 3.2.9 on 2022-02-03 06:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [2.3, 3.4, 1.2, 6.6, 7.0] plt.scatter(x, y, color='r', marker='+') plt.show()
# Natural Language Toolkit: IEER Corpus Reader # # Copyright (C) 2001-2014 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for the Information Extraction and Entity Recognition C...