Skip to content

Instantly share code, notes, and snippets.

@eyaler
eyaler / graph.json
Last active December 26, 2023 07:36
Force-Directed Graph with Drag/Zoom/Pan/Center/Resize/Labels/Shapes/Filter/Highlight
{
"graph": [],
"links": [
{"source": 0, "target": 1},
{"source": 0, "target": 2},
{"source": 0, "target": 3},
{"source": 0, "target": 4},
{"source": 0, "target": 5},
{"source": 0, "target": 6},
{"source": 1, "target": 3},
@eyaler
eyaler / timestributed_dropout_error
Created October 25, 2016 16:12
timedistributed(dropout) error when batch_size is specified and using theano
import numpy
from keras.models import Model
from keras.layers import Input, Dropout, TimeDistributed
batch_size = 10
timesteps = 5
nb_features = 7
dropout = 0.5
input = Input(batch_shape=(batch_size, timesteps, nb_features))
@eyaler
eyaler / junkie.ipynb
Last active March 30, 2023 13:35
junkie.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eyaler
eyaler / image.html
Created August 26, 2020 21:03
A complete solution to the window fitting image scaling display problem in HTML
<!DOCTYPE html>
<html>
<body style="overflow:hidden; margin:0; text-align:center;">
<img src="https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_2500kB.jpg" style="height:100vh; max-width:100%; object-fit: contain;">
</body>
</html>
@eyaler
eyaler / notebook.ipynb
Last active August 19, 2022 04:56
siren_video.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eyaler
eyaler / gsheet_fetcher.py
Last active August 7, 2021 19:36
gsheet_fetcher.py
# to run:
# python gsheet_fetcher.py
try:
import requests # faster - need to pip install requests
get = requests.get
req = True
except:
import urllib.request
get = urllib.request.urlopen
@eyaler
eyaler / openpose-video2bvh.ipynb
Created October 27, 2021 16:06
openpose+video2bvh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eyaler
eyaler / delchunk.py
Last active November 23, 2022 01:10
Delete chunks from a large file
"""Usage: python3 delchunk.py BIG_FILE CHUNK_FILE_OR_FOLDER [OUT_FILE]
Given a large file BIG_FILE, delete all complete non-overlapping (and possibly large) chunks given by CHUNK_FILE_OR_FOLDER
While each chunk file is treated statelessly (AABABB-AB=AB), multiple chunk files are treated statefully (ACABDB-AB-CD=AB)
Multiple chunk files will be deleted from the largest to the smallest (and secondarily by chunk filename)
If OUT_FILE is omitted, will do a dryrun
"""
import mmap
@eyaler
eyaler / rudalle-outpainting.ipynb
Last active December 23, 2022 19:49
ruDALLE-Outpainting.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eyaler
eyaler / deep-painterly-harmonization.ipynb
Last active September 23, 2024 17:14
deep-painterly-harmonization.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.