This file contains 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
# This is my implmentation of calculating Global Average Symmetric Price (GASP) as it's mentioned in this video: https://www.youtube.com/watch?v=wpmTuNvGQjQ | |
# Presenter in the video doesn't explain briefly how to calculate the GASP, but, I kinda figured it out myself | |
order_book = { | |
'bids': [ | |
[97, 0.1], | |
[96, 0.2], | |
[95, 6] | |
], |
This file contains 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
# This is a non-multiexchange version of GODMODE indicator | |
# If you want the multi exchange version of GODMODE indicator, you need to implement willy and csi calculations too | |
# Original source of god mode indicator: | |
# https://www.tradingview.com/script/oA3U7pok-GODMODE-OSCILLATOR-FRESH-BREAD-GENERATOR-FREE-TO-USE/ | |
import pandas as pd | |
import talib | |
channel_length = 9 | |
average_length = 26 |
This file contains 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.packages("googleway") | |
library(googleway) | |
key <- 'AIzaSyCOEzgiO1P6trrSmu9vy9ZVuQDkog6Lwiw' | |
df_places <- google_places(search_string = "Starbucks", | |
location = c(40.417287, -82.907123), | |
key = key) | |
df_places$results$formatted_address |
This file contains 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.packages("ggmap") | |
#install.packages("gridExtra") | |
library(gridExtra) | |
library(ggmap) | |
map1 <- get_map("Tashkent", zoom = 11, maptype = "satellite", source = "google") | |
map2 <- get_map("Tashkent", zoom = 11, maptype = "roadmap", source = "google") | |
map3 <- get_map("Tashkent", zoom = 11, maptype = "terrain", source = "google") | |
map4 <- get_map("Tashkent", zoom = 11, maptype = "hybrid", source = "google") |
This file contains 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.packages("ggplot2") | |
library(ggplot2) | |
names <- c("Toshkent Xalqa Avtomobil Yo'li, Tashkent, Uzbekistan", | |
"Istiklol Palace", | |
"Dinamo", | |
"Tashkent Higher All-Troops Command College", | |
"SARC Uzbekiston Temir Yullari", | |
"Amir Temur Square", | |
"MY HOME") |
This file contains 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.packages("animation") | |
# install.packages("jpeg") ## if necessary | |
library(animation) | |
library(jpeg) | |
ani.options(interval = 0.5) | |
for(i in 1:8){ | |
img <- paste("~/Documents/R/photo_", i, ".jpg", sep="") |
This file contains 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
public class UniqueIntRandom { | |
private ArrayList<Integer> numberStore; | |
public UniqueIntRandom(int startingNum, int endNum) { | |
numberStore = new ArrayList<>(); | |
initRandomNumbers(startingNum, endNum); | |
} | |
public UniqueIntRandom(int endNum) { |
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package javaapplication1; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; |
This file contains 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 android.content.Context; | |
import android.widget.Toast; | |
import com.drojj.javatests.R; | |
import com.google.firebase.FirebaseApiNotAvailableException; | |
import com.google.firebase.FirebaseException; | |
import com.google.firebase.FirebaseNetworkException; | |
import com.google.firebase.FirebaseTooManyRequestsException; | |
import com.google.firebase.auth.FirebaseAuthException; |
This file contains 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
public final class Mixer { | |
static void convertToStereo(short[] monoSamples, short[] stereoSamples) { | |
for (int i = 0, st = 0, len = monoSamples.length; i < len; ++i) { | |
stereoSamples[st++] = monoSamples[i]; | |
stereoSamples[st++] = monoSamples[i]; | |
} | |
} | |
static void convertToMono(short[] stereoSamples) { |
NewerOlder