This file contains 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
-- Indentation | |
vim.o.autoindent = true | |
vim.o.smarttab = true | |
vim.o.expandtab = true | |
vim.o.tabstop = 4 | |
vim.o.shiftwidth = 4 | |
vim.o.softtabstop = 4 | |
vim.o.backspace = "2" | |
-- Searching |
This file contains 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 {useEffect, useMemo} from 'react' | |
import {RecoilRoot, useRecoilState, atom} from 'recoil' | |
// User data | |
const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."} | |
const user2 = {username: 'bob', bio: "I am the one true user."} | |
const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."} | |
// A potentially dangerous mutable global variable for initial state. The main |
This file contains 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 {useEffect} from 'react' | |
import {RecoilRoot, useRecoilState, atom} from 'recoil' | |
// User data | |
const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."} | |
const user2 = {username: 'bob', bio: "I am the one true user."} | |
const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."} | |
// Recoil atom to store user. The default user is user1, but it will be |
This file contains 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
{ | |
"title": "Control_L to Esc when tapped", | |
"rules": [ | |
{ | |
"description": "Control_L to Esc when tapped, Control when held.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", |
This file contains 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 {useEffect} from 'react' | |
import {RecoilRoot, useRecoilState, atom} from 'recoil' | |
// User data | |
const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."} | |
const user2 = {username: 'bob', bio: "I am the one true user."} | |
const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."} | |
// Recoil atom to store user. The default user is user1, but it will be |
This file contains 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
PORT=/dev/cu.usbserial-AL00FP1H | |
LUAS=name.lc helpers.lc sta.lc blink.lc tcpclient.lc ir.lc | |
all: name init $(LUAS) | |
init: | |
nodemcu-tool -p $(PORT) upload init.lua | |
name: | |
@[ "${DEVICE_NAME}" ] || ( echo ">> DEVICE_NAME is not set"; exit 1 ) |
This file contains 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 User(Model): | |
name: str | |
email: str | |
@to_one | |
def best_friend(self) -> User: pass | |
@to_many | |
def following(self) -> List[User]: pass |
This file contains 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
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.68-1.el7.noarch.rpm | |
sudo yum install -y docker-ce-18.09.5 containerd.io-1.2.2 | |
sudo usermod -a -G docker ec2-user | |
sudo systemctl start docker |
This file contains 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
require 'countries' | |
require 'json' | |
ISO3166.configure do |config| | |
config.locales = [:en, :cs, :de, :es, :fr, :ja, :nl, :sk] | |
end | |
# { | |
# AF: { | |
# name: { |
This file contains 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 torch | |
from torch import nn | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
class RNN(nn.Module): | |
def __init__(self, input_size, hidden_size, output_size, n_layers=1): | |
super(RNN, self).__init__() | |
self.input_size = input_size | |
self.hidden_size = hidden_size |
NewerOlder