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.
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
#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 = { |
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': { |
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 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. | |
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 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
#!/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 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 | |
OlderNewer