We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
cadd | |
9.66 | |
21.4 | |
2.411 | |
4.71 | |
3.031 | |
8.46 | |
17.16 | |
0.461 | |
0.046 |
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
# (c) Kari Lavikka | |
######### Stochastic gradient descent "library" ########## | |
gradient_descent <- function(x, y, | |
validation_x, validation_y, | |
loss_function, gradient_function, | |
step_function, | |
lambda, M, | |
normalize = FALSE) { |
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
# | |
# (c) Kari Lavikka 2018 | |
# | |
library(stats) | |
source("mnist.R") | |
mnist <- load_mnist() |
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 re | |
import pathlib | |
from collections import defaultdict | |
from math import log, exp | |
def read_table(filename): | |
pattern = re.compile("^\s+(\d+)\s+([^\s]+)$") | |
table = {} |
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
from flask import Flask, g, render_template | |
import sqlite3 | |
import html | |
app = Flask(__name__) | |
def get_db(): | |
"""Opens a new database connection if there is none yet for the | |
current application context. | |
""" |
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
# SNAKES GAME | |
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting | |
import curses | |
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
from random import randint | |
curses.initscr() | |
win = curses.newwin(20, 60, 0, 0) |
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
package fi.bdb.cms.utils; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.annotation.PostConstruct; | |
import javax.annotation.PreDestroy; |
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
<macrodef name="git-status"> | |
<attribute name="dir" default=""/> | |
<sequential> | |
<echo>Check that we have a clean working tree...</echo> | |
<exec executable="sh" dir="@{dir}" resultproperty="gitStatusResult"> | |
<arg value="-c"/> | |
<arg value="git status --porcelain | grep -E '.[^\?] '"/> | |
</exec> | |
<fail> | |
<condition> |
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
@Retention(RetentionPolicy.RUNTIME) | |
public @interface CommandDescriptor { | |
Class [] supportedChannels(); | |
boolean moderatorRequired(); | |
String [] commands(); | |
} | |
////////////////////////////////////////// | |
public class StandardCommands { |
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 javax.faces.bean.SessionScoped; | |
import javax.faces.view.ViewScoped; | |
import javax.inject.Named; | |
import java.io.Serializable; | |
/** | |
* @author Kari | |
*/ | |
@Named | |
@ViewScoped |
NewerOlder