In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
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
2020-02-26: prostě; existovat; Německo; policista; onen; host; víno; smysl; součást; plocha; dva; jenž; on; proces; zákon; akce; den; už; především; minulost; dokonce; poslední; obsah; daný; -li; aspoň; věnovat; docházet; zajistit; využívat; tak; brát; nad; vedoucí; položit; ruka; kdo; příští; průběh; potvrdit; vytvořit; například; ale; muzeum; majetek; jak; doma; založit; osoba; konečně | |
2020-02-27: rok; prst; strom; dále; teprve; získat; pán; štěstí; vlastní; odejít; zboží; zůstávat; včetně; něco; hodnota; řeč; slunce; ještě; malý; svůj; obraz; zeď; kvůli; tělo; výše; zda; zelený; určitě; schopnost; pozdě; obsahovat; pohyb; zbraň; auto; spíše; kus; samozřejmě; prosit; zaměstnanec; městský; raději; mezinárodní; střední; týden; zajímat; obchod; znamenat; látka; situace; jenže | |
2020-02-28: role; vidět; obyvatel; téma; období; sám; údaj; ekonomický; Karel; soukromý; ukázat; muž; zahrada; obrázek; Josef; hledat; pokračovat; část; používat; slovo; procento; metoda; čas; domů; přidat; držet; blízko; teď; práce; za |
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 alpine:3.8 as build | |
ENV CXXFLAGS -std=c++98 | |
RUN apk add --no-cache \ | |
gcc g++ musl-dev make libc6-compat cmake \ | |
unixodbc-dev zlib-dev openssl-dev ncurses-dev bison \ | |
wget | |
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
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
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 collections import namedtuple | |
from yargy import ( | |
rule, | |
and_, or_, not_, | |
Parser | |
) | |
from yargy.interpretation import fact | |
from yargy.predicates import ( | |
eq, gram |
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
# Counting lines of code in a project | |
# Usage: python3 count_lines.py /path/to/project/src .cpp .h .py | |
# (if no extensions are specified, will count across all files) | |
import os | |
from collections import defaultdict | |
line_filters = {} | |
for ext in ('java', 'cpp', 'cc', 'cxx', 'c', 'h', 'hpp'): | |
line_filters[ext] = lambda line: line.strip().endswith(b';') |
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 PyPDF2 import PdfFileReader | |
from pprint import pprint | |
def walk(obj, fnt, emb): | |
''' | |
If there is a key called 'BaseFont', that is a font that is used in the document. | |
If there is a key called 'FontName' and another key in the same dictionary object | |
that is called 'FontFilex' (where x is null, 2, or 3), then that fontname is | |
embedded. | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 jsonschema import Draft4Validator | |
from jsonschema.exceptions import ValidationError | |
myschema = { | |
'type': 'object', | |
'properties': { | |
'required_property': { | |
'type': 'string', | |
}, | |
'optional_property': { |
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 | |
from copy import deepcopy | |
import re | |
from hamcrest.core.base_matcher import BaseMatcher | |
from hamcrest import assert_that | |
from webob import Response | |
# Это хранится в конфиге: | |
error_skeleton = { |
NewerOlder