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
(require 'flycheck) | |
;; From https://github.com/flycheck/flycheck/issues/1974#issuecomment-1343495202 | |
(flycheck-define-checker python-ruff | |
"A Python syntax and style checker using the ruff utility. | |
To override the path to the ruff executable, set | |
`flycheck-python-ruff-executable'. | |
See URL `http://pypi.python.org/pypi/ruff'." | |
:command ("ruff" | |
"--format=text" |
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
from typing import List, TypeVar | |
from docutils import nodes | |
from docutils.nodes import Element | |
from sphinx import addnodes | |
from sphinx.application import Sphinx | |
from sphinx.environment.adapters.toctree import TocTree | |
import sphinx.environment.collectors.toctree as toctree_collector | |
from sphinx.transforms import SphinxContentsFilter |
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/bash | |
# | |
# Convert an SVG file to a PDF file by using headless Chrome. | |
# | |
if [ $# -ne 2 ]; then | |
echo "Usage: ./svg2pdf.bash input.svg output.pdf" 1>&2 | |
exit 1 | |
fi |
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
# On Windows 7, 8, 10 Hosts file is in c:\windows\system32\drivers\etc\hosts | |
# | |
# Block Skype ads | |
127.0.0.1 secure-sin.adnxs.com # On skype 7.* | |
127.0.0.1 *.adnxs.com # On skype 7.* | |
127.0.0.1 logi10.xiti.com # On skype 7.* | |
127.0.0.1 *.everesttech.net # On skype 7.* | |
127.0.0.1 pixel.everesttech.net # On skype 7.* | |
127.0.0.1 d.adroll.com # On skype 7.* |
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
library(mgcv) | |
library(ggplot2) | |
library(dplyr) | |
library(XML) | |
library(weatherData) | |
us.airports.url <- 'http://www.world-airport-codes.com/us-top-40-airports.html' | |
us.airports <- readHTMLTable(us.airports.url)[[1]] %>% | |
filter(!is.na(IATA)) %>% |
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 numpy as np | |
import matplotlib.pyplot as plt | |
w = 400 | |
h = 300 | |
from numba import autojit | |
@autojit | |
def normalize(x): |
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/bash | |
## Is emacs-jedi already running? | |
ps -ef | grep jedi-port.lo[g] 2>&1 >/dev/null | |
if [[ $? -ne 0 ]] | |
then | |
# Replace the following 3 lines with your virtualenv | |
cd ~/Documents/emacs-jedi/env/ | |
source bin/activate | |
nohup python ~/Documents/emacs-jedi/jediepcserver.py --port-file ~/Documents/emacs-jedi/jedi-port.log & |
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
# -*- coding: utf-8 -*- | |
""" | |
%with and %endwith magics. | |
""" | |
#----------------------------------------------------------------------------- | |
# Imports | |
#----------------------------------------------------------------------------- | |
import re |