repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Dog vs Cat Competition/train.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.120093
# Imports import os import torch import torch.nn.functional as F import numpy as np import config from torch import nn, optim from torch.utils.data import DataLoader from tqdm import tqdm from dataset import CatDog from efficientnet_pytorch import EfficientNet from utils import check_accuracy, load_checkpoint, save_che...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/DiabeticRetinopathy/train_blend.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.121627
import torch from tqdm import tqdm import numpy as np from torch import nn from torch import optim from torch.utils.data import DataLoader, Dataset from utils import save_checkpoint, load_checkpoint, check_accuracy from sklearn.metrics import cohen_kappa_score import config import os import pandas as pd def make_pred...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/DiabeticRetinopathy/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.127559
import torch import pandas as pd import numpy as np import config from tqdm import tqdm import warnings import torch.nn.functional as F def make_prediction(model, loader, output_csv="submission.csv"): preds = [] filenames = [] model.eval() for x, y, files in tqdm(loader): x = x.to(config.DEVI...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/DiabeticRetinopathy/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.128077
import config import os import pandas as pd import numpy as np from torch.utils.data import Dataset, DataLoader from PIL import Image from tqdm import tqdm class DRDataset(Dataset): def __init__(self, images_folder, path_to_csv, train=True, transform=None): super().__init__() self.data = pd.read_c...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/DiabeticRetinopathy/preprocess_images.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.139112
""" Tries to remove unnecessary black borders around the images, and "trim" the images to they take up the entirety of the image. It's hacky & not very nice but it works :)) """ import os import numpy as np from PIL import Image import warnings from multiprocessing import Pool from tqdm import tqdm import cv2 def tr...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Dog vs Cat Competition/config.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.146496
import torch import albumentations as A from albumentations.pytorch import ToTensorV2 DEVICE = "cuda" if torch.cuda.is_available() else "cpu" NUM_WORKERS = 4 BATCH_SIZE = 20 PIN_MEMORY = True LOAD_MODEL = True SAVE_MODEL = True CHECKPOINT_FILE = "b7.pth.tar" WEIGHT_DECAY = 1e-4 LEARNING_RATE = 1e-4 NUM_EPOCHS = 1 bas...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/DiabeticRetinopathy/config.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.147573
import torch import albumentations as A from albumentations.pytorch import ToTensorV2 DEVICE = "cuda" if torch.cuda.is_available() else "cpu" LEARNING_RATE = 3e-5 WEIGHT_DECAY = 5e-4 BATCH_SIZE = 20 NUM_EPOCHS = 100 NUM_WORKERS = 6 CHECKPOINT_FILE = "b3.pth.tar" PIN_MEMORY = True SAVE_MODEL = True LOAD_MODEL = True #...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Facial Keypoint Detection Competition/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.718177
import torch import numpy as np import config import pandas as pd from tqdm import tqdm def get_submission(loader, dataset, model_15, model_4): """ This can be done a lot faster.. but it didn't take too much time to do it in this inefficient way """ model_15.eval() model_4.eval() id_lookup...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Facial Keypoint Detection Competition/config.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.734139
import torch import albumentations as A from albumentations.pytorch import ToTensorV2 import cv2 DEVICE = "cuda" if torch.cuda.is_available() else "cpu" LEARNING_RATE = 1e-4 WEIGHT_DECAY = 5e-4 BATCH_SIZE = 64 NUM_EPOCHS = 100 NUM_WORKERS = 4 CHECKPOINT_FILE = "b0_4.pth.tar" PIN_MEMORY = True SAVE_MODEL = True LOAD_MO...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Facial Keypoint Detection Competition/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.734759
import pandas as pd import numpy as np import config import matplotlib.pyplot as plt from torch.utils.data import DataLoader, Dataset class FacialKeypointDataset(Dataset): def __init__(self, csv_file, train=True, transform=None): super().__init__() self.data = pd.read_csv(csv_file) self.ca...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/SantanderTransaction/train.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.765795
import torch from sklearn import metrics from tqdm import tqdm import torch.nn as nn import torch.optim as optim from utils import get_predictions from dataset import get_data from torch.utils.data import DataLoader import torch.nn.functional as F class NN(nn.Module): def __init__(self, input_size, hidden_dim): ...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Facial Keypoint Detection Competition/extract_images_from_csv.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.767074
import numpy as np import pandas as pd import os from PIL import Image def extract_images_from_csv(csv, column, save_folder, resize=(96, 96)): if not os.path.exists(save_folder): os.makedirs(save_folder) for idx, image in enumerate(csv[column]): image = np.array(image.split()).astype(np.uint8...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/SantanderTransaction/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.773992
import pandas as pd import numpy as np import torch def get_predictions(loader, model, device): model.eval() saved_preds = [] true_labels = [] with torch.no_grad(): for x,y in loader: x = x.to(device) y = y.to(device) scores = model(x) saved_pred...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/DeepSort/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.775181
import torch def ask_user(): print("Write your array as a list [i,j,k..] with arbitrary positive numbers") array = input("Input q if you want to quit \n") return array def sort_array(encoder, decoder, device, arr=None): """ A very simple example of use of the model Input: encoder...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/DeepSort/sort_w_attention.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.776863
""" Training a Pointer Network which is a modified Seq2Seq with attention network for the task of sorting arrays. """ from torch.utils.data import ( Dataset, DataLoader, ) import random import torch import torch.nn as nn import torch.optim as optim from utils import sort_array, save_checkpoint, load_checkpoint...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/Facial Keypoint Detection Competition/train.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.807989
import torch from dataset import FacialKeypointDataset from torch import nn, optim import os import config from torch.utils.data import DataLoader from tqdm import tqdm from efficientnet_pytorch import EfficientNet from utils import ( load_checkpoint, save_checkpoint, get_rmse, get_submission ) def tr...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Kaggles/SantanderTransaction/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:10:46.830762
import pandas as pd import torch from torch.utils.data import TensorDataset from torch.utils.data.dataset import random_split from math import ceil def get_data(): train_data = pd.read_csv("new_shiny_train.csv") y = train_data["target"] X = train_data.drop(["ID_code", "target"], axis=1) X_tensor = torc...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/networks/lenet.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.303432
import torch import torch.nn as nn import torch.nn.functional as F class LeNet(nn.Module): def __init__(self, in_channels, init_weights=True, num_classes=10): super(LeNet, self).__init__() self.num_classes = num_classes if init_weights: self._initialize_weights() sel...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/networks/googLeNet.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.304579
import torch import torch.nn as nn import torch.nn.functional as F class Inception(nn.Module): def __init__( self, in_channels, out1x1, out3x3reduced, out3x3, out5x5reduced, out5x5, outpool ): super().__init__() self.branch_1 = BasicConv2d(in_channels, out1x1, kernel_size=1, stride=1)...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/utils/import_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.385980
from utils.mnist_data import mnist_data from utils.utils import check_accuracy, save_checkpoint, visdom_plotting, load_model
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/networks/import_all_networks.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.387010
from networks.vgg import VGG from networks.lenet import LeNet from networks.resnet import ResNet, residual_template, ResNet50, ResNet101, ResNet152 from networks.googLeNet import BasicConv2d, Inception, GoogLeNet
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/train.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.389247
import argparse import os import shutil import torch import torch.nn as nn import torch.optim as optim import torch.utils.data import torchvision.transforms as transforms import torchvision.datasets as datasets import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader, SubsetRandomSampler from net...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/networks/resnet.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.394780
import torch import torch.nn as nn class residual_template(nn.Module): expansion = 4 def __init__(self, in_channels, out_channels, stride=1, identity_downsample=None): super().__init__() self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, bias=False) self.bn1 = nn.BatchNo...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/utils/mnist_data.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.395813
import numpy as np import torchvision.datasets as datasets from torch.utils.data import DataLoader, SubsetRandomSampler class mnist_data(object): def __init__( self, shuffle, transform_train, transform_test, num_workers=0, create_validation_set=True, batch_s...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/networks/vgg.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.416099
import torch import torch.nn as nn VGG_types = { "VGG11": [64, "M", 128, "M", 256, 256, "M", 512, 512, "M", 512, 512, "M"], "VGG13": [64, 64, "M", 128, 128, "M", 256, 256, "M", 512, 512, "M", 512, 512, "M"], "VGG16": [ 64, 64, "M", 128, 128, "M", 256...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/Exploring_MNIST/utils/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.417960
import torch import visdom import os device = "cuda" if torch.cuda.is_available() else "cpu" dtype = torch.float32 def save_checkpoint(filename, model, optimizer, train_acc, epoch): save_state = { "state_dict": model.state_dict(), "acc": train_acc, "epoch": epoch + 1, "optimizer":...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/spam_classifier_naive_bayes/build_vocabulary.py
null
null
null
null
null
null
Python
2026-05-04T02:10:47.456076
# -*- coding: utf-8 -*- """ We want go through each word in all emails, check if the word is an actual english word by comparing with nltk.corpus words and if it is then add it to our vocabulary. """ import pandas as pd import nltk from nltk.corpus import words vocabulary = {} data = pd.read_csv("data/emails.csv") n...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/spam_classifier_naive_bayes/naivebayes.py
null
null
null
null
null
null
Python
2026-05-04T02:10:48.314577
""" Naive Bayes Classifier Implementation from scratch To run the code structure the code in the following way: X be size: (num_training_examples, num_features) y be size: (num_classes, ) Where the classes are 0, 1, 2, etc. Then an example run looks like: NB = NaiveBayes(X, y) NB.fit(X) prediction...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/spam_classifier_naive_bayes/create_freq_vectors.py
null
null
null
null
null
null
Python
2026-05-04T02:10:48.391562
# -*- coding: utf-8 -*- """ Having created our vocabulary we now need to create the dataset X,y which we will create by doing frequency vector for each email. For example if our vocabulary has the words [aardkvark, ..., buy, ... money, .... zulu] We go through each email and count up how many times each word was rep...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/albumentations_tutorial/detection.py
null
null
null
null
null
null
Python
2026-05-04T02:10:48.439890
import cv2 import albumentations as A import numpy as np from utils import plot_examples from PIL import Image image = cv2.imread("images/cat.jpg") image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) bboxes = [[13, 170, 224, 410]] # Pascal_voc (x_min, y_min, x_max, y_max), YOLO, COCO transform = A.Compose( [ ...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/custom_dataset/custom_dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:10:48.457479
""" Example of how to create custom dataset in Pytorch. In this case we have images of cats and dogs in a separate folder and a csv file containing the name to the jpg file as well as the target label (0 for cat, 1 for dog). Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 2020-04-03 Initial cod...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/custom_dataset_txt/loader_customtext.py
null
null
null
null
null
null
Python
2026-05-04T02:10:48.919163
""" Introductory tutorial on how to deal with custom text datasets in PyTorch. Note that there are better ways to do this when dealing with huge text datasets. But this is a good way of understanding how it works and can be used as a starting point, particularly for smaller/medium datasets. Programmed by Aladdin Pers...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/lightning_simple_CNN.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.028734
""" Simple pytorch lightning example """ # Imports import torch import torch.nn.functional as F # Parameterless functions, like (some) activation functions import torchvision.datasets as datasets # Standard datasets import torchvision.transforms as transforms # Transformations we can perform on our dataset for augm...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/albumentations_tutorial/classification.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.049059
import cv2 import albumentations as A import numpy as np from utils import plot_examples from PIL import Image from tqdm import tqdm image = Image.open("images/elon.jpeg") transform = A.Compose( [ A.Resize(width=1920, height=1080), A.RandomCrop(width=1280, height=720), A.Rotate(limit=40, p...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_init_weights.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.091669
""" Example code of how to initialize weights for a simple CNN network. Usually this is not needed as default initialization is usually good, but sometimes it can be useful to initialize weights in a specific way. This way of doing it should generalize to other network types just make sure to specify and change the mo...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/Imbalanced_classes/main.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.092765
""" This code is for dealing with imbalanced datasets in PyTorch. Imbalanced datasets are those where the number of samples in one or more classes is significantly lower than the number of samples in the other classes. This can be a problem because it can lead to a model that is biased towards the more common classe...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_bidirectional_lstm.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.097628
""" Example code of a simple bidirectional LSTM on the MNIST dataset. Note that using RNNs on image data is not the best idea, but it is a good example to show how to use RNNs that still generalizes to other tasks. Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 2020-05-09 Initial coding * ...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Projects/text_generation_babynames/generating_names.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.140138
""" Text generation using a character LSTM, specifically we want to generate new names as inspiration for those having a baby :) Although this is for name generation, the code is general in the way that you can just send in any large text file (shakespear text, etc) and it will generate it. Programmed by Aladdin Per...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/albumentations_tutorial/full_pytorch_example.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.143470
import torch import numpy as np import cv2 from PIL import Image import torch.nn as nn import albumentations as A from albumentations.pytorch import ToTensorV2 from torch.utils.data import Dataset import os class ImageFolder(Dataset): def __init__(self, root_dir, transform=None): super(ImageFolder, self)....
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/albumentations_tutorial/segmentation.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.152487
import cv2 import albumentations as A import numpy as np from utils import plot_examples from PIL import Image image = Image.open("images/elon.jpeg") mask = Image.open("images/mask.jpeg") mask2 = Image.open("images/second_mask.jpeg") transform = A.Compose( [ A.Resize(width=1920, height=1080), A.Ra...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/albumentations_tutorial/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.158790
import random import cv2 from matplotlib import pyplot as plt import matplotlib.patches as patches import numpy as np import albumentations as A def visualize(image): plt.figure(figsize=(10, 10)) plt.axis("off") plt.imshow(image) plt.show() def plot_examples(images, bboxes=None): fig = plt.figur...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_loadsave.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.782480
""" Small code example of how to save and load checkpoint of a model. This example doesn't perform any training, so it would be quite useless. In practice you would save the model as you train, and then load before continuining training at another point. Video explanation of code & how to save and load model: https:...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_lr_ratescheduler.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.950684
""" Example code of how to use a learning rate scheduler simple, in this case with a (very) small and simple Feedforward Network training on MNIST dataset with a learning rate scheduler. In this case ReduceLROnPlateau scheduler is used, but can easily be changed to any of the other schedulers available. I think simply ...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_rnn_gru_lstm.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.954728
""" Example code of a simple RNN, GRU, LSTM on the MNIST dataset. Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 2020-05-09 Initial coding * 2022-12-16 Updated with more detailed comments, docstrings to functions, and checked code still functions as intended. """ # Imports import torch im...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_progress_bar.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.966747
""" Example code of how to set progress bar using tqdm that is very efficient and nicely looking. Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 2020-05-09 Initial coding * 2022-12-19 Updated with more detailed comments, and checked code works with latest PyTorch. """ import torch import ...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_pretrain_finetune.py
null
null
null
null
null
null
Python
2026-05-04T02:10:49.996436
""" Shows a small example of how to load a pretrain model (VGG16) from PyTorch, and modifies this to train on the CIFAR10 dataset. The same method generalizes well to other datasets, but the modifications to the network may need to be changed. Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 202...
aladdinpersson/Machine-Learning-Collection
https://github.com/aladdinpersson/Machine-Learning-Collection
null
null
null
null
8,435
null
null
mit
null
null
null
null
null
null
null
ML/Pytorch/Basics/pytorch_mixed_precision_example.py
null
null
null
null
null
null
Python
2026-05-04T02:10:50.107909
""" Example code of how to use mixed precision training with PyTorch. In this case with a (very) small and simple CNN training on MNIST dataset. This example is based on the official PyTorch documentation on mixed precision training. Programmed by Aladdin Persson <aladdin.persson at hotmail dot com> * 2020-04-10 I...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/datatype.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.129131
#!/usr/bin/env python from thirdparty.odict import OrderedDict # Reference: https://www.kunxi.org/2014/05/lru-cache-in-python class LRUDict(object): """ This class defines the LRU dictionary >>> foo = LRUDict(capacity=2) >>> foo["first"] = 1 >>> foo["second"] = 2 >>> foo["third"] = 3 >>> ...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/compat.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.132693
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import sys if sys.version_info >= (3, 0): xrange = range else: xrange = xrange
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/colorized.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.159573
#!/usr/bin/env python import os import re import sys from core.enums import BACKGROUND from core.enums import COLOR from core.enums import SEVERITY IS_TTY = hasattr(sys.stdout, "fileno") and os.isatty(sys.stdout.fileno()) class ColorizedStream: def __init__(self, original): self._original = original ...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/enums.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.334368
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import sys from thirdparty import six class _(type): def __getattr__(self, attr): return attr @six.add_metaclass(_) class TRAIL(object): pa...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/addr.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.336432
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.compat import xrange def addr_to_int(value): _ = value.split('.') return (int(_[0]) << 24) + (int(_[1]) << 16) + (int(_[2]) << 8...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.337582
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ pass
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/httpd.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.338683
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import datetime import glob import gzip import hashlib import io import json import mimetypes import os import re import...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/ignore.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.339854
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function # simple ignore rule mechanism configured by file 'misc/ignore_event.txt' and/or user defined `USER_IGNORELIST` import ...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/common.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.568925
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import csv import gzip import io import os import re import sqlite3 import sys import zipfile import zlib from core.ad...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/settings.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.953037
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import os import re import socket import stat import struct import subprocess import sys from core.addr import addr_to_...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/parallel.py
null
null
null
null
null
null
Python
2026-05-04T02:10:55.971367
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import os import struct import threading import time from core.common import load_trails from core.enums import BLOCK_MARKER from core.settings import BLOCK_...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/log.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.001925
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import datetime import json import os import re import signal import socket import sys import threading import time impo...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/attribdict.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.153331
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ class AttribDict(dict): def __getattr__(self, name): return self.get(name) def __setattr__(self, name, value): self[name] = value
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
plugins/peek.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.155374
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import sys import string import time TIME_FORMAT = "%Y-%m-%d %H:%M:%S" def plugin(event_tuple, packet=None): sec, usec, src_ip, src_port, dst_ip, dst_po...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/trailsdict.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.157187
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re class TrailsDict(dict): def __init__(self): self._trails = {} self._regex = "" self._infos = [] self._reverse_i...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
plugins/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.158092
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ pass
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
plugins/strings.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.159023
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re import sys import time TIME_FORMAT = "%Y-%m-%d %H:%M:%S" def plugin(event_tuple, packet=None): sec, usec, src_ip, src_port, dst_ip, dst_port, ...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
core/update.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.182823
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import codecs import csv import glob import inspect import os import re import sqlite3 import sys import time sys.dont_...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
sensor.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.361691
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function # Requires: Python >= 2.6 import sys sys.dont_write_bytecode = True import cProfile import inspect import math impor...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
server.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.796792
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function # Requires: Python >= 2.6 import sys sys.dont_write_bytecode = True import optparse import os import platform import...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
thirdparty/odict/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:56.833206
#!/usr/bin/env python import sys if sys.version_info[:2] >= (2, 7): from collections import OrderedDict else: from ordereddict import OrderedDict
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/alienvault.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.002554
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://reputation.alienvault.com/reputation.generic" __check__ = " # Malicious" __info__ = "bad reputati...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/atmos.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.178221
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import fetch_headers from core.common import retrieve_content __url__ = "https://cybercrime-tracker.net/ccam.php" __check__ = "At...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/custom/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.180809
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import glob import os import re from core.settings import config from core.settings import ROOT_DIR from core.settings import UNICODE_ENCODING from thirdpart...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
thirdparty/six/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.181429
# Copyright (c) 2010-2024 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.182478
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ pass
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/abuseipdb.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.184286
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://raw.githubusercontent.com/borestad/blocklist-abuseipdb/main/abuseipdb-s100-1d.ipv4" __check__ = "...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
thirdparty/odict/ordereddict.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.185494
# Copyright (c) 2009 Raymond Hettinger # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish,...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/badips.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.797037
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://www.badips.com/get/list/any/2?age=7d" __backup__ = "https://iplists.firehol.org/files/bi_any_2_7d...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/binarydefense.py
null
null
null
null
null
null
Python
2026-05-04T02:10:57.798420
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://www.binarydefense.com/banlist.txt" __check__ = "ATIF feed" __info__ = "known attacker" __referenc...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/bitcoinnodes.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.097350
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/bitcoin_nodes_1d.ipset" __check__ = "bi...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/blackbook.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.099289
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://raw.githubusercontent.com/stamparm/blackbook/master/blackbook.csv" __check__ = "Malware" __refere...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/cleantalk.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.294872
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import retrieve_content __url__ = "https://iplists.firehol.org/files/cleantalk_1d.ipset" __check__ = "[CleanTalk]" __info__ = "sp...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/blocklist.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.296579
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://lists.blocklist.de/lists/all.txt" __info__ = "known attacker" __reference__ = "blocklist.de" def...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/blackholemonster.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.298657
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://blackhole.monster/blackhole-today" __check__ = ".1" __info__ = "known attacker" __reference__ = "...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/bruteforceblocker.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.300254
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "http://danger.rulez.sk/projects/bruteforceblocker/blist.php" __check__ = "Last Reported" __info__ = "know...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/ciarmy.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.301591
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "http://cinsscore.com/list/ci-badguys.txt" __info__ = "known attacker" __reference__ = "cinsscore.com" de...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/botscout.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.302136
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/botscout_1d.ipset" __check__ = "botscou...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/cybercrimetracker.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.631244
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import fetch_headers from core.common import retrieve_content __url__ = "https://cybercrime-tracker.net/all.php" __check__ = "cp....
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/cobaltstrike.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.657368
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import datetime from core.common import retrieve_content __url__ = "https://raw.githubusercontent.com/fox-it/cobaltstrike-extraneous-space/master/cobaltstri...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/dshieldip.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.725307
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://iplists.firehol.org/files/dshield_top_1000.ipset" __check__ = ".1" __info__ = "known attacker" __...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/dataplane.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.762143
#!/usr/bin/env python """ See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://dataplane.org/*.txt" __check__ = "Dataplane.org" __info__ = "known attacker" __reference__ = "dataplane.org" def fetch(): retval = {} for url in ("https://dataplane.org/dns...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/emergingthreatsdns.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.888401
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import binascii import re from core.common import retrieve_content __url__ = "https://rules.emergingthreats.net/open/suricata/rules/emerging-malware.rules" ...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/emergingthreatsbot.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.891638
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import retrieve_content __url__ = "https://rules.emergingthreats.net/open/suricata/rules/botcc.rules" __check__ = "CnC Server" __...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/emergingthreatscip.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.895382
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://rules.emergingthreats.net/open/suricata/rules/compromised-ips.txt" __info__ = "compromised (suspi...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/feodotrackerip.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.896281
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt" __check__ = "Feodo" __info__ = "emot...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/fareit.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.908850
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import fetch_headers from core.common import retrieve_content __url__ = "https://cybercrime-tracker.net/ccpmgate.php" __check__ =...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/gpfcomics.py
null
null
null
null
null
null
Python
2026-05-04T02:10:58.987737
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://iplists.firehol.org/files/gpf_comics.ipset" __check__ = "comics" __info__ = "known attacker" __re...
stamparm/maltrail
https://github.com/stamparm/maltrail
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
trails/feeds/greensnow.py
null
null
null
null
null
null
Python
2026-05-04T02:10:59.219240
#!/usr/bin/env python """ Copyright (c) 2014-2026 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content from core.settings import NAME __url__ = "https://blocklist.greensnow.co/greensnow.txt" __check__ = ".1" __info__ = ...
gelstudios/gitfiti
https://github.com/gelstudios/gitfiti
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
tests/test_str_to_sprite.py
null
null
null
null
null
null
Python
2026-05-04T02:11:01.531545
from gitfiti import str_to_sprite, ONEUP_STR SYMBOLS = ''' ******* *=~~-~~=* *~~---~~* *=*****=* **-*-*-** *-----* ***** ''' NUMBERS = [ [0,4,4,4,4,4,4,4,0], [4,3,2,2,0,2,2,3,4], [4,2,2,0,0,0,2,2,4], [4,3,4,4,4,4,4,3,4], [4,4,0,4,0,4,0,4,4], [0,4,0,0,0,0,0,4,0], [0,0,4,4,4,4,4,0,0], ] def tes...
gelstudios/gitfiti
https://github.com/gelstudios/gitfiti
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
gitfiti.py
null
null
null
null
null
null
Python
2026-05-04T02:11:01.532318
#!/usr/bin/env python # # Copyright (c) 2013 Eric Romano (@gelstudios) # released under The MIT license (MIT) http://opensource.org/licenses/MIT # """ gitfiti noun : Carefully crafted graffiti in a GitHub commit history calendar """ from datetime import datetime, timedelta import itertools import json import math imp...
gelstudios/gitfiti
https://github.com/gelstudios/gitfiti
null
null
null
null
8,426
null
null
mit
null
null
null
null
null
null
null
tests/test_find_max_daily_commits.py
null
null
null
null
null
null
Python
2026-05-04T02:11:01.607542
from gitfiti import find_max_daily_commits, parse_contributions_calendar CONTRIBUTIONS_CALENDAR_SVG = '''\ <svg width="721" height="110" class="js-calendar-graph-svg"> <g transform="translate(20, 20)"> <g transform="translate(624, 0)"> <rect class="day" width="11" height="11" y="0" fill="#eeeeee" da...
lucidrains/imagen-pytorch
https://github.com/lucidrains/imagen-pytorch
null
null
null
null
8,407
null
null
mit
null
null
null
null
null
null
null
imagen_pytorch/data.py
null
null
null
null
null
null
Python
2026-05-04T02:11:05.052618
from pathlib import Path from functools import partial import torch from torch import nn from torch.utils.data import Dataset, DataLoader from torchvision import transforms as T from imagen_pytorch import t5 from torch.nn.utils.rnn import pad_sequence from PIL import Image from datasets.utils.file_utils import get_d...