This file contains hidden or 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 | |
| ################################################################## | |
| # SIMPLE DIRECTORY WATCHER | |
| # | |
| # Usage: | |
| # bash test.sh | |
| # | |
| # Role: | |
| # Simple Directory Watcher allows you to monitor |
This file contains hidden or 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 some packages from matplotlib | |
| import matplotlib.image as mpimg | |
| import matplotlib.pyplot as plt | |
| # Uncomment the next line for use in a Jupyter notebook | |
| #%matplotlib inline | |
| # Define the filename, read and plot the image | |
| filename = 'sample.jpg' | |
| image = mpimg.imread(filename) | |
| plt.imshow(image) |
This file contains hidden or 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 some packages from matplotlib | |
| import matplotlib.image as mpimg | |
| import matplotlib.pyplot as plt | |
| # Import the "numpy" package for working with arrays | |
| import numpy as np | |
| # Uncomment the next line for use in a Jupyter notebook | |
| #%matplotlib inline | |
| # Define the filename, read and plot the image | |
| filename = 'sample.jpg' |
This file contains hidden or 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 json | |
| import requests | |
| from bottle import debug, request, route, run | |
| GRAPH_URL = "https://graph.facebook.com/v2.6" | |
| VERIFY_TOKEN = 'YOUR_VERIFY_TOKEN' | |
| PAGE_TOKEN = 'YOUR_PAGE_TOKEN' | |
| def send_to_messenger(ctx): |
This file contains hidden or 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
| def create_app(): | |
| """ | |
| Create Flask application using the app factory pattern. | |
| :return: Flask app | |
| """ | |
| app = Flask(__name__, instance_relative_config=True) | |
| app.config.from_object('config.settings') |
This file contains hidden or 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
| """ | |
| Scrap caption and images from instagram using https://deskgram.org | |
| """ | |
| import requests | |
| from bs4 import BeautifulSoup | |
| BASE_URL = 'https://deskgram.org' | |
| USER = 'healthymealsberlin' | |
| start_url = BASE_URL + '/' + USER |
This file contains hidden or 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
| git config --global core.editor "emacs -nw" |
This file contains hidden or 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
| curl https://www.instagram.com/USERNAME/ | grep 'window._sharedData = ' | python -c 'print(input()[64:-10])' | jq |
This file contains hidden or 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 selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| from selenium.common.exceptions import WebDriverException | |
| import os | |
| import time | |
| class Website(webdriver.Firefox): | |
| def connect(self, user=os.environ['USERNAME'], password=os.environ['PASSWORD']): | |
| self.get("https://www.example.com/login") |
This file contains hidden or 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
| sudo dd if=inputfile.iso of=/dev/disk<?> bs=4M && sync |