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 sys | |
import openai | |
import os.path | |
from dotenv import load_dotenv | |
from pydub import AudioSegment | |
load_dotenv() | |
openai.api_key = os.getenv('OPENAI_API_KEY') |
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 smbus | |
bus = smbus.SMBus(1) | |
v = bus.read_byte_data(0x57, 0xff) | |
if v != 17: | |
print "wrong part ID" | |
exit(1) | |
bus.write_byte_data(0x57, 0x06, 0x03) |
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 python2 | |
# Copyright (c) 2016 Tommi Airikka <[email protected]> | |
# License: GPLv2 | |
import sys, struct, serial, argparse | |
from dateutil.parser import parse | |
##################### | |
##### Variables ##### |
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
error: linking with `arm-none-eabi-gcc` failed: exit code: 1 | |
note: "arm-none-eabi-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/pasamy/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug/wit.0.o" "-o" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug/wit" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug" "-L" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug/deps" "-L" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug/build/openssl-5464f8f6e728c35a/out" "-L" "/home/pasamy/projects/misc/wit/target/armv7-unknown-linux-gnueabihf/debug/build/openssl-sys-extras-5c7e4d8925825f00/out" "-L" "/home/pasamy/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/ho |