This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# First install python-playwright via: `pip3 install playwright && playwright install` | |
# | |
from playwright.sync_api import sync_playwright | |
from datetime import datetime, timedelta | |
import time | |
with sync_playwright() as p: | |
browser = p.chromium.launch(headless=True) | |
page = browser.new_page() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -i python3 -p python39Packages.pillow -p python39Packages.numpy | |
from PIL import Image | |
import numpy as np | |
import subprocess | |
import argparse | |
from decimal import * | |
import time | |
import glob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell -- | |
#! nix-shell -p ghcid -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [singletons])" -i "ghcid -c 'ghci -Wall' -T main" | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneDeriving #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.aeson pkgs.validation pkgs.ghcid pkgs.errors ])" | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Control.Error (fmapL) | |
import Control.Error.Util | |
import Data.Aeson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
from urllib.parse import quote | |
import datetime | |
from pathlib import Path | |
# make sure this directory exists | |
dl_root = '/tmp/cenaze/' | |
target_url = 'https://www.turkiye.gov.tr/inegol-belediyesi-vefat-sorgulama' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install beautifulsoup4, requests, lxml | |
import re | |
import json | |
from pathlib import Path | |
from urllib.parse import urlencode | |
import requests | |
from bs4 import BeautifulSoup | |
# your user hash and token for Pushover | |
user = '<user>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parent Assessment at "Raising An Emotionally Intelligent Child" | |
# your answers to the questions at http://media1.razorplanet.com/share/510260-9563/resources/1084755_Parent.Assessment.docx | |
a = {'1': False, '2': True} | |
def countTrues(trues, answers, divider): | |
return len(list(filter(lambda x: x[0] in trues and x[1], answers.items()))) / divider | |
# Dismissing (divide by 25) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ankara.meb.gov.tr ilanlarina bakip, icinde sonuc gecen ilan ciktiginda Pushover uzerinden bildirim gonderir. | |
#!/usr/bin/env python3 | |
import requests | |
from bs4 import BeautifulSoup | |
from pushover import init, Client | |
import re | |
from pathlib import Path | |
from datetime import datetime, timedelta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1) Asagidaki kodda `a` degiskenini tercih listenizin sirasina gore duzenleyin. 6 haneli | |
okul numaralarinin son basamagina fazladan bir `0` daha ekleyin. Orn: 123456 -> 1234560 | |
2) Chrome veya benzeri bir modern tarayici ile Mebbis'e giris yapip atama sayfasina gelin. | |
3) F12'ye basarak konsolu acin. | |
4) Guncellediginiz asagidaki kodu yappistirip enter'a basin. | |
5) Dua edin. | |
6) Afiyet olsun. | |
*/ | |
// okul no listesi (sonuna 0 eklemeniz gerekiyor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocncpcompletion | |
set nosmoothscroll | |
set nohud | |
set noregex | |
set noinsertmappings | |
set noautoupdategist | |
set typelinkhints | |
set defaultnewtabpage | |
let scrollduration = 10 | |
let searchlimit = 40 |
NewerOlder