First install:
$sudo apt-get install avrdude gcc-avr avr-libc
Then:
$avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o led.o led.c
-DF_CPU is the CPU clock speed
import sys | |
if sys.version_info[0] == 2 and sys.version_info[1] < 7: | |
sys.path.insert(0, "./<my_module>") | |
from <my_submodule> import fun1, fun2 | |
else: | |
from <my_module>.<my_submodule> import fun1, fun2 | |
For Python 2 / 3: |
def datetime_to_unixtime(date): | |
"""Returns the number of days between 'date' and 1970/01/01, as a string. | |
Parameters | |
---------- | |
date : datetime.datetime | |
A date object of the datetime.datetime class. | |
Returns | |
------- | |
str |
py36: | |
image: python:3.6 | |
script: | |
- apt-get update -q -y | |
- pip install pip -U | |
- pip install pipenv | |
- pipenv install | |
- pipenv run python -m unittest discover |
import datetime | |
import time | |
import tzlocal | |
def get_formated_datetime(): | |
"""Returns the current date and time, as a formated string with the | |
following formating: | |
'Wed Jan 31 2018 16:02:27 GMT-0200 (E. South America Daylight Time)' | |
Parameters | |
---------- |
import unittest | |
from my_program import MyClass | |
class MyClassTest(unittest.TestCase): | |
# First define a class variable that determines | |
# if setUp was ever run | |
ClassIsSetup = False | |
def setUp(self): | |
# If it was not setup yet, do it |
Error: | |
No valid credentials found for Spotinst Provider. | |
Please see https://www.terraform.io/docs/providers/spotinst/index.html | |
for more information on providing credentials for Spotinst Provider. | |
on <empty> line 0: | |
(source code not available) |
First install:
$sudo apt-get install avrdude gcc-avr avr-libc
Then:
$avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o led.o led.c
-DF_CPU is the CPU clock speed
I hereby claim:
To claim this, I am signing this object:
A guide on how to install Python 10 on WSL2 under Windows 10 / 11.
pyenv
is a tool that allows switching the global Python version, or choosing a specific version per project.
sudo apt update --yes
sudo apt install --yes build-essential curl git libbz2-dev liblzma-dev libffi-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libsqlite3-dev llvm make python3-openssl tk-dev wget xz-utils zlib1g-dev
curl https://pyenv.run | bash
docker system prune --all --force --volumes