Skip to content

Instantly share code, notes, and snippets.

View selcukcihan's full-sized avatar
🐢
engineering

Selçuk Cihan selcukcihan

🐢
engineering
View GitHub Profile
from collections import deque
def preorder3(tree):
s = deque([tree])
s = [tree]
while s:
t = s.pop()
if t:
# print(t.value,end='')
s.append(t.right)
<html>
<body>
<h1 style="background-color: yellow;">Herkese merhaba</h1>
</body>
</html>
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@selcukcihan
selcukcihan / twitter_friends_list.json
Created November 27, 2019 12:22
Twitter GET friends/list API response
{
"users":[
{
"id":134182720,
"id_str":"134182720",
"name":"Ömer Selçuk Cihan",
"screen_name":"scihan",
"location":"Turkey",
"description":"Engineering, training",
"url":"https://t.co/WTvwzNT0WI",
@selcukcihan
selcukcihan / twheat_map_api_response.json
Created November 27, 2019 12:27
twheat-map api response
[
{
"lat":53.65,
"lng":-1.7833
},
{
"lat":56.5474,
"lng":-61.686
},
{
@selcukcihan
selcukcihan / s3_test_event.json
Created December 19, 2019 13:28
AWS S3 için test event
{
"Records": [
{
"awsRegion": "us-east-1",
"s3": {
"bucket": {
"name": "sesler"
},
"object": {
"key": "speech_20191219095654760.mp3"
@selcukcihan
selcukcihan / yapayzeka_lambda.py
Created December 19, 2019 13:30
Yapay zeka örneği için lambda
import boto3
import json
import logging
import time
logger = logging.getLogger()
logger.setLevel(logging.INFO)
transcribe = boto3.client('transcribe')
@selcukcihan
selcukcihan / mailgonder_lambda.py
Last active December 19, 2019 14:31
Mail gondermek icin lambda
import boto3
import json
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
s3 = boto3.resource('s3')
ses = boto3.client('ses')
@selcukcihan
selcukcihan / mailgonder_lambda_test.json
Created December 19, 2019 14:17
S3 mail gonderme lambda eventi
{
"Records": [
{
"awsRegion": "us-east-1",
"s3": {
"bucket": {
"name": "turkce-yazi"
},
"object": {
"key": "speech_20191219095654760.mp3_1576761873.json"
@selcukcihan
selcukcihan / javascript_promise_chain_1.js
Last active December 27, 2019 09:22
Javascript promise chain
function callService(param, shouldThrow) {
return new Promise(function(resolve, reject) {
setTimeout(function() {
if (shouldThrow) {
reject("Hatalı: " + param);
} else {
resolve("Başarılı: " + param);
}
}, 300);
});