Skip to content

Instantly share code, notes, and snippets.

View astroDev18's full-sized avatar
🕹️
Learning C++

Isa astroDev18

🕹️
Learning C++
  • Atlanta, Georgia
  • 09:55 (UTC -12:00)
View GitHub Profile
public class Pet {
// petType can be dog, cat or any other animal, hence String
// petName is String
String petName, petType;
/*
* Note: You can also use enum in case of petType attribute which makes more sense,
* since dog and cat are already predefined values and we just need to choose one among them.
import React, { useEffect, useState } from 'react';
import { StateContext } from '../App';
import Radio from '@mui/material/Radio';
import RadioGroup from '@mui/material/RadioGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormControl from '@mui/material/FormControl';
import FormLabel from '@mui/material/FormLabel';
import TextField from '@mui/material/TextField';
import DynamicForm from './MenuComponents/DynamicForm';
import { useForm } from 'react-hook-form';
import React, { useState, useEffect } from 'react';
import { Button, Form } from 'react-bootstrap';
import { StateContext } from '../App';
import './GroupListing.css';
import BasicSelect from './MenuComponents/SelectMenu';
import './GroupForm.css';
import Radio from '@mui/material/Radio';
import RadioGroup from '@mui/material/RadioGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormControl from '@mui/material/FormControl';
@astroDev18
astroDev18 / python-text-game.py
Created April 18, 2022 10:59
A simple python text based story game I made for IT-140 at SNHU.
from time import sleep
import sys
import re
# adds colors to text
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
from time import sleep
import sys
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
@astroDev18
astroDev18 / game.py
Last active April 10, 2022 00:38
text based game
# A gameplay loop that includes: Output that displays the room the player is currently in Decision branching that
# tells the game how to handle the different commands. The commands can be to either move between rooms (such as go
# North, South, East, or West) or exit. If the player enters a valid “move” command, the game should use the
# dictionary to move them into the new room. If the player enters “exit,” the game should set their room to a room
# called “exit.” If the player enters an invalid command, the game should output an error message to the player (
# input validation).
import re
rooms = {
'Great Hall': {'South': 'Bedroom'},
<!DOCTYPE html>
<html>
<head>
<title>PubNub JavaScript SDK QuickStart</title>
</head>
<body>
<div>
<strong>Earth:</strong> <input id="update-text" type="input" placeholder="enter update for Earth here"/>
<input id="publish-button" type="submit" value="Submit Update to The Guide"/>
@astroDev18
astroDev18 / main.go
Created December 6, 2021 13:59
Initial File for astrocoin
// Main Server
package main
import (
"bytes"
"crypto/sha256"
"fmt"
)
@astroDev18
astroDev18 / main.go
Created December 6, 2021 13:57
main file
// Main Server
package main
import (
"bytes"
"crypto/sha256"
"fmt"
)
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
func main() {