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
COPYBYTE1TO3 | |
ADR R4, MyString ; copy address of MyString into R4 | |
ADR R5, NewString | |
LDRB R6, [R4], #4 ; load the first byte pointed to by the address | |
; in the R4 register into R5, then increments | |
; address R4 by 4. | |
; | |
; reason we want to increment the address by 4 is that | |
; each byte in the string that we're copying is located | |
; at the end of words, i.e. it's laid out like |
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
void * PPcpu (void * param){ | |
int myID = ((cpuParams*) param)->threadNumber; | |
sharedVars * shared = ((cpuParams*) param)->svars; | |
process * runningProcess = NULL; | |
bool processChanged = false; | |
while(1) { | |
// reset flag | |
processChanged = false; | |
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
void* RRcpu (void* param){ | |
int myID = ((cpuParams*)param)->threadNumber; | |
sharedVars * shared = ((cpuParams*)param)->svars; | |
process * runningProcess = NULL; | |
int quantumLeft = shared->quantum; | |
bool stillProcessingQuantum = false; | |
while (1) { | |
// wait for "uptick" from main | |
sem_wait(&(shared->cpuSems[myID])); |
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) { |
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
<?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
""" | |
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
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
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
/** | |
* @param {string} digits | |
* @return {string[]} | |
*/ | |
var letterCombinations = function(digits) { | |
if(digits.length == 0) return [] | |
let map = { | |
"2": ["a", "b", "c"], | |
"3": ["d", "e", "f"], |