Skip to content

Instantly share code, notes, and snippets.

View ssghost's full-sized avatar
🏠
Working from home

Stardust Song ssghost

🏠
Working from home
View GitHub Profile
@EudesSilva
EudesSilva / commons-proxy.sh
Last active March 10, 2024 10:55
Config proxy in Git, Yarn, Bower, NPM, Maven, Docker, Gradle, General
#Configuration Proxy
#Git
git config --global http.proxy http://<username>:<password>@<proxy-port>
git config --global https.proxy http://<username>:<password>@<proxy-port>
library(tidyverse)
library(gganimate)
NUMPLAYERS = 45
ROUNDS = 5000
INITWEALTH = 45
#initialize the bank
#columns wealths of the NUMPLAYERS players
#rows show wealths of each of the ROUNDS ticks of the clocks
@ssghost
ssghost / keybase.md
Created July 4, 2018 07:16
keybase

Keybase proof

I hereby claim:

  • I am ssghost on github.
  • I am siegel_seele (https://keybase.io/siegel_seele) on keybase.
  • I have a public key ASBMmW3WC-f-cWdXQt-u0_ZCG49EVnIM4HCIqCnJwBwr1Qo

To claim this, I am signing this object:

@ssghost
ssghost / Dockerfile
Created January 31, 2019 03:41 — forked from machinaut/Dockerfile
Demonstrating installing mujoco-py and gym[mujoco] on ubuntu 18.04
FROM ubuntu:18.04
# Install python and utils
RUN apt-get update && apt-get install -y python3-pip curl unzip \
libosmesa-dev libglew-dev patchelf libglfw3-dev
# Download mujoco
RUN curl https://www.roboti.us/download/mjpro150_linux.zip --output /tmp/mujoco.zip && \
mkdir -p /root/.mujoco && \
unzip /tmp/mujoco.zip -d /root/.mujoco && \
@ssghost
ssghost / dnx-qubo-01.py
Created February 16, 2019 14:55
Dwave QPUComputing Test Code
import networkx as nx
import dwave_networkx as dnx
import matplotlib.pyplot as plt
from dwave.system.samplers import DWaveSampler
from dwave.system.composites import EmbeddingComposite
sampler = EmbeddingComposite(DWaveSampler(config_file='~/Library/Application Support/dwave/dwave.conf', solver='DW_2000Q_2_1'))
G = nx.Graph()
G.add_edges_from([(1,2),(1,4),(1,5),(2,3),(2,5),(2,7),(3,4),(3,6),(4,5),(5,6),(5,7)])

SHUANG SONG

Independent Developer for Algorithms & Contracts

CONTACT

  • Phone Number: +1-626-489-5683 (US)
@ssghost
ssghost / BVA.py
Created December 31, 2019 06:29
Cirq: Demonstrates the Bernstein–Vazirani algorithm.
"""Demonstrates the Bernstein–Vazirani algorithm.
The (non-recursive) Bernstein–Vazirani algorithm takes a black-box oracle
implementing a function f(a) = a·factors + bias (mod 2), where 'bias' is 0 or 1,
'a' and 'factors' are vectors with all elements equal to 0 or 1, and the
algorithm solves for 'factors' in a single query to the oracle.
=== EXAMPLE OUTPUT ===
Secret function:
f(a) = a·<0, 0, 1, 0, 0, 1, 1, 1> + 0 (mod 2)
Sampled results:
@ssghost
ssghost / lost_alert.py
Last active April 2, 2020 10:26
If I lost in China for 3 days, this Telegram bot will automatically send my personal information to my best friends for seeking rescues.
from telegram import Bot
from threading import Timer
from eventlet import Timeout
def main(bot):
while True:
update = bot.getUpdates()[-1]
if update.message.text == '/start':
timer = Timer(60*60*24*3, post_alert, args=[bot,update])
timer.start()

My WebApplication TechStack

Web Apps

Mobile Apps

  • PY Kivy: My_Kivy
  • TS React Native: NS_TS_RCT