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
class SliderSample { | |
SliderMenu sliderMenu; | |
final List<String> menuItems; | |
SliderSample() : menuItems = const["Apple", "Banana", "Cherry", "Durian"] {} | |
void ready() { | |
document.query("#status").innerHTML = "Slider Menu Sample App"; | |
sliderMenu = new SliderMenu(menuItems, (selectedText) { |
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 hashash; | |
public class IntIntLinearProbing { | |
private final int INITIAL_SIZE = 8; | |
private final double DEFAULT_LOAD_FACTOR = .7; | |
private int modulo = INITIAL_SIZE - 1; | |
int[] keys; | |
int[] values; |
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
/** modified - shortened Jenkins 32 */ | |
int _hash(List<int> key, int seed) { | |
int h1 = seed; | |
for (int i in key) { | |
h1 += i; | |
h1 += (h1 << 10); | |
h1 ^= (h1 >> 6); | |
} | |
return h1 & 0x7fffffff; |
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/perl | |
#Author: Haşim Sak @ Department of Computer Engineering - Boğaziçi University. | |
#Email: hasim.sak@gmail.com | |
#Version: 1.0 | |
#Date: August 17, 2007 | |
#Description: This program implements an averaged perceptron based morphological disambiguation system for Turkish text. | |
# You can find the most up to date version at http://www.cmpe.boun.edu.tr/~hasim. | |
# For more information, you can see readme.txt and read the following paper. | |
# Haşim Sak, Tunga Güngör, and Murat Saraçlar. Morphological disambiguation of Turkish text with perceptron algorithm. | |
# In CICLing 2007, volume LNCS 4394, pages 107-118, 2007. |
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 'dart:math'; | |
import 'dart:scalarlist'; | |
main() { | |
print("Generating 10 40-length vector"); | |
List<List<double>> dataSmall = getData(10,40); | |
perfGaussian(dataSmall); | |
perfSimdGaussian(dataSmall); | |
print("Generating 100000 40-length vector"); | |
List<List<double>> dataLarge = getData(100000,40); |
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
main() { | |
print("Merhaba Dünya"); | |
} | |
import 'dart:html'; | |
void main() { | |
query("#ornek_yazi_id").text = "Merhaba Dünya"; | |
} |
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 'dart:math'; | |
import 'dart:typeddata'; | |
main() { | |
print("Generating 10 40-length vector"); | |
GaussData g = new GaussData.random(4); | |
InputData dataSmall = new InputData.random(4,4); | |
perfList(g, dataSmall); | |
perfTyped(g, dataSmall); | |
perfSIMD(g, dataSmall); |
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
library gmm; | |
import 'dart:math'; | |
class DiagonalGaussian { | |
List<double> means; | |
List<double> variances; | |
List<double> negativeHalfPrecisions; | |
double logPrecomputedDistance; |
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 'dart:math'; | |
import 'dart:typeddata'; | |
main() { | |
print("Generating 4 4-length vector"); | |
GaussData g = new GaussData.random(4); | |
InputData dataSmall = new InputData.random(4,4); | |
perfList(g, dataSmall); | |
perfTyped(g, dataSmall); | |
perfSIMD(g, dataSmall); |
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.Arrays; | |
public class PositiveIntMap { | |
static final int INITIAL_SIZE = 8; | |
static final double DEFAULT_LOAD_FACTOR = 0.5; | |
// This is the size-1 of the key and value array length. Array length is a value power of two | |
private int modulo = INITIAL_SIZE - 1; |
OlderNewer