Skip to content

Instantly share code, notes, and snippets.

View tictaqqn's full-sized avatar

Taqqn tictaqqn

View GitHub Profile
@tictaqqn
tictaqqn / NotionToSlack.swift
Last active April 2, 2024 13:53
NotionToSlack
import AppKit
/*
* A command to address issues when transferring bulleted lists from Notion to Slack,
* where nested bullet points do not maintain their structure correctly.
* Examples of bullet hierarchy:
* - one
* - two
* - three
*
@tictaqqn
tictaqqn / pggan_for_public.ipynb
Created September 17, 2021 15:00
pggan_for_public.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tictaqqn
tictaqqn / list.rs
Last active January 31, 2020 10:04
Rustによる単方向リスト
use std::fmt;
#[derive(Debug)]
pub struct List<T: Eq> {
head: Option<Box<Node<T>>>,
}
#[derive(Debug)]
pub struct Node<T> {
value: T,
next: Option<Box<Node<T>>>,
}
@tictaqqn
tictaqqn / rbtree.rs
Last active January 31, 2020 06:58
赤黒木
#[derive(Debug)]
pub struct RBTree<K, V>
where
K: Ord,
{
root: Option<Box<Node<K, V>>>,
should_change: bool,
}
#[derive(PartialEq, Debug)]
enum Color {
@tictaqqn
tictaqqn / quicksort.rs
Created October 12, 2019 14:24
クイックソートのRustでの実装
use std::io::*;
use std::str::*;
fn read<T: FromStr>(s: &mut StdinLock) -> Option<T> {
let s = s.by_ref().bytes().map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>();
s.parse::<T>().ok()
}