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
import sys | |
class TerminalProgressBar: | |
def __init__(self,final_value,bar_length=50): | |
self.length = bar_length | |
self.final_value = final_value | |
def update(self,current_value): |
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
from os.path import dirname | |
from os.path import join | |
from os.path import exists | |
from os.path import expanduser | |
from os.path import isdir | |
from os import listdir | |
from os import makedirs | |
from sklearn.datasets.base import Bunch | |
from sklearn.utils import check_random_state |
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
var doc = xhreq.responseText; | |
var parser = new DOMParser(); | |
var link = parser.parseFromString(doc, 'text/xml'); | |
var items = link.documentElement.childNodes; | |
for (var index=0;index <items.length; index++) { | |
if(items[index].nodeName == 'link'){ | |
for(var attrIndex=0; attrIndex < items[index].attributes.length; attrIndex++) { | |
if(items[index].attributes[attrIndex].nodeName == 'rel'){ | |
//do something awesome | |
alert("found one link with rel attribute"); |
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
var doc = xhreq.responseText; | |
var parser = new DOMParser(); | |
var link = parser.parseFromString(doc, 'text/xml'); | |
var items = link.documentElement.childNodes; | |
for (var item in items) { | |
if(item.nodeName == 'link'){ | |
for(var attr in item.attributes.name) { | |
if(item.attr.name == 'rel'){ | |
//do something awesome | |
return; |