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
/** | |
* @author 2d Lt Grady Phillips <grady.phillips.4@spaceforce.mil, grady@unyx.io> | |
* Pretty jank I won't lie. If you're here reading this code and have questions, feel free to reach out. | |
*/ | |
var messages = { | |
"Meritorious Service Medal": { | |
PCS: { | |
closing: "The singularly distinctive accomplishments of %RANK% %NAME% reflect great credit upon %PRONOUN%self and the %BRANCH%." | |
}, |
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
$team = get-mgteam -Filter "startswith(displayname, 'S4S - All')" | |
$group = get-mggroup -Filter "startswith(displayname, 'S4S_All')" | |
$groupMembers = Get-MgGroupTransitiveMemberAsUser -GroupId $group.id -CountVariable GroupSearchCount -Sort "displayName" -ConsistencyLevel eventual -All | |
$teamMembers = Get-MgGroupTransitiveMemberAsUser -GroupId $team.id -CountVariable TeamSearchCount -Sort "displayName" -ConsistencyLevel eventual -All | |
$idsToAdd = (Compare-Object -ReferenceObject $teamMembers.id -DifferenceObject ($groupMembers.id) | where {$_.sideindicator -eq "=>"}).InputObject | |
foreach ($userid in $idsToAdd) { | |
new-mggroupmember -groupid $group.id -directoryobjectid $userid |
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
/** | |
* @param {number} k | |
* @param {number} n | |
* @return {number[][]} | |
*/ | |
var combinationSum3 = function(k, n, prev = [], allowed = null) { | |
if (!allowed) { | |
allowed = [1,2,3,4,5,6,7,8,9] | |
} | |
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
/** | |
* @param {string} digits | |
* @return {string[]} | |
*/ | |
var letterCombinations = function(digits) { | |
if(digits.length == 0) return [] | |
let map = { | |
"2": ["a", "b", "c"], | |
"3": ["d", "e", "f"], |
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 hashlib | |
import math | |
charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def convert_to_base62(x): | |
built_str = "" | |
if (x == 0): | |
return "0" |
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 numpy as np | |
from scipy.spatial.transform import Rotation | |
import rmsd | |
from catalog_var import catalog | |
def parse_file(filename): | |
entries = [] | |
with open(filename, 'r') as f: | |
content = f.readlines() |
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
""" | |
Definitions of API endpoints and possible cmds can be found in tool/cmd_tlm_server/api.rb | |
Those of note upon first review: | |
- cmd_no_hazardous_check | |
- get_cmd_list | |
- get_tlm_list | |
- get_tlm_item_list | |
- get_tlm_details | |
- inject_tlm |
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
<?php | |
namespace CGOC\Web\Endpoints; | |
use Faker\Factory; | |
use CGOC\Models\ActivityReport; | |
use CGOC\Models\ActivityReportFile; | |
use CGOC\Models\Base; | |
use CGOC\Models\Branch; | |
use CGOC\Models\BranchMembership; |
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 os | |
import board | |
from digitalio import DigitalInOut, Direction | |
import time | |
import touchio | |
import supervisor | |
# .4054 = full beat | |
# [abs_time, led, event] | |
full_beat = .4054 |
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
#include <stdio.h> | |
#include "CPUs.h" | |
#include "processQueue.h" | |
#include "helpers.h" | |
void* FIFOcpu (void* param){ | |
int myID = ((cpuParams*)param)->threadNumber; | |
sharedVars* shared=((cpuParams*)param)->svars; | |
process* myProcess=NULL; | |
while(1) { |
NewerOlder