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
| #/bin/sh | |
| # install dependencies for building iproute2 | |
| sudo apt update | |
| DEBIAN_FRONTEND=noninteractive sudo apt upgrade -y | |
| sudo apt install -y bison flex clang gcc llvm libelf-dev bc libssl-dev tmux trace-cmd | |
| # update iproute2 | |
| sudo apt install -y pkg-config bison flex make gcc | |
| cd /tmp |
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 | |
| import sys | |
| from zipfile import ZipFile | |
| with ZipFile(sys.argv[1]) as zip: | |
| for info in zip.infolist(): | |
| name = info.filename.encode('cp437').decode('cp932') | |
| info.filename = name | |
| print(info.filename) |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| import math | |
| ax = plt.subplot(111, polar=True) | |
| ax.set_theta_direction(-1) | |
| ax.set_theta_zero_location("W") | |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| import math | |
| ax = plt.subplot(111, polar=True) | |
| ax.set_theta_direction(-1) | |
| ax.set_theta_zero_location("W") | |
| # xalx = [ |
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
| #!/bin/sh | |
| set -eu | |
| dir="" | |
| if [ $# -ne 1 ]; then | |
| dir=`terraform workspace show` | |
| fi | |
| if [ -e ./terraform.tfstate.d/${dir}/terraform.tfstate ]; then | |
| rm -f hosts | |
| if [ "`uname`" == "Darwin" ]; then |
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
| Vagrant.configure("2") do |config| | |
| config.vm.box = "higebu/vyos" | |
| config.vm.define :vyos1 do | vyos | | |
| vyos.vm.hostname = "vyos1" | |
| vyos.vm.network :private_network, ip: "192.168.13.1", virtualbox__intnet: "intnet13" | |
| vyos.vm.network :private_network, ip: "10.1.14.1", virtualbox__intnet: "intnet14" | |
| vyos.vm.network :private_network, ip: "10.1.41.1", virtualbox__intnet: "intnet41" | |
| end |
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
| #include QMK_KEYBOARD_H | |
| extern keymap_config_t keymap_config; | |
| #define _QWERTY 0 | |
| #define _LOWER 1 | |
| #define _RAISE 2 | |
| #define _ADJUST 16 | |
| enum custom_keycodes { |
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
| #ifndef __BPF_HELPERS_H | |
| #define __BPF_HELPERS_H | |
| /* helper macro to place programs, maps, license in | |
| * different sections in elf_bpf file. Section names | |
| * are interpreted by elf_bpf loader | |
| */ | |
| #define SEC(NAME) __attribute__((section(NAME), used)) | |
| /* helper functions called from eBPF programs written in C */ |
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
| #!/bin/sh | |
| # mem.sh | |
| # GNU GPL version 2 copyright@N_Nao | |
| # オプションの取得 | |
| while getopts :M opt | |
| do | |
| case $opt in | |
| "M") size_f="TRUE";; # MB表示を行う | |
| *) error_f="TRUE";; |
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 numpy as np | |
| def main(): | |
| epock_list = [ | |
| [2.8, 2.9, 3.0, 3.1, 3.2, 3.2, 3.2, 3.3, 3.4], | |
| [30, 26, 33, 31, 33, 35, 37, 36, 33] | |
| ] | |
| x_2_list = list(map(lambda x: round(x**2, 2), epock_list[0])) | |
| x_y_list = list(map(lambda x, y: round(x*y, 2), epock_list[0], epock_list[1])) | |
| print(epock_list[0], round(sum(epock_list[0]),2)) |