content
stringlengths
5
1.05M
import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import InterruptionAnalysis as ia data = pd.read_csv('./data/timeseries.csv', index_col = 0) votedata = pd.read_csv('./data/vote-data.csv') a = 0.99 gID = 'YMY' pIDs = pd.unique(votedata[votedata[...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. import importlib from collections import OrderedDict from typing import Any, Optional, TYPE_CHECKING from cdm.enums import CdmObjectType from cdm.utilities import...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved # # _new_biad_add_1_14() derived from source in # https://github/tensorflow/tensorflow and therefore # Copyright 2019 The TensorFlow Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
from itertools import combinations s = {1, 2, 3, 4} print(list(combinations(s, 2))) print(list(combinations(s, 3)))
## TPsファイル作成 #[print(2**i) for i in range(32)] fstr_x = '''#> raycasting:block/pos_error/tps/x_{0} # @within function raycasting:block/pos_error/** tp @s ~-{0} ~ ~ scoreboard players remove $raycasting:block/pos_error/_.pos[0] temporary {0} ''' fstr_y = '''#> raycasting:block/pos_error/tps/y_{0} # @within function r...
""" * Copyright (c) 2018 Anthony Beaucamp. * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this software. * * Permission is granted to anyone to use this software for any purpose, * in...
from django.urls import include, path from rest_framework import routers from rest_framework_simplejwt import views as jwt_views from .views import LogoutView, LogoutAllView, MyTokenObtainPairView # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = ...
# -*- coding: utf-8-*- import os import sys import time import socket import subprocess import pkgutil import logging try: from pip.req import parse_requirements except ImportError: from pip._internal.req import parse_requirements import jasperpath if sys.version_info < (3, 3): from distutils.spawn import ...
# from __future__ import division import inspect import sys import os import time from distutils import sysconfig # from collections import defaultdict from threading import Thread from six.moves.queue import Queue, Empty import json # from .util import Util class AsynchronousTracer(object): def __init...
from raptiformica.shell.ssh import copy_id_from_remote from tests.testcase import TestCase class TestCopyIdFromRemote(TestCase): def setUp(self): self.log = self.set_up_patch( 'raptiformica.shell.ssh.log' ) self.run_critical_command_print_ready = self.set_up_patch( ...
from .inventory import * from .gridworld import *
from rest_framework import status from rest_framework import authentication, permissions from rest_framework.response import Response from django.contrib.auth.models import User from miragecore.core.types import * def create(request: HttpRequest, serializer_class: callable) -> Response: """ Return a s...
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2011, Bolloré telecom # Copyright (c) 2013, Jeremy Lainé # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
import errno import functools import logging import socket import struct import sys import weakref from ssl import SSLError from tornado import gen try: import ssl except ImportError: ssl = None from tornado import netutil from tornado.iostream import StreamClosedError from tornado.tcpclient import TCPClient...
import sys import time from socket import create_connection SERVER = ('35.157.111.68', 10199) RECV_SIZE = 256 def main(): conn = create_connection(SERVER) while True: response = conn.recv(RECV_SIZE).splitlines() for line in response: print(line) if 'Welcome!' in line:...
from flask import Flask, request, jsonify import joblib import pandas as pd from urllib.parse import urlparse from bs4 import BeautifulSoup import requests from flask_cors import CORS from newspaper import Article from tinydb import TinyDB db = TinyDB("feedback.json") app = Flask(__name__) CORS(app) classifier =...
# import dbkrpy import discord from discord.ext import commands class GuildCount(commands.Cog): def __init__(self, bot): self.bot = bot self.token = '' dbkrpy.UpdateGuilds(self.bot, self.token) def setup(bot): bot.add_cog(GuildCount(bot))
import numpy as np import h5py as h5 import hepfile import time #import sys # sys.path.append('./scripts') #from write_h5hep_file_for_unit_tests import write_h5hep_file_for_unit_tests from write_file_for_unit_tests import write_file_for_unit_tests def isEmpty(dictionary): test = True print(dictionary.keys(...
# Copyright 2014 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- """ This script saves the input file for the feasible horseshoe problem. """ __version__ = '1.0' __author__ = 'Noemie Fedon' import sys import pandas as pd import numpy as np import numpy.matlib sys.path.append(r'C:\BELLA') from src.CLA.lampam_functions import calc_lampam from ...
import mne import mne_features import numpy as np from mne_features.feature_extraction import extract_features from moabb.datasets import physionet_mi if __name__ == '__main__': # get dataset ds = physionet_mi.PhysionetMI() raw = ds.get_data([2])[2]['session_0']['run_4'].pick_channels(['C3', 'C4']) ev...
# Generated by Django 3.0.3 on 2020-05-31 15:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main_site', '0004_auto_20200526_1908'), ] operations = [ migrations.RemoveField( model_name='resource', name='video_...
import CONSTANT from Menu.Menu import Menu import telebot class General_menu(Menu): def __init__(self, message, userdata, bot, regular_id=None): super().__init__(message=message, userdata=userdata, bot=bot, state=CONSTANT.NAME_GENERAL_MENU, regular_id = regular_id) def update(self, message): ...
import tkinter as tk class ControlView(tk.Frame): """View for Movement Controls.""" def __init__(self, user_control, parent, *args, **kwargs): """Contruct instance. Input: Injection of UserController instance Parent window instance. """ super().__in...
from unittest import mock import json import re import pytest import kombu from django.conf import settings from share import models from share import util from share.search import fetchers from share.search import indexing from tests import factories @pytest.mark.skip class TestIndexableMessage: VERSION_MA...
import os, sys class common: def __init__(self): ""
# Advent of Code 2015 - Day 3 - Perfectly Spherical Houses in a Vacuum # http://adventofcode.com/2015/day/3 import sys # Return a list of visited houses given a moves list # The starting position counts as visited def visited_positions(directions): position = (0, 0) visited = [(0, 0)] for step in directio...
import numpy as np from fast_bfmatcher.matchers import Matcher, MatchResult class NumpyL2CCBFMatcher(Matcher): """Reference numpy implementation""" @classmethod def l2_distance_matrix(cls, X: np.ndarray, Y: np.ndarray): sqnorm1 = np.sum(np.square(X), 1, keepdims=True) sqnorm2 = np.sum(np...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os from abc import ABCMeta, abstractmethod try: import json except ImportError: try: import simplejson as json except ImportError: raise ImportError('Could not import json or simp...
#!/usr/bin/python3 # FLYCOP # Author: Beatriz García-Jiménez # April 2018 # See SMAC documentation for more details about *wrapper_vX.py, wrapper_scenario_vX.txt and *wrapper_params_vX.pcs src='ecoliLongTerm_TemplateOptimizeConsortiumV0/' dst='ecoliLongTerm_TestTempV12' dirPlots='../smac-output/ecoliLongTerm_PlotsS...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.dialogs import ( ComponentDialog, WaterfallDialog, WaterfallStepContext, DialogTurnResult, ) from botbuilder.dialogs.prompts import TextPrompt, PromptOptions from botbuilder.core import Message...
#!/usr/bin/env python3 from PIL import Image import numpy import argparse from os import scandir, path, remove from hashlib import md5 def get_image(image_path, ignore_size=False, target_size=None): """Get a numpy array of an image so that one can access values[x][y].""" """Credits to https://stackoverflow.com...
# -*- coding: utf-8 -*- ### # (C) Copyright [2019] Hewlett Packard Enterprise Development LP # # 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 #...
class Space: def __init__(self,space = None, dtile = None): self.space = space self.dtile = dtile def get_space(self): return self.space def change_space(self, new_space): self.space = new_space def get_dtile(self): return self.dtile def chan...
""" algovision - a library for differentiable algorithms and integrating algorithms into neural networks. Copyright (c) Felix Petersen. This source code is licensed under the MIT license found in the LICENSE file. """ __author__ = "Felix Petersen" __email__ = "ads0399@felix-petersen.de" import setuptools with open...
import itertools import pytest import torch from common_utils import assert_equal from test_prototype_transforms_functional import make_images, make_bounding_boxes, make_one_hot_labels from torchvision.prototype import transforms, features from torchvision.transforms.functional import to_pil_image, pil_to_tensor def...
# import pandas as pd # # # def read_data(file_path): # data = pd.read_json(file_path, lines=True, orient='records') # return data # # file_path = 'okef_eth_usd_q.json' # data = read_data(file_path) # print data #直接手动转的 #1.打开emeditor导入数据,把][替换成, #2.在网址 https://www.bejson.com/json/json2excel/ 在线将json转为csv
import os import sys from time import sleep # Ambari includes from resource_management.core.exceptions import ComponentIsNotRunning from resource_management.libraries.script import Script # Custom service test classes includes from integrated_base_test import IntegratedBaseTestCase SCRIPT_DIR = os.path.dirname(os.pa...
import datetime import time from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from django.utils.crypto import get_random_string from Native_Service.models import NativePost class STAGES: IN_QUEUE = "W KOLEJCE" WAITING_FOR...
from django.contrib import admin from imageapp.models import Image # Register your models here. admin.site.register(Image)
from uam.settings import UamBaseException, ErrorTypes class TapAddError(UamBaseException): pass class TapAddConflict(TapAddError): help_text = "{} is conflicted with existed taps." def __init__(self, tap): self.tap = tap self.help_text = self.help_text.format(tap) super(TapAddCo...
from Simulations.Environments import * from Simulations.GameFeatures import GameFeatures as GF class SetupFiles: def simple_features(): map_setup = { "X": {"Color": GF.BlockColor.Black, "Effect": GF.BlockEffect.Block}, "O": {"Color": GF.BlockColor.White, "Effect": GF.BlockEffect.Noth...
# coding: utf8 from six import unichr from six.moves import html_entities from zeit.wysiwyg.util import contains_element import copy import datetime import lxml.builder import lxml.etree import lxml.html.soupparser import lxml.objectify import pendulum import pytz import six import zeit.cms.checkout.interfaces import z...
""" @Project : DuReader @Module : construct_iterable.py @Author : Deco [deco@cubee.com] @Created : 5/18/18 3:36 PM @Desc : """ import os import gensim class MySentences(object): def __init__(self, dirname): self.dirname = dirname def __iter__(self): for fname in os.listdir(sel...
import datetime import pytz as pytz date_time_str = '2018-06-29 08:15:27.243860' date_time_obj = datetime.datetime.strptime(date_time_str, '%Y-%m-%d %H:%M:%S.%f') print(date_time_obj) '%Y-%m-%d %H:%M:%S.%f' data = "2019-11-11T06:00:00-05:00" # result2 = datetime.datetime.strptime(data[0:23], "%Y-%m-%dT%H:%M:%S") org_...
# # This module is structured somewhat unusually in order to allow the # code to be shared between two different modules that run these # tests against the internally implemented bus and the OS native # bus if it's available # # Those modules dynamically create subclasses of all classes # deriving from ServerObjectTest...
# Generated by Django 2.0 on 2018-01-19 00:56 from django.db import migrations, models import django.db.models.deletion import review.models class Migration(migrations.Migration): dependencies = [ ('review', '0002_auto_20171228_2218'), ] operations = [ migrations.CreateModel( ...
# One of the easiest ways to back up files is with an incremental backup. This method only backs up files that have changed since the last backup. # You are given a list of changes that were made to the files in your database, where for each valid i, changes[i][0] is the timestamp of the time the change was made, and ...
''' Change according to your local database set up. ''' DATABASE_NAME = 'tpch' DATABASE_USER = 'postgres' DATABASE_PASSWORD = 'root'
#!/usr/bin/env python # -*- coding: utf-8 -*- """A usdview plugin that can auto-reload the stage whenever there are layer changes.""" # IMPORT FUTURE LIBRARIES from __future__ import print_function # IMPORT STANDARD LIBRARIES import datetime import functools import logging import sys # IMPORT THIRD-PARTY LIBRARIES ...
import os from metaappscriptsdk import MetaApp META = MetaApp(meta_url="http://localhost:8080") log = META.log os.chdir(os.path.dirname(os.path.abspath(__file__))) __DIR__ = os.getcwd() + "/" configuration = { "download": { "dbQuery": { "command": "SELECT * FROM products WHERE productname ili...
import sys import requests import re # Parses all urls and returns a sorted list of all found email addresses. def find_addresses(urls): addresses = [] for url in urls: response = requests.get(url) txt = response.text found_addresses = re.findall(r'\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\b', t...
from abc import ABCMeta, abstractmethod from atexit import register from os.path import isfile from pickle import dump, load import googlemaps class AddressGeocoder(metaclass=ABCMeta): def __call__(self, string): """ Geocode address given as string. """ return self.geocode(strin...
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit Release: STU3 Version: 3.0.2 Revision: 11917 Last updated: 2019-10-24T11:53:00+11:00 """ import io import json import os import unittest import pytest from .. import explanationofbenefit from ..fhirdate import FHIRDate ...
################################################################################ # MIT License # # Copyright (c) 2017 Jean-Charles Fosse & Johann Bigler # # 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...
def fragment_1(expr, var): retn = [] for items in expr.struct: if var in str(items.power_list()): cf, va = items.__extract__ for k, v in va.items(): if var in str(v): retn.append(k) return cf * retn[0], v if retn else None
#!/usr/bin/env python # coding=utf-8 """ Ingest data from the command-line. """ from __future__ import absolute_import import os from datetime import datetime from pathlib import Path from dateutil.tz import tzutc from dateutil.relativedelta import relativedelta import click from sqlalchemy.exc import DBAPIError fro...
#!/usr/bin/python # LICENSE UPL 1.0 # # Copyright (c) 2020,2021 Oracle and/or its affiliates. # # Since: January, 2020 # Author: sanjay.singh@oracle.com, paramdeep.saini@oracle.com from oralogger import * from oraenv import * from oracommon import * from oramachine import * import os import sys class OraMachine: ...
from .apply import * from .listing import Listing from .profile import Profile from .profile import EditProfile
"""Contains tools that approximate various functions involving limits.""" from math import log, factorial from pyutils.math import EULER_MASC def derivative(func, x, delta_x): """Approximates the derivative of a function at 'x' using its limit definition.""" dividend = func(x + delta_x) - func(x) der...
__version__ = "0.0.1" from ._writer import write_single_image, write_multiple from ._widget import zarr_writer_widget
from modulos.passwordgeneretor import PasswordGenerator as Pass_Generetor ask_user = input(""" Opção MENU: a. fraca b. media c. forte d. insana >> """) Pass_Generetor = Pass_Generetor(ask_user, input("Numero: ")) print(Pass_Generetor.pass_all())
from sqlalchemy import Column, Integer, String from Agent import Base, Session class APIVersion(Base): """description of class""" __tablename__ = 'agent_apiversions' Id = Column(Integer, primary_key = True) DeploymentName = Column(String) ProductName = Column(String) VersionName = Colu...
def test_checkout(app): app.cart.add_and_remove_items(3)
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the Bar class which lets you build your Bar charts just passing the arguments to the Chart class and calling the proper functions. It also add a new chained stacked method. """ #-------------------------...
from __future__ import absolute_import import numpy as np from sklearn.metrics import roc_auc_score from sklearn.metrics import average_precision_score def auc(heatmap, onehot_im, is_im=True): if is_im: auc_score = roc_auc_score(np.reshape(onehot_im,onehot_im.size), np.reshape(heatmap,heatmap.size)) e...
import sys from pyroll.core import RollPass @RollPass.hookspec def wusatowski_temperature_coefficient(roll_pass): """Gets the Wusatowski spreading model temperature coefficient a.""" @RollPass.hookspec def wusatowski_velocity_coefficient(roll_pass): """Gets the Wusatowski spreading model velocity coefficie...
import pytest def test_agent_interface_has_bindings(): """ Make sure that all methods that we want to expose are actually callable. """ import jpscore from jpscore.geometry import Coordinate, LengthUnit, Units agent = jpscore.Agent( Coordinate( LengthUnit(94.45, Units.m), ...
import os import signal from shakenfist.config import config from shakenfist.daemons import daemon from shakenfist import logutil from shakenfist.util import libvirt as util_libvirt from shakenfist.util import process as util_process LOG, _ = logutil.setup(__name__) class Monitor(daemon.Daemon): def run(self):...
# Edit the version number here and only here __version__ = "1.161"
from django.urls import path from .views import SearchView, index urlpatterns = [ path('', index), path('search/', SearchView.as_view(), name="search"), ]
""" Read text files using numpy genfromtxt. Da Pan, 02112016 """ import numpy as np def read(filename, hlines, delimiter='\t'): """Read text files and return headlines and data :param filename: str :param hlines: number of headlines :param delimiter: str :param fTarget: if set, data will be ...
from light_habit import Habit client = Habit() client.welcome() while True: client.is_it_ended() client.user_input()
import datetime import logging import pandas as pd from sqlalchemy import create_engine import urllib import numpy as np from scipy.optimize import curve_fit import sqlalchemy import azure.functions as func def main(mytimer: func.TimerRequest) -> None: utc_timestamp = datetime.datetime.utcnow().replace( ...
""" Canny Edge Detection is a popular edge detection algorithm.\ It was developed by John F. Canny in 1986. The Canny edge detection algorithm is composed of 5 steps: 1. Noise Reduction 2. Gradient Calculation 3. Non-maximum Supperession 4. Double Threshold 5. Edge Tracking by Hysteresis """ import cv2 imp...
import os import pytest @pytest.fixture def fake_bundle_file(): cwd = os.path.dirname(os.path.abspath(__file__)) return os.path.join(cwd, 'test_bundle.json') @pytest.fixture def ccoe_bundle(): cwd = os.path.dirname(os.path.abspath(__file__)) return os.path.join(cwd, 'ccoe_investigator_demo.json') ...
from sqlalchemy.sql import func from datetime import datetime from flask_sqlalchemy import SQLAlchemy from flask.app import Flask import appsettings #app = Flask(__name__) #app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///tasks.db' #db = SQLAlchemy(app) app = Flask(__name__) app.config['SQLALCHEMY_TRACK_MODIFIC...
from django import forms from Photos.models.photos_model import Photos class PhotosForm(forms.ModelForm): class Meta: model = Photos fields = ['original_photo', 'name', 'category', 'price']
# Quebrando um número import math num = float (input("Digite um valor qualquer: ")) print("Sua parte inteira é {}".format(math.trunc(num)))
cities = [ 'Advance', 'Akron', 'Alamo', 'Albany', 'Albion', 'Alexandria', 'Ambia', 'Amboy', 'Amo', 'Anderson', 'Andrews', 'Angola', 'Arcadia', 'Arcola', 'Argos', 'Arlington', 'Ashley', 'Athens', 'Atlanta', 'Attica', 'Atwood', 'Aubur...
#! /usr/bin/env python3 # -*- Python -*- """ Prints number of common AAs in two AA sequences """ import sys, os, traceback, pprint if sys.version_info.major != 3: raise RuntimeError("Run script with python3") from pathlib import Path sys.path[:0] = [str(Path(os.environ["ACMACSD_ROOT"]).resolve().joinpath("py"))] impo...
""" tests the solution in the named file """ import os import sys from argparse import ArgumentParser from importlib import import_module from itertools import chain from pathlib import Path from pprint import pprint from random import randint, shuffle from typing import List, Tuple, TypedDict class Parameters(TypedD...
import argparse from utils.model_vc import Generator import torch from utils.audioUtils import audio from utils.audioUtils.hparams import hparams import librosa from pathlib import Path import numpy as np from math import ceil import glob import numpy as np import tempfile import pdb import os import ...
from django.utils.encoding import force_text from wagtail.core.blocks import CharBlock, IntegerBlock, RawHTMLBlock, RichTextBlock, StructBlock from wagtail.embeds.blocks import EmbedBlock from wagtail_blocks.blocks import ( ChartBlock, CroppedImagesWithTextBlock, HeaderBlock, ImageSliderBlock, Imag...
"""Open a shell prompt inside an ansible-test environment.""" from __future__ import annotations import os import typing as t from ...util import ( ApplicationError, display, ) from ...config import ( ShellConfig, ) from ...executor import ( Delegate, ) from ...connections import ( LocalConnect...
################################# LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # # # # Redistribu...
# -*- coding: utf-8 -*- name = 'tbb' version = '4.4.6' variants = [['platform-windows', 'arch==AMD64']] build_command = "python {root}/rezbuild.py {install}" build_requires = ['python'] def commands(): env.PATH.append("{root}/bin") env.PATH.append("{root}/lib") env.TBB_LIBRARIES = "{root}"
""" This is the backtracking search solver that uses a couple of heurestics in order to solve a constraint problem tree Written by Jesse Cai 2017-05-05 """ from igraph import * class ConstraintSolver(object): def __init__(self, variables, consistency_type = 'arc'): self.csp = Graph() for var in ...
"""Rezolv icao """ ICAO = { 'a': 'alfa', 'b': 'bravo', 'c': 'charlie', 'd': 'delta', 'e': 'echo', 'f': 'foxtrot', 'g': 'golf', 'h': 'hotel', 'i': 'india', 'j': 'juliett', 'k': 'kilo', 'l': 'lima', 'm': 'mike', 'n': 'november', 'o': 'oscar', 'p': 'papa', 'q': 'quebec', 'r': 'romeo', 's': 'sierra', 't':...
from django.db.models import Aggregate from django.contrib.gis.db.backend import SpatialBackend from django.contrib.gis.db.models.sql import GeomField class GeoAggregate(Aggregate): def add_to_query(self, query, alias, col, source, is_summary): if hasattr(source, 'geom_type'): # Doing addition...
# python setup.py build_ext -i from distutils.core import setup, Extension import mpi4py swig = mpi4py.get_include() include = [swig, "/usr/lib/openmpi/include"] sources = ["testSwig.c","testSwig.i"] setup( ext_modules = [ Extension("_testSwig", sources = sources, swig_opts = ["-I"+swig ],...
from jsinclude.templatetags.pkg.StringValue import StringValue class TestStringValue: def test_string_arg(self): arg = StringValue('abc123') assert arg == "'abc123'" def test_boolean_arg(self): arg = StringValue('true') assert arg == 'true' arg = StringValue('false') ...
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
#!/usr/bin/python # -*- coding: UTF-8 -*- MYSQL_HOST = "127.0.0.1" MYSQL_PORT = 33096 MYSQL_USER = "" MYSQL_PASS = "" MYSQL_DB = "crontab" SOCKET_HOST = '127.0.0.1' SOCKET_PORT = 21110 SOCKET_BUFFER = 8192
from __future__ import print_function import web import time import logging logger = logging.getLogger(__file__) logging.basicConfig( format="[%(asctime)s - %(filename)s:line %(lineno)s] %(message)s", datefmt='%d %b %H:%M:%S', level=logging.INFO) logger.setLevel(logging.INFO) import constant...
#!/usr/bin/env python3 from __future__ import print_function import subprocess as sp from multiprocessing.pool import ThreadPool from sys import stdin, stdout, stderr, argv import sys import os import yaml def parse_cfg(): with open("./config.yml") as fh: d = yaml.load(fh) return d["lanes"] def runa...
import numpy as np import matplotlib.pyplot as plt # For plotting import pdb import pandas as pd import seaborn as sns from scipy import stats data1 = np.load("train_nu.npz") #data1 = np.load('pipe_test_1dnu.npz') nu = data1['nu_1d'] #nu = np.sort(nu) print('nu is',nu) ############################ #profile viscosity ...
from default_settings import * # noqa SQLALCHEMY_DATABASE_URI = 'sqlite://' SECRET_KEY = 'CHANGE_ME'
#!/usr/bin/env python # from .KernelNode import KernelNode as base, debug class Phonon_IncoherentInelastic_EnergyFocusing_Kernel(base): tag = "Phonon_IncoherentInelastic_EnergyFocusing_Kernel" def createKernel( self, **kwds ): def getval(key): v = kwds.get(key) if...
from selenium import webdriver from Hush import usuarioEmail, usuarioSenha browser = webdriver.Firefox() browser.get("https://www.skoob.com.br/login/") email = browser.find_element_by_name("data[Usuario][email]") email.send_keys(usuarioEmail) pwd = browser.find_element_by_name("data[Usuario][senha]") pwd.send_keys(usu...