text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np import LSFIR import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons Fpass2 = 11.0 # MHz Passband end frequency Fstop2 = 15.0 #MHz Stopband start frequency Fstop1 = 5.0 Fpass1 = 4.0 Fsamp = 50.0 # MHz Sampling Frequency Weight = 100 # Weig...
{"hexsha": "8e7824bece198e7adab91a728b14ae32cf2770ab", "size": 5691, "ext": "py", "lang": "Python", "max_stars_repo_path": "LSDesignAdvanced.py", "max_stars_repo_name": "SiddhantRaman/Least-Squared-Error-Based-FIR-Filters", "max_stars_repo_head_hexsha": "0b77fd51462b49009cc6038ce37d5ee9cd413e55", "max_stars_repo_licens...
#pragma once #include <cstddef> #include <boost/config.hpp> #include <boost/version.hpp> #include <boost/utility/addressof.hpp> //! Workaround (honestly, a hack) for cases when Blackhole is being compiled with clang on systems //! with boost 1.55 on board. //! //! Stolen from https://svn.boost.org/trac/boost/ticket/...
{"hexsha": "ac1055fa95589791c8be65c92793ba5376662790", "size": 1526, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/hack/addressof.hpp", "max_stars_repo_name": "JakariaBlaine/blackhole", "max_stars_repo_head_hexsha": "e340329c6e2e3166858d8466656ad12300b686bd", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
using FFTW, Jets, JetPackTransforms, Test @testset "fft, 1D, complex" begin n = 512 m = rand(n) + im * rand(n) d = rand(n) + im * rand(n) A = JopFft(ComplexF64, n) lhs, rhs = dot_product_test(A, m, d) @test lhs ≈ rhs expected = fft(m) / sqrt(n) observed = A * m @test expected ≈ obs...
{"hexsha": "22e4d91368f1544737592a2de546d525c854bfa0", "size": 4593, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/jop_fft.jl", "max_stars_repo_name": "ChevronETC/JetPackTransforms.jl", "max_stars_repo_head_hexsha": "0609c749455d539076057796411d627fb30a8e7d", "max_stars_repo_licenses": ["MIT"], "max_stars_...
@testset "geometry.coords3d" begin @testset "cartesian3d" begin c3d = cartesian3d(float.([1 2 3; 4 5 6; 7 8 9; 10 11 12])) @test size(c3d.coords) == (4, 3) @test sum(x_components(c3d)) == 22 @test sum(y_components(c3d)) == 26 @test sum(z_components(c3d)) == 30 end end # geometry.coords3d
{"hexsha": "3a1220031958dbc40600d81198ff16fdb12fb7f2", "size": 313, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/geometry/coords3d.jl", "max_stars_repo_name": "Kelvyn88/MolecularGraph.jl", "max_stars_repo_head_hexsha": "ffe7732400dd16c7f5ddfb61972616fa6392cd8f", "max_stars_repo_licenses": ["MIT"], "max_st...
using KernelRidgeRegression using MLKernels using Base.Test using StatsBase @test GaussianKernel(3.0) == GaussianKernel(3.0) N = 5000 x = rand(1, N) * 4π - 2π yy = sinc.(x) # vec(sinc.(4 .* x) .+ 0.2 .* sin.(30 .* x)) y = squeeze(yy + 0.1randn(1, N), 1) xnew = collect(-2.5π:0.01:2.5π)' mykrr = fit(KRR, x, y, 1e-3/5...
{"hexsha": "6426a56633675db8c70ee5a76c7e558112763d3e", "size": 3106, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "mattborghi/KernelRidgeRegression.jl", "max_stars_repo_head_hexsha": "ea79e41b04672782efd01bc5d9b295adbc9d3f74", "max_stars_repo_licenses": ["MIT"], "max_s...
from collections import Iterable import numpy as np import openmdao.api as om from .constants import INF_BOUND class _ReprClass(object): """ Class for defining objects with a simple constant string __repr__. This is useful for constants used in arg lists when you want them to appear in automaticall...
{"hexsha": "6a1e8bee26acaa8b8857dd7dcbfc604a211cdafe", "size": 15392, "ext": "py", "lang": "Python", "max_stars_repo_path": "dymos/utils/misc.py", "max_stars_repo_name": "kaushikponnapalli/dymos", "max_stars_repo_head_hexsha": "3fba91d0fc2c0e8460717b1bec80774676287739", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
"""This module creates and manages a SQL database as a log for all jobs submitted via the exoctk web app. Authors ------- - Joe Filippazzo Use --- This module is intended to be imported and used within a separate python environment, e.g. :: from exoctk import log_exoctk log_exoctk....
{"hexsha": "2b4bbbea1a71882b2233d5df63416cedfe020012", "size": 6893, "ext": "py", "lang": "Python", "max_stars_repo_path": "exoctk/log_exoctk.py", "max_stars_repo_name": "bourque/exoctk", "max_stars_repo_head_hexsha": "1d2f8e7b9c00e74033626d81593b1f879b7df6ad", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* <O___,, * (see CREDITS file for the list of authors) *) (* \VV/ *********...
{"author": "Priyanka-Mondal", "repo": "Coq", "sha": "220c3eccfa5643b1ca2398d4940e29917da786d9", "save_path": "github-repos/coq/Priyanka-Mondal-Coq", "path": "github-repos/coq/Priyanka-Mondal-Coq/Coq-220c3eccfa5643b1ca2398d4940e29917da786d9/lib/plugins/setoid_ring/Ncring_polynom.v"}
import numpy as np # divide matrix by row-sums mat = np.mat([[4,2],[2,3]]) print(mat/mat.sum(axis=1)) # divide matrix by col-sums mat = np.mat([[1,2],[3,4]]) print(mat/mat.sum(axis=0))
{"hexsha": "8d483e85cdaeef8c1319120ea0d09599cceb59ee", "size": 187, "ext": "py", "lang": "Python", "max_stars_repo_path": "basic_operations.py", "max_stars_repo_name": "Valentindi/numpy_cheatsheet", "max_stars_repo_head_hexsha": "0a1ff493778caef0dab60a019adf3f3c2756e1b8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" melange_lite.py A short description of the project. Handles the primary functions """ from __future__ import division, print_function from jax import numpy as jnp import numpy as np from jax.config import config; config.update("jax_enable_x64", True) from jax import lax, ops, vmap, jit, grad, random class SMCSa...
{"hexsha": "e9246ae980d98dcbcd1c409565d1aed90a0774aa", "size": 12374, "ext": "py", "lang": "Python", "max_stars_repo_path": "melange_lite/melange_lite.py", "max_stars_repo_name": "dominicrufa/melange_lite", "max_stars_repo_head_hexsha": "0683997d7296a5d6f5a10bab1895f9b417c948c3", "max_stars_repo_licenses": ["MIT"], "ma...
import sys import json import requests import numpy as np from flask import Flask, make_response from flask import render_template from flask import Flask app = Flask(__name__) from config import consumer_key, access_token, redirect_uri @app.route("/") def hello(): resp = get_pocket_data() return render_temp...
{"hexsha": "5252ae2e4a6ee22a0580b86bde84a87de07f851e", "size": 2056, "ext": "py", "lang": "Python", "max_stars_repo_path": "pocket_stats.py", "max_stars_repo_name": "sarthak-s/Pocket-Stats", "max_stars_repo_head_hexsha": "fc41cafcd00e08f8a7dfe5b84cf4e483c81f530d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma image_filter_cartesian_product_correct: fixes f :: "'x \<times> 'y \<rightharpoonup> 'z" assumes I[simp, intro!]: "s1.invar s1" "s2.invar s2" shows "s3.\<alpha> (image_filter_cartesian_product f s1 s2) = { z | x y z. f (x,y) = Some z \<and> x\<in>s1.\<alpha> s1 \<and> y\<in>s2.\<alph...
{"llama_tokens": 2351, "file": "Collections_ICF_gen_algo_SetGA", "length": 11}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################## # The MIT License (MIT) # Copyright (c) 2020 Kevin Walchko # see LICENSE for full details ############################################## import os if 'BLINKA_MCP2221' in os.environ.keys(): pass else: os.environ['BLINK...
{"hexsha": "9e5359ac608384d43f5b66104c76955602cb45d8", "size": 679, "ext": "py", "lang": "Python", "max_stars_repo_path": "rtf_sensors/imu_serial_node.py", "max_stars_repo_name": "RecklessTedsFunland/rtf_sensors", "max_stars_repo_head_hexsha": "880e93b1a358ff3ea65f5c90949c483e52ac44c7", "max_stars_repo_licenses": ["MIT...
""" vp_overlap.py Do calculations for overlap type functionals """ import numpy as np from scipy.special import erf def vp_overlap(self): const = 2 #Calculate overlap self.E.S = self.grid.integrate((np.sum(self.na_frac, axis=1) * np.sum(self.nb_frac, axis=1))**(0.5)) self.E.F = erf( const * self.E.S...
{"hexsha": "9313a0b57d0151eb9f07f972b2d8e498359a38d7", "size": 1399, "ext": "py", "lang": "Python", "max_stars_repo_path": "CADMium/partition/vp_overlap.py", "max_stars_repo_name": "VHchavez/CADMium", "max_stars_repo_head_hexsha": "39f3bd63ca69502a80c677855da72f9e691b57e2", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
using Documenter, GigaSOM makedocs(modules = [GigaSOM], clean = false, format = Documenter.HTML(prettyurls = !("local" in ARGS), canonical = "https://lcsb-biocore.github.io/GigaSOM.jl/stable/", assets = ["assets/gigasomlogotransp.ico"]), sitename = "GigaSOM.jl", ...
{"hexsha": "bd306d13d75e1753f8406dda0c1067fe419ea7a1", "size": 904, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "UnofficialJuliaMirror/GigaSOM.jl-a03a9c34-069e-5582-a11c-5c984cab887c", "max_stars_repo_head_hexsha": "e229624c78f170fb20389f619f820e676971c7ec", "max_stars_re...
module AutoOffload using LinearAlgebra, AbstractFFTs, FFTW @static if Base.find_package("CuArrays") !== nothing using CuArrays if Float64(CuArrays.CUDAdrv.totalmem(first(CuArrays.CUDAdrv.devices()))) > 1e9 @info("CUDA support found, automatic GPU acceleration will be enabled.") const GPU_SUPPO...
{"hexsha": "d085eb4fd9bf3844a6816e8748ce1198cdbba1cc", "size": 1946, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AutoOffload.jl", "max_stars_repo_name": "ChrisRackauckas/AutoOffload.jl", "max_stars_repo_head_hexsha": "b649a6abff31aa20a4253ea4ca070a89ada27452", "max_stars_repo_licenses": ["MIT"], "max_star...
import gc import copy from inferelator import utils from inferelator.single_cell_workflow import SingleCellWorkflow from inferelator.regression.base_regression import _RegressionWorkflowMixin import numpy as np # These are required to run this module but nothing else # They are therefore not package dependencies imp...
{"hexsha": "0b11272689a4bf1aac8b8223c8c9a5d36a24d361", "size": 4897, "ext": "py", "lang": "Python", "max_stars_repo_path": "inferelator/benchmarking/celloracle.py", "max_stars_repo_name": "Xparx/inferelator", "max_stars_repo_head_hexsha": "2a33c741c4ba7a6bf3d18a3c14d583af0e0705e8", "max_stars_repo_licenses": ["BSD-2-Cl...
using TupleTools, Base.Cartesian export loop_einsum, loop_einsum!, allow_loops """ loop_einsum(::EinCode, xs, size_dict) evaluates the eincode specified by `EinCode` and the tensors `xs` by looping over all possible indices and calculating the contributions ot the result. Scales exponentially in the number of dis...
{"hexsha": "b6a4cec9db9a5c5a6a84f2d59ffd95f4bb15887b", "size": 2075, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/loop_einsum.jl", "max_stars_repo_name": "kshyatt/OMEinsum.jl", "max_stars_repo_head_hexsha": "dd42a5c365f56d50a1a744b4e390671c0a3c4905", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# ---------------------------------------------------------------------------------- # # Presenting Word Frequency Results # ---------------------------------------------------------------------------------- import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as ...
{"hexsha": "067e4e8f0cbcbfb94893c4ff3afeaa230e52073a", "size": 1801, "ext": "py", "lang": "Python", "max_stars_repo_path": "BurnieYilmazRS19/8_PresentRelativeFrequency.py", "max_stars_repo_name": "Charles0009/crypto_finance_analysis", "max_stars_repo_head_hexsha": "028938afabf0e9fbf352e8136acdc5d9753ba56d", "max_stars_...
#include "stdafx.h" #include <boost/test/unit_test.hpp> #include <boost/filesystem.hpp> #include "ExternalSourceModule.h" #include "ExternalSinkModule.h" #include "FileReaderModule.h" #include "FrameMetadata.h" #include "Frame.h" #include "Logger.h" #include "AIPExceptions.h" #include "FramesMuxer.h" #include "test_u...
{"hexsha": "c810164cd944fe2368bc5104cdf785b270dac663", "size": 5466, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "base/test/task_test.cpp", "max_stars_repo_name": "shrikant-pattawi/ApraPipes", "max_stars_repo_head_hexsha": "5d9ed8f00b924cd03bc1d27871ab56bd5b433022", "max_stars_repo_licenses": ["MIT"], "max_star...
import os import glob import pickle import re # Our numerical workhorses import numpy as np import pandas as pd # Import the project utils import sys sys.path.insert(0, '../') # Import matplotlib stuff for plotting import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from IPython.core.pylabto...
{"hexsha": "e3034310bcb1ad9ecf80101651c9dc594d1b45d7", "size": 23200, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/figures/fig2_knowngenes_matrices_logos.py", "max_stars_repo_name": "RPGroup-PBoC/sortseq_belliveau", "max_stars_repo_head_hexsha": "ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2", "max_stars_repo...
"""Implementation for the linear binning procedure.""" from typing import Tuple from numba import njit import numpy as np from kernreg.funcs_to_jit import include_weights_from_endpoints include_weights_from_endpoints_jitted = njit(include_weights_from_endpoints) def linear_binning( x: np.ndarray, y: np.nd...
{"hexsha": "4c169b09edc224897b5b09a2fd03c8df564de4ef", "size": 3294, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/kernreg/linear_binning.py", "max_stars_repo_name": "segsell/kernreg", "max_stars_repo_head_hexsha": "2a8c4e73a42994fa6331ca49de8bc3d11a9f7a74", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\documentclass{article} \title{SigViz: real-time signal visualizer for MCEs} \author{Lorenzo Minutolo \\ California Institute of Technology \\ \and Sofia Fatigoni \\ University of British Columbia \\ } \date{\today} \begin{document} \maketitle \tableofcontents \newpage \section{About this document}\label{abo...
{"hexsha": "a968ceb9e04bcaf207ad4a49d3f4ef09345eec5f", "size": 1133, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/Technical_doc.tex", "max_stars_repo_name": "LorenzoMinutolo/SigViz", "max_stars_repo_head_hexsha": "9cf85dcb8d8cf1bd04e4c808396fc24efb530d7c", "max_stars_repo_licenses": ["MIT"], "max_...
@testset "1637.widest-vertical-area-between-two-points-containing-no-points.jl" begin @test max_width_of_vertical_area([[8,7],[9,9],[7,4],[9,7]]) == 1 @test max_width_of_vertical_area([[3,1],[9,0],[1,0],[1,4],[5,3],[8,8]]) == 3 end
{"hexsha": "f8fe19696f5d0bb5a16819c0389a2a696dc2d87e", "size": 239, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/problems/1637.widest-vertical-area-between-two-points-containing-no-points.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07a...
[STATEMENT] lemma repv_selectlike_other: "x\<noteq>y \<Longrightarrow> (repv \<omega> x d \<in> selectlike X \<omega> {y}) = (repv \<omega> x d \<in> X)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<noteq> y \<Longrightarrow> (repv \<omega> x d \<in> selectlike X \<omega> {y}) = (repv \<omega> x d \<in> X) [PR...
{"llama_tokens": 1574, "file": "Differential_Game_Logic_Coincidence", "length": 12}
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
{"hexsha": "5d72c028f940a572d30d1f281a2834c7306ccf5d", "size": 9273, "ext": "py", "lang": "Python", "max_stars_repo_path": "monai/handlers/utils.py", "max_stars_repo_name": "dylanbuchi/MONAI", "max_stars_repo_head_hexsha": "1651f1b003b0ffae8b615d191952ad65ad091277", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
MODULE NWTC_Num ! This module contains numeric-type routines with non-system-specific logic and references. ! It contains the following routines: ! SUBROUTINE AddOrSub2Pi ( OldAngle, NewAngle ) ! SUBROUTINE BSortReal ( RealAry, NumPts ) ! FUNCTION CROSS_PRODUCT ( Vector1, Vector2...
{"hexsha": "2727954b7dfb70f50f254d37f7c485948ba3d6c6", "size": 49558, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/WT_Perf/v3.05.00a-adp/Source/NWTC_Subroutine_Library/NWTC_Lib_v1.05.00/source/NWTC_Num.f90", "max_stars_repo_name": "NREL/HARP_Opt", "max_stars_repo_head_hexsha": "5a00d0adb34af1c412ed05...
# -*- coding: utf-8 -*- # This Program import time import h5py import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from keras.layers import Input, ZeroPadding2D, Conv2D, BatchNormalization, Activation, Flatten, Dense from keras.layers import MaxPooling2D from keras.models import Model def F1S...
{"hexsha": "8aace6f15ac7195403e3ee9ddc4b6eb1d2a5a4ca", "size": 7550, "ext": "py", "lang": "Python", "max_stars_repo_path": "L_layer_ConvNet_keras/L_layer_ConvNet_keras.py", "max_stars_repo_name": "HerrHuber/L_layer_ConvNet_keras", "max_stars_repo_head_hexsha": "3b0b80a446fd60ef3215ab19de5a8d0d96e9f4b5", "max_stars_repo...
""" Basic of linear algebra. """ import numpy as np a = np.array([[1.,2.],[3.,4.]]) print(a) print(np.transpose(a)) print(np.linalg.det(a.transpose())) print(np.linalg.inv(a)) print(np.trace(a)) print(np.eye(3)) # identity matrix y = np.array([[3.],[7.]]) print(np.linalg.solve(a,y)) # solve x+2y==3 && 3x+4y==7 print(n...
{"hexsha": "41961a2f6df2d41556490ec51f400fb7ab1dbdb8", "size": 394, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy/np_ex006.py", "max_stars_repo_name": "rpoliselit/python-for-dummies", "max_stars_repo_head_hexsha": "d6f45a966a5238058953f93d8660832fa692b3d4", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import pickle import numpy as np import tensorflow as tf import PIL.Image import pandas as pd import os import sys import argparse import PIL import os import glob import numpy as np import tensorflow as tf import tfutil #---------------------------------------------------------------------------- #...
{"hexsha": "32d49dadc3cf206158d3d1f462f78b735b5b132a", "size": 14392, "ext": "py", "lang": "Python", "max_stars_repo_path": "GAN_cpd/inference.py", "max_stars_repo_name": "AugustDS/extd_med_benchmark", "max_stars_repo_head_hexsha": "3dc4f5c00ba98f79c70336ec7a5723586c145231", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @author: Wesley # @time: 2020-12-11 10:47 import os import cv2 import torch from models.unet import UNet from torchvision import transforms import numpy as np device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') net = UNet(1, 1).to(device) weight = r'...
{"hexsha": "592053af1fab1c1da7ba5ad2b44bb83a16df92ba", "size": 1252, "ext": "py", "lang": "Python", "max_stars_repo_path": "detect.py", "max_stars_repo_name": "Wesley-Tse/Road-Detection", "max_stars_repo_head_hexsha": "c3b444287d9b41ccc4234e737e4421b5d1b3c3da", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
[STATEMENT] lemma raw_has_prod_Suc: "raw_has_prod f (Suc M) a \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. raw_has_prod f (Suc M) a = raw_has_prod (\<lambda>n. f (Suc n)) M a [PROOF STEP] unfolding raw_has_prod_def [PROOF STATE] proof (prove) goal ...
{"llama_tokens": 256, "file": null, "length": 2}
import k3d import numpy as np import pytest from .plot_compare import * import vtk from vtk.util import numpy_support def test_volume(): prepare() reader = vtk.vtkXMLImageDataReader() reader.SetFileName('./test/assets/volume.vti') reader.Update() vti = reader.GetOutput() x, y, z = vti.GetDim...
{"hexsha": "b3c1ea3f11a54176fccf5036edd7c8a78af34862", "size": 1558, "ext": "py", "lang": "Python", "max_stars_repo_path": "k3d/test/test_visual_volume.py", "max_stars_repo_name": "mjpolak/K3D-jupyter", "max_stars_repo_head_hexsha": "539c53cab580d55b8841bb87589ab3d4cf95bdb0", "max_stars_repo_licenses": ["MIT"], "max_st...
function cross_map(r::MersenneTwister) map = YAML.load_file("maps/cross.yaml") exits = [(4, 1), (1, 4), (4, 7), (7, 4)] start = rand(r, exits) exit = rand(r, setdiff(exits, [start])) map["starts"] = [Dict("x"=>start[2], "y"=>start[1])] map["exits"] = [Dict("x"=>exit[2], "y"=>exit[1])] push!(...
{"hexsha": "668721f73bc4f74930af4697d897d3c1b7050a20", "size": 1728, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/fitness/cross.jl", "max_stars_repo_name": "d9w/RoboGrid.jl", "max_stars_repo_head_hexsha": "e217adfa3e8351017746d4fede8399e92ba5df73", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Sep 11 13:30:53 2017 @author: laoj """ import numpy as np import pymc3 as pm import theano.tensor as tt from pymc3.distributions.distribution import Discrete, draw_values, generate_samples, infer_shape from pymc3.distributions.dist_math import bound, lo...
{"hexsha": "81977d254cadb7ee5093cb2ff32e221394f8fe36", "size": 8455, "ext": "py", "lang": "Python", "max_stars_repo_path": "Miscellaneous/test_script_pymc3/multinominal.py", "max_stars_repo_name": "junpenglao/Planet_Sakaar_Data_Science", "max_stars_repo_head_hexsha": "73d9605b91b774a56d18c193538691521f679f16", "max_sta...
# -*- coding: utf-8 -*- """ gyroid.util =========== """ import numpy as np import scipy.io import matplotlib.pyplot as plt from matplotlib import colors from mayavi import mlab from .unitcell import UnitCell from .group import Group from .grid import Grid from .basis import Basis __all__ = [ "render_structure_1...
{"hexsha": "8637d27fa89e08b1d8e3302b9ac28265984d4669", "size": 8527, "ext": "py", "lang": "Python", "max_stars_repo_path": "gyroid/util.py", "max_stars_repo_name": "liuyxpp/liuyxpp-gyroid", "max_stars_repo_head_hexsha": "7db91cb140869760124a66239773822bc2cd4e44", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
// Copyright 2004-present Facebook. All Rights Reserved. #include "fboss/agent/hw/sai/fake/FakeSaiInSegEntry.h" #include <boost/functional/hash.hpp> namespace facebook::fboss { FakeSaiInSegEntry::FakeSaiInSegEntry(sai_inseg_entry_t other_sai_inseg_entry) { sai_inseg_entry.switch_id = other_sai_inseg_entry.switch_...
{"hexsha": "9cf71b6007b6625beac7bb677f425191c9e0480c", "size": 977, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "fboss/agent/hw/sai/fake/FakeSaiInSegEntry.cpp", "max_stars_repo_name": "nathanawmk/fboss", "max_stars_repo_head_hexsha": "9f36dbaaae47202f9131598560c65715334a9a83", "max_stars_repo_licenses": ["BSD-3...
import tensorflow as tf import numpy as np from .data_aug import get_data_aug_fn AUTOTUNE = tf.data.experimental.AUTOTUNE def get_cifar10_data(batch_size, data_aug, train_data_size=None, repeat=True, shuffle=True, shuffle_size=None): train_data, test_data = tf.keras.datasets.cifar10.load_data() train...
{"hexsha": "eb66fb1c457596cf72448d93fab105bf973ddb31", "size": 1490, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/cifar10.py", "max_stars_repo_name": "SeanJia/InfoMCR", "max_stars_repo_head_hexsha": "2b4760ad6ffdd98859fea1967eb1b8aa7e51be52", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, ...
########################################################### ## reading and saving data # ########################################################### ## Copyright (c) 2018, National Institute of Informatics # ## Author: Fuming Fang # ## Affiliation: Nat...
{"hexsha": "8e2bf82ff96feffee1a5763c2a2125411edcdab8", "size": 4527, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataio.py", "max_stars_repo_name": "entn-at/lcnn", "max_stars_repo_head_hexsha": "797d8847fad6d1179866ac2d7d7402240483123b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 15, "ma...
#!/usr/bin/env python """ Test the Iron Component code. This code can be run from teh command line: > python test_fe.py --datafile /user/jotaylor/git/spamm//Data/FakeData/Iron_comp/fakeFe1_deg.dat --redshift 0.5 """ import os import datetime import numpy as np import time import argparse import glob from utils.pars...
{"hexsha": "d268f8ab3448d4f6983a6707ce15fd953a7f9230", "size": 3947, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/run_hg.py", "max_stars_repo_name": "jotaylor/SPAMM", "max_stars_repo_head_hexsha": "3087269cb823d6f4022ebf1dd75d920dee7c1cc0", "max_stars_repo_licenses": ["BSD-3-Clause-Clear"], "max_star...
#!/usr/bin/env python # # This program shows how to use mpi_comm_split # import numpy from numpy import * from mpi4py import MPI import sys def myquit(mes): MPI.Finalize() print(mes) sys.exit() comm=MPI.COMM_WORLD myid=comm.Get_rank() numprocs=comm.Get_size() print("hello from ",myid," of ",...
{"hexsha": "37997b0501408b7c09511c93a6816d8d8be6e15b", "size": 2011, "ext": "py", "lang": "Python", "max_stars_repo_path": "array/bot/others/P_ex12.py", "max_stars_repo_name": "timkphd/examples", "max_stars_repo_head_hexsha": "04c162ec890a1c9ba83498b275fbdc81a4704062", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
from glob import iglob import numpy as np import matplotlib.pyplot as plt import scipy import random from scipy import ndimage from scipy import signal from scipy import interpolate from scipy import fft import audio.segment as seg import audio.utils as utils # https://en.wikipedia.org/wiki/Short-time_Fo...
{"hexsha": "c9b3742bac0dbfcda040f7311df14c69ce0bbbe6", "size": 22007, "ext": "py", "lang": "Python", "max_stars_repo_path": "voice.py", "max_stars_repo_name": "tednoob/RePhase", "max_stars_repo_head_hexsha": "3b9a30018682463bcdd6029be491cb1f7129c048", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
subroutine setprob() implicit none double precision pi, pi2 common /compi/ pi,pi2 double precision uvel, vvel common /comvelocity/ uvel, vvel open(10,file='setprob.data') read(10,*) uvel read(10,*) vvel close(10) pi = 4.d0*datan(1.d0) pi2 = 2.d...
{"hexsha": "9ff6495a9c859650a73900576ee898ba21fa626b", "size": 337, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "applications/clawpack/advection/2d/periodic/setprob.f", "max_stars_repo_name": "ECLAIRWaveS/ForestClaw", "max_stars_repo_head_hexsha": "0a18a563b8c91c55fb51b56034fe5d3928db37dd", "max_stars_repo_li...
# -*- coding:utf-8 -*- import tensorflow as tf import numpy as np import os import sys import pickle import datetime import matplotlib.pyplot as plt from readthyroid import * # 874 1840 img_channels = 1 iterations = 40 batch_size = 46 total_epoch = 150 test_iterations = 59 test_size = 46 weight_decay = 0.0003 dropout_...
{"hexsha": "9850ad17028fa7edc4c6430bd8006797f2c6f8ae", "size": 17190, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/g_load_vgg.py", "max_stars_repo_name": "Stomach-ache/semi-MList", "max_stars_repo_head_hexsha": "ce694a4eb831c3e7d1d727678b8b46d71efc628e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import matplotlib.pyplot as plt import pandas as pd import numpy as np from matplotlib.ticker import PercentFormatter data = pd.read_csv('C:\\Users\\stewue\\OneDrive - Wuersten\\Uni\\19_HS\\Masterarbeit\\Repo\\Evaluation\\RQ1_Results\\aggregated\\numberofbenchmarks.csv',dtype='str') numberOf = data['benchmarks'].asty...
{"hexsha": "5530349f6bf0569e4941c3b5590ca9908cafd079", "size": 1497, "ext": "py", "lang": "Python", "max_stars_repo_path": "RQ1_Python/number_of_benchmarks.py", "max_stars_repo_name": "stewue/masterthesis-evaluation", "max_stars_repo_head_hexsha": "0fb825e196f386c628f95524aa9c80af2126617e", "max_stars_repo_licenses": [...
> module EscardoOliva.TestSelectionFunction > import EscardoOliva.SelectionFunction > %default total > %access public export > %auto_implicits off > xs : List Int > xs = [0,3,2,-1,0,9,-7] > min : Int > min = arginf xs id > max : Int > max = argsup xs id
{"hexsha": "b6cfc59d6ab92ebc98770bd7bc5ebd04b6f8b4d8", "size": 260, "ext": "lidr", "lang": "Idris", "max_stars_repo_path": "EscardoOliva/TestSelectionFunction.lidr", "max_stars_repo_name": "zenntenn/IdrisLibs", "max_stars_repo_head_hexsha": "a81c3674273a4658cd205e9bd1b6f95163cefc3e", "max_stars_repo_licenses": ["BSD-2-...
! -*- Mode: Fortran; -*- ! ! (C) 2014 by Argonne National Laboratory. ! See COPYRIGHT in top-level directory. ! subroutine MPI_Comm_spawn_multiple_f08(count, array_of_commands, array_of_argv, array_of_maxprocs, & array_of_info, root, comm, intercomm, array_of_errcodes, ierror) use, intrinsic :: iso_c_bind...
{"hexsha": "ff6d80c2109a76cd86a0a971a39058cb4b53180d", "size": 3295, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_multiple_f08ts.f90", "max_stars_repo_name": "humairakamal/FG-MPI", "max_stars_repo_head_hexsha": "a0181ecde8a97e60ab6721a5e9a74dc7e7f77e77",...
module CommonUtils using Caesar using Images using FileIO using Cairo using RoMEPlotting export plotSLAM2D_KeyAndSim, plotHMSLevel @deprecate buildDEMSimulated(w...;kw...) RoME.generateField_CanyonDEM(w...;kw...) @deprecate getSampleDEM(w...;kw...) RoME.generateField_CanyonDEM(w...;kw...) @deprecate loadDEM!(w...;k...
{"hexsha": "b64d19a5394b0c37409182f27599009d87a13a4e", "size": 1060, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/dev/scalar/CommonUtils.jl", "max_stars_repo_name": "nkhedekar/Caesar.jl", "max_stars_repo_head_hexsha": "647ab1a9a068e9eb9ff2de36e12e86b7b77878bb", "max_stars_repo_licenses": ["MIT"], "max...
''' Navigation Network, Written by Xiao For robot localization in a dynamic environment. ''' import numpy as np from lib.params import ADJACENT_NODES_SHIFT_GRID ACTION_ENCODING = dict(left=np.array([1,0,0]), right=np.array([0,1,0]), forward=np.array([0,0,1])) ACTION_CLASSNUM = len(ACTION_ENCODING) # dimension of actio...
{"hexsha": "e31b2422fabc05a7b29a0b38710d197ec531787b", "size": 2094, "ext": "py", "lang": "Python", "max_stars_repo_path": "Network/navigation_network/params.py", "max_stars_repo_name": "XiaoLiSean/Cognitive-Map", "max_stars_repo_head_hexsha": "6b2019e5b3a46902b06c8d5d1e86b39425042de9", "max_stars_repo_licenses": ["MIT...
# Code made for Sergio Andrés Díaz Ariza # 05 Abril 2021 # License MIT # Introduction to Control: Python Program Assignment 1 import numpy as np import matplotlib.pyplot as plt from scipy import signal import control as co import sympy as sp import seaborn as sns sns.set() # Define Transafer Function G1 = co.tf([1...
{"hexsha": "fe02a501afa053332d8f21f43074b9f411460beb", "size": 2084, "ext": "py", "lang": "Python", "max_stars_repo_path": "First_Order/2.4_Taller_1_Sistemas_Lneales.py", "max_stars_repo_name": "Daz-Riza-Seriog/I_Control", "max_stars_repo_head_hexsha": "d4568f67d735fa5dab619e006fd29c31ce5248ea", "max_stars_repo_license...
# Copyright 2018 The TensorFlow 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 applica...
{"hexsha": "44ea23998fe6f3b614fb09b9667add179cf3fd85", "size": 3567, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/keras/engine/training_utils_test.py", "max_stars_repo_name": "aeverall/tensorflow", "max_stars_repo_head_hexsha": "7992bf97711919f56f80bff9e5510cead4ab2095", "max_stars_repo_lice...
from collections import defaultdict import dolfin as df import numpy as np from xii.meshing.embedded_mesh import EmbeddedMesh class SubDomainMesh(EmbeddedMesh): '''Embedded mesh for cell funcions.''' def __init__(self, marking_function, markers): assert marking_function.dim() == marking_function.mesh...
{"hexsha": "2a690a868b514886a414ac3e9eeb5e8a61b0b443", "size": 4855, "ext": "py", "lang": "Python", "max_stars_repo_path": "xii/meshing/subdomain_mesh.py", "max_stars_repo_name": "MiroK/fenics_ii", "max_stars_repo_head_hexsha": "58c41f0e8dba720962830395851e081b057269cc", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
//---------------------------------------------------------------------------// //! //! \file MonteCarlo_CollisionHandler.hpp //! \author Alex Robinson //! \brief Collision handler class declaration //! //---------------------------------------------------------------------------// #ifndef MONTE_CARLO_COLLISION_HAN...
{"hexsha": "52cf894dfe507bd04391bfceb0942b156e4ef331", "size": 5414, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "packages/monte_carlo/collision/native/src/MonteCarlo_CollisionHandler.hpp", "max_stars_repo_name": "lkersting/SCR-2123", "max_stars_repo_head_hexsha": "06ae3d92998664a520dc6a271809a5aeffe18f72", "ma...
import numpy as _np from ._sum_inplace import sum_inplace as _sum_inplace from netket.utils import ( mpi_available as _mpi_available, n_nodes as _n_nodes, MPI_comm as MPI_comm, ) if _mpi_available: from netket.utils import MPI def subtract_mean(x, axis=None): """ Subtracts the mean of the in...
{"hexsha": "81c255c16e85badded9d8486baafeabb91b3bf1a", "size": 2171, "ext": "py", "lang": "Python", "max_stars_repo_path": "netket/stats/mpi_stats.py", "max_stars_repo_name": "ChenAo-Phys/netket", "max_stars_repo_head_hexsha": "df3735993962ca6318dee0b86a5d15a9d37c9881", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
"""Tests pathless_data_processor.py.""" import numpy as np from mlops.dataset.pathless_data_processor import PathlessDataProcessor PRESET_RAW_FEATURES = np.array( [ [10, 20, 30, 40], [0, 20, 40, 50], [10, 20, 20, 60], [20, 20, 50, 70], [10, 20, 10, 80], [10, 20, 60,...
{"hexsha": "da6a32d4234a3fde236dfb082927572c34c51f1b", "size": 2206, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/dataset/test_pathless_data_processor.py", "max_stars_repo_name": "kostaleonard/mlops", "max_stars_repo_head_hexsha": "236d3499535d6294768c15336180217829fb2ee3", "max_stars_repo_licenses": ["...
from functools import reduce import numpy as np import pandas as pd import scipy.stats as scs import matplotlib.pyplot as plt from standard_precip.lmoments import distr class BaseStandardIndex(): ''' Calculate the SPI or SPEI index. A user specified distribution is fit to the precip data. The CDF of thi...
{"hexsha": "3559db93e7d90401a23ec013514b0456613a4ac8", "size": 10213, "ext": "py", "lang": "Python", "max_stars_repo_path": "standard_precip/base_sp.py", "max_stars_repo_name": "e-baumer/standard_precip", "max_stars_repo_head_hexsha": "8945ba399a3493464a860b9901d648bdecc86354", "max_stars_repo_licenses": ["Apache-2.0"]...
# Números complexos Neste notebook exploramos alguns aspectos dos números complexos. Especialmente, vamos falar da interferência entre duas ondas da mesma frequência. Vimos nas aulas passadas que uma função cossenoidal geral, expressa por: \begin{equation} x(t) = \mathrm{Re}\left\{A\mathrm{e}^{-\mathrm{j}\phi} \ \m...
{"hexsha": "6f3cc8582c51b2fc73ea188182d50e158c157086", "size": 233764, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Aula 7 - Numeros complexos/Numeros complexos.ipynb", "max_stars_repo_name": "RicardoGMSilveira/codes_proc_de_sinais", "max_stars_repo_head_hexsha": "e6a44d6322f95be3ac288c6f1bc4f7cf...
import LinearAlgebra, Distributions, Random, Statistics, DataFrames """ simulate_coefs_correlation(coefs_mean::Number=0.1; coefs_sd::Number=0.1, n::Int=10) Generate a vector of random correlation coefficients from a normal distribution. # Arguments - `coefs_mean::Number`: Mean of the normal distribution from ...
{"hexsha": "ac80c44413ce8fd979999b5150c9e9089670375d", "size": 3577, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/simulate/data_correlation.jl", "max_stars_repo_name": "neuropsychology/Psycho.jl", "max_stars_repo_head_hexsha": "ec812f48ff520588e36d833ce124572dc7ff585c", "max_stars_repo_licenses": ["MIT"], ...
! C function declarations type, bind(C) :: float3 real(kind = 4) :: x, y, z end type interface function create_npcf_c(timesRans, numShells, volBox, rMin, rMax) bind(C, name="create_npcf") use iso_c_binding implicit none type(c_ptr) :: create_npcf_c integer(c_int), value :: time...
{"hexsha": "827bfd8a26cd57dae77befd5581fcdf5de586a20", "size": 3185, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/ganpcf_cdef.f90", "max_stars_repo_name": "dpearson1983/ganpcf", "max_stars_repo_head_hexsha": "d75fddfb094045a81916ffed10fec19d96b6d52e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import os import copy import argparse import numpy as np from tqdm import tqdm from sklearn.cluster import KMeans from plyfile import PlyData, PlyElement def parse_args(): parser = argparse.ArgumentParser(description='Keypoints generator') parser.add_argument('--dataset', default='hinterstoisser', ...
{"hexsha": "6d007c8748b99d3496325f0b70ab850b0ac0c2cb", "size": 4322, "ext": "py", "lang": "Python", "max_stars_repo_path": "kps/kp.py", "max_stars_repo_name": "qingchenkanlu/6dpose-genedata", "max_stars_repo_head_hexsha": "fbf973208eabdf11efd8bb384b1bc74963328193", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import sys import os import pytest THIS_DIR = os.path.dirname(os.path.abspath(__file__)) recordings_path = os.path.join(THIS_DIR, os.pardir, '../res/data/') from src.music.score import Pieces from src.model.model import Model LENGTH_THRESHOLD = 3 @pytest.mark.parametrize("piece,tempo,recording",...
{"hexsha": "e25f127b66fa0bc0ae3adfe429b50600a6d403a4", "size": 1473, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/integration/test_model.py", "max_stars_repo_name": "dartmouth-cs98/20w-ensemble-vr-score-following", "max_stars_repo_head_hexsha": "3effbb47ac48580666a6642734c3738f4e3b427d", "max_stars_repo_...
# # Copyright (c) European Molecular Biology Laboratory (EMBL) # # 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, m...
{"hexsha": "b27cd925d65f801e8931e5fc4d0c74ad92ed55b5", "size": 11166, "ext": "py", "lang": "Python", "max_stars_repo_path": "edna2/lib/autocryst/src/Image.py", "max_stars_repo_name": "gsantoni/edna2", "max_stars_repo_head_hexsha": "0aad63a3ea8091ce62118f0b2c8ac78a2286da9e", "max_stars_repo_licenses": ["CC0-1.0", "MIT"]...
# Autogenerated wrapper script for GnuPG_jll for i686-linux-gnu export dirmngr, dirmngr_client, gpg, gpg_agent, gpg_connect_agent, gpgconf, gpgscm, gpgsm, gpgtar, gpgv, kbxutil using GnuTLS_jll using Libksba_jll using Libgcrypt_jll using Libgpg_error_jll using nPth_jll using Zlib_jll using Libassuan_jll using OpenLDAP...
{"hexsha": "928e2b0b1ae25163f18d4a5a4c060df0034881e4", "size": 2262, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/i686-linux-gnu.jl", "max_stars_repo_name": "JuliaBinaryWrappers/GnuPG_jll.jl", "max_stars_repo_head_hexsha": "edb5da03c4efeee73499d507001b3043197501d8", "max_stars_repo_licenses": ["MI...
taskid(t=current_task()) = string(hash(t) & 0xffff, base=16, pad=4) debug_header() = string("DEBUG: ", rpad(Dates.now(), 24), taskid(), " ") macro debug(n::Int, s) DEBUG_LEVEL[] >= n ? :(println(debug_header(), $(esc(s)))) : :() end macro debugshow(n::Int, s) DEBUG_LEVEL[] >= n ? :(p...
{"hexsha": "88e1cd563ad2f88cee0d43eb37786e8b854f8ceb", "size": 3305, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/debug.jl", "max_stars_repo_name": "c42f/URIs.jl", "max_stars_repo_head_hexsha": "a4c725b5090b21bed5cf6ca37cff196d80f32d1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 514, "max_star...
# Copyright 2019 Pascal Audet & Helen Janiszewski # # This file is part of OBStools. # # 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 ri...
{"hexsha": "df0c5104a35c06bf09fc3cde10b096023e65d824", "size": 13729, "ext": "py", "lang": "Python", "max_stars_repo_path": "obstools/comply/classes.py", "max_stars_repo_name": "paudetseis/OBStools", "max_stars_repo_head_hexsha": "c6c02d8864c25a14f22d1fae17ff5ad911b9ff00", "max_stars_repo_licenses": ["MIT"], "max_stars...
# I/O helper functions on text files .b = import('../base', attach_operators = FALSE) #' Add \code{ext}ension parameter to \link{\code{base::file.path}} file_path = function (..., ext = NULL, fsep = .Platform$file.sep) { dots = list(...) if (! is.null(ext)) { ilast = length(dots) dots[ilast] = ...
{"hexsha": "2233457b7d12a1da78cf26e1fac8ff051b9dad62", "size": 2238, "ext": "r", "lang": "R", "max_stars_repo_path": "io/text.r", "max_stars_repo_name": "mschubert/ebits", "max_stars_repo_head_hexsha": "e9c4a3d883fb9fbcbfd4689becca0fe2e5cbdbe5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "max_star...
import numpy as np import torch from utils import Tokenizer embed_size = 300 def create_embedding_matrix(tokenizer, embedding_file): """ Load pretrained embedding and output the npy contains the pretrained vectors """ embeddings_index = {} with open(embedding_file, encoding='utf8') as f: f...
{"hexsha": "d4c90ea9d3acd0798b9a949145e5e2c30c4e9776", "size": 1598, "ext": "py", "lang": "Python", "max_stars_repo_path": "create_embedding_matrix.py", "max_stars_repo_name": "ngthanhtin/VLSP_ImageCaptioning", "max_stars_repo_head_hexsha": "46a2b430cc07c444fb69609a8c06670de2db8c36", "max_stars_repo_licenses": ["MIT"],...
import json import numpy as np import re from collections import defaultdict as dd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import HashingVecto...
{"hexsha": "9ada6536d35ac6100be6130e7a182a5f59d251e5", "size": 2098, "ext": "py", "lang": "Python", "max_stars_repo_path": "allthree.py", "max_stars_repo_name": "abigailyuan/LIDproj", "max_stars_repo_head_hexsha": "3e34c4d78b89c9513182ab064dc4b3858f59a1d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import params import category_theory.category.basic import category_theory.core open params open category_theory namespace operations variable [category (bitvec word_len)] /-! # Operations Building blocks operations. The salsa20 cipher is built fully with add-rotate-XOR operations. ## Building blocks o...
{"author": "oxarbitrage", "repo": "salsa20", "sha": "12d0ebb3c27801931e61d470fb2ed548a5562578", "save_path": "github-repos/lean/oxarbitrage-salsa20", "path": "github-repos/lean/oxarbitrage-salsa20/salsa20-12d0ebb3c27801931e61d470fb2ed548a5562578/src/operations.lean"}
function to_non_normal(l::Vector{FieldsTower}, G::GAP.GapObj, deg::Int) for x in l assure_automorphisms(x) assure_isomorphism(x, G) end lC = GAP.Globals.ConjugacyClassesSubgroups(G) ind = 0 for i = 1:length(lC) r = GAP.Globals.Representative(lC[i]) if GAP.Globals.Size(r) == divexact(degree(l[1...
{"hexsha": "79f271864c92bfdb72e56f3ebb7c168bbdcc6174", "size": 2950, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FieldFactory/non_normal.jl", "max_stars_repo_name": "lgoe-ac/Hecke.jl", "max_stars_repo_head_hexsha": "27a6f75d0174a9e3db2480e1f835f62ae65befc6", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # @file aggregate_output.py # # @brief Aggregates multiple EINSim outputs into one coalesced file # # @author Minesh Patel # Contact: minesh.patelh@gmail.com import sys import os import argparse import random import numpy as np import json # project files import utils ...
{"hexsha": "2dd70c93dfda439878b3d9bee932523c697a2408", "size": 6203, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/utils/aggregate_output.py", "max_stars_repo_name": "CMU-SAFARI/EINSim", "max_stars_repo_head_hexsha": "f3e782658dd19070ca0e85fcc422014c2283280e", "max_stars_repo_licenses": ["MIT"], "max_st...
import csv import numpy as np import os def writePoints(points,ptsFileName): csv.writer(open(ptsFileName,'w'),delimiter=' ').writerows(points) def batchWritePoints(batchPoints,outputDir): for i in range(batchPoints.shape[0]): writePoints(batchPoints[i,:,:],os.path.join(outputDir,str(i)+".pts"))
{"hexsha": "4cae3f00604e930bc0aed31db8d22d91a338048c", "size": 313, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/writer.py", "max_stars_repo_name": "sanjeevmk/GLASS", "max_stars_repo_head_hexsha": "91c0954eab87d25d4866fea5c338f79fbca4f79e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_...
subroutine secpred(j) use constants_module use arrays_module use var_module use arrays_section_module use xsec_attribute_module use subtools implicit none integer, intent(in) :: j ! Locals integer :: i, pp, tableLength real(kind=4) :: beds, fs, hy, yyn, yyn_1, temp1, temp2...
{"hexsha": "05d5e4d1886ab80e78653da3a88bf53430b166e3", "size": 3447, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src_combined_Y_network/secpred.f90", "max_stars_repo_name": "MESH-Team/MESH_Code_irregular", "max_stars_repo_head_hexsha": "1edd0b60a8b2ccd95ec92b4fc7e381193cf6b936", "max_stars_repo_licenses": ...
import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader, Dataset torch.multiprocessing.set_sharing_strategy('file_system') from tqdm import tqdm import numpy as np import os from os.path import join, basename from boltons.fileutils import iter_find_files import soundfi...
{"hexsha": "65ac236c1753d65908320a38c444a197d60cb2ce", "size": 5157, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloader.py", "max_stars_repo_name": "YaelSegal/UnsupSeg", "max_stars_repo_head_hexsha": "a8657565967e871064118d1ce2b452c033d05c50", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
[STATEMENT] lemma IO_language : "IO M q t \<subseteq> language_state M q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. IO M q t \<subseteq> LS M q [PROOF STEP] by (metis atc_reaction_path IO.elims language_state mem_Collect_eq subsetI)
{"llama_tokens": 94, "file": "Adaptive_State_Counting_ATC_ATC", "length": 1}
[STATEMENT] lemma swap_apply[simp]: "swap (a \<otimes>\<^sub>u b) = (b \<otimes>\<^sub>u a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. swap (a \<otimes>\<^sub>u b) = b \<otimes>\<^sub>u a [PROOF STEP] unfolding swap_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (Snd;Fst) (a \<otimes>\<^sub>u b) = b \<ot...
{"llama_tokens": 181, "file": "Registers_Laws", "length": 2}
import numpy as np import torch Ranges = { 'pelvis': [[0, 0], [0, 0], [0, 0]], 'pelvis0': [[-0.3, 0.3], [-1.2, 0.5], [-0.1, 0.1]], 'spine': [[-0.4, 0.4], [-1.0, 0.9], [-0.8, 0.8]], 'spine0': [[-0.4, 0.4], [-1.0, 0.9], [-0.8, 0.8]], 'spine1': [[-0.4, 0.4], [-0.5, 1.2], [-0.4, 0.4]], 'spine3': [[-...
{"hexsha": "58ae66102d2264322158e784763871dbfc895cb5", "size": 6653, "ext": "py", "lang": "Python", "max_stars_repo_path": "util/joint_limits_prior.py", "max_stars_repo_name": "chaneyddtt/Coarse-to-fine-3D-Animal", "max_stars_repo_head_hexsha": "b3f9b1031b5761838c94ca091095636101747fd9", "max_stars_repo_licenses": ["MI...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.datasets import load_iris #Load iris data set iris_data = load_iris() iris = pd.DataFrame(iris_data['data'], columns=iris_data['feature_names']) iris.info() iris.describe() setosa_x = iris['sepal length (cm)'][:...
{"hexsha": "7825caf72bb7831c675ff54e21d1cc3c21e0f4f9", "size": 1363, "ext": "py", "lang": "Python", "max_stars_repo_path": "Iris.py", "max_stars_repo_name": "Akberovr/Support-Vector-Machine-Neural-Networks", "max_stars_repo_head_hexsha": "6d94853c88c30eb83a18c7ad986b85c1d87c3fc6", "max_stars_repo_licenses": ["MIT"], "m...
from numpy import ndarray from model_spaces.core.gp_model import GPModel from model_spaces.core.hyperpriors import Hyperpriors class KernelKernelGPModel(GPModel): def __init__(self, kernel_kernel_hyperpriors: Hyperpriors): covariance = None super().__init__(covariance, kernel_kernel_hyperpriors)...
{"hexsha": "f23728e8bb51698b6618c310a1be93c074735132", "size": 380, "ext": "py", "lang": "Python", "max_stars_repo_path": "strategies/boms/kernel_kernel_gp_model.py", "max_stars_repo_name": "lschlessinger1/boms-python", "max_stars_repo_head_hexsha": "5ad6035a91c1eb3d33556ddfee25b99ba18ee431", "max_stars_repo_licenses":...
(* The types of finite sets and bags *) theory FSets_Bags imports "../NonFreeInput" begin (* Datatype of finite sets: *) nonfree_datatype 'a fset = Emp | Ins 'a "'a fset" where Ins1: "Ins a (Ins a A) = Ins a A" | Ins2: "Ins a1 (Ins a2 A) = Ins a2 (Ins a1 A)" declare Ins1[simp] (* Datatype of bags: *) nonfree_data...
{"author": "metaforcy", "repo": "nonfree-data", "sha": "f3ce28278a88fdd240faa2e51f893fee5c15f2f2", "save_path": "github-repos/isabelle/metaforcy-nonfree-data", "path": "github-repos/isabelle/metaforcy-nonfree-data/nonfree-data-f3ce28278a88fdd240faa2e51f893fee5c15f2f2/Examples/FSets_Bags.thy"}
import os import random import numpy as np import pandas as pd import seaborn as sns import gym import matplotlib.pyplot as plt plt.style.use('bmh') import matplotlib matplotlib.rcParams['font.family'] = 'IPAPGothic' def reset_seeds(): random.seed(9949) np.random.seed(9967) import tensorflow as tf; tf.set_rand...
{"hexsha": "f60d9bbc36608d24b736cdb58ed54fd132d9eb41", "size": 5814, "ext": "py", "lang": "Python", "max_stars_repo_path": "dnn/rl_gym.py", "max_stars_repo_name": "takashi-matsushita/lab", "max_stars_repo_head_hexsha": "894e5762f58046c68e665d7463db3d7359c15fda", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
""" Function to pool the univariate estimators Arguments: unibetas::Array{Unibeta, 1} -> Array which contains the univariate estimators which have to be pooled """ function pool_unibetas(unibetas::Array{Unibeta, 1}) pooledbetas = unibetas[1].n .* unibetas[1].unibeta sumN = unibetas[1].n @simd for i = 2 : length(uni...
{"hexsha": "a0961eac7c637ea98f11c14cd86b4b8dd0e34fc8", "size": 1473, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/pooling.jl", "max_stars_repo_name": "danielazoeller/DistributedBoosting", "max_stars_repo_head_hexsha": "aaac7133efe6a70711f9331049e5874dcc68a967", "max_stars_repo_licenses": ["MIT"], "max_star...
""" Testing array writer objects See docstring of :mod:`nibabel.arraywriters` for API. """ from platform import python_compiler, machine import itertools import numpy as np from io import BytesIO from ..arraywriters import (SlopeInterArrayWriter, SlopeArrayWriter, WriterError, ScalingErro...
{"hexsha": "22684ac9550ddeb0f36af831df6decf81d2d8b4a", "size": 37367, "ext": "py", "lang": "Python", "max_stars_repo_path": "venv/Lib/site-packages/nibabel/tests/test_arraywriters.py", "max_stars_repo_name": "richung99/digitizePlots", "max_stars_repo_head_hexsha": "6b408c820660a415a289726e3223e8f558d3e18b", "max_stars_...
# License: Apache-2.0 import copy import warnings from typing import Union import databricks.koalas as ks import numpy as np import pandas as pd from ..data_cleaning.drop_columns import DropColumns from ..transformers.transformer import Transformer from ..util import util from ._base_encoder import _BaseEncoder cla...
{"hexsha": "ae08cdb6383e5136214e7b9d3b9d9639b6e79ca7", "size": 10540, "ext": "py", "lang": "Python", "max_stars_repo_path": "gators/encoders/multiclass_encoder.py", "max_stars_repo_name": "Aditya-Kapadiya/gators", "max_stars_repo_head_hexsha": "d7c9967e3a8e304a601b6a92ad834d03d3e36338", "max_stars_repo_licenses": ["Apa...
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : initialization.py @Time : 2021/12/11 17:21:18 @Author : Lin Junwei @Version : 1.0 @Desc : initialization class and function ''' #%% import import pandas as pd import numpy as np import matplotlib.pyplot as plt import scipy.io import ti...
{"hexsha": "f182bc0cbfe158c8264fbfbc68bd1dce3e938b99", "size": 19604, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/initialization.py", "max_stars_repo_name": "Limjohns/OptFinal", "max_stars_repo_head_hexsha": "d2876865d888a6b4a2dc271cc04b3b97b8c0fbcc", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# import numpy as np import networkx as nx import pandas as pd from bokeh.models import BoxSelectTool from bokeh.models import Circle from bokeh.models import HoverTool from bokeh.models import MultiLine from bokeh.models import TapTool from bokeh.models.graphs import EdgesAndLinkedNodes from bokeh.models.graphs impo...
{"hexsha": "b4f51af5181f2793a02a1facffe398966db2e411", "size": 2588, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/twistmap/__init__.py", "max_stars_repo_name": "mchwalisz/walker", "max_stars_repo_head_hexsha": "8447352ba23324e7f1ad564d626efad9760e3570", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import sys, os import numpy as np import scipy import torch import torch.nn as nn from scipy import ndimage from tqdm import tqdm, trange from PIL import Image import torch.hub import torchvision import torch.nn.functional as F # download deeplabv2_resnet101_msc-cocostuff164k-100000.pth from # https://github.com/kazut...
{"hexsha": "c450f5452a5d7cd137acad93aab40b7353d1819f", "size": 3797, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/extract_segmentation.py", "max_stars_repo_name": "B1boid/taming-transformers", "max_stars_repo_head_hexsha": "5638360d3de989547ae1b3f04d494187ae08b8ba", "max_stars_repo_licenses": ["MIT"],...
program main integer main_out main_out = main1() print *, "main1 called" contains integer function main1() integer :: i = 10 if (i .GT. 5) then main1 = i print *, "early return" return end if print *, "normal return" m...
{"hexsha": "e0e0e335de168092c4cad6ea0b8316b2f0f98fd8", "size": 364, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "integration_tests/return_01.f90", "max_stars_repo_name": "Thirumalai-Shaktivel/lfortran", "max_stars_repo_head_hexsha": "bb39faf1094b028351d5aefe27d64ee69302300a", "max_stars_repo_licenses": ["BS...
import os os.chdir('osmFISH_AllenSSp/') from scvi.dataset import CsvDataset from scvi.models import JVAE, Classifier from scvi.inference import JVAETrainer import numpy as np import pandas as pd import copy import torch import time as tm ### osmFISH data osmFISH_data = CsvDataset('data/gimVI_data/osmFISH...
{"hexsha": "6732ae3e542b474679697d3a28c2b831a99ef0c3", "size": 4587, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark/osmFISH_AllenSSp/gimVI/gimVI.py", "max_stars_repo_name": "tabdelaal/SpaGE", "max_stars_repo_head_hexsha": "7533cbf2275c3049561e8a17b9f7866e0e324743", "max_stars_repo_licenses": ["MIT"], ...
# from https://github.com/SpaceNetChallenge/SpaceNet_Off_Nadir_Solutions/blob/master/selim_sef import os import torch from torch import nn from torch.utils import model_zoo from src.models.resnet import resnet34 encoder_params = { 'resnet34': { 'filters': [64, 64, 128, 256, 512], ...
{"hexsha": "b80fc8da68bb63da82b223ad7108d1c5a7e04321", "size": 8671, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/unet.py", "max_stars_repo_name": "kevinkwshin/kaggle-pneumothorax", "max_stars_repo_head_hexsha": "24b91a9425097023f0cc7781a9380cb247babe22", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np from loginit import get_module_logger from sklearn.decomposition import PCA, KernelPCA from sklearn.model_selection import GridSearchCV, StratifiedShuffleSplit, StratifiedKFold from sklearn.model_selection import cross_validate from sklearn.kernel_ridge import KernelRidge from sklearn.metrics import...
{"hexsha": "75c5cccb2362d40952ea4ab08da3bea2086d870c", "size": 13836, "ext": "py", "lang": "Python", "max_stars_repo_path": "classify/kernel_eval.py", "max_stars_repo_name": "OminiaVincit/scale-variant-topo", "max_stars_repo_head_hexsha": "6945bc42aacd0d71a6fb472c87e09da223821e1e", "max_stars_repo_licenses": ["MIT"], "...
from bson import json_util import json import os import numpy as np import tensorflow as tf from keras.layers.core import K #import keras.backend as K import time import pandas as pd import multiprocessing # from keras.preprocessing import text, sequence from keras.preprocessing.text import Tokenizer from keras.utils ...
{"hexsha": "83663c35c9a7b7d5e9b6087f0826f94225c82bb6", "size": 15354, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_neu/optimized/hyperutils.py", "max_stars_repo_name": "lelange/cu-ssp", "max_stars_repo_head_hexsha": "9f1a7abf79a2fb6ef2ae0f37de79469c2dc3488f", "max_stars_repo_licenses": ["MIT"], "max_sta...
/- Copyright (c) 2021 Justus Springer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Justus Springer -/ import category_theory.sites.spaces import topology.sheaves.sheaf import category_theory.sites.dense_subsite /-! # Coverings and sieves; from sheaves on sites an...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/topology/sheaves/sheaf_condition/sites.lean...
(* This code is copyrighted by its authors; it is distributed under *) (* the terms of the LGPL license (see LICENSE and description files) *) (* ************************************************************************* Buchberger :...
{"author": "coq-community", "repo": "buchberger", "sha": "7625647c300bb5f155f6bf40b69c232f64819a4f", "save_path": "github-repos/coq/coq-community-buchberger", "path": "github-repos/coq/coq-community-buchberger/buchberger-7625647c300bb5f155f6bf40b69c232f64819a4f/theories/Preducestar.v"}
#! /usr/bin/env python3 import argparse import os import time import numpy as np import cv2 import dlib here = os.path.abspath(os.path.dirname(__file__)) _predictor_path = 'shape_predictor_68_face_landmarks.dat' _casc_path = 'haarcascade_frontalface_alt.xml' predictor_path = os.path.join(here, _predictor_path) casc_...
{"hexsha": "8a394a6af0af506780f1e1e80f733c81c33431e5", "size": 11892, "ext": "py", "lang": "Python", "max_stars_repo_path": "faceswap.py", "max_stars_repo_name": "JSharpClone/faceswap", "max_stars_repo_head_hexsha": "be706a4e29a5bb7777e3cec1fab03ce14b8ae06a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import json import csv import os import copy import numpy as np from camel_tools.calima_star.database import CalimaStarDB from camel_tools.calima_star.analyzer import CalimaStarAnalyzer from camel_tools.disambig.mle import MLEDisambiguator import torch class InputExample: """Simple object to encapsulate each data ...
{"hexsha": "9f9bb2d5ee31df14deb8ff7ae9dba5ed190b6613", "size": 12245, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/data_utils.py", "max_stars_repo_name": "CAMeL-Lab/gender-reinflection", "max_stars_repo_head_hexsha": "006de318a326c8ea67d610adb30d3e0a8d6e59db", "max_stars_repo_licenses": ["MIT"], "max_st...
module IdemInvo where open import Relation.Binary.PropositionalEquality module MainResult (A : Set) (f : A → A) (idem : ∀ x → f (f x) ≡ f x) (invo : ∀ x → f (f x) ≡ x) where -- an idempotent and involutive function is an identity function iden : ∀ x → f x ≡ x iden x = trans (sym (idem x)) (invo x)
{"hexsha": "f615f5affe8428621df82b16cb8316583e03c572", "size": 318, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "IdemInvo.agda", "max_stars_repo_name": "zaklogician/IdemInvo", "max_stars_repo_head_hexsha": "44f16597c9ef9596f6dc1b628848a3a74fa9a19b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
{"hexsha": "879128a31825d2b3718814bfe58d3f401dadf254", "size": 6395, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySRU/tests/MagneticFieldTest.py", "max_stars_repo_name": "SophieTh/und_Sophie_2016", "max_stars_repo_head_hexsha": "28e1520e86f342cf35f862fd4bf56c51dc191b91", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma in_pdata_pairs_to_listI2: assumes "(f, g) \<in> set ps" shows "monom_mult (1 / lc (fst g)) ((lcs (lp (fst f)) (lp (fst g))) - (lp (fst g))) (fst g) \<in> set (pdata_pairs_to_list ps)" (is "?m \<in> _") [PROOF STATE] proof (prove) goal (1 subgoal): 1. monom_mult ((1::'b) / lc (fst g)...
{"llama_tokens": 4035, "file": "Groebner_Bases_F4", "length": 23}
%---------------------------------------------------------------------------------------- % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS %---------------------------------------------------------------------------------------- \documentclass[letterpaper]{twentysecondcv} % a4paper for A4 \awards { \begin{itemize} \ite...
{"hexsha": "c4dda7e9b9622104f9907a1e386c691432a7d387", "size": 6057, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "template.tex", "max_stars_repo_name": "vrublevskiyvitaliy/infographic", "max_stars_repo_head_hexsha": "c9a5a2e1b59af715a9fdd4675c7b8e2950b216d0", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...