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
# Install it in .bashrc file | |
function encrypt(){ | |
which openssl &> /dev/null | |
[ $? -ne 0 ] && echo "OPENSSL is not installed." && return 1 | |
openssl enc -aes-256-cbc -salt -in $1 -out $2 | |
} | |
function decrypt(){ |
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
## Predict House prices using linear regression | |
## Dataset: https://www.kaggle.com/rubenssjr/brasilian-houses-to-rent | |
import pandas as pd | |
from sklearn import preprocessing, linear_model | |
import numpy as np | |
import sklearn | |
### Loading Data ### | |
print('-' * 30); print(' Importing Data ...'); print('-' * 30) |
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
# COVID-19 cases predictor (polynomial regression for non-linear prediction) | |
# Data Source: https://ourworldindata.org/coronavirus-source-data | |
# Data Example | |
# id,cases | |
# 1,1 | |
# 2,4 | |
# 3,6 | |
# 4,8 | |
# 5,10 |
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
# Color Detection/Filter using OpenCV and Webcam | |
import cv2 | |
import numpy as np | |
cap = cv2.VideoCapture(0) | |
while True: | |
_, frame = cap.read() | |
hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) |
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
# pip install speedtest-cli | |
import speedtest | |
test = speedtest.Speedtest() | |
down = test.download() | |
upload = test.upload() | |
print(f"Download Speed: {down}") | |
print(f"Upload Speed: {upload}") |
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
# pip install mediapipe | |
import cv2 | |
import mediapipe as mp | |
import time | |
cap = cv2.VideoCapture(0) | |
mpHands = mp.solutions.hands | |
hands = mpHands.Hands() # using default paramaters of 'Hands()' | |
mpDraw = mp.solutions.drawing_utils |
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
pragma solidity ^0.8.6; | |
contract TaskCrud { | |
struct Task { | |
uint id; | |
string name; | |
string description; | |
} | |
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
# pip install torch | |
# pip install "transformers==4.24.0" | |
# usage: python text-generator-transformers.py 'some text' | |
import sys | |
import torch | |
from transformers import GPT2Tokenizer, GPT2LMHeadModel | |
arg = sys.argv |
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
Id | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm | Species | |
---|---|---|---|---|---|---|
1 | 5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa | |
2 | 4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa | |
3 | 4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa | |
4 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa | |
5 | 5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa | |
6 | 5.4 | 3.9 | 1.7 | 0.4 | Iris-setosa | |
7 | 4.6 | 3.4 | 1.4 | 0.3 | Iris-setosa | |
8 | 5.0 | 3.4 | 1.5 | 0.2 | Iris-setosa | |
9 | 4.4 | 2.9 | 1.4 | 0.2 | Iris-setosa |
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 json | |
import snscrape | |
import snscrape.modules.twitter as sntwitter | |
import snscrape.modules.facebook as snfacebbok | |
import snscrape.modules.instagram as sninstagram | |
import snscrape.modules.mastodon as snmastodon | |
import snscrape.modules.reddit as smreddit | |
def lambda_handler(event, context): | |