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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Video Stream</title> | |
</head> | |
<body> | |
<video controls> | |
<source src="/video" type="video/mp4"> | |
Your browser does not support the video tag. | |
</video> |
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 cv2 | |
import numpy as np | |
import svgwrite | |
def find_and_vectorize_edges(image_path, K): | |
# Шаг 1: Уменьшение количества цветов | |
img = cv2.imread(image_path) | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
Z = img.reshape((-1, 3)) | |
Z = np.float32(Z) |
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
name: Update README with Structured Directory Listings | |
on: | |
push: | |
branches: | |
- main # Adjust if your default branch has a different name | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest |
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
CREATE DATABASE testdb; | |
CREATE TABLE items ( | |
id SERIAL PRIMARY KEY, | |
name TEXT, | |
quantity INT | |
); | |
INSERT INTO items (name, quantity) VALUES ('Item1', 10); | |
INSERT INTO items (name, quantity) VALUES ('Item2', 20); |
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
javascript:els = document.getElementsByClassName("invitee-picker-connections-result-item--can-invite");for (let i=0;i<els.length;i++){ els[i].click(); }; |
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 torch | |
import numpy as np | |
def lerp_weight(x, xs): | |
"""Linear interpolation weight from a sample at x to xs. | |
Returns the linear interpolation weight of a "query point" at coordinate `x` | |
with respect to a "sample" at coordinate `xs`. | |
The integer coordinates `x` are at pixel centers. | |
The floating point coordinates `xs` are at pixel edges. | |
(OpenGL convention). |
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
year | GDP_Finland | GDP_Norway | GDP_Sweden | |
---|---|---|---|---|
2015 | 234.440 | 385.802 | 505.104 | |
2016 | 240.608 | 368.827 | 515.655 | |
2017 | 255.017 | 398.394 | 541.019 | |
2018 | 275.580 | 437.000 | 555.455 | |
2019 | 268.782 | 405.510 | 533.880 |
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 pybricks-micropython | |
""" | |
Example LEGO® MINDSTORMS® EV3 Robot Educator Driving Base Program | |
----------------------------------------------------------------- | |
This program requires LEGO® EV3 MicroPython v2.0. | |
Download: https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3 | |
Building instructions can be found at: |
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 fastapi import FastAPI, BackgroundTasks, Request | |
import uvicorn | |
import requests | |
import asyncio | |
import logging | |
import sys | |
from models import * | |
from blockchain.db import DB | |
from blockchain.blockchain import Blockchain |
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 .blocks import Block, Tx, Input, Output | |
from .verifiers import TxVerifier, BlockOutOfChain, BlockVerifier, BlockVerificationFailed | |
import logging | |
logger = logging.getLogger('Blockchain') | |
class Blockchain: | |
__slots__ = 'max_nonce', 'chain', 'unconfirmed_transactions', 'db', 'wallet', 'on_new_block', 'on_prev_block', 'current_block_transactions', 'fork_blocks' |
NewerOlder