Skip to content

Instantly share code, notes, and snippets.

View marienguyen20's full-sized avatar

Marie Nguyen marienguyen20

View GitHub Profile
@marienguyen20
marienguyen20 / sendgrid.js
Created January 14, 2021 06:05
Use the Sendgrid API
//Form.js
class Form extends React.Component {
constructor() {
super();
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(event) {
event.preventDefault();
const data = new FormData(event.target);
@marienguyen20
marienguyen20 / sort.py
Last active January 13, 2021 15:09
Simple Python Code to Sort a List
# Using Python sorted() funtion to sort a list:
# The sorted() function returns a sorted list of the specified iterable object.
# You can specify ascending or descending order. Strings are sorted alphabetically, and numbers are sorted numerically.
# You cannot sort a list that contains both string values and numeric values.
# Sort numeric:
a = (87,23,3,87,99,54,5,10,8,28)
x = sorted(a)
print(x)
@marienguyen20
marienguyen20 / numberandom.py
Created January 12, 2021 16:04
Create a Random Number Generator
from datetime import datetime
import math
def numberandom():
random=datetime.now().strftime("%S")
numberand=pow(int(random), int(random))
return numberand
if __name__ == "__main__":
print("RANDOM NUMBER : %d", numberandom())
Package Game;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.list;
import java.util.InputMismatchException;
import java.util.Random;
import java.util.Scanner;
public class TicTacToe {