Skip to content

Instantly share code, notes, and snippets.

const N: usize = 100;
use libc::{c_void, pthread_attr_t, pthread_create, pthread_t};
use std::ptr;
extern "C" fn thread_func(arg: *mut c_void) -> *mut c_void {
let tid = unsafe { Box::from_raw(arg as *mut u32) };
println!("thread {tid} is started");
ptr::null_mut()
}
$ rm -rf autoware autoware_data/ .ansible/ .ros/
$ sudo apt update -y 
$ sudo apt upgrade -y

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
{
"editor.fontFamily": "'Fira Code Medium', 'Droid Sans Mono', 'monospace', monospace",
"workbench.colorTheme": "One Dark Pro Darker",
"editor.inlineSuggest.enabled": true,
"asciidoc.pdf.asciidoctorPdfCommandPath": "asciidoctor-pdf -a scripts=cjk -a pdf-theme=default-for-print-with-fallback-font -r asciidoctor-diagram -r asciidoctor-mathematical",
"asciidoc.extensions.enableKroki": true,
"asciidoc.useWorkspaceRootAsBaseDirectory": true,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.suggest.snippetsPreventQuickSuggestions": false,
Important
gistの描写は忠実じゃないので、忠実な描写がされた際の画像を下に貼っています。
Table 1. テーブルタイトル
1 4 1
#!/usr/bin/env python3
import sys
import yfinance as yf
import pickle
if len(sys.argv) != 2:
print("Usage: ./get_data.py <ticker_symbols_file>")
sys.exit(1)
tickers_file = sys.argv[1]
@mkakh
mkakh / gogs-docker-compose.yml
Created July 27, 2023 06:14
docker-compose.yml for gogs.
# About the settings of gogs, see https://github.com/gogs/gogs/tree/main/docker.
# The host of db is the container's name such as gogs-db-1
version: '3'
services:
db:
image: postgres:latest
environment:
- POSTGRES_USER=gogs
- POSTGRES_PASSWORD=#####
- POSTGRES_DB=gogs
@mkakh
mkakh / source-env.sh
Last active July 25, 2023 06:13
zsh version of source-env.sh for IsoNet-cryoET/IsoNet
#!/bin/zsh
# The original source code is published in IsoNet-cryoET/IsoNet under the MIT license.
###############
# THIS FILE CAN BE SOURCED INTO YOUR SHELL
# TO SET UP ENVIRONMENT WHERE IsoNet CAN BE EXECUTED
###############
_ISONET_REPO_ROOT="$(dirname "$(realpath "${(%):-%x}")")"
@mkakh
mkakh / EmojiFetcher.html
Last active July 12, 2023 00:28
The webpage fetches emojis from a misskey instance. The input should be like "misskey.io". It was totally created by Bing AI. I haven’t tested it, but it seems to work correctly. CC0. The sample is placed on mkakh.com/emoji_fetcher.html.
<!DOCTYPE html>
<html>
<head>
<title>Emoji Fetcher</title>
<style>
.emoji {
display: inline-block;
text-align: center;
margin: 10px;
}

Keybase proof

I hereby claim:

  • I am mkakh on github.

  • I am mkakh (https://keybase.io/mkakh) on keybase.

  • I have a public key ASDGS3Cjbf2RTdkzdeQyTpdpz1mWoirsfe0jU_lr3OmMpQo

@mkakh
mkakh / SetEventsOnEveryMonday.py
Created July 3, 2023 03:44
Set google calendar events on every Monday of the next month
from google.oauth2.credentials import Credentials
from google.auth.transport.requests import Request
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from datetime import datetime, timedelta
import calendar, os
# If modifying these scopes, delete the file token.json.
SCOPES = ['https://www.googleapis.com/auth/calendar.events']