Skip to content

Instantly share code, notes, and snippets.

View RobinRojowiec's full-sized avatar
Coffee, Code and NLP

Robin RobinRojowiec

Coffee, Code and NLP
View GitHub Profile
@RobinRojowiec
RobinRojowiec / Install.md
Created January 6, 2022 08:35 — forked from peci1/Install.md
Install Ubuntu 18.04 on Lenovo T14s AMD with Ryzen 7 PRO 4750U CPU and AMD Renoir GPU

Ubuntu 18.04 on Lenovo T14s

What's the problem?

The Ryzen CPU and Renoir GPU are too new for all kernels supported by Ubuntu 18.04 (5.4 is the latest supported). The notebook will boot with 18.04.5, but a lot of things will not work (sleep, screen brightess, audio, graphics only works in a limited way etc.).

This tutorial shows the steps necessary to be done to successfully run the system with full support for the GPU and other peripherals.

Steps

def parse_category(self, url, depth):
"""
Collects the links from a category and downloads/parses them
:param url:
:param depth:
:return:
"""
page_content = self.download_page(url)
if page_content is None:
return []
import json
class WikipediaPage:
def __init__(self, url):
"""
a wrapper for wikipedia page content
"""
self.url = url
self.title = []
conda create -n nlp_default python=3.6
conda activate nlp_default
pip install -r requirements.txt
/* Load the packages for hashing and HTTP requests (must be installed with npm before) */
var crypto = require("crypto");
var request = require("request");
/* Generate a md5-hash of a email address and return its hexadecimal value */
var hash = crypto.createHash('md5').update("[email protected]").digest("hex");
/* Sends a GET request for the user profile */
request("https://www.gravatar.com/"+hash+".xml",function(err,response,body){
if (!err){
<script type="text/javascript">
function changeTitle( profile ) {
document.title = profile.entry[0].displayName;
}
<script src="https://www.gravatar.com/205e460b479e2e5b48aec07710c08d50.json?callback=changeTitle" type="text/javascript">
</script>
<script type="text/javascript" src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
<script
src="https://code.jquery.com/jquery-2.2.3.min.js"
integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo="
crossorigin="anonymous"></script>
Gravatar Demo
<br>
<input type="text">
<response>
<entry>
<id>100894404</id>
<hash>205e460b479e2e5b48aec07710c08d50</hash><requestHash>205e460b479e2e5b48aec07710c08d50</requestHash>
<profileUrl>http://gravatar.com/beautesting1blog</profileUrl><preferredUsername>beautesting1blog</preferredUsername>
<thumbnailUrl>https://secure.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50</thumbnailUrl><photos>
<value>https://secure.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50</value><type>thumbnail</type>
</photos><name>
</name><displayName>beautesting1blog</displayName>
</entry>