Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Winning The Life

Seyhun Akyürek seyhunak

🏆
Winning The Life
View GitHub Profile
@seyhunak
seyhunak / get_current_weather.py
Created Sep 15, 2021
Write a Python program to get current weather in Azerbaijan
View get_current_weather.py
import requests
import json
def get_current_weather(city):
url = 'http://api.openweathermap.org/data/2.5/weather'
params = {
'q': city,
'appid': '11c0d3dc6093f7442898ee49d2430d20',
'units': 'metric'
@seyhunak
seyhunak / crashes.sql
Created Aug 31, 2021 — forked from sbrissenden/crashes.sql
[BigQuery + Firebase Crashlytics] Crashes from May 9th
View crashes.sql
#standardSQL
SELECT
event_id, issue_id, blame_frame.file, blame_frame.line
FROM
`projectId.firebase_crashlytics.package_name_ANDROID`
WHERE
FORMAT_TIMESTAMP("%Y%m%d", TIMESTAMP_TRUNC(event_timestamp, DAY)) = '20190509'
@seyhunak
seyhunak / predictions_churn_french_users.sql
Created Aug 31, 2021 — forked from sbrissenden/predictions_churn_french_users.sql
[BigQuery + Firebase Predictions] Number of Users Predicted to Churn - French Users
View predictions_churn_french_users.sql
SELECT COUNT(distinct p.user_id)
FROM `friendly--pix.projectId.firebase_predictions.YOUR_PACKAGE_NAME_ANDROID` p CROSS JOIN UNNEST (predictions)
INNER JOIN `projectId.analytics_YOUR_TABLE.events_*`` a on p.user_id = a.user_id
WHERE
prediction_name = "churn"
AND score > 0.7
AND TIMESTAMP_TRUNC(p.prediction_time, DAY) = TIMESTAMP('2018-10-04')
AND a.geo.country = "France"
@seyhunak
seyhunak / predictions_churn.sql
Created Aug 31, 2021 — forked from sbrissenden/predictions_churn.sql
[BigQuery + Firebase Predictions] Number of Users Predicted to Churn
View predictions_churn.sql
SELECT COUNT(distinct p.user_id)
FROM `friendly--pix.projectId.firebase_predictions.YOUR_PACKAGE_NAME_ANDROID` p CROSS JOIN UNNEST (predictions)
WHERE
prediction_name = "churn"
AND score > 0.7
AND TIMESTAMP_TRUNC(p.prediction_time, DAY) = TIMESTAMP('2018-10-04')
@seyhunak
seyhunak / retention.sql
Created Aug 31, 2021 — forked from sbrissenden/retention.sql
[BigQuery + Google Analytics for Firebase] Daily N-Day User Retention of September 1 Cohort
View retention.sql
#standardSQL
####################################################################
# PART 1: Cohort of New Users starting on SEPT 1
####################################################################
WITH
new_user_cohort AS (
SELECT DISTINCT user_pseudo_id as new_user_id
FROM
`projectId.analytics_YOUR_TABLE.events_*`
WHERE
@seyhunak
seyhunak / firebase_performance_slow_screens.sql
Last active Aug 31, 2021 — forked from sbrissenden/firebase_performance_slow_screens.sql
[BigQuery + Firebase Performance Monitoring] Find app screens with frozen frames impacting French users
View firebase_performance_slow_screens.sql
SELECT
AVG(trace_info.duration_us / 1000000) AS seconds_on_screen,
AVG(trace_info.screen_info.slow_frame_ratio) AS slow_frame_ratio,
AVG(trace_info.screen_info.frozen_frame_ratio) AS frozen_frame_ratio,
event_name as screen,
country
FROM `ibam-d6cd2.firebase_performance.iba_mobilbank_IOS`
WHERE _PARTITIONTIME > TIMESTAMP("2019-05-09")
AND event_type = "SCREEN_TRACE"
AND country = "FR"
View notion-router.js
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
View HomeRecap.swift
//
// HomeRecap.swift
// iosApp
//
import SwiftUI
import shared
struct HomeRecap: View {
@seyhunak
seyhunak / README.md
Last active Jun 22, 2021
IOSEngineerCodingChallenge
View README.md
@seyhunak
seyhunak / EmployeeApiService.swift
Last active Jul 21, 2020
Swift 5 - MVVM - ViewController, ViewModel, Model, Datasource, Webservice
View EmployeeApiService.swift
import Foundation
class APIService : NSObject {
private let sourcesURL = URL(string: "http://dummy.restapiexample.com/api/v1/employees")!
func apiToGetEmployeeData(completion : @escaping (Employees) -> ()){
URLSession.shared.dataTask(with: sourcesURL) { (data, urlResponse, error) in
if let data = data {
let jsonDecoder = JSONDecoder()
let empData = try! jsonDecoder.decode(Employees.self, from: data)