Skip to content

Instantly share code, notes, and snippets.

View bjoekeldude's full-sized avatar
🦖

Stephanos bjoekeldude

🦖
View GitHub Profile
@bjoekeldude
bjoekeldude / CMakeLists.txt
Last active May 14, 2023 14:36
This Gist helps to get the first Copperspice Tutorial from the CS-Journal running under Ubuntu 20.04. Check out the CS-Journal at https://journal.copperspice.com
cmake_minimum_required(VERSION 3.16)
project(example_1)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
find_package(CopperSpice REQUIRED)
@bjoekeldude
bjoekeldude / CMakeLists.txt
Last active May 14, 2023 13:26
This is example 1 of the Copperspice-Journal at https://journal.copperspice.com/
cmake_minimum_required(VERSION 3.16)
project(example_1)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
find_package(CopperSpice REQUIRED)
@bjoekeldude
bjoekeldude / CMakeLists.txt
Created May 14, 2023 13:15
This is the minimalistic CMake file for example 1 of the copperspice-journal at https://journal.copperspice.com/?p=160
cmake_minimum_required(VERSION 3.16)
project(example_1)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles)
include(CheckIncludeFile)
include(CheckIncludeFiles)
find_package(CopperSpice REQUIRED)
@bjoekeldude
bjoekeldude / csv.py
Created April 25, 2023 08:10
FastAPI to upload .csv and write into Database
import csv
import io
from fastapi import FastAPI, File, UploadFile, HTTPException
from sqlalchemy import create_engine, Column, Integer, String, Float, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import declarative_base, relationship, sessionmaker
# Datenbankkonfiguration
DATABASE_URL = "sqlite:///./sensordaten.db"
engine = create_engine(DATABASE_URL)
@bjoekeldude
bjoekeldude / fetch_and_sort.py
Created April 21, 2023 13:45
Zechen fetch and sort
import requests
import sys
def fetch_data(api_url):
response = requests.get(api_url)
data = response.json()
return data
def sort_data(data, column):
try:
import tkinter as tk
from tkinter import messagebox
import requests
# Keycloak-Konfiguration
keycloak_url = "https://your-keycloak-server/auth/realms/your-realm/protocol/openid-connect/token"
client_id = "your-client-id"
client_secret = "your-client-secret"
#!python3
import tkinter as tk
from tkinter import messagebox
import requests
# Keycloak-Konfiguration
keycloak_url = "https://your-keycloak-server/auth/realms/your-realm/protocol/openid-connect/token"
client_id = "your-client-id"
client_secret = "your-client-secret"
@bjoekeldude
bjoekeldude / CMakeLists.txt
Created October 29, 2022 18:45
Minimale CMake Datei für die Vorlesung "Einführung in die Programmierung"
# Zunächst muss definiert werden, welche
# CMake Version mindestens benötigt wird
# um dieses Script auszuführen
cmake_minimum_required(VERSION 3.10)
# Im Anschluss daran wird ein Projektname
# festgelegt, auf welchen auch später über
# Variablen innerhalb des CMake Files zu-
# gegriffen werden kann, in diesem Fall
# "HELLO"
@bjoekeldude
bjoekeldude / doxy2latex.json
Created October 6, 2022 20:40
This file was created using the Doxypressapp GUI for generating Doxypress-Configuration-Files. It can be seen as an example. The Parameter "input-source" in Line 265 is responsible for configuring which source files shall be read.
{
"clang": {
"clang-compilation-path": "",
"clang-dialect": "-std=c++20",
"clang-flags": [
""
],
"clang-include-input-source": true,
"clang-parsing": false,
"clang-use-headers": true
@bjoekeldude
bjoekeldude / tasks.json
Created September 29, 2022 15:15
Simple Build-Config for mingw
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",