text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import json import operator import pickle import numpy as np from scipy import optimize from datasets import DATASET def combine_rank_scores(coeffs, *rank_scores): """Combining the rank score of different algorithms""" final_score = [] for scores in zip(*rank_scores): combined_score = coeffs @ ...
{"hexsha": "60dbc4c143a9374e0b75eb0d8d524b32abdfa985", "size": 5793, "ext": "py", "lang": "Python", "max_stars_repo_path": "buglocalizer/evaluation.py", "max_stars_repo_name": "h4iku/bug-localization", "max_stars_repo_head_hexsha": "1d3150c4a7aa65eb0f84674938ca64d1462cc190", "max_stars_repo_licenses": ["MIT"], "max_sta...
program error_stop_integer_code use caffeine_m, only : caffeinate, decaffeinate, caf_error_stop implicit none if (caffeinate() /= 0) error stop "caffeinate returned a non-zero exit_code" call caf_error_stop(1) stop 0 ! caffeine/test/caf_error_stop_test.f90 reports a failure if this line runs end program ...
{"hexsha": "b94a9152ce3262893acac18e678768db742c318e", "size": 321, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "example/support-test/error_stop_integer_code.f90", "max_stars_repo_name": "bonachea/caffeine", "max_stars_repo_head_hexsha": "a3883c0f350e898dd46718f3d92133f5558971c8", "max_stars_repo_licenses":...
# Copyright (c) 2020 NVIDIA Corporation. All rights reserved. # This work is licensed under the NVIDIA Source Code License - Non-commercial. Full # text can be found in LICENSE.md import argparse from collections import OrderedDict as odict import pickle import os import random import socket import time import numpy ...
{"hexsha": "62446c0887c04c85e11925e97f8077d7155bcb84", "size": 29677, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/train_network.py", "max_stars_repo_name": "OSU-AIMS/DREAM", "max_stars_repo_head_hexsha": "ff4ead025d5380599fe9c825e501a2f9bdb7dfb9", "max_stars_repo_licenses": ["BSD-Source-Code"], "max_...
function [U,S,V] = svdsecon(X,k) % Input: % X : m x n matrix % k : extracts the first k singular values % % Output: % X = U*S*V' approximately (up to k) % % Description: % Does equivalent to svds(X,k) but faster % Requires that k < min(m,n) where [m,n] = size(X) % This function is useful if k is much smaller than m and...
{"author": "zhoupc", "repo": "CNMF_E", "sha": "ccca6f9db7d1d15b7dd1266eb9b29e417f92e79f", "save_path": "github-repos/MATLAB/zhoupc-CNMF_E", "path": "github-repos/MATLAB/zhoupc-CNMF_E/CNMF_E-ccca6f9db7d1d15b7dd1266eb9b29e417f92e79f/ca_source_extraction/endoscope/svdsecon.m"}
import images import knn import numpy as np FRAMES_PER_NODE = 115 NUMBER_OF_NODES = 7 SAMPLE_IMAGE = 'Frames/Nodo_2/imagen6.jpg' TEST_IMAGE = 'Test/Lenna.png' print 'Loading images...' data, responses = images.load_frames(NUMBER_OF_NODES, FRAMES_PER_NODE) print 'Train KNN...' knn_model = knn.train(data, responses) ...
{"hexsha": "8ce4457e8d78fa822398aba94ec247a557b89d76", "size": 746, "ext": "py", "lang": "Python", "max_stars_repo_path": "test-static.py", "max_stars_repo_name": "jmorenov/RA-practica2-opencv", "max_stars_repo_head_hexsha": "99c549aa2b2bf4a2222536e066168ccff5b892d0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import math import sympy print(math.sqrt(9)) print(math.sqrt(8)) print(sympy.sqrt(3)) print(sympy.sqrt(8)) print(sympy.sqrt(9)) x = sympy.sqrt(9) print(type(x)) y = int(x) print(type(y)) print(y) z = x / 5 print(type(z)) print(z)
{"hexsha": "271118535ad384468e44cccb5781e2f9e99a8073", "size": 238, "ext": "py", "lang": "Python", "max_stars_repo_path": "c2.py", "max_stars_repo_name": "bobbydurrett/sympytutorial", "max_stars_repo_head_hexsha": "071b2f0de8b6934556ab1e48d180e424bcbd7345", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#econogee, 1/28/2016 #Stock Data Retrieval Script #If executed via the command line, will produce 500 data files with stock price information #between the dates specified in the main method. Can also be imported to use the RetrieveStock method. import os import sys import numpy as np import urllib2 def RetrieveStoc...
{"hexsha": "b5781bb9af7e3ceaef9f0f099b507a9569ee51fc", "size": 1262, "ext": "py", "lang": "Python", "max_stars_repo_path": "StockReader.py", "max_stars_repo_name": "econogee/FinanceScripts", "max_stars_repo_head_hexsha": "8090b33ed094c329c96eaec38e7892f9e937a075", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
Require Export ProjectiveGeometry.Dev.matroid_to_matroid_p. (*****************************************************************************) (** Matroid properties **) Section s_matroidProperties. Context `{M : Matroid}. Context `{EP : EqDecidability Point}. Global Add Morphism couple : couple_mor. Proof. intros. u...
{"author": "ProjectiveGeometry", "repo": "ProjectiveGeometry", "sha": "4f7f4e6c14580833c91fdef38d048259fb454b88", "save_path": "github-repos/coq/ProjectiveGeometry-ProjectiveGeometry", "path": "github-repos/coq/ProjectiveGeometry-ProjectiveGeometry/ProjectiveGeometry-4f7f4e6c14580833c91fdef38d048259fb454b88/Dev/matroid...
import datetime import dateutil.parser import pickle import os.path from datetime import timedelta from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request import numpy as np import requests SCOPES = ['https://www.googleapis.c...
{"hexsha": "ccf39d8265581f213d3ba694c083a1944b2d5633", "size": 4403, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/cal.py", "max_stars_repo_name": "Glasgow19/team-13", "max_stars_repo_head_hexsha": "ace89bfa9efc91f2fd4dea6ec3344aa70dbbe25f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import torch import torch.nn.functional as F import argparse, time, datetime, shutil import sys, os, glob, json, random import warnings warnings.filterwarnings("ignore") import numpy as np import pandas as pd import networkx as nx from scipy.sparse import csr_matrix, lil_matrix, save_npz, load_npz from sklearn.metrics...
{"hexsha": "d069b9fe408e78766ec30276d20296c10195396b", "size": 18797, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/gnn_train/gnn_train_main.py", "max_stars_repo_name": "shaanchandra/SAFER", "max_stars_repo_head_hexsha": "0f98a1d2080e120174f17370d9d0472901a1c4a1", "max_stars_repo_licenses": ["MIT"], "max_...
-- | Module for providing various functionals used in calculations involving -- quantum mathematics. This includes the fidelity and trace norm. module Hoqus.Fidelity where import Numeric.LinearAlgebra.Data import Numeric.LinearAlgebra import Hoqus.MtxFun -- | Function 'fidelity' calculates the fidelity between two q...
{"hexsha": "45f0a9c2f98619c10166fd141331a64efc7faa17", "size": 1022, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "Hoqus/Fidelity.hs", "max_stars_repo_name": "jmiszczak/hoqus", "max_stars_repo_head_hexsha": "b350004f0f2c0299b8b78e5a8838639ef5006300", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "...
# -*- coding: utf-8 -*- """ Copyright (c) 2015-2016 Thomas Mertz THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABL...
{"hexsha": "6543aedf9838f5edddef0f99b688f8cd95cfebfe", "size": 4473, "ext": "py", "lang": "Python", "max_stars_repo_path": "py/lacommon.py", "max_stars_repo_name": "t-mertz/progress", "max_stars_repo_head_hexsha": "81a34b3e9a9fd14a764405def52f94843954550d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#!/software/et_env/bin python import numpy as np import george from george import kernels import schwimmbad import dynesty.plotting as dyplot from dynesty import utils as dyfunc import dynesty import time import argparse import os parser=argparse.ArgumentParser() parser.add_argument("--p", help="params for dynesty fi...
{"hexsha": "6e3e3a8b3018c3d671edbbf5ddab30bd2bec3f19", "size": 2169, "ext": "py", "lang": "Python", "max_stars_repo_path": "dyfit.py", "max_stars_repo_name": "elizabethteng/pothos", "max_stars_repo_head_hexsha": "d0195049abaf5beadd2a1ffa9d0db3994778d5f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import numpy as np class AffineLayer: def __init__(self, n_input, n_output, init="Xavier"): self.n_input = int(n_input) self.n_output = int(n_output) self.init = str(init) self.w = self._init_weight(n_input, n_output, method=self.init).T self.b = self._init_weight(n_output...
{"hexsha": "f8f22ce9e5a8c45bb06972b1ab65f20551254367", "size": 1719, "ext": "py", "lang": "Python", "max_stars_repo_path": "programs/models/NeuralNetwork/layers.py", "max_stars_repo_name": "hayato-n/AsakuraBook", "max_stars_repo_head_hexsha": "60c794961cb5d23ba257e33d350ae719ee72dd21", "max_stars_repo_licenses": ["MIT"...
from tatau_core.nn.tatau.summarizer import Summarizer from collections import deque import numpy as np class OptimizerSummarizer(Summarizer): def __init__(self, np_sum_fn): super(OptimizerSummarizer, self).__init__() self._np_sum_fn = np_sum_fn def summarize(self, updates): import tor...
{"hexsha": "98e422268cccdbf68261d5b33ad5ed64db92660f", "size": 1665, "ext": "py", "lang": "Python", "max_stars_repo_path": "tatau_core/nn/torch/summarizer/opt.py", "max_stars_repo_name": "makar21/core", "max_stars_repo_head_hexsha": "e6a0c8d5456567dd3139ee3fd3cf6cd4acdd4a05", "max_stars_repo_licenses": ["Apache-2.0"], ...
import numpy as np import SBCcode as sbc import os import warnings ''' This module calculates goodness of fit for the global PICO calibration set The key function to be called (e.g. from emcee) is PICOcalChisq(theta). Parameters defining the fit are all present in the introductory block that is exec...
{"hexsha": "be2594e7ba24eedd55f2815b4b24810b8439d3b0", "size": 25464, "ext": "py", "lang": "Python", "max_stars_repo_path": "MonteCarlo/PICOcalGlobalLikelihood_reparametrization_floating_nuisance.py", "max_stars_repo_name": "cericdahl/SBCcode", "max_stars_repo_head_hexsha": "90a7841a5c1208d64f71a332289d9005a011aa21", "...
import os import argparse import numpy as np from typing import Callable, List from functools import partial from marchent.marcher import ( Marcher, # color rules rand_color, next_hsv, lighten, turn_color, # move rules ortho_split, angle_split, ) from marchent.board import ( dra...
{"hexsha": "0f8ffe2dd8f56fec22ef25eff28733c0636c9d4d", "size": 4396, "ext": "py", "lang": "Python", "max_stars_repo_path": "marchent/run.py", "max_stars_repo_name": "ndiamant/marchent", "max_stars_repo_head_hexsha": "70d44e314897c98692fbdb98e847c382b7a43853", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
// Aleth: Ethereum C++ client, tools and libraries. // Copyright 2014-2019 Aleth Authors. // Licensed under the GNU General Public License, Version 3. /** * Trie test functions. */ #include <fstream> #include <random> #include <json_spirit/JsonSpiritHeaders.h> #include <libdevcore/CommonIO.h> #include <libethereum...
{"hexsha": "30eebd5297f550d19097a22e6641f9c8d908606c", "size": 1891, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/cpp-ethereum/test/unittests/libethereum/Genesis.cpp", "max_stars_repo_name": "Crowntium/crowntium", "max_stars_repo_head_hexsha": "78c17071dbb957d7799d2508448413bdbea09c2d", "max_stars_repo_lice...
import pickle import numpy as np from PIL import Image from models import utils from tqdm import tqdm import os import tensorflow as tf from keras import backend as K class GetBottleneckFeatures(object): """Save bottleneck features of transfer learning models.""" def __init__(self, model_name): self.model_n...
{"hexsha": "ed673863ded48e8684820d13066bc78e57a86d80", "size": 6820, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/get_transfer_learning_codes.py", "max_stars_repo_name": "LeanderLXZ/capsule-tf", "max_stars_repo_head_hexsha": "9b6a82c06027743062578b7f4f463cc3edf2395e", "max_stars_repo_licenses": ["A...
\documentclass[a4paper,11pt]{article} \usepackage{physics} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm, mathtools, bm} %\usepackage{hyperref} \usepackage{color} \usepackage{verbatim} \usepackage{jheppub} \usepackage[T1]{fontenc} % if needed \newcommand{\be}{\begin{equation}} \new...
{"hexsha": "23c211b78d76c98f134722b32dbf7cc07daf72d7", "size": 26812, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sem2/em/termpaper/termpaper.tex", "max_stars_repo_name": "adivijaykumar/courses", "max_stars_repo_head_hexsha": "c0aebb67332ccf0b116a3348923ab2631b586dac", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma homeomorphism_ident: "homeomorphism T T (\<lambda>a. a) (\<lambda>a. a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. homeomorphism T T (\<lambda>a. a) (\<lambda>a. a) [PROOF STEP] by (rule homeomorphismI) auto
{"llama_tokens": 89, "file": null, "length": 1}
#! C:/Program Files/Python3/python.exe # Define a network that can find and separate data from 2 blobs # from different classes from sklearn.datasets import make_blobs import matplotlib.pyplot as plt import numpy as np import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" # Helper functions def plot_data(pl, X, y): ...
{"hexsha": "d5f6fd571eef2f0c5f4d463aad61eed02d09ccab", "size": 3319, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lecture 1/simple-blobs.py", "max_stars_repo_name": "Amangoel998/keras-tutorial", "max_stars_repo_head_hexsha": "2cdb868e293578ed44d98a7f38fb8519ca403bdc", "max_stars_repo_licenses": ["MIT"], "max_...
#include <boost/filesystem.hpp> #include <vtkXMLImageDataWriter.h> #include "VTIData.h" RayData::RayData( unsigned long Nx, unsigned long Ny, unsigned long Nz, double dx, double dy, double dz) { vti_data = vtkSmartPointer<vtkImageData>::New(); vti_data->SetDimensions(Nx, Ny, Nz); vti_data->SetSpacing(dx, dy, ...
{"hexsha": "4e2c07e49f15b63e8ace52aa274082dfaf368732", "size": 3781, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "RayTracingSolver/src/UtilitiesLib/VTIData.cpp", "max_stars_repo_name": "warthan07/Nemaktis", "max_stars_repo_head_hexsha": "54b1e64c1d40668e6dc22b11eac5487a09b58478", "max_stars_repo_licenses": ["MI...
\chapter{Parameterisations}\label{chap:parameterisations} Although \fluidity\ is capable of resolving a range of scales dynamically using an adaptive mesh, it is not always feasible to resolve all processes and spatial scales that are required for a simulation, and therefore some form of parameterisation is required. ...
{"hexsha": "f9c656e4b41f50ab19ef711700b49108d1550b9d", "size": 49179, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "software/multifluids_icferst/manual/parameterisations.tex", "max_stars_repo_name": "msc-acse/acse-9-independent-research-project-Wade003", "max_stars_repo_head_hexsha": "cfcba990d52ccf535171cf54c0a...
""" Import data from dataset, and preprocess it. To use take advantage of the preprocess in this file, simply import this file to your python code and call `train_table, valid_table = dataset.preprocess()` to get all images in one table with their labels and metadata. Once you have the training and validation table, ...
{"hexsha": "da7505436a17a842ff08450f3abb3a0a440a60c3", "size": 8591, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset.py", "max_stars_repo_name": "sx5640/mura", "max_stars_repo_head_hexsha": "445578e85dc3f49915e35c09a2a277b3ab0aed22", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re...
%\input{../macros.tex} %\begin{document} \begin{answer} For the semi supervised M-step we maximise over $\theta = \phi, \mu, \Sigma$ while keeping $Q$ fixed the expression $ELBO(Q, \theta) + l_{\text{sup}}(\theta) = \sum_{i=1}^n \sum_{j=1}^k Q_i(z_i)_j \log \frac{p(x_i,z_i; \phi, \mu, \Sigma)}{Q_i(z_i)_j} + \alpha \sum...
{"hexsha": "675ccb0f4e73304207b79699a79acc7902e4c314", "size": 2801, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ps3/tex/semi_supervised_em/03-m-step-sol.tex", "max_stars_repo_name": "Ziggareto/cs229", "max_stars_repo_head_hexsha": "10b03b68b24d252dad3e3437561976d9509ebdd0", "max_stars_repo_licenses": ["MIT"],...
# Visualize an annotated image with object sizes import os import cv2 import random import numpy as np from plantcv.plantcv import params from plantcv.plantcv import color_palette from plantcv.plantcv._debug import _debug def obj_sizes(img, mask, num_objects=100): """ Label the size of objects in an image. ...
{"hexsha": "c7baf14179ea3b6a357a779a92ca6e972cc8e477", "size": 3005, "ext": "py", "lang": "Python", "max_stars_repo_path": "plantcv/plantcv/visualize/obj_sizes.py", "max_stars_repo_name": "ygarrot/plantcv", "max_stars_repo_head_hexsha": "e934a891e0d1bf8987ca6a9f982a4ac1f420bfe7", "max_stars_repo_licenses": ["MIT"], "ma...
from __future__ import division import matplotlib as mpl # Set correct backend mpl.use('tkagg') import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np import random import itertools import threading import time import mplcursors import sys from hrm import * from matplotlib.widgets i...
{"hexsha": "d1b80053e7e0106e4436a6e2fb3ccf8190acc508", "size": 5242, "ext": "py", "lang": "Python", "max_stars_repo_path": "hrcurve.py", "max_stars_repo_name": "seirene/heartratedisplay", "max_stars_repo_head_hexsha": "6a5274eab636bd3f4aacd1005bd4644d3c1600d3", "max_stars_repo_licenses": ["Apache-1.1"], "max_stars_coun...
# MIT License: Copyright (c) 2021 Lorenzo Loconte, Gennaro Gala from typing import Optional, List import numpy as np from deeprob.utils.random import RandomState, check_random_state class RegionGraph: def __init__(self, n_features: int, depth: int, random_state: Optional[RandomState] = None): """ ...
{"hexsha": "4f41f3a598b345bddcae618753a24bb77a571dd8", "size": 4391, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeprob/utils/region.py", "max_stars_repo_name": "deeprob-org/deeprob-kit", "max_stars_repo_head_hexsha": "c46050eb8047dcfa0cc2420887624184c042e32e", "max_stars_repo_licenses": ["MIT"], "max_stars...
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import pullbacks import comma import category_theory.opposites universes u v namespace category_theory open category_theory.limits variables {C : Type u} [𝒞 : catego...
{"author": "Or7ando", "repo": "lean", "sha": "d41169cf4e416a0d42092fb6bdc14131cee9dd15", "save_path": "github-repos/lean/Or7ando-lean", "path": "github-repos/lean/Or7ando-lean/lean-d41169cf4e416a0d42092fb6bdc14131cee9dd15/.github/workflows/geo/src/sub.lean"}
import Std inductive Expr where | var (i : Nat) | op (lhs rhs : Expr) deriving Inhabited, Repr def List.getIdx : List α → Nat → α → α | [], i, u => u | a::as, 0, u => a | a::as, i+1, u => getIdx as i u structure Context (α : Type u) where op : α → α → α unit : α assoc : (a b c : α) → op...
{"author": "gebner", "repo": "lean4-old", "sha": "ee51cdfaf63ee313c914d83264f91f414a0e3b6e", "save_path": "github-repos/lean/gebner-lean4-old", "path": "github-repos/lean/gebner-lean4-old/lean4-old-ee51cdfaf63ee313c914d83264f91f414a0e3b6e/tests/lean/run/assertAfterBug.lean"}
# https://deeplearningcourses.com/c/data-science-deep-learning-in-theano-tensorflow # https://www.udemy.com/data-science-deep-learning-in-theano-tensorflow from __future__ import print_function, division from future.utils import iteritems from builtins import range, input # Note: you may need to update your version of ...
{"hexsha": "e4a1601f27750d47598846721eb55acbc47d75a6", "size": 1845, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/unsupervised_class2/gaussian_nb.py", "max_stars_repo_name": "JouniVatanen/NLP-and-Deep-Learning", "max_stars_repo_head_hexsha": "2fddcc2c39787713d33d17e80565de4ed073ca60", "max_stars_repo_lice...
""" The `VectorEnv` is an interface that integrates multiple environment instances to support parllel rollout with shared multi-agent policies. Currently, the `VectorEnv` support parallel rollout for environment which steps in simultaneous mode. """ from collections import defaultdict import logging import gym import...
{"hexsha": "e40c7ffff8d4b4852b5e25618a3c659ee5b44479", "size": 5199, "ext": "py", "lang": "Python", "max_stars_repo_path": "malib/envs/vector_env.py", "max_stars_repo_name": "apexrl/malib", "max_stars_repo_head_hexsha": "3785309e9b695ff359131fbbecabb6b5a52ef559", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
import os import sys import networkx as nx import matplotlib.pyplot as plt from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from core import Core, load_polblogs if __name__ == '__main__': config = { "data_name" : "synthesis", "model_name": "inform", ...
{"hexsha": "a8006f8f04c53e00338a6a175cbb3d28cd1f6aea", "size": 633, "ext": "py", "lang": "Python", "max_stars_repo_path": "server/core_test.py", "max_stars_repo_name": "tiankaixie/fairrankvis", "max_stars_repo_head_hexsha": "6810895cae280ffb1caa790414f754f34d8bbb8b", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#! /usr/bin/env python import sys import os import argparse from itertools import islice import pandas import xarray import numpy as np def load_wtm(fname): with open(fname, 'r') as fp: header = ''.join(list(islice(fp, 4))) data = pandas.read_csv(fname, skiprows=4, header=0, sep=r'\s+') return ...
{"hexsha": "e539a1ebb741d0f7b8a3eaeaae6fabee2c06fe70", "size": 1010, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/map_values.py", "max_stars_repo_name": "mcflugen/overland_flow", "max_stars_repo_head_hexsha": "23da46d4dbd535b1827589b8dacb422fe56755d1", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
(** Generated by coq-of-ocaml *) Require Import OCaml.OCaml. Local Set Primitive Projections. Local Open Scope string_scope. Local Open Scope Z_scope. Local Open Scope type_scope. Import ListNotations. Unset Positivity Checking. Unset Guard Checking. Inductive nat : Set := | O : nat | S : nat -> nat. Inductive natu...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_distrib_100_plus_assoc/goal33con...
import os import sys import time import inspect import numpy as np import pandas as pd import matplotlib.pyplot as plt import FATS.featureFunction as featureFunction class FeatureSpace: """ This Class is a wrapper class, to allow user select the features based on the available time series vectors (magni...
{"hexsha": "96a5ab0043a4be42995b9ccd0bf4a7b5369d515c", "size": 6749, "ext": "py", "lang": "Python", "max_stars_repo_path": "FATS/Feature.py", "max_stars_repo_name": "rrhurtado/FATS", "max_stars_repo_head_hexsha": "2079b0ea1c177987e06c933de393403988b301c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
from typing import List, Optional import numpy as np import plotly.express as px def generate_confusion_matrix(confusion_matrix: np.ndarray, class_names: Optional[List[str]]): if class_names is None: class_names = np.arange(confusion_matrix.shape[0]).astype(str) fig = px.imshow( confusion_mat...
{"hexsha": "ac7553907060dc95ed7649c21365d467384d81e9", "size": 591, "ext": "py", "lang": "Python", "max_stars_repo_path": "flower_classifier/visualizations.py", "max_stars_repo_name": "jeremyjordan/flower-classifier", "max_stars_repo_head_hexsha": "812003a12cefcc9bc8d68aa8167d3dc95b562d5f", "max_stars_repo_licenses": [...
import numpy as np import pandas as pd from flask import Flask, abort, jsonify, request from pandas.io.json import json_normalize import pickle as pickle import sklearn import random with open('pickle_model', 'rb') as f: model = pickle.load(f) app = Flask(__name__) @app.route('/') def default(): ...
{"hexsha": "659935a8d7ae6a16b8fba95377cb5923ef99d897", "size": 1104, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "bw-startup/Data_Science", "max_stars_repo_head_hexsha": "deb6d57c1c973cc47723f9f6943ca44b26ba5f0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
from mpi4py import MPI import sys import os from picsar_python import picsarpy as pxrpy import numpy as np home=os.getenv('HOME') #currentdir=os.getcwd() #sys.path.append(currentdir+'/python_bin/') #print(currentdir+'/python_bin/') pxr=pxrpy.picsar #### Input parameters (replace input file) pxr.default_init() pxr.to...
{"hexsha": "504e2bc0237401b47a3969a6dc14459581f5cd90", "size": 4944, "ext": "py", "lang": "Python", "max_stars_repo_path": "Acceptance_testing/Python_tests/test/test.py", "max_stars_repo_name": "LukeMcCulloch/PICSAR", "max_stars_repo_head_hexsha": "4c29ad7f923d158137296c6776f01011049075f0", "max_stars_repo_licenses": [...
"""Graph optimization framework""" import theano from theano.gof.cc import CLinker, DualLinker, HideC, OpWiseCLinker from theano.gof.destroyhandler import DestroyHandler from theano.gof.fg import FunctionGraph, InconsistencyError, MissingInputError from theano.gof.graph import Apply, Constant, Variable, view_roots fro...
{"hexsha": "4816b2599fc7eb2733368f55b70cee419288187c", "size": 1532, "ext": "py", "lang": "Python", "max_stars_repo_path": "theano/gof/__init__.py", "max_stars_repo_name": "rpgoldman/Theano-PyMC", "max_stars_repo_head_hexsha": "4669be82a00da3bd78f6683c066c3e0073eecb52", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
from numba import njit import numpy as np array = np.arange(100)+100 @njit def h_test(q): if q>0: return (array[int(q)] + 1,1) else: return 0,1
{"hexsha": "fbecc55358dddf07b2e469852cd69396a8327a5d", "size": 171, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_equation_statments/external_import_else_if.py", "max_stars_repo_name": "amipy/numerous", "max_stars_repo_head_hexsha": "46eb3806ad904c3c0b3dccad7f8f3ddb5582cbd9", "max_stars_repo_license...
__precompile__() module GeometricTransforms ### Dependencies using Compat using Reexport @reexport using StaticArrays ### Imports import Base: in ### Implementation path = dirname(realpath(@__FILE__)) # works even for symlinks include(joinpath(path, "types.jl")) include(joinpath(path, "utils.jl")) include(joinpat...
{"hexsha": "587b121bf0f0a87f1b83dc70ef1a8792c3289e30", "size": 692, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/GeometricTransforms.jl", "max_stars_repo_name": "pabloferz/Shapes.jl", "max_stars_repo_head_hexsha": "750abdc0a9e01b92dc196d8c51d412542e854322", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" filter algorithms author: Michael Grupp This file is part of evo (github.com/MichaelGrupp/evo). evo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
{"hexsha": "e1b98e2d8c238204463222e403582244000c2793", "size": 11932, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/evo-plot/evo/core/filters.py", "max_stars_repo_name": "jiexuan/evaluation_tools", "max_stars_repo_head_hexsha": "d8cab5cea2c859ef6067aaedc8cf11be102ad7f8", "max_stars_repo_licenses": ["MIT"...
# coding = utf-8 # coding by liuyunfei # origin code from open3d samples(github) import open3d as op3 import numpy as np import copy def read_and_show(): vol = op3.visualization.read_selection_polygon_volume("demodata/cropped.json") pcd = op3.io.read_point_cloud("demodata/fragment.ply") chair = vol...
{"hexsha": "e88b12e66326a0722f6f7aed5aa0bdc1c099fb72", "size": 483, "ext": "py", "lang": "Python", "max_stars_repo_path": "1_open3d/5_crop_pointclound.py", "max_stars_repo_name": "lyffly/Python-3DPointCloud-and-RGBD", "max_stars_repo_head_hexsha": "b3b973ec96045a34d3540522a115c5a77f4de136", "max_stars_repo_licenses": [...
/** * @file t_MessageController.cpp * @brief A test unit of MessageController * @author TuanQuang Nguyen * @date 2008-08-20 * @details * This file implements test code for MessageController. Here is test scheme: * every 10 milliseconds, it calls 4 main interfaces of MessageController * to process underlying dat...
{"hexsha": "380528f21730ddee3301da951df95233d7a793a3", "size": 6037, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/net/message-framework-testbed/process/controller-process/ControllerProcess.cpp", "max_stars_repo_name": "izenecloud/izenelib", "max_stars_repo_head_hexsha": "9d5958100e2ce763fc75f27217adf982d7c...
SUBROUTINE FFLD (THET,PHI,ETH,EPH) C C FFLD CALCULATES THE FAR ZONE RADIATED ELECTRIC FIELDS, C THE FACTOR EXP(J*K*R)/(R/LAMDA) NOT INCLUDED C COMPLEX CIX,CIY,CIZ,EXA,ETH,EPH,CONST,CCX,CCY,CCZ,CDP,CUR COMPLEX ZRATI,ZRSIN,RRV,RRH,RRV1,RRH1,RRV2,RRH2,ZRATI2,TIX,TIY,TIZ 1,T1,ZSCRN,EX,EY,EZ,G...
{"hexsha": "a631817a00ff8af0f329f1cab8984ecddce65fa7", "size": 5276, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "NEC2/src/nec/ffld.f", "max_stars_repo_name": "ViperScience/ViperNEC", "max_stars_repo_head_hexsha": "13394358ebfd64c75163e8fab49bdec66accfcb8", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
from __future__ import print_function import numpy as np import torch import torch.nn as nn from pytorch_points.misc import logger from pytorch_points.network.layers import Conv1d, Linear from pytorch_points.network.pointnet2_modules import PointnetSAModuleMSG from pytorch_points.network.operations import scatter_add, ...
{"hexsha": "2f0acc5ddcc5c3f8dfced8c25b6737e5f1b1f0e3", "size": 16791, "ext": "py", "lang": "Python", "max_stars_repo_path": "network2.py", "max_stars_repo_name": "coldlbq/deep_cage", "max_stars_repo_head_hexsha": "db311656271898b064a8f5b9fa78cd7b7474ab1e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import os import pickle import numpy as np import matplotlib.pyplot as plt from copy import deepcopy from echonn.sys import SystemSolver res = pickle.load(open('lorenz_results.p', 'rb')) run, lce, ts_data, results = res sys = run['system'] slvr = SystemSolver(sys) dir_pre = os.path.join('..', 'images', 'lorenz') pri...
{"hexsha": "2036bd7bc092066f29e18defda073716470dd8ef", "size": 3162, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/paper/scripts/AnalyzeResultsLorenz.py", "max_stars_repo_name": "larkwt96/honors-thesis", "max_stars_repo_head_hexsha": "7e3a52c285c1fdaf4ae9659497154ba04e522f48", "max_stars_repo_licenses": ["...
# Overview of the Devito domain specific language ```python from sympy import * from devito import * ``` ## From equations to code in a few lines of Python -- the main objective of this notebook is to demonstrate how Devito and its [SymPy](http://www.sympy.org/en/index.html)-powered symbolic API can be used to solve...
{"hexsha": "e3c036a98c57385fa7eb8755251229a5cd37ba4a", "size": 14655, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "presentations/devito-dsl.ipynb", "max_stars_repo_name": "devitocodes/devitocodes.github.io", "max_stars_repo_head_hexsha": "be1828f200d96a1c477a187372fc5d445ccffd75", "max_stars_repo...
# import sys # sys.path.insert(1, 'test_functions') import numpy as np from test_functions.quadratic_constrained import * from test_functions.rosenbrock_constrained import * from algorithms.nesterov_random.nesterov_random import nesterov_random def problem_rosenbrock(x): f = rosenbrock_f g1 = rosenbrock_g1...
{"hexsha": "0f9d61f5e380aa3d41ab98b5c72a8faf138d7bbe", "size": 586, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/nesterov_random/nesterov_test.py", "max_stars_repo_name": "OptiMaL-PSE-Lab/Expensive-Black-Box-Optim-ChemEng", "max_stars_repo_head_hexsha": "19c34dcff8c983926df501b93152fa3b3b0305d6", "...
(* Exercise 135 *) Require Import BenB. Variables A B C D : Prop. (* Prove the Law of the Excluded Middle (Tertium Non Datur) from the Double Negation Law, using only constructive steps otherwise - the Double Negation Law is not available as the tactic "dn" in this exercise, use "apply Double_Negation" in...
{"author": "KiOui", "repo": "total5", "sha": "b47117bc43a775b525813af56d54350394c22356", "save_path": "github-repos/coq/KiOui-total5", "path": "github-repos/coq/KiOui-total5/total5-b47117bc43a775b525813af56d54350394c22356/html/Uitwerkingen/BB/Coq/Taak13/Taak13_prop135.v"}
# Copyright 2021 The SmallPebble authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{"hexsha": "5e9544adc374d915085c2b141b54038e1ba4442a", "size": 14615, "ext": "py", "lang": "Python", "max_stars_repo_path": "smallpebble/core/ops.py", "max_stars_repo_name": "AdityaKane2001/SmallPebble", "max_stars_repo_head_hexsha": "ff5bb263316b8d76b047346c1be1f1bbcd28f898", "max_stars_repo_licenses": ["Apache-2.0"],...
#! -*- coding: utf-8 -*- import jieba import thulac import pkuseg import getopt import sys import json from tqdm import tqdm import mxnet as mx import gluonnlp as nlp import numpy as np from gluonnlp.data import BERTSentenceTransform class BERTDatasetTransform(object): """Dataset transformation for BERT-style se...
{"hexsha": "4342899e049e126f736b194bfc9b495cf93183d5", "size": 10303, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/preprocess.py", "max_stars_repo_name": "lbe0613/LET", "max_stars_repo_head_hexsha": "ea3e4bae9b24013a830e62e211ee22e7f4b3fb24", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 25, "m...
! ! Copyright 2003-2008 Henk Krus, Cyclone Fluid Dynamics BV ! All Rights Reserved. ! ! Licensed under the Apache License, Version 2.0 (the "License"); ! you may not use this file except in compliance with the License. ! You may obtain a copy of the License at ! ! http://www.dolfyn.net/license.html ! ! Unless required ...
{"hexsha": "551981cb8a9fd3740138953582ebca6f609aaa93", "size": 28743, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/diffschemes.f90", "max_stars_repo_name": "jamesliu516/buKeYaSolverEd", "max_stars_repo_head_hexsha": "c1d650cf77f18a4a937b512a44ddf7c98997b421", "max_stars_repo_licenses": ["Apache-2.0"], "...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2018 Michael J. Hayford """ Module for element modeling .. Created on Sun Jan 28 16:27:01 2018 .. codeauthor: Michael J. Hayford """ from collections import namedtuple import itertools from packaging import version import numpy as np from anytree import ...
{"hexsha": "0a48768500c1ef17db7ae187347eb7eac9e4cd89", "size": 44673, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/rayoptics/elem/elements.py", "max_stars_repo_name": "diplodocuslongus/ray-optics", "max_stars_repo_head_hexsha": "e55a4c199ddc738235813a08c562d18cce310064", "max_stars_repo_licenses": ["BSD-3...
from numpy import * from .inner_hair_cell2018 import resting_potential, peak_potential #parameters r1=220. #reserve pool max. replenishment rate x=700. #RRP replenishment rate (Pangrisc 2010,Chapocnikov 2014) M=14. # Max. vesicles in the ready release pool or release sites (reasonable, ref?) M2=60. # Max. vesicles in ...
{"hexsha": "6f6aa1fbe4ca6354ee70ed42305036eecf066d4b", "size": 4515, "ext": "py", "lang": "Python", "max_stars_repo_path": "Verhulstetal2018/auditory_nerve2018.py", "max_stars_repo_name": "fotisdr/CoNNear_IHC-ANF", "max_stars_repo_head_hexsha": "9a6d80b164c0076d9b68f9329ecd5d524f6ce482", "max_stars_repo_licenses": ["RS...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. struct UsageAggregatesApi <: SwaggerApi client::Swagger.Client end """ Query aggregated Azure subscription consumption data for a date range. Param: reportedStartTime::DateT...
{"hexsha": "4c2f78cf1fd6b14b6e7753a636b9915b2db3add3", "size": 2972, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Commerce/UsageManagementClient/api_UsageAggregatesApi.jl", "max_stars_repo_name": "JuliaComputing/Azure.jl", "max_stars_repo_head_hexsha": "0e2b55e7602352d86bdf3579e547a74a9b5f44f8", "max_stars...
import time import cv2 import os import numpy as np from stereovision.calibration import StereoCalibrator from stereovision.calibration import StereoCalibration from stereovision.exceptions import ChessboardNotFoundError from lib.helpers import open_capture # Handles creation, saving and loading of calibration state...
{"hexsha": "237df59393678f0cfd3c1649af08c8ccd5e7d3a6", "size": 4645, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/calibration.py", "max_stars_repo_name": "Matchstic/depthmapper", "max_stars_repo_head_hexsha": "58a9c5afd0597606532b1928400aee169a876e0e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
import os import torch from options.test_options import TestOptions from models import create_model import numpy as np import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image from scipy.ndimage import filters from pylab import * import glob from models import networks def...
{"hexsha": "238cf93aaa55627fc7c338d5229b7bad2f96deb0", "size": 4276, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "Yijunmaverick/Im2Pencil", "max_stars_repo_head_hexsha": "70ca64879eff29b0ce17ed8c071b6cd46f90e38c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 176, "m...
""" Helper for line-color for trajectory plotting """ import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import numbers def get_lc_traj_singleColor(xs, ys, cs, vmin, vmax, cmap, lw=0.8): """ Get line collection object for a trajectory with a singl...
{"hexsha": "2cf85c7d457f9fb691ebfea7b25d5c36bba8bd95", "size": 1570, "ext": "py", "lang": "Python", "max_stars_repo_path": "trajplotlib/linecolor.py", "max_stars_repo_name": "Yuricst/trajplotlib", "max_stars_repo_head_hexsha": "30c06d922cb4d7bf2b57e3cf11b84fe510f00e1f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -----------------------------------------------------------------PORTRAY----------------------------------------------------------------------# # AUTHORS # PRABHAV SINGH -> prabhavsingh55221@...
{"hexsha": "71af03926795d901975a8648eb28f0439c080fe3", "size": 14490, "ext": "py", "lang": "Python", "max_stars_repo_path": "trends.py", "max_stars_repo_name": "Prabhav55223/Flipkart-PORTRAY", "max_stars_repo_head_hexsha": "abdacd68cf33332976e21eec711a4d01e46ea39f", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # import time import serial import numpy as np import pprint # import io # import signal # import csv # import sys import threading class ArsIface: def __init__(self, port): self.serial = serial.Serial( port=port, baudrate=115200, parity=serial.PA...
{"hexsha": "4e76981d46323b0237a9a83cc655f8e03f01fb37", "size": 3917, "ext": "py", "lang": "Python", "max_stars_repo_path": "live_ars/ars_interface.py", "max_stars_repo_name": "toopazo/live_ars", "max_stars_repo_head_hexsha": "6fb6ef18ca2e6003df1768e2b1e4147560957fa6", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{"hexsha": "2426cd571c4395bd8c26454a5fd17754debd3cfc", "size": 3935, "ext": "py", "lang": "Python", "max_stars_repo_path": "legacy/examples/distribute_metapath2vec/data_process.py", "max_stars_repo_name": "zbmain/PGL", "max_stars_repo_head_hexsha": "dbded6a1543248b0a33c05eb476ddc513401a774", "max_stars_repo_licenses": ...
from __future__ import print_function import os import re import sqlite3 import sys import numpy as np from Bio import SeqIO from cachetools import LRUCache, cachedmethod from collections import defaultdict from functools import partial from json import load from operator import attrgetter, itemgetter from os.path imp...
{"hexsha": "07ebbd619ddcefb153339e3754bff13ad4e2b81a", "size": 101747, "ext": "py", "lang": "Python", "max_stars_repo_path": "dark/civ/proteins.py", "max_stars_repo_name": "UdoGi/dark-matter", "max_stars_repo_head_hexsha": "3d49e89fa5e81f83144119f6216c5774176d203b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # Closed-loop inverse kinematics algorithm: finds q such that f(q) = pd by # solving a differential equation. import numpy as np import matplotlib.pyplot as plt import IPython from mm2d.model import ThreeInputModel # model parameters # link lengths L1 = 1 L2 = 1 # input bounds LB = -1 UB = 1...
{"hexsha": "a60fe40c769663c699654f33ec707f97f2392399", "size": 994, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/clik.py", "max_stars_repo_name": "adamheins/planar-playground", "max_stars_repo_head_hexsha": "24b2eb2e9f50d0ac803539f8860b10dd1a501314", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import skimage.transform as sktrans import skimage.color as skcolor from sklearn.preprocessing import MinMaxScaler, Binarizer def translate(image, translation): trans = sktrans.AffineTransform(translation=translation) ret = sktrans.warp(image, trans.inverse) if image.dtype == np.uint8:...
{"hexsha": "bc41d12a6a6725cbed820bfe57fc93deb5755ac2", "size": 3476, "ext": "py", "lang": "Python", "max_stars_repo_path": "dlearn/utils/imgproc.py", "max_stars_repo_name": "Cysu/dlearn", "max_stars_repo_head_hexsha": "7a2c96802ece7356a1574fbb100480f8e92dc120", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, ...
from collections import defaultdict from random import sample from multiprocessing import Process from multiprocessing import Queue import itertools from keras.utils import to_categorical import numpy as np from utilities import chunks import time def _fill_queue(queue, class_data, folds, batch_size): # Get list ...
{"hexsha": "ad95e241fcce740b2782fa26264ace626fdf7681", "size": 2074, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/siamese/providers/classification_provider.py", "max_stars_repo_name": "openem-team/openem", "max_stars_repo_head_hexsha": "45222c9c77084eacab278da25a8734ae7d43f677", "max_stars_repo_licenses...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.Instances.Int where open import Cubical.Foundations.Prelude open import Cubical.Data.Int renaming (ℤ to ℤType ; _+_ to _+ℤ_ ; _-_ to _-ℤ_; -_ to -ℤ_ ; _·_ to _·ℤ_) open import Cubical.Algebra.Group.Base open GroupStr ℤ : Group₀ fst ℤ = ℤType 1g (snd ℤ) = 0 _·_ (snd...
{"hexsha": "03db1b2f073187f5d725615ee2c629ba930b67f0", "size": 634, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/Algebra/Group/Instances/Int.agda", "max_stars_repo_name": "marcinjangrzybowski/cubical", "max_stars_repo_head_hexsha": "53e159ec2e43d981b8fcb199e9db788e006af237", "max_stars_repo_licenses":...
from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection import ParameterGrid from joblib import Parallel, delayed from functools import partial from scipy.stats import entropy from scipy.stats import norm as Normal import numpy as np import pandas as pd import math import time from fun...
{"hexsha": "2526740c0979ae9741edc6e238f96498c5662dbf", "size": 16560, "ext": "py", "lang": "Python", "max_stars_repo_path": "step_processing.py", "max_stars_repo_name": "iarroyof/metalearnerless", "max_stars_repo_head_hexsha": "59e2d7cbdd191055e64a5579df849274aded7437", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from netCDF4 import Dataset import pyromsobs import numpy as np from datetime import datetime, timedelta def main(): en4file = 'EN.4.2.1.f.profiles.g10.201704.nc' gridfile = 'http://thredds.met.no/thredds/dodsC/sea_norshelf_3hr_agg' reftime = datetime(1970, 1, 1) variables = { 'POTM_CORRECTED': {'key...
{"hexsha": "97e719ce1a18248d5336134f84dc46508cc6a067", "size": 4472, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/EN4_to_ROMSobs.py", "max_stars_repo_name": "metno/pyromsobs", "max_stars_repo_head_hexsha": "8479a13908797a5e7370f272a3462b7c6d59e45e", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# HMNI (Hello my name is) # Fuzzy Name Matching with Machine Learning # Author: Christopher Thornton (christopher_thornton@outlook.com) # 2020-2020 # MIT Licence import os import re import heapq import joblib import unidecode import numpy as np import pandas as pd from random import randint import warn...
{"hexsha": "a1bda91ea822904d2a15e952a05da75cd651efe6", "size": 18803, "ext": "py", "lang": "Python", "max_stars_repo_path": "hmni/matcher.py", "max_stars_repo_name": "OpenOceanVC/hmni", "max_stars_repo_head_hexsha": "566915d492db81999e273cefb0e1ed504d71a7b8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 148, ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains convenience functions implementing some of the algorithms contained within Jean Meeus, 'Astronomical Algorithms', second edition, 1998, Willmann-Bell. """ from __future__ import (absolute_import, division, print_function, ...
{"hexsha": "f48626c36d94f5895f47f858bbd437e63e6ddf68", "size": 7619, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/coordinates/orbital_elements.py", "max_stars_repo_name": "REMeyer/astropy", "max_stars_repo_head_hexsha": "28c49fb618538a01812e586cd07bccdf0591a6c6", "max_stars_repo_licenses": ["BSD-3-Cla...
#!/usr/bin/env python3 import numpy as np Normal = __import__('normal').Normal np.random.seed(0) data = np.random.normal(70, 10, 100).tolist() n1 = Normal(data) print('Z(90):', n1.z_score(90)) print('X(2):', n1.x_value(2)) n2 = Normal(mean=70, stddev=10) print() print('Z(90):', n2.z_score(90)) print('X(2):', n2.x_va...
{"hexsha": "bb0a0d1cf20bf568b47e41754f1c688b2e08aa74", "size": 328, "ext": "py", "lang": "Python", "max_stars_repo_path": "math/0x03-probability/7-main.py", "max_stars_repo_name": "sebaslherrera/holbertonschool-machine_learning", "max_stars_repo_head_hexsha": "a4c09230688700aee199f4099de32261104918be", "max_stars_repo_...
#This dataset was pulled off Kaggle.com as part of the "House Prices: Advanced Regression Techniques" tutorial competition. #There are 79 explanatory variables that describe almost all features of residential homes in Ames, Iowa and the goal is to # ultimately predict the final price of each home. This dataset is u...
{"hexsha": "2e6118004b1db461d60ff71108b3bea5f41df34d", "size": 12090, "ext": "py", "lang": "Python", "max_stars_repo_path": "Kaggle_Projects/Ames Housing Problem.py", "max_stars_repo_name": "MichaelMKKang/Projects", "max_stars_repo_head_hexsha": "445b8a5fbe16397fafb95752f680cd720e64058f", "max_stars_repo_licenses": ["M...
From stdpp Require Import fin_maps. From iris.proofmode Require Import coq_tactics reduction. From iris.proofmode Require Import tactics. From iris.algebra Require Import auth gmap. From iris.base_logic Require Export gen_heap. From iris.base_logic.lib Require Export proph_map invariants wsat. From iris.program_logic R...
{"author": "BruceZoom", "repo": "Iris-ControlFlow", "sha": "18e5ed7145d3364382a72e9ab31bd77be9913759", "save_path": "github-repos/coq/BruceZoom-Iris-ControlFlow", "path": "github-repos/coq/BruceZoom-Iris-ControlFlow/Iris-ControlFlow-18e5ed7145d3364382a72e9ab31bd77be9913759/theories/throw_lang/multi_post.v"}
""" Predicate{N} The abstract supertype of predicates. """ abstract type Predicate{N} end """ evaluate(p::Predicate, args...) Evaluate a predicate for given arguments. ### Input - `p` -- predicate - `args` -- argument list ### Output A `Bool` corresponding to the evaluation of `p(args)`. ### Notes W...
{"hexsha": "9f24db593c1f14f53f79a1673a85395946a0eff8", "size": 588, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Predicate.jl", "max_stars_repo_name": "JuliaReach/MathematicalPredicates.jl", "max_stars_repo_head_hexsha": "1c2d586a6d866a5e4ab0d22fa94238f23d4da6f8", "max_stars_repo_licenses": ["MIT"], "max_s...
# -*- coding: utf-8 -*- """ Created on Wed Mar 16 16:39:02 2022 @author: James """ import torch import torch.nn as nn from torch.nn import init from torch.autograd import Variable from torch.nn.utils import clip_grad_norm_ import numpy as np import time import random from sklearn.metrics import f1_score import os f...
{"hexsha": "8656b8fc6a457c491cab2c8247cb94f0bbdd9683", "size": 2745, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "jamesYu365/grahsage", "max_stars_repo_head_hexsha": "daf5e617414a6fdb1b074fea735ec5cb9e07380e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
/- Copyright (c) 2022 Jun Yoshida. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ import Std.Logic import Algdata.Init.UInt set_option autoImplicit false /-! # Quotient ring ℤ/256ℤ -/ /-- The 8-bit unsigned integer type as the quotient ring ℤ/256ℤ. -/ @[unbox] structure ...
{"author": "Junology", "repo": "algdata", "sha": "ef0e552747c3f1004705755a3afc7ccedec92bf6", "save_path": "github-repos/lean/Junology-algdata", "path": "github-repos/lean/Junology-algdata/algdata-ef0e552747c3f1004705755a3afc7ccedec92bf6/Algdata/Data/Z256/Basic.lean"}
import tensorflow as tf import numpy as np import argparse import os from pprint import pprint import tqdm import pandas as pd import torch import torch.nn as nn from torch.utils.data import IterableDataset from torch.nn import functional as F import csv from itertools import starmap def parse_arguments(): ''' ...
{"hexsha": "fa519248d7b95c6d6456efda3cae5eddd060b3c0", "size": 9447, "ext": "py", "lang": "Python", "max_stars_repo_path": "ensemble_mlp_cls.py", "max_stars_repo_name": "bionlplab/drugprot_bcvii", "max_stars_repo_head_hexsha": "4dde48ab37e7fe15d5cf6e4e6b1a5da00d63ad52", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
import sys import numpy as np from sklearn.utils import validation from typing import Optional def mean_absolute_percentage_error( y_true: np.ndarray, y_pred: np.ndarray, *, sample_weight: Optional[np.ndarray] = None, epsilon: float = sys.float_info.epsilon, ) -> float: '''Mean absolute percen...
{"hexsha": "867a2813b264496a1b4bd30fa5ecd4094a94f17c", "size": 1264, "ext": "py", "lang": "Python", "max_stars_repo_path": "bi_utils/metrics.py", "max_stars_repo_name": "lisovskey/bi-utils", "max_stars_repo_head_hexsha": "007573a3158dbb81cd38de97ad05b0c51a4b2661", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np import sys import random import copy try: import simplejson as json except ImportError: import json from collections import OrderedDict import matplotlib.pyplot as plt from pathos.multiprocessing import ProcessingPool as Pool from mpl_toolkits.mplot3d import Axes3D import time import sample impor...
{"hexsha": "41febc2f2fb4e32c31017c40ce485954ad1087f5", "size": 2782, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Yifanny/COMPASS_PYTHON", "max_stars_repo_head_hexsha": "5073456b46423875f5e62acdc6023ede234f1c93", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
from models import Experiment import pandas as pd from scipy.stats import ttest_ind, hypergeom def ttest(experiment: Experiment): """This is a two-sided test for the null hypothesis that 2 independent samples have identical average (expected) values. This test assumes that the populations have identical v...
{"hexsha": "741de8ab5edf1d3db827267f48b2978228b06568", "size": 1262, "ext": "py", "lang": "Python", "max_stars_repo_path": "stats.py", "max_stars_repo_name": "bibsAPB/pathways-analysis", "max_stars_repo_head_hexsha": "b3a094b98e3022b7a7d959f93e62101483117372", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# -*- coding:utf-8 -*- from itertools import product import pandas as pd import numpy as np import random def _get_param_out(in_df, sep, ignore): param = [] outkey = [] param_flag = True for c in in_df.columns: if c == sep: param_flag = False continue if not c in...
{"hexsha": "fd5dd8ce58ac11f06351de9bdb77e9dbabe31e97", "size": 2827, "ext": "py", "lang": "Python", "max_stars_repo_path": "search/lib/stats.py", "max_stars_repo_name": "HidetoshiKawaguchi/sekit", "max_stars_repo_head_hexsha": "6e208dc18111e8039e2c2ce33c412359157354ff", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import time from options.test_options import TestOptions from data import create_dataset from models import create_model import os from util.util import save_images import numpy as np from util.util import mkdir from PIL import Image def make_val_opt(opt): # hard-code some parameters for test opt.num_threads...
{"hexsha": "c306526001235c407d0ded276ae02cc1047125e3", "size": 2596, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "Serigne28/STANet", "max_stars_repo_head_hexsha": "6ac46d422c329d86195b4b91d0d7401acfcff098", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 220, ...
[STATEMENT] lemma sum_val_process: assumes "portfolio pf1" and "portfolio pf2" shows "\<forall>n w. val_process Mkt (qty_sum pf1 pf2) n w = (val_process Mkt pf1) n w + (val_process Mkt pf2) n w" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>n w. val_process Mkt (qty_sum pf1 pf2) n w = val_process Mkt p...
{"llama_tokens": 8000, "file": "DiscretePricing_Fair_Price", "length": 51}
#include "onmt/Logger.h" #include <boost/log/core.hpp> #include <boost/log/expressions.hpp> #include <boost/log/utility/setup/file.hpp> #include <boost/log/utility/setup/common_attributes.hpp> #include <boost/log/sources/severity_logger.hpp> #include <boost/log/sources/global_logger_storage.hpp> #include <boost/log/so...
{"hexsha": "df8f258c9bafbfb58daf0be19e5fabe16509bd31", "size": 2253, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/Logger.cc", "max_stars_repo_name": "fdalvi/CTranslate", "max_stars_repo_head_hexsha": "26cc91912ec05bf62f4f52e3318b601c9603aed5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 86.0, "max...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy.signal import scipy.fftpack def moving_average(x, window_size, sigma=None): """ Apply a non-causal moving average filter to signal x. Window size must be positive and odd. If sigma is None, all samples in the window are weighted...
{"hexsha": "91804c2b02ece5dc2c171992a010f65d8e7c2db0", "size": 1723, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/antlia/filter.py", "max_stars_repo_name": "oliverlee/antlia", "max_stars_repo_head_hexsha": "5665da3acc11deb1ae2f3c71f91be3fb8e38d255", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
""" Implementation operators: - Implementation of the Local expansion - Implementation of the multipole expansions coefficients - Implementation of the translation local to local - Implementation of the translation Multipole to local - Implementation of the translation Multipole to multipole """ from numpy impor...
{"hexsha": "cc559c4d6b20d466048fd4a7469316546f55cbe5", "size": 3555, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyFMM/Kernels/translations.py", "max_stars_repo_name": "gforsyth/pyfmm", "max_stars_repo_head_hexsha": "9f0e436e8e8e0c48c87d83114b66a0dfce9f2789", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- """ Created on Thu Feb 14 15:04:43 2019 @author: Pertum adaptive """ ''' %-------------------------------------------------------------------------- % Inputs variables: % w Weight behavior % x(n) Input signal % d(n) Desired signal % N Number os iterations % M ...
{"hexsha": "f4b5c9febbab454dbb5ca0351550b10745b0668c", "size": 6616, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions/adaptive.py", "max_stars_repo_name": "Pertum/tcc", "max_stars_repo_head_hexsha": "2f0b660612cde92277720429726be6d2b1e91e10", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# 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. #! /usr/bin/env python2 # noqa E741 import numpy as np import faiss import unittest from common import get_dataset_2 import scipy.spatial....
{"hexsha": "3d87669a2a98448d36c15f3f3471f6df46019bef", "size": 3971, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/src/index/thirdparty/faiss/tests/test_extra_distances.py", "max_stars_repo_name": "ReigenAraka/milvus", "max_stars_repo_head_hexsha": "b2f19ace0e1dcd431a512141f42b748581d4b92d", "max_stars_re...
[STATEMENT] lemma givenBy_imp_eq_Collect: "A \<in> givenBy v ==> \<exists>P. A = {s. P(v s)}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. A \<in> givenBy v \<Longrightarrow> \<exists>P. A = {s. P (v s)} [PROOF STEP] apply (rule_tac x = "\<lambda>n. \<exists>s. v s = n \<and> s \<in> A" in exI) [PROOF STATE] proof...
{"llama_tokens": 340, "file": null, "length": 4}
from keras.layers import Layer import keras.backend as K import tensorflow as tf import numpy as np class Rotation(Layer): def __init__(self, n_outputs, perm=None, **kwargs): self.output_dim = n_outputs assert self.output_dim % 2 == 0 self.thetas, self.c, self.s = None, None, None ...
{"hexsha": "7c6c281d67cbb01db1357c4d57d9fb83fb112912", "size": 1521, "ext": "py", "lang": "Python", "max_stars_repo_path": "vpnn/layers/rotation.py", "max_stars_repo_name": "JarateKing/keras-vpnn", "max_stars_repo_head_hexsha": "b91e19695b108b3017764260e80c2a8ea9548201", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
MODULE FUN_xySAREA !!#### PURPOSE !! Calculate the signed SAREA of various shapes: !! @ quadrilateral [Qg] !! @ Trangle <Tr> !! @ polygon <Po> !!#### EXTERNAL KINDS USE KND_IntrinsicTypes,ONLY: KIND_Rsp,KIND_Rdp !!((01-A-KND_IntrinsicTypes.f90)) !!#### EXTERNAL PARAMETERS USE PAR_Constants_Rsp,ONLY: c_1_by_2...
{"hexsha": "a23721723f77219ab35f1e4d79323414a9f1e434", "size": 3032, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/03-A-FUN_xySAREA.f90", "max_stars_repo_name": "wawiesel/tapack", "max_stars_repo_head_hexsha": "ac3e492bc7203a0e4167b37ba0278daa5d40d6ef", "max_stars_repo_licenses": ["Unlicense"], "max_star...
# -*- coding:UTF-8 -*- import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans # 加载数据集 dataMat = [] fr = open("test.txt", "r", encoding="utf-8") # 注意,这个是相对路径,请保证是在 MachineLearning 这个目录下执行。 for line in fr.readlines(): curLine = line.strip().split('\t') fltLine = map(float,curLine)...
{"hexsha": "914f798b8819ac0902324f93cda58c7f7e4898ec", "size": 648, "ext": "py", "lang": "Python", "max_stars_repo_path": "\u673a\u5668\u5b66\u4e60/\u805a\u7c7b/K-means2/kMeansSklearn.py", "max_stars_repo_name": "shao1chuan/pythonbook", "max_stars_repo_head_hexsha": "cd9877d04e1e11422d38cc051e368d3d9ce2ab45", "max_star...
const density = Property("D") const pressuretemperature = InputPair("PT_INPUTS") function isothermalwork(fluid::WorkingFluid, temperature, pressure_initial, pressure_final; rtol=1e-8) function ρ(fluid,pressure,tempera...
{"hexsha": "8f29ce1480272d552197f250c94e174309155037", "size": 765, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/constant_property_path_integral.jl", "max_stars_repo_name": "cstook/CoolPropExtensions.jl", "max_stars_repo_head_hexsha": "0529e1d1918364f021cb73c85d3b824b15a41277", "max_stars_repo_licenses": [...
/* * Copyright (c) 2019, András Bodor * Licensed under BSD 3-Clause * For more information see the supplied * LICENSE file */ // // Created by bodand on 2019. 05. 09.. // #pragma once #pragma clang diagnostic push #pragma ide diagnostic ignored "MemberFunctionCanBeStaticInspection" #pragma ide diagnostic ignore...
{"hexsha": "a7ee666f5778b291cbbb36e74298ad8be7362cd2", "size": 5043, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "test/Test_OptionsParser.hpp", "max_stars_repo_name": "isbodand/infoparse", "max_stars_repo_head_hexsha": "3fdf7947649c0469c9e675fd977834ad082810a0", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
Require Import HoTT.Basics Types.Universe Types.Paths Types.Unit FunextVarieties. Generalizable All Variables. (** * Univalence Implies Functional Extensionality *) (** Here we prove that univalence implies function extensionality. *) Set Printing Universes. (** We define an axiom-free variant of [Univalence] *) Def...
{"author": "CPP21-Universal-Algebra-in-HoTT", "repo": "Universal-Algebra-in-HoTT", "sha": "7228b5b88684abff3c26a7eed07e1222b04fd8de", "save_path": "github-repos/coq/CPP21-Universal-Algebra-in-HoTT-Universal-Algebra-in-HoTT", "path": "github-repos/coq/CPP21-Universal-Algebra-in-HoTT-Universal-Algebra-in-HoTT/Universal-A...
import onnx from onnx import numpy_helper import numpy as np # Filter sobel = { 3: np.array([[1, 0, -1], [2, 0, -2], [1, 0, -1]], dtype='float32'), 5: np.array([[2, 1, 0, -1, -2], [3, 2, 0, -2, -3], [4, 3, 0, -3, -4], [3, 2, 0, -2, -3], [2, 1, 0, -1, -2]], dtype='float32'), 7: np.array([[...
{"hexsha": "67e3f3fd284afdf2a913223edfe7256b106341f3", "size": 2323, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ConvOpt/comparison/gen-conv-models.py", "max_stars_repo_name": "LeiWang1999/buddy-mlir", "max_stars_repo_head_hexsha": "05996fdbe1a2643299c2cb5441c0e6bad2f9848f", "max_stars_repo_licenses...
from train import * import os import numpy as np import torch from torch.nn import functional as F from utils import cropping, load_data, get_transform, load_otb_data import os os.environ['CUDA_VISIBLE_DEVICES']='0' def test(env, R, root_dir, data_name='vot'): R.agent.eval() if data_name=='vot': imgl...
{"hexsha": "4ae7c437e77bc5a2c5b0bd4a6a5e826710b0ed7b", "size": 2189, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch/test.py", "max_stars_repo_name": "jiweeo/RL-Tracking", "max_stars_repo_head_hexsha": "ef038569ab6b5663a36f6c3843ca17169ea2f0fe", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...