text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
#include <cstring>
#include <glog/logging.h>
#include <boost/program_options.hpp>
#include <restinio/all.hpp>
#include <kspp/kspp.h>
#include <kspp/sources/mem_stream_source.h>
#include <kspp/processors/flat_map.h>
#include <kspp/metrics/prometheus_pushgateway_reporter.h>
#include <kspp/utils/env.h>
#include <bb_monito... | {"hexsha": "d70cfdf74a602143e55559aacd02d0df4f694905", "size": 11986, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "programs/client-proxies/bb-monitor-dd-metrics-proxy/main.cpp", "max_stars_repo_name": "bitbouncer/bb-monitor", "max_stars_repo_head_hexsha": "ee93cd1c52526bc16401cb54584e7f32e24be570", "max_stars_r... |
import numpy as np
import tensorflow as tf
import pickle
from models.model import Model
class doc2vecForCombiner(Model):
"""
Model only used to load pre-trained doc2vec model.
(It is NOT the doc2vec model itself!)
"""
def __init__(self, path_to_d2v, **kwargs):
super(doc2vecForCombiner, s... | {"hexsha": "58d0e0913c602e5937e442c310bba8dc81552abf", "size": 1228, "ext": "py", "lang": "Python", "max_stars_repo_path": "project-2/src/models/doc2vec_for_combiner.py", "max_stars_repo_name": "thomasnilsson/nlu-2019", "max_stars_repo_head_hexsha": "dd26a28950d32f6b31b55919a35bff1ed8e4e7f9", "max_stars_repo_licenses":... |
[STATEMENT]
lemma CHAR_pos_iff: "CHAR > 0 \<longleftrightarrow> (\<exists>n>0. of_nat n = (0::'a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (0 < CHAR) = (\<exists>n>0. of_nat n = (0::'a))
[PROOF STEP]
using CHAR_eq0_iff neq0_conv
[PROOF STATE]
proof (prove)
using this:
(CHAR = 0) = (\<forall>n>0. of_nat n \<n... | {"llama_tokens": 221, "file": null, "length": 2} |
################Class which build the fully convolutional neural net###########################################################
import inspect
import os
from . import TensorflowUtils as utils
import numpy as np
import tensorflow as tf
VGG_MEAN = [103.939, 116.779, 123.68]# Mean value of pixels in R G and B channels
... | {"hexsha": "d48fb0636b0ed7bde005cf03cfb0df725527d2c9", "size": 10111, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/fcn_tensorflow/BuildNetVgg16.py", "max_stars_repo_name": "jzi040941/ScheduleRecognition", "max_stars_repo_head_hexsha": "8a7d83d8a5b7c38d3c02b556d4adbac3dc58c6a2", "max_stars_repo_licenses"... |
#include <albert/bt/peer_connection.hpp>
#include <map>
#include <memory>
#include <random>
#include <string>
#include <vector>
#include <stdexcept>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/placeholders.hpp>
#include <boost/bind.hpp>
#include <albert/bencode/bencodin... | {"hexsha": "70df58d9b29019a0811895ba2161095986c674ae", "size": 23317, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/albert/bt/peer_connection.cpp", "max_stars_repo_name": "a1exwang/dht", "max_stars_repo_head_hexsha": "1ff57a3bd1ea0adb2e98e8eac5041b786092e5a2", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import time
from datasets import create_dataset
from modules import create_model
from utils.visdom.visualizer import Visualizer
from utils import startup
import os
import utils.tools as util
import numpy as np
import evaluation
def train(config):
dataset = create_dataset(config)
model = create_mode... | {"hexsha": "ec8eb9acec5e09baa07e9348db1a91fc75e58ab9", "size": 5797, "ext": "py", "lang": "Python", "max_stars_repo_path": "run.py", "max_stars_repo_name": "chao-tan/TCLNet", "max_stars_repo_head_hexsha": "4f48bd3430d8915e5407f0f22aa6676fc2f48957", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re... |
import math
from typing import Optional
import numpy
from sklearn.decomposition import SparseCoder
from aydin.util.crop.rep_crop import representative_crop
from aydin.util.dictionary.dictionary import (
fixed_dictionary,
extract_normalised_vectorised_patches,
)
from aydin.util.j_invariance.j_invariant_classic... | {"hexsha": "d2f76b4a17b595541432f54d6382748cea20371f", "size": 9664, "ext": "py", "lang": "Python", "max_stars_repo_path": "aydin/it/classic_denoisers/dictionary_fixed.py", "max_stars_repo_name": "royerloic/aydin", "max_stars_repo_head_hexsha": "f9c61a24030891d008c318b250da5faec69fcd7d", "max_stars_repo_licenses": ["BS... |
\chapter{Record Examples}
\label{cha:record-examples}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../../copatterns-thesis"
%%% End:
| {"hexsha": "2d9f149c905b74339d0bb0d2940af980db7708d8", "size": 142, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/appendix/example_records.tex", "max_stars_repo_name": "sualitu/thesis", "max_stars_repo_head_hexsha": "22d2cb4f21dc7c2dab011da5bb560c003650a2bc", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
import abc
import numpy
from xData import ancestry as ancestryModule
from PoPs.quantities.quantity import double
"""
Define... | {"hexsha": "9cb5d2d7642d448b8b1aa6d032632ecbd0a22162", "size": 5280, "ext": "py", "lang": "Python", "max_stars_repo_path": "fudge/resonances/externalRMatrix.py", "max_stars_repo_name": "brown170/fudge", "max_stars_repo_head_hexsha": "4f818b0e0b0de52bc127dd77285b20ce3568c97a", "max_stars_repo_licenses": ["BSD-3-Clause"]... |
# -*- coding: utf-8 -*-
"""
.. module:: perform_meta_analysis
:synopsis: module performing a meta-analysis
.. moduleauthor:: Aurore Bussalb <aurore.bussalb@mensiatech.com>
"""
import numpy as np
import scipy.stats as scp
import pandas as pd
import warnings
import matplotlib.pyplot as plt
def _effect_size_ppc(... | {"hexsha": "37debf4d640772ffe584d43c1063d445a1c80a92", "size": 15738, "ext": "py", "lang": "Python", "max_stars_repo_path": "source_assess_treatment_efficacy/meta_analysis/perform_meta_analysis.py", "max_stars_repo_name": "AuroreBussalb/meta-analysis-statistical-tools", "max_stars_repo_head_hexsha": "5ef8a285269ced6051... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Karel Roots"
import os
import sys
import numpy as np
from EEGModels import get_models
from data_loader import load_data
from experiment import Experiment
from mcnemar import mcnemar_test
from tensorflow.keras import backend as K
from tensorflo... | {"hexsha": "c782ae9885701c4df416d7115c812bf3028ba25b", "size": 4386, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_experiments.py", "max_stars_repo_name": "rootskar/EEGMotorImagery", "max_stars_repo_head_hexsha": "62bba0afc16cf102c77c1bda3a87bfc6fd3fb121", "max_stars_repo_licenses": ["Apache-2.0"], "max_st... |
\chapter*{Lijst van symbolen}
\addcontentsline{toc}{chapter}{Lijst van symbolen}
\begin{center}
\begin{tabularx}{0.8\textwidth}{p{1.5cm}X}
$\pi$ & het getal pi\\
$42$ & The Answer to the Ultimate Question of Life, the Universe, and Everything\cite{h2g2}
\end{tabularx}
\end{center}
%%% Local Variables:
%... | {"hexsha": "5ea22100dac8eb65b1c6ebdbf84958fbe9417f46", "size": 381, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/final/symbolenlijst.tex", "max_stars_repo_name": "matthijsvk/convNets", "max_stars_repo_head_hexsha": "7e65db7857a4e6abfbcab264953eb7741319de6c", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
import numpy as np
import cv2, random
from os.path import join
class WiderFaceDataset:
def __init__(self, data_dir):
self.data_dir = data_dir
self._train_ls = self.load_file("wider_face_train_bbx_gt.txt")
self._val_ls = self.load_file("wider_face_val_bbx_gt.txt")
self._test_ls = ... | {"hexsha": "a6c84c812691e8eafa5e72db666b18c1a491f621", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/wider_face.py", "max_stars_repo_name": "killf/FaceDetection", "max_stars_repo_head_hexsha": "4698921f8a6e8a33e6effe5a489353b82a03b653", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
using ArcadeLearningEnvironment
using CartesianGeneticProgramming
using IICGP
using Test
using Statistics
# Global test parameters
GAME_NAMES = ["freeway", "centipede", "pong"]
N_OUT_ENCO = 2
N_STEPS = 3
function enco_cont_from_reducer(r::AbstractReducer, game_name::String)
# Temporarily open a game to retrieve p... | {"hexsha": "733d415ed51d58c821157a14c88f992a9c23fd45", "size": 4185, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/process.jl", "max_stars_repo_name": "erwanlecarpentier/IICGP.jl", "max_stars_repo_head_hexsha": "65cecc8210e02f3f479a4e2b50b70f1006afb6f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
__version__ = '1.0'
__all__ = ['formatPoly', 'latex_matrix', '__version__']
__author__ = u'Rahul Gupta'
__license__ = 'MIT'
__copyright__ = 'Copyright 2021 Rahul Gupta'
# Source for numpyrett
# Some code is inspired from StackExchange , namely
# https://stackoverflow.com/questions/3862310/
# https://stackoverflow.co... | {"hexsha": "4631789f23142d56af0c3b85e1813a520fefe6dd", "size": 5016, "ext": "py", "lang": "Python", "max_stars_repo_path": "NumPyrett/__init__.py", "max_stars_repo_name": "argoopjmc/NumPyrett", "max_stars_repo_head_hexsha": "4ce7a8312b62b47ad1b70973c640a539948c2134", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
(******************************************************************************)
(* PipeCheck: Specifying and Verifying Microarchitectural *)
(* Enforcement of Memory Consistency Models *)
(* ... | {"author": "daniellustig", "repo": "pipecheck", "sha": "7b70b585be8c0a946869e991f459c57c29f73c9b", "save_path": "github-repos/coq/daniellustig-pipecheck", "path": "github-repos/coq/daniellustig-pipecheck/pipecheck-7b70b585be8c0a946869e991f459c57c29f73c9b/risc.v"} |
#include "orphandownloader.h"
#include <univalue.h>
#include "rpcipfs.h"
#include "guiutil.h"
#include "rpcpog.h"
#include "timedata.h"
#include <QUrl>
#include <boost/algorithm/string/case_conv.hpp>
#include <QDir>
#include <QTimer>
#include <QString>
OrphanDownloader::OrphanDownloader(QString xURL, QString xDestN... | {"hexsha": "0dd1418522f97a08080e378c45d316b27f9933c8", "size": 2610, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/qt/orphandownloader.cpp", "max_stars_repo_name": "Mart1250/biblepay", "max_stars_repo_head_hexsha": "d53d04f74242596b104d360187268a50b845b82e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 17 13:28:24 2022
@author: awatson
"""
import flask, json, zarr, os, ast
from flask import request, Response, send_file
import numpy as np
import dask.array as da
from bil_api.dataset_info import dataset_info
# from bil_api import config
from bil_api import utils
import... | {"hexsha": "a9d81c94dbc8a16c89dcf6429c3105e3cda4bd47", "size": 1111, "ext": "py", "lang": "Python", "max_stars_repo_path": "BrAinPI/old/virtualFileSystem.py", "max_stars_repo_name": "CBI-PITT/bil_api", "max_stars_repo_head_hexsha": "5be7e9d84556dcadade944f4f0c536c4b5798cfa", "max_stars_repo_licenses": ["BSD-3-Clause"],... |
[STATEMENT]
lemma hn_monadic_FOREACH[sepref_comb_rules]:
assumes "INDEP Rk" "INDEP Rs" "INDEP R\<sigma>"
assumes FR: "P \<Longrightarrow>\<^sub>t \<Gamma> * hn_ctxt Rs s' s * hn_ctxt R\<sigma> \<sigma>' \<sigma>"
assumes STL: "GEN_ALGO tsl (IS_TO_SORTED_LIST ordR Rs Rk)"
assumes c_ref: "\<And>\<sigma> \<sigma>'... | {"llama_tokens": 9034, "file": "Refine_Imperative_HOL_Sepref_Foreach", "length": 31} |
// Generated Files
${PROJ_DIR}/axi4-st/axi_st_d64/axi_st_d64_master_top.sv
${PROJ_DIR}/axi4-st/axi_st_d64/axi_st_d64_master_concat.sv
${PROJ_DIR}/axi4-st/axi_st_d64/axi_st_d64_master_name.sv
// Logic Link files
-f ${PROJ_DIR}/llink/rtl/llink.f
// Common Files
-f ${PROJ_DIR}/common/rtl/common.f
| {"hexsha": "a4904a699b15491129b38c5937beec22ce548596", "size": 302, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "axi4-st/axi_st_d64/axi_st_d64_master.f", "max_stars_repo_name": "chipsalliance/aib-protocols", "max_stars_repo_head_hexsha": "98858e6707f30ed6ea714598e3e324d754d82be0", "max_stars_repo_licenses": [... |
program pgm
integer :: a(10)
a(10) = 3
print *, a(10)
end
| {"hexsha": "7fde59bfeb18922475b832dc5d8dbfc474a6a68f", "size": 58, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/mlir_out_tests/array1.f90", "max_stars_repo_name": "clementval/fc", "max_stars_repo_head_hexsha": "a5b444963c1b46e4eb34d938d992836d718010f7", "max_stars_repo_licenses": ["BSD-2-Clause"], "max... |
[STATEMENT]
lemma mix_pmf_comp_with_dif_equiv:
assumes "\<alpha> \<in> {0..(1::real)}"
and "\<beta> \<in> {0..(1::real)}"
assumes "\<alpha> > \<beta>"
shows "mix_pmf (\<beta>/\<alpha>) (mix_pmf \<alpha> p q) q = mix_pmf \<beta> p q" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. mix_pmf (\<b... | {"llama_tokens": 2071, "file": "Neumann_Morgenstern_Utility_PMF_Composition", "length": 14} |
import pandas as pd
import numpy as np
from utils import *
from metric import *
from multiprocessing import Pool
import cv2
from tqdm import tqdm
from functools import partial
from generator import *
from model import *
from keras.models import load_model
import tensorflow as tf
import ast
from sklearn.model_selection ... | {"hexsha": "a7b6c26c8516a1635104bf33fe47b7f99b65347f", "size": 15742, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/post_processing.py", "max_stars_repo_name": "JeongChanwoo/Deep-POC-2019", "max_stars_repo_head_hexsha": "cee8ede5994da4c7302b2cca31fca83480249f76", "max_stars_repo_licenses": ["MIT"], "max_st... |
# coding=utf-8
"""
.. moduleauthor: Torbjörn Klatt <t.klatt@fz-juelich.de>
"""
import unittest
import numpy
from nose.tools import *
from pypint.integrators.integrator_base import IntegratorBase
from pypint.integrators import INTEGRATOR_PRESETS
def init_with_presets(preset):
integrator = IntegratorBase()
in... | {"hexsha": "b4761487997bd4258d805798ec35dae5cc38ef6e", "size": 881, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/pypint/integrators_tests/integrator_base_test.py", "max_stars_repo_name": "DiMoser/PyPinT", "max_stars_repo_head_hexsha": "3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73", "max_stars_repo_licenses"... |
[STATEMENT]
lemma merge_coeffs_alt_def:
\<open>(RETURN o merge_coeffs) p =
REC\<^sub>T(\<lambda>f p.
(case p of
[] \<Rightarrow> RETURN []
| [_] => RETURN p
| ((xs, n) # (ys, m) # p) \<Rightarrow>
(if xs = ys
then if n + m \<noteq> 0 then f ((xs, n + m) # p) else f p
else ... | {"llama_tokens": 3953, "file": "PAC_Checker_PAC_Checker_Init", "length": 8} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def mental_tests(path):
"""Six Mental Tests
These data are from the SA... | {"hexsha": "80bf8c51b03caa3c9a21fa22a1866c0825e48e1a", "size": 1853, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/mental_tests.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0... |
from algorithms.network_alignment_model import NetworkAlignmentModel
from evaluation.metrics import get_statistics
from algorithms.NAME.embedding_model import NAME_MODEL, StableFactor, CombineModel, Combine2Model
from input.dataset import Dataset
from utils.graph_utils import load_gt
import torch.nn.functional as F
im... | {"hexsha": "8cdd0ecb4628872e263d0dde13aac8357b477dc5", "size": 29710, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/NAME/NAME.py", "max_stars_repo_name": "thanhtrunghuynh93/holisticEmbeddingsNA", "max_stars_repo_head_hexsha": "d1bb58e879a9fb868729ea13c198e46c9c5f45c9", "max_stars_repo_licenses": ["M... |
import socket
import base64
import cv2
import numpy as np
from collections import OrderedDict
import atexit
from .server import get_server
def jpeg_encode(img):
return cv2.imencode('.png', img)[1]
def get_free_port(rng, low=2000, high=10000):
in_use = True
while in_use:
port = rng.randint(high ... | {"hexsha": "c4f45f42a1764f4ec457049037f52c2f03ace4e9", "size": 2263, "ext": "py", "lang": "Python", "max_stars_repo_path": "webcv/manager.py", "max_stars_repo_name": "wanzysky/webcv", "max_stars_repo_head_hexsha": "6a0012f7464862cf1a1eca9f78d7b16b35d164ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "... |
# Autogenerated wrapper script for OpenCVQt_jll for armv7l-linux-gnueabihf-cxx03
export libopencv_calib3d, libopencv_core, libopencv_dnn, libopencv_features2d, libopencv_flann, libopencv_gapi, libopencv_highgui, libopencv_imgcodecs, libopencv_imgproc, libopencv_ml, libopencv_objdetect, libopencv_photo, libopencv_stitch... | {"hexsha": "75b9d2519b277a31b2021fc220614d4bbd70e8c2", "size": 14195, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/armv7l-linux-gnueabihf-cxx03.jl", "max_stars_repo_name": "terasakisatoshi/OpenCVQt_jll.jl", "max_stars_repo_head_hexsha": "918d0031aa727683e0c324fde708cfaf9d200144", "max_stars_repo_l... |
import atexit
import subprocess
import time
from collections import OrderedDict
from io import StringIO
from subprocess import PIPE, Popen
from xml.etree.ElementTree import fromstring
import cpuinfo
import numpy as np
import pandas as pd
import psutil
import requests
from bs4 import BeautifulSoup
from experiment_impa... | {"hexsha": "42339de130cadf53fa7527c75b8032d3c20eaa62", "size": 10345, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment_impact_tracker/gpu/nvidia.py", "max_stars_repo_name": "W4ngatang/experiment-impact-tracker", "max_stars_repo_head_hexsha": "cf486ebacae9b68ec4770de36fb537704105d6de", "max_stars_repo_l... |
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
//
// detail/sp_counted_base_solaris.hpp
// based on: detail/sp_counted_base_w32.hpp
//
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
// Copyright 2004-2005 ... | {"hexsha": "8b3530fc59d8c424ed6d1bd871189a201c877d7e", "size": 2460, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/boost_1_72_0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp", "max_stars_repo_name": "henrywarhurst/matrix", "max_stars_repo_head_hexsha": "317a2a7c35c1c7e3730986668ad2270dc19809ef", "max_s... |
# train logistic regression on mnist dataest using lista
import numpy as np
import theano.tensor as T
import theano as K
import theano
import gzip, cPickle
from random import sample, seed
import os, sys
os.chdir('/home/dikai/PycharmProjects/sparse_lstm')
print(os.getcwd())
from sparse_lstm import Sparse_LSTM_wo_O_Gat... | {"hexsha": "5677322fd12365381aaedfecf6a1a2f861be9d8f", "size": 7410, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/lista_reg_mnist.py", "max_stars_repo_name": "limit-scu/2018-AAAI-SC2Net", "max_stars_repo_head_hexsha": "dd113627dc8a5e12fd8bd9c7c2333fc9b7dc4b60", "max_stars_repo_licenses": ["MIT"], "max_st... |
export KNNRegressor, KNNClassifier
import MLJBase: @mlj_model, metadata_model, metadata_pkg
using Distances
import NearestNeighbors
const NN = NearestNeighbors
const KNNRegressorDescription =
"""
K-Nearest Neighbors regressor: predicts the response associated with a new point
by taking an average of the... | {"hexsha": "7cc6e0c6fbe4b7522878f40cb94c108239216a48", "size": 5865, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/_models/NearestNeighbors.jl", "max_stars_repo_name": "adityasaini70/MLJBase.jl", "max_stars_repo_head_hexsha": "6dae5136d70dbc310b8876d727a442efebaa223d", "max_stars_repo_licenses": ["MIT"], "... |
#include <boost/test/unit_test.hpp>
#include "algorithms/data_structures/sll/delete_k_to_last_elem_in_sll.hpp"
BOOST_AUTO_TEST_SUITE(DeleteKthToLastElementInSLL)
BOOST_AUTO_TEST_CASE(test_dktlesll_one_elem) {
NodeSLL<int>* sll = new NodeSLL<int>(10);
NodeSLL<int>* result =
Algo::DS::SLL::DeleteKth... | {"hexsha": "bcbc6e76bf668bbe82f2a2137082cffc89d79edc", "size": 2125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/algorithms/data_structures/sll/test_delete_k_to_last_elem_in_sll.cpp", "max_stars_repo_name": "iamantony/CppNotes", "max_stars_repo_head_hexsha": "2707db6560ad80b0e5e286a04b2d46e5c0280b3f", "ma... |
#include "utils.hpp"
#include "edlib/Basis/Basis1DZ2.hpp"
#include "edlib/Basis/ToOriginalBasis.hpp"
#include "edlib/Hamiltonians/TIXXZ.hpp"
#include "edlib/Op/NodeMV.hpp"
#include "edlib/EDP/ConstructSparseMat.hpp"
#include "edlib/EDP/LocalHamiltonian.hpp"
#include <Eigen/Dense>
#include <Eigen/Eigenvalues>
#includ... | {"hexsha": "f948e2befd8447b49f78bb856a537935b8df8a51", "size": 4791, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/test_xxz_gs.cpp", "max_stars_repo_name": "cecri/ExactDiagonalization", "max_stars_repo_head_hexsha": "a168ed2f60149b1c3e5bd9ae46a5d169aea76773", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
'''
Descripttion: 这个文件是写论文绘制ROC曲线用的
Version: 1.0
Author: ZhangHongYu
Date: 2021-02-27 11:20:37
LastEditors: ZhangHongYu
LastEditTime: 2021-05-04 21:24:17
'''
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# plt.rcParams['font.sans-serif'] = ['SimHei'] # 步骤一(替换sans-serif字体)
# plt.rcParams['axes.u... | {"hexsha": "68aada5fcef9da49a42fc01de5f6b3ee5595f2d6", "size": 1520, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_roc2.py", "max_stars_repo_name": "lonelyprince7/TipDMCup", "max_stars_repo_head_hexsha": "69e8e752cf4622c698872ad80a86f384c5151b9c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, ... |
import jax
import jax.numpy as jnp
import numpy as np # get rid of this eventually
import argparse
from jax import jit
from jax.experimental.ode import odeint
from functools import partial # reduces arguments to function by making some subset implicit
from jax.experimental import stax
from jax.experimental import opti... | {"hexsha": "4d8c859ff80b91cd7e9b89a7a9e087ddf15b03f1", "size": 8888, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/BestInitialization.py", "max_stars_repo_name": "breandan/lagrangian_nns", "max_stars_repo_head_hexsha": "5beedd01affc2aaecc78ea158834f8edae00cb98", "max_stars_repo_licenses": ["Apache-2.... |
function [idxStart, idxEnd] = find_ts_idx(ts, tStart, tEnd)
% find indices for starting and ending time points
if(tStart > ts.Time(end))
warning(['Start time is greater than last point in time for timeseries: ' ts.Name]);
idxStart = -1;
idxEnd = -1;
return;
else
idxStart = ... | {"author": "TUMFTM", "repo": "mod_vehicle_dynamics_control", "sha": "48b12705b72740b0c1574b0da2eab66fe0c75127", "save_path": "github-repos/MATLAB/TUMFTM-mod_vehicle_dynamics_control", "path": "github-repos/MATLAB/TUMFTM-mod_vehicle_dynamics_control/mod_vehicle_dynamics_control-48b12705b72740b0c1574b0da2eab66fe0c75127/s... |
from numpy import array, sin, exp, sqrt, pi
from benchmarks.benchmark import Benchmark
class Crossit(Benchmark):
"""dim: 2"""
def __init__(self, lower=-10, upper=10, dimension=2):
super(Crossit, self).__init__(lower, upper, dimension)
def get_optimum(self):
return array([[1.3491, -1.3491]... | {"hexsha": "4cbbe335aeaea19451104cc71a11a15c1de01ede", "size": 616, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/crossit.py", "max_stars_repo_name": "buctlab/NIO", "max_stars_repo_head_hexsha": "094e688dd1cd3def7f31cd16ff927d4324651422", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":... |
# Copyright 2019 Yuhao Zhang
# 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, softwar... | {"hexsha": "66255870154de45d3a8c0f013e63e253b24b2211", "size": 10606, "ext": "py", "lang": "Python", "max_stars_repo_path": "panorama/examples/recognition.py", "max_stars_repo_name": "makemebitter/Panorama-UCSD", "max_stars_repo_head_hexsha": "bdb89d00472e449318dae322eab42b0376d6e1f3", "max_stars_repo_licenses": ["Apac... |
import numpy as np
from scipy import ndimage
import queue
def region_grow(image, seed_point):
"""
Performs a region growing on the image from seed_point
:param image: An 3D grayscale input image
:param seed_point: The seed point for the algorithm
:return: A 3D binary segmentation mask with the sam... | {"hexsha": "ea690af8864994268ed4e78e74dbdf5beb53d8fa", "size": 3437, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignments/planning/segmentation.py", "max_stars_repo_name": "ProbstAlex/BME_CAS", "max_stars_repo_head_hexsha": "d7eca91b8f51170da4f3e5b8067e5b2f18b95d79", "max_stars_repo_licenses": ["MIT"], "m... |
# -*- coding: utf-8 -*-
import os
import numpy as np
import cv2
from recognition.lpr_util import sparse_tuple_from, DICT, decode_sparse_tensor
dict2 = {value:key for key, value in DICT.items()}
provinces = ["皖", "沪", "津", "渝", "冀", "晋", "蒙", "辽", "吉", "黑", "苏", "浙", "京", "闽", "赣", "鲁", "豫", "鄂", "湘", "粤", "桂",
... | {"hexsha": "0499250407f4479e90c5a56daf47bd0b420d21b1", "size": 5165, "ext": "py", "lang": "Python", "max_stars_repo_path": "recognition/data_generator.py", "max_stars_repo_name": "shuxin-qin/eulpr", "max_stars_repo_head_hexsha": "9be720a3f8dc9ef322e9d5358cc13315185eacbb", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
from matplotlib import cm, rcParams
import matplotlib.pyplot as plt
import numpy as np
import math as math
import random as rand
import os
import csv
rcParams.update({'figure.autolayout': True})
c = ['#aa3863', '#d97020', '#ef9f07', '#449775', '#3b7d86']
times = []
V1 = []
V2 = []
Vth = 1
Vr = -0
with open('gap_po... | {"hexsha": "efb1c3b69eec3bfdcc798e1b0179dad8c536c76b", "size": 909, "ext": "py", "lang": "Python", "max_stars_repo_path": "gap_potential/xpp_to_py.py", "max_stars_repo_name": "helene-todd/XPPAUT_code", "max_stars_repo_head_hexsha": "e4caf112c03889a68eed0f4e5fa9d9d436918914", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# Import the relevant packages
import os
import tweepy
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
import pickle
from sklearn.feature_extraction.text import TfidfTransformer
# define your parameters
text_query = "Coro... | {"hexsha": "331d054523b7dabb30f6c4ceb1c24f690b747426", "size": 4884, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/06_twitter_api.py", "max_stars_repo_name": "jennafu/howistwitterfeeling", "max_stars_repo_head_hexsha": "a5e1defb78f2ab714829d6ba936d77a651a40b91", "max_stars_repo_licenses": ["MIT"], "max_sta... |
# take unaligned seed -> make a msa
function build_model(fileseed::String, filefull::String, ctype::Symbol, L::Int64;
filename_ins::String="LambdaOpen_LambdaExt.dat",
filename_par::String="Parameters_PlmDCA.dat",
filename_gap::String="Gap_Ext_Int.dat",
Mtest::Int64=0,
verbose::Bool=true)... | {"hexsha": "22181367554ed88526cb651009e3a95faeb83698", "size": 2557, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/build_model.jl", "max_stars_repo_name": "infernet-h2020/DCAbuild", "max_stars_repo_head_hexsha": "09c86361b14522f3da851231c42dabef8b4d5dbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python
# rmsd.py
import MDAnalysis as mda
from MDAnalysis.analysis.rms import RMSD
import numpy
import argparse
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('--ref', dest='refpath', required=True)
parser.add_argument('--top', dest='toppath', required=True)
... | {"hexsha": "f5badc89db64c8ac4ff0ed021377d3f0b600797e", "size": 2712, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/examples/analysis_mdanalysis/rmsd.py", "max_stars_repo_name": "mczwier/westpa_py3", "max_stars_repo_head_hexsha": "ad0d778c43b7009ee57251bf1fa1e908c4f1a2e9", "max_stars_repo_licenses": ["MIT"]... |
"""
Module for various types of particle emission in WarpX.
"""
import collections
# import collections
import logging
import warnings
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numba
import numpy as np
from pywarpx import callbacks, picmi
import skimage.measure
from mewarpx.mespecies i... | {"hexsha": "aa4569544b4a87d989e3b5b0890cd8b47a1c3de7", "size": 80240, "ext": "py", "lang": "Python", "max_stars_repo_path": "mewarpx/mewarpx/emission.py", "max_stars_repo_name": "ModernElectron/WarpX", "max_stars_repo_head_hexsha": "563813bc125a01a1a54267a3d4bb3ba77bcc68a3", "max_stars_repo_licenses": ["BSD-3-Clause-LB... |
//
// Copyright (c) 2009--2010
// Thomas Klimpel and Rutger ter Borg
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_NUMERIC_BINDINGS_GLAS_COMPRESSED_HPP
#define BOOST_NUMERIC_BINDINGS_GLAS_C... | {"hexsha": "f3bd2460f06faccda62fdac236b3dcaf3feba012", "size": 2875, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "externals/numeric_bindings/boost/numeric/bindings/glas/compressed.hpp", "max_stars_repo_name": "ljktest/siconos", "max_stars_repo_head_hexsha": "85b60e62beca46e6bf06bfbd65670089e86607c7", "max_stars... |
[STATEMENT]
lemma rprodl_simps [simp]: "rprodl ((a, b), c) = (a, (b, c))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. rprodl ((a, b), c) = (a, b, c)
[PROOF STEP]
by(simp add: rprodl_def) | {"llama_tokens": 98, "file": "CryptHOL_Misc_CryptHOL", "length": 1} |
# import useful libraries
import os
import numpy as np
import numpy.linalg as la
import myml.factorizations as myfac
import myml.images as myimg
import mysp.sound as mysnd
# implement main function to be executed
if __name__ == '__main__':
# specify directory to data
... | {"hexsha": "e42a218efaea6677d256ba5fb74c5b0981d83966", "size": 1470, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pca_data.py", "max_stars_repo_name": "choward1491/cs598ps_project", "max_stars_repo_head_hexsha": "f6b15a418790c38637d80ff1bd62b6a2ab12cd3a", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# As described in Algorith, 7.3.4 in [CGTBOOK]
struct CGT <: TRSPSolver
end
| {"hexsha": "21115a91223a441c5d4ee7a1e4a9e807da0c420d", "size": 76, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/globalization/trs_solvers/solvers/CGT.jl", "max_stars_repo_name": "aaowens/NLSolvers.jl", "max_stars_repo_head_hexsha": "8be4390b85bf9b3631659b9d2966760bc722ed9c", "max_stars_repo_licenses": ["MI... |
import numpy as np
import scipy.ndimage.measurements as scipy_measurements
import miapy.data.transformation as miapy_tfm
class ClipNegativeTransform(miapy_tfm.Transform):
def __init__(self, entries=('images',)) -> None:
super().__init__()
self.entries = entries
def __call__(self, sample: dic... | {"hexsha": "5a8c5dccd774b45cfea010980c9e6fb6227679df", "size": 3307, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/data/preprocess.py", "max_stars_repo_name": "SCAN-NRAD/BrainRegressorCNN", "max_stars_repo_head_hexsha": "7917c6a6c4e3728db17ec762c63f8253392e6c04", "max_stars_repo_licenses": ["BSD-3-Claus... |
import numpy as np
def create_iterable_dataset(torch_transforms_module, pipeline_results):
"""
Create a PyTorch iterable dataset that loads samples from pipeline results.
:param torch_transforms_module: The imported torch.transforms module.
:param pipeline_results: Pipeline results iterator.
:ret... | {"hexsha": "29685bf2169f7561c8a110cfe28cc09dc54c1e99", "size": 3439, "ext": "py", "lang": "Python", "max_stars_repo_path": "CCAugmentation/examples/pytorch.py", "max_stars_repo_name": "pijuszczyk/CCAugmentation", "max_stars_repo_head_hexsha": "035ca0eaf000f5151fe8c68fc65ac8138bbc0e64", "max_stars_repo_licenses": ["MIT"... |
### A Pluto.jl notebook ###
# v0.12.20
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
lo... | {"hexsha": "0f30c4844615d1f0da2231e205b48daa57c6051c", "size": 31852, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/day2/04-flatland.jl", "max_stars_repo_name": "jpgmolina/DS-Julia2925", "max_stars_repo_head_hexsha": "4d96351afb72f4107fa12561a6a460dcd3c617e3", "max_stars_repo_licenses": ["BSD-3-Clause... |
# -*- coding: utf-8 -*-
import time
import numpy
from krypy.linsys import LinearSystem, Cg
from krypy.deflation import DeflatedCg, DeflatedGmres, Ritz
from krypy.utils import Arnoldi, ritz, BoundCG
from krypy.recycling import RecyclingCg
from krypy.recycling.factories import RitzFactory,RitzFactorySimple
from k... | {"hexsha": "3b2534c0418b9126bf14031fac35d279d4d24036", "size": 2220, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiment1_meantime.py", "max_stars_repo_name": "mcsosa121/KSRFILS", "max_stars_repo_head_hexsha": "75995933771d8338de33cc9bbb5e9416e4242c6b", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# !/usr/bin/python
# -*- coding: utf-8 -*-
# @Time : 2019/8/29 11:20 PM
# @Author : baienyang
# @Email : baienyang@baidu.com
# @File : linear_regression.py
# @Software: PyCharm
"""
Copyright 2019 Baidu, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use th... | {"hexsha": "9b7fb4de3a9ceb3eb8a5eb21d2aeddd6a50acae6", "size": 2219, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_regression.py", "max_stars_repo_name": "baiyyang/pytorch-simple-dnn-model", "max_stars_repo_head_hexsha": "49dc88b56d9a349c008e376d0cec5bf016723881", "max_stars_repo_licenses": ["Apache-2.0... |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | {"hexsha": "cd0fb53b6b289e7930404e291ee71c8df88df881", "size": 5328, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/st/ops/gpu/test_cum_minmax_op.py", "max_stars_repo_name": "httpsgithu/mindspore", "max_stars_repo_head_hexsha": "c29d6bb764e233b427319cb89ba79e420f1e2c64", "max_stars_repo_licenses": ["Apach... |
# -*- coding: utf-8 -*-
"""Utility functions for running examples
"""
# Author: Yue Zhao <zhaoy@cmu.edu>
# License: BSD 2 clause
import numpy as np
import matplotlib.pyplot as plt
from itertools import cycle, islice
def visualize_clusters(model_name, X, predicted_labels, show_figure=True,
sav... | {"hexsha": "b749204ee44a18c4fb8e2c915d8cc444feec0173", "size": 1509, "ext": "py", "lang": "Python", "max_stars_repo_path": "combo/utils/example.py", "max_stars_repo_name": "vishalbelsare/combo", "max_stars_repo_head_hexsha": "229d578de498b47ae03cf2580472aceebf8c2766", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_s... |
import numpy as np
import torch
def mixup_data(x, y, alpha=0.2):
"""Returns mixed up inputs pairs of targets and lambda"""
if alpha > 0:
lam = np.random.beta(alpha, alpha)
else:
lam = 1
batch_size = x.size(0)
index = torch.randperm(batch_size)
index = index.to(x.device)
l... | {"hexsha": "9bc51cc2e538173d91ed556dec0fca29e6efd404", "size": 462, "ext": "py", "lang": "Python", "max_stars_repo_path": "project_lightning/utils/Mixup.py", "max_stars_repo_name": "pprp/mixed_precision_imagenet_benchmark", "max_stars_repo_head_hexsha": "08dc2abbb6067b569ed394a849eb830deaf91429", "max_stars_repo_licens... |
#TODO: Write more tests
#To run tests, load the Space module first (/src/Spaces/Space.jl)
using Test
abstract type AbstractSpace end
include("box.jl")
include("dict-space.jl")
include("multi-binary.jl")
include("multi-discrete.jl")
include("tuple-space.jl")
include("discrete.jl")
test_case1 = (
Discrete(3),
... | {"hexsha": "041210b760fe51ce5e26c1bf2e28c23cd15da529", "size": 1704, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Spaces/tests/runtests.jl", "max_stars_repo_name": "dhairyagandhi96/Gym.jl", "max_stars_repo_head_hexsha": "bcef0355fd9ba32a4ae0dc212694446b942990e3", "max_stars_repo_licenses": ["MIT"], "max_st... |
[](https://pythonista.io)
# Introducción a ```sympy```.
El proyecto [sympy](https://www.sympy.org/en/index.html) comprende una biblioteca de herramientas que permiten realziar operaciones de matemáticas simbólicas.
En este sentido, es posible utilizar algunos de sus componentes para realizar operaciones que en lugar... | {"hexsha": "b269f0d194bfce9315d3009937ce9024cb20fa14", "size": 5798, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "15_introduccion_a_sympy.ipynb", "max_stars_repo_name": "PythonistaMX/py301", "max_stars_repo_head_hexsha": "8831a0a0864d69b3ac6dc1a547c1e5066a124cde", "max_stars_repo_licenses": ["MIT... |
! This is a single line comment.
| {"hexsha": "a2e4b507e551553e958eaa814788b42e413779f3", "size": 33, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran/comments.f90", "max_stars_repo_name": "smenjas/programming-languages-compared", "max_stars_repo_head_hexsha": "d9e6a9034c969c8bcf6de219f1d4d6f87d1aa39e", "max_stars_repo_licenses": ["0BSD"... |
#TODO: convert two function calls into Union{COOTen,ThirdOrderSymTensor}
#=------------------------------------------------------------------------------
Routines for searching over alpha/beta parameters
------------------------------------------------------------------------------=#
"""------------------... | {"hexsha": "37511974823c38d9fd19bdecf9a18412534e0b68", "size": 37396, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TAME_Implementations.jl", "max_stars_repo_name": "charlescolley/LambdaTAME.jl", "max_stars_repo_head_hexsha": "7c1384d4d3e7f507d7da9b79ee7929e79a4000e0", "max_stars_repo_licenses": ["MIT"], "m... |
# processing.py -- various audio processing functions
# Copyright (C) 2008 MUSIC TECHNOLOGY GROUP (MTG)
# UNIVERSITAT POMPEU FABRA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software... | {"hexsha": "433bb300b1dbda98a9454c8cfdf422bb25ffe59b", "size": 12115, "ext": "py", "lang": "Python", "max_stars_repo_path": "mediagoblin/media_types/audio/spectrogram.py", "max_stars_repo_name": "saksham1115/mediagoblin", "max_stars_repo_head_hexsha": "41302ad2b622b340caeb13339338ab3a5d0f7e6b", "max_stars_repo_licenses... |
import cv2
import tensorflow as tf
import numpy as np
import scipy.ndimage as sci
from gtts import gTTS
import time
from textblob import TextBlob
# This module is imported so that we can
# play the converted audio
import os
#to normalize the images to same no. of pixels
def resizeIt(img,size=100,median=2):
img... | {"hexsha": "5d7c2debbda785a51a1b60f1b3200e4d85f05bac", "size": 3278, "ext": "py", "lang": "Python", "max_stars_repo_path": "gesture to speech.py", "max_stars_repo_name": "Aryan4786/Sign-Language-to-Speech-and-Speech-to-Gestures", "max_stars_repo_head_hexsha": "1ac707d516697751ac99acd5e2338d875f89f71d", "max_stars_repo_... |
#!/usr/bin/env python
"""
Makes netcdf files of input data for NN trainig dataset
"""
import os
from dateutil.parser import parse
from netCDF4 import Dataset
import numpy as np
from math import cos, radians
#---
if __name__ == '__main__':
outdir = 'vnncLUT'
filename = 'LUT_angles_wind.nc4'
sza = np.linspa... | {"hexsha": "734ec690076bcf6c7f546217157f5d1bf7d366cf", "size": 1857, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Components/missions/TEMPO/vnncLUT_angles_ocean.py", "max_stars_repo_name": "GEOS-ESM/AeroApps", "max_stars_repo_head_hexsha": "874dad6f34420c014d98eccbe81a061bdc0110cf", "max_stars_repo_licens... |
"""
Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG)
LOBPCG is a preconditioned eigensolver for large symmetric positive definite
(SPD) generalized eigenproblems.
Call the function lobpcg - see help for lobpcg.lobpcg.
"""
from __future__ import division, print_function, absolute_impor... | {"hexsha": "861274a6655f7c9984cd992379f7371661676bbe", "size": 485, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/Python27/Lib/site-packages/scipy/sparse/linalg/eigen/lobpcg/__init__.py", "max_stars_repo_name": "lefevre-fraser/openmeta-mms", "max_stars_repo_head_hexsha": "08f3115e76498df1f8d70641d71f5c52ca... |
# Copyright (C) 2016 Michael D. Nunez
#
# License: BSD (3-clause)
# Record of Revisions
#
# Date Programmers Descriptions of Change
# ==== ================ ======================
# 03/16/16 Michael Nunez Original code
# 03... | {"hexsha": "7d2c6066c2d058865871af88cfe3d260cff785db", "size": 2757, "ext": "py", "lang": "Python", "max_stars_repo_path": "powercalcs.py", "max_stars_repo_name": "mdnunez/electroencephalopy", "max_stars_repo_head_hexsha": "32aad64be8567a44d8644720f684427616b33ea1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta... |
from .gdsPrimitives import *
from datetime import *
#from mpmath import matrix
#from numpy import matrix
from vector import vector
import numpy as np
#import gdsPrimitives
import debug
class VlsiLayout:
"""Class represent a hierarchical layout"""
def __init__(self, name=None, units=(0.001,1e-9), libraryName =... | {"hexsha": "f4248ebd9586d1bedaae1cd238f5bced8f981c27", "size": 41064, "ext": "py", "lang": "Python", "max_stars_repo_path": "compiler/gdsMill/gdsMill/vlsiLayout.py", "max_stars_repo_name": "mguthaus/OpenRAM", "max_stars_repo_head_hexsha": "46c86d3bb3df82e150532ede75cbf6180a697cfd", "max_stars_repo_licenses": ["BSD-3-Cl... |
#!/usr/bin/env python
# ----------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the ho... | {"hexsha": "343a5ed50697e8553d5383c1838dc94d1cdd834e", "size": 9059, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mgng/amgng.py", "max_stars_repo_name": "mtambos/online-anomaly-detection", "max_stars_repo_head_hexsha": "7a00d1bf3b39fcc0bcb17fc2211704a92c4e31c4", "max_stars_repo_licenses": ["MIT"], "max_st... |
[STATEMENT]
lemma moebius_ocircline_id_moebius [simp]:
shows "moebius_ocircline id_moebius H = H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. moebius_ocircline id_moebius H = H
[PROOF STEP]
by (transfer, transfer) (force simp add: mat_adj_def mat_cnj_def) | {"llama_tokens": 117, "file": "Complex_Geometry_Oriented_Circlines", "length": 1} |
SUBROUTINE Poly_Intercept (a, b, x, y, n, u, v, m, num, ierr)
!-----------------------------------------------------------------------
! INTERSECTION OF A STRAIGHT LINE
! AND POLYGONAL PATH
!-----------------------------------------------------------------------
! The po... | {"hexsha": "7c6c83318ae9a9bc9a6704f94b5c4c6b405e4788", "size": 4795, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/amil/p_intcpt.f90", "max_stars_repo_name": "agforero/FTFramework", "max_stars_repo_head_hexsha": "6caf0bc7bae8dc54a62da62df37e852625f0427d", "max_stars_repo_licenses": ["MIT"], "max_stars... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 3 07:02:29 2020
Tests the performance of Gaussian elimination for systems of a variety of sizes
@author: zettergm
"""
# imports
import numpy as np
import time
from elimtools import Gauss_elim,backsub
import matplotlib.pyplot as plt
from ittools i... | {"hexsha": "6c999dc2d2c89d6afab1076f0d8c1c97594510c0", "size": 2239, "ext": "py", "lang": "Python", "max_stars_repo_path": "linear_algebra/benchmark.py", "max_stars_repo_name": "microckey/EP501_python", "max_stars_repo_head_hexsha": "2de97cc99ccce380564510b240fcbfb136974a7c", "max_stars_repo_licenses": ["MIT"], "max_st... |
#include <boost/compute/algorithm/count_if.hpp>
| {"hexsha": "a624572f643a47433b03f33f04c340c6077d350d", "size": 48, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_compute_algorithm_count_if.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BS... |
import streamlit as st
from PIL import Image
import numpy as np
import cv2
import tensorflow
from tensorflow.keras.models import load_model
from scipy.spatial import distance
# from streamlit_webrtc import webrtc_streamer
################
## Tiltle ##
################
# app = MultiApp()
hide_streamlit_style = """... | {"hexsha": "f67949dd867ab3aef2de447e95d9a070116cb107", "size": 4647, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "MaheshvaranS/deep_learning_project", "max_stars_repo_head_hexsha": "a772eef954235eee03502cc81a433856217e18b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
\small
\section{GNU GENERAL PUBLIC LICENSE}
\label{sec:gpl}
Version 2, June 1991\\
\noindent
Copyright \copyright\ 1989, 1991 Free Software Foundation, Inc.\\
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\noindent
Everyone is permitted to copy and distribute verbatim copies
of this license docume... | {"hexsha": "043fa13087bd8c87ad49c10a60149a15e63f00d2", "size": 16726, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "csim/documentation/gpl.tex", "max_stars_repo_name": "Kirito56/lsm-matlab", "max_stars_repo_head_hexsha": "bf1631031a7c2cb709ca476e458f85faa2a1f84d", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
MODULE read_ncoda_prep
!===============================================================================
! This program reads the NCODA prep files:
! coda.MVO_prp.*
! coda.SSH_prp.*
! coda.MOV_ENS_obs.*
! coda.SSH_ENS_obs.*
!
! These containt the observations (prp) and ensemble member innovations (ENS_obs)
!
! This rout... | {"hexsha": "4fde395f2f3f9cff1e11a5a1c12ae84b057d3b11", "size": 10814, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/obs/read_ncoda_prep.f90", "max_stars_repo_name": "GEOS-ESM/Ocean-LETKF", "max_stars_repo_head_hexsha": "a7c4bbf86cdbff078212914dcc059d0b1450accf", "max_stars_repo_licenses": ["Apache-2.0"],... |
import numpy as np
from operator import itemgetter
from federatedml.util import consts
from federatedml.util import LOGGER
from federatedml.ensemble.boosting import HeteroBoostingGuest
from federatedml.param.boosting_param import HeteroSecureBoostParam, DecisionTreeParam
from federatedml.util.io_check import assert_io_... | {"hexsha": "cd9992538227dece445507ef6af2e69380541467", "size": 22084, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/federatedml/ensemble/secureboost/hetero_secoreboost/hetero_secureboost_guest.py", "max_stars_repo_name": "rubenlozanoaht3m/DataDogm", "max_stars_repo_head_hexsha": "cd605e8072cca31e8418830... |
from cnntools import cnntools
from torchvision import models, transforms
from os.path import join as pjoin
import torch
import numpy as np
import pandas as pd
from scipy import stats, linalg
import os
from dnnbrain.dnn import models as dnn_models
import torch.nn as nn
from PIL import Image
from ATT.iofunc import iofile... | {"hexsha": "e004b68707ee52395ba0616bfe67c0aff4817e35", "size": 3418, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/PC2_humansize.py", "max_stars_repo_name": "helloTC/RealWorldSizeAxis", "max_stars_repo_head_hexsha": "769dff6c4602ecaa0c8f06244f190bb92e2038ca", "max_stars_repo_licenses": ["MIT"], "max_stars... |
!
! Copyright (c) 2006-2015, The Regents of the University of California,
! through Lawrence Berkeley National Laboratory (subject to receipt of any
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
! Institut (Switzerland). All rights reserved.!
!
! License: see file COPYING in top level ... | {"hexsha": "1e59802157467fa9411a6399df58d56bb882fba8", "size": 1850, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "examples/H5Part/write_core_vfdf.f90", "max_stars_repo_name": "greole/H5hut", "max_stars_repo_head_hexsha": "7833ed7877b7578b1ec3308ba2b465fc54d0c582", "max_stars_repo_licenses": ["BSD-3-Clause-L... |
library(rmarkdown)
library(knitr)
args = commandArgs(trailingOnly=TRUE)
render(args[1], output_file=args[2], output_format="word_document")
| {"hexsha": "cf14f4a03cc95e76b3e0441ff21edb99928b4428", "size": 143, "ext": "r", "lang": "R", "max_stars_repo_path": "docs/build-docx.r", "max_stars_repo_name": "pjhop/dmrff", "max_stars_repo_head_hexsha": "1f4b6785e18701eac4f76adde0e37f51bd0d1bcf", "max_stars_repo_licenses": ["Artistic-2.0"], "max_stars_count": 5, "max... |
"""
DiscreteUniform(a,b)
A *Discrete uniform distribution* is a uniform distribution over a consecutive sequence of integers between `a` and `b`, inclusive.
```math
P(X = k) = 1 / (b - a + 1) \\quad \\text{for } k = a, a+1, \\ldots, b.
```
```julia
DiscreteUniform(a, b) # a uniform distribution over {a, a+1, .... | {"hexsha": "c6a0b1735f629164617fbea857656cdb7135bdb2", "size": 2890, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/univariate/discrete/discreteuniform.jl", "max_stars_repo_name": "pdeffebach/Distributions.jl", "max_stars_repo_head_hexsha": "8aea3cc82ee2f8ffe1e8cd754e7fcd99369c7a1c", "max_stars_repo_licenses... |
import cv2
from matplotlib import pyplot as plt
import numpy as np
import imutils
import easyocr
image = cv2.imread("Images0.png")
# Convert to Grayscale Image
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
plt.imshow(cv2.cvtColor(gray, cv2.COLOR_BGR2RGB))
bfilter = cv2.bilateralFilter(gray, 11, 17, 17) #Noise reduct... | {"hexsha": "8a78f426004482f22f4e2fc4e0e6ba0ce7719164", "size": 1294, "ext": "py", "lang": "Python", "max_stars_repo_path": "License Plate Recognition System/OCR.py", "max_stars_repo_name": "mujtaba-farooq/FYP-F21-28-D-PRS", "max_stars_repo_head_hexsha": "2ad78b28486a59fbf16432b0643ca98b8f7ac438", "max_stars_repo_licens... |
#!/usr/bin/env python
# coding: utf-8
"""
Synthesizes the results of fits into a single file per harmonic.
"""
import re
import os
import math
import numpy as np
import cycle
import sys
if len(sys.argv)>1:
cycidf = sys.argv[1]
else:
cycidf = cycle.select() # cycle identifier
cycdir = cycle.directory(cycidf) ... | {"hexsha": "641198dc52f8cd3db2059a0bb6debcd4ce3056e5", "size": 3297, "ext": "py", "lang": "Python", "max_stars_repo_path": "launchers/local/synthesis.py", "max_stars_repo_name": "DunstanBecht/lpa-workspace", "max_stars_repo_head_hexsha": "316db41fed08f856c376e7f8e2ff92f2af5ecf7d", "max_stars_repo_licenses": ["CC0-1.0"]... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sn
df = pd.read_csv('height_weight.csv')
print(df.info())
print(df.describe())
#kernel density estimation
#kernel is specifying how data is smoothened. Here Gaussian is used
#violin plot also uses gaussian
sb.kdeplot(df["height"... | {"hexsha": "9d7a641a1c85d76901c33030e8486e2d020984ca", "size": 653, "ext": "py", "lang": "Python", "max_stars_repo_path": "kde_plot.py", "max_stars_repo_name": "WestHamster/Feature_engg", "max_stars_repo_head_hexsha": "18d2e935db14cb68c734fb67e99fe427841d1d1e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul... |
[STATEMENT]
lemma comm_monoidI:
fixes G (structure)
assumes m_closed:
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y \<in> carrier G"
and one_closed: "\<one> \<in> carrier G"
and m_assoc:
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>
(x \... | {"llama_tokens": 396, "file": null, "length": 2} |
subroutine banslv ( w, nroww, nrow, nbandl, nbandu, b )
c from * a practical guide to splines * by c. de boor
c companion routine to banfac . it returns the solution x of the
c linear system a*x = b in place of b , given the lu-factorization
c for a in the workarray w .
c
c****** i n p u t ******
c... | {"hexsha": "154ae051d46677c800df4f4889ea24fe5f7b3aa8", "size": 1962, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "iraf.v2161/math/deboor/banslv.f", "max_stars_repo_name": "ysBach/irafdocgen", "max_stars_repo_head_hexsha": "b11fcd75cc44b01ae69c9c399e650ec100167a54", "max_stars_repo_licenses": ["MIT"], "max_sta... |
[STATEMENT]
lemma SourcesS13_L2: "Sources level2 sS13 = {sS9, sS10, sS12}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. Sources level2 sS13 = {sS9, sS10, sS12}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
1. Sources level2 sS13 = {sS9, sS10, sS12}
[PROOF STEP]
have DSourcesS13:"DSources leve... | {"llama_tokens": 729, "file": "ComponentDependencies_DataDependenciesCaseStudy", "length": 9} |
import oneflow
from oneflow.framework.docstr.utils import reset_docstr
reset_docstr(
oneflow.nn.ReLU,
r"""ReLU(inplace=False)
ReLU 激活函数,对张量中的每一个元素做 element-wise 运算,公式如下:
:math:`\text{ReLU}(x) = (x)^+ = \max(0, x)`
参数:
inplace: 是否做 in-place 操作。 默认为 ``False``
形状:
- Input: ... | {"hexsha": "440309f0d5d9f1f790bc5bbe83f7f6a4e7f41014", "size": 701, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/source/cn/activation.py", "max_stars_repo_name": "grybd/oneflow", "max_stars_repo_head_hexsha": "82237ad096a10527591660c09b61444c42917e69", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
"""
Read data from the "current" BATSE catalog (dubbed 5Bp here, with "p" for
"preliminary," since an official 5B successor to the 4B catalog has not yet
been released). Provide access to catalog data and other GRB data via
a GRBCollection instance providing access to its individual GRB elements
in three ways:
* as a... | {"hexsha": "b2af14876b67de4d929b217500ea90da34235824", "size": 7657, "ext": "py", "lang": "Python", "max_stars_repo_path": "batse5bp/catalog.py", "max_stars_repo_name": "tloredo/batse5bp", "max_stars_repo_head_hexsha": "c039a8e5394da4764881cdee1e17c6b1c0ecc088", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c... |
[STATEMENT]
lemma x_vote_eq:
assumes run: "HORun UV_M rho HOs"
and com: "\<forall>r. HOcommPerRd UV_M (HOs r)"
and vote: "vote (rho r p) = Some v"
shows "v = x (rho r p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. v = x (rho r p)
[PROOF STEP]
proof (cases r)
[PROOF STATE]
proof (state)
goal (2 su... | {"llama_tokens": 3786, "file": "Heard_Of_uv_UvProof", "length": 34} |
from .ColorSpace import ColorSpace, ColorSpaces
import cv2
import numpy as np
class Frame():
def __init__(self, img, colorspace):
self.link(img, colorspace)
self.mask = None
def get(self, colorspace):
if isinstance(colorspace, ColorSpaces) or isinstance(colorspace, ColorSpace):
... | {"hexsha": "da3d2d7b58f741b43e88b5e7d57e9e9134183e1b", "size": 1361, "ext": "py", "lang": "Python", "max_stars_repo_path": "VisionSystem/DetectionModel/Frame.py", "max_stars_repo_name": "CallumJHays/g26-egb320-2019", "max_stars_repo_head_hexsha": "6dde6b5d2f72fac3928c5042a27dc50e978c3425", "max_stars_repo_licenses": ["... |
"""
https://github.com/gidariss/FewShotWithoutForgetting/blob/master/dataloader.py
"""
import numpy as np
from PIL import Image
from skimage import io
import unittest
import torch
import torch.nn as nn
from torch.utils.data import Dataset
from preprocess.tools import read_csv, load_csv2dict
import sys
import warning... | {"hexsha": "6f38f6d1728a7c0605763a320cf2833b56ca9d65", "size": 2853, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/few_shot_dataset.py", "max_stars_repo_name": "WonderSeven/DSDA", "max_stars_repo_head_hexsha": "88266ea5dd53d918ba3cd74c7d6bbf431a134e95", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
#!/usr/bin/env python3
"""
Construct full edited FS recons for each subject/editor and rerun with appropriate recon-all flags
Author : Mike Tyszka
Place : Caltech
Dates : 2020-05-04 JMT From scratch
2020-05-25 JMT Add insertion of edited data
"""
import os
import numpy as np
import pandas as pd
from nibabel.f... | {"hexsha": "d6458589748f4641503c618edda08cd18d25e1ca", "size": 4939, "ext": "py", "lang": "Python", "max_stars_repo_path": "prep_rerun_fsrecon.py", "max_stars_repo_name": "jmtyszka/freesurfer-editing-utils", "max_stars_repo_head_hexsha": "ed19d4d2ad75315b77c94d19329a72071b57847a", "max_stars_repo_licenses": ["MIT"], "m... |
#### Elementwise manipulations (scaling/clamping/type conversion) ####
# This file exists primarily to handle conversions for display and
# saving to disk. Both of these operations require UFixed-valued
# elements, but with display we always want to convert to 8-bit
# whereas saving can handle 16-bit.
# We also can't ... | {"hexsha": "1b65412f52fb34d3e52492e151f6e6277d3b9542", "size": 32574, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/map.jl", "max_stars_repo_name": "rsrock/Images.jl", "max_stars_repo_head_hexsha": "8e4192a04c45be0f93f8b13b189249ed93f394c1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_... |
(*
* Copyright (C) 2014 NICTA
* All rights reserved.
*)
(* Author: David Cock - David.Cock@nicta.com.au *)
section "The Algebra of pGCL"
theory Algebra imports WellDefined begin
text_raw \<open>\label{s:Algebra}\<close>
text \<open>Programs in pGCL have a rich algebraic structure, largely mirroring that for GCL... | {"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/pGCL/Algebra.thy"} |
#
# io_disc.py
# Contains helpful dictionaries and other global variables for plotting
# Also contains functions to read output files and plot data
#
import numpy as np
import matplotlib.pyplot as plt
import filefinder as ff
from multigraph import multigraph, multigraph_legend,multigraph_legend_points
nprofcol = 11
... | {"hexsha": "02f8d3fe9f30b66158e266e5c544548d64cfeca9", "size": 10242, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot/io_disc.py", "max_stars_repo_name": "dh4gan/visag", "max_stars_repo_head_hexsha": "bf3698459c0b41c9097807f9baf32eee3ca0bdbe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma... |
\cutname{herd.html}
The tool \herd{} is a memory model simulator.
Users may write simple, single events,
axiomatic models of their own and run litmus tests on top
of their model.
The \herd{} distribution already includes some models.
The authors of~\herd{} are Jade Alglave and Luc Maranget.
\section{Writing simple ... | {"hexsha": "bcc2728ddfe865b81e6f4b6bee2beb3e385c52ad", "size": 97335, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/herd.tex", "max_stars_repo_name": "patrick-rivos/herdtools7", "max_stars_repo_head_hexsha": "232b3e0f047c0daa1cbab6fa66cf21598b830811", "max_stars_repo_licenses": ["CECILL-B"], "max_stars_count... |
from Model import create_model
from tensorflow.keras.datasets.mnist import load_data
import numpy as np
from Layers import *
(x_train, y_train), (x_test, y_test) = load_data()
#---------------------------------------------
# The following method would create the model
#---------------------------------------------
... | {"hexsha": "e5f0653670314ee253947b34b7c7b50ff2559682", "size": 1041, "ext": "py", "lang": "Python", "max_stars_repo_path": "Train.py", "max_stars_repo_name": "karanbali/CSE-673-PytorchNano", "max_stars_repo_head_hexsha": "b70da22c2ce45fbcd087ffe0f283db75f0ab5446", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
SUBROUTINE HDOTS ( ix, iy, ilwid, iret )
C************************************************************************
C* HDOTS - PS *
C* *
C* This subroutine draws a dot on a graphics device. *
C* *
C* HDOTS ( IX, IY, ILWID, IRET ) *
C* *
C* Input parameters: *
C* IX INTEGER... | {"hexsha": "8fa3dc0c3c57304855598d125d0da289ceb983c5", "size": 985, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/driver/active/ps/hdots.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.