Skip to content

Instantly share code, notes, and snippets.

View BSVogler's full-sized avatar

Benedikt S. Vogler BSVogler

View GitHub Profile
@BSVogler
BSVogler / poetry.Dockerfile
Last active March 10, 2024 14:17
Poetry Dockerfile
FROM python:3.12-slim-bookworm
#libpq-dev python3-dev for psycopg
RUN apt-get update && apt-get -y install git curl #libldap2-dev libsasl2-dev g++ libffi-dev libpq-dev
RUN /usr/local/bin/python -m pip install --upgrade pip
ARG CI_COMMIT_SHA=local
ENV CI_COMMIT_SHA=$CI_COMMIT_SHA
ENV PYTHONUNBUFFERED 1
ARG PROJECT_ROOT="/app"
RUN mkdir $PROJECT_ROOT
WORKDIR $PROJECT_ROOT
@BSVogler
BSVogler / dumpload.py
Last active October 31, 2020 13:40
dump and load
import copy
import nest
from typing import Dict, List
def dump(selections: List = ("nodes", "synapses")) -> Dict:
"""Returns a dictionary containing the current net in memory for serialization.
Only a subset of the data can be serialized.
@BSVogler
BSVogler / gist:c2d3077b6cc08cfbd7071b5a6683f3fe
Created March 21, 2020 12:20
error message when trying to install
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/bsvogler/Dokumente/nest /home/bsvogler/Dokumente/nest-simulator/nest
CMake Error at CMakeLists.txt:97 (install):
install TARGETS given no RUNTIME DESTINATION for executable target "nest".
CMake Error at CMakeLists.txt:106 (FILTER_HEADERS):
Unknown CMake command "FILTER_HEADERS".
CMake Warning (dev) in CMakeLists.txt:
@BSVogler
BSVogler / bestCity.py
Created September 4, 2017 18:44
Code using the google maps API to identify the best place to live if you need to travel often.
#!/usr/local/bin/python3
import googlemaps
import numpy as np
from datetime import datetime
gmaps = googlemaps.Client(key='redacted insert your own key')
with open('./concertCities.txt') as f:
concertCities = f.read().splitlines()
@BSVogler
BSVogler / cats_and_dogs.py
Created December 15, 2016 17:27
Tensorflow cat vs dog classifier
#!/usr/bin/env python3
import numpy as np
import pickle
import os
import sys
from PIL import Image
def create_var(name, shape, stddev, wd):
dtype = tf.float32