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 torch | |
import torch.nn as nn | |
import torch.optim as optim | |
# Example model | |
class SimpleNN(nn.Module): | |
def __init__(self, input_size, hidden_size, output_size): | |
super(SimpleNN, self).__init__() | |
self.fc1 = nn.Linear(input_size, hidden_size) | |
self.fc2 = nn.Linear(hidden_size, output_size) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Multiple Wobbly Plasma Bubbles</title> | |
</head> | |
<body> |
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
## You | |
hi copilot, attached is our first conversation together in a series of conversations about our MarsGame made in unity 2023 HDRP with netcode for gameobjects. We just implement the basic game system state machine and everything seems to be working, i will attach part 2 of our last conversation in the next prompt | |
## Copilot | |
Hello, I'm glad to hear that you are making progress on your MarsGame project. It sounds like an exciting and challenging endeavor. 😊 | |
I have read the file you uploaded, which contains the first part of our conversation about your game. Here are some of the main topics we discussed: | |
- The game concept and setting: You explained that your game is a multiplayer survival game set on Mars, where players have to explore, gather resources, build bases, and fight enemies. | |
- The game engine and graphics: You chose to use Unity 2023 HDRP, which is a high-end rendering pipeline that supports realistic lighting, shadows, reflections, and materials. You also mentioned some of the assets and tools |
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
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace HFSM | |
{ | |
public abstract class StateMachine<T> | |
{ | |
T ctx; |
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
using System; | |
public class Singleton<T> where T : class, new() | |
{ | |
// The single instance of the type T | |
private static readonly Lazy<T> instance = new(() => new T()); | |
// The private constructor to prevent outside instantiation | |
public Singleton() { } |
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
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace HFSM | |
{ | |
public class StateMachine<T> : Singleton<StateMachine<T>> | |
{ | |
T context; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace HFSM | |
{ | |
/// <summary> | |
/// Our General Purspose Hieracrhial State Machine Engine. This class allows | |
/// sub states to bind addition nodes of states to create a tree structure. We also |
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
~/code/as-boilerplater | |
➜ npm init | |
This utility will walk you through creating a package.json file. | |
It only covers the most common items, and tries to guess sensible defaults. | |
See `npm help json` for definitive documentation on these fields | |
and exactly what they do. | |
Use `npm install <pkg>` afterwards to install a package and | |
save it as a dependency in the package.json 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
#!/bin/bash | |
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
# This script needs to be run from the volume you wish to use. | |
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents |
We can't make this file beautiful and searchable because it's too large.
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
id,username,password,when,country,host_id | |
21,admin,7ujMko0admin,2019-02-02 10:39:27,China,0 | |
22,pi,jdd,2019-02-02 10:40:09,United Kingdom,1 | |
23,pi,kkk,2019-02-02 10:40:11,United Kingdom,1 | |
24,pi,lk,2019-02-02 10:40:13,United Kingdom,1 | |
25,pi,kk',2019-02-02 10:40:16,United Kingdom,1 | |
26,pi,kjj,2019-02-02 10:40:18,United Kingdom,1 | |
27,pi,fds,2019-02-02 10:42:55,United Kingdom,1 | |
28,pi,eee,2019-02-02 10:42:56,United Kingdom,1 | |
29,pi,fds,2019-02-02 10:42:57,United Kingdom,1 |
NewerOlder