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
# Generate Passwords in Julia | |
# Source: https://github.com/logankilpatrick/10-Julia-Projects-for-Beginners | |
using ProgressBars | |
using Random | |
# WARNING: Do not use this code to generate actual passwords! | |
function generate_passwords() | |
num_passwords = parse(Int64, Base.prompt("How many passwords do you want to generate?")) | |
password_length = parse(Int64, Base.prompt("How long should each password be?")) |
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
# Rock 🗿, Paper 📃, Scissors ✂️ Game in Julia | |
function play_rock_paper_scissors() | |
moves = ["🗿", "📃", "✂️"] | |
computer_move = moves[rand(1:3)] | |
# Base.prompt is similar to readline which we used before | |
human_move = Base.prompt("Please enter 🗿, 📃, or ✂️") | |
# Appends a ": " to the end of the line by default |
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
# Computer Number Guessing Game in Julia | |
# Source: https://github.com/logankilpatrick/10-Julia-Projects-for-Beginners | |
using Random | |
function play_number_guess_computer() | |
print("Please enter a number between 1 and 50 for the computer to try and guess: ") | |
# Take in the user input and convert it to a number |
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
# Number Guessing Game in Julia | |
# Source: https://github.com/logankilpatrick/10-Julia-Projects-for-Beginners | |
function play_number_guess_human() | |
total_numbers = 25 # | |
# Generate a random number within a certain range | |
target_number = rand(1:total_numbers) | |
guess = 0 |
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
# Mad Libs in Julia | |
# Source: https://github.com/logankilpatrick/10-Julia-Projects-for-Beginners | |
function play_mad_libs() | |
print("Enter a verb (action): ") | |
verb1 = readline() | |
print("Enter an adjective (descriptive word): ") | |
adj1 = readline() |
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 os | |
import sys | |
import numpy as np | |
from tensorflow.keras import models, layers | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.datasets import mnist | |
# Change this to the location of the database directories | |
DB_DIR = os.path.dirname(os.path.realpath(__file__)) |
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 os | |
import sys | |
import numpy as np | |
from tensorflow.keras import models, layers, callbacks | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.datasets import mnist | |
# Change this to the location of the database directories | |
DB_DIR = os.path.dirname(os.path.realpath(__file__)) |
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 os | |
import sys | |
import numpy as np | |
from tensorflow.keras import models, layers, callbacks | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.datasets import mnist | |
from matplotlib import pyplot as plt | |
# Change this to the location of the database directories |
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 os | |
import sys | |
from typing import Counter | |
import tensorflow as tf | |
import numpy as np | |
from tensorflow.keras import models, layers, callbacks | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.datasets import mnist | |
from matplotlib import pyplot as plt |
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 os | |
import sys | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.keras import models, layers, callbacks | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.datasets import mnist | |
# Change this to the location of the database directories |
NewerOlder