Skip to content

Instantly share code, notes, and snippets.

View JRodez's full-sized avatar

Jérémie Rodez JRodez

  • IRIT, Paul Sabatier University
  • Toulouse, France
View GitHub Profile
@JRodez
JRodez / oc-C-itan.h
Last active October 28, 2023 19:35 — forked from ntsh-oni/franC.h
oc-C-itan
// Brancas
#define se if
#define senon else
#define far do
#define tantque while
#define per for
#define commutacion switch
#define cas case
#define defaut default
#define copar break
@JRodez
JRodez / httpServerOneM2M.py
Created November 22, 2023 10:00
OneM2M notification server
# server.py
import http.server # Our http server handler for http requests
import socketserver # Establish the TCP Socket connections
import time
PORT = 9999
class MyHttpRequestHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self) -> None:
self.send_response(200)
self.send_header('Content-type', 'text/html')
@JRodez
JRodez / sgflatdump.cpp
Created December 19, 2023 19:03
SimGrid cpp platform to expanded xml
#include <simgrid/instr.h>
#include <simgrid/s4u.hpp>
#include <simgrid/s4u/Host.hpp>
// #include "simgrid/s4u.hpp"
#include <xbt/log.h>
#include <rapidjson/document.h>
#include <rapidjson/writer.h>
#include <string>
@JRodez
JRodez / encaps_router.cpp
Last active May 3, 2024 15:24
3 level SimGrid platform
/* Copyright (c) 2006-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
// based on routing_cluster of SimGrid official source code, modified by JRodez
#include <simgrid/s4u.hpp>
#include "simgrid/instr.h"
#include <simgrid/kernel/routing/NetPoint.hpp>
@JRodez
JRodez / starship-config.nix
Created January 31, 2024 13:30
Starship "Powerline" preset in Nix format
{
# # You can use this file as below:
# # In configuration.nix:
# programs = {
# starship = {
# enable = true;
# settings = (import ./starship-config.nix).starshipSettings;
# };
# # ...
# };