Skip to content

Instantly share code, notes, and snippets.

View yusong-shen's full-sized avatar

yusong-shen

View GitHub Profile
@garyo
garyo / vanguard-to-monarch-balance.py
Created November 15, 2024 23:14
Convert PDF statements from Vanguard into csv files suitable for uploading balance info to Monarch Money
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "pandas",
# "pdfplumber",
# ]
# ///
import pdfplumber
import pandas as pd
import os
@fritsstegmann
fritsstegmann / Setup Redis 6 with TLS on Ubuntu 18.04.md
Last active January 26, 2025 18:28
Setup Redis 6 with TLS
On Ubuntu 18.04
@kuitos
kuitos / index.html
Created September 18, 2017 05:08
all fb monster repos
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>github</title>
</head>
<body>
<script src="https://unpkg.com/lodash@4.17.4/lodash.js"></script>
<script type="module">
@Ben02
Ben02 / README.md
Last active January 1, 2019 12:44
反向代理 Disqus 评论框。见:https://benwong.cn/tech/Disqus-API.html

利用 Docker 一键部署 Disqus 反向代理到服务器,请看 https://github.com/Ben02/disqus-lite


注意:服务器需有 nginx 和 php 环境。

注意:因为 proxy_pass 里包含变量,所以要到 nginx.conf 里增加一条配置:

http{
@attibalazs
attibalazs / Oracle_get_all_dependencies.sql
Created February 21, 2017 15:21
Get all dependencies for oracle table or view. A hierarchical query which goes through the dependency tree.
select distinct *
from all_dependencies a
start with a.referenced_name = 'TEST'
connect by NOCYCLE prior a.name = a.referenced_name;
@senorcarbone
senorcarbone / ExercisePrimitives.scala
Last active November 14, 2017 04:11
ID2203.1x Exercise Lib
package se.kth.edx.id2203.core
import java.net.{ InetAddress, InetSocketAddress }
import se.kth.edx.id2203.core.ExercisePrimitives.PerfectP2PLink._
import se.kth.edx.id2203.core.Ports._
import se.sics.kompics.{ Init, KompicsEvent }
import se.sics.kompics.network.{ Address, Network, Transport }
import se.sics.kompics.sl.{ ComponentDefinition, _ }
anonymous
anonymous / GenerateTest.java
Created August 14, 2016 06:44
import java.util.*;
public class GenerateTest
{
static void generateTestCase(){
Random r = new Random();
int runs = 30; // Number of times to run the test suite
int MAX_LEN = 5; //length of the test String
int distinct = 4; //Number of distinct characters , The lower the value more chances of finding errors
while(runs-->0){
# Start python
PYSPARK_DRIVER_PYTHON=ipython pyspark
# Verify input data
hdfs dfs -ls input/
# Read shows files
show_views_file = sc.textFile("input/join2_gennum?.txt")
# view first two lines
@iamkevinlowe
iamkevinlowe / triplebyte_programming_challenge.rb
Created December 15, 2015 23:22
Triplebyte Programming Challenge
# The first 12 digits of pi are 314159265358. We can make these digits into an expression evaluating to 27182 (first 5 digits of e) as follows:
# 3141 * 5 / 9 * 26 / 5 * 3 - 5 * 8 = 27182
# or
# 3 + 1 - 415 * 92 + 65358 = 27182
# Notice that the order of the input digits is not changed. Operators (+,-,/, or *) are simply inserted to create the expression.
# Write a function to take a list of numbers and a target, and return all the ways that those numbers can be formed into expressions evaluating to the target. Do not use the eval function in Python, Ruby or JavaScript