This file contains hidden or 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
| # ~/.config/starship.toml | |
| # Inserts a blank line between shell prompts | |
| add_newline = true | |
| # Replace the '❯' symbol with a simple '$' or keep the arrow but remove the text | |
| [character] | |
| success_symbol = "[❯](bold green)" | |
| error_symbol = "[❯](bold red)" | |
| vicmd_symbol = "[❮](bold yellow)" |
This file contains hidden or 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
| # Install zcomet if not present | |
| if [[ ! -e ~/.zcomet/bin ]]; then | |
| git clone --depth=1 https://github.com/agkozak/zcomet.git ~/.zcomet/bin | |
| fi | |
| source ~/.zcomet/bin/zcomet.zsh | |
| # Zcomet plugins - Load completions FIRST | |
| zcomet load zsh-users/zsh-completions | |
| zcomet compinit |
This file contains hidden or 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
| ;;; init.el --- Personal Emacs config -*- lexical-binding: t; -*- | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Package Management ;; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| (require 'package) | |
| (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
| ;; use-package is built-in in Emacs 30 but :ensure needs this module |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 ( | |
| "fmt" | |
| "unsafe" | |
| ) | |
| func stringptr(s string) *byte { | |
| return unsafe.StringData(s) | |
| } |
This file contains hidden or 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
| if [[ ! -e ~/.zcomet/bin ]]; then | |
| git clone --depth=1 https://github.com/agkozak/zcomet.git ~/.zcomet/bin | |
| fi | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| source ~/.zcomet/bin/zcomet.zsh |
This file contains hidden or 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
| ;; Set package repositories | |
| (require 'package) | |
| (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) | |
| (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
| (package-initialize) | |
| (eval-when-compile | |
| (require 'use-package) | |
| (require 'use-package-ensure)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| ''' | |
| Программа для нахождения перебором решения задачи о 7-ми кенигсбергских мостах. | |
| см. https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B4%D0%B0%D1%87%D0%B0_%D0%BE_%D1%81%D0%B5%D0%BC%D0%B8_%D0%BA%D1%91%D0%BD%D0%B8%D0%B3%D1%81%D0%B1%D0%B5%D1%80%D0%B3%D1%81%D0%BA%D0%B8%D1%85_%D0%BC%D0%BE%D1%81%D1%82%D0%B0%D1%85 | |
| Решения этой задачи не существует, что доказал Леонард Эйлер. | |
| ''' | |
| bridges = ( | |
| (1, 2), | |
| (1, 2), |
This file contains hidden or 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 socket | |
| import threading | |
| addr = socket.gethostbyname(socket.gethostname()) | |
| port = 22000 | |
| srv_addr = (addr, port) | |
| broadcast_addr = ".".join(addr.split('.')[:-1]) + '.255' | |
| nport = 22001 | |
| n_srv_addr = (broadcast_addr, port) |
NewerOlder