Skip to content

Instantly share code, notes, and snippets.

View MrPeker's full-sized avatar
🎯
Focusing

Mehmet Ali Peker MrPeker

🎯
Focusing
View GitHub Profile
@ademilter
ademilter / example.js
Last active February 18, 2020 18:47
raster grid with gap
import Grid from './components/grid'
export default function Grid({ children, gap, ...props }) {
return (
<Grid gap={32} col={4}>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
</Grid>
@mksglu
mksglu / hepsiburada.js
Last active October 31, 2022 14:36
hepsiburada.com üzerinden yaptığınız toplam alışveriş tutarını gösterir. https://www.hepsiburada.com adresine girdikten sonra uye girisi yapin ve tarayicinin konsoluna asagidaki kodu yapistirip entere basmaniz yeterli.
fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=0").then(function(r){return r.json()}).then(function(r){var e=r.MaxSkip;if(0===e){for(var n=0,a=0;a<r.Orders.length;a++)n+=parseInt(r.Orders[a].TotalAmount.Value);console.log("Toplam Hepsiburada.com harcamaniz: ",n.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,"),"TL")}else{(function(r,e){for(var n=[],a=0;a<r+e;a+=e)n.push(fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=".concat(a)).then(function(r){return r.json()}).then(function(r){for(var e=0,n=0;n<r.Orders.length;n++)e+=parseInt(r.Orders[n].TotalAmount.Value);return e}));return Promise.all(n)})(e,10).then(function(r){var e=r.reduce(function(r,e){return r+e},0).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,");console.log("Toplam Hepsiburada.com harcamaniz: ",e,"TL")})}});
@yavuzKomecoglu
yavuzKomecoglu / split-train-test-val.py
Last active September 14, 2021 08:16
Split Data Into Training, Test And Validation Sets
import argparse
import errno
import os
import random
import shutil
def createFolder(path):
try:
os.makedirs(path)
# Deletes the Android Studio application
# Note that this may be different depending on what you named the application as, or whether you downloaded the preview version
rm -Rf /Applications/Android\ Studio.app
# Delete All Android Studio related preferences
# The asterisk here should target all folders/files beginning with the string before it
rm -Rf ~/Library/Preferences/AndroidStudio*
# Deletes the Android Studio's plist file
rm -Rf ~/Library/Preferences/com.google.android.*
# Deletes the Android Emulator's plist file
rm -Rf ~/Library/Preferences/com.android.*
@tayfunerbilen
tayfunerbilen / php-array-cut.php
Last active April 15, 2018 09:21
PHP Array Cut
<?php
$array = array(
'a' => 1,
'ab' => 2,
'ba' => 3,
'ca' => 4,
'ac' => 5,
5 => 6,
6 => 7,