text stringlengths 8.04k 46.5k |
|---|
from abc import ABCMeta, abstractmethod
import csv
import jinja2
import os
import re
import textwrap
from nmigen import *
from nmigen import tracer
from nmigen.build.plat import Platform
from nmigen.build.run import BuildPlan, BuildProducts
from nmigen.utils import log2_int
from nmigen_soc import wishbone
from nmigen... |
"""Fetch cytogenetic band data from third-party MySQL databases
"""
# TODO:
# - Bonus: Convert this data into AGP 2.0, send data missing from NCBI to them
import os
import json
from concurrent.futures import ThreadPoolExecutor
import argparse
parser = argparse.ArgumentParser(
description=__doc__,
formatter_c... |
# Copyright (c) 2019, Oracle and/or its affiliates.
# Copyright (C) 1996-2017 Python Software Foundation
#
# Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
import re
import string
import unittest
import sys
def test_match():
md = re.compile('hello').match('hello world')
assert md.groups() == ... |
import pytest
from PaloAltoNetworks_PrismaCloudCompute import Client, camel_case_transformer, fetch_incidents, get_headers, \
HEADERS_BY_NAME
from CommonServerPython import DemistoException
def test_camel_case_transformer(requests_mock):
test_strings = ['camelCase', 'camelCaSe', 'camelCaseString', 'camelcase... |
# Copyright 2020 The Magenta Authors.
# Modifications Copyright 2020 <NAME>.
#
# 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 requ... |
"""
Module defining class-representation of module actions.
Each action class type encapsulates the user specified options available for
that specific action type. The action itself can be performed by invoking the
object method `execute()`.
One of the main goals with Action, is that the arity of execute is 0.
This m... |
# Copyright 2017 Mycroft AI 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 agreed to in writin... |
"""Interactive phaseogram."""
from __future__ import (absolute_import, unicode_literals, division,
print_function)
from .io import load_events, load_folding
from .fold import get_TOAs_from_events, HAS_PINT
from .base import hen_root, deorbit_events
from stingray.pulse.search import phaseogram
... |
#
# ============LICENSE_START==========================================
# org.onap.vvp/engagementmgr
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ===================================================================
#
# Unless ... |
from uuid import uuid4
from datetime import timedelta, datetime, time
from iso8601 import parse_date
from pyramid.security import Allow
from zope.interface import implementer
from schematics.types import StringType, MD5Type, BooleanType
from schematics.types.compound import ModelType
from schematics.types.serializable ... |
# Tools for model testing and evaluation
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from copy import deepcopy
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score, mean_absolute_... |
import micropython
micropython.opt_level(2)
import comutils
import blobstar, astro_sensor, time_location, captive_portal, pole_finder, star_finder, pole_movement
import exclogger
import pyb, uos, uio, gc, sys
import time, math, ujson, ubinascii
import network
import sensor, image
red_led = pyb.LED(1)
green_led = py... |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... |
from __future__ import print_function
import copy
from smpspy.smps_read import StochasticModel
__author__ = 'vujanicr'
"""
Collection of inner problems, coded to fit the required oracle interface to function properly with the dual methods.
Oracles for the dual function should:
INPUT
- lambda_k: (array of floats... |
""" Module for computing topographical and atmospheric layers """
import numpy as np
import richdem as rd
from datetime import datetime
from typing import Tuple
import random
from scipy import ndimage
def compute_orographic_updraft(
wspeed: np.ndarray,
wdirn: np.ndarray,
slope: np.ndarray,
aspect: np... |
from elasticsearch_dsl.connections import connections
from elasticsearch import helpers
from elasticsearch_dsl import Search, Index
from glob import glob
import gzip
import logging
import json
import argparse
from datetime import datetime
from time import sleep
import os
import math
import multiprocessing
import os.pat... |
# Copyright 2017 Google Inc. 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 a... |
import os
import pandas as pd
import numpy as np
import scipy
import scipy.stats
import pypeliner
import remixt.seqdataio
import remixt.config
def infer_snp_genotype(data, base_call_error=0.005, call_threshold=0.9):
""" Infer snp genotype based on binomial PMF
Args:
data (pandas.DataFrame): input sn... |
"""
File contains class used for feature engineering.
Author: <NAME>
"""
from androidcrypto.analysis.preparation.config import FeatureEngineeringConfig
from typing import Union, Any, List, Optional
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.feature_ex... |
# -*- coding: utf-8 -*-
"""
Collection of tools for sequence analysis
"""
import random
from multiprocessing import Pool
import math
from functools import partial
import subprocess
import pandas as pd
import numpy as np
import sklearn.metrics
import sklearn.cluster
from sklearn.cluster import AgglomerativeClustering
f... |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from __future__ import with_statement
import logging
logging.basicConfig(level=logging.INFO) # dev_appserver.py --log_level debug .
log = logging.getLogger(__name__)
#from testharness import *
import threading
import os
import sys
import re
import rdflib
from rdflib im... |
# Copyright (c) 2014 <NAME>
# 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, publish, distribute, s... |
# The MIT License (MIT)
# Copyright (c) 2020 by the xcube development team and contributors
#
# 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... |
#!/usr/bin/env python3
# vim: awa:sts=4:ts=4:sw=4:et:cin:fdm=manual:tw=120:ft=python
from ansimarkup import AnsiMarkup, parse
from app_settings import app_settings
import argparse
import datetime
import os
import platform
import pprint
import psutil
from psutil._common import bytes2human
import random
import re
import... |
# coding=utf-8
# Copyright (C) 2020 NumS Development Team.
#
# 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, modif... |
from contextlib import contextmanager
import docker
from subprocess import CalledProcessError
import pytest
import io
import os
import os.path as op
import re
import shutil
import sys
import logging
import zipfile
from auditwheel.policy import get_priority_by_name, get_arch_name
from elftools.elf.elffile import ELFFile... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS LLP and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import json
from frappe.utils import getdate, get_time, add_days, time_diff_in_seconds, flt, add_to_d... |
# Copyright (c) nexB, Inc. and others.
# Copyright (c) Center for Information Technology, http://coi.gov.pl
# Copyright (c) <NAME>, <NAME>, <NAME> and others.
# Copyright (c) <NAME> and <NAME>, Facebook, Inc. and its affiliates.
#
# SPDX-License-Identifier: Apache-2.0 AND MIT
# This has been significantly modified from... |
# Copyright 2018 <NAME>. All Rights Reserved.
# Licensed under MIT license.
# distutils: language=c++
#cython: boundscheck=False
#cython: wraparound=False
#cython: initializedcheck=False
#cython: cdivision=True
#cython: optimize.use_switch=True
#cython: optimize.unpack_method_calls=False
#cython: unraisable_tracebacks=... |
import itertools
import os
import pickle
import unittest
import warnings
from copy import deepcopy
import numpy as np
import scipy.stats
import sati.distributions
import sati.planes
import sati.model
class TestModel(unittest.TestCase):
"""Test class of model.py"""
def setUp(self):
self.n = 128
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#Males gw encrypt Tod jika mau recode, recode aja
#Tapi ngotak dikit jangan Lo jual belikan sc ini kontol
#Code by YayanXD
#Created 05-07-2020
#My facebook (https://www.facebook.com/KM39453)
import os,sys,re,time,json,random,requests
from bs4 import BeautifulSoup as pars... |
from datamart.materializers.wikitables_downloader.utils import *
SELECTOR_ROOT = '#content table:not(.infobox):not(.navbox):not(.navbox-inner):not(.navbox-subgroup):not(.sistersitebox)'
FUNCTIONS = {-1: 'empty', 0: 'data', 1: 'header'}
PADDING_CELL = soup('<td data-padding-cell></td>', 'html.parser').td
FIND_DIGI... |
# python 3
# functions.py
# <NAME>
# Last update: 12/16/2020
"""
This is a script accompanying main.py for building machine learning models.
Note that this script only contains functions and should not be run independently.
"""
def load_file_preprocessed(filename, mode=['sequence', 'shape'], structural_re... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os.path import dirname
from tkinter import (Button, Entry, Frame, Label, LabelFrame, Menu, Message,
Scrollbar, StringVar, Tk, Toplevel, messagebox,
scrolledtext)
# from tkinter.ttk import Frame as tFrame
from tkinter.ttk impo... |
from autoconf import conf
import matplotlib
from autoarray.structures.arrays.two_d.array_2d import Array2D
from typing import Union, List, Optional, Tuple
def set_backend():
backend = conf.get_matplotlib_backend()
if backend not in "default":
matplotlib.use(backend)
try:
... |
"""
Data input is handled by the *Input* tab of the main toolbar.
From here you can load or generate a lattice, view loaded lattices, etc.
Once loaded, systems will be added to the "Loaded systems" list.
Various actions can be performed on the loaded systems by right clicking them, such as
removing them from the list.... |
#@+leo-ver=5-thin
#@+node:ekr.20031218072017.3749: * @file leoMenu.py
"""Gui-independent menu handling for Leo."""
from typing import Any, List
from leo.core import leoGlobals as g
#@+others
#@+node:ekr.20031218072017.3750: ** class LeoMenu
class LeoMenu:
"""The base class for all Leo menus."""
#@+others
#@... |
import numpy as np
import math
import base64
import json
import scipy.signal as sg
from enum import Enum
from typing import Dict, Optional, Tuple, Union, List
from tdw.output_data import OutputData, Rigidbodies, Collision, EnvironmentCollision
from pathlib import Path
from pkg_resources import resource_filenam... |
import numpy as np
import torch
import cv2
import math
def iou(tens1, tens2):
assert tens1.size() == tens2.size()
squeeze = False
if tens1.dim() == 2 and tens2.dim() == 2:
squeeze = True
tens1 = tens1.unsqueeze(0)
tens2 = tens2.unsqueeze(0)
assert tens1... |
#!/usr/bin/env python3
"""
Script that implements `git apple-llvm push`.
"""
import os
import sys
import logging
import click
import json
from typing import Optional, List, Dict, Set
from enum import Enum
from contextlib import ExitStack
from git_apple_llvm.git_tools import git, git_output, get_current_checkout_dire... |
import tkinter as tk
import requests
from bs4 import BeautifulSoup
from time import sleep
import sys
from tkinter import ttk
from tkinter import *
import yfinance as yf
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
import datetime
from time import strfti... |
import torch.nn as nn
import numpy as np
from mmdet.models.utils import one_hot
from mmdet.ops.iou3d import iou3d_utils
from mmdet.ops.iou3d.iou3d_utils import boxes3d_to_bev_torch
import torch
import torch.nn.functional as F
from mmdet.core.loss.losses import weighted_smoothl1, weighted_sigmoid_focal_loss, weighted_cr... |
""" The Number Coil """
# List a prime; List mod6 of prime; Compare with another set (offset of mod6)
# to see spin change, determine cell of each prime.
#
#
""" This code plots the positons in the central triangle of the prime hexagon.
See accompanying notes and images for what these mean.
"""
import sys, os,... |
import time
import numpy
from scipy import linalg
import scipy.constants
from pygbe.util.semi_analytical import GQ_1D
from pygbe.tree.direct import computeDiagonal
from pygbe.quadrature import quadratureRule_fine
from pygbe.util.read_data import readcrd, readpqr, read_vertex, read_triangle
from pygbe.tree.FMMutils imp... |
# TimerX v0.2 by sumeshir26
# IMPORTS
ver = "0.9"
from time import sleep
from tkinter import TclError, ttk, Tk, PhotoImage, Frame, StringVar, Grid
import tkinter
from tkinter.constants import LEFT
from playsound import playsound
from threading import Thread
from platform import system
import os
from uti... |
#!/usr/bin/env python2
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script to test servoflex cables attached to Servo V2 rev1|rev0.
See usage ( -h ) for more details
"""
import logging
impor... |
# -*- coding: utf-8 -*-
"""Module to manage AiiDAlab apps."""
import re
import os
import shutil
import json
import errno
import logging
from collections import defaultdict
from contextlib import contextmanager
from enum import Enum, auto
from time import sleep
from threading import Thread
from subprocess import check_... |
import pandas as pd
#importing all the data from CSV files
master_df = pd.read_csv('People.csv', usecols=['playerID', 'nameFirst', 'nameLast', 'bats', 'throws', 'debut', 'finalGame'])
fielding_df = pd.read_csv('Fielding.csv',usecols=['playerID','yearID','stint','teamID','lgID','POS','G','GS','InnOuts','PO','A','E','DP... |
# --------------------------------------------------------------------------------------
# EPFL Bachelor Project : Testing and verification of a tape-spring based solar array
# Authors:
# <NAME> ... |
import argparse
import json
import logging
import os
import shutil
import sys
import tarfile
import tempfile
import xml.etree.ElementTree as ElementTree
from enum import Enum
from io import BufferedReader
from typing import List, Optional, Dict
import inquirer
import networkx as nx
import requests
from rich.logging im... |
#!/usr/bin/python
#===============================================================================
# Pileup 2 nucleotide rate
# written by : <NAME>, Shomron Lab, Tel Aviv University
#
# takes in a pileup file (produced by samtools) and returns the nucleotide
# rate in each position, ignores start and end marker... |
import os
import h5py
from sklearn.model_selection import train_test_split
from tensorflow.keras.utils import to_categorical
import pickle
import multiprocessing as mp
import numpy as np
import pandas as pd
import itertools
import copy
from sklearn.utils import shuffle
from scipy.interpolate import interp1d
from astro... |
import datetime
import time
from collections import deque
import numpy as np
from forkan.common.csv_logger import CSVLogger
from forkan.common.tf_utils import scalar_summary
from forkan.common.utils import log_alg
import baselines.common.tf_util as U
from baselines import logger
from baselines.common import explained... |
#!/usr/bin/env python
"""
@author: <NAME> & <NAME>
This script generates read profiles for Oxford Nanopore 2D reads (genomic and transcriptome).
"""
from __future__ import print_function
from __future__ import with_statement
from textwrap import dedent
from subprocess import call
from time import strftime
import sys... |
"""
@file
@brief Install or update all packages.
.. faqref::
:title: Skipped modules
Some modules are still marked as a dependency by others
even if they are not needed or cannot be installed.
* `enum-compat <https://pypi.python.org/pypi/enum-compat>`_:
not needed after Python 3.5
* `pretty... |
#!/usr/bin/env python3
"""
Copyright (c) 2004-present, Facebook, Inc.
All rights reserved.
"""
import asyncio
import hashlib
import json
import logging
import os.path
import pathlib
import re
import time
from contextlib import contextmanager
from copy import deepcopy
from threading import RLock
from typing import Dict... |
"""
Models used for robust grading.
Robust grading allows student scores to be saved per-subsection independent
of any changes that may occur to the course after the score is achieved.
We also persist students' course-level grades, and update them whenever
a student's score or the course grading policy changes. As the... |
from getmac import get_mac_address as gma
from generate_mac import generate_mac
from tkinter import ttk, font, messagebox
import os, re, uuid, sys, signal
from tkinter import *
import webbrowser
import subprocess
from datetime import date, datetime
import sqlite3
#For Create Button ToolTip
class ToolTip(obj... |
import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
from IPython.display import display, Markdown
from utils import load_pickle, log, dump_pickle, remove_all_files_from_dir
from config.config import DEFAULT_FILES_NAMES, DEFAULT_END_DATE, DEFAULT_START_DATE
class DataHandler:
"""
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# Layer builder for patankar package
# general object is layer()
# derived ones LDPE(),HDPE(),PP()...air()
@author: <EMAIL>
"""
# -- History ----
# Created on Tue Jan 18 09:14:34 2022
# 2022-01-19 RC
# 2022-01-20 full indexing and simplification
# 2022-01-21 add spl... |
# if your dataset is in COCO format, this cell can be replaced by the following three lines:
# from detectron2.data.datasets import register_coco_instances
# register_coco_instances("my_dataset_train", {}, "json_annotation_train.json", "path/to/image/dir")
# register_coco_instances("my_dataset_val", {}, "json_annotatio... |
from copy import deepcopy
import logging
def is_landing_square_occupied(func):
def wrapper(self, new_square, board, *args, **kwargs):
val = func(self, new_square, board, *args, **kwargs)
landing_square = board.get_square(new_square)
# Can't capture own piece.
if landing_square.is_p... |
r'''
2D linear elastictity PGD example
geometry: 1000 x 100
boundary: fixed at left side
load: at top: first half with 1.5xloadfactor second half 0.5xloadfactor
elastic plane strain C(E,nu)
||||F2||||||F1|||
|>-----------------
|>----------------- Ly
... |
#!/usr/bin/env python3
# The MIT License
# Copyright (c) 2016 Estonian Information System Authority (RIA), Population Register Centre (VRK)
#
# 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 ... |
import os
import gym
import math
import numpy as np
import scipy.signal
import tensorflow as tf
import matplotlib.pyplot as plt
import random
from typing import Union, List, Dict, Tuple, Optional
from distutils import dir_util
from datetime import datetime
from gym import spaces
from tensorflow.keras.optimizers.sche... |
# Copyright 2020 The HuggingFace Team. 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 applicabl... |
import logging
from os import environ
from typing import List, Tuple, Dict, Any, Optional
import transaction
from sqlalchemy import func
from dbas.database import DBDiscussionSession
from dbas.database.discussion_model import Issue, User, Statement, TextVersion, MarkedStatement, \
sql_timestamp_pretty_print, Argu... |
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# Name: timespans/verticality.py
# Purpose: Object for dealing with vertical simultaneities in a fast way w/o Chord's overhead
#
# Authors: <NAME>
# <NAME>
#
# Copyright: Copyright ... |
import numpy as np
import pandas as pd
import scipy as sp
from scipy import optimize
import matplotlib.pyplot as plt
plt.style.use('seaborn-whitegrid')
prop_cycle = plt.rcParams["axes.prop_cycle"]
colors = prop_cycle.by_key()["color"]
class OLG:
""" The Class contain the OLG model
"""
##################... |
#!/usr/bin/env python
'''
Copyright (c) 2016-2017 Wind River 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.0
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mar 28 2020
@author: alvin
"""
import random
import copy
EQUALITY = 'eq'
INEQUALITY = 'neq'
class Object:
def __init__(self, line = None, type_ = None, objects = None): # Example of line: waypoint: {wp0, wp1, wp2, wp3};
... |
import re
from cached_property import cached_property
from lxml import etree
from wtforms.validators import NumberRange, InputRequired
from onegov.core.widgets import transform_structure
from onegov.core.widgets import XML_LINE_OFFSET
from onegov.form import Form
from onegov.form import with_options
from onegov.form.... |
"""
asiddhavat (6.4.22 - 6.4.175 [end])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rules in the *asiddhavat* rules do not interfere with each other. That is, if
a rule A would ordinary block a rule B, both are allowed to apply if they are
defined within this section.
*asiddhavat* rules are within the scope of the *aNgasya* ... |
#****************************************************************************
# Copyright (c) 2015 - 2016, CEA
# 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 mus... |
import urlparse, logging, os
from tangled.web.client.util import WWWInsensitiveDefaultDict
from tangled.web.client.protocol import SimpleStringReader, SimpleStringWriter
from twisted.python.failure import Failure
from twisted.internet import reactor, ssl
from twisted.internet.main import CONNECTION_DONE, CONNECTION_... |
"""
This module provides *Animators* (or *anims* for short) for Rabbyt.
*Anims* are little objects that can implement a movement function, primarily
meant to animate sprites. The movement functions are all implemented in C, so
your sprites can be animated without any python call overhead.
For example, to linearly in... |
from sys import prefix
from typing import Set
from flask import render_template, request, redirect, url_for, flash, current_app, jsonify, \
send_from_directory, make_response, session
from flask.helpers import send_file
from flask_login import login_user, logout_user, login_required, current_user
from wtforms.field... |
#%%
import os
import gc
import sys
import pickle
from time import time
import datatable as dt
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import torch
import torch.nn as nn
from torch import optim
from sklearn.metrics import roc_auc_score
from sklearn.model_selection i... |
from processing import OCR_library
import cv2
import math
import numpy as np
from random import randint # for random colors only
def calculateDistance(contour1, contour2):
x1, y1, w1, h1 = cv2.boundingRect(contour1)
x2, y2, w2, h2 = cv2.boundingRect(contour2)
val_x = ((x1 + (w1 / 2)) - (x2 + (w2 ... |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import re
import logging
import objectpath
from indra.statements import *
from indra.util import read_unicode_csv
from indra.databases import hgnc_client
import indra.databases.uniprot_client as up_client
logger = l... |
#!/usr/bin/env python
# coding: utf-8
# In[45]:
# Choquet adaptive thresholding: two step algorithm
# import progressbar
from time import sleep
import math
import cv2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import PIL
from skimage import metrics
# from pynverse import inve... |
#!/usr/bin/python3
#
# Copyright (C) 2006, 2007, 2010, 2012, 2013, 2016 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 c... |
#!/usr/bin/env python
""" b2bt - back-to-back testing
License: 3-clause BSD (see https://opensource.org/licenses/BSD-3-Clause)
Author: <NAME>
"""
import ctypes
import difflib
import getopt
import getpass
import hashlib
import locale
import logging
import os
import platform
import shutil
import subprocess
import sys
im... |
import pyarrow.parquet as pq
import re
#import pyarrow as pa
import pandas as pd
from ColumnInfo import ColumnInfo
from ContinuousQuery import ContinuousQuery
from DiscreteQuery import DiscreteQuery
from OperatorEnum import OperatorEnum
from FileTypeEnum import FileTypeEnum
from ColumnNotFoundError import ColumnNotFoun... |
# TODO Deal with \DocumentClass
# TODO Deal with environments
# TODO Deal with author, title, date etc
class LatexFile():
def __init__(self, fileName: str) -> None:
self.SECTION_HIERARCHY = ["chapter",
"section", "subsection", "subsubsection"]
# if one of t... |
# -*- coding: utf-8 -*-
"""
*This application demonstrates a constellation of satellites for monitoring fires propagated from Two-Line Elements (TLEs)*
The application contains one :obj:`Constellation` (:obj:`Entity`) object class, one :obj:`PositionPublisher` (:obj:`WallclockTimeIntervalPublisher`), and t... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
=======================
prospect.viewer.widgets
=======================
Class containing bokeh widgets needed for the viewer (except for VI widgets)
"""
import numpy as np
from bokeh.models import CustomJS, ColumnDataSource... |
#!/bin/python
'''
scripts to check outputs from hacked surveysim
'''
import os
import h5py
import numpy as np
import scipy as sp
import desisurvey.etc as detc
# --- astropy ---
import astropy.units as u
from astropy.io import fits
from astropy.table import Table as aTable
# -- feasibgs --
from feasibgs import ... |
from .tensor import V,as_symbols,element_wise_shape,numpy,reduce,Flip,Rotate90,ReduceMean,Expand,Operator
from ..yu import array_index_traversal, multi_range
from enum import Enum
#compute-------------
class ConvolutionMode(Enum):
valid = 0
full = 1
convolution_map = {
'valid': ConvolutionMode.valid,
'f... |
# Copyright 2017-present Open Networking Foundation
#
# 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... |
#!/usr/bin/python3
""" Mininet IXP Topology tester
Generates a mininet topology based on the info gathered from IXP Manager and the
faucet config generator
"""
import sys
import json
import time
from datetime import datetime
from subprocess import call
from mininet.topo import Topo
from mininet.net import Mininet
fr... |
# coding: utf-8
"""
Utility tasks for Fireworks.
"""
import copy
import os
import shutil
import logging
import traceback
import importlib
import json
import yaml
from monty.json import jsanitize
from monty.json import MontyDecoder
from custodian.ansible.interpreter import Modder
from fireworks.core.firework import Fir... |
#! python
'''Boilerplate stuff done for you.
This module has some generic classes and functions for several purposes.
ToDo:
- Everything
'''
import argparse
import configparser
import inspect
import json
import logging
import logging.handlers
import os
import pathlib
import pprint
import re
import sys
import types
_... |
# neopixel_color_finder: use knobs to discover good colors and find their codes
#
# MIT License
#
# Copyright (c) 2019 <NAME>
#
# 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 with... |
# coding=utf-8
__author__ = 'weed'
import cv2
import numpy
import math
WHITE = (255,255,255)
RED = ( 0, 0,255)
GREEN = ( 0,128, 0)
BLUE = (255, 0, 0)
SKY_BLUE = (255,128,128)
BLACK = ( 0, 0, 0)
DARKSLATEGRAY = ( 79, 79, 47)
TEAL = (128,128, 0)
def ge... |
import os
import sys
import logging as log
import re
try:
set
except NameError:
from sets import Set as set
import argparse
import configparser
def initialize_arg_parser():
parser = argparse.ArgumentParser( description = """
ETUDE (Evaluation Tool for Unstructured Data and Extractions) is a
command line... |
import json
import os
import re
import cv2
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image, ImageOps
from pycocotools.cocoeval import COCOeval
from scipy.ndimage import gaussian_filter, maximum_filter
import data_generator
import HeatMap # https://github.com/LinShanify/HeatMap
import hourgla... |
#!/usr/bin/env python
import sys
import operator
import os
import re
import subprocess
import glob
from collections import defaultdict
import time
import csv
import shutil
#Calculate coverage at VCF sites across BAM file
def calCov(inputVCF,bamFile):
vcfFile=open(inputVCF,"r")
passN=0
coverageV=0
tota... |
import os
import sys
import argparse
import shutil
from Bio.PDB import *
import numpy as np
import pandas as pd
import time
import subprocess
import pickle
import multiprocessing as mp
import re
try:
from tqdm.auto import tqdm
tqdm_module = True
except:
print("tqdm module not found")
tqdm_module = Fals... |
import locale
import re
from typing import List
from collections import namedtuple
from pytql.tql import RemoteTQL
from dt.model import Database, Worksheet, Table
from dt.util import eprint, ConfigFile
locale.setlocale(locale.LC_ALL, '')
"""
Copyright 2019 ThoughtSpot
Permission is hereby granted, free of charge,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.