This file contains hidden or 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
#!/bin/bash | |
# | |
# USE AT YOUR OWN RISK ! | |
# | |
# Based on ideas from these articles: | |
# https://forum.xda-developers.com/s10-plus/how-to/s10-s10-bloatware-package-list-t4054003 | |
# https://medium.com/@kaikoenig/samsungs-bloatware-disgrace-c7d14a298ad7 | |
# |
This file contains hidden or 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
#!/usr/bin/env bash | |
"""Monitor a directory and rsync to a remote host on file change. | |
Example usage: | |
./rsync-watch.sh [email protected] . /home/pi/myproject | |
""" | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
YELLOW=`tput setaf 3` |
This file contains hidden or 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
# Note – this is not a bash script (some of the steps require reboot) | |
# I named it .sh just so Github does correct syntax highlighting. | |
# | |
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
# | |
# The CUDA part is mostly based on this excellent blog post: | |
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
# Install various packages | |
sudo apt-get update |
This file contains hidden or 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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
This file contains hidden or 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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains hidden or 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
class BaseShardedCountModel(BaseModel): | |
# services | |
# - in-memory counts | |
# - getting counter name from entity | |
# - check for transition | |
def counter(self, name): | |
from lib.shardedcounter import Counter | |
return Counter(str(name + '_' + str(self.key().id()))) | |
def getshardedcount(self, name): |
This file contains hidden or 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
;; hans's solution to Rotate Sequence | |
;; https://4clojure.com/problem/44 | |
(fn [rot xs] | |
(let [rot (mod rot (count xs)) | |
rot (if (neg? rot) (+ (count xs) rot) rot)] | |
(loop [rot rot at-end [] x (first xs) xs (rest xs)] | |
(if (= rot 0) | |
(concat (cons x xs) at-end) | |
(recur (dec rot) (conj at-end x) (first xs) (rest xs)))))) |