sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
cbb0e453b9e86bea2f34ed178568de94320040e01231a7a0ec9c74fbaad447a3 | Jupyter | 16,844 | 432 | # %%
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from statsmodels.stats.contingency_tables import mcnemar
from sklearn.metrics import r2_score
subplot_label_x_coordinate = -0.1
subplot_label_y_coordinate = 0.95
# ========================================================... |
1461db2e469e917e87e86e27815ea8ca1f68dd0c635ce77a39924c7cf012e71e | Jupyter | 16,854 | 534 | # %%
import os
import numpy as np
import pandas as pd
import anndata
from shapely.geometry import Point, Polygon
from sklearn.neighbors import KernelDensity
from skimage import morphology, measure
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.pyplot as plt
cell_type_colors = {
"B cells":... |
e9faf7a62bb7e687087c37824f7f8f1aab45c10e3e1cb7623ac43161f2d5d08a | Jupyter | 18,499 | 544 | # %%
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
os.environ["XLA_PYTHON_CLIENT_ALLOCATOR"] = "platform"
import jax
import jax.numpy as jnp
import jax.random as jr
import equinox as eqx
import numpy as np
from matplotlib import cm, colors
import matplotlib.pyplot as plt
import os
from omegaconf import OmegaConf... |
7943346a5dd2147e1ecb4096dc10ec0015f9a41ea10b08d889bc687dd26cbfd6 | Jupyter | 18,760 | 536 | # %%
import os
# os.chdir("/content/drive/MyDrive/Sohila")
import pandas as pd
final_df=pd.read_csv('compounds_descriptors_pIC50.csv')
final_df.head()
# %%
import pandas as pd
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
# Define the input CSV file
input_csv = 'compounds_de... |
6518d4f29782e93c4c0626f9e2280a2f471c90e378b7e05a4e58a99c24dfef84 | Jupyter | 21,463 | 644 | # %%
from matplotlib import pyplot as plt
import numpy as np
import random
import pandas as pd
import seaborn as sns
from scipy.stats import pearsonr
import os
from data.loader import *
import h5py
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import StepLR
from tqdm import tqdm
from u... |
2712780f497e1af98f2e1dab827be59a1da192918fbd0e9ad17564bd3ecba29b | Jupyter | 21,636 | 634 | # %%
import pandas as pd
final_df=pd.read_csv('compounds_descriptors_pIC50.csv')
final_df.head()
# %%
import pandas as pd
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
# Define the input CSV file
input_csv = 'compounds_descriptors_pIC50.csv' # Replace with your actual file ... |
e306ae9788f42ed718fc9ce94f11386af852210ba6c9e726cd78f7dede55c8b0 | Jupyter | 22,364 | 541 | # %%
import sys
import os
# Path to your user-installed Python packages (adjust this path accordingly)
user_site_packages = os.path.expanduser('~/.local/lib/python3.10/site-packages')
# Add the directory to sys.path temporarily
if user_site_packages not in sys.path:
sys.path.insert(0, user_site_packages)
# Impor... |
796b079e3ddde71015a303c3c10c182ba52fda0cc9afa255174d276933cafffa | Jupyter | 23,275 | 659 | # %% [markdown]
# # Install conda on your Colab environment
# %% [markdown]
# Ignore this first cell if you are running the notebook in a local environment.
#
# One can still run it locally but it will have no effect.
# %%
# Run this cell first - it will install a conda distribution (mamba)
# on your Drive then rest... |
1e91b47169727e205d98236663bae051c3300b4f44b601424daef8d289745a3f | Jupyter | 23,651 | 649 | # %% [markdown]
# # Install conda on your Colab environment
# %% [markdown]
# Ignore this first cell if you are running the notebook in a local environment.
#
# One can still run it locally but it will have no effect.
# %%
# Run this cell first - it will install a conda distribution (mamba)
# on your Drive then rest... |
3bcbbc39937ae6c05f13866f4a1884716783e5ed1199413089839716274d783d | Jupyter | 25,113 | 587 | # %%
import sys
import os
# Path to your user-installed Python packages (adjust this path accordingly)
user_site_packages = os.path.expanduser('~/.local/lib/python3.10/site-packages')
# Add the directory to sys.path temporarily
if user_site_packages not in sys.path:
sys.path.insert(0, user_site_packages)
# Impor... |
e18fb259749cf14f5f13eed2719d7853983c2156818fcc0f9e650110f8491efb | Jupyter | 29,094 | 835 | # %%
import torch
import numpy as np
def average_cosine(vectors):
# Normalize each vector
vectors_norm = vectors / vectors.norm(dim=1, keepdim=True)
# Compute the cosine similarity matrix (dot product of normalized vectors)
cosine_similarities = vectors_norm @ vectors_norm.T
# Extract the upper t... |
2b98c71f9f89decf29f90bd8598824f48bd3dc96ecee4e36c6dabea627c45dc1 | Jupyter | 29,330 | 824 | # %%
import pandas as pd
# %%
df = pd.read_csv('lipinski_data_corona.csv')
df.head()
# %%
import pandas as pd
# Load the CSV file
df = pd.read_csv('lipinski_data_corona.csv')
# Display the first few rows of the DataFrame
print(df.head())
# Check for missing values
missing_values = df.isnull().sum()
print("\nMissi... |
6cdd2d3ad7ff33fdd8bdc32be81714e1d5c6361a615b8a743c84a0fb6c2d6d25 | Jupyter | 30,008 | 700 | # %% [markdown]
# # Applicability Domain (AD) Analysis
# ## SARS-CoV-2 Bioactivity Classification — Closing Reviewer Comment
#
# **Reviewer's Comment:**
# > *"No word have been spent on the problem of the applicability domain of the prediction towards the training set. How different are the predicted molecules from mo... |
dd282a3bac1558fce3e278f2836d22f387d4bed195a7255d10eb8a0e5739f824 | Jupyter | 30,432 | 877 | # %%
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import MDS
plt.rcParams.update({'font.size': 16})
def forward(x, W, P, Wc, c):
# print((W@x).shape)
# print(Wc[:, c][None].T.repeat(1,6).shape)
states = torch.concatenate((W @ x, Wc[:, c][None].T.repeat(1,6)), dim=0)
output =... |
38178ee09d9ecab213c6122aff2e1b0146bbc89a508e72f19ec9ea6c605135c7 | Jupyter | 32,771 | 911 | # %%
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import MDS
plt.rcParams.update({'font.size': 16})
def forward(x, W, P, Wc, c):
# print((W@x).shape)
# print(Wc[:, c][None].T.repeat(1,6).shape)
states = torch.concatenate((W @ x, Wc[:, c][None].T.repeat(1,6)), dim=0)
output =... |
de5c4b5aba006cc2cf5c570f8a744a4e08a31493e869d2901f637b932bf77831 | Jupyter | 34,611 | 991 | # %% [markdown]
# # Install conda on your Colab environment
# %% [markdown]
# Ignore this first cell if you are running the notebook in a local environment.
#
# One can still run it locally but it will have no effect.
# %%
# Run this cell first - it will install a conda distribution (mamba)
# on your Drive then rest... |
d0d12daa95ab72b85aa59969ab116265271ef6f5fead35542df0c757302d5285 | Jupyter | 34,717 | 973 | # %%
import pandas as pd
# %%
df = pd.read_csv('lipinski_data_corona.csv')
df.head()
# %%
import pandas as pd
# Load the CSV file
df = pd.read_csv('lipinski_data_corona.csv')
# Display the first few rows of the DataFrame
print(df.head())
# Check for missing values
missing_values = df.isnull().sum()
print("\nMissi... |
9220ad935c24dc7f28982cbea8808d282d580963763f90a25d8e05e1efc00e65 | Jupyter | 38,566 | 1,099 | # %%
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import MDS
plt.rcParams.update({'font.size': 16})
def forward(x, W, P, Wc, c):
# print((W@x).shape)
# print(Wc[:, c][None].T.repeat(1,6).shape)
states = torch.concatenate((W @ x, Wc[:, c][None].T.repeat(1,6)), dim=0)
output =... |
3e5efe21f168899482633246938a9659971c3a3627bcfc404f979518b9ad2f8a | Jupyter | 39,357 | 1,116 | # %%
from matplotlib import pyplot as plt
import numpy as np
import random
import pandas as pd
import seaborn as sns
from scipy.stats import pearsonr
import os
from collections import Counter
import h5py
from utils.metrics import *
from collections import defaultdict
sns.set(style="whitegrid")
# %%
method = "videopos... |
aa2e8dfb306c1ba2884d06ce843eef9a99b225cc4c063bd610829af5b48d68da | Jupyter | 40,060 | 1,122 | # %%
import pandas as pd
# %%
df = pd.read_csv('lipinski_data_corona.csv')
df.head()
# %%
df = pd.read_csv('compounds_descriptors.csv')
df.head()
# %%
df.shape
# %%
import pandas as pd
# Load the CSV file
df = pd.read_csv('compounds_descriptors.csv')
# Display the first few rows of the DataFrame
print(df.head())... |
35845dbed95c93a3df79ef4a7e3368257d754c4b259a22540f8d269d746490b7 | Jupyter | 69,004 | 1,989 | # %% [markdown]
# Connected to ni-plots (Python 3.14.2)
# %% [markdown]
# # Figure reproduction from CSV data
#
# This script reproduces the statistical figures from the paper using the
# pre-computed CSV files in `../data/csv/`. No mesh processing is required —
# all vertex-level measurements have already been ... |
5c4089e82c7af3ee7a69aba3926d074d31813ea2195b76a1575ea0b196031b30 | Jupyter | 88,479 | 2,324 | # %%
import pandas as pd
final_df=pd.read_csv('compounds_descriptors_pIC50.csv')
final_df.head()
# %%
final_df.isna().sum()
# %%
import pandas as pd
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
# Define the input CSV file
input_csv = 'compounds_descriptors_pIC50.csv' # Re... |
9b04504f5117b74466f7b83f801934bc8d176e377ea831db92783fc6648de288 | Jupyter | 137,597 | 3,891 | # %% [markdown]
# # Install conda on your Colab environment
# %% [markdown]
# Ignore this first cell if you are running the notebook in a local environment.
#
# One can still run it locally but it will have no effect.
# %%
# Run this cell first - it will install a conda distribution (mamba)
# on your Drive then rest... |
28ba0677103bcd9d3fa83f8aca3f7713d7b7afc3dc0f59ce3975490091a2f270 | License | 533 | 18 | RESURF_MISRGRU - License Summary
This repository includes original code and modified components derived from:
MISR-GRU
https://github.com/rarefin/MISR-GRU
Copyright 2019, Element AI Inc. and MILA - Institut québécois d'intelligence artificielle
This repository is made available under the cumulative license terms of:... |
f33aec8a4d4f85b67a05eeb128596dda76aa0d669acf4b1fc7307acd7e6af771 | License | 1,062 | 21 | MIT License
Copyright (c) 2019 syrte
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... |
1b9e7656476b07cd90234c235f0c6a497518cceb070d5ff1fe98e0eec126e3bc | License | 1,065 | 21 | MIT License
Copyright (c) 2026 MLDS-NUS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribu... |
3ab74c544cffa1e972a55a72e52b142d2699955327da901d70936673371a56a7 | License | 1,065 | 21 | MIT License
Copyright (c) 2024 atrevisa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribu... |
1a282c662350a7c3233f92ba9f2b8833cd0d675ab554e87064ea7926747f83d8 | License | 1,067 | 21 | MIT License
Copyright (c) 2026 Nina Omejc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
4802b9c718920c238e090b2c236531dc2625387c14ec005a3dea97f5bff30d02 | License | 1,067 | 21 | MIT License
Copyright (c) 2026 DirkKeller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
920598ec128a27344ecabe35a000aec45e0c43e145b327385256715d44328a99 | License | 1,067 | 21 | MIT License
Copyright (c) 2025 yukun yang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
e73f9fb8f04bb0f2b4cc81939fb35ba3e512eda131852fdc671258001e401541 | License | 1,067 | 21 | MIT License
Copyright (c) 2026 Paul Muhle
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
1b31534d921a26e8fa6172ee7d5407423b6d5b2bece7f13f892684fa9eed8baf | License | 1,068 | 21 | MIT License
Copyright (c) 2025 Roya Hüppi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
9f1abe28a25b5f6f95c58a81a647de3fa72ff6388d228c59bddd079255709989 | License | 1,068 | 21 | MIT License
Copyright (c) 2026 The Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... |
0b1f69b7c810268a069bc1ba4ef9cc90302cda579e69b5ad21d0b82c6307e9f6 | License | 1,069 | 21 | MIT License
Copyright (c) 2026 Xiaoqian Sun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... |
8eb4ea23a12a21c085003f6e1ff573d264e28093618ec3d2212932f1dab82299 | License | 1,069 | 21 | MIT License
Copyright (c) 2026 Minheng Chen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... |
ce42647015ecd8b12eee27883d0d3d2f28f760427c7767f6757d9cc89e72da45 | License | 1,072 | 21 | MIT License
Copyright (c) 2023 Camille Gontier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... |
174c3eb5594101feb4bdc1d9f3d1cf9d767615e0d1213d3e040a56f05093507d | License | 1,073 | 21 | MIT License
Copyright (c) 2026 David C. Gruskin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
03c521785634fed3c383f4220bc08c0c068de6d9a716cb82ff4b0e96a0c47f6d | License | 1,077 | 21 | MIT License
Copyright (c) 2025 Francesco Ceccarelli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publi... |
42706fbaaec1aa494c579166fe133c47ef07c06f43e974c9da4d8ef3f4c6c6bc | License | 1,081 | 21 | MIT License
Copyright (c) 2024 Ray Steven & Kenji Satou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... |
cf52e1899b0ca8ba81048cd11dbd7c842d7cd6d3921aa034142b1faedd00b957 | License | 1,081 | 21 | MIT License
Copyright (c) 2019 Jonas Schulte-Schrepping
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... |
b2e63afbe4801f6a6efb3ed84cacb569fb6342c84d31b5f8b21068df96ede339 | License | 1,088 | 21 | MIT License
Copyright (c) 2017 (╯°□°)╯ ︵ ┻━┻
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... |
53463b0778192475e98c954b81342333c7bf73cc38249a4b80684876ca054756 | License | 1,092 | 21 | MIT License
Copyright (c) 2022 Allen Institute for Neural Dynamics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modif... |
d7609c858f47823b9d7cee46253bffc40e93fd55effa744aa249e97a603c65cb | License | 1,092 | 21 | MIT License
Copyright (c) 2023 Allen Institute for Neural Dynamics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modif... |
675de099568df49036497b583a271491c01a35a150a925956f0e413dca858b9e | License | 1,098 | 21 | The MIT License (MIT)
Copyright (c) 2016 Harvey Lab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... |
566fb1904ea6afc662dae1f6c9861c87d77f60ee85b3f6c139fd2b3b797c2adf | License | 1,107 | 21 | MIT License
Copyright (c) 2026 Nimesh Chahare, Chieko Imamura, Nandan L. Nerurkar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to u... |
895cf4d0c059ac5251f4b26fedbf77f27d594608cf5e585668e899b90fdba0f4 | License | 1,111 | 21 | MIT License
Copyright (c) 2025 Anas Al-Naji, Ricarda I. Schubotz, Anoushiravan Zahedi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... |
06f2077af684b602b6bed29521830bde90208043fa59595e0995d62960a6e15b | License | 1,115 | 21 | The MIT License (MIT)
Copyright (c) 2025 OpenIoT Research Unit (Fondazione Bruno Kessler)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rig... |
7fbfc801e3c369d69b89a7512038606ae138b8ac406611b291e96dbe92493b2c | License | 1,120 | 9 | The MIT License (MIT)
Copyright (c) 2020, by Diedrichsenlab
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg... |
50b64138e511d16186b7a407bf256dbc36cc43e775ed64b8301c1d614334f070 | License | 1,126 | 21 | MIT License
Copyright (c) 2022 BioRetroSynth Group, MICALIS Institute, INRAe (Jouy-en-Josas, France)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitat... |
c279e190706f46dd920854b64d0d823a33be1981c187f581eb432b273f797492 | License | 1,532 | 29 | BSD 3-Clause License
Copyright (c) 2018-2025, Uwe Schmidt, Martin Weigert
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
... |
506416d7ce128410517c77753a5e0ccab4783f13061fd1f724a92a5de08d1244 | License | 1,545 | 13 | Copyright (c) 2016, Frank Ong.
Copyright (c) 2016, The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above co... |
0643dd2dea513ab7008e82f1901d59dc20f2693e9c983ef35f5326959beb8a6f | License | 1,555 | 29 | BSD 3-Clause License
Copyright (c) 2021, Support Center for Advanced Neuroimaging (SCAN)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyrigh... |
a035602edb151af9f6d9a41d986c53347d4817e9afda9f442cacccc0b4f76d69 | License | 1,558 | 29 | BSD 3-Clause License
Copyright (c) 2017, Ignacio Tartavull, William Silversmith, and later authors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the abov... |
ccc41d80a0f41c56d05b212adae5b43b439366d7a7c5abac49b017af4ad32525 | License | 11,372 | 201 | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... |
39cc712a23eead54302ce722e2d0cb6eb73d94ad42f407e7153829a4d5154884 | License | 14,585 | 323 | Oxford Nanopore Technologies PLC. Public License Version 1.0
=============================================================
1. Definitions
--------------
1.1. “Contributor”
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. “Contributor Versi... |
802c641faac119489d698815722934d12de40f1b88f995d84c5a30162f99a2c8 | License | 14,585 | 323 | Oxford Nanopore Technologies PLC. Public License Version 1.0
=============================================================
1. Definitions
--------------
1.1. “Contributor”
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. “Contributor Versi... |
f5b745ef98087f531e719ee8ca6a96809444573ecc7173c6fa68eaad39b3cc3f | License | 18,658 | 395 | Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relat... |
e32dcfc2c8fe3977723e736e7b858bfb61223ceea38acb69ec1b0b2b839673be | License | 18,759 | 401 | Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relat... |
3711f963c05d0be80d53e5923308a6dee31b203da23435c9cfb7c7b6e4dd5e19 | License | 19,346 | 407 | Attribution-NonCommercial 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client ... |
67d5f60517e79c6d4b209346e4398daf9b69ccdb4e7fcab82294f50465f1931f | License | 34,620 | 241 | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for softwar... |
585e25ef8f5946a52bf2aed68d5becfc38be94a8663aa01c1b31d88aa57f1de3 | License | 34,904 | 595 | GNU General Public License
==========================
_Version 3, 29 June 2007_
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
## Preamble
The GNU General Public Lice... |
22c436353c525cf7740578397d9bc3bcbf44d879d305757ec501bdf8f5fb6353 | MATLAB | 93 | 4 | function stop(ajp)
% Causes job processor to stop looking for new jobs.
ajp.flagStop = true; |
71ffc97a0301857d2a402919e2898f9b32a65f01e564896ee656fea7f9d7ab8c | MATLAB | 119 | 3 | function sem_value = sem(x)
%sem_value=std(x)/sqrt(length(x));
sem_value=std(x,'omitnan')/sqrt(length(x(~isnan(x)))); |
deca45ec3aa51f70e1c235e17d72f3a7a378d56b59ed3ab7b4654a8a72382802 | MATLAB | 164 | 6 | function mov = alignFullframeCircshift(mov, xShift, yShift)
z = size(mov, 3);
for f = 1:z
mov(:,:,f) = circshift(mov(:,:,f), round([yShift(f) xShift(f)]));
end |
f3e449054a8efa73915012876c0e5179a0bffaf422fcb1725a297ed0ac283c2e | MATLAB | 165 | 6 | function [] = CompileMexFiles()
%Compiles mex files that accelerate B-spline evaluation
mex evalBin.cpp
mex evalBSpline.cpp
mex evalBinTimesY.cpp
end |
5c206241df6ce955e60a0bcf32f41b05343d7ff43b73f39295ca087fda6f4554 | MATLAB | 196 | 9 | function cbShowROITrace(sel, ~, ~, roiId)
%get the roiInfo
roiInfo = sel.roiInfo.roi([sel.roiInfo.roi.id]==roiId);
%plot
sel.plotNeuropilTraces(roiInfo.indBody, roiInfo.indNeuropil, false);
end |
e6b8f0ec26f53d3602eb0a7264b126bb9f64844c0fb3b1f282234c3a6bcd3331 | MATLAB | 228 | 9 | function outliers = find_outliers(data)
Q1 = quantile(data, 0.25);
Q3 = quantile(data, 0.75);
IQR = Q3 - Q1;
lower_fence = Q1 - 1.5 * IQR;
upper_fence = Q3 + 1.5 * IQR;
outliers = data < lower_fence | data > upper_fence;
end
|
67b204431f33989f0058642406bffbea557c967ee7548d6276f07fd1a5aed963 | MATLAB | 285 | 10 | function cbSliderContrast(sel,~,~)
img = sel.disp.img;
for c = 1:size(img, 3);
% Perform scaling on each color channel:
img(:,:,c) = mat2gray(img(:,:,c), [get(sel.h.ui.sliderBlack, 'Value'), get(sel.h.ui.sliderWhite, 'Value')]);
end
set(sel.h.img.overview, 'cdata', img);
end |
f26f25ede7eb9cc8318d6e8b85ce67583fdc4bd14cb7645006e98b8267ff7c1f | MATLAB | 296 | 7 | function diags = getDiags(nh, h)
% diags = getDiags(nh, h) returns a vector indicating which diagonals of
% the covariance matrix will be non-zero for an image of height h and a
% square pixel neighborhood of width h.
diags = row(bsxfun(@plus, (-nh+1:nh-1)', 0:h:h*(nh-1)));
diags(diags<0) = []; |
3945ffd33a40500b45e7b213b0e5abaaca7eefdb9bc24be098d755cac6b2def8 | MATLAB | 316 | 11 | close all
sliceNum = 2;
roiInds = cat(1,acq1.roiInfo.slice(sliceNum).roi(:).indBody);%,acq2.roiInfo.slice(sliceNum).roi(:).indBody);
roiIm = zeros(512,512);
roiIm(roiInds) = 1;
anIm = getOverviewImg_lnd(acq,sliceNum);
anIm(:,:,3) = .7*squeeze(anIm(:,:,1))+.3*roiIm;
img = anIm(:,:,3);
acq.selectROIs(anIm,sliceNum) |
40a3bc84813bff161c2378777c994ed98866d688a1b2fbfcf32639a4df353725 | MATLAB | 332 | 6 | function cbPassThroughKeypressToMain(sel, src, evt)
% Attach this function as the WindowKeyPressFcn callback to any figure
% from which you want to pass key presses to the main window (i.e. if a key
% is pressed when that figure has focus, it is as if the main figure had
% focus when the key was pressed).
sel.cbKeypres... |
5ae5eb481bf6c5fc1641ea1ce6627fde3ba0d68a0d565d1a145fc1dfb9d00517 | MATLAB | 342 | 7 | function anchor_starts = computeSpeedCrossingUpEvents(reward, distance, reset, speed, reward_starts, threshold)
if nargin < 6
threshold = 0.05;
end
all_up_crossings = find_speed_crossings(speed, reset, threshold);
anchor_starts = findCrossingsNearRewards(reward, distance, reset, reward_starts, a... |
53b8c33a409c7e5efc9cf1cb4ca28cbb01c10ecab2207fa8418bac7d0358944b | MATLAB | 344 | 8 | function r = conv_z2r(z)
% conv_z2r Fisher z-to-r transform (elementwise).
% r = conv_z2r(z) returns r = tanh(z), the inverse of the Fisher r-to-z
% transform (conv_r2z). Operates elementwise; NaNs pass through unchanged.
% Typically used to convert a mean-of-z back to a correlation for reporting
% or visualiz... |
e8a4aec90a3e7b038bf10746851c99e33351942907dc0f7cc47f3d9c2bf39be3 | MATLAB | 347 | 3 | save(fullfile('Z:\Laura\code_workspace',acq.acqName(1:5),acq.acqName(1:12),['selected_rois_' acq.acqName(1:12)]),'acq');
save(fullfile('Z:\Laura\code_workspace',acq.acqName(1:5),acq.acqName(1:12),['taryn_rois_' acq.acqName(1:12)]),'acq');
save(fullfile('C:\data\Taryn',acq.acqName(1:5),acq.acqName(1:12),['taryn_rois_' a... |
6ab2bd7c01cc11e8e3b2bd385c9097d2651c9c703700cdb30d97b7e5bccdd7d7 | MATLAB | 349 | 12 | function fileList = changeDir(fileList, newDir)
% fileList = changeDir(fileList, newDir) takes a path or cell-aray of paths
% and changes the directory-part of the paths to newDir.
if ischar(fileList)
fileList = {fileList};
end
for ii = 1:numel(fileList)
[~, f, e] = fileparts(fileList{ii});
fileList{ii} =... |
7c01c5d16e2a157db8b70e89ee70dba30c2686c24eda34641926ccf593c696cb | MATLAB | 353 | 7 | function anchor_starts = computeSpeedCrossingDownEvents(reward, distance, reset, speed, reward_starts, threshold)
if nargin < 6
threshold = 0.05;
end
all_down_crossings = find_speed_crossings_down(speed, reset, threshold);
anchor_starts = findCrossingsNearRewards(reward, distance, reset, reward_... |
ea1f6926fb911a6dd2a6909ded80bb0ac51c8ccdbcfac8ada1f0ee6939425550 | MATLAB | 353 | 14 | %% Pipeline for Concentric Circles
% nina fultz - february 24th
makingVesselfromT1.m
VesselDilatingwithBoundaries.m
ConcentricCircles_lydianesway_onManuallycorrected.m
ConcentricCircles_lydianesway_onManuallycorrected_RightLeft.m
PlottingConcentricCircles_lydianeswayNormalized_rightvsleft.m
Concentr... |
04f4b7d15dc1bc32eeeba31b06399e32b8055b2a141f5a561c11e3ef276f6709 | MATLAB | 385 | 15 | function A = diag2full(B, d, m, n)
% A = diag2full(B, d, m, n) puts the columns of B on the diagonals d of
% of the m-by-n matrix A. Syntax like SPDIAGS, but non-sparse.
A = zeros(m, n);
diagInd = 1:m+1:m^2;
for ii = 1:numel(d)
d_ = d(ii);
if d_>=0
A(diagInd(1+d_:end)-d_) = B(1+d_:end, ii);
el... |
9dd6d06c9a59e966c853a6e74d139a0fcde43c92d7bd9e4e8cd8816a82eb7f97 | MATLAB | 391 | 21 | xpt=linspace(-6,6,6001); xpt=xpt';
u0=exp(-xpt.^2); u0(end+1)=0; u0(end+1)=0;
template=exp(-xpt.^2);
dtemplate=-2*xpt.*exp(-xpt.^2);
dt=1e-2;
t(1)=0; U(:,1)=u0;
tic
while 1
[u,flag]=burgers_rhs_forward(dt,u0,xpt,template,dtemplate);
if flag==1
break
end
U(:,end+1)=u; u0=u;
... |
e9864d04f6cca85a51a0edf6ab520dfb7d4d597003d3ab342c66cdd800592687 | MATLAB | 391 | 14 | function fileName = nameFiles2PAM(acqName,sliceNum,channelNum,movieNum)
%defaultNameFiles.m Creates default file name
switch channelNum
case 1
channelName = 'green';
case 2
channelName = 'red';
otherwise
error(sprintf('No name for channel %d',channelNum));
end
fileName = sprintf... |
af432298da0e64d67ce3ef559a933871ecb7cf30e84bb68f3678bd6e3003a5de | MATLAB | 403 | 11 | function img = getOverviewImg_lnd(acq,sliceNum)
% Merges the anatomical and activity images into a nice overview image for
% selectRois
img = acq.meanRef([],sliceNum);
img(img<0) = 0;
img(isnan(img)) = 0;
img = sqrt(img);
img = adapthisteq(img/max(img(:)));
img = repmat(img, 1, 1, 3);
actImg = imadjust(mat2gray(acq.roi... |
8616f32f3c9c672ae13aea11293e3b406cb24ded53c0eac14c9de9fb2fed1d70 | MATLAB | 405 | 11 | function cbChangeRoiLabel(sel, ~, ~, roiId, newLabel)
%change group label
oldLabel = sel.roiInfo.roi([sel.roiInfo.roi.id]==roiId).group;
sel.roiInfo.roi([sel.roiInfo.roi.id]==roiId).group = newLabel;
%Update Display
title(sel.h.ax.roi, sprintf('Changed label for ROI %d from %d to %d',...
roiId, oldLabel, newLabel... |
d7f1c6541fb4147917977c1eb5729872b5df22dfb63a729fbe22fb62678c3387 | MATLAB | 405 | 13 | % Function to find ROI file with either extension
function roi_file = find_roi_file(base_path)
nii_file = [base_path '.nii'];
niigz_file = [base_path '.nii.gz'];
if exist(nii_file, 'file')
roi_file = nii_file;
elseif exist(niigz_file, 'file')
roi_file = niigz_file;
el... |
e0e0a532b7d978c2cf15e3d6c085d955e9a63b021abdbffbdd841cad8d728e10 | MATLAB | 408 | 22 | xpt=linspace(0,10,5001); xpt=xpt';
u0=1 ./ (1 + exp(-2.5*(xpt - 4))); u0(end+1)=0; u0(end+1)=0;
load init_9.mat
u0=u;
template=-1 + 2 ./ (1 + exp(-2.5*(xpt - 7)));
dt=1e-3;
t(1)=9; U(:,1)=u0;
tic
while 1
[u,flag]=pme2d_rhs(dt,u0,xpt,template);
if flag==1
break
end
U(:,end+... |
9800ed652fd8671d823ef0134e47b2a321c6fc961c4b245f6b69f04aa9c2db75 | MATLAB | 416 | 22 | function [row,col] = findEdges(~, image)
%findEdges.m Finds contours of binary array
%
%INPUTS
%image - binary image
%
%OUTPUTS
%row - column vector of row coordinates
%col - column vector of col coordinates
%
%ASM 10/13
%find element to start search
[rowInd, colInd] = find(image > 0,1,'first');
%perform search
B =... |
02e305a6a7fe98c7648d52c465ba13a14491d40435b9f95e4c290d12bb5f97dd | MATLAB | 424 | 8 | % Custom function to generate the blue-white-red colormap
function c = bluewhitered(m)
if nargin < 1, m = size(get(gcf,'colormap'),1); end
bottom = [0 0 1]; top = [1 0 0]; middle = [1 1 1];
% Interpolate between colors
interp = @(top, bottom, m) [linspace(bottom(1), top(1), m)', linspace(bottom(2), top(2), m)', linspac... |
683db4fa13012b32a4ec2ac92f4184078b965e5e3299a64365404f34437fc04c | MATLAB | 436 | 8 | % Custom function to generate the white-red colormap
function c = whitered(m)
if nargin < 1, m = size(get(gcf,'colormap'),1); end
bottom = [1 1 1]; top = [1 0 0]; middle = [.5 0 0];
% Interpolate between colors
interp = @(top, bottom, m) [linspace(bottom(1), top(1), m)', linspace(bottom(2), top(2), m)',... |
29a7aa6999046944bbf50441b37989ccc5ccf73c3dd389f139745e84221b6576 | MATLAB | 438 | 19 | function cbCloseRequestMain(sel, ~, ~)
% Close request function for main window. Closes secondary windows as well.
% Delete timers:
timerNames = fieldnames(sel.h.timers);
for t = timerNames(:)'
delete(sel.h.timers.(t{:}));
end
% Delete figures:
if ishandle(sel.h.fig.trace(1))
set(sel.h.fig.trace,'WindowStyle'... |
bb0c4b612d5b04faad4e9867df477b205e3685102b0462e721d18af68154bf35 | MATLAB | 444 | 14 | function saveCifti(Data, outputPath, wb_path, template,medial_mask)
Data(isnan(Data)) = 0;
num_vox_cortex = 59412;
if strcmp(outputPath(end-10),'p')
cii_scalar = ciftiopen(template, wb_path);
cii_scalar.cdata = Data;
ciftisave(cii_scalar, outputPath, wb_path);
else
cii_scalar = ciftiopen(template, wb_p... |
12a278693ebce64ea21b691862504e918cf1a5ab21c47bf88500161e1793d981 | MATLAB | 451 | 13 | function [fc, fcSquare] = computeFunctionalConnectivity(subjData, numSubjects)
fc = zeros((400*399)/2, numSubjects, 2);
fcSquare = zeros(400, 400, numSubjects, 2);
hvec = @(x) x(triu(true(size(x)), 1));
for scanId = 1:2
for subj = 1:numSubjects
fc(:, subj, scanId) = hvec(corr(subjData{scanId}(:,:,subj)', ... |
41a895b839cc8d987d113dedfc4fc82c4d55307c6dbdc65dfb6e964586604331 | MATLAB | 452 | 19 | function dudt = nagumo_rhs(t,u,dx,alpha,xpt,template,templatex)
np=length(u)-1;
dudt=zeros(np+1,1);
% node 1
i=1;
dudt(i)=(u(i+1)-u(i))/dx^2+u(i).*(1-u(i)).*(u(i)-alpha);
% internal nodes
i=2:np-1;
dudt(i)=(u(i+1)+u(i-1)-2*u(i))/dx^2+u(i).*(1-u(i)).*(u(i)-alpha)-u(end)*(u(i+1)-u(i-1))/(2*dx);
% node... |
8b73acb5f65fc51b38ff1003913e9f89a94cc5e91070408e2af786ddcfa9c753 | MATLAB | 452 | 13 | function applyManualLineshiftToFiles(folder, fileId)
% applyManualLineshiftToFiles(folder, fileId, lineShift) applies LINESHIFT
% to all files in FOLDER that match FILEID.
lst = dir(fullfile(folder, [fileId '*']));
for i = 1:numel(lst)
fprintf('Correcting file %s...\n', lst(i).name);
fullfileHere = fullfile(f... |
9ff17f5691691c10e95fa50b5f748abd67c9270ceca9951ccbf40f64350fadbd | MATLAB | 455 | 18 | function cbDeleteRoi(sel, ~, ~, roiId)
% Delete ROI:
sel.roiInfo.roi([sel.roiInfo.roi.id]==roiId) = [];
% Update display
title(sel.h.ax.roi, sprintf('ROI %d deleted', roiId));
% Delete ROI patch:
delete(sel.h.ui.roiPatches(roiId));
if verLessThan('matlab', '8.4') %if older than 2014b
sel.h.ui.roiPatches(roiId) = ... |
5e1ef4c5c933b5ab2f951d46443a404f387d357af0212bbd84f6f12a3c6393b7 | MATLAB | 456 | 10 | function y=generate_psf_imdecor(gama,w,kernelRadius_user)
gama=gama/(2.335); % gama is fwhm, new gama is sigma
kernelRadius_default = ceil(gama* sqrt(-2* log(0.0002)))+1; % if the kernel radius is not defined instead of fwhm, use fw at 0.0002 of the maximum
kernelRadius = kernelRadius_default*w;
ii=-kernelRadius:kerne... |
ce8b81961ace3345eeddb19868dd6a5b8c205ffad979bdd406a89172707be0d5 | MATLAB | 459 | 9 | function z = conv_r2z(r)
% conv_r2z Fisher r-to-z transform (elementwise).
% z = conv_r2z(r) returns the Fisher variance-stabilizing transform
% z = atanh(r) = 0.5*log((1+r)./(1-r)) of a correlation coefficient (or
% array of them). Operates elementwise; NaNs pass through unchanged.
% Inputs of exactly +/-1 ma... |
48a858fddd0e6936d35f20914d265cb93bc2fafded822697aee8b8425e4ec421 | MATLAB | 470 | 11 | % Define function to add significance indicators
function addSignificanceIndicator(barGroup1, barGroup2, barIndex1, barIndex2, pValue, maxY)
significanceThreshold = .05;
if pValue < significanceThreshold
x1 = barGroup1.XEndPoints(barIndex1);
x2 = barGroup2.XEndPoints(barIndex2);
y = maxY; % Use maximum Y va... |
89a3142827a49e6cb18284fcfdbd1da3f46d90c5163cf90d1e7ae75887a36b3f | MATLAB | 471 | 14 | function SIM2 = downSample(SIM, downfactor, gpu)
if gpu == 1
kernel = ones(downfactor);
SIM_gpu = gpuArray(SIM);
kernel_gpu = gpuArray(kernel);
SIM2_conv_gpu = convn(SIM_gpu, kernel_gpu, 'valid');
SIM2 = gather(SIM2_conv_gpu(1:downfactor:end, 1:downfactor:end, :));
... |
b2b329a62f282de40dea510bdebba9ede40c4dc59ec49b14b4ac4aacc6764f11 | MATLAB | 473 | 19 | function [mov, mF] = viewAcq(obj,nSlice,nChannel)
if ~exist('nSlice','var') || isempty(nSlice)
nSlice = 1;
end
if ~exist('nChannel','var') || isempty(nChannel)
nChannel = 1;
end
movStruct = obj.correctedMovies.slice(nSlice).channel(nChannel);
nMovies = length(movStruct.fileName);
mov = nan([movStruct.size(1... |
146eb61321cafdf5d62ef2eaf4acc5a49acb516c0e69a9d67e3ed6bb2d060a79 | MATLAB | 474 | 24 | % Nagumo equation
xpt=linspace(-30,30,3001); dx=xpt(2)-xpt(1);
xpt=xpt';
np=length(xpt);
u=zeros(np+1,1);
u0=0.*(xpt<0)+xpt/10.*(xpt>=0).*(xpt<=10)+1*(xpt>10); u0(end+1)=0.5;
template=u0(1:end-1);
templatex=0.*(xpt<0)+1/10.*(xpt>=0).*(xpt<=10)+0*(xpt>10);
alpha=0.01;
tic
U(:,1)=u0;
dt=0.01; T(... |
8101a4bb30e119e2a89b45716016d280cec6310aa45b4a54ad6c93a95df5d696 | MATLAB | 477 | 17 | function [u,v] = fftalign(A,B)
% [u,v] = fftalign(A,B)
% From http://scanbox.wordpress.com/2014/03/20/recursive-image-alignment-and-statistics/
[h, w] = size(A);
% yidx = round(size(A,1)/2)-N/2 + 1 : round(size(A,1)/2)+ N/2;
% xidx = round(size(A,2)/2)-N/2 + 1 : round(size(A,2)/2)+ N/2;
% A = A(yidx,xidx);
% B = B(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.