This file contains hidden or 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
%% read YAML and put into matlab struct | |
%% http://code.google.com/p/snakeyaml/ | |
import('org.yaml.snakeyaml.Yaml'); | |
yamlreader = Yaml(); | |
yml = fileread(yml_filepath); | |
jymlobj = yamlreader.load(yml); | |
num_question = jymlobj.size; |
This file contains hidden or 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 org.devboy.hxTask; | |
import neko.Lib; | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.Type; | |
class ComponentMacro | |
{ | |
private static var idCount = 0; |
This file contains hidden or 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
''' | |
testing celery progress reporting/polling | |
* start server | |
python tempserver.py | |
* start worker | |
celery -A tempserver worker -c 1 --loglevel=DEBUG |
This file contains hidden or 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/converted from http://blog.invatechs.com/round_progress_bar_with_html5_css3_and_javascript --> | |
<style> | |
.loader | |
{ | |
position: relative; | |
width: 20px; | |
height: 20px; | |
float:left; | |
user-select: none; | |
box-sizing: border-box; |
This file contains hidden or 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
(ns ringtone.core | |
(:use [overtone.live] | |
[overtone.inst.piano])) | |
(def state | |
(atom {:measure-number 0 | |
:is-running true})) | |
(let [ | |
;; milliseconds for each tick | |
increment 100 |
This file contains hidden or 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
(defn collect-into-consecutive | |
"collect indexes into sets of N consecutive indexes, | |
discarding all other indexes. | |
N defaults to 6 (for guitar tabs)" | |
([index-list] | |
(collect-into-consecutive index-list 6)) | |
([index-list required-length] |
This file contains hidden or 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
''' | |
> head nodes.dmp | |
1 | 1 | no rank | | 8 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | | |
2 | 131567 | superkingdom | | 0 | 0 | 11 | 0 | 0 | 0 | 0 | 0 | | | |
6 | 335928 | genus | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | | | |
7 | 6 | species | AC | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | | | |
9 | 32199 | species | BA | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | | | |
10 | 135621 | genus | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | | | |
11 | 1707 | species | CG | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | | | |
13 | 203488 | genus | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | | |
This file contains hidden or 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
function traverse(node_id, iter) | |
if nargin < 2 | |
iter = 0; | |
end | |
% > head names.dmp | |
% 1 | all | | synonym | | |
% 1 | root | | scientific name | | |
% 2 | Bacteria | Bacteria <prokaryote> | scientific name | |
This file contains hidden or 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
date >> OUT.txt | |
$files = Get-ChildItem "C:\Users\Public\Memrise\*.txt" | |
for ($i=0; $i -lt $files.Count; $i++) { | |
Add-Content -Value "==================" -Path OUT.txt | |
Add-Content -Value $files[$i].FullName -Path OUT.txt | |
Add-Content -Value "CREATION" -Path OUT.txt | |
Add-Content -Value $files[$i].CreationTime -Path OUT.txt | |
Add-Content -Value "LASTACCESS" -Path OUT.txt |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# ref http://pythonhosted.org//watchdog/quickstart.html#a-simple-example | |
''' | |
watchdog skeleton | |
''' | |
import sys | |
import time | |
import datetime |
OlderNewer