Skip to content

Instantly share code, notes, and snippets.

View celik-muhammed's full-sized avatar

Muhammed ÇELİK celik-muhammed

View GitHub Profile
@celik-muhammed
celik-muhammed / vm_containers.md
Created May 23, 2023 20:06 — forked from ziritrion/vm_containers.md
Cheatsheet for various container and VM thingies

Multipass

Tool to run Ubuntu VM's easily with command-line interface.

List available instances

  • multipass list

Create and launch a new instance using the latest LTS release

@celik-muhammed
celik-muhammed / tf_custom_metrics.py
Last active December 24, 2023 21:34
Functions to Calculate Custom Metrics for Keras and TensorFlow
# Source: https://gist.github.com/arnaldog12/5f2728f229a8bd3b4673b72786913252
import numpy as np
import tensorflow as tf
from keras import backend as K
# Regression
def r_square(y_true, y_pred):
@celik-muhammed
celik-muhammed / GetDummies.py
Last active December 9, 2023 00:20
How to Converting Pandas Column of Comma-Separated Strings Into Dummy Variables?
# get_dummies.py
# Save your custom function in a Python script (.py file) then import it
# for to use it with pickle.load().
# This is a common approach to store and reuse custom functions in different scripts or projects.
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
class GetDummies(BaseEstimator, TransformerMixin):
def __init__(self, data_sep=',', col_name_sep='_'):
@celik-muhammed
celik-muhammed / ScaleFreqs.csv
Created May 9, 2022 20:49
How to Generate 440 Hz A(La) Note Sin Wave with 44.1 khz Sample Rate and 16-bit Depth? How to Play Composition with these Generated Note Sin Waves? A Standard 88-key Piano Review. Hapy Birthday DoReMi?
notes notesDo frequency base_value
C0 Do0 16,35 440,00
C#0 Do#0 17,32 1,0594630943593
D0 Re0 18,35 This file Modified for some requirements
D#0 Re#0 19,45 official link below
E0 Mi0 20,60 https://view.officeapps.live.com/op/view.aspx?src=https%3A%2F%2Fpages.mtu.edu%2F~suits%2FScaleFreqs.xls&wdOrigin=BROWSELINK
F0 Fa0 21,83
F#0 Fa#0 23,12 Do not change cell D3
G0 Sol0 24,50 Change cell D1 for different A4 reference freqs.
G#0 Sol#0 25,96 Column C is frequency in Hz.
@celik-muhammed
celik-muhammed / Generate-RGB-Image.py
Last active October 19, 2022 17:01
How to Generate RGB Image in Python Programing Language from Jupyter Notebook
# step-1 Define Python Library
import numpy as np
import matplotlib.pyplot as plt
# step-2 Define Image size - height, width and depth
# (rows, columns, dimensions) format
height, width, channel = 64, 64, 3
# step-3 Define Red,Green,Blue Color -for each- 0 to 255
red, green, blue = 255, 0, 0