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
library(shiny) | |
disableActionButton <- function(id,session) { | |
session$sendCustomMessage(type="jsCode", | |
list(code= paste("$('#",id,"').prop('disabled',true)" | |
,sep=""))) | |
} | |
shinyServer(function(input, output,session) { | |
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(c("devtools","svSockets")) # if not already installed | |
#devtools::install_github("gosocket","analytixware") # if not already installed | |
#devtools::install_github("shinysky","analytixware") # if not already installed | |
library(shiny) | |
library(shinysky) | |
library(gosocket) | |
# Define server logic required to generate and plot a random distribution | |
shinyServer(function(input, output,session) { |
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 run this firstly set up the MinIO server | |
# on Windows download this https://dl.min.io/server/minio/release/windows-amd64/minio.exe | |
# download("https://dl.min.io/server/minio/release/windows-amd64/minio.exe") | |
# to run minio make sure the executable is in the PATH | |
# then run | |
# ;minio.exe server /path/to/minio/data | |
# e.g. minio.exe server c:/minio-data/ | |
using Minio, Parquet, Parquet2, DataFrames, AWSS3 |
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
library(shiny) | |
shinyServer(function(input, output, session) { | |
# Partial example | |
output$meh <- renderPrint({ | |
print("Meh --- ") | |
print(input$myTextInput ) | |
print(input$passInput ) | |
}) |
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
apt-get update && apt-get upgrade -y | |
apt-get install wget -y | |
apt-get install proot -y | |
apt-get install git -y | |
cd ~ | |
git clone https://github.com/MFDGaming/ubuntu-in-termux.git | |
cd ubuntu-in-termux | |
chmod +x ubuntu.sh | |
./ubuntu.sh | |
cp ~/ubuntu-in-termux/resolv.conf ~/ubuntu-in-termux/ubuntu-fs/etc/ |
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
library(shiny) | |
# Define server logic for random distribution application | |
shinyServer(function(input, output) { | |
# Reactive expression to generate the requested distribution. This is | |
# called whenever the inputs change. The renderers defined | |
# below then all use the value computed from this expression | |
data <- reactive({ | |
dist <- switch(input$dist, |
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
using Gumbo, Cascadia, HTTP | |
using Serialization | |
urls= ["https://www.shicimingju.com/shicimark/tangshisanbaishou.html"] | |
urls = vcat(urls, ["https://www.shicimingju.com/shicimark/tangshisanbaishou_$(i)_0__0.html" for i in 2:16]) | |
function get_chars(poem::Vector{<:AbstractString})::Set{Char} | |
mapreduce(Set, union, poem) | |
end |
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
using Revise | |
includet("utils.jl") | |
function remove_player!(team) | |
if length(team) == 1 | |
team.players = [] | |
else | |
team.players = team.players[2:end] | |
end | |
team |
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
struct Player | |
name::String | |
rating::Int | |
end | |
struct Match | |
best_of::Int | |
end |
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
x = rand(1:1_000_000, 1_000_000_000) | |
using SortingLab | |
fsort!(x) | |
function unroll_loop(x) | |
count = 0 | |
@inbounds count += x[1] != x[2] | |
@inbounds count += x[2] != x[3] |
NewerOlder