Skip to content

Instantly share code, notes, and snippets.

View etemesi254's full-sized avatar

Caleb Etemesi etemesi254

View GitHub Profile
import concurrent.futures
import multiprocessing
from typing import List
import pandas as pd
import glob
import json
import os.path
import os
import logging
import itertools
import networkx as nx
import matplotlib.pyplot as plt
plt.figure(figsize=(16 * 1.5, 10 * 1.5))
from uniform_cost_search import UcsTraverser
G = nx.Graph()
nodes = ["SportsComplex", "Siwaka", "Ph.1A", "Ph.1B", "Phase2", "STC",
import heapq
class UcsTraverser:
def __init__(self):
self.visited = list()
self.shortest_path = []
self.end_search = False
def UCS(self, graph, start_node, goal_node):
@etemesi254
etemesi254 / main.py
Last active September 28, 2023 09:57
plain_text = "wearediscoveredsaveyourself"
cipher_text = "ZICVTWQNGRZGVTWAVZHCQYGLMGJ".lower()
a_char = ord('a')
def one_mapping(c: str, d: str):
for (a, b) in zip(c, d):
if a > b:
# it overflowed(we reached z and went to a), so go from end to determine
# start
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef FJXL_SELF_INCLUDE
#define FJXL_SELF_INCLUDE
#include "enc_fast_lossless.h"
@etemesi254
etemesi254 / Laravel
Last active November 15, 2022 12:01
Laravel initialize
laravel new blog2
cd ./blog2
git init
git remote add origin https://github.com/etemesi254/SoftwareEngineering.git
git pull
git reset --hard origin/main
git log --oneline
package org.example;
// Java code for thread creation by extending
// the Thread class
class MultithreadingDemo extends Thread {
int num = 433452;
public void run()
{
@etemesi254
etemesi254 / upload.php
Last active June 27, 2022 11:21
Upload a new file.
<?php
// THIS FiLE WAS COPIED FROM w3schools
function upload(): int
{
$target_dir = "./uploads/";
$target_file = $target_dir . basename($_FILES["upload"]["name"]);
$uploadOk = 1;
$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));
echo $target_file . "</br>";
@etemesi254
etemesi254 / main.c
Last active December 2, 2023 19:34
ESA match finder with some additional code
//
// Created by caleb on 6/19/22.
//
#include "esa_matchfinder.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@etemesi254
etemesi254 / scratch_10.asm
Last active June 17, 2022 11:14
First attempt to do bubble sort in 8086 assembly
; Smallest number in an array of data
; Elements are stored from 0xf00 going forward so we ideally start there
; The layout is as follows
; ┌──────────┬────────────────────────────┐
; │ │ │
; │length │items │
; │ │ │
; └──────────┴────────────────────────────┘