Skip to content

Instantly share code, notes, and snippets.

View hadpro24's full-sized avatar
🎯
Focusing

Harouna Diallo hadpro24

🎯
Focusing
  • Lead Tech, Way2Call
  • Guinée, Conakry, GN
View GitHub Profile
@hadpro24
hadpro24 / config.json
Created June 22, 2023 16:14
confg.json
[
{
"origin": ["https://backoffice-front-newprod-gevxguoisq-ew.a.run.app", "https://backoffice-front-newdev-gevxguoisq-ew.a.run.app", "https://backoffice-front-newtest-gevxguoisq-ew.a.run.app"],
"method": ["GET"],
"responseHeader": ["Content-Type"],
"maxAgeSeconds": 3600
}
]
@hadpro24
hadpro24 / celery_app.py
Created March 13, 2023 13:42 — forked from speedplane/celery_app.py
Celery Autoscaler Based on Memory and System Load
import multiprocessing
import re
from celery import Celery
from celery.worker.autoscale import Autoscaler as CeleryAutoscaler
class DAAutoscaler(CeleryAutoscaler):
# Try to keep the load above this point.
LOAD_MIN = .8
# Try to keep the load below this.
LOAD_MAX = 1.1
@hadpro24
hadpro24 / index.html
Last active August 28, 2021 17:26
Palindrome Challenge with JavaScript
<div id="palindrome">
<div data-top>
<h1>Palindrome Checker</h1>
<span>A man, a plan, a canal. Panama</span>
</div>
<div data-entry>
<input type="text">
<button data-analyse>ANALYSE</button>
</div>
<div data-message id="results">Not checks yet!</div>
<script type="text/javascript">
var recorder;
const record = async() =>{
let localStream
try {
localStream = await navigator.mediaDevices.getUserMedia({
audio: true
})
} catch (error) {
console.log(error)
import os
import os.path as path
import argparse
import smtplib, ssl
import mysql.connector
import pandas as pd
import numpy as np
from flask import Flask
from flask_restful import Api, Resource, reqparse
app = Flask(__name__)
api = Api(app)
users = [
{
"name": "Nicholas",
"age": 42,
@hadpro24
hadpro24 / __replit_main__
Created February 11, 2019 19:09
ThoroughLoudBytecode created by hadpro24 - https://repl.it/@hadpro24/ThoroughLoudBytecode
const allStates = ["Abia", "Adamawa", "Anambra", "Akwa Ibom", "Bauchi", "Bayelsa", "Benue", "Borno", "Cross River", "Delta", "Ebonyi", "Enugu", "Edo", "Ekiti", "Gombe", "Imo", "Jigawa", "Kaduna", "Kano", "Katsina", "Kebbi", "Kogi", "Kwara", "Lagos", "Nasarawa", "Niger", "Ogun", "Ondo", "Osun", "Oyo", "Plateau", "Rivers", "Sokoto", "Taraba", "Yobe", "Zamfara"];
function compare(x, y) {
return x.length - y.length;
}
const sortByNameLength = (states) => {
states.sort(compare);
return states;