Skip to content

Instantly share code, notes, and snippets.

age sex cp trestbps chol fbs restecg thalach exang oldpeak slope ca thal target
63 1 3 145 233 1 0 150 0 2.3 0 0 1 1
37 1 2 130 250 0 1 187 0 3.5 0 0 2 1
41 0 1 130 204 0 0 172 0 1.4 2 0 2 1
56 1 1 120 236 0 1 178 0 0.8 2 0 2 1
57 0 0 120 354 0 1 163 1 0.6 2 0 2 1
57 1 0 140 192 0 1 148 0 0.4 1 0 1 1
56 0 1 140 294 0 0 153 0 1.3 1 0 2 1
44 1 1 120 263 0 1 173 0 0 2 0 3 1
52 1 2 172 199 1 1 162 0 0.5 2 0 3 1
@phuongdh
phuongdh / diabetes.csv
Created January 19, 2020 16:08
Diabetes
Pregnancies Glucose BloodPressure SkinThickness Insulin BMI DiabetesPedigreeFunction Age Outcome
6 148 72 35 0 33.6 0.627 50 1
1 85 66 29 0 26.6 0.351 31 0
8 183 64 0 0 23.3 0.672 32 1
1 89 66 23 94 28.1 0.167 21 0
0 137 40 35 168 43.1 2.288 33 1
5 116 74 0 0 25.6 0.201 30 0
3 78 50 32 88 31 0.248 26 1
10 115 0 0 0 35.3 0.134 29 0
2 197 70 45 543 30.5 0.158 53 1
- Generate hyrax app: rails _5.1.6_ new vc19 -m https://raw.githubusercontent.com/samvera/hyrax/v2.5.0/template.rb
- Generate admin set: rake hyrax:default_admin_set:create hyrax:workflow:load
- Generate Work type: rails generate hyrax:work Video
- Add gems:
printf "\ngem 'hyrax-active_encode'" >> Gemfile
printf "\ngem 'aws-sdk'" >> Gemfile
- bundle install
- Run hyrax-active_encode generator: rails g hyrax:active_encode:install
@phuongdh
phuongdh / cv.yaml
Created September 6, 2018 03:38
Conda for CV
name: base
channels:
- conda-forge
- defaults
dependencies:
- backports=1.0=py_2
- backports.functools_lru_cache=1.5=py_1
- backports_abc=0.5=py_1
- blas=1.1=openblas
- bzip2=1.0.6=h470a237_2
@phuongdh
phuongdh / gist:6640407
Created September 20, 2013 16:46
Pawpaw upgrade script
cap deploy matterhorn HOSTS=pawpaw.dlib.indiana.edu production SCM_BRANCH=release/2.0.0
[8] pry(main)> mo = MediaObject.new
=> #<MediaObject pid:"", avalon_uploader:nil, avalon_publisher:nil, title:nil, alternative_title:[], translated_title:[], uniform_title:[], statement_of_responsibility:nil, creator:[], date_created:nil, date_issued:nil, copyright_date:nil, abstract:nil, note:[], format:nil, contributor:[], publisher:[], genre:[], subject:[], related_item:[], geographic_subject:[], temporal_subject:[], topical_subject:[], duration:nil, section_pid:[]>
[9] pry(main)> mo.DC.creator = "Adam"
=> "Adam"
[10] pry(main)> mo.DC.creator
=> ["Adam"]
mo = MediaObject.new
co = Collection.new
mo.collection = co
Hi,
Michael Klein will probably give you a more throughout answer when he gets back from vacation. But you can read up on this page: https://wiki.dlib.indiana.edu/pages/viewpage.action?pageId=513774863
Token is generated here: https://github.com/avalonmediasystem/avalon/blob/master/app/models/stream_token.rb
Basically the streaming server's app grabs the token from the streaming URL and asks Avalon's StreamAuth if this token is valid.
-Phuong
@phuongdh
phuongdh / avalon_pilot_auth
Created June 4, 2013 21:10
avalon_pilot.conf
#!/bin/bash
while read uri; do
saveIFS=$IFS
IFS='=&'
parm=($uri)
IFS=$saveIFS
raw=`curl -s "http://palm.dlib.indiana.edu/authorize.txt?token=${parm[1]}"`
resp="${raw//[[:space:]]/}"
valid=`echo ${parm[1]} | grep ^${resp}`
@phuongdh
phuongdh / gist:5592515
Created May 16, 2013 15:21
MediaElement evaluation
Pros:
+ Good JS code seperation of concerns
+ Clean plugin architecture
+ Good interface / CSS theming
+ Larger & active community
+ ~10 pull requests being merged per month
Cons:
- Naive Flash code
- Fullscreen Flash player's controls don't work well: slider not working, volume not adjustable (only on/off)