Skip to content

Instantly share code, notes, and snippets.

View robsondepaula's full-sized avatar

Antonio Robson de Paula robsondepaula

View GitHub Profile

Linux on Macbook Pro 10,1 (early 2013)

Fedora 38

Post install update:

sudo dnf update
sudo dnf upgrade
sudo dnf clean all
sudo reboot
n^0.3 < n^0.5 < n < n^2 < n^3
logn < n^0.5 < n < nlogn < n^2 < nˆ2.3 < 3ˆn < 4^n
n^0.5 = √n
n^2.3 = 5^log2n
@robsondepaula
robsondepaula / 1. Install python3.7 & pip3.md
Created December 22, 2019 20:18 — forked from alyssaq/1. Install python3.7 & pip3.md
Python3.7 setup on Mac 10.14 (Mojave)
  1. Install Python 3.7.x from https://www.python.org/downloads/ or via homebrew.
$ brew install python3   # Installed at /usr/local/Cellar/python3

Check that python3 has been installed by running it at the terminal:

$ python3
>>> Python 3.7.2
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
for dir in *; do
if [ -d "$dir" ]; then
echo "$dir"
cd "$dir"
git pull
cd ".."
fi
done
ssh -p 2222 training@localhost
[ ] Using small sample from data
- create it:
head -50 ../data/purchases.txt > testfile
- pass it to mapper script
cat testfile | ./mapper.py
- do all the map reduce in one command
@robsondepaula
robsondepaula / gist:750cfa6c4f04295b8e9a469de608d2e4
Created August 1, 2018 16:38 — forked from chenghan/gist:7456549
Instructor code that was shown on screen
import sys
salesTotal = 0
oldKey = None
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 2:
# Something has gone wrong. Skip this line.
continue
@robsondepaula
robsondepaula / BuildScript
Created July 2, 2018 11:07
Retrieve SDK location for Unity Build Scripts
string sdkPath = Environment.GetEnvironmentVariable ("ANDROID_HOME");
if (sdkPath == null) {
sdkPath = EditorPrefs.GetString ("AndroidSdkRoot");
}
EditorSetup.AndroidSdkRoot = sdkPath;
@robsondepaula
robsondepaula / gist:92acead3594a1c233acc73e03146a9f0
Last active February 28, 2024 17:24
In case Ubuntu 18.04 audio does not work on iMac 27.
* Edit Alsa configuration:
sudo nano /etc/modprobe.d/alsa-base.conf
* Add to the end of the file:
options snd-hda-intel model=imac27_122
* Reload Alsa module:
pulseaudio -k
sudo alsa force-reload
@robsondepaula
robsondepaula / MinimalUnityIos.mm
Created June 11, 2018 17:35
A minimal Unity Native Plugin for iOS.
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import "UnityInterface.h"
// Required to return strings to Unity
char* cStringCopy(const char* string)
{
if (string == NULL)