Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
""" | |
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) |
// $ g++ -std=c++14 -pedantic -Wall -Wextra double-dispatch.cpp -o double-dispatch | |
// $ ./double-dispatch | |
// | |
// Also works under C++11. | |
#include <iostream> | |
#include <memory> | |
#if __cplusplus == 201103L | |
namespace std { |
import os | |
import glob | |
import parmap | |
import multiprocessing | |
import subprocess as sp | |
FFMPEG_BIN = "ffmpeg" | |
def encode(input, output_path): |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>XHR upload large file with slice</title> | |
<style> | |
#debug { | |
border: 3px dashed #ccc; | |
margin: 10px 0; | |
padding: 10px; |
# Terminal Tab #1 (with privileges inside container) | |
# ============= | |
cd "/the/dir/you/want/to/work/with/php8" | |
docker run --name php8 \ | |
-it \ | |
-v $PWD:/var/php:rw \ | |
php:8.0-cli-alpine3.12 \ | |
ash | |
cd /tmp |
Arch Linux Encrypted LVM Luks Btrfs Guide (EFI) | |
# Wipe disk with random data (optional) | |
badblocks -c 10240 -s -w -t random -v /dev/sda | |
# Partition | |
parted -a minimal /dev/sda | |
- mklabel gpt | |
- unit Mib | |
- mkpart ESP fat32 0% 512 | |
- set 1 boot on | |
- mkpart primary ext4 512 100% |
In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.
In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:
low
: the cheapestmedium
: moderateimport { createContext, useContext } from 'react' | |
import { createStore, StoreApi } from 'zustand' | |
import { immer } from 'zustand/middleware/immer' | |
import { useStoreWithEqualityFn } from 'zustand/traditional' | |
type State = { | |
total: number | |
increase: () => void | |
decrease: () => void |