Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html lang="en" class="client-js"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Propensity</title> | |
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | |
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script> | |
</head> | |
<body> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
set transparency=1 | |
set background=dark | |
colorscheme base16-ocean | |
set guifont=Menlo:h14 |
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 itertools,sys | |
class WinterAndPresents: | |
def getNumber(self, apple, orange): | |
"""This is an O(N) solution to SRM 601 Div 1 Problem 250. | |
The derivation is as follows. | |
Let :math:`a_i` and :math:`o_i` be the number of apples and oranges in bag :math:`i`, respectively. | |
Let :math:`x_m` denote the largest possible value of :math:`x`. | |
Given any :math:`x`, the number of different presents :math:`n(x)` can be written as: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 java.util | |
import weka.core.{DenseInstance, Attribute, Instances} | |
import scala.collection.convert.wrapAll._ | |
// 1. set up attributes | |
val atts = { | |
// numeric | |
val att1 = new Attribute("att1") | |
// nominal | |
val att2 = new Attribute("att2", (1 to 5).map("val" + _)) |
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
#!/usr/bin/env scalas | |
!# | |
/*** | |
libraryDependencies ++= Seq( | |
"org.apache.commons" % "commons-lang3" % "3.1", | |
"com.github.scopt" %% "scopt" % "2.1.0" | |
) | |
resolvers += "sonatype-public" at "https://oss.sonatype.org/content/groups/public" |
NewerOlder