Skip to content

Instantly share code, notes, and snippets.

View jiweiqi's full-sized avatar

Weiqi jiweiqi

  • Mountain View, CA
  • 15:39 (UTC -07:00)
View GitHub Profile
@jiweiqi
jiweiqi / fine_tune_phi_1_5_alpaca_gpt4.ipynb
Created November 29, 2023 04:26
fine_tune_phi_1_5_alpaca_gpt4.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiweiqi
jiweiqi / subreddit_heatpumps.json
Created November 11, 2023 07:42
subreddit_heatpumps
[
{
"question": "The discussion revolves around the benefits and practical considerations of using heat pump clothes dryers. Key aspects include their placement flexibility, energy efficiency, and impact on clothes and home environment.",
"solutions": [
"Heat pump dryers can be placed anywhere due to being unvented, offering more space and utility in homes.",
"These dryers are energy-efficient, reducing electricity bills and HVAC workload by not requiring external venting.",
"They are gentler on clothes, extending their lifespan.",
"Initial higher costs can be offset by deals, rebates, and long-term energy savings.",
"Users shared experiences with specific models, both positive and negative, and discussed maintenance and installation challenges.",
"The thread also touched on broader topics like energy costs, efficiency in different climates, and comparisons with traditional drying methods."
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiweiqi
jiweiqi / match_zipcode.py
Created December 5, 2021 14:51
find the nearest 2-year and 4-year college based on zipcode
import re
import pgeocode
from tqdm import tqdm
import pandas as pd
import numpy as np
df_college_4 = pd.read_excel('./4-year updated.xlsx',
@jiweiqi
jiweiqi / PSR_steady.jl
Created March 15, 2021 16:29
Solve PSR using adam
```
Simulate an unsteady PSR with oscilation
```
using Arrhenius
using LinearAlgebra
using DifferentialEquations
using ForwardDiff
using DiffEqSensitivity
using Sundials
using OrdinaryDiffEq, Flux, Random, Plots
using DiffEqSensitivity
using ForwardDiff
using LinearAlgebra, Statistics
using ProgressBars, Printf
using Flux.Optimise: update!, ExpDecay
using Flux.Losses: mae, mse
using BSON: @save, @load
using MINPACK
@jiweiqi
jiweiqi / lm.jl
Created March 5, 2021 00:39
demo of lm optimization
using LsqFit
using ForwardDiff
using Plots
using Flux
using MINPACK
xdata = 0.0:0.1:10.0
xdata = xdata'
ydata = Float64.(vec(sin.(xdata)))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiweiqi
jiweiqi / lm_nn.jl
Created January 30, 2021 01:58
fit nn using LsqFit.jl
using LsqFit
using ForwardDiff
using Plots
using Flux
xdata = 0.0:1.0:10.0
xdata = xdata'
ydata = Float32.(vec(sin.(xdata)))
nn = Chain(