Skip to content

Instantly share code, notes, and snippets.

View liketaurus's full-sized avatar
📢
Trying to work and teach during the war

Alexander Babich liketaurus

📢
Trying to work and teach during the war
View GitHub Profile
@liketaurus
liketaurus / google-search-demo.ipynb
Created September 6, 2023 13:50
Google Search Demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liketaurus
liketaurus / horoscope.js
Created June 3, 2023 09:18
How to get horoscope for today for specified zodiac sign for free
sync function getHoroscope(sign) {
const url = `https://horoscopes-ai.p.rapidapi.com/get_horoscope/${sign}/today/general/en`;
const options = {
method: 'GET',
headers: {
'X-RapidAPI-Key': 'YOUR_HOROSCOPE_AI_API_KEY(details_at_https://docs.rapidapi.com/docs/keys)',
'X-RapidAPI-Host': 'horoscopes-ai.p.rapidapi.com'
}
};
@liketaurus
liketaurus / Main.java
Created May 16, 2023 16:27
Приклад простого консольного застосунку, який ілюструє використання колекцій і дженериків.
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
// Створюємо список цілих чисел
List<Integer> numbers = new ArrayList<>();
// Додаємо елементи до списку
numbers.add(10);
@liketaurus
liketaurus / Using_Forms.py
Created September 2, 2022 10:20
Simple forms (GUI) in Google Colab (km to miles)
kmToMile = 0.6214
#@title Перетворення кілометрів на милі
km = 310.2 #@param {type:"slider", min:0, max:1000, step:0.1}
print("{:} km = {:.1f} miles!".format(km, km*kmToMile))
@liketaurus
liketaurus / scratchpad.ipynb
Last active December 21, 2023 10:31
A very simple URL-shortener and QR-code generator
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liketaurus
liketaurus / air-alarms.ipynb
Last active April 1, 2022 09:07
Air Alarms - a Python sample
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liketaurus
liketaurus / Valentine.java
Created February 13, 2022 15:33
Happy Valentine's Day!
import java.awt.*;
import java.net.URL;
import javax.swing.*;
public class Valentine extends JFrame {
Valentine() {
URL url = null;
try {
url = new URL("https://thumbs.gfycat.com/SkinnyPinkBunny-max-1mb.gif");
@liketaurus
liketaurus / index.html
Created December 30, 2020 13:33
A simple JS task - choosing a function to calculate
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/cosmo/bootstrap.min.css" integrity="sha384-5QFXyVb+lrCzdN228VS3HmzpiE7ZVwLQtkt+0d9W43LQMzz4HBnnqvVxKg6O+04d"
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
@liketaurus
liketaurus / Biorhythms.java
Last active December 14, 2019 10:28
Пример рассчета биоритмов и их отображения на Java. Описание можно найти, к примеру, здесь: http://informatika.edusite.ru/modelir4.htm
package biorytms;
import java.util.Date;
import java.util.GregorianCalendar;
public class Biorhythms {
private static Date createDate(int year, int month, int day) {
return new GregorianCalendar(year, month, day).getTime();
@liketaurus
liketaurus / recorder.html
Created December 9, 2019 16:16
How to record audio in client code and upload recording to AWS S3 bucket
<!-- https://medium.com/@bryanjenningz/how-to-record-and-play-audio-in-javascript-faa1b2b3e49b -->
<!-- https://docs.aws.amazon.com/en_us/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html -->
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.585.0.min.js"></script>
<script>
function uploadAWS(blob) {
var vaultBucketName = "[YOUR-BUCKET-NAME]";
var bucketRegion = "[YOUR-AWS-REGION]";
var IdentityPoolId = "[YOUR-IDENTITY-POOL-ID]";