Skip to content

Instantly share code, notes, and snippets.

View synthetic-intelligence's full-sized avatar

synthetic-intelligence

View GitHub Profile
@synthetic-intelligence
synthetic-intelligence / Ubuntu 18.04 setup.md
Created April 23, 2021 17:50 — forked from labbots/Ubuntu 18.04 setup.md
Ubuntu 18.04 Manual partitioning setup with LUKS encryption and LVM - https://labbots.com/ubuntu-18-04-installation-with-luks-and-lvm

Ubuntu 18.04 installation with LUKS and LVM

Installation Process

Pre-installation from live OS

This setup of Ubuntu with LUKS and LVM is tested on Ubuntu 18.04.

Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/nvme0n1.

  1. Partition the drive with your tool of choice: I used gparted to set mine up.
@synthetic-intelligence
synthetic-intelligence / sudoers
Created January 31, 2021 00:15 — forked from alitoufighi/sudoers
Default /etc/sudoers file (Checked on on Ubuntu 18.04 and Ubuntu 20.04)
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
@synthetic-intelligence
synthetic-intelligence / bottle_hello.py
Created January 27, 2021 09:37 — forked from drgarcia1986/bottle_hello.py
Python HelloWorld (WebFrameworks) Collection
# -*- coding: utf-8 -*-
from bottle import route, run
@route('/')
def index():
return '<h1>Hello World/h1>'
run(host='localhost', port=8000)
@synthetic-intelligence
synthetic-intelligence / pyargs.md
Created January 27, 2021 09:35 — forked from dideler/pyargs.md
Parsing Command-Line Argument in Python

Command-line arguments in Python show up in sys.argv as a list of strings (so you'll need to import the sys module).

For example, if you want to print all passed command-line arguments:

import sys
print(sys.argv)  # Note the first argument is always the script filename.

Command-line options are sometimes passed by position (e.g. myprogram foo bar) and sometimes by using a "-name value" pair (e.g. myprogram -a foo -b bar).

Inspired by this article. Neat tricks for speeding up integer computations.

Note: cin.sync_with_stdio(false); disables synchronous IO and gives you a performance boost. If used, you should only use cin for reading input (don't use both cin and scanf when sync is disabled, for example) or you will get unexpected results.

Multiply by a power of 2

x = x << 1; // x = x * 2

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@synthetic-intelligence
synthetic-intelligence / iterm2-solarized.md
Created January 27, 2021 09:34 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@synthetic-intelligence
synthetic-intelligence / msi-gtx1060-ubuntu-18.04-deeplearning.md
Created January 8, 2021 12:08 — forked from hereismari/msi-gtx1060-ubuntu-18.04-deeplearning.md
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
@synthetic-intelligence
synthetic-intelligence / Matrix.md
Created January 8, 2021 12:08 — forked from nadavrot/Matrix.md
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@synthetic-intelligence
synthetic-intelligence / sampleREADME.md
Created January 8, 2021 12:08 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here