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,290,100 | ui_refresh.py | MNeMoNiCuZ_ImageSorting/scripts/ui_refresh.py | import tkinter as tk
from .category_buttons import update_display # Ensure this import is correct
def refresh_ui(config, image_frame, thumbnails_frame, buttons_frame, console_frame):
print("Refreshing UI...") # Debug statement
print(f"Config during refresh: {config}") # Debug statement
if 'curre... | 916 | Python | .py | 16 | 50.625 | 106 | 0.708054 | MNeMoNiCuZ/ImageSorting | 8 | 1 | 8 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,101 | CameraTester.py | BenVeghte_PrusaConnect-Webcam/CameraTester.py | import cv2
import subprocess
import os
import argparse
def verifyCamera(camera_id:str) -> bool:
"""Test to see if the camera can take a photo. Occasionally a camera will have multiple v4l devices so this makes sure you have selected the right one
Args:
camera_id (str): Path to the camera, relative to ... | 1,581 | Python | .py | 37 | 35.432432 | 154 | 0.646592 | BenVeghte/PrusaConnect-Webcam | 8 | 1 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,102 | prusacam.py | BenVeghte_PrusaConnect-Webcam/prusacam.py | import requests
import argparse
import cv2
import datetime
import pathlib
from PIL import Image
import json
import time
import json
import os
import logging
import sys
import CameraTester
DEFAULT_MAX_IMAGES = 500
TIMESTAMP_FMT = '%Y-%m-%d_%H_%M_%S'
logger = logging.getLogger("prusacam")
logger.setLevel(logging.DEBUG... | 14,948 | Python | .py | 294 | 41.064626 | 279 | 0.644571 | BenVeghte/PrusaConnect-Webcam | 8 | 1 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,103 | consts.py | valleyofdoom_service-list-builder/service_list_builder/consts.py | VERSION = "1.6.3"
USER_MODE_TYPES = {16, 32, 96, 288, 80, 272}
HIVE = "SYSTEM\\CurrentControlSet"
LOAD_HIVE_LINES = f"""@echo off
REM This script was built using service-list-builder v{VERSION}
REM ---> IMPORTANT: Do NOT run this script on any system other than the one it was generated on <---
REM Set drive letter to... | 953 | Python | .py | 23 | 39 | 103 | 0.67027 | valleyofdoom/service-list-builder | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,104 | main.py | valleyofdoom_service-list-builder/service_list_builder/main.py | import argparse
import ctypes
import logging
import os
import re
import sys
import winreg
from collections import deque
from configparser import ConfigParser, SectionProxy
from datetime import datetime
from typing import Any
import pywintypes
import win32api
import win32service
import win32serviceutil
from consts impo... | 16,598 | Python | .py | 355 | 37.11831 | 280 | 0.630479 | valleyofdoom/service-list-builder | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,105 | cve-2024-4367.py | Zombie-Kaiser_cve-2024-4367-PoC-fixed/cve-2024-4367.py | import sys
def generate_payload(payload):
escaped_payload = payload.replace('(', '\\(').replace(')', '\\)')
return f"""
%PDF-1.4
%DUMMY
8 0 obj
<<
/PatternType 2
/Shading<<
/Function<<
/Domain[0 1]
/C0[0 0 1]
/C1[1 0.6 0]
/N 1
/FunctionType 2
>>
/ShadingType 2
/Coor... | 2,724 | Python | .py | 172 | 12.988372 | 97 | 0.639686 | Zombie-Kaiser/cve-2024-4367-PoC-fixed | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,106 | cveSeeker.py | anmolksachan_CVESeeker/cveSeeker.py | import socket
import requests
import os
import json
import argparse
from colorama import init, Fore, Style
# Initialize colorama
init(autoreset=True)
print(Fore.CYAN + """
░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░ ░▒▓███████▓▒░▒▓████████▓▒░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░... | 13,971 | Python | .py | 278 | 33.507194 | 217 | 0.487869 | anmolksachan/CVESeeker | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,107 | setup.py | user1342_GhidraBridge/setup.py | from setuptools import setup, find_packages
setup(
name="ghidrabridge",
version="0.1.11",
author="James Stevenson",
author_email="opensource@JamesStevenson.me",
description="A Python interface for automating Ghidra tasks.",
long_description_content_type="text/markdown",
url="https://github.... | 455 | Python | .py | 15 | 25.8 | 66 | 0.699317 | user1342/GhidraBridge | 8 | 5 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,108 | test.py | user1342_GhidraBridge/test.py | from ghidrabridge.ghidra_bridge import GhidraBridge
bridge = GhidraBridge()
#
print(bridge.get_list_of_reachable_functions(r"C:\Users\james\Downloads\linux-static-binaries-master\linux-static-binaries-master\armv8-aarch64 - Copy\pure-authd","FUN_004002c8"))
| 259 | Python | .py | 4 | 63.5 | 179 | 0.822835 | user1342/GhidraBridge | 8 | 5 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,109 | ghidra_bridge.py | user1342_GhidraBridge/ghidrabridge/ghidra_bridge.py | import concurrent
import hashlib
import shutil
import subprocess
import tempfile
from concurrent.futures import ProcessPoolExecutor
from pathlib import Path
from tqdm import tqdm
import re
class GhidraBridge():
def __init__(self, ghidra_project_dir=None, cspec=None, processor=None):
self.ghidra_project_dir... | 26,567 | Python | .py | 598 | 35.769231 | 154 | 0.641777 | user1342/GhidraBridge | 8 | 5 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,110 | openpose_node.py | alessandrozonta_ComfyUI-OpenPose/openpose_node.py | import os
import torch
import cv2
import numpy as np
from .src import torch_openpose, util
from huggingface_hub import snapshot_download
from torchvision import transforms
# Define a transform to convert the image to a tensor
transform = transforms.ToTensor()
# find folder with models
def find_folder_upwards(start_di... | 8,514 | Python | .py | 165 | 42.424242 | 132 | 0.655704 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,111 | install.py | alessandrozonta_ComfyUI-OpenPose/install.py | import subprocess
import sys
def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
packages = [
"torch",
"opencv-python",
"numpy",
"huggingface_hub",
"torchvision"
]
for package in packages:
install(package)
print("All packages installed successfu... | 327 | Python | .py | 14 | 20.071429 | 76 | 0.705502 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,112 | torch_openpose.py | alessandrozonta_ComfyUI-OpenPose/src/torch_openpose.py | import cv2
import numpy as np
import math
from scipy.ndimage.filters import gaussian_filter
import torch
from .util import padRightDownCorner
from .model import bodypose_model,bodypose_25_model
class torch_openpose(object):
def __init__(self, model_type, path_model):
if model_type == 'body_25':
... | 11,585 | Python | .py | 201 | 40.800995 | 137 | 0.485082 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,113 | util.py | alessandrozonta_ComfyUI-OpenPose/src/util.py | import numpy as np
import math
import cv2
# draw the body keypoint and lims
def draw_bodypose(img, poses,model_type = 'coco', transparency=0.4):
stickwidth = 4
limbSeq = [[1, 2], [1, 5], [2, 3], [3, 4], [5, 6], [6, 7], [1, 8], [8, 9], \
[9, 10], [1, 11], [11, 12], [12, 13], [1, 0], [0,... | 3,048 | Python | .py | 61 | 40.163934 | 115 | 0.484154 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,114 | breakout25.py | alessandrozonta_ComfyUI-OpenPose/src/breakout25.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 15:13:51 2020
@author: joe
"""
import numpy as np
import math
jointpairs = [[1,0],[1,2],[2,3],[3,4],[1,5],[5,6],[6,7],[1,8],[8,9],[9,10],[10,11],[8,12],[12,13],[13,14],[0,15],[0,16]\
,[15,17],[16,18],[11,24],[11,22],[14,21],[14,19]... | 2,251 | Python | .py | 49 | 35.857143 | 138 | 0.472694 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,115 | model.py | alessandrozonta_ComfyUI-OpenPose/src/model.py | import torch
from collections import OrderedDict
import torch
import torch.nn as nn
def make_layers(block, no_relu_layers,prelu_layers = []):
layers = []
for layer_name, v in block.items():
if 'pool' in layer_name:
layer = nn.MaxPool2d(kernel_size=v[0], stride=v[1],
... | 15,939 | Python | .py | 338 | 32.41716 | 90 | 0.446962 | alessandrozonta/ComfyUI-OpenPose | 8 | 1 | 2 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,116 | tak_meshtastic_gateway.py | brian7704_TAK_Meshtastic_Gateway/tak_meshtastic_gateway/tak_meshtastic_gateway.py | import argparse
import sys
import traceback
from tak_meshtastic_gateway.dm_socket_thread import DMSocketThread
from bs4 import BeautifulSoup
from xml.etree.ElementTree import Element, SubElement, tostring
from meshtastic import portnums_pb2, mesh_pb2, atak_pb2, protocols
import meshtastic.serial_interface
import meshta... | 32,586 | Python | .py | 528 | 45.399621 | 156 | 0.558023 | brian7704/TAK_Meshtastic_Gateway | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,117 | __init__.py | brian7704_TAK_Meshtastic_Gateway/tak_meshtastic_gateway/__init__.py | # These version placeholders will be replaced later during substitution.
__version__ = "0.0.0-post.14+c0c6411"
__version_tuple__ = (0, 0, 0, "post", 14, "c0c6411")
| 164 | Python | .py | 3 | 53.666667 | 72 | 0.695652 | brian7704/TAK_Meshtastic_Gateway | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,118 | dm_socket_thread.py | brian7704_TAK_Meshtastic_Gateway/tak_meshtastic_gateway/dm_socket_thread.py | import socket
import takproto
from threading import Thread
from bs4 import BeautifulSoup
from meshtastic import portnums_pb2, atak_pb2
class DMSocketThread(Thread):
def __init__(self, logger, meshtastic_interface, port=4243):
super().__init__()
self.meshtastic_interface = meshtastic_interface
... | 3,758 | Python | .py | 83 | 32.337349 | 104 | 0.583333 | brian7704/TAK_Meshtastic_Gateway | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,119 | atak_pb2.py | brian7704_TAK_Meshtastic_Gateway/tak_meshtastic_gateway/proto/atak_pb2.py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: atak.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from ... | 5,562 | Python | .py | 103 | 52.038835 | 1,996 | 0.759735 | brian7704/TAK_Meshtastic_Gateway | 8 | 1 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,120 | advection_diffusion.py | pmocz_advectiondiffusion-jax/advection_diffusion.py | import numpy as np
from scipy.sparse import csc_matrix
from scipy.sparse.linalg import splu
from scipy.optimize import minimize
import jax
#jax.config.update("jax_enable_x64", True) # turn this on to use double precision JAX
import jax.numpy as jnp
from jax import jit
from jaxopt import ScipyBoundedMinimize
from jax... | 10,142 | Python | .py | 223 | 42 | 238 | 0.649461 | pmocz/advectiondiffusion-jax | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,121 | arguments.py | nju-websoft_DIFT/arguments.py | import os
import json
from typing import List, Optional, Dict, Sequence
from dataclasses import dataclass, field
from transformers import Seq2SeqTrainingArguments
@dataclass
class ModelArguments:
model_class: str = field(
default='KGELlama',
metadata={"help": "LlamaForCausalLM | KGELlama"}
)
... | 4,907 | Python | .py | 78 | 57.820513 | 147 | 0.706742 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,122 | eval.py | nju-websoft_DIFT/eval.py | import os
import json
import copy
import numpy as np
from time import time
from tqdm import trange, tqdm
import argparse
import pickle as pkl
from typing import Union, Dict
import torch
from torch.nn.utils.rnn import pad_sequence
from torch.utils.data import DataLoader
from transformers import (
HfArgumentParser, ... | 7,211 | Python | .py | 147 | 38.108844 | 130 | 0.619589 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,123 | utils.py | nju-websoft_DIFT/utils.py | from genericpath import isfile
import os
import json
import copy
import tqdm
import logging
import pandas as pd
import argparse
from typing import List, Optional, Dict, Sequence, Union
from dataclasses import dataclass, field
import bitsandbytes as bnb
import torch
import transformers
from transformers import (
A... | 6,680 | Python | .py | 157 | 34.515924 | 119 | 0.648557 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,124 | train.py | nju-websoft_DIFT/train.py | import os
import json
import copy
import tqdm
import pandas as pd
import argparse
from typing import List, Optional, Dict, Sequence
from dataclasses import dataclass, field
import bitsandbytes as bnb
import torch
from torch.nn.utils.rnn import pad_sequence
from datasets import load_dataset, Dataset
import transformer... | 3,204 | Python | .py | 71 | 40.197183 | 130 | 0.754997 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,125 | model.py | nju-websoft_DIFT/model.py | import os
from typing import List, Optional, Dict, Sequence, Union
import torch
from torch import nn
from transformers import AutoTokenizer, LlamaForCausalLM, GenerationConfig
from transformers.activations import ACT2FN
from peft import PeftModel
class EmbeddingModel(nn.Module):
def __init__(
self,
... | 5,283 | Python | .py | 112 | 37.633929 | 106 | 0.635476 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,126 | data.py | nju-websoft_DIFT/data.py | import os
import json
import copy
import random
import pandas as pd
from queue import Queue
from typing import List, Optional, Dict, Sequence
from dataclasses import dataclass, field
import bitsandbytes as bnb
import torch
from torch.nn.utils.rnn import pad_sequence
# from torch.utils.data import Dataset, DataLoader
f... | 3,878 | Python | .py | 94 | 33.148936 | 116 | 0.65004 | nju-websoft/DIFT | 8 | 0 | 1 | GPL-3.0 | 9/5/2024, 10:48:51 PM (Europe/Amsterdam) |
2,290,127 | get_prediction_results.py | FanmengWang_MMPolymer/get_prediction_results.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import sys
import csv
import shutil
import pickle
import lmdb
import subprocess
import torch
import argparse
import pandas as pd
import numpy as np
from rdkit import Chem
from tqdm ... | 27,140 | Python | .py | 559 | 38.808587 | 504 | 0.622945 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,128 | finetune_data_process.py | FanmengWang_MMPolymer/dataset/finetune_data_process.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import sys
import csv
import shutil
import pickle
import lmdb
import subprocess
import torch
import argparse
import pandas as pd
import numpy as np
from rdkit import Chem
from tqdm... | 24,630 | Python | .py | 513 | 37.990253 | 189 | 0.613556 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,129 | pretrain_data_process.py | FanmengWang_MMPolymer/dataset/pretrain_data_process.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import sys
import csv
import shutil
import pickle
import lmdb
import subprocess
import torch
import argparse
import pandas as pd
import numpy as np
from rdkit import Chem
from tqdm... | 24,264 | Python | .py | 511 | 37.857143 | 189 | 0.618739 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,130 | infer.py | FanmengWang_MMPolymer/MMPolymer/infer.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import sys
import pickle
import torch
from unicore import checkpoint_utils, distributed_utils, options, utils
from unicore.logging import progress_bar
from unicore im... | 4,182 | Python | .py | 105 | 30.914286 | 98 | 0.623301 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,131 | __init__.py | FanmengWang_MMPolymer/MMPolymer/__init__.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import importlib
import MMPolymer.tasks
import MMPolymer.data
import MMPolymer.models
import MMPolymer.losses
| 240 | Python | .py | 7 | 33 | 69 | 0.844156 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,132 | data_utils.py | FanmengWang_MMPolymer/MMPolymer/data/data_utils.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import contextlib
@contextlib.contextmanager
def numpy_seed(seed, *addl_seeds):
"""Context manager which seeds the NumPy PRNG with the specified seed and
restores... | 604 | Python | .py | 19 | 26.842105 | 77 | 0.689003 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,133 | prepend_and_append_2d_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/prepend_and_append_2d_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import torch
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class PrependAndAppend2DDataset(BaseWrapperDataset):
def __init__(self, dataset, token=None):
... | 719 | Python | .py | 18 | 33.166667 | 75 | 0.645624 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,134 | conformer_sample_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/conformer_sample_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
from unicore.data import BaseWrapperDataset
from . import data_utils
class ConformerSampleDataset(BaseWrapperDataset):
def __init__(se... | 10,289 | Python | .py | 247 | 32.42915 | 136 | 0.612932 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,135 | from_str_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/from_str_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import torch
from functools import lru_cache
from unicore.data import UnicoreDataset
class FromStrLabelDataset(UnicoreDataset):
def __init__(self, labels):
super().__init__()
... | 588 | Python | .py | 16 | 31.625 | 69 | 0.699647 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,136 | add_2d_conformer_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/add_2d_conformer_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
from unicore.data import BaseWrapperDataset
from rdkit import Chem
from rdkit.Chem import AllChem
class Add2DConformerDataset(BaseWrapperD... | 1,673 | Python | .py | 39 | 36.769231 | 129 | 0.685732 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,137 | mask_points_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/mask_points_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from functools import lru_cache
import numpy as np
import torch
from unicore.data import Dictionary
from unicore.data import BaseWrapperDataset
from . import data_utils
class MaskPointsDat... | 9,914 | Python | .py | 237 | 29.518987 | 85 | 0.537728 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,138 | remove_hydrogen_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/remove_hydrogen_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class RemoveHydrogenDataset(BaseWrapperDataset):
def __init__(
self,
datas... | 4,929 | Python | .py | 128 | 28.789063 | 84 | 0.597365 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,139 | distance_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/distance_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
from scipy.spatial import distance_matrix
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class DistanceDataset(BaseWrapperDatase... | 1,558 | Python | .py | 36 | 37.222222 | 81 | 0.679233 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,140 | __init__.py | FanmengWang_MMPolymer/MMPolymer/data/__init__.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from .key_dataset import KeyDataset
from .normalize_dataset import (
NormalizeDataset,
NormalizeDockingPoseDataset,
)
from .remove_hydrogen_dataset import (
RemoveHydrogenDataset,... | 1,406 | Python | .py | 43 | 29.813953 | 75 | 0.828928 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,141 | coord_pad_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/coord_pad_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from unicore.data import BaseWrapperDataset
def collate_tokens_coords(
values,
pad_idx,
left_pad=False,
pad_to_length=None,
pad_to_multiple=1,
):
"""Convert a list o... | 2,592 | Python | .py | 66 | 32.651515 | 87 | 0.609319 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,142 | atom_type_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/atom_type_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class AtomTypeDataset(BaseWrapperDataset):
def __init__(
self,
raw_dataset,
dataset,
... | 1,067 | Python | .py | 29 | 28.068966 | 88 | 0.598646 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,143 | tta_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/tta_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class TTADataset(BaseWrapperDataset):
def __init__(self, dataset, seed, atoms, coordinates... | 3,964 | Python | .py | 98 | 31.306122 | 88 | 0.615967 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,144 | key_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/key_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class KeyDataset(BaseWrapperDataset):
def __init__(self, dataset, key):
self.dataset = dataset
... | 497 | Python | .py | 13 | 33.153846 | 69 | 0.705637 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,145 | lmdb_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/lmdb_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import lmdb
import os
import pickle
from functools import lru_cache
import logging
logger = logging.getLogger(__name__)
class LMDBDataset:
def __init__(self, db_path):
self.db_... | 1,286 | Python | .py | 38 | 25.921053 | 80 | 0.604351 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,146 | cropping_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/cropping_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
import logging
from unicore.data import BaseWrapperDataset
from . import data_utils
logger = logging.getLogger(__name__)
class CroppingDa... | 7,889 | Python | .py | 182 | 31.659341 | 88 | 0.573664 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,147 | normalize_dataset.py | FanmengWang_MMPolymer/MMPolymer/data/normalize_dataset.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from functools import lru_cache
from unicore.data import BaseWrapperDataset
class NormalizeDataset(BaseWrapperDataset):
def __init__(self, dataset, coordinates, norma... | 2,427 | Python | .py | 56 | 35.785714 | 92 | 0.679237 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,148 | MMPolymer.py | FanmengWang_MMPolymer/MMPolymer/models/MMPolymer.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import logging
import torch
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.nn.functional as F
from unicore import utils
from unicore.mode... | 15,358 | Python | .py | 386 | 29.608808 | 116 | 0.586082 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,149 | transformer_encoder_with_pair.py | FanmengWang_MMPolymer/MMPolymer/models/transformer_encoder_with_pair.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from typing import Optional
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from unicore.modules import TransformerEncoderLayer, LayerNorm
class TransformerE... | 5,102 | Python | .py | 121 | 31.107438 | 86 | 0.566331 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,150 | PolymerSmilesTokenization.py | FanmengWang_MMPolymer/MMPolymer/models/PolymerSmilesTokenization.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import json
import os
from functools import lru_cache
from typing import List, Optional, Tuple
import regex as re
from transformers import AddedToken, PreTrainedTokenizer
import... | 18,013 | Python | .py | 346 | 41.184971 | 190 | 0.605181 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,151 | __init__.py | FanmengWang_MMPolymer/MMPolymer/models/__init__.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from .MMPolymer import MMPolymerModel
from .transformer_encoder_with_pair import TransformerEncoderWithPair | 236 | Python | .py | 4 | 58 | 69 | 0.836207 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,152 | MMPolymer_finetune.py | FanmengWang_MMPolymer/MMPolymer/tasks/MMPolymer_finetune.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import numpy as np
from unicore.data import (
Dictionary,
NestedDictionaryDataset,
LMDBDataset,
AppendTokenDataset,
PrependTokenDataset,
Righ... | 7,300 | Python | .py | 195 | 26.558974 | 87 | 0.577483 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,153 | __init__.py | FanmengWang_MMPolymer/MMPolymer/tasks/__init__.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from pathlib import Path
import importlib
# automatically import any Python files in the criterions/ directory
for file in sorted(Path(__file__).parent.glob("*.py")):
if not file.name.st... | 404 | Python | .py | 8 | 47.75 | 69 | 0.746193 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,154 | MMPolymer_finetune.py | FanmengWang_MMPolymer/MMPolymer/losses/MMPolymer_finetune.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
import torch.nn.functional as F
import pandas as pd
import numpy as np
from unicore import metrics
from unicore.losses import UnicoreLoss, register_loss
from sklearn... | 4,745 | Python | .py | 105 | 32.266667 | 88 | 0.54031 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,155 | __init__.py | FanmengWang_MMPolymer/MMPolymer/losses/__init__.py | # This source code is licensed under the GPL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from pathlib import Path
import importlib
# automatically import any Python files in the criterions/ directory
for file in sorted(Path(__file__).parent.glob("*.py")):
if not file.name.st... | 405 | Python | .py | 8 | 47.875 | 69 | 0.746835 | FanmengWang/MMPolymer | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,156 | VaspTool.py | aboys-cb_VaspTool/VaspTool.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/5/9 22:40
# @Author : 兵
# @email : 1747193328@qq.com
import logging
import sys
from pymatgen.util.typing import Tuple3Ints, Vector3D
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
datefmt='%Y-... | 102,596 | Python | .py | 2,183 | 33.347229 | 150 | 0.559233 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,157 | GpumdTool.py | aboys-cb_VaspTool/gpumd/GpumdTool.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/7/2 11:17
# @Author : 兵
# @email : 1747193328@qq.com
import matplotlib
import numpy as np
from scipy.spatial.distance import cdist
matplotlib.use("Agg")
import argparse
import datetime
import glob
import logging
import os
import sys
import shutil
im... | 12,296 | Python | .py | 281 | 33.412811 | 119 | 0.626329 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,158 | xyz2pos.py | aboys-cb_VaspTool/script/tool/xyz2pos.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/14 13:56
# @Author : å…µ
# @email : 1747193328@qq.com
import sys
from ase.io import read, write
pos_path = sys.argv[1]
if len(sys.argv) == 3:
index = sys.argv[2]
else:
index = -1
write("POSCAR", read(pos_path, index=index, format="extxyz")... | 322 | Python | .py | 13 | 22.923077 | 61 | 0.638436 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,159 | select_nep.py | aboys-cb_VaspTool/script/tool/select_nep.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/15 16:33
# @Author : å…µ
# @email : 1747193328@qq.com
import matplotlib.pyplot as plt
import numpy as np
import tqdm
from ase.io import read, write
from calorine.nep import get_descriptors
from pynep.select import FarthestPointSample
from sklearn.de... | 1,206 | Python | .py | 35 | 32.742857 | 85 | 0.724936 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,160 | shuffle.py | aboys-cb_VaspTool/script/tool/shuffle.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/7/1 20:31
# @Author : 兵
# @email : 1747193328@qq.com
import sys
from ase.io import read, write
from sklearn.utils import shuffle
path = sys.argv[1]
atoms = read(path, ":", format="extxyz")
atoms = shuffle(atoms)
print("打乱成功!")
write(path, atoms, fo... | 347 | Python | .py | 13 | 24.461538 | 40 | 0.680251 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,161 | adsorption.py | aboys-cb_VaspTool/script/tool/adsorption.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/29 19:15
# @Author : 兵
# @email : 1747193328@qq.com
"""
建模吸附模型
"""
from pymatgen.analysis.adsorption import AdsorbateSiteFinder
from pymatgen.core import Structure, Molecule
from pymatgen.core.surface import SlabGenerator
# adsorption_molecule = Mo... | 1,517 | Python | .py | 36 | 32.166667 | 89 | 0.552184 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,162 | sub_all.py | aboys-cb_VaspTool/script/tool/sub_all.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/18 23:31
# @Author : å…µ
# @email : 1747193328@qq.com
import subprocess
import sys
from pathlib import Path
path = Path(sys.argv[1])
for i in path.iterdir():
_path = i.as_posix()
cmd = ["sbatch", "sub_vasp.sh", _path]
result = subproce... | 401 | Python | .py | 14 | 26.285714 | 76 | 0.65974 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,163 | supercell.py | aboys-cb_VaspTool/script/tool/supercell.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/15 19:23
# @Author : å…µ
# @email : 1747193328@qq.com
import os
from pymatgen.core import Structure
path = "./"
if not os.path.exists("./super"):
os.mkdir("./super")
for cif in os.listdir(path):
if os.path.isfile(cif) and cif.endswith("vas... | 507 | Python | .py | 15 | 30.466667 | 84 | 0.638776 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,164 | bader.py | aboys-cb_VaspTool/script/tool/bader.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/10/8 22:39
# @Author : 兵
# @email : 1747193328@qq.com
from pymatgen.command_line.bader_caller import bader_analysis_from_path
from pymatgen.core import Structure
def save_summary(summary):
with open("ACF.dat", "w", encoding="utf8") as f:
... | 1,603 | Python | .py | 37 | 33.891892 | 96 | 0.561886 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,165 | extract_xyz.py | aboys-cb_VaspTool/script/tool/extract_xyz.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/12 14:32
# @Author : 兵
# @email : 1747193328@qq.com
"""
等间距抽取多少个结构在xyz文件中
每隔50抽取1个
python extract_xyz.py aimd.xyz 50
主动学习的 可以用 100k是标记 在Config_type
python extract_xyz.py dump.xyz 50 100k
"""
import argparse
import tqdm
from ase.io import read, wr... | 1,607 | Python | .py | 37 | 32.459459 | 99 | 0.651852 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,166 | pos2xyz.py | aboys-cb_VaspTool/script/tool/pos2xyz.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/13 20:18
# @Author : å…µ
# @email : 1747193328@qq.com
import sys
from ase.io import read, write
pos_path = sys.argv[1]
write("model.xyz", read(pos_path), format="extxyz")
| 244 | Python | .py | 9 | 25.777778 | 51 | 0.652361 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,167 | split_train.py | aboys-cb_VaspTool/script/tool/split_train.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/14 12:00
# @Author : 兵
# @email : 1747193328@qq.com
import sys
from pathlib import Path
import numpy as np
from ase.io import read, write
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from tqdm import tqdm
... | 1,486 | Python | .py | 43 | 27.744186 | 93 | 0.677067 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,168 | split_xyz.py | aboys-cb_VaspTool/script/tool/split_xyz.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/8/28 15:14
# @Author : 兵
# @email : 1747193328@qq.com
# 按照间隔分割xyz 分散任务 多节点提交
# python split_xyz.py new.xyz 10
import sys
from ase.io import read, write
job_num = int(sys.argv[2])
atoms_list = read(sys.argv[1], index=":", format="extxyz", do_not_spl... | 648 | Python | .py | 17 | 34 | 88 | 0.642978 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,169 | generate_perturb_structure.py | aboys-cb_VaspTool/script/tool/generate_perturb_structure.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/12 11:07
# @Author : 兵
# @email : 1747193328@qq.com
"""
脚本执行方式:python generate_perturb_structure.py some_structure_path num
some_structure_path 可以是POSCAR、CONTCAR、.vasp、 文件
num是生成微扰结构的个数
"""
import sys
from pathlib import Path
import dpdata
from ase... | 1,801 | Python | .py | 44 | 32.545455 | 96 | 0.656345 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,170 | plot_optic.py | aboys-cb_VaspTool/script/plot/plot_optic.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/5/22 13:07
# @Author : 兵
# @email : 1747193328@qq.com
"""
绘制光吸收曲线的图
"""
import matplotlib.pyplot as plt
from pymatgen.analysis.solar.slme import absorption_coefficient, optics, slme
from pymatgen.io.vasp.outputs import Vasprun
plt.style.use("./scien... | 1,095 | Python | .py | 33 | 30.272727 | 80 | 0.675676 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,171 | plot_energy_force.py | aboys-cb_VaspTool/script/plot/plot_energy_force.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/24 19:44
# @Author : 兵
# @email : 1747193328@qq.com
"""
使用方式 python plot_sr_energy_force.py OUTCAR
"""
import os.path
import sys
import matplotlib.pyplot as plt
import numpy as np
from pymatgen.io.vasp.outputs import Outcar
try:
path = sys.arg... | 1,805 | Python | .py | 51 | 29.764706 | 110 | 0.651819 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,172 | plot_soc.py | aboys-cb_VaspTool/script/plot/plot_soc.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/5/9 22:40
# @Author : 兵
# @email : 1747193328@qq.com
import itertools
import re
from collections import defaultdict
import numpy as np
from matplotlib import pyplot as plt
from monty.io import zopen
plt.rc('font', family='Times New Roman')
# 修改公式中默认字... | 10,164 | Python | .py | 225 | 32.915556 | 117 | 0.545649 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,173 | plot_nep.py | aboys-cb_VaspTool/script/plot/plot_nep.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/21 16:40
# @Author : å…µ
# @email : 1747193328@qq.com
import glob
import os
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import r2_score, mean_squared_error
Config = [
{"name"... | 3,234 | Python | .py | 77 | 35.246753 | 150 | 0.581662 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,174 | plot_bond.py | aboys-cb_VaspTool/script/plot/plot_bond.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/8/10 22:51
# @Author : 兵
# @email : 1747193328@qq.com
"""
画原子键长变化的 临时写的
"""
# path=sys.argv[1]
import matplotlib.pyplot as plt
from ase.io import read as ase_read
path = "dump.xyz"
frames = ase_read(path, ":", format="extxyz")
bonds = []
for atoms i... | 491 | Python | .py | 20 | 21.45 | 45 | 0.660633 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,175 | plot_dos.py | aboys-cb_VaspTool/script/plot/plot_dos.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/5/9 22:40
# @Author : å…µ
# @email : 1747193328@qq.com
import matplotlib
import numpy as np
matplotlib.use("Agg")
import palettable
from matplotlib import pyplot as plt
from pymatgen.electronic_structure.core import OrbitalType, Spin
from pymatgen.ele... | 6,571 | Python | .py | 149 | 31.302013 | 100 | 0.527298 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,176 | msd.py | aboys-cb_VaspTool/script/plot/msd.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/18 19:18
# @Author : 兵
# @email : 1747193328@qq.com
from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer
from pymatgen.core.trajectory import Trajectory
from pymatgen.io.vasp.outputs import Vasprun
# 这一步是读取 XDATCAR,得到一系列结构信息
traj = V... | 957 | Python | .py | 20 | 35.2 | 66 | 0.758865 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,177 | plt.py | aboys-cb_VaspTool/script/plot/plt.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/13 22:37
# @Author : å…µ
# @email : 1747193328@qq.com
from gpyumd.load import load_thermo
from pylab import *
matplotlib.use('Agg')
data = load_thermo()
plot(list(range(data["U"].shape[0])), data["U"])
savefig("./en.png", dpi=150)
| 304 | Python | .py | 11 | 26.363636 | 48 | 0.652921 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,178 | plot_aimd.py | aboys-cb_VaspTool/script/plot/plot_aimd.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/13 12:09
# @Author : 兵
# @email : 1747193328@qq.com
"""
绘制分子动力学的
"""
import sys
import matplotlib.pyplot as plt
from pymatgen.io.vasp.outputs import Vasprun
plt.style.use("./science.mplstyle")
# vasp_path=sys.argv[1]
plt.figure(figsize=(3.5, 2.625... | 784 | Python | .py | 26 | 28.230769 | 63 | 0.715646 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,179 | plot_dos_cohp.py | aboys-cb_VaspTool/script/plot/plot_dos_cohp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/5/18 19:19
# @Author : 兵
# @email : 1747193328@qq.com
from itertools import product
from typing import Literal
import matplotlib.pyplot as plt
import numpy as np
import palettable
from matplotlib.patches import ConnectionPatch
from numpy._typing impo... | 14,961 | Python | .py | 338 | 30.653846 | 117 | 0.477212 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,180 | plot_gpumd_result.py | aboys-cb_VaspTool/script/plot/plot_gpumd_result.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/6/13 22:23
# @Author : 兵
# @email : 1747193328@qq.com
import os.path
import matplotlib
matplotlib.use('Agg')
from gpyumd.load import load_thermo
import matplotlib.pyplot as plt
if os.path.exists("thermo.out"):
data = load_thermo()
plt.plot... | 473 | Python | .py | 16 | 25.25 | 56 | 0.674584 | aboys-cb/VaspTool | 8 | 0 | 0 | GPL-2.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |
2,290,181 | main.py | chitang233_KeyboxChecker/main.py | import subprocess
import tempfile
import re
import requests
import telebot
from os import getenv
def verify_certificate_chain(keybox):
keybox = keybox.replace("\r\n", "\n")
keybox = keybox.split("</CertificateChain>")[0]
pattern = r"-----BEGIN CERTIFICATE-----\n.*?\n-----END CERTIFICATE-----"
certificates = re.fi... | 5,253 | Python | .py | 133 | 36.12782 | 130 | 0.716088 | chitang233/KeyboxChecker | 8 | 0 | 0 | AGPL-3.0 | 9/5/2024, 10:49:00 PM (Europe/Amsterdam) |