Skip to content

Instantly share code, notes, and snippets.

View puilp0502's full-sized avatar

Frank Yang puilp0502

View GitHub Profile
@shawwn
shawwn / 65b_samples.txt
Last active May 18, 2023 06:35
Some LLaMA 65B outputs after fixing the sampler settings.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{"seed": 374894, "temp": 0.7, "top_p": 0.0, "top_k": 40, "repetition_penalty": 1.1764705882352942, "max_seq_len": 512, "max_gen_len": 511}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading
Loaded in 8.72 seconds
============== sample 1 =================
I believe the meaning of life is to grow, learn and give.
@zzzeek
zzzeek / async_to_greenlet_to_async.py
Last active January 22, 2024 15:35
Write a program in asyncio, that calls into a library that knows nothing about asyncio, which then calls out to a database adapter that is only asyncio
"""Proof of concept of an adapter that will wrap a blocking IO library in
greenlets, so that it can be invoked by asyncio code and itself make calls out
to an asyncio database library.
hint: any Python ORM or database abstraction tool written against the DBAPI
could in theory allow asyncio round trips to a pure async DB driver like
asyncpg.
The approach here seems too simple to be true and I did not expect it to
collapse down to something this minimal, so it is very possible I am totally
@mightymercado
mightymercado / worker.py
Last active June 16, 2024 05:25
Send data to a multiprocessing.Process running an asyncio event loop
# A rare scenario: Communicate to a child process that's running an event loop
import asyncio
from asyncio import StreamReader, StreamReaderProtocol
from multiprocessing import Process
import os
class Worker:
def __init__(self):
self.read_fd, self.write_fd = os.pipe()
@robodhruv
robodhruv / modelsim_installation.md
Last active July 21, 2024 23:06
Installing ModelSim on Ubuntu

ModelSim Installation issues

Ubuntu 14.xx and above

Ignore this if you have not encountered any issue with the installation and running of ModelSim and Quartus on your system. You are very lucky. (Just Kidding! You have surely had this issue, only sorted.)

Hence assuming you have been following the procedure given in this guide. Most certainly, Quartus will install jsut fine, and so will ModelSim. The issue is in launching due to inappropriate linking etc.

Stage 1

This is the simplest error you would encounter. Navigate to the modelsim_ase folder and run:

@allieus
allieus / README.md
Last active February 15, 2020 13:23
네이버 지도 v3, 장고 위젯 예시

네이버 지도 v3 지도, 장고 Point 위젯

@alexei-led
alexei-led / create_swarm_cluster.sh
Last active April 15, 2024 20:45
Deploy Docker Compose (v3) to Swarm (mode) Cluster
#!/bin/bash
# vars
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3
# init swarm (need for service command); if not created
docker node ls 2> /dev/null | grep "Leader"
if [ $? -ne 0 ]; then
docker swarm init > /dev/null 2>&1
fi
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ubuntu-desktop build-essential git automake checkinstall gcc-6 g++-6 \
    intltool libtool \
    alsa-base alsa-utils alsa-tools libasound2 libasound2-plugins \
    libx11-dev libx11-xcb-dev check libsndfile1-dev libtdb-dev libgdbm-dev \
    libgtk-3-dev libgconf2-dev \
    libjack-dev jack libasyncns-dev libasyncns0 libwrap0-dev libwrap0 libsbc-dev libsbc1 \
    libavahi-common-dev libavahi-client3 libdbus-1-dev libssl-dev \
@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 07:54
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 22, 2024 02:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites