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
| # OT solution classes | |
| class OTResults(): # class for exact ot and small pre-computed problems | |
| def __init__(self,duals,loss,loss_linear,primal=None,log=None): | |
| self.duals=duals # dual solutions | |
| self.primal=primal # primal solution | |
| self.log=log# log stuff from the solver | |
| self.loss=loss# total loss (with entropy if reg) |
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
| #!/bin/bash | |
| tfile=$(mktemp /tmp/nbview_XXXXXXXXXXX) | |
| jupyter-nbconvert --to html --output "$tfile.html" "$1" | |
| xdg-open "$tfile.html" |
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
| from bs4 import BeautifulSoup | |
| import urllib | |
| def parse_scholar_page(url,paper_list=False): | |
| response = urllib.request.urlopen(url) | |
| webContent = response.read() |
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 [Xk] = dft(xn,N) | |
| % Computes Discrete Fourier Transform | |
| % ----------------------------------- | |
| % [Xk] = dft(xn,N) | |
| % Xk = DFT coeff. array over 0 <= k <= N-1 |