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 java.util.Random; | |
public class RollSimulation { | |
public static void main(String[] args) { | |
Random rand = new Random(); | |
for (int f = 1; f <= 6; f++) { | |
int[] rolls1 = new int[8]; | |
int[] rolls2 = new int[8]; |
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 <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define NUM_TRIALS 1e9 | |
int randint(int n); | |
unsigned int play(void); | |
int main(void) { |
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
// make sure to unbind your device first | |
// https://stackoverflow.com/questions/47695160/failed-to-claim-interface-0-device-or-resource-busy | |
// echo -n "1-1.3:1.0" | sudo tee /sys/bus/usb/drivers/ch341/unbind | |
let device; | |
async function connectDevice(dev) { | |
await dev.open(); | |
if (dev.configuration === null) | |
await dev.selectConfiguration(1).catch(error => { log(error); }); |
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
// temp. includes so that the compiler doesn't complain | |
// (delete these three lines when you import the code) | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
struct spi_devices_struct { | |
char manu[10]; // ID winbond 0xef. | |
char device[10]; // ID string (ie W25Q16BV) | |
uint8_t manId; // manu ID |
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
module ram( | |
input clk, | |
input rst, | |
input write_enable, | |
input [15:0] data_write, | |
inout [15:0] MemDB, | |
output reg [15:0] data_read, | |
output RamAdv, RamClk, RamCS, MemOE, MemWR, RamLB, RamUB, |
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
name: TOPHAP | |
description: '' | |
host: EXCEL | |
api_set: {} | |
script: | |
content: |- | |
/** | |
* Fetch property details for an address string. | |
* Example: `console.log(await address('265 eagle ct', 'alamo', 'ca'))` | |
* @customfunction |
OlderNewer