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
function sendBirthdayEmails() { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
const data = sheet.getDataRange().getValues(); | |
const headers = data.shift(); // Remove the header row for processing | |
// Identify the index of each column based on the header | |
const nameColIndex = headers.indexOf("Name"); | |
const emailColIndex = headers.indexOf("Email"); | |
const dateColIndex = headers.indexOf("Date"); | |
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
# watch the series to see how the whole thing is assembled | |
#source https://www.youtube.com/watch?v=tQprNCwjMlk&t=71s | |
# credit https://www.youtube.com/@databeliever | |
import gspread | |
import random | |
from datetime import datetime | |
import flet as ft | |
from time import sleep |
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
# very long sample text | |
text = "This is a very long sample text. It is so long that it will be used to demonstrate the use of functions as variables. It is also used to demonstrate the use of functions as arguments to other functions. It is also used to demonstrate the use of functions as return values from other functions. It is also used to demonstrate the use of functions as items in lists. It is also used to demonstrate the use of functions as items in tuples. It is also used to demonstrate the use of functions as items in dictionaries. It is also used to demonstrate the use of functions as items in sets. It is also used to demonstrate the use of functions as items in frozen sets. It is also used to demonstrate the use of functions as items in comprehensions. It is also used to demonstrate the use of functions as items in generator expressions. It is also used to demonstrate the use of functions as items in class definitions" | |
#function print all unique words in text | |
def print_unique_words(text): | |
retu |
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
# find all prime numbers in a range | |
# range is 100 | |
for i in range(2,101): | |
for j in range(2,i): | |
if i % j == 0: | |
break | |
else: | |
print(i) |
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
# 1, 2, fizz, 4, buzz,fizz,7,8,fizz,buzz,11,fizz,13,14,fizzbuzz,16,17,fizz,19,buzz,fizz,22,23,fizz,buzz,26,fizz,28,29,fizzbuzz,31,32,fizz,34,buzz,fizz,37,38,fizz,buzz,41,fizz,43,44,fizzbuzz,46,47,fizz,49,buzz,fizz,52,53,fizz,buzz,56,fizz,58,59,fizzbuzz,61,62,fizz,64,buzz,fizz,67,68,fizz,buzz,71,fizz,73,74,fizzbuzz,76,77,fizz,79,buzz,fizz,82,83,fizz,buzz,86,fizz,88,89,fizzbuzz,91,92,fizz,94,buzz,fizz,97,98,fizz,buzz | |
# range 101 | |
for i in range(1,101): | |
if i % 3 == 0 and i % 5 == 0: | |
print('fizzbuzz') | |
elif i % 3 == 0: | |
print('fizz') | |
elif i % 5 == 0: | |
print('buzz') |
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 time | |
from termcolor import colored | |
import math | |
''' | |
. . . . . . . . . . . . . . . . . . . . . * | |
. . . . | |
. . . . | |
. . . . |
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
# this is just a simple powershell console toy | |
# minute stamp helps me find newest output | |
$minute = (Get-Date).Minute | |
$name = Read-Host -Prompt "Please enter your name" | |
$game = Read-Host -Prompt "Do you want to play a question game?" | |
# if game is yes, then Write-Output | |
if ($game -eq 'yes') { | |
Write-Output "Hello $name, let's play a game!" |
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
# this is just a simple powershell console toy | |
# minute stamp helps me find newest output | |
$minute = (Get-Date).Minute | |
$name = Read-Host -Prompt "Please enter your name" | |
$game = Read-Host -Prompt "Do you want to play a question game?" | |
# if game is yes, then Write-Output | |
if ($game -eq 'yes') { | |
Write-Output "Hello $name, let's play a game!" |
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
# countries variable is a list of text strings | |
# in the file named 'countries.txt' | |
$countries = Get-Content -Path "C:\Users\denni\OneDrive\Documents\powershell_create_dir\countries.txt" | |
# loop through the countries list | |
# and create a directory for each one | |
# use the New-Item cmdlet | |
# item type is directory |
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
# inspired by https://www.geeksforgeeks.org/how-to-import-a-csv-file-into-a-sqlite-database-table-using-python/ | |
# create sql from csv | |
# import required modules | |
import csv | |
import sqlite3 | |
from multiprocessing import connection | |
# create phrasal_verb database | |
conn = sqlite3.connect('phrasal_verb.db') |
NewerOlder