Skip to content

Instantly share code, notes, and snippets.

View VinACE's full-sized avatar
💭
I may be slow to respond.

VinACE

💭
I may be slow to respond.
View GitHub Profile
@VinACE
VinACE / gist:2874565c9906d87980904ee8039005f5
Created February 1, 2023 07:30
Rename_files from 1 to N
import os
path = '/path/to/folder'
# Get all the .png files in the folder
files = [file for file in os.listdir(path) if file.endswith('.png')]
# Sort the files
files.sort()
@VinACE
VinACE / anomaly_detection.txt
Last active August 22, 2022 15:13
anomaly_detection_xpress
https://github.com/tianyu0207/RTFM
https://github.com/seominseok0429/Real-world-Anomaly-Detection-in-Surveillance-Videos-pytorch -->
https://github.com/fjchange/MIST_VAD-->
https://github.com/OmRajpurkar/Alert-Generation-on-Detection-of-Suspicious-Activity-using-Transfer-Learning
@VinACE
VinACE / pytorch_textclassification
Created November 19, 2020 16:40
pytorch_textclassification
https://www.kaggle.com/mlwhiz/multiclass-text-classification-pytorch
https://towardsdatascience.com/text-classification-with-state-of-the-art-nlp-library-flair-b541d7add21f
https://towardsdatascience.com/how-to-beat-automl-hyperparameter-optimisation-with-flair-3b2f5092d9f5
https://github.com/pytorch/text/blob/master/torchtext/experimental/datasets/text_classification.py
@VinACE
VinACE / Latex_table
Last active November 28, 2020 19:04
Latex_tables
https://www.math.utk.edu/~finotti/files/latex/LaTeX_Symbols.pdf --- symbol pdf...
https://tex.stackexchange.com/questions/345379/table-in-two-column
Latex_tables - two column width...
\begin{table*}[!hbt]
\caption{Comparison of our evaluation scores with other references}\label{tab:apis}
\small
\begin{center}
\begin{tabular}{|l|l|l|l|l|l|}
The Python code to convert refs.bib file to bibitem file
python2 bibtex2item.py < refs.bib > bibitem.txt
https://tex.stackexchange.com/questions/124874/converting-to-bibitem-in-latex
# filename: bibtex2item.py
import sys
bibtex = sys.stdin.read()
@VinACE
VinACE / f-score precision recall
Last active September 17, 2020 09:35
f-score precision recall
https://machinelearningmastery.com/precision-recall-and-f-measure-for-imbalanced-classification/ -- Calculate Recall With Scikit-Learn
@VinACE
VinACE / seq2seq_test_example
Created August 25, 2020 16:11
seq2seq_test_example
"""
# https://github.com/bentrevett/pytorch-seq2seq/issues/129
# https://github.com/bentrevett/pytorch-seq2seq/blob/master/6%20-%20Attention%20is%20All%20You%20Need.ipynb
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torchtext
from torchtext.datasets import Multi30k
@VinACE
VinACE / layers issues
Last active August 24, 2020 03:17
layer issu
> /content/trans-vsumm/seq_sum.py(78)forward()
-> src = layer(src, src_mask)
(Pdb) src.shape
torch.Size([461, 1024, 256])
(Pdb) src_mask.shape
torch.Size([461, 1, 1, 1024])
> /content/trans-vsumm/seq_sum.py(78)forward()
-> src = layer(src, src_mask)
@VinACE
VinACE / debugging python on collab
Created August 20, 2020 11:19
debugging python on colab
%xmode Verbose
%pdb on
from IPython.core.debugger import set_trace #set_trace()
@VinACE
VinACE / paper_writing
Last active January 5, 2021 10:57
paper_writing
https://www.youtube.com/watch?v=UY7sVKJPTMA
> resist the temptation of procrastination
> review the latest happenings in your research area
> Have a outline of the paper so that you can start from where you have left
Tables of data , Figures.. put them in order... Logical sequence..like you arrange for a talk..
Don't write the introduction/Abstract.. at this time..