Skip to content

Instantly share code, notes, and snippets.

View mebaysan's full-sized avatar
🏠
Working from home

Baysan mebaysan

🏠
Working from home
View GitHub Profile
@mebaysan
mebaysan / index.php
Created February 14, 2021 13:26
WordPress Custom Plugin Örneği
<?php
/*
Plugin Name: BaysanSoft Deneme Plugin
Plugin URI: https://baysansoft.com
Description: BaysanSoft tarafından oluşturulan deneme plugini
Version: 1.0
Author: Baysan
Author URI: https://baysansoft.com
License: GPL2
*/
@mebaysan
mebaysan / builder.py
Last active July 9, 2021 14:59
Plotly/Dash için Bulma CSS temel alınan component builder sınıfı
import plotly.express as px
import plotly.graph_objects as go
import dash_html_components as html
import dash_core_components as dcc
import pandas as pd
from plotly.subplots import make_subplots
import math
class ComponentBuilder(object):
@mebaysan
mebaysan / hybrid-recommendation-item-user-based.py
Created September 18, 2021 17:09
Item ve User Based Recommendation Birleşimi, Hibrit bir Tavsiye Sistemi Örneği
import pandas as pd
# Dataset: https://www.kaggle.com/grouplens/movielens-20m-dataset
raw_movie = pd.read_csv('Datasets/movie_lens_dataset/movie.csv')
raw_rating = pd.read_csv('Datasets/movie_lens_dataset/rating.csv')
movie_df = raw_movie.copy()
rating_df = raw_rating.copy()
@mebaysan
mebaysan / basic_decorator.py
Created November 9, 2021 09:38
Python Basic Decorator Template
from functools import wraps
def my_decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
print('Do something before the function call')
func(*args, **kwargs)
print('Do something after the function call')
return wrapper
@mebaysan
mebaysan / actions.py
Last active December 4, 2022 09:04
Rasa Giriş
"""
ÖRNEK BİR CUSTOM ACTION
"""
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
import requests
@mebaysan
mebaysan / board_members.html
Created January 30, 2022 12:03
Yönetim kurulu şeması oluşturmak için hazır css dosyası
<div class="board-of-directors">
<h4>İhya Vakfı</h4>
<div class="bd-items">
<div class="first title">{{ baskan.isim }}</div>
<div class="items first">
{% for uye in baskan.uyeler.all %}
<div class="item">
<div class="image"><img src="{{ uye.resim.url }}" alt=""/></div>
<div class="content">
@mebaysan
mebaysan / projectName
Created February 14, 2022 11:34
An example Nginx conf file for a Django app
server {
listen 80;
server_name <DOMAIN> <AND / OR> <SERVER IP>;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/serverUsername/projectfolder/;
}
location /media/ {
@mebaysan
mebaysan / start-sqlpad.sh
Last active June 20, 2022 11:36
A script file to start SQLPad on local machine by using Docker
#! /bin/bash
sudo docker run \
-v /home/mebaysan/Desktop/NorthwindDB.sqlite:/databases/NorthwindDB.sqlite \
--net=host \
--env SQLPAD_PORT=8000 \
--env SQLPAD_USERPASS_AUTH_DISABLED="false" \
--env SQLPAD_ADMIN="[email protected]" \
--env SQLPAD_ADMIN_PASSWORD="123." \
--env SQLPAD_CONNECTIONS__defaultcon__name="Nortwhind Conn" \
@mebaysan
mebaysan / create_mssql_server_map.py
Last active March 22, 2022 10:04
Python Script to Create Database Map of MsSQL Server
!pip install pymssql
!pip install pandas
!pip install numpy
import pandas as pd
import numpy as np
import pymssql
def create_server_map(CONN):
# create base connection to get all databases on server
@mebaysan
mebaysan / site
Last active April 12, 2022 14:01
An Nginx conf file to put in /etc/nginx/sites-available . We can bind a domain into a Docker container
server {
listen 80;
listen [::]:80;
server_name videomeet.app;
server_name_in_redirect off;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
location / {