text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import logging import sys from pathlib import Path import hydra import torch from hydra import compose, initialize, initialize_config_dir from hydra.utils import call, instantiate from omegaconf import OmegaConf from tqdm.auto import tqdm def eval_resolver(x): import numpy as np # noqa: F401 import torch #...
{"hexsha": "5191286b82af594bee9876134d38a87a51bb9fc4", "size": 2825, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/deepqmc/app.py", "max_stars_repo_name": "jhrmnn/deepqmc", "max_stars_repo_head_hexsha": "dc7d1f6f72634298e5cf43cb337e2a4d68c823e1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import keras import numpy as np import math class pairgen(keras.utils.Sequence): positive = 0.0 negative = 1.0 def __init__(self, mat_t, pos, neg, batch): self.mat_t = mat_t self.pos = pos self.neg = neg self.batch = batch self.n_k = mat_t.shape[0] ...
{"hexsha": "89ab923c0c6959f82a8cb5f8a9b05a319bf3f529", "size": 2089, "ext": "py", "lang": "Python", "max_stars_repo_path": "02_pair/pairgen.py", "max_stars_repo_name": "lazyDamon/siamese-neural-networks", "max_stars_repo_head_hexsha": "a9f395e531ce51be0c85fa66ef091c4a6b1b65f8", "max_stars_repo_licenses": ["MIT"], "max_...
import os import random import tempfile from urllib.parse import quote import numpy as np import pandas as pd import simplejson import storefact from kartothek.core.common_metadata import ( _get_common_metadata_key, make_meta, store_schema_metadata, ) from kartothek.core.dataset import DatasetMetadata, cr...
{"hexsha": "c33e395ee7fffd4a42c4daa366d86c8ef06e59ec", "size": 14809, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_dataset_dyn_part.py", "max_stars_repo_name": "jorisvandenbossche/kartothek", "max_stars_repo_head_hexsha": "18b11e7b060bb778668ffc4e2f468910120e6385", "max_stars_repo_licenses": [...
import os import time import cv2 import pyrealsense2 as rs import numpy as np import open3d as o3d from PIL import Image from scipy.io import loadmat class RealSense: def __init__(self, width=640, heigth=480): self.pipeline = rs.pipeline() configs = {} configs['device'] = 'Intel RealSens...
{"hexsha": "2cbc8807a507707bdbfb1b0ca72c95f5d66926fa", "size": 6272, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/misc/input.py", "max_stars_repo_name": "andrearosasco/SynthSegmentation", "max_stars_repo_head_hexsha": "9083531f853757533fa69d9fca931f81c3a3ac2d", "max_stars_repo_licenses": ["MIT"], "max_s...
""" scipy.stats-compatible datasets generator. """ import numpy as np from typing import Union, Iterable __all__ = [ "generate_dataset" ] def generate_dataset( range_of_values: Union[Iterable, int], func: callable, *args, shuffle=False, noise_radius: float = 0, ...
{"hexsha": "ef314aff11f2138050b576de27b78ac85dd274e9", "size": 2600, "ext": "py", "lang": "Python", "max_stars_repo_path": "distrdata/_generator_base.py", "max_stars_repo_name": "VoIlAlex/distrdata", "max_stars_repo_head_hexsha": "a4d9d69cb87fa99476baff24517a599e17c87781", "max_stars_repo_licenses": ["MIT"], "max_stars...
import tactic.alias import tactic.basic import tactic.linarith @[reducible] def symbol := ℕ /-- Representation of formulas in modal logic. -/ @[derive decidable_eq] inductive formula : Type | bottom : formula | top : formula | symbol (s : symbol) : formula | not (a : formula) : formula | and (a b : formula) : formula...
{"author": "max-heller", "repo": "cs1951x-final-project", "sha": "5c71e2c87289e208ed8513c10a0d480c79a07894", "save_path": "github-repos/lean/max-heller-cs1951x-final-project", "path": "github-repos/lean/max-heller-cs1951x-final-project/cs1951x-final-project-5c71e2c87289e208ed8513c10a0d480c79a07894/src/formula.lean"}
import numpy as np import cv2 def computeAccuracy(pred, labelIndexBatch, maskBatch, numClasses=21): hist = np.zeros(numClasses * numClasses, dtype=np.int64) pred = pred.cpu().data.numpy() assert (pred.shape[1] == numClasses) pred = pred.argmin(axis=1) gt = labelIndexBatch.cpu().data.numpy() ...
{"hexsha": "29547b636805e2dc1c2e28654907dbd4d04e3d1e", "size": 1735, "ext": "py", "lang": "Python", "max_stars_repo_path": "Segmentation/utils.py", "max_stars_repo_name": "Freyr-Wings/cse252c_hw3-release", "max_stars_repo_head_hexsha": "8299b52ffa39195edacddb682a03f8a4b548fbac", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python3 """ Copyright (C) 2019, Clément Cazorla <clement.cazorla@univ-reims.fr> This program is free software: you can use, modify and/or redistribute it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) ...
{"hexsha": "3de586356829d60cd633145f81974793cdd3299f", "size": 4998, "ext": "py", "lang": "Python", "max_stars_repo_path": "waterpixel/code/Gradient.py", "max_stars_repo_name": "aprimault/labs-aprimault-e4-gitpod", "max_stars_repo_head_hexsha": "2f400faa889ff969509380b948b9ad9edbedc00f", "max_stars_repo_licenses": ["CE...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Tue Nov 28 16:53:59 2017 @author: kaihong """ import numpy as np def huber_w(y): return np.fmin(1, 1/np.abs(y)) def huber_w_smooth(y): return 1/np.sqrt(1 + y**2) def exp_w(c=2): def _exp_w(y): return np.exp(-0.5*y**2/c**2) return _...
{"hexsha": "0af8549468e7129dae8bbe5f195e21b7674626a0", "size": 5632, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimizer.py", "max_stars_repo_name": "PRBonn/extrinsic_calibration", "max_stars_repo_head_hexsha": "c7d770c19418bb34d1c5df4512ae9b9e0f8c2615", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import pandas as pd from sklearn.base import TransformerMixin class Categorizer(TransformerMixin): """Transform categorical values into numerical codes. """ def __init__(self): self.categories = None self.dtype = None def fit(self, y): self.categories = pd....
{"hexsha": "3cb5a30b506515702780b15686c75b5c6b58c2ff", "size": 722, "ext": "py", "lang": "Python", "max_stars_repo_path": "cardea/primitives/processing/categorizer.py", "max_stars_repo_name": "sarahmish/Cardea", "max_stars_repo_head_hexsha": "85c4246c12178e6d1b9cc12eb39c264f3c20f3e9", "max_stars_repo_licenses": ["MIT"]...
[STATEMENT] lemma zero_is_polynomial [intro]: "polynomial K []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. polynomial K [] [PROOF STEP] unfolding polynomial_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. [] = [] \<or> set [] \<subseteq> K \<and> lead_coeff [] \<noteq> \<zero> [PROOF STEP] by simp
{"llama_tokens": 125, "file": null, "length": 2}
from __future__ import print_function import numpy as np import json import os import csv import torch def GeneralEnsemble(dets, iou_thresh = 0.5, weights=None): assert(type(iou_thresh) == float) ndets = len(dets) if weights is None: w = 1/float(ndets) weights = [w]*ndets e...
{"hexsha": "3bb5b28f3c3e95cfb8bb60e8e52972d75cce09df", "size": 15157, "ext": "py", "lang": "Python", "max_stars_repo_path": "csv_eval_ensemble.py", "max_stars_repo_name": "100shubham/animal-detection", "max_stars_repo_head_hexsha": "3ced7b5d8eafc3798eaf6b8712149c6c7843e67d", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/python import matplotlib matplotlib.use('Agg') from scipy import * from pylab import * from numpy import * from matplotlib.collections import LineCollection import glob import os from os.path import join as pjoin def comparacio(a,b): (Sepa,numa) = a.split('_') (pa,exta) = numa.split('.') (...
{"hexsha": "52f0bf82b9949b4d6b19124f53f40323edbd5174", "size": 1238, "ext": "py", "lang": "Python", "max_stars_repo_path": "TEST_2b/Analysis/OP_mean.py", "max_stars_repo_name": "dmalagarriga/PLoS_2015_segregation", "max_stars_repo_head_hexsha": "949afedf96945c11ee84b1a6c9842e5257fb5be8", "max_stars_repo_licenses": ["MI...
from sklearn.linear_model import LogisticRegression import argparse import os import numpy as np from sklearn.metrics import mean_squared_error import joblib from sklearn.model_selection import train_test_split from sklearn.preprocessing import OneHotEncoder import pandas as pd from azureml.core.run import Run from azu...
{"hexsha": "c9f293c844f5c893b695ae0cd0296ce15b7437ef", "size": 1725, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "rutujak24/MS-Azure-for-Parkinson-disease", "max_stars_repo_head_hexsha": "ad7d0f0a725cb648409731ecef2d84f63e713a1d", "max_stars_repo_licenses": ["MIT"], "max_sta...
import math from dataclasses import dataclass from pathlib import Path from typing import Dict, List, Tuple, Union import h5py import numpy as np # Default parameters for each heatmap layer # https://github.com/napari/napari/blob/d5a28122129e6eae0f5ada77cb62c4bd5a714b60/napari/layers/base/base.py#L26 RENDERING_DEFAUL...
{"hexsha": "5a430415740bf95417c4dbf8b3f8a06cf3faf1c2", "size": 2677, "ext": "py", "lang": "Python", "max_stars_repo_path": "patch_viewer/patches.py", "max_stars_repo_name": "manzt/patch-viewer", "max_stars_repo_head_hexsha": "7c5287dc0fdd55093d48a03536d5bbf7625600f1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
function weighted_mean(numbers, weights) tmp_weights = [] tmp_number = [] for i in 1:length(weights) if ismissing(numbers[i]) continue else push!(tmp_weights, weights[i]) push!(tmp_number, numbers[i]) end end weights = tmp_weights numbe...
{"hexsha": "aeea883f5c21f4750f85e882631528c4f81d4e36", "size": 627, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/other/weighted_mean.jl", "max_stars_repo_name": "JuliaPlanet/NighttimeLights.jl", "max_stars_repo_head_hexsha": "100641b875e7af3c4eaa9e9daacd8e06e8940458", "max_stars_repo_licenses": ["MIT"], "m...
import re import requests # This is from https://github.com/astropy/astropy-bot def paged_github_json_request(url, headers=None): response = requests.get(url, headers=headers) assert response.ok, response.content results = response.json() if 'Link' in response.headers: links = response.hea...
{"hexsha": "e652dd0c1fe3a5df7ab9efc4e6e7621005e051f6", "size": 2699, "ext": "py", "lang": "Python", "max_stars_repo_path": "github_activity.py", "max_stars_repo_name": "pllim/playpen", "max_stars_repo_head_hexsha": "5fc247102c5f7f171e0ae72702794b0d675d71a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
# TODO: Fix image birghtness when writing images out to file using DelimitedFiles using LinearAlgebra using Images using ImageIO # Function to output a set of points as an image function create_image_array(points, ranges, res; point_offset = 10) output_array = zeros(res) range_diffs = [ranges[1,2] - ranges[1...
{"hexsha": "506b24013b5c46931db41bfb3ff7e0ae5d5b64de", "size": 2862, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "research/fractal/attractor_search.jl", "max_stars_repo_name": "leios/simuleios", "max_stars_repo_head_hexsha": "fb96960b7f5481904ccc6ac30f94844c8a0e5900", "max_stars_repo_licenses": ["MIT"], "max_s...
\eucommentary{Milestones means control points in the project that help to chart progress. Milestones may correspond to the completion of a key deliverable, allowing the next phase of the work to begin. They may also be needed at intermediary points so that, if problems have arisen, corrective measures can be taken. A m...
{"hexsha": "349107e9a70a6563cb1ba9e249924313238746c7", "size": 3556, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "milestones.tex", "max_stars_repo_name": "MCvin/BOSSEE-proposal", "max_stars_repo_head_hexsha": "7ed8cc2df6e320cfcabb9bfbf3eb0b20fef88274", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
""" rigidbody_model(state_indices=(), rate_indices=(), prescribed_values=()) Construct a six-degree of freedom rigid-body model with state variables ``x, y, z, \\phi, \\theta, \\psi, u, v, w, p, q, r``, inputs ``m, I_{xx}, I_{yy}, I_{zz}, I_{xz}, I_{xy}, I_{yz}, F_x, F_y, F_z, M_x, M_y, M_z``, and zero parameters....
{"hexsha": "82fc4c7370797ed35f503f49c32b51f61f42c484", "size": 6440, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/dynamics/rigidbody.jl", "max_stars_repo_name": "byuflowlab/Aeroelasticity.jl", "max_stars_repo_head_hexsha": "b848d01001d66a5812d6fa1f1f62e06831c238bf", "max_stars_repo_licenses": ["MIT"...
\section{\ourLib} TORCS, The Open Racing Car Simulator, is an existing open source vehicle simulator~\cite{torcs} that has bindings for various languages~\cite{SCRC}. We provide the first bindings for Haskell, and further extend this into a full library for multi-vehicle simulations. The library is an open source libra...
{"hexsha": "56a45c96888f0873b6f399a393e980642d370e9e", "size": 8127, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/SCAV17/secs/TORCSlib.tex", "max_stars_repo_name": "santolucito/Haskell-TORCS", "max_stars_repo_head_hexsha": "95eef93f7089bbe95f0f28fa21f0f636d7ffc39f", "max_stars_repo_licenses": ["BSD-3-Clau...
import numpy as np from eqsig.single import Signal, AccSignal from tests.conftest import TEST_DATA_DIR def test_remove_polyfit_1(asig_t1): # Remove any trend asig_t1.remove_poly(poly_fit=1) ssq_cleaned = np.sum(asig_t1.values ** 2) # Add a trend asig_t1.add_series(np.linspace(0, 0.2, asig_t1.np...
{"hexsha": "54f83638feaa837084ddc395350f4e7742bc63f2", "size": 5232, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_single_signal_w_motion.py", "max_stars_repo_name": "geosharma/eqsig", "max_stars_repo_head_hexsha": "3083022ab9e48ee422eff261560ee60846e766e2", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np from sklearn.metrics import pairwise_distances as sk_pairwise_distances from sklearn.neighbors import NearestNeighbors # from .logging import logger # Helper functions def square_matrix_entries(matrix): ''' Return array of squares of entries. ie. (m_{ij}^2) ''' matrix = np.array(ma...
{"hexsha": "cb2c766815b56f91d5d08584f7cee8f49826477b", "size": 22594, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/quality_measures.py", "max_stars_repo_name": "hackalog/dimension_reduction", "max_stars_repo_head_hexsha": "18c54256f4b1f1fbfe0b99e86b6701e708b7c85c", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma gr_implies_gr0: "m < (n::nat) \<Longrightarrow> 0 < n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. m < n \<Longrightarrow> 0 < n [PROOF STEP] by simp
{"llama_tokens": 74, "file": "List-Infinite_CommonArith_Util_Nat", "length": 1}
[STATEMENT] lemma ok_finite[simp]: "ok e \<Longrightarrow> finite (env_dom e)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ok e \<Longrightarrow> finite (env_dom e) [PROOF STEP] by (cases e, simp+)
{"llama_tokens": 77, "file": "Locally-Nameless-Sigma_preliminary_Environments", "length": 1}
from __future__ import division from numpy.testing import assert_almost_equal import pytest from statsmodels.regression.linear_model import OLS from statsmodels.tools import add_constant from .results.el_results import RegressionResults from statsmodels.datasets import stackloss class GenRes(object): """ L...
{"hexsha": "bc4e078b7eaf9d3f5e603aec351392768d813dbd", "size": 5712, "ext": "py", "lang": "Python", "max_stars_repo_path": "statsmodels/emplike/tests/test_regression.py", "max_stars_repo_name": "nikhase/statsmodels", "max_stars_repo_head_hexsha": "e1822d4513f442002816bb898ca5794785f35c32", "max_stars_repo_licenses": ["...
from __future__ import print_function from keras.preprocessing import sequence from keras.models import Sequential from keras.layers import Dense, Embedding, LSTM, SimpleRNN from keras.preprocessing.text import Tokenizer from keras import backend as k from keras.utils import to_categorical import numpy as np import lo...
{"hexsha": "4990b4cbbba8ccef44475dcbd241334ba0e253d6", "size": 3116, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf_builddata.py", "max_stars_repo_name": "ktc1016/Sentiment-Analysis-of-Filipino-Tweets", "max_stars_repo_head_hexsha": "a42d4002abd3b214a28303b3e31da1c2d4eb86f6", "max_stars_repo_licenses": ["MIT...
module CellDataTestsSeq using PartitionedArrays include("../CellDataTests.jl") prun(CellDataTests.main,sequential,(2,2)) end # module
{"hexsha": "54294b15cfb4afbb152209f00a11c4cef93dc36e", "size": 134, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/sequential/CellDataTests.jl", "max_stars_repo_name": "oriolcg/GridapDistributed.jl", "max_stars_repo_head_hexsha": "b7cb08b35a9d5eb026dd0364b05fec94b13c1cab", "max_stars_repo_licenses": ["MIT"]...
import enum from functools import lru_cache from typing import List import dataclasses import pathlib import pandas as pd import numpy as np from covidactnow.datapublic.common_fields import CommonFields from covidactnow.datapublic.common_fields import FieldName from covidactnow.datapublic.common_fields import GetByVal...
{"hexsha": "991bc5e7447282611e4116c1e1504b90d96ae378", "size": 6801, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/datasets/nytimes_anomalies.py", "max_stars_repo_name": "covid-projections/covid-data-model", "max_stars_repo_head_hexsha": "a457e1e78635794e36007bf97ab4485bc4e5668d", "max_stars_repo_licenses...
#!/usr/bin/env python ''' Solves Constrained Rosen-Suzuki Function - Different gradient calculation approaches are used f* = -6 , x* = [0, 1, 2, -1] ''' # ============================================================================= # Standard Python modules # ============================================...
{"hexsha": "49bb1804ab3b62f1d355467c7a283394a930bf6a", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "docker/optimization/pyOpt/tags/v1.2.0/examples/usersens.py", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5bd0d9a1def52a", "max_stars_repo_...
\section{Non-uniform Nyquist} A selection of quotations showing approaches to a non-uniform Nyquist limit: \begin{description} \item[Average Sampling Rate] \citet{Scargle82} (citing the following: Beutler 1966, 1970; Masry \& Lui 1975; Higgins 1976; Wiley 1978; Gaster \& Roberts 1975, 1977; Kar, Hornkohl \& Farmer 1...
{"hexsha": "1408b017b6288b138265947aaf6dc550df62889f", "size": 5342, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes.tex", "max_stars_repo_name": "pierfra-ro/PracticalLombScargle", "max_stars_repo_head_hexsha": "5f4ca27deefa7d4edc68da3c92d34f484c5bc98e", "max_stars_repo_licenses": ["CC-BY-4.0", "BSD-3-Clause...
# Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
{"hexsha": "555ece2167d6c754b9c3f112e70e48c31f62597b", "size": 2394, "ext": "py", "lang": "Python", "max_stars_repo_path": "plugins/_Post_Process/_Utils/parameter_stats.py", "max_stars_repo_name": "isabella232/nnc-plugin", "max_stars_repo_head_hexsha": "3bc71266696d0341e5e9a2ff2020980700f28719", "max_stars_repo_license...
"""Data utils functions for pre-processing and data loading.""" import os import pickle as pkl import sys import networkx as nx import numpy as np import scipy.sparse as sp import torch from scipy import sparse import logging def load_data(args, datapath): ## Load data data = load_data_lp(args.dataset, args....
{"hexsha": "a59dfcd682a9c35000b357e2d0b74ccc7fc311cb", "size": 15556, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/data_utils.py", "max_stars_repo_name": "junhocho/HGCAE", "max_stars_repo_head_hexsha": "d871ebdac323e7ccea24bedd50194aa9b01d26a6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 31,...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt plt.close('all') ######################################### # Set style for plot # mpl.rcParams['lines.linewidth'] = 2 mpl.rcParams['axes.labelsize'] = 13 mpl.rcParams['xtick.labelsize'] = 12 mpl.rcParams['ytick.labelsi...
{"hexsha": "14f768e54ef65d577dddccfefb721ddc8af372b2", "size": 5269, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/MagmOc_GJ1132b/plot_magmoc.py", "max_stars_repo_name": "alex-w/vplanet", "max_stars_repo_head_hexsha": "e901ac08208f7fd5edb30677f32f36619eb8ca8c", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma wi2l_univ[simp]: "wi2l wordinterval_UNIV = [(0, - 1)]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wi2l wordinterval_UNIV = [(0, - 1)] [PROOF STEP] unfolding wordinterval_UNIV_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. wi2l (WordInterval 0 (- 1)) = [(0, - 1)] [PROOF STEP] by simp
{"llama_tokens": 150, "file": "IP_Addresses_WordInterval", "length": 2}
!======================================================================! subroutine FinPla !----------------------------------------------------------------------! ! Creates the file for postprocessing with Tecpot. ! !----------------------------------------------------------------------! !-------...
{"hexsha": "3beb262005a26db1771d5b9f44ab62f1b3f68312", "size": 5001, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Sources/Process/OBSOLETE/FinPla.f90", "max_stars_repo_name": "mhadziabdic/T-FlowS", "max_stars_repo_head_hexsha": "1e0cd22ea60313a249742da69a88423891795056", "max_stars_repo_licenses": ["MIT"], ...
import pandas as pd import numpy as np import argparse def extract_seg_dups(row, current_seg_dup_table): filtered_seg_dup_table = current_seg_dup_table.loc[(current_seg_dup_table[2] <= int(row["POS"])) & (current_seg_dup_table[3] >= int(row["POS"]))] occurences = len(filtered_seg_dup_table) if occurence...
{"hexsha": "9eae6be7647bfcbe8f304be87756d682084ab43e", "size": 2407, "ext": "py", "lang": "Python", "max_stars_repo_path": "aidiva/variant_annotation/add_segmentDuplication.py", "max_stars_repo_name": "dboceck/AIdiva", "max_stars_repo_head_hexsha": "66907ca9981ca6588acf493db0e64d07589e86f4", "max_stars_repo_licenses": ...
(* Copyright (c) 2015 Muralidaran Vijayaraghavan vmurali@csail.mit.edu *) (* 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 th...
{"author": "vmurali", "repo": "SeqConsistency", "sha": "36b59c832ff342ddbe254df14f3c906f7964e650", "save_path": "github-repos/coq/vmurali-SeqConsistency", "path": "github-repos/coq/vmurali-SeqConsistency/SeqConsistency-36b59c832ff342ddbe254df14f3c906f7964e650/Caches/HierProperties.v"}
#!/usr/bin/env python import cdms2,genutil,cdtime,os,sys import unittest import cdat_info import numpy cdms2.setAutoBounds('on') class GENUTIL(unittest.TestCase): def testPicker(self): f=cdms2.open(os.path.join(cdat_info.get_sampledata_path(),'ta_ncep_87-6-88-4.nc')) levels = [1000,700,800] ...
{"hexsha": "2236b791921aeccedb71ef76b34f2fb36d0be81f", "size": 1209, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_genutil_picker.py", "max_stars_repo_name": "CDAT/genutil", "max_stars_repo_head_hexsha": "8772964ed2b0305590f94139974a300b49d113b7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
function G=doog2(sig,r,th,N); % G=doog2(sig,r,th,N); % Make difference of offset gaussians kernel % theta is in degrees % (see Malik & Perona, J. Opt. Soc. Amer., 1990) % % Example: % >> imagesc(doog2(1,12,0,64,1)) % >> colormap(gray) % % Serge Belongie no_pts=N; % no. of points in x,y grid [x,y]=meshgrid(-(N/2)+1/...
{"author": "jwyang", "repo": "JULE.torch", "sha": "69bdfd82f9dfd431619a8ee25ac832da76a827e2", "save_path": "github-repos/MATLAB/jwyang-JULE.torch", "path": "github-repos/MATLAB/jwyang-JULE.torch/JULE.torch-69bdfd82f9dfd431619a8ee25ac832da76a827e2/matlab/approaches/n-cut/Ncut_9/doog2.m"}
__author__ = 'Monika' # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import os as sys from glob import glob import math as math runprogram = 1 directory = sys.getcwd() while runprogram == 1: fitokay = 0 print("Was möchten Sie machen?") print("Messung fitten: 1") print("Pro...
{"hexsha": "e3d6fd8a3bbcb6e4b62a8b7ab41316987a85af72", "size": 35123, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulations/kinetics/CD+_HeliumAttachement/KineticScan/Test/20140210_181437.py", "max_stars_repo_name": "aravindhnivas/FELion-Spectrum-Analyser", "max_stars_repo_head_hexsha": "430f16884482089b2f...
[STATEMENT] lemma trms\<^sub>s\<^sub>s\<^sub>t_unlabel_dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t_eq: "trms\<^sub>l\<^sub>s\<^sub>s\<^sub>t (dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A) = trms\<^sub>l\<^sub>s\<^sub>s\<^sub>t A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. trms\<^sub>l\<^sub>s\<^sub>s\<^sub>t (dual\<^sub>l\<^...
{"llama_tokens": 1521, "file": "Stateful_Protocol_Composition_and_Typing_Labeled_Stateful_Strands", "length": 8}
@test inf(1.) == inf(Float64) == Inf @test inf(Float16(1.)) == inf(Float16) == Inf16 @test_throws InexactError inf(Int) for x = 0.:0.1:10. @test log1mexp(x) ≈ log(1 - exp(-x)) end for x = -100.:0. @test log1pexp(x) ≈ log(1 + exp(x)) atol=1e-14 end for x = 0.:100. @test log1pexp(x) ≈ x + log(exp(-x) + 1) ...
{"hexsha": "1f86a2dd000d8a962a566759bd6fe8a5943da5d5", "size": 882, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test-math.jl", "max_stars_repo_name": "cossio/LogMath.jl", "max_stars_repo_head_hexsha": "b02e607145cd569a9cb3cbe5942fffcdeddce722", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
# -*- coding: utf-8 -*- import numpy as np import torch from torch.utils.data import Dataset class VectorDataset(Dataset): def __init__(self, dimension, length, seed=None): self._length = length self._dim = dimension self._seed = seed np.random.seed(self._seed) self.vector...
{"hexsha": "c76ea7ad86a5e9fb40793af62b8b645bdafdc730", "size": 559, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/dataset/vector_dataset.py", "max_stars_repo_name": "heptaliane/DCGanImageGenerator", "max_stars_repo_head_hexsha": "691f28a6fa8d141a9da7dce42a8bf507b39c75ed", "max_stars_repo_licenses": ["M...
/** \defgroup environment Environment * \brief This module is header-only and models the * information that the kernel receives upon * boot time. * \{ * * \file environment/environment.hpp * \brief This file contains the type definition of * the argument that is passed to the kernel * ...
{"hexsha": "31332d35e483816aa943cb255cbb3f2d48ccb850", "size": 2559, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/environment/environment.hpp", "max_stars_repo_name": "iolojz/UtopiaOS", "max_stars_repo_head_hexsha": "dddf2bf0765c5f7c270ee4302d612a4802bfebb1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] theorem NS4_implies_NS3 [rule_format]: "evs \<in> ns_shared \<Longrightarrow> Key K \<notin> analz (spies evs) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>NA, Agent B, Key K, X\<rbrace>) \<in> set evs \<longrightarrow> Crypt K (Nonce NB) \<in> parts (spies evs) \<longrightarrow...
{"llama_tokens": 10500, "file": null, "length": 9}
import unittest import datetime import numpy as np import pyspark from pyspark.sql.types import Row from schemaflow.types import PySparkDataFrame, infer_schema class PySparkTestCase(unittest.TestCase): @classmethod def setUpClass(cls): conf = pyspark.SparkConf().setMaster('local[1]').setAppName("te...
{"hexsha": "2f04800f17c3f9972cd0266b3882575e840bf203", "size": 3983, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_pyspark_df.py", "max_stars_repo_name": "jorgecarleitao/schemaflow", "max_stars_repo_head_hexsha": "c489170bf720bbbc0a9dc032884d5df79a84094a", "max_stars_repo_licenses": ["MIT"], "max_st...
\lesson{6}{Sep 21 2021 Tue (09:21:04)}{Pure Substances and Mixtures}{Unit 1} \subsubsection*{Classifing matter as a Mixture or Pure Substance based on its Properties} All matter can be classified into two main categories \begin{itemize} \item Mixtures \item Pure Substances \end{itemize} \begin{definition}[M...
{"hexsha": "323286d0a801a7c1673df7e8b24784f6ccf6131f", "size": 3229, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Grade-10/semester-1/hs-chemistry/unit-1/lesson-6.tex", "max_stars_repo_name": "SingularisArt/notes", "max_stars_repo_head_hexsha": "de33e73ca7df9d3adcb094aa9909ea0337e68fad", "max_stars_repo_license...
import os import rnnSMAP from rnnSMAP import runTrainLSTM import matplotlib.pyplot as plt import matplotlib import numpy as np import scipy import pylab import scipy.stats as stats import imp imp.reload(rnnSMAP) rnnSMAP.reload() ################################################# # intervals temporal test doOpt = [] # ...
{"hexsha": "7619d69384b7d7de32a2b9240118eccb164450bc", "size": 4344, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/paper/paperSigma/CONUS_invG_spat.py", "max_stars_repo_name": "fkwai/geolearn", "max_stars_repo_head_hexsha": "30cb4353d22af5020a48100d07ab04f465a315b0", "max_stars_repo_licenses": ["MIT"], "ma...
# -*- coding: utf-8 -*- # @Author: KunchangLi # @Date: 2020-02-11 11:26:51 # @LastEditor: KunchangLi # @LastEditTime: 2020-03-19 08:02:47 # @Oringin: https://github.com/mit-han-lab/temporal-shift-module/blob/master/main.py from collections import OrderedDict import math import os import time import shutil import...
{"hexsha": "c56e423c71d56c5beac4fe75694b5011f6f4cc54", "size": 7942, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_acc.py", "max_stars_repo_name": "Andy1621/CT-Net", "max_stars_repo_head_hexsha": "83badd67881e275fa9e787bc45a890a451027d5f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 29, "max_st...
[STATEMENT] lemma upto_split2: "i \<le> j \<Longrightarrow> j \<le> k \<Longrightarrow> [i..k] = [i..j] @ [j+1..k]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>i \<le> j; j \<le> k\<rbrakk> \<Longrightarrow> [i..k] = [i..j] @ [j + 1..k] [PROOF STEP] using upto_rec1 upto_rec2 upto_split1 [PROOF STATE] p...
{"llama_tokens": 348, "file": null, "length": 2}
SUBROUTINE blk3d(a, bm1, bp1, srces, mblk, nblocks) C----------------------------------------------- C M o d u l e s C----------------------------------------------- USE stel_kinds USE safe_open_mod IMPLICIT NONE C----------------------------------------------- C L o c a l P a r a m e t e ...
{"hexsha": "aabd0c4a0e50b4298eac4d5889eca70d872718f6", "size": 6098, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "LIBSTELL/Sources/Miscel/blk3d.f", "max_stars_repo_name": "jonathanschilling/VMEC_8_00", "max_stars_repo_head_hexsha": "25519df38bf81bcb673dd9374bda11988de2d940", "max_stars_repo_licenses": ["MIT"]...
# R: Cluster Robust Double Machine Learning ## Motivation In many empirical applications, errors exhibit a clustered structure such that the usual i.i.d. assumption does not hold anymore. In order to perform valid statistical inference, researchers have to account for clustering. In this notebook, we will shortly e...
{"hexsha": "0e6cd33bfeace33caa88b2de01b0e67ac2abf169", "size": 36390, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "doc/examples/r_double_ml_multiway_cluster.ipynb", "max_stars_repo_name": "DoubleML/doubleml-docs", "max_stars_repo_head_hexsha": "2d433af9aa4304609c457ddf096b94bfa479d0a3", "max_star...
# Copyright 2021 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
{"hexsha": "3f35c377454414f214ba02804a88352a7515b1f4", "size": 1142, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/linen/linen_activation_test.py", "max_stars_repo_name": "ultrons/flax", "max_stars_repo_head_hexsha": "d10eda85791d5cb9029cf431aae10c7032c2ea8b", "max_stars_repo_licenses": ["Apache-2.0"], "...
import sympy as sp from equations import * eqs = sp.nonlinsolve( [vr_p, vs_p, vv_p, vc_p, wr_p, ws_p, wv_p, wc_p], [vr, wr, vs, ws, vv, wv, vc, wc]) print(eqs)
{"hexsha": "f1f7ac88cc47a52cfae5fa3fffc503a33c6e485d", "size": 170, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_circuits/equilibrium.py", "max_stars_repo_name": "half-potato/playground", "max_stars_repo_head_hexsha": "a7eecdbdd5edc780a5105209df0df6a02b3f62e4", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma mtp_Raise': shows "mtp l (Raise l (Suc k) t) = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. mtp l (Raise l (Suc k) t) = 0 [PROOF STEP] by (induct t arbitrary: k l) auto
{"llama_tokens": 98, "file": "ResiduatedTransitionSystem_LambdaCalculus", "length": 1}
module TAMode using OrdinaryDiffEq using StaticArrays using LinearAlgebra import LabelledArrays using Turing import Statistics import Distances: sqeuclidean include("types.jl") include("reactCode.jl") include("bothLigands.jl") include("compModel.jl") const solTol = 1.0e-6 function domainDef(u, p, t) return any...
{"hexsha": "f70c08fabf51daa3e039d6a87fb4d56a3d29edba", "size": 2505, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TAMode.jl", "max_stars_repo_name": "meyer-lab/TAMode.jl", "max_stars_repo_head_hexsha": "0a24891844846b21e49d26df2a6faea05e95ab7c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import os import numpy as np import tensorflow as tf import pandas as pd def safe_mkdir(path): """ Create a directory if there isn't one already. """ try: os.mkdir(path) except OSError: pass def read_data(file_path): """ Read data into dataframe. Columns include subject IDs an...
{"hexsha": "ec644b1a1d5ee167f09642d5dd79a93b9c4f57d1", "size": 3423, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "kwong22/dx2vec", "max_stars_repo_head_hexsha": "d0252d8db7f4e25bc32cb18173f23488d653c764", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
module SizedIO.IOGraphicsLib where {-# FOREIGN GHC import qualified Graphics.SOE #-} {-# FOREIGN GHC import qualified Graphics.Rendering.OpenGL #-} {-# FOREIGN GHC import qualified GHC.Int #-} {-# FOREIGN GHC import qualified Foreign.C.Types #-} open import Data.Bool.Base open import Data.Char.Base open import Data.N...
{"hexsha": "4e5a138fde6740e352c8207b77e1059e371861ad", "size": 6588, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "src/SizedIO/IOGraphicsLib.agda", "max_stars_repo_name": "agda/ooAgda", "max_stars_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma fres_galois: "(x \<cdot> y \<le> z) = (x \<le> z \<leftarrow> y)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (x \<cdot> y \<le> z) = (x \<le> z \<leftarrow> y) [PROOF STEP] proof [PROOF STATE] proof (state) goal (2 subgoals): 1. x \<cdot> y \<le> z \<Longrightarrow> x \<le> z \<leftarrow> y 2...
{"llama_tokens": 1458, "file": "Quantales_Quantales", "length": 17}
# Copyright (c) SenseTime. All Rights Reserved. from easydict import EasyDict as edict import numpy as np __c = edict() cfg = __c __c.train = edict() __c.train.epoch = 20 __c.train.pretrain_epoch = 1 #for cls loss __c.train.cls_weight = 1.0 #for bbox reg loss __c.train.breg_weight = 1.0 #for corner reg loss __c.t...
{"hexsha": "af33c5d80dcd5ace1516b9bd4439c84b2a6d0928", "size": 7564, "ext": "py", "lang": "Python", "max_stars_repo_path": "config/config.py", "max_stars_repo_name": "feiaxyt/CGACD", "max_stars_repo_head_hexsha": "c138b5f275a57f9c1d398c7c2da3000650968e36", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1...
import numpy as np import cv2 from classifiers import * classifier = DeepFake_Detector_Model() classifier.load('weights/wt.h5') # image_path = r"C:\Users\Varun Chandra\Desktop\BDA Code\test_images\real\real00772.jpg" image_path = r"C:\Users\Varun Chandra\Desktop\BDA Code\test_images\df\df01254.jpg" frame = cv2.imr...
{"hexsha": "e8a07485d573bfa6315dc66287e36ac515fa71fc", "size": 804, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deepfake Code/image.py", "max_stars_repo_name": "Siraz22/FakeNewsCalssifier_NLP", "max_stars_repo_head_hexsha": "8184e63cf90a613d7a93b2115afdbb006add725b", "max_stars_repo_licenses": ["Apache-2.0"]...
import statsmodels.api as sm import numpy as np import scipy as sp from sdar import SDAR_1Dim class _ChangeFinderAbstract(object): def _add_one(self, one, ts, size): ts.append(one) if len(ts) == size+1: ts.pop(0) def _smoothing(self, ts): return sum(ts)/float(len(ts)) cl...
{"hexsha": "d030e1595bce1cb984f8605ee063d72aac395abc", "size": 4123, "ext": "py", "lang": "Python", "max_stars_repo_path": "changefinder/change_finder.py", "max_stars_repo_name": "takeyarise/changefinder", "max_stars_repo_head_hexsha": "ca7b6b89069e58af734c9951cc3012aade9aaa88", "max_stars_repo_licenses": ["MIT"], "max...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/datasets/datasets.kkbox.ipynb (unless otherwise specified). __all__ = ['KKBoxDataset', 'KKBoxDataModule'] # Cell from .bases.ctr import * from ..utils.common_utils import download_url, extract_zip import pandas as pd import numpy as np import os from datetime import da...
{"hexsha": "49183c67b42fab930b92ed29f17b0645aa0cfb93", "size": 2419, "ext": "py", "lang": "Python", "max_stars_repo_path": "recohut/datasets/kkbox.py", "max_stars_repo_name": "sparsh-ai/recohut", "max_stars_repo_head_hexsha": "4121f665761ffe38c9b6337eaa9293b26bee2376", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
[STATEMENT] lemma totalize_Stable_iff [simp]: "(totalize F \<in> Stable A) = (F \<in> Stable A)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (totalize F \<in> Stable A) = (F \<in> Stable A) [PROOF STEP] by (simp add: Stable_def)
{"llama_tokens": 101, "file": null, "length": 1}
"""fontTools.misc.bezierTools.py -- tools for working with bezier path segments.""" __all__ = [ "calcQuadraticBounds", "calcCubicBounds", "splitLine", "splitQuadratic", "splitCubic", "splitQuadraticAtT", "splitCubicAtT", "solveQuadratic", "solveCubic", ] from fontTools.misc.arrayTools import calcBounds impo...
{"hexsha": "9643beb9c22472b136ce8bcd1f8f9fb526f1f46a", "size": 11096, "ext": "py", "lang": "Python", "max_stars_repo_path": "dependencies/FontTools/Lib/fontTools/misc/bezierTools.py", "max_stars_repo_name": "charlesmchen/typefacet", "max_stars_repo_head_hexsha": "8c6db26d0c599ece16f3704696811275120a4044", "max_stars_re...
from numpy.random import Generator from heuristic.classes import Heap, Problem, Solution from heuristic.constants import DEPOT from heuristic.functions import create_single_customer_route def _near_best_insert(nearness: int, current: Solution, rnd_state: Generator) -> Solu...
{"hexsha": "0df4cd5ab89da2d3bfbb4ff7c873abb53b9e004d", "size": 1590, "ext": "py", "lang": "Python", "max_stars_repo_path": "heuristic/repair_operators/_near_best_insert.py", "max_stars_repo_name": "N-Wouda/OR-Analysis", "max_stars_repo_head_hexsha": "2070e2dee49f1556fcaa00044d3512e4ba08550f", "max_stars_repo_licenses":...
(* CharacteristicFunctionv. *) (* author: Peter Urbak *) (* version: 2014-06-02 *) (** * Characteristic Function *) (** ** Requirements *) (* Standard library *) Require Import Arith. (* Own modules *) Require Import Cases. Require Import Power. Require Import StreamCalculus. Require Import DualMoessnersSieve. Requ...
{"author": "dragonwasrobot", "repo": "formal-moessner", "sha": "6cf07fd0051f80e401458bbd255be7659c809dd1", "save_path": "github-repos/coq/dragonwasrobot-formal-moessner", "path": "github-repos/coq/dragonwasrobot-formal-moessner/formal-moessner-6cf07fd0051f80e401458bbd255be7659c809dd1/CharacteristicFunction.v"}
import numpy as np import gym from keras.models import Sequential, Model from keras.layers import Dense, Activation, Flatten, Input, Concatenate from keras.optimizers import Adam from rl.agents import DDPGAgent from rl.memory import SequentialMemory from rl.random import OrnsteinUhlenbeckProcess ENV_NAME = 'Mountai...
{"hexsha": "01dd1373abceaaff5420b9494facedeeae5fc74c", "size": 2964, "ext": "py", "lang": "Python", "max_stars_repo_path": "ucb/examples/ddpg_mountain_car.py", "max_stars_repo_name": "mihrab/rl-exploration", "max_stars_repo_head_hexsha": "e8ea5ca361894a49488d5c0c41f5ce8776b4ac95", "max_stars_repo_licenses": ["MIT"], "m...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from typing import Dict, Union from sklift.metrics import ( uplift_auc_score, perfect_uplift_curve, uplift_curve, qini_curve, perfect_qini_curve, qini_auc_score, ) from src.conf import settings class BaseUpliftModel: d...
{"hexsha": "921b0e9f315a6b53bc5ecc178169c7ce7d8b27e9", "size": 3604, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/base.py", "max_stars_repo_name": "VitalyPetrov/uplifter", "max_stars_repo_head_hexsha": "5e664496e7ca2872572e9065425b420be03eb1c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# Copyright 2020 DeepMind Technologies Limited. # # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
{"hexsha": "bc8f039ccade66a2b4981fa4ec20a7dc6b732657", "size": 5479, "ext": "py", "lang": "Python", "max_stars_repo_path": "byol/utils/optimizers.py", "max_stars_repo_name": "CharlieZhuGJ/deepmind-research", "max_stars_repo_head_hexsha": "22c3daff1966230f934d84355ed157cf8c36f4d3", "max_stars_repo_licenses": ["Apache-2....
""" This file initializes the IscaTools module by setting and determining the ECMWF reanalysis parameters to be analyzed and the regions upon which the data are to be extracted from. Functionalities include: - Setting up of reanalysis module type - Setting up of reanalysis parameters to be analyzed - Setti...
{"hexsha": "319fc5406a6be1c0e2f4334ff148b7cfdb54baef", "size": 6753, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/initialize.jl", "max_stars_repo_name": "natgeo-wong/IscaTools.jl", "max_stars_repo_head_hexsha": "07beaa211480b2be50345c2a255d2beb137732ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import backbone.support.classes_and_adjustments as ca import backbone.support.configurations_variables as confv import numpy as np import backbone.support.directory_file_checking as dfc import os from tqdm import tqdm import backbone.support.data_loading as dl import librosa import backbone.support.calculations as calc...
{"hexsha": "e7078352408707a486cfe46cb7eda4ecc4f7ffef", "size": 6258, "ext": "py", "lang": "Python", "max_stars_repo_path": "backbone/support/data_cleaning.py", "max_stars_repo_name": "Karawalaya/Stress-Detection-Through-Speech-Emotion-Recognition", "max_stars_repo_head_hexsha": "e1ffdb3258bf08806fbc71f35ce3a1187f716e63...
using Distributions using Turing using Test obs12 = [1,2,1,2,2,2,2,2,2,2] @model constrained_simplex_test(obs12) = begin ps ~ Dirichlet(2, 3) for i = 1:length(obs12) obs12[i] ~ Categorical(ps) end return ps end chain = sample(constrained_simplex_test(obs12), HMC(1000, 0.75, 2)) check_numerical(chain, [:...
{"hexsha": "f2568b2dc3b94b133f12730ff40d2d54da96cdaf", "size": 353, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/hmc.jl/constrained_simplex.jl", "max_stars_repo_name": "mohamed82008/Turing.jl", "max_stars_repo_head_hexsha": "70640d35805bb46a54c04d9ff25e5a90f22eee2b", "max_stars_repo_licenses": ["MIT"], "m...
# #Calculating Average Heart Beat Rate from ECG data #Project Reference: http://www.paulvangent.com/2016/03/15/analyzing-a-discrete-heart-rate-signal-using-python-part-1/ # import wfdb as wd import matplotlib.pyplot as plt import numpy as np import glob, os for filename in glob.glob("*.hea"): # Step 1: Getting...
{"hexsha": "98e29cb2c3fc97a9126cc7d86c82a440b3c30159", "size": 3464, "ext": "py", "lang": "Python", "max_stars_repo_path": "ecg_heartbeat.py", "max_stars_repo_name": "learnbanjo/getheartrate", "max_stars_repo_head_hexsha": "66e9b33ee35bfd4e1c146541d396421a40ed73d0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import pytest import numpy as np from scipy.special import erf from sklearn.preprocessing import MinMaxScaler from scipy import signal import scipy from scipy.signal import argrelextrema import plotly.io as pio from scipy.integrate import solve_ivp from vital_sqi.preprocess.preprocess_signal import squeeze_template ...
{"hexsha": "b022430fb626c8202bc9d43b0daa18cec196ec21", "size": 1134, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/common/test_generate_template.py", "max_stars_repo_name": "meta00/vital_sqi", "max_stars_repo_head_hexsha": "7e64a26c9d56af26bfbd25c3ba30211414f5f845", "max_stars_repo_licenses": ["MIT"], "m...
c***FROM: http://www.netlib.org/quadpack/dqagse.f subroutine dqagse(f,a,b,epsabs,epsrel,limit,result,abserr,neval, * ier,alist,blist,rlist,elist,iord,last) c***begin prologue dqagse c***date written 800101 (yymmdd) c***revision date 830518 (yymmdd) c***category no. h2a1a1 c***keywords automatic i...
{"hexsha": "dd10ab2fb763eb86ad8e815f78c6515c022362bb", "size": 17431, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/fortran/quadpack/dqagse.f", "max_stars_repo_name": "dibir-magomedsaygitov/bezier", "max_stars_repo_head_hexsha": "a3c408d11133aa1b97fb6dd673888cf56f03178e", "max_stars_repo_licenses": ["Apach...
\documentclass{article} % amsmath package, useful for mathematical formulas \usepackage{amsmath} % amssymb package, useful for mathematical symbols \usepackage{amssymb} % gensymb package, useful for general symbols, such as degrees celsius \usepackage{gensymb} % appropriate spaces after macro insertions \usepackage{xs...
{"hexsha": "484378f5bc3a30c47dda190e041373b7cf8761da", "size": 11298, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Protein_Aggregation_Yeast_Stress.tex", "max_stars_repo_name": "ewallace/protocols", "max_stars_repo_head_hexsha": "816d0a6a61bd2b7588c500f9516f73aaa1d8e0cd", "max_stars_repo_licenses": ["CC0-1.0"],...
! Verify that the driver correctly rejects invalid values for -fget-definition !----------- ! RUN LINES !----------- ! RUN: not %flang_fc1 -fsyntax-only -fget-definition 45 1 2 %s 2>&1 | FileCheck --check-prefix=OK %s ! RUN: not %flang_fc1 -fsyntax-only -fget-definition a 1 1 %s 2>&1 | FileCheck --check-prefix=ERROR-a...
{"hexsha": "5e6d5ff2345fe0d872b99992f409f2f3f1128e98", "size": 1750, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "flang/test/Driver/get-definition.f90", "max_stars_repo_name": "mkinsner/llvm", "max_stars_repo_head_hexsha": "589d48844edb12cd357b3024248b93d64b6760bf", "max_stars_repo_licenses": ["Apache-2.0"]...
[STATEMENT] lemma nu_diagonal_1: assumes "isotone (\<lambda>x . \<nu> (\<lambda>y . f x y))" and "\<forall>x . has_greatest_fixpoint (\<lambda>y . f x y)" and "has_greatest_postfixpoint (\<lambda>x . \<nu> (\<lambda>y . f x y))" shows "\<nu> (\<lambda>x . f x x) = \<nu> (\<lambda>x . \<nu> (\<lambda>y...
{"llama_tokens": 1830, "file": "Stone_Relation_Algebras_Fixpoints", "length": 14}
# coding=utf-8 """ GraN-DAG Copyright © 2019 Authors of Gradient-Based Neural DAG Learning 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": "cc83666a692a46ee0f4a852eb0cee71c7e8aad6c", "size": 7282, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "asleshapokhrel/GraN-DAG", "max_stars_repo_head_hexsha": "c000b29e98b272b022a9479287fb120b2e6c6d81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
@testset "parse single session" begin ses_path = joinpath( @__DIR__, "data", "bids_root", "sub-subtest", "ses-1" ) my_ses = Session(ses_path) @test my_ses.path == ses_path @test my_ses.identifier == "1" @test my_ses.scans_detail == DataFrame() @test ...
{"hexsha": "1e0d6ca852b2420a28925720e8787439257183bf", "size": 462, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Session.jl", "max_stars_repo_name": "TRIImaging/BIDSTools.jl", "max_stars_repo_head_hexsha": "3ac2b9477a51514fefda4714d3416c7136ffe029", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7...
from matplotlib import colors import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.io.shapereader import Reader import cartopy.io.img_tiles as cimgt from sklearn import neighbors import numpy as np from sys import float_info from ela.textproc import * from ela.classification import KNN_WEIGHTING ...
{"hexsha": "cda88f0518364c6eb8aeb7e9a621a949067d0f6b", "size": 13205, "ext": "py", "lang": "Python", "max_stars_repo_path": "ela/visual.py", "max_stars_repo_name": "Sudhir22/pyela", "max_stars_repo_head_hexsha": "657d8f927e9acd47219dd13e6f3903ce8c7f124f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
#!/usr/bin/python # -*- encoding: utf-8 -*- from model import BiSeNet import torch import numpy as np from PIL import Image import torchvision.transforms as transforms import cv2 """ 测试单张图片 """ def vis_parsing_maps(im, parsing_anno, stride, save_im=False, save_path='parsing_torch.jpg'): # Colors for all 20 parts...
{"hexsha": "76f891aac49b9255c79a036ee9b18852784dc305", "size": 3176, "ext": "py", "lang": "Python", "max_stars_repo_path": "dl/face-parse/test1.py", "max_stars_repo_name": "showkeyjar/beauty", "max_stars_repo_head_hexsha": "7c944cf896c899d9e23b2e50e293103bb03fe6cd", "max_stars_repo_licenses": ["MulanPSL-1.0"], "max_sta...
[STATEMENT] lemma split_face_edges_f_vs2: assumes vors: "pre_split_face f ram1 ram2 vs" "vs1 = between (vertices f) ram1 ram2" "vs1 \<noteq> []" "between (vertices f) ram2 ram1 = []" shows "edges f = {(ram2, ram1) , (ram1, hd vs1), (last vs1, ram2)} \<union> Edges vs1" (is "...
{"llama_tokens": 41229, "file": "Flyspeck-Tame_FaceDivisionProps", "length": 105}
import collections from theanomodels.datasets.load import loadDataset import numpy as np from models import NestD def infer_slice(idx,n): assert isinstance(idx,slice),'idx must be a slice' start = idx.start or idx.start if idx.start >= 0 else n+idx.start stop = idx.stop or idx.stop if idx > 0 else n+idx.st...
{"hexsha": "24d100fd3b76db3c7a2f84e38361182d7036349f", "size": 7044, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets.py", "max_stars_repo_name": "clinicalml/vae_ssl", "max_stars_repo_head_hexsha": "8139f40b3326624b57f90d8660bde878fe0ed3c7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "max_...
""" ``` genlasso( X :: AbstractMatrix{T}, y :: AbstractVector{T}; path :: Bool = true, ρ :: Union{AbstractVector, Number} = zero(T), D :: AbstractMatrix{T} = eye(size(X, 2)), solver = ECOSSolver(maxit=10e8, verbose=0) ) ``` Solve generalized lasso problem by reformu...
{"hexsha": "5df34b22fe191288bcd06cd8c65568967b34ef81", "size": 2738, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/genlasso.jl", "max_stars_repo_name": "advancedML/ConstrainedLasso.jl", "max_stars_repo_head_hexsha": "3646088d4e553659d00011ed5b3ea93ed38634b2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
"""Assortment of layers for use in models.py. Author: Chris Chute (chute@stanford.edu) """ from unicodedata import bidirectional from numpy import True_, s_ import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torch.auto...
{"hexsha": "d7414b1a6d3fccf02ab62f57ef4d75d67965840d", "size": 23913, "ext": "py", "lang": "Python", "max_stars_repo_path": "layers.py", "max_stars_repo_name": "nikcaryo/cs224n-squad", "max_stars_repo_head_hexsha": "4bebca38f3cbaab8c80cd306863d6dca1d9cdf76", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# -*- coding: utf-8 -*- # # Copyright 2017-2019 Data61, CSIRO # # 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 ...
{"hexsha": "7eee00b6aceef5ef72c53319456fd471aa5a96fd", "size": 5849, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/test_unsupervised_sampler.py", "max_stars_repo_name": "amaiya/stellargraph", "max_stars_repo_head_hexsha": "ef5588038896c1a65db467a768f2e023c6562611", "max_stars_repo_licenses": ["Apach...
! Parameters: ! f_p The pointer to allocate ! {{for;0;{{n}};1;d%d;, }} The dimension of the array to allocate. function {{name}}(f_p, {{for;0;{{n}};1;d%d;, }}) result(rc) use iso_c_binding implicit none ! Parmeters {{type}}, dimension({{for;0;{{n}};1;:;,}}), allocatable :: f_p {{for;0;{{n}};1;i...
{"hexsha": "8ebfa6e2f2f0698683028b1d1da00c07c2b1ddbb", "size": 496, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "examples/allocate.in.f90", "max_stars_repo_name": "elezar/gomodgen", "max_stars_repo_head_hexsha": "3316c4dde76091dc44fb06e2a564129e2780b479", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # all the formulas are from https://cs.nyu.edu/~roweis/papers/sne_final.pdf # and http://www.cs.toronto.edu/~hinton/absps/tsne.pdf PERPLEXITY=5 g_kernel=1 EPOCHS=2000 LR=200 MOMENTUM=0.99 def getKey(item): return item[1] ...
{"hexsha": "f3b502afae042db3b85b36acb9c3ac7746e8d251", "size": 4064, "ext": "py", "lang": "Python", "max_stars_repo_path": "unsupervised_learning/dimensionality_reduction/t_distributed_stochastic_neighbor_embedding/sample.py", "max_stars_repo_name": "niektuytel/Machine_Learning", "max_stars_repo_head_hexsha": "0cd5656c...
"""Symbolic routines Author: Dr.-Ing. Mauricio Fernández This module offers a collection of tensor routines in sympy. """ # %% Import import sympy as spy import numpy as np from itertools import permutations import tensor_routines as tr # %% Generate tensors def t(n: int, s: str = "a", dims: list = None) -> spy...
{"hexsha": "6359a725d49ea5700831dcfab4b77bdfc7503ead", "size": 14027, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensor_routines/sympy_routines.py", "max_stars_repo_name": "mauricio-fernandez-l/tensor_routines", "max_stars_repo_head_hexsha": "10bff2cad355464208673d25d96a30d0192fa6dd", "max_stars_repo_licens...
""" Common routines for models in TensorFlow 2.0. """ __all__ = ['is_channels_first', 'get_channel_axis', 'round_channels', 'get_im_size', 'interpolate_im', 'ReLU6', 'HSwish', 'PReLU2', 'get_activation_layer', 'flatten', 'MaxPool2d', 'AvgPool2d', 'GlobalAvgPool2d', 'BatchNorm', 'InstanceNorm'...
{"hexsha": "fe239f155c12850b1185bf1cb2a0b8285a442770", "size": 90559, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow2/tf2cv/models/common.py", "max_stars_repo_name": "Will-jing/imgclsmob", "max_stars_repo_head_hexsha": "2c1ece74a23b94c6a076200edc0dee28f162d2cd", "max_stars_repo_licenses": ["MIT"], "m...
import cv2 as cv import numpy as np from matplotlib import pyplot as plt plt.rcParams["font.sans-serif"] = ["FangSong"] # 用来正常显示中文 plt.rcParams["axes.unicode_minus"] = False # 用来正常显示负号 def getGaussianPE(src): """ 计算负高斯势能(Negative Gaussian Potential Energy, NGPE) 输入:单通道灰度图src 输出:无符号的浮点型单通道,取值0.0...
{"hexsha": "a317c90c0c0b2e81cc4888a50197b7c035ad1cdd", "size": 4267, "ext": "py", "lang": "Python", "max_stars_repo_path": "04 ActiveContourModel-SnakeModel/mySnake.py", "max_stars_repo_name": "QCHighing/pyImageProcessing", "max_stars_repo_head_hexsha": "7b56aaf385acd6dec8fd80ae0a69bdc317255551", "max_stars_repo_licens...
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sklearn from sklearn.model_selection import train_test_split from sklearn import svm from sklearn.linear_model import LinearRegression import seaborn as sns # Loading dataset df = pd.read...
{"hexsha": "1640a32febb62d67b33cf58f61eeef472b527f7b", "size": 1314, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_regsession.py", "max_stars_repo_name": "cristian-nitu/final-project", "max_stars_repo_head_hexsha": "70ca14469eb9ea2cca8fb116b3a0cdce0f32100b", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import cv2 import gym import numpy as np from utils.os_utils import remove_color class AtariNormalEnv(): def __init__(self, args): self.args = args if args.sticky: # frameskip is deterministic self.env = gym.make(args.env+'Deterministic-v0').env else: sel...
{"hexsha": "65c3b18f3421ab5b08443cffda616b332f01e3f6", "size": 2996, "ext": "py", "lang": "Python", "max_stars_repo_path": "envs/normal_atari.py", "max_stars_repo_name": "Stilwell-Git/Randomized-Return-Decomposition", "max_stars_repo_head_hexsha": "bc804736cbac0ab7ef2eb241d5b17f4a5e2e80a2", "max_stars_repo_licenses": [...
using RefractiveIndex using Test function midrange(material) λmin, λmax = material.λrange return λmin + 0.5(λmax - λmin) end function testRM(material, n_ref) n = material(midrange(material)) # Compare only fractional parts isapprox(n_ref % 1, n % 1, rtol=1e-3) end @testset "RefractiveIndex.jl" be...
{"hexsha": "fe30e50ef11539e93e79eb88eb8ab05662eb9eb7", "size": 1414, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "stillyslalom/RefractiveIndex.jl", "max_stars_repo_head_hexsha": "e18355287d4aa6ff8ad87bfb6bded10e1832c2b4", "max_stars_repo_licenses": ["MIT"], "max_stars...
West Village is a campus neighborhood located on UC Davis land adjacent to the core campus in Davis, California. It is a mixeduse community that will eventually include student housing, single family homes, retail, and recreation facilities as well as a community college, the Sacramento City College Davis Center, whi...
{"hexsha": "5b254cd7e80e805b915b52d43fce60b723421b6e", "size": 19359, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/West_Village.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
""" ``` mddf_linkedcells_parallel(trajectory::Trajectory, options::Options,samples::Samples, RNG, mddf_compute!) ``` Computes the MDDF using linked cells, in parallel. """ function mddf_linkedcells_parallel( trajectory::Trajectory, options::Options, samples::Samples, RNG, mddf_compute!, ) ...
{"hexsha": "3df09a64aa60310f395b49154f386eaee4bdea77", "size": 4255, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mddf_linkedcells_parallel.jl", "max_stars_repo_name": "m3g/MDDF", "max_stars_repo_head_hexsha": "efbc8e0dcf426c9b2246217eb9edaf4605318e84", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np class RandomPlayer(): def __init__(self, game): self.game = game def play(self, board): valids = self.game.getValidMoves(board, 1).flatten() nonzero = np.nonzero(valids) rand_ind = np.random.randint(len(nonzero)) move = nonzero[0][rand_ind] re...
{"hexsha": "d613fcd7492cc405fdcb6dccd49b6eb8ee672a09", "size": 331, "ext": "py", "lang": "Python", "max_stars_repo_path": "checkers/RandomPlayer.py", "max_stars_repo_name": "DomFC/alpha-zero-general", "max_stars_repo_head_hexsha": "865a09b397a7776d2b0e07022bc840c293843f22", "max_stars_repo_licenses": ["MIT"], "max_star...