Skip to content

Instantly share code, notes, and snippets.

Vladislav Tetraquark

Block or report user

Report or block Tetraquark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CallbackToSuspend.kt
import ru.tetraquark.kexperiments.callbacktosuspend.SomeJavaApi
import kotlinx.coroutines.*
import kotlin.Exception
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
fun main() = runBlocking {
View SomeJavaApi.java
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class SomeJavaApi {
private static final String SUCCESS_RESULT = "SUCCESSFUL_CALL";
private static final long WORK_DELAY = 1000L;
@Tetraquark
Tetraquark / discordpy-chatbot.py
Last active Mar 16, 2019
Example of simple discord chatbot based on discord.py library
View discordpy-chatbot.py
#
# Example of simple discord chatbot based on discord.py library
# For article (Russian language): http://tetraquark.ru/archives/377
#
import discord
import asyncio
import requests
DISCORD_BOT_TOKEN = 'DISCORD_APP_TOKEN'
@Tetraquark
Tetraquark / fastica_exmp.py
Last active Apr 5, 2019
Simple example of using FastICA algorithm
View fastica_exmp.py
#
# Testing of FastICA algorithm from sklearn library.
# Author: tetraquark | tetraquark.ru
# Article URL (RUS language): http://tetraquark.ru/archives/311
#
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import FastICA
# Length of the sources signals
You can’t perform that action at this time.