Skip to content

Instantly share code, notes, and snippets.

View Clivern's full-sized avatar

Ahmed Clivern

View GitHub Profile
@Clivern
Clivern / Dockerfile
Created October 30, 2025 20:00
Podman
# Multi-stage build for a minimal image
FROM golang:1.25-alpine AS builder
WORKDIR /build
# Copy source
COPY main.go .
# Build static binary
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o server main.go
@Clivern
Clivern / struct.go
Last active October 18, 2025 22:06
Go Embedding Structs
// Package main demonstrates object composition and encapsulation in Go.
// It defines a Citizen type and a Student type that embeds Citizen,
// providing getter and setter methods for each field.
package main
import (
"fmt"
)
// Citizen represents a person with basic personal identifiers.
@Clivern
Clivern / openbao.md
Last active September 30, 2025 20:41

openbao.yml

---
apiVersion: v1
kind: Pod
metadata:
  labels:
    app: openbao
    env: prod
  name: openbao

Traffic Safety and Emergency Information

  • 90% of traffic accidents are caused by human error
  • 15% of road accidents are caused by fatigue
  • Emergency number: 112
  • Non-emergency number: 09008844
  • Emergency lay-bys are installed every 500-1000 metres
  • Warning triangle must be placed 30 metres from the vehicle

Vehicle Inspection Schedules

@Clivern
Clivern / bigo.md
Created July 5, 2024 20:52
bigolive hacks
// Function to fill textarea and click send button
function fillAndSend(message) {
  // Select the textarea
  const textarea = document.querySelector('textarea[placeholder="Chat with everyone"]');
  
  // Fill the textarea with the message
  if (textarea) {
    textarea.value = message;
 
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Clivern
Clivern / scikit.ipynb
Created December 17, 2023 17:55
Supervised Learning With scikit-learn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Clivern
Clivern / scikit1.ipynb
Created December 17, 2023 17:53
Introduction to Machine Learning With Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Ubuntu 22.04 for Deep Learning

In the name of God

This gist contains steps to setup Ubuntu 22.04 for deep learning.


Install Ubuntu 22.04

@Clivern
Clivern / server.py
Created October 2, 2023 20:54
Live status
import socket
import os
import json
try:
os.remove("/tmp/livestatus.sock")
except OSError:
pass
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)