Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
from PIL import Image
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
# smooth values from point a to point b.
STEPS = 100
pt_a = np.random.normal(size=(512))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@h4cc
h4cc / howto.md
Created March 15, 2016 12:21
Revert a Synology Diskstation from 6.0 beta back to 5.2

Activate SSH

Connect via SSH with either ssh root@IP or ssh admin@IP and sudo su

Change VERSION file as needed. vi /etc.defaults/VERSION Change:

@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active March 1, 2024 04:17
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@NZKoz
NZKoz / solar87
Created March 28, 2013 01:38
Riyadh Solar Time
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# So much for footnotes about Saudi Arabia.
# Apparent noon times below are for Riyadh; your mileage will vary.
# Times were computed using formulas in the U.S. Naval Observatory's
# Almanac for Computers 1987; the formulas "will give EqT to an accuracy of
# [plus or minus two] seconds during the current year."
#
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@stefanv
stefanv / sparks.py
Created November 17, 2011 00:25
Command line sparks in Python
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <stefan@sun.ac.za>
"""
USAGE: