Skip to content

Instantly share code, notes, and snippets.

View jdavidrcamacho's full-sized avatar
🚀
Working

João Camacho jdavidrcamacho

🚀
Working
View GitHub Profile
@jdavidrcamacho
jdavidrcamacho / steps.sh
Last active October 14, 2025 12:54
Steps
# Install fluent-package v6 LTS:
sudo apt update
curl -fsSL https://fluentd.cdn.cncf.io/sh/install-ubuntu-noble-fluent-package6-lts.sh | sudo sh
# Make sure the service is up and running:
sudo systemctl enable --now fluentd
@jdavidrcamacho
jdavidrcamacho / stuff.sh
Last active October 10, 2025 07:34
stuff
# 1) Create the group (safe if it already exists)
sudo groupadd -r cmdlog || true
# 2) Make sure the log file exists
sudo touch /var/log/test.log
# 3) Give it group ownership & permissions
sudo chgrp cmdlog /var/log/test.log
sudo chmod 664 /var/log/test.log
@jdavidrcamacho
jdavidrcamacho / fluent.conf
Last active October 2, 2025 14:16
fluent_conf
<system>
log_level info
</system>
# Still tail your test file
<source>
@type tail
path /var/log/test.log
pos_file /var/log/fluentd/test.pos
tag test_logs
@jdavidrcamacho
jdavidrcamacho / timelines_europe.py
Created October 29, 2024 11:27
Timeline of ancient civilizations in europe
import matplotlib.pyplot as plt
# Updated timeline data for European civilizations and periods
timelines_europe = {
# Neolithic Cultures
"Neolithic Cultures": {"start": -7000, "end": -2500, "color": "lightgreen"},
"Cardial Culture": {"start": -6000, "end": -5000, "color": "lightblue"},
"Linear Pottery Culture (LBK)": {
"start": -5500,
"end": -4500,
@jdavidrcamacho
jdavidrcamacho / timelines_fertile_crescent.py
Last active June 22, 2025 16:51
Timeline of ancient civilizations in the fertile crescent
import matplotlib.pyplot as plt
# Updated timeline data with BCE year representation, including all events
timelines_simple = {
# Ubaid Period
"Ubaid Period": {"start": -6500, "end": -3800, "color": "salmon"},
# Sumerian periods
"Early Sumerian Settlement": {"start": -4500, "end": -4000, "color": "skyblue"},
"Uruk Period (Sumerians)": {"start": -4000, "end": -3100, "color": "skyblue"},
"Early Dynastic Period (Sumerians)": {
@jdavidrcamacho
jdavidrcamacho / SciTEGlobal.properties
Created February 21, 2022 11:25
My setting for scite
# Global initialisation file for SciTE
# For Linux, place in $prefix/share/scite
# For Windows, place in same directory as SciTE.EXE (or Sc1.EXE)
# Documentation at http://www.scintilla.org/SciTEDoc.html
# Globals
# Window sizes and visibility
if PLAT_WIN
position.left=0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import matplotlib.pylab as plt
from scipy import stats
myclip_a, myclip_b = -2, 2
my_mean, my_std = 0, 0.5
a, b = (myclip_a - my_mean) / my_std, (myclip_b - my_mean) / my_std
plt.hist(stats.norm(0,0.5).rvs(10000), bins = 100)
import numpy as np
#np.random.seed(101111)
import matplotlib.pyplot as plt
plt.close('all')
from tedi import utils
def SamplingSun(initFile, finalFile, timespan, observationsNumber,
planet = False, planetParams = [], saveFile = True):
""" Parameters:
initFile = cleaned SunAsAStar file
import numpy as np
import matplotlib.pylab as plt
plt.close('all')
def vanEck(n):
#starts at 0
vanEck = np.array([0])
#first value is 0
i=vanEck[0]
while i < n: