text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Multiple single neuron examples derived from the Prinz et al STG model. # To try some of the other neuron variants, redefine the `channels` vector, using any of the # additional commented out parameters listed below. Then re-run the neuron constructor, # simulation, solve and plot as before. using Conductor, Ordinar...
{"hexsha": "8bba090e6cdb516c1b3ffad55804e8441c32da3c", "size": 5292, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "demo/STGneuron.jl", "max_stars_repo_name": "ChrisRackauckas/Conductor.jl", "max_stars_repo_head_hexsha": "0f30101177ab1297600fad430b97f0cd965fe1d7", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import pandas as pd import numpy as np import skimage from skimage.filters import threshold_otsu from skimage.transform import (hough_line, hough_line_peaks, probabilistic_hough_line) def bin_frame(data, bins, corr_mat=None): """Bin a single GeRM frame to Energy/ADU vs channel spect...
{"hexsha": "e5fa4399c093155482a8b71040d5bc9686c65c55", "size": 4303, "ext": "py", "lang": "Python", "max_stars_repo_path": "pygerm/reduction.py", "max_stars_repo_name": "NSLS-II/GeRM", "max_stars_repo_head_hexsha": "b9251d171ca768b6a1a8d6af774afe5c670b6661", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import numpy as np import beluga.utils.numerical_derivatives.finite_diff import math import numba from numba import njit, float64, complex128, types, errors from numba.unsafe.ndarray import to_fixed_tuple import logging import inspect def gen_csd(func, deriv_order=None, step_size=1e-6, complex_arg=False): if max...
{"hexsha": "17115021da009ffad07d8a835c80259183b1f6f0", "size": 4512, "ext": "py", "lang": "Python", "max_stars_repo_path": "beluga/utils/numerical_derivatives/complex_step.py", "max_stars_repo_name": "dHannasch/beluga", "max_stars_repo_head_hexsha": "519e1ca2a43a86bc47737c45484288b2bacc1338", "max_stars_repo_licenses":...
program main use plantFEM implicit none real(real64),parameter :: dt = 0.010d0 type(Random_) :: random type(IO_) :: f,z type(Math_) :: Math integer(int32) :: i complex(kind(0d0) ),allocatable :: wave(:),spectre(:) wave = zeros(4096) do i=1, size(wave) wave(i) = ran...
{"hexsha": "af489561248e1fb086c87f96a359f66ec683d456", "size": 761, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Tutorial/std/simpleFFT.f90", "max_stars_repo_name": "kazulagi/plantFEM", "max_stars_repo_head_hexsha": "20bf2df8202d41aa5dc25d1cc820385dabbc604f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from imutils.video import VideoStream import time import cv2 as cv import picamera import imutils import argparse import numpy as np from collections import deque from grip import GripPipeline from FilterG2s import FilterG2s from G2Class import G2Class class PipelineWrapper: def __init__(self,image): se...
{"hexsha": "097b497d42dd48e77458d09c2a8b2b5b7ac2be20", "size": 2686, "ext": "py", "lang": "Python", "max_stars_repo_path": "jacobDev/pi/VisionProcessingv1/VisionProcessingv1.py", "max_stars_repo_name": "char3176/Vision2020_code", "max_stars_repo_head_hexsha": "610ea826bb82c28a79f77fc09f89f0ee1d6d0fe9", "max_stars_repo_...
(* infotheo: information theory and error-correcting codes in Coq *) (* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *) From mathcomp Require Import all_ssreflect ssralg fingroup finalg perm zmodp. From mathcomp Require Import matrix. From mathcomp Require Import Rstruct. R...
{"author": "affeldt-aist", "repo": "infotheo", "sha": "5f9efb859dbadcbcae2330e2e21e76f9b632d879", "save_path": "github-repos/coq/affeldt-aist-infotheo", "path": "github-repos/coq/affeldt-aist-infotheo/infotheo-5f9efb859dbadcbcae2330e2e21e76f9b632d879/ecc_modern/tanner_partition.v"}
include("31-OnlineApp.jl") while true try julia_main([""]) catch(e) println( e) end sleep(30) end
{"hexsha": "b9eeb4f0c4c1c153920be1203b6e6bf103355882", "size": 133, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Jl-code/31-OnlineClient.jl", "max_stars_repo_name": "wangzhongtian/fiberAlarmAnalyseTool", "max_stars_repo_head_hexsha": "d7030cb44cc53b192cda52238b30c02f67e2abd0", "max_stars_repo_licenses": ["Unli...
import numpy as np import pytest import xarray as xr from . import requires_pygeos from .utils import dummy_region, expected_mask_2D @pytest.mark.parametrize( "method", ["shapely", pytest.param("pygeos", marks=requires_pygeos)] ) def test_unstructured_dummy(method): """Test for unstructured output.""" la...
{"hexsha": "d2faa9a789c334b5f356c889191c6f62e5f33e8b", "size": 747, "ext": "py", "lang": "Python", "max_stars_repo_path": "regionmask/tests/test_unstructured.py", "max_stars_repo_name": "soerenthomsen/regionmask", "max_stars_repo_head_hexsha": "24e91c498d74240f38f59f287ebd93724879d704", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma const_replace_closed_symcl: "const_replace_closed c U \<Longrightarrow> const_replace_closed c (U\<^sup>=)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. const_replace_closed c U \<Longrightarrow> const_replace_closed c (U\<^sup>=) [PROOF STEP] unfolding const_replace_closed_def [PROOF STATE] pr...
{"llama_tokens": 373, "file": "Rewrite_Properties_Reduction_Rewriting_Replace_Constant", "length": 2}
import logging from textwrap import dedent import numpy as np import scipy.stats as stats from django.core.cache import cache from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from django.db import transaction from django.db.models import Count, F, OuterRef, Subquer...
{"hexsha": "b5ceb012a336d2ff5a37750d57e2cc80a057172d", "size": 23648, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/alert/management/commands/recomputestats.py", "max_stars_repo_name": "pennlabs/penn-courses", "max_stars_repo_head_hexsha": "6fd16c151e34a9660e883a41458a72cef6c1f8cd", "max_stars_repo_lic...
[STATEMENT] lemma SCons_transfer [transfer_rule]: "(A ===> pcr_stream A ===> pcr_stream A) LCons (##)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (A ===> pcr_stream A ===> pcr_stream A) LCons (##) [PROOF STEP] by(auto simp add: cr_stream_def pcr_stream_def intro!: rel_funI relcomppI intro: llist_all2_expand)
{"llama_tokens": 134, "file": "Coinductive_Coinductive_Stream", "length": 1}
#!/usr/bin/python # -*- coding: UTF-8 -*- """ 工具类 利用决策树进行分类处理 贝叶斯公式 p(xy)=p(x|y)p(y)=p(y|x)p(x) p(x|y)=p(y|x)p(x)/p(y) """ import numpy as np def train_naive_bayes(train_mat, train_category): """ 朴素贝叶斯分类 :param train_mat: 训练文本 :param train_category: 对应的文本类别 :return: """ train_doc_num =...
{"hexsha": "3c4fe09e0f93b31f9c940807bb6257779ee35314", "size": 1691, "ext": "py", "lang": "Python", "max_stars_repo_path": "Supervised/Classification/NaiveBayes/classif_naive_bayes.py", "max_stars_repo_name": "neohope/MLStudy", "max_stars_repo_head_hexsha": "bba16587e4f3efe11c926030f6bbcff6db0dde14", "max_stars_repo_li...
import argparse import torch import torch.utils.data from model import RS import numpy as np import logging import os from tqdm import tqdm from loss import JointMseLoss from utils import CriterionCalc,ImageDataset,ValImageDataset def get_parser(): parser = argparse.ArgumentParser('parameters') parser.add_arg...
{"hexsha": "5c8f84104c9ab0d200d8234f51727306502abd0a", "size": 5461, "ext": "py", "lang": "Python", "max_stars_repo_path": "main_RS.py", "max_stars_repo_name": "Lysemo/StructureAwareDCNN", "max_stars_repo_head_hexsha": "f2437d39eb246ac6cd9e63b44070f1aca8838475", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import numpy as np import pandas as pd class UCB1(object): def __init__(self, N, save_log=False): self.N = N self.means = np.zeros(N) self.ks = np.zeros(N) self.g = 0 self.save_log = save_log self.scores = [] def initialize(self): self.means = np.zeros(...
{"hexsha": "0c8f279e1f5b26ffeeb4426eae8305eabef782ba", "size": 1203, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/bandit_algorithm/ucb/ucb1.py", "max_stars_repo_name": "bakanaouji/ThompsonSamplingExp", "max_stars_repo_head_hexsha": "2085ec8cb80223af277cdba52cea90113789e4cd", "max_stars_repo_licenses": ["M...
# -*- coding: utf-8 -*- import os import sys import numpy as np import random import datetime from file_tools import FileTools sys.path.insert(0, '../../license-plate-generator') from license_plate_elements import LicensePlateElements # 所有车牌号图片的根目录 plate_images_root_dir = '/home/data_160/data3/smart_home/xiongxin-yuw...
{"hexsha": "2a90bd91608d961e523835231adb7b53b651ed01", "size": 3778, "ext": "py", "lang": "Python", "max_stars_repo_path": "plate-recognition-models/multi-label-classification/caffe/generate_txt.py", "max_stars_repo_name": "zheng-yuwei/license-plate-generator", "max_stars_repo_head_hexsha": "7600d36edd09e8e57aa8a5d935c...
import numpy as np import matplotlib.pyplot as plt t_steps = 1000 t = np.linspace(0, 3 * np.pi, t_steps) y = np.array([-np.log(t / 10. + 0.1), t, np.log(t / 10. + 0.1) + t**2]).T y -= y.min(axis=0) y += 0.1 y /= y.max(axis=0) q_max = 1. # Result arrays n_steps = 100 t_step = np.zeros((n...
{"hexsha": "ef92b606766b3125563e51732c7cab034685fa50", "size": 3358, "ext": "py", "lang": "Python", "max_stars_repo_path": "scarce/examples/tmp_3.py", "max_stars_repo_name": "SiLab-Bonn/SiliconProperties", "max_stars_repo_head_hexsha": "df251ffad0aa10761bae7a22b9063ba8e3daafd9", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python # Copyright 2017 Calico LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agr...
{"hexsha": "c7ba14e26d64c0ea77f10453cdef94f72bfc4bd2", "size": 9035, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/archive/basenji_hidden.py", "max_stars_repo_name": "egilbertson-ucsf/basenji", "max_stars_repo_head_hexsha": "3d06ec0f5e12f7c5c4be8dfd17efdad3feefd68f", "max_stars_repo_licenses": ["Apache-2.0...
from os.path import isabs, join import os import sys import subprocess import re try: subprocess.check_output( '{} -c "import numba"'.format(sys.executable), shell=True ) print('numba available, importing jit') from numba import jit except: print('cannot import numba, creating dummy jit def...
{"hexsha": "9a7fc58f82b83828d1fe92e7e7675863b45fd94a", "size": 1025, "ext": "py", "lang": "Python", "max_stars_repo_path": "pero_ocr/utils.py", "max_stars_repo_name": "DavidHribek/pero-ocr", "max_stars_repo_head_hexsha": "8d274282813878b3e31dd560563a36b3f02e5c33", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars...
(* Class Cl (a : Type). Parameter A : Type. Instance cl_a : Cl A. Parameter Foo Bar : Type -> Type. Parameter conv : forall {k} `{Cl k}, Foo k -> Bar k. Parameter func : Bar A -> bool. Coercion conv : Foo >-> Bar. Fail Definition test (b : Foo A) : bool := func b. *) Class Cl (a : Type). Parameter A : Type. Declar...
{"author": "Blaisorblade", "repo": "Coq-playground", "sha": "add7e5b75cfc127b7a76012325a68ddfd9dc463e", "save_path": "github-repos/coq/Blaisorblade-Coq-playground", "path": "github-repos/coq/Blaisorblade-Coq-playground/Coq-playground-add7e5b75cfc127b7a76012325a68ddfd9dc463e/theories/test_coerce.v"}
import torch import torch.nn as nn from typing import Optional from datetime import datetime import os from logger import logger from torch.utils.data.dataset import Dataset from setup import init_trainining_results from vae_model import Db_vae from datasets.data_utils import DataLoaderTuple, DatasetOutput import util...
{"hexsha": "5a121c84f4ed6861156ee069679996c6cb759b6e", "size": 17824, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/trainer.py", "max_stars_repo_name": "ysbecca/FacialDebiasing", "max_stars_repo_head_hexsha": "cd5745cd1d08d0940a6374b645392b9093c9a109", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
#!/usr/bin/env python # -*- coding: utf-8 -*- import dask.array as da import numpy as np import pytest import dask_image.ndfilters cupy = pytest.importorskip("cupy", minversion="7.7.0") @pytest.fixture def array(): s = (10, 10) a = da.from_array(cupy.arange(int(np.prod(s)), dtype=cupy...
{"hexsha": "7d6b706b62cce40b3fc9218f54f6857cf96a8319", "size": 2553, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_dask_image/test_ndfilters/test_cupy_ndfilters.py", "max_stars_repo_name": "anlavandier/dask-image", "max_stars_repo_head_hexsha": "a858c61ac5beb7de7d7644d7e85714b5c16c2a7a", "max_stars_...
\documentclass[12pt, letterpaper, preprint]{aastex} \usepackage{graphicx} \usepackage{amsmath} \newcommand{\tmin}[1][]{t_{\mathrm{min} #1}} \newcommand{\tmax}[1][]{t_{\mathrm{max} #1}} \newcommand{\amin}{a_{\mathrm{min}}} \newcommand{\amax} {a_{\mathrm{max}}} \newcommand{\dlt}{\Delta\log t_i} \newcommand{\dt}{\Delt...
{"hexsha": "30139fb9fd57b8eca87c5bb0be629c29dd2422d8", "size": 15011, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/text/sfh_integrals.tex", "max_stars_repo_name": "wrensuess/prospector", "max_stars_repo_head_hexsha": "08173f84ddfc2b031c78822344fc821778d35bae", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from __future__ import print_function import argparse import os import gzip import subprocess import itertools import collections import io_functions import sys import scipy.sparse as sp def open_file(file_name, mode=None): if '.gz' == file_name[-3:]: if mode is None: mode = 'rt' retu...
{"hexsha": "7db80c5f6293cfe8f8b34957687a11085e5bd43b", "size": 4531, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/generate_sparse_matrix.py", "max_stars_repo_name": "bbi-lab/bbi-sciatac-analyze", "max_stars_repo_head_hexsha": "f5cfb20ed98373a21fdda152f2a91cfd3347411d", "max_stars_repo_licenses": ["MIT"], ...
# -*- coding: UTF-8 -*- import tensorflow as tf import numpy as np import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' import threading lock = threading.Lock() import random import cv2 import codecs import json import sys reload(sys) sys.setdefaultencoding('utf-8') tf.app.flags.DEFINE_string('data_dir', '/mnt/shared...
{"hexsha": "82e6782e3d3a4536cb1b90b1c1dcfbee5095f0b5", "size": 9131, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cv/ocr_end2end/ATTENTION_OCR/tfrecord.py", "max_stars_repo_name": "jd-aig/aves2_algorithm_components", "max_stars_repo_head_hexsha": "12e06717596b824f7b0db115b95856606b97cd82", "max_stars_repo...
///////////////////////////////////////////////////////////// // // // Copyright (c) 2003-2017 by The University of Queensland // // Centre for Geoscience Computing // // http://earth.uq.edu.au/centre-geoscience-computing // // ...
{"hexsha": "348772c4b7b85310102580684808982c8b5b73f6", "size": 2131, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Python/esys/lsm/geometry/ExportModuleGeometry.cpp", "max_stars_repo_name": "danielfrascarelli/esys-particle", "max_stars_repo_head_hexsha": "e56638000fd9c4af77e21c75aa35a4f8922fd9f0", "max_stars_rep...
from collections import namedtuple import datetime import os, sys, inspect import warnings HERE_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) sys.path.append(HERE_PATH) from geopy.geocoders import Nominatim from matplotlib import gridspec from matplotlib.collections import PatchColl...
{"hexsha": "9a92183e86411f9a6af72afb2b4d895130c5abff", "size": 23337, "ext": "py", "lang": "Python", "max_stars_repo_path": "prob_meteogram/core.py", "max_stars_repo_name": "milankl/prob_meteogram", "max_stars_repo_head_hexsha": "59f478f61e623818e4410425ccd1f81303b75209", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np from pySDC.core.Hooks import hooks class dump_energy(hooks): def __init__(self): """ Initialization of output """ super(dump_energy, self).__init__() self.file = open('energy-sdc.txt', 'w') def post_step(self, step, level_number): """ ...
{"hexsha": "9807daa683c2343da44a1c2ef82df594f5f08cb6", "size": 768, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySDC/projects/FastWaveSlowWave/HookClass_acoustic.py", "max_stars_repo_name": "janEbert/pySDC", "max_stars_repo_head_hexsha": "167d78c4118bc3a5a446ec973fe65fb35db94471", "max_stars_repo_licenses":...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Apr 25 20:07:55 2017 @author: ahefny, zmarinho """ from rpsp.explore.base import ExplorationStrategy import numpy as np class GaussianStrategy(ExplorationStrategy): """ This strategy adds Gaussian noise to the action taken by the deterministic...
{"hexsha": "b91df5013861724bffa1454abfef92dc7348ef0d", "size": 902, "ext": "py", "lang": "Python", "max_stars_repo_path": "rpsp/explore/gaussian_strategy.py", "max_stars_repo_name": "ahefnycmu/rpsp", "max_stars_repo_head_hexsha": "ff3aa3e89a91bb4afb7bad932d2c04691a727a63", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy as np import time import warnings from sklearn.grid_search import GridSearchCV, ParameterGrid, _CVScoreTuple from sklearn.pipeline import Pipeline from sklearn import datasets, linear_model, cross_validation, grid_search from sklearn.cross_validation import _safe_split, _score from sklearn.cross_validation...
{"hexsha": "d1f6096acf3f148aac650feec3a7ce045b76c5b5", "size": 10302, "ext": "py", "lang": "Python", "max_stars_repo_path": "client/python/modeldb/sklearn_native/GridCrossValidation.py", "max_stars_repo_name": "MeRajat/modeldb", "max_stars_repo_head_hexsha": "3cf07d8292ab73016e72ac8e24d4b69938407c18", "max_stars_repo_l...
[GOAL] R : Type u_1 ι : Type u_2 inst✝¹ : Semiring R inst✝ : CharP R 2 ⊢ 2 = 0 [PROOFSTEP] rw [← Nat.cast_two, CharP.cast_eq_zero] [GOAL] R : Type u_1 ι : Type u_2 inst✝¹ : Semiring R inst✝ : CharP R 2 x : R ⊢ x + x = 0 [PROOFSTEP] rw [← two_smul R x, two_eq_zero, zero_smul] [GOAL] R : Type u_1 ι : Type u_2 inst✝¹ : Se...
{"mathlib_filename": "Mathlib.Algebra.CharP.Two", "llama_tokens": 1857}
[STATEMENT] lemma (in \<Z>) M\<alpha>_Rel_arrow_lr_M\<alpha>_Rel_arrow_rl'[cat_cs_simps]: assumes "A \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>" and "B \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>" and "C \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>" shows "M\<alpha...
{"llama_tokens": 760, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Structure_Example", "length": 3}
[STATEMENT] lemma fid_onE[elim!]: assumes "x \<in>\<^sub>\<circ> fid_on A" and "\<exists>a\<in>\<^sub>\<circ>A. x = [a, a]\<^sub>\<circ> \<Longrightarrow> P" shows P [PROOF STATE] proof (prove) goal (1 subgoal): 1. P [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: x \<in>\<^sub>\<circ> fid_on A ...
{"llama_tokens": 297, "file": "CZH_Foundations_czh_sets_CZH_Sets_FBRelations", "length": 3}
# -*- coding: utf-8 -*- """pnuemomia.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1LR72Y4APV1s9ds3lolJtJ7g4KRWXERzd """ !pip install -U -q kaggle !mkdir -p ~/.kaggle from google.colab import files files.upload() !cp kaggle.json ~/.kaggle/ #...
{"hexsha": "e3e8dbca017ebb1f0093f9350bcb447c5f45206e", "size": 5569, "ext": "py", "lang": "Python", "max_stars_repo_path": "pneumonia model.py", "max_stars_repo_name": "dhyeybm/buildabit", "max_stars_repo_head_hexsha": "f49239edc80233eeb2152fe7eea544e1be8c7ebf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
################################################################################ #Michael Guerzhoy and Davi Frossard, 2016 #AlexNet implementation in TensorFlow, with weights #Details: #http://www.cs.toronto.edu/~guerzhoy/tf_alexnet/ # #With code from https://github.com/ethereon/caffe-tensorflow #Model from https://g...
{"hexsha": "09fb27ea34dadb1e8444e3217e07b6cdd290c520", "size": 11064, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter04/Alexnet/alexnet_fine_tune.py", "max_stars_repo_name": "PacktPublishing/Deep-Learning-with-TensorFlow-Second-Edition", "max_stars_repo_head_hexsha": "b22c2327ef6255bc0f273ccf22376d5420c9...
#!/usr/bin/env python3 ######################################################################## # Alignment output folder structure ######################################################################## # # ./Validation/Align-output-XXX/ # {scan_id}.csv # columns: objectCategory,alignedModelId,tx,ty,tz,qw,qx,qy,q...
{"hexsha": "3f17194873edff0b78fd7813bcce301e60fd6554", "size": 12118, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/prepare_deformation_input.py", "max_stars_repo_name": "alexeybokhovkin/CAD-Deform", "max_stars_repo_head_hexsha": "462fc6c97d91cc579f9e5551ed983cc10ecb9976", "max_stars_repo_licenses": ["...
[STATEMENT] lemma assumes "P \<turnstile> class_type_of T sees M:Us\<rightarrow>U = \<lfloor>(pns, body)\<rfloor> in D" "length vs = length pns" "length Us = length pns" shows is_call_red_inline_call: "\<lbrakk> call e = \<lfloor>(a, M, vs)\<rfloor>; typeof_addr (hp s) a = \<lfloor>T\<rfloor> \<rbrakk> \<Long...
{"llama_tokens": 36072, "file": "JinjaThreads_Compiler_J0Bisim", "length": 44}
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from .image import transform_preds def get_pred_depth(depth): return depth def multi_pose_post_process(dets, c, s, h, w): # dets: batch x max_dets x 40 # return list of 39 in image ...
{"hexsha": "f666e9320aa9ef86e3d7d1c881f35adf2695a84c", "size": 1800, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/lib/utils/post_process.py", "max_stars_repo_name": "nerminsamet/HPRNet", "max_stars_repo_head_hexsha": "a23e691102ed50bd24391e6295c74f452592cdae", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import pandas as pd from pandas import Series,DataFrame from numpy.random import randn s1=Series([500,1000,1500],index=['a','c','b']) print(s1) #sorting by index print(s1.sort_index()) #sort by values print(s1.sort_values()) #ranking of series print(s1.rank()) s2=Series(randn(4)) ...
{"hexsha": "034a43bb5838327f2e55da9dc3845b9d6cbffeb9", "size": 350, "ext": "py", "lang": "Python", "max_stars_repo_path": "Data Manipulation with Pandas/ranking_sorting.py", "max_stars_repo_name": "zack28/TakenMind-Internship", "max_stars_repo_head_hexsha": "7fb7c1c0b255ee233f18fd9ab4fa76a9b2c992d7", "max_stars_repo_li...
! from http://calcul.math.cnrs.fr/Documents/Ecoles/2010/f2py-cours.pdf ! Pierre Navaro ! tableaux: ! - attention: passer le bon type sinon, f2py effectue une copie ! et travaille sur une variable temporaire (sans rien dire!) ! - si multidim: specifier "order='F'" pour le tableau numpy! subroutine move( position...
{"hexsha": "43e14bd7f13a3e49ec0815ca590c135574a7dabe", "size": 1380, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "sandbox/fortranpython/navaro/fortranarrays.f90", "max_stars_repo_name": "rboman/progs", "max_stars_repo_head_hexsha": "c60b4e0487d01ccd007bcba79d1548ebe1685655", "max_stars_repo_licenses": ["Apa...
-- The <local hints> in an ATP pragma <prove> can be data constructors. module ATPLocalHints1 where postulate D : Set zero : D succ : D → D data N : D → Set where zN : N zero sN : ∀ {n} → N n → N (succ n) postulate 0-N : N zero {-# ATP prove 0-N zN #-}
{"hexsha": "d685e06145c6a96725c4ee0de142c48d1e6a0eb0", "size": 286, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "examples/ATPLocalHints1.agda", "max_stars_repo_name": "asr/apia", "max_stars_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2016-2017 CNRS # 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 limita...
{"hexsha": "c70c7ae08d041e423e7ab6fe3240ab7dfe41f02a", "size": 8165, "ext": "py", "lang": "Python", "max_stars_repo_path": "diarization_with_neural_approach/optimization/my_cluster.py", "max_stars_repo_name": "yinruiqing/neural_diarization", "max_stars_repo_head_hexsha": "cc78903b2c6182ff823e1d383f7da7a725c2a005", "max...
import re import os import sys from datetime import datetime import numpy as np import scipy.io as sio import datajoint as dj import tqdm from . import (reference, utilities, acquisition, analysis) schema = dj.schema(dj.config['custom'].get('database.prefix', '') + 'extracellular') @schema class ProbeInsertion(dj....
{"hexsha": "122ed3c1e40e6fa9557564c02741a7d11f2949c5", "size": 3197, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipeline/extracellular.py", "max_stars_repo_name": "ttngu207/Economo-2018", "max_stars_repo_head_hexsha": "c1d9c9d1490380d7e6f2669de14beb7b61297aeb", "max_stars_repo_licenses": ["MIT"], "max_stars...
from __future__ import absolute_import, print_function, division import numpy as np import scipy.special import theano from theano import scalar, gof, tensor from unittest import TestCase from theano.tests.unittest_tools import SkipTest, assert_allclose from theano.tensor.tests import test_elemwise from .config impo...
{"hexsha": "d3c06987dfab5084447bca4f8ef63547acd6bed4", "size": 16020, "ext": "py", "lang": "Python", "max_stars_repo_path": "theano/gpuarray/tests/test_elemwise.py", "max_stars_repo_name": "bbudescu/Theano", "max_stars_repo_head_hexsha": "703408392397a4462e3f7a23478b858fc5a3c2f7", "max_stars_repo_licenses": ["BSD-3-Cla...
# pylint: skip-file import mxnet as mx import numpy as np import logging import mnist_data as data from math import sqrt from autoencoder import AutoEncoderModel if __name__ == '__main__': lv = 1e-2# lv/ln in CDL # set to INFO to see less information during training logging.basicConfig(level=log...
{"hexsha": "615fb65c8396bd06aac70f6604e70d0d7abbf001", "size": 1347, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/recommendation_systems/cdl/mnist_sae.py", "max_stars_repo_name": "marktab/mxnet-notebooks", "max_stars_repo_head_hexsha": "5872e3d8d590e4472375f36380d9cb140a926e91", "max_stars_repo_license...
from collections import defaultdict from datetime import date, datetime from typing import Callable, Type, Dict, List, Optional from functools import partial import numpy as np from pandas import DataFrame import plotly.graph_objects as go from plotly.subplots import make_subplots from vnpy.trader.constant import ( ...
{"hexsha": "f290f8c14f01dc21d18b4e99ecf0883214a85da3", "size": 24693, "ext": "py", "lang": "Python", "max_stars_repo_path": "vnpy_spreadtrading/backtesting.py", "max_stars_repo_name": "noranhe/vnpy_spreadtrading", "max_stars_repo_head_hexsha": "645a7ef1edff85a73684f3ae87eb75ab4cc365dd", "max_stars_repo_licenses": ["MIT...
from networkx import betweenness_centrality_subset, all_neighbors def intervene(graph,opts): eh = opts.initial.max * 0.9 el = opts.initial.min * 0.9 o = graph.values["opinion"] na = [n for n in graph.nodes() if el < o[n] < eh] ea = [n for n in graph.nodes() if not el < o[n] < eh] c = betweenness_centrali...
{"hexsha": "e880e20ae544c809a267201663bdca6c574b81c9", "size": 755, "ext": "py", "lang": "Python", "max_stars_repo_path": "Algorithms/Intervention/betweenness_sides.py", "max_stars_repo_name": "Kanavoy/UODS", "max_stars_repo_head_hexsha": "2da38b749e721b051aeaa6a7bcb3a921aeb5a09c", "max_stars_repo_licenses": ["MIT"], "...
# Include as many packages as you'd like here import numpy as np from PIL import Image import skimage.transform import cv2 import matplotlib.pyplot as plt # You might need to create the directory (output) # and commit the complete folder after completing # the HW. savedir = '//output//' def save_fig_as_png(figtitle):...
{"hexsha": "e3ed8ccb18f9cc3a0e19a3d422bcd811cb66a4d4", "size": 7003, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/imageprocessing.py", "max_stars_repo_name": "NUCS331/HW1_Getting_Started", "max_stars_repo_head_hexsha": "9384c9b7ff190d56e98c30085e118fa0ec64fc0b", "max_stars_repo_licenses": ["MIT"], "max_st...
""" This module implements the adaSyn algorithm Note that this implementation is only suitable for datasets which have binary classification. """ import numpy from sklearn import neighbors from dataParsing import * import smote_transform from sklearn import cross_validation class adaSyn(smote_transform.smoteTransform...
{"hexsha": "f9e9cbd781c9d9e8027887d904d3590703d8980c", "size": 5581, "ext": "py", "lang": "Python", "max_stars_repo_path": "ada_syn.py", "max_stars_repo_name": "cphang99/scikit-SMOTE", "max_stars_repo_head_hexsha": "a5694ade619a25773f3e0b7d4b1e4c6a34602b8a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
from __future__ import print_function import timeit import platform import sys import collections import numpy def get_mkl_version(): try: import mkl return mkl.get_version_string() except ImportError: return getattr(numpy, "__mkl_version__", "none") def benchmark_size(n, base_iter...
{"hexsha": "1db0d618ba6eae1021b6a1be90b3c1ffb7e677f8", "size": 1970, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmark_numpy.py", "max_stars_repo_name": "ktrnka/helpers", "max_stars_repo_head_hexsha": "b52102d81007301ed576c908c8f9fa5df386abbb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
import tensorflow as tf import numpy as np import pandas as pd input_filename = '/network/group/aopp/predict/TIP016_PAXTON_RPSPEEDY/ML4L/ECMWF_files/raw/processed_data/joined_data/test_data.tfrecords' #Get the raw data filenames = [input_filename] raw_dataset = tf.data.TFRecordDataset(filenames) #print the f...
{"hexsha": "6c807cc58e357910d094a97d9f57d936db3c75b3", "size": 3005, "ext": "py", "lang": "Python", "max_stars_repo_path": "legacy/legacy_scripts/scripts_RW/dev/.ipynb_checkpoints/how_to_read_TFRecords-checkpoint.py", "max_stars_repo_name": "tomkimpson/ML4L", "max_stars_repo_head_hexsha": "ffa8360cb80df25bd6af4fa5cc39b...
# Copyright 2021 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": "dc2b077f76eba0f8d6cc80f05d39cc09d41c2fa8", "size": 5600, "ext": "py", "lang": "Python", "max_stars_repo_path": "official/cv/erfnet/src/eval310.py", "max_stars_repo_name": "leelige/mindspore", "max_stars_repo_head_hexsha": "5199e05ba3888963473f2b07da3f7bca5b9ef6dc", "max_stars_repo_licenses": ["Apache-2.0"],...
import torch import torch.nn as nn import numpy as np from utils import rend_util from utils import general as utils from models.embedder import * from models.ray_tracing import RayTracing from models.sample_network import SampleNetwork class GeometryNetwork(nn.Module): def __init__( self, ...
{"hexsha": "be0cef771d30b8b8a396a19da57a4accb4a13ae2", "size": 10573, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/models/idr_disentangled.py", "max_stars_repo_name": "yohanlegars/idr", "max_stars_repo_head_hexsha": "a06aae0def6660a4b5e0edea708657aa300383e5", "max_stars_repo_licenses": ["MIT"], "max_star...
FUNCTION PR_SPED ( uwnd, vwnd ) C************************************************************************ C* PR_SPED * C* * C* This function computes SPED from UWND and VWND. The following * C* equation is used: * C* * C* SPED = SQRT ( (UWND**2) + (VWND**2) ) * C* *...
{"hexsha": "fbf74ac588cd6735d7be6919081ad99f44cc2e49", "size": 1196, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/prmcnvlib/pr/prsped.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"]...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
{"hexsha": "82fffdf2ac017d4c2618908ad46b8595bb5eb533", "size": 11076, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "main/dbaccess/source/ui/inc/databaseobjectview.hxx", "max_stars_repo_name": "Grosskopf/openoffice", "max_stars_repo_head_hexsha": "93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7", "max_stars_repo_license...
From isla Require Import opsem. Definition a14 : isla_trace := AssumeReg "rv_enable_pmp" [] (RegVal_Base (Val_Bool false)) Mk_annot :t: AssumeReg "rv_enable_misaligned_access" [] (RegVal_Base (Val_Bool false)) Mk_annot :t: AssumeReg "rv_ram_base" [] (RegVal_Base (Val_Bits (BV 64%N 0x80000000%Z))) Mk_annot :t: ...
{"author": "rems-project", "repo": "islaris", "sha": "fcc5791c74a2f791dee9080263cd64e42e73bc39", "save_path": "github-repos/coq/rems-project-islaris", "path": "github-repos/coq/rems-project-islaris/islaris-fcc5791c74a2f791dee9080263cd64e42e73bc39/instructions/binary_search_riscv64/a14.v"}
[STATEMENT] lemma Sup_upto_llist_mono[simp]: "j \<le> k \<Longrightarrow> Sup_upto_llist Xs j \<subseteq> Sup_upto_llist Xs k" [PROOF STATE] proof (prove) goal (1 subgoal): 1. j \<le> k \<Longrightarrow> Sup_upto_llist Xs j \<subseteq> Sup_upto_llist Xs k [PROOF STEP] unfolding Sup_upto_llist_def [PROOF STATE] proof (...
{"llama_tokens": 236, "file": "Ordered_Resolution_Prover_Lazy_List_Liminf", "length": 2}
""" Estimate the covariance derivatives with forward differences """ function est_dΣdθ(prob_def::GLO, kernel_hyperparameters::Vector{T}; return_est::Bool=true, return_anal::Bool=false, return_dif::Bool=false, return_bool::Bool=false, dif::Real=1e-6, print_stuff::Bool=true) where {T<:Real} total_hyperparameters = a...
{"hexsha": "56b49bd0e436485a64091dbf6190c158b3a43a29", "size": 9442, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/diagnostic_functions.jl", "max_stars_repo_name": "eford/GPLinearODEMaker.jl", "max_stars_repo_head_hexsha": "85209a72e5a679b974abc4cdfe3cbea27194b242", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np m= np.arange(10,22).reshape((3, 4)) print("Original matrix:") print(m) print("Number of rows and columns of the said matrix:") print(m.shape)
{"hexsha": "31604e871052d28cebe3851dbdbbcc7a1dbb22eb", "size": 160, "ext": "py", "lang": "Python", "max_stars_repo_path": "semester-6/Python Practice/numpyPractice/program26.py", "max_stars_repo_name": "saranshbht/bsc-codes", "max_stars_repo_head_hexsha": "7386c09cc986de9c84947f7dea7db3dc42219a35", "max_stars_repo_lice...
"""Evaluation utilities.""" import numpy as np import tensorflow as tf def make_summary(name, value): """Creates a tf.Summary proto with the given name and value.""" summary = tf.Summary() val = summary.value.add() val.tag = str(name) val.simple_value = float(value) return summary class BaseAccumulato...
{"hexsha": "f208de6af7d0d9d0c72dbfea163f74b935e385eb", "size": 2198, "ext": "py", "lang": "Python", "max_stars_repo_path": "semisupervised/eval_utils.py", "max_stars_repo_name": "xysteve00/seq3seq-fingerprint-regression", "max_stars_repo_head_hexsha": "9d73c7e7a4e9815f3be3d5abcab0657d8b1841cb", "max_stars_repo_licenses...
#!/usr/bin/env python3 # Copyright 2021 UCLouvain # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ...
{"hexsha": "c542de336307b31ff987936b62743542b021ef8e", "size": 23373, "ext": "py", "lang": "Python", "max_stars_repo_path": "attack_multi.py", "max_stars_repo_name": "cassiersg/ASCAD-5minutes", "max_stars_repo_head_hexsha": "0b0ec5cb8ea31ee42f99d9be263d7af90497d951", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#include <string> #include <cstring> #include <cctype> #include <cstdlib> #include <cstdio> #include <iostream> #include <fstream> #include <bitset> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> #incl...
{"hexsha": "c8267abfd58e1c5dd49237b73885c9c8bfe6b841", "size": 20336, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "direction_discrimination/gpu/discernGPU_port.cpp", "max_stars_repo_name": "RuoAndo/Usenix_LISA19", "max_stars_repo_head_hexsha": "966ee9593cf924ef8a8ace45cdb826b74b3b9001", "max_stars_repo_licenses...
''' - choose many useful feature - avoid useless feature - avoid related feature - easy to understand ''' import numpy import matplotlib.pyplot as plt greyhounds = 500 labs = 500 grey_height = 28 + 4 * numpy.random.randn(greyhounds) lab_hieight = 24 + 4 * np.random.randn(labs) plt.hist([grey_height, lab_hieight], ...
{"hexsha": "5d276fe0669bd302f09922cc5d82e73d321560c0", "size": 361, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/3_choose_good_feature.py", "max_stars_repo_name": "ning-yang/scikit-learn-google-tutorial", "max_stars_repo_head_hexsha": "9bc841b4d49fd8045bcb156f25f0bc1eea309e5f", "max_stars_repo_licenses":...
SUBROUTINE GDU_GLEV ( level, nexp, vcoord, nlev, rlevel, + levtyp, vparm, ivert, iret ) C************************************************************************ C* GDU_GLEV * C* * C* This subroutine converts the user input for LEVELS and VCOORD * C* into a list of levels. The input for...
{"hexsha": "82b615ab235fc674926b8d35b38d8d8f63946f36", "size": 6061, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "gempak/source/gridlib/gdu/gduglev.f", "max_stars_repo_name": "oxelson/gempak", "max_stars_repo_head_hexsha": "e7c477814d7084c87d3313c94e192d13d8341fa1", "max_stars_repo_licenses": ["BSD-3-Clause"]...
""" Create plots that compare input emissions between RCMIP & default Hector Matt Nicholson 11 Mar 2020 """ import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import pandas as pd from cfunits import Units from compare_rcmip import subset_years, trim_axs # === Helper Functions =============...
{"hexsha": "31c596021c9c9903358f65b8c4eed896ffa0be2a", "size": 7507, "ext": "py", "lang": "Python", "max_stars_repo_path": "hector/scripts/rcmip/plot_ems.py", "max_stars_repo_name": "mnichol3/my_jgcri", "max_stars_repo_head_hexsha": "dd0ab4651f51399f177aaee20c6ea7a9270c3c58", "max_stars_repo_licenses": ["MIT"], "max_st...
using StochasticSemiDiscretizationMethod function createHayesProblem(a,β) AMx = ProportionalMX(a*ones(1,1)); τ1=1. BMx1 = DelayMX(τ1,zeros(1,1)); cVec = Additive(1) noiseID = 1 αMx1 = stCoeffMX(noiseID,ProportionalMX(zeros(1,1))) βMx11 = stCoeffMX(noiseID,DelayMX(τ1,β*ones(1,1))) σ = ...
{"hexsha": "21bbe55443c3a7ad71fe18524ea5180c7c8ba5c5", "size": 1699, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/HayesEquation.jl", "max_stars_repo_name": "UnofficialJuliaMirror/StochasticSemiDiscretizationMethod.jl-048039a2-5e1a-11e9-0eb6-5da22298fca4", "max_stars_repo_head_hexsha": "eeabdf0fdcc3d40...
[STATEMENT] lemma gcd_scm: "VARS a b x y {0<A & 0<B & a=A & b=B & x=B & y=A} WHILE a ~= b INV {0<a & 0<b & gcd A B = gcd a b & 2*A*B = a*x + b*y} DO IF a<b THEN (b := b-a; x := x+y) ELSE (a := a-b; y := y+x) FI OD {a = gcd A B & 2*A*B = a*(x+y)}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. {0 < A \<and> 0 <...
{"llama_tokens": 1360, "file": null, "length": 5}
[STATEMENT] lemma neg_cn: "isnorm P \<Longrightarrow> isnorm (neg P)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. isnorm P \<Longrightarrow> isnorm (neg P) [PROOF STEP] proof (induct P) [PROOF STATE] proof (state) goal (3 subgoals): 1. \<And>x. isnorm (Pc x) \<Longrightarrow> isnorm (neg (Pc x)) 2. \<And>x1a P....
{"llama_tokens": 4701, "file": null, "length": 33}
''' @author: Daniel Hjertholm Tests for spatially structured networks generated by PyNN. ''' import numpy as np import numpy.random as rnd from numpy import exp import pyNN.nest as sim from testsuite.spatial_test import SpatialTester class pyNN_SpatialTester(SpatialTester): '''Tests for spatially structured n...
{"hexsha": "2a9b8e7dc762d8abead0c6398c4e3b4e81512e69", "size": 4708, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyNN_spatial.py", "max_stars_repo_name": "danhje/neural-network-connection-algorithms-tester", "max_stars_repo_head_hexsha": "9183d8ba0cccf4bc98284d1c859471d1eba901a3", "max_stars_repo_licenses": ...
import numpy as np from base.RecommenderUtils import check_matrix from base.BaseRecommender import RecommenderSystem from models.MF.Cython.MF_RMSE import FunkSVD_sgd, AsySVD_sgd, AsySVD_compute_user_factors, BPRMF_sgd class BPRMF(RecommenderSystem): ''' BPRMF model ''' # TODO: add global effects ...
{"hexsha": "fba69cb9b2aa71133f4eb655f53739a0d99ca08e", "size": 5443, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/MF/BPRMF.py", "max_stars_repo_name": "yigitozgumus/PolimiRecSys2018", "max_stars_repo_head_hexsha": "13d0c52d67347da3891f3b829e40128e09d7024a", "max_stars_repo_licenses": ["MIT"], "max_star...
""" latexoperation(ex::Expr, prevOp::AbstractArray) Translate a simple operation given by `ex` to LaTeX maths syntax. This uses the information about the previous operations to decide if a parenthesis is needed. """ function latexoperation(ex::Expr, prevOp::AbstractArray; cdot=true, kwargs...) op = ex.args[1]...
{"hexsha": "f93023c047b838bea9e94de82c89a3999dd0c557", "size": 5551, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/latexoperation.jl", "max_stars_repo_name": "isaacsas/Latexify.jl", "max_stars_repo_head_hexsha": "36aa8a2a047011ef2f29e9960680de3163305d97", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import sys sys.path.append('../') import numpy as np import pandas as pd from math import sqrt from utils.utils import * from sklearn.pipeline import Pipeline from sklearn.base import TransformerMixin from sklearn.linear_model import Lasso, LassoCV, ElasticNet from sklearn.metrics import mean_squared_error, make_scorer...
{"hexsha": "32783e5bd18fc61c289d30a88c844d2873281f83", "size": 4433, "ext": "py", "lang": "Python", "max_stars_repo_path": "jiwon/keras01.py", "max_stars_repo_name": "chazzy1/nycdsaML", "max_stars_repo_head_hexsha": "7d39d0753351bfcd54f1fac018b7d27707ed380f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
""" A neural network with a single layer that is trained to classify the data. Plots the data, the loss function and the model predictions. Based heavily on code provided in Andy Casey's lecture notes: http://astrowizici.st/teaching/phs5000/13/ How to run ---------- See README.md """ import numpy as np import pand...
{"hexsha": "c9bdf28b913c9fa02dbb5fe6163b65eaceea967b", "size": 22346, "ext": "py", "lang": "Python", "max_stars_repo_path": "ps5/code/q2_neural_network_numpy.py", "max_stars_repo_name": "evgenyneu/ASP5020_data_analysis_problem_sets", "max_stars_repo_head_hexsha": "985e2a43b16440302de66de5c89d0f970f63624a", "max_stars_r...
from multiprocessing import cpu_count import numpy as np import tensorflow as tf from . import mixup from .mixmatch import sharpen, guess_labels from ..libml.data_augmentations import weak_augment, medium_augment, strong_augment, random_rotate def compute_rot_loss(x, model, w_rot=0.5): """ Compute auxiliary...
{"hexsha": "64f488c6306c7627e615ca4e4616b3196b12f343", "size": 5907, "ext": "py", "lang": "Python", "max_stars_repo_path": "ssl_image_classification/algorithms/remixmatch.py", "max_stars_repo_name": "JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification", "max_stars_repo_head_hexsha": "b32599d1a5f28beefb4f9a74...
(* Title: HOL/MicroJava/BV/Semilat.thy Author: Tobias Nipkow Copyright 2000 TUM Semilattices. *) header {* \chapter{Data Flow Analysis Framework}\label{cha:bv} \isaheader{Semilattices} *} theory Semilat imports Main "~~/src/HOL/Library/While_Combinator" begin type_synonym 'a ord = "'a \...
{"author": "Josh-Tilles", "repo": "AFP", "sha": "f4bf1d502bde2a3469d482b62c531f1c3af3e881", "save_path": "github-repos/isabelle/Josh-Tilles-AFP", "path": "github-repos/isabelle/Josh-Tilles-AFP/AFP-f4bf1d502bde2a3469d482b62c531f1c3af3e881/thys/JinjaThreads/DFA/Semilat.thy"}
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 31 11:17:58 2022 List the snow core individual profile peak locations (depths) and sample numbers allows user to adjust as necessary Then this script will classify the sections of the profile based on how many features have been encountered. The go...
{"hexsha": "7df2230d5e3404a52713c6dd566ec20bf6e77cc6", "size": 18276, "ext": "py", "lang": "Python", "max_stars_repo_path": "snowCoreListPeakValesAndAdjust.py", "max_stars_repo_name": "michaeltown-phd/snowisoDataMunging", "max_stars_repo_head_hexsha": "dea0ebcd41a1b2022af38f0a8fd86a99eecbfd39", "max_stars_repo_licenses...
/* vector/gsl_vector_complex_double.h * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the...
{"hexsha": "ec7cf731dea8b97e8c5c3df0de1052f8e4d8426b", "size": 7518, "ext": "h", "lang": "C", "max_stars_repo_path": "pkgs/libs/gsl/src/vector/gsl_vector_complex_double.h", "max_stars_repo_name": "manggoguy/parsec-modified", "max_stars_repo_head_hexsha": "d14edfb62795805c84a4280d67b50cca175b95af", "max_stars_repo_licen...
[STATEMENT] lemma des2_is_proper: "\<B>' \<noteq> {#} \<Longrightarrow> proper_design \<V>' \<B>'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<B>' \<noteq> {#} \<Longrightarrow> proper_design \<V>' \<B>' [PROOF STEP] by (unfold_locales) (simp)
{"llama_tokens": 103, "file": "Design_Theory_Design_Operations", "length": 1}
import os # comment out below line to enable tensorflow outputs os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf physical_devices = tf.config.experimental.list_physical_devices('GPU') if len(physical_devices) > 0: tf.config.experimental.set_memory_growth(physical_devices[0], True) from absl import a...
{"hexsha": "6941bb62ec5d5d4671c9bccb1faff8a2842dd533", "size": 6023, "ext": "py", "lang": "Python", "max_stars_repo_path": "detect.py", "max_stars_repo_name": "kimseongah/yolo", "max_stars_repo_head_hexsha": "0947e628cb0d09835db6de7242f41b3a6f6fcdea", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
\section{Computing the generalised eigenvalue decomposition} In the above, we have silently assumed that we have access to the generalised eigenvectors $\w_i$ of $(\A, \B)$. This section gives some insight into how these eigenvectors are actually calculated. From the definition of generalised eigenvectors (\cref{eq...
{"hexsha": "698d7043d216e7627a3e24ab847d6ef7d9b4f89d", "size": 10723, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "modules/Scraps/GEVD/QZ.tex", "max_stars_repo_name": "tfiers/master-thesis", "max_stars_repo_head_hexsha": "3e97128eeb18827b03da90817fe6f6985c84ad80", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import gc import json import os import time from easydict import EasyDict as edict from neurometer import LatencyWatch from neurometer.model import capture_config from tqdm import tqdm import fire import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch import torch.nn as nn fc_watch = Lat...
{"hexsha": "47670f3e5f4517e9f18c2f5e51538691879d4354", "size": 4216, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/measure_lenet5.py", "max_stars_repo_name": "Ashutosh-Adhikari/neurometer", "max_stars_repo_head_hexsha": "c179622a29dc20c4619fff81a5b2d649f16994c0", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma (in infinite_coin_toss_space) pseudo_proj_True_shift: shows "length l = n \<Longrightarrow> pseudo_proj_True n (shift l (sconst True)) = shift l (sconst True)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length l = n \<Longrightarrow> pseudo_proj_True n (l @- sconst True) = l @- sconst True [P...
{"llama_tokens": 137, "file": "DiscretePricing_Infinite_Coin_Toss_Space", "length": 1}
from .faiss_kmeans import run_multiple_k_means import numpy as np features = np.random.randn(100, 2) labels = np.random.randint(0, 10, 100) num_classes = 10 rst_mean, std = run_multiple_k_means(features, labels, n_class=num_classes,iterations=100) print(f'pretext+kmeans acc {rst_mean[0]:.4f} +- {std[0]:.4f}, NMI {rst_...
{"hexsha": "d97da572fd65c84866174723c172fa42b6a4bc2d", "size": 389, "ext": "py", "lang": "Python", "max_stars_repo_path": "opendc/evaluation/K-means.py", "max_stars_repo_name": "XingzhiZhou/OpenDC", "max_stars_repo_head_hexsha": "8512e8a8e69ac57ffcdd92331b6c990e3302847c", "max_stars_repo_licenses": ["MIT"], "max_stars_...
[STATEMENT] lemma map_length_unfold_one: fixes x :: "'a::len word" assumes xv: "Suc (unat x) < 2 ^ LENGTH('a)" and ax: "a < x" shows "map f [a .e. x] = f a # map f [a + 1 .e. x]" [PROOF STATE] proof (prove) goal (1 subgoal): 1. map f [a .e. x] = f a # map f [a + 1 .e. x] [PROOF STEP] by (subst word_upto_...
{"llama_tokens": 166, "file": "Word_Lib_Enumeration_Word", "length": 1}
from functools import singledispatch import numpy as _np from netket.utils import mpi_available as _mpi_available, n_nodes as _n_nodes if _mpi_available: from netket.utils import MPI_comm as _MPI_comm from netket.utils import MPI as _MPI @singledispatch def sum_inplace(x): """ Computes the elementwi...
{"hexsha": "89e497ba3fd632a71216fb11f1905eb0afe30e83", "size": 3220, "ext": "py", "lang": "Python", "max_stars_repo_path": "netket/stats/_sum_inplace.py", "max_stars_repo_name": "ChenAo-Phys/netket", "max_stars_repo_head_hexsha": "df3735993962ca6318dee0b86a5d15a9d37c9881", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
(* Copyright 2014 Cornell University This file is part of VPrl (the Verified Nuprl project). VPrl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)...
{"author": "coq-contribs", "repo": "intuitionistic-nuprl", "sha": "6279ed83244dc4aec2e23ffb4c87e3f10a50326d", "save_path": "github-repos/coq/coq-contribs-intuitionistic-nuprl", "path": "github-repos/coq/coq-contribs-intuitionistic-nuprl/intuitionistic-nuprl-6279ed83244dc4aec2e23ffb4c87e3f10a50326d/sovar_alpha.v"}
#! usr/bin/env python3 # -*- coding:utf-8 -*- """ @Author:Kaiyin Zhou """ import tensorflow as tf import time import numpy as np from fennlp.datas import Sminarog from fennlp.metrics import Losess, Metric from fennlp.models import TextGCN2019 from fennlp.gnn.utils import merge_batch_graph from fennlp.callbacks import E...
{"hexsha": "5d6b27fcf9e1f57b7549e1abc1a603fd60d465ca", "size": 6031, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/GNN/nlp/text_gcn.py", "max_stars_repo_name": "walker-liu/fennlp", "max_stars_repo_head_hexsha": "7432595342b2f2139a788187d3b46fd2097bb10a", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/env python """Rasch model (Rasch, 1960) using Hamiltonian Monte Carlo.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import edward as ed import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from edward.models import Ber...
{"hexsha": "bc87e3de613de30b74f342acd424ffdf8c465180", "size": 1301, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/rasch_model_hmc.py", "max_stars_repo_name": "NunoEdgarGFlowHub/edward", "max_stars_repo_head_hexsha": "298fb539261c71e34d5e7aa5a37ed8a029df0820", "max_stars_repo_licenses": ["Apache-2.0"]...
function P = principalComponents(X,q) %principalComponents Principal components of a vector population. % P = principalComponents(X,Q) computes the principal-component % vectors of the vector population contained in the rows of X, a % matrix of size K-by-n where K (assumed to be > 1) is the number of % vectors ...
{"author": "dipum", "repo": "dipum-toolbox", "sha": "9ce653c4c0c4b7c56e46194c24bf152db4ab6832", "save_path": "github-repos/MATLAB/dipum-dipum-toolbox", "path": "github-repos/MATLAB/dipum-dipum-toolbox/dipum-toolbox-9ce653c4c0c4b7c56e46194c24bf152db4ab6832/dipum/principalComponents.m"}
import numpy as np import pandas as pd from scipy import stats from scipy.optimize import curve_fit import os import re from fuelcell import utils from fuelcell.model import Datum dlm_default = utils.dlm_default col_default_labels = {'current':'i', 'potential':'v', 'time':'t', 'current_err':'i_sd', 'potential_err':'v...
{"hexsha": "290bdb499ab4af21d672ad8b5e24290dd6ddc16e", "size": 37773, "ext": "py", "lang": "Python", "max_stars_repo_path": "fuelcell/datums.py", "max_stars_repo_name": "Soula09/fuelcell", "max_stars_repo_head_hexsha": "cf2a726c78d2b87f8b212e4c0f791d1d5e12009a", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "max_st...
import asyncio import concurrent import functools import glob import os import time from threading import Thread import cv2 import numpy as np import tflit from fhempy.lib.generic import FhemModule from tflite_runtime.interpreter import Interpreter, load_delegate from .. import fhem, utils class object_detection(Fh...
{"hexsha": "d25c64251d34cfdbd920c13932f5b950024320a6", "size": 17926, "ext": "py", "lang": "Python", "max_stars_repo_path": "FHEM/bindings/python/fhempy/lib/object_detection/object_detection.py", "max_stars_repo_name": "xerion3800/fhempy", "max_stars_repo_head_hexsha": "24a0d1e55c77716ca9bedcbe97dee909143fd02a", "max_s...
This editor can edit this page and tell us a bit about themselves by clicking the Edit icon. 20100120 18:02:36 nbsp Welcome to the wiki, Dante! Thanks for your comments on the Red 88 Noodle Bar page. I found them very helpful in putting some of the negative comments into context. As you continue to participate in ...
{"hexsha": "8572fc7ccc23cbf4b2a300022d1b51d33596bc33", "size": 1496, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Red88.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from collections import OrderedDict, namedtuple import datetime as dt import numpy as np import pandas as pd from .. import setup_logging from ..utils.utils import dist, geo_dist, find_extrema from ..load_settings import settings log = setup_logging.get_logger('st.find_vortmax') VortMax = namedtuple('VortMax', ['da...
{"hexsha": "285c7017df9090a0266dbc90237e0e1d6a4fcbe3", "size": 8171, "ext": "py", "lang": "Python", "max_stars_repo_path": "stormtracks/processing/find_vortmax.py", "max_stars_repo_name": "subond/stormtracks", "max_stars_repo_head_hexsha": "63556053d71013ec044aa207d0978c0e9e76d859", "max_stars_repo_licenses": ["MIT"], ...
import imblearn.over_sampling import numpy as np def return_oversample(mx, x, y, rs=444): ''' Use imblearn over-sampling to upsample minority class :param mx: Multiplier to upsample minority class :param x: train set features :param y: train targets :param rs: ra...
{"hexsha": "84fb4bc1ba2e2a0f55b18de25ef1fd83b52b3986", "size": 646, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_scripts/Oversample.py", "max_stars_repo_name": "brokengrappler/PONV_Classifier", "max_stars_repo_head_hexsha": "3649226d9b51a18a5d9c5c575b069b3fbd64e11d", "max_stars_repo_licenses": ["MIT"], "ma...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np from configs.kitti_config import config def xywh_to_yxyx(bbox): shape = bbox.get_shape().as_list() _axis = 1 if len(shape) >...
{"hexsha": "70ad59f7be5fb0491a09a624145de5e33460d10c", "size": 20007, "ext": "py", "lang": "Python", "max_stars_repo_path": "TrainingNet/mobilenetdet.py", "max_stars_repo_name": "HansonSun/FaceRecognition_TF", "max_stars_repo_head_hexsha": "02dde33318f9c31cca285937c957f8750e1f9fe7", "max_stars_repo_licenses": ["MIT"], ...
import numpy as np import torch from torch import nn class ChannelAttention(nn.Module): def __init__(self, in_planes, ratio=16): super(ChannelAttention, self).__init__() self.avg_pool = nn.AdaptiveAvgPool3d(1) self.max_pool = nn.AdaptiveMaxPool3d(1) self.fc1 = nn.Conv...
{"hexsha": "4873eaf381a2ac07667e37480969576ccb28e98e", "size": 10294, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/layers.py", "max_stars_repo_name": "kingaza/DLCA", "max_stars_repo_head_hexsha": "2b29d5cce3e4fee13ab4e45270e6b37c4e22b734", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
<p> <div align="right"> <small> <br>November 24, 2017: seminar time <br>November 11-23, 2017: minor reviews <br>November 9, 2017: refutation methods <br>November 8, 2017: sets <br>November 7, 2017: init </small> </div> </p> ```python from IPython.display import Markdown, Image, Latex from collections import defaul...
{"hexsha": "c5c5d59c456857493dfda3206e3660d77ff56101", "size": 63954, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "PhD/mkpy/presentation.ipynb", "max_stars_repo_name": "massimo-nocentini/massimo-nocentini.github.io", "max_stars_repo_head_hexsha": "ec20ba27d15006ba5b3dbcf0a38f20231238e9ae", "max_s...
# coding: utf-8 # In[ ]: import numpy as np import pandas as pd import os from random import shuffle from tqdm import tqdm from skimage import io from scipy.misc import imresize import cv2 import tifffile as tiff import tflearn from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers...
{"hexsha": "0c5c6de266e5c8b637a9e98f7f94625fde0b142f", "size": 3492, "ext": "py", "lang": "Python", "max_stars_repo_path": "scrap/Keras-Cloud-Cover.py", "max_stars_repo_name": "cseale/kaggle-amazon-rainforests", "max_stars_repo_head_hexsha": "cf42941bb3c70ba19257764b66fe33550be88e0b", "max_stars_repo_licenses": ["Apach...
from centroidtracker import CentroidTracker import time import imutils import numpy as np import cv2 direction=None ct = CentroidTracker() (H, W) = (None, None) mean_value=(78.4263377603, 87.7689143744, 114.895847746) #mean_value=(104.0, 177.0, 123.0) age_list=['(0, 2)','(4, 6)','(8, 12)','(15, 20)','(25, 32)','(38, 4...
{"hexsha": "a7a6690c54350e9b7f7227838ec793ca3d7b4683", "size": 4785, "ext": "py", "lang": "Python", "max_stars_repo_path": "system.py", "max_stars_repo_name": "shahid92/Footfall-counting", "max_stars_repo_head_hexsha": "06ae4bd683010b70cc79ec5512ce2d0466161086", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
/** * @project identt * @file include/http/ServerRequest.hpp * @author S Roychowdhury <sroycode AT gmail DOT com> * @version 1.0.0 * * @section LICENSE * * Copyright (c) 2017 S Roychowdhury. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated do...
{"hexsha": "94158e4d2107fb2381bda1065c8d635c8e4f7bc0", "size": 2743, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/http/ServerRequest.hpp", "max_stars_repo_name": "sroycode/identt", "max_stars_repo_head_hexsha": "40bffa3d8db69c810c4d6707b9eb32f983539c99", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
def plot_rdm(rdm, mat=False, model=False, level=None, comp=None, cmap="Spectral_r"): ''' function to visualize RDM based rank transformed and scaled similarity values (only for plotting, raw/initial values remain unchanged) ''' from scipy.io.matlab import loadmat from scipy.stats import rankdat...
{"hexsha": "4cb710983c774590897a1aa1fd82f1a486d08c2b", "size": 11685, "ext": "py", "lang": "Python", "max_stars_repo_path": "urial/plotting/plots.py", "max_stars_repo_name": "adswa/URIAL", "max_stars_repo_head_hexsha": "6f93ab4169707cc1424a6dfe0c9f5df383be4438", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...