Skip to content

Instantly share code, notes, and snippets.

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

Kevin Tewouda lewoudar

🏠
Working from home
  • Paris
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active November 19, 2024 09:32
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@ziadoz
ziadoz / install.sh
Last active November 7, 2024 19:48
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@Sanix-Darker
Sanix-Darker / ascii-cam.py
Created July 2, 2022 10:09
ascii-cam.py (with open-cv)
try:
import cv2
except ImportError:
from cv2 import cv2
import numpy as np
def toASCII(frame, cols=120, rows=35):
@faizanbashir
faizanbashir / main.py
Created March 5, 2023 19:24
Building a ChatGPT-based AI Assistant with Python: Speech-to-Text and Text-to-Speech using OpenAI APIs
#!/usr/bin/env python3
import os
import speech_recognition as sr
import requests
import pyttsx3
def main():
openaiurl = "https://api.openai.com/v1"
openai_token = os.environ.get("OPENAI_API_TOKEN")
@tekknolagi
tekknolagi / lines.py
Last active September 10, 2024 20:03
#!/usr/bin/env python
import multiprocessing
import random
import time
class Logger:
def __init__(self, num_lines, last_output_per_process, terminal_lock):
self.num_lines = num_lines