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
PurpleWavelet (Protoss) | |
#include<BWAPI.h> | |
#include<cmath> | |
#define A auto | |
#define C continue; | |
#define G using | |
#define N G namespace | |
#define R return | |
#define PP Position |
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
Me: | |
Write a StarCraft bot in C++, which replaces ExampleAIModule.dll. The bot should rush the opponent with workers, and use mineral walking to stack workers as they attack the enemy. | |
ChatGPT: | |
Here is an example of a simple StarCraft bot written in C++ that rushes the opponent with workers and uses mineral walking to stack workers as they attack the enemy: | |
#include "ExampleAIModule.h" | |
using namespace BWAPI; | |
void ExampleAIModule::onStart() |
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
#!/bin/bash | |
src_dir="/c/MyProject" | |
base_tgt_dir="/d/MyProjectBackups" | |
current_date=$(date +"%Y-%m-%d") | |
tgt_dir="${base_tgt_dir}/${current_date}" | |
# If the target directory already exists, delete it first | |
if [ -d "$tgt_dir" ]; then | |
rm -rf "$tgt_dir" |
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 math | |
import random | |
import numpy as np | |
import sounddevice as sd | |
from PIL import Image, ImageDraw | |
def distance(x, y): | |
return (x**2 + y**2) ** 0.5 | |
def generate_image(id): |