Skip to content

Instantly share code, notes, and snippets.

View uluQulu's full-sized avatar
🚙
Coding ...

Şəhriyar Cəfər Qulu uluQulu

🚙
Coding ...
  • Azərbaycan
View GitHub Profile
@uluQulu
uluQulu / get_links_for_tag.py
Last active September 8, 2023 10:39
Get links for tag (Smart APPROACH)
@uluQulu
uluQulu / TamahkarAxtarış_alqoritmi (tam)
Last active October 24, 2022 20:12
Tam işlək Tamahkar Axtarış alqoritmi (yol məsələləri üçün)
"""
Tamahkar Alqoritma ilə yol məsələsini həll edək.
- Qarşıda 2 üsul var:
1. Node-lar open node listine gore secilir, yuksek heuristici olan secilir.
2. Node-lar ancaq qarsidaki yola gore secilir, meselen bu misalda, elaqesi olmayan node-a kecmek mumken deyil
- Məs., E-dən D-yə keçmək olmaz, çünki yol yoxdur-qonşuluq yoxdur).
3. Normal Greedy axtarış aparılsın, open node-lar işlədilsin; Hər open node-un heuristic məsafəsi yadda saxlanılsın.
- Buna görə də node-swithcing algorithm işlədiyi müddətcə path-per-path aparılacaq. Cavab isə insan yeriyəbiləcəyi tam path olacaq.
- Seçilən node-un (switched) tam path-i qeyddə qalır.
@uluQulu
uluQulu / tamahkar_alqo
Last active October 22, 2022 20:24
Tamahkar axtarışın alqoritmasinin "Yol Məsələsinə" tətbiqi
"""
Tamahkar Alqoritma ilə yol məsələsini həll edək.
- Qarşıda 2 üsul var:
1. Node-lar open node listine gore secilir, yuksek heuristici olan secilir.
2. Node-lar ancaq qarsidaki yola gore secilir, meselen bu misalda, elaqesi olmayan node-a kecmek mumken deyil
- Məs., E-dən D-yə keçmək olmaz, çünki yol yoxdur-qonşuluq yoxdur).
"""
import concurrent.futures
@uluQulu
uluQulu / get_watchers.py
Last active September 24, 2021 06:45
A new function for InstaPy to return the entire list of your current followers
def get_watchers(browser, username, logger, logfolder):
"""Used to get the entire list of followers with graphql"""
user_data = {}
graphql_endpoint = 'https://www.instagram.com/graphql/query/'
graphql_followers = (
graphql_endpoint + '?query_hash=37479f2b8209594dde7facb0d904896a')
all_followers = []
@uluQulu
uluQulu / Instapy-Quota-Supervisor.md
Last active April 23, 2021 17:10
Description of Quota Supervisor and its usage

Take Full Control Of The Actions With The Most Sophisticated Approaches:

likes, comments, follows, unfollows, server calls

in daily/hourly basis fully featured and highly flexible easily maintainable universal solution

Quota Supervisor

session.set_quota_supervisor(enabled=True, sleep_after=['likes', 'comments_d', 'follows', 'unfollows', 'server_calls_h'], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes=(57, 585),
 peak_comments=(21, 182),
@uluQulu
uluQulu / customized_geckodriverdownloader.py
Created September 1, 2019 22:37
Subclass GeckoDriverDownloader in order to fix a bug in arch level detection.
class CustomizedGeckoDriverDownloader(GeckoDriverDownloader):
"""
Subclass GeckoDriverDownloader in order to fix finding accurate arch.
"""
def get_download_url(self, version="latest"):
"""
Default of this method finds arch of the python interpreter rather than OS.
To view the original source of this method, go to:
@uluQulu
uluQulu / like_util.py
Last active February 5, 2019 00:11
Like util for fellowes
import re
import random
"""Module that handles the like features"""
from math import ceil
from re import findall
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import WebDriverException
from .time_util import sleep
@uluQulu
uluQulu / github.css
Created February 1, 2019 21:50 — forked from andyferra/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@uluQulu
uluQulu / implicit_vs_explicit.md
Created December 23, 2018 20:52
Clash: implicit wait ⚔ explicit wait

There are some points to be taken into account:

1-) implicit wait has the highest priority
It currently is being controlled with page_delay parameter with the default value of 25

  • page_delay parameter is customizable by user
  • User can give it 1 seconds if likes

2-) What is implicit wait?

  • implicit wait sets the [max] time it can wait while finding elements

3-) What is explicit wait?

@uluQulu
uluQulu / truncate_float.py
Last active November 4, 2018 17:18
Truncate (shorten) a floating point value at given precision.
def truncate_float(number, precision, round=False):
""" Truncate (shorten) a floating point value at given precision """
# don't allow a negative precision [by mistake?]
precision = abs(precision)
if round:
# python 2.7+ supported method [recommended]
short_float = round(number, precision)