This file contains hidden or 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
| header: | |
| version: 19 | |
| machine: qemuarm64 | |
| distro: poky | |
| target: core-image-full-cmdline | |
| local_conf_header: | |
| meta-custom: | | |
| BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" | |
| SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" | |
| BB_HASHSERVE = "auto" |
This file contains hidden or 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
| FROM debian:12 | |
| RUN apt update && apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd vim python3-websockets sudo iproute2 && \ | |
| sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen && \ | |
| groupadd -r user && useradd -r -g user -u 1001 -m user && adduser user sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
| USER user | |
| WORKDIR /home/user | |
| RUN git clone git://git.yoctoproject.org/poky && cd poky && git checkout -t origin/walnascar -b my-walnascar | |
| WORKDIR /home/user/poky | |
| RUN /bin/bash -c "source oe-init-build-env && \ | |
| sed -i 's/^#MACHINE ?= \"qemuarm64\"/MACHINE ?= \"qemuarm64\"/' /home/user/poky/build/conf/local.conf && \ |
This file contains hidden or 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 | |
| import torch.nn as nn | |
| import math | |
| device = torch.device("cpu") | |
| class MinimalTransformer(nn.Module): | |
| def __init__(self, vocab_size, embed_dim=2, seq_len=2): | |
| super(MinimalTransformer, self).__init__() |
This file contains hidden or 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 | |
| import torch.nn as nn | |
| import math | |
| class MinimalTransformer(nn.Module): | |
| def __init__(self, vocab_size, embed_dim=2, seq_len=2): | |
| super(MinimalTransformer, self).__init__() | |
| # 嵌入层:将字符索引映射到低维向量 | |
| self.embedding = nn.Embedding(vocab_size, embed_dim) |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| from cmath import log | |
| import re | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| pattern = r'hist_(\d+)_(\d+)_(exp|uniform|normal)\.txt:\s+(\d+)' | |
| data = [] | |
| with open("ser.txt") as f: |
This file contains hidden or 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 Control.DeepSeq (deepseq, force) | |
| import Control.Monad.Par (NFData, Par, get, runPar, spawn) | |
| import Control.Parallel (par, pseq) | |
| import Control.Parallel.Strategies (NFData, Strategy, rdeepseq, rpar, rparWith, rseq, runEval, using) | |
| import Criterion.Main (bench, defaultMain, nf) | |
| import Data.List (foldl', inits, tails) | |
| import System.Random | |
| data T a = T !a !Int |
This file contains hidden or 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
| with open("/tmp/record") as f: | |
| content = f.read() | |
| parts = [part.strip() for part in content.split("***") if part.strip() != ''] | |
| result = [] | |
| current = None | |
| for part in parts: | |
| if current is None: | |
| current = part | |
| else: | |
| if part.startswith('IR Dump') or part.startswith('IR Pass'): |
This file contains hidden or 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
| module Geometry where | |
| open import Agda.Builtin.Equality | |
| open import Agda.Builtin.Sigma | |
| open import Agda.Builtin.List | |
| open import Data.Product | |
| open import Data.List | |
| open import Data.Nat | |
| open import Function.Base | |
| record Point : Set where |
This file contains hidden or 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
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "strings" | |
| _ "github.com/go-sql-driver/mysql" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| _ "github.com/go-sql-driver/mysql" | |
| "time" | |
| ) | |
| func trans(conn *sql.DB, from, to int64) { |
NewerOlder