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 kikit.common import findBoardBoundingBox | |
# This function should be provided by KiKit, but at the moment, it is not. I | |
# opened an issue for that: https://github.com/yaqwsx/KiKit/issues/283. | |
# Basically, panel.makeGrid should take the tolerance parameter, but it doesn't | |
# at the moment. | |
def locateBoard(inputFilename, tolerance): | |
""" | |
Given a filename of the board, find the source are of it. | |
""" |
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
static const std::map< std::string, ModuleParser > parsers = { | |
{"universal", { | |
moduleReader, /** json::dict -> Module **/ | |
connNameResolver, /** std::string -> std::option< int > **/ | |
writeModule, /** Module -> json::dict **/, | |
connNameWriter, /** int -> std::string **/ | |
}}, | |
} | |
readRofibot /* (json::dict, Rofibot) -> Rofibot */ |
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
{ | |
"modules": { | |
"1": { | |
"type": "universal", | |
"alpha": 0, | |
"beta": 0, | |
"gamma": 0 | |
}, | |
"2": { | |
"type": "pad", |
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> | |
#define CRTP_SELF() \ | |
Self& self() { return *static_cast< Self* >( this ); } \ | |
const Self& self() const { return *static_cast< const Self* >( this ); } | |
template< template < typename > typename... Features > | |
struct Base: public Features< Base < Features... > >... {}; |
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
// Approach used in DIOS | |
class Base {}; | |
template < typename Next > | |
class FatureA: public < Next > {}; | |
template < typename Next > | |
class FeatureB: public < Next > {}; | |
using MyType = FeatureB < FeatureA < FeatureB< Base > >; |
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 wx | |
# Just something dummy so we have something to show | |
availableSections = { | |
"Layout": None, | |
"Source": None, | |
"Tabs": None, | |
"Cuts": None, | |
"Framing": None, | |
"Tooling": None, |
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
const int MAX_TEMPERATURE = 33; | |
std::array< Rgb, MAX_TEMPERATURE + 1 > temperatures{ | |
Rgb(0, 0, 0), | |
Rgb(10, 7, 10), | |
Rgb(31, 7, 7), | |
Rgb(47, 15, 7), | |
Rgb(71, 15, 7), | |
Rgb(87, 23, 7), | |
Rgb(103, 31, 7), |
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 <Arduino.h> | |
#include <WiFi.h> | |
#include <WiFiUdp.h> | |
#include <esp_wifi.h> | |
#include "peripherals.h" | |
#include "credentials.h" | |
Led redLed( GPIO_NUM_19 ); | |
Led greenLed( GPIO_NUM_21 ); |
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 <Arduino.h> | |
#include <WiFi.h> | |
#include <WiFiUdp.h> | |
#include <esp_wifi.h> | |
#include "peripherals.h" | |
#include "credentials.h" | |
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
I prohřešek v dobré víře je prohřešek, to nepopírám ale připadá mi to jako argumentace "Za vraždu i krádež je doživotí - oboje je přece trestný čin). Má zkušenost je násleudjící: | |
Měl jsem 9 měcíců šalinkartu, na poslední týden jsem si koupil univerzální jízdenku (bohužel studentskou, jak mi paní špatně poradila). Při první jízdě s touto jízdenkou po Brně mě zastavil revizor. Ukázal jsem mu mých 9 měsíců před pár dny prošlé šalinkarty, vysvětlil situaci a revizor mi napálil plnou pokutu se slovy "Vy si tu platíte drahé jízdné a ještě pokutu, to vám člověče nezávidím." Člověk, který byl chycen se mnou dostal stejnou pokutu a ještě se vychloubal, jak se mu to stále vyplatí jezdit na černo a jednou za rok si zapatit pokutu. | |
Kdybych dostal poloviční pokutu, ani neceknu - udělal jsem chybu (ač si myslím, že, univerzální jízdenka by mohla mít někde důrazně napsáno, že pro 100 a 101 platí speciální pravidla). Jednal jsem ale v dobré víře (očividně se nesnažím krátit jízdné - viz šanlinkarta). To, že jsem ale trest |
NewerOlder