Skip to content

Instantly share code, notes, and snippets.

View chiehpower's full-sized avatar
🎯
Focusing on work

CHIEH chiehpower

🎯
Focusing on work
View GitHub Profile
@chiehpower
chiehpower / gap.py
Created August 28, 2021 08:08
A simple code for computing Global Average Precision
# Source code from : https://github.com/yisaienkov/evaluations/blob/master/evaluations/kaggle_2020/global_average_precision.py
from typing import Dict, Tuple, Any
import pandas as pd
def colorstr(*input):
*args, string = input if len(input) > 1 else ('blue', 'bold', input[0])
colors = {
'blue': '\033[34m',
'end': '\033[0m',
@chiehpower
chiehpower / source.list
Last active December 6, 2021 06:37
amd64 | /etc/apt/source.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://free.nchc.org.tw/ubuntu/ focal main restricted
# deb-src http://free.nchc.org.tw/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://free.nchc.org.tw/ubuntu/ focal-updates main restricted
# deb-src http://free.nchc.org.tw/ubuntu/ focal-updates main restricted
@chiehpower
chiehpower / docker-compose.yml
Created May 15, 2022 07:11
Drone for Server - Medium
version: '2'
services:
drone-server:
image: drone/drone:2
container_name: cicd-server
ports:
- 8090:80
extra_hosts:
- "10.1.2.102:10.1.2.102"
@chiehpower
chiehpower / .drone.yml
Last active May 15, 2022 08:24
Drone yml file - Medium
global-variables:
debian_image: &debian_image ubuntu:latest
environment: &default_environment
server_ip: 10.1.2.102
kind: pipeline
type: docker
name: test
steps: