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
http://stackoverflow.com/questions/16054472/sqlalchemy-about-self-referential-relation-error-no-attribute-sa-instance-s | |
## ------------------------------------------------------------------- | |
## generated by doing something like: "kws=DBSession.query(KW).all()" | |
## ------------------------------------------------------------------- | |
[sqlalchemy.engine.base.Engine][Dummy-2] SELECT kw_table.id AS kw_table_id, kw_table.name AS kw_table_name | |
FROM kw_table | |
[sqlalchemy.engine.base.Engine][Dummy-2] () |
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/env python | |
#encoding: utf-8 | |
import cPickle | |
import urllib | |
from bs4 import BeautifulSoup,NavigableString | |
import re | |
import math | |
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/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 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 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 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 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 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 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 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); |
OlderNewer