Skip to content

Instantly share code, notes, and snippets.

View zafercavdar's full-sized avatar
💻
coding

Zafer Cavdar zafercavdar

💻
coding
View GitHub Profile
@zafercavdar
zafercavdar / reformatter.py
Created August 7, 2023 11:10
Excel content reformatting
import argparse
import re
import pandas as pd
parser = argparse.ArgumentParser(description="Reformatter app")
parser.add_argument("path", type=str, help="Path to an Excel file")
def uppercase_first_letter(text: str) -> str:
Sub groupTest()
ActiveSheet.Outline.SummaryRow = xlAbove
Dim sRng As Range
Dim eRng As Range
Dim rng As Range
Dim currRng As Range
Set currRng = Range("B2")
Set sRng = Range("B2")
from sklearn.tree import export_graphviz
export_graphviz(best_model,
out_file='tree.dot',
feature_names = feature_pd.columns,
class_names = le.classes_,
rounded = True,
proportion = False,
precision = 2,
filled = True)
@zafercavdar
zafercavdar / hwt.py
Last active March 29, 2023 05:04
PhBot HWT script
from math import sqrt
from phBot import log, set_training_radius, get_drops, generate_path, move_to, get_position, set_training_position, start_bot, stop_bot, get_monsters
import phBotChat
import QtBind
SCRIPT_ACTIVE = False
FLOOR_INDEX = None
REGISTERED_WALK = []
% x represents series of number of random numbers
x = 100:2000;
% y represents estimated value of PI
y = zeros(1, length(x));
for i=1:length(x)
inliers = 0;
% get single value from the series
N = x(i);
% generate N random 2-D coordinates
from pyspark import SparkContext, StorageLevel as SL
from timeit import repeat
from time import sleep as delay
data = [x for x in range(1000000)]
sc = SparkContext('local[*]')
rdd = sc.parallelize(data) \
.map(lambda x: 2*x - 1) \
.filter(lambda x: x > 100000) \
from random import randint
class Node(object):
def __init__(self, id=None):
self.children = []
self.id = id
def add_child(self, child):
self.children.append(child)
@zafercavdar
zafercavdar / BigNum.rkt
Created November 5, 2017 20:06
Scheme implementation of natural numbers using BigNum representation
#lang racket
; Zafer Cavdar
; Scheme implementation of natural numbers using BigNum representation
(define zero
(lambda ()
(cons 0 '())))
(define is-zero?
(lambda (n)
;;; zcavdar14@ku.edu.tr Wed Oct 19 12:48:37 2016
#lang sicp
(#%require (only racket/base random))
(define your-answer-here -1)
;;; +mod takes two numbers and modulo n
;;; it adds up to numbers and return the value of this number in modulo n
(define +mod
#####################################################################
# #
# Names: Zafer Çavdar #
# KUSIS IDs: 0049995 #
#####################################################################
# Use this template and develop your program for Assignment 2
# MIPS assembly code for Affine cipher
# Developed by Najeeb Ahmad and Pirah Noor Smooro