Skip to content

Instantly share code, notes, and snippets.

View ahaxu's full-sized avatar

AhaXu ahaxu

View GitHub Profile
@ahaxu
ahaxu / tima-new-era-challenge-2025.md
Created February 24, 2025 07:59
Tima - New Era Challenge 2025

Nhận định từ nghienchaybo.com AI về challenge Tima - New Era Challenge 2025 đến ngày 24022025

1. Mức độ tham gia không đồng đều

  • Một số cá nhân có mức độ tham gia tích cực, ghi nhận quãng đường di chuyển (km) trong nhiều ngày liên tiếp, ví dụ:
    • Phong Hoàng (Khối KD1): Ghi nhận quãng đường trong 4 ngày, với ngày cao nhất là 32.01 km.
    • Nhung Võ Thị Hồng (Khối KD2): Ghi nhận quãng đường trong 6 ngày, với ngày cao nhất là 8.16 km.
    • Yến Linh Phạm Thị (Khối Hỗ trợ và Khối CN&QTRR): Ghi nhận quãng đường trong 7 ngày, với ngày cao nhất là 5.61 km.
  • Tuy nhiên, nhiều cá nhân khác không có dữ liệu hoặc chỉ tham gia trong 1-2 ngày, cho thấy sự không đồng đều trong mức độ tham gia.

2. Khối KD1 và Khối Hỗ trợ và Khối CN&QTRR có sự tham gia nổi bật

@ahaxu
ahaxu / 98_runners_tet_2025.py
Last active February 2, 2025 06:29
98_runners_tet_2025.py
def f(activities):
"""
customize rule for 98 runners
challenge Tet 2025
"""
import math
from datetime import datetime
white_list_acts = [
]
@ahaxu
ahaxu / htr-tet-challenge-2025.py
Last active February 2, 2025 06:28
htr-tet-challenge-2025.py
def f(activities):
import math
from datetime import datetime
white_list_acts = [
13321551268,
13321963642,
13322559985,
13515471146
]
@ahaxu
ahaxu / goya_rong_da_nang_2024.py
Last active November 21, 2024 14:47
goya_rong_da_nang_2024.py
def f(activities):
import math
import requests
from datetime import datetime
act_by_date = dict()
for act in activities:
dt_str = act.get('start_date_local') # 2021-02-12T20:40:00Z
dt_obj = datetime.strptime(dt_str, '%Y-%m-%dT%H:%M:%SZ')
# key for ac_by_date dict
@ahaxu
ahaxu / always_true.hs
Created November 4, 2024 04:59
Always true validtor in haskell
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module FortyTwo where
import qualified Plutus.V2.Ledger.Api as PlutusV2
import PlutusTx (BuiltinData, compile)
@ahaxu
ahaxu / chien-binh-sparta-goya-bao-duong-cung-goya-speed-2024.py
Created June 8, 2024 02:22
chien-binh-sparta-goya-bao-duong-cung-goya-speed-2024
# https://nghienchaybo.com/event/chien-binh-sparta-goya-bao-duong-cung-goya-speed-2024
def f(activities):
import math
from datetime import datetime
act_by_date = dict()
for act in activities:
start_dt_str = act.get('start_date_local') # 2021-02-12T20:40:00Z
end_dt_ts = datetime.strptime(start_dt_str, '%Y-%m-%dT%H:%M:%SZ').timestamp() + act.get('elapsed_time')
dt_obj = datetime.fromtimestamp(end_dt_ts)
@ahaxu
ahaxu / htr_mua_he_ruc_ro_2024.py
Created June 1, 2024 04:45
htr_mua_he_ruc_ro_2024.py
def f(activities):
import math
from datetime import datetime
white_list_acts = [
11448424729,
11443873790,
11443848827,
11442008938,
11443899397,
@ahaxu
ahaxu / htr-mua-he-ruc-ro-2024.py
Last active May 21, 2024 02:46
htr-mua-he-ruc-ro-2024.py
def f(activities):
import math
from datetime import datetime
act_by_date = dict()
for act in activities:
if act.get('type') != "Run":
continue
km = round(act["distance"]/1000, 2)
@ahaxu
ahaxu / htmt-tho-xay-cha-lan-2024.py
Last active March 10, 2024 03:35
HTMT tho xay challenge 2024
def f(activities, team):
import math
from datetime import datetime
act_by_date = dict()
for act in activities:
dt_str = act.get('start_date_local') # 2021-02-12T20:40:00Z
dt_obj = datetime.strptime(dt_str, '%Y-%m-%dT%H:%M:%SZ')
# key for ac_by_date dict
dt_ymd = int("{}{}{}".format(dt_obj.year, dt_obj.month, dt_obj.day))
@ahaxu
ahaxu / distinctG.hs
Last active June 5, 2023 03:05
distinctG.hs
-- Link to youtube https://youtu.be/c4saFSUAmlg
-- | Remove all duplicate integers from a list. Produce a log as you go.
-- If there is an element above 100, then abort the entire computation and produce no result.
-- However, always keep a log. If you abort the computation, produce a log with the value,
-- "aborting > 100: " followed by the value that caused it.
-- If you see an even number, produce a log message, "even number: " followed by the even number.
-- Other numbers produce no log message.
--
-- /Tip:/ Use `filtering` and `StateT` over (`OptionalT` over `Logger` with a @Data.Set#Set@).