Skip to content

Instantly share code, notes, and snippets.

View BLINMATIC's full-sized avatar

Onur Çetin BLINMATIC

  • Turkey, Adana
  • 20:55 (UTC +03:00)
  • Instagram __onurcetin
View GitHub Profile
@BLINMATIC
BLINMATIC / MangaPacker.py
Created May 28, 2024 16:51
A simple manga packer that packs manga downloaded as an image folder into a cbz or a pdf
import os
import zipfile
from PIL import Image
def create_folders():
try: os.mkdir("IN"); print("1/2 IN")
except: print("1/2 PASS IN")
try: os.mkdir("OUT"); print("2/2 OUT")
except: print("2/2 PASS OUT")
@BLINMATIC
BLINMATIC / Kucuksaat Gazetesi_1001.recipe
Created March 29, 2024 11:17
Calibre Küçüksaat Gazetesi Recipe
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import AutomaticNewsRecipe
class BasicUserRecipe1711710897(AutomaticNewsRecipe):
title = 'Küçüksaat Gazetesi'
oldest_article = 1
max_articles_per_feed = 100
auto_cleanup = True
@BLINMATIC
BLINMATIC / Cukurova Baris Gazetesi_1000.recipe
Created March 29, 2024 11:16
Calibre Çukurova Barış Gazetesi Recipe
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1711710566(BasicNewsRecipe):
title = 'Çukurova Barış Gazetesi'
oldest_article = 1
max_articles_per_feed = 100
auto_cleanup = True
@BLINMATIC
BLINMATIC / main.py
Created February 18, 2024 09:38
A main class in pygame
import pygame
class Main:
def __init__(self, screen_width: int, screen_height: int, fps: int, title: str):
self.screen_width = screen_width
self.screen_height = screen_height
self.fps = fps
self.title = title
@BLINMATIC
BLINMATIC / textbox.py
Created February 18, 2024 09:25
A pygame text box
import pygame
class TextBox:
def __init__(
self,
rect: pygame.Rect,
dest: pygame.Surface,
font: pygame.font.Font,
text: str,
@BLINMATIC
BLINMATIC / button.py
Created February 18, 2024 09:18
A pygame button
import pygame
class Button:
def __init__(self,
rect: pygame.Rect = pygame.Rect(100, 100, 50, 50),
dest: pygame.Surface = None,
standby_surface: pygame.Surface = None,
active_surface: pygame.Surface = None,
key_on: bool = False,
{
"assetIndex": {
"id": "1.7.10",
"sha1": "f90ca2878ba3141d32d949ea7f665855dd073c65",
"size": 88096,
"url": "https://launchermeta.mojang.com/mc/assets/1.7.10/f90ca2878ba3141d32d949ea7f665855dd073c65/1.7.10.json",
"totalSize": 112220327
},
"assets": "1.7.10",
"downloads": {
@BLINMATIC
BLINMATIC / graphics_compressed.py
Created December 5, 2022 20:49
a version of graphics.py that is half in size
# https://mcsp.wartburg.edu/zelle/python/graphics.py compressed version by BLINMATIC
__version__ = "5.0"
import time, os, sys
import tkinter as tk
class GraphicsError(Exception): pass
OBJ_ALREADY_DRAWN = "Object currently drawn"; UNSUPPORTED_METHOD = "Object doesn't support operation"
BAD_OPTION = "Illegal option value"
_root = tk.Tk(); _root.withdraw(); _update_lasttime = time.time()
def update(rate=None):
global _update_lasttime
@BLINMATIC
BLINMATIC / pygame_tempelate.py
Created April 12, 2021 05:45
added this so that i dont have to write the entire thing over and over
import pygame
pygame.init()
screen = pygame.display.set_mode((600, 400))
resume = True
f = pygame.font.Font('freesansbold.ttf', 20)
while resume:
for event in pygame.event.get():
if event.type == pygame.QUIT:
resume = False
screen.fill((255, 255, 255))
We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just want to tell you how I'm feeling
Gotta make you understand
Never gonna give you up, never gonna let you down
Never gonna run around and desert you