text
stringlengths
957
885k
"""Class to process full HydReSGeo dataset. Note: If IRUtils.py is not available, you need to download it before the installation of the package into the `hprocessing/` folder: .. code:: bash wget -P hprocessing/ https://raw.githubusercontent.com/felixriese/thermal -image-processing/master/tiprocessing/I...
<filename>Pinject.py import socket import struct import sys from optparse import OptionParser def checksum(data): s = 0 n = len(data) % 2 for i in range(0, len(data)-n, 2): s+= ord(data[i]) + (ord(data[i+1]) << 8) if n: s+= ord(data[i+1]) while (s >> 16): s = (s & 0xFFFF) + (s >> 16) s = ~s & 0xffff...
<gh_stars>1-10 # %% from tqdm import trange # %matplotlib widget import matplotlib.pyplot as plt from smpr3d.core import Sparse4DData, Metadata4D from pathlib import Path import numpy as np # from ipywidgets import AppLayout, FloatSlider, GridspecLayout, VBox, Tab, Box, HBox, IntSlider # plt.ioff() import torch as th f...
# -*- coding: utf-8 -*- """ Created on Tue Dec 14 19:45:03 2020 @author: Uwe """ from bs4 import BeautifulSoup import requests, time, getpass class Crawler(): def __init__(self, url=None, max_price=None, sleep_time = 40, alert_by_mail=False): """Constructor""" self.PREFIX_ = "https://www.h...
<filename>branches/process-threads-test/source.py #!/usr/bin/env python # -*- coding: utf-8 -*- import threading import sys import re import socket from datetime import date from pygtail import Pygtail from databasemodel import DatabaseModel class Source(threading.Thread): def __init__(self, db_name=None, group...
<gh_stars>0 from tkinter import * janelaCliente = Tk() janelaCliente.geometry("550x200") janelaCliente.title("Clientes") janelaCliente.configure(background='light blue') barraMenu = Menu(janelaCliente) janelaCliente.config(menu = barraMenu) subMenu = Menu(barraMenu) barraMenu.add_cascade(label="Arquivo",me...
<reponame>emmettk/pvrsex # -*- coding: utf-8 -*- """ Created on Tue Aug 29 10:09:14 2017 Modified from SceneTimer_loopSleep.py on 18 Sep 2018. @author: <NAME> Have Streams7 record from all devices, starting a new scene every n seconds. Use Streams time rather than system time If the wait before recording is greater ...
<gh_stars>1000+ import numpy as np from scipy.optimize import minimize import GPy from GPy.kern import Kern from GPy.core import Param from sklearn.metrics import pairwise_distances from sklearn.metrics.pairwise import euclidean_distances class TV_SquaredExp(Kern): """ Time varying squared exponential kernel. ...
<gh_stars>1-10 # pyright: reportPrivateUsage=false from __future__ import annotations import os import sys import socket from typing import Optional, Set, TypeVar, Type, Dict, Tuple from .base import Connection, Interface, Proxy, Id from .protocol.wayland import WlDisplay, WlRegistry, WlShm P = TypeVar("P", bound="Pro...
<reponame>L-Net-1992/towhee # Copyright 2021 Zilliz. 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 require...
<reponame>lneukom/fairseq<gh_stars>0 ''' Created on Dec 19, 2013 A script to convert TMXs into parallel corpuses for machine translation (e.g. Moses: http://www.statmt.org/moses/) training. Pass in either paths to TMX files, or directories containing TMX files. The script will recursively traverse directories and proce...
<reponame>soikat15/MY_AI_CAR-BD-18 # Copyright (C) 2018 <NAME> # # Project Name: # Author: <NAME> # Author's Email: <EMAIL> # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of...
import h3 import moment import re import src.utils.google as google from config.h3.h3_config import POI_RESOLUTION from quart import abort, Blueprint, request from src.utils.array_utils import get_nested_value from src.utils.futures import execute_futures from src.utils.cat_mapping import complete_categories poi_info...
<filename>custom_components/yandex_smart_home/capability_onoff.py """Implement the Yandex Smart Home on_off capability.""" from __future__ import annotations from abc import ABC, abstractmethod import logging from typing import Any from homeassistant.components import ( climate, cover, fan, group, ...
<filename>tests/djangokeys/core/test_env_vars.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Contains tests for accessing the values of environment variables. import pytest from unittest.mock import patch from unittest.mock import MagicMock from djangokeys.core.env_vars import EnvironmentVariables from djangok...
<gh_stars>1-10 # -*- coding: utf-8 -*- import matplotlib matplotlib.use('Agg') import tensorflow as tf import numpy as np from detector import Detector from util import load_image import matplotlib.pyplot as plt import cPickle import os import math import configuration import inference_wrapper from inference_utils impo...
"""JSON implementations of cataloging managers.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowed ...
<reponame>dhruvgairola/linearAlgebra-coursera from vec import Vec def getitem(M, k): "Returns the value of entry k in M. The value of k should be a pair." assert k[0] in M.D[0] and k[1] in M.D[1] if (k[0], k[1]) in M.f.keys(): return M.f[(k[0], k[1])] else: return 0 def setitem(M, k,...
<gh_stars>0 # Generated by Django 3.2.4 on 2021-07-01 12:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Animal', field...
''' @File : Bam2CuttingBW.py @Time : 2020/8/15 4:30 下午 @Author : KeeeeepGoing(<NAME>) @Version : @Contact : <EMAIL> @Desc : copy from https://github.com/forrestzhang/bagatelle.git ''' import pysam import sys import pyBigWig def dhstobw(bamfile, samplename, excludechr='', library='Duke'): ...
<gh_stars>1-10 from pyvirtualdisplay import Display import pandas as pd import os import sys import shutil import glob import time import requests import datetime import cv2 from error_handlers import exception_handler from google.cloud import storage from pathlib import Path from selenium import webdriver from seleniu...
# -*- coding: utf-8 -*- import uuid import hashlib from base64 import b64encode, b64decode from datetime import datetime from werkzeug.http import http_date, parse_date from werkzeug.datastructures import CallbackDict from . import json from ._compat import iteritems, text_type from itsdangerous import URLSafeTimedSer...
<reponame>pulumi/pulumi-azure-nextgen # 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 fr...
<reponame>factomatic/py-factom-did import hashlib from jsonschema.exceptions import ValidationError from factom_did.client.constants import ENTRY_SCHEMA_V100 from factom_did.client.enums import EntryType, Network from factom_did.client.validators import validate_full_key_identifier from factom_did.resolver.exceptions...
# Copyright (c) 2021 by <NAME>. All rights reserved. # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. from dataclasses import dataclass import numpy as np @dataclass class SimpleFlexHeatController: ''' Simple controller for the power-to-heat facility (heat pu...
<reponame>maheriya/tennisLabels #!/usr/bin/env python # coding: utf-8 ## Scale Images in a Directory # This script scales all images in a VOCdevkit dataset to a specified output dimensions and # updates the existing labels accordingly. The Pascal VOC annotations use pixel values for # bounding boxes, and as a result, ...
#!/usr/bin/env python # # Normalize a question into a sentence to make it easier # to answer questions about. # from __future__ import print_function # this module should be imported before using any NLTK or Stanford Parser code, # as it initializes these with their support folders. import settings as s import gram...
<reponame>geoyee/PdRSCD import numpy as np import cv2 import random import math from functools import reduce from ppcd.transforms import functional as func # ----- compose ----- class Compose: """ 根据数据增强算子对输入数据进行操作 所有操作的输入图像流形状均是 [H, W, C],其中H为图像高,W为图像宽,C为图像通道数 Args: transforms (list/None): 数...
<gh_stars>0 import json from tornado import gen, iostream from tornado.web import Application, RequestHandler, RedirectHandler, StaticFileHandler from tornado.websocket import WebSocketHandler from tornado.ioloop import IOLoop from mako.template import Template from mako.lookup import TemplateLookup import plim import...
<filename>fabfile.py<gh_stars>0 """Main Fabric deployment file for CloudBioLinux distribution. This installs a standard set of useful biological applications on a remote server. It is designed for bootstrapping a machine from scratch, as with new Amazon EC2 instances. Usage: fab -H hostname -i private_key_file i...
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.internal_gains import ComfortViewFactorAngles log = logging.getLogger(__name__) class TestComfortViewFactorAngles(unittest.TestCase): def setUp(self): self.fd, self...
# # 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, software # ...
"""functions working with the lightFM recommender model.""" # imports import boto3 import lightfm import pandas as pd import numpy as np import pickle import psycopg2 from lightfm.data import Dataset import os import copy # get model # remember that you may need to use two dots for this to work def get_light...
<filename>location_similarity.py import pymongo as pm import math import os from bs4 import BeautifulSoup import time # Calculating Cosine Similarity def cosine_similarity1(db_location_data, input_location_data, k, collection, model): cosine_sim_output = [] for record in db_location_data: sumxx, sumx...
""" pre-processing the data """ # Import necessary libraries import argparse import pickle import pandas as pd from colorama import Fore, Style ########################################################################### # Description and help ###########################################################...
from __future__ import division, print_function, absolute_import from base_model import BaseModel import tensorflow as tf import numpy as np import random import pandas as pd import re import cv2 import time from tensorflow.examples.tutorials.mnist import input_data import tflearn.datasets.mnist as mnist from tflearn....
<reponame>Psemp/oc_project_11 import pygame from pathlib import Path from app.models.map import Map from app.models.position_nt import Position from app.scripts.startup import startup def gametest(): game_map = Map(20, 20) assets = startup() game_map = assets["maze"] game_map.make_map() pygam...
<gh_stars>0 # -*- coding: utf-8 -*- """project settings""" from __future__ import unicode_literals import os.path import sys from django import VERSION as DJANGO_VERSION DEBUG = False PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) ADMINS = ( # ('<NAME>', '<EMAIL>'), ) MANAGERS = ADMINS DATABASES...
<reponame>dylanirion/wildbook-ia<gh_stars>10-100 # -*- coding: utf-8 -*- import logging from vtool._pyflann_backend import pyflann as pyflann import utool as ut import uuid from os.path import exists, join import lockfile (print, rrr, profile) = ut.inject2(__name__) logger = logging.getLogger('wbia') class Win32Comp...
<filename>tests/components/plugwise/conftest.py """Setup mocks for the Plugwise integration tests.""" import re from unittest.mock import AsyncMock, Mock, patch import jsonpickle from plugwise.exceptions import ( ConnectionFailedError, InvalidAuthentication, PlugwiseException, XMLDataMissingError, ) i...
<filename>pyemma/coordinates/transform/transformer.py<gh_stars>0 # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University # Berlin, 14195 Berlin, Germany. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that th...
import asyncio import dataclasses import enum import fnmatch import re import urllib.parse from typing import Collection, FrozenSet, Iterable, Iterator, List, Mapping, \ MutableMapping, NewType, Optional, Pattern, Set, Union # A namespace specification with globs, negations, and some minimal syntax;...
<filename>utils/sampling_utils.py import numpy as np import tensorflow as tf from scipy import ndimage, misc from utils.projection_utils import * def depth_transform_inv(t_depth, near, far): return np.exp(t_depth * np.log(far + 1) - 1) def depth_transform(depth, near, far): return np.log(depth + 1) / np.log(...
<filename>gbml/test/test_elasticity.py<gh_stars>1-10 #!/usr/bin/env python # Test script for gbml elasticity (bulk and shear moduli) predictions from gbml import elasticity import unittest from pymatgen import MPRester mpr = MPRester() import os # Use a Mock query engine to return the data class MockQE(object): ...
<filename>code/test/apitest/tools/compare_pdf.py #!/usr/bin/env python # Copyright (c) 2005-2009 <NAME> # # Distributed under the MIT license (See accompanying file # LICENSE.txt or copy at http://jagpdf.org/LICENSE.txt) # import os import sys import glob import md5 import getopt import re import heapq import copy i...
import pygame import time import sudoku_game pygame.font.init() class Grid: """ This class is all about developing the UI of the Sudoku game and updating the board and giving solved sudoku when asked """ board = sudoku_game.generate("easy") def __init__(self, rows, cols,...
<filename>housekeeper/cli/add.py """Module for adding via CLI""" import datetime as dt import logging from logging import Logger from pathlib import Path from typing import List import click from housekeeper.date import get_date from housekeeper.files import load_json, validate_input LOG: Logger = logging.getLogger(...
<filename>jira_agile_metrics/calculators/debt_test.py import datetime import pytest from pandas import Timedelta, Timestamp, NaT from ..conftest import ( FauxJIRA as JIRA, FauxIssue as Issue, FauxFieldValue as Value ) from ..utils import extend_dict from ..querymanager import QueryManager from .debt impo...
<reponame>jbarnoud/vermouth-martinize<gh_stars>0 # Copyright 2018 University of Groningen # # 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 # #...
<gh_stars>0 import os import uuid import base64 import time import yaml import json from cryptography.hazmat.primitives.ciphers.aead import AESGCM from behave import given, when, then from helpers import ( ucfs_claimant_api_helper, console_printer, invoke_lambda, claimant_api_data_generator, streami...
#!/usr/bin/env python # -*- coding:UTF-8 -*- # File Name : dataset.py # Purpose : # Creation Date : 05-01-2019 # Author : <NAME> [sli[at]informatik[dot]uni-hamburg[dot]de] # Author : <NAME> [liang[at]informatik[dot]uni-hamburg[dot]de] from __future__ import division, print_function import os im...
<reponame>cnr-ibba/IMAGE-ValidationTool #!/usr/bin/env python3 # -*- coding: utf-8 -* import unittest from image_validation import use_ontology class TestUseOntology(unittest.TestCase): # this test is more about how to use zooma properly, the function itself is like a by-product def test_use_zooma(self): ...
import tensorflow as tf from tensorflow.contrib.framework.python.ops import add_arg_scope from tensorflow.contrib.layers.python.layers import utils from tensorflow.contrib.framework.python.ops import variables from collections import namedtuple slim = tf.contrib.slim Clone = namedtuple('Clone', ['outputs', 'scope', '...
<gh_stars>0 ''' Batched Room-to-Room navigation environment ''' import sys sys.path.append('build') import MatterSim import csv import numpy as np import math import json import random import networkx as nx import functools import os.path import time import paths import pickle import os import os.path import sys impor...
#!/usr/bin/env python3 ''' Reads a Yosys log file to map the original register names to the $procdff{id} naming scheme. Hopefully will eventually add flag to Yosys for preserving names ''' ## # CoreIR mangling: \ -> '' # $ -> '__DOLLAR__' # CoreIR flattening # top$pe_tile_name$sb_name$procdff<ID> # ...
# This script monitors topics in my local MQTT broker # Some messages are forwarded to io.adafruit.com import logging import time import sys from .mqtt import MqttMonitor from .handler import Generic, GenericEnergy, GenericString from .adafruit import Adafruit from .private import username, password # private.py is not...
import utils from llvmlite import ir INT = ir.IntType(32) FLOAT = ir.FloatType() VOID = ir.VoidType() def get_llvm_prm_type(t): if t == 'INT' or t == 'CHAR': return INT elif t == 'FLOAT': return FLOAT else: return VOID class BaseAST: def __init__(self, parent=None): ...
<reponame>sgallag-insta/pixray import unittest from util import * class TestUtilMethods(unittest.TestCase): #region get_file_path def test_get_file_path_no_backslash(self): self.assertEqual(get_file_path('/testpath', 'testfile', '.png'), '/testpath/testfile.png') def test_get_file_path_with_ba...
<filename>utils.py import argparse import collections import os import traceback from random import shuffle from typing import List, Optional, Dict, Union, Any import deepspeed import torch from torch.utils.data import Dataset from tqdm import tqdm from transformers import AutoTokenizer from transformers.trainer impor...
# Copyright (c) 2019 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...
<filename>client/test.py #!/usr/bin/env python2 # -*- coding: utf-8-*- import os import sys import unittest import logging import tempfile import shutil import contextlib import argparse from mock import patch, Mock import test_mic import vocabcompiler import g2p import brain import jasperpath import tts import diagno...
<reponame>TTOFFLINE-LEAK/ttoffline from SCElement import SCElement from SCObject import SCObject from SCMenu import SCMenu from direct.fsm.StatePush import StateVar, FunctionCall from direct.showbase.DirectObject import DirectObject from otp.avatar import Emote SCTerminalSelectedEvent = 'SCTerminalSelected' SCTerminalL...
# -*- coding: utf-8 -*- """ This script makes plots of relevant data. @author: <NAME> """ import yaml import os import pandas as pd import energyscope as es import numpy as np import matplotlib.pyplot as plt from sys import platform from energyscope.utils import make_dir, load_config, get_FEC_from_sankey from ener...
# This file is modified from the screenutils Python module # https://pypi.org/project/screenutils/ # https://github.com/Christophe31/screenutils # -*- coding:utf-8 -*- # # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute it # and/or modify ...
import re import traceback import xml.etree.ElementTree as etree from collections import defaultdict, Counter from bs4 import BeautifulSoup, PageElement, NavigableString, CData, Tag from tqdm import tqdm import pprint import csv import numpy as np from utils import * from typing import Set class QA_Pairer(): ta...
import requests from conftest import print_timing from fixtures import session from fixtures import base_url import os from maxfreq import max_freq from conftest import print_in_shell from conftest import getRandomFilter class TestDelete: @max_freq(50/3600) @print_timing def test_delete_diagram(self, base_...
<gh_stars>0 # Face alignment and crop demo # Uses MTCNN, FaceBoxes or Retinaface as a face detector; # Support different backbones, include PFLD, MobileFaceNet, MobileNet; # Retinaface+MobileFaceNet gives the best peformance # <NAME> (<EMAIL>), Feb. 2021 #test from __future__ import division import argparse import tor...
<gh_stars>10-100 from __future__ import print_function from __future__ import absolute_import import weakref import gevent import gevent.exceptions from gevent.lock import Semaphore from gevent.thread import allocate_lock import gevent.testing as greentest try: from _thread import allocate_lock as std_allocate_...
<filename>NMTK_apps/NMTK_server/data_loaders/rasters.py import logging import collections import datetime from dateutil.parser import parse from BaseDataLoader import * from loaders import FormatException from ogr import osr from django.contrib.gis.gdal import \ GDALRaster, SpatialReference, CoordTransform from dja...
<reponame>MTonyM/PReMVOS import tensorflow as tf import numpy from math import ceil from ReID_net.datasets.Dataset import Dataset from ReID_net.datasets.Util.Reader import load_image_tensorflow from ReID_net.datasets.Util.Resize import resize_image from ReID_net.datasets.Util.Util import smart_shape, username from ReI...
CLICK_LOCATION = { # 开始页面点击 QS 位置 'CENTER_CLICK': (350, 230), 'MAIN_RETURN_INDEX': (16, 62), 'MAIN_TASK_RETURN_BATTLE_SELECT': (59, 37), "LOGIN_QUICK_LOGIN": (640, 675), "LOGIN_START_WAKEUP": (642, 507), "BATTLE_CLICK_IN": (1173, 186), 'BATTLE_CLICK_AI_COMMANDER': (1109, 588), 'BATTL...
### For compiling/running the c++ file import os import platform ## for checking if im windows or linux import sys ## for printing progress on large loops (camera image function). ### 3rd party imports ### ## Maths and linear algebra import numpy as np from scipy.interpolate import interp1d##Interpolation useful for ...
#!/usr/bin/env python3 """Interpolation in a diffusion model's latent space.""" import argparse from functools import partial from pathlib import Path import jax import jax.numpy as jnp from PIL import Image from tqdm import trange from diffusion import get_model, get_models, load_params, sampling, utils MODULE_DI...
from itertools import product from typing import Dict, Any, List, Tuple import json import glob import os import copy from ml_gym.io.config_parser import YAMLConfigLoader class GridSearch: # GRID SEARCH CREATION @staticmethod def _get_dict_obj(keys: List[str], values: Tuple[Any]) -> Dict[str, Any]: ...
# -*- coding: utf-8 -*- # This file is part of the Ingram Micro Cloud Blue Connect connect-cli. # Copyright (c) 2019-2021 Ingram Micro. All Rights Reserved. import click from click.exceptions import ClickException from cmr import render from connect.cli.core import group from connect.cli.core.config import pass_conf...
import gzip import os import unittest from pipelines_utils import TypedColumnReader DATA_DIR = os.path.join('test', 'python2_3', 'pipelines_utils', 'data') class TypedColumnReaderTestCase(unittest.TestCase): def test_basic_example_a(self): """Test loading of a simple CSV file """ test_f...
<filename>asapis/utils/configuration.py import sys import json import os import os.path import ast import re from asapis.utils.printUtil import PrintLevel, logger from asapis.utils.defaultConfig import default_config class Configuration: default_file = "./config.json" config = {} # Proc...
<gh_stars>1-10 __author__ = 'nash.xiejun' import sys import os import traceback import json from keystoneclient.v2_0.endpoints import Endpoint from novaclient import client as nova_client from nova.proxy import clients from nova.proxy import compute_context from constants import SysUserInfo # from install_tool import...
<reponame>VUB-HYDR/2021_Grant_Thiery_C3S511-SPQB-ERA5LAND #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 20 13:18:37 2019 @author: Luke """ #============================================================================== #SUMMARY #=================================================================...
# Made by Mr. Have fun! Version 0.2 import sys from com.l2jserver import Config from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "153_WharfOldtimersFavor" DELIVERY_LIST...
from dataclasses import dataclass from time import perf_counter from typing import Dict, Optional, Callable from pyqumo import MarkovArrival, PhaseType, rel_err, MapPh1NQueue, BoundsError, \ Erlang, HyperExponential, Exponential from pyqumo.fitting import fit_acph2, fit_mern2, fit_map_horvath05 def get_complexit...
# quick sort visualizer # import tkinter as tk from tkinter import Tk, Label, Button, Frame, Canvas, Entry, SW, W from tkinter import messagebox import random import time import sys sys.setrecursionlimit(10**6) # colours DARK_GREY = '#73C6B6' LIGHT_GREY = '#B2BABB' WHITE = '#F0F3F4' GREEN = '#82E0AA' GREEN_2 = '#76D...
<gh_stars>1-10 # --------------------------------------------------------------------- # # Copyright (c) 2012 University of Oxford # # 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 re...
<reponame>chw3k5/WaferScreen import os import sys import time import socket import serial import numpy as np """ This is for the Keithley 2450 source meter. This is designed to be platform independent. """ # These are definitions that are used by many methods in the Keithley2450 class below. def read_serial(serial_d...
<filename>WorkoutAnalyze.py #!/usr/bin/env python # coding: utf-8 ''' BSD 3-Clause License Copyright (c) 2020, <NAME> All rights reserved. ''' # First party classes import os,glob,shutil, subprocess import re import datetime, time import configparser import sys, getopt import logging import logging.config # 3rd party...
<reponame>ccaspers/uncommitted """The 'uncommitted' command-line tool itself.""" import os import sys from argparse import ArgumentParser from . import git from .finder import find_repos USAGE = """usage: %%prog [options] path [path...] Checks the status of all git, Subversion, and Mercurial repositories beneat...
<reponame>fabian-paul/wepy import multiprocessing as mulproc import random as rand import itertools as it import numpy as np from wepy.resampling.resamplers.resampler import Resampler from wepy.resampling.decisions.clone_merge import MultiCloneMergeDecision class REVOResampler(Resampler): DECISION = MultiCloneM...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
<filename>xception_hxt.py from keras.applications.xception import Xception from keras.layers import * from keras.models import * import tensorflow as tf def Conv_block(x, filters, size, strides=(1, 1), padding='same', activation=True): x = Conv2D(filters, size, strides=strides, padding=padding)(x) x = BatchN...
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # 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...
<filename>convex_hull.py<gh_stars>0 """ Goal - To caluclate convex hull area """ import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import tr...
<gh_stars>10-100 import sys import os #new_path = os.path.join(os.getcwd(), '..', 'SemMedDB') #sys.path.insert(0, new_path) from NormGoogleDistance import NormGoogleDistance #from SemMedInterface import SemMedInterface from QueryMyGene import QueryMyGene import mygene import requests from QueryMyChem import QueryMyChe...
<reponame>amolk/AGI-experiments # %% %cd ~/work/free-energy-minimization-framework/7/ %load_ext autoreload %autoreload 2 # %% from f import F import torch from torch import nn import pdb import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np %matplotlib inline figsize=(15,5) t_sample = ...
#!/usr/bin/env python3 """SvakSvat Member register GUI.""" import sys import pickle from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from sqlalchemy.orm import scoped_session from backend.orm import (Member, ContactInformation, get_field_max_length, create_m...
<reponame>k-wojcik/kylin_client_tool # -*- coding: utf-8 -*- __author__ = '<NAME>' from models.object import JsonSerializableObj from models.cube import CubeDesc, CubeModel class CubeRequest(JsonSerializableObj): """ python class mapping to org.apache.kylin.rest.request.CubeRequest """ def __init__(...
<reponame>NIEHS/P-MACD ## This code was developed and authored by <NAME>, Ph.D. ## Unauthorized commercial reuse of the code and removal of this notice ## are prohibited. ## This research was supported by the Intramural Research Program of the NIH, ## National Institute of Environmental Health Sciences. if (not CUSTO...
from os.path import splitext, abspath from sys import modules try: import win32serviceutil except ImportError, details: print 'WARNING due to "%s".' % str(details) try: import win32service RUNNING = win32service.SERVICE_RUNNING STARTING = win32service.SERVICE_START_PENDING STOPPING = win32servi...
# Copyright 2016-2020 The <NAME> at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License"); # you ...
# a toolbox for music songs similarity weighting, song clustering, and so on import csv import logging import os import shutil import numpy as np import scipy from matplotlib.pyplot import specgram from scipy.io import wavfile from sklearn.cluster import KMeans SONGS_DIR = '/home/lucasx/Documents/Dataset/CloudMusic/1...
<reponame>n-kawauchi/pipeline-test #!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## AttachDetachRTCTest.py ## ## メモリーリークチェック ## RTC.idlで定義されているオペレーション ## ECのアタッチ・デタッチに関するオペレーション # # $Id$ # from rtc_handle import * from BasicDataType_idl import * import time import commands env = RtmEnv(sys.argv, ["localhost:9898"]...