Skip to content

Instantly share code, notes, and snippets.

View Marvinmw's full-sized avatar

Marvinmw

  • Moon and Earth
  • Moon and Earth
View GitHub Profile
@Marvinmw
Marvinmw / texttopdftools.md
Created November 24, 2022 09:47 — forked from geramirez/texttopdftools.md
Command Line Text to PDF Tools
@Marvinmw
Marvinmw / pad_packed_demo.py
Created March 17, 2021 19:46 — forked from HarshTrivedi/pad_packed_demo.py
Minimal tutorial on packing (pack_padded_sequence) and unpacking (pad_packed_sequence) sequences in pytorch.
import torch
from torch import LongTensor
from torch.nn import Embedding, LSTM
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium']
#
# Step 1: Construct Vocabulary
# Step 2: Load indexed data (list of instances, where each instance is list of character indices)
@Marvinmw
Marvinmw / README.md
Created July 26, 2020 00:58 — forked from jeanlescure/README.md
Ubuntu/Debian Offline Repository Creation

Ubuntu/Debian Offline Repository Creation Gist

When I googled how to create my own offline repository of packages for use in an offline Ubuntu/Debian machine, the results where disheartening and the steps to be taken scattered all over the place.

The files within this gist will allow you to:

  • Download specific apt-get packages... with dependencies included!
  • Create a Packages.gz file so that you can add the repository folder you create to the target machine's /etc/apt/sources.list file.

Before using