text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
from __future__ import division import numpy as np from operator import add from functools import reduce from scipy.stats import gamma import revrand.basis_functions as bs from revrand.btypes import Parameter, Positive, Bound from revrand.utils import issequence def test_simple_concat(make_gaus_data): X, _, _,...
{"hexsha": "0eca6bdbbb0d7528dd37da320092203c5aa70aa1", "size": 7043, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_bases.py", "max_stars_repo_name": "smokarizadeh/revrand", "max_stars_repo_head_hexsha": "52288c48eb3c3d5d887292ff669b33babdefcda7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
// Copyright 2014-2015 SDL plc // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing,...
{"hexsha": "83a2427b895dcafdedf1339b18eff2b91f77ada0", "size": 11335, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "sdl/Util/Index.hpp", "max_stars_repo_name": "sdl-research/hyp", "max_stars_repo_head_hexsha": "d39f388f9cd283bcfa2f035f399b466407c30173", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn from sklearn import metrics from sklearn.manifold import TSNE @torch.no_grad() def predict(model, dataloader): """Returns: numpy arrays of true labels and predicted probabilities.""" device = torch.device("cuda" if torch.cud...
{"hexsha": "c8f774e3c6fbf368570bb2b243d5682813640ff6", "size": 1785, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "yuanx749/deep-vaccine", "max_stars_repo_head_hexsha": "11c2e7fbb1c89a08f96bada1153bd56577e592ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# Adapted from https://github.com/huggingface/transformers/blob/21da895013a95e60df645b7d6b95f4a38f604759/examples/run_glue.py # for training GPT-2 medium for sequence classification with GeDi objective # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2...
{"hexsha": "4c2e3da4306c95f681d2f8cbd5f6906090cf868f", "size": 47681, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_GeDi.py", "max_stars_repo_name": "hkchae96/control_generation_DA", "max_stars_repo_head_hexsha": "c5c1f9c0b49a0f6f6a18210621ee7a96c3023a81", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
#ifndef LIBKRIGING_BINDINGS_OCTAVE_TOOLS_MX_ACCESSOR_HPP #define LIBKRIGING_BINDINGS_OCTAVE_TOOLS_MX_ACCESSOR_HPP #include <armadillo> #include <cstring> #include "ObjectAccessor.hpp" #include "mex.h" template <typename T> struct converter_trait { using type = T; }; template <> struct converter_trait<ObjectRef> {...
{"hexsha": "64d756c43c72ff868c6d1cd6fc4bdbaf372dc365", "size": 3065, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "bindings/Octave/tools/mx_accessor.hpp", "max_stars_repo_name": "yannrichet/libKriging", "max_stars_repo_head_hexsha": "25475d1de02d518401183e93f6a0fa5c12b3c96b", "max_stars_repo_licenses": ["Apache-...
////////////////////////////////////////////////////////////////////////////////////////////// /// \file BlockVector.hpp /// /// \author Sean Anderson ////////////////////////////////////////////////////////////////////////////////////////////// #ifndef STEAM_BLOCK_VECTOR_HPP #define STEAM_BLOCK_VECTOR_HPP #include <...
{"hexsha": "db9e54f5bc7ed01d6b6519b6522433c149fcbaf3", "size": 4011, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/steam/blockmat/BlockVector.hpp", "max_stars_repo_name": "neophack/steam", "max_stars_repo_head_hexsha": "28f0637e3ae4ff2c21ad12b2331c535e9873c997", "max_stars_repo_licenses": ["BSD-3-Clause"...
import tensorflow as tf import os import time import numpy as np class bcolors: WARNING = '\033[93m' ENDC = '\033[0m' #Check if MKL is enabled import tensorflow.python.framework as tff print(bcolors.WARNING + "MKL Enabled : ", tff.test_util.IsMklEnabled(), bcolors.ENDC) #Set threads tf.config.threading.set...
{"hexsha": "6a91e91ba2583f5a488c7953a1c612fcdb23d449", "size": 1221, "ext": "py", "lang": "Python", "max_stars_repo_path": "EagerVsGraphVsC/cse/cse_tf_graphMode.py", "max_stars_repo_name": "as641651/LinearAlgera-Awareness-Benchmark", "max_stars_repo_head_hexsha": "1fbbca4229d5869f35a20193c6f23414fbc81ab7", "max_stars_r...
import numpy as np from ._CFunctions import _CTraceField import PyFileIO as pf from .ct import ctBool,ctInt,ctIntPtr,ctDouble,ctDoublePtr,ctDoublePtrPtr import matplotlib.pyplot as plt from .PlotPlanet import PlotPlanetXY, PlotPlanetXZ, PlotPlanetYZ class TraceField(object): def __init__(self,*args,**kwargs): ''' ...
{"hexsha": "c4890a23527edb8ab2ef7ef46b21d99a599ca7a8", "size": 18673, "ext": "py", "lang": "Python", "max_stars_repo_path": "KT17/TraceField.py", "max_stars_repo_name": "mattkjames7/KT17", "max_stars_repo_head_hexsha": "5550afeb9fea4255b0f0105021df23743c14744f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,...
""" test data for pose functions """ # global import ivy.numpy import numpy as np # local import ivy_mech from ivy_mech_tests.test_orientation.orientation_data import OrientationTestData class PoseTestData(OrientationTestData): def __init__(self): super(PoseTestData, self).__init__() # cartesi...
{"hexsha": "5023b2ae7b9728333f3b5c7f105b11ce1aa2cc94", "size": 2341, "ext": "py", "lang": "Python", "max_stars_repo_path": "ivy_mech_tests/test_pose/pose_data.py", "max_stars_repo_name": "unifyai/mech", "max_stars_repo_head_hexsha": "d678c8732ee5aba4a92fb37b96519cd06553c0c6", "max_stars_repo_licenses": ["Apache-2.0"], ...
module Hello using Bukdu struct WelcomeController <: ApplicationController conn::Conn end function index(::WelcomeController) render(Text, "hello") end function __init__() routes() do get("/", WelcomeController, index) end end function julia_main()::Cint try port = isempty(ARGS)...
{"hexsha": "1726ec872ef3d863301b45f4dcbdf76eaa34d358", "size": 501, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/app/Hello/src/Hello.jl", "max_stars_repo_name": "wookay/Bukdu.jl", "max_stars_repo_head_hexsha": "a2b3e9f5ce46bb50af3749bd9846adc03ecc2cb1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\section{Margin Classification}
{"hexsha": "4a89578641c6a496b929083710160d2a6fdd65e3", "size": 32, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "study_guide/sections/margin_classification.tex", "max_stars_repo_name": "nextBillyonair/StudyGuide", "max_stars_repo_head_hexsha": "3fbb85c1f738878935c18280d728ca7e92aa1414", "max_stars_repo_licenses"...
import numpy as np import typing as typ from . import core from . import data def meanap(predicts: typ.List[data.DetectResult], grandtruths: typ.List[data.DetectResult], num_classes: int, iou_threshold: float = 0.5): nm_existed_classes = 0 ap_existed_classes = 0 for presitions, recalls in roccurve(predict...
{"hexsha": "3bb0a170cb569824a219fc91767b62205719dfd2", "size": 4871, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/metrics.py", "max_stars_repo_name": "namoshika/ssd_keras", "max_stars_repo_head_hexsha": "8ac4db114d310ad6f904731218fa4986a3178fd8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import numpy as np from time import time import os import multiprocessing as mp import pickle from flare.mgp.mgp import MappedGaussianProcess from flare.env import AtomicEnvironment from flare.gp import GaussianProcess from flare.struc import Structure from flare.output import Output from flare.otf_parser import OtfAn...
{"hexsha": "6431431a19d58f5d3972beb98b648527c76c0055", "size": 2416, "ext": "py", "lang": "Python", "max_stars_repo_path": "Hierarchical/mgp-2/train_hyps/opt_hyps.py", "max_stars_repo_name": "YuuuuXie/Stanene_FLARE", "max_stars_repo_head_hexsha": "b6678927dd7fe3b6e6dc405a5f27d1a3339782eb", "max_stars_repo_licenses": ["...
module constants implicit none integer, parameter :: quad = selected_real_kind(33, 4931) real(quad), parameter :: q_pi = 3.1415926535897932384626433832795 end module constants
{"hexsha": "415e02a4069811865d185b45b1134d7a2a7346cc", "size": 183, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "constants.f90", "max_stars_repo_name": "pgniewek/hhg-1d", "max_stars_repo_head_hexsha": "7265e814c00bdccdaba54be40f231511e18a90b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# -*- coding: utf-8 -*- """ Created on Sat Mar 5 08:05:02 2016 plot potentials on MEA with a 11x11 figure. @author: young """ import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar def find_extremum(listName): minValue = np.min(listName) maxVal...
{"hexsha": "818df4e2ec87c161bab71ac240ad5d4a4d328cec", "size": 1472, "ext": "py", "lang": "Python", "max_stars_repo_path": "simulation-code/plot_LFPonMEA.py", "max_stars_repo_name": "young24/LFP-simulation-in-turtle-brain", "max_stars_repo_head_hexsha": "cd801dc02804d027b7c245b0f0ca9c8b00f8d450", "max_stars_repo_licens...
#!/usr/bin/env python3 import os import time import cv2 import numpy as np import pickle as pkl import png import nori2 from ip_basic import depth_map_utils, depth_map_utils_ycb from ip_basic import vis_utils import sys sys.path.append('..') from lib.utils.my_utils import my_utils from neupeak.utils.webcv2 import ims...
{"hexsha": "74b6ec93eb37c07ca5ab692521e7ca22a9a331f8", "size": 4844, "ext": "py", "lang": "Python", "max_stars_repo_path": "pvn3d/lib/utils/ip_basic/ycb_fill_depth.py", "max_stars_repo_name": "JiazeWang/PVN3D", "max_stars_repo_head_hexsha": "07241f5e0de488c123cd78f516a707bff207c2e0", "max_stars_repo_licenses": ["MIT"],...
\section{Syntactic Guardedness} \label{sec:synt-guard-1} % Sune %####### % Hvad er syntactic guardedness? % Hvordan virker det? % Hvorfor syntactic guardedness? % Hvor kommer syntactic guardedness fra? Hvilken problemstilling løser det? % Hvor kommer syntactic guardedness til kort? % Ny viden: Hvordan syntactic guarde...
{"hexsha": "91be11a92c3d99f0ef5390426320743d90007d43", "size": 4497, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/background/syntactic_guardedness.tex", "max_stars_repo_name": "sualitu/thesis", "max_stars_repo_head_hexsha": "22d2cb4f21dc7c2dab011da5bb560c003650a2bc", "max_stars_repo_licenses": ["MIT"],...
# -*- coding: utf-8 -*- """ For equal incident photon flux, compare the SNR. """ import numpy as np import glob import tomopy import dxchange import matplotlib.pyplot as plt from project import * from simulator import * from sinogram import * from instrument import * from sample import * if __name__ == '__main__': ...
{"hexsha": "a3a6edb0939312ed9c5b5155151297f69b1962d3", "size": 1526, "ext": "py", "lang": "Python", "max_stars_repo_path": "sim_shepp.py", "max_stars_repo_name": "mdw771/tomosim", "max_stars_repo_head_hexsha": "7736031aee861cd0ac995d83c2231a7df4fc3365", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "...
[STATEMENT] lemma Suc_m_minus_n[simp]: shows "m \<ge> n \<longrightarrow> Suc m - n = Suc (m - n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. n \<le> m \<longrightarrow> Suc m - n = Suc (m - n) [PROOF STEP] by auto
{"llama_tokens": 98, "file": "CISC-Kernel_trace_Rushby-with-Control_List_Theorems", "length": 1}
#-*- coding: utf8 from __future__ import division, print_function from pyksc.dist import dist_all import numpy as np def cost(tseries, assign, centroids, dist_centroids=None): num_series = tseries.shape[0] if dist_centroids is None: dist_centroids = dist_all(centroids, tseries) cost_f ...
{"hexsha": "325e59488bec1ab5d7d879cc95ec077c6813bc42", "size": 2358, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyksc/metrics.py", "max_stars_repo_name": "flaviovdf/pyksc", "max_stars_repo_head_hexsha": "6ba8988c7fad63366dc2b8d005d0779971e129c5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
#!/usr/bin/env python3 import torch def _cross2d(a, b): """Cross product in 2D.""" return a[:, 0] * b[:, 1] - a[:, 1] * b[:, 0] def _remove(T, idx_remove): """Remove an element from the list of points for each batch element.""" num_boxes = T.shape[0] num_points_left = T.shape[1] # Define wh...
{"hexsha": "1851922e80a5f9a775c9df785867bb98386a7b6d", "size": 5020, "ext": "py", "lang": "Python", "max_stars_repo_path": "dafne/utils/sort_corners.py", "max_stars_repo_name": "qilei123/DAFNe", "max_stars_repo_head_hexsha": "6ae6c17ecef6b88e21843969e456fc83b34da0fe", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np def identity_scov(s, y, k=1, e=1): """ Useful when you don't want to waste compute """ # See equal_managers for usage example n_dim = len(y) return np.eye(n_dim)
{"hexsha": "0b53f6dc318fc713007db628f7e8e443d6d9f6bb", "size": 200, "ext": "py", "lang": "Python", "max_stars_repo_path": "precise/skaters/covariance/identity.py", "max_stars_repo_name": "microprediction/precise", "max_stars_repo_head_hexsha": "0aa7c69c3c280926cec03fb6fc0934a6193da440", "max_stars_repo_licenses": ["MIT...
from typing import Iterable, List, Tuple from common.constants import DEFAULT_SCALE_RADIUS, DEFAULT_SCALE_WL from spectrum import Spectrum def align_wavelengths( s0: Iterable, s1: Iterable, wl_low: float = None, wl_high: float = None ) -> set: """ Takes in an iterable (such as a Spectrum or list of wavelengt...
{"hexsha": "f073274be6757e09e8098433e2820401c42eba1b", "size": 5950, "ext": "py", "lang": "Python", "max_stars_repo_path": "spectrum/utils.py", "max_stars_repo_name": "chris-wahl/SDSS_QSO", "max_stars_repo_head_hexsha": "35807ecbc819d89fd4141748b31ce2a51a1c2d34", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import logging from Simulation import Position from Utilities import Consts, TimeHelper from scipy.stats import norm from Utilities import DataHelper from Simulation.Statistics import Stats logger = logging.getLogger("Portfolio") # Redis with all coins market data coins_market_data_getter = DataHelper.DataHelper() ...
{"hexsha": "7116c62af757562a9c8311a9af23ff036a2cde98", "size": 22601, "ext": "py", "lang": "Python", "max_stars_repo_path": "Simulation/Portfolio.py", "max_stars_repo_name": "ACCrypto-io/TradingSimulator", "max_stars_repo_head_hexsha": "8b3ebecde2496d0e00dd4442ab57e92f4cda5de3", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np import onnx import onnxruntime from dnnv.nn.converters.onnx import * from dnnv.nn.operations import * def test_Cast_consts(): x = np.arange(12).reshape((1, 3, 2, 2)) op = Cast(x, onnx.TensorProto.FLOAT) onnx_model = convert(OperationGraph([op])) results = onnxruntime.backend.run(...
{"hexsha": "f2e9e4084bf8d5ad96098b56e02c6ad022c23874", "size": 796, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit_tests/test_nn/test_converters/test_onnx/test_Cast.py", "max_stars_repo_name": "samysweb/dnnv", "max_stars_repo_head_hexsha": "58fb95b7300914d9da28eed86c39eca473b1aaef", "max_stars_repo_l...
from flee import flee from datamanager import handle_refugee_data from datamanager import DataTable import numpy as np import outputanalysis.analysis as a import sys """ Generation 1 code. Incorporates only distance, travel always takes one day. """ #Burundi Simulation def date_to_sim_days(date): return DataTable...
{"hexsha": "f7c8d94754bfa695ade7d0fec22501f95614a64d", "size": 11843, "ext": "py", "lang": "Python", "max_stars_repo_path": "burundi.py", "max_stars_repo_name": "alirezajahani60/flee-release", "max_stars_repo_head_hexsha": "33646c2224a7ef3677f82c11bf7525083e9e649c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import numpy as np import cv2 import math def find_distance_dot2dot(point1, point2): return math.sqrt((point1[0] - point2[0]) * (point1[0] - point2[0]) + (point1[1] - point2[1]) * (point1[1] - point2[1])) def center(points): center_x = (points[0][0][0] + points[1][0][0] + points[2][0][0] + points[3][0][0])/4....
{"hexsha": "9b35b719d50f5919145ae6984365ef2e4e432afd", "size": 4261, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/signal_sign_detection/creating_training_dataset.py", "max_stars_repo_name": "Kihoon0716/self_driving-loading-", "max_stars_repo_head_hexsha": "084874ca1558ee92883bb32a74aa72726ac31744", "max_s...
{-# OPTIONS --rewriting --allow-unsolved-metas #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite postulate I : Set A : I → Set HEq : (i0 i1 : I) → A i0 → A i1 → Set HEq-on-refl : (i : I) (a0 a1 : A i) → HEq i i a0 a1 ≡ I {-# REWRITE HEq-on-refl #-} record Con : Set where field...
{"hexsha": "e38e6e2c4843dffbb98ad120ada1b472199f5eb3", "size": 562, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Succeed/Issue4721.agda", "max_stars_repo_name": "cagix/agda", "max_stars_repo_head_hexsha": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_...
from strategy.astrategy import AStrategy from datetime import datetime, timedelta, timezone from sklearn.impute import SimpleImputer import numpy as np import math import pandas as pd import pickle class QuarterlyFinancial(AStrategy): def __init__(self,year,quarter,ticker,yearly_gap,training_years): """ ...
{"hexsha": "0d627c678fe842c3981bf3f214b5dc58ef96cdc8", "size": 5328, "ext": "py", "lang": "Python", "max_stars_repo_path": "strategy/quarterly_financial.py", "max_stars_repo_name": "ajmal017/longshot", "max_stars_repo_head_hexsha": "0978fb107ab83034372e0e633483d381ac06f25f", "max_stars_repo_licenses": ["MIT"], "max_sta...
section \<open> Lifting Expressions \<close> theory utp_lift imports utp_alphabet utp_lift_pretty begin subsection \<open> Lifting definitions \<close> text \<open> We define operators for converting an expression to and from a relational state space with the help of alphabet extrusion and restriction. In ge...
{"author": "isabelle-utp", "repo": "utp-main", "sha": "27bdf3aee6d4fc00c8fe4d53283d0101857e0d41", "save_path": "github-repos/isabelle/isabelle-utp-utp-main", "path": "github-repos/isabelle/isabelle-utp-utp-main/utp-main-27bdf3aee6d4fc00c8fe4d53283d0101857e0d41/utp/utp_lift.thy"}
theory Sound imports op HHL begin (*The definition for the soundness of sequtial process*) definition Valid :: "fform => proc => fform => fform => bool" ("Valid _ _ _ _") where "Valid p Q q H = (ALL f d f' d'. (evalP (Q, f, d) = (Skip, f', d')) --> evalF (last(f(d)), p) --> (evalF (last(f'(d')),...
{"author": "wangslyl", "repo": "hhlprover", "sha": "500e7ae1f93f0decb67b55ec2e0b4f756ae9ede0", "save_path": "github-repos/isabelle/wangslyl-hhlprover", "path": "github-repos/isabelle/wangslyl-hhlprover/hhlprover-500e7ae1f93f0decb67b55ec2e0b4f756ae9ede0/HHLProver/Sound.thy"}
import numpy as np import torch as th from gym import spaces from go_explore.cells import DownscaleObs, ImageGrayscaleDownscale from go_explore.feature_extractor import GoExploreExtractor def test_feature_extractor(): observation_space = spaces.Dict({"observation": spaces.Box(-1, 1, (2,)), "goal": spaces.Box(-1,...
{"hexsha": "930d3baa285a558128eb7f6e2fc4916e7f43ddbf", "size": 1590, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/feature_extractor_test.py", "max_stars_repo_name": "qgallouedec/go-explore", "max_stars_repo_head_hexsha": "87416a00ade6d35011ce1de9af883a942ec21ccc", "max_stars_repo_licenses": ["MIT"], "ma...
from discoverlib import geom from discoverlib import graph import math import numpy import os import scipy.ndimage PATH = '/data/spacenet2017/favyen/segmentation_model4d3/outputs' OUT_PATH = '/data/spacenet2017/favyen/segmentation_model4d3_newskeleton/graphs' TOL = 10 THRESHOLD = 20 circle_mask = numpy.ones((2*TOL+1...
{"hexsha": "86332b86c356af45a397fa8afae479d5015e4422", "size": 2211, "ext": "py", "lang": "Python", "max_stars_repo_path": "fbastani-solution/skeleton.py", "max_stars_repo_name": "Hulihrach/RoadDetector", "max_stars_repo_head_hexsha": "9fedd537d7d3a5c81a60562a185fc13370af9a99", "max_stars_repo_licenses": ["Apache-2.0"]...
#!/usr/bin/env python """Test a neural network.""" # Third party modules import numpy # First party modules import nntoolkit.evaluate as evaluate import nntoolkit.utils as utils def main(model_file: str, test_data: str, verbose=True) -> float: """ Evaluate a model Parameters ---------- model_f...
{"hexsha": "c5fb46bc352ea0816dafa5e13177c7e79086f325", "size": 1084, "ext": "py", "lang": "Python", "max_stars_repo_path": "nntoolkit/test.py", "max_stars_repo_name": "MartinThoma/nntoolkit", "max_stars_repo_head_hexsha": "1f9eed7b6d6fdacc706060d9cbfefaa9c2d0dbf8", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
"""A data cleaning Python tool.""" import sys import os # print("Current working directory") # print(os.getcwd()) # get current working directory import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import missingno as msno import random import pprint from IPython.core.displa...
{"hexsha": "a4b6a8b23cd627158998df3a95efa38ec94e15e9", "size": 50467, "ext": "py", "lang": "Python", "max_stars_repo_path": "dcbot/dcbot.py", "max_stars_repo_name": "stger040/dcbot", "max_stars_repo_head_hexsha": "ec052da8c6f6092ec71435c03a31d62d5f5ff8ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
\documentclass[12pt]{article} \usepackage{fullpage} \usepackage{color} \newcommand{\TBD}[1]{{\color{blue}{\bf TBD:} #1}} \begin{document} \section{C-style interface to the MDD Library} \subsection{Forest Operations} \subsubsection{int create\_forest()} Initializes the mdd\_forest. If the forest is already init...
{"hexsha": "33e6f70ab0521f63746555bba61ee0bbe7c0e912", "size": 3945, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "meddly/manual/InterfaceDoc.tex", "max_stars_repo_name": "trolando/ParallelSaturationExperiments", "max_stars_repo_head_hexsha": "ee374ed750d9d3fde1b44bf4414bef5289805090", "max_stars_repo_licenses":...
[STATEMENT] lemma states_of_se_assign2 : assumes "se c (Assign v e) c'" assumes "\<exists> \<sigma> \<in> states c. \<sigma>' = \<sigma> (v := e \<sigma>)" shows "\<sigma>' \<in> states c'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<sigma>' \<in> states c' [PROOF STEP] proof - [PROOF STATE] proof (stat...
{"llama_tokens": 4588, "file": "InfPathElimination_SymExec", "length": 41}
import numpy as np from data_loader import DataLoader import random class ReccurentNetwork: def __init__(self, data, size): self.data = data self.input_size = size self.output_size = size self.hidden_size = 100 # Initialize weights and biases self.W_input = np.rand...
{"hexsha": "f4449ce7ff22580431017802b35610326724a8a1", "size": 5779, "ext": "py", "lang": "Python", "max_stars_repo_path": "rnn.py", "max_stars_repo_name": "yustoris/kaomoji_with_rnn", "max_stars_repo_head_hexsha": "a7ea3642da5ec13b337e06e71110e2da8658eea8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
from __future__ import division import sys import subprocess import os from os.path import isfile from os.path import join as jn from os import listdir import time from numpy import mean from numpy import median import numpy from scipy.stats import kurtosis,skew #2018-10-24 scipy.stats throwing error with conda def ...
{"hexsha": "f087e0fcca9a83c299b5db04f8d2698b2f0b65f7", "size": 15114, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/Coverage_Discrepancy/bin/Coverage_discrepancy_analysis.py", "max_stars_repo_name": "kbdeleon/Coverage_Discrepancy", "max_stars_repo_head_hexsha": "a5077059607ddcef32662d485a5aa6b73a9dd28e", "...
//============================================================================= // // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // ...
{"hexsha": "962dc82e5094877e08b6ce1aeabfa23e61d138e7", "size": 6226, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "remus/testing/benchmarks/WorkerMessagePerformance.cxx", "max_stars_repo_name": "robertmaynard/Remus", "max_stars_repo_head_hexsha": "090a14c9a4b0e628a86590dcfa7e46ba728e9c04", "max_stars_repo_licens...
import numpy as np import os import pickle import torch def load_data_3d2d_modelnet40(data_folder, dataset_split, preprocessed=True): if preprocessed: var_name_list = ["p2d", "p3d", "R_gt", "t_gt", "W_gt", "num_points_2d", "num_points_3d"] subfolder = 'preprocessed' encoding='ASCII' els...
{"hexsha": "ce399994ab73ba7e58c9f73342dae979e31038bf", "size": 10909, "ext": "py", "lang": "Python", "max_stars_repo_path": "utilities/dataset_utilities.py", "max_stars_repo_name": "metrized-inc/bpnpnet", "max_stars_repo_head_hexsha": "5dbc9dfaddf74d5b7dcda2eb537738511d1160e5", "max_stars_repo_licenses": ["MIT"], "max_...
# ***************************************************************************** # Copyright (c) 2021, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions ...
{"hexsha": "1b6e34a972814dd831e43039ac24ef313489c30b", "size": 2377, "ext": "py", "lang": "Python", "max_stars_repo_path": "sdc/extensions/sdc_string_view_type.py", "max_stars_repo_name": "dlee992/sdc", "max_stars_repo_head_hexsha": "1ebf55c00ef38dfbd401a70b3945e352a5a38b87", "max_stars_repo_licenses": ["BSD-2-Clause"]...
from __future__ import print_function import os import pickle import tempfile import unittest import numpy as np import sklearn.datasets as datasets import sklearn.linear_model as glm import sklearn.neighbors as knn from mlflow import sklearn, pyfunc import mlflow from mlflow.models import Model from mlflow.tracking...
{"hexsha": "44306deab4f94e3a67e62d2255f488af06aa3ebb", "size": 3567, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/sklearn/test_sklearn_model_export.py", "max_stars_repo_name": "yutannihilation/mlflow", "max_stars_repo_head_hexsha": "a4386c3f87923e395ba8f523e1a90749e888a541", "max_stars_repo_licenses": [...
#!/usr/bin/env python3 ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
{"hexsha": "5ea4749db0b814b79f4fd56d276f5332d46e98eb", "size": 30722, "ext": "py", "lang": "Python", "max_stars_repo_path": "rmgpy/tools/fluxdiagram.py", "max_stars_repo_name": "pm15ma/RMG-Py", "max_stars_repo_head_hexsha": "ca2f663c711ec45012afc911138716aaf0049296", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# -*- coding: utf-8 -*- # This file is part of RRMPG. # # RRMPG is free software with the aim to provide a playground for experiments # with hydrological rainfall-runoff-models while achieving competitive # performance results. # # You should have received a copy of the MIT License along with RRMPG. If not, # see <http...
{"hexsha": "8a941df9d072b47eeff4cdaa158522e22762f7e9", "size": 13564, "ext": "py", "lang": "Python", "max_stars_repo_path": "rrmpg/models/hbvedu.py", "max_stars_repo_name": "tommylees112/RRMPG", "max_stars_repo_head_hexsha": "585c9ec8fe5564fe312be8137851822c2a56dafc", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Pyph Histogram # Generate histograms of images # Copyright 2011 Adam Greig # Released under the simplified BSD license, see LICENSE import Image import numpy from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure def gen_histogram(infile, outfile): """Generate a colour ...
{"hexsha": "d4f196840291845d8bc0cb4eb65b641a1934130c", "size": 747, "ext": "py", "lang": "Python", "max_stars_repo_path": "histogram.py", "max_stars_repo_name": "adamgreig/Pyph", "max_stars_repo_head_hexsha": "16ab80896581f0a8e3dca1195f9bbd7866834c20", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 4, ...
/- Copyright (c) 2017 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.category_theory.products.bifunctor import Mathlib.PostPort universes u₁ u₂ u₃ v₁ v₂ v₃ n...
{"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/category_theory/currying.lean"}
from numpy import * import numpy as np def replace_line(file_name, line_num, text): lines = open(file_name, 'r').readlines() lines[line_num] = text out = open(file_name, 'w') out.writelines(lines) out.close() print ' ' print ' ' print '........................' print 'Begin texmaker.py' print '........
{"hexsha": "e62e75c22e9efa40d303c21df553adaea6b605a8", "size": 1717, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python_src/texmaker.py", "max_stars_repo_name": "wallamejorge/WirelessSensorGas", "max_stars_repo_head_hexsha": "868a5c3388daabc6f8be95386f676b12b5785bf2", "max_stars_repo_licenses": ["Apache-...
''' Python 3.6 Pytorch 0.4 Written by Hongyu Wang in Beihang university ''' import torch import math import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import numpy import torch.utils.data as data from data_iterator import dataIterator from Densenet_torchvision import densenet121...
{"hexsha": "1c2e0f739c71c9793927448ad4aeba67410ef221", "size": 13713, "ext": "py", "lang": "Python", "max_stars_repo_path": "Train.py", "max_stars_repo_name": "karino2/Pytorch-Handwritten-Mathematical-Expression-Recognition", "max_stars_repo_head_hexsha": "6c6139624c71fa68a0a386a94346cfab39d0f087", "max_stars_repo_lice...
from torch_sampler import BySequenceLengthSampler from torch.utils.data import DataLoader from dataset import MyDataset from torch.nn.utils.rnn import pad_sequence import torch import numpy as np np.random.seed(0) torch.manual_seed(0) bucket_boundaries = [1, 4, 7, 10] batch_sizes=32 my_data = MyDataset() sampler =...
{"hexsha": "b3ad65fa6119948596666e2c0c6e69819fdafa87", "size": 844, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_torch_sampler.py", "max_stars_repo_name": "zaemyung/Pytorch-Sequence-Bucket-Iterator", "max_stars_repo_head_hexsha": "0abcfe2e623f1304a10ce007e6cf44a5564f7769", "max_stars_repo_licenses": ["Ap...
""" This software is governed by the CeCILL-B license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-B license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info". ...
{"hexsha": "db2cacc357a08d595fbf338bbff3ce8b9149ed89", "size": 4221, "ext": "py", "lang": "Python", "max_stars_repo_path": "UnSynGAN/utils/patches.py", "max_stars_repo_name": "rousseau/deepBrain", "max_stars_repo_head_hexsha": "c404872bec975d52a50bda49b326068b7834dcda", "max_stars_repo_licenses": ["CECILL-B"], "max_sta...
#!/usr/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ atomtyper.py Atom type assignment engine using SMARTS strings. Authors ------- Jo...
{"hexsha": "45c025b5bbbfe18cbcb58123e808c4adad6dad6a", "size": 6118, "ext": "py", "lang": "Python", "max_stars_repo_path": "smarty/atomtyper.py", "max_stars_repo_name": "openforcefield/smarty", "max_stars_repo_head_hexsha": "882d54b6d6d0fada748c71789964b07be2210a6a", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""Implements hashes that are (hopefully) stable across sessions. Note: I have found a hash instability in my implementation, which produces different hashes for dicts that were deepcopied from each other... which is VERY problematic. The hashes are stable across restarts, which is doubly strange. Therefore, we now u...
{"hexsha": "238190859b733d435311e80dbbb4bb7db0bb8b89", "size": 1893, "ext": "py", "lang": "Python", "max_stars_repo_path": "cmlkit/engine/hashing.py", "max_stars_repo_name": "sirmarcel/cmlk", "max_stars_repo_head_hexsha": "e099bf3e255b60675e8e1b3ad29db750dbd6faf3", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
The water of life, commonly known as whiskey, comes in many delicious and quickly inebriating forms. The most well known whiskeys are Bourbon, Irish whiskey and Scotch, there are many other varieties that are just as great giving the whiskey lover a reason to keep on drinking to try them all. Whiskey is an all natura...
{"hexsha": "dde4354e27954de08d03483bd1142c214c82bc3e", "size": 1418, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Whiskey.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import Data.So fromString : String -> Either String Nat fromString = Left fromInteger : (x : Integer) -> (0 _ : So (x >= 0)) => Either String Nat fromInteger x = Right $ integerToNat x x : List $ Either String Nat x = ["x", 1, 2, "y"]
{"hexsha": "6b4bc8fe21027ffd31f660ec140bad206712194a", "size": 238, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "StringOrNat.idr", "max_stars_repo_name": "buzden/idris-playground", "max_stars_repo_head_hexsha": "414729c5dbd665fdb05cdfe5318f972fb277a726", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_coun...
subroutine foo() EXTERNAL SIN, COS end subroutine
{"hexsha": "96e7e85fef4363f47bee92eadfc9e172be4e297d", "size": 53, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/CompileTests/Fortran_tests/test2007_21.f90", "max_stars_repo_name": "maurizioabba/rose", "max_stars_repo_head_hexsha": "7597292cf14da292bdb9a4ef573001b6c5b9b6c0", "max_stars_repo_licenses": ...
@testset "AlgAssOrd" begin include("AlgAssOrd/CSAMaxOrd.jl") include("AlgAssOrd/PicardGroup.jl") include("AlgAssOrd/LocallyFreeClassGroup.jl") end
{"hexsha": "929e9f8f0679951fff1b9bc963ad2e1144fdf283", "size": 153, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/AlgAssOrd.jl", "max_stars_repo_name": "edgarcosta/Hecke.jl", "max_stars_repo_head_hexsha": "3ba4c63908eaa256150a055491a6387a45b081ec", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co...
from scipy import signal import numpy as np import matplotlib.pyplot as plt class wtDataset: """ The element of the class constructor are -data: time series to analyse -t: time array associated to the time series -s (optional): : scales to use for the wavelet transform and the scalogram; if None (by default...
{"hexsha": "0e7e6e9d74aeef86426bb26d7ec02b972794679c", "size": 11398, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyLib/waveletTools.py", "max_stars_repo_name": "mjsauvinen/P4US", "max_stars_repo_head_hexsha": "ba7bbc77a6e482f612ba5aa5f021a41fcbb23345", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
export simdir, simid, @run, @runsync, @rerun, @rerunsync, in_simulation_mode, @SimulationEnvironment const ENV_SIM_FOLDER = "SIMULATION_FOLDER" const ENV_SIM_ID = "SIMULATION_ID" abstract type AbstractSimulationEnvironment end struct DefaultSimulation <: AbstractSimulationEnvironment end macro SimulationEnvironmen...
{"hexsha": "eb57b1c5673a3fe4d9397c6f3b4b639c334f0560", "size": 6304, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Simulation.jl", "max_stars_repo_name": "sebastianpech/DrWatsonSim.jl", "max_stars_repo_head_hexsha": "f81517c90a44a22b21d1d8cf65aa6da371093165", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from sklearn.preprocessing import MinMaxScaler import numpy as np def normalize(df, usecols, rol, window): '''Normalize the values ina given dataframe removes nan window from the df''' scalar = MinMaxScaler() for col in df.columns.values: if col not in usecols: df = df.drop([col], 1) ...
{"hexsha": "e41330a894ae3012358a155ad4150b0d33635a60", "size": 1489, "ext": "py", "lang": "Python", "max_stars_repo_path": "Project/deepstocks/preprocess.py", "max_stars_repo_name": "rtbins/code_alchemist", "max_stars_repo_head_hexsha": "c1475976df1b234116a77afb6dbc6cf82d0789c1", "max_stars_repo_licenses": ["MIT"], "ma...
"""Conversion of units """ import numpy as np def convert_kwh_gwh(kwh): """"Conversion of MW to GWh Input ----- kwh : float Kilowatthours Return ------ gwh : float Gigawatthours """ gwh = kwh * 0.000001 return gwh def convert_mw_gwh(megawatt, number_of_hours)...
{"hexsha": "48df61676ba097dfe7143bf1374bbff9d9f8f80d", "size": 2698, "ext": "py", "lang": "Python", "max_stars_repo_path": "energy_demand/basic/unit_conversions.py", "max_stars_repo_name": "willu47/energy_demand", "max_stars_repo_head_hexsha": "59a2712f353f47e3dc237479cc6cc46666b7d0f1", "max_stars_repo_licenses": ["MIT...
from PyQt5 import QtWidgets, QtGui from PyQt5.QtWidgets import QTableWidgetItem import UI import itertools from sympy import * setA = set() setB = set() setC = set() setU = set() setcompA = set() setcompB = set() setcompC = set() quitar = ['A', 'B', 'C', '=', '{', '}', 'U'] dic = {"A": setA, "B": setB, "C": setC, "U...
{"hexsha": "6c1693fca4dc7e4162be763fade1981d61f05f22", "size": 17702, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "nanyssalazar/Calculadora-Binaria", "max_stars_repo_head_hexsha": "f84e801723e894436f8e71d19b40d582c789dabf", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma eval_quot_fm_ignore: fixes A:: fm shows "\<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e = \<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e = \<lbrakk>\<guillemotleft>A\<guillemotright>...
{"llama_tokens": 164, "file": "Incompleteness_Coding", "length": 1}
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =========================================...
{"hexsha": "c8087fac60159cd6d50b6b5395a328a6472484d6", "size": 18911, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/external/boost/boost_1_68_0/libs/spirit/example/qi/compiler_tutorial/conjure1/compiler.cpp", "max_stars_repo_name": "Bpowers4/turicreate", "max_stars_repo_head_hexsha": "73dad213cc1c4f74337b905...
"""Test methods for testing the schemagen package (specifically, the SchemaGenerator class). Typical usage example: python -m unittest or, to run a single test: python -m unittest -k test__build_schema """ import unittest import pathlib import logging import copy import os import pandas as pd import numpy a...
{"hexsha": "90e34a12e8b9e4a3553e847fbec09a27e4f92d6a", "size": 12680, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_schemagen.py", "max_stars_repo_name": "hd23408/nist-schemagen", "max_stars_repo_head_hexsha": "258e453d6f3bdc763e48e2c32668c932f7ffcd40", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma [iff]: "length (tr_ss_f (map_of (zip (map (case_vd (\<lambda>cl. x_var)) vds) (map x_var vars'))(x_this \<mapsto> x')) ss') = length ss'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length (tr_ss_f (map_of (zip (map (case_vd (\<lambda>cl. x_var)) vds) (map x_var vars'))(x_this \<mapsto> x')) s...
{"llama_tokens": 159, "file": "LightweightJava_Lightweight_Java_Proof", "length": 1}
# -*- coding: utf8 -*- # board # helper class for cuatro # Alfredo Martin 2021 version = 'wscreenpos.v.1.0.0' import numpy as np class ScreenPos: """the instance of this class generates a 2d coordinates array from a 3d coordinates array given the position of the camera, its angle and the position of the pro...
{"hexsha": "81533c5433a8e681640ceeed6dbe33393ec692f7", "size": 3570, "ext": "py", "lang": "Python", "max_stars_repo_path": "classes/screenpos.py", "max_stars_repo_name": "jamflcjamflc/cuatro", "max_stars_repo_head_hexsha": "007fabf1f75f87b3631966a10923ddccfe9d56af", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
#include <boost/atomic.hpp> #include <boost/thread/mutex.hpp> #include <stdlib.h> namespace ilrd { using boost::atomic; template<typename T> class Singleton { public: static T* instance(); static void KillInstance(void); private: //constructor && destructor are generated static boost::atomic<T*> m_instance; ...
{"hexsha": "63d9ce96c90ea1f537f1d6fcf7f02a5c8e677541", "size": 1204, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "DesignPatterns/Singletone/singletone.hpp", "max_stars_repo_name": "zrora/DistributedNAS", "max_stars_repo_head_hexsha": "f750e919eb9159b2406180a21aeb8018a3a432a0", "max_stars_repo_licenses": ["MIT"]...
from __future__ import absolute_import import argparse import json from . import abstract_models from . import layers from classification import utility from classification.objectives import ( FishingLocalizationObjectiveFishingTime, TrainNetInfo) import logging import math import numpy as np import os import tens...
{"hexsha": "0f43615e0f44ae688b53f4d41660b9bc72ae9962", "size": 3839, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification/models/prod/fishing_detection_time.py", "max_stars_repo_name": "rechardchen123/Classification-and-regression-of-vessel-AIS-data", "max_stars_repo_head_hexsha": "e9d8c7a807cb6e495777...
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import os import numpy as np import io import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d from matplotlib import cm from...
{"hexsha": "51154e0c2c1933ad16ab446b7c6037aa38ee6579", "size": 9490, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/vis_utils.py", "max_stars_repo_name": "SRDewan/c3dpo_nrsfm", "max_stars_repo_head_hexsha": "1677335f8119eb8ab04d5f915523719e4c05cea9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from icecube.icetray import OMKey from icecube.simclasses import I3MapModuleKeyI3ExtraGeometryItemCylinder, I3ExtraGeometryItemCylinder from icecube.dataclasses import I3Position, ModuleKey from I3Tray import I3Units import numpy as np from os.path import expandvars from_cable_shadow = expandvars("$I3_BUILD/ice-mod...
{"hexsha": "a6d7aa2dbeb0b62e780ca80c636e66e22d39cb3b", "size": 1654, "ext": "py", "lang": "Python", "max_stars_repo_path": "clsim/python/GetIceCubeCableShadow.py", "max_stars_repo_name": "hschwane/offline_production", "max_stars_repo_head_hexsha": "e14a6493782f613b8bbe64217559765d5213dc1e", "max_stars_repo_licenses": [...
# julia script to test PUMI interface using PumiInterface include("funcs2.jl") apf.declareNames(); # declare global variable names # apf.initilize mesh dmg_name = "cube.dmg" smb_name = "tet-mesh-1.smb" #dmg_name = "apf.reorder_a.dmg" #smb_name = "apf.reorder_a.smb" #dmg_name = ".null" #smb_name = ".smb" downward_co...
{"hexsha": "47613345b0c10ed9b147605efe2dd664ff065528", "size": 6183, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Main_script2.jl", "max_stars_repo_name": "OptimalDesignLab/PumiInterface.jl", "max_stars_repo_head_hexsha": "ca2cfe4cdb35958921ffc3748387772db4406901", "max_stars_repo_licenses": ["MIT"], "max_...
# new tracking table contains all history is needed except data type plus unique value # also it is not clear what to do with INPUT_VALUE column - mostly it is the same as column # however it can have grouping operations like sum/aver etc. viz_history<-function(fileroot){ LM<-6 MH<-15 library(data.table) ...
{"hexsha": "fa1dee759341dc27d7d52bec28e10df7926de5d2", "size": 7162, "ext": "r", "lang": "R", "max_stars_repo_path": "R/Recommendations/viz_recom.r", "max_stars_repo_name": "kunal0137/SEMOSS_Volume", "max_stars_repo_head_hexsha": "7870d743fa60dad3d6baaa1a61613ec2da3e141b", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python # coding: utf-8 # **Author: Fitria Dwi Wulandari (wulan391@sci.ui.ac.id) - September 9, 2021.** # # Data Analysis of COVID-19 in the World and ASEAN # ### Data Loading # In[1]: # Import libraries import numpy as np import pandas as pd pd.set_option("display.max_columns", None) # In[2]: #...
{"hexsha": "0a53fbbb48482385514ee8183e1a6d8a99a29f67", "size": 5145, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data Analysis of COVID-19 in the World and ASEAN.py", "max_stars_repo_name": "fitria-dwi/Data-Analysis-of-COVID-19-in-the-World-and-ASEAN", "max_stars_repo_head_hexsha": "5b4ff44d48c031b0fd239eeb4...
import numpy as np classification_vector= np.array([-1,-1,-1,-1,-1,1,1,1,1,1]) data_vector= np.array([[0,0], [2,0],[3,0], [0,2],[2,2],[5,1],[5,2],[2,4],[4,4],[5,5]]) def quadratic_kernel(data_vector): return np.array((1 + np.dot(data_vector, data_vector.T))**2) def perceptron_quadratic_kernel(feature_matrix, la...
{"hexsha": "c8d35523a045f3013f4710bab1beb903b85de30e", "size": 896, "ext": "py", "lang": "Python", "max_stars_repo_path": "Machine-Learning-with-Python- From-LM-to-DL/Midterm/04_midterm_exercise.py", "max_stars_repo_name": "andresdelarosa1887/Public-Projects", "max_stars_repo_head_hexsha": "db8d8e0c0f5f0f7326346462fcdf...
# Copyright (c) Gorilla-Lab. All rights reserved. import math import numpy as np import scipy.ndimage as ndimage import scipy.interpolate as interpolate import transforms3d.euler as euler def elastic(xyz, gran, mag): """Elastic distortion (from point group) Args: xyz (np.ndarray): input point cloud ...
{"hexsha": "e01c487c5baa0d85fa52d4bf0e2a6ead6ac05f56", "size": 2243, "ext": "py", "lang": "Python", "max_stars_repo_path": "sstnet/data/utils.py", "max_stars_repo_name": "xiaobaishu0097/SSTNet", "max_stars_repo_head_hexsha": "d9e94da5d359732789a1bdc06d89ff96433c86b8", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
-- by Tojans -- to run this: -- idris 99bottles.idr -- > beerSong 1 -- > beerSong 99 -- > beerSong 100 -- throws beerSong : Fin 100 -> String beerSong x = verses x where -- invoke this in the CLI using `bottlesOfBeer (the (Fin 10) 4)` bottlesOfBeer : Fin n -> String bottlesOfBeer fZ = "No more bottl...
{"hexsha": "61d45b1e4093aaf877f5a27e2649e286d0acc68e", "size": 815, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "katas/001/tojans/99bottles.idr", "max_stars_repo_name": "ToJans/idris101", "max_stars_repo_head_hexsha": "c1912a30161be6d9987c40ebe304c8ae7827367e", "max_stars_repo_licenses": ["Unlicense"], "max_s...
""" BiSpectral Representation Method - 1D ================================================================= In this example, the BiSpectral Representation Method is used to generate stochastic processes from a prescribed Power Spectrum and associated Bispectrum. This example illustrates how to use the BSRM class for ...
{"hexsha": "ad75a7d8dee2f28bde1e419ba1d5a3f652ee6146", "size": 2587, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/code/stochastic_processes/bispectral/bispectral_1d.py", "max_stars_repo_name": "SURGroup/UncertaintyQuantification", "max_stars_repo_head_hexsha": "a94c8db47d07134ea2b3b0a3ca53ca818532c3e6", ...
## Firebreak week December 2021 - Causal Inference & Machine Learning # # Short tutorial for the DoWhy package (https://microsoft.github.io/dowhy/) # # This tutorial makes use of a pre-processed subset of the EST data (np_processed.csv), # that contains a number of variables. The ones relevant for this example are...
{"hexsha": "0dbbbd282a5319eee77bbdcc8f95ef62664f8718", "size": 7858, "ext": "py", "lang": "Python", "max_stars_repo_path": "tutorials/nesta/est_dowhy_test.py", "max_stars_repo_name": "nestauk/causal_ml_learning", "max_stars_repo_head_hexsha": "76fb96d370ccbf4076ca3f3b4b07e2c471aa7261", "max_stars_repo_licenses": ["MIT"...
using MinFEM function parabolic(;T::Float64, tsteps::Int, theta=1.0) mesh = unit_square(100) boundary = union(mesh.Boundaries[1001].Nodes, mesh.Boundaries[1002].Nodes, mesh.Boundaries[1003].Nodes, mesh.Boundaries[1004].Nodes) L = asmLaplacian(mesh) M =...
{"hexsha": "832a4ae464af1e667660faadd0351807afa41df2", "size": 1304, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/parabolic.jl", "max_stars_repo_name": "msiebenborn/MinFEM.jl", "max_stars_repo_head_hexsha": "f703c4c227d90ed0c327bc84ca5cd566119a3cd3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
module Constants using OffsetArrays export get_offset_constants, get_offset_axial_constants, init!, ConstantContext mutable struct ConstantContext nmax::Int64 bcof::Array{Float64,2} fnr::Array{Float64,1} monen::Array{Int64,1} vwh_coef::Array{Float64,4} vcc::Array{Float64,3} fnm1::Array{Floa...
{"hexsha": "9d1a31ee6025712e81e928519ce0d876a80b9fec", "size": 4650, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constants.jl", "max_stars_repo_name": "JuliaRemoteSensing/MSTM.jl", "max_stars_repo_head_hexsha": "fd030fbb20d3f9db8944b40477d4b30d6cfa6ed5", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
__author__ = 'Prateek' import time import math import numpy as np import copy from decisiontree import DecisiontreeClassifier from multiprocessing import Process, Queue class BaggingClassifier(): ''' Bagging classifier is meta-algorithm that builds a number of estimators on bootstrapped(with replacement) ...
{"hexsha": "6e140767d68bf4e4d0a20ab04d4246a549adbfb8", "size": 7248, "ext": "py", "lang": "Python", "max_stars_repo_path": "ensemble.py", "max_stars_repo_name": "prateekbhat91/Decision-Tree", "max_stars_repo_head_hexsha": "c06566684de3fa20d5984de6af0e3780c11a5fda", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
From Test Require Import tactic. Section FOFProblem. Variable Universe : Set. Variable UniverseElement : Universe. Variable wd_ : Universe -> Universe -> Prop. Variable col_ : Universe -> Universe -> Universe -> Prop. Variable col_swap1_1 : (forall A B C : Universe, (col_ A B C -> col_ B A C)). Variable col_swap2_...
{"author": "janicicpredrag", "repo": "Larus", "sha": "a095ca588fbb0e4a64a26d92946485bbf85e1e08", "save_path": "github-repos/coq/janicicpredrag-Larus", "path": "github-repos/coq/janicicpredrag-Larus/Larus-a095ca588fbb0e4a64a26d92946485bbf85e1e08/benchmarks/coq-problems/col-trans/col_trans_0206.v"}
% ======================================================================== % Fast Multi-Scale Structural Patch Decomposition for Multi-Exposure Image Fusion, TIP,2020 % algorithm Version 1.0 % Copyright(c) 2020, Hui Li, Kede Ma, Yongwei Yong and Lei Zhang % All Rights Reserved. % -------------------------------------...
{"author": "thfylsty", "repo": "Classic-and-state-of-the-art-image-fusion-methods", "sha": "5d9457df396f1ea6921e1b9b3703995205940862", "save_path": "github-repos/MATLAB/thfylsty-Classic-and-state-of-the-art-image-fusion-methods", "path": "github-repos/MATLAB/thfylsty-Classic-and-state-of-the-art-image-fusion-methods/Cl...
import unittest import numpy as np from rastervision.core.box import Box from rastervision.data.label import SemanticSegmentationLabels class TestSemanticSegmentationLabels(unittest.TestCase): def setUp(self): self.windows = [Box.make_square(0, 0, 10), Box.make_square(0, 10, 10)] self.label_arr0...
{"hexsha": "fc40d1604a871c23eda5fa1abc4f0c6fb174bbc9", "size": 1686, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/label/test_semantic_segmentation_labels.py", "max_stars_repo_name": "carderne/raster-vision", "max_stars_repo_head_hexsha": "915fbcd3263d8f2193e65c2cd0eb53e050a47a01", "max_stars_repo_l...
import h5py import numpy as np import random WINDOW_SIZE = 100 def rescale_array(X): X = X / 20 X = np.clip(X, -5, 5) return X def aug_X(X): scale = 1 + np.random.uniform(-0.1, 0.1) offset = np.random.uniform(-0.1, 0.1) noise = np.random.normal(scale=0.05, size=X.shape) X = scale * X + o...
{"hexsha": "150120347733047ec85c20e061c93edd032699cb", "size": 1107, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/utils.py", "max_stars_repo_name": "CVxTz/EEG_classification", "max_stars_repo_head_hexsha": "f65060d6adb8de39afeb63b41207e864e3090ced", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
#----------------------------------------------------------------------------------------------------- # Tensor Basis #----------------------------------------------------------------------------------------------------- """ TensorBasis Basis without any symmetries. Properties: ----------- - dgt : Vector{Int}, Di...
{"hexsha": "7d183bd6aab0ce797199acada585b244786bde92", "size": 2543, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/basis/TensorBasis.jl", "max_stars_repo_name": "jayren3996/ExactDiagonalization.jl", "max_stars_repo_head_hexsha": "5022d5868f9f5c9604577b1d217b5a51a49bafe3", "max_stars_repo_licenses": ["MIT"],...
struct DayAheadIndices <: AbstractModelIndices hours::Vector{Int} plants::Vector{Plant} segments::Vector{Int} bids::Vector{Int} blockbids::Vector{Int} blocks::Vector{Int} hours_per_block::Vector{Vector{Int}} end plants(indices::DayAheadIndices) = indices.plants function HydroModels.modelind...
{"hexsha": "a8c2c2e820d9dffd3e14a76872de398f8415c4ce", "size": 1156, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/day-ahead/indices.jl", "max_stars_repo_name": "martinbiel/HydroModels.jl", "max_stars_repo_head_hexsha": "dee21e849922aa4938394ba464423762fd1e578f", "max_stars_repo_licenses": ["MIT"], "...
# \MODULE\------------------------------------------------------------------------- # # CONTENTS : BumbleBee # # DESCRIPTION : Nanopore Basecalling # # RESTRICTIONS : none # # REQUIRES : none # # --------------------------------------------------------------------------------- # Copyright 2021 Pay Gies...
{"hexsha": "db3a68f419afbd10a21a68cb2774cba003652a8d", "size": 10661, "ext": "py", "lang": "Python", "max_stars_repo_path": "bumblebee/cli/modcall.py", "max_stars_repo_name": "giesselmann/bumblebee", "max_stars_repo_head_hexsha": "6c4034d1576d3ce4a392bdaebe30968688892792", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
function sift!(Eav, decomp, d_osf, nsifts=5) N = length(decomp) e1 = zeros(N) e2 = zeros(N) avg = zeros(N) w = max(div(d_osf-1, 2), 3) if iseven(w) w += 1 end for j in 1:nsifts stream_minmax(e1, e2, decomp, d_osf) e1 .= moving_average(e1, d_osf) ...
{"hexsha": "0b16e1079fbd11f929700c217c2ae52420c312dc", "size": 1087, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/sEMD.jl", "max_stars_repo_name": "jarrison/EMD.jl", "max_stars_repo_head_hexsha": "b6c6e07602f84f010fd0745ab1a4ada62fe28fd5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_star...
""" Created May 13, 2016 Observation object for calculating satellite and star positions using SkyField. @author: EP-Guy """ import numpy as np import pandas as pd from skyfield.api import load class Observation: """Observation object for times and positions of an observer. Observer is a tuple of strings...
{"hexsha": "82eea6fe5a1f34d7fd3f3ed6b282de251a21e0ed", "size": 1116, "ext": "py", "lang": "Python", "max_stars_repo_path": "vispe/Observation.py", "max_stars_repo_name": "EP-Guy/VisPe", "max_stars_repo_head_hexsha": "dd699775d032e2e266fda99ca0251504bc4aa9c0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
from __future__ import print_function import os import math from numpy.random import rand from matplotlib import cm import numpy as np import matplotlib import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from matplotlib import animation from functions import ackley_function, griewank, schaeffer from mp...
{"hexsha": "17f6288898ad9b57074b7e61a0a82e2cc1240fa2", "size": 4115, "ext": "py", "lang": "Python", "max_stars_repo_path": "PSO.py", "max_stars_repo_name": "EmmanuelleB985/Scientific-Computing", "max_stars_repo_head_hexsha": "796a01611869fc49bef4e5ec6c6d6e98f1f44b4c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# installing dependencies for module pip install pandas pip install numpy pip install matplotlib pip install seaborn import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns
{"hexsha": "ac13896e51dcc4ae9c58d99eb9808cc29b53902f", "size": 212, "ext": "py", "lang": "Python", "max_stars_repo_path": "lamblibs.py", "max_stars_repo_name": "veritaem/LambdataChrisSeiler", "max_stars_repo_head_hexsha": "67a00402b743f508caf6de81152dbecd0d555b72", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
act <- c(0, 1, 1, 0, 0) pred <- c(0.12, 0.45, 0.9, 0.3, 0.4) ## Test correctness ------------------------------------------------------------ ## check eps and handling of absolute zero and one probabilities expect_equal(mtr_mean_log_loss(act, act), 0) ## Metrics::logLoss(act, pred) ## 0.3798404 expect_equal( m...
{"hexsha": "099bdf00f9ebf2641c104667e6cf843c44777eca", "size": 881, "ext": "r", "lang": "R", "max_stars_repo_path": "inst/tinytest/test-logloss.r", "max_stars_repo_name": "maiing/metrics", "max_stars_repo_head_hexsha": "ae4e4cbe5b025c53f2fbf552a46f335aa34f687f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
// Copyright Gavin Band 2008 - 2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef QCTOOL_SNP_SUMMARY_COMPONENT_BED4_ANNOTATION_HPP #define QCTOOL_SNP_SUMMARY_COMPONENT_BED4_ANNOT...
{"hexsha": "43607ce406ee1251b50ceceff758973c3cac1a53", "size": 1844, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "components/SNPSummaryComponent/include/components/SNPSummaryComponent/Bed4Annotation.hpp", "max_stars_repo_name": "CreRecombinase/qctool", "max_stars_repo_head_hexsha": "6dad3a15c461177bf6940ba7b991...
import numpy from sympy import Rational as frac from sympy import pi, sqrt from ..helpers import article, fsd, pm, pm_array, pm_array0, untangle from ._helpers import E2r2Scheme _citation = article( authors=["A.H. Stroud", "D. Secrest"], title="Approximate integration formulas for certain spherically symmetri...
{"hexsha": "a89ca146d70acdd10bf85ce60965b05363018193", "size": 1263, "ext": "py", "lang": "Python", "max_stars_repo_path": "quadpy/e2r2/_stroud_secrest.py", "max_stars_repo_name": "whzup/quadpy", "max_stars_repo_head_hexsha": "ca8bd2f9c5a4ae30dc85d8fb79217602bd42525e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# code adapted from https://github.com/lingxiaoli94/SPFN/blob/master/spfn/lib/dataset.py import sys import os import re import pickle BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) import torch import numpy as np from torch.utils import data import h5py import random import pandas fro...
{"hexsha": "88e095d450608c7f80746969798cbc023e511f37", "size": 8385, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/ANSI_dataset.py", "max_stars_repo_name": "Meowuu7/AutoGPart", "max_stars_repo_head_hexsha": "5d9f18f7e88426b672812aa4f134799124196126", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# syntax: proto3 using ProtoBuf import ProtoBuf.meta mutable struct HloInstructionProto_SliceDimensions <: ProtoType start::Int64 limit::Int64 stride::Int64 HloInstructionProto_SliceDimensions(; kwargs...) = (o=new(); fillunset(o); isempty(kwargs) || ProtoBuf._protobuild(o, kwargs); o) end #mutable str...
{"hexsha": "13781ecd32c7cea22588fbe40631775b95a62147", "size": 13370, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gen/hlo_pb.jl", "max_stars_repo_name": "Keno/XLA.jl", "max_stars_repo_head_hexsha": "6e0b15cd3b334ce40ffce1bae9bdc1a817f83c13", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 209, "max...
*********************************************************************** SUBROUTINE FPOST(ITYP,IFILEN,ITFILM,UE,MSHOW,DFWX,DFWY, * ITOPT,COFN) ************************************************************************ * Purpose: - performs the nonsteady postprocess: * ...
{"hexsha": "9439c75265be35423d295fcfd0721c5247cc3aca", "size": 27099, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "area51/cc2d_movbc_structured_2/src/postprocessing/fpost.f", "max_stars_repo_name": "tudo-math-ls3/FeatFlow2", "max_stars_repo_head_hexsha": "56159aff28f161aca513bc7c5e2014a2d11ff1b3", "max_stars_...
import data.list.basic variable {α : Type*} open list example (xs : list ℕ) : reverse (xs ++ [1, 2, 3]) = [3, 2, 1] ++ reverse xs := by simp example (xs ys : list α) : length (reverse (xs ++ ys)) = length xs + length ys := by simp [add_comm] variables (x y z : ℕ) (p : ℕ → Prop) example (h : p ((x + 0) * (0 + ...
{"author": "agryman", "repo": "theorem-proving-in-lean", "sha": "cf5a3a19d0d9d9c0a4f178f79e9b0fa67c5cddb9", "save_path": "github-repos/lean/agryman-theorem-proving-in-lean", "path": "github-repos/lean/agryman-theorem-proving-in-lean/theorem-proving-in-lean-cf5a3a19d0d9d9c0a4f178f79e9b0fa67c5cddb9/src/05-Tactics/example...