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
# I used this shell.nix to build LineageOS 21.0 for redfin (Google Pixel 5) | |
# | |
# IMPORANT NOTE: I had to use a pure shell for my builds to work, i.e: `nix-shell --pure` rather than `nix-shell` | |
# | |
# The build instructions are here: https://wiki.lineageos.org/devices/redfin/build | |
# | |
# Warning (from forked gist, was added August 1st 2018): | |
# The hardened NixOS kernel disables 32 bit emulation, which made me run into multiple "Exec format error" errors. | |
# To fix, use the default kernel, or enable "IA32_EMULATION y" in the kernel config. | |
# |
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
blueprint: | |
name: State Based Entity Control | |
description: Change the target entity to desired entity state base on the trigger entity's state, illuminance sensor's state, Sun elevation and so on. | |
domain: automation | |
input: | |
trigger_entity: | |
name: Trigger Entity | |
description: This entity will trigger the automation. | |
selector: | |
entity: |
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
blueprint: | |
name: Heating Control | |
description: Control your heating with options for person home, if temp is below a specific value, set temp, and heating between specific times. | |
domain: automation | |
input: | |
heating: | |
name: Climate Device | |
description: The climate device to use. | |
selector: | |
entity: |
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
FROM alpine:3.11 AS build | |
ARG CHANNEL=unstable | |
ARG VERSION=0.99.1-127 | |
ARG ARCH=amd64 | |
RUN mkdir /build | |
WORKDIR /build | |
RUN apk add --no-cache curl tar |
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
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone | |
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build | |
# For NixOS, follow those instructions but skip anything related to installing packages | |
# Detailed instructions: | |
# cd into an empty directory of your choice | |
# copy this file there | |
# in nix-shell: | |
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0 | |
# $ repo sync | |
# $ source build/envsetup.sh |
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
# A reduction of the post by Yoav Goldberg to a script | |
# https://gist.github.com/yoavg/d76121dfde2618422139 | |
# Author: Kyle Kastner | |
# License: BSD 3-Clause | |
# Fun alternate settings | |
# Download kjv.txt from http://www.ccel.org/ccel/bible/kjv.txt | |
# python markov_lm.py kjv.txt 5 1. | |
# Snippet: | |
# Queen ording found Raguel: I kill. |
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
n <- 200 | |
m <- 40 | |
set.seed(1) | |
x <- runif(n, -1, 1) | |
library(rafalib) | |
bigpar(2,2,mar=c(3,3,3,1)) | |
library(RColorBrewer) | |
cols <- brewer.pal(11, "Spectral")[as.integer(cut(x, 11))] | |
plot(x, rep(0,n), ylim=c(-1,1), yaxt="n", xlab="", ylab="", | |
col=cols, pch=20, main="underlying data") |
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
import numpy as np | |
import theano | |
import theano.misc.pycuda_init | |
from pycuda.compiler import SourceModule | |
import theano.sandbox.cuda as cuda | |
from theano.sandbox.cuda import GpuOp | |
class LinearInterpolationCUDAOp(GpuOp): |
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 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
# Implements the 1D fractional-pixel shift operator from | |
# Condat, L. (2008). FULLY REVERSIBLE IMAGE ROTATION BY 1-D FILTERING. Signal Processing | |
import numpy as np | |
from scipy.misc import comb | |
def make_b(N, tau): | |
b = np.zeros(N) |
NewerOlder