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
// doesn't work. | |
//in html: | |
// <parallel-coordinates id-d3="aaa" name-d3="parallelCoordinatesData"></parallel-coordinates> | |
//---------- | |
getRNIAapp.directive('parallelCoordinates',function(rniaWrapper){ | |
var parallelCoordinatesObject={ |
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
getRNIAapp.controller('nvd3TogoCtrlPC',function(rniaWrapper){ | |
var chart; | |
nv.addGraph(function() { | |
chart = nv.models.parallelCoordinates() | |
.width(nv.utils.windowSize().width*0.6) | |
// .height(nv.utils.windowSize().height) | |
// .dimensions(['nausea','temperature','headache','flu']); | |
.dimensions(rniaWrapper.get('graphPCDataWrapper').dimensions); |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
#__author__ = 'actor2019' | |
import xmltodict | |
import cPickle | |
import simplejson as json | |
# load sample100 from JMdict_e_typeDict | |
# entries= cPickle.load(open('JMdict_e_sample100_cPickle.data','rb')) |
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
<div id="example-progressive"> | |
<svg></svg> | |
</div> | |
<script type="text/javascript"> | |
// linear color scale | |
// interact with this variable from a javascript console | |
var pc_progressive; | |
// load csv file and create the chart | |
d3.csv('static/data/nutrients.csv', function(data) { |
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
getRNIAapp.directive('formupload',function(){ | |
return { | |
restrict:'A', | |
scope:{ | |
done:'&', | |
rnia:'=' | |
}, | |
link: function (scope,element,attrs){ | |
var optionsObj={ |
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
//html | |
// <div ng-controller="FileUploadCtrl"> | |
// <p class="lead">CSV and *.pl is feasible.</p> | |
// <form action="/upload" file-upload> | |
// <a id="btnUploadCSV" class="btn btn-success" ng-click="triggerUpload()">Upload CSV</a> |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
import urllib | |
from bs4 import BeautifulSoup as bs | |
import cPickle | |
import re | |
from bs4 import NavigableString | |
def getArticle(str_id): |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
import urllib | |
from bs4 import BeautifulSoup as bs | |
import cPickle | |
def getDay(url): | |
""" |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
#__author__ = 'actor2019' | |
import urllib | |
from bs4 import BeautifulSoup as bs | |
import cPickle | |
import sys | |
sys.setrecursionlimit(99999) |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
import cPickle | |
import urllib | |
from bs4 import BeautifulSoup,NavigableString | |
import re | |
import math | |