text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
""" Train Abnormal trajectory detection with SVM Classifier model. """ import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import ae_utilities as aeu import input_data as data import abnormal_data_generation as adg import dataset_defines as dd import numpy as np import os import time trad_...
{"hexsha": "82c54f29bf4289877017afad21dd46c291bd1faa", "size": 6490, "ext": "py", "lang": "Python", "max_stars_repo_path": "DAE_Method/stmarc/train_svm_abnormal_traj_detect_model.py", "max_stars_repo_name": "proy3/Abnormal_Trajectory_Classifier", "max_stars_repo_head_hexsha": "a6b27c6847262e9703a0f3404c85c135415c1d4c",...
import numpy as np import scipy from scipy.signal import convolve2d as conv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg def gradCalc(I, J, ksize, sigma): if sigma <= 0: sigma = 0.1 lp = np.atleast_2d(np.exp(-0.5 * np.square(np.arange(-ksize,ksize+1,1)/sigma))) lp2D = conv2(l...
{"hexsha": "daada954136cad25d2a26bce8f16e8756b58b865", "size": 681, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab1/gradCalc.py", "max_stars_repo_name": "VanLunis/tsbb15", "max_stars_repo_head_hexsha": "f609bc1a5ccf49378d63e8181a9d415a884948f9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import numpy as np import tensorflow as tf def process_text(file_path): text = open(file_path, 'rb').read().decode(encoding='utf-8') # Read, then decode for py2 compat. vocab = sorted(set(text)) # The unique characters in the file # Creating a mapping from unique characters to indices and vice ve...
{"hexsha": "f1a4c80b1764b9424d02ae670c99c511a0fd2f27", "size": 4000, "ext": "py", "lang": "Python", "max_stars_repo_path": "LSTM Text Generation.py", "max_stars_repo_name": "BogdanMarghescu/Text-Generation-with-LSTM", "max_stars_repo_head_hexsha": "4329812c4755f276b36899ad75b6ea903c395da5", "max_stars_repo_licenses": [...
(* infotheo (c) AIST. R. Affeldt, M. Hagiwara, J. Senizergues. GNU GPLv3. *) From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path. From mathcomp Require Import div choice fintype tuple finfun bigop prime. From mathcomp Require Import binomial ssralg finset fingroup finalg matrix. Require Import ...
{"author": "erikmd", "repo": "coq-bool-games", "sha": "659e9ac9c7f40d07ed651dde31d575f4ef0bce19", "save_path": "github-repos/coq/erikmd-coq-bool-games", "path": "github-repos/coq/erikmd-coq-bool-games/coq-bool-games-659e9ac9c7f40d07ed651dde31d575f4ef0bce19/external/infotheo/conditional_divergence.v"}
Require Export Util. Require Export Net. Require Export List. Export ListNotations. Require Import VerdiTactics. Require Import UpdateLemmas. Local Arguments update {_} {_} {_} _ _ _ _ : simpl never. Fixpoint distinct_pairs_and {A} (R : A -> A -> Prop) (l : list A) : Prop := match l with | [] => True | x ::...
{"author": "andres-erbsen", "repo": "notary", "sha": "a2bd24db19a19642480fe17d3ee83e75ae8df61f", "save_path": "github-repos/coq/andres-erbsen-notary", "path": "github-repos/coq/andres-erbsen-notary/notary-a2bd24db19a19642480fe17d3ee83e75ae8df61f/StatePacketPacketDecomposition.v"}
import pytest import pandas as pd import numpy as np from bokeh.models import ColumnDataSource from cuxfilter.charts.core.aggregate.core_aggregate import BaseAggregateChart class TestCoreAggregateChart: def test_variables(self): bac = BaseAggregateChart() # BaseChart variables assert bac...
{"hexsha": "f5a5d3e2ecc812376ef3f9a634ada1b83286607d", "size": 5619, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cuxfilter/tests/charts/core/test_core_aggregate.py", "max_stars_repo_name": "bryevdv/cuxfilter", "max_stars_repo_head_hexsha": "7d26792cc97dbf1caae77e6e3c7429777846b5cf", "max_stars_repo_li...
Require Import Coq.Lists.List. Import ListNotations. Fixpoint repeat_aux {A : Type} (x : A) (n : nat) (l : list A) : list A := match n with | O => l | S n => repeat_aux x n (x :: l) end. (** Make a list of `n` elements `x`. *) Definition repeat {A : Type} (x : A) (n : nat) : list A := repeat_aux x n []. (...
{"author": "clarus", "repo": "coq-list-plus", "sha": "21e1531ad4926ef52ed8e10394f0088581be70af", "save_path": "github-repos/coq/clarus-coq-list-plus", "path": "github-repos/coq/clarus-coq-list-plus/coq-list-plus-21e1531ad4926ef52ed8e10394f0088581be70af/src/List.v"}
import numpy as np import os from easydict import EasyDict as edict config = edict() config.bn_mom = 0.9 config.workspace = 256 config.emb_size = 512 config.ckpt_embedding = False config.net_se = 0 config.net_act = 'prelu' config.net_unit = 3 config.net_input = 1 config.net_blocks = [1,4,6,2] config.net_output = 'E' ...
{"hexsha": "2eb7bf0ad192df47f7932f59b845b4c4a53ee6a8", "size": 6968, "ext": "py", "lang": "Python", "max_stars_repo_path": "anti-spoof/config.py", "max_stars_repo_name": "hudmgy/insightface", "max_stars_repo_head_hexsha": "2ebc87e1bde3d4ef04bc0d4498038a0bc01b0ddc", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
// Copyright (c) 2012 Andre Martins // All Rights Reserved. // // This file is part of AD3 2.1. // // AD3 2.1 is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at...
{"hexsha": "d4177e4e53d24629ea363990053cd437ec2ce2dd", "size": 30147, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ad3qp/ad3/GenericFactor.cpp", "max_stars_repo_name": "andre-martins/lp-sparsemap", "max_stars_repo_head_hexsha": "5df0c2f25290881a0ecd4270a9fbbc488d9055ff", "max_stars_repo_licenses": ["MIT"], "max...
"""Forest of monotone trees-based ensemble methods This module contains methods for fitting monotone tree ensembles for classification. Monotonicity in the requested features is achieved using the technique from Bartley C., Liu W., and Reynolds M. 2017, ``Fast & Perfect Monotone Random Forest Classification``, availab...
{"hexsha": "7cf773ad399228b0f46b39dca4b294f3a4c870a2", "size": 25190, "ext": "py", "lang": "Python", "max_stars_repo_path": "monoensemble/mono_forest.py", "max_stars_repo_name": "chriswbartley/monoensemble", "max_stars_repo_head_hexsha": "1b6581367f44d3876d75665e9834b87532fab0e5", "max_stars_repo_licenses": ["BSD-3-Cla...
\documentclass[12pt, a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage[parfill]{parskip} \usepackage{graphicx} \usepackage{float} \usepackage[english]{babel} \usepackage[top=1.0in, bottom=1.0in, left=1.0in, right=1.0in]{geometry} \graphicspath{{Images/}} \linespr...
{"hexsha": "8256024fa413f5020c72fd6552118c7f4d982f96", "size": 18768, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Coursework 1 Report/CPSReport.tex", "max_stars_repo_name": "BarrySoap/Concurrent-Parallel-Systems", "max_stars_repo_head_hexsha": "628b84c7a7a8ef01b5f58216e35e74f03d066d95", "max_stars_repo_license...
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import algebra.order.archimedean import order.filter.at_top_bot /-! # `at_top` filter and archimedean (semi)rings/fields In this file we prove that...
{"author": "Mel-TunaRoll", "repo": "Lean-Mordell-Weil-Mel-Branch", "sha": "4db36f86423976aacd2c2968c4e45787fcd86b97", "save_path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch", "path": "github-repos/lean/Mel-TunaRoll-Lean-Mordell-Weil-Mel-Branch/Lean-Mordell-Weil-Mel-Branch-4db36f86423976aacd2c2968c4e4...
[STATEMENT] lemma Allowed_PLam [simp]: "Allowed (PLam I F) = (\<Inter>i \<in> I. lift i ` Allowed(F i))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Allowed (PLam I F) = (\<Inter>i\<in>I. lift i ` Allowed (F i)) [PROOF STEP] by (simp add: PLam_def)
{"llama_tokens": 115, "file": null, "length": 1}
# ---------------------------------------------------------------------------- # # # writeTecplot.jl # # Several functions to write Tecplot output # # λυτέος # Fall 2017 # # Max Opgenoord # # ---------------------------------------------------------------------------- # """ writeTecplot( flname::String, ...
{"hexsha": "6712d7536ac182bccf99343526002d349e35d563", "size": 5659, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/io/writeTecplotP1.jl", "max_stars_repo_name": "mopg/luteos.jl", "max_stars_repo_head_hexsha": "05b72e7ab6c905f55a768ae943ac3173dcf980ae", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from astropy import cosmology as cosmo import autofit as af from autofit.tools.phase import Dataset from autolens.pipeline.phase import abstract from autolens.pipeline.phase import extensions from autolens.pipeline.phase.dataset.result import Result import pickle class PhaseDataset(abstract.AbstractPhase): gala...
{"hexsha": "f4c1848664103686e4605635e97dca5726f216a1", "size": 5538, "ext": "py", "lang": "Python", "max_stars_repo_path": "autolens/pipeline/phase/dataset/phase.py", "max_stars_repo_name": "PyJedi/PyAutoLens", "max_stars_repo_head_hexsha": "bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7", "max_stars_repo_licenses": ["MIT"],...
import tensorflow as tf import tensorflow_datasets as tfds import math import numpy as np import matplotlib.pyplot as plt import logging tfds.disable_progress_bar() logger = tf.get_logger() logger.setLevel(logging.ERROR) # %% dataset, metadata = tfds.load("fashion_mnist", as_supervised=True, with_info=True) train_dat...
{"hexsha": "ee714d1f762a2d2d254d91c797807f13bd8c88d7", "size": 2969, "ext": "py", "lang": "Python", "max_stars_repo_path": "udacity/fashion_mnsit.py", "max_stars_repo_name": "mrdvince/tensorflowdevcert", "max_stars_repo_head_hexsha": "6300521c738b0a646a47627e9e8d656ed072cad3", "max_stars_repo_licenses": ["MIT"], "max_s...
function varargout = SaveFMFSettings(varargin) % SAVEFMFSETTINGS M-file for SaveFMFSettings.fig % SAVEFMFSETTINGS, by itself, creates a new SAVEFMFSETTINGS or raises the existing % singleton*. % % H = SAVEFMFSETTINGS returns the handle to a new SAVEFMFSETTINGS or the handle to % the existing singlet...
{"author": "kristinbranson", "repo": "JAABA", "sha": "5d778a23e3e7cf272df9a89a72b1b66d94f535d7", "save_path": "github-repos/MATLAB/kristinbranson-JAABA", "path": "github-repos/MATLAB/kristinbranson-JAABA/JAABA-5d778a23e3e7cf272df9a89a72b1b66d94f535d7/filehandling/SaveFMFSettings.m"}
[STATEMENT] lemma sub_lists_mono: "A \<subseteq> B \<Longrightarrow> x \<in> lists A \<Longrightarrow> x \<in> lists B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>A \<subseteq> B; x \<in> lists A\<rbrakk> \<Longrightarrow> x \<in> lists B [PROOF STEP] by auto
{"llama_tokens": 104, "file": "Combinatorics_Words_CoWBasic", "length": 1}
import os import glob import sys import cv2 from tqdm import tqdm from sklearn.model_selection import StratifiedKFold import numpy as np import gc def save_cfg(cfg:object) -> None: os.makedirs(os.path.join(cfg.save_path, cfg.save_dir), exist_ok=True) cfg_dict = vars(cfg) with open(os.path.join(cfg.save_pa...
{"hexsha": "29308250081135076c57920c53624cdd47b873b1", "size": 2617, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/preprocess/split.py", "max_stars_repo_name": "uoNuM/two-stream-gma", "max_stars_repo_head_hexsha": "c51d3990a75becd04a2c40c671cb9c522ff490ad", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python """ outline to create combination EUV/CHD maps using ML Algorithm 1. Select images 2. Apply pre-processing corrections a. Limb-Brightening b. Inter-Instrument Transformation 3. Coronal Hole Detection using ML Algorithm 4. Convert to Map 5. Combine Maps and Save to DB """ import os impor...
{"hexsha": "e7a2bfed5a57b5405648e5c14086d27a3dd28ee5", "size": 6317, "ext": "py", "lang": "Python", "max_stars_repo_path": "chmap/coronal_holes/ml_detect/examples/unsupervised_mapping_pipeline.py", "max_stars_repo_name": "predsci/CHD", "max_stars_repo_head_hexsha": "35f29d1b62861f4ffed57b38d18689b282664bcf", "max_stars...
\documentclass[12pt,a4paper]{article} \title{Vmotif: Efficient Searching of different classes of Biological Motifs in large datasets} \author{Diploma Thesis Topic; supervisor Stefan Kurtz} \begin{document} \maketitle \section{Kinds of motifs} \begin{enumerate} \item String motifs \item regular expressions \item PSSMs ...
{"hexsha": "f46edb787fe2c0d3e835a78100742c2333fe3922", "size": 2653, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/doc/dipl-vmotif.tex", "max_stars_repo_name": "gordon/vstree", "max_stars_repo_head_hexsha": "5f2835198eaa489432faf9fb47a802bc0f71b8ad", "max_stars_repo_licenses": ["ISC"], "max_stars_count": 2, ...
import numpy as np import timeit embeddings = np.genfromtxt("embeddings.txt", delimiter=',') def test(): embeddings1 = embeddings[0:1] embeddings2 = embeddings[1:10001] embeddings1 = embeddings1/np.linalg.norm(embeddings1, axis=1, keepdims=True) embeddings2 = embeddings2/np.linalg.norm(embeddings2, ...
{"hexsha": "ad248b95d16dc07a3a443ed2914c126c5dba8177", "size": 623, "ext": "py", "lang": "Python", "max_stars_repo_path": "python-module/numpy_test.py", "max_stars_repo_name": "pospielov/Linear-Algebra-in-Python-and-Java-Research", "max_stars_repo_head_hexsha": "833f22b510c65ec5059543e093e140b033173bda", "max_stars_rep...
import cv2 from pathlib import Path import face_alignment import numpy as np from PIL import Image import time face_detector = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_detector = cv2.CascadeClassifier('haarcascade_eye.xml') def timeit(func): def wrapper(*args,**kwargs): st = time.time() r...
{"hexsha": "8fcc628d99bbca1b88020f1e73caee1d95cbde94", "size": 3212, "ext": "py", "lang": "Python", "max_stars_repo_path": "crop-image.py", "max_stars_repo_name": "ramonus/first-order-model", "max_stars_repo_head_hexsha": "d7a85c1fc5592271d3f359e7d1bbf1bad8fc3384", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 29 18:20:38 2018 @author: Sebastijan Mrak <smrak@bu.edu> """ import h5py, os from numpy import where, isin, nan, arange, ones, isnan, isfinite, ndarray from numpy import array, mean, unique, hstack, vstack, ma, meshgrid, linspace from datetime impo...
{"hexsha": "c86a57ce78df37641835c0b397d3920c0d75d0e2", "size": 8726, "ext": "py", "lang": "Python", "max_stars_repo_path": "gpstec/gpstec.py", "max_stars_repo_name": "aldebaran1/gpstec", "max_stars_repo_head_hexsha": "e8d0e38d89a1399741a63c0aa1f8e5ccf7ada9ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
# Created by yingwen at 2019-03-10 import numpy as np from copy import deepcopy from collections import defaultdict, Counter from functools import partial from malib.agents.tabular.q_learning.base_q import QAgent, StationaryAgent import random class ROMMEOAgent(QAgent): def __init__( self, id_, ...
{"hexsha": "feafa8d28432261b7edee6d33edddac854c37534", "size": 7061, "ext": "py", "lang": "Python", "max_stars_repo_path": "malib/agents/tabular/q_learning/rommeo_q.py", "max_stars_repo_name": "wwxFromTju/malib", "max_stars_repo_head_hexsha": "7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2", "max_stars_repo_licenses": ["MIT"...
using DPC, Test @testset "All unit tests" begin @testset "YAML-loading tests" begin include("loading_tests.jl") end @testset "Functionality tests" begin include("running_tests.jl") end @testset "Other utility functions tests" begin include("utils_tests.jl") end end
{"hexsha": "7366fe71e6a0048052af6c57a6d14cbf08af8180", "size": 316, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "pnieters/DPC.jl", "max_stars_repo_head_hexsha": "0e630dd9dc3732c55c748e55f48a4f08d0021882", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
# MIT License # # Copyright (c) 2021- Pierre-Yves Taunay # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
{"hexsha": "b8cb584aeb47d906d2d262505d10f895b2975bd0", "size": 3258, "ext": "py", "lang": "Python", "max_stars_repo_path": "article/4_discussion/average_theoretical_constant.py", "max_stars_repo_name": "pytaunay/total-pressure-cathodes-controlling-mechanisms", "max_stars_repo_head_hexsha": "fa4889d70096efc16acfa23b0733...
import tensorflow as tf import numpy as np class ResidualNormalizationWrapper(tf.keras.layers.Wrapper): def __init__(self, layer, dropout_rate, *args, **kwargs): super().__init__(layer, *args, **kwargs) self.dropout_rate = dropout_rate self.layer_normalization = tf.keras.layers.LayerNormali...
{"hexsha": "4ef75b09de97335ca76206d6e1b186cf2ca6a768", "size": 11240, "ext": "py", "lang": "Python", "max_stars_repo_path": "net/text_transformer.py", "max_stars_repo_name": "lithium0003/Image2UTF8-Transformer", "max_stars_repo_head_hexsha": "2620af2a8bdaf332e25b39ce05d610e21e6492fc", "max_stars_repo_licenses": ["MIT"]...
import numpy as np class real_time_peak_detection(): def __init__(self, array, lag, threshold, influence): self.y = list(array) self.length = len(self.y) self.lag = lag self.threshold = threshold self.influence = influence self.signals = [0] * len(self.y) sel...
{"hexsha": "a59dbaaeb541fff508ec75c6ec58fe02efd8fd44", "size": 2117, "ext": "py", "lang": "Python", "max_stars_repo_path": "AnomalyDetection/thresholding_algo.py", "max_stars_repo_name": "NajmudheenCT/examples", "max_stars_repo_head_hexsha": "e538b07d28f5fccf70fa8f415f7d687359338208", "max_stars_repo_licenses": ["Apach...
""" run_yaml(filename::String) run_yaml(filenames::Array{String,1}) This file runs (a) yaml file(s) if it includes the line `Editable: true`. If given a list of input files, the function will print a list of yaml files that were not marked as editable. A file might not be "editable" if SLiDE functionality canno...
{"hexsha": "f4cf9dc8876a56a9e80b88d394b6ea6c86b17e74", "size": 6213, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/parse/run_yaml.jl", "max_stars_repo_name": "NREL/SLiDE", "max_stars_repo_head_hexsha": "6d14c997a383aa489efb36a3db9c11119e323d2e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
import itertools import warnings from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union import numpy as np import torch import pystiche from pystiche.enc import Encoder from pystiche.image.transforms import Transform, TransformMotifAffinely from pystiche.misc import build_deprecation_message,...
{"hexsha": "31c4db75f8ab461e7cd60810f4ccd058ef535608", "size": 13602, "ext": "py", "lang": "Python", "max_stars_repo_path": "pystiche/ops/comparison.py", "max_stars_repo_name": "jbueltemeier/pystiche", "max_stars_repo_head_hexsha": "0d0707121e63c4355303446e62a4894e86a7b763", "max_stars_repo_licenses": ["BSD-3-Clause"],...
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"hexsha": "fb6b28d9c282512caf3405d56a4321df9e2668dd", "size": 5151, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/xpu/test_tril_triu_op_xpu.py", "max_stars_repo_name": "DevilCarp/Paddle", "max_stars_repo_head_hexsha": "04325d2cbefb029a4478bdc069d3279cd566ac6a", "max_stars_r...
[STATEMENT] lemma merge_singleton_sucs: assumes "list_dtree (Node (root t1) (sucs t1))" and "sucs t1 \<noteq> {||}" shows "\<exists>t e. merge t1 = Node (root t1) {|(t,e)|}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<exists>t e. merge t1 = Node (dtree.root t1) {|(t, e)|} [PROOF STEP] unfolding merge_def [P...
{"llama_tokens": 828, "file": "Query_Optimization_IKKBZ", "length": 3}
# -*- coding: utf-8 -*- """Validation machine file IPMSM TOYOTA Prius 2004 interior magnet (V shape) with distributed winding 50 kW peak, 400 Nm peak at 1500 rpm from publication Z. Yang, M. Krishnamurthy and I. P. Brown, "Electromagnetic and vibrational characteristic of IPM over full torque-speed range," Electric Ma...
{"hexsha": "8471eb30c3cc1eeca1dc494a485133d849a80f0d", "size": 2593, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tests/Validation/Simulation/CEFC_Lam.py", "max_stars_repo_name": "IrakozeFD/pyleecan", "max_stars_repo_head_hexsha": "5a93bd98755d880176c1ce8ac90f36ca1b907055", "max_stars_repo_licenses": ["Apache...
import unittest import pydsm.composition as composition from pydsm import IndexMatrix import scipy.sparse as sp __author__ = 'jimmy' class TestLinear_additive(unittest.TestCase): def create_mat(self, list_, row2word=None, col2word=None): if row2word is None: row2word = self.row2word i...
{"hexsha": "84a492b6dbd9acf50074fdae54787eb6516f0685", "size": 1104, "ext": "py", "lang": "Python", "max_stars_repo_path": "pydsm/tests/test_composition.py", "max_stars_repo_name": "jimmycallin/pydsm", "max_stars_repo_head_hexsha": "3f8a6fc1492702dc265be09f8d60b1512c976f7f", "max_stars_repo_licenses": ["Apache-2.0"], "...
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Created by wuxinwang # import h5py import numpy as np import pandas as pd from .utils import check_leap_year, num2month def read_hy2b(file_path): """ This function is used to read wind speed and wind direction fom hy2b l2b file in hdf5 format. ...
{"hexsha": "2d6c15911dc354c787cc7a36dbb5d93b606e2dd4", "size": 2384, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/read_hy2b.py", "max_stars_repo_name": "wuxinwang1997/convert2littler", "max_stars_repo_head_hexsha": "14c5f133ddfd36985f6f83b9a3eed89e2caf68a5", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma map_iterator_key_filter_foldli_conv : "map_iterator_key_filter P (foldli kvs) = foldli (filter (\<lambda>(k, v). P k) kvs)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map_iterator_key_filter P (foldli kvs) = foldli (filter (\<lambda>(k, v). P k) kvs) [PROOF STEP] unfolding map_iterator_key_f...
{"llama_tokens": 224, "file": "Collections_Iterator_SetIteratorOperations", "length": 2}
program main use plantFEM implicit none type(FEMDomain_) :: dam real(real64) :: x(6),altitude(6) ! plantFEM用メッシュ生成スクリプト ! https://github.com/kazulagi/plantFEM ! メッシュの元となったデータ: ! 牧 隆泰, 1958, 日本水利施設進展の研究, 土木雑誌社 ! p. 212 亀越池(香川県綾歌郡長炭村) ! 以下、メッシュ分割プログラム ! 要素分割数 call d...
{"hexsha": "7676d4f681d223f7fb96f77110b1a2dfeda4774d", "size": 933, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "data/037_kagawa/\u4e80\u8d8a\u6c60/server.f90", "max_stars_repo_name": "kazulagi/earthdamjp", "max_stars_repo_head_hexsha": "bb2a23ea912615b4d9d637dfbc78b091c5f84cc5", "max_stars_repo_licenses": ...
import numpy as np def SGD(w, dw, lr, *wargs): # Stochastic Gradient descent w -= dw * lr return w, None def Rmsprop(x, dx, lr, config): """ Uses the RMSProp update rule, which uses a moving average of squared gradient values to set adaptive per-parameter learning rates. config...
{"hexsha": "37a12d8d5a6949080c89d993a7c38dba29ba341e", "size": 2578, "ext": "py", "lang": "Python", "max_stars_repo_path": "Algorithm/Nureal Network/FullyConnected/optim.py", "max_stars_repo_name": "sajjjadayobi/sadlearn", "max_stars_repo_head_hexsha": "8f6dba5960b09fcb01d09a1a0edfa96671d4300b", "max_stars_repo_license...
// Distributed under the MIT License. // See LICENSE.txt for details. #include "NumericalAlgorithms/Interpolation/BarycentricRationalSpanInterpolator.hpp" #include <boost/math/interpolators/barycentric_rational.hpp> #include <complex> #include <cstddef> #include "ErrorHandling/Assert.hpp" #include "Utilities/Gsl.hpp...
{"hexsha": "dcbb119b576a09e1ca7b626043ec49c33fd1114a", "size": 1344, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/NumericalAlgorithms/Interpolation/BarycentricRationalSpanInterpolator.cpp", "max_stars_repo_name": "tomwlodarczyk/spectre", "max_stars_repo_head_hexsha": "086aaee002f2f07eb812cf17b8e1ba54052feb7...
import numpy as np import pandas as pd import pytest from gretel_synthetics.utils import data as data_utils def _create_df(size: int) -> pd.DataFrame: return pd.DataFrame([{"foo": value} for value in np.random.randint(1, 10000, size)]) @pytest.mark.parametrize( "orig_size,target,count", [(1000, 800, 0)...
{"hexsha": "fafc04543b6c975ba37783956f2a8786d3651cc8", "size": 810, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/utils/test_data.py", "max_stars_repo_name": "em3ndez/gretel-synthetics", "max_stars_repo_head_hexsha": "7d9f433a741469860c6ec3aadf76da02036671c4", "max_stars_repo_licenses": ["Apache-2.0"], "...
% Script file: ode45_test1.m % % Purpose: % This program solves a differential equation of the % form dy/dt + 2 * y = 0, with the initial condition % y(0) = 1. % % Record of revisions: % Date Programmer Description of change % ==== ========== ===================== %...
{"author": "101Hub", "repo": "Matlab101", "sha": "07273f68f1147a110443aeb121fa10962234f298", "save_path": "github-repos/MATLAB/101Hub-Matlab101", "path": "github-repos/MATLAB/101Hub-Matlab101/Matlab101-07273f68f1147a110443aeb121fa10962234f298/assets/\u300aMatlab\u7f16\u7a0b\u300b\u6e90\u7801/chap7/ode45_test1.m"}
import logging as lg import time from collections import defaultdict import matplotlib.collections import matplotlib.colors import networkx import tabulate from eppy.bunch_subclass import EpBunch from tqdm import tqdm from archetypal.plot import save_and_show from archetypal.template.zonedefinition import is_core, re...
{"hexsha": "e8405d2a4d15e2d92622674ff177e8493e7b1c15", "size": 22826, "ext": "py", "lang": "Python", "max_stars_repo_path": "archetypal/zone_graph.py", "max_stars_repo_name": "samuelduchesne/archetypal", "max_stars_repo_head_hexsha": "4042971180320a6ed7fb8c51f709e227e7f90e94", "max_stars_repo_licenses": ["MIT"], "max_s...
""" Tests SparkML StringIndexer converter. """ import unittest from pyspark.ml.feature import VectorAssembler from onnxmltools import convert_sparkml from onnxmltools.convert.common.data_types import FloatTensorType from onnxmltools.utils import dump_data_and_sparkml_model from sparkml import SparkMlTestCase class Te...
{"hexsha": "16a993aa45d9137c30f2e364cb2d2e78c368df80", "size": 1591, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/sparkml/test_vector_assembler.py", "max_stars_repo_name": "Riponsayf/onnxmltools", "max_stars_repo_head_hexsha": "e2356b7c5cc239e14822c52afa2cf234054f2874", "max_stars_repo_licenses": ["MIT"...
from EM_init import * from EM import * from plotGMM import * from GMR import * from matplotlib import pyplot as plt import numpy as np class GMM_GMR(object): def __init__(self, numberOfStates): self.numbefOfStates = numberOfStates def fit(self, data): self.data = data Priors, Mu, Sigm...
{"hexsha": "25e9c1d42f5510c86fdcbe85bd829c01a1b8ec1a", "size": 2395, "ext": "py", "lang": "Python", "max_stars_repo_path": "GMM_GMR.py", "max_stars_repo_name": "BatyaGG/Trained-by-Demonstration-NAO-Robot-Controlled-via-a-BCI-system-for-Telepresence", "max_stars_repo_head_hexsha": "36c7c338c5969cff1f5f5281698b792ef5b163...
# =========================================================================== # Copyright 2015 Dublin City University # # This file is part of DREAM. # # DREAM is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Founda...
{"hexsha": "9733fde77b87bfcc63e87ffc50506292d9f66bb0", "size": 3397, "ext": "py", "lang": "Python", "max_stars_repo_path": "manpy/simulation/applications/DemandPlanning/GAoperators.py", "max_stars_repo_name": "datarevenue-berlin/manpy", "max_stars_repo_head_hexsha": "0056eb6e93cba3bf2a1061f9170aa2a1edf248f6", "max_star...
# connected component analysis of segmentation compared to ground truth import numpy as np from scipy import ndimage _thresh = 0.50 _smooth = 1 _LESION_UNC_VA = { 'bald': {'ymin': -304332.435036, 'ymax': -165.66824439, 'xmin': -287025.719183, 'xmax': -60.0155142638}, 'ent': {'ymin': -264211.01785, 'ymax': -12...
{"hexsha": "c1cc08af778309f1185821b0ecfe91b1a0bd2f91", "size": 13980, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/cca.py", "max_stars_repo_name": "thomaschristinck/detection_net", "max_stars_repo_head_hexsha": "c199abf9bd53b115a67e9e2c8da3da9894789f3e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# # Author: Tiberiu Boros # # Copyright (c) 2019 Adobe Systems Incorporated. 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....
{"hexsha": "c55a546c2e0a7291f253f09290dda2bf6782eba6", "size": 26029, "ext": "py", "lang": "Python", "max_stars_repo_path": "tripod/model.py", "max_stars_repo_name": "Shwetago/tripod", "max_stars_repo_head_hexsha": "633e78ce30266faa6ca85456597cba6b99ee8d99", "max_stars_repo_licenses": ["ECL-2.0", "Apache-2.0"], "max_st...
from __future__ import division from __future__ import print_function import time import argparse import numpy as np import os import torch import torch.optim as optim from data_split import * from models import * # Training settings parser = argparse.ArgumentParser() parser.add_argument('--use_cuda', action='store...
{"hexsha": "32b3fda987304c27d3a19540092256278488a0ef", "size": 8054, "ext": "py", "lang": "Python", "max_stars_repo_path": "incremental/pretrain.py", "max_stars_repo_name": "Zhen-Tan-dmml/GFCIL", "max_stars_repo_head_hexsha": "9b78210418711a795280c588f55aef63f7df5b3b", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np from scipy.stats import gaussian_kde import matplotlib import matplotlib.pyplot as plt import matplotlib.animation as animation from mpl_toolkits.mplot3d import Axes3D import datetime from sklearn.metrics import r2_score def abline(slope, intercept, ax, **kwargs): """Add a line to an existing p...
{"hexsha": "2f94c9c72544f2b6909d17f17ba9743a77fc81b3", "size": 10732, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting_utils.py", "max_stars_repo_name": "ti-vo/riming_detection_ML", "max_stars_repo_head_hexsha": "711c85271b8304861bcf238173ac805c1e2e98fd", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Basic classes for Elmitec LEEM ".dat"-file parsing and data visualization. """ # pylint: disable=missing-docstring # pylint: disable=invalid-name # pylint: disable=attribute-defined-outside-init # pylint: disable=all import bz2 import copy import glob import numbers import pickle import struct from datetime import...
{"hexsha": "24fcb188a45afed6d4a4606e3a96cfde9765b99c", "size": 28430, "ext": "py", "lang": "Python", "max_stars_repo_path": "uspy/leem/base_old.py", "max_stars_repo_name": "surf-sci-bc/uspy", "max_stars_repo_head_hexsha": "76af9bee19b3fdf3af431e77756e196284cdd7a1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import absolute_import, division, print_function import functools import glob import os from collections import defaultdict import numpy as np import seaborn as sns import tensorflow as tf from matplotlib import pyplot as plt from tqdm import tqdm from odin.bay.vi.autoencoder import VQVAE, RandomVari...
{"hexsha": "1cff36111c23cf74c6f582be516121471d376142", "size": 5956, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/vae/vq_vae_test.py", "max_stars_repo_name": "tirkarthi/odin-ai", "max_stars_repo_head_hexsha": "7900bef82ad8801d0c73880330d5b24d9ff7cd06", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
module CP_Exact include("../Misc.jl") using .Misc using Distributions, SpecialFunctions, Einsum, Combinatorics import Base.Iterators: product export generate, log_marginal function generate(I::Ƶ, J::Ƶ, K::Ƶ, R::Ƶ; μ::ℜ=3.5, γ::ℜ=0.1) where {ℜ<:Real, Ƶ<:Int} a::ℜ, b::ℜ = I*J*K*γ, γ/μ α_R, α_IR, α_JR, α_KR = ...
{"hexsha": "8fcb5365de17bdb3f1bd6e8ee1ae148939ea2339", "size": 3619, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/CP/CP_Exact.jl", "max_stars_repo_name": "mehmetburakkurutmaz/bam", "max_stars_repo_head_hexsha": "eb2583edf5037dec95d5a22d22f2dff7f00f4291", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
module LU ( luFactor, luFactorM ) where import Control.Monad( zipWithM_ ) import Control.Monad.ST( ST, runST ) import Numeric.LinearAlgebra import qualified Numeric.LinearAlgebra.Matrix as M import qualified Numeric.LinearAlgebra.Vector as V luFactor :: (BLAS3 e) => Matrix e -> Either Int (Matrix e, [Int]) luFactor...
{"hexsha": "83b6512b26b32debf1ebaa425eaa01690bd12ad8", "size": 2412, "ext": "hs", "lang": "Haskell", "max_stars_repo_path": "examples/LU.hs", "max_stars_repo_name": "patperry/hs-linear-algebra", "max_stars_repo_head_hexsha": "887939175e03687b12eabe2fce5904b494242a1a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
abstract FieldVector{T} <: StaticVector{T} # Is this a good idea?? Should people just define constructors that accept tuples? @inline (::Type{FV}){FV<:FieldVector}(x::Tuple) = FV(x...) @pure size{FV<:FieldVector}(::Union{FV,Type{FV}}) = (length(FV.types),) @pure length{FV<:FieldVector}(::Union{FV,Type{FV}}) = length(...
{"hexsha": "71d286038b4e8793f982d7027d470a6b2a2c68ef", "size": 733, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/FieldVector.jl", "max_stars_repo_name": "JuliaPackageMirrors/StaticArrays.jl", "max_stars_repo_head_hexsha": "c453f137c163fa435659b263d8af8e6f87f07d42", "max_stars_repo_licenses": ["MIT"], "max_...
""" Tests for module multianalysis.""" import pytest from pytest import approx import scaling as sca import multianalysis as ma import numpy as np import pandas as pd import scipy.spatial.distance as dist import scipy.cluster.hierarchy as hier import metabolinks as mtl # Tests for dist_discrim def reading_MetAna_f...
{"hexsha": "6d57a54acf52f888a13854f84b927edaeb85c410", "size": 1880, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_multianalysis.py", "max_stars_repo_name": "aeferreira/similarity_share", "max_stars_repo_head_hexsha": "a29e3d7982f1c2f0e93433d92e55b467f9433d76", "max_stars_repo_licenses": ["MIT"], "max_sta...
import timeit from concurrent.futures import ThreadPoolExecutor import struct from sys import argv import pygame import wave import numpy as np import pyaudio import sys import os import time import select import random SCRIPT_DIR=os.path.dirname(__file__) sys.path.append(SCRIPT_DIR + "/../pyAudioAnalysis") from pyAudi...
{"hexsha": "f44e1855462d2a3504382dfbddef8737f9126516", "size": 7784, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/voiceRecorder.py", "max_stars_repo_name": "belkinsky/SFXbot", "max_stars_repo_head_hexsha": "f0e4554afb9be4d3a018388620a10f26069704ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
from pathlib import Path import sys path = str(Path(Path(__file__).parent.absolute()).parent.absolute()) sys.path.insert(0, path) from mnist_utils.util import _x, _y_int from sklearn.cluster import MeanShift, estimate_bandwidth from sklearn.metrics import accuracy_score, adjusted_rand_score import numpy as np from tabu...
{"hexsha": "028899d9b9362d805eaaf995d8d5b6ab5fdb0574", "size": 2143, "ext": "py", "lang": "Python", "max_stars_repo_path": "unsupervised_learning/mean_shift.py", "max_stars_repo_name": "toorajtaraz/computational_intelligence_mini_projects", "max_stars_repo_head_hexsha": "79d1782c3b61ee15ac01dcf377bdc369962adb18", "max_...
import copy import random from abc import ABC, abstractmethod from typing import Dict, List import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from ray import tune import memory as mem import model device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") clas...
{"hexsha": "96e2eb3f05d633fb66f4c0d70d098a8c04e418f9", "size": 17986, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents.py", "max_stars_repo_name": "VitaliKaiser/udacity_drl_p1_navigation", "max_stars_repo_head_hexsha": "dc647560d219c12363f25d58cdd3b8ee63447bc7", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma pr_iso_same_no_nodes: "is_pr_iso \<phi> Fs\<^sub>1 Fs\<^sub>2 \<Longrightarrow> card(\<Union>F\<in>set Fs\<^sub>1. set F) = card(\<Union>F\<in>set Fs\<^sub>2. set F)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. is_pr_iso \<phi> Fs\<^sub>1 Fs\<^sub>2 \<Longrightarrow> card (\<Union> (set ` set ...
{"llama_tokens": 193, "file": "Flyspeck-Tame_PlaneGraphIso", "length": 1}
% explore balloon model stability clear all close all clc xg1 = [-5:0.2:5]; xg2 = xg1; n = length(xg1); lm = zeros(n,n); kas = [-4:0.2:4]; kaf = [-3:0.2:3]; try load demo_stability_hrf.mat % get max eigenvalue P = [0;0;0;0;0;0]; for i=1:n for j=1:n J = VBA_numericDiff(@f_HRF,1,[x...
{"author": "MBB-team", "repo": "VBA-toolbox", "sha": "01ff63f43ef7a6473bc5e3f28dd9ffa58fcfb414", "save_path": "github-repos/MATLAB/MBB-team-VBA-toolbox", "path": "github-repos/MATLAB/MBB-team-VBA-toolbox/VBA-toolbox-01ff63f43ef7a6473bc5e3f28dd9ffa58fcfb414/demos/4_neural/demo_stability_HRF.m"}
// Copyright (c) Prevail Verifier contributors. // SPDX-License-Identifier: MIT #include <iostream> #include <vector> #include <boost/functional/hash.hpp> #include "CLI11.hpp" #include "ebpf_verifier.hpp" #ifdef _WIN32 #include "memsize_windows.hpp" #else #include "memsize_linux.hpp" #endif #include "linux_verifier....
{"hexsha": "c0489ccf6c51a8d212e1a9b9fc03a4d82079996a", "size": 6647, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/main/check.cpp", "max_stars_repo_name": "caballa/ebpf-verifier", "max_stars_repo_head_hexsha": "204cbf009df0528ae5bee4ca7f84ee94a23d911b", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "max_...
from Utils.Data.DataStats import get_max_user_id, get_max_tweet_id from Utils.Data.Dictionary.TweetBasicFeaturesDictArray import LinksTweetBasicFeatureDictArray from Utils.Data.Sparse.CSR_SparseMatrix import CSR_SparseMatrix import pandas as pd import RootPath import numpy as np import scipy.sparse as sps import time i...
{"hexsha": "09622978935d5122ab4e5c6977e2fadf83169bf9", "size": 2214, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/Data/Sparse/CSR/LinkMatrix.py", "max_stars_repo_name": "MaurizioFD/recsys-challenge-2020-twitter", "max_stars_repo_head_hexsha": "95dc024fb4f8777aa62e1304536daece640428de", "max_stars_repo_l...
# -*- coding: utf-8 -*- """ Created on Fri Feb 12 04:11:31 2021 @author: samay """ import numpy as np import pandas as pd import re import nltk from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_select...
{"hexsha": "83600d5494e29d184b4be28a4347c9adfd732769", "size": 1769, "ext": "py", "lang": "Python", "max_stars_repo_path": "Execute.py", "max_stars_repo_name": "supersamdam/ConversationalAI", "max_stars_repo_head_hexsha": "bb6013c33f6332aee57abbae310577c056c6fdc1", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
\section{Approach} In this section we will describe our approach to the project, starting with the development methodology as described in Section 4.1. In Section 4.2 we present a broad overview of our system design. The programming languages and tools we will use for the project are specified in Sections 4.3 and 4.4 r...
{"hexsha": "8953e05f4f2b7a2cfb866d551e118b9fc539b77b", "size": 17033, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SE deliverables/research report/report/sections/approach.tex", "max_stars_repo_name": "HansSchouten/Aircraft-Trajectories", "max_stars_repo_head_hexsha": "5c301b806b5377813c140308a2b363ce2fb68304",...
import numpy as np from sklearn.cluster import KMeans from pruned_layers import * import torch.nn as nn import heapq device = 'cuda' if torch.cuda.is_available() else 'cpu' def _huffman_coding_per_layer(weight, centers): """ Huffman coding for each layer :param weight: weight parameter of the current lay...
{"hexsha": "830b42bc4cadff5bd1de8c438cf4382109c2755f", "size": 6763, "ext": "py", "lang": "Python", "max_stars_repo_path": "huffman_coding-Copy2.py", "max_stars_repo_name": "InnocentK/DNN-Compression-Practice", "max_stars_repo_head_hexsha": "2a439ce0593f9cb429ecea71929a2434eb0e4f97", "max_stars_repo_licenses": ["MIT"],...
# dict = default_theme(nothing, Axis2D) # print_rec(STDOUT, dict) const Axis2D_attr_desc = Dict( :frame => "See the detailed descriptions for `frame` attributes.", :grid => "See the detailed descriptions for `grid` attributes.", :names => "See the detailed descriptions for `names` attributes.", :ticks...
{"hexsha": "b6c7a50293a4e11606755a8c9b791e5f33e28085", "size": 2926, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Axis2D_attr_desc.jl", "max_stars_repo_name": "pauljurczak/MakieGallery.jl", "max_stars_repo_head_hexsha": "3ba5534180d2314729aeb5a7d2d6a7afa1ffcdff", "max_stars_repo_licenses": ["MIT"], "max_st...
# Author: Zhaoyi Hou (Joey), Yifei Ning (Couson) # Last Update: 3/18/2022 import torch import torch.nn as nn import re import numpy as np import pandas as pd from tqdm import tqdm from sklearn.utils.class_weight import compute_class_weight from sklearn.pipeline import Pipeline, FeatureUnion from sklearn.compose impor...
{"hexsha": "f11c0a25a464c2955716d7ec2cf618a7f605ccf0", "size": 5565, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "acl-2022-towards-comprehensive/acl-2022-camera-ready", "max_stars_repo_head_hexsha": "326abe9113e33245b19d4005423516ab22adcee4", "max_stars_repo_licenses": [...
lemma tan_square_eq_1D: assumes "tan (z :: complex) ^ 2 = 1" shows "(\<exists>n. z = of_real ((of_int n + 1 / 2) * pi / 2))" proof - from assms have "sin z ^ 2 = cos z ^ 2" "cos z \<noteq> 0" by (auto simp: tan_def field_simps) note this(1) also have "cos z ^ 2 = 1 - sin z ^ 2" by (simp add: cos_squar...
{"author": "pruvisto", "repo": "Hermite_Lindemann", "sha": "fd5a3e09209f0f1a98d1e5e70d27d4a00c19af2e", "save_path": "github-repos/isabelle/pruvisto-Hermite_Lindemann", "path": "github-repos/isabelle/pruvisto-Hermite_Lindemann/Hermite_Lindemann-fd5a3e09209f0f1a98d1e5e70d27d4a00c19af2e/Apocrypha.thy"}
import astropy.units as u import pytest from benchmark import Benchmark, benchmark @benchmark( { "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, "log.initial.system.TotAngMom": { "value": 1.227033e42, ...
{"hexsha": "a871c3013052b422929f6c432010d7aecb819db5", "size": 20374, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/ForceEccObl/test_ForceEccObl.py", "max_stars_repo_name": "jrlivesey/vplanet", "max_stars_repo_head_hexsha": "4384221baa78e81d46b0c0fcb7de2f5a5de2e83c", "max_stars_repo_licenses": ["MIT"], "...
import h5py import numpy as np import argparse import json import os import sys from tqdm import tqdm def examine_index_file(original_index, image_to_index): if os.path.exists(original_index): with open(original_index, "r") as f: original = json.load(f) original_id = original.keys...
{"hexsha": "810cac3185918a7562a294c3ed09387f533171f2", "size": 3138, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/visualsrl_imgfeat/examine_h5py.py", "max_stars_repo_name": "heshanxiu/lxmert_visualsrl", "max_stars_repo_head_hexsha": "e5a56f873573301e9947a80fb9dd30615d1b419e", "max_stars_repo_licenses": [...
# coding: utf-8 # # Exploratory data analysis of Titanic dataset # ## IPython magics # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') # ## Imports # In[2]: import importlib import os import time import re import warnings import numpy as np import pandas as pd import stat...
{"hexsha": "04039d527ed7fce92cb34e6b3de1cc1d52575ca3", "size": 12416, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/01_exploratory_data_analysis.py", "max_stars_repo_name": "alvaromendoza/pytanic", "max_stars_repo_head_hexsha": "4c837794625d788998ad8b24c37044d90c06b896", "max_stars_repo_licenses": ["...
# read_mesa.py # Reads mesa's History file into a pandas table import sys import os import string import numpy as np import pandas as pd from astropy.io import ascii from astropy.io import fits def read_history(file_loc): """Uses the translate file to produce a catalog with the appropriate filters Parameter...
{"hexsha": "2bc8fb57e4176954c9d61b85da5abf2168cebe57", "size": 630, "ext": "py", "lang": "Python", "max_stars_repo_path": "courses/stars/ps1/read_mesa.py", "max_stars_repo_name": "brianlorenz/code", "max_stars_repo_head_hexsha": "e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from matplotlib import pyplot as plt import pandas as pd import numpy as np from pykalman import KalmanFilter from ..types.zscore import zScore from ..types.position import Position from ..types.exponential_moving_average import expMovingAverage class pairsTrader(): """ A class that backtests a mean-revertin...
{"hexsha": "b67cdad09fd4411cdcc3a45394198a0e6ba5821c", "size": 12240, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lib/strategies/pairs.py", "max_stars_repo_name": "DylanScotney/cryptocurrency_backtesting", "max_stars_repo_head_hexsha": "268931ad24f90df676193b15b8bfaa791de616d8", "max_stars_repo_licenses": ["...
import torch.utils.data as tdata import pytorch_lightning as pl import skimage.io import cv2 import numpy as np from pathlib import Path from deepattention.ats_layer import AttentionModelColonCancer, FeatureModelColonCancer, ClassificationHead, ATSModel from deepattention.ats_layer import MultinomialEntropy from torchv...
{"hexsha": "d0cf719548ed33c10d3f26d06d0caf41d877fad1", "size": 6539, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepattention/deep_attention.py", "max_stars_repo_name": "arroqc/pandacancer_kaggle", "max_stars_repo_head_hexsha": "a6945dcac041dac744570d61ee630ee6f32e7117", "max_stars_repo_licenses": ["MIT"], ...
""" tophat(img; dims=coords_spatial(img), r=1) tophat(img, se) Performs morphological top-hat transform for given image, i.e., `img - opening(img, se)`. $(_docstring_se) This _white_ top-hat transform can be used to extract small white elements and details from an image. To extract black details, the _black_...
{"hexsha": "36d45baeed2e15ab23801476df38738451d1df45", "size": 1711, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/ops/tophat.jl", "max_stars_repo_name": "ThomasRetornaz/ImageMorphology.jl", "max_stars_repo_head_hexsha": "3181b69eab153fec9eeb0eaa55e97000252fa895", "max_stars_repo_licenses": ["MIT"], "max_st...
### A Pluto.jl notebook ### # v0.14.1 using Markdown using InteractiveUtils # ╔═╡ e1a58fce-68e7-11eb-28e0-1dfcb1dd2da9 begin push!(LOAD_PATH, "../../../../Julia/Julia_Projects/02_modules/") using Letters end # ╔═╡ eb6d37b4-68e7-11eb-2edb-75552408475d begin push!(LOAD_PATH, "../../../../Julia/Julia_Projects/02_mod...
{"hexsha": "35befb661ddff987ece01f1dbcb21e3f36e2f018", "size": 2348, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia_Investigation/julia_explore_p10_modules.jl", "max_stars_repo_name": "pascal-p/julia-notebooks", "max_stars_repo_head_hexsha": "568c884c8b0de8ce34a84e8d1ce5fb6994cf32b8", "max_stars_repo_licen...
module HOODESolver include("interface.jl") export HOODEProblem, HOODEInterpolation, AbstractHOODESolution, HOODESolution export solve, getexactsol end # module
{"hexsha": "4ef346ee4a2f9766b37a81b8a6a22a3f92f5bedd", "size": 160, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/HOODESolver.jl", "max_stars_repo_name": "crouseilles/HOODESolver.jl", "max_stars_repo_head_hexsha": "c9087aaf35b7469839a47131c63489759e9da69e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
""" Created on 22. apr. 2015 @author: pab References ---------- A METHODOLOGY FOR ROBUST OPTIMIZATION OF LOW-THRUST TRAJECTORIES IN MULTI-BODY ENVIRONMENTS Gregory Lantoine (2010) Phd thesis, Georgia Institute of Technology USING MULTICOMPLEX VARIABLES FOR AUTOMATIC COMPUTATION OF HIGH-ORDER DERIVATIVES Gregory Lant...
{"hexsha": "8141ab6212ca5f16198c7617c3a63db13e8cf82e", "size": 10033, "ext": "py", "lang": "Python", "max_stars_repo_path": "bumps/numdifftools/multicomplex.py", "max_stars_repo_name": "cyankaet/bumps", "max_stars_repo_head_hexsha": "427d077fd95f2d9a09eeb8677d045547061cff42", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Author: Bas Cornelissen # Copyright © 2020 Bas Cornelissen # License: MIT # ----------------------------------------------------------------------------- """ Features ======== This module contains functions that e...
{"hexsha": "901ff50c81ef5c43a346e25ffadd13695a5b2359", "size": 5119, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/features.py", "max_stars_repo_name": "bacor/ISMIR2020", "max_stars_repo_head_hexsha": "ab3edb742a718fe5c3fd40550c54f104fe9b6078", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max...
import numpy as np from keras.models import Model from keras.layers import * from keras import backend as K from keras.regularizers import l2 from models import interfaces from tensorflow.keras.optimizers import SGD WEIGHT_DECAY = 0.5 * 0.0005 class SGDTorch(SGD): @interfaces.legacy_get_updates_sup...
{"hexsha": "4f65cbe644e1d2535702b57548c5c217c9fff28a", "size": 5888, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/wide_residual_network.py", "max_stars_repo_name": "yaldashbz/AnomalyDetectionTransformations", "max_stars_repo_head_hexsha": "bde192c25e04c60f359729d4f5bfbb52bfe32301", "max_stars_repo_lice...
import numpy as np import logging limit = 100000 # Looger logger_name = 'efficiency of proposed norm' logger = logging.getLogger(logger_name) logger.setLevel(logging.DEBUG) fh = logging.FileHandler(logger_name + '.log') fh.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s -...
{"hexsha": "c557f5c26f4f1ba18573e489023e5f0a07e2e4dd", "size": 1310, "ext": "py", "lang": "Python", "max_stars_repo_path": "Images and auxiliar graphics/efficiency.py", "max_stars_repo_name": "MGijon/Master-s-thesis", "max_stars_repo_head_hexsha": "187bcca34a8c72c21fd78ca1684ae1a661c76961", "max_stars_repo_licenses": [...
"""Utility functions.""" import numpy as np from scipy import sparse def sparse_iter_rows(mat): """Iterate over csr_matrix rows (as slices).""" for row in range(mat.shape[0]): start, stop = mat.indptr[row:row + 2] if stop > start: yield row, slice(start, stop) def sparse_row_ind...
{"hexsha": "4097e13188cb1e3bd8b76d46f94bf57a3256d541", "size": 2686, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ptfidf/utils.py", "max_stars_repo_name": "mossadnik/probabilistic-tf-idf", "max_stars_repo_head_hexsha": "6c0629862285ffe773c2d242e5c5a166c271e193", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- import unittest from unittest import mock from unittest.mock import patch import os from io import StringIO, BytesIO import numpy as np import h5py from test_data import * from ribopy import create from ribopy.core.coverage import find_coverage from ribopy.core.metagene import find_site_covera...
{"hexsha": "416e510b95277da3b8c9115b324167f002289fdd", "size": 6473, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/other/metagene_test.py", "max_stars_repo_name": "himanshur-dev/ribopy", "max_stars_repo_head_hexsha": "78846e4140a7aa7b4dc995f39606577efaaf0831", "max_stars_repo_licenses": ["MIT"], "max_sta...
import ase.db from ase.io import read, write import warnings import numpy import matplotlib.pyplot as plt from ase.data import covalent_radii from scipy.stats import linregress import os, os.path from scipy.constants import pi, epsilon_0 import csv from glob import glob def get_thick(atom_row): pos = atom_row.pos...
{"hexsha": "ae56dd24ea97669ea5f4788f5a1c3e122614e127", "size": 6793, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/VASP_HSE/epfl_data.py", "max_stars_repo_name": "lovaulonze/paper.2D_dielectric", "max_stars_repo_head_hexsha": "df6718840e74807a7ea3a969cd7d88bcbdac9284", "max_stars_repo_licenses": ["MIT"], "...
import nibabel as nib import numpy as np from scipy import stats from numpy import ma import scipy.special as special from statsmodels.stats import multitest import itertools import os from os.path import join as opj # from nipype.interfaces import afni import nibabel as nib import json import numpy as np import matchi...
{"hexsha": "2fb570f4a838226b1df41f6cce169687845e735f", "size": 18191, "ext": "py", "lang": "Python", "max_stars_repo_path": "hypothesisTest.py", "max_stars_repo_name": "varun-invent/ABIDE_Connectome_study", "max_stars_repo_head_hexsha": "27f3d258d43cbfb6f53b60ac17d98caa481c5837", "max_stars_repo_licenses": ["Apache-2.0...
import os.path as osp import pickle import sys import zarr from deepv2d.utils.timer import Timer sys.path.append('deepv2d') import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tqdm import tqdm, trange import cv2 import os import time import argparse import glob from deepv2d import vis fr...
{"hexsha": "1cb87dfd2195a6ff22f5f40b12edbfa117114f2d", "size": 6779, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluation/eval_scannet.py", "max_stars_repo_name": "f-sky/DeepV2D", "max_stars_repo_head_hexsha": "5c1c6f58ee359d045a7efd5161445ea87d83bdbe", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
import os import numpy as np import matplotlib.pyplot as pyplot import mdtraj as md from simtk import unit from cg_openmm.cg_model.cgmodel import CGModel import pickle from analyze_foldamers.parameters.bond_distributions import * # This script creates bond length distribution plots for a given trajectory and ...
{"hexsha": "312730c8bedecf49de63ee49bcc52e74873e115a", "size": 548, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/angle_distributions/new_angle_distributions/calc_bond_distributions.py", "max_stars_repo_name": "shirtsgroup/analyze_foldamers", "max_stars_repo_head_hexsha": "17a7b948d1d0d4fbfb1d84d58753...
from flask import Flask, jsonify, request from numpy import argmax, bincount from xgboost import XGBClassifier from utils import decode_output, order_params, parse_json app = Flask(__name__) xgb = XGBClassifier() xgb.load_model('xgb.dat') @app.route('/', methods=['GET']) def greeting(): return 'Hello, try sendi...
{"hexsha": "36f21b9be53d334deef969415275f10f1d3615f2", "size": 692, "ext": "py", "lang": "Python", "max_stars_repo_path": "transportation_mode/server.py", "max_stars_repo_name": "ogi02/CovidTracker", "max_stars_repo_head_hexsha": "0f9805e5017a9bae5ce1c9959cdf6d3c39fb80e7", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Statistical significance utils. This is an adaptation of Philipp Stinger's implementation of the Steiger's (1980) test available here: https://github.com/psinger/CorrelationStats/blob/master/corrstats.py """ import numpy as np from scipy import stats __all__ = ('steiger_test_pval') # pylint: disable=C0103 def st...
{"hexsha": "b2dd25b27c8d8156f80c4920cf99d3a809569f3e", "size": 1082, "ext": "py", "lang": "Python", "max_stars_repo_path": "embeddix/utils/stats.py", "max_stars_repo_name": "akb89/embedix", "max_stars_repo_head_hexsha": "de453a0c2a60c7b83ae5122cdefd487b2a799dd5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from numpy import add, isscalar, asarray, arange from scipy.integrate.quadrature import tupleset def RombergMethod(y, dx, show=False): axis=-1 y = asarray(y) nd = len(y.shape) Nsamps = y.shape[axis] Ninterv = Nsam...
{"hexsha": "958ca9943b42205aa6b003c79431115bb372935d", "size": 1619, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main.py", "max_stars_repo_name": "ddetoni/RombergMethod", "max_stars_repo_head_hexsha": "fe0295f870485d674cfa10d2dcf4fcb0f48a0361", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
% SPDX-License-Identifier: MIT % Copyright (c) 2017-2020 Forschungszentrum Juelich GmbH % This code is licensed under MIT license (see the LICENSE file for details) % \part{Examples} \makepart \section{Features} \selectlanguage{english} \begin{frame} \frametitle{\LaTeX{}-Beamer Features} The following s...
{"hexsha": "1cdb2a15a4635fe8eb3bbbd452012120321a86dc", "size": 6125, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tutorial/part_examples.tex", "max_stars_repo_name": "SFKV/Hackathon-Talks", "max_stars_repo_head_hexsha": "ca7040b8877e934ad030bd5d29fa7d449120706c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : visual.py # Author : Chi Han, Jiayuan Mao # Email : haanchi@gmail.com, maojiayuan@gmail.com # Date : 24.07.2019 # Last Modified Date: 24.08.2019 # Last Modified By : Chi Han, Jiayuan Mao # # This file is part of th...
{"hexsha": "7d3eed0ea2b728075f21aefee2ff8422b5c874f2", "size": 4570, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/question_dataset/build_questions/visual.py", "max_stars_repo_name": "Glaciohound/VCML", "max_stars_repo_head_hexsha": "5a0f01a0baba238cef2f63131fccd412e3d7822b", "max_stars_repo_licenses":...
""" messenger-data-analysis parses through, and analyzes, Facebook Messenger** data dumps for both quantitative information and textual analysis. ** not associated, authorized, or endorsed by Facebook. Software and related trademarks regarding Messenger are owned by Facebook """ import os import math from datetime ...
{"hexsha": "6710a8b8cc0fde7f7137b979529718eb21426c9f", "size": 9640, "ext": "py", "lang": "Python", "max_stars_repo_path": "analyze.py", "max_stars_repo_name": "SirajChokshi/messenger-data-analysis", "max_stars_repo_head_hexsha": "42ffe91ed34d5fc5d7df3c02f3f1d7e3b1419a4b", "max_stars_repo_licenses": ["CNRI-Python"], "m...
# Import import cv2 import sys import random import numpy as np # Globals WIDTH = 600 # Display Resolution Width HEIGHT = 600 # Display Resolution Height UNIT_BLOCK = 20 # Grid Size PAUSE_TIME = 250 # Initial Pause Time MIN_TIME = 125 # Minimum Wait Time INC_LEVEL = 5 # Increment Level SNAKE_LENGTH = 1...
{"hexsha": "f7413909ddf82204b8539d01f5a5db72be3a4813", "size": 684, "ext": "py", "lang": "Python", "max_stars_repo_path": "init.py", "max_stars_repo_name": "kdkvcm/Py_Snake_Game", "max_stars_repo_head_hexsha": "96c7a6b7ca9175eb7ca719d0f7f99fca8d032171", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
[STATEMENT] lemma awalk_cyc_decomp_has_prop: assumes "awalk u p v" and "\<not>distinct (awalk_verts u p)" shows "is_awalk_cyc_decomp p (awalk_cyc_decomp p)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. is_awalk_cyc_decomp p (awalk_cyc_decomp p) [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal):...
{"llama_tokens": 1074, "file": "Graph_Theory_Arc_Walk", "length": 11}
import tensorflow as tf import numpy as np from ionotomo.settings import TFSettings from ionotomo import * from ionotomo.ionosphere.iri import a_priori_model from ionotomo.tomography.interpolation import RegularGridInterpolator ufrom ionotomo.tomography.linear_operators import TECForwardEquation import astropy.coordina...
{"hexsha": "9f584a7f02978fe5b8501eb1364f61be3d9fd432", "size": 5815, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/ionotomo/tomography/newton-solver.py", "max_stars_repo_name": "Joshuaalbert/IonoTomo", "max_stars_repo_head_hexsha": "9f50fbac698d43a824dd098d76dce93504c7b879", "max_stars_repo_licenses": ["Ap...
import numpy as np import cv2 import os def _gaussian_kernel(sigma=1.0, kernel_size=None): ''' Returns gaussian kernel if sigma > 0.0, otherwise dot kernel. ''' if sigma <= 0.0: return np.array([[0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 0.0]...
{"hexsha": "45912c5b9ab223844e953e6c4d79961922be2c1e", "size": 3746, "ext": "py", "lang": "Python", "max_stars_repo_path": "util.py", "max_stars_repo_name": "Jimbo51000/bsdr", "max_stars_repo_head_hexsha": "853efbce2f6bdead7c990e1eb1fcc1f0a25a2102", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
[STATEMENT] lemma groupF_empty: "groupF f xs \<noteq> [] \<longleftrightarrow> xs \<noteq> []" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (groupF f xs \<noteq> []) = (xs \<noteq> []) [PROOF STEP] by(induction f xs rule: groupF.induct) auto
{"llama_tokens": 101, "file": "Simple_Firewall_Common_GroupF", "length": 1}
#include "sqlite_wrapper.hpp" #include <fstream> #include <iomanip> #include <memory> #include <string> #include <vector> #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/trim.hpp> #include "constant_mappings.hpp" #include "sql/sql_pipeline.hpp" #include "sql/sql_pipeline_builder.hpp" #in...
{"hexsha": "b1f6cff2d9bba2b647c99c81417445627fb03333", "size": 13514, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/lib/utils/sqlite_wrapper.cpp", "max_stars_repo_name": "mrcl-tst/hyrise", "max_stars_repo_head_hexsha": "eec50b39de9f530b0a1732ceb5822b7222f3fe17", "max_stars_repo_licenses": ["MIT"], "max_stars...