Skip to content

Instantly share code, notes, and snippets.

View Quiri's full-sized avatar

Kirill Pomogajko Quiri

View GitHub Profile
@Quiri
Quiri / server.R
Created August 11, 2014 07:33 — forked from withr/server.R
library(shiny)
library(datasets)
Logged = FALSE;
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad")
# Define server logic required to summarize and view the selected dataset
shinyServer(function(input, output) {
source("www/Login.R", local = TRUE)
observe({
if (USER$Logged == TRUE) {
@Quiri
Quiri / server.R
Created September 9, 2014 10:05
Shiny disable checkbox minimal example
library(shiny)
shinyServer(function(input, output, session) {
observe({
if(input$tv == "All, but C") {
updateCheckboxGroupInput(session, "check2", label = NULL, choices = NULL,
selected = c("A", "B", "D", "E"))
}
if(input$tv == "Only C or D") {
@Quiri
Quiri / insertDB.R
Last active August 29, 2015 14:23
Wrapper to insert data in PostgreSQL
#' Wrapper to insert to a PostgreSQL table
#' @description
#' This function checks the scheme on Postgres and adopts the data.frame to the scheme, then inserts it.
#' If there is no table with the provided name, it will generate one. Adds inserted column to data.frame with a specified time stamp.
#' @param logs DATA:FRAME The data to insert to db
#' @param conn POSTGRES CONNECTION OBJECT A valid connection to the DB
#' @param table STRING The name of the table to insert
#' @param inserted_at TIMESTAMP default is current time
#' @keywords postgresql, db
#' @export
@Quiri
Quiri / UFO sightings January 2021.csv
Created January 25, 2021 11:49
UFO sightings January 2021
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 7 columns, instead of 6 in line 6.
Date / Time,City,State,Shape,Duration,Summary,Posted
1/19/21 09:25,Cantonment,FL,Teardrop,40 seconds,"At 9:25am, I was backing out of driveway, I looked up to my left, and at about 1-2 miles in the air at 10:00 (time Angle), I saw a tear",1/19/21
1/19/21 00:00,Issaquah/Hobart,WA,Other,20 minutes,Last night around midnight I saw 3 or 4 ribbons of light in the sky above Issaquah South of Issaquah. The lights seemed to be long in s,1/19/21
1/18/21 23:15,Glendale,AZ,Disk,30-60 seconds,"On 1/18/21 at approx 23:15 hours in Glendale, AZ, I was driving home from work when I noticed a large object hovering in front of me to",1/19/21
1/18/21 23:00,Magee,MS,Changing,10 minutes,Orange Glowing Half Oval Shaped UFO,1/19/21
1/18/21 20:25,Oxford Junction,IA,Cigar,7 minutes,"I noticed a strange light out the window of my house to see, two very bright lights. I checked the flightradar24 live website Immediat",1/19/21
1/18/21 20:05,Saint Johns,FL,Light,5 seconds,Strobing white lighted object moving fast with no sound at an est
@Quiri
Quiri / mathe.R
Last active February 3, 2021 14:15
Mathe bis 20 üben
## Den ganzen Code bei R ausfüllen
## Optional das Feedback personalisieren
## Eingabe von x beendet das Programm
gut <- c("Toll!", "Super!", "Nice!", "Умница!", "Mathegenie!")
nein <- c("Leider falsch", "Versuch's nochmal", "Du hast es gleich!")
x <- "q"
while(TRUE){
if(x == "x") {
break()