This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* HOW TO USE ? | |
* | |
* 1. Compile the program using `gcc shm_sysV.c` | |
* 2. Start the master process by typing `./a.out "Any string of your choice"` | |
* 3. Finally, you can visualize the shared buffer of memory by starting another process | |
* without any arguments: `./a.out`. | |
* 4. When you're done you can kill the master process and free the memory (Ctrl+C) | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* exit */ | |
#include <stdlib.h> | |
/* close, fstat */ | |
#include <unistd.h> | |
/* open, fstat */ | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ft_ping 42 project POC. | |
* | |
* Date: 2021-10-21 | |
* | |
* How to compile: | |
* clang -Wall -Wextra -Werror path/to/this/script.c | |
* | |
* How to run: | |
* ./a.out <ip adress> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* HOW TO USE ? | |
* | |
* 1. Compile the program using `gcc sem_sysV.c` | |
* 2. Start the processes one by one | |
* 3. You'll see that only one process will enter the "main loop" | |
* 4. if you want another process to enter the loop, you must kill the process that is running the loop. | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import json | |
HTTP_VERSION = '1.0' | |
HTTP_STATUS_CODES = { | |
200: 'OK', | |
201: 'CREATED', | |
202: 'ACCEPTED', | |
204: 'NO CONTENT', | |
400: 'BAD REQUEST', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from importlib import import_module | |
from pip.commands.list import get_installed_distributions as get_modules | |
MODULES = get_modules() | |
if __name__ == '__main__': | |
module_name = sys.argv[-1] | |
tmp_path = sys.path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import queue | |
import threading | |
import time | |
import boto3 | |
class AsynchronousS3: | |
"""Download/Upload asynchronously files from/to AWS S3 bucket. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" French cat AI. | |
This code is inspired from crash course AI about NLP: | |
https://www.youtube.com/watch?v=oi0JXuL19TA | |
""" | |
__author__ = 'fherbine' | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Personnal exercise based on Derek banas work - https://www.youtube.com/watch?v=zeTPUdhfJOk --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Meteo</title> | |
<meta charset="utf-8"> | |
</head> | |
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> | |
<script> | |
var api_uri = "https://www.prevision-meteo.ch/services/json/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import datetime | |
import sys | |
from hashlib import md5 | |
import requests | |
import sh | |
from bs4 import BeautifulSoup |