Author: https://github.com/seanorama
Note: This was tested on HDP 3.1. It may not work with other Spark/YARN distributions.
Author: https://github.com/seanorama
Note: This was tested on HDP 3.1. It may not work with other Spark/YARN distributions.
This is a little guide that helps you to "proxify" a VMware Fusion virtual machine on macOS. This can be useful if you want to isolate and analyse web traffic to/from an application by running it in a VM.
# coding=utf-8 | |
""" | |
线程池. | |
:copyright: (c) 2015 by fangpeng. | |
:license: MIT, see LICENSE for more details. | |
""" | |
import sys | |
import Queue | |
import threading |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
" ------------------------------ | |
" Name: vimrc for windows | |
" Author: keelii | |
" Email: [email protected] | |
" ------------------------------ | |
" Startup {{{ | |
filetype indent plugin on | |
augroup vimrcEx |
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✘" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[red]%}➦" | |
# ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" | |
# ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" | |
# ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" | |
# ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" |
About my endeavor to automatically retrieve grammar of CPython
.pyc
-files bytecode from Python
's sources itself (success) and build parser on them (failed).
Most recent version of this article is always on GitHub
In 2011 as part of my diploma thesis I came up with an assembler language for .pyc
files and wrote a simple proof-of-concept assembler for it based on ANTLR3
parser generator. Back then I stumble upon the issue that CPython
bytecode is somewhat not stable and differs from version to version. I.e., as of Python
from 3.0
to 3.4
there are 28 incompatible bytecode versions (you may find all bytecode versions with their descriptions in Python34/Lib/importlib/_bootstrap.py
).
So, if we aim to devise an assembler or disassembler not for one bytecode version but for many, we face a routine of retrieving out these bytecode differences. This task strikingly
""" | |
Inserts C code directly into Python files, which can then be dynamically linked | |
in and called via ctypes. | |
""" | |
import atexit | |
import ctypes | |
import os | |
import shlex | |
import sys | |
import tempfile |