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
#!/usr/bin/python3 | |
import json, os, re | |
from rich import print | |
from typing import Tuple, Dict | |
html_template = """ | |
<html> | |
<head> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
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 <linux/module.h> | |
#include <linux/cdev.h> | |
#include <linux/fs.h> | |
#define DRIVER_NAME "tictactoe" | |
#define MAJOR_NUMBER 168 | |
/* | |
Create the character device with the following commands: | |
$ sudo mknod /dev/tictactoe c 168 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
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <errno.h> | |
#define bufferSize 1024 |
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
//This code will look to maximise the IV curve output of the solar panel | |
#include <stdbool.h> //To be able to use boolean variables and 'true' and 'false' values | |
//These will be replaced with a better model and finally the real readings | |
double readVoltage() { | |
return 24; | |
} | |
//These will be replaced with a better model and finally the real readings |
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 <iostream> | |
#include <vector> | |
#include <limits> | |
#include <cmath> | |
using namespace std; | |
class Bitset { | |
private: | |
typedef unsigned long long int bitData; //Change this datatype if you want different subset sizes |