This set of launch.json
and task.json
files allow you to build and debug individual C files from within Windows
while using the gcc
collection installed within your WSL environment.
sudo apt-get update
sudo apt-get install -y gcc gdb
import os | |
import ycm_core | |
from clang_helpers import PrepareClangFlags | |
# Set this to the absolute path to the folder (NOT the file!) containing the | |
# compile_commands.json file to use that instead of 'flags'. See here for | |
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html | |
# Most projects will NOT need to set this to anything; you can just change the | |
# 'flags' list of compilation flags. Notice that YCM itself uses that approach. | |
compilation_database_folder = '' |
This set of launch.json
and task.json
files allow you to build and debug individual C files from within Windows
while using the gcc
collection installed within your WSL environment.
sudo apt-get update
sudo apt-get install -y gcc gdb
""" | |
setup: | |
pip install requests | |
pip install requests[socks] | |
super helpful: | |
- http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/ | |
- http://docs.python-requests.org/en/master/user/advanced/#proxies | |
""" |
#!/usr/bin/env python | |
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | |
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4 | |
""" | |
THIS CODE IS OUTDATED! Please use this instead: | |
https://pypi.org/project/pyuac/ | |
https://github.com/Preston-Landers/pyuac |
#!/bin/bash | |
# Note: you might prefer latexmk -c since latexmk is great. It doesn't clean all of these, but see | |
# https://tex.stackexchange.com/questions/83341/clean-bbl-files-with-latexmk-c/83386#83386 | |
exts=".aux .lof .log .lot .fls .out .toc .dvi .bbl .bcf .blg -blx.aux -blx.bib -blx.bib .run.xml .fdb_latexmk .synctex.gz .syntex.gz(busy) .pdfsync .algorithms .alg .loa .thm .nav .snm .vrb .acn .acr .glg .glo .gls .brf .lol .idx .ilg .ind .ist .maf .mtc .mtc0 .pyg .nlo .tdo .xdy .keys" | |
for x in "${@:-.}"; do | |
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//') |
# default.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
schema_list: | |
- schema: luna_pinyin # 朙月拼音 | |
- schema: luna_pinyin_simp # 朙月拼音 简化字模式 |
import bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |
def matprint(mat, fmt="g"): | |
col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T] | |
for x in mat: | |
for i, y in enumerate(x): | |
print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ") | |
print("") | |
# Try it! | |
import numpy as np |
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |