Skip to content

Instantly share code, notes, and snippets.

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

Fatih Kurt ftkurt

🏠
Working from home
  • Rippling
  • Poland
View GitHub Profile
@ftkurt
ftkurt / manifod-league-script.py
Last active February 7, 2024 23:01
manifod-league-script.py
import requests
def pull_and_prepare():
url = "https://api.manifold.markets/v0/slug/chatgpt-chooses-one-option-league-v"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
# Filtering out "Other" and sorting by probability
options = [option for option in data['answers'] if option['text'] != "Other"]
sorted_options = sorted(options, key=lambda x: x['probability'], reverse=True)
@ftkurt
ftkurt / generate_all_diacritics.py
Created December 9, 2022 15:58
This gist creates all possible diacritics in a map
diacritics ={
'\u0300': 'Grave Accent',
'\u0301': 'Acute Accent',
'\u0302': 'Circumflex Accent',
'\u0303': 'Tilde',
'\u0304': 'Macron',
'\u0305': 'Overline',
'\u0306': 'Breve',
'\u0307': 'Dot Above',
'\u0308': 'Diaeresis',
@ftkurt
ftkurt / cross-account-permission-4-lambda.sh
Created April 12, 2018 14:12
Cross-account permission for Lambda
aws lambda add-permission
--function-name MyFunction
--region eu-west-1
--statement-id MyFunction-permission-13254
--action "lambda:InvokeFunction"
--principal 123456789012
@ftkurt
ftkurt / split-git-repositories
Created March 28, 2018 12:07
Split a git repository by keeping its history intact
git clone https://github.com/USERNAME/OLD-REPOSITORY
cd OLD-REPOSITORY
git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- FOLDER-1 FOLDER-2 FOLDER-3' --prune-empty -- --all
git remote set-url origin https://github.com/USERNAME/NEW-REPOSITORY-NAME.git
git push -u origin BRANCH-NAME
@ftkurt
ftkurt / Install Java on EC2
Created February 8, 2017 23:03
Install Java on EC2
wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" "http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm"
sudo rpm -i 8u74-b02/jdk-8u74-linux-x64.rpm
java -version
export JAVA_HOME=/usr/java/default

Keybase proof

I hereby claim:

  • I am ftkurt on github.
  • I am ftkurt (https://keybase.io/ftkurt) on keybase.
  • I have a public key whose fingerprint is 491B 403C FA80 24B7 5B21 9F51 EE2E 003E EA26 02E2

To claim this, I am signing this object: