text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
double precision function cwig3j (j1,j2,j3,m1,m2,ient) c wigner 3j coefficient for integers (ient=1) c or semiintegers (ient=2) c other arguments should be multiplied by ient implicit double precision (a-h,o-z) parameter (idim = 58) character*512 slog c dime...
{"hexsha": "c279aff19a08ed01894bc8cce73d07aeaff0ddf2", "size": 1992, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/MATH/cwig3j.f", "max_stars_repo_name": "xraypy/feff85exafs", "max_stars_repo_head_hexsha": "ec8dcb07ca8ee034d0fa7431782074f0f65357a5", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
import os import numpy as np import open3d as o3d import glob flip_transform = [[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]] def robust_kernel_fn(alpha, c): if alpha == None: # print('Binary truncation loss') return lambda x: (np.abs(x) < c).astype(float) if alpha == 2: #...
{"hexsha": "34ab2798f114dbf51a5f8ba609a11c4c7ec17089", "size": 13117, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloader/common.py", "max_stars_repo_name": "Kwonyoung-Ryu/DeepGlobalRegistration", "max_stars_repo_head_hexsha": "0045118d96182047f4c09c4c4fe2a1b2b527cc5f", "max_stars_repo_licenses": ["MIT"],...
% All comment lines start with % % There are no multi-line comments % LaTeX is NOT a "What You See Is What You Get" word processing software like % MS Word, or OpenOffice Writer % Every LaTeX command starts with a backslash (\) % LaTeX documents start with a defining the type of document it's compiling % Other docu...
{"hexsha": "d051795f4e26196501737de941155ea3b044b9dc", "size": 9934, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "samples/Misc/learn-latex.tex", "max_stars_repo_name": "MateoCerquetella/dark-plus-syntax", "max_stars_repo_head_hexsha": "c5afd61a0b7a0081b6e4c070a49cde71abfd3dce", "max_stars_repo_licenses": ["MIT"...
# Problem: https://projecteuler.net/problem=227 # Define distance as the clockwise number of people between the dice. # Use the distance between the dices as a state. # Use Markov chain to track the probabilities. # T[distance1][distance2] is the probability of transitioning from distance 1 to distance 2 impor...
{"hexsha": "b0aa6751c2d5f0e6b1fb3ed7b10e7e2ec35beb11", "size": 2199, "ext": "py", "lang": "Python", "max_stars_repo_path": "3rd_100/problem227_improved.py", "max_stars_repo_name": "takekoputa/project-euler", "max_stars_repo_head_hexsha": "6f434be429bd26f5d0f84f5ab0f5fa2bd677c790", "max_stars_repo_licenses": ["MIT"], "m...
import os import logging os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" logging.getLogger("tensorflow").setLevel(logging.CRITICAL) logging.getLogger("tensorflow_hub").setLevel(logging.CRITICAL) import shutil import numpy as np from perform.constants import REAL_TYPE, PARAM_INPUTS, ROM_INPUTS # Constants to use throughou...
{"hexsha": "c05a8d607bddab6a3eeadebdbcde66a638550f6b", "size": 9154, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integration_tests/constants.py", "max_stars_repo_name": "cwentland0/perform", "max_stars_repo_head_hexsha": "e08771cb776a7e6518c43350746e2ca72f79b153", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python """ Author: Devansh Shukla """ import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation, FFMpegWriter import matplotlib.gridspec as gridspec custom_rcparams = { "axes.labelsize": 7, "axes.titlesize": 8, ...
{"hexsha": "13be23a9d1afe060e4d8583ab13e4743506f3902", "size": 3019, "ext": "py", "lang": "Python", "max_stars_repo_path": "M6/AnimationParticle.py", "max_stars_repo_name": "devanshshukla99/MP409-Computational-Physics-Lab", "max_stars_repo_head_hexsha": "938318cb62f1b89a7bc57e07f9b5ac6f2b689fe4", "max_stars_repo_licens...
import logging import os import pandas as pd import numpy as np import itertools as it import xgboost as xgb class XGB(object): def __init__(self, obj): self.master = obj for key, val in vars(obj).items(): setattr(self, key, val) base_for = "ACGT" base_rev = "...
{"hexsha": "180746489c18e6c621d02998fa08b36af6095d1e", "size": 4099, "ext": "py", "lang": "Python", "max_stars_repo_path": "cctyper/xgb.py", "max_stars_repo_name": "ElementGenomicsInc/CRISPRCasTyper", "max_stars_repo_head_hexsha": "c1112b0bcaf3e4adc4bd89a693b84e7f9a185abf", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma binsert_absorb[simp]: "binsert a (binsert a x) = binsert a x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. binsert a (binsert a x) = binsert a x [PROOF STEP] by transfer simp
{"llama_tokens": 80, "file": null, "length": 1}
########################################################### ########################################################### ## EMode - Python interface, by EMode Photonix LLC ########################################################### ## Copyright (c) 2021 EMode Photonix LLC ################################################...
{"hexsha": "f515f002621fe92a9ebd7bdca8224daca3277a5d", "size": 6825, "ext": "py", "lang": "Python", "max_stars_repo_path": "emodeconnection/emodeconnection.py", "max_stars_repo_name": "emode-photonix/emodeconnection", "max_stars_repo_head_hexsha": "d39b6a0c356bce8a3284087da37513c1c2ea3bf3", "max_stars_repo_licenses": [...
int_or_bigint(x) = (y=mod(x,Int); x==y ? convert(Int,x) : convert(BigInt,y)) mutable struct UnpickleState stack :: Stack proto :: Int pos :: Int memo :: Memo end UnpickleState() = UnpickleState(Stack(), HIGHEST_PROTOCOL, 1, Memo()) function read_opcode(io::IO, state::UnpickleState) ans = read(io, ...
{"hexsha": "0b6c729588ce151b21f2a65393042f3224019607", "size": 10391, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PickleIO/unpickle.jl", "max_stars_repo_name": "cjdoris/PythonIO.jl", "max_stars_repo_head_hexsha": "cd2adb43c41ea55058beadb1ff2d9c0c57569f8e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import math from typing import List from typing import Sequence from typing import Tuple import matplotlib.axes import matplotlib.pyplot as plt import numpy as np def prepare_axes(segments: List[str], columns_num: int, figsize: Tuple[int, int]) -> Sequence[matplotlib.axes.Axes]: """Prepare axes according to segm...
{"hexsha": "2684d74e46a6bc59c5dd24f2275e119dbf5dd10c", "size": 707, "ext": "py", "lang": "Python", "max_stars_repo_path": "etna/analysis/utils.py", "max_stars_repo_name": "martins0n/etna", "max_stars_repo_head_hexsha": "51e9cec5183da2499ca247b0e2db215507246ceb", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
#!/usr/bin/python ####################################################################### import torch import torch.nn.functional as F import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import math import pdb from torch.autograd import Variable ######################################...
{"hexsha": "4e13d914807f15931122508d86dd693981f5f080", "size": 6259, "ext": "py", "lang": "Python", "max_stars_repo_path": "ASR_TransV1/Barlow_Twins.py", "max_stars_repo_name": "BUTSpeechFIT/ASR_Transformer", "max_stars_repo_head_hexsha": "814f720aa8265e9a377869f93dc65b251338e985", "max_stars_repo_licenses": ["MIT"], "...
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
{"hexsha": "29100997ad26392fdf9922359e00f2fd5bf26d3e", "size": 1871, "ext": "py", "lang": "Python", "max_stars_repo_path": "cave/com.raytheon.viz.gfe/localization/gfe/userPython/smartTools/RHTool.py", "max_stars_repo_name": "srcarter3/awips2", "max_stars_repo_head_hexsha": "37f31f5e88516b9fd576eaa49d43bfb762e1d174", "m...
# @recipe function f(e::Event;coloring=[], labeling=[],show_pulses=true) # if show_pulses==true # n_wps = size(e.weighting_potentials,1) # width = 800 # length = width+n_wps*width/2 # size --> (width,length) # myheights = [width/length] # for i in 1:n_wps # ...
{"hexsha": "30d82e4481f9f34dabf4631c0c2d31a69d876dcb", "size": 2116, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Event/plot_recipes.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SolidStateDetectors.jl-71e43887-2bd9-5f77-aebd-47f656f0a3f0", "max_stars_repo_head_hexsha": "9c2c535181052a8e80165...
using LightGraphs using SparseArrays import Base: show, eltype, copy import LightGraphs: nv, has_edge, has_vertex, add_edge!, rem_edge!, rem_vertex!, rem_vertices!, add_vertex!, add_vertices!, outneighbors, inneighbors, vertices, edges, adjacency_matrix, src, dst, nv, edgetype export AbstractMultigraph # expo...
{"hexsha": "46b9331aabf55e6175bd2e75fef308eccda818e7", "size": 4116, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/abstract_multigraph.jl", "max_stars_repo_name": "QuantumBFS/Multigraphs.jl", "max_stars_repo_head_hexsha": "8d1c07598f5ce2083c18c358e5cded601b634a0a", "max_stars_repo_licenses": ["MIT"], "max_s...
from sys import argv from contextlib import redirect_stdout from random import randint import numpy as np # generate two RxC matrices and their multiplication # $ python c_array_gen.py 16 16 > data.txt RS = 8 CS = 8 fm_np = np.random.randint(-128,127, size=(RS, CS)) sm_np = np.random.randint(-128,127, size=(RS, CS)) ...
{"hexsha": "b407e4d05b2068dd6fcd9e6bbb3ab221e87d5366", "size": 1107, "ext": "py", "lang": "Python", "max_stars_repo_path": "verilog/dv/subservient_test/sw/py_tools/gen_c_array_2d.py", "max_stars_repo_name": "yongatek/caravel_yonga-serv-accelerator", "max_stars_repo_head_hexsha": "8efa2eeaadaeba3c78de0546ee40c83433a5632...
import numpy as np from numpy.linalg import inv ''' Kalman smoothing of trajectories using INS transforms combined with ICP scan matching ''' def kf_pass(A0, B0, C1, d1, Q0, R1, mu00, Sigma00, u0, z1): # Kalman filter forward pass # Follows convention: # x1 = A0*x0 + B0*u0 + eta, eta ~ N(0, Q0) # z...
{"hexsha": "ee0a6a214bad30ab7cc30d900afe2f30dda2537f", "size": 7642, "ext": "py", "lang": "Python", "max_stars_repo_path": "process/KalmanSmoother.py", "max_stars_repo_name": "sameeptandon/sail-car-log", "max_stars_repo_head_hexsha": "0ee3d598bb09d389bcbd2ebf73cd4b2411e796be", "max_stars_repo_licenses": ["BSD-2-Clause"...
#!/usr/bin/python3 import cv2 import imageio import logging import numpy as np import os from pathlib import Path import pdb import time import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn as cudnn from typing import List, Tuple import tqdm import mmcv from mseg.utils.dir_utils impo...
{"hexsha": "604d267d1a187632c0669c8cf99ed95b2f71a14d", "size": 24664, "ext": "py", "lang": "Python", "max_stars_repo_path": "mseg_semantic/tool/inference_task.py", "max_stars_repo_name": "Jokoe66/mseg-semantic", "max_stars_repo_head_hexsha": "d3aedcfe03ae66d07b9e7b0ba05e0d4b715d11ca", "max_stars_repo_licenses": ["MIT"]...
""" Licensed under a 3-clause BSD style license - see LICENSE.rst This script shows how to extract features from raw images. The use of this script requires a mask file, which has to be created with the script generate_mask.py (c) 2020, Michael Mommert (mommermiscience@gmail.com) """ import os import requests import ...
{"hexsha": "68d5d43ec33f1723573b3b483777e660e26958b2", "size": 1632, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/extract_features.py", "max_stars_repo_name": "mommermi/cloudynight", "max_stars_repo_head_hexsha": "6fcc72e4844075f65610b5dfb96857e87c507cf6", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import numpy as np def running_median(stream): med = [] for i in range(1, len(stream)+1): med.append(np.median(stream[:i])) return med if __name__ == '__main__': print(running_median([2, 1, 4, 7, 2, 0, 5])) # 2 1.5 2 3.0 2 2.0 2
{"hexsha": "5c936070a9bdd811d6c2f2e3492e69664111546c", "size": 261, "ext": "py", "lang": "Python", "max_stars_repo_path": "day47/Solution.py", "max_stars_repo_name": "silvioedu/DailyInterview", "max_stars_repo_head_hexsha": "976aec8e001344931aed19f20ccffc605fe063fd", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python3 import itertools import time from keithley2600b import SMU import click import zerorpc import sys import yaml import numpy as np import tempfile from scipy import stats from fabric import Connection import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression import msgpack i...
{"hexsha": "c97daf98062dc397d4bd4c7f2e83bedbb5ad6fea", "size": 6915, "ext": "py", "lang": "Python", "max_stars_repo_path": "extra/profile_frontend_measure.py", "max_stars_repo_name": "orgua/shepherd", "max_stars_repo_head_hexsha": "347af12740b008a78b7012ae748d9eb2b147274b", "max_stars_repo_licenses": ["MIT"], "max_star...
# Copyright 2016-present CERN – European Organization for Nuclear Research # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
{"hexsha": "7c4afee6bcb429d01794e16fab3ddf6dd6f70382", "size": 3734, "ext": "py", "lang": "Python", "max_stars_repo_path": "qf_lib_tests/unit_tests/common/utils/test_data_cleaner.py", "max_stars_repo_name": "webclinic017/qf-lib", "max_stars_repo_head_hexsha": "96463876719bba8a76c8269cef76addf3a2d836d", "max_stars_repo_...
[STATEMENT] lemma Assigno_undef: "(Assigno x \<theta> = undefg) = (\<theta>=undeft)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (Assigno x \<theta> = undefg) = (\<theta> = undeft) [PROOF STEP] by (metis Assigno.elims option.distinct(1))
{"llama_tokens": 104, "file": "Differential_Game_Logic_USubst", "length": 1}
import os import gym import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from torch.distributions import Categorical import matplotlib.pyplot as plt env = gym.make("CartPole-v0") env.reset() class Policy(nn.Module): ...
{"hexsha": "81dd4f677837244ffa9caac9b8ba53f3b1826ac2", "size": 4994, "ext": "py", "lang": "Python", "max_stars_repo_path": "backpropagate_Cartpole/main.py", "max_stars_repo_name": "Forsenlol/Reinforced-training-simulating-the-work-of-neural-synapses", "max_stars_repo_head_hexsha": "21e70c3eb5fac8984adb78771bf25f1e5aef8...
# -*- coding: utf-8 -*- # # example exs4a # ---------------------------------------------------------------- # PURPOSE # Analysis of a plane truss using loops. # ---------------------------------------------------------------- # REFERENCES # P-E Austrell 1994-03-08 # K-G Olsson 1995-09-28 # O Dahlblom 2...
{"hexsha": "a1ef88434b5ccc3090b6123d01b327bb72daa7ec", "size": 2113, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/exs_bar2_la.py", "max_stars_repo_name": "CALFEM/calfem-py", "max_stars_repo_head_hexsha": "26d4082ca6b907c48ad814733c733ae30a959657", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
% Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ ]{book} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{...
{"hexsha": "8f6cd0f30638f595c77229b090ac91022229ca47", "size": 50082, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "bookdown-demo.tex", "max_stars_repo_name": "AnkaS/recipes", "max_stars_repo_head_hexsha": "eed59420e131d453591797d1769ab8eb4b1bb267", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": null...
\section{Task} Build a speaker recognition system
{"hexsha": "b561ee41e20150ec3e56300bbc7f237662811628", "size": 51, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/Midterm-Report/task.tex", "max_stars_repo_name": "juliia5m/knu_voice", "max_stars_repo_head_hexsha": "1f5d150ded23af4c152b8d20f1ab4ecec77b40e1", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Wed Dec 15 21:41:25 2021 @author: Oscar """ import math import numpy as np def regularFalsi(f, a, b, Tol, N): i = 1 fa = f(a) fb = f(b) print("%-20s %-20s %-20s %-20s %-20s" % ("n","a_n","b_n","p_n","f(p_n)")) while(i <= N): ...
{"hexsha": "74ffcfcca57c2af0a9c420e7f28082d41cc5dcbc", "size": 919, "ext": "py", "lang": "Python", "max_stars_repo_path": "False Position Code.py", "max_stars_repo_name": "oliver779/Computational_Methods_Course", "max_stars_repo_head_hexsha": "e3d96d97ae0b3acaa1b61474eb18b3fbbf8edc9c", "max_stars_repo_licenses": ["MIT"...
subroutine Bamp_mmp(q,mc,ms,Bmmp) c--- u + g -> c + s + d (t-channel single-charm) ************************************************************************ * * * AUTHORS: R. FREDERIX AND F. TRAMONTANO * * DATE :...
{"hexsha": "5db6888ae702887bc0181be56ca4ee35d6c0ac6e", "size": 21460, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/Stopb/Bmmp.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
function part1(input) state = parse_input(input, 3) for i = 1:6 state = simulate_cycle(state) end return length(state) end function part2(input) state = parse_input(input, 4) for i = 1:6 state = simulate_cycle(state) end return length(state) end function parse_input(inp...
{"hexsha": "694a0fc89c0ff46c4b80407e70f887cae086a283", "size": 1229, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2020/day17.jl", "max_stars_repo_name": "GunnarFarneback/AdventOfCode.jl", "max_stars_repo_head_hexsha": "2f60011747bfe5d27e954f914f39b4ea2f7b0722", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') setwd("/Users/mengmengjiang/all datas/voltage") library(xlsx) par(mfrow = c(2,2), mar = c(1.8,2.2,0.8,1), oma = c(1,1,1,1)) ### 32G-18nl/min ### k1<-read.xlsx("he-32g.xlsx", sheetName = "2kv18", header = TRUE) k2...
{"hexsha": "9ff959e9ccaca46910635248d0f1abd26aa6b7ba", "size": 4727, "ext": "r", "lang": "R", "max_stars_repo_path": "thesis/chap5/chap5-fig5-21.r", "max_stars_repo_name": "shuaimeng/r", "max_stars_repo_head_hexsha": "94fa0cce89c89a847b95000f07e64a0feac1eabe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
#include <boost/fusion/container/map/map_iterator.hpp>
{"hexsha": "1ddbd3ba01c4aff7dbd5fa8fb732c0aef0440247", "size": 55, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_container_map_map_iterator.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses...
function [varargout]=gpatch(varargin) % function [h]=gpatch(F,V,C,CE,A,L) % ------------------------------------------------------------------------ % This function is a short-hand version of the |patch| command. The inputs % for |gpatch| are the faces (F), the vertices (V), the color description % (C), the edge color...
{"author": "MultiDIC", "repo": "MultiDIC", "sha": "d363c3ea74673e58df275d4a4c8e528ef5472acb", "save_path": "github-repos/MATLAB/MultiDIC-MultiDIC", "path": "github-repos/MATLAB/MultiDIC-MultiDIC/MultiDIC-d363c3ea74673e58df275d4a4c8e528ef5472acb/lib_ext/GIBBON/lib/gpatch.m"}
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 6/9/13 ###Function: #### 1) create scatter of OR by zipcode vs. urban metro RUCC avg 2013 ###Import data: zipcode_bysseas_cl.csv ###Command Line: python ############################################...
{"hexsha": "94eaf2f6f272544f781038dd60857a1ff3d600a9", "size": 11462, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/OR_urbanmetro_v6-7-13.py", "max_stars_repo_name": "eclee25/flu-SDI-exploratory-age", "max_stars_repo_head_hexsha": "2f5a4d97b84d2116e179e85fe334edf4556aa946", "max_stars_repo_licenses": [...
from __future__ import print_function import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable class QAlexNet(nn.Module): def __init__(self, num_classes=10): ...
{"hexsha": "f05f903315b385e6ea385806809eca7f9ec9bd60", "size": 6093, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/model.py", "max_stars_repo_name": "LinjianMa/neuralODE-282", "max_stars_repo_head_hexsha": "28d7b520beeeeb773e651110d1faedda6cb835e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
function res = adjD(y) res = zeros(size(y,1),size(y,2)); %y1 = ones(imsize)*y(1)/sqrt(prod(imsize)); %yx = (reshape(y(2:prod(imsize)+1), imsize(1), imsize(2))); %yy = (reshape(y(prod(imsize)+2:end), imsize(1), imsize(2))); res = adjDx(y(:,:,1)) + adjDy(y(:,:,2)); return; function res = adjDy(x) res = x(:,[1,1:end...
{"author": "thomaskuestner", "repo": "CS_MoCo_LAB", "sha": "a26e8e483624b2e4ee669e7a069ba9c74d2d2e4b", "save_path": "github-repos/MATLAB/thomaskuestner-CS_MoCo_LAB", "path": "github-repos/MATLAB/thomaskuestner-CS_MoCo_LAB/CS_MoCo_LAB-a26e8e483624b2e4ee669e7a069ba9c74d2d2e4b/reconstruction/matlab/CS_LAB_matlab/@TVOP/pri...
import torch import numpy as np from torch import nn from torch.nn import functional as F from torch import optim from metalearning.learner import Learner from utils import get_performance from copy import deepcopy class Meta(nn.Module): def __init__(self, args): super(Meta, self).__init__() sel...
{"hexsha": "cf9248a769d68171e24266e95a35c4f4274da545", "size": 8386, "ext": "py", "lang": "Python", "max_stars_repo_path": "metalearning/meta_update.py", "max_stars_repo_name": "yyyqqq5/MetaHG", "max_stars_repo_head_hexsha": "fa5fa36fdda4a491d68c8e66b70e2e34a7eb356d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import cvxpy as cvx import util def set_contains_array(S, a): """ :param S: list of np.ndarray :param a: np.ndarray :return: contains, 0 or 1 """ contains = 0 for b in S: if not (a - b).any(): # if a contained in S contains = 1 return contains ...
{"hexsha": "8c3ed5966f5972419e367c22f46baad392ad9753", "size": 8958, "ext": "py", "lang": "Python", "max_stars_repo_path": "pomdp.py", "max_stars_repo_name": "gongjue/pocm", "max_stars_repo_head_hexsha": "1f8ae819aaa7fa5f25878a0662a23cb457c1180b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
!---------------------------------------------------------------------! ! PHAML ! ! ! ! The Parallel Hierarchical Adaptive MultiLevel code for solving ! ! linear elliptic partial differ...
{"hexsha": "1134461b3f82f228c5df4c79f8fb1111e0710c96", "size": 30793, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/lapack_solve.f90", "max_stars_repo_name": "qsnake/phaml", "max_stars_repo_head_hexsha": "8925b4c32657bbd9f81cd5f8f9d6739151c66fec", "max_stars_repo_licenses": ["mpich2"], "max_stars_count":...
import Aoc import Data.Fin import Data.List import Data.List1 import Data.Nat import Data.Strings import Data.Vect %default total Passport : Type Passport = List (String, String) ||| Split a string at the first colon in it: "abc:def" -> ("abc", "def"). splitColon : String -> (String, String) splitColon s = let (p, q)...
{"hexsha": "dbcbf3764d1c2ac7bcd2deac8415a1b220ccdef6", "size": 1891, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "day-4.idr", "max_stars_repo_name": "lynn/aoc-2020", "max_stars_repo_head_hexsha": "a66b9cac109f9c3b51f18f5fb2d54ebdf395bb10", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_stars_r...
""" MIT License Copyright (c) 2017 Ragini Sharma 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,...
{"hexsha": "238cf3a1e3716035c486b881d96778de2d37b894", "size": 4313, "ext": "py", "lang": "Python", "max_stars_repo_path": "regressor.py", "max_stars_repo_name": "raginisharma14/Deep-Learning", "max_stars_repo_head_hexsha": "df201ff8db9f2f0f252c53f81dd4ace2a1372bd0", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#! /usr/bin/env python3 import numpy as np def readcloudsfile(fname): ''' Format is this: 4 rows of comments A row of nlat, nlon, nlayers A row of lat, lon, level, alt (m), p (bar), T (K), t_std (K), EW vel (m/s), NS vel (m/s), vert vel (m/s), clouds 1-13 vis tau (650 nm), cloud total vis ...
{"hexsha": "8e0ed6c455dc590ebd12faafa193109d5322f18c", "size": 7127, "ext": "py", "lang": "Python", "max_stars_repo_path": "theresa/scripts/calcq.py", "max_stars_repo_name": "rychallener/theresa", "max_stars_repo_head_hexsha": "886c6b74bee2edef7df9b6b54ce6d97de4aa4421", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import unittest from pyscses.set_of_sites import SetOfSites from pyscses.defect_species import DefectSpecies from pyscses.defect_at_site import DefectAtSite from pyscses.site import Site, LabelError from unittest.mock import Mock, patch from pyscses.constants import fundamental_charge import numpy as np def create_moc...
{"hexsha": "3fde155cd46a47abea1b1dbce3dccb9f597c7774", "size": 8969, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_site.py", "max_stars_repo_name": "j-m-dean/pyscses", "max_stars_repo_head_hexsha": "6c2875cb87a8f91ae7aed382922c34b0e611ba85", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
module timestep_mod use globals_mod real(dp), save :: DT_ITER contains function calc_timestep(mesh) result(timestep) use mesh_mod, only: mesh_t use mesh_mod, only: mesh_iterate_cells type(mesh_t), intent(inout) :: mesh real(dp) :: timestep DT_ITER = HUGE(1.0) call mesh_iterate_cells(me...
{"hexsha": "845d36f813783e510e03fcfd749d88672dfc674c", "size": 1009, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/equations/euler/timestep_mod.f90", "max_stars_repo_name": "jmark/nemo2d", "max_stars_repo_head_hexsha": "a508f192d0f6da49e485ee9c8d1c049dbb81d033", "max_stars_repo_licenses": ["MIT"], "ma...
# Copyright (c) Facebook, Inc. and its affiliates. import numpy as np import torch import torch.nn as nn from torch.nn import LayerNorm from torch.nn import TransformerEncoder, TransformerEncoderLayer from torch.nn import TransformerDecoder, TransformerDecoderLayer from torch.nn.init import xavier_uniform_ from fairm...
{"hexsha": "e78504ac8549ce976b55d122784e13033af4915f", "size": 6632, "ext": "py", "lang": "Python", "max_stars_repo_path": "fairmotion/models/transformer.py", "max_stars_repo_name": "martoko/fairmotion", "max_stars_repo_head_hexsha": "13b24dc3f184d1af7874ee68e78ba74f2be83973", "max_stars_repo_licenses": ["BSD-3-Clause"...
import matplotlib.pyplot as plt import numpy as np import matplotlib.colors as mcolors def make_colormap(seq): """Return a LinearSegmentedColormap seq: a sequence of floats and RGB-tuples. The floats should be increasing and in the interval (0,1). from : http://stackoverflow.com/questions/168348...
{"hexsha": "850af61737ea1cc7f7f7d728e753ed3859e41cba", "size": 2934, "ext": "py", "lang": "Python", "max_stars_repo_path": "helpers/lib/custom_cmap.py", "max_stars_repo_name": "scrasmussen/icar", "max_stars_repo_head_hexsha": "88c59fed7595b176a81127993785fdeb514f28a3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import argparse from augur.utils import write_json import Bio.SeqIO from collections import OrderedDict import hdbscan import matplotlib.pyplot as plt import numpy as np import pandas as pd import re from scipy.spatial.distance import squareform, pdist import seaborn as sns from sklearn.decomposition import PCA from sk...
{"hexsha": "969f9e95f44522202f869c675b6eec427d148afe", "size": 8809, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/scripts/embed.py", "max_stars_repo_name": "blab/cartography", "max_stars_repo_head_hexsha": "36ef6408e7bdb73b59003166ad7725662fd8fbe6", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
double precision function fdisc(blockno,xc,yc) implicit none double precision xc,yc, xp, yp, zp integer blockno integer*8 cont, get_context double precision pi, pi2 common /compi/ pi, pi2 double precision beta, theta(2) common /annulus_comm/ beta, theta d...
{"hexsha": "64c795200f6a3b6a2563b5cce0f2376cf23640c5", "size": 750, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "applications/paper/annulus/fdisc.f", "max_stars_repo_name": "scivision/forestclaw", "max_stars_repo_head_hexsha": "4dae847a8abd1055e70acda9c2973cd3dd77d3f1", "max_stars_repo_licenses": ["BSD-2-Clau...
import pandas as pd from ecommercetools.utilities import tools import numpy as np np.seterr(divide='ignore') def get_products(transaction_items, days=None): """Return a Pandas DataFrame of products from a Pandas DataFrame of transaction items. Args: transaction_items (object): Pandas DataFrame. ...
{"hexsha": "5536942fd2fce8bece6f08faf5f52f8ada50383d", "size": 6860, "ext": "py", "lang": "Python", "max_stars_repo_path": "ecommercetools/products/products.py", "max_stars_repo_name": "ruber0id/ecommercetools", "max_stars_repo_head_hexsha": "c34582bf6ad3392fe9a3d05c92cf96dbf435d0a1", "max_stars_repo_licenses": ["MIT"]...
# # File: CNN_inferece.py # Date:11.08.2018 # Author: Denis Tananaev # # from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.framework import ops import scipy.misc from numpy import newaxis from PIL import Image #...
{"hexsha": "1110f6ea6cf510ead8247784d0eb09981717ebff", "size": 3607, "ext": "py", "lang": "Python", "max_stars_repo_path": "CNN_inference.py", "max_stars_repo_name": "Dtananaev/tf_lstm_depth", "max_stars_repo_head_hexsha": "94f83e8671e8928eba24eac6936a02cd9d123686", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Han" __email__ = "liuhan132@foxmail.com" import logging import numpy as np import torch.nn import torch.cuda from game.models.layers import * from utils.functions import compute_mask, del_zeros_right, compute_top_layer_mask from game.tokenizer import Vocabul...
{"hexsha": "0e41183e623af0e1acc95d1600bc9caf64b61d96", "size": 10165, "ext": "py", "lang": "Python", "max_stars_repo_path": "game/models/doc_rep_pt.py", "max_stars_repo_name": "laddie132/MD3", "max_stars_repo_head_hexsha": "3df45918e33437e9a2309f7965f34f3a75621059", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
using SymPy wmotor1 = Sym("wmotor1"); wmotor2 = Sym("wmotor2"); wmotor3 = Sym("wmotor3"); wmotor4 = Sym("wmotor4"); ## Propeller Forces keng = 6.11e-3; f1_body = [0;0;-keng*wmotor1]; f2_body = [0;0;-keng*wmotor2]; f3_body = [0;0;-keng*wmotor3]; f4_body = [0;0;-keng*wmotor4]; ## Propeller Moments kmeng = 1.5e-4; m1_...
{"hexsha": "6888150c592b510b3f92d351aa6157a9494a8d84", "size": 1101, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "example/QuadRotor/ComputeMixingLogic.jl", "max_stars_repo_name": "jg110/Aerospace.jl", "max_stars_repo_head_hexsha": "48998ecaabf7b052793a44205e5482301ac32822", "max_stars_repo_licenses": ["MIT"], ...
import os import pickle as pkl from tqdm import tqdm import numpy as np from scipy import stats import matplotlib.pyplot as plt import pandas as pd import ujson as json import nltk from nltk.tokenize import word_tokenize from time import time np.random.seed(int(time())) SPACE = ' ' def stat_length(seq_length): ...
{"hexsha": "be8bc31ec262c7ee031c00356d8cae4a016cbe4c", "size": 21636, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/torch_preprocess.py", "max_stars_repo_name": "shiningliang/Multi-level-Causality-Detection-Network", "max_stars_repo_head_hexsha": "126a11735781224aaa31af37728e6dd0b2e511c2", "max_star...
#The MIT License # #Copyright (c) 2017 DYNI machine learning & bioacoustics team - Univ. Toulon # #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 limitatio...
{"hexsha": "1d343fd3c65745dc60ae4efdc8853a247fb02969", "size": 18957, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils.py", "max_stars_repo_name": "dynilib/dynibatch", "max_stars_repo_head_hexsha": "b647a50e64796d0d4558cc554060aa82427d468b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
"""Side profiles of common trees in their bare (leafless) form.""" import matplotlib.pyplot as plt import numpy as np # ---------- Tree parameters ------------ # Overall profile dimensions parameters: height = 100.0 width = 100.0 # Angles: initial_angle = 0.5 * np.pi angle_between_segments = 0.05 * np.pi # Trunk a...
{"hexsha": "590195e366c79cefb5df2d33bac09c14d54fa8cd", "size": 1988, "ext": "py", "lang": "Python", "max_stars_repo_path": "tree-profiles/tree_profiles.py", "max_stars_repo_name": "sadielbartholomew/creative-matplotlib", "max_stars_repo_head_hexsha": "b881025b63e9fcfdeea8e41a8f212a2c83c64a24", "max_stars_repo_licenses"...
__precompile__(false) module Buildkite import HTTP import JSON export BuildkiteAPI abstract type AbstractBuildkiteAPI end Base.@kwdef struct BuildkiteAPI <: AbstractBuildkiteAPI base_url::HTTP.URI = HTTP.URI("https://api.buildkite.com/v2/") access_token::String = "" end function buildkite_api_uri(api::Bui...
{"hexsha": "9e5b2bbe850dcb784be668e59d9b08ba1c1f3bbf", "size": 4480, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Buildkite.jl", "max_stars_repo_name": "jakebolewski/Buildkite.jl", "max_stars_repo_head_hexsha": "ea5870badc29f5605e48084823c41982b07701bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma (in mut_m) handshake_invL_eq_imp: "eq_imp (\<lambda>(_::unit) s. (AT s (mutator m), s\<down> (mutator m), sys_hs_type s\<down>, sys_hs_pending m s\<down>, mem_store_buffers (s\<down> sys) (mutator m))) handshake_invL" [PROOF STATE] proof (prove) goal (1 subgoal): 1. eq_imp (\<lambda>_ s. ...
{"llama_tokens": 1065, "file": "ConcurrentGC_Phases", "length": 2}
""" Dependências """ import numpy as np import pandas as pd import multiprocessing from tqdm import tqdm from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.metrics import confusion_matrix from scipy import sparse import oper...
{"hexsha": "334156dd623a6dc612cac8393f7b6552f6441bcf", "size": 51522, "ext": "py", "lang": "Python", "max_stars_repo_path": "nsc/neurongraph.py", "max_stars_repo_name": "GuilhermeToso/masters-project", "max_stars_repo_head_hexsha": "01d5acfddaedb3cbf7fa9247a88108530547e155", "max_stars_repo_licenses": ["MIT"], "max_sta...
// Copyright (c) 2006 Johan Rade // Copyright (c) 2011 Paul A. Bristow To incorporate into Boost.Math // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // test_nonfinite_trap.cpp #ifdef _MSC_VER # pragma warni...
{"hexsha": "819833e1a021efe0113134397e8b1edf98b968b0", "size": 7084, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "boost/libs/math/test/test_nonfinite_trap.cpp", "max_stars_repo_name": "randolphwong/mcsema", "max_stars_repo_head_hexsha": "eb5b376736e7f57ff0a61f7e4e5a436bbb874720", "max_stars_repo_licenses": ["BS...
from flare.rbcm import RobustBayesianCommitteeMachine from flare.gp import GaussianProcess import os as os import numpy as np from flare.struc import Structure from flare.env import AtomicEnvironment from flare.gp_algebra import get_kernel_vector TEST_DIR = os.path.dirname(__file__) TEST_FILE_DIR = os.path.join(TEST_D...
{"hexsha": "027648a8f6daed9fed13a52884d10fa00147d177", "size": 4696, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_rbcm.py", "max_stars_repo_name": "aaronchen0316/flare", "max_stars_repo_head_hexsha": "47a2a89af635dfec6b41a873625ac2411da14ebb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma free_eta: "s \<rightarrow>\<^sub>\<eta> t \<Longrightarrow> loose_bvar1 t i = loose_bvar1 s i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. s \<rightarrow>\<^sub>\<eta> t \<Longrightarrow> loose_bvar1 t i = loose_bvar1 s i [PROOF STEP] apply (induct arbitrary: i set: eta) [PROOF STATE] proof (pro...
{"llama_tokens": 763, "file": "Metalogic_ProofChecker_EtaNorm", "length": 4}
import numpy as np import plotly.offline as pyo import plotly.graph_objs as go np.random.seed(42) random_x = np.random.randint(1, 101, 100) random_y = np.random.randint(1, 101, 100) print(type(random_x)) data = [go.Scatter(x=random_x, y=random_y, mode='markers', ...
{"hexsha": "643c61787cc691269655088935c5f107a6fb6e38", "size": 791, "ext": "py", "lang": "Python", "max_stars_repo_path": "Plotly/scatter_plots.py", "max_stars_repo_name": "jorge-garciadiego/Visualization-Dash", "max_stars_repo_head_hexsha": "68fe99ff5c3ecc99eea3845f38849669449d89d2", "max_stars_repo_licenses": ["MIT"]...
import pandas as pd import numpy as np if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(prog='augment_snp_effects.py', description=''' Augment SNP effects generated by simulate_effect_sizes.py ''') parser.add_argument('--snp_effect_parquet', help=''' ...
{"hexsha": "f45b4903f5f312d399c0232ed7cbf8c5427fcb74", "size": 1607, "ext": "py", "lang": "Python", "max_stars_repo_path": "submission/simulation/simulate_phenotypes/augment_snp_effects.py", "max_stars_repo_name": "liangyy/ukb_idp_genetic_arch", "max_stars_repo_head_hexsha": "562612af6c82684f13e0cf2cbe2adc9a8f31b29d", ...
import numpy as np class GameInfo(object): def __init__(self, frame, robot_action=None, human_action=None, scored=None, puck_was_hit=False, puck_is_at_the_bottom=False, distance_decreased=False, ...
{"hexsha": "cedb0a483680e4dcbaf67c37bf2ab5f242ab6d31", "size": 1072, "ext": "py", "lang": "Python", "max_stars_repo_path": "air_hockey/game_info.py", "max_stars_repo_name": "Gabo-Tor/air-hockey", "max_stars_repo_head_hexsha": "fc949075812da9c5fb5bbb511a717c4aa51640b3", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
// // Copyright (c) 2002--2010 // Toon Knapen, Karl Meerbergen, Kresimir Fresl, // Thomas Klimpel and Rutger ter Borg // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // THIS FILE IS AUTOMATICALLY GENERATED ...
{"hexsha": "ef08398e9274664a6b60791de17e8d1bf0b31f52", "size": 5362, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "externals/numeric_bindings/boost/numeric/bindings/lapack/driver.hpp", "max_stars_repo_name": "ljktest/siconos", "max_stars_repo_head_hexsha": "85b60e62beca46e6bf06bfbd65670089e86607c7", "max_stars_r...
import numpy as np from .myqt import QT import pyqtgraph as pg from .cataloguecontroller import CatalogueController from .traceviewer import CatalogueTraceViewer from .peaklists import PeakList, ClusterPeakList from .ndscatter import NDScatter from .waveformviewer import WaveformViewer from .similarity import SpikeSi...
{"hexsha": "b9b1ea8c986a30498e0764c11494f11d061c21e9", "size": 11968, "ext": "py", "lang": "Python", "max_stars_repo_path": "tridesclous/gui/cataloguewindow.py", "max_stars_repo_name": "rdarie/tridesclous", "max_stars_repo_head_hexsha": "178c0a67d7b3ac88be8e4383001396c1e0f976c2", "max_stars_repo_licenses": ["MIT"], "ma...
#include <fstream> #include <set> #include <sstream> #include <string> #include <boost/test/unit_test.hpp> #include "utilities.h" #include "relation_buffer.h" using namespace cflr; using namespace std; BOOST_AUTO_TEST_SUITE( relation_buffer_test ) BOOST_AUTO_TEST_CASE( int_buffer ){ typedef relation_bu...
{"hexsha": "630f633b35cc39c20ffd2b19de5feed1ef8f444c", "size": 8393, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/test/cpp/test_relation_buffer.cpp", "max_stars_repo_name": "cauliflower-cflr/cauliflower", "max_stars_repo_head_hexsha": "dc8ed39c60bcd8fd700d9da48aba124dd9d6d115", "max_stars_repo_licenses": ["...
""" Test cases for functions/classes in nn_comparator.py -- kandasamy@cs.cmu.edu """ # pylint: disable=no-member # pylint: disable=invalid-name import numpy as np # Local imports from . import otmann from .unittest_neural_network import generate_cnn_architectures, \ generate_m...
{"hexsha": "d28f7f24278b313a7a2eda3b820a9b07f82b1a6d", "size": 19090, "ext": "py", "lang": "Python", "max_stars_repo_path": "dragonfly/nn/unittest_otmann.py", "max_stars_repo_name": "hase1128/dragonfly", "max_stars_repo_head_hexsha": "4be7e4c539d3edccc4d243ab9f972b1ffb0d9a5c", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Tests for datatype and galaxycluster """ from numpy.testing import assert_raises, assert_equal from clmm import GCData from clmm import Cosmology def test_init(): gcdata = GCData() assert_equal(None, gcdata.meta['cosmo']) def test_update_cosmo(): # Define inputs cosmo1 = Cosmology(H0=70.0, Omeg...
{"hexsha": "4503f7a9e776a39f9049f07e6e7bfb6fcb3a25ea", "size": 6144, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_gcdata.py", "max_stars_repo_name": "96RadhikaJadhav/CLMM", "max_stars_repo_head_hexsha": "cd0508f82f9a6a4692fe785277ac25c73e89d0d7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
# Copyright 2019 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 ...
{"hexsha": "317e9ac178a54833b44028edd640ce6922b03712", "size": 5155, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trainer.py", "max_stars_repo_name": "AlbaraaKhayat/e3d_lstm", "max_stars_repo_head_hexsha": "3caa74fb203fbfc0857a20088d559fec23ba8d99", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
from skimage import io, transform import glob import os import tensorflow as tf import numpy as np import time import matplotlib.pyplot as plt import random plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 ''' 数据集来源 @misc{e-VDS, author = {Culurcie...
{"hexsha": "4a99c6abfa8fe22c002c07be0bf04e38473c6948", "size": 9387, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/cnn.py", "max_stars_repo_name": "2016gary/RealTimeIR", "max_stars_repo_head_hexsha": "77ae3b673307821febbcf89c3e4d2da1834f5119", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
#!/usr/bin/env python ''' Copyright (C) 2013- Swedish Meteorological and Hydrological Institute (SMHI) This file is part of RAVE. RAVE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of t...
{"hexsha": "8ae4d3daed6812889788950149a8e2e5223eb551", "size": 11952, "ext": "py", "lang": "Python", "max_stars_repo_path": "rave_ec/Lib/odc_hac.py", "max_stars_repo_name": "DanielMichelson/drqc_article", "max_stars_repo_head_hexsha": "cd7df2f7290adedb557bbc6ba484d30039a23ce2", "max_stars_repo_licenses": ["CC-BY-4.0"],...
""" The ComplementPOVMEffect class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the ...
{"hexsha": "76788c766fab1ff456b47ab376d741cf20b4f45f", "size": 8839, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygsti/modelmembers/povms/complementeffect.py", "max_stars_repo_name": "pyGSTi-Developers/pyGSTi", "max_stars_repo_head_hexsha": "bfedc1de4d604f14b0f958615776fb80ddb59e33", "max_stars_repo_license...
# import modules import itertools import os import re import sys import xml.etree.ElementTree as ET import numpy as np import pandas as pd from arcgis.features import GeoAccessor import arcpy if sys.version_info > (3, 0): import winreg else: import _winreg as winreg class BA_Data: def __init__(self): ...
{"hexsha": "2b979221d7533470c5432e722727ca1cebba3e96", "size": 18558, "ext": "py", "lang": "Python", "max_stars_repo_path": "ba_data_paths/ba_data.py", "max_stars_repo_name": "knu2xs/ba_data_paths", "max_stars_repo_head_hexsha": "c161feec529882a2edfb2ed88b8a89cf07ec3243", "max_stars_repo_licenses": ["Apache-2.0"], "max...
From Mtac2 Require Import Mtac2 CompoundTactics. Import T. Import T.notations. Import CT. Import CT.notations. Example exabs (x : nat) : x = 1 -> 1 = x. MProof. intro H. simple_rewrite H. reflexivity. Qed. Example exabs2 (x : nat) : S x = 1 -> 1 = S x. MProof. intro H. simple_rewrite H. reflexivity. Qed. Require Imp...
{"author": "Mtac2", "repo": "Mtac2", "sha": "d16c2e682d5ab18ed77b13b4fd60a42a65c4f958", "save_path": "github-repos/coq/Mtac2-Mtac2", "path": "github-repos/coq/Mtac2-Mtac2/Mtac2-d16c2e682d5ab18ed77b13b4fd60a42a65c4f958/tests/comptactics.v"}
""" * GTDynamics Copyright 2020, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * See LICENSE for the license information * * @file test_four_bar.py * @brief Unit tests for inverse dynamics of a four bar linkage. * @author Frank Dellaert, Varun Agrawal, Mandy Xie, Alejan...
{"hexsha": "a3a69f14b1156a6ae26b955bc39ae05511c53bf2", "size": 3957, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tests/test_four_bar.py", "max_stars_repo_name": "danbarla/GTDynamics", "max_stars_repo_head_hexsha": "0448b359aff9e0e784832666e4048ee01c8b082d", "max_stars_repo_licenses": ["BSD-2-Clause"],...
[STATEMENT] lemma wtpd_res: "\<lbrakk> method (G, D) (md, pTs) = Some (D, rT, (pns, lvars, blk, res)); wf_prog wf_java_mdecl G; is_class G D \<rbrakk> \<Longrightarrow> wtpd_expr (env_of_jmb G D (md, pTs)) res" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>method (G, D) (md, pTs) = Some (D, rT, pns,...
{"llama_tokens": 1071, "file": null, "length": 4}
#include "version.h" #include "githash.h" #include "fastqlib.h" #include <boost/program_options.hpp> namespace po = boost::program_options; using namespace std; string percent(int num,int den) { char buffer[100]; sprintf(buffer,"%d / %d\t( %.2f %% )\t",num,den,100. * float(num)/float(den)); return(buffer); } i...
{"hexsha": "d3c15343cc73da15a8170e4de55b1c8c26a0fc43", "size": 2104, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "mergeReads.cpp", "max_stars_repo_name": "CarolineOhrman/NxTrim", "max_stars_repo_head_hexsha": "c47acfa0a5fb086b7d470e9566490d838b7be1a7", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
{"hexsha": "071968ce2b1fa4fd3020bd516724858533f979ad", "size": 5147, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorials/language/extern_op.py", "max_stars_repo_name": "baowenlei/tvm", "max_stars_repo_head_hexsha": "6b2e18ed96fad26b4a5e5f8a6dcbedf9206c9a65", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
[STATEMENT] lemma len_Suc_mult2[simp]: "len (Suc (2 * x)) = Suc (len x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. len (Suc (2 * x)) = Suc (len x) [PROOF STEP] proof (induct x rule: len.induct) [PROOF STATE] proof (state) goal (3 subgoals): 1. len (Suc (2 * 0)) = Suc (len 0) 2. len (Suc (2 * Suc 0)) = Suc (le...
{"llama_tokens": 530, "file": "Formula_Derivatives_Presburger_Formula", "length": 4}
[STATEMENT] lemma conjuncts: "(\<forall> q\<in> set (conjuncts p). Ifm bs q) = Ifm bs p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<forall>q\<in>set (conjuncts p). Ifm bs q) = Ifm bs p [PROOF STEP] by (induct p rule: conjuncts.induct) auto
{"llama_tokens": 111, "file": null, "length": 1}
export Problem, loss, lossgrad, lossngrad, jacobian, valueandjacobian export project, normcs, sizen, sizep, predictor, prediction type Problem{L<:AbLoss, B<:AbBasis, CS<:AbConstraintSet} X :: Matrix y :: Vector loss :: L ϕ :: Type{B} Ω :: CS end Problem(X, y, l, B, ::Type{BasisL2Co...
{"hexsha": "728072f84d7ca791ae9d7966ac9f6583e7ad5159", "size": 2789, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Tproblem.jl", "max_stars_repo_name": "rakeshvar/AnyBoost.jl", "max_stars_repo_head_hexsha": "f2477b1737e8834d622b1e3b7269bd133b25e544", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10...
# STUMPY # Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license. # noqa: E501 # STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved. from collections import deque import numpy as np def atsc(IL, IR, j): """ Compute the anchored time series chain (ATSC)....
{"hexsha": "7c3e59c3a5c561399c0fb25d7ac161821c66aeb5", "size": 2625, "ext": "py", "lang": "Python", "max_stars_repo_path": "stumpy/chains.py", "max_stars_repo_name": "abbasnikbakht/stumpy", "max_stars_repo_head_hexsha": "3d0f5e165ade7dfdd4dad19ba5f71026345c551c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
[STATEMENT] lemma mono2mono: assumes "monotone ordb leq (\<lambda>y. f y)" "monotone orda ordb (\<lambda>x. t x)" shows "monotone orda leq (\<lambda>x. f (t x))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. monotone orda leq (\<lambda>x. f (t x)) [PROOF STEP] using assms [PROOF STATE] proof (prove) using this:...
{"llama_tokens": 206, "file": null, "length": 2}
import random import numpy as np class Dataset: """ A mapping from column names to immutable arrays of equal length. """ def __init__(self, **data): self._data = {} self._length = None super().__init__() for column, data in data.items(): self[...
{"hexsha": "b890ea8f1dfb10602452f7f081689d7b823747de", "size": 3250, "ext": "py", "lang": "Python", "max_stars_repo_path": "sets-master/sets-master/sets/core/dataset.py", "max_stars_repo_name": "FedericoMolinaChavez/tesis-research", "max_stars_repo_head_hexsha": "d77cc621d452c9ecf48d9ac80349b41aeb842412", "max_stars_re...
import numpy as np from PIL import Image import settings as globalv import pca_utils as pca from matplotlib import pyplot as plt import glob from matplotlib.image import imread import warnings # Disable warning: https://stackoverflow.com/questions/41001533/how-to-ignore-python-warnings-for-complex-numbers warnings.fil...
{"hexsha": "d435ebd4722f1cc05e6f21a9620ab1ae10d22ee0", "size": 2436, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw3/references/simple-PCA/image_pca.py", "max_stars_repo_name": "ardihikaru/mlsp", "max_stars_repo_head_hexsha": "db38972bcceac7b95808132457c4de9170546c9d", "max_stars_repo_licenses": ["Apache-2.0...
# Copyright (c) 2018 PaddlePaddle 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 app...
{"hexsha": "ebe820cb90ae235c4a95819f823b74afbc98e3b3", "size": 2000, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/test_executor_and_mul.py", "max_stars_repo_name": "zmxdream/Paddle", "max_stars_repo_head_hexsha": "04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c", "max_stars_repo_l...
[STATEMENT] lemma listrelp_imp_listsp1: assumes H: "listrelp (\<lambda>x y. P x) xs ys" shows "listsp P xs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. listsp P xs [PROOF STEP] using H [PROOF STATE] proof (prove) using this: listrelp (\<lambda>x y. P x) xs ys goal (1 subgoal): 1. listsp P xs [PROOF STEP] by...
{"llama_tokens": 147, "file": null, "length": 2}
\ Tools -- Formatted unsigned single hex number output, not using BASE \ an-17jan2022 decimal : .1HX ( x -- ) \ Print last digit of x in hex 15 and \ lowest nibble 9 over < 7 and + \ for A..F [char] 0 + emit ; : .NHX ( x n -- ) \ Print last n digits of x in hex ...
{"hexsha": "4d5b5b53c2995465471f1a4c2c895710faea6737", "size": 898, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Programming-Pearls/print-hex/print-hex.f", "max_stars_repo_name": "embeddingforth/embeddinForth", "max_stars_repo_head_hexsha": "b1921074c6f63be9570c7345e8196a6a4ff44b93", "max_stars_repo_licenses"...
\section{FLL} \pulpissimo containts 3 FLLs. One FLL is meant for generating the clock for the peripheral domain, one for the core domain (core, memories, event unit etc) and one is meant for the cluster. The latter is not used. All the FLLs can be bypassed by writing to the JTAG register before the reset signal is as...
{"hexsha": "9d89bd16cb0e47312906fdd60c2e049e55ed6cec", "size": 4240, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/datasheet/content/peripherals_fll.tex", "max_stars_repo_name": "davideschiavone/pulpissimo", "max_stars_repo_head_hexsha": "c0e29f22ed947ce5330d950d8432085937136e72", "max_stars_repo_licenses": ...
""" """ import numpy as np from jax import numpy as jax_np from jax import jit as jax_jit from jax import value_and_grad from ..utils import jax_inverse_sigmoid, jax_sigmoid, jax_adam_wrapper def test_inverse_sigmoid_actually_inverts(): """""" x0, k, ylo, yhi = 0, 5, 1, 0 xarr = np.linspace(-1, 1, 100) ...
{"hexsha": "a1ce5b82bd690b7cabdcd42e272af39fec6cdb32", "size": 1408, "ext": "py", "lang": "Python", "max_stars_repo_path": "diffmah/tests/test_utils.py", "max_stars_repo_name": "ArgonneCPAC/diffmah", "max_stars_repo_head_hexsha": "867d11def6284b07e58753f0d4590adc21495e3d", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# coding=utf-8 import os import re import json import numpy as np import pandas as pd import html import urllib from itertools import combinations import jieba import jieba.posseg as pseg from collections import defaultdict from .word_discoverer import WordDiscoverer from .sent_dict import SentDict from .resources impo...
{"hexsha": "142d312d20d6e08e4ea2f35c9ee1103b070ef548", "size": 44553, "ext": "py", "lang": "Python", "max_stars_repo_path": "harvesttext/harvesttext.py", "max_stars_repo_name": "wainshine/HarvestText", "max_stars_repo_head_hexsha": "391aed784d27b182cbf4e2e25d8526ee48f23377", "max_stars_repo_licenses": ["MIT"], "max_sta...
import re import numpy as np import pytest from ctc_decoder import BKTree from ctc_decoder import LanguageModel from ctc_decoder import beam_search from ctc_decoder import best_path from ctc_decoder import lexicon_search from ctc_decoder import loss from ctc_decoder import prefix_search_heuristic_split from ctc_decod...
{"hexsha": "69bfcc49dd3e50caca02368b75b9ff9469038340", "size": 2884, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_real_example.py", "max_stars_repo_name": "TenaciousC22/CTCDecoder", "max_stars_repo_head_hexsha": "8a52aa0557f41bb8674643f0a5ae8071224aec79", "max_stars_repo_licenses": ["MIT"], "max_st...
# # Variational problems # # In this example, we will numerically simulate an entropy-regularised Wasserstein gradient flow # approximating the Fokker-Planck and porous medium equations. # # The connection between Wasserstein gradient flows and (non)-linear PDEs is due to Jordan, Kinderlehrer and Otto [^JKO98], and...
{"hexsha": "d6bc7cdb078010a03f55d18fa65e3e3f10e4dba1", "size": 13544, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/variational/script.jl", "max_stars_repo_name": "zsteve/ot.jl", "max_stars_repo_head_hexsha": "a82e3fb19b00839ba809225e76a4ea43b49a315d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using HTTP using JSON export RESTAPI struct RESTAPI baseurl end function (m::RESTAPI)(cmd) try url = "$(m.baseurl)/$cmd" response = HTTP.get(url) return JSON.parse(String(response.body)) catch e return "error for $url occurred: $e" end end
{"hexsha": "692109dc3f31a4d9d9ead35eb155f30b4b74a3dc", "size": 292, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "dhonza/Loudspeakers.jl", "max_stars_repo_head_hexsha": "cae99792aaa822b4c74fe2f018e546c20784e35b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
''' Utility functions. ''' import numpy as np from functools import partial def fwht(x): """Recursive implementation of the 1D Cooley-Tukey FFT""" # x = np.asarray(x, dtype=float) N = x.shape[0] if N == 1: return x else: X_even = fwht(x[0:(N//2)]) X_odd = fwht(x[(N//2):]) ...
{"hexsha": "4f2171b61df7960f20ec78f4ff5fb57756884bb8", "size": 2236, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "aditya-sengupta/spright", "max_stars_repo_head_hexsha": "8c369c6eb33e0a677afaf039973faa11da8b458b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import os import numpy as np import tensorflow as tf import soundfile as sf from tqdm import tqdm import pandas as pd class Trainer(): def __init__(self, model, optimizer,loss, strategy, path_experiment, args): self.model=model print(self.model.summary()) ...
{"hexsha": "cdaf2225ed42997b6c0285c181a3ecb9091494ba", "size": 2378, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer.py", "max_stars_repo_name": "IgnacioIrigaray/denoising-historical-recordings", "max_stars_repo_head_hexsha": "12f3f070e6131c58fbab810e0fc33f4a2cd8fb51", "max_stars_repo_licenses": ["MIT"],...
Require Import Coq.Lists.List. Import ListNotations. Require Import Coq.Bool.Bool Coq.Strings.Ascii Coq.Strings.String. Local Open Scope string. Local Open Scope char. From SRC Require Export CStrings. (* Act II - Scene 0, Before Semirings *) Inductive regex : Type := | Eps : regex | Sy...
{"author": "mtrsk", "repo": "Regex-Play-Coq", "sha": "6f04e9299cfaa85377cf50d0470750d95abbb0b9", "save_path": "github-repos/coq/mtrsk-Regex-Play-Coq", "path": "github-repos/coq/mtrsk-Regex-Play-Coq/Regex-Play-Coq-6f04e9299cfaa85377cf50d0470750d95abbb0b9/src/EffMatching.v"}
using DynamicalSystemsBase function eom_ar1_unidir(x, p, n) a₁, b₁, c_xy, σ = (p...,) x, y = (x...,) ξ₁ = rand(Normal(0, σ)) ξ₂ = rand(Normal(0, σ)) dx = a₁*x + ξ₁ dy = b₁*y + c_xy*x + ξ₂ return SVector{2}(dx, dy) end function ar1_unidir(;uᵢ = rand(2), a₁ = 0.90693, b₁ = 0.40693, c_xy...
{"hexsha": "faf5917f642bdf0022ce4e7422362d0749b71dbb", "size": 1512, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/resampling/binning/test_bin_BinnedWeightedResampling.jl", "max_stars_repo_name": "JuliaTagBot/UncertainData.jl", "max_stars_repo_head_hexsha": "4d9dc513b97f04a1d761e0a94eab3e3b11cc4c8a", "max_...
#! format: off abstract type AbstractRegulationFormulation <: AbstractDeviceFormulation end struct ReserveLimitedRegulation <: AbstractRegulationFormulation end struct DeviceLimitedRegulation <: AbstractRegulationFormulation end get_variable_sign(_, ::Type{PSY.RegulationDevice{PSY.ThermalStandard}}, ::DeviceLimitedRe...
{"hexsha": "4105c5d7f3ca37474ddc7d0408aaca4d3d508f35", "size": 14206, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/devices_models/devices/regulation_device.jl", "max_stars_repo_name": "sambuddhac/PowerSimulations.jl", "max_stars_repo_head_hexsha": "5e485fab40dcd16d1cb4ed497b07373171ee0aa7", "max_stars_repo...