Skip to content

Instantly share code, notes, and snippets.

View Xevion's full-sized avatar
⚜️
Chaos Order

Xevion Xevion

⚜️
Chaos Order
View GitHub Profile
import shutil
from typing import List
import imageio
import os
from PIL import Image, ImageDraw
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
IMG_OUT_DIRECTORY = os.path.join(SCRIPT_DIR, 'gif')
IMG_TEMP_OUT_DIR = os.path.join(IMG_OUT_DIRECTORY, 'temp')
IMG_TEMP_GLOB = os.path.join(IMG_TEMP_OUT_DIR, '*.png')
from typing import List
class Color(object):
def __init__(self, r: float, g: float, b: float, a: float = 1.0) -> None:
self.r, self.g, self.b, self.a = r, g, b, a
def __str__(self) -> str:
return f'Color({self.r}, {self.g}, {self.b}, {self.a:.2%})'
def __repr__(self) -> str:
<tbody>
<tr class="ch-tbl-row odd" role="row">
<td class="ch-tbl-name sorting_1"></td>
<td class="ch-tbl-short-name">ammo.snowballgun</td>
<td class="ch-tbl-id">550753330</td>
<td class="ch-tbl-desc"></td>
<td class="ch-tbl-stack-size">128</td>
</tr>
<tr class="ch-tbl-row even" role="row">
<td class="ch-tbl-name sorting_1">12 Gauge Buckshot</td>
<#
.SYNOPSIS
Given students' names along with the grade that they are in, create a roster for the school.
.DESCRIPTION
In the end, you should be able to:
Add a student's name to the roster for a grade
"Add Jim to grade 2."
"OK."
Get a list of all students enrolled in a grade
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="@dimen/color_item_frame_corner_radius"/>
<stroke
android:width="@dimen/color_item_frame_width"
android:color="@color/colorColorItemFrame"/>
import enum
from typing import List, Optional, Tuple
from termcolor import colored
class CellType(enum.Enum):
EMPTY = ' '
WALL = colored('#', color='white', attrs=['bold'])
MONSTER = colored('M', color='red')
MONSTER_FOG = colored('+', color='green')

How to join the UTSA Student Hub

Discord has a new feature called 'Student Hubs' launched within it's Server Discovery area.

This new feature allows one to verify they belong to a specific school and browse/join all of the Discord servers attached to it.

Open the Public Servers GUI

  1. Go to the bottom of your Server List and click on the 'Explore Public Servers' button (the compass).
from typing import Dict, Union
def balance_distribution(dist: Dict[int, Union[int, float]]) -> float:
sum_known: float = sum(filter(lambda v : v != None, dist.values()))
unknown_spaces: int = len(list(filter(lambda v : v == None, dist.values())))
# Average "unknown distribution" to place among all unfilled spots
unknown_replace_avg: float = (1.0 - sum_known) / unknown_spaces
for key, value in dist.items():
import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
class StackerPosition {
int x;
int y;
Character type;
StackerPosition(int x, int y) {
package org.firstinspires.ftc.team16911.drive;
import com.acmerobotics.dashboard.config.Config;
import com.qualcomm.robotcore.hardware.PIDFCoefficients;
/*
* Constants shared between multiple drive types.
*
* TODO: Tune or adjust the following constants to fit your robot. Note that the non-final
* fields may also be edited through the dashboard (connect to the robot's WiFi network and