Skip to content

Instantly share code, notes, and snippets.

View ozturkoktay's full-sized avatar

Oktay Ozturk ozturkoktay

View GitHub Profile
@ozturkoktay
ozturkoktay / wake_up_colab.js
Last active September 5, 2020 19:49
Wake up colab python notebook when training
/* Wake up colab python notebook when training */
function ClickConnect(){
console.log("Working");
document.querySelector("colab-toolbar-button").click()
}
setInterval(ClickConnect,60000)
@ozturkoktay
ozturkoktay / dataset_to_wordlist_tr.sh
Last active April 15, 2020 10:42
Convert text dataset to wordlist for Turkish language.
#!/bin/bash
# -*- coding: utf8 -*-
# USAGE: bash dataset_to_wordlist_tr.sh ./input.txt ./output.txt
# This script takes file clean punctuation, digits and convert capital
# latters to smaller and clean non Turkish characters.
# Finally make sorted uniq wordlist for Turkish language.
# If you want to add or remove character you can change line 20.
# Define Variables for input and output
@ozturkoktay
ozturkoktay / utilities.py
Last active February 26, 2025 16:46
This is helper functions for Python projects.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import os
import pickle
import codecs
import numpy as np
from functools import reduce
@ozturkoktay
ozturkoktay / turkish_cleaner.py
Created April 1, 2020 14:41
This is data cleaner for Turkish language.
#!usr/bin/env python
# -*- coding: utf8 -*-
# =============================================================================
# file: universal_cleaner.py
# A file consits of functions for cleaning and purifying an input text
# =============================================================================
#: Imports
import re
from functools import reduce
#!usr/bin/env python
# -*- coding: utf8 -*-
#: Imports
import MySQLdb
# class: Connection
# A simple mysql connection
# @completed
class Connection: