Skip to content

Instantly share code, notes, and snippets.

View michaellee8's full-sized avatar

michaellee8

View GitHub Profile
@michaellee8
michaellee8 / docker-compose-installer-for-container-optimized-os-on-gce.md
Created March 12, 2024 12:22 — forked from kurokobo/docker-compose-installer-for-container-optimized-os-on-gce.md
Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

The easiest way to make Docker Compose available on Container-Optimized OS on Google Compute Engine (GCE) on Google Cloud Platform (GCP).

This is minimal Bash script version of Community Tutorial.

How to use

Simply, download installer.sh, run it, and then reload bash by source ~/.bashrc or re-login.

@michaellee8
michaellee8 / main.rs
Created July 17, 2023 13:15
Comprehensive Rust Day 2 Morning Exercise Health Statistics
// TODO: remove this when you're done with your implementation.
#[derive(Default)]
pub struct User {
name: String,
age: u32,
height: f32,
visit_count: u32,
last_blood_pressure: Option<(u32, u32)>,
}
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@michaellee8
michaellee8 / relax-group.txt
Created April 7, 2022 14:06
comp3278 assignment 3
group: COMP3278 Assignment3
Facilities = {
fID:number, name:string, category:string , maxUser:number
1 , 'fac1' , 'Stationary bike', 10
2 , 'fac2' , 'Treadmill' , 11
3 , 'fac3' , 'Treadmill' , 12
4 , 'fac4' , 'Treadmill' , 13
5 , 'fac5' , 'Treadmill' , 14
6 , 'fac6' , 'Treadmill' , 15
@michaellee8
michaellee8 / run_ssd_example_annotate_video.py
Created November 7, 2021 15:26
jetson-inference run_ssd_example_annotate_video.py
from vision.ssd.vgg_ssd import create_vgg_ssd, create_vgg_ssd_predictor
from vision.ssd.mobilenetv1_ssd import create_mobilenetv1_ssd, create_mobilenetv1_ssd_predictor
from vision.ssd.mobilenetv1_ssd_lite import create_mobilenetv1_ssd_lite, create_mobilenetv1_ssd_lite_predictor
from vision.ssd.squeezenet_ssd_lite import create_squeezenet_ssd_lite, create_squeezenet_ssd_lite_predictor
from vision.ssd.mobilenet_v2_ssd_lite import create_mobilenetv2_ssd_lite, create_mobilenetv2_ssd_lite_predictor
from vision.utils.misc import Timer
import cv2
import sys
version: '3.4'
services:
osx:
container_name: docker-osx
image: sickcodes/docker-osx:big-sur
privileged: true
environment:
- DISPLAY=${DISPLAY:-:0.0}
network_mode: "host"
@michaellee8
michaellee8 / dcard-author-only.sh
Created May 8, 2021 16:43
Dcard comment reader with author only command
curl -s "https://www.dcard.tw/service/api/v2/posts/230723124/comments?limit=100&after=0" | jq '.[] | select(.host==true) | .content'
@michaellee8
michaellee8 / BigInt.cpp
Created April 12, 2020 11:00 — forked from ar-pa/BigInt.cpp
bignum class for C++
// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;
@michaellee8
michaellee8 / fork-tasks-demo.c
Last active October 4, 2018 01:12
Inter-process communication using pipes |
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdlib.h>
#include <linux/limits.h>
#include <errno.h>
#include <string.h>
@michaellee8
michaellee8 / fork-pstree.c
Created September 27, 2018 10:26
Play with c fork and pstree
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
void create_process(int current_level)
{
int parent = (int)getpid();
int child = (int)fork();