start new:
tmux
start new with session name:
tmux new -s myname
import pyximport | |
import numpy as np | |
pyximport.install(setup_args={'include_dirs': np.get_include()}) |
public class PageBase : LayoutAwarePage | |
{ | |
protected override void OnNavigatedTo(Windows.UI.Xaml.Navigation.NavigationEventArgs e) | |
{ | |
base.OnNavigatedTo(e); | |
object obj = null; | |
Debug.Assert(e.Parameter == null || e.Parameter is String, "Expected string as parameter"); | |
if (e.Parameter != null) obj = SerializationHelper.DataContractDeserialize<object>((string) e.Parameter); | |
OnNavigatedToSmart(e, obj); | |
} |
"""Information Retrieval metrics | |
Useful Resources: | |
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
http://www.nii.ac.jp/TechReports/05-014E.pdf | |
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
""" | |
import numpy as np |
Why have a sample rate as a floating point number? | |
Many audio API's, such as the VST and CoreAudio SDK's, represent the sampling | |
rate of the audio hardware as a floating point number. This may seem rather | |
silly at first, given that it's impossible to have a sample rate of 44100.5. | |
Thus it would seem that an unsigned integer (ie, uint32_t), would be an ideal | |
container for sample rate. | |
However, there is a reason that many audio API's use float (or better yet, | |
double) for sample rate. The reason is because that most DSP algorithms rely on |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
import scala.slick.lifted.MappedTypeMapper | |
import scala.slick.lifted.ColumnBase | |
import scala.slick.session.Session | |
import models._ | |
import alltables._ | |
//so that we dont depend on specific driver | |
import scala.slick.driver.BasicDriver.simple._ | |
import scala.slick.lifted.Projection | |
//generic CRUD that can operate on any table with id column |
#!/bin/bash | |
# generate new personal ed25519 ssh key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
eval "$(ssh-agent -s)" |
#!/usr/bin/env python | |
""" | |
Script to control the fan speed of an NVidia gpu using a custom fan speed/temperature curve. | |
Copyright (C) 2012 Luke Frisken | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |