Skip to content

Instantly share code, notes, and snippets.

Donatas Daubaras DonatasD

Block or report user

Report or block DonatasD

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 Example.java
import java.util.Scanner;
public class Example {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.println("Enter a month: ");
int month = reader.nextInt();
System.out.println("Enter a day: ");
int day = reader.nextInt();
View Project
---
title: "temp"
author: "Donatas Daubaras"
date: "November 26, 2015"
output: pdf_document
---
```{r echo=FALSE,cache=TRUE, results="hide", messgae}
library(ElemStatLearn)
library(rjags)
View R function to plot bestsubset
plotSubset = function(regfit.summary) {
#Plot RSS
op = par(mfrow = c(2,2))
plot(regfit.summary$rss, xlab = "Number of variables", ylab="RSS", type="l")
#Plot adjusted RS^2 and mark its maximum
plot(regfit.summary$adjr2, xlab = "Number of variables", ylab="Adjusted RS^2", type="l")
max = which.max(regfit.summary$adjr2)
points(max, regfit.summary$adjr2[max], col="red", cex=2, pch=20)
View Python code fail to insert real value
import sqlite3
import random
conn = sqlite3.connect("originial.db")
c = conn.cursor()
conn.execute("CREATE TABLE Pressure(value REAL);")
for i in range(0,100000):
print round(random.uniform(10.0, 25.0),2)
conn.execute("INSERT INTO Pressure VALUES(?);", round(random.uniform(10.0, 25.0),2))
You can’t perform that action at this time.