sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
3364da126779bdf9b6e2c002eb7dfed7e5574a7db78755f54342a2c5ca28b967 | Jupyter | 19,491 | 519 | # %%
import numpy as np
import matplotlib.pyplot as plt
# from lgca import get_lgca
from itertools import product
import pickle as pkl
from numba import jit, prange
from matplotlib.lines import Line2D
from plot_funcs import label_axes
from mpl_toolkits.axes_grid1 import make_axes_locatable
from itertools import product... |
67291b91a7ea424d9160e8b2791a2c2395f9d596b6deb227c2ca1744f24fa552 | Jupyter | 19,500 | 502 | # %% [markdown]
# ##### top
# %% [markdown]
# # Estimate shrinking of variance for high reliabilities due to contrains of the data
#
#
# As it was observed in Figure 3 of the paper, the standard deviation of the possible correlations (the width of the distribution of the correlations) is shrinking with increasing re... |
ffdfaa6ed5ad3e3dc7cbe1e56fc43f516927b183afc2ff43df31fce169a93cae | Jupyter | 19,586 | 519 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Source level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
b46f98820c84f78c6d60d139e6515e8197b2c34ec5dfb52abedd422f426e8965 | Jupyter | 19,716 | 505 | # %%
using Distributed
addprocs(8);
# %%
@everywhere using PulseInputDDM
using Flatten, MAT
# %%
import Base.Iterators: partition
# %%
import PulseInputDDM: choice_null
# %%
ratnames = ["B068","T034","T036","T063","T030", "T035","T011","B053", "T080","T103","E021"];
dt, n, cross = 1e-2, 53, false
data_path = joinpa... |
a57b0c4a9d3bbbadac9db8d4cd69060f1792abce214e63b01ae13985f815bb9b | Jupyter | 19,816 | 592 | # %% [markdown]
# ### *This file allows to generate all data necessary for all figures*
# %% [markdown]
# # **Useful packages and functions**
# %%
using DifferentialEquations, Plots, Polynomials, LaTeXStrings, ColorSchemes, DelimitedFiles
using Statistics, StatsPlots, Random, ProgressMeter, Printf, LinearAlgebra
incl... |
426f3235ec088213b847f165be9ae2264fa1a2ea294ffe5738bc6d7ed07b6c8b | Jupyter | 19,838 | 521 | # %%
import numpy as np
import matplotlib.pyplot as plt
# from lgca import get_lgca
from itertools import product
import pickle as pkl
# from numba import jit, prange
from matplotlib.lines import Line2D
from plot_funcs import label_axes
from mpl_toolkits.axes_grid1 import make_axes_locatable
from itertools import produ... |
0d6d10ea6fecc148317842bf3d03bce97a7cbdbb2665895b39f823fd23653a27 | Jupyter | 19,945 | 290 | # %% [markdown]
# See code at https://github.com/google-research/vision_transformer/
#
# This Colab is about the paper
#
# - LiT: Zero-Shot Transfer with Locked-image text Tuning: https://arxiv.org/abs/2111.07991
#
# For ViT, MLP Mixer etc see the other Colab
#
# https://colab.research.google.com/github/google-rese... |
e511b362522d254a8baf12f55b77abfc387ab99479362b60b6e49dc12f82cc1a | Jupyter | 19,998 | 747 | # %%
%load_ext autoreload
%autoreload 1
%matplotlib widget
# %%
import flammkuchen as fl
from numba import jit
import numpy as np
import matplotlib.pyplot as plt
# plt.style.use("v_paper")
plt.style.use("figures.mplstyle")
import cmocean as cmo
from pathlib import Path
import os
from sklearn.linear_model import Ridge... |
c88bf0e2c8b54f4348dd185370c704ba0d7e9361415c86ec1417611ca2b45b24 | Jupyter | 20,113 | 490 | # %%
import glob
import os
import subprocess
import sys
import matplotlib.pyplot as plt
from matplotlib import colors
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from matplotlib import cm
import nibabel as nib
import numpy as np
print(np.__version__)
# needs to be 1.23 or lower
from numpy impo... |
eddc405a62bb2a10066410aec9fc6996770279bac39330c33cb4bba5ce204885 | Jupyter | 20,188 | 698 | # %%
%load_ext lab_black
import os, sys
%load_ext autoreload
%autoreload 2
sys.path.append("/n/home12/khou/holystore/")
import matplotlib
matplotlib.rcParams["pdf.fonttype"] = 42
matplotlib.rcParams["ps.fonttype"] = 42
import paper_utils
import matplotlib.pyplot as plt
import scTRS.data_loader as dl
import pandas ... |
c7bbdcb4222a7b9cf2ab2d71c6b9d22365c77d5e9ace230f86b738dc003dd645 | Jupyter | 20,238 | 536 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Sensor level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
04c2edd16f08c8044369a58c3fe36173b8978326ecba327f3b360ee0c64e6ce6 | Jupyter | 20,275 | 602 | # %% [markdown]
# ### *This file allows to generate all data necessary for all figures*
# %% [markdown]
# # **Useful packages and functions**
# %%
using DifferentialEquations, Plots, Polynomials, LaTeXStrings, ColorSchemes, DelimitedFiles
using Statistics, StatsPlots, Random, ProgressMeter, Printf, LinearAlgebra
incl... |
ef702c8b79278ce0534cef9320f76b1e47b548b4d498815b37b311ffd2f554b0 | Jupyter | 20,291 | 537 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Sensor level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
1dc24fca6ce91abb27e6c3d4c4f78c628e33473217dde0478baaca588d96bfe4 | Jupyter | 20,395 | 668 | # %%
import omicverse as ov
#import scvelo as scv
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
ov.ov_plot_set()
# %%
import omicverse as ov
ov.utils.ov_plot_set()
from matplotlib import rcParams
# 设置全局字体为Arial
rcParams['font.family'] = 'Arial'
# %% [markdown]
# ## ce... |
153aeb3f114fec107ece756bec2c037b74d8e4ecb37ba3468c8b197c8c939cdb | Jupyter | 20,420 | 544 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Sensor level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
fbf8a626ce64128b5f1241e64aaa59b010d65b06152056bb96a0255b1d3b1626 | Jupyter | 20,477 | 636 | # %% [markdown]
# # Table of Contents
#
# 1. [Import & Set Up](#import_everything)
# 2. [Load in data](#load_files)
# 3. [Center of Mass](#c_o_m)
# 1. [distance apart](#distance_apart)
# 2. [error by overlap](#error_by_overlap)
# 4. [Face Associate Task](#face_task)
# %% [markdown]
# # Import Stuff
# <a id='i... |
5d9fccce97a166b77385a4f0bd3e9e5d011969428b950cbc7f1e4cc410e83f8f | Jupyter | 20,668 | 717 | # %% [markdown]
# # LSL hands-on:
# # What did we learn comparing EEG and Unity data streams?
# <br>
#
# ### Tea Time 16.04.2020 - Marc Vidal De Palol
# %% [markdown]
# ## Outline
#
# 1. Why aligning data streams is important?
# 2. Delay, jitter and latency
# 3. What is LSL (lab streaming layer)?
# 4. Designing the... |
48590a0611e17032b76924138aab4f53fde3c22c492b0b9a3cfda013c53cc210 | Jupyter | 20,681 | 650 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn import linear_model
from scipy.stats import norm
from scipy import stats
import networkx as nx
import datetime
import seaborn as sns
import pandas as pd
import seaborn as sns #用于绘制热图的工具包
from scipy.cluster import hierarchy #用于进行层... |
4cd2b2bd81a163e56563d5d10fa466a4e879ecb59b211f30921e66a326f579a6 | Jupyter | 20,706 | 647 | # %%
import numpy as np
import matplotlib.pyplot as plt
from lgca import get_lgca
import pickle as pkl
import string
from itertools import cycle
import matplotlib.gridspec as gridspec
from plot_funcs import label_axes
# %%
plt.style.use(r'C:\Users\Simon Syga\PycharmProjects\biolgca\nature_style.mplstyle')
PATH = '.\\d... |
9eed1ed161b4f730892f4d71e46689413017024d91c90c0fece5ecf889a9e9e3 | Jupyter | 20,743 | 647 | # %%
import numpy as np
import matplotlib.pyplot as plt
from lgca import get_lgca
import pickle as pkl
import string
from itertools import cycle
import matplotlib.gridspec as gridspec
from plot_funcs import label_axes
# %%
plt.style.use(r'C:\Users\Simon Syga\PycharmProjects\biolgca\nature_style.mplstyle')
PATH = '.\\d... |
c4432cb64a69e3cd81d1ebf303f2b87c1e0b9241b6ae9f8950d015b905314580 | Jupyter | 21,089 | 614 | # %% [markdown]
# **Steady-State Mass Constrained Neural Networks (MCNN)**
#
# This code develops steady-state MCNN models for the cases when *random bias with / without Gausssian noise* is added to true data to generate training data. The linear noise model works fine for all cases considered in this work. However, o... |
7f43978a723adaceb79b9904ead515ac3248bfc8dc77555ee95feb404595a455 | Jupyter | 21,108 | 707 | # %%
import argparse
import os
import numpy as np
import math
import torchvision.transforms as transforms
from torchvision.utils import save_image
from torch.utils.data import DataLoader
from torchvision import datasets
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import ... |
d0aaa1d29f7bc3460222ee22cff031e2c0fb455bacdd2a1f1c9a1a0a653bda4a | Jupyter | 21,177 | 569 | # %% [markdown]
# # Advanced usage
# %% [markdown]
# This notebook shows some more advanced features of `skorch`. More examples will be added with time.
#
# <table align="left"><td>
# <a target="_blank" href="https://colab.research.google.com/github/skorch-dev/skorch/blob/master/notebooks/Advanced_Usage.ipynb">
# ... |
7eaa7509d8c7b4fe428cbd7c1fb7f178a74f3abe8ed02126105455618af01eb0 | Jupyter | 21,239 | 560 | # %%
import sklearn
import sklearn.datasets
import sklearn.ensemble
import pandas as pd
import numpy as np
import lime
import lime.lime_tabular
import h2o
from h2o.estimators.random_forest import H2ORandomForestEstimator
from h2o.estimators.gbm import H2OGradientBoostingEstimator
np.random.seed(1)
# %%
# Start an H2O... |
02f879cc52475c17f8259fd800bf707b84c9efcb4e941c05c86485fa6d96ff4b | Jupyter | 21,265 | 741 | # %%
import numpy as np
import pandas as pd
import os
import torch
from torch.autograd import Variable
from matplotlib import pyplot as plt
%matplotlib inline
# %%
import sys
sys.path.append("../Network-SDE-Inference/utils")
import LaGNA_flocks
import Self_func
import Interaction_func
from LaGNA_flocks import *
from S... |
726fb2887d2c2ed7e4f0b03004064686bd3bc2043807d97622e4e3527b2585b8 | Jupyter | 21,310 | 401 | # %% [markdown]
# # LeNet5 Analog Training Example
# Training the LeNet5 neural network with MNIST dataset and the Analog SGD optimizer simulated on the analog resistive random-access memory with soft bounds (ReRam) device.
#
# <a href="https://colab.research.google.com/github/IBM/aihwkit/blob/master/notebooks/analog_... |
7dfa35a8d479e2a5b5dbc98aaa7a39e8d91daa99a9c054942bdbfdaefcd87bc0 | Jupyter | 21,348 | 624 | # %% [markdown]
# **Steady-State Mass Constrained Neural Networks (MCNN)**
#
# This code develops steady-state MCNN models for the cases when *no noise* or *constant bias with / without Gausssian noise* is added to true data to generate training data.
#
# The unconstrained network model is trained first, followed by ... |
82864811a0b879f49c70de226fad4e4a0c439a3f604e1868af3230d192af0e31 | Jupyter | 21,357 | 400 | # %% [markdown]
# # LeNet5 Analog Training Example
# Training the LeNet5 neural network with MNIST dataset and the Analog SGD optimizer simulated on the analog resistive random-access memory with soft bounds (ReRam) device.
#
# <a href="https://colab.research.google.com/github/IBM/aihwkit/blob/master/notebooks/analog_... |
1aea692ecc200464f69884c54ca046fe8033be615e40bb26c8a805809b6a0084 | Jupyter | 21,373 | 743 | # %%
import numpy as np
import pandas as pd
import os
import torch
from torch.autograd import Variable
from matplotlib import pyplot as plt
%matplotlib inline
# %%
import sys
sys.path.append("../Network-SDE-Inference/utils")
import LaGNA_flocks
import Self_func
import Interaction_func
from LaGNA_flocks import *
from S... |
597615897c53f80ce82cb759a277e847d9f8a2064a502b91f4f9625a7b564204 | Jupyter | 21,460 | 674 | # %% [markdown]
# # Preparing data to be used in models trainings
# %% [markdown]
# # Sorghum
# %% [markdown]
# ## For Segmentation
# %%
import os
import cv2
from tqdm import tqdm
ROOT_DIR = "data/yolo_segmentation"
OUTPUT_DIR = "data/yolo_cropped"
os.makedirs(OUTPUT_DIR, exist_ok=True)
def convert_to_absolute(co... |
f70a1687da954ac5219e0f84301553daed0d2913bd1445795f1693352785b517 | Jupyter | 21,468 | 862 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Source level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
75a4ab638a132d8eb6ee1fb44d32cbe9b17577436f341737b2316a50c3bf4026 | Jupyter | 21,479 | 626 | # %%
import sys
sys.path.append("../Network-SDE-Inference/utils")
import NeuGNN_model
import Self_func
from NeuGNN_model import *
from Self_func import *
import warnings
warnings.filterwarnings("ignore")
# %%
import numpy as np
import pandas as pd
import os
import torch
from torch.autograd import Variable
from matplo... |
97187d82d2c1e223a2dcb1ad8bfa9dd159371fb9523338196af6f15a314caa99 | Jupyter | 21,585 | 618 | # %%
import pandas as pd
import numpy as np
from scipy.interpolate import make_interp_spline
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.ticker as ticker
# 导入自己封装的库
# from Gaussian_CDF_qiyun import Gaussian_CDF,Q_Gaussian_CDF
from SARSA_function_qiyun import get_file_list
#... |
04f3e96d116263fe04644dca416f1964e7a1d8640fc8293b42a3c0f72d93516e | Jupyter | 21,636 | 659 | # %% [markdown]
# # Chronic Kidney Disease
# %% [markdown]
# 🏆 Problem Statement: Using the data which has 25 features to predict patient with chronic kidney disease
# %% [markdown]
# ### Libraries
# %%
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/... |
15ad4f09f7a0aa2102def986a7fc857bf0cdfc23a7f89dfd0d11f98f315733c2 | Jupyter | 21,649 | 741 | # %%
import numpy as np
import pandas as pd
import os
import torch
from torch.autograd import Variable
from matplotlib import pyplot as plt
%matplotlib inline
# %%
import sys
sys.path.append("../Network-SDE-Inference/utils")
import LaGNA_flocks
import Self_func
import Interaction_func
from LaGNA_flocks import *
from S... |
72b76d0c5694c893403ce1297d7b8ed3e2e1962281c2c0b88b881bfe5181443c | Jupyter | 21,916 | 751 | # %%
import numpy as np
import pandas as pd
import os
import torch
from torch.autograd import Variable
from matplotlib import pyplot as plt
%matplotlib inline
# %%
import sys
sys.path.append("../Network-SDE-Inference/utils")
import LaGNA_flocks
import Self_func
import Interaction_func
from LaGNA_flocks import *
from S... |
c7c6ce1d771e65151a2ac0b412986aadea2f94dea6689b57ba6ae7b4f9be5058 | Jupyter | 21,984 | 712 | # %% [markdown]
# # Perform Experiments with DeepFace on LFW dataset
# %%
# built-in dependencies
import os
# 3rd party dependencies
import numpy as np
import pandas as pd
from tqdm import tqdm
import matplotlib.pyplot as plt
import sklearn
from sklearn.datasets import fetch_lfw_pairs
from sklearn.metrics import conf... |
ebbd461542a58ebcbcb4c07192d4c7b0d4f7e543faecd2483db798346b2cb26b | Jupyter | 22,023 | 587 | # %% [markdown]
# # skorch doctor
# %% [markdown]
# Sometimes, when working with neural nets, you'll find that it's quite hard to train them. Often in those cases, it's not that easy to say what's wrong. Do we have bad data? A bad architecture? Or did we just choose bad hyper-parameters?
#
# It's hard to rule out the... |
e8547b65212e66740cb3ba69d1f03d70d1ee13ab3834aa186c0ffb48a82d9765 | Jupyter | 22,128 | 654 | # %% [markdown]
# # Fine-tuning the model for token classification
# ***
# #### We will be predicting 2 depolymerase folds : Beta-helix and 6
# #### Here are the results for the models :
# ***
# esm2_t6_8M_UR50D : {'eval_loss': 0.45753657817840576, <b>'eval_accuracy': 0.8439131075453115</b>, 'eval_runtime': 40.7606, '... |
322df7055b3fc5e9c28c611e63d213e29b142c9af607fb0b5a47732db5a0e93f | Jupyter | 22,148 | 577 | # %%
using Distributed
addprocs(8);
# %%
@everywhere using PulseInputDDM, MAT, LinearAlgebra
using PyPlot, Colors, Random
import Statistics: mean, median
import Statistics: cor
import PulseInputDDM: cond_mean
# %%
ratnames = ["B068","T034","T036","T063","T030", "T035","T011","B053", "T080","T103","E021"];
dt, n, cros... |
75ee860f6af93338c56498a8e35adba8ffac9a7c6c8b75357854f0594dd93e78 | Jupyter | 22,289 | 563 | # %%
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['font.size'] = 20
plt.rcParams['axes.spines.right'] = False
plt.rcParams['axes.spines.top'] = False
matplotlib.rcParams['pdf.fonttype'] = 42
np.random.seed(1)
### set some parameters ###
N = 500 #number of neurons in each layer
###... |
5c38936fe29a003b00e903b360e0406d9cd87658446446cf222521a5b28ffce2 | Jupyter | 22,345 | 699 | # %%
!pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps
# %%
%load_ext autoreload
# %%
import torch
torch.set_float32_matmul_precision('high')
# %%
from os.path import join
import yaml
import numpy as np
import pandas as pd
import lightning.pytorch as pl
import dask.dataframe as dd
import seaborn as sns... |
aa2ae229ddbe3e28b32914d9750a46dc6912efa39ea961fbb766985a31513762 | Jupyter | 22,372 | 676 | # %%
from functools import partial
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as data
import numpy as np
from scipy import signal
from scipy import linalg as la
from scipy import special as ss
from einops import rearrange, repeat, reduce
import matplotlib.pyplot as plt
f... |
93abb4656c0373bc4c4ac0443c4a9c0639c85707dc3db4a3bf3bf2a5611d2ab6 | Jupyter | 22,389 | 584 | # %%
# Figure S3C - Divergence map
# %%
import numpy as np
import os
import sys
import nibabel as nib
import matplotlib.pyplot as plt
import os
import sys
from pathlib import *
import numpy as np
import matplotlib.pyplot as plt
import nibabel as nib
from scipy import stats as stats
from scipy import special as special... |
139c45a431887721944063829bc1705af2d2feb8a5b3c90d69fbf8b5e2a8b93c | Jupyter | 22,474 | 680 | # %% [markdown]
# # Chunk Video Performance Analysis
#
# This notebook analyzes the performance of `chunk_video_async` across different:
# - Video lengths
# - Chunk durations
#
# We'll generate a heatmap showing execution time as a function of these parameters.
# %%
import asyncio
import json
import time
import os
i... |
d399189dd6ec336bd01fbf1edf805b69812e24a9830a90cf6c9d83f67c8435e8 | Jupyter | 22,504 | 438 | # %% [markdown]
# # IBM Analog Hardware Acceleration Kit (AIHWKIT): from device characteristic to DNN Training
#
# ### Authors: [Fabio Carta](https://www.linkedin.com/in/fabiocarta83/), [Malte Rasch](https://www.linkedin.com/in/malte-j-rasch-08731817/), and [Kaoutar El Maghraoui](https://www.linkedin.com/in/kaoutar-el... |
e2a0006ff419eb93e59d30b03b38437b668d130e363afb494db83487df062882 | Jupyter | 22,537 | 440 | # %% [markdown]
# # IBM Analog Hardware Acceleration Kit (AIHWKIT): from device characteristic to DNN Training
#
# ### Authors: [Fabio Carta](https://www.linkedin.com/in/fabiocarta83/), [Malte Rasch](https://www.linkedin.com/in/malte-j-rasch-08731817/), and [Kaoutar El Maghraoui](https://www.linkedin.com/in/kaoutar-el... |
f2c0cac4de41972971b3bebb34d122aabd8d97a6167b768041cbbc368dd1a973 | Jupyter | 22,576 | 611 | # %%
using Pkg
Pkg.status()
# %%
using Distributed
addprocs(8); #change to number of logical cores
# %%
@everywhere using PulseInputDDM, MAT, Flatten
import Statistics: mean, median
# %%
x_joint = Vector(undef, 3);
# %%
ratnames = ["B068","T034","T036","T063","T030", "T035","T011","B053", "T080","T103","E021"];
dt,... |
45912b0a4d93069ba2ec69a21a85bed0c27c635d5f7f93ad4367489d1ec1bbde | Jupyter | 22,699 | 691 | # %%
#CNN Model ChatGpt Dataset oversampling ..........
import pandas as pd
import numpy as np
import re
from nltk.stem import WordNetLemmatizer
from sklearn.model_selection import KFold
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras.models impor... |
db4487e5af30204cf3e212d5e1d47d298b1c1c9da31b4eb7418f8ee3da5e1a52 | Jupyter | 22,810 | 430 | # %% [markdown]
# # LeNet5 Analog Training Example
# Training the LeNet5 neural network with MNIST dataset and the Analog SGD optimizer simulated on the analog resistive random-access memory with soft bounds (ReRam) device.
#
# <a href="https://colab.research.google.com/github/IBM/aihwkit/blob/master/notebooks/analog_... |
6f783d3fadcac616acb3b622d55cff50b0acbfea9f7b6e8d37af2fe0087b2544 | Jupyter | 22,830 | 470 | # %% [markdown]
# # Machine learning and deep learning methods applied to predicting customer status
#
# Purpose: Predict active and not active clients based on the proposed data structure and naive data structure. Here, we implemented Support Vector Machines (SVM), Random Forest (RF), K-nearest Neighbours (KNN) and L... |
fce55115b88e2cf703a19551bfaf7683496723b49fd840e0955f7a303b4413b8 | Jupyter | 22,836 | 470 | # %% [markdown]
# # Machine learning and deep learning methods applied to predicting customer status
#
# Purpose: Predict active and not active clients based on the proposed data structure and naive data structure. Here, we implemented Support Vector Machines (SVM), Random Forest (RF), K-nearest Neighbours (KNN) and L... |
44870d0d10373f37330ac57d4694c1aea80dcd0f2cd383fc23a30eca704ea73a | Jupyter | 22,837 | 526 | # %% [markdown]
# # IBM Analog Hardware Acceleration Kit (AIHWKIT): Hardware-aware Training for Accurate Inference on Analog Hardware
#
# ### Authors: [Julian Büchel](https://www.linkedin.com/in/julian-büchel-0673991a3/), [Manuel Le Gallo-Bourdeau](https://research.ibm.com/people/manuel-le-gallo-bourdeau), and [Kaouta... |
a947c1876d21df6551ba788122bf45cdc2748f024da3cd6ffb855e2f7397a416 | Jupyter | 22,859 | 430 | # %% [markdown]
# # LeNet5 Analog Training Example
# Training the LeNet5 neural network with MNIST dataset and the Analog SGD optimizer simulated on the analog resistive random-access memory with soft bounds (ReRam) device.
#
# <a href="https://colab.research.google.com/github/IBM/aihwkit/blob/master/notebooks/analog_... |
3e16bd89e68d4c4c5720dad1e0e9ab5cb85925355a35b892ee83aaa12bb69f57 | Jupyter | 22,916 | 556 | # %% [markdown]
# # Weather forecasts on ERA5 with hybrid sigma-pressure levels
#
# This notebook is the hybrid-level counterpart of
# [weather_forecast_on_era5.ipynb](weather_forecast_on_era5.ipynb): it initializes
# the Dinosaur dynamical core from ERA5 and runs a two-day forecast at T170 with
# 32 layers, but on *h... |
4b1dbc60597331eaca102150ece5eb501a9ae737bdfdbb09b367872dbf37c0fd | Jupyter | 23,058 | 608 | # %%
#import
import pickle
import glob
import seaborn as sns
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats
from scipy.ndimage import gaussian_filter1d
# %%
#load data
folder = '/Volumes/Elements/data_for_uploaded/'
all_Fres = np.load(folder + 'Fig.5/' + 'responsi... |
b7a3cc56cac61961bad1c043706fafec03a9feffed4207f4fdd0f479086f9401 | Jupyter | 23,248 | 591 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Source level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
e11e41162492a75baf9725292f4b863498b13a529403df6ecdde49de857902aa | Jupyter | 23,291 | 703 | # %%
!sudo apt install python3.7
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.7 2
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.1 1
!python --version
# %%
!git clone https://github.com/zhenruiliao/tension.git tension
!pip install -e tension
# %%
!pip... |
dc1def4ebfcead39f04910e7f047b53ff3d9e58d375d91c3bc0c76086ce2a82c | Jupyter | 23,310 | 628 | # %% [markdown]
# # Using Readout Layer
#
# This tutorial demonstrate the way of using the readout layer of Speck2e/Speck2f devkit.
# %% [markdown]
# ## What is readout layer
#
# 
#
# Readout layer is used to **readout the classification res... |
11e63eb0f3d1861650db201579e3d1daddd08743a3b310beac9d6dcf62235678 | Jupyter | 23,657 | 508 | # %% [markdown]
# Nonvolatile resistive memories—such as phase-change memory (PCM)—based computational devices allow limited numerical compute accuracy due to certain non-ideal device characteristics. In this post, you will get a feel for these non-idealities, gauge their impact on computational precision, and learn ab... |
869c75b651a3fbfd335907b557ec95685161be3e473b03003aaa37f714dd079e | Jupyter | 23,746 | 728 | # %%
import numpy as np
import scipy
from matplotlib import pyplot as plt
from google.colab import files
import matplotlib.ticker as tkr
def latexify():
import matplotlib
params = {'backend': 'svg',
'axes.labelsize': 8,
'font.size': 8,
'legend.fontsize': 8,
... |
958bef08e39aa93d4a91c12f1a6bcb9e207384e379dd69bd9a036177cd0a87cd | Jupyter | 23,807 | 435 | # %% [markdown]
# # Video analysis inference pipeline with Ray Serve
#
# This notebook demonstrates how to build a production-grade video analysis pipeline with [Ray Serve](https://docs.ray.io/en/latest/serve/). The pipeline processes videos from S3 and extracts:
#
# - **Tags**: [Zero-shot classification](https://hug... |
ce64f4dbc5b68535d9c7acb278b1f279a37ea22b3a8931bbb67c1bc859e4af00 | Jupyter | 23,928 | 468 | # %% [markdown]
# We used DeepLabCut and DeepOF Python packages to obtain supervised behavior data
#
# DeepLabCut: https://github.com/DeepLabCut/DeepLabCut
#
# DeepOF: https://github.com/mlfpm/deepof
#
# We followed the instruction of DeepOF to label 11 body parts (modified from deepof_14, without Tail_1, Tail_2, Ta... |
0397e9e7dabb0d8d5961329472273bc852085dc24a116d8117b3801a2da7bf4a | Jupyter | 23,957 | 495 | # %% [markdown]
# # Machine learning and deep learning methods applied to predicting customer status
#
# Purpose: Predict active and not active clients based on the proposed data structure and naive data structure. Here, we implemented Support Vector Machines (SVM), Random Forest (RF), K-nearest Neighbours (KNN) and L... |
799adf39ea4506e466c83c77ea4b6a7f17c4ee5d8b2f2ba12803c8936406c565 | Jupyter | 24,047 | 672 | # %% [markdown]
# # Notebook to reproduce spectral figures
# %%
# return figures in svg
%config InlineBackend.figure_formats = ['png']
import h5py
import bayesprev
import numpy as np
import pandas as pd
from itertools import product, combinations
from os.path import join as pjoin
import matplotlib
import matplotlib.... |
309f0f0f5a42fc550feaef0f6152e249ea9cdf358e97a823835cc92c313259d2 | Jupyter | 24,058 | 949 | # %% [markdown]
# # Forward Simulation of 2D VEP model at Sensor level
# %%
import os
import sys
import time
import errno
import time
import timeit
import numpy as np
import numba
from numba import jit
import matplotlib.pyplot as plt
from matplotlib import colors, cm
# %%
import warnings
warnings.simplefilter("ign... |
8b9d7b30a60ae05a3179e2ca5d0a68871d20ca05a0d1640ebf2d08c567ef2eef | Jupyter | 24,100 | 774 | # %% [markdown]
# # Confidence model
# %%
%load_ext autoreload
%autoreload 2
# %%
from collections import defaultdict
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
from tqdm import tqdm
import warnings
from rdkit import Chem
# Sci-kit learn
from mol2ccs.confidence_model import RFSt... |
46cae9132c2b8ac79d6489790c50dc525b9fb287e52ab1562ad1c566d2b89af0 | Jupyter | 24,259 | 530 | # %%
import scanpy as sc
from anndata import read_h5ad
import pandas as pd
import numpy as np
import scipy as sp
from statsmodels.stats.multitest import multipletests
import matplotlib.pyplot as plt
import seaborn as sns
import os
from sklearn import metrics
# scTRS tools
import scdrs.util as util
import scdrs.data_lo... |
8566232b460438645a30aa65deed976d6ea41df1d9a974f01ac2432fd9c5b2fc | Jupyter | 24,316 | 821 | # %%
!pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps
# %%
!pip install -q SPARQLWrapper
# %%
%load_ext autoreload
# %%
import pickle
import os
from os.path import join
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import dask.dataframe as dd
# %%
DATA_... |
5d5a82c979addb4673fb442428c86cdb35fe9a1565dadf52f1f5fae4139a3327 | Jupyter | 24,534 | 770 | # %% [markdown]
# # The goal here is to benchmark the DpoDetection tool with other depolymerase detection tools
# ***
# # I. Load the models :
# #### 77 phages candidates
# >Detected Dpos <br>
# >Missed Dpos <br>
# ***
# # II. Getting the resulting predictions
# #### Pires Dpos
#
# ***
# # III. Make figures
# ***
#... |
64249a577550d066860c358a5b61379f8ef4cd1724c7a8ccc4a7a4455983c34e | Jupyter | 24,549 | 564 | # %%
import numpy as np
import cv2
import os
import pandas as pd
from collections import Counter as cnt
import matplotlib.pyplot as plt
import torch
import csv
from scipy.stats import chi2_contingency
import pickle
from scipy import stats
from Mymodule.ModelHandler import *
from Mymodule.Utils import *
from Mymodule.... |
35d183f964557f5bb5832d208e399195844197f0bcf6a626431f470e8b915704 | Jupyter | 24,635 | 487 | # %% [markdown]
# # Fine-tuning Llama-2 Model with Intel Gaudi
#
# <a id="try-anyscale-quickstart-intel_gaudi-llama" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=intel_gaudi-llama">
# <img src="../../../_static/img/run-on-anyscale.svg" alt="try-any... |
d3f552a666c6102033eea6211132af55cc01bd6b6bc03fefd287d9e5ab8bef69 | Jupyter | 24,650 | 656 | # %% [markdown]
# ##### top
# %% [markdown]
# # Simulate potential span and range of reliabilities estimated using attenuation correction across days
#
# This ntb looks at synthetic data following a selection of Cs and estimates the range of possible reliabilities that we could observe by chance if we use attenuation... |
cbb5e93ad33761a9db86cde7b5467e0e916682a94ff814cd31e538d31aa791a4 | Jupyter | 24,779 | 607 | # %%
import math
from sklearn import metrics
from sklearn import preprocessing
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import re
import time
import datetime
import random
random.seed(1234)
from scipy import interp
import warnings
warnings.filterwarnings("ignore")
from collections import... |
8be2296b0681230571b2d714379ba0b08a74e3935b502ceb6d5dc357f35130e6 | Jupyter | 24,785 | 651 | # %%
# %matplotlib widget
# %%
import flammkuchen as fl
from matplotlib import pyplot as plt
import numpy as np
from scipy import io
import os
import seaborn as sns
import matplotlib.gridspec as gridspec
from matplotlib.ticker import FormatStrFormatter
from pathlib import Path
import pandas as pd
from luminance_analys... |
ba37e0c58e3bb17582888813493f3dadf42160358b4ab99e0c498ae59fdf6026 | Jupyter | 24,785 | 464 | # %% [markdown]
# # Seeding CaImAn with a manual mask and using a structural channel for motion correction
#
# This notebook aims to show how to use CaImAn for the following two use cases:
#
# - How to perform motion correction on a structural (red) channel and apply the inferred shifts to the functional channel (gre... |
ff7fbf67931ce98c17f2d965bd9b4984b56adfa5d7249df8109ae31e24b08501 | Jupyter | 24,806 | 395 | # %% [markdown]
# # The architecture of the tail spike
# %%
import os
import numpy as np
",".join(map(str, np.arange(188, 624)))
# %%
# Beta helix : #a40505
# 6-bladed-propeller : #669bbc
# Jelly-roll : #f4d58d
# N-terminal : #708d81
# %% [markdown]
# > 1 Domain
# %%
# Beta-helix :
color #1 #a40505
save /media/co... |
e5c01f04450d53c1e8e4ff30d92122d3310cf6600b85a13d8648c2d10cffeaa9 | Jupyter | 24,838 | 494 | # %%
import scanpy as sc
from anndata import read_h5ad
import pandas as pd
import numpy as np
import scipy as sp
from statsmodels.stats.multitest import multipletests
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import os
from os.path import join
import gseapy as gp
import statsmodels.api as ... |
de2d3f9fc73731cb7d53365e3d0df2777267b19893319a3f8055a4c5570082a1 | Jupyter | 24,890 | 757 | # %% [markdown]
# <a href="https://colab.research.google.com/github/Akibkhanday/PropTweet/blob/main/PropTweet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %%
import os
import shutil
import tensorflow as tf
import tensorflow_hub as hub
import t... |
f44cbbb2eb72171d1879d85858bf23055191a919949ff2fdd265c20a1d8fa197 | Jupyter | 24,955 | 597 | # %%
import math
from sklearn import metrics
from sklearn import preprocessing
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import re
import time
import datetime
import random
random.seed(1234)
from scipy import interp
import warnings
warnings.filterwarnings("ignore")
from collections import... |
2b9ae6e019f696981f5cba102ced32c289d9c4356acc1bbecbaf9ba0598450e3 | Jupyter | 24,977 | 517 | # %% [markdown]
# # Machine learning and deep learning methods applied to predicting customer status
#
# Purpose: Predict active and not active clients based on the proposed data structure and naive data structure. Here, we implemented Support Vector Machines (SVM), Random Forest (RF), K-nearest Neighbours (KNN) and L... |
0a7873c09d8f6b044ab186952ddd7db5d0dd3c2f957b403a7322511f8d7c95ff | Jupyter | 25,055 | 595 | # %% [markdown]
# # IBM Analog Hardware Acceleration Kit (AIHWKIT): Hardware-aware Training for Accurate Inference on Analog Hardware
#
# ### Authors: [Julian Büchel](https://www.linkedin.com/in/julian-büchel-0673991a3/), [Manuel Le Gallo-Bourdeau](https://research.ibm.com/people/manuel-le-gallo-bourdeau), and [Kaouta... |
b9f0db9c4c2023d2ad388f64663d2aae5e448b12d6f8505bd40fad387971a408 | Jupyter | 25,072 | 619 | # %%
import pandas as pd
import numpy as np
from scipy import stats
import seaborn as sns
import os
import matplotlib.pyplot as plt
import ptitprince as pt
# sns.set(style="darkgrid")
#sns.set(style="whitegrid")
sns.set_style("white")
# sns.set(style="whitegrid",font_scale=2)
# %%
import matplotlib.font_manager as fo... |
33350721499d2ed5c8bae7ca0db6de3c9a2cbc17f20a15cb0eb1eaf88fac470c | Jupyter | 25,297 | 687 | # %% [markdown]
# <a href="https://colab.research.google.com/github/shksherry/Smat-home-data-AI-ML-algorithms-Analysis/blob/main/Smat_home_data_(AI_ML_algorithms)_Analysis_code.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %%
#Apply Isolation Fo... |
148c848c9ae5dd8941bbc934e39e0c35d177105edfcc855c84d982ab1b2d3b4e | Jupyter | 25,486 | 794 | # %%
%load_ext autoreload
%autoreload
# %%
from typing import List, Tuple
import os
import os.path
import sys
import skimage
import skimage.segmentation
import sklearn.preprocessing
import sklearn.model_selection
import math
import shutil
import pathlib
import glob
import shutil
import uuid
import random
import plat... |
2f608c2c540a78217bdc0cebfbfd1f2b76d87ca68293660317ba4c034608b0b7 | Jupyter | 25,557 | 738 | # %% [markdown]
# # Motif analysis
# %%
# Imports
## General
import os
from copy import deepcopy
from itertools import product
from types import SimpleNamespace
import sys
sys.path.append("..")
from RNN_helpers import *
from IPython.display import display, Markdown
import datetime as dt
import pprint as pp
import it... |
305957d429afb52d2c9496fb1a15efaf399578222776bf519180bfd54bcdfc34 | Jupyter | 25,634 | 942 | # %% [markdown]
# In this notebook, we propose a demonstartion of MOFA and GLUE pair in omicverse. We apply our implementation as well as the original code on the scRNA-seq and scATAC data of Alzheimer's disease.
#
# # GLUE and MOFA
#
# ## Setting up data
# %%
from itertools import chain
import anndata as ad
import... |
bff3057d2b3791fec8032134cd1d8630ebc0076c48e57bd8bfa76f773c06e3b8 | Jupyter | 25,669 | 849 | # %% [markdown]
# # Part 1: Setup and Configuration
# %% [markdown]
# ## Import Libraries
# %%
import numpy as np
import pandas as pd
import os
import sys
from copy import deepcopy as copy
import torch
from torch import nn
from torch.autograd import Variable
from torch.functional import F
from torch.optim import Ada... |
4f1e08c1c5c810cb8d28a4083f66df48ef05ad4d5c8bf23710e2a3a0f3e4ba99 | Jupyter | 25,872 | 607 | # %% [markdown]
# # Using PyTorch Lightning with Tune
#
# <a id="try-anyscale-quickstart-tune-vanilla-pytorch-lightning" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=tune-vanilla-pytorch-lightning">
# <img src="../../_static/img/run-on-anyscale.svg... |
7f60db408c492d36126f2d78b0c185efb1454ee19ebecab8ee96848fa15aab1f | Jupyter | 25,911 | 777 | # %% [markdown]
# # ECG Latent Space Exploration
# This notebook shows how to create a latent space from a pretrained multimodal model.
# %%
import os
import sys
import h5py
from typing import Callable, List, Dict
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.metrics import roc_au... |
7fea3fdd0a24ad7c8b2148f57a3abbaceba1309f36a0076e5de37ad8495643c5 | Jupyter | 26,103 | 718 | # %% [markdown]
# The code was adapted from the tutorial 'https://naturalistic-data.org/content/Intersubject_Correlation.html', which was written by Juha Lahnakoski and Luke Chang
# %%
import nltools
from nltools.data import Brain_Data
from nltools.mask import expand_mask, roi_to_brain
from nilearn.maskers
import niba... |
4dcc31191d9f578bfd12e3eab03970ab151cba205505bfa74e98bba9e68a3f51 | Jupyter | 26,190 | 663 | # %% [markdown]
# # Webscrapp the depolymerase sequences :
# %%
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from seleni... |
37c842ef38df32e110f13b383ce6096476ef052d34ec408f170fcc7c97ae86a1 | Jupyter | 26,409 | 617 | # %%
path_project = "/media/concha-eloko/Linux/depolymerase_building"
dir_out = f"{path_project}/seekfold_phagedepo"
import pandas as pd
import os
path_info = f"/media/concha-eloko/Linux/depolymerase_building/depolymerase_fold.csv"
info_df = pd.read_csv(path_info , sep = "\t", header = 0)
dico_folds = {"jelly-roll" :... |
26198e053ecd8a87aa8512811aa7849f99e81b38b0f6e1af4a9a1db3eb9b6730 | Jupyter | 26,574 | 240 | # %% [markdown]
# # Generate the depolymerase DB based on Interproscan entries.
# ***
# #### The multi fasta files of the intersting entries have already been downloaded. Here are the steps to follow :
# ### I. Create a rep for each IPR entry
# ### II. Cluster each entry using mmseqs
# ### III. Generate the required fi... |
d49a43973201bc785ca3175d9e145a06aed9c2ef61be35b337c55bac124a3d98 | Jupyter | 26,658 | 764 | # %%
#%matplotlib widget
import os
from os import makedirs
from pathlib import Path
import numpy as np
import pandas as pd
import copy
import matplotlib.pyplot as plt
# %%
directory = Path('/home/weilenmc/ray_results/A2C/PongNoFrameskip-v4/stpn_configs/selection_dir_4_seeds')
directory = Path('/home/weilenmc/ray_resu... |
2176aefdcdcb2e335b8b9f775b2821e60d308bc2a3fec716c99c02f6c2986abb | Jupyter | 26,723 | 589 | # %% [markdown]
# # Using Large Language Models as text classifiers with an sklearn interface
# %% [markdown]
# In this notebook, we will learn how to use skorch's `ZeroShotClassifier` and `FewShotClassifier` to perform classification without any training thanks to the power of (Large) Language Models (LLMs). For this... |
9665e06a47194cc5c2985deea4a66faba5defbcab94a8fdeabda1f7d3ffb1da6 | Jupyter | 26,830 | 800 | # %%
%load_ext autoreload
%autoreload
%matplotlib widget
# %%
import flammkuchen as fl
from matplotlib import pyplot as plt
import numpy as np
from pathlib import Path
import pandas as pd
import re
from scipy import stats
import os
import math
from luminance_analysis import PooledData
from matplotlib.gridspec import ... |
5081c2dbe7237b8e5ad8eda5c9691cf846621f2a562f857d73a7992e77642ef1 | Jupyter | 26,889 | 574 | # %% [markdown]
# ## Open the text files with the entries :
# ***
# %%
import os
path_db = "/home/robbyce/Documents/bioinformatics/Depolymerase_DB"
#path_db = "/home/conchae/databases/depolymerase_building"
depo_list = open(f"{path_db}/IPR_depolymerase.16012023.txt").read().split("\n")[0:-1]
possible_depo_list = op... |
621b2e9271c0f722ae1db9d062b52fc9c25e1d21f706119d78b697c84615b5dc | Jupyter | 26,898 | 418 | # %% [markdown]
# # Finetune Stable Diffusion and generate images with Intel Gaudi
#
# <a id="try-anyscale-quickstart-intel_gaudi-sd" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=intel_gaudi-sd">
# <img src="../../../_static/img/run-on-anyscale.svg... |
155cb027a55f3113c42290c69130f4716ed8c488fb148602160d9ede5eae32c6 | Jupyter | 26,987 | 636 | # %% [markdown]
# # Experiments with `aihwkit`
# ## Exploring the sensitivity of analog inference, analog-aware retraining and in-analog training to the non-idealities of Analog Crossbars
#
# In-memory computing uses crossbar arrays of non-volatile memories to perform Vector-Matrix Multiplications (VMMs) in-situ, i.e.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.