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> | |
#include <vector> | |
#include <string> | |
#include <string_view> | |
#include <algorithm> | |
auto find_colons(std::string_view s) -> std::vector<std::size_t> | |
{ | |
std::vector<std::size_t> indices; | |
auto it = s.begin(); |
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
def print_parens(digits, s, n): | |
res = [] | |
def _print_parens(s, pos, n, open, close): | |
if(close == n): | |
for i in s: | |
print(i, end = "") | |
print() | |
res.append(''.join(s)) | |
else: | |
if(open > close): |
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
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp | |
index 6dca724..31bf6c8 100644 | |
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp | |
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp | |
@@ -909,6 +909,7 @@ bool CvCapture_FFMPEG::open( const char* _filename ) | |
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) | |
#ifndef NO_GETENV | |
char* options = getenv("OPENCV_FFMPEG_CAPTURE_OPTIONS"); | |
+ fprintf(stderr, "Given capture options: %s \n", options); | |
if(options == NULL) |
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, APIRouter, Request | |
from fastapi.staticfiles import StaticFiles | |
from fastapi.responses import JSONResponse, HTMLResponse | |
from fastapi.templating import Jinja2Templates | |
import json | |
from datetime import datetime | |
import MetaTrader5 as mt |
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
module Main where | |
import XMonad | |
import XMonad.Util.EZConfig (mkKeymap) | |
import XMonad.Util.Ungrab (unGrab) | |
import XMonad.Util.EZConfig (mkKeymap) | |
import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen) | |
import XMonad.Hooks.ManageDocks (avoidStruts) | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M |
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
################################# | |
# Animations # | |
################################# | |
# requires https://github.com/jonaburg/picom | |
# (These are also the default values) | |
transition-length = 300 | |
transition-pow-x = 0.1 | |
transition-pow-y = 0.1 | |
transition-pow-w = 0.1 | |
transition-pow-h = 0.1 |
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
template <typename T> | |
auto xor_ptr(T* x, T* y) -> T * | |
{ | |
return reinterpret_cast<T*>( | |
reinterpret_cast<std::uintptr_t>(x) ^ reinterpret_cast<std::uintptr_t>(y) | |
); | |
} | |
template <typename T> | |
struct list_node |
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 vk_api | |
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType | |
def main(): | |
""" Пример использования bots longpoll | |
https://vk.com/dev/bots_longpoll | |
""" | |
vk_session = vk_api.VkApi(token='vk1.a.d3FAEBsnN64l1MjO7QTHldPgj-2HiTFtLxXvwgIGvoBClCAy-4KEPF9BVsczo0JBTREYkQbQMpyT7iolGeGaGUA3c2WVGuE_vJOQZE6ZliIod844VFmEh5UpY9OMF6skYdHlOMmRSBWYAh4Sq_MiSJ_6LzAdpGByX6If6PhccvXKwqxD2PerG4fz3mSgPU2zbjMCYodwzcrZiOOW5vQArQ') |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import cv2 | |
def show_graph(x_list, y_list, width, height): | |
plt.figure(figsize = [width, height]) | |
plt.scatter(x_list, y_list, marker='.', s=5) | |
plt.show() | |
return |
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> | |
#include <fstream> | |
void read_command(std::ifstream & file) | |
{ | |
char first_byte; | |
file.get(first_byte); | |
if (first_byte == '$') | |
{ |
OlderNewer