This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, json, argparse, os, uuid, time | |
def ttsmaker_query(text, output_file, token="ttsmaker_demo_token", voice_id=147, audio_format="wav", speed=1.05, volume=0, paragraph_pause=0): | |
if "\n" in text: | |
os.system("sox " + " ".join([ttsmaker_query(text_frag, str(uuid.uuid4())+"."+audio_format, token, voice_id, audio_format, speed, volume, paragraph_pause) for text_frag in text.split("\n")]) + " " + output_file) | |
return output_file | |
url = 'https://api.ttsmaker.com/v1/create-tts-order' | |
headers = {'Content-Type': 'application/json; charset=utf-8'} | |
params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
#include <array> | |
#include <random> | |
#include <chrono> | |
#include <vector> | |
#include <string> | |
#include <fstream> | |
#include <cstdlib> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/nonrice/a741901b887a070c37ad93b2e2c14c7a | |
background #38230D | |
foreground #FF9729 | |
cursor #FF9729 | |
color0 #38230D | |
color1 #CE4B16 | |
color2 #9A781E | |
color3 #FF9721 | |
color4 #8D6020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command line tool to manage journal entries | |
# | |
# SETUP: | |
# 1. Install required tools: Vim, FZF | |
# 2. Replace the contents of JOURNAL_DIR with where you want the journal to be | |
# 3. (Optional) make an alias in your shell RC to easily run the script | |
JOURNAL_DIR = "/Users/eric/Workspace/journal" | |
# HOW TO USE: | |
# Simply run the file and supply arguments if needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin indent on | |
autocmd filetype cpp nnoremap <F5> <Cmd>:w<CR>:!cprun.zsh %<CR> | |
autocmd filetype tex nnoremap <F5> <Cmd>:w<CR>:!xelatex % && open %<.pdf<CR> | |
autocmd filetype python nnoremap <F5> <Cmd>:w<CR>:!python3 % < ~/.in<CR> | |
nnoremap <F6> <Cmd>:w<CR>:e ~/.in<CR> | |
set tabstop=4 shiftwidth=4 softtabstop=4 autoindent expandtab | |
set backspace=2 | |
set number relativenumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <cstring> | |
/* Installation: | |
* Compile from source: g++ todo.cpp -o todo -O3 | |
* Put it into path: sudo mv ./todo /usr/local/bin | |
* | |
* Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Run :PlugInstall when opening for the first time, then relaunch nvim | |
"important thing | |
filetype plugin indent on | |
"utility binds | |
nmap <C-i> <Cmd>:bnext<CR> | |
tnoremap <Esc> <C-\><C-n> | |
nnoremap <F6> <Cmd>:vsp<CR>:wincmd l<CR>:e ~/in.txt<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Downloads audio and cover art from youtube video and automatically adds to your iTunes music library. | |
# | |
# Required packages: | |
# youtube-dl | |
# eyeD3 | |
# imageMagick | |
# | |
# To use, first make the script runnable: |