Skip to content

Instantly share code, notes, and snippets.

View charlychiu's full-sized avatar
💭
💡 🎧 🍺

charlychiu charlychiu

💭
💡 🎧 🍺
View GitHub Profile
@charlychiu
charlychiu / setup.md
Last active August 4, 2025 09:31
XAMPP 多版本 PHP 配置 (PHP 7.4 + PHP 8.2)
import UIKit
import BridgewellSDK
let cellSize: CGSize = CGSize(width: UIScreen.main.bounds.size.width - 40, height: 200)
class ListItemsViewController: UIViewController {
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var host1: UIView!
@IBOutlet weak var host2: UIView!
---
apiVersion: v1
metadata:
name: gc-script
namespace: garbage-collector
kind: ConfigMap
data:
gc: |-
#!/bin/bash
import time
import urllib.parse
from typing import Optional, Dict, Any, List
from requests import Request, Session, Response
import hmac
from ciso8601 import parse_datetime
@charlychiu
charlychiu / NotionBackupToGoogleDrive.ipynb
Created January 6, 2021 13:52
Via colab, download backup from s3 and directly store to google drive
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@charlychiu
charlychiu / _dice.py
Created May 15, 2020 07:40 — forked from brunodoamaral/_dice.py
Dice coefficient between two boolean NumPy arrays or array-like data. This is commonly used as a set similarity measurement (though note it is not a true metric; it does not satisfy the triangle inequality). The dimensionality of the input is completely arbitrary, but `im1.shape` and `im2.shape` much be equal. This Gist is licensed under the mod…
def dice(im1, im2, empty_score=1.0):
"""
Computes the Dice coefficient, a measure of set similarity.
Parameters
----------
im1 : array-like, bool
Any array of arbitrary size. If not boolean, will be converted.
im2 : array-like, bool
Any other array of identical size. If not boolean, will be converted.
Returns