Skip to content

Instantly share code, notes, and snippets.

View potat-dev's full-sized avatar
🥔
Котик крутится, лабы мутятся

Denis Churilov potat-dev

🥔
Котик крутится, лабы мутятся
View GitHub Profile
@potat-dev
potat-dev / indexing.mermaid
Created January 15, 2024 01:37
semantica diagrams
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(function () {
'use strict';
if (Lampa.Platform.is('android') && typeof WebAssembly !== 'undefined')
Lampa.Utils.putScriptAsync(['https://bwa.to/s'], function () {});
Lampa.Utils.putScriptAsync(['http://sisi.am/nyam.serv.js?v21'], function () {});
})();
(function () {
'use strict';
var Defined = {
use_api: 'http',
localhost: 'https://vi.sisi.am',
vip_site: 'https://sisi.am/vip',
framework: ''
};
(function() {
'use strict';
function create() {
var html;
var timer;
var network = new Lampa.Reguest();
var loaded = {};
this.create = function() {
html = $("<div class=\"new-interface-info\">\n <div class=\"new-interface-info__body\">\n <div class=\"new-interface-info__head\"></div>\n <div class=\"new-interface-info__title\"></div>\n <div class=\"new-interface-info__details\"></div>\n <div class=\"new-interface-info__description\"></div>\n </div>\n </div>");
@potat-dev
potat-dev / GetCharsets.java
Created January 26, 2023 14:52
Get an ArrayList of all available character sets and their aliases in Java
import java.util.Arrays;
import java.util.ArrayList;
import java.nio.charset.Charset;
public class GetCharsets {
public static ArrayList<String> getCharsets() {
String[] charsets = Charset.availableCharsets().keySet().toArray(new String[0]);
ArrayList<String> allCharsets = new ArrayList<String>(Arrays.asList(charsets));
for (String charset : charsets) {
allCharsets.addAll(Charset.availableCharsets().get(charset).aliases());
@potat-dev
potat-dev / YandexMusicDownload.py
Created January 8, 2023 01:41
This code is a snippet from my project, which downloads music from Yandex.Music
from tqdm import tqdm
import os
import requests
import pprint
import hashlib
import base64
# for xml parsing
import xml.etree.ElementTree as ET
Text with code

Hidden text

@potat-dev
potat-dev / table.cpp
Last active November 4, 2022 01:56
Template function to pretty print table in C++
// template function to print table
template <typename T>
void ptable(vector<vector<T>> table, int axis_offset = 0, int split = 10,
int tab_size = 8, int index_width = 3, bool round_val = false) {
int rows = table.size();
int splitted_parts = rows / split + (rows % split != 0);
for (int table_n = 0; table_n < splitted_parts; table_n++) {
int columns = min(split, (int)rows - table_n * split);
cout << setw(index_width + 3) << " | ";
for (int i = 0; i < columns; i++) {
@potat-dev
potat-dev / launch.json
Created September 28, 2022 23:36
VS Code MinGW g++ debug tasks
{
"version": "0.2.0",
"configurations": [
{
"name": "build file",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/compile/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
@potat-dev
potat-dev / hello-emoji.cpp
Created September 4, 2022 22:11 — forked from abusse/hello-emoji.cpp
Some C++ Emoji fun found on the internet. Compiles (currently) only with clang (sorry GCC) and C++11.
#include <iostream>
#include <vector>
#include <cstdlib>
namespace 🔵 = std;
using 🔢 = int;
using 💯 = unsigned;
using 💀 = void;
using 🕖 = time_t;
using 👌 = bool;