Skip to content

Instantly share code, notes, and snippets.

View EgehanGundogdu's full-sized avatar
🎯
Focusing

Egehan Gündoğdu EgehanGundogdu

🎯
Focusing
View GitHub Profile
@EgehanGundogdu
EgehanGundogdu / client.js
Created September 20, 2020 12:05
axios interceptors usage
import axios from "axios";
const client = axios.create({
baseURL: process.env.BACKEND_API_URL || "hardcoded backend app url",
headers: {
"Content-Type": "application/json",
},
});
client.interceptors.request.use(
@EgehanGundogdu
EgehanGundogdu / main.py
Created February 13, 2022 19:53
json walker with reduce func.
import functools
import operator
import unittest
from typing import List, Union
def reduce_json(data: dict, keys: List[Union[str, int]]):
if len(keys) == 0:
return
import requests
import xmltodict
country_code = input("Country code? : ").upper()
country_service_data = {
"soap:Envelope": {
"@xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/",
"soap:Body": {
@EgehanGundogdu
EgehanGundogdu / degerlendir.js
Created June 18, 2021 10:52
sakarya universitesi degerlendirme
(() => {
for (let i = 1; i <= 30; i++) {
let radioClassName = `S${i}`
if (radioClassName === "S29" || radioClassName === "S30") {
$(`input:radio[name=${radioClassName}]`).last().prop('checked', true)
}
else {
$(`input:radio[name=${radioClassName}]`).first().prop('checked', true)
}
@EgehanGundogdu
EgehanGundogdu / hello.py
Last active October 17, 2020 20:06
Python hello world.
print('Hello wild world!')