Skip to content

Instantly share code, notes, and snippets.

View tempusfrangit's full-sized avatar
🕑
GPUs go Brrrrrrrrrrr

Morgan Fainberg tempusfrangit

🕑
GPUs go Brrrrrrrrrrr
  • Replicate
  • Santa Barbara, California
  • 04:12 (UTC -07:00)
View GitHub Profile
# Clone repo
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
# Build
mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
@tempusfrangit
tempusfrangit / Dockerfile
Last active September 10, 2018 23:25
Keystone Docker Dev
FROM ubuntu:16.04
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq curl python3-dev python-software-properties curl apt-transport-https build-essential git
RUN curl https://bootstrap.pypa.io/get-pip.py | python3
RUN pip install bindep
RUN pip install tox
ADD ./${OS_PROJECT:-keystone}/bindep.txt /opt/bindep.txt
ADD ./${OS_PROJECT:-keystone}/requirements.txt /opt/requirements.txt
@tempusfrangit
tempusfrangit / dep.py
Created August 28, 2017 23:39
new dependency code (meta)
class _NoDependencyFound(Exception):
"""Internal-use only exception for the registry."""
class DuplicateProviderError(Exception):
"""A duplicate provider API is attempting to be registered."""
class DependencyRegistry(object):
@tempusfrangit
tempusfrangit / example.py
Created August 10, 2017 17:26
Meta Example
`import re
import six
class Meta(type):
registry = {}
def __new__(meta, name, bases, class_dict):
cls = None
parts = [p.lower() for p in re.split(r'([A-Z][a-z]*)', name) if p]
name = '_'.join(parts)

Keybase proof

I hereby claim:

  • I am morganfainberg on github.
  • I am mdrnstm (https://keybase.io/mdrnstm) on keybase.
  • I have a public key whose fingerprint is 0D1A 8C84 23CF 3C86 BF42 0F7B B9A8 3CEF A07C 6D8A

To claim this, I am signing this object:

@tempusfrangit
tempusfrangit / HOW_IT_SHOULD_WORK
Last active November 29, 2015 15:04
How OpenStack's Catalog should *really* look.
+-------------+----------------+-----------------------------------------------------------------------------------+
| Name | Type | Endpoints |
+-------------+----------------+-----------------------------------------------------------------------------------+
| nova | compute | RegionOne |
| | | publicURL: http://192.168.1.181/compute/v2.1/a9d75052b9a54a26a5feec6a20fbcc3b |
| | | internalURL: http://192.168.1.181/compute/v2.1/a9d75052b9a54a26a5feec6a20fbcc3b |
| | | adminURL: http://192.168.1.181/compute/v2.1/a9d75052b9a54a26a5feec6a20fbcc3b |
| | | |
| cinderv2 | volumev2 | RegionOne
@tempusfrangit
tempusfrangit / explicit_deps_in_init.diff
Last active August 29, 2015 14:09
Kilo Summit Summary
diff --git a/keystone/assignment/core.py b/keystone/assignment/core.py
index a16aafc..1cb808e 100644
--- a/keystone/assignment/core.py
+++ b/keystone/assignment/core.py
@@ -48,9 +48,6 @@ def calc_default_domain():
'name': u'Default'}
-@dependency.provider('assignment_api')
-@dependency.optional('revoke_api')
@tempusfrangit
tempusfrangit / untriaged.py
Created September 27, 2014 00:27
Keystone Untriaged Bug Report Bot
#!/usr/bin/env python
import itertools
import socket
import time
from launchpadlib import uris
from launchpadlib.launchpad import Launchpad