- Login: https://missions.astro-pi.org/login
- zmienić jezyk na polski
- pokaz i nauka wybierania kolorów - RGB
- wybór obrazka Copy-paste (ewentualna zmiana wybranych kolorów)
- sense.set_pixels(image) - wyświetlenie
- copy-pase z step-by-step: Display Image - https://projects.raspberrypi.org/en/projects/astro-pi-mission-zero/2
- ustawianie tła,
c- to kolor tła - nie sprawdza koloru co chwilę
- dodać sprawdzanie w pętli + `sleep(1)``
- wcięcia!
| import numpy as np | |
| from sklearn.manifold import TSNE | |
| from plotly import graph_objs as go | |
| # generate 10-dimensional data | |
| X = np.random.rand(100, 10) | |
| print(X.shape) | |
| # reduce to 3 components | |
| X_embedded = TSNE(n_components=3).fit_transform(X) |
This script rely on liccheck python package and contains some parts of code extracted and modified to fullfil my needs.
- liccheck installed:
pip install liccheck - added configuration file or content in
pyproject.tom, e.g.
[tool.liccheck]
authorized_licenses = [
This document is a simple resource to create sphinx documentation for projects with python(or not). This isn't exhaustive, but it'll help us get started without much hassle, (which, is typical for sphinx generated documenting)
For better results, ensure that you're inside a virtual env. This document assumes you're in a Pipenv based environment. Update it later to include other python package management tools (hopefully poetry)
| .language as $lang | | |
| { | |
| "metadata" : { | |
| "kernelspec": { | |
| "display_name": "Python 3 (ipykernel)", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { |
| class Binance: | |
| def __init__(self, key, secret, test=False): | |
| self.exchange = ccxt.binance({ | |
| 'apiKey': key, | |
| 'secret': secret, | |
| 'enableRateLimit': True, | |
| }) | |
| self.test = test | |
| def buy(self, symbol, amount): |
Backtrader does not allows natively for trading on Binance however it supports CCXT which is an universal interface to multiple exchanges. This example uses CCXT to allow Backtrader perform trades on this exchange.
Create virtualenv, install ccxt store for backtrader:
pip install git+git://github.com/Dave-Vallance/bt-ccxt-store@master#bt-ccxt-storeand backtrader package
| def check_lists_equal_nested(list_1: list, list_2: list) -> bool: | |
| """ | |
| Check if two nested lists have the same dictionaries | |
| :param list_1: list | |
| :param list_2: list | |
| :return: bool | |
| """ | |
| # 1. Check if two top-level lists have the same length | |
| if len(list_1) != len(list_2): | |
| return False |
| def get_images_in_dir(directory: str, extensions: List[str]) -> list: | |
| """ | |
| Get list of images in a directory, recursively. Include extensions: | |
| .jpg, .png, cr2, etc. | |
| :param directory: str | |
| :param extensions: list | |
| :return: list | |
| """ | |
| images = [] | |
| for root, dirs, files in os.walk(directory): |
