Skip to content

Instantly share code, notes, and snippets.

View Samet195's full-sized avatar

Samet Arık Samet195

View GitHub Profile
@aforehand
aforehand / 0-prerequisites.md
Last active May 4, 2021 13:29
List Comprehensions Tutorial

Prerequisites

Learners should be familiar with the following topics before completing this lesson:

  • Arithmetic Operations
  • String Operations
  • Lists
  • range()
  • Loops
  • Conditionals
  • Functions
@debojyoti
debojyoti / lenovo_ideapad_330_ubuntu.md
Last active October 15, 2023 20:13
Lenovo ideapad 330 (15ARR) ubuntu issues and there solutions

Lenovo ideapad 330 (15ARR) ubuntu issues and their solutions

Issue-1: None of the ubuntu distros are getting installed

Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.

So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode

Issue-2: Wifi is not working

@rene-d
rene-d / colors.py
Last active July 15, 2024 17:25
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
# -*- coding: utf-8 -*-
# Print iterations progress
def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
--
-- Table structure for table "site_cities"
--
DROP TABLE IF EXISTS "site_cities" CASCADE;
CREATE TABLE "site_cities" (
"city_id" serial NOT NULL,
"city_name" varchar(20) NOT NULL,
"plate_code" smallint NOT NULL,
"area_code" smallint NOT NULL,
"lat" decimal(20,8) NOT NULL,