Skip to content

Instantly share code, notes, and snippets.

View mmsesay's full-sized avatar
🏠
Working from home

Muhammad Sesay mmsesay

🏠
Working from home
View GitHub Profile
@mmsesay
mmsesay / betweenTwoSets.js
Created January 6, 2022 07:42
Submissions Leaderboard Discussions Editorial There will be two arrays of integers. Determine all integers that satisfy the following two conditions: The elements of the first array are all factors of the integer being considered The integer being considered is a factor of all elements of the second array These numbers are referred to as being …
// https://www.hackerrank.com/challenges/between-two-sets/problem?isFullScreen=true
const getTotalX = (a, b) => {
const setAMax = Math.max(...a);
const setBMin = Math.min(...b);
let count = 0;
for(let i = setAMax; i <= setBMin; i++) {
let arr_factors = a.filter((e) => i % e == 0);
@mmsesay
mmsesay / input_data.py
Created August 17, 2020 16:44
Input data file which enables the use of the mnist datasets
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
<?php
namespace App\Utils;
use Gedmo\Sluggable\Util\Urlizer;
use League\Flysystem\AdapterInterface;
use League\Flysystem\FileNotFoundException;
use League\Flysystem\FilesystemInterface;
use League\Glide\Filesystem\FilesystemException;
<?php
namespace App\Controller;
use App\Entity\Attachment;
use App\Entity\Contract;
use App\GestionDeslogs;
use App\Entity\Event;
use App\Entity\AlertEvent;
use App\Form\EventType;
from flask import Flask, request
from datetime import datetime, date
import logging
from typing import List, Tuple, Dict, Optional
import time
import re
# import pymysql
import requests
import json
import pprint
from flask import Flask, request
from datetime import datetime, date
import logging
from typing import List, Tuple, Dict, Optional
import time
import re
import pymysql
import requests
import json
import pprint
from flask import Flask, request
from datetime import datetime, date
import logging
from typing import List, Tuple, Dict, Optional
import time
import re
import pymysql
import requests
import json
import pprint
#!/usr/bin/python3
import csv
import json
import time
import requests
import plotly.graph_objects as go
# all departure flights
def arrivals(airport):
@mmsesay
mmsesay / Day One Code
Created November 9, 2019 18:57
This is the code that i got so far for today
#!/usr/bin/python3
import csv
import json
import time
import requests
currentTime = int(time.time()) #currentTime in second
takeOffTime = currentTime - 3600 * 48 # 48h in the past
# all departure flights
@mmsesay
mmsesay / Matplotlib Installation Error
Created November 8, 2019 16:06
I'm trying to install matplotlib on macOS with python3.8 installed.
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c9/47bxmf2j5blc017l0v_0mg2c0000gp/T/pip-install-s7wwperu/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/c9/47bxmf2j5blc017l0v_0mg2c0000gp/T/pip-install-s7wwperu/matplotlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/c9/47bxmf2j5blc017l0v_0mg2c0000gp/T/pip-record-sajvjb73/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/c9/47bxmf2j5blc017l0v_0mg2c0000gp/T/pip-install-s7wwperu/matplotlib/
Complete output (509 lines):
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
====================================================================