This file contains 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 collections | |
import random | |
class WalkerAlias: | |
""" | |
https://qiita.com/kaityo256/items/1656597198cbfeb7328c | |
""" | |
def __init__(self, weights: list[float]): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
fn main() { | |
let mut v = make_randoms(10000); | |
simple_sort(&mut v); | |
if varify(&v) { | |
println!("Sorted"); | |
} else { | |
println!("Unsorted"); | |
} | |
} |
This file contains 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
read_backward:read_backward.cpp | |
c++ -O3 -o read_backward read_backward.cpp -std=c++17 -Wall -Wextra -pedantic | |
clean: | |
rm -r -f read_backward |
This file contains 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 | |
import os | |
from argparse import ArgumentParser | |
from remove_c_style_comments import * | |
from glob import glob | |
def clean_comment(cpp_files, output_dir): | |
for cpp_file in cpp_files: |
This file contains 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 | |
import os | |
import sys | |
import subprocess | |
from argparse import ArgumentParser | |
if __name__ == "__main__": | |
parser = ArgumentParser() | |
parser.add_argument('path') |
This file contains 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 ( | |
"bufio" | |
"fmt" | |
"os" | |
"path/filepath" | |
"sort" | |
"strings" | |
) |