text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
require("SymbolicLP") using SymbolicLP using GLPK # Soft constraints lpb = LPBlock([:x]) addconstraints(lpb, :(soft(x < -3, 1))) z, x, flag = lpsolve(lpb) @assert x[1] <= -3.0 lpb = LPBlock([:x]) addconstraints(lpb, :(soft(x > 3, 1))) z, x, flag = lpsolve(lpb) @assert x[1] >= 3.0 lpb = LPBlock([:x]) addconstraints(lpb...
{"hexsha": "3c319f4a2f1c3a21d775327b0890b061b1eeb0c3", "size": 1746, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/symlp.jl", "max_stars_repo_name": "JuliaTagBot/SymbolicLP.jl", "max_stars_repo_head_hexsha": "d72a35dfd3d1015c96c3d6a13f80077901843a7a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import numpy as np from Scripts.PlayersProperties import defaultProperties from Scripts.regression import Regression import os import sys import time from copy import deepcopy class network: def __init__(self): self.count = 0 self.updateScore = False self.TeamAScore = 0 self.TeamB...
{"hexsha": "69eae1c84798cdf190166041709e6566f35ceda9", "size": 17887, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyfootball/Scripts/net.py", "max_stars_repo_name": "elishatofunmi/ReinEnv", "max_stars_repo_head_hexsha": "ad86203d3f4bddc7a8239cefdfa31c1a8e5e9af8", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import os import tifffile import numpy as np from copy import copy from merfishdecoder.util import imagereader from merfishdecoder.core import dataset class Frame(object): def __init__(self, dataSet, fov: int = None, zpos: float = None, readoutName: str = None): """ ...
{"hexsha": "a358bf3e7f70d08af51d7b9325d00ef60cc4f689", "size": 16021, "ext": "py", "lang": "Python", "max_stars_repo_path": "merfishdecoder/core/zplane.py", "max_stars_repo_name": "r3fang/MERlin", "max_stars_repo_head_hexsha": "2ee81a4e18c3fe406d91ee6ce65ca38b69ee9d68", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#include <szen/System/Config.hpp> #include <szen/System/ErrorStream.hpp> #include <json/json.h> #include <boost/algorithm/string.hpp> //#include <boost/filesystem.hpp> ///////////////////////////////////////////////// // DEFAULTS #define DEFAULT_FULLSCREEN 0 #define DEFAULT_RESOLUTION_FULLSCREEN Window::getOptim...
{"hexsha": "3625e408a5f6a29f1ae4bab882507bbbd9c54b5b", "size": 6851, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "code/szen/src/System/Config.cpp", "max_stars_repo_name": "Sonaza/scyori", "max_stars_repo_head_hexsha": "a894a9c7bd45a68ea1b6ff14877cdbe47ddd39cf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
{"hexsha": "5c3584da1d83bf706da6622e1cd2f9b66d24fba1", "size": 4396, "ext": "hh", "lang": "C++", "max_stars_repo_path": "src/fs/metadata_log_bootstrap.hh", "max_stars_repo_name": "rokinsky/seastar", "max_stars_repo_head_hexsha": "e935bc197c1acf81e7e0c3c6e78b735a95e8f2fa", "max_stars_repo_licenses": ["Apache-2.0"], "max...
#!/usr/bin/python # Copyright (c) 2019 Matthew Earl, Paulo Jarschel # # 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, c...
{"hexsha": "ac6dc45ecd7ece966d3f456cdc856c0a0a25ae9e", "size": 8968, "ext": "py", "lang": "Python", "max_stars_repo_path": "faceswaplib.py", "max_stars_repo_name": "pfjarschel/faceswapbot", "max_stars_repo_head_hexsha": "f8bc0f26874e04097a5e0a69f66dcdfcb2c4e31d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2...
\documentclass[12pt,a4paper]{article} %\title{Lab6-Lucene3(自定义Similarity)} \usepackage{ctex} \usepackage{amsmath,amscd,amsbsy,amssymb,latexsym,url,bm,amsthm} \usepackage{epsfig,graphicx,subfigure} \usepackage{enumitem,balance} \usepackage{wrapfig} \usepackage{mathrsfs,euscript} \usepackage[usenames]{xcolor} \usepackage...
{"hexsha": "b45c75044e2dc069b64440a51d680c97ccc6f6f9", "size": 3864, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "homeworks/hw2/hw2.tex", "max_stars_repo_name": "MadCreeper/information-theory-notes", "max_stars_repo_head_hexsha": "3156594807acd53c32946581714a953d54045a43", "max_stars_repo_licenses": ["MIT"], "m...
using Pkg Pkg.activate(joinpath(@__DIR__, "..")) using FoodCachingPlotting, Stipple, StippleUI, StipplePlotly, Genie, DataFrames, Random, PlotlyJS, FoodCachingExperiments, FoodCachingModels import FoodCachingExperiments: EXPERIMENTS, CLAYTON0103_EXPERIMENTS const M = FoodCachingModels Base.@kwdef mutable struct ...
{"hexsha": "a1ef5a3bf9dac1de7df61c98286061c86dfe44f9", "size": 12582, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "scripts/sim_dashboard.jl", "max_stars_repo_name": "jbrea/FoodCachingPlotting.jl", "max_stars_repo_head_hexsha": "0f95c0b93f507c16ca52f764c1b6239bff26b523", "max_stars_repo_licenses": ["MIT"], "max...
import numpy as np class MultinomialNaiveBayes: def __init__(self): self.initialize() def initialize(self): self.feature_probs = [] self.prior = [] self.classes = [] self.class_count = [] self.fitted = False self.feature_count = [] self.n_featu...
{"hexsha": "36fd7ce57023605447571784303b59a407bbc7b4", "size": 3012, "ext": "py", "lang": "Python", "max_stars_repo_path": "MNB.py", "max_stars_repo_name": "sebag90/spam_filter", "max_stars_repo_head_hexsha": "455309c02b6fa921b58111754a7fd2f3dd13271f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
import numpy as np # Write a function that takes as input a list of numbers, and returns # the list of values given by the softmax function. def softmax(L): soft_max = [] denom = np.sum(np.exp(L)) for i in range(len(L)): soft_max.append(np.exp(L[i])/denom) return soft_max
{"hexsha": "3ff8273be79ed673c11af379da98afd726453d62", "size": 298, "ext": "py", "lang": "Python", "max_stars_repo_path": "2_15_softmax.py", "max_stars_repo_name": "thejammerr/Deep-Learning-with-PyTorch", "max_stars_repo_head_hexsha": "393f7cee870ddb25b2e82457f102c3cc8fb9ef42", "max_stars_repo_licenses": ["MIT"], "max_...
fir_filter_sim/dspba_library_package.vhd fir_filter_sim/dspba_library.vhd fir_filter_sim/auk_dspip_math_pkg_hpfir.vhd fir_filter_sim/auk_dspip_lib_pkg_hpfir.vhd fir_filter_sim/auk_dspip_avalon_streaming_controller_hpfir.vhd fir_filter_sim/auk_dspip_avalon_streaming_sink_hpfir.vhd fir_filter_sim/auk_dspip_avalon_streami...
{"hexsha": "785f4065feb8dc2a1ec575b9582e41a6404ee80f", "size": 813, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "de1soc/hw/ip/source/fir_filter_ip/fir_filter_sim.f", "max_stars_repo_name": "Seba-P/signal-recon-project", "max_stars_repo_head_hexsha": "73951b32bff79ab65af3a909ded933b0deb1d52e", "max_stars_repo_...
import networkx as nx import numpy as np from HE2_ABC import Root import HE2_tools as tools from HE2_Solver import HE2_Solver def evalute_network_fluids_wo_root(_G, x_dict): assert not (Root in _G.nodes) for u, v in _G.edges: assert x_dict[(u, v)] >= 0 G = nx.DiGraph(_G) for (u, v) in x_dict:...
{"hexsha": "11fad87f99192d91da6650adaa0c9c057084de53", "size": 3250, "ext": "py", "lang": "Python", "max_stars_repo_path": "KirchhoffSolver/code/HE2_MixFluids.py", "max_stars_repo_name": "khabibullinra/unifloc", "max_stars_repo_head_hexsha": "7338c12788e3f3340bf8d1cb1db15d0471b62434", "max_stars_repo_licenses": ["MIT"]...
import numpy import sympy def max_coeff(poly): """ Computes the maximum width of a polynomial's coefficients. Arguments: poly -- the rational polynomial to analyze """ dom = poly.domain if isinstance(dom, sympy.polys.domains.IntegerRing): # Finds maximal element. return numpy.m...
{"hexsha": "d24cf8edc6290bf43395888943f449d1dd8620f8", "size": 1502, "ext": "py", "lang": "Python", "max_stars_repo_path": "symbaudio/utils/poly.py", "max_stars_repo_name": "ScottWe/symbaudio", "max_stars_repo_head_hexsha": "4797322acf340553cfd71ac3d63d62254735320e", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
[STATEMENT] lemma nonpos_Ints_cases: assumes "x \<in> \<int>\<^sub>\<le>\<^sub>0" obtains n where "x = of_int n" "n \<le> 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>n. \<lbrakk>x = of_int n; n \<le> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis [PROOF STEP] using assms [PROOF STATE]...
{"llama_tokens": 340, "file": null, "length": 3}
type BernoulliArm <: BanditArm p::Float64 end function draw(arm::BernoulliArm) if rand() > arm.p 0 else 1 end end
{"hexsha": "af01a24880417b589f18dc9ae45c892919b4abf7", "size": 131, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/arms/bernoulli.jl", "max_stars_repo_name": "rmminusrslash/BanditsBook", "max_stars_repo_head_hexsha": "b477b5a51c719f3725e0c0f05cb0ff7267bfc2f9", "max_stars_repo_licenses": ["MIT"], "max_stars...
from configuration import configuration from transformers import BertForMaskedLM, BertTokenizer, AutoConfig import numpy as np import torch import argparse from bias_utils import collate, how_many_tokens, find_mask_token import pandas as pd from model import Aligned_BERT from tqdm import tqdm parser = argparse.Argumen...
{"hexsha": "0d85fdee1656b7adba1d101d4f043dea5b6188b1", "size": 6574, "ext": "py", "lang": "Python", "max_stars_repo_path": "score.py", "max_stars_repo_name": "jaimeenahn/ethnic_bias", "max_stars_repo_head_hexsha": "a115eb7c3af7daf95309f3b4c1c7a564eb556190", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max...
""" Utilities for working with rating matrices. """ from collections import namedtuple import logging import warnings import pandas as pd import numpy as np import scipy.sparse as sps import numba as n from numba import njit, jitclass, prange from .util.array import swap _logger = logging.getLogger(__name__) Ratin...
{"hexsha": "0d2e1649a09b33ea74b9c1962e04b235d1f65cb6", "size": 18437, "ext": "py", "lang": "Python", "max_stars_repo_path": "lenskit/matrix.py", "max_stars_repo_name": "teej/lkpy", "max_stars_repo_head_hexsha": "06929c652319e5dede8d045a308a9721f03ab8a1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
[STATEMENT] lemma primepow_even_imp_primepow: assumes "primepow_even n" shows "primepow n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. primepow n [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. primepow n [PROOF STEP] from assms [PROOF STATE] proof (chain) picking this: primepow_even ...
{"llama_tokens": 914, "file": "Bertrands_Postulate_Bertrand", "length": 14}
import segmentation_models_pytorch as smp import numpy as np import torch from torchvision import datasets, transforms import torchvision.models as models import torch.nn as nn from torch.nn import CrossEntropyLoss from torch.utils.data import DataLoader, random_split from torchvision.transforms import ToTensor from to...
{"hexsha": "b22242bf29288c2f6930a25d55a207b0600577dc", "size": 12402, "ext": "py", "lang": "Python", "max_stars_repo_path": "ensemble/train.py", "max_stars_repo_name": "RuixinGuo/Image-Segmentation", "max_stars_repo_head_hexsha": "77f4c08f37316ee0f1c9a3bd79b422df81ad4df8", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma measurable_liminf [measurable (raw)]: assumes [measurable]: "\<And>n. A n \<in> sets M" shows "liminf A \<in> sets M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. liminf A \<in> sets M [PROOF STEP] by (subst liminf_SUP_INF, auto)
{"llama_tokens": 107, "file": null, "length": 1}
import pandas as pd import datetime as dt import numpy as np import matplotlib.pyplot as plt import finterstellar as fs pd.plotting.deregister_matplotlib_converters() font = 'NanumSquareRound, AppleGothic, Malgun Gothic, DejaVu Sans' class Visualize: today = '(' + pd.to_datetime('today').date().strft...
{"hexsha": "92f69018505272edddd06f5d95902f1f4fc37178", "size": 25112, "ext": "py", "lang": "Python", "max_stars_repo_path": "w2/finterstellar/visualization.py", "max_stars_repo_name": "finterstellar/lecture", "max_stars_repo_head_hexsha": "fb14fb1c6a842e2ee2f79b0225ac9f4d11c3ca47", "max_stars_repo_licenses": ["MIT"], "...
(* File: Arithmetic_Summatory_Asymptotics.thy Author: Manuel Eberl, TU München *) section \<open>Asymptotics of summatory arithmetic functions\<close> theory Arithmetic_Summatory_Asymptotics imports Euler_MacLaurin.Euler_MacLaurin_Landau Arithmetic_Summatory Dirichlet_Series_Analysis ...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Dirichlet_Ser...
''' ''' import os import pickle import numpy as np import pandas as pd from scipy.interpolate import interp1d from itertools import chain, combinations_with_replacement # -- astropy -- import astropy.units as u from astropy.time import Time # -- specsim -- import specsim from specsim.atmosphere import Moon # -- fe...
{"hexsha": "7931a3722bf89c0a6df78883174ad969b8290e26", "size": 27204, "ext": "py", "lang": "Python", "max_stars_repo_path": "feasibgs/skymodel.py", "max_stars_repo_name": "changhoonhahn/feasiBGS", "max_stars_repo_head_hexsha": "b5f535f12cf64babc9e25bcec75edd45d8668f74", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma lincomb_0coeffs : "set ms \<subseteq> M \<Longrightarrow> \<forall>s\<in>set rs. s = 0 \<Longrightarrow> rs \<bullet>\<cdot> ms = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>set ms \<subseteq> M; \<forall>s\<in>set rs. s = (0::'r)\<rbrakk> \<Longrightarrow> rs \<bullet>\<cdot> ms = (...
{"llama_tokens": 351, "file": "Rep_Fin_Groups_Rep_Fin_Groups", "length": 2}
v = read.table(file("results.log")) t <- data.frame(readers=v[,1], writers=v[,2], distribution=v[,3], variant=v[,4], opss=v[,5], op=v[,7]) library(plyr) t$writers = as.factor(t$writers) t$readers = as.numeric(t$readers) # split the data into tx/readers and tx/refresh compare_impl = t[grep("evmap-refresh", t$variant, ...
{"hexsha": "5c22e41432979b4fe85a15dcd85a79d3f54ea9eb", "size": 2691, "ext": "r", "lang": "R", "max_stars_repo_path": "benchmark/plot.r", "max_stars_repo_name": "benbromhead/rust-evmap", "max_stars_repo_head_hexsha": "d4c12b8758c7e35145c40856f3d3474befe6ecda", "max_stars_repo_licenses": ["Apache-2.0", "MIT"], "max_stars...
import numpy as np import os import glob import csv import shutil import tqdm as tq from utils import * # class Sensor(tb.IsDescription): # number = tb.Int32Col() # id = tb.StringCol(100) # lat = tb.Float64Col() # lon = tb.Float64Col() rootPath = os.path.expanduser('~/data/storage/cense/confy/') inputPath = ...
{"hexsha": "beefbb7976e0942ac42b6da2f37d33872701f0d3", "size": 2832, "ext": "py", "lang": "Python", "max_stars_repo_path": "prepareDataNpy.py", "max_stars_repo_name": "mathieulagrange/confy", "max_stars_repo_head_hexsha": "dd6a7e05a19b2d2e465fd781853a90bf743adbcc", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from unittest.mock import Mock import numpy as np import pandas as pd import pytest import pytz from qstrader.signals.sma import SMASignal @pytest.mark.parametrize( 'start_dt,lookbacks,prices,expected', [ ( pd.Timestamp('2019-01-01 14:30:00', tz=pytz.utc), [6, 12], ...
{"hexsha": "bc7b7b6b22c09427a3dd303a90f49e353e5e1f4d", "size": 1058, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/signals/test_sma.py", "max_stars_repo_name": "calumrussell/qstrader", "max_stars_repo_head_hexsha": "826d3eeb63b95b9d8587f5e2152c030f2c57bbba", "max_stars_repo_licenses": ["MIT"], "max_...
################################################################################ # # config.py (c) Cameron Liang # University of Chicago # jwliang@oddjob.uchicago.edu # # Read in and define all of the parameters for voigt profile based on a # config file; see ./scripts/bvp_write_config.py for produci...
{"hexsha": "d7da858356db776daeab06cf2abc56095e22a5c4", "size": 22518, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayesvp/config.py", "max_stars_repo_name": "ais97/bayesvp", "max_stars_repo_head_hexsha": "dedf38dd7236f040301a84e5578f7202a2da07aa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
import numpy as np import json from ageta import * vae,encoder,decoder=getvaeq() def clean(q): if type(q) is dict: for key in q.keys(): q[key]=clean(q[key]) return q if type(q) is list: for i in range(len(q)): q[i]=clean(q[i]) return q return str(q) def traf(q): ll=q.layers ...
{"hexsha": "a820386e454abe1ca989a83cdfd00c96f9d64968", "size": 575, "ext": "py", "lang": "Python", "max_stars_repo_path": "not_so_weird/oneoff/exportmodel.py", "max_stars_repo_name": "psorus/anogen", "max_stars_repo_head_hexsha": "86afc22718aded00bbc05e4582fa0a9b6aa3ab25", "max_stars_repo_licenses": ["MIT"], "max_stars...
import logging import time import numpy as np import matplotlib.pyplot as pt from keysight_fpga.sd1.fpga_utils import print_fpga_info from keysight_fpga.sd1.dig_iq import load_iq_image from keysight_fpga.qcodes.M3202A_fpga import M3202A_fpga from core_tools.drivers.M3102A import SD_DIG, OPERATION_MODES from pulse_li...
{"hexsha": "6789350f3425b15883204101c0fd0a3f3895f015", "size": 6307, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/hvi2/test_single_shot_rf.py", "max_stars_repo_name": "peendebak/core_tools", "max_stars_repo_head_hexsha": "2e43edf0bbc1d7ceb7042559db499535e8f6a076", "max_stars_repo_licenses": ["BSD-2-C...
module Splines using EllipsisNotation include("Utils.jl") include("Polynomials.jl") include("Visuals.jl") import .Polynomials: bernstein, N_basis import .Visuals: plot_curve, plot_nodes, plot_surface import .Utils: get_curve_parameters, ∑, dimensions, nnodes export plot_curve, plot_no...
{"hexsha": "f88b8af3c568470452293d6c2348dd1270a4d97c", "size": 12160, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Splines/src/Splines.jl", "max_stars_repo_name": "FedeClaudi/Splines", "max_stars_repo_head_hexsha": "a475aa4e423b4efe71363a5833a1709a7d59b6ba", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
### A Pluto.jl notebook ### # v0.12.21 using Markdown using InteractiveUtils # ╔═╡ b6b1b198-7bd8-11eb-10f5-a98dd0a59fcf begin cd("..") using Pkg Pkg.activate(".") end # ╔═╡ 594227e6-7bd9-11eb-3ffb-ab8e6e7b4d95 begin using ColabINAOE2021 using PyPlot using SparseArrays using LinearAlgebra end # ╔═╡ 2141105e-7...
{"hexsha": "53cb8a0c02cf08f4c49f99359bd61aa1eaf3bea4", "size": 3554, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/MArrays_Pluto.jl", "max_stars_repo_name": "rurz/ColabINAOE2021", "max_stars_repo_head_hexsha": "539bf6ea662a95706734958663dc5bca278d5298", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
module Functional using LinearAlgebra: Matrix, zero, similar using LinearAlgebra, Printf # using Roots # using Optim using Quadmath # using ProfileView # using InteractiveUtils using ..Discrete # const Float = Float64 # const Float = BigFloat const Float = Float128 include("kernel.jl") include("findmax.jl") # us...
{"hexsha": "f783d4cd0768c4d41e642ffb827fefc789bf23e5", "size": 10301, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/functional/builder.jl", "max_stars_repo_name": "numericalEFT/Lehmann.jl", "max_stars_repo_head_hexsha": "058a505d1bb8590bb20ffd053976798373d977de", "max_stars_repo_licenses": ["MIT"], "max_sta...
function [priormeans,posteriormeans,covmatrix] = gpnddisimPredictRNAOnly(model,predtimes); % GPASIMPREDICT Compute predictions (means and a covariance matrix) % of RNA values for the GPASIM model, conditional on the existing % RNA values in the model but not on any existing POL2 values. % % FORMAT %-------------------...
{"author": "SheffieldML", "repo": "GPmat", "sha": "4b5914a38ecbad9fb7a13a3392970bfc28c9d911", "save_path": "github-repos/MATLAB/SheffieldML-GPmat", "path": "github-repos/MATLAB/SheffieldML-GPmat/GPmat-4b5914a38ecbad9fb7a13a3392970bfc28c9d911/gpsim/gpnddisimPredictRNAOnly.m"}
# This example is written for the new interface # This is the full COVID-19 model to be fitted to the RKI data # see the PPT for details of the model design import StateModeling as stm import numpy as np import matplotlib.pyplot as plt # import tensorflow as tf from Corona.LoadData import loadData, preprocessData from...
{"hexsha": "edde5f9dc6804dd269fe2c5442240f4d18e04644", "size": 4906, "ext": "py", "lang": "Python", "max_stars_repo_path": "Examples/FitCorona.py", "max_stars_repo_name": "RainerHeintzmann/StateModeling", "max_stars_repo_head_hexsha": "051826783954c8421b0de341ba6241b33c43af79", "max_stars_repo_licenses": ["MIT"], "max_...
import pickle import numpy as np import os import sys from collections import defaultdict from tqdm import tqdm sys.path.append('..') from config import get_configs, experiment_path, data_path sys.path.append('..') from config import experiment_path class Vocab(object): def __init__(self, size): ...
{"hexsha": "2e2a75ad26814651eca858e2a6ddd4670f996a25", "size": 3628, "ext": "py", "lang": "Python", "max_stars_repo_path": "train/data.py", "max_stars_repo_name": "jiali-ms/JLM", "max_stars_repo_head_hexsha": "ca7325cfcc6ed56469a90e8eca59b1e79e0cba9e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 128, "max_st...
[STATEMENT] lemma PO_m1_refines_m1a [iff]: "refines R1a1 med1a1 m1a m1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. refines R1a1 med1a1 m1a m1 [PROOF STEP] by (rule Refinement_basic) (auto del: subsetI)
{"llama_tokens": 104, "file": "Security_Protocol_Refinement_Key_establish_m1_ds", "length": 1}
import numpy as np import pandas as pd import scipy from sklearn import metrics from FPMax import FPMax from Apriori import Apriori from scipy.cluster.hierarchy import fcluster from scipy.cluster.hierarchy import linkage # MASPC algorithm class MASPC(): def __init__(self,demographic,dignosisCodes): self.de...
{"hexsha": "1cbfc1362635b7e2fd966e15c95afae959cca98b", "size": 4031, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/MASPC.py", "max_stars_repo_name": "dominicamartinez/clustehr", "max_stars_repo_head_hexsha": "0ce893a666974674fad36591f0156bd720910b4d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import keras import librosa import os import cv2 import numpy as np from keras.models import model_from_json from keras.preprocessing import image from config import EXAMPLES_PATH import os os.environ["IMAGEIO_FFMPEG_EXE"] = "/usr/bin/ffmpeg" import moviepy.editor import sys import shutil import subprocess class audio...
{"hexsha": "f973da6a1dc403a2e36dff98b491a63e252fefd2", "size": 4599, "ext": "py", "lang": "Python", "max_stars_repo_path": "multimodalDetection/multimodalPredictions.py", "max_stars_repo_name": "Rubik90/TFM_AG", "max_stars_repo_head_hexsha": "5e836245d0704122f2a0d47413e93bf53d966ca0", "max_stars_repo_licenses": ["MIT"]...
(* Title: HOL/HOLCF/IOA/NTP/Correctness.thy Author: Tobias Nipkow & Konrad Slind *) section \<open>The main correctness proof: Impl implements Spec\<close> theory Correctness imports Impl Spec begin definition hom :: "'m impl_state => 'm list" where "hom s = rq(rec(s)) @ (if rbit(rec s) = sbit(sen ...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/HOLCF/IOA/NTP/Correctness.thy"}
import numpy as np class zigzag_tubes(object): def __init__(self,nr_t,l,area): self.A_tot = area*np.ones(nr_t, dtype=np.float) self.l = l*np.ones(nr_t, dtype=np.float)
{"hexsha": "335dcc2295901b6910db423f07c307edff1c7f73", "size": 194, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_dp/simulation/zigzag_tubes.py", "max_stars_repo_name": "amirdel/dispersion-continua", "max_stars_repo_head_hexsha": "2e1f7a3fbfcdc0b27c546cb0ae51a628a926ad60", "max_stars_repo_licenses": ["0BSD"...
[STATEMENT] lemma le_sup_equiv2: "(a \<le> b) = (a \<squnion> b = b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (a \<le> b) = (a \<squnion> b = b) [PROOF STEP] by (rule sup1_dual.le_sup_equiv)
{"llama_tokens": 99, "file": "PseudoHoops_PseudoHoops", "length": 1}
#= test_collater: - Julia version: 1.1.0 - Author: bramb - Date: 2019-03-18 =# using Test using HyperCollate,MetaGraphs include("util.jl") @testset "collater" begin @testset "collating 2 xml texts" begin include("util.jl") f_xml = """ <text> <s>Hoe zoet moet nochtans zijn dit...
{"hexsha": "b2131baa2f1ee8ad6be7c22e9c594f25d9793015", "size": 1683, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_collater.jl", "max_stars_repo_name": "bleekere/HyperCollate.jl", "max_stars_repo_head_hexsha": "3caf51a4817dffa98b44d404639b0aab485eae32", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
#module LinearPredict export linPred,linPred2 function Toeplitz(a::Array{Complex{Float64},1}) m=length(a) T=[(k>=l) ? a[1+mod(k-l,m)] : conj(a[1+mod(l-k,m)]) for k=1:m,l=1:m] return(T) end function autoCorr(a::Array{Complex{Float64},1},p::Int64) c=zeros(Complex{Float64},p) for...
{"hexsha": "cf38b3951130cde15a6b5f86099ce19c8fa71784", "size": 987, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/LinearPredict.jl", "max_stars_repo_name": "marcel-utz/NMR", "max_stars_repo_head_hexsha": "3fddc374a9c3c5127fb3e8e16402fbbb91319215", "max_stars_repo_licenses": ["IJG"], "max_stars_count": null,...
\documentclass[conference]{IEEEtran} \pdfoutput=1 \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{xcolor} \usepackage{url} \usepackage{flushend} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower....
{"hexsha": "af237ab9e42956276f725b4a8b2b2b153f034d01", "size": 15444, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Leon-the-dark-side-of-unikernels.tex", "max_stars_repo_name": "leonm1/unikernel-research-2020", "max_stars_repo_head_hexsha": "abe09db995668dda8947efbe6a73d302a366a237", "max_stars_repo_licenses": ...
function ecephyscache() ecephys_project_cache.EcephysProjectCache.from_warehouse(manifest=ecephysmanifest) end # These will take a while to download function getsessiontable() @info "Please wait, this can take a few seconds" CSV.read(IOBuffer(ecephyscache().get_session_table().to_csv()), DataFrame); end ex...
{"hexsha": "94640706bd54ac1e93082457bb18e90829050dfb", "size": 6517, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/EcephysCache.jl", "max_stars_repo_name": "brendanjohnharris/AllenNeuropixels.jl", "max_stars_repo_head_hexsha": "26156723c95e82cad6ceca2c5550d8790eb3a7bf", "max_stars_repo_licenses": ["MIT"], "...
% % API Documentation for QSTK % Module QSTK.qstklearn.hmm % % Generated by epydoc 3.0.1 % [Mon Mar 5 00:49:20 2012] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Module Description %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
{"hexsha": "29e4c4125d59b4f3a19c3fbff601c94d710695a4", "size": 12758, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Docs/pdf/QSTK.qstklearn.hmm-module.tex", "max_stars_repo_name": "elxavicio/QSTK", "max_stars_repo_head_hexsha": "4981506c37227a72404229d5e1e0887f797a5d57", "max_stars_repo_licenses": ["BSD-3-Clause...
using ActorInterfaces.Classic using Test struct Spawner end struct SpawnTree childcount::UInt8 depth::UInt8 end @ctx function (me::Spawner)(msg::SpawnTree) if msg.depth > 0 for i = 1:msg.childcount child = spawn(Spawner()) send(child, SpawnTree(msg.childcount, msg.depth - ...
{"hexsha": "c1769764e7f0af65a7a025079385ccb528eeeee7", "size": 964, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/suite/spawner.jl", "max_stars_repo_name": "JuliaActors/ActorInterfacesTests.jl", "max_stars_repo_head_hexsha": "0edf44b8a6e99f2707e908d430e3c622bc5101b0", "max_stars_repo_licenses": ["MIT"], "ma...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 1 19:22:38 2020 @author: sankha """ ''' Compute the following cluster validation indices: Silhouette index, Dunne Index, Davies Bouldin Index ''' # Import Libraries import math import random from urllib.request import urlretrieve import pandas...
{"hexsha": "c4c25f1c2b09ed3ef5e26ac11206c209123ae760", "size": 7406, "ext": "py", "lang": "Python", "max_stars_repo_path": "2nd.py", "max_stars_repo_name": "Sankha98/Data-Mining", "max_stars_repo_head_hexsha": "05f9e6bd9e88202231bb0a4add51da862f76cdcd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
from openmdao.api import Component, Group, IndepVarComp import numpy as np import pyframe3dd.frame3dd as frame3dd from commonse.utilities import nodal2sectional from commonse import gravity, eps, Tube, NFREQ import commonse.UtilizationSupplement as util import commonse.manufacturing as manufacture from commonse.WindW...
{"hexsha": "b813242d5965386cb6046c1f42c22cda8e611be3", "size": 72320, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/floatingse/loading.py", "max_stars_repo_name": "mattEhall/FloatingSE", "max_stars_repo_head_hexsha": "f13e0f38a7742ea00a8f446a9ebf505dcf7acd42", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
""" Fits PSPL model with parallax ground-based and satellite data using EMCEE sampler. We're using photometry of OGLE-2014-BLG-0939 from: Yee et al. 2015 ApJ 802, 76 https://ui.adsabs.harvard.edu/abs/2015ApJ...802...76Y/abstract and explore only 1 of 4 degenerate models. It is similar to example_06_fit_parallax_EMCE...
{"hexsha": "57f02c0d3bcec16d6b5d386575b1f1467349638b", "size": 4765, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_12_fit_satellite_parallax_EMCEE.py", "max_stars_repo_name": "pmehta08/MulensModel", "max_stars_repo_head_hexsha": "261738c445a8d116d09c90e65f6e847cfc8a7ad8", "max_stars_repo_licen...
(*-------------------------------------------* | The Dining Mathematicians in CSP-Prover | | August 2004 | | December 2004 (modified) | | November 2005 (modified) | | A...
{"author": "yoshinao-isobe", "repo": "CSP-Prover", "sha": "806fbe330d7e23279675a2eb351e398cb8a6e0a8", "save_path": "github-repos/isabelle/yoshinao-isobe-CSP-Prover", "path": "github-repos/isabelle/yoshinao-isobe-CSP-Prover/CSP-Prover-806fbe330d7e23279675a2eb351e398cb8a6e0a8/DM/DM1_Imp_def.thy"}
import QuantumOptics const qo = QuantumOptics using Test, IonSim using Suppressor @suppress_err begin # setup system C = Ca40(["S-1/2", "D-1/2"]) chain = LinearChain( ions=[C, C], com_frequencies=(x=2,y=2,z=1), vibrational_modes=(x=[1], y=[], z=[1]) ) T = Trap(configuration=chain) modes = get_vibrational_modes(...
{"hexsha": "9c57e296379b96bb1d8a8771b4f77ebf786e647b", "size": 4655, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_operators.jl", "max_stars_repo_name": "HaeffnerLab/IonSim.jl", "max_stars_repo_head_hexsha": "884b0196ace4623e91bcd957f293d26d6723c071", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#! /usr/bin/env python DESCRIPTION = 'pyPanair: A pre / post processor for PANAIR' DISTNAME = 'pyPanair' MAINTAINER = 'STakanashi' LICENSE = 'MIT' DOWNLOAD_URL = 'https://github.com/SaTa999/pyPanair' VERSION = '0.8.0' try: from setuptools import setup _has_setuptools = True except ImportError: ...
{"hexsha": "bc723b91ae8985647718dd439fc38030c3c6bedf", "size": 1592, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "SaTa999/pyPanair", "max_stars_repo_head_hexsha": "49c987d92a447903ac28cc19da8ad91aa5843466", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "max_star...
```python import numpy as np import sympy as sym import numba import pydae.build as db ``` ```python ``` ### Electromechanical differential equations \begin{eqnarray} f_1 &=& \dot \delta = \Omega_b \left( \omega - \omega_s \right) \\ f_2 &=& \dot \omega = \frac{1}{2H} \left( p_m - p_e - D \left( \omega - \omega_...
{"hexsha": "f0ade8db3777cd0ee89114bfd0eb1830c560ff44", "size": 6883, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/grids/smib_milano_ex8p1/iso_milano_ex8p1_4ord_uctrl/iso_milano_ex8p1_4ord_uctrl_builder.ipynb", "max_stars_repo_name": "pydae/pydae", "max_stars_repo_head_hexsha": "8076bcfeb...
""" Reimplements distillator.py with a callback-based interface. Author: Dominic Jack Date: May 2020 """ import itertools import time from typing import Dict, Iterable, List, Optional, Sequence, Union import numpy as np import tensorflow as tf import tqdm from rlo import analytics from rlo import distillator from rlo...
{"hexsha": "6f53395648e9f1443e95177c10b7b63adb9d4cdc", "size": 9512, "ext": "py", "lang": "Python", "max_stars_repo_path": "rlo/src/rlo/distillator_v2.py", "max_stars_repo_name": "tomjaguarpaw/knossos-ksc", "max_stars_repo_head_hexsha": "8fa75e67c0db8f632b135379740051cd10ff31f2", "max_stars_repo_licenses": ["MIT"], "ma...
push!(LOAD_PATH, "Modules") using Colors using JuliRay φ=MathConstants.φ Base.@irrational ° 0.0174532925199432957692369076848861271344 (big(pi)/big(180)) function POLYGON2(vertices,O,R;r1=1.0,r2=0.05,r3=0.025) n=length(vertices) C=O+R*normalize(+(vertices...)/n-O) V=rgbColor(csgUnion((p->Sphere(p,r2)).(v...
{"hexsha": "b43d7a9d3a24ec1ed2a16acdc9c4f9e6efe93cba", "size": 5566, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Examples/NetOfPolyhedra/NetOfPolyhedra.jl", "max_stars_repo_name": "hyrodium/JuliRay", "max_stars_repo_head_hexsha": "178ea03571ea0852294d24a2277ac26d630880b3", "max_stars_repo_licenses": ["MIT"], ...
""" _tmap(f, xs...) An internal helper for `tmap` that handles the `basesize == 1` case. """ function _tmap(f, xss...) # Set the number of threads that BLAS uses to 1 here in case it's using up too many nthreads() > 1 && LinearAlgebra.BLAS.set_num_threads(1) futures = map(xss...) do x... Thread...
{"hexsha": "35409da04808fe172ec4f84177f8cf6d71c483ea", "size": 2290, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/tmap.jl", "max_stars_repo_name": "invenia/Parallelism.jl", "max_stars_repo_head_hexsha": "d5b8a82828b68bf7823ca208987c0a03b23e81f5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "m...
#!/usr/bin/env python3 """ Unit and regression test for data_proc.py """ import errno import os import sys import unittest from contextlib import contextmanager from io import StringIO import pandas as pd import numpy as np import logging from otu_proj.data_proc import main, data_process_analysis logging.basicConfig(l...
{"hexsha": "248cc213023d92886cef02702fc2ca9dad47ab89", "size": 5020, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_otu_proj.py", "max_stars_repo_name": "chechung/otu_proj", "max_stars_repo_head_hexsha": "dc68b9708c36901c696c61c84f8283f69f9c08ea", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import glob from time import time from keras.callbacks import EarlyStopping, ModelCheckpoint from keras.callbacks import TensorBoard from keras.optimizers import RMSprop from numpy.random import seed from sklearn.model_selection import StratifiedKFold from keras.models import load_model from keras. models import Model...
{"hexsha": "982e4524cc5011a46f035a311e10998e867f3df6", "size": 12159, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "jaist-kotani-lab/DeepSaliencyInCrowd", "max_stars_repo_head_hexsha": "d9c47fc6e2acfc37ffbc50e473e8e48f854ff268", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" module Datasets Commonly used datasets and utilities for creating data containers. In the future, contents will be integrated into packages: - FastAI datasets and data containers will be moved into MLDatasets.jl - data container transformations will be moved to MLDataPattern.jl This submodule will then reex...
{"hexsha": "749261b0d822c7b9bed04c6e1a7d4e653bd4def1", "size": 1549, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datasets/Datasets.jl", "max_stars_repo_name": "inferential/FastAI.jl", "max_stars_repo_head_hexsha": "3a017af061a1125231fe7d7a4ec98da0a255d781", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
"""Generate the API for symbolic multicomponent enrichment using sympy. Note that there is a bug in sympy v0.7.2 that prevents the cse() function from being used with infinities. For a work around see [1]. 1. https://groups.google.com/forum/#!msg/sympy/YL1R_hR6OKQ/axKrCsCSMQsJ """ from __future__ import print_functio...
{"hexsha": "bc7ecb72c3fc1f63353e3a51e74c97fe3cd27cd1", "size": 14636, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyne/apigen/enrich_multi_sym.py", "max_stars_repo_name": "ypark234/pyne", "max_stars_repo_head_hexsha": "b7c4932c0399e6a0881aea943b392fb97cd0b6bd", "max_stars_repo_licenses": ["MIT"], "max_stars_...
# -*- coding: utf-8 -*- """~ @author: yanral """ import sabs_pkpd import pints import numpy as np import os # Select the folder in which this repo is downloaded in the line below os.chdir('The/location/of/the/root/folder/of/this/repo') # Set the parallelisation of the script parallel = True # Load the MMT model for...
{"hexsha": "9378b8b32de2486e23f9941f35dc01ba39bea67d", "size": 10493, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/Fitting ORd-CiPA/Fitting with OHara initial conditions.py", "max_stars_repo_name": "CardiacModelling/Gamma_0", "max_stars_repo_head_hexsha": "05c7e16088656b343d3aa347df88fd3dd58cea87", "m...
using CUDA using ExaPF using KernelAbstractions using Test using TimerOutputs import ExaPF: PowerSystem import ExaPF.PowerSystem: ParsePSSE const PS = PowerSystem @testset "Powerflow residuals and Jacobian" begin local_case = "case14.raw" # read data to = TimerOutputs.TimerOutput() datafile = joinpat...
{"hexsha": "139953173222ec3b6583fcac408fea9c241d6b4e", "size": 5265, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/powersystem.jl", "max_stars_repo_name": "exanauts/ExaPF.jl", "max_stars_repo_head_hexsha": "cd1bcb8a0782fe448d46a10816f82c5d28c3854e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 43...
# # This file is part of the profilerTools suite (see # https://github.com/mssm-labmmol/profiler). # # Copyright (c) 2020 mssm-labmmol # # 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 withou...
{"hexsha": "582c9d2c15d8117cacb1330014852274d2bb068d", "size": 3515, "ext": "py", "lang": "Python", "max_stars_repo_path": "profilerTools/randomizer.py", "max_stars_repo_name": "mssm-labmmol/profiler", "max_stars_repo_head_hexsha": "6c4a508cd656a8cdf05ab3db19680e6239296a88", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- """@package Methods.Machine.MagnetType14.build_geometry MagnetType14 build_geometry method @date Created on Wed Dec 17 16:09:15 2014 @copyright (C) 2014-2015 EOMYS ENGINEERING. @author pierre_b """ from numpy import angle, exp from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.Segmen...
{"hexsha": "4f267f205b0da9bcd03d483ca4b23cebaff285a2", "size": 3363, "ext": "py", "lang": "Python", "max_stars_repo_path": "Methods/Machine/MagnetType14/build_geometry.py", "max_stars_repo_name": "Superomeg4/pyleecan", "max_stars_repo_head_hexsha": "2b695b5f39e77475a07aa0ea89489fb0a9659337", "max_stars_repo_licenses": ...
import numpy as np from scipy import optimize class SteelSection: """a""" def __init__(self, code, props): """a""" self.code = code self.area = props[0] self.mass = props[1] self.ixx = props[2] self.zxx = props[3] self.sxx = props[4] self.rx = ...
{"hexsha": "2058e6dfa06a6d37ba1151e86ebe8b4288cd7899", "size": 8703, "ext": "py", "lang": "Python", "max_stars_repo_path": "steeldesign/sections.py", "max_stars_repo_name": "robbievanleeuwen/steeldesign", "max_stars_repo_head_hexsha": "4a2351c7d922a4f0f379b413ecca17b672be1c6e", "max_stars_repo_licenses": ["MIT"], "max_...
# -*- coding: utf-8 -*- """ trim image to create sub images Author : Yuki Kumon Last Update : 2019-11-15 """ import sys sys.path.append('.') from misc.dependences.attr_dict import AttributeDict from misc.dependences.File_util import File_util import yaml import os import csv import numpy as np import cv2 ...
{"hexsha": "880872fa96a054fc0bed76b9a4570287c9fcde81", "size": 2628, "ext": "py", "lang": "Python", "max_stars_repo_path": "misc/create_subimage.py", "max_stars_repo_name": "Yuki-Kumon/PSMNet", "max_stars_repo_head_hexsha": "c47a9e6edb885e76fc6a6d399f5ec42c65133d85", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import numpy as np import kmeans import common import naive_em import em X = np.loadtxt("toy_data.txt") # TODO: Your code here # for K in [1,2,3,4]: # for seed in [0,1,2,3,4]: # mixture,post=common.init(X, K, seed) # mixture, post, cost=kmeans.run(X,mixture,post) # common.plot(X,mixture...
{"hexsha": "2a96b605630a5e4d56fbbd6a6840963b201cc254", "size": 4145, "ext": "py", "lang": "Python", "max_stars_repo_path": "mit-ml/netflix/main.py", "max_stars_repo_name": "stepinski/machinelearning", "max_stars_repo_head_hexsha": "1f84883a25616da4cd76bb4655267efd3421e561", "max_stars_repo_licenses": ["MIT"], "max_star...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: vis # Purpose: # # Authors: Maik Heistermann # # Created: 2015-11-6 # Copyright: (c) Maik Heistermann # Licence: The MIT License #---------------------------------------------------...
{"hexsha": "eefae7f85bb930e309056ca8415bb325fc25d608", "size": 11938, "ext": "py", "lang": "Python", "max_stars_repo_path": "trmmlib/vis.py", "max_stars_repo_name": "heistermann/trmmlib", "max_stars_repo_head_hexsha": "b32cf623737285073e4c61bd0e01a0fe8b26c329", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
# -*- coding: utf-8 -*- """ Created on Fri Aug 11 09:55:19 2017 @author: Elizabeth Ferriss Show all FTIR spectra and baselines used for H diffusion in olivine GCA paper """ from olivine.SanCarlos import SanCarlos_spectra as SC from olivine.KilaueaIki import Kiki_spectra as kiki from matplotlib.backends.backend_pdf im...
{"hexsha": "be19fc93fc80994bbdc309114662a311e0112e11", "size": 8528, "ext": "py", "lang": "Python", "max_stars_repo_path": "olivine/old_and_exploratory/Ferriss_Supplement_estimates.py", "max_stars_repo_name": "EFerriss/olivine", "max_stars_repo_head_hexsha": "78cb3c7664d4dce284cf5096775cdf1e40463f91", "max_stars_repo_l...
import os, sys import cv2 import numpy as np import torch from PIL import Image from sklearn.cluster import DBSCAN from dface import MTCNN, FaceNet device = 'cuda' if torch.cuda.is_available() else 'cpu' def get_frames(video): frames = [] vid = cv2.VideoCapture(video) total = int(vid.get(cv2.CAP_PROP_FRAME_COUNT...
{"hexsha": "7d75f8bc4e056436bf037066b43c9ad0360a4e2f", "size": 2234, "ext": "py", "lang": "Python", "max_stars_repo_path": "example.py", "max_stars_repo_name": "deepware/dFace", "max_stars_repo_head_hexsha": "3471ce8f40fe41d17669f67dba3f88768cde0815", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 13, ...
/*! * @file * This file contains unit tests for `boost::mpl::sequence_facade`. */ #include <boost/mpl/sequence_facade.hpp> #include <boost/mpl/begin.hpp> #include <boost/mpl/empty.hpp> #include <boost/mpl/end.hpp> #include <boost/mpl/front.hpp> #include <boost/mpl/size.hpp> #include <boost/mpl/vector.hpp> #include ...
{"hexsha": "bfb9bb757e6e7fce8187a828124636274c13956a", "size": 903, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/sequence_facade.cpp", "max_stars_repo_name": "ldionne/mpl_extensions", "max_stars_repo_head_hexsha": "ca728992567b96dad884be1658b0822a955174cc", "max_stars_repo_licenses": ["BSL-1.0"], "max_star...
import numpy as np import nipype.pipeline.engine as pe import nipype.interfaces.utility as util from PyBASC.basc import ( group_dim_reduce, nifti_individual_stability, map_group_stability_random_bootstrap, join_group_stability, individual_group_clustered_maps, post_analysis, ndarray_to_vol ...
{"hexsha": "84b2e76d84ae55abf3ea46d895bd76be77edbf30", "size": 28722, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyBASC/pipeline.py", "max_stars_repo_name": "AkiNikolaidis/BASC", "max_stars_repo_head_hexsha": "07ac80c1a22df84db8bdd30b09b881cecc8caf1d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Nov 30 17:11:02 2021 @author: qcao sketch of rod plate model and skeleton code for PyChrono Useful links: https://github.com/projectchrono/chrono/blob/03931da6b00cf276fc1c4882f43b2fd8b3c6fa7e/src/chrono/fea/ChElementShellBST.cpp """ # the u...
{"hexsha": "d9d5b80dd180c43f90d3d6c41e0986812dcd51d4", "size": 8942, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/test_20211130_rod_plate_models.py", "max_stars_repo_name": "qiancao/BoneBox", "max_stars_repo_head_hexsha": "0d10dac7c93f16f0643bebc62c63be2f4bd099f6", "max_stars_repo_licenses": ["BSD-3-...
%function ind = MS_nearest(x,tau,v); % % returns the row vector containing the indicies of the nearest % neighbours to each of the columns of x. Each point and its tau % temporal neighbours are excluded from the search. % v is an array (not necessarily logical) indicating which columns of x to % use or, the relative i...
{"author": "benfulcher", "repo": "hctsa", "sha": "919f2aed7cc8e1a3a03304c1ade573fa664c73f8", "save_path": "github-repos/MATLAB/benfulcher-hctsa", "path": "github-repos/MATLAB/benfulcher-hctsa/hctsa-919f2aed7cc8e1a3a03304c1ade573fa664c73f8/Toolboxes/Michael_Small/MS_nearest.m"}
[STATEMENT] lemma termination_0_1: assumes p: "\<And>s. guard s \<Longrightarrow> p \<le> weight_spmf (while s)" and p_pos: "0 < p" and lossless: "\<And>s. guard s \<Longrightarrow> lossless_spmf (body s)" shows "lossless_spmf (while s)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lossless_spmf (local...
{"llama_tokens": 11727, "file": "Probabilistic_While_While_SPMF", "length": 74}
import configparser import os import sys import netCDF4 as nc import numpy as np from helperFunctions import temperature_array_from_result from helperFunctions import surface_temperature_array_from_result DEPTH = 10 def print_results(section, temp_mean, temp_max, temp_min, temp_std_dev): print('Mean temp of {}:...
{"hexsha": "3c41b50cf636908653e4cc66f362e7103c1fa25c", "size": 13733, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/MRIDataPBHEqnFDM/postProcessing.py", "max_stars_repo_name": "nih23/MRIDrivenHeatSimulation", "max_stars_repo_head_hexsha": "de6d16853df1faf44c700d1fc06584351bf6c816", "max_stars_repo_lic...
import numpy as np import pandas as pd class Population(): """docstring for Population""" def __init__(self, population=None, #можно передать конкретную популяцию population_size=10, #размер популяции random_state=42, #фиксируем seed, если инициализируется с...
{"hexsha": "b37d796668e70639a263dd6347a0ff50f9176a09", "size": 6359, "ext": "py", "lang": "Python", "max_stars_repo_path": "memetic_algorithm/memetic_algorithm.py", "max_stars_repo_name": "tsyploff/rossiya-airlines", "max_stars_repo_head_hexsha": "3d0dc97f8712f197da2179e5c3836349785ebb45", "max_stars_repo_licenses": ["...
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ #A Basic Example 一个基本的例子 ''' Keras is a powerful and easy-to-use deep learning library for Theano and TensorFlow that provides a high-level neural networks API to develop and evaluate deep learning models. ''' import num...
{"hexsha": "ecfb1815a85034f3cccc249a196dad68aa4c89fa", "size": 740, "ext": "py", "lang": "Python", "max_stars_repo_path": "kerasTest/kerasBasicExample.py", "max_stars_repo_name": "Dongzhixiao/newRecognize", "max_stars_repo_head_hexsha": "d87fa7752e2a805ddb2f8c0435383de47b687f6b", "max_stars_repo_licenses": ["MIT"], "ma...
import os import sys sys.path.append('../') import gridemic import numpy as np from scipy.optimize import root_scalar R0 = float(sys.argv[1]) print(R0) # Common settings Seed = 5772 # A seed for the RNG. None lets numpy.random select a seed randomly N = 3162 # Grid size. N x N = P NIi = 100 # N...
{"hexsha": "8b3f64c3523c8239c8f057cc847536bc14c4e89f", "size": 1973, "ext": "py", "lang": "Python", "max_stars_repo_path": "scarselli_etal_2021/run2b.py", "max_stars_repo_name": "burakbudanur/gridemic", "max_stars_repo_head_hexsha": "7429fd53555a1abd21614e1cce104f043576e05d", "max_stars_repo_licenses": ["MIT"], "max_st...
function fx = p57_fun ( n, x ) %*****************************************************************************80 % %% P57_FUN evaluates the integrand for problem 57. % % Interval: % % 0 <= x <= 1 % % Integrand: % % x^(3/2) % % Antiderivative: % % (2/5) * x^(5/2) % % Exact Integral: % % 0.4 % % Licensin...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p57_fun.m"}
function D = hmm_kl (hmm_p,hmm_q) % Computes Kullback-Leibler divergence between two Hidden Markov Model % distributions, through an approximation (an upper bound) as proposed in % M. Do (2003). IEEE Signal Processing Letters 10 % % Author: Diego Vidaurre, OHBA, University of Oxford (2018) K = length(hmm_p.Pi); if K~=...
{"author": "OHBA-analysis", "repo": "HMM-MAR", "sha": "bb0433b75482e473980791a2b30afe2012cf6578", "save_path": "github-repos/MATLAB/OHBA-analysis-HMM-MAR", "path": "github-repos/MATLAB/OHBA-analysis-HMM-MAR/HMM-MAR-bb0433b75482e473980791a2b30afe2012cf6578/utils/math/hmm_kl.m"}
# Referenced by S. Jahnavi Prasad's detect_mask_video.py #(https://github.com/jahnavi-prasad) # import the necessary packages import numpy as np import pandas as pd from bs4 import BeautifulSoup import torchvision from torchvision import transforms, datasets, models import torch from PIL import Image import matplotli...
{"hexsha": "967a54009c50d48723c4bb58601e62534b3f2fde", "size": 3029, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/inference.py", "max_stars_repo_name": "hwanseung2/Image_processing", "max_stars_repo_head_hexsha": "6b4415ed6ccde274900cfd376d50dc3093d1f849", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from collections import Counter from numpy import log from sklearn.base import BaseEstimator, ClassifierMixin from data.data_examination import make_sig_words from data.pipelines import (tokenize_pipe, lower_pipe, stem_pipe, lemmatize...
{"hexsha": "fcd09872979249de9f4967d4d9e2bf53550bb116", "size": 3820, "ext": "py", "lang": "Python", "max_stars_repo_path": "Predictors/probabilistic.py", "max_stars_repo_name": "ALT-G-AI/skynet-learns-to-write", "max_stars_repo_head_hexsha": "47009c1b375b9893cfd9c6b47a5ab41e28b25144", "max_stars_repo_licenses": ["MIT"]...
(* File reduced by coq-bug-finder from original input, then from 7421 lines to 6082 lines, then from 5860 lines to 5369 lines, then from 5300 lines to 165 lines, then from 111 lines to 38 lines *) Set Implicit Arguments. Record PreCategory := { object :> Type; morphism : object -> object -> Type; identity : f...
{"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq/test-suite/bugs/closed/3505.v"}
# Copyright (c) 2009,2016,2019 MetPy Developers. # Copyright (c) 2021 Nathan Wendt. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for reading GEMPAK files.""" from collections import namedtuple import struct import numpy as np class NamedStruct(struct.St...
{"hexsha": "eb4ee35d43dc8c27294410ca46f8fe199f0c0583", "size": 6625, "ext": "py", "lang": "Python", "max_stars_repo_path": "gempakio/tools.py", "max_stars_repo_name": "nawendt/gem2py", "max_stars_repo_head_hexsha": "d0bf086dec84d7cf28549177b8b9e402e29860db", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
# Import the required libraries needed # for the application to run via Flask # and the Machine learning Model import os import pickle import numpy as np from flask import Flask from flask import render_template from flask import url_for from flask import request # Initialize the Application app = Flask(__name__) #...
{"hexsha": "b39a92dfc0b51ca844c969a694237be867b5fd33", "size": 1812, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/app.py", "max_stars_repo_name": "jim-nnamdi/Loanapplicant-salaryPredictor", "max_stars_repo_head_hexsha": "8f01bd70804a21050ea38fc24c6a0b18efacb4b7", "max_stars_repo_licenses": ["bzip2-1.0.6"]...
"""Very fancy downsampling.""" import numpy from gewittergefahr.gg_utils import target_val_utils from gewittergefahr.gg_utils import error_checking from gewittergefahr.deep_learning import deep_learning_utils as dl_utils LARGE_INTEGER = int(1e12) FRACTION_UNINTERESTING_TIMES_TO_OMIT = 0.8 def _report_class_fraction...
{"hexsha": "a61e6775624d50be2281d903a041f3417ed657b0", "size": 11107, "ext": "py", "lang": "Python", "max_stars_repo_path": "gewittergefahr/deep_learning/fancy_downsampling.py", "max_stars_repo_name": "dopplerchase/GewitterGefahr", "max_stars_repo_head_hexsha": "4415b08dd64f37eba5b1b9e8cc5aa9af24f96593", "max_stars_rep...
[STATEMENT] lemma vec1_index: assumes j: "j < n" shows "vec1I ze on n i ! j = (if i = j then on else ze)" (is "_ = ?r") [PROOF STATE] proof (prove) goal (1 subgoal): 1. vec1I ze on n i ! j = (if i = j then on else ze) [PROOF STEP] unfolding vec1I_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (replicate i ze ...
{"llama_tokens": 2980, "file": "Matrix_Matrix_Legacy", "length": 36}
names = readdir(".") for name=names if startswith(name, "test_") && endswith(name, ".jl") println("Run $name") run(`julia $name`) end end
{"hexsha": "d81fe06d4023e9006664ace2db455e531c59f0b6", "size": 163, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "tkelman/QuantumOptics.jl", "max_stars_repo_head_hexsha": "1ccd79e1bb8775796703b8d2c407c1c74429e291", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import hashlib from itertools import cycle from random import Random import numpy as np from numpy import linalg class SubsCipherAlgo: def __init__(self, key): self.key = key self.table = list() self.clean_rand = Random() def gen_table(self, bytes_number, cols): r = Random() ...
{"hexsha": "6a7d3b4fd9c311f0e676a23d7e81631b0f983cb4", "size": 7573, "ext": "py", "lang": "Python", "max_stars_repo_path": "ciplib.py", "max_stars_repo_name": "Kamkas/Block-cipher", "max_stars_repo_head_hexsha": "69eb5b71a63e013515485bf0bc9cb4610fcf17cf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
from manimlib import * import numpy as np # To watch one of these scenes, run the following: # python -m manim example_scenes.py SquareToCircle # Use -s to skip to the end and just save the final frame # Use -w to write the animation to a file # Use -o to write it to a file and open it once done # Use -n <number> to s...
{"hexsha": "4af663609a6576171a26b2c27acd2df920b9a152", "size": 24605, "ext": "py", "lang": "Python", "max_stars_repo_path": "example_scenes.py", "max_stars_repo_name": "net-oil-man/Oilman-Manim-Tools", "max_stars_repo_head_hexsha": "f93d54d586fcae69932c4f0820de96d83cdb9c5d", "max_stars_repo_licenses": ["Apache-2.0"], "...
[STATEMENT] lemma Array_Object_widen1_trancl: assumes wf: "wf_prog wmdc P" and itA: "is_type P (A\<lfloor>\<rceil>)" shows "P \<turnstile> A\<lfloor>\<rceil> <\<^sup>+ Class Object" [PROOF STATE] proof (prove) goal (1 subgoal): 1. P \<turnstile> A\<lfloor>\<rceil> <\<^sup>+ Class Object [PROOF STEP] using itA [P...
{"llama_tokens": 6626, "file": "JinjaThreads_Common_SemiType", "length": 30}
""" Train network on the Fluorescence Microscopy Dataset (FMD) """ import argparse import glob import os from os import listdir from os.path import join import keras import numpy as np import skimage import tensorflow as tf from imageio import imread from keras import backend as K from keras.callbacks import LambdaC...
{"hexsha": "76556de9e7613bb235cb8b35a468629b554720d6", "size": 5050, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_fmd.py", "max_stars_repo_name": "JRice15/self-supervised-poisson-gaussian", "max_stars_repo_head_hexsha": "4c9bf851194454eae17b5673a28a6131a8bd0ce5", "max_stars_repo_licenses": ["MIT"], "max...
import xarray as xr import salem import geopandas import geojson from shapely.geometry import shape import numpy as np from glob import glob import pandas as pd import os from subprocess import check_call def subset_to_west(da, lon_range, lat_range, roi): da = da.sel(latitude=slice(lat_range[0], lat_range[1]), ...
{"hexsha": "6631ae00195333f19ae626554784f86403b22e3c", "size": 4446, "ext": "py", "lang": "Python", "max_stars_repo_path": "compound_extremes/scripts/preprocess_JRA55.py", "max_stars_repo_name": "karenamckinnon/compound_extremes", "max_stars_repo_head_hexsha": "26542ed55af86fdfd3486e949f475b18f03165c4", "max_stars_repo...
//================================================================================================== /*! @file Forward declaration of common components @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICEN...
{"hexsha": "a558ddf65d0de827c22a777a30fe68d135019c8a", "size": 939, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/forward.hpp", "max_stars_repo_name": "SylvainCorlay/pythran", "max_stars_repo_head_hexsha": "908ec070d837baf77d828d01c3e35e2f4bfa2bfa", "max_stars_repo_licenses": ["BSD-3-Claus...
### ----------------- IMPORTS ----------------- ### import os from beartype import beartype import numpy as np import pandas as pd from backend.adi_parse import AdiParse from backend import search_function from backend.get_all_comments import GetComments ### ------------------------------------------- ### @beartype d...
{"hexsha": "defa5636b177097e8af817a6ca015cfbf3b3e448", "size": 14647, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/filter_table.py", "max_stars_repo_name": "SAKEverse/sake-plan", "max_stars_repo_head_hexsha": "48162b9a4f4cd6fefd557dc09f723912155f6581", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import cv2 import numpy as np import os import glob #img_dir = "/home/mcaadmin/ALL_IDB1/im" # Enter Directory of all images #data_path = os.path.join(img_dir,'*g') #files = glob.glob(data_path) #for f1 in files: image = cv2.imread("/home/mcaadmin/infected/Im001_1.png") #while(1): # Convert BGR to HSV hsv = cv2.c...
{"hexsha": "4cff97a4ae0d512839dbefdd84232365e27a4afc", "size": 1029, "ext": "py", "lang": "Python", "max_stars_repo_path": "conversion.py", "max_stars_repo_name": "JessyRajan/wbcdiseases", "max_stars_repo_head_hexsha": "f1ad6630252d65e296265b58e19a99c85025fd7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#check (.=.) -- #print (.=.) -- #print (.=.) #check (.==.) #check Eq.refl #check @Eq.refl #check Eq.refl 5 #check @Eq.symm #check @Eq.trans #check @Eq.subst #print Eq def mod7Rel (x y : Nat) : Prop := x % 7 = y % 7 #check mod7Rel theorem thm_1: mod7Rel 3 10 := rfl #print thm_1 theorem thm_2: mod7Rel 3 10 := by ...
{"author": "shinsa82", "repo": "lean-devcontainer", "sha": "7edc7f0ad9aee38f686f161b6b65be805f2f538d", "save_path": "github-repos/lean/shinsa82-lean-devcontainer", "path": "github-repos/lean/shinsa82-lean-devcontainer/lean-devcontainer-7edc7f0ad9aee38f686f161b6b65be805f2f538d/quot.lean"}