Skip to content

Instantly share code, notes, and snippets.

View teabuff's full-sized avatar

Dozen Tea teabuff

View GitHub Profile
@teabuff
teabuff / gist:2b5b18f7c1c817681c7f4a54ae07c4ec
Created October 6, 2025 00:32
Sample gpt search result
{
"title": "护肤品推荐与建议",
"create_time": 1759710227.725475,
"update_time": 1759710244.834631,
"mapping": {
"client-created-root": {
"id": "client-created-root",
"message": null,
"parent": null,
"children": [
@teabuff
teabuff / private_fork.md
Created June 2, 2024 04:36 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@teabuff
teabuff / median_of_two_sorted_array_same_size.txt
Created February 11, 2016 01:46
1. Median of Two Sorted Array in Same Size - Pseudocode
1) Calculate the medians m1 and m2 of the input arrays ar1[] and ar2[] respectively.
2) If m1 and m2 both are equal then we are done, and return m1 (or m2)
3) If m1 is greater than m2, then median is present in one of the below two subarrays.
a) From first element of ar1 to m1 (ar1[0...|_n/2_|])
b) From m2 to last element of ar2 (ar2[|_n/2_|...n-1])
4) If m2 is greater than m1, then median is present in one of the below two subarrays.
a) From m1 to last element of ar1 (ar1[|_n/2_|...n-1])
b) From first element of ar2 to m2 (ar2[0...|_n/2_|])
5) Repeat the above process until size of both the subarrays becomes 2.
6) If size of the two arrays is 2 then use below formula to get the median.