Skip to content

Instantly share code, notes, and snippets.

View pwasiewi's full-sized avatar
😎
An usual day ;)

Piotr Wasiewicz pwasiewi

😎
An usual day ;)
View GitHub Profile

(Blog post: http://blog.devalias.net/post/92579952637/mdwiki-and-how-to-get-started)

MDwiki (and how to get started)

If you haven't already heard about it, MDwiki is a cool little CMS/Wiki that runs entirely clientside (HTML5/Javascript) and uses Markdown

Since it's all clientside, we can do really cool things like track our changes in git and then host it all on GitHub Pages. That means super simple forking, contributing and sharing. Yay for open source!

Setting up MDwiki with GitHub

#!/bin/bash
sudo sh -c "echo 'deb http://security.ubuntu.com/ubuntu utopic-security main' >> /etc/apt/sources.list"
sudo apt-get -y update
sudo apt-get -y install libncurses-dev
sudo apt-get -y install build-essential libncurses-dev
sudo apt-get -y install build-essential fakeroot kernel-package
sudo apt-get -y install linux-source
sudo apt-get -y install linux-image-3.16.0-28-generic
@pwasiewi
pwasiewi / ubuntu.sh
Created May 4, 2016 21:47 — forked from jarutis/ubuntu.sh
Theano and Keras setup on ubuntu with OpenCL on AMD card
## install Catalyst proprietary
sudo ntfsfix /dev/sda2
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK
sudo apt-get remove --purge fglrx*
sudo apt-get install linux-headers-generic
sudo apt-get install fglrx xvba-va-driver libva-glx1 libva-egl1 vainfo
sudo amdconfig --initial
## install build essentials
sudo apt-get install cmake
##
## Linear regression by gradient descent
##
## A learning exercise to help build intuition about gradient descent.
## J. Christopher Bare, 2012
##
# generate random data in which y is a noisy function of x
x <- runif(1000, -5, 5)
y <- x + rnorm(1000) + 3
@pwasiewi
pwasiewi / config
Created February 22, 2018 03:10 — forked from lod/config
Files to set up a LXC container for steam
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --keyserver 178.254.42.45 -d ubuntu -a i386 -r zesty
# Template script checksum (SHA-1): 2c972265e2bb65e2d265271d7545563fd80f96b5
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Subuids and subgids mapping

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@pwasiewi
pwasiewi / UbuntuSetup.md
Created September 8, 2018 10:56 — forked from Bengt/UbuntuSetup.md
This is how I setup Ubuntu ... more or less.

Installation Media

cd Downloads && \
wget http://releases.ubuntu.com/releases/18.04/ubuntu-18.04-desktop-amd64.iso && \
dd bs=4M if=ubuntu-18.04-desktop-amd64.iso of=/dev/sd<TODO> status=progress oflag=sync

Base Installation

Select Check media for errors.

@pwasiewi
pwasiewi / frozenLake_v0_using_qLearning.py
Created May 13, 2019 06:53 — forked from kfaRabi/frozenLake_v0_using_qLearning.py
FrozenLake-v0 solution using Q-Learning without any discount.
import matplotlib
import numpy as np
import sys
import os
from collections import defaultdict
import gym
cwd = os.getcwd()
gymPath = cwd[:cwd.find("gym") + len("gym")]
# print gymPath
@pwasiewi
pwasiewi / config-deb-i386.json
Created October 21, 2019 18:25 — forked from lyshie/config-deb-i386.json
Scratch Desktop (Scratch 3.0 Offline Editor) on GNU/Linux
{
"src": "/tmp/scratch-desktop/",
"dest": "/tmp/",
"arch": "i386",
"icon": "/tmp/scratch-desktop/resources/Icon.png",
"categories": [
"Education"
]
}
@pwasiewi
pwasiewi / random_forest_with_python_and_spark_ml.py
Created April 25, 2020 19:08 — forked from bfraiche/random_forest_with_python_and_spark_ml.py
This gist contains the complete code for my blogpost: 'Random Forest with Python and Spark ML'
from pyspark.ml import Pipeline
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.regression import RandomForestRegressor
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.ml.tuning import ParamGridBuilder, CrossValidator
import matplotlib.pyplot as plt
import numpy as np
# Pull in the data
df = mc.sql("SELECT * FROM kings_county_housing")