text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
C Check labelling by text_unstructured() subroutine unstruc01(x, x0) real x(10) do i = 1, 10 if(x(i).gt.x0) goto 100 enddo print *, "criterion not met" return 100 print *, "criterion met" end
{"hexsha": "6485c5536c430761498ae30f8aeb4b04e1900b09", "size": 252, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/PIPS/validation/Prettyprint/unstruc01.f", "max_stars_repo_name": "DVSR1966/par4all", "max_stars_repo_head_hexsha": "86b33ca9da736e832b568c5637a2381f360f1996", "max_stars_repo_licenses": ["...
! ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ! See https://llvm.org/LICENSE.txt for license information. ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ! RUN: %flang -S -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK ! ! CHECK-LABEL: define void @MAIN_() module ba...
{"hexsha": "d5ced40e1d48ff927f62ebe14f96856d65059e57", "size": 724, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/sema/interface_nested_into_subroutine.f90", "max_stars_repo_name": "vigbalu/flang", "max_stars_repo_head_hexsha": "d47f3a626687453df7d3dede01021f5891c2dacd", "max_stars_repo_licenses": ["Apa...
module WindTrigger using ..Ahorn, Maple const placements = Ahorn.PlacementDict( "Wind Pattern" => Ahorn.EntityPlacement( Maple.WindTrigger, "rectangle" ) ) function Ahorn.editingOptions(trigger::Maple.WindTrigger) return Dict{String, Any}( "pattern" => Maple.wind_patterns ) en...
{"hexsha": "e3e4ed821ba2e73dad4cd6d513d777d2db099247", "size": 326, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/triggers/wind.jl", "max_stars_repo_name": "kingW3/Ahorn", "max_stars_repo_head_hexsha": "a064bf0a953620415ea6eb8b0d610c8c606b2b05", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count": 170, ...
import tactic /- # Quotients The quotient of a type by an equivalence relation. ## Overview A binary relation on a type `X` is just a function `r : X → X → Prop`, that is, a true-false statement attached to each pair of elements of `X`. If `r` is also reflexive, symmetric and transitive, we say it is an equivalenc...
{"author": "ImperialCollegeLondon", "repo": "formalising-mathematics", "sha": "7cf1d51c27e2038d2804561d63c74711924044a1", "save_path": "github-repos/lean/ImperialCollegeLondon-formalising-mathematics", "path": "github-repos/lean/ImperialCollegeLondon-formalising-mathematics/formalising-mathematics-7cf1d51c27e2038d28045...
import numpy as np import pandas as pd import scipy.stats import scipy.optimize import edhec_risk_kit def drawdown(return_series: pd.Series): """ Takes a time series of asset returns Computes and returns a DataFrame that contains: - Wealth index - Previous peaks - Percent drawdown...
{"hexsha": "33265ec03504dd14022b4fa1ec5e3c33aa0ede98", "size": 23235, "ext": "py", "lang": "Python", "max_stars_repo_path": "edhec_risk_kit.py", "max_stars_repo_name": "dcardonav/finance_python", "max_stars_repo_head_hexsha": "e3b52099238894cb2e7b376643eca9bf6f7f7b35", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma vec_iff: "d x \<cdot> U = x \<longleftrightarrow> (x \<cdot> 1\<^sub>\<pi>) \<parallel> U = x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (d x \<cdot> U = x) = (x \<cdot> 1\<^sub>\<pi> \<parallel> U = x) [PROOF STEP] by (simp add: local.c2_d)
{"llama_tokens": 118, "file": "Multirelations_C_Algebras", "length": 1}
import logging from copy import deepcopy import cv2 import numpy as np import pandas as pd import torch import torch.nn as nn from torch.utils.data import TensorDataset from airobot_utils.pusher_simulator import PusherSimulator from algorithms.behavior_cloning import BCLearner from algorithms.ppo import PPOLearner f...
{"hexsha": "da81ee2c29c94b7559f6f3d0280766d8c563765b", "size": 5194, "ext": "py", "lang": "Python", "max_stars_repo_path": "behavior_cloning/safety_backup_C/C/pusher_experiments.py", "max_stars_repo_name": "chickert/reinforcement_learning", "max_stars_repo_head_hexsha": "473323f08b079004f27a7f0931e5e9a46bfad347", "max_...
(* Title: Some extra results about linear algebra Author: Tim Makarios <tjm1983 at gmail.com>, 2012 Maintainer: Tim Makarios <tjm1983 at gmail.com> *) (* After Isabelle 2012, some of these theorems may be moved to the Isabelle repository *) header "Linear algebra" theory Linear_Algebra2 imports ...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/Tarskis_Geometry/Linear_Algebra2.thy"}
from statistics import variance as variance import numpy as np def brute_force_segmentation(A): variance = np.var(A[0:2]) + np.var(A[2:4]) + np.var(A[4:6]) + np.var(A[6:8]) + np.var(A[8:len(A)]) index = [2, 4, 6, 8] for h in range(2, len(A) - 8): for i in range(h + 2, len(A) - 6): ...
{"hexsha": "f112055fec835cd600bc333a4e297eac815b9142", "size": 779, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Python/brute_force_segmentation.py", "max_stars_repo_name": "Bojan-Lukic/signal-analysis-with-variance-based-segmentation", "max_stars_repo_head_hexsha": "ed2bd55e1ce203b82ce56899d02b11fe48974e...
import numpy as np import re, os, sys, yaml from pmesh.pm import ParticleMesh from nbodykit.lab import BigFileCatalog, BigFileMesh, MultipleSpeciesCatalog, FFTPower from nbodykit import setup_logging from mpi4py import MPI sys.path.append('../utils/') import LineModels # enable logging, we have some clue ...
{"hexsha": "7dd7086938be45fe6d7992d57944ea04fb51cc99", "size": 12537, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/getpks.py", "max_stars_repo_name": "farnikn/MithraLIMSims", "max_stars_repo_head_hexsha": "6b11448b8859519edf9733b2e22bc5569356942f", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import pydap import pytest import numpy as np import traitlets as tl import requests from podpac.core.coordinates import Coordinates, clinspace from podpac.core.units import UnitsDataArray from podpac.core import authentication from podpac.core.data.pydap_source import PyDAP from podpac import settings class MockPyD...
{"hexsha": "9794708dd4a9216baba8a7a35d259c0a68c4c0e4", "size": 2952, "ext": "py", "lang": "Python", "max_stars_repo_path": "podpac/core/data/test/test_pydap.py", "max_stars_repo_name": "creare-com/podpac", "max_stars_repo_head_hexsha": "7feb5c957513c146ce73ba1c36c630284f513a6e", "max_stars_repo_licenses": ["Apache-2.0"...
using BayesianDataFusion using Base.Test using DataFrames ## create entities genes = Entity("genes") pheno = Entity("pheno") ## features for entities genes.F = rand(100, 5) genes.lambda_beta = 3.0 pheno.F = rand(50, 8); data = DataFrame( gene = sample(1:100, 1050), pheno = sample(1:50, 1050), ...
{"hexsha": "6113942c85540cfef3265459521e610916d963f2", "size": 1098, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/custom_rd.jl", "max_stars_repo_name": "tkelman/BayesianDataFusion.jl", "max_stars_repo_head_hexsha": "f28cb5886bbd61051fe0c9ef13dd453f51af6bab", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from enum import Enum from pathlib import Path from typing import List, Dict, Tuple import pandas as pd import pydantic import torch from torch import nn as nn import numpy from neural_rock.model import make_resnet18_model, make_vgg11_model from neural_rock.preprocess import get_image_paths class ImageDataset(pydanti...
{"hexsha": "991bd947ef804c3656fa9e2191fdde3f6f05feb7", "size": 4388, "ext": "py", "lang": "Python", "max_stars_repo_path": "neural_rock/data_models.py", "max_stars_repo_name": "LukasMosser/neural_rock_typing", "max_stars_repo_head_hexsha": "5bd0f4a621939032b442826d6ed52ed19db9b5a0", "max_stars_repo_licenses": ["Apache-...
#include <string> #include <iostream> #include <iomanip> #include <sstream> #include <fstream> #include <cstdint> #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_generators.hpp> #include <boost/asio.hpp> #include <boost/filesystem.hpp> #include "cxxopts/cxxopts.hpp" #includ...
{"hexsha": "a53099cb913a0b6ca86aa1f8b8e7efb33fcba001", "size": 7402, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/wavplayeralsa.cpp", "max_stars_repo_name": "blumamir/wavplayeralsa", "max_stars_repo_head_hexsha": "b219cf5d3377ac78ea82674d57ace3306cc39660", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
struct Cluster name::String status::Symbol status_explanation::String num_jobs_running::Int32 s3_bucket_arn::String end
{"hexsha": "12fd9dc92e23ae634b90dfce04ac19a3bc9efa58", "size": 139, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Banyan/src/cluster.jl", "max_stars_repo_name": "banyan-team/banyan-julia", "max_stars_repo_head_hexsha": "c54d83c02904c980daf550aa5fdde204d177d80c", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import os import shutil import numpy as np import skimage.transform from PIL import Image as pilImage def prepare_path(path): if os.path.exists(path): shutil.rmtree(path) os.mkdir(path) def load_np_image(path): img = pilImage.open(path) np_img = np.array(img).astype(float) / 256.0 np_img ...
{"hexsha": "e15bda95d8653ed023c98902b6b9c20c4f5f3657", "size": 852, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "magj3k/DrawingVectorizer", "max_stars_repo_head_hexsha": "6cf9f98e042c6667ccfb5af9da2ec3e32e06c385", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import time from collections import OrderedDict from options.train_options import TrainOptions from data.data_loader import CreateDataLoader from models.models import create_da_model import util.util as util from util.visualizer import Visualizer...
{"hexsha": "0a6a1e16059bfbde9fb5ded5b090376a67e4d380", "size": 5304, "ext": "py", "lang": "Python", "max_stars_repo_path": "Global/train_domain_A.py", "max_stars_repo_name": "M-Salti/Bringing-Old-Photos-Back-to-Life", "max_stars_repo_head_hexsha": "4daf83faf55e406c88723f21fe810a0ed448bfae", "max_stars_repo_licenses": [...
# -*- coding: utf-8 -*- """ XMNLP - SentenceVector Model Tree: sentence_vector ├── model.onnx └── vocab.txt """ import os from typing import Union, Tuple, List, Optional import numpy as np from sklearn.neighbors import KDTree from tokenizers import BertWordPieceTokenizer from xmnlp import config from xmnlp.base_...
{"hexsha": "39d0018454113b1924f74f7a17bd62cbd1ceb324", "size": 3224, "ext": "py", "lang": "Python", "max_stars_repo_path": "xmnlp/sv/model.py", "max_stars_repo_name": "dumpmemory/xmnlp", "max_stars_repo_head_hexsha": "37cdabb917aa97e0cb35de1313451a1faa9c9f4b", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
""" Graph processing and conversion tools. """ from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import itertools import functools import json import os from IPython.core.display import HTML, display from collections i...
{"hexsha": "58f128db6b855b7b82e710936ede5e3b56e51306", "size": 16061, "ext": "py", "lang": "Python", "max_stars_repo_path": "dyneusr/tools/graph_utils.py", "max_stars_repo_name": "jodahoney/dyneusr", "max_stars_repo_head_hexsha": "a05954c88c9b47ee03fd121103b0d5145ac266aa", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
# -*- coding: utf-8 -*- # cheby_checker/cheby_checker/obs_pos.py ''' -------------------------------------------------------------- Parse an obscode and figure out where the observer is at a given time. Jan 2020 Matt Payne & Mike Alexandersen *WRITE MORE STUFF* ------------------------------...
{"hexsha": "7b0e33169ea497fe78a0055eed02d7595f656a71", "size": 3625, "ext": "py", "lang": "Python", "max_stars_repo_path": "cheby_checker/obs_pos.py", "max_stars_repo_name": "Mikea1985/orbit_cheby", "max_stars_repo_head_hexsha": "cbc743fffa0ec6415ea17149c7768cd5fbe567f8", "max_stars_repo_licenses": ["MIT"], "max_stars_...
% $Id$ \subsection{Running ESMF Examples} \label{examples} \subsubsection{Example source code} Example source code for each class is found in the class's example directory. For example, source code for the Time Manager class examples are found in this directory: \begin{verbatim} ESMF_DIR/src/Infrastructure...
{"hexsha": "65396e4bc69a7545bdbe5185c70484e5d108915d", "size": 4503, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ESMF/src/doc/ESMF_examples.tex", "max_stars_repo_name": "joeylamcy/gchp", "max_stars_repo_head_hexsha": "0e1676300fc91000ecb43539cabf1f342d718fb3", "max_stars_repo_licenses": ["NCSA", "Apache-2.0", ...
#include <iostream> #include <tash/arango.h> #include <boost/format.hpp> #include <boost/beast/http/status.hpp> int main(){ using namespace tash; std::string name("Hijibijbij"); tash::shell shell("school"); // shell("school", "localhost", 8529, "root", "root") shell << select("s").in("studen...
{"hexsha": "1f983054c51fbd8483cd08c0d4971aa43fed6925", "size": 2499, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "examples/tash-example-02.cpp", "max_stars_repo_name": "neel/tash", "max_stars_repo_head_hexsha": "d96eaa74f71d535a6e351054a2e6663dbe6f582b", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
import numpy import pytest import random import sys class WaTor(): def __init__(self, creatures = None, energies = None, shape = None, nfish = None, nsharks = None, age_fish=5, age_shark=10, energy_eat=3, energy_initial=0): ok = 0 if hasattr(creatures, 'shape'): if nsharks != None or nf...
{"hexsha": "ca457d8e6f38aa6aae91ce4588a53c6b01b944e0", "size": 11366, "ext": "py", "lang": "Python", "max_stars_repo_path": "wator/wator.py", "max_stars_repo_name": "stejsle1/semestralni_prace_PYT", "max_stars_repo_head_hexsha": "56e0b5f70cc37a1293fd7d3ef8310ab03371986e", "max_stars_repo_licenses": ["CC0-1.0"], "max_st...
""" Code to visualize Gaussian processes. """ import numpy as np import matplotlib.pyplot as plt def visualize_gp(gp, domain, data=None, n_grid=500, n_gen=20000, n_samp_plot=10, std_mult=3, show_sp=True, ylim=[-4, 4], save_str=None, exact_post=True): """ Visualize gp posteri...
{"hexsha": "d65f19ecd7e571a89489fcfe89de75446c52547e", "size": 5245, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/gp_viz.py", "max_stars_repo_name": "willieneis/gp-martingales", "max_stars_repo_head_hexsha": "9905ccfb2f2f1c831c3ae70b4455bfc4783ab3b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# Copyright 2020 Google LLC # # 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": "077ed5ef96c4fb9e000dbba9e376970512f954d3", "size": 7902, "ext": "py", "lang": "Python", "max_stars_repo_path": "vit_jax/models.py", "max_stars_repo_name": "tripathiarpan20/vision_transformer", "max_stars_repo_head_hexsha": "ff8015af1c0c7c136086fff9c60d587ad575f65d", "max_stars_repo_licenses": ["Apache-2.0"]...
# -*- coding:utf-8 -*- import phate import anndata import warnings import numpy as np import pandas as pd import seaborn as sns from scipy.spatial.distance import cdist from scipy.spatial import distance_matrix from scipy.stats import pearsonr from sklearn.decomposition import PCA #from python_codes.train.train import ...
{"hexsha": "250a5ebf2ab7b9dabeceaf7e271a292fcec66f75", "size": 63056, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_codes/visualize/chicken.py", "max_stars_repo_name": "bwalker1/spatial-constrained-clustering-and-pseudotime", "max_stars_repo_head_hexsha": "1b5fda9c589d29b24537110dd63f106437de1eec", "max...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import data_generator from network import DIMAN class cross_loss(nn.Module): def __init__(self): super(cross_loss, self).__init__() self.weights = [1,1,1] def forward(self, pf, pi, pm, fg, fw, iv, iw, mk, mw): """ Args: p...
{"hexsha": "cc6f3415889dcab342253f77265842a358659b10", "size": 3113, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_functions.py", "max_stars_repo_name": "flyingdingding/Pytorch-DIMAN-for-Nuclei-Instance-Segmentation", "max_stars_repo_head_hexsha": "bc3eb854e14ce84a36b7db8023999da286ab7cdc", "max_stars_re...
#ifndef NETKET_COMMON_TYPES_HPP #define NETKET_COMMON_TYPES_HPP /** * This header contains standard type aliases to be used throughout the NetKet * codebase. */ #include <complex> #include <cstddef> #include <Eigen/Core> namespace netket { using Index = std::ptrdiff_t; using Complex = std::complex<double>; usin...
{"hexsha": "9fea5238ae2d8b30bb34b07c8c2995dc992b2693", "size": 516, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Sources/common_types.hpp", "max_stars_repo_name": "tvieijra/netket", "max_stars_repo_head_hexsha": "ef3ff32b242f25b6a6ae0f08db1aada85775a2ea", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
# rotate and reflect functions # written by Russell on 4/7/20 # rewritten by Russsell on 5/7/20 to accomodate game data structure change # added numpy array iterations #import numpy as np # rotate functions: # takes a board as a parameter and returns that board rotated # board = list (2, 3, 4, 5, 6) # ( '', '', 'X', ...
{"hexsha": "c8d18f20f42d68e20deecc75b8c109a38370e22c", "size": 4124, "ext": "py", "lang": "Python", "max_stars_repo_path": "ttt_package/libs/transpose.py", "max_stars_repo_name": "Ipgnosis/tic_tac_toe", "max_stars_repo_head_hexsha": "e1519b702531965cc647ff37c1c46d72f4b3b24e", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import os from glob import iglob import numpy as np from skimage import io from morphocut.pipeline import NodeBase class DataLoader(NodeBase): """ Read the contents of a local directory and yield processing objects. Source node (no predecessors). Output: { object_id: ... facet...
{"hexsha": "b56625762d52051d3b1c1ca871ba8f48808964ca", "size": 2677, "ext": "py", "lang": "Python", "max_stars_repo_path": "morphocut/pipeline/dataloader.py", "max_stars_repo_name": "moi90/morphocut", "max_stars_repo_head_hexsha": "fda36b6681331911b7a2592329a7df5e1ce2065c", "max_stars_repo_licenses": ["MIT"], "max_star...
C C************************** INTERP ************************************ C C use the lookup table to interpolate general storage value C C*********************************************************************** C SUBROUTINE INTERP(NLKP,ISTR,MTYPE,PAVG,SSAVG,FIAVG,ETALOC) C IMPLICIT NONE INCLUDE 'CAT...
{"hexsha": "7cc7398b5d44632a310ca2e53f394160623abb0e", "size": 1536, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "examples/weil_exemple_withDA/my_cathy_prj/src/interp.f", "max_stars_repo_name": "BenjMy/pycathy_wrapper", "max_stars_repo_head_hexsha": "8639713acbb5bc5c5cd293b94bdafe017d03f199", "max_stars_repo_...
[STATEMENT] lemma defNode_var_disjoint: assumes "p \<in> allVars g" "q \<in> allVars g" "p \<noteq> q" "defNode g p = defNode g q" shows "var g p \<noteq> var g q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. var g p \<noteq> var g q [PROOF STEP] proof- [PROOF STATE] proof (state) goal (1 subgoal): 1. var...
{"llama_tokens": 602, "file": "Formal_SSA_SSA_CFG", "length": 8}
Require Import logic IZF Relation BaseMap Maps BOperation1. Theorem Rel_RefCond_Inverse : forall A (rel : #(BRelation A)), Rel_RefCond rel -> Rel_RefCond (%InverseRel rel). Proof. intros A rel cond a. generalize (cond a). apply (InverseRelTheorem rel). Qed. Theorem Rel_SymCond_Inverse : forall A (rel : ...
{"author": "k27c8ff627uxz", "repo": "IMath", "sha": "504db5f54bbae486af360048e2c2128361cc8885", "save_path": "github-repos/coq/k27c8ff627uxz-IMath", "path": "github-repos/coq/k27c8ff627uxz-IMath/IMath-504db5f54bbae486af360048e2c2128361cc8885/Order.v"}
""" Gradient descent algorithm for logistic regression """ import numpy """ Purpose: Optimize weight for logistic regression Parameter: Real output, Result of logistic regression model, Feature, Weight, Learning rate Return: Optimized weight for logistic regression (Not perfectly optimized) """ def gradient_desc...
{"hexsha": "e5d2cd1efd8f9a03c9e9c35dbd38ee8df9acf99b", "size": 774, "ext": "py", "lang": "Python", "max_stars_repo_path": "Logistic_Regression/gradient_descent.py", "max_stars_repo_name": "parksjin01/Machine-Learning", "max_stars_repo_head_hexsha": "682400f85b6b0253b6b22aa0740dd0dac8f83f3c", "max_stars_repo_licenses": ...
import numpy as np np.set_printoptions(linewidth=np.inf, threshold=32, edgeitems=10) def log_array(msg, x): print(msg + ' (shape=%s)' % str(x.shape)) print(x) print(' ') def log_sparse_vector(msg, x, threshold=32): x = x.copy().squeeze() assert len(x.shape) == 1 print(msg + ' (shape=%s)' % st...
{"hexsha": "2e626e8e7465554d21357b35292dab67c8c69d46", "size": 1237, "ext": "py", "lang": "Python", "max_stars_repo_path": "sinkhorn_wmd/logs/loggers.py", "max_stars_repo_name": "Prayogkarki/prog-eval", "max_stars_repo_head_hexsha": "461302a9776c4a5f051469c48d1b4228b604ba4d", "max_stars_repo_licenses": ["MIT"], "max_st...
# QuTiP development notebook for testing new TD function callback signature Copyright (C) 2011 and later, Paul D. Nation & Robert J. Johansson <h3 style="color: red">Note: experimental and under development</h3> ``` %pylab inline ``` Welcome to pylab, a matplotlib-based Python environment [backend: modul...
{"hexsha": "2490cb7651568aa8d37667695039f73ec38565a5", "size": 238317, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "qutip-notebooks-master/development/development-mean-field-master-equations.ipynb", "max_stars_repo_name": "OliverDudgeon/QSync", "max_stars_repo_head_hexsha": "34adbcf37d501b803aa00...
# A Kuen Surface, brought to you by PharaohCola13 import mpl_toolkits.mplot3d.axes3d as p3 import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.art3d import * from matplotlib.animation import * from matplotlib import * from numpy import * name = "Kuen Surface" def shape(fig, alpha, color, edge_c, edge_w, grid,...
{"hexsha": "7af0f8997f57f6c1257c626295078ae12f8a2b09", "size": 1513, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/GUI/compile_space/kuen_surface.py", "max_stars_repo_name": "gitter-badger/GeoMetrics", "max_stars_repo_head_hexsha": "8f33a7da1db88ea49f10772c4bf63b357e9f066c", "max_stars_repo_licenses": ["MI...
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file acc...
{"hexsha": "6e19a63b7409778699635d8a4f56c9ba67cf0220", "size": 1432, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sagemaker_xgboost_container/algorithm_mode/metrics.py", "max_stars_repo_name": "favordelivery/sagemaker-catboost-container", "max_stars_repo_head_hexsha": "f0c887bac0be26ad336c7027f28139fb5c1e...
import os import sys import unittest import numpy as np import NumpyTestCase import cPickle try: import pathLocate except: from unittests import pathLocate unittest_dir = pathLocate.getUnitTestDirectory() sys.path.append(pathLocate.getRootDirectory()) from TrackGenerator import trackSize class TestRmaxM...
{"hexsha": "363d2bf8d5662d9d0fe513209d7728b336b0520a", "size": 3540, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_trackSize.py", "max_stars_repo_name": "GlobalParametrics/TCRM", "max_stars_repo_head_hexsha": "0882ad6f857c50c7f276ec2b3099b3006939664e", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_...
from __future__ import print_function """ :py:class:`UtilsCalib` ============================== Usage:: from Detector.UtilsCalib import proc_block, DarkProc, evaluate_limits from Detector.UtilsCalib import tstamps_run_and_now, tstamp_for_dataset gate_lo, gate_hi, arr_med, arr_abs_dev = proc_block(block, *...
{"hexsha": "ca37ee265180e984c25e53afe6a4bb9e43006c21", "size": 37445, "ext": "py", "lang": "Python", "max_stars_repo_path": "psana/psana/detector/UtilsCalib.py", "max_stars_repo_name": "ZLLentz/lcls2", "max_stars_repo_head_hexsha": "3edbea556779f619944ee9b97fb33cd815a19a37", "max_stars_repo_licenses": ["BSD-3-Clause-LB...
#!/usr/bin/env python #****************************************************************************** # Name: mmse_filter.py # Purpose: Lee MMSE adaptive filtering # for polSAR covariance images # Lee et al. (1999) IEEE TGARS 37(5), 2363-2373 # Oliver and Quegan (2004) Understanding SAR Images, Scitech ...
{"hexsha": "b94c70791b34533ab90e16beff646c0d2d45d767", "size": 7177, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/scripts/mmse_filter.py", "max_stars_repo_name": "mortcanty/EESARDocker", "max_stars_repo_head_hexsha": "855b41a3da19f3b07b42438784309ab48fc7fe98", "max_stars_repo_licenses": ["MIT"], "max_star...
/* * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Lukasz Pawelczyk <l.pawelczyk@samsung.com> * * 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 *...
{"hexsha": "2c164608ffdbcb846f04f7237bb215683a374077", "size": 8072, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/test_crypto.cpp", "max_stars_repo_name": "cmanszew/yaca", "max_stars_repo_head_hexsha": "36606ee58acabc5236a3de00845ec5345deb094a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
#include "RasRandomNumber.h" #include <chrono> // for seconds, milliseconds, nanoseconds, picoseconds #include <Eigen/Cholesky> using namespace Eigen; unsigned RasRandomNumber::ras_now_nanoseconds(void) { std::chrono::nanoseconds ns = std::chrono::duration_cast< std::chrono::nanoseconds >(std::chrono::system_clo...
{"hexsha": "591d0fc25eb86823fe9994e3b9574eef653c561c", "size": 3574, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/RasRandomNumber.cpp", "max_stars_repo_name": "rtahmasbi/GeneEvolve", "max_stars_repo_head_hexsha": "84e908d99d440787e26a6bf304492b98cd7205df", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import pandas as pd import numpy as np import re import string import spacy from spacy.matcher import Matcher, PhraseMatcher from spacy.tokens import Span, Doc, Token from spacy.pipeline import Sentencizer from textacy.spacier import utils import pkg_resources from symspellpy import SymSpell, Verbosity import stream...
{"hexsha": "1f1e3eb1beaa2f725dd1098c31ec8382913bed8e", "size": 10469, "ext": "py", "lang": "Python", "max_stars_repo_path": "dashboards/custom_ner.py", "max_stars_repo_name": "aixpact-ml/first_azure", "max_stars_repo_head_hexsha": "c13a4f24bce3af4132cc3b05e051abc51a9ea91f", "max_stars_repo_licenses": ["MIT"], "max_star...
""" Note: This is a updated version from my previous code, for the target network, I use moving average to soft replace target parameters instead using assign function. By doing this, it has 20% speed up on my machine (CPU). Deep Deterministic Policy Gradient (DDPG), Reinforcement Learning. DDPG is Actor Critic based ...
{"hexsha": "4c2d18aca6023f081c0031e407abf6933c1de006", "size": 5679, "ext": "py", "lang": "Python", "max_stars_repo_path": "contents/9_Deep_Deterministic_Policy_Gradient_DDPG/DDPG_update2.py", "max_stars_repo_name": "zhangbo2008/Reinforcement-learning-with-tensorflow", "max_stars_repo_head_hexsha": "7387f9731ed9a72891c...
#!/usr/bin/env python # coding: utf-8 from collections import Counter, defaultdict from itertools import product, groupby import datetime import glob import os import pickle import random import sys import timeit import numpy as np import pandas as pd from scipy.stats import mode, spearmanr from tqdm import tqdm from...
{"hexsha": "cabe6b6b932feb96f3cf76fbbecbdae4e12de98d", "size": 47211, "ext": "py", "lang": "Python", "max_stars_repo_path": "a6_train_risk_model.py", "max_stars_repo_name": "mghcdac/covid_acuity_score", "max_stars_repo_head_hexsha": "8a0fa4d77845b3af34dfae0d7eac7c8ec804dd7e", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma l2_refines_init_l1 [iff]: "init l2 \<subseteq> R12s `` (init l1)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. init l2 \<subseteq> R12s `` init l1 [PROOF STEP] by (auto simp add: R12s_defs l1_defs l2_loc_defs)
{"llama_tokens": 111, "file": "Key_Agreement_Strong_Adversaries_dhlvl2", "length": 1}
from scipy.stats import pearsonr, entropy import numpy as np def compute_jsd(p, q): p = np.asarray(p) q = np.asarray(q) p /= p.sum() q /= q.sum() m = (p + q) / 2 return (entropy(p, m) + entropy(q, m)) / 2 def compute_kld(p, q): return sum(p[i] * np.log(p[i]/q[i]) for i in range(len(p))) ...
{"hexsha": "a78b279ca6afb64c051dc0ad389f418595e11944", "size": 771, "ext": "py", "lang": "Python", "max_stars_repo_path": "contextualized_topic_model/evaluate.py", "max_stars_repo_name": "bkolosk1/semeval-2022-MNS", "max_stars_repo_head_hexsha": "84285ff212b500e515a6d44d3db09b131c7c2163", "max_stars_repo_licenses": ["M...
#!/usr/local/sci/bin/python #*************************************** # # Plot uncertainty maps (with coverage completeness) # # 23 July 2013 RJHD #*************************************** #************************************************************************ # SVN Info # $Rev:: 36 ...
{"hexsha": "df263b70b0470cf46d905f794e07947ae9f7d0ad", "size": 21092, "ext": "py", "lang": "Python", "max_stars_repo_path": "PYTHON/plot_uncertainty_maps_jack.py", "max_stars_repo_name": "Kate-Willett/Climate_Explorer", "max_stars_repo_head_hexsha": "d49e65a6caa9beb1a859e16d3827022442bad324", "max_stars_repo_licenses":...
#! /usr/bin/env python """ PID control for crib nav task. Author: LinZHanK (linzhank@gmail.com) """ from __future__ import absolute_import, division, print_function import numpy as np import gym import rospy import random import os import time import datetime import matplotlib.pyplot as plt import envs.crib_nav_ta...
{"hexsha": "fff427deb6c447505497eb47c2aee3ad82b9a7f3", "size": 3757, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/turtlebot_crib/crib_nav_pid.py", "max_stars_repo_name": "linZHank/gazebo_rl", "max_stars_repo_head_hexsha": "827e8f6ad0b0d0a912b80c14e20edc5e1ae5be53", "max_stars_repo_licenses": ["MIT"], ...
""" Convenience script to tune a camera view in a mujoco environment. Allows keyboard presses to move a camera around in the viewer, and then prints the final position and quaternion you should set for your camera in the mujoco XML file. """ import time import argparse import glfw import xml.etree.ElementTree as ET im...
{"hexsha": "0a4d7378c68d87e6cd8ecf8e571fb12c328295d5", "size": 11719, "ext": "py", "lang": "Python", "max_stars_repo_path": "robosuite/scripts/tune_camera.py", "max_stars_repo_name": "wangcongrobot/robosuite-underwater", "max_stars_repo_head_hexsha": "9d4eb62d4d20bf21fa396097f69c3bab3fafa98b", "max_stars_repo_licenses"...
import numpy as np def iou_np(y_true, y_pred, smooth=1.): intersection = y_true * y_pred union = y_true + y_pred return np.sum(intersection + smooth) / np.sum(union - intersection + smooth) def iou_thresholded_np(y_true, y_pred, threshold=0.5, smooth=1.): y_pred_pos = (y_pred > threshold) * 1.0 ...
{"hexsha": "92d31f2ad1071e3b55fc85dabfe4bd8257724153", "size": 894, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm/ilab/metrics_np.py", "max_stars_repo_name": "ucrscholar/HandWashNet", "max_stars_repo_head_hexsha": "2a01099b9d054956fd335ec4de6aff2064d5ef4e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Base.@kwdef struct CSVSchema{T₁ <: AbstractVendor, T₂ <: AbstractProduct, T₃ <: AbstractData} <: AbstractSchema # vendor::T₁ = GenericVendor() # product::T₂ = GenericProduct() # data::T₃ = # end struct CSVSchema{T₁ <: AbstractVendor, T₂ <: AbstractProduct, T₃ <: AbstractData} <: AbstractSchema vend...
{"hexsha": "02a984a17da141cfcb9b150dc8eea91c084a226c", "size": 360, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/schemas.jl", "max_stars_repo_name": "zygmuntszpak/CImGuiExtensions.jl", "max_stars_repo_head_hexsha": "6e81f9949cc536fbaa6ca1f91e4276cd069200f4", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import csv import numpy as np """ Recomputes the stats when there are more than 1 generation batch. To use script, run: python tools/recompute_stats.py --path path/to/folder/ """ # define the argument parser parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, ...
{"hexsha": "e54eef05b64e33570e1b1387dc54d3b0bc74255d", "size": 3147, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/recompute_stats.py", "max_stars_repo_name": "olsson-group/RL-GraphINVENT", "max_stars_repo_head_hexsha": "d4629a3c411c793e1ed1682592d5bf67937564a1", "max_stars_repo_licenses": ["MIT"], "max_...
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from pandas import Series, DataFrame sns.set_style('whitegrid') def handle_embarked(titanic_df, test_df): # only in titanic_df, fill the two missing values with the most occurred value, which is "S". titanic_df["Emba...
{"hexsha": "a9f85270cfa00bab007e2a5b7a2e77b5a37c84d4", "size": 9835, "ext": "py", "lang": "Python", "max_stars_repo_path": "featurehandler.py", "max_stars_repo_name": "neveragain1995/TitanicML", "max_stars_repo_head_hexsha": "357538c0d4abaa3965ac6058ba96426c8a0dff75", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import matplotlib matplotlib.use('Qt5Agg') import numpy as np import cv2 as cv import matplotlib.pyplot as plt img = cv.imread('images/pedestrian.jpg') img = cv.cvtColor(img, cv.COLOR_BGR2RGB) """ Average filter """ N = 19 kernel = np.ones((N,N),np.float32) kernel = kernel / kernel.sum() dst = cv.filter2D(img,-1,ker...
{"hexsha": "56ea733f65c8b94862f65e27bd49806e30d76937", "size": 980, "ext": "py", "lang": "Python", "max_stars_repo_path": "smoothing.py", "max_stars_repo_name": "blurry-mood/computer-vision-opencv", "max_stars_repo_head_hexsha": "327fe65b1c731e19c4d83c468f93cc7edc818918", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import pandas import MySQLdb from matplotlib import pylab as plt import numpy as np import os db = MySQLdb.connect("menchelabdb.int.cemm.at", "root", "cqsr4h", "ImageAnalysisDDI") def ensure_dir(file_path): ''' Function to ensure a file path exists, else creates the path :param file_path: :return: ...
{"hexsha": "29aecbdb62d9d09db15276055f65c2a9b679fe08", "size": 5348, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/ImageAnalysisAndExtraction/9b_CheckCellCoundOverTime.py", "max_stars_repo_name": "menchelab/Perturbome", "max_stars_repo_head_hexsha": "c93aeb2d42a1900f5060322732dd97f8eb8db7bd", "max_stars_r...
\documentclass[12pt,letterpaper]{article} \usepackage{fullpage} \usepackage[top=2cm, bottom=4.5cm, left=2.5cm, right=2.5cm]{geometry} \usepackage{amsmath,amsthm,amsfonts,amssymb,amscd} \usepackage{lastpage} \usepackage{enumerate} \usepackage{fancyhdr} \usepackage{mathrsfs} \usepackage{xcolor} \usepackage{graphicx} \use...
{"hexsha": "2fb405bd055e02585a3caa49f519c3b55c5834f0", "size": 7835, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/homework3/report.tex", "max_stars_repo_name": "hyeonjang/numerical-optimization", "max_stars_repo_head_hexsha": "39ab4f75056acf5f7c0779bf3330046f29430bd0", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma subformulas\<^sub>\<nu>_subset: "\<psi> \<in> subfrmlsn \<phi> \<Longrightarrow> subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<psi> \<in> subfrmlsn \<phi> \<Longrightarrow> subformulas\<^sub>\<nu> \<psi> \<subseteq> sub...
{"llama_tokens": 142, "file": "LTL_Master_Theorem_Logical_Characterization_Syntactic_Fragments_and_Stability", "length": 1}
import jax.numpy as jnp from jax import grad, jit, vmap from jax import random from jax.scipy.special import logsumexp # A helper function to randomly initialize weights and biases # for a dense neural network layer def random_layer_params(m, n, key, scale=1e-2): w_key, b_key = random.split(key) return scale * ran...
{"hexsha": "efc52d89dfa4045dd9bb5de5224316153d0a012e", "size": 4517, "ext": "py", "lang": "Python", "max_stars_repo_path": "Flash_No_Flash/dataloading.py", "max_stars_repo_name": "mshafiei/DifferentiableSolver", "max_stars_repo_head_hexsha": "9978faf98ee467739761608e524747da5ef672a4", "max_stars_repo_licenses": ["MIT"]...
/- Copyright (c) 2021 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import measure_theory.group.arithmetic /-! # (Scalar) multiplication and (vector) addition as measurable equivalences In this file we define the following m...
{"author": "jjaassoonn", "repo": "projective_space", "sha": "11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce", "save_path": "github-repos/lean/jjaassoonn-projective_space", "path": "github-repos/lean/jjaassoonn-projective_space/projective_space-11fe19fe9d7991a272e7a40be4b6ad9b0c10c7ce/src/measure_theory/group/measurable_equiv...
# -*- coding: utf-8 -*- """ Created on Fri Jan 4 05:41:06 2019 @author: ymamo """ from random import randint from scipy.stats.mstats import gmean #from ML_Mesa import MetaAgent class rules(): def __init__(self): self.policy_type = self.choose_type() def choose_type(self):...
{"hexsha": "9ad605615fddab5d03a58309c7dd981b839f5296", "size": 4297, "ext": "py", "lang": "Python", "max_stars_repo_path": "Policy-Network/organization.py", "max_stars_repo_name": "mahdijo6731/SugarScape", "max_stars_repo_head_hexsha": "20023227206fee87b3d558f9982831aeddb9d910", "max_stars_repo_licenses": ["MIT"], "max...
""" Traits for the HARPS-N spectrograph. https://plone.unige.ch/HARPS-N/ Author: Alex Wise and collaborators Created: April 2021 """ """ Delegates loading of code specifying types essential to the package. """ import RvSpectMLBase: min_order, max_order, min_pixel_in_order, max_pixel_in_order, min_pixel, max_p...
{"hexsha": "ded85e362edbfdf26471a0788c792a57b49cd94e", "size": 2240, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/harps-n/traits.jl", "max_stars_repo_name": "RvSpectML/EchelleInstruments", "max_stars_repo_head_hexsha": "f77a226fcdd7429dad10bbd6f56426263ba9766a", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
{"hexsha": "a476cc98e600fa2d7a296db61f7804144109e684", "size": 7283, "ext": "py", "lang": "Python", "max_stars_repo_path": "openquake/calculators/scenario_damage.py", "max_stars_repo_name": "gfzriesgos/shakyground-lfs", "max_stars_repo_head_hexsha": "2caf67cc32e6800286eded2df1efb05973ccf41b", "max_stars_repo_licenses":...
(** Coq coding by choukh, Sep 2021 **) Require Import BBST.Axiom.Meta. Require Import BBST.Axiom.Extensionality. Require Import BBST.Axiom.Separation. Axiom 至少有 : 集合 → 集合 → 集合. Axiom 配对公理 : ∀ a b, a ∈ 至少有 a b ∧ b ∈ 至少有 a b. Definition 配对 := λ a b, {x ∊ 至少有 a b | x = a ∨ x = b}. Notation "{ a , b }" := (配对 a b) : 集合域...
{"author": "choukh", "repo": "Baby-Set-Theory", "sha": "e41d9363ea2a657fc5c1286f92d25db062d4105f", "save_path": "github-repos/coq/choukh-Baby-Set-Theory", "path": "github-repos/coq/choukh-Baby-Set-Theory/Baby-Set-Theory-e41d9363ea2a657fc5c1286f92d25db062d4105f/Axiom/Pairing.v"}
function [pos, tri] = remove_double_vertices(pos, tri) % REMOVE_DOUBLE_VERTICES removes double vertices from a triangular, tetrahedral or % hexahedral mesh, renumbering the vertex-indices for the elements. % % Use as % [pos, tri] = remove_double_vertices(pos, tri) % [pos, tet] = remove_double_vertices(pos, tet) % ...
{"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/private/remove_double_vertices.m"}
from aide_design.shared.units import unit_registry as u from scipy import special from scipy.optimize import curve_fit import collections import pandas as pd import numpy as np # Carbonates # The following code defines the carbonate system and provides functions for # calculating Acid Neutralizing Capacity. Kw = 10**(...
{"hexsha": "4cc47fb43bb40d8905895fc9f9880e2e0a516b51", "size": 16232, "ext": "py", "lang": "Python", "max_stars_repo_path": "aguaclara_research/Environmental_Processes_Analysis.py", "max_stars_repo_name": "AguaClara/aguaclara_research", "max_stars_repo_head_hexsha": "27dcab01b3f53a5221988552fa45d1715da35978", "max_star...
""" BlackHoleSource.py Author: Jordan Mirocha Affiliation: University of Colorado at Boulder Created on: Mon Jul 8 09:56:38 MDT 2013 Description: """ import numpy as np from scipy.integrate import quad, romberg from ..physics.Constants import * from .StellarSource import _Planck from ..util.SetDefaultParameterVa...
{"hexsha": "8d0827a660128007c100e2b6c5599485dc7ee46c", "size": 14321, "ext": "py", "lang": "Python", "max_stars_repo_path": "rt1d/sources/BlackHoleSource.py", "max_stars_repo_name": "astrojhgu/rt1d", "max_stars_repo_head_hexsha": "cb49510ae9850d1491dcf9336e3994fb1b153438", "max_stars_repo_licenses": ["MIT"], "max_stars...
class ModelBS: def __init__(self, DepLevel, NumberInitiave, Budget): import numpy as np import math import random #Level of the dependence between Initiatives DepLevelArray = np.array([0,0.25,0.5,0.75,1]); #Initiatives Initiati...
{"hexsha": "c2941db8a4758dec99378f77772416c1414d2ad6", "size": 4884, "ext": "py", "lang": "Python", "max_stars_repo_path": "ModelBS.py", "max_stars_repo_name": "carlosclaiton/Heuristic_Optimisation", "max_stars_repo_head_hexsha": "886f7fb7af9822eaf14ebcd5f290843b9ac19382", "max_stars_repo_licenses": ["MIT"], "max_stars...
import gym import numpy as np import torch import random import pybullet_envs import time from sklearn.metrics import roc_curve, auc from sklearn import datasets, manifold import matplotlib.pyplot as plt import copy import log_utils, os, pickle from deep_rl import * from InterSADR_train import Encoder, Actor, Criti...
{"hexsha": "3c867a8982dd73aa0a049c7d634029d4ba28b716", "size": 5686, "ext": "py", "lang": "Python", "max_stars_repo_path": "InterSADR/InterSADR_track.py", "max_stars_repo_name": "HeGsnS/EPG", "max_stars_repo_head_hexsha": "8e11b6c38ec655eb7fb43309e35b77106bc452ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import annotations """The data set class""" __author__ = "Ruben R. Kazumov" __copyright__ = "Copyright 2019, Ruben R. Kazumov" __credits__ = ["Ruben R. Kazumov"] __license__ = "MIT" __version__ = [3, 0, 0] __maintainer__ = "Ruben R. Kazumov" __email__ = "kazumov@gmail.com" __status__ = "Production" i...
{"hexsha": "e17f1352c20bc97488f75d1fe1827c10b4260ce8", "size": 7363, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab/data.py", "max_stars_repo_name": "kazumov/na-zero-vs-mean", "max_stars_repo_head_hexsha": "a80e168b3f83dfccc6c294e16c52f4a582a0f345", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
""" Case 12: This case study a three bus system with 2 machines (Classic Model - Single Shaft: 2 State model) without loads. The machine at bus 1 is used as a reference machine, while machine at bus 2 has a simplified droop governor (TGTypeII). The perturbation trips one of the four (out of 5) circuits of line between ...
{"hexsha": "187e38a1c948740d21cf0a787b86cbeffaa81380", "size": 1701, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_case12_multimachine.jl", "max_stars_repo_name": "Energy-MAC/LITS.jl", "max_stars_repo_head_hexsha": "b5d2d64f5967abbc05a2f26ac104e9598220e6cd", "max_stars_repo_licenses": ["BSD-3-Clause"]...
// (C) Copyright David Abrahams 2000. // 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 REVERSE_GRAPH_DWA092300_H_ #define REVERSE_GRAPH_DWA092300_H_ #include <boost/graph/adjacency_iterator.hpp> #includ...
{"hexsha": "86bcdc408252fa017dc74cb6f552304c510be0c0", "size": 22402, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ReactNativeFrontend/ios/Pods/boost/boost/graph/reverse_graph.hpp", "max_stars_repo_name": "Harshitha91/Tmdb-react-native-node", "max_stars_repo_head_hexsha": "e06e3f25a7ee6946ef07a1f524fdf62e484242...
from febo.utils import locate, get_logger from types import FunctionType from febo.environment.environment import EnvironmentConfig from febo.utils.config import Configurable, EnumConfigField, ConfigField, assign_config, config_manager, \ ClassListConfigField from febo.environment.environment import Environment, C...
{"hexsha": "323c71affe8bee8176cd23a1c7b346fa47fbdbac", "size": 8898, "ext": "py", "lang": "Python", "max_stars_repo_path": "hdbo/febo/environment/benchmarks/benchmarks.py", "max_stars_repo_name": "eric-vader/HD-BO-Additive-Models", "max_stars_repo_head_hexsha": "0d7e1d46194af2e3d402631caec6e7be9a50376a", "max_stars_rep...
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Project: http://cloudedbats.org # Copyright (c) 2019 Arnold Andreasson # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). import numpy class PlotBase(): """ """ def __init__(self, figure, canvas=None): """ """ self.figur...
{"hexsha": "223205acaf93fdf97f3c1235cc2d8a86adfd8cad", "size": 5450, "ext": "py", "lang": "Python", "max_stars_repo_path": "sound4bats/plot_base.py", "max_stars_repo_name": "cloudedbats/cloudedbats_sound", "max_stars_repo_head_hexsha": "e9c263ed86665f2f2a0b8bed300bca0a5c5b61f6", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np from matplotlib import patches as mpatches from scipy import stats as ss def bootstrap(p, n, ci=0.05): """Given a fraction correct (p) and total count (n) (both arrays) and a confidence interval return us two arrays l, h indicating the lower and higher confidence limits :param p: :param n:...
{"hexsha": "ffe4086ff477d8d82f5207fad64e4884e5063b9d", "size": 4910, "ext": "py", "lang": "Python", "max_stars_repo_path": "mitty/benchmarking/plot/byvsize.py", "max_stars_repo_name": "ozemsbg/Mitty", "max_stars_repo_head_hexsha": "5fc6ad399c5366442034b59dfd1c0f9bab199a3f", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# -*- coding: utf-8 -*- """ Created on Mon Jun 3 00:34:32 2019 @author: sjtujay """ import numpy as np import matplotlib.pyplot as plt x = [10000,15000,20000,25000,30000,35000,40000,45000,50000,55000] x = np.array(x) #rbf accuracy y1 = [0.9255,0.9285,0.9370,0.9400,0.9450,0.9460,0.9485,0.9495,0.9530,0...
{"hexsha": "1e781c99708be6c53313f1618f0c5e9eeca25407", "size": 2012, "ext": "py", "lang": "Python", "max_stars_repo_path": "SVM&NN/DataB/draw_svm.py", "max_stars_repo_name": "Chinajayyyy/MNIST-cs420-SJTU-hw3", "max_stars_repo_head_hexsha": "147ea51e21e55ed9bcfae54478b035f87669c2ea", "max_stars_repo_licenses": ["MIT"], ...
# Lint as: python3 # Copyright 2018, The TensorFlow Federated 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 ...
{"hexsha": "a3b2ba18efa3cad9133c2eed5e2920596a3a26ed", "size": 19428, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_federated/python/learning/framework/optimizer_utils.py", "max_stars_repo_name": "hartmanwilliam/federated", "max_stars_repo_head_hexsha": "55e5fcbfde13ac4788f084e4c3c4714130cd19ec", "m...
# # file: tensorgrid.jl # # Creation of 1D,2D,3D tensor grids # export tensor_grid # This meshgrid functions are extracted from Julia (License is MIT) and modified # by Dirk Peschka: Unfortunately this seemed not to be a callable part of Julia # 0.4.0 base. Extracted only meshgrid functionality from the ndgrid.jl fil...
{"hexsha": "ee97624605269c7b3dc3e7629381d5af73bd8fa9", "size": 4135, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/gridmodule/tensorgrid.jl", "max_stars_repo_name": "dpeschka/jPDE", "max_stars_repo_head_hexsha": "8c783f8f7f112b17842c9651bd13e0fe416796f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
''' This script is a wrapper for the libarducam_mipicamera.so dynamic library. To use this script you need to pre-install libarducam_mipicamera.so https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI ''' from ctypes import * import numpy as np import sys from pibooth.utils import LOGGER try: LOGGER.info("cdll.L...
{"hexsha": "608c11551a0cedf177cae73487a0a7de1f81e4cd", "size": 18927, "ext": "py", "lang": "Python", "max_stars_repo_path": "pibooth/controls/camera/arducam_mipicamera.py", "max_stars_repo_name": "IAmCorbin/pibooth", "max_stars_repo_head_hexsha": "c73f379ca86ce1ce73a1e4816e41e74349ae5a30", "max_stars_repo_licenses": ["...
/- Copyright (c) 2020 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser -/ import linear_algebra.clifford_algebra.basic import linear_algebra.alternating /-! # Exterior Algebras We construct the exterior algebra of...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/linear_algebra/exterior_algebra/basic.lean"...
program demo_not implicit none integer :: i i=13741 write(*,'(b32.32,1x,i0)')i,i write(*,'(b32.32,1x,i0)')not(i),not(i) end program demo_not
{"hexsha": "4bf5f96296e6cf07c63576b52a36891de28ede64", "size": 180, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "example/not.f90", "max_stars_repo_name": "urbanjost/fortran-intrinsic-descriptions", "max_stars_repo_head_hexsha": "59b3618e6c247802cb26f32a1a77e8b718bcc165", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import torch import uuid from helper import Point, distance_between from model import MLP import constants as C class Agent: def __init__(self, env): self._id = uuid.uuid1() self.model = MLP(C.N_INPUTS.prey, C.N_HIDDEN, C.N_ACTIONS) self.pos = env.random_point() if env i...
{"hexsha": "14d595513550ef019b33d20071427a1fbc550c37", "size": 3736, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents.py", "max_stars_repo_name": "robingather/com-thesis", "max_stars_repo_head_hexsha": "30a6e815c4f71edc332a4e74a25faf0dd21c1244", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
#!/usr/bin/env python3 import os import sys import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from optparse import OptionParser from matplotlib.ticker import NullFormatter # Usage: python3 genotypes_hwe_vs_maf.py -o output_file_prefix -e plink_hardy_file -f plink_afreq_file ...
{"hexsha": "19a884eb2c50cf0a9e0c4c7f11c5646c795a10e7", "size": 5527, "ext": "py", "lang": "Python", "max_stars_repo_path": "HPC/quality_control/util/genotypes_hwe_vs_maf.py", "max_stars_repo_name": "Palmer-Lab-UCSD/HS-Rats-Genotyping-Pipeline", "max_stars_repo_head_hexsha": "23547ddf27235249690036b1245533239b239c9d", "...
from unittest import TestCase, SkipTest from rb_cqed import * import numpy as np import copy # Set the absolute tolerance of the tests. abs_tol = 1e-4 # @SkipTest class TestVacuumRabiOscillations(TestCase): ''' TestVacuumRabiOscillations ''' @classmethod def setUpClass(cls): cls.atom4lvl...
{"hexsha": "a76e2501738f5719bd264542ac58a177d2642102", "size": 11474, "ext": "py", "lang": "Python", "max_stars_repo_path": "rb_cqed/tests/test_simple_4lvl_atom.py", "max_stars_repo_name": "tomdbar/rb-cqed", "max_stars_repo_head_hexsha": "d09f8cce91c6f0f079c21a6c797b2d2cbb2f7f81", "max_stars_repo_licenses": ["MIT"], "m...
#! /usr/bin/env python import matplotlib.pyplot as plt from itertools import combinations import numpy as np # 06-array2uv.py takes a dictionary, antArray, of antenna name and # corresponding (x,y) coordinates, computes the centre of the array # and determines the instantaneous uv coverage. # # Written by Vasaant S/O...
{"hexsha": "500335343777d2fb0c0cf4f12a247a182eaf0eeb", "size": 5767, "ext": "py", "lang": "Python", "max_stars_repo_path": "Figs/06-array2uv-meerkat-lecture.py", "max_stars_repo_name": "vasaantk/Introduction-to-Interferometry", "max_stars_repo_head_hexsha": "a584fb8b3888fd9bfa00a19fd212ce2b216ea6bf", "max_stars_repo_li...
# Copyright 2021 The WAX-ML 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
{"hexsha": "45d86338d92a5b466b12bd66531960d37aa7400b", "size": 2788, "ext": "py", "lang": "Python", "max_stars_repo_path": "wax/modules/ewmcov.py", "max_stars_repo_name": "eserie/wax-ml", "max_stars_repo_head_hexsha": "9cf92ff5c41ea681fd3eaaf4560b3380f986ee1e", "max_stars_repo_licenses": ["MIT", "ECL-2.0", "Apache-2.0"...
"""Common utilities.""" import functools import numbers import os import sys import shutil import logging import yaml import torch from packaging import version import json def get_params_by_name(model, names): """Get params/buffers by name.""" named_parameters = dict(model.named_parameters()) # print(len...
{"hexsha": "f48b1d2c66ea88f78dcc6bce116bc8618e16a8e7", "size": 7893, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/common.py", "max_stars_repo_name": "dingmyu/HR-NAS", "max_stars_repo_head_hexsha": "003c3b6bd0168751c884b6999ffc8c13b36a39e2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 122, "ma...
/** * This reads a list of netflows from a file and finds all the triangles. * This is used as a check on what is found using the SAM parallel * infrastructure. */ //#define DEBUG #define DETAIL_TIMING #include <fstream> #include <boost/program_options.hpp> #include <sam/Util.hpp> #include <sam/VastNetflow.hpp> ...
{"hexsha": "ef4942f1f678a9d43a8ea5efb9264445f87c27e8", "size": 1703, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ExecutableSrc/SerialCountTriangles.cpp", "max_stars_repo_name": "dirkcgrunwald/SAM", "max_stars_repo_head_hexsha": "0478925c506ad38fd405954cc4415a3e96e77d90", "max_stars_repo_licenses": ["MIT"], "ma...
"""Function to compute exp(2π i x)""" cis2pi(x) = cispi(2x) """Function to compute sin(2π x)""" sin2pi(x) = sinpi(2x) """Function to compute cos(2π x)""" cos2pi(x) = cospi(2x)
{"hexsha": "a98596ad9ab243bdd762519991a8c9c5719c1d6e", "size": 177, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/common/cis2pi.jl", "max_stars_repo_name": "epolack/DFTK.jl", "max_stars_repo_head_hexsha": "7256a356c9870aee350fbf181f10de8f4d83f592", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 9, "...
function newParameters = load(filepath) % load Load GPT-2 % % parameters = load(filepath) will load a GPT-2 model from the directory % specified by filepath. % Load the parameters s = load(filepath); % First, assign the hyperparameters and then remove them from the loaded % structure. newParameters = struct; ne...
{"author": "matlab-deep-learning", "repo": "transformer-models", "sha": "87f02af6b91c5bd7ac8479ea433f20435644d165", "save_path": "github-repos/MATLAB/matlab-deep-learning-transformer-models", "path": "github-repos/MATLAB/matlab-deep-learning-transformer-models/transformer-models-87f02af6b91c5bd7ac8479ea433f20435644d165...
from typing import Optional, Dict import numpy as np import pandas as pd import warnings from ema_workbench import RealParameter, Constant, CategoricalParameter ema_mod = __import__('ema_workbench') def generate_params(prefix: str, dataset: Dict, override: Optional[Dict]=None): """Generate EMA Workbench compat...
{"hexsha": "18f266e76e2897a976d097613db8af1a1ab66a13", "size": 4141, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/agtor/data_interface/properties.py", "max_stars_repo_name": "ConnectedSystems/agtor", "max_stars_repo_head_hexsha": "49d3b6a590101293fcf3255aee7f82fa4a7b1c68", "max_stars_repo_licenses": ["MIT...
subroutine advect_scalar2D( f, u, w, rho, rhow, flux, f_ref, do_poslimit ) ! Two dimentional 3rd order PPM scheme with selective flux correction ! Optional flux correction for positivity as well. use grid use advect_lib use params, only: dowallx implicit none ! input & output real, dimension(dim...
{"hexsha": "a1c156f2c63595c62f302420a3caf5e75aa73030", "size": 2925, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "ext/sam/SRC/ADV_SELPPM/advect_scalar2D.f90", "max_stars_repo_name": "kbren/uwnet", "max_stars_repo_head_hexsha": "aac01e243c19686b10c214b1c56b0bb7b7e06a07", "max_stars_repo_licenses": ["MIT"], "...
# requires scipy, dtw, fastdtw, numpy, matplotlib # all available by pip install from dtw import dtw import numpy as np import matplotlib.pyplot as plt from numpy.linalg import norm import math from scipy.spatial.distance import euclidean from fastdtw import fastdtw from scipy.stats.stats import pearsonr # load the ti...
{"hexsha": "bce66f5ad892371745ea9b24833215dcf858c394", "size": 5701, "ext": "py", "lang": "Python", "max_stars_repo_path": "similarity_calculator_fn.py", "max_stars_repo_name": "vincentteyssier/time-series-similarities", "max_stars_repo_head_hexsha": "d54d25f497c0e1c2130547ecec7622b544aabe81", "max_stars_repo_licenses"...
#include <boost/asio/impl/src.hpp> #include <boost/beast/src.hpp> #include <boost/json/src.hpp>
{"hexsha": "ab53f0d0aa6a76fbe2fcb1686fb892718e6dc4e8", "size": 96, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/common.cpp", "max_stars_repo_name": "Qis/Server", "max_stars_repo_head_hexsha": "8a0ad568fa567168ad897e9c08cbe874c652f166", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 2.0, "max_sta...
/* * Copyright (C) 2016 Simon Fels <morphis@gravedo.de> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, bu...
{"hexsha": "dfd34d5dd52143c302489c572ac7f2a4e7e2d865", "size": 3636, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/type3_AndroidCloud/anbox-master/src/anbox/graphics/gl_renderer_server.cpp", "max_stars_repo_name": "akraino-edge-stack/iec", "max_stars_repo_head_hexsha": "b01bce6165ef8368a607e17e1f3d4697b79db3...
using CQL; server = "localhost"; #include(joinpath(Pkg.dir("CQL","test"),"examples.jl")) to add it function cqltest01() ## 'Example of a music service' from the manual ## 'About CQL for Cassandra 2.0' c = CQL.connect(server); CQL.command(c, "CREATE KEYSPACE demo WITH REPLICATION = {'class' : ...
{"hexsha": "f8e9d267a1e7db00af86503e08a55a8347537e51", "size": 6556, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/examples.jl", "max_stars_repo_name": "UnofficialJuliaMirror/CQL.jl-484db1fa-5b09-57e4-b4aa-3b3c8d692513", "max_stars_repo_head_hexsha": "5a5ec135a7923798b0ebf3b3688d152c27473567", "max_stars_r...
[STATEMENT] lemma (in Group) sg_l_i:"\<lbrakk>G \<guillemotright> H; x \<in> H \<rbrakk> \<Longrightarrow> (\<rho> x) \<cdot> x = \<one>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>G \<guillemotright> H ; x \<in> H\<rbrakk> \<Longrightarrow> \<rho> x \<cdot> x = \<one> [PROOF STEP] by (frule sg_subset_e...
{"llama_tokens": 159, "file": "Group-Ring-Module_Algebra2", "length": 1}
import cv2 import numpy as np import threading import time import queue import uuid import logging from dct.util.silverstone import DeepRacerCar class StreamConsumer: def __init__(self): self.queue = queue.Queue() def notify(self, frame): self.queue.put(frame) def frame_iterator(self): ...
{"hexsha": "b9c3d7436ed5cb86d10e3ba55f35997fa339ce1f", "size": 5869, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dct/camera/stream.py", "max_stars_repo_name": "jochem725/deepracer-camera-telemetry", "max_stars_repo_head_hexsha": "e0ceb227cb937d5e502a6231c9b4ebde6927dc64", "max_stars_repo_licenses": ["MIT...
import numpy as np from BeamSearchTree import BeamSearchTreeNode def best_k(np_array, k): indices = np.argpartition(np_array, -k)[-k:] return indices[np.argsort(np_array[indices])] def find_path(tree, k=1): paths = [] def search_tree(path, node, path_prob): if not node.children: ...
{"hexsha": "ce4c486dd11780d137bda12b01c6eab8f0e12f1e", "size": 2105, "ext": "py", "lang": "Python", "max_stars_repo_path": "lm/beamSearch.py", "max_stars_repo_name": "CRAFIS/pycodesuggest", "max_stars_repo_head_hexsha": "c21ab27e46d5c8078636f4b0b49c55e6eb9096ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...