Skip to content

Instantly share code, notes, and snippets.

@RaczeQ
RaczeQ / pyarrow_multiprocessing_streaming.py
Last active May 18, 2024 07:50
Pyarrow Multiprocessing with streaming the result
import multiprocessing
from pathlib import Path
from queue import Queue
import pyarrow as pa
import pyarrow.parquet as pq
def _worker(queue: Queue[tuple[str, int]], save_path: Path, *args, **kwargs) -> None:
current_pid = multiprocessing.current_process().pid
@wilinz
wilinz / ms-edge-tts-api.md
Last active May 18, 2024 07:49
微软edge-tts-api(大声朗读协议)
@dogles
dogles / markovjr_tech_notes.md
Last active May 18, 2024 07:48
Markov Jr. Technical Notes

Introduction

Markov Jr. is an open source C# application that creates procedural content primarily via applying Markov rewrite rules to a 2D or 3D grid. A rewrite rule has an input and output pattern, which essentially specifies what pattern to look for in the existing grid, and what to replace it with.

For example, given a 2D grid, this would replace any white dot with a white cross:

***/*W*/*** :: *W*/WWW/*W*

The left hand side is the rule input, and the right hand side is the output. The / character is used to delimit rows, and space is used to delimit Z-layers (in 3D grids). The input rule above translates to the 2D pattern:

@rebane2001
rebane2001 / plot_discord_predictions.py
Created May 18, 2024 00:18
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
"""
@darinwilson
darinwilson / sonic_pi_examples.txt
Last active May 18, 2024 07:48
Sonic Pi Examples
##############################################
## Example 1 - play a note
play 60
##############################################
## Example 2 - play 4 random notes
4.times do
play rrand_i(60, 90)
sleep 0.5
@jhsi
jhsi / .bash_profile
Created January 26, 2019 18:51
.bash_profile
export LSCOLORS='Cxgxfxfxbxdxdxhbadcxcx'
# Git
alias gs='git status'
alias gc='git commit'
alias ga='git add .'
alias gcm='git commit -m'
alias gco='git checkout'
alias gl='git pull'
alias gpom='git push origin master'
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 18, 2024 07:44
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 18, 2024 07:43
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 18, 2024 07:41
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mowshon
mowshon / moviepy-zoom-in-effect.py
Last active May 18, 2024 07:41
Zoom-in Effect for Moviepy. This function makes the zoom effect smoother.
import moviepy.editor as mp
import math
from PIL import Image
import numpy
def zoom_in_effect(clip, zoom_ratio=0.04):
def effect(get_frame, t):
img = Image.fromarray(get_frame(t))
base_size = img.size