Skip to content

Instantly share code, notes, and snippets.

@PypayaTech
PypayaTech / Why and how to use Markdown.md
Last active July 25, 2023 13:42
Simple tutorial how to use Markdown

Why and how to use Markdown?

Introduction

Markdown is a lightweight markup language that allows you to write formatted text using a simple syntax. It was created by John Gruber and Aaron Swartz in 2004 with the goal of being easy to read and write, while still producing high-quality documents. It's a powerful tool for writers, bloggers, note-takers, programmers, and many other people. Let's see the amazing applications of this language first, and then we will go to the syntax.

Applications

Markdown can be used for a variety of purposes, including:

@PypayaTech
PypayaTech / images_formats_converter.py
Created July 12, 2023 09:24
Simple class for converting between different image formats in Python
import numpy as np
import PIL.Image
import PIL.ImageQt
from PyQt5 import QtGui
class FormatsConverter:
@staticmethod
def pil_to_numpy(pil_image):
return np.array(pil_image)
@PypayaTech
PypayaTech / keras_output_shapes.py
Last active August 13, 2023 13:33
Print output shapes of a Keras model
from tensorflow.keras.layers import Input, Dense
from tensorflow.keras.models import Model
# Define the input layer
input_layer = Input(shape=(100,))
# Define common layers
x = Dense(128, activation='relu')(input_layer)
x = Dense(64, activation='relu')(x)
@PypayaTech
PypayaTech / run_python_script_in_conda_env.bat
Created September 27, 2023 10:58 — forked from maximlt/run_python_script_in_conda_env.bat
Run a Python script in a conda environment from a batch file
@echo OFF
rem How to run a Python script in a given conda environment from a batch file.
rem It doesn't require:
rem - conda to be in the PATH
rem - cmd.exe to be initialized with conda init
rem Define here the path to your conda installation
set CONDAPATH=C:\ProgramData\Miniconda3
rem Define here the name of the environment