This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import os | |
from PIL import Image | |
names = [] | |
# https://www.kaggle.com/competitions/imagenet-object-localization-challenge/overview | |
file_path = './LOC_synset_mapping.txt' | |
# path to the imagenet folder | |
imagenet_path = './imagenet' | |
out_path = './imagenet128' | |
os.makedirs(out_path, exist_ok=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import svgpathtools | |
from svgpathtools import svg2paths2 | |
paths, attributes, svg_attributes = svg2paths2('doubleset.svg') | |
SCALE = 10 | |
print("\\begin{tikzpicture}") | |
for path in paths: | |
print("\\begin{scope}") | |
for b in path: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
N = 10 | |
T = 300 | |
random_seed = 0 | |
np.random.seed(random_seed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib import animation | |
from matplotlib.collections import PatchCollection | |
fig = plt.figure() | |
ax = plt.axes(xlim=(-1.5, 1.5), ylim=(-1.5, 1.5), aspect='equal') | |
# not visible |
NewerOlder