Skip to content

Instantly share code, notes, and snippets.

Avatar
🇱🇹

Donatas Daubaras DonatasD

🇱🇹
View GitHub Profile
View gist:51f237a63edabc9debd75f8e32ad2cd6
{"version":"18d47f6f74b04520ae4ee6bcbd07cf1c","translations":{"lt":{"msg_btn_modal_close":"Uždaryti","msg_label_company_form_farm_code":"Ūkio kodas","msg_page_activity_title":"Veikla","msg_btn_search":"Ieškoti","msg_page_marketplace":"Prekyvietė","msg_page_forum":"Forumas","msg_page_my_orders":"Užsakymai","msg_label_return_back":"Grįžti","msg_company_calendar_action":"Kalendorius","msg_company_edit_action":"Redaguoti","msg_status_canceled_email":"Užsakymas buvo atšauktas!","msg_company_no_orders_sent":"Užsakymų nėra","msg_page_my_account":"Mano paskyra","msg_order_advert_company_in_confirm_services_received":"Tiekėjas","msg_page_my_adverts":"Mano skelbimai","msg_page_my_favourites":"Mėgstamiausi skelbimai","msg_page_go_to_new_ad":"Įkelti skelbimą","msg_page_user":"Mano nustatymai","msg_page_login":"Prisijungti","msg_page_register":"Registruotis","msg_search_bar_placeholder":"Įveskite paieškos žodį","msg_advert_create_advert_location_field_placeholder":"Vietovė","msg_advert_create_service_type":"Skelbimo tipas
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))