text
stringlengths
2
999k
import argparse import os from pathlib import Path import torch from torch.utils.data import DataLoader import torchvision.transforms as T from tqdm import tqdm from torchvision.datasets import CIFAR10, CIFAR100, STL10, ImageNet, ImageFolder import numpy as np import pandas as pd from models.neuralhash import NeuralH...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/availability-msgs.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _m...
import setuptools with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name = 'pkgname', version = '0.1.0', author = ['Ryan J. Price'], author_email = ['ryapric@gmail.com'], description = 'Short description', long_description = long_description, url = 'https:...
def remove_intersections(intervals): result = [] s = set(range(intervals[0][0], intervals[0][1] + 1)) i = 1 while i < len(intervals): new_interval = set(range(intervals[i][0], intervals[i][1] + 1)) if not s.isdisjoint(new_interval): s = s.union(new_interval) i +...
# Copyright 2017, Wenjia Bai. 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 ...
from .signature_help import ( create_signature_help, SignatureHelp, get_documentation, parse_signature_information, ScopeRenderer, render_signature_label ) import unittest signature = { 'label': 'foo_bar(value: int) -> None', 'documentation': {'value': 'The default function for foobaring'}, 'parame...
# -*- coding: utf-8 -*- from PyQt4 import QtCore DB_DEBUG = False # DATE CURRENT_DATE = QtCore.QDate.currentDate(QtCore.QDate()) CURRENT_DATETIME = QtCore.QDateTime.currentDateTime(QtCore.QDateTime()) DATE_LEFT_INF = QtCore.QDate(2000, 1, 1) DATE_RIGHT_INF = QtCore.QDate(2200, 1, 1) DATETIME_LEFT_INF = QtCore.QDateTi...
# Generated by Django 2.2 on 2020-10-19 07:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0003_householdappliance'), ] operations = [ migrations.RenameModel( old_name='ComputersLaptopsAndSoftware', new_name=...
# Modifications copyright 2022 AI Singapore # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
""" Created By Jivansh Sharma September 2020 @parzuko """ import discord import os from get_token import token as TOKEN from discord.ext import commands elvis = commands.Bot(command_prefix = ".") elvis.remove_command("help") @elvis.event async def on_ready(): print(f'{elvis.user} has logged in.\nStarting load...
import yaml from Utils.utils import Log from Handlers.data_handler import DataHandler from Crawlers.naver_news_crawler import NaverNewsCrawler yaml.warnings({'YAMLLoadWarning': False}) with open("config.yaml", "rt", encoding="utf-8") as stream: CONFIG = yaml.load(stream)['NewsCrawler'] if __name__ == '__main__': ...
#!/bin/env python # -*- coding: utf-8 -*- import os,time,datetime,sys import shutil import logging from pathlib import Path from gphotos.LocalFilesMedia import LocalFilesMedia logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger() try: path = Path("../photostream/photos/2022-03/...
""" TibLib Package for the implementation of models and algorithms from the MLPatternRecognition polito course """
# Copyright 2016 Leon Poon and Contributors # # 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 ...
import json import logging import os import re import traceback from time import sleep import hypothesis.strategies as hst import numpy as np import pytest from hypothesis import HealthCheck, given, settings from numpy.testing import assert_allclose, assert_array_equal from unittest.mock import patch import qcodes as...
# # 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 us...
# # PySNMP MIB module NORTEL-WLAN-AP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NORTEL-WLAN-AP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:14:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
#!/usr/bin/env python # # Copyright 2017, Data61 # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # ABN 41 687 119 230. # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. #...
from selenium import webdriver import os import time from bs4 import BeautifulSoup import lxml import json import re # open up the browser and navigate to the hompage of careerbuilder.com career_builder_base_url = 'http://www.careerbuilder.com/?cbRecursionCnt=1' phantomjs_path = '../phantomjs-2.0.0-windows/bin/phant...
# 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 ...
""" Managers of ``blog`` application. """ from django.db import models class CategoryOnlineManager(models.Manager): """ Manager that manages online ``Category`` objects. """ def get_queryset(self): from blog.models import Entry entry_status = Entry.STATUS_ONLINE return super(C...
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListCustomerOnDemandResourcesRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_m...
from allennlp.modules.text_field_embedders import BasicTextFieldEmbedder from allennlp.modules.token_embedders import PretrainedTransformerEmbedder from allennlp.modules.token_embedders import Embedding from allennlp.data import ( DataLoader, DatasetReader, Instance, Vocabulary, TextFieldTensors, ) ...
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static from django.shortcuts import render, redirect urlpatterns=[ #This is the home page url pattern path('',views.index, name='index'), path('explore',views.explore,name ='explore'), ...
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
"""Provides 'odometry', which loads and parses odometry benchmark data.""" import datetime as dt import glob import os from collections import namedtuple import numpy as np import pykitti.utils as utils __author__ = "Lee Clement" __email__ = "lee.clement@robotics.utias.utoronto.ca" class odometry: """Load and...
### generate plots of luciferase data: ### Import dependencies import matplotlib matplotlib.use('Agg') ### set backend import matplotlib.pyplot as plt plt.rcParams['pdf.fonttype'] = 42 # this keeps most text as actual text in PDFs, not outlines plt.tight_layout() import sys import math import matplotlib.patches as ...
# # Base class for thermal effects # import pybamm class BaseThermal(pybamm.BaseSubModel): """Base class for thermal effects Parameters ---------- param : parameter class The parameters to use for this submodel **Extends:** :class:`pybamm.BaseSubModel` """ def __init__(self, pa...
import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler ############################################################################### # Helper Functions ############################################################################### def get_norm_layer(norm...
# Copyright The PyTorch Lightning 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 applicable law or agreed to i...
from __future__ import annotations import configparser import os import unittest from unittest import TestCase from unittest.mock import patch from abiquo.client import Abiquo from requests import Response from abiquo_inventory import InventoryGenerator, InventoryGeneratorParameters, ConfigProvider class ApiRespon...
# -*- coding: utf-8 -*- __version__ = '1.8.1'
#!/usr/bin/python #coding=utf-8 ''' @author: sheng @contact: sinotradition@gmail.com @copyright: License according to the project license. ''' NAME='chen2' SPELL='chén' CN='辰' SEQ='5' if __name__=='__main__': pass
#Desafio 022 print("Desafio 022") nome=str(input("Digite o seu nome:")) print("O seu nome em letras maiúsculas: {}\n O seu nome em letras minúsculas:{}".format(nome.upper(), nome.lower())) print("O seu nome tem ao todo {} letras.".format(len(nome)-nome.count(' '))) nome1=nome.split() print("O seu primeiro nome:{}.".for...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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 Union from .. import utilities, tables class GetLedgerResult: ...
from django.contrib import admin from . import models class CampaignAdmin(admin.ModelAdmin): list_display = ('__str__', 'created', 'is_active', ) list_filter = ('is_active', 'created', ) class UserReferrerAdmin(admin.ModelAdmin): list_display = ('__str__', 'reward', ) raw_id_fields = ('user', 'camp...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import os import requests import pytest import astropy.units as u from astropy.table import Table from ... import nrao from ...utils.testing_tools import MockResponse from ...utils import commons def data_path(file...
from django.core import mail from django.urls import reverse from lib.tests.utils import ClientTest class BaseAccountsTest(ClientTest): @classmethod def setUpTestData(cls): # Call the parent's setup (while still using this class as cls) super().setUpTestData() cls.user = cls.create_...
def max_profit(prices): """get the maximum profit from buying and selling stock""" max_profit = None lowest_price = None highest_price = None for price in prices: print "checking ", price # if we have a new lowest price, grab it and reset out highest if not lowest_price o...
# flake8: noqa """ Autobahn App API Was passiert auf Deutschlands Bundesstraßen? API für aktuelle Verwaltungsdaten zu Baustellen, Staus und Ladestationen. Außerdem Zugang zu Verkehrsüberwachungskameras und vielen weiteren Datensätzen. # noqa: E501 The version of the OpenAPI document: 1.0.0 Generate...
import urllib.request, json import csv import codecs import sys if(len(sys.argv) != 2): print("No paramaters to run.") exit() header = {"Authorization": sys.argv[1]} AllDATA = {"US": {}} #['Province_State', 'Country_Region', 'Last_Update', 'Lat', 'Long_', 'Confirmed', 'Deaths', 'Recovered', 'Active', 'FIPS...
import math import random import re from pathlib import Path from .path import wordlist_path from .normalize import slugify ASCII_a = 97 ALPHABET = 'abcdefghijklmnopqrstuvwxyz' LOWERCASE_VOWELS = 'aeiou' LOWERCASE_CONSONANTS = 'bcdfghjklmnpqrstvwxyz' # An estimate of the frequencies of letters in English, as a le...
# Copyright (C) 2018 # This notice is to be included in all relevant source files. # "Brandon Goldbeck" <bpg@pdx.edu> # “Anthony Namba” <anamba@pdx.edu> # “Brandon Le” <lebran@pdx.edu> # “Ann Peake” <peakean@pdx.edu> # “Sohan Tamang” <sohan@pdx.edu> # “An Huynh” <an35@pdx.edu> # “Theron Anderson” <atheron@pdx.edu> # Th...
# 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 u...
# Copyright 2017 The Wallaroo 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 ...
# flake8: ignore=E501 from logger import RoboLogger import threading from ev3dev2.motor import SpeedDPS # , SpeedPercent from mymotor import MyMotor from gyrosensor import GyroSensor import traceback # import asyncio import time from exceptions import ControlerRunningTooLongException, MotorRunningFastExcept...
# -*- coding: utf-8 -*- ''' In-memory caching used by Salt ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import os import re import time import logging # Import salt libs import salt.config import salt.payload import salt.utils.data import salt.utils.dictupdate impor...
"""Sparse Dtype""" import re from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type import warnings import numpy as np from pandas._typing import Dtype, DtypeObj from pandas.errors import PerformanceWarning from pandas.core.dtypes.base import ExtensionDtype, register_extension_dtype from pan...
from random import randint from utils import http from utils.endpoint import Endpoint, setup from utils.perspective import box_resize from utils.glitch import soft_glitch @setup class SoftGlitch(Endpoint): def generate(self, kwargs): image_url = kwargs['image'] img = http.get_image(image_url) ...
# coding: utf-8 from __future__ import print_function, unicode_literals import re import socket from .__init__ import MACOS, ANYWIN from .util import chkcmd class TcpSrv(object): """ tcplistener which forwards clients to Hub which then uses the least busy HttpSrv to handle it """ def __init__(s...
# Generated by Django 3.1.7 on 2021-03-04 08:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Pages', '0001_initial'), ] operations = [ migrations.AlterField( model_name='employee', name='Esalary', ...
from pprint import pprint from ttp import ttp import json import time from netmiko import ConnectHandler ssh = { 'device_type': 'alcatel_sros', 'ip': '135.243.92.119', 'username': 'admin', 'password': 'admin', 'port': '22' } print ('Connection successful') net_connect = ConnectHandler(**ssh) outp...
import metallurgy as mg def test_melting_temperature(): assert mg.linear_mixture({"Cu": 0.5, "Zr": 0.5}, "melting_temperature") == 1742.885 assert mg.linear_mixture([{"Cu": 0.5, "Zr": 0.5}, {"Cu": 0.25, "Zr": 0.75}], "mel...
"Run all tests." from test_root import Root from test_about import About from test_user import User if __name__ == '__main__': import base base.run()
# The Integrity Verification Proxy (IVP) additions are ... # # Copyright (c) 2012 The Pennsylvania State University # Systems and Internet Infrastructure Security Laboratory # # they were developed by: # # Joshua Schiffman <jschiffm@cse.psu.edu> # Hayawardh Vijayakumar <huv101@cse.psu.edu> # Trent Jaeger <tjaeger...
#!/usr/bin/env python import pathlib from setuptools import find_packages, setup HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text() setup( name="DRUGpy", version="1.1.0", description="Some PyMOL utilities", long_description=README, long_description_content_type="text...
from os.path import realpath from whisk.project import Project project = Project.from_module(realpath(__file__))
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
""" Adds support for generic thermostat units. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.generic_thermostat/ """ import asyncio import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.core import ...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyAzureMgmtIothubprovisioningservices(PythonPackage): """Microsoft Azure IoTHub Provisioning Services Client Li...
from __future__ import print_function import json print('Loading function') def lambda_handler(event, context): print("Received event: " + json.dumps(event, indent=2)) return # print(event) # Echo back the first key value
import os import time import sys import glob from gym_idsgame.config.runner_mode import RunnerMode from gym_idsgame.agents.training_agents.policy_gradient.pg_agent_config import PolicyGradientAgentConfig from gym_idsgame.agents.dao.agent_type import AgentType from gym_idsgame.config.client_config import ClientConfig fr...
print("Installing dependency modules.") system("pip3 install -r requirements.txt")
from flask import render_template, request from back.mongo.data.collect.clients import valid_client def register_500_error_route(app): @app.errorhandler(500) def internal_server_error(error): data = {"plot": {"type": "500"}, "code": 500, "message": "Internal Server Error"} if "id" in reques...
# Copyright 2021 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, ...
# coding=utf-8 # Copyright 2018 Salesforce and HuggingFace Inc. 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 os, sys from read import VINTFile abspath = os.path.abspath(sys.argv[0]) dname = os.path.dirname(abspath) os.chdir(dname) file=VINTFile("test.vmf") file.parse() print()
import numpy as np # type: ignore import pandas as pd # type: ignore import struct from typing import cast, Iterable, Optional, Union from typeguard import typechecked from arkouda.client import generic_msg from arkouda.dtypes import * from arkouda.dtypes import structDtypeCodes, NUMBER_FORMAT_STRINGS from arkouda.dtyp...
''' Classes to solve canonical consumption-savings models with idiosyncratic shocks to income. All models here assume CRRA utility with geometric discounting, no bequest motive, and income shocks are fully transitory or fully permanent. It currently solves three types of models: 1) A very basic "perfect foresight"...
# 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! *** from .. import _utilities import typing # Export this package's modules as members: from ._enums import * from .domain_service import * from .get_domai...
from ..db import engine, BaseModel from ..models import * async def db_startup(): async with engine.begin() as conn: await conn.run_sync(BaseModel.metadata.create_all) async def db_shutdown(): await engine.dispose()
#!/usr/bin/env python # Copyright 2018 Division of Medical Image Computing, German Cancer Research Center (DKFZ). # # 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...
# coding: utf-8 from uuid import uuid4 import hashlib import re import unicodedata import urllib from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb import flask import config ############################################################################### # Request Pa...
#!/usr/bin/env python """Tests for `sktools` package.""" import unittest import sktools import pandas as pd from category_encoders import MEstimateEncoder import numpy as np class TestQuantileEncoder(unittest.TestCase): """Tests for percentile encoder.""" def setUp(self): """Create dataframe with ...
import dataclasses import json from glob import glob import os from multiprocessing import Pool from typing import Tuple, List import music21 as m21 from datatypes import Chord def process(path): out_name = "preprocessed-json/" + os.path.basename(path) + ".json" if os.path.exists(out_name): return ...
from setuptools import find_packages import setuptools setuptools.setup( name="jina-executors", version="0.0.1", author='Jina Dev Team', author_email='dev-team@jina.ai', description="A selection of Executors for Jina", url="https://github.com/jina-ai/executors", classifiers=[ "Progr...
from django.db import models from django.contrib.auth.models import User from PIL import Image # Create your models here. class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) profilePic = models.ImageField(default='default.jpg', upload_to='profile_pics') def __str__(se...
# Taken from https://raw.githubusercontent.com/Newmu/dcgan_code/master/lib/theano_utils.py import numpy as np import theano def intX(X): return np.asarray(X, dtype=np.int32) def floatX(X): return np.asarray(X, dtype=theano.config.floatX) def sharedX(X, dtype=theano.config.floatX, name=None): return thean...
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingred...
from __future__ import absolute_import, division, print_function # pylint: disable=wildcard-import,redefined-builtin,unused-wildcard-import from builtins import * # pylint: enable=wildcard-import,redefined-builtin,unused-wildcard-import from future.utils import native_str from io import StringIO import pandas as pd ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest if __name__ == '__main__': from os import sys, path sys.path.append(path.dirname(path.dirname(path....
from django.db.models import Q from .pagination import PostLimitOffsetPagination, PostPageNumberPagination from rest_framework.authentication import TokenAuthentication, BasicAuthentication from rest_framework.filters import ( SearchFilter, OrderingFilter ) from rest_framework.permissions import ( IsAuthen...
from collections import defaultdict from src.abstract_classifier import AbstractClassifier import lib.sequence_lib as seq_lib class AlignmentAbutsLeft(AbstractClassifier): """ Does the alignment extend off the 3' end of a scaffold? (regardless of transcript orientation) aligned: # unaligned: - wha...
# Copyright 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
""" Basic data structure used for general trading function in VN Trader. """ from dataclasses import dataclass from datetime import datetime from logging import INFO from .constant import Direction, Exchange, Interval, Offset, Status, Product, OptionType, OrderType ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NO...
from askapdev.rbuild.setup import setup from askapdev.rbuild.dependencies import Dependency from setuptools import find_packages dep = Dependency() dep.add_package() ROOTPKG = 'askap' COMPONENT = 'analysis' PKGNAME = 'data' setup(name = '%s.%s.%s' % (ROOTPKG, COMPONENT, PKGNAME), version = 'current', ...
from .sgns import SGNS # noqa
# # # Copyright (C) 2014 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
import numpy as np import random from collections import defaultdict from numpy import * from random import random counts = defaultdict(int) height =32 width = 32 M=2 std = 0.05 for i in range(0,1000): print(i) zp=[complex(height*random(),width*random()), complex(height*random(),width*random()),complex(height*...
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
"""TEMP.""" from pyisc.shared.nodes import RootNode, Node, PropertyNode expected_bind = RootNode('Root') child1 = Node( type='options', value=None, parameters=None, children=[ PropertyNode( type='directory', value='"/var/lib/named"', parameters=None), ...
import matplotlib.pyplot as plt import pandas as pd import numpy as np import tensorflow as tf from copy import deepcopy from tqdm import tqdm from pathlib import Path from sklearn.preprocessing import MinMaxScaler import datetime import sys import math import util import config import indicators weight_decay_beta = f...
""" Financial Modeling Prep Controller """ __docformat__ = "numpy" import argparse import os from typing import List from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal.fundamental_analysis.financial_modeling_prep import fmp_view from gamestonk_terminal import feature_flags as gtff from game...
from abc import ABC, abstractmethod from typing import Any, Callable, Optional, Tuple, TypeVar ProfilingResult = Tuple[str, float] T = TypeVar("T") class AbstractProfiler(ABC): @abstractmethod def time(self, name: str, handler: Callable[..., T], *args: Any ...
#!/usr/bin/env python # Copyright (C) 2016 the V8 project authors. All rights reserved. # This code is governed by the BSD license found in the LICENSE file. from __future__ import print_function import argparse import glob, os, sys from lib.expander import Expander from lib.test import Test # base name of the files...
#!/usr/bin/env python import logging as lg import stau_utils as utils # CONFIG NAME = "job_goodbye_work" LOG = lg.getLogger(NAME) CHUNKSIZE = 2 STAU_CONFIG = utils.ReportConfig( job_type=NAME, chunk_size=CHUNKSIZE, dependencies=[ # This job depends on having said hello first utils.ReportD...
#!/usr/bin/python # -*- coding: utf-8 -*- # """ cd /Users/brunoflaven/Documents/02_copy/_random_is_all_about python random_array_2.py """ import random number_list = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70] print("Original list:", number_list) random.shuffle(number_list) print("List after first shuffle:", number_li...
import asyncio import datetime import re import textwrap from io import BytesIO import sys import json import aiohttp import discord from utils import checks DISCORD_INVITE = r'discord(?:app\.com|\.gg)[\/invite\/]?(?:(?!.*[Ii10OolL]).[a-zA-Z0-9]{5,6}|[a-zA-Z0-9\-]{2,32})' INVITE_WHITELIST = [ "https://discord.g...
# ----------------------------------------------------------------------------- # calclex.py # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = ( 'NAME','NUMBER', 'PLUS','MINUS','TIMES','DIV...