Skip to content

Instantly share code, notes, and snippets.

View lletfrix's full-sized avatar
:octocat:
Studying

Rafael Sánchez Sánchez lletfrix

:octocat:
Studying
  • Spain
View GitHub Profile
@lletfrix
lletfrix / getQRCode.py
Created September 16, 2021 15:46
Rounded QR Code scripts
import math
import numpy as np
def get_horizontal_instructions(matrix):
instructions = []
for row in matrix:
currentVal = row[0]
start = 0
rowInstructions = []
for (i, c) in enumerate(row[1:]+[2]):
@lletfrix
lletfrix / docz2expo.md
Created June 3, 2021 19:07
Instruction on adding docz to a expo managed project.

Adding docz to an existing expo managed project

Installation

    yarn add docz react react-dom react-native-web react-art gatsby-plugin-react-native-web --dev

gatsby-plugin-react-native-web is needed so expo libraries use react-native-web when visualizing the docs.

@lletfrix
lletfrix / ShadowView.js
Last active May 28, 2021 01:13
ShadowView.js
import React from 'react';
import { View, StyleSheet, Text, Dimensions, Platform } from 'react-native';
import Svg, { Circle, Rect, Defs, Use, Symbol, ForeignObject, LinearGradient, RadialGradient, Stop, G} from 'react-native-svg';
import { LinearGradient as LGradient } from 'expo-linear-gradient';
const Gauss = (x, sigma) => 1/(sigma * Math.sqrt(2*Math.PI)) * Math.exp( - (x**2) / (2*sigma**2 ))
const dot = (v1, v2) => v1.reduce( (acc, comp, idx) => (acc + comp*v2[idx]), 0)
const convolutions = (img, ker) => {

Keybase proof

I hereby claim:

  • I am lletfrix on github.

  • I am lletfrix (https://keybase.io/lletfrix) on keybase.

  • I have a public key ASAFhS0s2fetNd_VCLMIL1jU8JpAgFaVu6r-315Z21utVQo