content
stringlengths
5
1.05M
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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...
import os, sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from utils import _window_based_iterator def test_window_based_iterator(): f = lambda x: x for w1, w2, d in _window_based_iterator(list('123456789'), 3, f): if w1 == w2: assert d == 1 else: expec...
import copy import numpy as np import time t0 = time.time() grid = [] # for line in open("day15_example.txt"): for line in open("day15_input.txt"): # for line in open("day15_simple_break.txt"): line = line.strip() vec = [] for digit in line: vec.append(int(digit)) grid.append(vec) def look...
"""Helper functions for interatcing with Magenta DDSP internals. """ import json import os from absl import logging from ddsp.training import train_util import tensorflow.compat.v2 as tf from google.cloud import storage def get_strategy(tpu='', gpus=None): """Chooses a distribution strategy. AI Platform auto...
from osgeo import gdal, ogr, osr import numpy as np from scipy.interpolate import RectBivariateSpline import os import sys import matplotlib.pyplot as plt from region import region from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from descartes import PolygonPatch class terrain: def __init__(self): ...
# MIT License # Copyright (c) 2019 Runway AI, Inc # 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, modify, merge,...
# Test the difference in accuracy between sin() and Python's math.sin() import math import matplotlib.pyplot as plt # Calculate sine of 'x' with 'n' iterations def sin(x: float, n: int) -> float: result = 0 for i in range(0, n): result += (-1 ** i) * (x ** ((2 * i) + 1)) / math.factorial((2 * i) + 1) ...
"""Tests for core module.""" from pathlib import Path import pytest from .helpers import append from .helpers import branch from .helpers import touch from retrocookie import core from retrocookie import git from retrocookie import retrocookie def in_template(path: Path) -> Path: """Prepend the template directo...
import argparse import ipaddress import itertools import logging import os import re import secrets import socket import ssl import sys from random import shuffle from typing import List, Tuple, Union from urllib.parse import urlsplit from . import base _logger = logging.getLogger(__name__) def configure_logging(lo...
NU_ID = 0 GAMMA_ID = 1 EFFECTIVE_NUMBER_OF_COVARIATES_ID = 2 LOG_MARGINAL_LAPLACE_DIAG_VALIDATION_CRITERIA_ID = 3 TRAIN_ACCURACY_ID = 4 TEST_ACCURACY_ID = 5 TRAIN_CV_LOG_PROB_ID = 6 TRAIN_CV_ACC_ID = 7 ANMI_ID = 8
import django.utils.timezone from django.db import models from django.contrib.auth.models import User POSITIONS = ( ('P', 'P'), ('C', 'C'), ('1B', '1B'), ('2B', '2B'), ('3B', '3B'), ('SS', 'SS'), ('LF', 'LF'), ('CF', 'CF'), ('RF', 'RF'), (...
# © 2018 Software Freedom Conservancy (SFC) # # 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 ...
# Given a n-ary tree, find its maximum depth. # # The maximum depth is the number of nodes along the longest path # from the root node down to the farthest leaf node. # # Input: root = [1,null,3,2,4,null,5,6] # Output: 3 # # Input: root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,...
FREECADPATH = '/usr/lib/freecad/lib' import sys sys.path.append(FREECADPATH) from collections import defaultdict import FreeCAD import Mesh import os def export_stl(body_obj,filename): __objs__=[] __objs__.append(FreeCAD.getDocument("rs_winder").getObject(body_obj)) Mesh.export(__objs__,filename) del _...
#utility functions for demo import os import yaml import sys import json import pandas as pd import numpy as np import urllib import xmltodict import csv import warnings import tensorflow as tf from tqdm import tqdm from keras_retinanet import models from keras.utils import multi_gpu_model from deepforest import _ROOT...
# https://app.codesignal.com/arcade/code-arcade/loop-tunnel/7BFPq6TpsNjzgcpXy/ def leastFactorial(n): # What's the highest factorial number that is bigger than n? i, fact = (1, 1) # Keep increasing a cumulative factorial until n can't no longer contain # it. If n becomes 1, then n was a factorial, if n ...
myl1 = [1,2,3,4] print("Before clearing type is: "+ str(type(myl1))) myl1 = myl1.clear() print(myl1) print("After clearing type is: "+ str(type(myl1)))
# © 2015-2020 Deltatech # See README.rst file on addons root folder for license details import datetime import functools import itertools import logging from ast import literal_eval import psycopg2 from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError from odoo.tools import ...
# Import packages from video_funcs import peri_stimulus_video_clip, register_arena, get_background from termcolor import colored # ======================================================== # SET PARAMETERS # ======================================================== # file path of behaviour video video_file_pa...
# Generated by Django 3.2.6 on 2021-08-20 01:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='user', name='data_contratacao', ), ...
def new(): '''Add a new world ''' pass
from typing import Optional import numpy as np from ... import BaseTask from assembly_gym.environment.generic import RobotComponent from .. import Reward class EndEffectorAccelerationReward(Reward[BaseTask]): """ A reward for punishing high (linear and angular) end-effector accelerations. """ def _...
from bokeh.plotting import figure from bokeh.embed import components from cachetools import cached import datetime from flask import current_app import logging import numpy as np import pandas as pd import requests class InstrumdatKey: def __init__(self, ticker, date=None): self.ticker = ticker.upper() ...
from torch import Tensor from torch._C import dtype import torch.nn import torch.nn.functional from kge import Config, Dataset from kge.job import Job from kge.model import KgeEmbedder from kge.misc import round_to_points from typing import List class DiachronicEmbedder(KgeEmbedder): def __init__( self,...
from flask import Flask, app from config import config_options,DevConfig from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager db = SQLAlchemy() login_manager = LoginManager() login_manager.session_protection = 'strong' login_manager.login_view = 'main.login' login_manager.login_message_catego...
""" Rackspace Cloud Backup API Utilities """ from __future__ import print_function import cloudbackup.utils.printer # noqa import logging import os def announce_banner(banner): """ Output a banner to both the log and normal output functionality """ log = logging.getLogger(__name__) marker = '===...
from typing import Optional from ._db_span import db_span from ._const import BEGIN, COMMIT, ROLLBACK, SQLITE try: import tortoise.backends.sqlite except ImportError: pass else: _tortoise_sqlite_client_execute_query = ( tortoise.backends.sqlite.client.SqliteClient.execute_query ) _tortoise_...
# -*- coding: utf-8 -*- import cv2 import numpy as np # Emboss filter def emboss_filter(img, K_size=3): H, W = img.shape # Zero padding pad = K_size // 2 out = np.zeros((H + pad * 2, W + pad * 2), dtype=np.float) out[pad: pad + H, pad: pad + W] = img.copy().astype(np.float) tmp = out.copy() ...
import time from .smoothing import smooth_path from .rrt import TreeNode, configs from .utils import irange, argmin, RRT_ITERATIONS, RRT_RESTARTS, RRT_SMOOTHING, INF, elapsed_time def asymmetric_extend(q1, q2, extend_fn, backward=False): if backward: return reversed(list(extend_fn(q2, q1))) return ext...
# Adapters # Protean from protean.adapters.broker import Brokers from protean.adapters.broker.celery import CeleryBroker, ProteanTask from protean.adapters.broker.inline import InlineBroker from protean.adapters.email import EmailProviders from protean.adapters.email.dummy import DummyEmailProvider from protean.adapter...
# -*- coding: utf-8 -*- from __future__ import division __copyright__ = "Copyright (C) 2014 Andreas Kloeckner" __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 restricti...
tupla = 'zero', 'um', 'dois', 'três', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove', 'dez', 'onze', 'doze', 'treze' \ , 'quatorze', 'quinze', 'dezesseis', 'dezessete', 'dezoito', 'dezenove', 'vinte' while True: escolher = int(input('Digite um número entre 0 e 20: ')) while escolher > 20 or escolher <= -...
import av import av.datasets content = av.datasets.curated('pexels/time-lapse-video-of-night-sky-857195.mp4') with av.open(content) as container: # Signal that we only want to look at keyframes. stream = container.streams.video[0] stream.codec_context.skip_frame = 'NONKEY' for frame in container.deco...
class Solution: def largestAltitude(self, gain: List[int]) -> int: highest = 0 temp = 0 for num in gain: temp += num if temp > highest: highest = temp return highest
# The code for AlexNet is copied and adapted from the TensorFlow repository # https://github.com/tensorflow/tensorflow/blob/master/tensorflow/models/image/alexnet/alexnet_benchmark.py. import ray import numpy as np import tarfile, io import boto3 import PIL.Image as Image import tensorflow as tf import ray.array.remo...
#!/usr/bin/env python # Copyright 2019 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...
# uncompyle6 version 3.3.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] # Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\Push2\setup_component.py # Compiled at: 2018-11-30 15:48:11 from __fu...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
"""Dark matter - electron scattering """ import numericalunits as nu import numpy as np from scipy.interpolate import RegularGridInterpolator, interp1d from scipy.integrate import quad, dblquad from scipy.stats import binom import wimprates as wr export, __all__ = wr.exporter() __all__ += ['dme_shells', 'l_to_letter',...
from volt_meter import VoltMeter #volt_meter = VoltMeter(17, .03, 2.25) volt_meter = VoltMeter(23, .03, 2.25) #volt_meter = VoltMeter(25, .03, 2.35) def get_input(): value1 = input("Input value from 0 to 100: ") volt_meter.set_meter_value(float(value1), 0, 100) get_input() if __name__ == "__main__": ...
# Approach 4: Search Space Reduction class Solution(object): def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int :rtype: bool """ if len(matrix) == 0 or len(matrix[0]) == 0: return False height = len(matrix)...
""" Copyright (c) 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 in writin...
def generate_instance_identity_document(instance): return { "instanceId": instance.id, }
#!/usr/bin/env python3 """ $ ./tools/js-dep-visualizer.py $ dot -Tpng var/zulip-deps.dot -o var/zulip-deps.png """ import os import re import subprocess import sys from collections import defaultdict from typing import Any, DefaultDict, Dict, List, Set, Tuple Edge = Tuple[str, str] EdgeSet = Set[Edge] Method = str M...
# -*- coding: utf-8 -*- import os import pyloco from .error import FreError from .app import AppBuildAnalyzer from .control import FrelptController class FrelptTask(pyloco.Task): _name_ = "frelpt" _version_ = "0.1.1" def __init__(self, parent): self.add_data_argument("target", help="filepath t...
""" Management of Docker Containers .. versionadded:: 2015.8.0 .. versionchanged:: 2017.7.0 This module has replaced the legacy docker execution module. :depends: docker_ Python module .. _`create_container()`: http://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.create_conta...
"""Models module.""" from enum import Enum class Gender(str, Enum): """Gender enum.""" MALE = "male" FEMALE = "female"
import argparse parser = argparse.ArgumentParser( description='Filter assays.' ) parser.add_argument( '--in', nargs='+', help='input assay files' ) parser.add_argument( '--out', help='output assay file' ) parser.add_argument( '--swath_windows', help='SWATH isolation window file' ) assay_f...
# 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 agreed to...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# Straightforward implementation of the Singleton Pattern import yaml import pathlib #import picamera_colllecter class Configuration(object): _instance = None def __new__(cls): if cls._instance is None: cls._instance = super(Configuration, cls).__new__(cls) # Put any initializ...
""" Check subclassing strange thingies. """ import support try: class foo(12): pass except TypeError, e: pass else: raise support.TestError("expecting a TypeError for attempting to subclass integer instance")
from typing import Dict class BaseModel(object): """Abstract base class for learner model Defines necessary operations for the underlying learner model; training, prediction, classification probabilities, and decision function results. In order for an initial or improved learner to use a future-d...
# Create your views here. from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.contrib.comments.models import Comment from models import Post from django.template import RequestContext def comment_posted(request): comment_id = request.GET['c'] ...
def CuboidVolume(): length = int(input("Masukkan panjang : ")) width = int(input("Masukkan lebar : ")) height = int(input("Masukkan ketinggian : ")) cuboidVolumeCalc = length*width*height return cuboidVolumeCalc def SilinderVolume(pi): radius = int(input("Masukkan jejari : ")) height = int(...
# -*- coding: utf-8 -*- """ jishaku.cog ~~~~~~~~~~~~ The Jishaku debugging and diagnostics cog implementation. :copyright: (c) 2021 Devon (Gorialis) R :license: MIT, see LICENSE for more details. """ from discord.ext import commands from jishaku.features.filesystem import FilesystemFeature from jishaku.features.g...
#!/usr/bin/env python # coding: utf-8 # In[ ]: import zipfile import io import pydicom from pydicom import dcmread from pydicom.filebase import DicomBytesIO import requests from tqdm import tqdm pbar = tqdm(total=197) def getImageUrl(sid): baseurl = 'https://services.cancerimagingarchive.net/services/v3/TCIA' ...
""" Print messages to terminal depending on a given verbosity level. Similar to the Python logging module. Also meant to be used as Singleton. The verbosity levels are: - CRITICAL - ERROR - WARNING - INFO - DETAILS - DEBUG - DEBUG2 The default verbosity is `WARNING`. """ import textwrap # should match the values...
import asyncio import json import random import time from collections import namedtuple from functools import partial from typing import Dict, Iterable, List, Tuple import discord import lxml import markovify from aiofile import AIOFile from discord.ext import commands from requests_html import HTML, HTML...
import requests import json import yaml def search(text): words = "+".join(text.split()) url = f"https://www.youtube.com/results?search_query={words}&sp=EgIQAQ%253D%253D" response = requests.get(url) response_json = get_json(response.text) write_json("response", response_json) videos = get_vide...
import networkx as nx import matplotlib.pyplot as plt from random import randint from math import inf import geopy.distance G=nx.Graph() def make_nodes(): # node list locations = { "Melbourne University": (-37.798248386903616, 144.9609632686033), "Monash University": (-37.907144361086004, 145....
import numpy as np from dasy.core import DataSynthesizer #TODO: switch from numpy random to Generator class UniformSynth(DataSynthesizer): """ Samples from a single Uniform Distribution on an interval """ def __init__(self, dim, low=-10., high=10.): super().__init__(dim) self.low = low...
import luigi from typing import Dict, Any import torch import torch.nn as nn import numpy as np from numpy.random.mtrand import RandomState from mars_gym.model.bandit import BanditPolicy from typing import Dict, Any, List, Tuple, Union from mars_gym.meta_config import ProjectConfig from mars_gym.model.abstract import ...
# Lint as: python3 # # Copyright 2021 The XLS 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...
import numpy as np def getPoints(width,height,H): points=np.zeros((4,2)) point=np.zeros(3) point[2]=1 points[0]=(np.matmul(H,point.T)/np.matmul(H,point.T)[2])[:2] point[1]=height-1 points[1]=(np.matmul(H,point.T)/np.matmul(H,point.T)[2])[:2] point[0]=width-1 points[3]=(np.matmul(H,point.T)/np.matmul(H,point.T...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
from datetime import date from dateutil.relativedelta import relativedelta from django.db.models import Count, Sum from django.db.models.functions import TruncMonth from project.models import Project, ProjectUserMembership from stats.models import ComputeDaily from .util import parse_efficiency_result_set, seconds_to...
# Copyright 2017 Battelle Energy Alliance, 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 t...
import numpy import cv2 import matplotlib.pyplot as plt class Chess_calibration_points: mtx = [] dist = [] def __init__(self, image_names, chess_size): obj_points = [] # 3d points in real world space img_points = [] # 2d points in image plane. img_shape = [] objp = numpy.zer...
#!/usr/bin/env python3 import unittest import os import sys from pathlib import Path import numpy as np from PIL import Image from daltonlens import convert, simulate, generate test_images_path = Path(__file__).parent.absolute() / "images" class TestCVD(unittest.TestCase): def checkModels(self, im, models_to_...
#!python # External dependencies import numpy as np import pandas as pd """ Usage : data = { "data": { "candles": [ ["05-09-2013", 5553.75, 5625.75, 5552.700195, 5592.950195, 274900], ["06-09-2013", 5617.450195, 5688.600098, 5566.149902, 5680.399902...
# Generated by Django 2.1 on 2020-09-07 11:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0001_initial'), ] operations = [ migrations.AddField( model_name='person', name='phone', field=m...
# -*- coding: utf-8 -*- # @Author: jerry # @Date: 2017-09-26 20:06:50 # @Last Modified by: jerry # @Last Modified time: 2017-09-26 20:07:47 class Duck: def quack(self): print("這鴨子在呱呱叫") def feathers(self): print("這鴨子擁有白色與灰色羽毛") class Person: def quack(self): print("這人正在模仿鴨子") ...
import logging import os import csv from datetime import datetime, timedelta from pathlib import Path def new_transaction_lists(impact, t_lists, account_name, network_name): """Transforms new transaction records by adding the Impact tracker ID for the environment (desktop/mobile), finding the correct Impac...
from typing import List import torch.nn as nn import torch class GramMatrix(nn.Module): """ Base Gram Matrix calculation as per Gatys et al. 2015 """ def forward(self, input): b, c, h, w = input.size() F = input.view(b, c, h*w) G = torch.bmm(F, F.transpose(1, 2)) G = G...
import random import string # Directly copied from anki utils! # used in ankiweb def _base62(num, extra=""): s = string table = s.ascii_letters + s.digits + extra buf = "" while num: num, i = divmod(num, len(table)) buf = table[i] + buf return buf _base91_extra_chars = "!#$%&()*...
import unittest from os import environ from nbs.prime import Prime class TestRequest(unittest.TestCase): def test_api(self): address = environ.get('PRIME_ADDRESS') username = environ.get('PRIME_USER') password = environ.get('PRIME_PASS') prime = Prime(address, username, pa...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Stub functions that are used by the Amazon API Gateway unit tests. When tests are run against an actual AWS account, the stubber class does not set up stubs and passes all calls through to the Boto3 client. ...
import database.sqlite3 import datetime def is_new_article(title): database.sqlite3.set_conn() db = database.sqlite3.get_conn() count = db.cursor().execute(''' SELECT * FROM article WHERE title = ? ''', [title]) is_new = count.fetchone() is None print("Checking if article with title '" + title + "...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np import progressbar vec_repr = {} DOT = '.' COMMA = ',' COLON = ':' SEMICOLON = ';' QUOTATION = '"' DOLLAR = '$' PERCENT = '%' EXCLAMATION = '!' QUESTION = '?' DIV = '/' R_OPEN = '(' R_CLOSE = ')' S_OPEN = '[' S_CLOSE = ']' ELLIPSIS = '…' LONG...
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import time BATCH_SIZE = 16 EPOCHS = 5 mnist = tf.keras.datasets.mnist (train_images, train_labels), (test_images, test_labels) = mnist.load_data() train_images = (np.expand_dims(train_images, axis=-1)/255).astype(np.float32).reshape((60000, 7...
#!/usr/bin/env python import rospy import cv2 import numpy as np from sensor_msgs.msg import Image, CompressedImage from cv_bridge import CvBridge from geometry_msgs.msg import Vector3Stamped from byakugan.msg import BoolStamped def dispo(img, circles): if (circles is not None): circles = np.uint16(np.around(circl...
import random import matplotlib.pyplot as plt import numpy as np from sklearn import decomposition as sk_dec from sklearn import preprocessing as sk_prep import torch def seed(value: int = 42): np.random.seed(value) torch.manual_seed(value) torch.cuda.manual_seed(value) random.seed(value) def plot_...
# To run the program correctly, change the lines below with your database server or local database. host_name = 'academic-mysql.cc.gatech.edu' database_name = 'cs4400_group1' user_name = 'cs4400_group1' password = 'ehiHGsY7'
"""Script for analysing the results from the 16 different seeds from the 11 systems.""" # It also parses the gsd format trajectory stored in each output analysis folder (obtained by executing conv_traj.py before this script) to get the RDFs.""" import os import shutil from glob import glob import freud import matplotl...
#!/usr/bin/env python # Copyright (c) 2016-2020 Dell Inc. or its subsidiaries. # # 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 r...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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...
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt def fun(): df= pd.read_csv("conveter.csv") df1=df.dropna(axis=1, how='any', thresh=None, subset=None, inplace=False) #df1.to_csv("edited.csv",index=False) sns.pairplot(df1,dropna=True,hue='SSID',diag_kind='hist') plt.show() #fun()
import pandas as pd import quandl import math import numpy as np from sklearn import preprocessing, cross_validation, svm from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt from matplotlib import style import datetime import time import pickle style.use('ggplot') df = quandl.get('WIKI...
# Copyright 2018 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...
#!/usr/bin/env python """ Inmarsat Modbus Proxy Adapter for ClearBlade connects to your ClearBlade cloud/platform using secure credentials. In ClearBlade you define Collections that map an IDP MobileID to a proxy IP address and TCP port. The Adapter runs on an Edge device such as Raspberry Pi, reads the mapping from th...
import sys, os from os.path import dirname root_path = dirname(dirname(os.getcwd())) sys.path.insert(0, root_path) # insert root directory to environmental variables from GFMM.accelbatchgfmm import AccelBatchGFMM import numpy as np from functionhelper.prepocessinghelper import loadDataset if __name__ == '__main__': ...
# Generated by Django 3.0.14 on 2021-06-09 17:48 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("iaso", "0090_auto_20210604_1553"), ("iaso", "0089_profile_language"), ] operations = []
from guet.commands import CommandFactory from guet.committers import Committers2 as Committers from guet.committers import CurrentCommitters from guet.files import FileSystem from guet.steps import Step from guet.steps.check import HelpCheck, VersionCheck from guet.steps.preparation import InitializePreparation, SwapTo...
""" ============================================== Plot which vertices are inside the same voxels ============================================== Show lines connecting vertices on the flatmap that are actually within the same voxels in a given scan. Here, we used advanced compositing to be explicit about display optio...
""" Tests for the Command Manager. """ # ---------------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------------- import unittest import os from enso.commands.manager import CommandObjectRegistry from enso.commands.manag...
from spotify.app import app
import sys sys.path.insert(0, "../computerVision/") import FaceDetection import VideoStream import cv2 #Initialise the face detection on camera 1 #If you are using your laptop camera or if you don't have embedded camera on your laptop , change 1 by 0 faceStream = FaceDetection.FaceStream(1) exit = False print faceSt...
from .classifiers.linear import MulticlassLogisticRegression from .encoders.sklearnencoders import ExperimentalPCA, ExperimentalIncrementalPCA, ExperimentalUMAP from .encoders.dictembedding import DictEmbedding classifiers_dict = { 'LogisticRegression': MulticlassLogisticRegression, } encoders_dict = { 'P...
# MINLP written by GAMS Convert at 05/07/21 17:13:00 # # Equation counts # Total E G L N X C B # 189 5 0 184 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # ...