Skip to content

Instantly share code, notes, and snippets.

import dataclasses
import logging
from typing import Iterator, Tuple
import tensorflow_datasets as tfds
CATEGORIES = [
'bottle',
'cable',
'capsule',
@salty-vanilla
salty-vanilla / Dockerfile
Created June 15, 2020 12:04
Dockerfile for hugo
FROM golang:latest
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install --no-install-recommends \
gosu \
nano \
tmux \
openssh-server && \
@salty-vanilla
salty-vanilla / Dockerfile
Created June 15, 2020 12:03
Dockerfile for go
FROM golang:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install --no-install-recommends \
gosu \
nano \
libgtk-3-dev \
libpng-dev \
libjpeg-dev \
@salty-vanilla
salty-vanilla / Dockerfile
Last active June 15, 2020 12:02
Dockerfile for pytorch1.4
FROM pytorch/pytorch:1.4-cuda10.1-cudnn7-devel
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install --no-install-recommends \
gosu \
nano \
git \
libgtk-3-dev \
libpng-dev \
@salty-vanilla
salty-vanilla / Dockerfile
Last active April 29, 2020 11:50
Dockerfile_for_tf2.1.0
FROM tensorflow/tensorflow:2.1.0-gpu-py3
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install --no-install-recommends \
gosu \
nano \
git \
python3-opencv \
libgtk-3-dev \
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>IEEE WITHOUT MONTH</title>
<id>
http://csl.mendeley.com/styles/styles/ieee-wo-month-cap
</id>
<link href="http://www.zotero.org/styles/ieee" rel="self"/>
<link href="http://www.ieee.org/documents/style_manual.pdf" rel="documentation"/>
<link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/>
<author>
import chainer
import numpy as np
class AdaBatchNorm(chainer.Link):
def __init__(self, nb_classes,
size=None):
super().__init__()
with self.init_scope():
self.bn = [chainer.links.BatchNormalization(size,
##########
# create
##########
import tensorflow as tf
from PIL import Image
import os
import numpy as np
# -*- coding: utf-8 -*-
"""Untitled2.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1AKSHWoeYw-7hs0Rg8s0W8EbONY3pSAAJ
"""
import tensorflow as tf
import urllib.request
from bs4 import BeautifulSoup
import os
import argparse
import csv
DST_DIR = '../images/safebooru'
START_PAGE = 0
END_PAGE = 1001