Skip to content

Instantly share code, notes, and snippets.

View ArtyomVancyan's full-sized avatar

Artyom Vancyan ArtyomVancyan

View GitHub Profile
@ArtyomVancyan
ArtyomVancyan / btc_dom.py
Created December 16, 2024 09:53
Bitcoin Dominance Index
import requests
url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&per_page=500&page=1"
response = requests.get(url)
coins = response.json()
btc_cap = next(filter(lambda c: c["id"] == "bitcoin", coins))["market_cap"]
sum_cap = sum(map(lambda c: c["market_cap"], filter(lambda c: "usd" not in c["id"], coins)))
print("BTC.D {:.2f}%".format((btc_cap / sum_cap) * 100))
Continent_Name Continent_Code Country_Name Two_Letter_Country_Code Three_Letter_Country_Code Country_Number
Asia AS Afghanistan, Islamic Republic of AF AFG 4
Europe EU Albania, Republic of AL ALB 8
Antarctica AN Antarctica (the territory South of 60 deg S) AQ ATA 10
Africa AF Algeria, People's Democratic Republic of DZ DZA 12
Oceania OC American Samoa AS ASM 16
Europe EU Andorra, Principality of AD AND 20
Africa AF Angola, Republic of AO AGO 24
North America NA Antigua and Barbuda AG ATG 28
Europe EU Azerbaijan, Republic of AZ AZE 31
@ArtyomVancyan
ArtyomVancyan / neovim.md
Last active November 29, 2022 11:14
VIM configurations and basic usage guide

Neovim Configuration at ~/.config/nvim/init.vim

:set number
:set autoindent
:set mouse=a

call plug#begin()

Plug 'https://github.com/preservim/nerdtree' " NerdTree