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 boto3 | |
from botocore.exceptions import ClientError | |
def send_email_using_ses(email, name, subject, body): | |
"""Send an email using Amazon SES. | |
:param email: The recipient's email address. | |
:param subject: The subject of the email. | |
:param body: The body of the email. |
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 os | |
FILE_LOC = "FILE_LOCATION" | |
# read all the file name from FILE_LOC | |
def read_file_name(): | |
file_name = [] | |
for file in os.listdir(FILE_LOC): | |
file_name.append(file) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Review</title> | |
<link rel="shortcut icon" href="assets/favicon.ico" type="image/x-icon" /> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" /> |
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
#include <stdio.h> | |
#include <cs50.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <math.h> | |
int letterCounter(char paragraph[], int); | |
int wordCounter(char paragraph[], int); | |
int sentenceCounter(char paragraph[], int); |
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
#include <ctype.h> | |
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
// Points assigned to each letter of the alphabet | |
int POINTS[] = {1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10}; | |
int compute_score(string word); |
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
/* | |
Most cards use an algorithm invented by Hans Peter Luhn of IBM. According to Luhn’s algorithm, you can determine if a credit card number is (syntactically) valid as follows: | |
1. Multiply every other digit by 2, starting with the number’s second-to-last digit, and then add those products’ digits together. | |
2. Add the sum to the sum of the digits that weren’t multiplied by 2. | |
3. If the total’s last digit is 0 (or, put more formally, if the total modulo 10 is congruent to 0), the number is valid! | |
*/ | |
#include <stdio.h> |
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 git+https://github.com/nficano/pytube@5d2c1a4e756cd8bac373867bf673155e691f1e04 | |
from pytube import YouTube | |
import time | |
start_time = time.time() | |
previous = 0 |
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
for mkv in mkv_list: | |
name, ext = os.path.splitext(mkv) | |
if ext != ".mkv": | |
raise Exception("Please add MKV files only!") | |
output_name = name + ".mp4" | |
try: | |
subprocess.run( | |
["ffmpeg", "-i", f"assets/{mkv}", "-codec", "copy", f"result/{output_name}"], check=True | |
) |
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 os | |
import subprocess | |
if not os.path.exists("assets"): | |
raise Exception("Please create and put all your vidoes in assets folder!") | |
mkv_list = os.listdir("assets") | |
if not os.path.exists("result"): | |
os.mkdir("result") |
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 os | |
import subprocess | |
if not os.path.exists("assets"): | |
raise Exception("Please create and put all your vidoes in assets folder!") | |
mkv_list = os.listdir("assets") | |
if not os.path.exists("result"): | |
os.mkdir("result") |
NewerOlder