text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import os, sys import numpy as np from tqdm import tqdm import tensorflow as tf class MDN_Load(): def __init__(self, name): self.name = name if self.name == 'sample': (self.x_train, self.y_train), (self.x_test, self.y_test) = self.get_sample(10000) self.output_dim = 3 ...
{"hexsha": "8495a6f03fa885c2b5045a91f772a919041433e5", "size": 2620, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataset/mdn_load.py", "max_stars_repo_name": "KNakane/tensorflow", "max_stars_repo_head_hexsha": "1e8c862b8f7928967b1c02c613df0222ab8c4cd2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
struct SnailfishNumber triplets::Vector{Tuple{Int, Int, Int}} # value, depth, weight end SnailfishNumber(str::String) = parse(SnailfishNumber, str) function Base.parse(::Type{SnailfishNumber}, str::String) elements = eval(Meta.parse(str)) triplets = tripletize!(Tuple{Int, Int, Int}[], elements, 0, 1) ...
{"hexsha": "a5b13b22d980ceed2420c5f18f1570a78b8e33a5", "size": 2467, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "day18/solve.jl", "max_stars_repo_name": "nsgrantham/advent-of-code-2021", "max_stars_repo_head_hexsha": "d43d86fae014bbe72dc21283650d69d0cecb7691", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] theorem sup_state_Cons1: "(G \<turnstile> (x#xt, a) <=s (yt, b)) = (\<exists>y yt'. yt=y#yt' \<and> (G \<turnstile> x \<preceq> y) \<and> (G \<turnstile> (xt,a) <=s (yt',b)))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. G \<turnstile> (x # xt, a) <=s (yt, b) = (\<exists>y yt'. yt = y # yt' \<and...
{"llama_tokens": 227, "file": null, "length": 1}
""" The tests here test the webapp by sending fake requests through a fake GH object and checking that the right API calls were made. Each fake request has just the API information currently needed by the webapp, so if more API information is used, it will need to be added. The GitHub API docs are useful: - Pull req...
{"hexsha": "da9fbc6148d5f7d295049c7b9048a20e3659a952", "size": 75709, "ext": "py", "lang": "Python", "max_stars_repo_path": "sympy_bot/tests/test_webapp.py", "max_stars_repo_name": "asmeurer/sympy-bot-1", "max_stars_repo_head_hexsha": "08e16763f7c15f70366af91b8fb022aa6c962115", "max_stars_repo_licenses": ["BSD-3-Clause...
from torch.nn import functional as F from torch import nn import torch import numpy as np from utils import layer from radam import RAdam from vpn import MVProp import utils from torch_critic import Critic as ClassicCritic class CriticModel(nn.Module): def __init__(self, env, layer_number, FLAGS): super()....
{"hexsha": "57bc3a2a3181a83d1587e9b900724bcc8fa9fdc5", "size": 7752, "ext": "py", "lang": "Python", "max_stars_repo_path": "vpn_dqn_critic.py", "max_stars_repo_name": "christsa/hide-rl", "max_stars_repo_head_hexsha": "47dc3dfd93b817831473c07137a6a6e7f2eda549", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count...
import matplotlib.pyplot as plt import scipy.optimize as opt import numpy as np # Function def func_exponential(x,g,n_0): return n_0*np.power(1+g,x) if __name__=="__main__": # Data x_samp = np.array([1,2,3,4,5,6]) y_samp = np.array([3,4,5,6,6,11]) # Estimate w, _ = opt.curve_fit(func_grow, x...
{"hexsha": "ab4997310a543a92be5052bb61d90d3bbc71b0e2", "size": 804, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/func_exponential.py", "max_stars_repo_name": "yasirroni/myNafiun", "max_stars_repo_head_hexsha": "70f1eb56eb344d88fa6ea7cafe2d0925bfccc1d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import os.path import matplotlib.pyplot as plt import scanpy as sc import pandas as pd import seaborn as sns from outer_spacem.io import convert_name import numpy as np from pathlib import Path from outer_spacem.pl import plot_distributions, plot_umap_top_n, volcano_plot from singlecelltools.various import get_mole...
{"hexsha": "96ab967b14d01d4a9a44badb1bfdac6ce54de9a3", "size": 7615, "ext": "py", "lang": "Python", "max_stars_repo_path": "projects/gastrosome_processing/diff_express_analysis_old.py", "max_stars_repo_name": "abailoni/single-cell-analysis", "max_stars_repo_head_hexsha": "3fb68992a22249ab96178e173ceb552c037f25ba", "max...
@testset "Parsimonious flux balance analysis with StandardModel" begin model = test_toyModel() d = parsimonious_flux_balance_analysis_dict( model, Tulip.Optimizer; modifications = [ change_constraint("EX_m1(e)", lb = -10.0), change_optimizer_attribute("IPM_Iterat...
{"hexsha": "341eb6c43787009e7d1150b74e88b9046e6a886b", "size": 726, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/analysis/parsimonious_flux_balance_analysis.jl", "max_stars_repo_name": "LCSB-BioCore/COBREXA.jl", "max_stars_repo_head_hexsha": "cfe20e2a9d5e98cd097cf9f62c5d32f07c1199b0", "max_stars_repo_lice...
# -*- coding: utf-8 -*- """ @author: Quoc-Tuan Truong <tuantq.vnu@gmail.com> """ from scipy.sparse import csr_matrix, find from collections import OrderedDict import numpy as np class TrainSet: def __init__(self, uid_map, iid_map): self._uid_map = uid_map self._iid_map = iid_map @property ...
{"hexsha": "1d8298560e21eec4a177353d582986e8d3111be2", "size": 7012, "ext": "py", "lang": "Python", "max_stars_repo_path": "cornac/data/trainset.py", "max_stars_repo_name": "Andrew-DungLe/cornac", "max_stars_repo_head_hexsha": "199ab9181f8b6387cc8748ccf8ee3e5c9df087fb", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
@testset "sparse_constructor" begin A = sprand(10,10,0.1) s = SparseTensor(A) @test run(sess, s)≈A I = [1;2;4;2;3;5] J = [1;3;2;2;2;1] V = rand(6) A = sparse(I,J,V,6,5) s = SparseTensor(I,J,V,6,5) @test run(sess, s)≈A indices = [I J] s = SparseTensor(I,J,V,6,5) @test run(...
{"hexsha": "ea3fc023013e994e576fcdd1e76f0e1785ffcf5b", "size": 7112, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/sparse.jl", "max_stars_repo_name": "EricDarve/ADCME.jl", "max_stars_repo_head_hexsha": "7eb334354e3ba5427a3f13a4a60e0f6ca5eec006", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
#!/usr/bin/env python3 import numpy as np from org.mk.training.dl.rnn_cell import LSTMCell from org.mk.training.dl.rnn import dynamic_rnn #from org.mk.training.dl.rnn import compute_gradients from org.mk.training.dl.rnn import print_gradients from org.mk.training.dl.rnn import zero_state_initializer from org.mk.train...
{"hexsha": "16a659b48667cb0626aea2381d7ff798e8923788", "size": 6654, "ext": "py", "lang": "Python", "max_stars_repo_path": "org/mk/training/dl/LSTMMainGraphbi.py", "max_stars_repo_name": "slowbreathing/Deep-Breathe", "max_stars_repo_head_hexsha": "bcc97cadfc53d3297317764ecfb2223e5e715fd1", "max_stars_repo_licenses": ["...
import numpy as np import cv2 import matplotlib.pyplot as plt def generate_seedmap(shape, speckle_density, speckle_size, randomseeds): np.random.seed(randomseeds[0]) SpeckleSeedMap = np.random.rand(shape[0], shape[1]) < speckle_density np.random.seed(randomseeds[1]) SpeckleDirectionMap = np.random.rand...
{"hexsha": "bed46c383a347c060a2f84a413e04fa9ffd641d2", "size": 4465, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/utils.py", "max_stars_repo_name": "GW-Wang-thu/Generator-of-Stereo-Speckle-images-with-displacement-labels", "max_stars_repo_head_hexsha": "6a920827bd7bbba3019c97c02c7382523b790449", "max_st...
import mdtraj import numpy as np def gmx_saxs(q, trajectory, topology): intensity = np.zeros_like(q) for chunk in mdtraj.iterload(trajectory, top=topology): for c in chunk: c1 = c.remove_solvent() for i in range(c1.n_atoms): rhoi = c1.topology.atom(i).element[0]...
{"hexsha": "37232836318fdc40c84c02d1f1583d7f1d253c44", "size": 1519, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/mdscripts/saxs/saxs.py", "max_stars_repo_name": "awacha/mdscripts", "max_stars_repo_head_hexsha": "831bda06557fa2d5f0899fc2f6552c9e49146cef", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import numpy as np def compute_errors_over_time(Xtrain, ytrain, Xtest, ytest, theta, feature_inds, thresholds): """ The function `...
{"hexsha": "77ddf377612c64fc56a94ea27635c9d5a18809dd", "size": 1454, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/homework2/q5/errors_over_time.py", "max_stars_repo_name": "skymarshal/cs229-machine-learning-stanford-fall-2016", "max_stars_repo_head_hexsha": "3f9e0f4ea7d4fe73a50dc12c84fe47131bb0622a", "max...
[STATEMENT] lemma weakPsiCongSym: fixes \<Psi> :: 'b and P :: "('a, 'b, 'c) psi" and Q :: "('a, 'b, 'c) psi" assumes "\<Psi> \<rhd> P \<doteq> Q" shows "\<Psi> \<rhd> Q \<doteq> P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Psi> \<rhd> Q \<doteq> P [PROOF STEP] using assms [PROOF STATE] proo...
{"llama_tokens": 237, "file": "Psi_Calculi_Weak_Psi_Congruence", "length": 2}
r""" Graded Hopf algebras """ #***************************************************************************** # Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr> # Nicolas M. Thiery <nthiery at users.sf.net> # # Distributed under the terms of the GNU General Public License...
{"hexsha": "e8f4b9dc24d0cc2ee2ff6237631842b38eac1021", "size": 1512, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/categories/graded_hopf_algebras.py", "max_stars_repo_name": "bopopescu/sage-5", "max_stars_repo_head_hexsha": "9d85b34956ca2edd55af307f99c5d3859acd30bf", "max_stars_repo_licenses": ["BSL-...
\vspace{-20pt} \section{Procedure} \label{sec:Procedure} The first step is to find the minimal current value for the laser setup, where it is still lasing. For this measurement the setup is changed to the configuration shown in figure~\ref{fig:setup_current}. A voltmeter is connected to the laser current monitor for a...
{"hexsha": "aedf8f2ee879c9985bf1385ec9c8e6d3f32ab753", "size": 5242, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Fortgeschrittenenpraktikum/Protokolle/V60_Diodenlaser/Auswertung.tex", "max_stars_repo_name": "smjhnits/Praktikum", "max_stars_repo_head_hexsha": "92c9df3ee7dfa2417f464036d18ac33b70765fdd", "max_sta...
import numpy as np import pandas as pd from dtwknn import DtwKnn min_window_size = 30 max_window_size = 100 threshold_mean = 0 threshold_std = 0.5 threshold_change = 1.5 model = DtwKnn(n_neighbors=1) def segment_window(data, array, min_window_size, max_window_size): index_segment = list() prev_point = array...
{"hexsha": "264341a134db52878d1f65474f2659ac3fd387b8", "size": 4818, "ext": "py", "lang": "Python", "max_stars_repo_path": "bkm3t_DHBKHN/Cau4/service_predict/gesture.py", "max_stars_repo_name": "atheros98/OLP-FOSS-2018", "max_stars_repo_head_hexsha": "c3ba261a60e80a6e355da34b6015c767a4d69fba", "max_stars_repo_licenses"...
import numpy as np class Config: MEMORY_START_ADDRESS = 0x200 FONT_SET_START_ADDRESS = 0x50 FONT_SET = np.array([ 0xF0, 0x90, 0x90, 0x90, 0xF0, 0x20, 0x60, 0x20, 0x20, 0x70, 0xF0, 0x10, 0xF0, 0x80, 0xF0, 0xF0, 0x10, 0xF0, 0x10, 0xF0, 0x90, 0x90, 0xF0, 0x10, 0x10, ...
{"hexsha": "1c5b39d6b1c3cd61c5995ed3bf62415a34b72de6", "size": 759, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/cpu/config/memory_config.py", "max_stars_repo_name": "rafael-junio/JustAChip8PythonEmulator", "max_stars_repo_head_hexsha": "ff9c2d67aeaf4f87ff3b5fd6f0231702587455a7", "max_stars_repo_licenses...
# =============================================================================== # Copyright 2011 Jake Ross # # 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/licens...
{"hexsha": "09cd794e3693a0f428c10079ab8eabcd5e9bc901", "size": 9485, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox/count_time.py", "max_stars_repo_name": "ASUPychron/pychron", "max_stars_repo_head_hexsha": "dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# -*- coding: utf-8 -*- from typing import NamedTuple, Optional, Tuple import numpy as np from signalworks import dsp from signalworks.processors.processing import DefaultProgressTracker, Processor from signalworks.tracking import TimeValue, Wave class SpectralDiscontinuityEstimator(Processor): name = "Spectral ...
{"hexsha": "24b496e3ffab545ac874bbfddde9d25eabd4a675", "size": 2799, "ext": "py", "lang": "Python", "max_stars_repo_path": "signalworks/processors/spectral_discontinutiy_estimator.py", "max_stars_repo_name": "lxkain/tracking", "max_stars_repo_head_hexsha": "00ed9a0b31c4880687a42df3bf9651e68e0c4360", "max_stars_repo_lic...
import numpy as np import pandas as pd from datetime import datetime from types import FunctionType from pandapower.timeseries import OutputWriter from pandahub.mongo_io_methods import MongoIOMethods try: import pplog logger = pplog.getLogger(__name__) except ImportError: import logging class OutputWrite...
{"hexsha": "53dd48af95296204f98a9e4ffd68253437994ba0", "size": 6835, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandahub/lib/timeseries/output_writer_mongodb.py", "max_stars_repo_name": "e2nIEE/pandahub", "max_stars_repo_head_hexsha": "4d4abb29f49d32d035120ebea99fb96ba3d44bfc", "max_stars_repo_licenses": ["...
import pytest import numpy as np import scipy.sparse as sp import warnings from sklearn import clone from sklearn.preprocessing import KBinsDiscretizer from sklearn.preprocessing import OneHotEncoder from sklearn.utils._testing import ( assert_array_almost_equal, assert_array_equal, assert_allclose_dense_s...
{"hexsha": "e1317acb978084675cb32d3ae204320b7235f285", "size": 15963, "ext": "py", "lang": "Python", "max_stars_repo_path": "sklearn/preprocessing/tests/test_discretization.py", "max_stars_repo_name": "huzq/scikit-learn", "max_stars_repo_head_hexsha": "f862129f36786acbae3d9f2d161bbb72d77b87ec", "max_stars_repo_licenses...
import numpy as np from PyMieScatt import RayleighMieQ from scipy.special import jv, yv def MieQ(m, wavelength, diameter, nMedium=1, asDict=False, asCrossSection=False): # http://pymiescatt.readthedocs.io/en/latest/forward.html#MieQ wavelength /= nMedium m /= nMedium x = np.pi*diameter/wavelength if x==0: ...
{"hexsha": "da2901b897b2943ec59d19ed3b1d7de99ed797f4", "size": 2574, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyMieScatt/devmode/functionPrototyping.py", "max_stars_repo_name": "hmaarrfk/PyMieScatt", "max_stars_repo_head_hexsha": "81d152af85dad20963cdee2dffd9dfe9a8fc54a1", "max_stars_repo_licenses": ["MIT...
Demo - Poisson equation 2D ======================= Solve Poisson's equation in 2D with homogeneous Dirichlet bcs in one direction and periodicity in the other. $$ \begin{align} \nabla^2 u(x, y) &= f(x, y), \quad \forall \, (x, y) \in [-1, 1] \times [0, 2\pi]\\ u(\pm 1, y) &= 0 \\ u(x, 2\pi) &= u(x, 0) \end{align}...
{"hexsha": "6cf8f2b229576db350872e786140e99682d68187", "size": 8375, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "binder/Poisson2D.ipynb", "max_stars_repo_name": "jaisw7/shenfun", "max_stars_repo_head_hexsha": "7482beb5b35580bc45f72704b69343cc6fc1d773", "max_stars_repo_licenses": ["BSD-2-Clause"]...
from unittest.mock import patch import numpy as np import pandas as pd import pytest import woodwork as ww from pandas.testing import assert_frame_equal from woodwork.logical_types import ( Boolean, Categorical, Double, Integer, NaturalLanguage, ) from blocktorch.pipelines.components import Impute...
{"hexsha": "d2edebf376b20b73300f85252055ba5ba2c24c68", "size": 20251, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml_source/src/blocktorch/blocktorch/tests/component_tests/test_imputer.py", "max_stars_repo_name": "blocktorch/blocktorch", "max_stars_repo_head_hexsha": "044aa269813ab22c5fd27f84272e5fb540fc522b...
# # plot model parameters on a simplex # import sys, os from argparse import ArgumentParser import codecs import numpy as np from scipy.misc import logsumexp from scipy.stats import gaussian_kde import matplotlib.pyplot as plt from matplotlib.tri import UniformTriRefiner, Triangulation sys.path.insert(1, os.path.join(...
{"hexsha": "79a968e1016a9d367cc677187c1c1ed6f26e9d40", "size": 5422, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/format_apics/simplex.py", "max_stars_repo_name": "murawaki/creole-mixture", "max_stars_repo_head_hexsha": "dfe585f2c8d698b24c022ec0933ce30925410cfe", "max_stars_repo_licenses": ["Apache-2....
module L1L2 using DataFrames using LinearAlgebra using ..DataMod, ..ManualModelMod export l1l2 # Soft thresholding function S(x::Float64, λ::Float64)::Float64 if x >= λ return x - λ elseif x <= -λ return x + λ else return 0 e...
{"hexsha": "271c95439060ad32242a8b026f0f85ce922678e2", "size": 2395, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "incl/fs-l1l2reg.jl", "max_stars_repo_name": "KasperNooteboom/thesis-rvfl-fs", "max_stars_repo_head_hexsha": "31f8ee8ff58da5a8c1f505ef045c35ebbfe91255", "max_stars_repo_licenses": ["MIT"], "max_star...
\documentclass[12pt]{article} \title{Modern Parser Combinators in Python} \date{\today} \usepackage[sc,osf]{mathpazo} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage{hyperref} \usepackage{listings} % \lstset{language=Python} \lstset{escapechar=\!} \usepackage[backend=bibtex8,style=authoryear]{biblatex} \...
{"hexsha": "679d925a051b24876697556aabac4fc3ae53caa3", "size": 64923, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "combinators.tex", "max_stars_repo_name": "ceridwen/combinators", "max_stars_repo_head_hexsha": "a821b69a4382914792699bf10a84087cf251c78c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, ...
export jumble_iter function jumble_iter(text::String) return SubwordIter(word_to_bag(text)) end
{"hexsha": "5a25c7396bebb04cf2d9986550abc830c77fc4db", "size": 104, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/jumble.jl", "max_stars_repo_name": "dpmerrell/Scrabble.jl", "max_stars_repo_head_hexsha": "61a3333e0983873b3e41e6c7e068850d37e4c4f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
# -*- coding: utf-8 -*- """ Created on Mon Jan 27 15:49:43 2020 @author: Rapha """ import glm import math import numpy as np import OpenGL.GL as gl from cg.shader_programs.ShaderProgram import ShaderProgram class MultiLightPhongShadingShaderProgram(): POINT_LIGHT = 3 DIRECTIONAL_LIGHT = 4 SPOTLIGHT ...
{"hexsha": "137747cb7c152a9e7d9baa130c3c8f2fa132a314", "size": 19110, "ext": "py", "lang": "Python", "max_stars_repo_path": "1S2020/cg/shader_programs/MultiLightPhongShadingShaderProgram.py", "max_stars_repo_name": "andre91998/EA979", "max_stars_repo_head_hexsha": "f3b82588ffaf20848a54b3a21b0332c1e72c54e8", "max_stars_...
import numpy as np import h5py class CustomClass: """ An artificial custom class used to present the serialization and deserialization with hdf5. """ def __init__(self, name: str, number: int, data: np.ndarray, nested_dict: dict): self.name = name self.number = number self...
{"hexsha": "2211564d680d699c960cfdf7fedf504aa77e43c1", "size": 3508, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/custom_class.py", "max_stars_repo_name": "djeada/Hdf5", "max_stars_repo_head_hexsha": "6264d2d8063341ebed4ecec5fd766303fd018186", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
From iris.proofmode Require Import tactics. From iris.algebra Require Import auth. From Perennial.goose_lang Require Import proofmode notation. From Perennial.program_logic Require Import recovery_weakestpre recovery_adequacy. From Perennial.goose_lang Require Export recovery_lifting. From Perennial.goose_lang Require ...
{"author": "mit-pdos", "repo": "perennial", "sha": "76dafee3cd47e1c5e5a6d5436f87738a06f13ee0", "save_path": "github-repos/coq/mit-pdos-perennial", "path": "github-repos/coq/mit-pdos-perennial/perennial-76dafee3cd47e1c5e5a6d5436f87738a06f13ee0/src/goose_lang/recovery_adequacy.v"}
""" DuckDB data chunk """ mutable struct DataChunk handle::duckdb_data_chunk function DataChunk(handle::duckdb_data_chunk, destroy::Bool) result = new(handle) if destroy finalizer(_destroy_data_chunk, result) end return result end end function get_column_count(c...
{"hexsha": "7ed25de4534948c736c69d6bc2895eb1b5f4e388", "size": 1704, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "tools/juliapkg/src/data_chunk.jl", "max_stars_repo_name": "lokax/duckdb", "max_stars_repo_head_hexsha": "c2581dfebccaebae9468c924c2c722fcf0306944", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma locally_compact_homeomorphism_projection_closed: assumes "locally compact S" obtains T and f :: "'a \<Rightarrow> 'a :: euclidean_space \<times> 'b :: euclidean_space" where "closed T" "homeomorphism S T f fst" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>T f. \<lbrakk>closed T; home...
{"llama_tokens": 4763, "file": null, "length": 48}
\documentclass{beamer} \usetheme{Antibes} \useinnertheme{rectangles} \useoutertheme{infolines} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} % patch the look of +, = in arev \usefonttheme{serif} \usepackage{arev} \usepackage{amsmath} \usepackage{amssymb} \setbeamertemplate{footline}{% \begin{beamercolorbox}[...
{"hexsha": "06cf8ec4745aeb75c3511679901ecfdf475c33a3", "size": 1708, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "templates/de/TeX/Beamer/Vorlage.tex", "max_stars_repo_name": "JohnBSmith/JohnBSmith.github.io", "max_stars_repo_head_hexsha": "5bb0fac7ec4d653be6bd71b4c7ab344c9615f1eb", "max_stars_repo_licenses": [...
from numpy.lib.shape_base import expand_dims import torch import numpy as np import matplotlib.pyplot as plt from torch.nn.modules.activation import ReLU def get_angles(pos, i, d_model): angle_rates = 1 / np.power(10000, 2*(i//2) / np.float(d_model)) return pos * angle_rates def positional_encoding(position, ...
{"hexsha": "2ecf86369b7de02ca08c0b4cf10deffdea15c894", "size": 3541, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/utils.py", "max_stars_repo_name": "pgr2015/transformer_pytorch", "max_stars_repo_head_hexsha": "192e5a0feddf3cd8106f6cba72113d01a873ac1c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# Commented out IPython magic to ensure Python compatibility. import os import tarfile import time import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader, random_split # TensorDataset import torchvision from torchvision.datasets import ImageFolder # MNIST, CIFAR10 e...
{"hexsha": "2b686b56900b147e63b5e33a9ad64001285c2958", "size": 10352, "ext": "py", "lang": "Python", "max_stars_repo_path": "Pytorch/resnet_onecyclepolicy.py", "max_stars_repo_name": "VladimerKhasia/ML", "max_stars_repo_head_hexsha": "7b7a6075458a8e9ac275a803f0fd89fb606294ae", "max_stars_repo_licenses": ["MIT"], "max_s...
import pandas as pd import matplotlib.pyplot as plt import scipy import seaborn as sns df = pd.read_csv('lifespan40All.csv') heatmapData = pd.pivot_table(df, values='commentators', index=['all'], columns='year') plt.figure(figsize = (20, 4)) plot = sns.heatmap(heatmapData, cmap='BuPu', xticklabels=100, yticklabels=F...
{"hexsha": "9386f14b733b0aaaac688522c288d1e25a42843c", "size": 503, "ext": "py", "lang": "Python", "max_stars_repo_path": "allCommentariesCreateHeatmap.py", "max_stars_repo_name": "lwcvl/Plotting-All-Hadith-Commentaries", "max_stars_repo_head_hexsha": "71d22f5815d86943e7e5ce72f84363e4fc3610eb", "max_stars_repo_licenses...
import numpy as np import pandas as pd def read_and_merge_data(*, base_path="../../data/raw/"): df = pd.read_excel(base_path + 'RVMS_Current_Property_and_BIZ_Owner_List - vCurrent (1).xlsx', sheet_name='Biz & Prop Owner MAIN list') naics = pd.read_excel(base_path + '2-6 digit_2017_Code...
{"hexsha": "fd63f9a341a00bfbd2c3fdf80df94de200b2d967", "size": 1110, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/make_dataset.py", "max_stars_repo_name": "tlittrell/BusinessEngagementMatrix", "max_stars_repo_head_hexsha": "1367493cc01d28da52b0959d51f760c4205109f7", "max_stars_repo_licenses": ["MIT"]...
function S=tria(A) %%TRIA Square root matrix triangularization. Given a rectangular square % root matrix, obtain a lower-triangular square root matrix that is % square. % %INPUTS: A A numRowXnumCol matrix that is generally not square. % %OUTPUTS: S A lower-triangular matrix such that S*S'=A*A'. If % ...
{"author": "USNavalResearchLaboratory", "repo": "TrackerComponentLibrary", "sha": "9f6e329de5be06a371757c4b853200beb6def2d0", "save_path": "github-repos/MATLAB/USNavalResearchLaboratory-TrackerComponentLibrary", "path": "github-repos/MATLAB/USNavalResearchLaboratory-TrackerComponentLibrary/TrackerComponentLibrary-9f6e3...
# Problem 2 - Project Euler # http://projecteuler.net/index.php?section=problems&id=2 function fibevensum(a, b, sum, xmax) if a >= xmax sum elseif a % 2 == 0 fibevensum(b, a + b, sum + a, xmax) else fibevensum(b, a + b, sum, xmax) end end println(fibevensum(1,2,0, 4000000))
{"hexsha": "85966f09735f532af7b92b02f6e75e75ff05907d", "size": 316, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia/problem002.jl", "max_stars_repo_name": "emergent/ProjectEuler", "max_stars_repo_head_hexsha": "ec1c92cc47fde80efddeb0346d9b0fa511df1f00", "max_stars_repo_licenses": ["Unlicense"], "max_stars_c...
# Simple 1D GP classification example import time import numpy as np import matplotlib.pyplot as plt import GPpref import plot_tools as ptt from active_learners import ActiveLearner, UCBLatent, PeakComparitor, LikelihoodImprovement, ABSThresh, UCBAbsRel import test_data import pickle class Learner(object): def __i...
{"hexsha": "51566ce1e85f63e81c5759927d8d6d425be44987", "size": 7118, "ext": "py", "lang": "Python", "max_stars_repo_path": "active_statruns.py", "max_stars_repo_name": "nrjl/GPN", "max_stars_repo_head_hexsha": "c7bd98d69e075ef05bcb2a443c02a71a916a71f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
#include <boost/algorithm/string.hpp> #include <ros/time.h> #include <tf/tf.h> #include <tf_conversions/tf_eigen.h> #include <geometry_msgs/TwistStamped.h> #include <geometry_msgs/Pose.h> #include <pluginlib/class_list_macros.h> #include <cnr_logger/cnr_logger_macros.h> #include <cnr_cartesian_velocity_controller/cnr_...
{"hexsha": "073085ae122f47684e7799b4101434ccd69f7cc0", "size": 10668, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cnr_cartesian_velocity_controller/src/cnr_cartesian_velocity_controller/cnr_cartesian_velocity_controller.cpp", "max_stars_repo_name": "CNR-STIIMA-IRAS/cnr_ros_controllers", "max_stars_repo_head_he...
# -*- coding: utf-8 -*- """ computes the spectral decrease from the magnitude spectrum Args: X: spectrogram (dimension FFTLength X Observations) f_s: sample rate of audio data Returns: vsk spectral decrease """ import numpy as np def FeatureSpectralDecrease(X,f_s): # compute index...
{"hexsha": "21752373668147f6f3afc92577cc1ed8172ca426", "size": 695, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyACA/FeatureSpectralDecrease.py", "max_stars_repo_name": "RichardYang40148/pyACA-1", "max_stars_repo_head_hexsha": "870d100ed232cca5a890570426116f70cd0736c8", "max_stars_repo_licenses": ["MIT"], "...
# ---------------------------------------- # create fastapi app # ---------------------------------------- from fastapi import FastAPI, File ,UploadFile app = FastAPI() # ---------------------------------------- # setup templates folder # ---------------------------------------- from fastapi.templating import Jinja2...
{"hexsha": "e3c42f09b3e36856f3a206e30d2a43a1b1c960d5", "size": 4060, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "rahulct-commits/ocr.pytorch", "max_stars_repo_head_hexsha": "edc766312a3953f225bbb329f5efa75c3b253210", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import sys import os import socket HOME = os.environ['HOME'] sys.path.insert(1, HOME + '/github/StreamingSVM') import numpy as np from operations import Print import time from comms import Communication from distributed import DistributedDataLoader from api import Constant from api import ExperimentObjectPSGDItems # ...
{"hexsha": "b9cab939e820fba1a7e407fa320b63cbd91b7ca5", "size": 5470, "ext": "py", "lang": "Python", "max_stars_repo_path": "psgd/PSGDAdamMulti.py", "max_stars_repo_name": "vibhatha/PSGDSVMPY", "max_stars_repo_head_hexsha": "69ed88f5db8d9a250ee944f44b88e54351f8696f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import cv2 import numpy as np import matplotlib.pyplot as plt import modi import time import firebase_admin from firebase_admin import credentials from firebase_admin import firestore def make_coordinates(image, line_parameters): slope, intercept = line_parameters y1 = image.shape[0] y2 = int(y1*(2/5)) x1 = in...
{"hexsha": "8ea2258dcd55ac6e9632304c06e8245a982d66cc", "size": 6985, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/EyeCar.py", "max_stars_repo_name": "TheStarkor/Eye-Car", "max_stars_repo_head_hexsha": "e0962cd36effa24cc90935b4364dadf47e1ef2d3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
# encoding='utf-8' import cv2 import os import numpy as np import random ''' 挑选几张不同颜色的汽车背景,切成小图,将生成的车牌贴在小图上,使生成的车牌更真实 ''' def show(img, title='无标题'): """ 本地测试时展示图片 :param img: :param name: :return: """ import matplotlib.pyplot as plt from matplotlib.font_manager import FontPropert...
{"hexsha": "9985890285ae53fdd5a704f806b4b2302c565169", "size": 2659, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/cut.py", "max_stars_repo_name": "mymsimple/plate_generator", "max_stars_repo_head_hexsha": "cbea92aff070a8691a0394263e8f4b20b3f2c839", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides the Station class. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013 :license: GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) """ from __future__ import (absolute_import, division, print_f...
{"hexsha": "4dc96053390501c70e60f45fb152e67eeaaf8830", "size": 21281, "ext": "py", "lang": "Python", "max_stars_repo_path": "IRIS_data_download/IRIS_download_support/obspy/core/inventory/station.py", "max_stars_repo_name": "earthinversion/Fnet_IRIS_data_automated_download", "max_stars_repo_head_hexsha": "09a6e0c992662f...
[STATEMENT] lemma test_star [simp]: "`p\<^sup>\<star> = 1`" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<iota> p\<^sup>\<star> = (1::'b) [PROOF STEP] by (metis star_subid test_iso test_top top_greatest)
{"llama_tokens": 94, "file": "KAT_and_DRA_TwoSorted_KAT2", "length": 1}
import numpy as np from .sh import SH class TestSH: """Test sequential halving policy""" def test_simple_run(self): arm_num = 5 budget = 20 learner = SH(arm_num=arm_num, budget=budget) learner.reset() while True: actions = learner.actions() if actions is None: break ...
{"hexsha": "6b315f791d4f55c17972fbf49acb034ebd49f28d", "size": 448, "ext": "py", "lang": "Python", "max_stars_repo_path": "banditpylib/learners/ordinary_fbbai_learner/sh_test.py", "max_stars_repo_name": "XiGYmax/banditpylib", "max_stars_repo_head_hexsha": "07698a1c6b17720a8199dea76580546fe3dfb9be", "max_stars_repo_lice...
__author__ = 'diegopinheiro' __email__ = 'diegompin@gmail.com' __github__ = 'https://github.com/diegompin' from src.training_strategies.search_strategy import GridSearchStrategy, RandomizedSearchStrategy from sklearn.ensemble import RandomForestClassifier import numpy as np from scipy.stats import randint as sp_randi...
{"hexsha": "18d4f40736100515b4fa34ac8fc3abc04d6a5060", "size": 3108, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/algorithm_strategies/random_forest_strategy.py", "max_stars_repo_name": "rionbr/smm4h", "max_stars_repo_head_hexsha": "6009ed7800884ab37b7080c8c825c30f501b6942", "max_stars_repo_licenses": ["M...
import re import requests import io import sys import json import urllib from bs4 import BeautifulSoup import sqlite3 import time import fitz from PIL import ImageDraw,ImageFont from PIL import Image import random import numpy as np #import cv2 #sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encodin...
{"hexsha": "0ec347958b97ae810cd1bafde26c964702ad33dc", "size": 5996, "ext": "py", "lang": "Python", "max_stars_repo_path": "ydk2list.py", "max_stars_repo_name": "i82Security/ydkparser", "max_stars_repo_head_hexsha": "f5a6c833d074347bc783eeac8a1ca861e2c0a665", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
""" Normals Interface Class Meteorological data provided by Meteostat (https://dev.meteostat.net) under the terms of the Creative Commons Attribution-NonCommercial 4.0 International Public License. The code is licensed under the MIT license. """ from copy import copy from typing import Union from datetime import dat...
{"hexsha": "d7d21dc1db0aa3091bc0d23d5e85e05f03bc7906", "size": 9765, "ext": "py", "lang": "Python", "max_stars_repo_path": "meteostat/interface/normals.py", "max_stars_repo_name": "meteoDaniel/meteostat-python", "max_stars_repo_head_hexsha": "69ea4206e402f42bc47e3e909923fe5744d92814", "max_stars_repo_licenses": ["MIT"]...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''eclipses.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Oct 2017 This contains a double gaussian model for first order modeling of eclipsing binaries. ''' import numpy as np from numpy import nan as npnan, sum as npsum, abs as npabs, \ roll as nproll, isfinit...
{"hexsha": "3bb14f11ddc5dc2c9aa20e6d92e897c59cac503e", "size": 4689, "ext": "py", "lang": "Python", "max_stars_repo_path": "astrobase/lcmodels/eclipses.py", "max_stars_repo_name": "adrn/astrobase", "max_stars_repo_head_hexsha": "7af71167deec58dffc8f668c0b34cb75ed44ae6a", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
using Documenter, GibbsTypePriors makedocs( modules = [GibbsTypePriors], format = Documenter.HTML(; prettyurls = get(ENV, "CI", nothing) == "true"), authors = "konkam", sitename = "GibbsTypePriors.jl", pages = Any["index.md"] # strict = true, # clean = true, # checkdocs = :exports, ) d...
{"hexsha": "e7086edfbbd598aff8e11b3cbec32b725b669162", "size": 412, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "konkam/GibbsTypePriors", "max_stars_repo_head_hexsha": "f923ed8a365261c34f4749b75005764279e63c94", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m...
import numpy as np from typing import Union __all__ = ['sum', 'mean', 'var', 'std', 'mean_std', 'quantile', 'median', 'ratio'] def sum(obs: np.ndarray) -> np.float: return obs.sum(axis=0) def mean(obs: np.ndarray) -> np.float: return np.divide(obs.sum(axis=0), obs.shape[0]) def demeaned(obs: np.ndarray)...
{"hexsha": "1c712baef6b541001c8f3b4230fc65c8bbfcd885", "size": 991, "ext": "py", "lang": "Python", "max_stars_repo_path": "abito/lib/stats/plain.py", "max_stars_repo_name": "avito-tech/abito", "max_stars_repo_head_hexsha": "9071eecd9526ee5c268cfacd7ac9a49b6ee185e5", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import unittest import numpy as np from numpy.testing import assert_almost_equal as almost_equal from thimbles.spectrographs import SamplingModel import thimbles as tmb class TestSamplingMatrixhModel(unittest.TestCase): min_wv = 100 max_wv = 200 npts_spec = 30 npts_model = 100 def setUp(se...
{"hexsha": "cf35d068811d4a4714436659f3ba09c6b7f847ef", "size": 1403, "ext": "py", "lang": "Python", "max_stars_repo_path": "thimbles/tests/test_spectrograph.py", "max_stars_repo_name": "quidditymaster/thimbles", "max_stars_repo_head_hexsha": "b122654a012f0eb4f043d1ee757f884707c97615", "max_stars_repo_licenses": ["MIT"]...
-- Intuitionistic propositional calculus. -- Hilbert-style formalisation of syntax. -- Nested terms. module IPC.Syntax.Hilbert where open import IPC.Syntax.Common public -- Derivations. infix 3 _⊢_ data _⊢_ (Γ : Cx Ty) : Ty → Set where var : ∀ {A} → A ∈ Γ → Γ ⊢ A app : ∀ {A B} → Γ ⊢ A ▻ B → Γ ⊢ A → Γ...
{"hexsha": "e4b9e5d13db8e76eb1c1b1361d7464cb459b085a", "size": 7564, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "IPC/Syntax/Hilbert.agda", "max_stars_repo_name": "mietek/hilbert-gentzen", "max_stars_repo_head_hexsha": "fcd187db70f0a39b894fe44fad0107f61849405c", "max_stars_repo_licenses": ["X11"], "max_stars_...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function from numpy.testing import assert_almost_equal, assert_array_almost_equal import pytest from PyDSTool import PyDSTool_ValueError, PyDSTool_TypeError from PyDSTool.Generator import Vode_ODEsystem @pytest.fixture() de...
{"hexsha": "6c2889b1036c01d3f258e3f69e5e65d679cd7ce7", "size": 3369, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/generator/test_odesystem_set_through_vode.py", "max_stars_repo_name": "yuanz271/PyDSTool", "max_stars_repo_head_hexsha": "886c143cdd192aea204285f3a1cb4968c763c646", "max_stars_repo_licenses"...
import numpy as np from sympy.utilities.iterables import multiset_permutations import networkx as nx import itertools from context import * from utils.graph_utils import rand_permute_adj_matrix, is_isomorphic_from_adj def generate_automorphism_dict(num_nodes, edges_range, directed=False, dtype=np.float64): """ ...
{"hexsha": "d3ec240672b4d405539ef927af3f051cdee5abdd", "size": 7364, "ext": "py", "lang": "Python", "max_stars_repo_path": "embedding/iso_nn_data_util.py", "max_stars_repo_name": "BrunoKM/rhoana_graph_tools", "max_stars_repo_head_hexsha": "7150f4bc6337ecf51dd9123cf03561a57d655160", "max_stars_repo_licenses": ["MIT"], "...
#!/usr/bin/env python3 ## # # This is a quick script to plot the trajectories resulting from different # methods on the same plot. We can also do this with comparison.py, but this # way allows us to compare directly with MILP, which we don't implement here. # ## import numpy as np import matplotlib.pyplot as plt from...
{"hexsha": "02a8e864a6227411b8fe521b29b56a846f7e553e", "size": 5668, "ext": "py", "lang": "Python", "max_stars_repo_path": "stl_optimization_results_plot.py", "max_stars_repo_name": "vincekurtz/STL_optimization", "max_stars_repo_head_hexsha": "05993a497b4fa68e43f0db5f86b7312ae5e7afc2", "max_stars_repo_licenses": ["MIT"...
#include <demo/color.h> #include <demo/memcpy.h> #include <boost/simd.hpp> #include <boost/simd/function/load.hpp> #include <boost/simd/function/store.hpp> #include <intrin.h> #include <omp.h> #include <cstdint> #include <cstring> #include <memory> #include <fstream> bench::time_point bench::start_; int main(int, ...
{"hexsha": "a7024cad11acf2cb8b5e684a8bd6d183c5e8384e", "size": 4511, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "source/main.cpp", "max_stars_repo_name": "chronos38/low_latency_demo", "max_stars_repo_head_hexsha": "de0d0d3dcebff23ba77c06c6c368b9d1c3d2c648", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
""" Reinforcement learning via policy gradients """ import random, math, pickle, time import interface, move, utils import numpy as np from agent import Agent from rl import RLAlgorithm from collections import defaultdict from utils import progressBar from copy import deepcopy from sklearn.neural_network import MLPReg...
{"hexsha": "138c85a1fe2c03c16ea92e8b36db6f2bcadfa468", "size": 5700, "ext": "py", "lang": "Python", "max_stars_repo_path": "policy_gradients.py", "max_stars_repo_name": "sds-dubois/snake.ai", "max_stars_repo_head_hexsha": "b5ee2a91b210055397e7942c7e24a51a5e583834", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np from chaco.api import AbstractPlotData, ArrayPlotData, Plot, ArrayDataSource from traits.api import Dict, Instance, Str from pandas import DataFrame class PandasPlotData(AbstractPlotData): ''' Chaco requires a PlotData interface to manage plot/data mapping; however, pandas already is its o...
{"hexsha": "980849a71f1504bb5e3af04a0a12d8a75831d25b", "size": 7500, "ext": "py", "lang": "Python", "max_stars_repo_path": "skspec/chaco_interface/pandasplotdata.py", "max_stars_repo_name": "hugadams/scikit-spectra", "max_stars_repo_head_hexsha": "c451be6d54080fbcc2a3bc5daf8846b83b7343ee", "max_stars_repo_licenses": ["...
include("test_data.jl") function test_cmp(io::Union{Nothing,IO} = nothing) map(TestData.test_cmp_data) do x ic = IntcodeMachine(x) run_intcode!(ic) res = fetch(ic) isnothing(res) && return @error "Intcode failed CMP '$x'" @info something(res) !isnothing(io) && flush(...
{"hexsha": "3d6879fc3a4e4d12a290c82c76917ad89fce5e31", "size": 966, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "events/2019/day-05/Intcode/test/test_cmp_jmp.jl", "max_stars_repo_name": "myrddin89/advent-of-code", "max_stars_repo_head_hexsha": "1401484be662794841c0ac5b863c0fda28e2fe06", "max_stars_repo_license...
# Load necessary packages library(tidyverse) # Use readr to read the raw .tab file from GitHub # Skip the lengthy metadata. bfd <- read_tsv("https://raw.githubusercontent.com/phjacobs/foram_sdm/master/Data/Raw/BFD.tab", skip=1326) # Remove '[m]', '[#]' and spaces names(bfd) <- gsub(x = names(bfd), pattern = " \\[m\\...
{"hexsha": "7f92aa6f7b3e7ffa26b79957284dc177d6755393", "size": 1189, "ext": "r", "lang": "R", "max_stars_repo_path": "bfd_raw_to_tidy.r", "max_stars_repo_name": "phjacobs/tidyflow", "max_stars_repo_head_hexsha": "f2461c83c5ed69ea0d160447018d0f03494db177", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
__author__ = 'lucabasa' __version__ = '1.0.1' __status__ = 'development' import numpy as np import pandas as pd def clean_cols(data, col_list): df = data.copy() for col in col_list: try: del df[col] except KeyError: pass return df def flag_missing(data, col_li...
{"hexsha": "af4c435bab7fba30fe4776381d507fd320b3cdce", "size": 1455, "ext": "py", "lang": "Python", "max_stars_repo_path": "titanic/processing.py", "max_stars_repo_name": "lucabasa/kaggle_competitions", "max_stars_repo_head_hexsha": "15296375dc303218093aa576533fb809a4540bb8", "max_stars_repo_licenses": ["Apache-2.0"], ...
using Colors, Gadfly, RDatasets set_default_plot_size(5inch,4inch) iris = dataset("datasets","iris") p = plot(iris, x=:SepalLength, y=:PetalLength, color=:Species, Geom.point, layer(Stat.smooth(method=:lm, levels=[0.90, 0.99]), Geom.line, Geom.ribbon), Theme(alphas=[0.6], key_position=:inside) )
{"hexsha": "8cf0bd32852ec3b58fc3968350efc629436079df", "size": 309, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testscripts/stat_smooth.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Gadfly.jl-c91e804a-d5a3-530f-b6f0-dfbca275c004", "max_stars_repo_head_hexsha": "d180d5760c758863f24e27e2bc42d...
""" Block and braile rendering of julia arrays, for terminal graphics. """ module UnicodeGraphics export blockize, brailize, blockize!, brailize! """ brailize(a, cutoff=0) Convert an array to a block unicode string, filling values above the cutoff point. """ blockize(a, cutoff=0) = blockize!(initblock(size(a)), ...
{"hexsha": "9add9cc2e1b07678b7fb271ce92c325a0cec4d7d", "size": 2767, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/UnicodeGraphics.jl", "max_stars_repo_name": "rafaqz/UnicodeGraphics.jl", "max_stars_repo_head_hexsha": "b1adbf1b0c13e50c0c8fba5e02db87a9f8b9f8ea", "max_stars_repo_licenses": ["MIT"], "max_stars...
import mxnet as mx from mxnet.gluon import nn from mxnet import nd import numpy as np from mxnet.base import numeric_types from mxnet import symbol class Reconstruction2D(nn.HybridBlock): def __init__(self, in_channels = 1, block_grad = False, **kwargs): super().__init__(**kwargs) self.in_channels = in_channels ...
{"hexsha": "04a5590b9a4f51f5964e332ace8e16c9016fec95", "size": 5381, "ext": "py", "lang": "Python", "max_stars_repo_path": "deep_flow/MaskFlownet/network/layer.py", "max_stars_repo_name": "yamaru12345/DF-VO2", "max_stars_repo_head_hexsha": "ed7359deeb38c36099cf8198f88e9a74dfa2403a", "max_stars_repo_licenses": ["MIT"], ...
########################################################################################################################### # SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN SINAN # ########################################################################...
{"hexsha": "ae18a7418ef7510bbc1a48a8a2b4071ee7bf50d0", "size": 13850, "ext": "py", "lang": "Python", "max_stars_repo_path": "pegasus/dados/transform/prepare_SINAN.py", "max_stars_repo_name": "SecexSaudeTCU/PegaSUS", "max_stars_repo_head_hexsha": "0e24c00595e8a7376680dfb2e5aa42e1e9eb7770", "max_stars_repo_licenses": ["M...
import numpy as np def generate(model, bpe, texts, length=100, top_k=1, temperature=1.0): """Generate text after the given contexts. :param model: The trained model. :param bpe: Byte pair encoding object. :param texts: A list of texts. ...
{"hexsha": "7e9e50cd5a57cd7a2842811692d83548b98f3f86", "size": 1653, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_gpt_2/gen.py", "max_stars_repo_name": "Pimax1/keras-gpt-2", "max_stars_repo_head_hexsha": "0a4adaad651a5a51e8a9c647c50cc01c3e51055c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
# (c) Copyright IBM Corporation 2020. # LICENSE: Apache License 2.0 (Apache-2.0) # http://www.apache.org/licenses/LICENSE-2.0 import numpy as np import gc from lrtc_lib.active_learning.strategies import ActiveLearningStrategies from lrtc_lib.active_learning.core.strategy.perceptron_ensemble import PerceptronEnsemble...
{"hexsha": "28055a6ffbd5947aa71b1f35f8621c3d294f3e19", "size": 1467, "ext": "py", "lang": "Python", "max_stars_repo_path": "lrtc_lib/active_learning/core/strategy/perceptron_dropout.py", "max_stars_repo_name": "MovestaDev/low-resource-text-classification-framework", "max_stars_repo_head_hexsha": "4380755a65b35265e84ecb...
import pandas as pd import numpy as np def ReadJenkins(): Headers=["Num","VComp","Object","Longitude","Latitude","Vmag", "SpType","SpType_ref","E(B-V)","Distance","Z","Lower_log(NHI)","log(NHI)","Flag_log(NHI)","Upper_log(NHI)","ref_log(NHI)","Lower_log(NH2)","log(NH2)","Upper_log(NH2)","ref_log(NH2)"] row...
{"hexsha": "516b12558239f6eec564c39772f11529b1833166", "size": 729, "ext": "py", "lang": "Python", "max_stars_repo_path": "edibles/data/sightline_data/ReadJenkins_data.py", "max_stars_repo_name": "jancami/edibles", "max_stars_repo_head_hexsha": "51263b24c5e8aef786692011289b906a810ad2f7", "max_stars_repo_licenses": ["MI...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def muscle(path): """Effect of Calcium Chloride on Muscle Contraction in ...
{"hexsha": "307b2b46257e5524d4dbac068d2b616712aa793a", "size": 2168, "ext": "py", "lang": "Python", "max_stars_repo_path": "observations/r/muscle.py", "max_stars_repo_name": "hajime9652/observations", "max_stars_repo_head_hexsha": "2c8b1ac31025938cb17762e540f2f592e302d5de", "max_stars_repo_licenses": ["Apache-2.0"], "m...
[STATEMENT] lemma simplicial_simplex_simplex_cone: assumes f: "simplicial_simplex p S f" and T: "\<And>x u. \<lbrakk>0 \<le> u; u \<le> 1; x \<in> S\<rbrakk> \<Longrightarrow> (\<lambda>i. (1 - u) * v i + u * x i) \<in> T" shows "simplicial_simplex (Suc p) T (simplex_cone p v f)" [PROOF STATE] proof (prove) goa...
{"llama_tokens": 8653, "file": null, "length": 78}
import argparse import chainer from chainer import cuda import fcn import numpy as np import tqdm from models.fcn8 import FCN8s def evaluate(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--file', type=str, help='model file path') args = parser.p...
{"hexsha": "e7e9bb1af802ad63828fd7602013209de9a50100", "size": 1447, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "juliocamposmachado/gain2", "max_stars_repo_head_hexsha": "cd1cb0ac021078ed42fe3c1456040c00622e79d7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24...
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import warnings import os warnings.filterwarnings("ignore") os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' dataPath = "temp/" if not os.path.exists(dataPath): os.makedirs(d...
{"hexsha": "3b53bee0d511279513b937d275c284243aacab56", "size": 700, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter03/MNIST/Explore_MNIST.py", "max_stars_repo_name": "tongni1975/Deep-Learning-with-TensorFlow-Second-Edition", "max_stars_repo_head_hexsha": "6964bf3bf11c1b38113a0459b4d1a9dac416ed39", "max_s...
[STATEMENT] lemma OclAny_allInstances_at_post_oclIsTypeOf\<^sub>O\<^sub>c\<^sub>l\<^sub>A\<^sub>n\<^sub>y2: "\<exists>\<tau>. (\<tau> \<Turnstile> not (OclAny .allInstances()->forAll\<^sub>S\<^sub>e\<^sub>t(X|X .oclIsTypeOf(OclAny))))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<exists>\<tau>. \<tau> \<Turnstil...
{"llama_tokens": 360, "file": "Featherweight_OCL_examples_Employee_Model_Analysis_Analysis_UML", "length": 2}
import os,sys,io,shutil,csv from decimal import Decimal import numpy as np def unit_vector(vector): """ Returns the unit vector of the vector.""" return vector / np.linalg.norm(vector) def angle_between(v1, v2): """Finds angle between two vectors""" v1_u = unit_vector(v1) v2_u = unit_vector(v2) return np....
{"hexsha": "f0b4d77833aa6a3bf969fef9e426561d392961fb", "size": 8479, "ext": "py", "lang": "Python", "max_stars_repo_path": "Rotate.py", "max_stars_repo_name": "AntonyPapadakis/HumanActionRecognitionCnns", "max_stars_repo_head_hexsha": "55b73afeadccfedc84892e5e6b56644e7bd58b58", "max_stars_repo_licenses": ["MIT"], "max_...
import matplotlib as mpl import make_colormap as mc import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import sys sys.path.insert(1, '../sglv_timeseries') import sglv_timeseries.glv.Timeseries from matplotlib.colors import Normalize from make_colormap import * import pandas as pd import n...
{"hexsha": "002bff78293efc3fddfb9fc1260ed2cdb5736a9d", "size": 23482, "ext": "py", "lang": "Python", "max_stars_repo_path": "noise_properties_plotting.py", "max_stars_repo_name": "lanadescheemaeker/logistic_models", "max_stars_repo_head_hexsha": "9e10e6e631c91adc8e85e8a4130caf9eca835d85", "max_stars_repo_licenses": ["B...
[STATEMENT] lemma kruskal_exchange_acyclic_inv_2: assumes "acyclic w" and "injective w" and "d \<le> w" and "bijective (d\<^sup>T * top)" and "bijective (e * top)" and "d \<le> top * e\<^sup>T * w\<^sup>T\<^sup>\<star>" and "w * e\<^sup>T * top = bot" shows "acyclic ((w \<sqint...
{"llama_tokens": 16571, "file": "Stone_Kleene_Relation_Algebras_Kleene_Relation_Algebras", "length": 109}
[STATEMENT] lemma Contra: "insert (Neg A) H \<turnstile> A \<Longrightarrow> H \<turnstile> A" [PROOF STATE] proof (prove) goal (1 subgoal): 1. insert (Neg A) H \<turnstile> A \<Longrightarrow> H \<turnstile> A [PROOF STEP] by (metis Peirce Imp_I)
{"llama_tokens": 101, "file": "Goedel_HFSet_Semanticless_SyntaxN", "length": 1}
[STATEMENT] lemma f''_imp_f': fixes f :: "real \<Rightarrow> real" assumes "convex C" and f': "\<And>x. x \<in> C \<Longrightarrow> DERIV f x :> (f' x)" and f'': "\<And>x. x \<in> C \<Longrightarrow> DERIV f' x :> (f'' x)" and pos: "\<And>x. x \<in> C \<Longrightarrow> f'' x \<ge> 0" and x: "x \<in>...
{"llama_tokens": 11830, "file": null, "length": 114}
%!TEX root = ../paper.tex \section{Conclusion and Future Work} \label{sec:conclusion} Nowadays, everyone can write a blog post fairly easily. Thus, the amount of blog posts and authors increases quickly, making the task of identifying an exact author hard to conclude. In this paper, we presented an approach of dividi...
{"hexsha": "b6863ba234c0437ba8fa01d21095caae535e096b", "size": 3906, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/sections/06_conclusion.tex", "max_stars_repo_name": "tabergma/similar_author_identification", "max_stars_repo_head_hexsha": "15ca2bd44f1ff19bf62317f7b146f501a2e60699", "max_stars_repo_licenses...
# Objective: Find the size of the components of the neutral network of a goal. # Methodology: Do multiple neutral random walks starting at a random circuit that maps to the goal. # neutral_walk() accumulate all neighbors of all neutral circuits encountered on the random neutral walk. # Then run_neutral_walk() combine...
{"hexsha": "67c46a27c797e050d595abca0deafeeb3f83c3f1", "size": 20961, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/neutral_walk_connectivity.jl", "max_stars_repo_name": "ahalwright/CGP.jl", "max_stars_repo_head_hexsha": "73952fcb08d2e6ee39e4df142e14ea34e4c09226", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- """ Created on Wed Feb 6 11:36:46 2019 @author: CatOnTour """ import mpmath as mp import numpy as np import matplotlib.pyplot as plt from sympy.abc import s from sympy.integrals.transforms import inverse_laplace_transform from sympy import symbols, lambdify from sympy import * from scipy impo...
{"hexsha": "3bf561d3c68d810ed10a72a02dfdf7cef6121e7d", "size": 3036, "ext": "py", "lang": "Python", "max_stars_repo_path": "solving_ODE_configurations.py", "max_stars_repo_name": "xi2pi/cardioLPN", "max_stars_repo_head_hexsha": "34759fea55f73312ccb8fb645ce2d04a0e2dddea", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/- Copyright (c) 2021 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import combinatorics.simplicial_complex.extreme open_locale classical affine big_operators open set --TODO: Generalise to LCTVS variables {E ...
{"author": "mmasdeu", "repo": "brouwerfixedpoint", "sha": "548270f79ecf12d7e20a256806ccb9fcf57b87e2", "save_path": "github-repos/lean/mmasdeu-brouwerfixedpoint", "path": "github-repos/lean/mmasdeu-brouwerfixedpoint/brouwerfixedpoint-548270f79ecf12d7e20a256806ccb9fcf57b87e2/src/combinatorics/simplicial_complex/intrinsic...
"""Module representing the Stroop Test protocol.""" # from typing import Dict, Tuple, Union, Optional, Sequence from typing import Optional, Sequence # import pandas as pd # import numpy as np # import matplotlib.pyplot as plt # import matplotlib.ticker as mticks # import seaborn as sns # # import biopsykit.colors as ...
{"hexsha": "5d54c5703b28cffca127f09fc79a529355fbf76b", "size": 30083, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/biopsykit/protocols/stroop.py", "max_stars_repo_name": "mad-lab-fau/BioPsyK", "max_stars_repo_head_hexsha": "8ed7a2949e9c03c7d67b9ac6d17948ae218d94c1", "max_stars_repo_licenses": ["MIT"], "ma...
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requi...
{"hexsha": "41e98f5b3270c4cb842b90606be168d3dca26e8d", "size": 3867, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Sources/Machine/rbm_multival.hpp", "max_stars_repo_name": "stubbi/netket", "max_stars_repo_head_hexsha": "7391466077a4694e8f12c649730a81bf634f695e", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import numpy as np import pandas as pd import yfinance as yf # Using yfinance ''' tickerSymbol = 'GOOG' tickerData = yf.Ticker(tickerSymbol) tickerDf = tickerData.history(period='1d', start='2010-1-1', end='2021-4-25') tickerDf.plot(y='Open') ''' # calling Yahoo finance API and requesting to get data for the last 1 ...
{"hexsha": "a2034dd3abfa3bb58067bbf14f92e325d7dcadc3", "size": 3006, "ext": "py", "lang": "Python", "max_stars_repo_path": "30DayChartChallenge/20210428-uncertainties-future.py", "max_stars_repo_name": "vivekparasharr/Challenges-and-Competitions", "max_stars_repo_head_hexsha": "c99d67838a0bb14762d5f4be4993dbcce6fe0c5a"...
(* Title: HOL/Auth/n_mutualExSimp_lemma_inv__4_on_rules.thy Author: Yongjian Li and Kaiqiang Duan, State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences Copyright 2016 State Key Lab of Computer Science, Institute of Software, Chinese Academy of Sciences *) header{*T...
{"author": "lyj238Gmail", "repo": "newParaVerifier", "sha": "5c2d49bf8e6c46c60efa53c98b0ba5c577d59618", "save_path": "github-repos/isabelle/lyj238Gmail-newParaVerifier", "path": "github-repos/isabelle/lyj238Gmail-newParaVerifier/newParaVerifier-5c2d49bf8e6c46c60efa53c98b0ba5c577d59618/examples/n_mutualExSimp/n_mutualEx...
from __future__ import print_function import os import pdb import torch import utils import numpy as np def has_checkpoint(checkpoint_path, rb_path): """check if a checkpoint exists""" if not (os.path.exists(checkpoint_path) and os.path.exists(rb_path)): return False if 'model.pyth' not in os.list...
{"hexsha": "c53ca8819c69771b8c18df340d4c92dff489b159", "size": 5686, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/checkpoint.py", "max_stars_repo_name": "yangfanthu/modular-rl", "max_stars_repo_head_hexsha": "25c599bab641a7e732dbaf116cd240fa2358f113", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
# -*- coding: utf-8 -*- """ Created on Thu Nov 2 20:32:21 2017 @author: linkw """ import pandas as pd import numpy as np #read indto df. take care of missing values and combine text. data=pd.read_csv("D:\\Datasets\\kickstarter\\train.csv") data.iloc[:,2].replace(np.NAN, '---', inplace=True) data.iloc[:,4].replace(n...
{"hexsha": "c5168e800459d023f9eb5b4d8ce16b3f3c29271b", "size": 7269, "ext": "py", "lang": "Python", "max_stars_repo_path": "kickstarter_xgb.py", "max_stars_repo_name": "linkwithkk/kickstarter", "max_stars_repo_head_hexsha": "bd3b60aaedc3f88ececc484f00dde1414f011310", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
\documentclass[margin,line]{res} \usepackage{fancyhdr} \usepackage{wasysym} \usepackage{textcomp} %\usepackage{hyperref} \usepackage{url} \usepackage{marvosym} %\usepackage[misc]{ifsym} % %\usepackage[margin=1in]{geometry} \addtolength{\textwidth}{0.20cm} \addtolength{\evensidemargin}{0.1cm} \addtolength{\oddsidemar...
{"hexsha": "b6a2df32e7dcfd3dfb04cde10f97d9863c263a46", "size": 25785, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "public/cv/mycv_latest/OLD/CV_YuZhang.tex", "max_stars_repo_name": "joshtai/yzhangweb", "max_stars_repo_head_hexsha": "d113f20927c17f11f681d6a8eb67e57b9ecd5984", "max_stars_repo_licenses": ["MIT"], ...
from copy import deepcopy import imageio import numpy as np import os from PIL import Image # Local Modules from simulation import SphereBody, Simulation, State, SystemState ANIM_OUT_DIR = "animation_out" ANIM_VID_FILENAME = ANIM_OUT_DIR + "/animation.mp4" MAX_QUALITY = 95 V0 = np.array([35, 0, 0], dtype=float) cl...
{"hexsha": "3775a2a7b11d471b1a8274a63efae84d3ecaa56f", "size": 4810, "ext": "py", "lang": "Python", "max_stars_repo_path": "animation.py", "max_stars_repo_name": "thinhnguyenuit/sombra", "max_stars_repo_head_hexsha": "5176d264508dd5cce780dc63f1dd948d66b189e8", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
import numpy as np import math import time from sklearn.cluster import MiniBatchKMeans, KMeans class Top_Down(object): def __init__(self,n_classes): self.subcls = math.ceil(math.sqrt(n_classes)) self.top_K = KMeans(n_clusters=self.subcls,n_init=10,max_iter=300,n_jobs=-1,verbose=0,init='random') ...
{"hexsha": "487a130ac2be452fbc4e1c7460ddeb38dd35a76e", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/AIC2018_iamai/ReID/clustering.py", "max_stars_repo_name": "gordonjun2/CenterTrack", "max_stars_repo_head_hexsha": "358f94c36ef03b8ae7d15d8a48fbf70fff937e79", "max_stars_repo_licenses": ["MIT"]...
import argparse import os import pdb import pyproj import numpy as np from glob import glob from tqdm import tqdm from scipy.spatial.transform import Rotation as R def config_parser(): parser = argparse.ArgumentParser( description='Semantic label sampling script.', formatter_class=argparse.Argume...
{"hexsha": "0fe2dbcdf94649c3d18a19e0675bd786612a2938", "size": 7721, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/tools/scan_npy_pointcloud.py", "max_stars_repo_name": "Shanci-Li/TOPO-DataGen", "max_stars_repo_head_hexsha": "bc2be65bbcca4cb415e2f7d19cb3c3d620279ddc", "max_stars_repo_licenses": ["MIT"]...