How to Use Views and Stored Procedures in MySQL
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 requests | |
from decouple import config | |
import urllib | |
def shortURL(URL): | |
key = config('CUTTLY_TOKEN') | |
parsedURL = urllib.parse.quote(URL) | |
r = requests.get('http://cutt.ly/api/api.php?key={}&short={}'.format(key, parsedURL)) | |
data = r.json() |
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 requests | |
from pathlib import Path | |
# Download an image off unsplash without the api using python | |
def downloadimages(search_term, resolution, amount): # Define the function to download images | |
print(f"https://source.unsplash.com/random/{resolution}/?"+str(search_term)+", allow_redirects=True") # State the URL | |
path = Path('YourLocalPathForSaveFile') | |
# Loop for chosen amount of times | |
for x in range(int(amount)): |
goto chrome://flags/ the press f12 and paste code then run backup() or restore()
function saveFile(filename, data) {
return new Promise(resolve => {
const blob = new Blob([data], { type: 'octet/stream' });
const url = window.URL.createObjectURL(blob);
const dom = document.createElement('a');
Install Xampp from https://www.apachefriends.org/index.html
- Run the Xampp installer and open the Xampp control panel
- Make sure that you enable the Apache and MySQL services
- On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder
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
// "dependencies": { | |
// "axios": "^0.27.2", | |
// "cheerio": "^1.0.0-rc.12", | |
// "dotenv": "^16.0.1", | |
// "twilio": "^3.78.0" | |
// } | |
// need a .env file with: | |
// TWILIO_ACCOUNT_SID = "your account sid"; |
NewerOlder