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
# coding=utf-8 | |
from __future__ import annotations | |
import logging | |
import ssl | |
from http import HTTPStatus | |
from http.client import HTTPResponse | |
from json import loads | |
from pathlib import Path | |
from platform import uname, uname_result |
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 typing import Iterable, Iterator, Sequence, TypeVar | |
_T = TypeVar('_T') | |
def arg_max(x: Iterable[_T]) -> int | None: | |
""" find the index of the largest item in the series """ | |
am: int | None = None | |
max_x: _T | None = None | |
for i, x_i in enumerate(x): |
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
# -*- coding: utf-8 -*- | |
from typing import List, Dict | |
import urllib.request | |
import urllib.error | |
import os.path | |
FILES: List[str] = [ | |
# 'test', | |
# 'aes_light', |
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 <stdlib.h> | |
#include <stdio.h> | |
/***************************************************************************** | |
* @function readValue extracts a string value from an INI file | |
* @param f is a file opened for reading outside the function | |
* @param section is the section name to look into | |
* @param key is the key which value is required | |
* @param buffer is a buffer to store the key value into | |
* @note @param buffer should be long enough to store the value |
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
\documentclass[a4paper,landscape,14pt]{extarticle} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T2A,T1]{fontenc} | |
\usepackage[russian,english]{babel} | |
\usepackage{color} | |
\usepackage{tabularx} | |
\usepackage[margin=1cm]{geometry} | |
\usepackage{pgffor,etoolbox} | |
\usepackage{hyperref} | |
\hypersetup{pdftex, pdftitle=Calendar, pdfauthor=StSav012} |
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> | |
<meta charset="utf-8"> | |
<style> | |
* { | |
color: inherit; | |
background: inherit; | |
} |
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
lang="ru" | |
place="Нижний Новгород" | |
code=5797 | |
file=$(curl -s -o - "http://pda.rp5.ru/?lang=${lang}&q=${place}") | |
links=$(echo ${file} | grep -o -e "p class=\"navy\">.*<form id=\"f\"" | grep -o -e "=[^=]*" | tail -n +2 | head -n -1) | |
code=$(echo ${links} | grep -Eo -e "\"[[:digit:]]+" | grep -Eo -e "[[:digit:]]+" | head -n 1) | |
name=$(echo ${links} | grep -Eo -e "${lang}\">[^<]+" | grep -Eo -e ">.+" | grep -Eo -e "[^>]+" | head -n 1) | |
file=$(wget -q -O - "http://rp5.ru/${code}/${lang}") |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <mpi.h> | |
#define formaster if(id==0) | |
#define forothers if(id!=0) | |
#define dim 2 | |
#define USE_DEFAULT 1 // skip user input | |
#define DO_HARLEM_SHAKE 1 // show the result |
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 <cstdlib> | |
#include <iostream> | |
#include <vector> | |
#include <ctime> | |
#include <omp.h> | |
using namespace std; | |
#define dim 2 | |
#define USE_DEFAULT 1 // skip user input |