themains / domain_knowledge Goto Github PK
View Code? Open in Web Editor NEWDomain Knowledge: Learning with pydomains
Domain Knowledge: Learning with pydomains
I keep having type error when using phishtank, shallalist, toulouse. Here are the errors below.
`
df_toulouse = pred_toulouse(df, domain_names = 'resolved_domain')
Downloading Toulouse model data from the server (toulouse_cat_lstm_others_2017.h5)...
98%|█████████▊| 1600.0/1631.5 [00:00<00:00, 12499.23KB/s]
Downloading Toulouse vocab data from the server (toulouse_cat_vocab_others_2017.csv)...
96%|█████████▌| 64.0/66.625 [00:00<00:00, 8090.28KB/s]
Downloading Toulouse names data from the server (toulouse_cat_names_others_2017.csv)...
100%|█████████▉| 64.0/64.080078125 [00:00<?, ?KB/s]
Loading Toulouse model, vocab and names data file...
Traceback (most recent call last):
File "", line 1, in
df_toulouse = pred_toulouse(df, domain_names = 'resolved_domain')
File "C:\Users\Simon\anaconda3\lib\site-packages\pydomains\pred_toulouse.py", line 100, in pred_toulouse
df[col_domain] = df[domain_names].apply(lambda c: url2domain(c, exclude_subdomains=['www']))
File "C:\Users\Simon\anaconda3\lib\site-packages\pandas\core\series.py", line 4356, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "C:\Users\Simon\anaconda3\lib\site-packages\pandas\core\apply.py", line 1036, in apply
return self.apply_standard()
File "C:\Users\Simon\anaconda3\lib\site-packages\pandas\core\apply.py", line 1092, in apply_standard
mapped = lib.map_infer(
File "pandas_libs\lib.pyx", line 2859, in pandas._libs.lib.map_infer
File "C:\Users\Simon\anaconda3\lib\site-packages\pydomains\pred_toulouse.py", line 100, in
df[col_domain] = df[domain_names].apply(lambda c: url2domain(c, exclude_subdomains=['www']))
File "C:\Users\Simon\anaconda3\lib\site-packages\pydomains\utils.py", line 66, in url2domain
tld = tldextract.extract(url)
File "C:\Users\Simon\anaconda3\lib\site-packages\tldextract\tldextract.py", line 296, in extract
return TLD_EXTRACTOR(url, include_psl_private_domains=include_psl_private_domains)
File "C:\Users\Simon\anaconda3\lib\site-packages\tldextract\tldextract.py", line 216, in call
SCHEME_RE.sub("", url)
TypeError: expected string or bytes-like object
`
Is there any difference in function between domz_cat and the other three?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.