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,400 | lpfilter.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,401 | mem_average.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,402 | generate_membrane_mask.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,403 | _utils.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,404 | template_centerfitting.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,405 | micrograph_mem_subtract_main.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,406 | mem_subtract_main.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,407 | mem_analyze_main.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,408 | pickpoints.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,409 | bezierfit.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,410 | visualize_fitting_result.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,411 | subtraction.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,412 | radonfit_cli.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,413 | main_cli.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,414 | bezierfit_cli.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,415 | MicrographMembraneSubtraction_Bezierfit.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,416 | particle_membrane_subtraction_bezierfit.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,417 | MicrographMembraneSubtraction_Radonfit.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,418 | mainwindow_gui.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,419 | MembraneAnalyzer_Bezierfit.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,420 | radon_gui.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,421 | radonfit_membrane_subtraction_gui.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,422 | radonfit_membrane_analyzer_gui.py | JackZhang-Lab_Cryo-MEM/Mem_subtraction/src/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,423 | L1_norm_minimizaiton.ipynb | JackZhang-Lab_Cryo-MEM/Mem_subtraction/doc/L1_norm_minimizaiton.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Table of contents\n",
"\n",
"- [Introduction](#introduction)\n",
"- [Code](#code-section)\n",
" - [Import necessary modules](#import-necessary-modules)\n",
" - [Generate a simulated membrane](#generate-a-simulat... | 44,855 | Python | .py | 898 | 43.655902 | 10,530 | 0.630027 | JackZhang-Lab/Cryo-MEM | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,424 | BaseNode.py | KiraEzy_EzyAssistanceSS/BaseNode.py | # import * as fs from 'fs';
import numpy as np
class BaseNode:
def __init__(self, parentFlow, nodeName, parentNode, nextNode, actionFunction, isRootNode):
self.parentFlow = parentFlow
self.nodeName = nodeName
self.parentNode = parentNode
self.nextNode = nextNode
self.actio... | 1,672 | Python | .py | 41 | 32.219512 | 178 | 0.599013 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,425 | adb_profile.py | KiraEzy_EzyAssistanceSS/adb_profile.py | import subprocess
import os
class Adb_profile:
def __init__(self, file_path, device_ip):
self.adb_path = file_path
self.device_ip = device_ip
def adb_connect(self):
command = [self.adb_path, "connect", self.device_ip]
print(" ".join(command))
p = subprocess.Popen(command... | 3,400 | Python | .py | 69 | 40.913043 | 106 | 0.620211 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,426 | OctoUtil.py | KiraEzy_EzyAssistanceSS/OctoUtil.py | import math
import os
import re
import time
import cv2
import numpy as np
import yaml
from PIL import Image
import ADBClass
import OCRClass
class OctoUtil:
@staticmethod
def detectImgOCR(m_ocr, img_path):
# img_path = os.path.join('.', 'img', 'screenshot.png')
result = m_ocr.ocr(img_path, cl... | 12,584 | Python | .py | 270 | 34.574074 | 178 | 0.563209 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,427 | test_BaseFlow.py | KiraEzy_EzyAssistanceSS/test_BaseFlow.py | import unittest
from BaseFlow import BaseFlow
from BaseNode import BaseNode
from DeciderNode import DeciderNode
class TestBaseFlow(unittest.TestCase):
def test_execute_flow(self):
# Create a flow with a BaseNode and a DeciderNode
def multiply_by_two(inputObj):
return {"number": inputOb... | 1,747 | Python | .py | 34 | 43.529412 | 177 | 0.651639 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,428 | BaseFlow.py | KiraEzy_EzyAssistanceSS/BaseFlow.py | from BaseNode import BaseNode
from DeciderNode import DeciderNode
class BaseFlow:
def __init__(self, node: BaseNode):
self.rootNode = node
self.FlowHistory = []
self.NodeList = []
self.currentNode = self.rootNode
self.skipTargetNode = None
self.isSkipping = False
... | 3,523 | Python | .py | 73 | 32.027397 | 147 | 0.537456 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,429 | test_BaseNode.py | KiraEzy_EzyAssistanceSS/test_BaseNode.py | import unittest
from BaseNode import BaseNode
class TestBaseNode(unittest.TestCase):
def test_new_node(self):
# Create a new instance of BaseNode with desired parameters
node = BaseNode("NewNode", None, None, lambda x: x * 2, 5, False)
# Invoke the executeAction method
result = no... | 470 | Python | .py | 12 | 33.083333 | 73 | 0.675497 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,430 | DeciderNode.py | KiraEzy_EzyAssistanceSS/DeciderNode.py | import BaseNode
class DeciderNode(BaseNode.BaseNode):
def __init__(self, nodeName, parentNode, nextNode, actionFunction, isRootNode, returnMapper):
super().__init__(nodeName, parentNode, nextNode, actionFunction, isRootNode)
self.returnMapper = returnMapper;
# Add any additional propertie... | 564 | Python | .py | 10 | 49.8 | 97 | 0.741818 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,431 | ADBClass.py | KiraEzy_EzyAssistanceSS/ADBClass.py | import os
import cv2
import subprocess
from EASLogger import EASloggerSingleton
class AdbSingleton:
instance = None
APP_ACTIVITY = "com.xd.ssrpgtw/com.jixin.GameActivity"
APP_PACKAGE = "com.xd.ssrpgtw"
# APP_ACTIVITY = "com.boltrend.octopath.tc/com.epicgames.ue4.SplashActivity"
# APP_PACKAGE = "... | 6,262 | Python | .py | 130 | 38.461538 | 112 | 0.609416 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,432 | EASLogger.py | KiraEzy_EzyAssistanceSS/EASLogger.py | import logging
class EASloggerSingleton:
instance = None
def __init__(self):
self._logger = logging.getLogger(__name__)
@staticmethod
def getInstance():
if EASloggerSingleton.instance is None:
EASloggerSingleton.instance = EASloggerSingleton()
return EASloggerSingle... | 1,030 | Python | .py | 26 | 31.384615 | 95 | 0.64257 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,433 | main.py | KiraEzy_EzyAssistanceSS/main.py | import ast
import asyncio
import configparser
import copy
import glob
import io
import logging
import os
import random
import string
import sys
import threading
import time
from random import choices
from PIL import Image
from EASLogger import EASloggerSingleton
from workflow.ReceiveReward import receiveReward
from w... | 74,388 | Python | .py | 1,228 | 50.336319 | 549 | 0.649152 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,434 | OCRClass.py | KiraEzy_EzyAssistanceSS/OCRClass.py | import os
import cv2
import subprocess
import easyocr
class OCRSingleton:
instance = None
def __init__(self):
self._OCR = easyocr.Reader(['ch_tra', 'en'])
@staticmethod
def getInstance():
if OCRSingleton.instance is None:
OCRSingleton.instance = OCRSingleton()
ret... | 1,287 | Python | .py | 36 | 24.75 | 76 | 0.527755 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,435 | TestFlow.py | KiraEzy_EzyAssistanceSS/Flows/TestFlow.py | import copy
import sys
from BaseFlow import BaseFlow
from BaseNode import BaseNode
from DeciderNode import DeciderNode
from Nodes.ADBNodes import SetupADBNode, StartAppNode, ScreenShotNode, cvMatchScreenshotNode, ClickNode, \
tapUntilMatchFixedPos, DailyMaterialNode, LoginRewardNode
from Nodes.GeneralNodes import ... | 6,972 | Python | .py | 91 | 52.483516 | 180 | 0.563983 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,436 | ADBNodes.py | KiraEzy_EzyAssistanceSS/Nodes/ADBNodes.py | import math
import re
import time
import cv2
import yaml
from PIL import Image
import OCRClass
import OctoUtil
from BaseNode import BaseNode
from Nodes.RetryNode import RetryNode
import ADBClass
import numpy as np
from PIL import ImageChops
class SetupADBNode(BaseNode):
def node_setup_adb(self, input={}):
... | 36,862 | Python | .py | 687 | 39.705968 | 166 | 0.580894 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,437 | GeneralNodes.py | KiraEzy_EzyAssistanceSS/Nodes/GeneralNodes.py | import time
import cv2
from BaseNode import BaseNode
from Nodes.RetryNode import RetryNode
import ADBClass
import numpy as np
from OctoUtil import OctoUtil
class WaitSecondsNode(BaseNode):
def node_wait_seconds(self, input={}):
time.sleep(self.second)
return input
def __init__(self,parentFlo... | 3,533 | Python | .py | 70 | 40.242857 | 146 | 0.622068 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,438 | TestNode.py | KiraEzy_EzyAssistanceSS/Nodes/TestNode.py | from BaseNode import BaseNode
def print_test(input: str = "test"):
print(input)
node3 = BaseNode("Node3", None, None, print_test, False) | 141 | Python | .py | 4 | 33.25 | 56 | 0.729927 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,439 | RetryNode.py | KiraEzy_EzyAssistanceSS/Nodes/RetryNode.py | import time
import numpy as np
from BaseNode import BaseNode
class RetryNode(BaseNode):
def __init__(self, parentFlow , nodeName, parentNode, nextNode, actionFunction, isRootNode,verificationFunction ,targetValue, retryCount, retryInterval: float = 0.5):
self.targetValue = targetValue
self.retryCo... | 969 | Python | .py | 22 | 35.272727 | 170 | 0.666314 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,440 | WeekTower.py | KiraEzy_EzyAssistanceSS/workflow/WeekTower.py | import math
import re
import time
import cv2
import yaml
from PIL import Image
import OCRClass
import OctoUtil
import ADBClass
import numpy as np
from PIL import ImageChops
class SetupAdb:
def __init__(self, adb_path, adb_port, retry_count):
self.adb_path = adb_path
self.adb_port = adb_port
... | 3,994 | Python | .py | 95 | 31.2 | 108 | 0.601599 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,441 | ReceiveReward.py | KiraEzy_EzyAssistanceSS/workflow/ReceiveReward.py | import math
import re
import time
import cv2
import yaml
from PIL import Image
import OCRClass
import OctoUtil
import ADBClass
import numpy as np
from PIL import ImageChops
from EASLogger import EASloggerSingleton
class SetupAdb:
def __init__(self, adb_path, adb_port, retry_count):
self.adb_path = adb_... | 2,495 | Python | .py | 50 | 36.58 | 109 | 0.611779 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,442 | StartApp.py | KiraEzy_EzyAssistanceSS/workflow/StartApp.py | import logging
import time
import cv2
import numpy as np
import ADBClass
from EASLogger import EASloggerSingleton
from OctoUtil import OctoUtil
class StartApp:
def __init__(self, adb_path, adb_port):
self.adb_path = adb_path
self.adb_port = adb_port
def run(self):
res = ADBClass.Adb... | 9,794 | Python | .py | 205 | 33.609756 | 171 | 0.550424 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,443 | MainMaterial.py | KiraEzy_EzyAssistanceSS/workflow/MainMaterial.py | import math
import re
import time
import cv2
import yaml
from PIL import Image
import OCRClass
import OctoUtil
import ADBClass
import numpy as np
from PIL import ImageChops
from EASLogger import EASloggerSingleton
class mainMaterial:
def __init__(self, adb_path, adb_port):
self.adb_path = adb_path
... | 26,777 | Python | .py | 502 | 37.655378 | 125 | 0.554404 | KiraEzy/EzyAssistanceSS | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,444 | main.py | Blushyes_auto-key/main.py | from context.config import initialize_config
from interaction import InteractionLayer
from interaction.factory import get_interaction_layer_from_config
if __name__ == '__main__':
initialize_config()
interaction: InteractionLayer = get_interaction_layer_from_config()
interaction.start()
| 300 | Python | .py | 7 | 40 | 71 | 0.791096 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,445 | external.py | Blushyes_auto-key/script_loader/external.py | from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional
@dataclass
class ScriptInfo:
path: str | Path
name: Optional[str] = field(default='未命名脚本')
description: Optional[str] = field(default='无描述')
version: Optional[str] = field(default='0.0.1')
author: Optiona... | 378 | Python | .py | 10 | 32 | 53 | 0.738235 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,446 | interfaces.py | Blushyes_auto-key/script_loader/interfaces.py | from abc import ABC, abstractmethod
from pathlib import Path
from executor import ScriptStep
from script_loader import ScriptInfo
class ScriptLoader(ABC):
@abstractmethod
def loads(self, path: Path | str) -> list[ScriptStep]: ...
@abstractmethod
def save(self, script: list[ScriptStep], info: Script... | 339 | Python | .py | 9 | 34.333333 | 75 | 0.753846 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,447 | __init__.py | Blushyes_auto-key/script_loader/__init__.py | import json
import os
from os.path import exists
from pathlib import Path
from context.logging import logger
from script_loader.external import ScriptInfo
SCRIPT_DIR: Path = Path('scripts')
METADATA_NAME = 'meta.json'
METADATA_EXAMPLE_PATH = SCRIPT_DIR / 'meta.example.json'
if exists(METADATA_EXAMPLE_PATH):
with... | 1,944 | Python | .py | 46 | 31.108696 | 76 | 0.643149 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,448 | __init__.py | Blushyes_auto-key/script_loader/excel/__init__.py | import csv
import json
import os
from dataclasses import dataclass
from pathlib import Path
import pandas as pd
from pandas import DataFrame, Series, isna
from executor import ScriptStep
from executor.external import (
CommandType,
ClickArgWithOffset,
CoordTransformWithDurationArg,
SeparableArg,
)
fro... | 5,814 | Python | .py | 156 | 24.692308 | 87 | 0.569625 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,449 | record_test.py | Blushyes_auto-key/test/record_test.py | from time import sleep
from executor import execute
from recorder.interfaces import Recorder
from recorder.simple import SimpleRecorder
recorder: Recorder = SimpleRecorder()
recorder.start()
# 录制三秒钟的脚本
sleep(3)
script = recorder.record()
for it in script:
print(it)
print(len(script))
execute(..., script)
| 333 | Python | .py | 13 | 22.538462 | 42 | 0.814815 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,450 | config.py | Blushyes_auto-key/context/config.py | import json
config: dict | None = None
class Config:
INTERACTION = 'interaction'
def initialize_config() -> None:
"""
初始化配置,不需要懒加载的时候,在程序运行前使用
"""
global config
if config is None:
with open('config.json', 'r', encoding='utf-8') as f:
config = json.load(f)
def get_confi... | 505 | Python | .py | 19 | 17.842105 | 61 | 0.613139 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,451 | logging.py | Blushyes_auto-key/context/logging.py | import logging
logging.basicConfig(format='%(asctime)s %(name)s %(levelname)s: %(message)s', level=logging.DEBUG)
logger = logging.getLogger('GLOBAL')
logger.setLevel(logging.INFO)
| 182 | Python | .py | 4 | 44.25 | 98 | 0.779661 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,452 | utils.py | Blushyes_auto-key/context/utils.py | def singleton(cls):
"""
将一个类变为单例
"""
instances = {}
def get_instance(*args, **kwargs):
if cls not in instances:
instances[cls] = cls(*args, **kwargs)
return instances[cls]
return get_instance
| 262 | Python | .py | 10 | 18.2 | 49 | 0.576923 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,453 | factory.py | Blushyes_auto-key/interaction/factory.py | from context.config import get_config, Config
from interaction import InteractionLayer
from interaction.command_line import CommandLineInteractionLayer
from interaction.gui import QTGUIInteractionLayer
class InteractionLayerType:
COMMAND_LINE = 'command_line'
GUI = 'gui'
def get_interaction_layer(interactio... | 864 | Python | .py | 19 | 39.736842 | 84 | 0.76758 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,454 | __init__.py | Blushyes_auto-key/interaction/__init__.py | from abc import ABC, abstractmethod
class InteractionLayer(ABC):
@abstractmethod
def start(self) -> None: ...
| 120 | Python | .py | 4 | 26.5 | 35 | 0.736842 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,455 | __init__.py | Blushyes_auto-key/interaction/command_line/__init__.py | from pathlib import Path
import keyboard
from executor import ScriptStep, execute
from interaction import InteractionLayer
from recorder.simple import SimpleRecorder
from script_loader import pick_scripts, ScriptInfo, script_exist, SCRIPT_DIR
from script_loader.excel import ExcelLoader
from script_loader.interfaces i... | 4,019 | Python | .py | 109 | 21.761468 | 83 | 0.477509 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,456 | Ui_auto_key.py | Blushyes_auto-key/interaction/gui/Ui_auto_key.py | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'auto_key.ui'
##
## Created by: Qt User Interface Compiler version 6.6.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
##################... | 9,318 | Python | .py | 156 | 49.525641 | 180 | 0.683523 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,457 | shortcut_handler.py | Blushyes_auto-key/interaction/gui/shortcut_handler.py | import keyboard
from executor.external import Cosmic
def run_script_handler(e: keyboard.KeyboardEvent) -> None:
Cosmic.do_run_script = True
def pause_script_handler(e: keyboard.KeyboardEvent) -> None:
Cosmic.do_pause_script = True
def bond_shortcut() -> None:
keyboard.hook_key(Cosmic.run_script_short... | 465 | Python | .py | 11 | 38.090909 | 85 | 0.758389 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,458 | __init__.py | Blushyes_auto-key/interaction/gui/__init__.py | import os
import sys
from pathlib import Path
from PySide6.QtCore import QThread, Signal, QObject, QTimer
from PySide6.QtWidgets import QApplication, QWidget
from markdown2 import markdown
from executor import execute, ScriptStep
from executor.external import Cosmic
from interaction import InteractionLayer
from inter... | 9,274 | Python | .py | 218 | 29.188073 | 88 | 0.632395 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,459 | interfaces.py | Blushyes_auto-key/recorder/interfaces.py | from abc import ABC, abstractmethod
from executor import ScriptStep
class Recorder(ABC):
"""
脚本录制器,录制脚本并转换为Script
"""
@abstractmethod
def start(self): ...
@abstractmethod
def stop(self): ...
@abstractmethod
def record(self) -> list[ScriptStep]: ...
| 319 | Python | .py | 12 | 19.75 | 45 | 0.677656 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,460 | __init__.py | Blushyes_auto-key/recorder/simple/__init__.py | import json
from time import time
from pynput import mouse, keyboard
from pynput.mouse import Button
from executor import ScriptStep
from executor.external import CommandType, CoordTransformWithDurationArg
from executor.interfaces import CommandExecutorFactory
from executor.simple import SimpleCommandExecutorFactory
... | 3,238 | Python | .py | 81 | 29.592593 | 87 | 0.619902 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,461 | external.py | Blushyes_auto-key/executor/external.py | from dataclasses import dataclass
from enum import Enum
class CommandType(Enum):
MOVE = 'move'
SINGLE_CLICK = 'click'
DOUBLE_CLICK = 'db_click'
RIGHT_CLICK = 'r_click'
INPUT = 'input'
WAIT = 'wait'
PAUSE = "pause"
SCROLL = 'scroll'
HOTKEY = 'key'
DRAG = 'drag'
CMD = 'cmd'
... | 1,977 | Python | .py | 63 | 24.126984 | 78 | 0.674432 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,462 | interfaces.py | Blushyes_auto-key/executor/interfaces.py | from abc import abstractmethod, ABC
from typing import Any
from executor.external import CommandType
from script_loader import ScriptInfo
class CommandExecutor(ABC):
@abstractmethod
def execute(self, context: ScriptInfo, arg: Any) -> None: ...
class CommandExecutorFactory(ABC):
@abstractmethod
def ... | 473 | Python | .py | 12 | 35.916667 | 71 | 0.771429 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,463 | __init__.py | Blushyes_auto-key/executor/__init__.py | from dataclasses import dataclass
from typing import Optional, Any
from executor.external import Cosmic
from executor.interfaces import CommandExecutor
from script_loader.external import ScriptInfo
@dataclass
class ScriptStep:
executor: CommandExecutor
arg: Any
jump_to: Optional[int] = None
def execute... | 708 | Python | .py | 21 | 26.285714 | 59 | 0.692901 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,464 | __init__.py | Blushyes_auto-key/executor/simple/__init__.py | import platform
import random
import re
import subprocess
import time
from pathlib import Path
from typing import Callable, Any
import pyautogui
import pyperclip
from PIL import Image
from pynput import mouse
from pynput.mouse import Button
from context.utils import singleton
from executor.external import (
Comma... | 11,064 | Python | .py | 256 | 31.625 | 87 | 0.639923 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,465 | format_hotkey_string.py | Blushyes_auto-key/executor/simple/format_hotkey_string.py | import re
def format_hotkey_string(hotkey_str):
# 使用正则表达式来匹配键名,并将它们转换为小写
keys = re.findall(r"\w+", hotkey_str.lower())
# 将键名转换为pyautogui可以识别的格式
formatted_keys = tuple(keys)
return formatted_keys
if __name__ == "__main__":
# 示例使用
hotkey_str = "Win+R"
formatted_keys = format_hotkey_str... | 519 | Python | .py | 15 | 24.333333 | 53 | 0.68523 | Blushyes/auto-key | 8 | 1 | 0 | MPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,466 | DNS-Exfilnspector.py | LazyTitan33_DNS-Exfilnspector/DNS-Exfilnspector.py | #Import Burp Objects
from burp import IBurpExtender, IBurpExtenderCallbacks, ITab, IBurpCollaboratorInteraction
#Import Java GUI Objects
from java.awt import Dimension, FlowLayout, Color, Toolkit, GridBagLayout, GridBagConstraints, Insets, Dimension
from java.awt.datatransfer import Clipboard, StringSelection
from java... | 18,787 | Python | .py | 334 | 46.10479 | 162 | 0.693887 | LazyTitan33/DNS-Exfilnspector | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,467 | setup.py | HarcicYang_rev_HunYuan/setup.py | # setup.py
from setuptools import setup, find_packages
setup(
name="rev_hunyuan",
version="0.22",
description="通过cookie信息快速访问腾讯混元",
author="Harcic",
author_email="harcic@outlook.com",
url="https://github.com/HarcicYang/rev_HunYuan",
packages=find_packages(),
include_package_data=True,
... | 346 | Python | .py | 12 | 23 | 52 | 0.714286 | HarcicYang/rev_HunYuan | 8 | 2 | 1 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,468 | chat.py | HarcicYang_rev_HunYuan/rev_HunYuan/chat.py | import requests, sys
from collections import deque
class HunYuan:
def __init__(self, cookie: str, chatId: str = "new", isAutoRecreateChatId: bool = True):
self.headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/53... | 3,432 | Python | .py | 71 | 35.535211 | 154 | 0.558391 | HarcicYang/rev_HunYuan | 8 | 2 | 1 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,469 | __init__.py | HarcicYang_rev_HunYuan/rev_HunYuan/__init__.py | name = "rev_HunYuan"
from rev_HunYuan import chat
HunYuan = chat.HunYuan
| 75 | Python | .py | 3 | 23.333333 | 28 | 0.8 | HarcicYang/rev_HunYuan | 8 | 2 | 1 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,470 | __init__.py | discopixel-studio_comfyui-discopixel/__init__.py | """
@author: Anson Kao
@title: ComfyUI Discopixel
@nickname: ComfyUI Discopixel
@description: A small collection of custom nodes for use with ComfyUI, by Discopixel
"""
import importlib
print(f"Loading ComfyUI Discopixel nodes!")
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
NODE_MODULES = [
".comfyu... | 795 | Python | .py | 26 | 26.846154 | 84 | 0.720472 | discopixel-studio/comfyui-discopixel | 8 | 2 | 2 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,471 | comfyui_discopixel_nodes.py | discopixel-studio_comfyui-discopixel/comfyui_discopixel_nodes.py | import cv2
import numpy as np
import torch
import comfy
from segment_anything import SamPredictor
from skimage.draw import disk
import requests
from PIL import Image, ImageOps, ImageSequence
from io import BytesIO
import time
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
def register_node(identifier: str... | 22,397 | Python | .py | 512 | 32.945313 | 173 | 0.572886 | discopixel-studio/comfyui-discopixel | 8 | 2 | 2 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,472 | __init__.py | TheBarret_ZSuite/__init__.py | # By Barret (Discord: https://discord.gg/6VWmVgPTw9)
#
# Copyright 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to
# deal in the Software without restriction, including without limitation the rights to us... | 1,694 | Python | .py | 27 | 58.592593 | 154 | 0.746368 | TheBarret/ZSuite | 8 | 2 | 0 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,473 | ZS_Prompter.py | TheBarret_ZSuite/nodes/ZS_Prompter.py | import os
import random
import re
import socket
import struct
import time
import torch
import numpy as np
# Initializing variables and instances
random.seed()
os.chdir(os.path.dirname(os.path.abspath(__file__)))
class ZSuitePrompter:
def __init__(self):
pass
@classmethod
def INP... | 1,890 | Python | .py | 50 | 28.28 | 112 | 0.578168 | TheBarret/ZSuite | 8 | 2 | 0 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,474 | ZS_Seed.py | TheBarret_ZSuite/nodes/ZS_Seed.py | import os
import random
import re
import socket
import struct
import time
import torch
import torch.nn.functional as F
from sympy import symbols, lambdify, Abs, sin, cos, tan, sinh, cosh, tanh, exp, log, sqrt, atan, asin, acos, cbrt
import numpy as np
# Constants
MAX_SEED = 2 ** 31 - 1
class ZSuiteSeedM... | 2,610 | Python | .py | 65 | 30.6 | 114 | 0.60665 | TheBarret/ZSuite | 8 | 2 | 0 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,475 | ZS_Rtlsdr.py | TheBarret_ZSuite/nodes/ZS_Rtlsdr.py | # #######################################################################################################################
# This node facilitates communication with an RTL-SDR device (Digital Radio Receiver) through a TCP connection.
# Once connected, it captures live ambient RF noise, which is then embedded into a... | 6,500 | Python | .py | 128 | 40.59375 | 122 | 0.577937 | TheBarret/ZSuite | 8 | 2 | 0 | GPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,476 | popup.py | Mnaisuka_GameSnapTransl/code/popup.py | import threading
from PyQt5.QtWidgets import QDialog
from PyQt5 import uic
from PyQt5.QtCore import Qt, pyqtSignal, QObject
class CustomSignal(QObject):
box = pyqtSignal(str, object)
class popup(QDialog):
def __init__(self, ai):
super(popup, self).__init__()
uic.loadUi("./popup.ui", self)
... | 1,401 | Python | .py | 33 | 32.636364 | 99 | 0.631016 | Mnaisuka/GameSnapTransl | 8 | 1 | 1 | GPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,477 | funcs.py | Mnaisuka_GameSnapTransl/code/funcs.py | import ctypes
import io
import os
from PIL import ImageGrab
import requests
import base64
import urllib.parse
import openai
def block_focus(hwnd): # 阻止窗口获取焦点
GWL_EXSTYLE = -20
WS_EX_NOACTIVATE = 0x08000000
WS_EX_LAYERED = 0x00080000
ctypes.windll.user32.SetWindowLongA(
hwnd, GWL_EXSTYLE, WS_E... | 3,433 | Python | .py | 91 | 28.241758 | 164 | 0.588092 | Mnaisuka/GameSnapTransl | 8 | 1 | 1 | GPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,478 | main.py | Mnaisuka_GameSnapTransl/code/main.py | import json
import sys
import time
from PyQt5.QtWidgets import QDialog, QInputDialog
from PyQt5.QtCore import Qt, pyqtSignal, QObject
from PyQt5.QtGui import QFont
from PyQt5 import QtWidgets
from PyQt5 import uic
from funcs import *
from popup import *
from ctypes.wintypes import MSG
import threading
class CustomSign... | 4,977 | Python | .py | 139 | 24.158273 | 77 | 0.522746 | Mnaisuka/GameSnapTransl | 8 | 1 | 1 | GPL-2.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,479 | setup.py | thismatters_django-mailinglist/setup.py | import warnings
from setuptools import find_packages, setup
try:
README = open("README.md").read() + "\n\n"
README += open("CHANGELOG.md").read()
except: # noqa: E722
warnings.warn("Could not read README.md and/or CHANGELOG.md")
README = None
version = __import__("mailinglist").__version__
setup(
... | 1,862 | Python | .py | 51 | 30.098039 | 74 | 0.618152 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,480 | conf.py | thismatters_django-mailinglist/docs/source/conf.py | # Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master... | 1,757 | Python | .py | 43 | 38.209302 | 88 | 0.681577 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,481 | manage.py | thismatters_django-mailinglist/test_project/manage.py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings")
try:
from django.core.management import execute_from_command_line
except... | 668 | Python | .py | 18 | 31.222222 | 76 | 0.678019 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,482 | models.py | thismatters_django-mailinglist/test_project/test_project/models.py | from django.db import models
class AdHocUserModel(models.Model):
# pretend this email field is encrypted!
email = models.EmailField(unique=True)
first_name = models.CharField(max_length=128, null=True, blank=True)
last_name = models.CharField(max_length=128, null=True, blank=True)
class Meta:
... | 491 | Python | .py | 11 | 38.909091 | 72 | 0.691176 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,483 | celery.py | thismatters_django-mailinglist/test_project/test_project/celery.py | import os
from celery import Celery
# Set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings")
app = Celery("test_project")
# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.... | 675 | Python | .py | 15 | 43.266667 | 72 | 0.782542 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,484 | asgi.py | thismatters_django-mailinglist/test_project/test_project/asgi.py | """
ASGI config for test_project project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_... | 401 | Python | .py | 10 | 38.5 | 78 | 0.802597 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,485 | urls.py | thismatters_django-mailinglist/test_project/test_project/urls.py | """
URL configuration for test_project project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name=... | 857 | Python | .py | 21 | 38 | 79 | 0.726619 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,486 | admin.py | thismatters_django-mailinglist/test_project/test_project/admin.py | from django.contrib import admin
from test_project import models
@admin.register(models.AdHocUserModel)
class AdHocUserModelAdmin(admin.ModelAdmin):
model = models.AdHocUserModel
list_display = ("first_name", "last_name", "email")
| 242 | Python | .py | 6 | 37.5 | 55 | 0.793991 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,487 | hooks.py | thismatters_django-mailinglist/test_project/test_project/hooks.py | from django.apps import apps
from django.conf import settings
from mailinglist.hooks import MailinglistDefaultHookset
class MyCustomHookset(MailinglistDefaultHookset):
# be sure you inherit the default hookset!
def create_user(self, *, email, first_name, last_name):
user_model = apps.get_model(settin... | 787 | Python | .py | 19 | 33.105263 | 71 | 0.660131 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,488 | wsgi.py | thismatters_django-mailinglist/test_project/test_project/wsgi.py | """
WSGI config for test_project project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_... | 401 | Python | .py | 10 | 38.5 | 78 | 0.802597 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,489 | 0001_initial.py | thismatters_django-mailinglist/test_project/test_project/migrations/0001_initial.py | # Generated by Django 4.2.7 on 2023-12-03 15:14
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="AdHocUserModel",
fields=[
(
"... | 1,000 | Python | .py | 28 | 21.678571 | 88 | 0.472596 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,490 | test.py | thismatters_django-mailinglist/test_project/test_project/settings/test.py | from .base import * # noqa: F401, F403
INSTALLED_APPS.remove("django_extensions")
MAILINGLIST_USER_MODEL = "auth.User"
| 122 | Python | .py | 3 | 39 | 42 | 0.760684 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,491 | base.py | thismatters_django-mailinglist/test_project/test_project/settings/base.py | """
Django settings for test_project project.
Generated by 'django-admin startproject' using Django 4.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""
from pa... | 3,847 | Python | .py | 106 | 32 | 91 | 0.722162 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,492 | conftest.py | thismatters_django-mailinglist/tests/conftest.py | from base64 import b64decode
from datetime import timedelta
from random import randint
import pytest
from django.core.files.base import ContentFile
from django.contrib.auth import get_user_model
from django.utils.timezone import now
from mailinglist import models
from mailinglist.enum import SubmissionStatusEnum, Sub... | 4,578 | Python | .py | 154 | 24.720779 | 84 | 0.71917 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,493 | test_parsers.py | thismatters_django-mailinglist/tests/test_parsers.py | from unittest.mock import patch, call
from django.core.exceptions import ValidationError
import pytest
import io
from mailinglist.addressimport.parsers import AddressList, parse_csv
@pytest.fixture
def address_list(mailing_list):
return AddressList(mailing_list=mailing_list)
@pytest.fixture
def address_list_qu... | 5,879 | Python | .py | 151 | 28.119205 | 86 | 0.572555 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,494 | test_misc.py | thismatters_django-mailinglist/tests/test_misc.py | import sys
import builtins
from unittest.mock import patch
from importlib import reload
import pytest
from django.core.management import call_command
@patch("mailinglist.services.SubmissionService.process_submissions")
def test_process_submissions_managment_command(p_process):
call_command("process_submissions")... | 1,161 | Python | .py | 29 | 35.965517 | 68 | 0.765862 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,495 | test_admin_forms.py | thismatters_django-mailinglist/tests/test_admin_forms.py | from unittest.mock import patch
import pytest
from django.forms import ValidationError
from django.core.files.base import ContentFile
from mailinglist.admin_forms import ImportForm, ConfirmForm, SubmissionModelForm
class TestImportForm:
def test_clean_missing_data_address_file(self, mailing_list):
_data =... | 4,371 | Python | .py | 109 | 31.440367 | 88 | 0.61301 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,496 | test_conf.py | thismatters_django-mailinglist/tests/test_conf.py | import pytest
from mailinglist.conf import MailinglistAppConf
from django.core.exceptions import ImproperlyConfigured
class TestMailinglistAppConf:
def test_configure_default_sender_email(self):
assert (
MailinglistAppConf().configure_default_sender_email("something")
== "something... | 787 | Python | .py | 17 | 38.882353 | 82 | 0.729412 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,497 | test_admin.py | thismatters_django-mailinglist/tests/test_admin.py | import pytest
from unittest.mock import call, patch, Mock
from django.http import Http404
from mailinglist import admin
from django.contrib import admin as admin_site
from django.contrib.auth.models import Permission
from django.shortcuts import reverse
from mailinglist.models import Subscription, Submission
from mail... | 11,487 | Python | .py | 265 | 34.396226 | 88 | 0.655302 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,498 | test_forms.py | thismatters_django-mailinglist/tests/test_forms.py | from mailinglist import enum, forms, models
class TestSubscriptionForm:
def test_initial_not_subscribed(self, subscription):
form = forms.SubscriptionForm(user=subscription.user)
_list_key = f"mailing-list_{subscription.mailing_list.pk}"
assert _list_key in form.fields
assert not f... | 4,574 | Python | .py | 88 | 43.25 | 87 | 0.689987 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |
2,285,499 | test_services.py | thismatters_django-mailinglist/tests/test_services.py | from datetime import timedelta
from unittest.mock import Mock, patch, call
import pytest
from django.conf import settings
from django.test import override_settings
from django.urls import reverse
from django.utils.timezone import now
from mailinglist import models, services
from mailinglist.enum import SubmissionStat... | 30,092 | Python | .py | 655 | 37 | 88 | 0.6725 | thismatters/django-mailinglist | 8 | 1 | 3 | AGPL-3.0 | 9/5/2024, 10:47:52 PM (Europe/Amsterdam) |