This file contains hidden or 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
PYTHON=/home/usr/anaconda3/bin/python | |
CACHEDIR=~/.cache |
This file contains hidden or 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
#!/bin/bash | |
# Installs Pytorch development environment | |
# on Ubuntu 20.04 LTS (WSL2) host machine | |
# First make sure that Windows GPU driver and WSL2 installations are ok, | |
# then launch WSL, create a new user and execute commands. | |
# Reference: https://docs.nvidia.com/cuda/wsl-user-guide/index.html | |
# 1) Install cuda stuff | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub |
This file contains hidden or 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
import matplotlib.pyplot as plt | |
import numpy as np | |
PI = np.pi | |
PI2 = (2*PI) | |
# Calculus says: | |
# 1) integral of sin(x) from 0 to pi equals 2, | |
# 2) integral of sin(x) from pi to 2pi equals -2, | |
# 3) integral of cos(x) from 0 to pi/2 equals 1, |
This file contains hidden or 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
// Arduino port for MLX90363 Example rotary program | |
// Purpose: Demonstrate getting angular data from | |
// MLX90363 via GET1a message | |
// | |
// Adapts code example given on: | |
// MLX90363 Getting Started Guide (Rev 002) | |
// Tested with Arduino Nano V3 and IDE ver. 1.8.5 | |
// Date: 09.03.2019 | |
#include <stdio.h> |
This file contains hidden or 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
% Function pretty prints given matrix / vector | |
% @param M: a matrix or a vector to be printed | |
% @param M_name: name which is displayed in the print (optionl) | |
% @param precision: specify the amount of decimals to be shown (optional) | |
function prettyPrint(M, M_name, precision) | |
[rows_n, cols_n] = size(M); | |
% Check optional arguments | |
if ~exist('M_name','var'), M_name = 'PrettyPrint'; end | |
if ~exist('precision','var'), precision = 3; end |
This file contains hidden or 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
#include "examples.h" | |
#include <vector> | |
bool changeAge(std::vector<Person>& people) { | |
// Create people | |
for (int i = 0; i < 50; i++) { | |
Person new_person; | |
new_person.gender = Gender::Male; |
This file contains hidden or 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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "ctrl+m", "command": "editor.action.jumpToBracket" }, | |
{ "key": "ctrl+l", "command": "expandLineSelection" }, | |
{ "key": "ctrl+n", "command": "" }, | |
{ "key": "ctrl+i", "command": "" }, | |
{ "key":"ctrl+alt+2", "command": "workbench.action.splitEditor" }, | |
{ "key": "ctrl+alt+right", "command": "cursorWordPartRight" }, |
This file contains hidden or 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
#pragma once | |
#include <SDL_ttf.h> | |
#include <map> | |
#include <string> | |
#include <vector> | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// GOOD TO KNOW ABOUT THE CLASS. +--------------------------+ // | |
// | TextService | // | |
// How to use: |--------------------------| // |
This file contains hidden or 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
// Note: static renderer must be defined when creating the service class. | |
class TextService { | |
public: | |
// Colors has to be defined as an enum, because otherwise | |
// they cant be accessed outside class. ('Has to be specific for some object'). | |
enum class Colors { red = 1, green = 2, blue = 3, yellow = 4, white = 5, gray = 6, black = 7 }; | |
class TextProperties; // forward declaration; | |
enum class FontNames { ostrich = 1, blabalb = 2 }; |
This file contains hidden or 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
########################### | |
# GENERAL # | |
########################### | |
# Show filenames that have changed in the last <n> commits: | |
git diff --name-only HEAD HEAD~<n> | |
# Git copy current branch status to master w/o doing merge | |
git checkout master | |
git checkout other_branch . |
NewerOlder