Download Raspbian
Download balenaEtcher
| const date = new Date(); | |
| const seed = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate(); | |
| let nums = [...new Array(50).keys()]; // [0, 1, 2, 3, ..., 29]; | |
| const rand = (() => { | |
| let next = seed; | |
| return () => (next = (1103515245 * next + 12345) % 10000000) % 3; | |
| })(); |
Download Raspbian
Download balenaEtcher
| # https://gist.github.com/Astro36/ef933be73050b4d5a6e0522536723a18 | |
| AccessModifierOffset: -4 | |
| AlignAfterOpenBracket: Align | |
| AlignConsecutiveAssignments: false | |
| AlignConsecutiveDeclarations: false | |
| # AlignConsecutiveMacros: false | |
| AlignEscapedNewlines: DontAlign | |
| AlignOperands: true | |
| AlignTrailingComments: false | |
| # AllowAllArgumentsOnNextLine: false |
Rust는 성능이 우수한 로우 레벨 프로그래밍 언어 중 하나입니다. 또한, 비용 없는 추상화, 메모리 안정성, 데이터 레이스 없는 스레딩 등등을 지원하며 C++에 비해 문법도 간결합니다. 이러한 장점의 Rust를 Node와 결합시켜 사용한다면, Node의 부족한 성능을 메꿀 수 있습니다. Node에서 Rust에서 작성한 함수를 호출하기 위해서는 FFI(Foreign function interface, 외부 함수 인터페이스)를 사용해야 합니다. 아래는 준비물입니다.
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import getopt | |
| import json | |
| import multiprocessing | |
| import os | |
| import re | |
| import sys | |
| import requests |