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 bs4 | |
html_text_file = "miniarb_research_20180713.html" | |
f = open(html_text_file, 'r') | |
html_text = f.read() | |
f.close() | |
soup = bs4.BeautifulSoup(html_text) |
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
# -*- coding: utf-8 -*- | |
import zlib | |
import base64 | |
file_path = 'c:/python' | |
filename = 'encoded_text.text' | |
filename_write = 'write_in.py' | |
with open(file_path + '/' + filename, 'r') as f: |
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
test_text |
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
# -*- coding: utf-8 -*- | |
import json | |
filename = 'pgist.py' | |
# 1. make content | |
with open(filename, 'r') as f: | |
line_lst = f.readlines() |
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
Demo |
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
#include <boost/python.hpp> | |
#include <boost/python/stl_iterator.hpp> | |
#include <vector> | |
#include <unordered_map> | |
namespace lymc { | |
namespace python = boost::python; |
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
SrcSuf = cxx | |
ObjSuf = o | |
OutPutOpt = -o | |
SoSuf = so | |
#======================================= | |
R_HOME := $(shell R RHOME) | |
RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflgs) | |
RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags) | |
RBLAS := $(shell $(R_HOME)/bin/R CMD config BLAS_LIBS) |
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 numpy as np | |
import time | |
m1 = np.mat(np.random.rand(2800, 2800)) | |
m2 = np.mat(np.random.rand(2800, 2800)) | |
t = time.time(); m3 = m1 * m2; print time.time() - t |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue May 26 11:07:33 2015 | |
@author: assa | |
""" | |
import pandas as pd | |
import sqlite3 as lite |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Apr 30 12:44:08 2015 | |
@author: assa | |
""" | |
import numpy as np | |
import pandas as pd |
NewerOlder