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
| export AIRFLOW_HOME="$(pwd)/airflow-local" | |
| # -p ignores if file already exists | |
| mkdir -p "$(pwd)/airflow-local" | |
| # Install Airflow using the constraints file | |
| AIRFLOW_VERSION=2.4.3 | |
| PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)" | |
| CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" |
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
| elements = document.getElementsByClassName("r-15ysp7h"); | |
| for (let index = 0; index < elements.length; index++) {elements[index].click()} |
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
| function check(ele) { | |
| ele.checked = true; | |
| } | |
| x = document.getElementsByName("id"); | |
| x.forEach(element => check(ele)); |
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 tweepy | |
| from dotenv import load_dotenv | |
| import os | |
| import logging | |
| import time | |
| load_dotenv() | |
| CONSUMER_KEY = os.environ["CONSUMER_KEY"] |
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
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| function clickButton(classname){ | |
| accept_buttons = document.getElementsByClassName(classname) | |
| for(i=0; i<accept_buttons.length; i++){accept_buttons[i].click(); sleep(2000);} | |
| } |
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
| // Linkedin Unfortunately follows every collection, once in a while I use this script to clean it up | |
| a = document.getElementsByClassName("follows-recommendation-card__follow-btn") | |
| b = Array.from(a) | |
| b.forEach((x) => { | |
| x.click() | |
| }) |
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 mutagen.mp4 import MP4 | |
| duration = 0 | |
| for file in os.listdir(): | |
| mp4 = MP4(file) | |
| duration += mp4.info.length | |
| print (duration) |
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
| ele = document.getElementsByClassName("style-scope ytd-thumbnail-overlay-time-status-renderer") | |
| for(i=0, i<ele.length, i+=){ | |
| if (ele[i].tagName == "span"){ | |
| label = ele[i].getAttribute("aria-label") | |
| times = parseFloat(ele[2].textContent.replace(":", ".").trim()) | |
| } | |
| } |
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 React, {Component} from 'react'; | |
| import TodoList from '../ui/TodoList'; | |
| import StateProvider from './StateProvider'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <StateProvider> | |
| <TodoList/> | |
| </StateProvider> |
NewerOlder