An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#!/bin/sh | |
timezone="Europe/Zurich" | |
# List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones | |
script="${0##*/}" | |
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd) | |
logfile="$script.log" | |
log="$rootdir/$logfile" | |
now=$(TZ=":$timezone" date) | |
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion | |
#mailto="your@email.com" |
import requests | |
import pandas as pd | |
number_of_pages = 100 | |
#number_of_ads = number_of_pages * per_page | |
job_title = ["'Data Analyst' and 'data scientist'"] | |
for job in job_title: |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
A Beowulf cluster is a computer cluster of similar computers networked into a small local area network with libraries and programs installed which allow processing to be shared among them. The result is a high-performance parallel computing cluster from the inexpensive personal computer hardware.
This project aims to create a Beowulf Cluster which computes bigram analysis on a news data set. 2 virtual worker nodes and 1 virtual master node used for the cluster, all operating with Ubuntu Server 16.04.
mainly used in start-up script
When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.
How to:
- Enable reboot via SMS.
- Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.
The *.txt files here hold user and database parameters. Specifically, replication.txt
contains the user/role and password to use for replication. Whereas database.txt
contains an initial database, user/role and password to create on the master.
Run the master:
$ fig run -d master
Wait for it to start up completely. Start the slave:
Инициализировать новый репозиторий: | |
1 | |
git init rep-name | |
Клонировать репозиторий с удаленного сервера: | |
1 | |
git clone git@bitbucket.org:afiskon/hs-textgen.git | |
Добавить в репозиторий файл: | |
1 | |
git add file.txt | |
Удалить файл из репозитория: |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
#!/bin/bash | |
name=$RANDOM | |
url='http://localhost:9093/api/v1/alerts' | |
echo "firing up alert $name" | |
# change url o | |
curl -XPOST $url -d "[{ | |
\"status\": \"firing\", |
(https://github.com/sandino/Markdown-Cheatsheet) (перевод, оригинал)
Поиграть с разметкой Markdown можно на демо-странице.