sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
9012f3273ad35f1367a931223b136b13a96a66bb14f3af4be078f6311d79e73e | Python | 14,698 | 423 | # Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
a3fbdf6fcc674b20b0d785d8e652cd6bb1737c4a0923852eac38c0f1e0dfcc68 | Python | 14,701 | 460 | import copy
import logging
import numpy as np
from math import sqrt
import pytest
from pathlib import Path
import MDAnalysis as mda
from kimmdy.recipe import Break, Place
from kimmdy.parsing import read_plumed, read_top, write_top
from kimmdy.constants import DEFAULT_EDISSOC, REACTIVE_MOLECULEYPE
from conftest import D... |
e1fa2788cd39a3434545784e72a4e12dd764043022484a80f2b1ed0e5fb65387 | Python | 14,706 | 313 | import argparse
import os
import scipy
import numpy as np
import pickle as pkl
from pathlib import Path
import math
from datetime import datetime
import matplotlib.pyplot as plt
from sklearn.linear_model import LogisticRegression
import sys
import pandas as pd
'''
Example cmd (when run from this directory; provide py... |
b852fc7509240aa452b20a0a1e48b4924b38b021147abbccb13eaef1c0c5fa5f | Python | 14,711 | 409 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
e74c3e205535d78facd375c891eef62bdfeffe6824379ade9c19ac57a1b48ed2 | Python | 14,720 | 455 | import pytest
import json
import os
import datetime
from time import sleep
from gufe.tokenization import JSON_HANDLER
from alchemiscale.compute import client
from alchemiscale.models import ScopedKey
from alchemiscale.storage.models import (
TaskStatusEnum,
ProtocolDAGResultRef,
)
from alchemiscale.tests.inte... |
30f7bf7c7756065c2b30557feb58d5ff14ea73f928b83c1b8b91546a214bf0d4 | Python | 14,735 | 455 | # Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
2caf337271719276c545b160f935711dd9105905288192ef3b710f34ada6723f | Python | 14,736 | 247 | import logging
import os
import shutil
import platform
import traceback
from time import sleep
import requests
import zipfile
import pytest
from PySide6.QtCore import Qt
from gui.RaidionicsMainWindow import RaidionicsMainWindow
from gui.UtilsWidgets.CustomQDialog.ImportDataQDialog import ImportDataQDialog
from utils... |
fcdec1791b24f8a37cd43413f9d0479435aaa824d8aa517137240b52cc265d07 | Python | 14,736 | 306 | """
circleseq.py as the wrapper for CIRCLE-seq analysis
"""
from alignReads import alignReads
from visualization import visualizeOfftargets
from mergeReads import mergeReads
import argparse
import os
import sys
import subprocess
import traceback
import log
import yaml
import validation
import findCleavageSites
import ... |
5d8f98af29622384c6543c517242e236a2b20a7652dec4d0097ad4513e59e120 | Python | 14,749 | 418 | import logging
import threading
import time
import os
import pytest
from pathlib import Path
from alchemiscale.models import ScopedKey, Scope
from alchemiscale.storage.models import ComputeManagerID
from alchemiscale.storage.statestore import Neo4jStore
from alchemiscale.storage.objectstore import S3ObjectStore
from... |
f60a838ecf88c6c3e10586b9729befd85675299946f371a2baccb69459af2241 | Python | 14,766 | 392 | """Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause proble... |
3322edd836bd69e6b2e50294b0703983472c3a3c61b0a82f2e33c9f5a506ef38 | Python | 14,786 | 271 | import numpy as np
base = '/home3/ebrahim2/beyond-brainscore/'
from matplotlib import pyplot as plt
from sklearn.metrics import mean_squared_error
import sys
sys.path.append(base)
from plotting_functions import plot_across_subjects
import seaborn as sns
import pandas as pd
from trained_untrained_results_funcs import fi... |
99457c17124e275052bb6bfdfc01606ec3d896d6ab606befc83b9fc19cadfb93 | Python | 14,816 | 386 | #!/usr/bin/env python3
"""
plot.py — Cheese3D features plotter (Qt/PyQtGraph), with column toggles and frame cursor
Usage (standalone):
python plot.py /path/to/cheese3d_features.csv
# optional: start with just a subset of columns checked
python plot.py /path/to/cheese3d_features.csv --cols yaw pitch roll
"... |
9d26f36aeac936bb48b8805ca79a70c9d7195fb836dd0eae318ccfae704523e8 | Python | 14,818 | 393 | # %%
"""
Rapid Model Testing Script
=========================
This script combines inference and evaluation for quick model weight testing.
It processes EDF files through the REST model and compares against reference scores.
Saves an Excel report with per-dataset sheets including full analysis per dataset.
Usage:
... |
81cbdf3cd2db7826f12b99e2f1f2693eca7b4f85a87c16027f654ef3dad1fa4e | Python | 14,829 | 412 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
73976ae8cbffb66e77995e8169351364b720c9c181e3dd1b80be89406e8c3e79 | Python | 14,839 | 366 | import logging
import re
from multiqc import config
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import bargraph, table
log = logging.getLogger(__name__)
class MultiqcModule(BaseMultiqcModule):
"""
The module parses the report and count files generated by
[L... |
89666955abd466f3acabff775a43389b90e5064ebb39ae798ac6d94bf84d8f69 | Python | 14,840 | 412 | #!/usr/bin/env python3
"""
qc_widget.py — change‑based, bidirectional sync orchestrator
-------------------------------------------------------------
This script launches BOTH viewers with **data.py** as the single source of truth
for discovery, and then keeps them synchronized on frame changes.
Design goals (per proj... |
20fb5ff82197f89dac872c4b77db7719ffb998595b26162dd940e2507592ba27 | Python | 14,852 | 403 | """
Storage management utilities for experiment cleanup and optimization.
This module provides automatic cleanup policies for experiment directories
to manage storage efficiently while preserving important experiments.
"""
import json
import logging
import shutil
from datetime import datetime, timedelta
from pathlib ... |
8991a0ac04790df09aeabaf1c50aaff212d19d4907f83ddc94500c2b3f0a8bbd | Python | 14,894 | 370 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
import os
import pathlib
import openmm
import pooch
import pytest
from gufe import SmallMoleculeComponent
from openfe.protocols.restraint_utils.openmm.omm_restraints import (
BoreschRes... |
10c8cc40c05dbaf5a2ebce9d90dba8c7615b19287bd44c1f0b6a5b6c2f868b06 | Python | 14,902 | 348 | """MultiQC module to parse output from Space Ranger count"""
import json
import logging
import os
from collections import defaultdict
from typing import Dict, Union
from multiqc import config, BaseMultiqcModule
from multiqc.plots import linegraph, table
from multiqc.modules.spaceranger.utils import set_hidden_cols, ... |
72a95a0cb5ef57cfcf08a3f1e0aeb7d82d27cefe3dc23502366ef0eed4391189 | Python | 14,907 | 401 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import annotations
from collections import Counter
from typing import Any, List, Literal, Optional, Tuple, Union
import dask.array as da
import numpy as np
import xarray as xr
from . import types
from .exceptions import ConflictingArgumentsError, Unexpect... |
ad3823d45167baa924ea63bdd32f17982889432d7be27b323f83725ac78f1535 | Python | 14,931 | 400 | """
MCP (Model Context Protocol) server for Schema Generator Agent.
"""
import asyncio
import logging
from typing import Any, Sequence
from mcp.server import Server
from mcp.server.models import InitializationOptions
from mcp.server.stdio import stdio_server
from mcp.types import (
Resource,
Tool,
TextCont... |
091efeccf91ec172968c345715addcf1f4a98231e0804a08e942717aa13f1b54 | Python | 14,941 | 399 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
cb41bff7376349d6e5e0f8c26e0d7a8ab7ef9199929a9abd0fb593c2aca19f5f | Python | 14,941 | 399 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
35f5767e03024836be5b815c8875184c62718f34706f312fecd4dd43502c28fc | Python | 14,943 | 330 | import json
import logging
import math
from collections import Counter
from typing import Any, Optional
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import bargraph, linegraph
from multiqc.plots.table_object import ColumnDict, ValueT
from multiqc.types import ColumnKey, Sa... |
2628876364d671c50c88184533703096ad1962f698ee42cd413fce9f6324a501 | Python | 14,946 | 336 | import json
import logging
import numpy as np
import matplotlib.pyplot as plt
from dataclasses import dataclass
from typing import List, Tuple, Dict, Any, Optional
from pathlib import Path
from cheese3d.synchronize.aligners import (BaseAligner,
CrossCorrelationAligner,
... |
921ed8fe42f86d01d8b04de9e5c68a1f32d14a11c62bc53546f0a623fb5c988d | Python | 14,946 | 399 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
d1f1a7a6404ded3a6506b0a54633665132f2c0fad285c72f48493c1f42e6103b | Python | 14,946 | 399 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
39bc84349fd3404246c521d104bea76c66c0bc137112a383fc8a1bdd313fd9cf | Python | 14,949 | 319 | import logging
from concurrent.futures import ThreadPoolExecutor
from time import sleep
import numpy as np
from ethopy import local_conf
from ethopy.core.interface import Interface, Port
from ethopy.utils.helper_functions import convert_numeric_keys
try:
import pigpio
from RPi import GPIO
IMPORT_RP = Tru... |
c1aac86fc916aeeeb6be5c002af154d8571235e292492ad98fa962920f7b0db9 | Python | 14,949 | 399 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
e1eb175ab20aa41aec1e58c57aedf769e72c588cbd63fb7e9b78765740a86c24 | Python | 14,973 | 363 | """
twinc_visualize.py
Author: Anupama Jha <anupamaj@uw.edu>
TwinC classification chromosome-wide prediction for visualization purposes.
"""
import os
import gzip
import torch
import pyfaidx
import hicstraw
import argparse
import numpy as np
import configparser
import seaborn as sns
import _pickle as pickle
import matp... |
fe4be32b565e111ffb96178663df159b3697219b89cf409988bc5282a9ad63f2 | Python | 14,980 | 458 | import os
import pathlib
import sys
from typing import List, Literal
import click
import numpy as np
import pandas as pd
from openfecli import OFECommandPlugin
from openfecli.clicktypes import HyphenAwareChoice
from openfecli.commands.gather import (
_collect_result_jsons,
format_df_with_precision,
load_j... |
59a17757eaa7deca43259457801b0951250ffdfb29181d8bd0b1d721570643cc | Python | 14,989 | 401 | # src/models/cornet_wrapper.py
import torch
import torch.nn as nn
import cornet
from torchvision import transforms
class CornetWithPathology(nn.Module):
"""
A wrapper around CORnet (Z/S) that injects ASD-like pathology
(E/I Imbalance and Internal Noise) without retraining the weights.
"""
def __in... |
ac74db7099a767b5fa6d5abc2bb27cc0e466b7e9b4d13b50d263152c56ad4130 | Python | 14,989 | 413 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
STREAMLIT_Analysis.py
Confocal Microscopy Analysis Module
This module performs the final quantitative step of the pipeline. It takes the
segmented masks (from Step 3 and Step 4) and the raw intensity data (Ion channel)
to calculate per-zone statistics.
Goal:
- Comp... |
e900dc1ff5d52d7de3dd551c89d8de5b59f0d38107a50a551f1f63616f206963 | Python | 15,004 | 458 | #!/usr/bin/env python
"""
Generate IDP starting conformers using IDPConformerGenerator.
Generates N conformers for each IDP target using backbone torsion angles
sampled from PDB fragment statistics (Teixeira et al. 2022, J. Phys. Chem. A,
126:5985), with FASPR sidechain packing. Selects one conformer per target
whose... |
4910d24c2e074c03a2bef0dbe208b868aecf1919f8d5effcdf8694959c21cec3 | Python | 15,021 | 402 | """
twinc_reg_train.py
Author: Anupama Jha <anupamaj@uw.edu>
TwinC regression training routine.
"""
import os
import torch
import pyfaidx
import argparse
import numpy as np
import configparser
from scipy.stats import pearsonr, spearmanr
from twinc_reg_network import TwinCRegNet
from trans_utils import count_pos_neg, de... |
39a0cb4bf09ecf1a96e7568b3ed0d7c41defa550cd0859018b073c5c2084eef9 | Python | 15,027 | 524 | import pytest
from collections import defaultdict
import networkx as nx
import numpy as np
from numpy.testing import assert_allclose, assert_equal
import torch
from openff.nagl.molecule._graph._batch import FrameDict
from openff.nagl.molecule._graph._graph import (
NXMolGraph,
NXMolHomoGraph,
NXMolHeteroG... |
58501b453eb01cb8ae4aafa66a2bf35da4cc9d80e8f989951949489f95ac6ec1 | Python | 15,030 | 416 | # -*- coding: utf-8 -*-
"""
.. module:: skimpy
:platform: Unix, Windows
:synopsis: Simple Kinetic Models in Python
.. moduleauthor:: SKiMPy team
[---------]
Copyright 2017 Laboratory of Computational Systems Biotechnology (LCSB),
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
Licensed under the ... |
cc3246ca69f0d8585879492023f514058b04208f1d2ee748d748032cdb11c796 | Python | 15,030 | 363 | import pandas as pd
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import seaborn as sns
import pyBigWig
import os
import logging
from typing import Dict, List, Tuple, Optional
from dataclasses import dataclass
from pathlib import Path
from glob import glob
# Set up logging
logging.basicCon... |
ac16ae330ab13a5585a9bd7513f02b873a7ef32b134641ad97aa52c091e723ff | Python | 15,037 | 444 | import logging
import time
from importlib import import_module
import pygame
try:
import pygame_menu
IMPORT_PYGAME_MENU = True
except ImportError:
IMPORT_PYGAME_MENU = False
log = logging.getLogger(__name__)
class Experiment:
"""_summary_
I created a main menu where every time i want to move t... |
21717b4ec1eb1a622942de106ae4eceb7b6f92672658f7b0063d17f187d4f403 | Python | 15,038 | 311 | import numpy as np
import sys
sys.path.append("/home3/ebrahim2/beyond-brainscore/analyze_results/figures_code")
from trained_untrained_results_funcs import load_perf, select_columns_with_lower_error, calculate_omega, array_with_highest_mean, find_best_layer
from plotting_functions import plot_across_subjects
from matpl... |
8863c68130b375d71c9ac539dfe9dd001c93702a39a9668790c5c9892c07da91 | Python | 15,038 | 391 | #!/usr/bin/env python3
"""
SAMMY-seq Metaprofile Heatmap Generator
This script creates metaprofile heatmaps for gene sets, showing the log2 ratio of S2S/S3
across gene bodies (from -5kb to TSS to TES to +5kb).
The heatmap uses a blue-white-red color scheme where:
- Blue represents heterochromatin (log2(S2S/S3) < -0.1... |
0632e65e6f56408fee102b63fe150f63ac4ca790acbc5ff71ed790aa17f763c2 | Python | 15,049 | 421 | # ---------------------------------------------------------------
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# ---------------------------------------------------------------
# coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "Licens... |
f17ab80bc77105ea9b4d981e195c5acdd0549dccb75c1aa18c6641f7bc14418f | Python | 15,049 | 333 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import numpy as np
from scipy import stats
# Visualization
# =============
from matplotlib import pyplot as plt
from matplotlib.path import Path
from matplotlib import patches
from matplotl... |
6e4b5b5226828a62acd790908c93eed3db2c20d80ffef8fd4001bdfb3b5b26b2 | Python | 15,057 | 351 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script to evaluate individual parcellation results
Created on 12/4/2023 at 4:22 PM
Author: Caro Nettekoven
"""
import numpy as np
import pandas as pd
import nitools as nt
import Functional_Fusion.dataset as ds
import Functional_Fusion.atlas_map as am
import HierarchBa... |
95f2c28a93448d07211d33ad39351ab6f720746c94a5c00c77d5bff9ba781d07 | Python | 15,058 | 312 | import argparse
import nibabel.freesurfer
import numpy as np
from PIL import Image
from nilearn import datasets, plotting
import matplotlib.pyplot as plt
import os
import pickle
from analyses.cluster_analysis import calc_significance_cutoff
from analyses.decoding.searchlight.searchlight import searchlight_mode_from_... |
6af214b28156e923ad4d43ae5b14e28a67d546444a3177b7fabff4b995a7458e | Python | 15,061 | 476 | #!/usr/bin/env python3
from flask import Flask
from flask import jsonify
from flask import request, safe_join, send_from_directory
from flask_compress import Compress
from flask_ipban import IpBan
from glob import glob
import os
from collections import deque, defaultdict
import re
import cv2
import string
import rando... |
93db0ae730c5e479c34da4db28afb1aa3f3e2faad596017df45dfe130add70b1 | Python | 15,077 | 402 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
b1d7de10cf3f38328751300f3c240cbd75bb3f93cf1d707d0a9261302a924bf6 | Python | 15,081 | 363 | import ast
import logging
import math
import re
from typing import Optional
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import bargraph, linegraph
log = logging.getLogger(__name__)
# Colour palette (tab10) used to assign one colour per sample in the distance-law plot
_S... |
1a0a607d08095f28730d4ae6d5d4fa849a2d94b4b5f4493e5f28bee69fc83528 | Python | 15,085 | 468 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Callable, List, Optional, Tuple, Union
import numpy as np
import pytest
from ome_types import to_xml
from ome_types.model import OME
from aicsimageio import exceptions, types
from aicsimageio.readers import OmeTiffReader
from aicsimageio.writers import... |
1f0f88ff1bfe5c44bd5bee6faa864244361aa28d4b0ee7972634d88a8ca535e4 | Python | 15,123 | 334 | """This file contains a documentation generating script. Doxygen
is used to do the actual generation, so these functions act primarily to
streamline the process and provide some customizations to the automatically
generated documents.
The motivation is:
- Want to have automatic online docs
- Want to version-control PD... |
962ec034a7ca33b5d7a887072d401955e49a8c17d7046d2d97eb2ee17edbbd12 | Python | 15,124 | 313 | from PySide6.QtWidgets import QWidget, QLabel, QHBoxLayout, QLineEdit, QComboBox, QGridLayout, QPushButton,\
QRadioButton, QMenu, QVBoxLayout, QMessageBox, QSpacerItem
from PySide6.QtCore import Qt, QSize, Signal, QPoint
from PySide6.QtGui import QPixmap, QIcon, QColor, QAction
import os
import logging
from gui.Ut... |
8bd9290433288eaafa08b815794734011854f51f22d712ac07392e0abe905133 | Python | 15,130 | 400 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import xml.etree.ElementTree as ET
from typing import Any, Dict, List, Optional, Tuple, Union
from urllib.error import URLError
import xarray as xr
from fsspec.implementations.local import LocalFileSystem
from fsspec.spec import AbstractFileSystem
from ome_... |
d1be4b5a37308ae469c436c964954357dc204b217bdcf2b831cc43e0971760a6 | Python | 15,134 | 390 | """MultiQC submodule to parse output from Picard CrosscheckFingerprints"""
import logging
import re
from collections import defaultdict
from csv import DictReader
from itertools import chain, groupby
from multiqc import config
from multiqc.plots import table, heatmap
from multiqc.utils.util_functions import strtobool... |
9a31993b4707430a6fc31230d1bd72bd6576aee957e6e8034c594d60de0164aa | Python | 15,144 | 315 | import logging
import os
import re
from typing import Dict, List
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import bargraph
log = logging.getLogger(__name__)
class MultiqcModule(BaseMultiqcModule):
def __init__(self):
super().__init__(
name="Qo... |
0e7b75a1d23209beb0c02a8540c4b1e7ad493529e2cac763ad5247ece269c2a6 | Python | 15,152 | 354 | import numpy as np
import librosa
import math
import matplotlib.pyplot as plt
from IPython.display import Audio
def get_audio_onset_offset(pred_audio, display_audio = False, mic_audio = None, cue = None, intersegment_duration = 3000, amplitude_percentage = 0.1):
'''
Determines the onset and offset of attemp... |
78d7a00a73abf9daa173b19b4a1d2d6e8a110c27e9a760e91fdf086d7d25fdb1 | Python | 15,152 | 397 | # Copyright 2024 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
1abbf61adad383ef29814b041ce72c8aef405244f50ef2d4bb32f0d4ce6b927f | Python | 15,164 | 475 | """Atom features for GNN models.
An atom featurization scheme is a tuple of instances of the classes in this
module:
>>> atom_features = (
... AtomicElement(),
... AtomHybridization(),
... AtomConnectivity(),
... AtomAverageFormalCharge(),
... AtomGasteigerCharge(),
... AtomInRingOfSize(3),
..... |
0edb2b8af1f3c4547261cdc3d17d4b6384cc164114ff2da92f1ed2e279f08a66 | Python | 15,186 | 404 | """Utilities for data transformations"""
import numpy as np
from scipy import ndimage
from skimage.measure import label
from skimage.measure import regionprops
from skimage.morphology import ball, disk
from skimage.morphology import binary_dilation
from skimage.segmentation import find_boundaries
from tensorflow.kera... |
a5527ff226ce7c20675bc901c85541216677d06606a4ca4b21d49e86e9adbba6 | Python | 15,245 | 349 | import logging
from typing import Dict
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import table
from .bbmap_filetypes import file_types, section_order
log = logging.getLogger(__name__)
class MultiqcModule(BaseMultiqcModule):
"""
The module produces summary stat... |
44db29e558bfde12e253c674c83971cf3d8aec9cff8fb52286ba8c8258be5672 | Python | 15,252 | 398 | """
Example illustrating the application of MBAR to compute a 1D free energy profile
from a series of force-clamp single-molecule experiments.
REFERENCE
Woodside MT, Behnke-Parks WL, Larizadeh K, Travers K, Herschlag D, and Block SM.
Nanomechanical measurements of the sequence-dependent folding landscapes of ... |
3a81abac703fe2da4600207b062a4bc4d845a661897ce7eb84a5b6cd3a2f91f6 | Python | 15,253 | 398 | """
Example illustrating the application of MBAR to compute a 1D free energy profile
from a series of force-clamp single-molecule experiments.
REFERENCE
Woodside MT, Behnke-Parks WL, Larizadeh K, Travers K, Herschlag D, and Block SM.
Nanomechanical measurements of the sequence-dependent folding landscapes of... |
ac24296ffcb4a4afef783c8b3133f0cd4720c10fb89a93de34b412143321bb54 | Python | 15,264 | 266 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script of evaluate the individual parcellation results
Created on 12/4/2023 at 4:22 PM
Author: Caro Nettekoven
"""
import numpy as np
import nitools as nt
import pandas as pd
from global_config import DEVICE
import TaskRest.paths as taskrest_paths
import pandas as p... |
6b05516a51c1e93ac48fa986eaa801ba6be31ccc11b6b41cd5241d070b342665 | Python | 15,271 | 416 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal, kl_divergence
class AttentionPool(nn.Module):
"""
Attention Pooling Layer.
Args:
hidden_size (int): Size of the hidden state from the RNN.
"""
def __init__(self, hidden_size):
... |
b0f88e9bd4ea93b882d1098c3126e7a6dd3694908d77fdb6547e59b97da3fbd6 | Python | 15,281 | 406 | """MultiQC submodule to parse output from Picard VariantCallingMetrics"""
import logging
from typing import Dict
from multiqc.plots import bargraph, table
# Initialise the logger
log = logging.getLogger(__name__)
def parse_reports(module):
"""Find Picard VariantCallingMetrics reports and process their data"""
... |
2362ae9b78b6713564feab5f6c804d0b211a7e4b58e0dde07facd56bcb5b8b5e | Python | 15,296 | 429 | """
meta/cascade.py — FrugalMethod Budget-Aware Cascade
====================================================
Implements the FrugalMethod cascade recommender:
1. Evaluate base_method confidence via MethodScorer
2. If confident → accept base_method (cheap)
3. If not → escalate to kNN-recommended addon method (expen... |
47b44b6e85316b0b22b3332027e382b7bf60454e258e55c328285b08c98b3251 | Python | 15,303 | 430 | #!/usr/bin/env python
import argparse
import json
import os
import pathlib
import traceback
from pathlib import Path
from shutil import copyfile
import MDAnalysis as mda
import numpy as np
import yaml
from openfe_analysis import FEReader
from openmmtools import multistate
from tqdm import tqdm
def remove_first_reve... |
3762d69f5a99b3e99df2d00cbcf46003dd4de130a7392ada46fab633d3cee2a0 | Python | 15,310 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
be8451f341de8e2465270ae0ae3d64ed2a17b7d0849bddc34754625bfcca9f1a | Python | 15,310 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
c9a9c451ecadca79aecc8fc75db87a13437fad63305d9d6b08f002690bfeb90c | Python | 15,310 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
f5bea822bd4728d699570a77b8e9a064e8e8a0bea13e9d90690c7b8451acee5f | Python | 15,310 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
2d0eb078a4aa0236e16688625db8ff5c86598421631426c59fcdc0b58afc2b88 | Python | 15,312 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
53ae1a5c816e2535d27527e6ae262ef95d5dcd9a3150a74bf0b459d52a2eacfc | Python | 15,312 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
a32055e5ca120948e97a27e4ba50d3e9fbfeebc34034a44edec386a18a38b7ff | Python | 15,312 | 406 | import pathlib
import os
import pandas as pd
import numpy as np
import torch
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from PIL import Image
from torch.utils.data import random_split
from torch.utils.data import DataLoader
import torch.nn as nn
import torch
from torch.... |
3fc6d983b22fe050d084f6cf12dbf63091b27344e7fc77ee5f0aef30dd148214 | Python | 15,313 | 390 | """Tools for the Knowledge Agent."""
import os
import urllib
import yaml
from typing import List, Tuple, Optional, Dict, Any
from oaklib import get_adapter
from pydantic_ai import RunContext
from pydantic import BaseModel, Field
class ExtractedEntity(BaseModel):
"""A single entity extracted from text."""
t... |
72ff838cabd07b74ccf0ee00915c6247dabb31010881600b997f4fb8f3b2900e | Python | 15,335 | 413 | """Input/output functions for Shapely geometries."""
import numpy as np
from shapely import geos_version, lib
from shapely._enum import ParamEnum
# include ragged array functions here for reference documentation purpose
from shapely._ragged_array import from_ragged_array, to_ragged_array
from shapely.decorators impo... |
f3ff3e8392590e2d2ca377f91ae36813e7d87601d0ad491649857d65507d8494 | Python | 15,339 | 330 | import json
import pathlib
import pytest
from importlib import resources
import gufe
import os
import glob
import shlex
from gufe import AlchemicalNetwork, ProteinComponent
from gufe.tokenization import JSON_HANDLER
from ..fix_networks import (
parse_alchemical_network,
parse_results,
alchemical_network_t... |
43e929ab7f84bde32aeb3df55a24a31b09aa1466408fdbe2d0ef98d914c565ea | Python | 15,343 | 335 | # for preprocessed subjects, create a an events file named 'events.tsv' in the BIDS directory, of format <sub-01>_task-probe_<run-01>_events.tsv
# folder for event files is: /data/pt_02747/action_hippo/data/derivatives/sub-07/func/
# folder to get the raw data from is: /data/pt_02747_hippo/2_day_two/4_scanner/responses... |
6d89c464f1a551b34631c12839156f46cb0603f3d0c4280d7ae6b1057b1b25bc | Python | 15,344 | 399 | import spacy
import numpy as np
from transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config
from transformers import RobertaTokenizer, RobertaModel
from transformers import AutoTokenizer, AutoModelForMaskedLM, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoModel
import torch
import re
from spacy.tokeni... |
2968fcdb862751bfff38bb3e44954e5450f26b82210ef8758bdfd0655a9ac1b8 | Python | 15,354 | 508 | """Functions for reading and writing segmentation datasets as TF Records"""
import csv
import numpy as np
import tensorflow as tf
from tensorflow.io import serialize_tensor
from tensorflow.keras.backend import is_sparse
def _bytes_feature(value):
"""Returns a bytes_list from a string / byte."""
if isinsta... |
a4f06b025e085514316b17ccae43998bb9f2086029630485c6c8719471751860 | Python | 15,367 | 370 | import numpy as np
from numpy.linalg import inv, pinv
import nibabel as nb
import Functional_Fusion.util as ut
import Functional_Fusion.atlas_map as am
import pandas as pd
from pathlib import Path
import re
import Functional_Fusion.dataset as ds
from preprocessing.hcp_dataset_class import DataSetHcpResting
import scrip... |
511533d644aa84386a26cafdba56854dec0ff198f07fba153cfeec91d8fd48c4 | Python | 15,431 | 450 | import logging
import os.path
import re
import urllib.parse
import urllib.request
from typing import List, Optional, Tuple
from pip._vendor.packaging.version import _BaseVersion
from pip._vendor.packaging.version import parse as parse_version
from pip._internal.exceptions import BadCommand, InstallationError
from pip... |
fe5360f6315633f189a3f47fe204de189fcbfd2da9efbc42d07a034d072cf7e7 | Python | 15,446 | 568 | # Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
9f81252bd0dc0c196d45f0bbcbdfa7d4b37271813074516c371b435fecea1b5e | Python | 15,453 | 373 | import datetime
import logging
import os
import re
import time
from html import escape
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.plots import table
log = logging.getLogger(__name__)
# Commands are parsed from Cluster Flow log files, so they are stored as plain text and
# on... |
1f74ba19c39cfbae6c876a3d6c4541064bac83c6e0e67449e7598288f4417cf4 | Python | 15,465 | 469 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
from pathlib import Path
from typing import Iterable, Callable, Optional, Union
import networkx as nx
from gufe import SmallMoleculeComponent, AtomMapper
from openfe.setup import LigandNet... |
d179f36180b932bd6ced723ecd21e68e9ec62bb06cb520cf2e987cd8a09ae22e | Python | 15,468 | 470 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
"""Settings class for equilibrium AFE Protocols using OpenMM + OpenMMTools
This module implements the necessary settings necessary to run absolute free
energies using OpenMM.
See Also
----... |
f49380a590cad531039068f7d87ba0bd1fabf4f9faab4295cc7258132efb1680 | Python | 15,469 | 417 | """Integration tests for StrategistService."""
import logging
import pytest
import threading
import time
from datetime import datetime, timezone
from pathlib import Path
from tempfile import TemporaryDirectory
from alchemiscale.models import ScopedKey, Scope
from alchemiscale.storage.statestore import Neo4jStore
from... |
0a76e6f8e3bd0ffa9df194c5c7315c8d26af7b14981599b279aa0fbccb2380f7 | Python | 15,470 | 535 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import collections
import itertools
import re
from ._structures import In... |
9224bdd2ec93e77557da5dd6839e369bfc75f3bc9a1acd6ba57c8d3a58231203 | Python | 15,479 | 453 | """
:mod:`alchemiscale.compute.service` --- compute services for FEC execution
==========================================================================
"""
from contextlib import contextmanager
import gc
import time
import logging
from uuid import uuid4
import threading
from pathlib import Path
import shutil
from ... |
1a0a2631714a76af7a517b3c7e6f86eaf6f9494f10892dad18a9d68b0dcf5a45 | Python | 15,482 | 427 | import os
from datetime import date
from pathlib import Path
from fpdf import FPDF
# Margin
MARGIN = 10
SUBSPACE = 5
# Page width: Width of A4 is 210mm
pw = 210 - 2 * MARGIN
# Cell height
ch = 6
# flake8: noqa: E501
class PDF(FPDF):
def __init__(
self,
dataset_patient,
gender,
s... |
35616ffbd8b3eb8ed44fd7651dfc5180b38469035ffb76d617ab570255de8e87 | Python | 15,496 | 385 | """Parse riker `hybcap` outputs (hybcap-metrics.txt)."""
import logging
from typing import Dict, List, Optional
from multiqc import config
from multiqc.plots import linegraph, table
from multiqc.plots.table import TableConfig
from .util import read_tsv, to_float
log = logging.getLogger(__name__)
# Coverage thresho... |
cefecb06c0b6fa35208b1de98709294f651ce7d57428ba2ff160c6b1ade1441e | Python | 15,520 | 426 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
"""
Generic tools for plotting networks. Interfaces NetworkX and matplotlib.
Create subclasses of ``Node``, ``Edge``, and ``GraphDrawing`` to customize
behavior how the graph is visualized ... |
55b3cf5e388825fb04d1cc6f6637743581225cb95a039e256a3184d4eac43a1f | Python | 15,524 | 495 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
d3a6ae7e7942f4c0452239c34a1a854d97d90ee067209fe1e5c12e1f0741f80e | Python | 15,551 | 309 | import numpy as np
import sys
sys.path.append("/home3/ebrahim2/beyond-brainscore/analyze_results/figures_code")
from trained_untrained_results_funcs import find_best_layer, elementwise_max, calculate_omega, load_perf, select_columns_with_lower_error
from untrained_results_funcs import load_untrained_data
from plotting_... |
e537ecb64dffe34ad07a83b8bab06d1f0a76b8a50c7fca99578fb4523997218f | Python | 15,562 | 346 | import logging
import os
from itertools import zip_longest
from typing import Dict
import yaml
from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound
from multiqc.modules.pairtools.utils import read_stats_from_file
from multiqc.plots import bargraph, linegraph
log = logging.getLogger(__name__)
cla... |
ba2fce9234a34ca9f9e35b39db716c0aa83bd8cd4c647fbd4e54a195b9f330d8 | Python | 15,571 | 310 | from PySide6.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QScrollArea, QPushButton, QLabel, QSpacerItem,\
QGridLayout, QMenu
from PySide6.QtCore import QSize, Qt, Signal, QPoint
from PySide6.QtGui import QIcon, QPixmap, QAction
import os
import logging
from gui.UtilsWidgets.CustomQDialog.SavePatientChangesDi... |
adc6678239034d343f182e7a72f7368faf807055dfde7b21394c2cac69adc8df | Python | 15,578 | 437 | """
I/O functions for working with CmdStan executables.
"""
import os
import subprocess
import numpy as np
def _rdump_array(key, val):
c = 'c(' + ', '.join(map(str, val.T.flat)) + ')'
if (val.size,) == val.shape:
return '{key} <- {c}'.format(key=key, c=c)
else:
dim = '.Dim = c{0}'.format... |
f8e2dff1a4ddc71a747b865a69cffaef2b10f408eb0cf5b7f09847c759962a2c | Python | 15,613 | 266 |
#script to generate main dataset
import nibabel as nib
import nibabel as nb
import numpy as np
import matplotlib.pyplot as plt
import os
import matplotlib_surface_plotting as msp
from vast import surface_tools
import pandas as pd
import scipy.stats as stats
import stripy as stripy
import subprocess
import matplotlib
i... |
1b54a0da18b7e93bfc8186c86355e333b979044d6f5c41fb7c83763bfaea457f | Python | 15,616 | 490 | from functools import partial
import numpy as np
import pytest
import shapely
from shapely import LinearRing, LineString, Point
from shapely.tests.common import (
all_types,
all_types_m,
all_types_z,
all_types_zm,
empty,
geometry_collection,
ignore_invalid,
line_string,
linear_ring... |
92546d492e5f7fb4c3cdd96b028381bbacfcc92b4b999a7dd775892f26b0d7a2 | Python | 15,626 | 381 | """
Codified Judgments we have. There should be 1 of each judgment in the DB
"""
from typing import Generic, Literal, TypeVar
import abc
import re
from loguru import logger
from pydantic import BaseModel, field_validator
from sqlalchemy.orm import Session
from truesight import parse_utils
from truesight.db.models im... |
bdc4722f11792de5c6b25a772ef935b4d0b6b98a17b2a680265c230abd8a8e31 | Python | 15,634 | 393 | """
methods/missing_gct.py — Missing-Aware GCT (vendor implementation)
===================================================================
Wraps the P2 vendor Graph Convolutional Transformer (Choi et al. AAAI 2020)
for semi-supervised classification.
Architecture (vendor gct_model.py):
• CRCFeatureEmbedder — per-fe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.