As websites become more JavaScript heavy, it's harder to automate things like screenshotting for archival purposes. I've seen examples and suggestions to use PhantomJS for visual testing/archiving of websites, but have run into issues such as the non-rendering of webfonts. I've never tried out Selenium until today...and while I'm not thinking about performance implications yet, Selenium seems far more accurate than PhantomJS...which makes sense since it actually opens a real browser. And it's not too hard to script to do complex interactions: here's an [example of how to log in to Twitter, write a tweet, upload an image, and send a tweet via Selenium and DOM element selection](https://gist.github.com/dannguyen/8a6fa49253c1d6a0eb92
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
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |
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
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:6c82f45d6a3a06e635320c3a9516ca0717b509f8] |
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 | |
batinf='acpi -b' | |
perc=$(acpi -b | awk '{print $4;}' | sed 's/%//g' | sed 's/,//g') | |
charging=$(acpi -b | grep -c Discharging) | |
if [ ! $charging -eq 1 ] | |
then echo " $perc%" | |
elif (( $perc > '75' )) | |
then echo " $perc%" | |
elif (( $perc > '50' )) | |
then echo " $perc%" |
First, make sure i3lock
, imagemagick
and scrot
are installed.
Open a terminal :
cd /bin
sudo nano lock.sh
put this script there :
!/bin/bash
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document url("https://192.168.10.29:8888/") { | |
@font-face { | |
font-family: FiraCode; | |
font-style: normal; | |
font-weight: normal; | |
src: url("https://cdn.rawgit.com/tonsky/FiraCode/master/FiraCode-Regular.otf") format("opentype"); | |
} | |
.CodeMirror pre { |
@joernhees With the new Features (CI, Pages) you can do a Workaround. I did this with my Latex Repo:
.gitlab-ci.yml
:
variables:
USE_BIBTEX: 'false'
TEX_FILES: 'yourfile' # examples: 'File1 File2' OR '*.tex'
DESTINATIONFOLDER: "processed_pdfs"
yum install epel-release
установка de (на всякий случай)
# yum --enablerepo=epel -y groups install "Xfce"
- скачивание и установка пакетовecho "exec /usr/bin/xfce4-session" >> ~/.xinitrc
- запись информации о destartx
- ручной запуск
mount ntfs дисков, еще пруф
# yum -y install ntfs-3g
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 pyscreenshot as ImageGrab | |
from pykeyboard import PyKeyboard | |
from time import sleep | |
from tqdm import trange | |
def waiting(): | |
for _ in trange(5, desc='wait'): | |
sleep(1) | |
OlderNewer