id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
2,285,300
test_TreeBoxes.py
weecology_MillionTrees/tests/test_TreeBoxes.py
from milliontrees.datasets.TreeBoxes import TreeBoxesDataset from milliontrees.common.data_loaders import get_train_loader, get_eval_loader import torch import pytest import os import pandas as pd import numpy as np # Check if running on hipergator if os.path.exists("/orange"): on_hipergator = True else: on_h...
4,663
Python
.py
107
36.607477
98
0.646018
weecology/MillionTrees
8
2
7
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,301
test_TreePoints.py
weecology_MillionTrees/tests/test_TreePoints.py
from milliontrees.datasets.TreePoints import TreePointsDataset import os import pytest import torchvision.transforms.v2 as transforms # Check if running on hipergator if os.path.exists("/orange"): on_hipergator = True else: on_hipergator = False # Test structure without real annotation data to ensure format i...
2,391
Python
.py
58
34.87931
124
0.694444
weecology/MillionTrees
8
2
7
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,302
CVE-2023-22518.py
davidfortytwo_CVE-2023-22518/CVE-2023-22518.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: David Espejo (Fortytwo Security) import os import json import argparse import requests import logging from rich import print from alive_progress import alive_bar HEADERS = { "X-Atlassian-Token": "no-check", "User-Agent": "Mozilla/5.0 (Linux; U; Android ...
7,881
Python
.py
161
40.086957
212
0.657381
davidfortytwo/CVE-2023-22518
8
2
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,303
decorator.py
Aues6uen11Z_Zafkiel/zafkiel/decorator.py
from typing import Callable, Generic, TypeVar T = TypeVar("T") def run_once(f): """ From https://github.com/LmeSzinc/StarRailCopilot/blob/master/module/base/decorator.py Run a function only once, no matter how many times it has been called. Examples: @run_once def my_function(foo, ba...
1,946
Python
.py
58
25.517241
94
0.604925
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,304
config.py
Aues6uen11Z_Zafkiel/zafkiel/config.py
from airtest.core.settings import Settings class Config: ST = Settings ST.CVSTRATEGY = ["tpl", "akaze"] ST.THRESHOLD = 0.8
137
Python
.py
5
23.6
42
0.7
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,305
exception.py
Aues6uen11Z_Zafkiel/zafkiel/exception.py
class NotRunningError(Exception): pass class PageUnknownError(Exception): pass class ScriptError(Exception): pass class LoopError(Exception): pass
168
Python
.py
8
17.375
34
0.793548
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,306
report.py
Aues6uen11Z_Zafkiel/zafkiel/report.py
import os import shutil import traceback from PIL import Image from airtest.aircv import imread, FileNotExistError, get_resolution from airtest.report.report import LogToHtml, LOGGING, HTML_FILE, DEFAULT_LOG_DIR, DEFAULT_LOG_FILE, HTML_TPL from airtest.utils.compat import script_dir_name from zafkiel.config import C...
3,786
Python
.py
83
33.686747
120
0.579846
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,307
utils.py
Aues6uen11Z_Zafkiel/zafkiel/utils.py
import cv2 import numpy as np from PIL import Image def random_rectangle_point(center, h, w, n=3): """ From https://github.com/LmeSzinc/StarRailCopilot/blob/master/module/base/utils/utils.py Choose a random point in an area. Args: center: coordinate of the area center h: height of the...
4,133
Python
.py
99
35.737374
110
0.666001
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,308
__init__.py
Aues6uen11Z_Zafkiel/zafkiel/__init__.py
from airtest.core.helper import G from zafkiel.config import Config from zafkiel.device.api import * from zafkiel.device.template import Template from zafkiel.device.win import WindowsPlatform from zafkiel.timer import Timer from zafkiel.report import simple_report from zafkiel.logger import logger __version__ = '0.2...
368
Python
.py
10
35.4
46
0.847458
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,309
logger.py
Aues6uen11Z_Zafkiel/zafkiel/logger.py
import logging import sys from loguru import logger airtest_logger = logging.getLogger("airtest") airtest_logger.setLevel(logging.ERROR) logger.remove() logger.add(sys.stdout, format="<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | " "<level>{level: <7}</level> | " ...
372
Python
.py
10
28.6
80
0.596639
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,310
timer.py
Aues6uen11Z_Zafkiel/zafkiel/timer.py
import time from zafkiel import logger class Timer: def __init__(self, limit, count=0): """ From https://github.com/LmeSzinc/StarRailCopilot/blob/master/module/base/timer.py Args: limit (int, float): Timer limit count (int): Timer reach confirm count. Default to 0...
2,503
Python
.py
79
21.632911
110
0.529314
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,311
ui.py
Aues6uen11Z_Zafkiel/zafkiel/ui/ui.py
from zafkiel import exists, Template, app_is_running, touch, screenshot from zafkiel.logger import logger from zafkiel.ocr.ocr import Ocr from zafkiel.ui.page import Page from zafkiel.decorator import run_once from zafkiel.exception import NotRunningError, PageUnknownError, ScriptError from zafkiel.timer import Timer f...
9,036
Python
.py
243
24.666667
112
0.529728
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,312
page.py
Aues6uen11Z_Zafkiel/zafkiel/ui/page.py
from __future__ import annotations import traceback from zafkiel.device.template import ImageTemplate as Template from zafkiel.ui.switch import Switch class Page: """ Main code comes from https://github.com/LmeSzinc/StarRailCopilot/blob/master/tasks/base/page.py """ # Key: str, page name like "page_...
2,391
Python
.py
66
26.80303
99
0.582936
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,313
switch.py
Aues6uen11Z_Zafkiel/zafkiel/ui/switch.py
from zafkiel.device.template import ImageTemplate as Template from zafkiel.exception import ScriptError class Switch: """ A wrapper to handle switches in game, switch among states with retries. Main code comes from https://github.com/LmeSzinc/StarRailCopilot/blob/master/module/ui/switch.py Examples: ...
2,118
Python
.py
54
29.703704
104
0.584308
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,314
__init__.py
Aues6uen11Z_Zafkiel/zafkiel/ui/__init__.py
from zafkiel.ui.page import Page from zafkiel.ui.switch import Switch from zafkiel.ui.ui import UI
99
Python
.py
3
32
36
0.84375
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,315
template.py
Aues6uen11Z_Zafkiel/zafkiel/device/template.py
import os import types from functools import cached_property from pathlib import Path import cv2 from airtest.core.cv import Template, MATCHING_METHODS from airtest.core.error import InvalidMatchingMethodError from airtest.core.helper import G, logwrap from airtest.utils.transform import TargetPos from numpy import nd...
7,563
Python
.py
160
36.88125
133
0.60456
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,316
api.py
Aues6uen11Z_Zafkiel/zafkiel/device/api.py
from typing import Optional, Tuple, Type, Callable, Union, List from airtest.core.api import * from airtest.core.cv import try_log_screen from airtest.core.error import TargetNotFoundError from airtest.core.helper import G, logwrap, delay_after_operation, set_logdir from airtest.core.settings import Settings as ST fro...
13,483
Python
.py
326
33.521472
118
0.637447
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,317
win.py
Aues6uen11Z_Zafkiel/zafkiel/device/win.py
from typing import Tuple from airtest.core.win import Windows from pyautogui import dragTo, moveTo from pytweening import easeOutQuad import win32gui class WindowsPlatform(Windows): def app_is_running(self) -> bool: state = self.app.is_process_running() return state def stop_app(self, pid: ...
1,386
Python
.py
37
28.918919
103
0.609118
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,318
cv.py
Aues6uen11Z_Zafkiel/zafkiel/device/cv.py
import time from airtest.core.cv import try_log_screen from airtest.core.error import TargetNotFoundError from airtest.core.helper import logwrap, G from airtest.core.settings import Settings as ST from zafkiel.logger import logger from zafkiel.ocr.ocr import Ocr from zafkiel.utils import is_color_similar, crop @lo...
3,014
Python
.py
68
33.735294
118
0.618609
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,319
models.py
Aues6uen11Z_Zafkiel/zafkiel/ocr/models.py
from pponnxcr import TextSystem as TextSystem_ from zafkiel.decorator import cached_property from zafkiel.exception import ScriptError DIC_LANG_TO_MODEL = { 'cn': 'zhs', 'en': 'en', 'jp': 'ja', 'tw': 'zht', } def lang2model(lang: str) -> str: """ Args: lang: In-game language name, de...
1,731
Python
.py
57
23.842105
79
0.621148
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,320
ocr.py
Aues6uen11Z_Zafkiel/zafkiel/ocr/ocr.py
import re import time from datetime import timedelta from difflib import SequenceMatcher from typing import Optional from pponnxcr.predict_system import BoxedResult from zafkiel.logger import logger from zafkiel.config import Config from zafkiel.decorator import cached_property from zafkiel.device.template import Ima...
12,938
Python
.py
338
28.14497
115
0.575561
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,321
keyword.py
Aues6uen11Z_Zafkiel/zafkiel/ocr/keyword.py
import re from dataclasses import dataclass from functools import cached_property from typing import ClassVar from zafkiel.config import Config from zafkiel.exception import ScriptError REGEX_PUNCTUATION = re.compile(r'[ ,.\'"“”,。::!!??·•\-—/\\\n\t()\[\]()「」『』【】《》[]]') def parse_name(n): n = REGEX_PUNCTUATION.s...
4,613
Python
.py
139
23.071942
101
0.541676
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,322
utils.py
Aues6uen11Z_Zafkiel/zafkiel/ocr/utils.py
import itertools import numpy as np from pponnxcr.predict_system import BoxedResult def area_cross_area(area1, area2, thres_x=20, thres_y=20): """ Args: area1: (upper_left_x, upper_left_y, bottom_right_x, bottom_right_y). area2: (upper_left_x, upper_left_y, bottom_right_x, bottom_right_y). ...
5,507
Python
.py
139
32.827338
93
0.633189
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,323
__init__.py
Aues6uen11Z_Zafkiel/zafkiel/ocr/__init__.py
""" This OCR module is from https://github.com/LmeSzinc/StarRailCopilot/tree/master/module/ocr, only modified to fit the project and: delete some methods add Ocr.ocr_match_keyword() """ from zafkiel.ocr.keyword import Keyword from zafkiel.ocr.ocr import Ocr, Digit, DigitCounter, Duration, OcrResultButton
306
Python
.py
8
37.25
91
0.815436
Aues6uen11Z/Zafkiel
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,324
main.py
usexhs_xhs-link/src/main.py
import os import re import logging from flask import Flask, redirect, request, send_file, render_template from urllib.parse import unquote import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry # import lib.redis_handler # WIP from lib import sql_handler ...
7,049
Python
.py
152
41.072368
108
0.692342
usexhs/xhs-link
8
0
0
AGPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,325
sql_handler.py
usexhs_xhs-link/src/lib/sql_handler.py
import os import psycopg2 # from datetime import datetime # Set up PostgreSQL pg_host = os.environ.get('POSTGRES_HOST', 'postgres') pg_port = os.environ.get('POSTGRES_PORT', '5432') pg_user = os.environ.get('POSTGRES_USER', 'xhslink') pg_password = os.environ.get('POSTGRES_PASSWORD', 'xhslink-password') # pg_database ...
1,882
Python
.py
57
26.701754
91
0.645465
usexhs/xhs-link
8
0
0
AGPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,326
main.py
activate-sh_Rubika-Group-Management/main.py
from rubpy import Client, Message, handlers from rubpy import models, methods, exceptions from rich.console import Console from datetime import datetime from asyncio import run admins = [] # No need to edit this list groups = [ '', # group one '', # group two # and... ] filters = [ '@', 'joinc', ...
19,614
Python
.py
370
27.035135
104
0.40988
activate-sh/Rubika-Group-Management
8
0
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,327
dlc2adpt.py
tangguoling_ADPT/data/dlc2adpt.py
# -*- coding: utf-8 -*- """ Created on Wed Nov 16 10:36:10 2022 @author: tang """ import cv2 import glob import pandas as pd import json import h5py csvs = glob.glob('D:/ADPT/data/mouse/labeled-data/*/CollectedData_*.csv') f = open('mouse.json','w') all_data = [] for csv in csvs: data = pd.read_cs...
1,456
Python
.py
46
22.478261
74
0.51787
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,328
predict.py
tangguoling_ADPT/code/predict.py
# -*- coding: utf-8 -*- """ Created on Mon Jan 8 18:49:52 2024 @author: tang """ import warnings warnings.filterwarnings('ignore') from core.predict import predict import yaml from config.config_training import configuration from config.config_predicting import configuration_predict if __name__ == '__ma...
1,881
Python
.py
31
54.741935
339
0.700883
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,329
train.py
tangguoling_ADPT/code/train.py
# -*- coding: utf-8 -*- """ Created on Mon Jan 8 18:49:52 2024 @author: tang """ import warnings warnings.filterwarnings('ignore') from core.train import train from core.data_aug import data_augmentation import yaml from config.config_training import configuration if __name__ == '__main__': print('...
1,637
Python
.py
27
55.296296
367
0.701511
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,330
config_predicting.py
tangguoling_ADPT/code/config/config_predicting.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 2 21:45:08 2024 @author: tang """ import glob def configuration_predict(result_predict): videos = glob.glob(result_predict['Video_path']+ '/*.' + result_predict['Video_type']) save_video = result_predict['save_predicted_video'] # shuffle_num = 1...
534
Python
.py
14
33.857143
91
0.679612
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,331
config_training.py
tangguoling_ADPT/code/config/config_training.py
# -*- coding: utf-8 -*- """ Created on Mon Jan 8 16:21:36 2024 @author: tang """ import glob from matplotlib import pyplot as plt import yaml def configuration(result): IMG_DIR = result['IMG_DIR'] JSON = result['JSON'] IMG_SIZE_H_ori, IMG_SIZE_W_ori = result['IMG_SIZE_H_ori'],result['IMG_SIZ...
1,660
Python
.py
33
44.424242
304
0.676286
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,332
predict.cp39-win_amd64.pyd
tangguoling_ADPT/code/core/predict.cp39-win_amd64.pyd
MZ�ÿÿ¸@º´ Í!¸LÍ!This program cannot be run in DOS mode. $ÖIÊ4’(¤g’(¤g’(¤g›P7g�(¤g”©¥f�(¤gÙP¥f�(¤g”©¡fŸ(¤g”© fš(¤g”©§f–(¤g1A¥f‘(¤g’(¥g!(¤gÿ©¬f“(¤gÿ©¤f“(¤gÿ©[g“(¤gÿ©¦f“(¤gRich’(¤gPEd†R”ªeğ" &üp\ÿ€...
154,624
Python
.py
326
473.251534
5,589
0.421503
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,333
train.cp39-win_amd64.pyd
tangguoling_ADPT/code/core/train.cp39-win_amd64.pyd
MZ�ÿÿ¸@º´ Í!¸LÍ!This program cannot be run in DOS mode. $ÎIÈ4Š(¦gŠ(¦gŠ(¦gƒP5gˆ(¦gŒ©§fˆ(¦gÁP§fˆ(¦gŒ©£f‡(¦gŒ©¢f‚(¦gŒ©¥f�(¦g)A§f‰(¦gŠ(§gK(¦gç©®f‹(¦g穦f‹(¦gç©Yg‹(¦g穤f‹(¦gRichŠ(¦gPEd†E”ªeğ" &�šl‘€...
265,216
Python
.py
528
501.255682
8,110
0.422905
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,334
data_aug.py
tangguoling_ADPT/code/core/data_aug.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 9 03:29:02 2024 @author: tang """ import imgaug.augmenters as iaa def data_augmentation(): aug = iaa.Sequential( [ iaa.Sometimes(0.5, iaa.Affine(rotate=(-25, 25))), iaa.Sometimes(0.33, iaa.Affine(translate_percent={...
1,934
Python
.py
34
43.558824
105
0.53611
tangguoling/ADPT
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,335
setup.py
aashishsec_httpAlive/setup.py
from setuptools import setup, find_packages setup( name='httpAlive', version='1.0.2', description='HttpAlive is a web probing tool designed for discovering alive subdomains and URLs.', author='Bande Aashish', url='https://github.com/aashishsec/httpAlive', packages=find_packages(), install_r...
571
Python
.py
22
20
102
0.613139
aashishsec/httpAlive
8
1
2
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,336
httpAlive.py
aashishsec_httpAlive/httpAlive/httpAlive.py
#!/usr/bin/python3 import requests import colorama import random import argparse import concurrent.futures import httpx from datetime import datetime from colorama import Fore, Style colorama.init(autoreset=True) green = Fore.GREEN magenta = Fore.MAGENTA cyan = Fore.CYAN mixed = Fore.RED + Fore.BLUE red =...
8,745
Python
.py
143
49.202797
228
0.618388
aashishsec/httpAlive
8
1
2
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,337
applepy.iml
Cypheriel_applepy/.idea/applepy.iml
<?xml version="1.0" encoding="UTF-8"?> <module type="PYTHON_MODULE" version="4"> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$" /> <orderEntry type="jdk" jdkName="Poetry (applepy)" jdkType="Python SDK" /> <orderEntry type="sourceFolder" forTests="false" /> </component> </modu...
323
Python
.py
8
37.5
77
0.686709
Cypheriel/applepy
8
1
0
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,338
10_Contour_Map.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/10_Contour_Map.py
#!/usr/bin/env python # coding: utf-8 # ## 0 Loading # ### 0.0 Import Libs # In[2]: import pythreejs, ipywidgets import cupy as cp import numpy as np import pandas as pd import matplotlib.pyplot as plt import scipy.signal import sklearn.neighbors from sklearn.neighbors import KDTree from scipy.sp...
6,377
Python
.py
158
35.088608
128
0.655749
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,339
plot_contour_map_with_Prot_top.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/plot_contour_map_with_Prot_top.py
import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Rectangle # Define the path to your data files file1 = 'smoothed_x_points.cor' file2 = 'scaled_prot.cor' # Define the X range (minimum and maximum X values) x_min_map = 20 # Change this to your desired minimum X x_min_prot = 50 # Chan...
3,045
Python
.py
63
46.968254
116
0.733738
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,340
21_Replace_PO4_to_Lipids.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/21_Replace_PO4_to_Lipids.py
#!/usr/bin/env python # coding: utf-8 # In[723]: import os import numpy as np def load_coords(path): data_list = [] with open(path, 'r') as f: lines = f.readlines() matrix = [] for line in lines: x, y, z = map(float, line.strip().split(",")) ma...
5,186
Python
.py
123
33.495935
224
0.576743
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,341
find_surf.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/find_surf.py
def read_points_from_file(filename): points = [] with open(filename, 'r') as file: for line in file: parts = line.strip().split() if len(parts) == 3: x, y, z = map(float, parts) points.append((x, y, z)) return points def filter_largest_x(point...
1,337
Python
.py
30
35.966667
92
0.617089
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,342
smooth_x_value.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/smooth_x_value.py
import numpy as np # Define the valid range for y and z coordinates y_min, y_max = 0, 600 z_min, z_max = 0, 600 # Read points from the file points = [] try: with open('edge_removed.cor', 'r') as file: for line in file: x, y, z = map(float, line.strip().split()) # Check if y and z c...
2,345
Python
.py
57
35.157895
105
0.605888
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,343
remove_edge.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/remove_edge.py
import numpy as np import matplotlib.pyplot as plt from scipy.spatial import ConvexHull # Step 1: Read 3D points from a file (replace 'your_points_file.txt' with your file path) points_3d = np.loadtxt('surface.cor') # Define the number of iterations (N) N = 95 # Change this to the desired number of iterations for i...
2,161
Python
.py
41
49.512195
97
0.732636
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,344
mmbr.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/mmbr.py
#!/usr/bin/env python # coding: utf-8 # In[1]: !pip install matplotlib plotly mayavi # In[11]: # Import necessary libraries import numpy as np import pandas as pd from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression from sklearn.pipeline import m...
4,959
Python
.py
119
36.403361
169
0.65864
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,345
scale_up_points_map_pixel_size.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/scale_up_points_map_pixel_size.py
scale = 1.17 import numpy as np points_file_path = 'prot.cor' with open(points_file_path, 'r') as points_file: points_lines = points_file.readlines() scaled_up_coor = [] for line in points_lines: xyz = list(line.strip().split()) scaled_xyz = [(float(i) * scale) for i in xyz ] scaled_up_coor.append(sc...
579
Python
.py
17
31.176471
64
0.682796
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,346
mmbr_homogenized_cpu.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/mmbr_homogenized_cpu.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt import sklearn.neighbors from sklearn.neighbors import KDTree from mpl_toolkits.mplot3d import Axes3D from ipywidgets import interactive from scipy.spatial import distance_matrix def parse_pdb(pdb_file): """ Parse a PDB file and return a di...
7,841
Python
.py
164
39.268293
185
0.638786
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,347
20_Prepare_For_Replace_P2lipids.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/20_Prepare_For_Replace_P2lipids.py
#!/usr/bin/env python # coding: utf-8 # ## Load un-curved mmbr # In[17]: import os import numpy as np p_coordinates = [] with open("/home/boyuan/Desktop/mmbr_fit/input/double_mmbr_square.pdb", "r") as file: contents = file.readlines() p_lines = [line for line in contents if line[0:6]=="HE...
2,572
Python
.py
70
32.771429
110
0.673394
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,348
generate_points_insideProt_Map.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/generate_points_insideProt_Map.py
import mrcfile import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Define the MRC file path and the subsampling factor mrc_file_path = 'protein_ongrid.mrc' subsample_factor = 4 # Adjust as needed # Read the MRC file with mrcfile.open(mrc_file_path, mode='r') as mrc: densi...
1,902
Python
.py
53
32.754717
111
0.683696
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,349
generate_points_insideMembrane.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/generate_points_insideMembrane.py
import mrcfile import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Define the MRC file path and the subsampling factor mrc_file_path = 'typeO_membrane.mrc' subsample_factor = 2 # Adjust as needed # Read the MRC file with mrcfile.open(mrc_file_path, mode='r') as mrc: densi...
1,901
Python
.py
53
32.735849
111
0.683524
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,350
00_Rotation_Memebrane.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/00_Rotation_Memebrane.py
#!/usr/bin/env python # coding: utf-8 # ## Import Libs # In[ ]: import pythreejs, ipywidgets import numpy as np import pandas as pd import matplotlib.pyplot as plt import scipy.signal import sklearn.neighbors from sklearn.neighbors import KDTree from scipy.spatial.distance import cdist from scipy....
6,538
Python
.py
168
33.75
121
0.665267
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,351
30_Analytical_Equations.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/30_Analytical_Equations.py
#!/usr/bin/env python # coding: utf-8 # # try to find analytical equations # In[ ]: import numpy as np from sklearn.linear_model import ElasticNet, BayesianRidge from sklearn.preprocessing import PolynomialFeatures from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScal...
2,021
Python
.py
59
29.525424
94
0.677778
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,352
01_optional_pdb_clean_up.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/01_optional_pdb_clean_up.py
#!/usr/bin/env python # coding: utf-8 # # Lipids Clean-Up # This script can be used after discarding lipids occupied protein's position. # To discard lipids, use select zone command in Chimearx and set the discarding range as u like. # In[117]: # Load original coords import pandas as pd def parse_pd...
5,243
Python
.py
122
33.311475
150
0.560135
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,353
sample_map_build_lipids_v1.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/sample_map_build_lipids_v1.py
import os import sys import mrcfile import numpy as np import matplotlib.pyplot as plt import pandas as pd import math import warnings import coot # import cupy as cp # uncomment it when you have GPU from scipy.interpolate import griddata from scipy.ndimage import gaussian_filter from scipy.spatial.distance import cdis...
30,778
Python
.py
671
37.479881
158
0.608499
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,354
mmbr_homogenized_gpu.py
JackZhang-Lab_Cryo-MEM/Mem_modeling/mmbr_homogenized_gpu.py
import cupy as cp import pandas as pd import matplotlib.pyplot as plt import sklearn.neighbors from sklearn.neighbors import KDTree from mpl_toolkits.mplot3d import Axes3D from ipywidgets import interactive from scipy.spatial import distance_matrix def parse_pdb(pdb_file): with open(pdb_file, 'r') as f: li...
7,191
Python
.py
128
46.429688
188
0.631616
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,355
setup.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/setup.py
from setuptools import setup, find_packages setup( name='MemXTerminator', version='1.0.0', packages=find_packages(where='src'), package_dir={'': 'src'}, author='Zhen Huang', author_email='zhen.victor.huang@gmail.com', description='A software for membrane analysis and subtraction in cryo-EM'...
1,248
Python
.py
40
24.575
78
0.583264
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,356
__init__.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/__init__.py
__author__ = 'Zhen Huang' __email__ = 'zhen.victor.huang@gmail.com' __version__ = '1.0.0'
90
Python
.py
3
29
41
0.609195
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,357
membrane_analysis-main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/bin/membrane_analysis-main.py
import numpy as np import cupy as cp from ..lib._utils import * from ..lib.radonanalyser import * from ..lib.template_centerfitting import * from ..lib.calculate_curve import * from ..lib.generate_membrane_mask import * from ..lib.mem_average import * # from mem_subtract_old import * from cupyx.scipy.ndimage import zoo...
8,024
Python
.py
119
64.361345
364
0.740975
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,358
micrograph_mem_subtraction.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/bin/micrograph_mem_subtraction.py
import numpy as np import cupy as cp import mrcfile import starfile import matplotlib.pyplot as plt import os import argparse import multiprocessing from multiprocessing import Pool import time if __name__ == '__main__': class MicrographMembraneSubtract: def __init__(self, particles_selected_filename): ...
13,306
Python
.py
184
60.538043
197
0.627075
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,359
membrane_subtract-main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/bin/membrane_subtract-main.py
import numpy as np import cupy as cp import starfile from ..lib._utils import * from ..lib.mem_subtract import * import argparse import os from multiprocessing import Pool import multiprocessing import time if __name__ == '__main__': class MembraneSubtract: def __init__(self, particles_selected_filename, ...
12,153
Python
.py
170
59.323529
274
0.638975
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,360
calculate_curve.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/calculate_curve.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * from .template_centerfitting import * from .radonanalyser import * from .circle_mask_generator import * from cupyx.scipy.ndimage import zoom from cupyx.scipy.signal import correlate2d class Curve: def __init__(self, output_f...
7,054
Python
.py
149
38.436242
132
0.605534
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,361
circle_mask_generator.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/circle_mask_generator.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * class circle_mask: def __init__(self, image_array, x0, y0, radius, sigma): self.image = image_array self.image_size = self.image.shape[0] self.x0 = x0 self.y0 = y0 self.radius = radius...
2,266
Python
.py
50
39.06
118
0.603705
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,362
mem_subtract.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/mem_subtract.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from cupyx.scipy.ndimage import rotate, shift, zoom from cupyx.scipy.signal import correlate2d, convolve from ._utils import * from .mem_average import * from .circle_mask_generator import * import time class Get2Raw: def __init__(self, mem_anal...
12,210
Python
.py
213
48.41784
246
0.611666
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,363
get_particles_info.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/get_particles_info.py
import pandas as pd import numpy as np import cupy as cp import starfile import mrcfile from ._utils import * from cupyx.scipy.ndimage import zoom # from mem_subtract_old import * df_membrane_analysis_star = starfile.read('mem_analysis.star') average_raw_series = df_membrane_analysis_star['rln2DAverageimageName'].appl...
3,032
Python
.py
58
50.793103
247
0.685185
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,364
generate_gaussian_template.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/generate_gaussian_template.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from scipy.stats import norm from ._utils import * def gaussian_pdf(x, mean, std): coefficient = 1.0 / (std * cp.sqrt(2 * cp.pi)) exponential = cp.exp(- (x - mean) ** 2 / (2 * std ** 2)) return coefficient * exponential def gaussian2(x, ...
2,563
Python
.py
74
26.635135
79
0.537253
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,365
radonanalyser.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/radonanalyser.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from skimage.transform import radon from cupyx.scipy.ndimage import maximum_filter # from cupyx.scipy.signal import convolve from ._utils import * from .circle_mask_generator import * class RadonAnalyzer: def __init__(self, output_filename, i, im...
6,764
Python
.py
134
41.186567
129
0.582687
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,366
lpfilter.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/lpfilter.py
import numpy as np import matplotlib.pyplot as plt from ._utils import * def create_gaussian_low_pass_filter(image, cutoff_frequency): shape = image.shape rows, cols = shape crow, ccol = rows // 2, cols // 2 y, x = np.ogrid[-crow:rows-crow, -ccol:cols-ccol] distance = np.sqrt(x*x + y*y) mask = ...
1,552
Python
.py
38
35.973684
135
0.699789
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,367
mem_average.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/mem_average.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * from .template_centerfitting import * from .radonanalyser import * from .calculate_curve import * from .generate_membrane_mask import * from scipy.interpolate import interp1d from cupyx.scipy.ndimage import zoom class average_me...
6,570
Python
.py
106
53.537736
147
0.666201
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,368
generate_membrane_mask.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/generate_membrane_mask.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * from .template_centerfitting import * from .radonanalyser import * from .calculate_curve import * from cupyx.scipy.ndimage import zoom class mem_mask: def __init__(self,output_filename, i, image, edge_sigma): # fit_c...
4,135
Python
.py
82
43.792683
134
0.630462
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,369
_utils.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/_utils.py
import mrcfile import starfile import numpy as np import cupy as cp import pandas as pd import matplotlib.pyplot as plt from cupyx.scipy.ndimage import convolve def readmrc(filename, section=0, mode='cpu'): image = mrcfile.open(filename) if len(image.data.shape) == 2: gray_image = image.data.copy() ...
3,723
Python
.py
83
41.108434
209
0.662621
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,370
template_centerfitting.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/radonfit/lib/template_centerfitting.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from cupyx.scipy.signal import correlate2d from .generate_gaussian_template import * from ._utils import * from .radonanalyser import * from cupyx.scipy.ndimage import zoom class Template_centerfitting: def __init__(self, output_filename, i, sigm...
7,665
Python
.py
145
44.524138
146
0.643657
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,371
micrograph_mem_subtract_main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/bin/micrograph_mem_subtract_main.py
import numpy as np import cupy as cp import mrcfile import starfile import matplotlib.pyplot as plt import os import argparse import multiprocessing from multiprocessing import Pool import time if __name__ == '__main__': class MicrographMembraneSubtract: def __init__(self, particles_selected_filename): ...
9,136
Python
.py
139
52.705036
195
0.625642
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,372
mem_subtract_main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/bin/mem_subtract_main.py
from cryosparc.dataset import Dataset import numpy as np import cupy as cp from cupyx.scipy.ndimage import zoom import glob import json import os import mrcfile import time import multiprocessing import argparse parser = argparse.ArgumentParser() parser.add_argument('--particle', type=str, default='./particles_select...
4,967
Python
.py
97
46.793814
171
0.734656
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,373
mem_analyze_main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/bin/mem_analyze_main.py
from cryosparc.dataset import Dataset import numpy as np import cupy as cp from cupyx.scipy.ndimage import zoom import mrcfile from ..lib.bezierfit import Coarsefit, GA_Refine import json import argparse import multiprocessing if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-...
3,220
Python
.py
54
53.481481
177
0.70981
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,374
pickpoints.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/lib/pickpoints.py
import numpy as np import cupy as cp import mrcfile from cupyx.scipy.ndimage import maximum_filter as maximum_filter_gpu def max_filter(image): image = cp.array(image) max_filtered_image = maximum_filter_gpu(image, size=9, mode='constant') threshold = cp.sum(max_filtered_image) / cp.sum(max_filtered_image ...
1,293
Python
.py
29
38.034483
113
0.669348
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,375
bezierfit.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/lib/bezierfit.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from deap import base, creator, tools, algorithms from scipy.interpolate import griddata from scipy.interpolate import interp1d from scipy.special import comb import mrcfile from .pickpoints import generate_data_points from cupyx.scipy.signal import c...
16,424
Python
.py
315
45.155556
193
0.641265
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,376
visualize_fitting_result.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/lib/visualize_fitting_result.py
import numpy as np import matplotlib.pyplot as plt import json import mrcfile from cryosparc.dataset import Dataset from .bezierfit import generate_curve_within_boundaries from scipy.ndimage import zoom def getzoomfactor(template_csfile, particle_csfile): template_dset = Dataset.load(template_csfile) particle_...
2,634
Python
.py
49
48.510204
145
0.72685
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,377
subtraction.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/bezierfit/lib/subtraction.py
import numpy as np import cupy as cp import cupyx.scipy.ndimage import matplotlib.pyplot as plt from scipy.interpolate import griddata import mrcfile from cupyx.scipy.signal import convolve2d from .bezierfit import points_along_normal, generate_curve_within_boundaries, cupy_cdist import time def bilinear_interpolatio...
17,292
Python
.py
319
46.373041
189
0.610245
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,378
radonfit_cli.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/cli/radonfit_cli.py
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QApplication, QDialog from memxterminator.GUI.radon_gui import Ui_Form from memxterminator.GUI.radonfit_membrane_analyzer_gui import Ui_MembraneAnalyzer from memxterminator.GUI.radonfit_membrane_subtraction_gui...
20,326
Python
.py
375
42.293333
194
0.623715
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,379
main_cli.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/cli/main_cli.py
import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QApplication, QDialog from memxterminator.GUI.mainwindow_gui import Ui_MainWindow from .radonfit_cli import RadonApp, MembraneAnalyzerApp, MembraneSubtractionApp, MicrographMembraneSubtraction_Radon_...
4,283
Python
.py
59
64.79661
277
0.754928
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,380
bezierfit_cli.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/cli/bezierfit_cli.py
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QApplication, QDialog from memxterminator.GUI.MembraneAnalyzer_Bezierfit import Ui_MembraneAnalyzer_Bezierfit from memxterminator.GUI.particle_membrane_subtraction_bezierfit import Ui_ParticleMembraneSubtractio...
13,981
Python
.py
266
41.101504
172
0.62893
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,381
MicrographMembraneSubtraction_Bezierfit.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/MicrographMembraneSubtraction_Bezierfit.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MicrographMembraneSubtraction_Bezierfit.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. ...
6,125
Python
.py
82
66.585366
181
0.760106
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,382
particle_membrane_subtraction_bezierfit.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/particle_membrane_subtraction_bezierfit.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'particle_membrane_subtraction_bezierfit.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. ...
8,215
Python
.py
109
67.036697
176
0.756884
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,383
MicrographMembraneSubtraction_Radonfit.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/MicrographMembraneSubtraction_Radonfit.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MicrographMembraneSubtraction_Radonfit.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. ...
6,256
Python
.py
82
68.182927
178
0.770391
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,384
mainwindow_gui.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/mainwindow_gui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Q...
6,192
Python
.py
92
59.097826
132
0.752667
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,385
MembraneAnalyzer_Bezierfit.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/MembraneAnalyzer_Bezierfit.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MembraneAnalyzer_Bezierfit.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 ...
13,715
Python
.py
182
66.758242
141
0.741831
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,386
radon_gui.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/radon_gui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'radon_gui.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
7,845
Python
.py
125
54.344
118
0.733696
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,387
radonfit_membrane_subtraction_gui.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/radonfit_membrane_subtraction_gui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'membrane_subtraction_gui.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 im...
10,304
Python
.py
145
62.565517
139
0.73355
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,388
radonfit_membrane_analyzer_gui.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/build/lib/memxterminator/GUI/radonfit_membrane_analyzer_gui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'membrane_analyzer.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import Qt...
42,007
Python
.py
662
58.734139
109
0.69504
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,389
test_bezier_mem_analyze.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/test/test_bezier_mem_analyze.py
from memxterminator.bezierfit.bin import mem_analyze_main from cryosparc.dataset import Dataset import numpy as np particle_csfile = '/data2/J729/particles_selected.cs' passthrough_csfile = '/data3/Zhen/VSV/membrane_subtraction/VSV/J419/J419_passthrough_particles_selected.cs' particle_dset = Dataset.load(particle_cs...
1,028
Python
.py
20
50.2
135
0.790837
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,390
__init__.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/__init__.py
__author__ = 'Zhen Huang' __email__ = 'zhen.victor.huang@gmail.com' __version__ = '1.0.0'
90
Python
.py
3
29
41
0.609195
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,391
membrane_analysis-main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/bin/membrane_analysis-main.py
import numpy as np import cupy as cp from ..lib._utils import * from ..lib.radonanalyser import * from ..lib.template_centerfitting import * from ..lib.calculate_curve import * from ..lib.generate_membrane_mask import * from ..lib.mem_average import * # from mem_subtract_old import * from cupyx.scipy.ndimage import zoo...
8,024
Python
.py
119
64.361345
364
0.740975
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,392
micrograph_mem_subtraction.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/bin/micrograph_mem_subtraction.py
import numpy as np import cupy as cp import mrcfile import starfile import matplotlib.pyplot as plt import os import argparse import multiprocessing from multiprocessing import Pool import time if __name__ == '__main__': class MicrographMembraneSubtract: def __init__(self, particles_selected_filename): ...
13,306
Python
.py
184
60.538043
197
0.627075
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,393
membrane_subtract-main.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/bin/membrane_subtract-main.py
import numpy as np import cupy as cp import starfile from ..lib._utils import * from ..lib.mem_subtract import * import argparse import os from multiprocessing import Pool import multiprocessing import time if __name__ == '__main__': class MembraneSubtract: def __init__(self, particles_selected_filename, ...
12,153
Python
.py
170
59.323529
274
0.638975
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,394
calculate_curve.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/calculate_curve.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * from .template_centerfitting import * from .radonanalyser import * from .circle_mask_generator import * from cupyx.scipy.ndimage import zoom from cupyx.scipy.signal import correlate2d class Curve: def __init__(self, output_f...
7,054
Python
.py
149
38.436242
132
0.605534
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,395
circle_mask_generator.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/circle_mask_generator.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from ._utils import * class circle_mask: def __init__(self, image_array, x0, y0, radius, sigma): self.image = image_array self.image_size = self.image.shape[0] self.x0 = x0 self.y0 = y0 self.radius = radius...
2,266
Python
.py
50
39.06
118
0.603705
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,396
mem_subtract.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/mem_subtract.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from cupyx.scipy.ndimage import rotate, shift, zoom from cupyx.scipy.signal import correlate2d, convolve from ._utils import * from .mem_average import * from .circle_mask_generator import * import time class Get2Raw: def __init__(self, mem_anal...
12,210
Python
.py
213
48.41784
246
0.611666
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,397
get_particles_info.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/get_particles_info.py
import pandas as pd import numpy as np import cupy as cp import starfile import mrcfile from ._utils import * from cupyx.scipy.ndimage import zoom # from mem_subtract_old import * df_membrane_analysis_star = starfile.read('mem_analysis.star') average_raw_series = df_membrane_analysis_star['rln2DAverageimageName'].appl...
3,032
Python
.py
58
50.793103
247
0.685185
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,398
generate_gaussian_template.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/generate_gaussian_template.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from scipy.stats import norm from ._utils import * def gaussian_pdf(x, mean, std): coefficient = 1.0 / (std * cp.sqrt(2 * cp.pi)) exponential = cp.exp(- (x - mean) ** 2 / (2 * std ** 2)) return coefficient * exponential def gaussian2(x, ...
2,563
Python
.py
74
26.635135
79
0.537253
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)
2,285,399
radonanalyser.py
JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/memxterminator/radonfit/lib/radonanalyser.py
import numpy as np import cupy as cp import matplotlib.pyplot as plt from skimage.transform import radon from cupyx.scipy.ndimage import maximum_filter # from cupyx.scipy.signal import convolve from ._utils import * from .circle_mask_generator import * class RadonAnalyzer: def __init__(self, output_filename, i, im...
6,764
Python
.py
134
41.186567
129
0.582687
JackZhang-Lab/Cryo-MEM
8
0
1
GPL-3.0
9/5/2024, 10:47:52 PM (Europe/Amsterdam)