Skip to content

Instantly share code, notes, and snippets.

View ZCG-coder's full-sized avatar

Andy Zhang ZCG-coder

View GitHub Profile
@JHarrison712
JHarrison712 / VMware Product License Keys
Created November 26, 2024 13:16
VMware Product License Keys" is a GitHub Gist containing a collection of license keys for VMware products. This gist provides a convenient reference for accessing and managing VMware product licenses within a GitHub repository, facilitating easy sharing and retrieval of keys as needed.
1.VMware Workstation Pro Series:
---------------------------------
MC60H-DWHD5-H80U9-6V85M-8280D
4A4RR-813DK-M81A9-4U35H-06KND
NZ4RR-FTK5H-H81C1-Q30QH-1V2LA
JU090-6039P-08409-8J0QH-2YR7F
4Y09U-AJK97-089Z0-A3054-83KLA
4C21U-2KK9Q-M8130-4V2QH-CF810
HY45K-8KK96-MJ8E0-0UCQ4-0UH72
@ZCG-coder
ZCG-coder / print_number.py
Created August 31, 2024 12:07
A tool to pretty-print out a number
from typing import Union
def separate_number(number: str, sep: str = ""):
result = number[::-1]
insert_idx = []
times = 0
for idx in range(len(number)):
if idx % 3 == 0:
insert_idx.append(idx + times)
@ZCG-coder
ZCG-coder / CL.md
Created June 22, 2024 13:43
Computer Literacy study notes (F2 Final Exam)

                            COMPUTER LITERACY
                           ===================

                              Revision Notes
                            Final Examination


@ZCG-coder
ZCG-coder / log.py
Last active May 9, 2024 12:42
A Pythonic way to take a n-th root without using math
#####################################################################################################
# Copyright (c) 2023-2024 NWSOFT #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
@ZCG-coder
ZCG-coder / LICENSE
Last active April 29, 2024 04:38
AST way to evaluate an expression Step-by-step
MIT License
Copyright (c) 2024 Andy Zhang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ZCG-coder
ZCG-coder / decimal_conversion.py
Last active April 12, 2024 13:13
Python script to convert decimals to any bases and back
NAMES = {
2: "binary",
3: "trinary",
4: "quaternary",
8: "octadecimal",
10: "decimal",
16: "hexadecimal"
}
@ZCG-coder
ZCG-coder / A%20File%20Icon.sublime-settings
Last active July 22, 2024 13:24
My Sublime Configuration
// A File Icon Preferences – User
// ================================================================
{
"color": "hsl(219, 28%, 88%)",
"color_on_hover": "hsl(0, 0%, 97%)",
"color_on_select": "hsl(0, 0%, 100%)"
}
@FlyTechVideos
FlyTechVideos / censor_oracle.py
Last active May 15, 2025 10:42
A not entirely inaccurate oracle for whether or not Windows XP will recognize a given string as being unicode (ref. IsTextUnicode).
#!/usr/bin/env python3
import sys
# Please excuse the awfully formatted code, I did not take the time to make it look nice.
def main():
print()
if len(sys.argv) != 2:
print(f' Usage: {sys.argv[0]}')
@FlyTechVideos
FlyTechVideos / IsTextUnicode.cpp
Created June 26, 2023 22:40
Calls IsTextUnicode from the WinAPI to figure out whether or not a text is recognized as Unicode. Meant for use in Windows XP.
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
cout << "\r\n";
if (argc != 2) {
@ZCG-coder
ZCG-coder / main.py
Created February 5, 2022 11:12
Fisher-Yates Shuffle
import random
def shuffle(ary):
old_ary = ary[:]
a = len(ary)
b = a - 1
for d in range(b, 0, -1):
e = random.randint(0, d - 1)
ary[d], ary[e] = ary[e], ary[d]