Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Zheng Fu fuzheng1998

🏠
Working from home
View GitHub Profile
@fuzheng1998
fuzheng1998 / launch.json
Created August 10, 2020 13:41
cpp debug configurations
View launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
@fuzheng1998
fuzheng1998 / requirements.txt
Created September 14, 2021 14:05
dependencies for COMP9444 in CSE of UNSW
View requirements.txt
numpy==1.21.2
scikit-learn==0.20.2
scipy==1.7.1
torch==1.8.1
typing-extensions==3.10.0.2
@fuzheng1998
fuzheng1998 / findAllIndexesOf.js
Last active May 10, 2022 00:05
Utilities function for JavaScript
View findAllIndexesOf.js
/**
*
* @param {*} arr array to search
* @param {*} val single element to search in array
* @returns
*/
function findAllIndexesOf(arr, val) {
var indexes = [], i;
for(i = 0; i < arr.length; i++)
if (arr[i] === val)
@fuzheng1998
fuzheng1998 / bing_wallpaper.py
Last active July 15, 2022 11:18
download latest wallpaper from bing.cn
View bing_wallpaper.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
BING_WALLPAPER_API="https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=10&nc=1612409408851&pid=hp&FORM=BEHPTB&uhd=1&uhdwidth=3840&uhdheight=2160"
BING_URL = "https://cn.bing.com";
import sys
import requests
import json
import getpass
import os