Skip to content

Instantly share code, notes, and snippets.

View nedimcanulusoy's full-sized avatar
🤖
I solve problems using data

Nedim Can Ulusoy nedimcanulusoy

🤖
I solve problems using data
  • home/swe/venv
  • 07:13 (UTC +02:00)
View GitHub Profile
@nedimcanulusoy
nedimcanulusoy / ts_4_py_cheatsheet.md
Last active November 29, 2025 14:29
Python to TypeScript Cheatsheet

Python to TypeScript Cheatsheet

Basic Concepts

  • Variables & Types

    • Python: Dynamically typed. x = 5
    • TypeScript: Statically typed. let x: number = 5;
  • Strings

  • Python: x = "Hello"

@nedimcanulusoy
nedimcanulusoy / export_kaggle_working_dir.py
Last active March 26, 2023 12:24
Export kaggle output from /kaggle/working directory
import shutil, os
def kaggle_export(output_dir, zip_name):
"""Create a zip file and export your work in the kaggle working directory.
Args:
output_dir (str): The path to the directory to be zipped.
zip_name (str): The name of the zip file to be created.
Returns:
@nedimcanulusoy
nedimcanulusoy / rico_json_to_yolo_txt.py
Last active November 8, 2023 09:27
Converting semantic JSON structure in RICO dataset to Yolo txt format
"""
This script, which converts ui elements in json to yolo txt format, was written in line with the need for the project
I was working on. Possible to make improvements on performance.
"""
import os
import shutil
import json
#bounds => [left, top, right, bottom]
@nedimcanulusoy
nedimcanulusoy / index.html
Created February 7, 2022 14:20
Example of an html file for Flask
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>First Flask Web App</title>
</head>
<body>
<h2>Congratulations! You made your first flask web application!</h2>
</body>
</html>
@nedimcanulusoy
nedimcanulusoy / app.py
Created February 7, 2022 14:16
Create a route by Flask
from flask import Flask, render_template
app = Flask(__name__) #imports name of the place the app is defined
@app.route('/') #the route that we want to access
def home(): #the function for the given route
return render_template('index.html') #generates output from index.html file
if __name__ == '__main__':
app.run()