Skip to content

Instantly share code, notes, and snippets.

@kbrafford
kbrafford / gist:bba81d2278cdf9afd7bd185f40e3a2be
Created July 18, 2020 17:10
How to copy a complete git repo
What I asked <<origin company>> to give us:
In order to clone the repositories and get the branches please have them follow
this procedure on each of the repos:
# Let's mirror the <<reponame>> repo:
git clone --mirror git@github.com/<<origin company>>/path/to/<<reponame>>.git <<reponame>>/.git
{
"Alabama": [
"Autauga County",
"Baldwin County",
"Barbour County",
"Bibb County",
"Blount County",
"Bullock County",
"Butler County",
"Calhoun County",
{
"Alabama": [
"Autauga County",
"Baldwin County",
"Barbour County",
"Bibb County",
"Blount County",
"Bullock County",
"Butler County",
"Calhoun County",
>>> for p in (3,6,9):
... EFloat.precision = p
... for f in (math.pi, 12, 823, 1024, 1024**2, 1024**3):
... print EFloat(f), 1/EFloat(f)
...
3.142e+00 318.310e-03
12.000e+00 83.333e-03
823.000e+00 1.215e-03
1.024e+03 976.562e-06
1.049e+06 953.674e-09
'''
EmbeddedExcellence.Formatting package
efloat module
Keith Brafford
Copyright (c) 2010 Embedded Excellence, Inc.
All Rights Reserved
'''
import math
from random import uniform, seed
from math import sqrt
from multiprocessing import Pool, freeze_support
def f(count):
seed()
CIRCLES = ((10,10),(-10,10),(-10,-10), (10,-10))
tot_count, in_count = 0, 0
# uuid.py
#
# Create a Bluetooth LE service UUID, formatted for use with Nordic's SDK
#
# Keith Brafford (2019 Sep 24)
import click
import requests
import re
import sys
Day 6
======
Someone did a cool version using the `click` package. click is cool...learn it. better than argparse
Day 7
======
captncraig
----------
* just xlate to graphviz and you can also do it in the browser:
- https://pastebin.com/raw/1xQeA1AH
Number of platforms: 2
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (2236.10)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 1.2
Platform Name: Intel(R) OpenCL
Platform Vendor: Intel(R) Corporation
@kbrafford
kbrafford / Glasses, pitcher, ashtray and dice (POV-Ray)
Created January 6, 2015 00:30
Altered POVRay file for 4K rendering of "Glasses, pitcher, ashtray and dice"
//-----------------------------------------
// Demo scene for various glass and kitchen props
// -----------------------------------------
// 4 types of glasses with 2 levels of liquid
// an ashtray, a pitcher and some dice
// All meshes modeled with Rhino except the dice that were
// modeled in Cinema 4D.
// -----------------------------------------
// Made for Persistence of vision 3.6
//==========================================