Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
import os | |
from functools import wraps | |
def cmd(x): | |
return os.popen(x).read().strip() | |
def predecessors(hash): | |
return cmd("git log --pretty=%P -n 1 {0}".format(hash)).split(" ") | |
def is_a_merge_commit(hash): |
import argparse | |
import logging | |
import os | |
import pdb | |
import re | |
import subprocess | |
_cmds = {} | |
_args = [] |
$fn = 120; | |
thickness = 8; | |
height = 12; | |
width = 2; | |
module zero() { | |
difference() { | |
translate([0, 0, -.5*thickness]) | |
cylinder(h=thickness, d=height); | |
translate([0, 0, -.5*thickness-1]) |
#!/usr/bin/env python | |
""" | |
The top five vertices are at 72-degree increments at a height of z=A. | |
The next five vertices are at the same 72-degree incremenets at a | |
height of z=B. Next five are offset by 36 degrees, with z=-B, and last | |
five are also offset by 36 degrees with z=-A. The trick is to make sure | |
all the lengths are the same, and solve for A and B. | |
Let Ea and Fa be two adjacent vertices of the top five. Let Eb and Fb | |
be the vertices below them at z=B. Let Gb be the vertex connecting to |
Sometimes I'm doing stuff in PDB, the Python debugger, and I would like to hop out to a Bash prompt. Maybe I want to see what is the current directory, or what files are in the current directory, or I'd like to run some executable in this environment, or see what is on the current path. Anyway the trick is to do this.
$ python -m pdb foo.py
> /Users/wware/foo.py(3)<module>()
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7), tweaked by Will Ware in 2019
First one found from of
I need to wrap my head around this WSGI stuff. Let's dockerize this tutorial.
The Gunicorn "Green Unicorn" (pronounced jee-unicorn) is a Python Web Server Gateway Interface (WSGI) HTTP server. It is a pre-fork worker model, ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with a
#!/usr/bin/env python | |
import inspect | |
import linecache | |
import pprint | |
import yaml | |
import re | |
import os | |
import sys | |
import logging |
Here is the problem I'm trying to solve here. You have some code running in AWS or running in some far-away server rack. Your access to the machine in question is things like SSH or telnet. The code is running a bunch of jobs as part of a CI/CD system. You would like to kick off a job where the code runs with RemotePdb so that you can step through it and examine variables and set breakpoints and all that, without disturbing any other jobs running at the same time.
You can't change the code. You don't have time to get a merge request approved, and it doesn't make sense to do a merge request to facilitate what might be a very brief one-time debugging session. You need some kind of hooks in your production code that make this remote debugging stuff feasible without a fresh push to your CI/CD stack.