text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios ! This file was ported from Lean 3 source module set_theory.cardinal.cofinality ! leanprover-community/mathlib commit bb16...
{"author": "leanprover-community", "repo": "mathlib4", "sha": "b9a0a30342ca06e9817e22dbe46e75fc7f435500", "save_path": "github-repos/lean/leanprover-community-mathlib4", "path": "github-repos/lean/leanprover-community-mathlib4/mathlib4-b9a0a30342ca06e9817e22dbe46e75fc7f435500/Mathlib/SetTheory/Cardinal/Cofinality.lean"...
#include "algorithms/synthesis/syrec_synthesis.hpp" #include "core/syrec/expression.hpp" #include "core/syrec/program.hpp" #include "core/syrec/variable.hpp" #include "core/utils/timer.hpp" #include <boost/dynamic_bitset.hpp> #include <cmath> #include <functional> #include <memory> #include <numeric> namespace syrec...
{"hexsha": "c17aebffe3f6bca249775885cff4b6d780623abc", "size": 58253, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/algorithms/synthesis/syrec_synthesis.cpp", "max_stars_repo_name": "SmaranTum/syrec", "max_stars_repo_head_hexsha": "7fd0eece4c3376e52c1f5f17add71a49e5826dac", "max_stars_repo_licenses": ["MIT"]...
from sklearn import metrics, preprocessing import numpy as np import csv import pandas as pd # we assume data is distributed normally def processing_data(data): # Normalization scaler = preprocessing.StandardScaler() data = data.astype(str).astype(int) X = data.get('X') Y = data.get('Y') # Pr...
{"hexsha": "8c47c4a58b741e5feaf290ea9a4603533af24c32", "size": 994, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocessing.py", "max_stars_repo_name": "wruoting/Assignment3-ML", "max_stars_repo_head_hexsha": "d3766ffbfc8ddd050f2979cd47665af4d441d78d", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import itertools as it from typing import Tuple, List import numpy as np from .base_model import BaseModel from pyffm.util import logistic class FMModel(BaseModel): def __init__( self, num_latent, num_features, reg_lambda, use_linear=False, **kwargs ): super().__init__( num_featur...
{"hexsha": "0bcc07339f53002a66fc43939a66d6aa7c1b1f1c", "size": 2165, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyffm/engine/model/fm_model.py", "max_stars_repo_name": "mascaroa/pyffm", "max_stars_repo_head_hexsha": "2445ed2c048347ebbfc76d39990065eb76a8d784", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import pandas as pd import gdal import numpy as np import os import rasterio import tqdm class TrainingData: """Prepares training datasets using a raster stack, species occurrences and a set of band means and standard deviations. :param self: a class instance of TrainingData :param oh: an Occurrence...
{"hexsha": "907ad7b0fb8e28b6060d5a5655b9d52b344d7059", "size": 5135, "ext": "py", "lang": "Python", "max_stars_repo_path": "sdmdl/sdmdl/data_prep/training_data.py", "max_stars_repo_name": "naturalis/trait-geo-diverse-angiosperms", "max_stars_repo_head_hexsha": "034ce4e807f7a83d31bf7b46435275ba91cfcb00", "max_stars_repo...
from classifiers import SVM, KRL import argparse from utils import get_sequence, get_mismatch, load_data from Kernels import Kernel, get_gram_cross import numpy as np import csv from tqdm import tqdm def get_gram_matrix(x_tr, x_te, k, n_mismatch, n_kernel): dict_sequences = get_sequence(x_tr, k=k) embeddings...
{"hexsha": "751d7057c93547c33fe96a7dcf1a23f0eb25b010", "size": 5062, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "HamzaG737/Kmml-challenge-code", "max_stars_repo_head_hexsha": "c7ae3e26a7e02e4951758c683f29c23c2ab9b3e4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
\chapter{Development and Results} %Once the state of the art has been studied and the main lines of work of energy reduction are known, analysis of all the techniques will be made. \input{Chapter21} \clearpage \input{Chapter22} \input{Chapter23} %%\input{Chapter33} \input{Chapter24} \clearpage \input{Chapter25} \clea...
{"hexsha": "83fb6237335c1f545cc18a783eaff5d995321dc8", "size": 344, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Chapter2.tex", "max_stars_repo_name": "alvarolop/tfg_latex", "max_stars_repo_head_hexsha": "9b5d4e89183ba775aae81c60da5ea170ffd22f79", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import torch import cv2 import numpy as np from operator import itemgetter # import some common detectron2 utilities from detectron2 import model_zoo from detectron2.data import MetadataCatalog from detectron2.engine import DefaultPredictor from detectron2.config import get_cfg from detectron2.utils.visualizer import ...
{"hexsha": "2e1cb9c70ea3cff2a4622af93c99a42e7198ddbd", "size": 8475, "ext": "py", "lang": "Python", "max_stars_repo_path": "player_detection.py", "max_stars_repo_name": "Basket-Analytics/BasketTracking", "max_stars_repo_head_hexsha": "5921dc7a7abd74ab6e1d2c0a78642cc53e4e5ad6", "max_stars_repo_licenses": ["MIT"], "max_s...
# 2019-11-19 10:28:31(JST) import sys import numpy as np # import collections # import math # from string import ascii_lowercase, ascii_uppercase, digits # from bisect import bisect_left as bi_l, bisect_right as bi_r # import itertools # from functools import reduce # import operator as op # import re # ...
{"hexsha": "54899451608d3a0f1a298387e581ae22a4f92634", "size": 1305, "ext": "py", "lang": "Python", "max_stars_repo_path": "jp.atcoder/abc143/abc143_e/8522563.py", "max_stars_repo_name": "kagemeka/atcoder-submissions", "max_stars_repo_head_hexsha": "91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e", "max_stars_repo_licenses": ...
""" Test the optimizer classes """ import pytest import numpy as np from josim_tools.optimize import NumpyVectorArray def test_numpy_vector_array(): """ Test NumpyVectorArray class """ array_a = np.array([1, 2, 3, 4]) array_b = np.array([5, 6, 7, 8]) array_c = np.array([9, 10, 11, 12]) array_d =...
{"hexsha": "2742d3223d9bd4c5c6b80adaa3b63f923ac5ed34", "size": 1727, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_optimizer.py", "max_stars_repo_name": "JoeyDelp/josim-tools", "max_stars_repo_head_hexsha": "e6b9eb3e6b45bea53dd1b355121ee4b09867eb07", "max_stars_repo_licenses": ["BSD-2-Clause"], "max...
""" smoothconv(z,nas) Smoothen field `z(ns,ns)` with a spectral method at scale `ns/nas` Takes into account missing values. """ function smoothspec(zi,nas) @compat iinan=findall(isnan.(zi)) @compat iinotnan=findall(.~isnan.(zi)) zi[iinan]=0. nss=size(zi); ns=nss[1]; ...
{"hexsha": "70efbf491fae25157eda4348f8997250083ef5a8", "size": 759, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rf/smoothspec.jl", "max_stars_repo_name": "UnofficialJuliaMirror/RainFARM.jl-e9a4e08f-a0a3-5224-a821-6d0231c12d6b", "max_stars_repo_head_hexsha": "740f4edff721692e13168b132503aa62d5fea574", "max...
import numpy as np def affine(r, c, x0, dxx, dyx, y0, dxy, dyy): """ Returns the affine transform -- normally row, column to x,y position. If this is the geotransform from a gdal geotiff (for example) the coordinates are the displayed pixel corners - not the center. If you want the center of the pixel...
{"hexsha": "e80867d7c98bd047ac5367772a3be7550ba6f2cf", "size": 7370, "ext": "py", "lang": "Python", "max_stars_repo_path": "HSTB/shared/gridded_coords.py", "max_stars_repo_name": "noaa-ocs-hydrography/shared", "max_stars_repo_head_hexsha": "d2004e803c708dffa43d09d3ffea4e4045811b28", "max_stars_repo_licenses": ["CC0-1.0...
#! /usr/bin/env python ############################# BEGIN FRONTMATTER ################################ # # # TEA - calculates Thermochemical Equilibrium Abundances of chemical species # # ...
{"hexsha": "00dbe4fc65d369635f2edfe00b67a4bf96f96cf9", "size": 14125, "ext": "py", "lang": "Python", "max_stars_repo_path": "run/runatm.py", "max_stars_repo_name": "SiddhantDeshmukh/TEA", "max_stars_repo_head_hexsha": "beaa882b7084d380a38a6bf5f219b0ee848afb9e", "max_stars_repo_licenses": ["BSD-4-Clause-UC"], "max_stars...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ a module for basic VO Registry interactions. A VO registry is a database of VO resources--data collections and services--that are available for VO applications. Typically, it is aware of the resources from all over the world. A registry can find ...
{"hexsha": "fb50620deb48ec23560b5aeaca15777bc86e9dde", "size": 35115, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyvo/registry/vao.py", "max_stars_repo_name": "bsipocz/pyvo", "max_stars_repo_head_hexsha": "290159d3e7218f6f8d9edee3145cfd2bee190130", "max_stars_repo_licenses": ["BSD-3-Clause-No-Nuclear-Licens...
import os import argparse import ast import gc import logging import math import sys import time import numpy as np import pandas as pd import hparameters import utility import json def main(m_params, start_counter=0): param_dictionary = {} #Format is key:value = htune_number: dict containing variable param...
{"hexsha": "550085e3212a0656c80c84c10e89d8d9cbb196e7", "size": 6683, "ext": "py", "lang": "Python", "max_stars_repo_path": "hypertuning.py", "max_stars_repo_name": "Akanni96/TRUNET", "max_stars_repo_head_hexsha": "12dff08f2361848e13b0952540e2198db386eab8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_...
!----------------------------------------------------------------------- ! Fortran2003 interface to CUDA Library for Skeleton 2D Electrostatic ! GPU-MPI PIC Code */ ! written by Viktor K. Decyk, UCLA module gpuppush2_c use iso_c_binding implicit none ! interface subroutine cgpuppgppush2...
{"hexsha": "f70b12ba7faccbfd056d536ea3d13894a8a15106", "size": 7370, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "gpu/gpuppic2/gpuppush2_c.f03", "max_stars_repo_name": "gcasabona/cuda", "max_stars_repo_head_hexsha": "064cfa02398e2402c113d45153d7ba36ae930f7e", "max_stars_repo_licenses": ["W3C"], "max_stars_c...
#!/usr/bin/env python # coding: utf-8 # # Fit an H2O GBM on the Lending Club data # ### Imports # In[1]: import pandas as pd import numpy as np import random, time, os, pickle import matplotlib.pyplot as plt from feature_engine import categorical_encoders as ce from feature_engine import discretisers as dsc from ...
{"hexsha": "2d3c0ed13fc069468328d3e76feb48d2d76de567", "size": 5379, "ext": "py", "lang": "Python", "max_stars_repo_path": "_build/jupyter_execute/H2O_with_LendingClub.py", "max_stars_repo_name": "Strabes/h2o-prod", "max_stars_repo_head_hexsha": "2bfd4c87302c2ca3219b0bc313f13c9e787d84ad", "max_stars_repo_licenses": ["M...
""" This module contains a function to plot the cross correlations computed with stack_ccorr_tremor and the autocorrelations computed with stack_acorr_tremor sorted by different criteria """ import obspy from obspy.signal.cross_correlation import correlate import matplotlib.pyplot as plt import numpy as np import pic...
{"hexsha": "b53bb362d4c66208336225967578237471093a47", "size": 20259, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/plot_stack_sort.py", "max_stars_repo_name": "ArianeDucellier/timelags", "max_stars_repo_head_hexsha": "383c5702ad25405555d934c984ac8245722f8596", "max_stars_repo_licenses": ["MIT"], "max_star...
from manimlib.imports import * import numpy as np from manim_reveal import SlideScene # import manimtda from manimtda.linalg import * class LLCombine(SlideScene): CONFIG={ "camera_config":{"background_color":"#F0F1EB"}, "video_slides_dir":"../video_slides" } def construct(self): t...
{"hexsha": "b7553cf781954b615d1ec3aa3de6cd26dd9a979e", "size": 774, "ext": "py", "lang": "Python", "max_stars_repo_path": "animations/LL_combine.py", "max_stars_repo_name": "bnels/cse21", "max_stars_repo_head_hexsha": "daad575743bfa7c025c507b3a18a3dff445ca385", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
''' Copyright 2016 Jihun Hamm 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": "52d0dff0c86a12650225e88f285c7b6939bf8ebc", "size": 4255, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_NN_genki.py", "max_stars_repo_name": "jihunhamm/MinimaxFilter", "max_stars_repo_head_hexsha": "fa9ee7aa126cbf651c4c9cbf076e4ba848fcfc46", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import pandas as pd import numpy as np from sklearn.metrics.pairwise import nan_euclidean_distances from statsmodels.distributions.empirical_distribution import ECDF from matplotlib import pyplot as plt import json SAMPLES_FNAME = './data/samples_pathlens_100000.csv' SIMILARITY_MATRIX_FNAME = './data/similarity_matri...
{"hexsha": "15a4937b744b381456bed3143e7c4122d36eff85", "size": 5772, "ext": "py", "lang": "Python", "max_stars_repo_path": "TEMP_pavlos/calculate_similarity_from_pathlens.py", "max_stars_repo_name": "cgeorgitsis/ai4netmon", "max_stars_repo_head_hexsha": "36c4c1695fd980705d3e3f76385cda14baf7f397", "max_stars_repo_licens...
function qq = ppdiff(pp,j) %PPDIFF Differentiate piecewise polynomial. % QQ = PPDIFF(PP,J) returns the J:th derivative of a piecewise % polynomial PP. PP must be on the form evaluated by PPVAL. QQ is a % piecewise polynomial on the same form. Default value for J is 1. % % Example: % x = linspace(-pi,pi,9)...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/13812-splinefit/ppdiff.m"}
import numpy as np from console_progressbar import ProgressBar from aspire.aspire.common.config import AspireConfig from aspire.aspire.common.exceptions import ErrorTooBig, WrongInput, DimensionsIncompatible from aspire.aspire.common.logger import logger from aspire.aspire.utils.data_utils import load_stack_from_file...
{"hexsha": "b9910b2bd919d4095b61e44f0e3f405db380af50", "size": 3390, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/aspire/aspire/utils/compare_stacks.py", "max_stars_repo_name": "janden/ASPIRE-Python", "max_stars_repo_head_hexsha": "5bcf831881fd0e42630c3b99671c5ed08de260ea", "max_stars_repo_licenses": ["MI...
# coding: utf-8 from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import numpy as np class DataAugmenter(object): def __init__(self): super().__init__() def augment(self, X, y, sample_weight=None): ...
{"hexsha": "109f933c432f8b8d8092e740ead9385201981651", "size": 2110, "ext": "py", "lang": "Python", "max_stars_repo_path": "old_models/data_augment.py", "max_stars_repo_name": "victor-estrade/SystGradDescent", "max_stars_repo_head_hexsha": "822e7094290301ec47a99433381a8d6406798aff", "max_stars_repo_licenses": ["MIT"], ...
# Create the ffunctions necessary for our analysis # import necessary libraries import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # create max_min function to get details of maximum and minimum of the given column def max_min(df, col): ''' args: df: dataframe ...
{"hexsha": "268c9eb3310f6129e0cf6e3718e2a88d4f7b4519", "size": 6403, "ext": "py", "lang": "Python", "max_stars_repo_path": "pkg/analysis_fn.py", "max_stars_repo_name": "codeslash21/TMDB_data_analysis", "max_stars_repo_head_hexsha": "116bbd4ab7d431653e39c1188ce9e437133d4396", "max_stars_repo_licenses": ["MIT"], "max_sta...
import random import numpy as np from affordable.affordable import Affordable class AbstractGame(Affordable): def __init__(self, ctx, name): super().__init__(ctx, name) self.ctx = ctx self.affordables = [] self.actions_list = [] self.states_list = [] self.policy =...
{"hexsha": "7602d009524c0f63925af85ca2bbbe7e0d9dc2a6", "size": 3621, "ext": "py", "lang": "Python", "max_stars_repo_path": "affordable/game.py", "max_stars_repo_name": "mountain/affordable", "max_stars_repo_head_hexsha": "31834c866ddce255d4b9a1ca28973e3eae2bf939", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from supreme._build import CExtension import os.path def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('fast', parent_package, top_path) c_files = [f for f in os.listdir(config.local_path) if f.endswith(...
{"hexsha": "9f3f14eb5cbf9761d3f5ebe21773f5ed6b66ee57", "size": 549, "ext": "py", "lang": "Python", "max_stars_repo_path": "supreme/lib/fast/setup.py", "max_stars_repo_name": "KirillDZR/supreme", "max_stars_repo_head_hexsha": "c296722599363bd0cbcce6877bd9de9b066cb74b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
import tactic.choose /- choice -/ example (h : ∀n m : ℕ, n < m → ∃i j, m = n + i ∨ m + j = n) : true := begin choose i j h using h, guard_hyp i : ∀n m : ℕ, n < m → ℕ, guard_hyp j : ∀n m : ℕ, n < m → ℕ, guard_hyp h : ∀ (n m : ℕ) (h : n < m), m = n + i n m h ∨ m + j n m h = n, trivial end example (h : ∀n m : ...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/test/choose.lean"}
# # Copyright 2019 Xilinx Inc. # # 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": "3d62cc08553d7dc6791a0dccd00089b93adaa40f", "size": 1320, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/Vitis-AI-Library/graph_runner/test/run-graph-task.py", "max_stars_repo_name": "hito0512/Vitis-AI", "max_stars_repo_head_hexsha": "996459fb96cb077ed2f7e789d515893b1cccbc95", "max_stars_repo_l...
#pragma once #include <boost/multi_index/hashed_index.hpp> #include <boost/multi_index/member.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/random_access_index.hpp> #include <boost/multi_index_container.hpp> #include <chrono> #include <memory> #include <cga/lib/blocks.hpp> #include <c...
{"hexsha": "6d18d1a1adbdb1a11e9b226c7bf939a03a9b77b3", "size": 2673, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "cga/node/blockprocessor.hpp", "max_stars_repo_name": "cgacurrency/cga-node", "max_stars_repo_head_hexsha": "ad21cd224bed5de4bd0cec8c2aa42d35aea842a5", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
from scipy.special import loggamma import matplotlib.pyplot as plt import numpy as np from scipy.special import loggamma from math import log import collections # This function is given, nothing to do here. def simulate_data(num_samples, tails_proba): """Simulate a sequence of i.i.d. coin flips. Tails are d...
{"hexsha": "f4a160d18a707641390965dbbfcb01de809eeb0c", "size": 5773, "ext": "py", "lang": "Python", "max_stars_repo_path": "exercise03/probabilistic_inference.py", "max_stars_repo_name": "Rylie-W/ML33_21WS", "max_stars_repo_head_hexsha": "6c489953ba227bee7b534106c4ab9d02c79910e4", "max_stars_repo_licenses": ["Apache-2....
set_bigfloat_precision(128) temp = BigFloat(0) f(x) = exp(-x) - sin(x) steffensen(c) = c - (f(c)*f(c))/( f(c+f(c)) - f(c) ) temp2 = BigFloat(100) witch = big"0.588532743981861077432452045702903688531271516109030533319914299511672553307351427738524061576027409562153528176982466770293849745782742957500713135" for i =...
{"hexsha": "f26a1374c245a8e3a41a55c2d6e14af32851f71c", "size": 423, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Analiza_Numeryczna_M/02Lista/zad8.jl", "max_stars_repo_name": "Magikis/Uniwersity", "max_stars_repo_head_hexsha": "06964ef31d721af85740df1dce3f966006ab9f78", "max_stars_repo_licenses": ["MIT"], "max...
function a = circulant ( m, n, x ) %*****************************************************************************80 % %% CIRCULANT returns the CIRCULANT matrix. % % Formula: % % K = 1 + mod ( J-I, N ) % A(I,J) = X(K) % % Example: % % M = 4, N = 4, X = ( 1, 2, 3, 4 ) % % 1 2 3 4 % 4 1 2 3 % 3 ...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_mat/circulant.m"}
#' Get header info for a document. #' #' @export #' @template all #' @template return #' @param dbname (character) Database name. Required. #' @param docid (character) Document ID. Required. #' @examples \dontrun{ #' (x <- Cushion$new()) #' #' # create a database #' if ("sofadb" %in% db_list(x)) { #' invisible(db_del...
{"hexsha": "4e464143cfd67400b4decaa24e93200bc648e3f8", "size": 939, "ext": "r", "lang": "R", "max_stars_repo_path": "R/doc_head.r", "max_stars_repo_name": "FTwex/sofa-cloudant", "max_stars_repo_head_hexsha": "097577be2446865e17d41bcb015141eed19c7139", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
import numpy as np import os import yaml import pandas as pd import plotly.graph_objects as go from keras.preprocessing.image import NumpyArrayIterator from plotly.subplots import make_subplots def report_dataframes(report_path): ''' ''' categories = [f for f in os.listdir(report_path) if not f.startswi...
{"hexsha": "2b7e21b76dc65487ce651258046192a9796bcc68", "size": 12791, "ext": "py", "lang": "Python", "max_stars_repo_path": "hardy/data_reporting/reporting.py", "max_stars_repo_name": "EISy-as-Py/hardy", "max_stars_repo_head_hexsha": "de873b7fe6e2c010d9eaa5e0b30550c8850e0f71", "max_stars_repo_licenses": ["MIT"], "max_s...
runlengthencoding <- function(x) { splitx <- unlist(strsplit(input, "")) rlex <- rle(splitx) paste(with(rlex, as.vector(rbind(lengths, values))), collapse="") } input <- "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW" runlengthencoding(input)
{"hexsha": "abef9fbd8891e2430c2d02a442b6c6c02b43a90a", "size": 275, "ext": "r", "lang": "R", "max_stars_repo_path": "Task/Run-length-encoding/R/run-length-encoding-1.r", "max_stars_repo_name": "LaudateCorpus1/RosettaCodeData", "max_stars_repo_head_hexsha": "9ad63ea473a958506c041077f1d810c0c7c8c18d", "max_stars_repo_lic...
* * ----------------------------------------------------------------- * N U M T E R F * ----------------------------------------------------------------- * * Written by G. Gaigalas, * * Vilnius, Lithuania December 1993 * * FUNCTI...
{"hexsha": "033fcdbdbabcc16cb3c8bbf39b82c87532b0610b", "size": 889, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/lib/libang/numterf.f", "max_stars_repo_name": "mansour2014/ATSP2K_plus", "max_stars_repo_head_hexsha": "30842b9f086d1e497aeb778e2a352d1e8e520ec3", "max_stars_repo_licenses": ["BSD-4-Clause-UC"]...
@testset "FBM" begin rng = MersenneTwister(42) h = 0.3 k = FBMKernel(; h=h) v1 = rand(rng, 3) v2 = rand(rng, 3) @test k(v1, v2) ≈ ( sqeuclidean(v1, zero(v1))^h + sqeuclidean(v2, zero(v2))^h - sqeuclidean(v1 - v2, zero(v1 - v2))^h ) / 2 atol = 1e-5 @test repr(k) ...
{"hexsha": "3fe58dd0a6c82de86b63c852d7a8a53b330f1ce1", "size": 617, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/basekernels/fbm.jl", "max_stars_repo_name": "kaandocal/KernelFunctions.jl", "max_stars_repo_head_hexsha": "231909fb6271695926e126899ac797f5628a137b", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np class WeakClassifier(): """ weak classifier - threshold on the features Args: X (numpy.array): data array of flattened images (row:observations, col:features) (float). y (numpy.array): Labels array of shape (num observations, ) """ def __init_...
{"hexsha": "7291c8a020701bf056d51523a3fc3365d5d3f9e9", "size": 4650, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignments/ps06/helper_classes.py", "max_stars_repo_name": "jperuggia/ComputerVision", "max_stars_repo_head_hexsha": "6a36cf96dec40fe4cd5584fbc2d8e384a74a66cf", "max_stars_repo_licenses": ["MIT"]...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! !! GNU General Public License !! !! !! !! This file is part of the Flex...
{"hexsha": "7cc38fdf7069b1879822c3c5e6226bdba3d1dff0", "size": 22598, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "models/bgrid_solo/fms_src/atmos_bgrid/tools/bgrid_vert.f90", "max_stars_repo_name": "hkershaw-brown/feature-preprocess", "max_stars_repo_head_hexsha": "fe2bd77b38c63fa0566c83ebc4d2fac1623aef66"...
#= Provides calc_model_rv(theta, time) Computes the velocity of the star due to the perturbations of multiple planets, as the linear superposition of the Keplerian orbit induced by each planet, i.e., neglecting mutual planet-planet interactions =# include("kepler_eqn.jl") # Code to solve Kepler's equ...
{"hexsha": "94565050f8750f6e9b7f58a649aaa044ea8f09d2", "size": 2359, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/radial_velocity/src/rv_model_keplerian.jl", "max_stars_repo_name": "scidom/PGUManifoldMC.jl", "max_stars_repo_head_hexsha": "766cf983b122678d47524c566ebd6fffa7f804d8", "max_stars_repo_lice...
[STATEMENT] lemma convex_rel_interior: fixes S :: "'n::euclidean_space set" assumes "convex S" shows "convex (rel_interior S)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. convex (rel_interior S) [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. convex (rel_interior S) [PROOF STEP] { [PR...
{"llama_tokens": 2940, "file": null, "length": 35}
function gpu_energy!( pos::AbstractArray, forces::AbstractArray, N::Integer, L::Real, rc::Real, a::Real, b::Real, λ::Integer, temp::Real, full_ener::AbstractArray, vir::AbstractArray ) total_energy = 0.0f0 virial = 0.0f0 force = 0.0f0 ener = 0.0f0 index =...
{"hexsha": "63337d88aa2083728284477cecea3a4e5955be4c", "size": 3134, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/kernels.jl", "max_stars_repo_name": "edwinb-ai/Cubed.jl", "max_stars_repo_head_hexsha": "c93becfd252fc11e1a3ece0c054966fd2e6010ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
import pandas as pd import numpy as np import argparse import rdkit from rdkit.Chem import AllChem from rdkit import Chem, DataStructs from joblib import Parallel, delayed from tqdm import tqdm rdkit.RDLogger.DisableLog('rdApp.*') from dglt.contrib.moses.moses.utils import valid_smiles parser = argparse.ArgumentPars...
{"hexsha": "9bc800048e5abe79ce6e934e47c54ac2813fb76c", "size": 6184, "ext": "py", "lang": "Python", "max_stars_repo_path": "dglt/contrib/moses/scripts/similarity.py", "max_stars_repo_name": "uta-smile/CD-MVGNN", "max_stars_repo_head_hexsha": "b48f4cd14befed298980a83edb417ab6809f0af6", "max_stars_repo_licenses": ["MIT"]...
# Copyright 2021 The ParallelAccel 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 appl...
{"hexsha": "1458352817a1a39022d8f3155fb1eeb0f22114fc", "size": 16340, "ext": "py", "lang": "Python", "max_stars_repo_path": "parallel_accel/Simulator/asic_la/testutils.py", "max_stars_repo_name": "google/parallel_accel", "max_stars_repo_head_hexsha": "b58fda1c3a22f2aaa9a97337d602cd72c49ee8be", "max_stars_repo_licenses"...
''' Incremental-Classifier Learning Authors : Khurram Javed, Muhammad Talha Paracha Maintainer : Khurram Javed Lab : TUKL-SEECS R&D Lab Email : 14besekjaved@seecs.edu.pk ''' import logging import numpy as np import torch import torch.nn.functional as F from torch.autograd import Variable from torchnet.meter impo...
{"hexsha": "1afa0403fcbc6cdf7fac4d73fa110fecc2a9b9e1", "size": 1623, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer/evaluator.py", "max_stars_repo_name": "Khurramjaved96/Dicta", "max_stars_repo_head_hexsha": "416638a3d1ad851b00394e55a7574ec978080d51", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
''' Aggregate experiment data - Experiment: AvidaGP L9 SUMMARY FILES - experiment - config + summary(evaluation) + systematics + summary(world summary) - world - task ''' import argparse, os, sys, errno, csv, json from scipy.stats import entropy run_identifier = "RUN_" # String that identifies a run directory d...
{"hexsha": "cb4312613a70116f6dbfe098b1a625bc3afc49cd", "size": 11343, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/2021-09-22-selection/analysis/aggregate.py", "max_stars_repo_name": "amlalejini/directed-digital-evolution", "max_stars_repo_head_hexsha": "eb19ea9182e2e9b203513433e90bd73d4768a5a1", ...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE Regression #include <stdio.h> #include <stdlib.h> #include <string> #include <boost/test/included/unit_test.hpp> #include <xolotl/perf/EventCounter.h> using namespace std; using namespace xolotl::perf; /** * This suite is responsible for testing the EventCoun...
{"hexsha": "1d327c50c1839e16ad67b595c1a27c5f5b9a9cb8", "size": 1071, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/perf/EventCounterTester.cpp", "max_stars_repo_name": "ORNL-Fusion/xolotl", "max_stars_repo_head_hexsha": "993434bea0d3bca439a733a12af78034c911690c", "max_stars_repo_licenses": ["BSD-3-Clause"],...
#!/usr/bin/env python import os import numpy as np import tensorflow as tf from tensorflow.keras.models import Model from scipy.misc import imread from sklearn.cluster import KMeans from sklearn.decomposition.pca import PCA from tqdm import tqdm from utils import (kernel_classifier_distance_and_std_from_activations,...
{"hexsha": "f74a1f06253c573af8f4b81d28f7a232ac6ab9ae", "size": 8429, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/perceptual_scores.py", "max_stars_repo_name": "furgerf/GAN-for-dermatologic-imaging", "max_stars_repo_head_hexsha": "e90b06c46c7693e984a4c5b067e18460113cd23b", "max_stars_repo_licenses": ["Apa...
*----------------------------------------------------------------------* subroutine transpose_contr(contr,op_info,multi) *----------------------------------------------------------------------* * transpose a contraction *----------------------------------------------------------------------* implicit no...
{"hexsha": "b32a66c02e331559da43ecbe21f893baf461a5b9", "size": 6073, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "formula/transpose_contr.f", "max_stars_repo_name": "ak-ustutt/GeCCo-public", "max_stars_repo_head_hexsha": "8d43a6c9323aeba7eb54625b95553bfd4b2418c6", "max_stars_repo_licenses": ["MIT"], "max_star...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 29 16:02:24 2021 @author: jacobfaibussowitsch """ import os import pickle from collections import namedtuple import contextlib import meshio import pytest import numpy as np import scipy.sparse as scp cur_dir = os.path.basename(os.getcwd()) if cur...
{"hexsha": "c9e98eecff1a8746e0070f3fcc5dc70e4e945977", "size": 3613, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyhesive/test/common.py", "max_stars_repo_name": "Johnson-Research-Group/Pyhesive", "max_stars_repo_head_hexsha": "327f204b445a0db251088a29c0c3706593833d3a", "max_stars_repo_licenses": ["MIT"], "m...
\section{Buffer abstraction} As we have seen, some of the statements available to the programmer make use of a write buffer. Since depending on the memory model chosen, we may encounter different behaviours when running the same program using different memory models, we face the challenge of rewriting the program in a...
{"hexsha": "bf8dc6685b4b42d1f999e494906236a7d7ef5562", "size": 14827, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/writeup/ba.tex", "max_stars_repo_name": "hetmeter/awmm", "max_stars_repo_head_hexsha": "8d65b1246898b27db1ac5a6542465f71e27b1603", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
! Copyright (c) 2018, NVIDIA CORPORATION. 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 appli...
{"hexsha": "fa3e011dcdda1abc62c1bd0391446adf73f184b4", "size": 1699, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/f90_correct/src/bi08.f90", "max_stars_repo_name": "kammerdienerb/flang", "max_stars_repo_head_hexsha": "8cc4a02b94713750f09fe6b756d33daced0b4a74", "max_stars_repo_licenses": ["Apache-2.0"],...
import argparse import ast import glob import importlib import os import time import warnings from pathlib import Path from typing import Any import networkx as nx from joblib import Parallel, delayed warnings.filterwarnings('ignore', category=UserWarning) warnings.filterwarnings('ignore', category=RuntimeWarning) os...
{"hexsha": "baef553cea8dd919cb4485a35d16a5ea643083db", "size": 7197, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Abdumaleek/infinity-mirror", "max_stars_repo_head_hexsha": "b493c5602d9e4bcf374b748e9b80e7c85be54a88", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "...
function try_parse(s) if all(isnumeric, s) parse(Int, s) else s end end struct BinaryOp op in_1 in_2 out BinaryOp(op, in_1::AbstractString, in_2::AbstractString, out) = new(op, try_parse(in_1), try_parse(in_2), out) end struct UnaryOp op in_ out UnaryO...
{"hexsha": "808cbeaa4ece3fb828f5493101d23a8b31bc737e", "size": 2584, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2015/7.jl", "max_stars_repo_name": "pLOPeGG/JuliaOfCode", "max_stars_repo_head_hexsha": "894bca6427174b84ed385b8a008b79d15d63bd7b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """tests for load.py""" import tempfile import unittest import warnings import numpy as np # has to specify the exact file to avoid nosetests error on full tests from sknetwork.data.load import load_netset, load_konect, clear_data_home, save, load from sknetwork.data.to...
{"hexsha": "6744c577423b5a330a5ea78478bcc87af2dde21f", "size": 4079, "ext": "py", "lang": "Python", "max_stars_repo_path": "sknetwork/data/tests/test_load.py", "max_stars_repo_name": "altana-tech/scikit-network", "max_stars_repo_head_hexsha": "dedc9d3e694c7106e4709aae22dffb5142c15859", "max_stars_repo_licenses": ["BSD-...
//---------------------------------------------------------------------------// // Copyright (c) 2018-2020 Mikhail Komarov <nemo@nil.foundation> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt //-----------------...
{"hexsha": "a9bea83898cce86069ffa458dbf1c1231618b503", "size": 911, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/crypto3/block/detail/shacal/shacal1_policy.hpp", "max_stars_repo_name": "NilFoundation/boost-crypto", "max_stars_repo_head_hexsha": "a3e599b780bbbbc063b7c8da0e498125769e08be", "max_star...
'''Perimeter monitoring for MD simulations using MDAnalysis''' import glob import MDAnalysis from MDAnalysis.analysis import distances import numpy as np # Please change the workdir here.. workdir = 'REPLACEME' top = glob.glob("{0}/**/{1}".format(workdir.rstrip("/"), '*-in-noh2o.pdb'), recursive=True)[0] traj = glob....
{"hexsha": "7c5ee3e45405f6b55c51f2eb6061f733e3056e9f", "size": 1977, "ext": "py", "lang": "Python", "max_stars_repo_path": "perimetermonitor.py", "max_stars_repo_name": "dmachalz/mdanalysis", "max_stars_repo_head_hexsha": "b23fb34cfc78d2d67de510c375c8cb691f39dd5b", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#include "Collisions.h" #include "Box.h" #include "Points.h" #define EIGEN_DONT_ALIGN_STATICALLY #include <Eigen\Dense> using namespace std; using namespace Eigen; void CD(const Mesh& mesh, const shared_ptr<Obstacles> obs, std::vector<std::shared_ptr<btc::Collision> > &cls) { MatrixXd verts2(3, mesh.nodes.size()); ...
{"hexsha": "e4e16ffbf9b65a14add4aa46e8c47a4156591c0f", "size": 3152, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Collisions.cpp", "max_stars_repo_name": "sueda/eol-cloth", "max_stars_repo_head_hexsha": "cc8f24eef81283c541b859c05dd8ceed7813271f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 85.0, ...
#!/usr/bin/env python # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # """ SPECSENS calulates the calibration curve given an observation, a standard star, and the extinction curve for the site. The task assumes a 1...
{"hexsha": "497cd8ead6b7e020dfcb3c2d86a18526fe891282", "size": 6366, "ext": "py", "lang": "Python", "max_stars_repo_path": "saltspec/specsens.py", "max_stars_repo_name": "Richard-Tarbell/pysalt", "max_stars_repo_head_hexsha": "2815d5533c7e60b7042f2bc3cf46cecdd38fc609", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
[STATEMENT] lemma a_star_refl: shows "M \<longrightarrow>\<^sub>a* M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. M \<longrightarrow>\<^sub>a* M [PROOF STEP] by blast
{"llama_tokens": 72, "file": null, "length": 1}
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
{"hexsha": "94f67d3070287ee18b97447ceac64ac0c84542d5", "size": 3312, "ext": "hh", "lang": "C++", "max_stars_repo_path": "boostrap/BLogDeprecated.hh", "max_stars_repo_name": "hanswenzel/opticks", "max_stars_repo_head_hexsha": "b75b5929b6cf36a5eedeffb3031af2920f75f9f0", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
/****************************************************************************** Triangle class. Copyright (c) 2010 - 2012 Alexander Rukletsov <rukletsov@gmail.com> Dzmitry Hlindzich <dzmitry.hlindzich@ziti.uni-heidelberg.de> All rights reserved. Redistribution and use in source and binary forms, with o...
{"hexsha": "39d87ec40412b6caa144238577500d713da96a1c", "size": 4949, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Bo/core/triangle.hpp", "max_stars_repo_name": "rukletsov/bo", "max_stars_repo_head_hexsha": "bfece9e8f910b0c8f522733854405bf0a801b0e8", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count"...
[STATEMENT] lemma table_classes_SXcpt [simp]: "table_of Classes (SXcpt xn) = Some \<lparr>access=Public,cfields=[],methods=SXcpt_mdecls, init=Skip, super=if xn = Throwable then Object else SXcpt Throwable, superIfs=[]\<rparr>" [PROOF STATE] proof (prove) goal (1 subgoal): 1....
{"llama_tokens": 5337, "file": null, "length": 4}
import Assignment1Support import EvaluationsStub import BagOfWords import AddNoise import collections import operator import numpy as np ### UPDATE this path for your environment kDataPath = "..\\Data\\SMSSpamCollection" (xRaw, yRaw) = Assignment1Support.LoadRawData(kDataPath) (xTrainRawOriginal, yTrainRawOriginal,...
{"hexsha": "18a76ab9d13b5ec0bc6493ade9a4429c899145ec", "size": 3422, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/StartingPoint2.py", "max_stars_repo_name": "isibord/DecisionTree", "max_stars_repo_head_hexsha": "8e3336e9c7ec60ebfcecd02a1b7d7ae5dd6f7054", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# /* # * @Author: dorming # * @Date: 2021-01-14 15:21:38 # * @Last Modified by: dorming # * @Last Modified time: 2021-01-14 15:21:38 # */ import numpy as np class B(object): def __init__(self, *args, **kwargs): self.a = 1 self.b = 2 print(self) print("init", args, kwargs)...
{"hexsha": "a32b73223a9cac93d880eb5bad6d13778b902427", "size": 774, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/augmentation/test_case.py", "max_stars_repo_name": "zongdaoming/CMT", "max_stars_repo_head_hexsha": "fc3773bb6c6b1ab091688addfffca3fb1e382ae4", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
"""Wigner thermal conductivity base class.""" # Copyright (C) 2022 Michele Simoncelli # All rights reserved. # # This file is part of phono3py. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of ...
{"hexsha": "a6d754d02afaaec9e56e7b1525835ec99305736d", "size": 8628, "ext": "py", "lang": "Python", "max_stars_repo_path": "phono3py/conductivity/wigner.py", "max_stars_repo_name": "MSimoncelli/phono3py", "max_stars_repo_head_hexsha": "b28b45a025c279833e9269e5d91330c75d3f6ae0", "max_stars_repo_licenses": ["BSD-3-Clause...
import numpy as np from bokeh.document import Document from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid from bokeh.models.glyphs import ImageURL from bokeh.plotting import show url = "http://bokeh.pydata.org/en/latest/_static/images/logo.png" N = 5 source = ColumnDataSource(dict( url = ...
{"hexsha": "136a741c2b79528c4f9addc48108ff5d0c142206", "size": 1381, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/glyphs/ImageURL.py", "max_stars_repo_name": "andreagrant/bokehDev", "max_stars_repo_head_hexsha": "a684afee183496c54d4f187a890707cf6b5ec2a5", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
export saveRecoParams, loadRecoParams, defaultRecoParams, defaultOnlineRecoParams function defaultRecoParams() params = Dict{Symbol,Any}() params[:lambd] = 1e-2 params[:iterations] = 4 params[:SNRThresh] = 2.0 params[:minFreq] = 80e3 params[:maxFreq] = 1.25e6 params[:sortBySNR] = false params[:nAverage...
{"hexsha": "461410cfba4c2050efdbae382b30d1d8ffdcd41a", "size": 3258, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/RecoParameters.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/MPIReco.jl-e4246700-6248-511e-8146-a1d1f47669d2", "max_stars_repo_head_hexsha": "1c7ef4519acb88fd9ba0089515ca8b2f78b05...
#pragma once #include <cstring> #include <limits> #include <map> #include <memory> #include <stdexcept> #include <vector> #include <Eigen/Geometry> #if VOXELIZED_GEOMETRY_TOOLS__SUPPORTED_ROS_VERSION == 2 #include <sensor_msgs/msg/point_cloud2.hpp> #elif VOXELIZED_GEOMETRY_TOOLS__SUPPORTED_ROS_VERSION == 1 #include <...
{"hexsha": "7df1d04a9592b63eff9cb7ed039cc621b8d43d4c", "size": 3659, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/voxelized_geometry_tools/pointcloud_voxelization_ros_interface.hpp", "max_stars_repo_name": "calderpg/voxelized_geometry_tools", "max_stars_repo_head_hexsha": "cc36bfd426e984e451e5b844f89be8...
library(ggplot2) args <- commandArgs(trailingOnly=TRUE) if (length(args) <= 13) { print(args) stop("Usage: evaluator_bars_per_group_strategies.r common.r input.csv output.pdf granularity groupName evaluator1 unit1 quantity1 indication1 evaluator2 unit2 quantity2 indication2") } common <- args[1] inFile <- args[2]...
{"hexsha": "49ece405c4e4d0f5b44c384054d1e0576e3c56ba", "size": 1468, "ext": "r", "lang": "R", "max_stars_repo_path": "easyspec-evaluate/rscripts/evaluator_bars_per_group_strategies_on_demand.r", "max_stars_repo_name": "NorfairKing/easyspec", "max_stars_repo_head_hexsha": "b038b45a375cc0bed2b00c255b508bc06419c986", "max...
#!/usr/bin/env python3 import sys from os.path import expanduser import pudb import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from mpl_toolkits.mplot3d import Axes3D # Look for modules in top level of AstroLib sys.path.insert(0, expanduser("~/AstroLib/python")) from orbits...
{"hexsha": "c4fa4d7b58ea2bf344b5cc6b16464eb10b3b274a", "size": 1886, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/demos/kepler_uv_plot.py", "max_stars_repo_name": "yookiwooki/AstroLib", "max_stars_repo_head_hexsha": "4598be425e837ea6b216d4f0d09e789aa54d9368", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from numpy.testing import assert_almost_equal from mmpose.models import build_loss from mmpose.models.utils.geometry import batch_rodrigues def test_mesh_loss(): """test mesh loss.""" loss_cfg = dict( type='MeshLoss', ...
{"hexsha": "98907675d26bfe65790edfc2bde7b8179aee4ad8", "size": 5793, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_losses/test_mesh_losses.py", "max_stars_repo_name": "nightfuryyy/mmpose", "max_stars_repo_head_hexsha": "910d9e31dd9d46e3329be1b7567e6309d70ab64c", "max_stars_repo_licenses": ["Apache-2...
import os from os.path import join as pjoin import numpy as np import pandas as pd import scipy.stats import dask from cesium import featurize from cesium.tests.fixtures import (sample_values, sample_ts_files, sample_featureset) import numpy.testing as npt import pytest DATA_PATH ...
{"hexsha": "c90b4a53bfe359f73d49c6c5e81119bccac0fb54", "size": 12579, "ext": "py", "lang": "Python", "max_stars_repo_path": "cesium/tests/test_featurize.py", "max_stars_repo_name": "acrellin/cesium", "max_stars_repo_head_hexsha": "9d33edc0f9b3a79c68070826c0f390896abe294d", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
""" An [`AbstractConstraintSet`](@ref) that stores the constraint values as well as Lagrange multiplier and penalty terms for each constraint. The cost associated with constraint terms in the augmented Lagrangian can be evaluated for cost!(J::Vector, ::ALConstraintSet) which adds the cost at each time step to the ...
{"hexsha": "643e71fd928205f5b9cba629865d00afc500d9b1", "size": 8125, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ALconset.jl", "max_stars_repo_name": "serenity4/TrajectoryOptimization.jl", "max_stars_repo_head_hexsha": "5584984cd472d5ceb6634c032b8b572e57754084", "max_stars_repo_licenses": ["MIT"], "max_st...
import aoc_utils import itertools import functools import operator import networkx import math from collections import * from copy import deepcopy import random import re lines = aoc_utils.readlines() def isvalid(string): stack = [] for x in string: if x == "{" or x == "[" or x == "(" or x == "<": ...
{"hexsha": "be90ea942b501a20e842e4a783579fe27c5ac204", "size": 2100, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/Python21/10.py", "max_stars_repo_name": "sapieninja/AdventOfCode", "max_stars_repo_head_hexsha": "8190c11e3eb2e4292a0cf66a6ef9261dee880f2e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from scipy import stats from skimage import img_as_ubyte from skimage.feature import local_binary_pattern from skimage.io import imread import glob import keras_NN import numpy as np import os import pandas as pd import time # Define the global variables related to the dataset DATASET_PATH = "./input" TRAINING_FOLDER_...
{"hexsha": "29b114c4f6cf5afbf01bd345eed3faaad886e6f0", "size": 5031, "ext": "py", "lang": "Python", "max_stars_repo_path": "Copper Analysis/solution.py", "max_stars_repo_name": "nixingyang/Kaggle-Face-Verification", "max_stars_repo_head_hexsha": "b5f9908f4c23dc78b3e6b647c7add8f2b0d84663", "max_stars_repo_licenses": ["M...
program tarefaa print *, "Digite o valor inteiro de N:" read (*,*) N ! Número de "Andarilhos" M M = 1000 ! loop do passo do i = 1, N ! zera a soma soma = 0e0 ! loop do andarilho do j = 1, M ! soma os passos de cada andarilho ...
{"hexsha": "2c438594106da63b7e4beac62887861bf9268241", "size": 500, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "projeto-2/tarefa-a/tarefa-a-10407962.f90", "max_stars_repo_name": "ArexPrestes/introducao-fisica-computacional", "max_stars_repo_head_hexsha": "bf6e7a0134c11ddbaf9125c42eb0982250f970d9", "max_sta...
""" If you use this code, please cite one of the SynthSeg papers: https://github.com/BBillot/SynthSeg/blob/master/bibtex.bib Copyright 2020 Benjamin Billot 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 Lice...
{"hexsha": "bc8adc822e5b8227d6952e674d42df447e4fd832", "size": 28973, "ext": "py", "lang": "Python", "max_stars_repo_path": "SynthSeg/predict.py", "max_stars_repo_name": "a-parida12/SynthSeg", "max_stars_repo_head_hexsha": "fc37820826f13e39603e96e532bdbdd409b51774", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
\documentclass[11 pt]{scrartcl} \usepackage[header, margin, koma]{tyler} \newcommand{\hwtitle}{Discussion 4B Recap} \pagestyle{fancy} \fancyhf{} \fancyhead[l]{\hwtitle{}} \fancyhead[r]{Tyler Zhu} \cfoot{\thepage} \begin{document} \title{\Large \hwtitle{}} \author{\large Tyler Zhu} \date{\large\today} \maketitle ...
{"hexsha": "21dcab41f768a32c3057ff0a1958bbcbb4a66b61", "size": 1925, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "CS70/recap4b/recap4b.tex", "max_stars_repo_name": "cbugwadia32/course-notes", "max_stars_repo_head_hexsha": "cc269a2606bab22a5c9b8f1af23f360fa291c583", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np from scipy import signal import matplotlib.pyplot as plt from scipy.signal import butter, lfilter #from control import matlab def decimate(data,fs_befor,fs_after): from scipy.signal import decimate if fs_after<=8: data_ = decimate(data,int(fs_befor/8),ftype='iir') data_ = de...
{"hexsha": "a795afb74e37c52933d63e6be1aca47668ca406c", "size": 3101, "ext": "py", "lang": "Python", "max_stars_repo_path": "miyopy/signal/filt.py", "max_stars_repo_name": "MiyoKouseki/miyopy", "max_stars_repo_head_hexsha": "0f2da1a99f656259b556a9aac892483b44d17112", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jan 13 10:06:46 2019 @author: mikael """ import struct import math as m import numpy as np def to_float80(x): sign = 0 exponent = 0 if (x < 0): sign = 0x8000 x = -x mantisse_h = 0 mantisse_l = 0 mantisse = ...
{"hexsha": "e27cfd31e4b793e938f192855bc80c8494f22891", "size": 4017, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/audiofeel/io/aiff/writer.py", "max_stars_repo_name": "mrAgan/audiofeel-player", "max_stars_repo_head_hexsha": "39a1ea63808754a61590a72373b04a53a2331fbb", "max_stars_repo_licenses": ["MIT...
#!/usr/bin/env python import rospy from sensor_msgs.msg import Image import numpy as np import sys sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') import cv2 sys.path.append('/opt/ros/kinetic/lib/python2.7/dist-packages') import rospy from std_msgs.msg import String from sensor_msgs.msg import Image fr...
{"hexsha": "44c7b385d308c607992de0178ce33c2dd21de11a", "size": 1704, "ext": "py", "lang": "Python", "max_stars_repo_path": "darknet_ros/scripts/publishKittiImage.py", "max_stars_repo_name": "mrinalsenapati04/darknet_ros", "max_stars_repo_head_hexsha": "238c5dce25af9c607e73a59aa588c73343b99739", "max_stars_repo_licenses...
# -*- coding: utf-8 -*- import os import time import numpy as np import pandas as pd import scanpy as sc import scipy.sparse as ssp from cospar.tmap import _tmap_core as tmap_core from cospar.tmap import _utils as tmap_util from .. import help_functions as hf from .. import logging as logg from .. import settings f...
{"hexsha": "7bedaa6d09c058a4cfa7c7c81903434b417d19a2", "size": 51743, "ext": "py", "lang": "Python", "max_stars_repo_path": "cospar/tmap/map_reconstruction.py", "max_stars_repo_name": "AllonKleinLab/cospar", "max_stars_repo_head_hexsha": "6d2028717a048db7ad79b0cdb6f25910b6901eec", "max_stars_repo_licenses": ["MIT"], "m...
SUBROUTINE HOPEN ( iret ) C************************************************************************ C* HOPEN - TIFF * C* * C* This subroutine opens a plot file for the device. * C* * C* HOPEN ( IRET ) * C* * C* Output parameters: * C* IRET INTEGER Return code * C** ...
{"hexsha": "fb3defe0a89c9b05ba301b3302e8835f2fed2320", "size": 563, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/driver/active/tiff/hopen.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clau...
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the Line class which lets you build your Line charts just passing the arguments to the Chart class and calling the proper functions. """ #-----------------------------------------------------------------...
{"hexsha": "92a953032bff298260ec529bd6b4bc5d47b2f360", "size": 7800, "ext": "py", "lang": "Python", "max_stars_repo_path": "bokeh/charts/line.py", "max_stars_repo_name": "brian15co/bokeh", "max_stars_repo_head_hexsha": "6cecb7211277b9d838039d0eb15e50a10f9ac3d1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
[STATEMENT] lemma [iff]: "P,E,h \<turnstile> e\<^sub>1;;e\<^sub>2 :' T\<^sub>2 = (\<exists>T\<^sub>1. P,E,h \<turnstile> e\<^sub>1:' T\<^sub>1 \<and> P,E,h \<turnstile> e\<^sub>2:' T\<^sub>2)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (P,E,h \<turnstile> e\<^sub>1;; e\<^sub>2 :' T\<^sub>2) = (\<exists>T\<^sub>1...
{"llama_tokens": 489, "file": "CoreC++_Progress", "length": 3}
import cv2 import imutils import numpy as np cam = cv2.VideoCapture(0) cv2.namedWindow("test") img_counter = 0 ret, frame = cam.read() # cv2.imshow("test", frame) k = cv2.waitKey(1) # hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) # show image blueLower = (98, 109, 20) blueUpper = (112, 255, 255) frame = imutils.re...
{"hexsha": "ea7363e724e238956bd7dd5383b990cce8a7f77a", "size": 1451, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "akilawickey/irobot", "max_stars_repo_head_hexsha": "cec600889a7244ed047b25e7b88d4c846a1681a6", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null,...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
{"hexsha": "ef79140edc8e0fad1c78b2452a8f0cdf0386d872", "size": 6730, "ext": "py", "lang": "Python", "max_stars_repo_path": "Model/predictor-dl-model/tests/trainer/api_test/client_rest_api_test.py", "max_stars_repo_name": "rangaswamymr/incubator-bluemarlin", "max_stars_repo_head_hexsha": "6cb60b2a41edc6509377f9eacb7660d...
''' Show all different interpolation methods for imshow ''' import matplotlib.pyplot as plt import numpy as np # from the docs: # If interpolation is None, default to rc image.interpolation. See also # the filternorm and filterrad parameters. If interpolation is 'none', then # no interpolation is performed on the Ag...
{"hexsha": "4977368b49ae3b1f297f48713f9c211432eca868", "size": 1052, "ext": "py", "lang": "Python", "max_stars_repo_path": "matplotlib_examples/examples_src/images_contours_and_fields/interpolation_methods.py", "max_stars_repo_name": "xzlmark/webspider", "max_stars_repo_head_hexsha": "133c620c65aa45abea1718b0dada09618c...
# coding:utf-8 """ create Wangmeng Song July 4,2017 overwrite by Wangmeng Song July 17,2017 修改固定上车时间 July 20,2017 """ import shapefile as sf from shapely.geometry import Polygon, Point, LinearRing import os import datetime import numpy as np import inspect import copy import json import requests PICKTIME = 3 DIFDURA...
{"hexsha": "515d928a2d7a60fae4cf461a0c9ed241dbb67af4", "size": 9004, "ext": "py", "lang": "Python", "max_stars_repo_path": "recomTimeOnTheBus/recommendtime.py", "max_stars_repo_name": "hellodu-dev/team_schedule", "max_stars_repo_head_hexsha": "6239a6798f337f2cf5e88277d175143519045d86", "max_stars_repo_licenses": ["Apac...
import numpy as np class Hessian(): def __init__(self, f): self.value = f.Real.Real.Real fd1 = f.Dual[0].Real.Real[0].Real.Real fd2 = f.Dual[1].Real.Real[1].Real.Real self.firstDer = np.array([fd1,fd2]) hxx = f.Dual[0].Dual[0].Real[0].Real hyy = f.Dual[0].Real.Real[1].Dual[0].Real[1].Real hxy = f.Du...
{"hexsha": "5fe2965ddd1626c451aeeb254c3cc019f2d7c230", "size": 514, "ext": "py", "lang": "Python", "max_stars_repo_path": "ADPYNE/Hessian.py", "max_stars_repo_name": "PYNE-AD/cs207-FinalProject", "max_stars_repo_head_hexsha": "7b146da3ebb4747ce213bf0537af3c385689ecc1", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import time import numpy as np import h5py import matplotlib.pyplot as plt import scipy import argparse from PIL import Image from scipy import ndimage from dnn_utils import load_data, initialize_parameters_deep, L_model_forward, \ compute_cost, L_model_backward, update_parameters, predict, print_mislabeled_images...
{"hexsha": "8b0bea1c556bdf9bccc14874a6f68a2bab6da3de", "size": 6092, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "santamm/DeepNet", "max_stars_repo_head_hexsha": "fd05804200eb1bd62fb3a80a793b22794e4ec7d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
% -*- root: ../gvoysey-thesis.tex -*- \chapter{Introduction} \label{chapter:Introduction} \thispagestyle{myheadings} \section{Motivation} The variability of overall performance between putatively normal hearing listeners, particularly in supra-threshold tasks performed in complex acoustic environments such as the cockt...
{"hexsha": "55c3c0e1554ce8aee1ad6b442900eb37c6d178a8", "size": 5748, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "text/1_Intro/intro.tex", "max_stars_repo_name": "gvoysey/thesis", "max_stars_repo_head_hexsha": "766ed365f55ada08c3b6f548a6f857f9d3e49b91", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count...
[STATEMENT] lemma ack_3: "ack (Suc (Suc (Suc 0))) j = 2 ^ (j+3) - 3" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ack (Suc (Suc (Suc 0))) j = 2 ^ (j + 3) - 3 [PROOF STEP] proof (induct j) [PROOF STATE] proof (state) goal (2 subgoals): 1. ack (Suc (Suc (Suc 0))) 0 = 2 ^ (0 + 3) - 3 2. \<And>j. ack (Suc (Suc (Suc ...
{"llama_tokens": 1170, "file": "Ackermanns_not_PR_Primrec", "length": 11}
using AstroUtils using Test, SafeTestsets @time begin @time @safetestset "cartToKep tests..." begin include("cartToKepTests.jl") end end
{"hexsha": "ec18fce86bdd2198ad485268b4f86f4def58db58", "size": 137, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "GrantHecht/AstroUtils.jl", "max_stars_repo_head_hexsha": "40227897cc6030fa6ab505b805c7f72d1322f2b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
# -*- coding: utf-8 -*- """ Created on Thu Jul 9 10:38:44 2020 @author: jsalm """ print(__doc__) import numpy as np import matplotlib.pyplot as plt # from sklearn import svm, datasets from skimage.feature import peak_local_max from skimage.morphology import watershed from scipy.ndimage import convolve,d...
{"hexsha": "edb814adb76721168a69f55d93523cff2d35e530", "size": 17654, "ext": "py", "lang": "Python", "max_stars_repo_path": "SVM.py", "max_stars_repo_name": "eduluca/Generalized-Sklearn-ML-Pipeline", "max_stars_repo_head_hexsha": "75a3be16ca229ffe7712266cb9c1c50469ccd25d", "max_stars_repo_licenses": ["MIT"], "max_stars...
// version 02: first impl to sort large files. // sort and merge // 30% faster than sort(1) for all 1GB 5GB 10GB files #include <boost/noncopyable.hpp> #include <boost/ptr_container/ptr_vector.hpp> #include <datetime/Timestamp.h> #include <algorithm> #include <string> #include <ext/vstring.h> #include <vector> #inc...
{"hexsha": "48c00ec8332121a433df0ce80873d6e174729f13", "size": 5956, "ext": "cc", "lang": "C++", "max_stars_repo_path": "esort/sort02.cc", "max_stars_repo_name": "ririripley/recipes", "max_stars_repo_head_hexsha": "04267c68a7424326b4aa8dd14b1a879b59ab887c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
theory Ex2_1 imports Main begin datatype 'a tree = Leaf 'a | Branch 'a "'a tree" "'a tree" primrec preOrder :: "'a tree \<Rightarrow> 'a list" where "preOrder (Leaf val) = [val]"| "preOrder (Branch val lft rgt) = val # preOrder lft @ preOrder rgt" primrec postOrder :: "'a tree \<Rightarrow> 'a...
{"author": "SvenWille", "repo": "ExerciseSolutions", "sha": "1a71e30f3369d34c4691a4d010257b8c8afc566c", "save_path": "github-repos/isabelle/SvenWille-ExerciseSolutions", "path": "github-repos/isabelle/SvenWille-ExerciseSolutions/ExerciseSolutions-1a71e30f3369d34c4691a4d010257b8c8afc566c/src/isabelle/Trees and other ind...
from sklearn.cluster import KMeans import numpy as np from classes import * from treelib import * from math import * def hi_kmeans(_first_node, _des_database_list, _b, _depth, _n_documents): descriptors = [] # putting in a list the descriptor 128 vectors for i in range(len(_des_database_list)): desc...
{"hexsha": "a4fd3fb7cd26ea108ded992ea91fd6d22ae01c2c", "size": 2697, "ext": "py", "lang": "Python", "max_stars_repo_path": "hi_k_means.py", "max_stars_repo_name": "favia96/Visual-Search-System", "max_stars_repo_head_hexsha": "06b3188062aabb4602ca4f2546897a19fc987a4a", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...