汇编是直接跟硬件打交道的, 于是在学习汇编的同时,不经意间就了解到计算机的工作原理。
这是饭前开胃菜,作者从什么是电流开始,讲加法器、数字逻辑、触发器、CPU 原理、外设等,是计算机(硬件)组成原理的科普向轻松读物
use std::fs::File; | |
use std::io::prelude::*; | |
use std::mem; | |
fn layernorm_forward(output: &mut [f32], mean: &mut [f32], rstd: &mut [f32], | |
input: &[f32], weight: &[f32], bias: &[f32], | |
batch_size: usize, time_steps: usize, channels: usize) { | |
let epsilon = 1e-5; | |
for b in 0..batch_size { | |
for t in 0..time_steps { |
package main | |
import ( | |
"archive/zip" | |
"bytes" | |
"flag" | |
"fmt" | |
"image" | |
"image/color" | |
_ "image/jpeg" |
#!/bin/sh | |
# | |
echo "Remove old Cloak..." | |
rm -rf github.com/cbeuw/Cloak | |
echo "Setting proxy to laptop..." | |
export http_proxy=http://192.168.1.103:10801 | |
export https_proxy=http://192.168.1.103:10801 | |
echo "Get new version Cloak..." | |
go get github.com/cbeuw/Cloak | |
echo "Going to working directory..." |
mkdir /var/lib/resilio-sync/ && chown pi:pi -R /var/lib/resilio-sync | |
mkdir /etc/resilio-sync | |
nano /etc/resilio-sync/config.json | |
{ | |
"storage_path" : "/var/lib/resilio-sync/", | |
"pid_file" : "/var/run/resilio-sync/sync.pid", | |
"webui" : |
#!/usr/bin/env bash | |
# | |
# icyleaf | |
# 2020-02-03 | |
# | |
VM_NAME=$1 | |
IMG_FILE=$2 | |
IMG_PATH=`dirname $IMG_FILE` | |
IMG_NAME=`basename $IMG_FILE` |
Qt 在 Raspberry Pi 上可以跑兩種版本:
這個教學會編譯桌面版,因為我對這個版本比較熟。我上次試的時候 OpenGL 在 embedded 版還有些問題,不過 Qt 在那之後有很多更新,狀況應該會好很多。Qt 官方 wiki 也有個相關的教學:
#!/bin/bash | |
set -e | |
GENTOO_RELEASES_URL=http://distfiles.gentoo.org/releases | |
GENTOO_ARCH=amd64 | |
GENTOO_VARIANT=amd64 | |
TARGET_DISK=/dev/sda |
/** | |
* Presence and Garage Door | |
* | |
* Copyright 2016 Yuxuan Wang | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
<?php | |
//配置部分 | |
$password = '这里是验证的密码'; | |
$authkeypair = array( | |
'帐号标题' => 'Secret key', | |
'帐号标题2' => 'key2', | |
); | |
?> | |
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> |