Skip to content

Instantly share code, notes, and snippets.

View 3rt4nm4n's full-sized avatar
⚙️
Machine Learning

Önder Ertan 3rt4nm4n

⚙️
Machine Learning
View GitHub Profile
@3rt4nm4n
3rt4nm4n / NLP_ML_steps.md
Last active September 16, 2022 21:45
Steps to follow in a natural language processing machine learning model development

NLP Machine Learning Model Development Steps:

  1. Library import (nlp, numpy, pandas, matplotlib, seaborn etc.)
  2. NLTK downloads (checking packages' status)
  3. Importing data
  4. Data analysis (EDA)
  5. Converting target/classes to int class type (Like orange : 0, red : 1)
  6. Converting dtype text data to string type with astype
  7. Regex
  8. Data visualization
@3rt4nm4n
3rt4nm4n / imginput.sql
Created February 8, 2022 08:03
Inputting an image to postgresql database
INSERT INTO persons(name,country,image) VALUES(
'George Washington',
'United States of America',
pg_read_binary_file('D:\GeorgeWashington.png')
);
@3rt4nm4n
3rt4nm4n / restart.cs
Created February 1, 2022 11:28
Restarting Function for WPF / WinForms programs in C#
private void RestartButton_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
System.Diagnostics.Process.Start(Environment.GetCommandLineArgs()[0]);
}
@3rt4nm4n
3rt4nm4n / nowdate.py
Created November 25, 2021 12:27
Code Snippet in python to get time (now)
#Getting Current Date in Python
from datetime import datetime
now=datetime.now()
dateformat=now.strftime("%d.%m.%y %H:%M")
print("Today's date "+str(dateformat))
@3rt4nm4n
3rt4nm4n / key-detector.cpp
Created November 17, 2021 18:53
This is a C++ program that will detect Left, Up, Right and Down arrow keys when they are pressed, it will give outputs. The program may give such outputs like [[A^, these are raw key codes that are sent by computer to the terminal.
#include <iostream>
//#include <conio.h> for windows users who will use getch() in switch condition
using namespace std;
int main()
{
char ch;
switch(scanf(&ch))
{
@3rt4nm4n
3rt4nm4n / ülkeler.txt
Created September 27, 2021 20:14
A'dan Z'ye ülke isimleri text dosyası.
Afganistan
Almanya
Amerika Birleşik Devletleri
Andora
Angola
Antigua ve Barbuda
Arjantin
Arnavutluk
Avustralya
Avusturya
@3rt4nm4n
3rt4nm4n / resize.cs
Last active September 27, 2021 19:47
An easy way to resize contents in your WPF grid proportional to newsize of grid.
/*Assume that x:Name for Grid is myGrid in XAML*/
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{
myGrid.Width = e.NewSize.Width;
myGrid.Height = e.NewSize.Height;
double xc = 1, yc = 1; //xc = changed width referring to x axis, yc = changed width referring to y axis
if (e.PreviousSize.Width != 0)
xc = (e.NewSize.Width / e.PreviousSize.Width);