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 re | |
# MIT license | |
RE_GETOPT_PARAM = re.compile(r"[a-zA-Z]:", re.ASCII) | |
RE_GETOPT_FLAG = re.compile(r"[a-zA-Z](?:[a-zA-Z]|$)", re.ASCII) | |
def simple_getopt(arg_list: list[str], spec: str) -> tuple[list[tuple[str, str]], list[str]]: | |
opts = [] | |
args = [] | |
all_param = [ x[0] for x in RE_GETOPT_PARAM.findall(spec) ] |
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
/* | |
* Created by SharpDevelop. | |
* User: ivoras | |
* Date: 05.02.2020. | |
* Time: 16:20 | |
* | |
* To change this template use Tools | Options | Coding | Edit Standard Headers. | |
*/ | |
using System; | |
using System.Text; |
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
using System; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
namespace CertTest | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) |
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
package main | |
import ( | |
"math/rand" | |
"testing" | |
"github.com/MadAppGang/kdbush" | |
"github.com/dhconnelly/rtreego" | |
rtreego2 "github.com/patrick-higgins/rtreego" | |
geo "github.com/paulmach/go.geo" |
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
pragma solidity >=0.4.19; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; | |
/** | |
* @title FERToken is a basic ERC20 Token | |
*/ | |
contract FERToken is ERC20, ERC20Detailed { | |
uint8 public constant DECIMALS = 4; |
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 -*- | |
# Adapted from: https://github.com/vmichals/python-algos/blob/master/catmull_rom_spline.py | |
import numpy as np | |
def catmull_rom_one_point(x, v0, v1, v2, v3): | |
"""Computes interpolated y-coord for given x-coord using Catmull-Rom. | |
Computes an interpolated y-coordinate for the given x-coordinate between |
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
// For use with this EasyEDA project: https://easyeda.com/account/project/setting/basic?project=c5413ffccb63491c831e6907e39ede2f | |
#include <EEPROM.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266HTTPClient.h> | |
#define PIN_POWER 2 | |
#define PIN_LED 1 | |
#define PIN_CONFIG 14 |
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
package main | |
import ( | |
"crypto/ecdsa" | |
"crypto/x509" | |
"encoding/asn1" | |
"encoding/hex" | |
"log" | |
"math/big" | |
) |
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
/* | |
* Tiny13Blinky.c | |
* | |
* Created: 21.04.2017. 11:21:09 | |
* Author : ivoras | |
*/ | |
#define F_CPU 1000000UL | |
#include <util/delay.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
#include <FastLED.h> | |
#define PIN_PANEL 10 | |
#define N_LEDS 64 | |
#define BRIGHTNESS 255 | |
#define FPS 120 | |
CRGB leds[N_LEDS]; | |
CRGB source_leds[N_LEDS]; | |
CRGB target_leds[N_LEDS]; |
NewerOlder