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
#!/bin/bash | |
#Simplest calculator two dates difference. By default in days | |
# Usage: | |
# ./datediff.sh first_date second_date [-(s|m|h|d) | --(seconds|minutes|hours|days)] | |
first_date=$(date -d "$1" "+%s") | |
second_date=$(date -d "$2" "+%s") | |
case "$3" in |
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
#!/bin/bash | |
set -x | |
getfilenamebypath () { | |
echo "$1" | gawk -F/ '{print $NF}' | |
} | |
getpathbyfilename () { | |
local fullpath; fullpath="$1" |
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
<?php | |
interface iUserLocaleInstallerSettings | |
{ | |
public function getInstallationSiteURL(); | |
} | |
class RussianInstallation implements iUserLocaleInstallerSettings | |
{ | |
public function getInstallationSiteURL() |
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
from PIL import Image, ImageDraw | |
images = [] | |
a = [ | |
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], | |
[1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1], | |
[1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1], | |
[1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1], | |
[1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 1, 1, 1, 1], | |
[1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 0, 0, 0, 0], |
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
1953282128707757731632014947596256332443542996591873396953405194571625257887015694766641987634150146128879524335220236084625510912019560233744015438115196636156919962125642894303370113827800638002767411527927466669865578379318822832061271497583230334854893489572599230722912901928209264331627521730861460017912582042699659936020959339202005184862028402447343139811367418720203868480175318538621112878108240617741383293554561687606454065125954718029126547942894036981659206361019359291352135410376799082940320155702716115395031975973247782162957631629653356694777663285062345245593460647575025935813443457816767646258788590113727299073729478511448089572456191503507025589529116868550008802013233458747217794781447546792016090170642585629359747546532757575740077432034913428785189795354304734560307765078938767286539166799232817449361991523768149557632085371047859706188438731530582395627560879063107819004975169594709736713891745704555202135123350794403360712030504144685221041565037321067932275625864751191461141736034968121 |
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
// ==UserScript== | |
// @name Habr Old Draft Generator | |
// @version 0.1 | |
// @description Autofills a text field with the provided text if it's empty. Generate a draft for the Habr. | |
// @author Novikov Ivan | |
// @match https://habr.com/ru/topic/add/* | |
// @match https://habr.com/ru/article/edit/*/ | |
// @namespace https://habr.com/ | |
// @grant none | |
// @run-at |
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 os | |
from flask import Flask, request, Response | |
from bs4 import BeautifulSoup | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.chrome.service import Service |