Skip to content

Instantly share code, notes, and snippets.

View MikulasZelinka's full-sized avatar
🐯

myke MikulasZelinka

🐯
View GitHub Profile
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@HarshTrivedi
HarshTrivedi / pad_packed_demo.py
Last active March 2, 2024 16:49 — forked from Tushar-N/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)
@MikulasZelinka
MikulasZelinka / README.md
Last active October 19, 2023 20:58
Celery Python – minimal example (app is started from Python, task is also sent from Python)

Execute in the following order:

docker run -d -p 6379:6379 redis
python celery_app.py
@noelbundick
noelbundick / LICENSE
Last active October 5, 2023 04:20
Solarized Dark for Bash on Windows
MIT License
Copyright (c) 2018 Noel Bundick
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, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@MikulasZelinka
MikulasZelinka / pytorch_pad_pack_minimal.py
Last active August 2, 2023 07:51
pytorch: handling sentences of arbitrary length (dataset, data_loader, padding, embedding, packing, lstm, unpacking)
"""
sort-of minimal end-to-end example of handling input sequences (sentences) of variable length in pytorch
the sequences are considered to be sentences of words, meaning we then want to use embeddings and an RNN
using pytorch stuff for basically everything in the pipeline of:
dataset -> data_loader -> padding -> embedding -> packing -> lstm -> unpacking (~padding)
based mostly on: https://github.com/HarshTrivedi/packing-unpacking-pytorch-minimal-tutorial
pytorch version 1.4.0
gist url: https://gist.github.com/MikulasZelinka/9fce4ed47ae74fca454e88a39f8d911a
"""
// ==UserScript==
// @name Auto best quality for videos in Google Photos
// @namespace mikulas.zelinka.dev
// @version 0.1
// @description Tampermonkey script that selects the best quality for all embedded youtube videos when the page/player is loaded (at least those that are served with the same URL as those in Google Photos).
// @author Mikuláš Zelinka
// @match https://youtube.googleapis.com/embed/*
// @grant none
// ==/UserScript==
@ishani
ishani / gist:ee160ca4eabb32ceb411
Last active September 18, 2016 23:59
Gfycat for Jekyll
# Title: Gfycat JS tags for Jekyll
# Author: Harry Denholm, ishani.org
# Description: plug the custom gfycat image tags into a page
#
# updated 02/02/2016
#
# Syntax {% gfycat gfy_name %}
#
# Example:
# {% gfycat LateLikelyDassierat %}