How to remove an incorrect package version from Ubuntu - apt

An X86 XUbuntu system I work with has Java 8 installed via webupd8, and also a failed version for ARM. I want to remove the partially installed ARM version of Java.
$ sudo apt-cache showpkg oracle-java8-installer
Package: oracle-java8-installer
Versions:
8u60+8u60arm-1~webupd8~1 (/var/lib/apt/lists/ppa.launchpad.net_webupd8team_java_ubuntu_dists_vivid_main_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/ppa.launchpad.net_webupd8team_java_ubuntu_dists_vivid_main_binary-amd64_Packages
MD5: 413372eec960dbbb3af5783097c677ea
Description Language: en
File: /var/lib/apt/lists/ppa.launchpad.net_webupd8team_java_ubuntu_dists_vivid_main_i18n_Translation-en
MD5: 413372eec960dbbb3af5783097c677ea
Reverse Depends:
oracle-java8-unlimited-jce-policy,oracle-java8-installer 8u60+8u60arm-1~webupd8~1
oracle-java8-set-default,oracle-java8-installer
Dependencies:
8u60+8u60arm-1~webupd8~1 - java-common (2 0.24) locales (0 (null)) wget (0 (null)) binutils (0 (null)) debconf (18 0.5) debconf-2.0 (0 (null)) binfmt-support (0 (null)) visualvm (0 (null)) ttf-baekmuk (16 (null)) ttf-unfonts (16 (null)) ttf-unfonts-core (0 (null)) ttf-kochi-gothic (16 (null)) ttf-sazanami-gothic (0 (null)) ttf-kochi-mincho (16 (null)) ttf-sazanami-mincho (0 (null)) ttf-arphic-uming (0 (null)) firefox (16 (null)) firefox-2 (16 (null)) iceweasel (16 (null)) mozilla-firefox (16 (null)) iceape-browser (16 (null)) mozilla-browser (16 (null)) epiphany-gecko (16 (null)) epiphany-webkit (16 (null)) epiphany-browser (16 (null)) galeon (16 (null)) midbrowser (16 (null)) moblin-web-browser (16 (null)) xulrunner (16 (null)) xulrunner-1.9 (16 (null)) konqueror (16 (null)) chromium-browser (16 (null)) midori (16 (null)) google-chrome (0 (null)) gsfonts-x11 (0 (null)) j2se-common (0 (null)) j2se-common:i386 (0 (null)) icedtea-6-plugin (0 (null)) icedtea-6-plugin:i386 (0 (null)) icedtea-7-plugin (0 (null)) icedtea-7-plugin:i386 (0 (null)) openjdk-6-jre (0 (null)) openjdk-6-jre:i386 (0 (null)) openjdk-6-jre-headless (0 (null)) openjdk-6-jre-headless:i386 (0 (null)) openjdk-7-jdk (0 (null)) openjdk-7-jdk:i386 (0 (null)) openjdk-7-jre (0 (null)) openjdk-7-jre:i386 (0 (null)) openjdk-7-jre-headless (0 (null)) openjdk-7-jre-headless:i386 (0 (null)) oracle-java7-bin (0 (null)) oracle-java7-bin:i386 (0 (null)) oracle-java7-fonts (0 (null)) oracle-java7-fonts:i386 (0 (null)) oracle-java7-jdk (0 (null)) oracle-java7-jdk:i386 (0 (null)) oracle-java7-jre (0 (null)) oracle-java7-jre:i386 (0 (null)) oracle-java7-plugin (0 (null)) oracle-java7-plugin:i386 (0 (null)) oracle-java8-bin (0 (null)) oracle-java8-bin:i386 (0 (null)) oracle-java8-fonts (0 (null)) oracle-java8-fonts:i386 (0 (null)) oracle-java8-jdk (0 (null)) oracle-java8-jdk:i386 (0 (null)) oracle-java8-jre (0 (null)) oracle-java8-jre:i386 (0 (null)) oracle-java8-plugin (0 (null)) oracle-java8-plugin:i386 (0 (null)) oracle-jdk7-installer (0 (null)) oracle-jdk7-installer:i386 (0 (null)) oracle-jdk8-installer (0 (null)) oracle-jdk8-installer:i386 (0 (null))
Provides:
8u60+8u60arm-1~webupd8~1 - oracle-java8-plugin oracle-java8-jre oracle-java8-jdk oracle-java8-fonts oracle-java8-bin oracle-java7-plugin oracle-java7-jre oracle-java7-jdk oracle-java7-fonts oracle-java7-bin openjdk-7-jre-headless openjdk-7-jre openjdk-7-jdk openjdk-6-jre-headless openjdk-6-jre java8-sdk java8-runtime-headless java8-runtime java8-jdk java7-sdk java7-runtime-headless java7-runtime java7-jdk java6-sdk java6-runtime-headless java6-runtime java6-jdk java5-sdk java5-runtime-headless java5-runtime java5-jdk java2-sdk java2-runtime-headless java2-runtime java2-jdk java-virtual-machine java-sdk java-runtime-headless java-runtime java-jdk java-compiler icedtea-7-plugin icedtea-6-plugin default-jre-headless default-jre
Reverse Provides:
I would prefer to leave the correct version of Java 8 in place, if possible.

Related

ESP32 not functioning WIFI

I have a Frankenstein ESP 32 setup using my dead Wemos Lolin 32 board and an external Ai thinker ESP 32 chip.
It has been working alright until recently it's failing to connect to any Wifi while dumping garbage data for anything beyond the Wifi. begin() function. It occasionally connects in roughly 1 of 15 reboots. It also seems to sometimes stall UART before triggering a reboot and then working.
I have been using it with a GC9A01 1.28-inch TFT display. I may have damaged it while making the connections but I can't be sure. If I don't use Wifi most other functionality seems to work ok.
This is a sample of the many codes I have tried.
#include <Arduino.h>
#include <WiFi.h>
#include "time.h"
const char *ssid = "VUMA FIBER ";
const char *password = "mysecurepassword";
const char *ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3 * 3600;
const int daylightOffset_sec = 0;
hw_timer_t *My_timer = NULL;
class Timehandler
{
private:
hw_timer_t *My_timer = NULL;
uint8_t counter = 0;
public:
uint8_t hour;
uint8_t minutes;
uint8_t seconds;
unsigned int year;
uint8_t date;
uint8_t day;
struct tm timeinfo;
bool fetchtime(uint8_t gmtOffset = 0, uint8_t daylightOffset_sec = 0, const char *ntpServer = "pool.ntp.org")
{
// configTime(gmtOffset * 3600, daylightOffset_sec, ntpServer);
// struct tm timeinfo;
// if (!getLocalTime(&timeinfo)) {
// return false;
// } else {
Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
return true;
// }
}
void maintainTime()
{
seconds++;
if (seconds >= 60)
{
minutes++;
seconds = 0;
}
if (minutes >= 60)
{
hour++;
minutes = 0;
}
if (hour >= 24)
{
date++;
hour = 0;
}
Serial.printf("%02d", hour);
Serial.print(":");
Serial.printf("%02d", minutes);
Serial.print(":");
Serial.printf("%02d", seconds);
Serial.println("");
}
void getTime()
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo))
{
Serial.println("Failed to obtain time");
return;
}
hour = timeinfo.tm_hour;
minutes = timeinfo.tm_min;
seconds = timeinfo.tm_sec;
year = timeinfo.tm_year;
date = timeinfo.tm_mday;
day = timeinfo.tm_wday;
}
};
bool connected = false;
Timehandler t;
void setup()
{
Serial.begin(115200);
// connect to WiFi
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
t.fetchtime();
t.getTime();
}
void loop()
{
if (!connected)
{
Serial.println("failed...retrying");
if (WiFi.status() == WL_CONNECTED)
{
Serial.println(" CONNECTED");
while (!t.fetchtime(3))
{
Serial.println("failed...retrying");
delay(500);
t.fetchtime(3);
WiFi.disconnect(true);
WiFi.mode(WIFI_OFF);
}
t.getTime();
connected = true;
}
}else{
t.maintainTime();
}
t.maintainTime();
delay(1000);
}
Here is a sample of the serial output.
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM5
Uploading .pio\build\lolin32\firmware.bin
esptool.py v3.1
Serial port COM5
Connecting....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:3c:c6:10:4b:30
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000abfff...
Compressed 17120 bytes to 11164...
Writing at 0x00001000... (100 %)
Wrote 17120 bytes (11164 compressed) at 0x00001000 in 0.6 seconds (effective 213.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 247.8 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 397.7 kbit/s)...
Hash of data verified.
Compressed 638784 bytes to 391514...
Writing at 0x00010000... (4 %)
Writing at 0x0001bce6... (8 %)
Writing at 0x00029453... (12 %)
Writing at 0x00031fdd... (16 %)
Writing at 0x00037279... (20 %)
Writing at 0x0003c526... (25 %)
Writing at 0x000419cd... (29 %)
Writing at 0x00046f5c... (33 %)
Writing at 0x0004c242... (37 %)
Writing at 0x000533e8... (41 %)
Writing at 0x0005ba7c... (45 %)
Writing at 0x00061195... (50 %)
Writing at 0x00066a45... (54 %)
Writing at 0x0006bdb0... (58 %)
Writing at 0x000715e8... (62 %)
Writing at 0x00077550... (66 %)
Writing at 0x0007cdc5... (70 %)
Writing at 0x000830c2... (75 %)
Writing at 0x00088d20... (79 %)
Writing at 0x0008ebd9... (83 %)
Writing at 0x00094b83... (87 %)
Writing at 0x0009ab4a... (91 %)
Writing at 0x000a0842... (95 %)
Writing at 0x000a6686... (100 %)
Wrote 638784 bytes (391514 compressed) at 0x00010000 in 10.5 seconds (effective 486.4 kbit/s)...
Hash of data verified.
Leaving...
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
Connecting to VUMA FIBER
���n���b�l�|�␒b␒␂␌␌␌ll␌␌␌␌␌�␌␌�␌␌l`␃␜␒␒nn�␐␂␌�n�np�␒␒nn␌��r��`␃␜␒␒no�␐�bbb|␒�b␒␒on�␎l�␌�␌␌�␌ll`␃␜␒␒oo�␐�bbc|␒�b␓␒nn�␎l�␌�␌␌�␌�l`␃␜␒␒no�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�␌�l`␃␒␒nn�␐�ccc|␒�b␒␒nn�␎l�␌�␌␌�␌␌�␎l␜␒␒on�␐�cbc|␒�b␒␒on�␎l�␌�␌␌�␌l�␎l␜␒␒oo�␐�ccc|␒�b␓␒oo�␎l�␌�␌␌�␌��␏l␜␒␒oo�␐�ccc|␒�b␓␒nn�␎l�␌�␌␌�␌�␎l␜␒␒nn�␐�ccc|␒�b␒␒on�␎l�␌�␌␌�␌␌l`␃␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�␌ll`␂␜␒␒nn�␐�bbb|␒�b␓␒on�␎l�␌�␌␌�l␌l`␂␜␒␒on�␐�cbb|␒�b␓␒oo�␎l�␌�␌␌�lll`␂␜␒␒nn�␐�bcc|␒�b␓␒on�␎l�␌�␌␌�l�l`␂␜␓␒oo�␐�ccc|␒�b␛␒og�␎l�␌�␌␌�l�d`␃␜␒␒on�␐�ccc|␒�b␓␒oo�␎l�␌�␌␌�l␌�␏l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�ll�␎l␜␒␒oo�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�l��␎l␜␒␒on�␐�bbb|␒�b␒␒on�␎l�␌�␌␌�l�␏l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�l␌l`␂␜␒␒oo�␐�ccc|␒�b␓␒no�␎l�␌�␌␌�lll`␂␜␒␒nn�␐�ccb|␒�b␒␒oo�␎l�␌�␌␌��␌l`␃␜␒␒oo�␐�cbb|␒�b␒␒oo�␎l�␌�␌␌��ll`␂␜␒␒on�␐�bbb|␒�b␒␒no�␎l�␌�␌␌���l`␂␜␒␒oo�␐�bcc|␒�b␒␒on�␎l�␌�␌␌���l`␂␜␒␒on�␐�bbc|␒�b␒␒no�␎l�␌�␌␌��␌�␏l␜␒␒nn�␐�ccc|␒�b␒␒nn�␎l�␌�␌␌��l�␏l␜␒␒on�␐�cbb|␒�b␓␒on�␎l�␌�␌␌����␎l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌���␎l␜␒␒on�␐�ccc|␒�b␓␒no�␎l�␌�␌␌��␌l`␃␜␒␒nn�␐�bcb|␒�b␒␒nn�␎l�␌�␌␌��ll`␂␜␒␒no�␐�bcb|␒�b␒␒nn�␎l�␌�␌␌��␌l`␃␜␒␒nn�␐�bbb|␒�b␓␒nn�␎l�␌�␌␌��ll`␂␜␒␒nn�␐�bbb|␒�b␓␒no�␎l�␌�␌␌��l`␃␜␒␒no�␐�bbb|␒�b␒␒no�␎l�␌�␌␌���l`␂␜␒␒nn�␐�bcb|␒�b␒␒nn�␎l�␌�␌␌��␌�␏l␜␒␒oo�␐�ccc|␒�b␓␒go�␎l�␄�␄␌��l�␏l␜␒␒oo�␐�ccc|␒�b␓␒oo�␎l�␌�␌␌�쌎␎l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌���␎l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌��␌l`␂␜␒␒oo�␐�bbb|␒�b␒␒oo�␎l�␌�␌␌��ll`␃␜␒␒no�␐�bcb|␒�b␓␒no�␎l�␌�␌␌�␌�l`␂␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�␌�prl␜␒␒on�␐�ccc|␒�b␓␒no�␎l�␌�␌␌�␌�␜rl␜␒␒no�␐�cbb|␒�b␓␒on�␎l�␌�␌␌�␌�␜rl␜␒␒on�␐�ccb|␒�b␒␒no�␎l�␌�␌␌�␌��␎l␜␒␒no�␐�bcb|␒�b␒␒on�␎l�␌�␌␌�␌�rrl␜␒␒no�␐�ccc|␒�b␒␒no�␎l�␌�␌␌�␌��␎l␜␒␒nn�␐�bbb|␒�b␒␒oo�␎l�␌�␌␌�␌��␎l␜␒␒oo�␐�ccc|␒�b␒␒oo�␎l�␌�␌␌�␌�l`␃␜␒␒on�␐�bcb|␒�b␒␒on�␎l�␌�␌␌�␌�|rl␜␒␒oo�␐�ccc|␒�b␓␒oo�␎l�␌�␌␌�l�l`␃␜␒␒no�␐�bcc|␒�b␓␒oo�␎l�␌�␌␌�l�prl␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌␌�l�␜rl␜␒␒no�␐�bbb|␒�b␓␒on�␎l�␌�␌␌�l�␜rl␜␒␒on�␐�ccc|␒�b␓␒oo�␎l�␌�␌␌�l��␎l␜␒␒nn�␐�ccb|␒�b␒␒nn�␎l�␌�␌␌�l�rrl␜␒␒nn�␐�cbc|␒�b␓␒no�␎l�␌�␌␌�l��␎l␜␒␒no�␐�ccc|␒�b␓␒no�␎l�␌�␌␌�l��␏l␜␒␒on�␐�ccb|␒�b␒␒oo�␎l�␌�␌␌�l�l`␂␜␒␒oo�␐�ccc|␒�b␓␒no�␎l�␌�␌␄�d�|rl␜␒␒no�␐�ccb|␒�b␓␒nn�␎l�␌�␌l�␌␌l`␂␜␒␒on�␐�bcb|␒�b␒␒nn�␎l�␌�␌l�␌ll`␂␜␒␒nn�␐�bbb|␒�b␒␒no�␎l�␌�␌l�␌�l`␂␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�␌�l`␃␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�␌␌�␎l␜␒␒nn�␐�bbc|␒�b␒␒nn�␎l�␌�␌l�␌l�␎l␜␒␒no�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�␌��␏l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�␌�␎l␜␒␒no�␐�ccc|␒�b␓␒on�␎l�␌�␌l�␌␌l`␃␜␒␒on�␐�bcb|␒�b␒␒on�␎l�␌�␌l�␌ll`␃␜␒␒on�␐�bcb|␒�b␓␒on�␎l�␌�␌l�l␌l`␃␜␒␒oo�␐�cbb|␒�b␓␒oo�␎l�␌�␌l�lll`␂␜␒␒no�␐�bcb|␒�b␓␒on�␎l�␌�␌l�l�l`␂␜␒␒on�␐�bcb|␒�b␒␒no�␎l�␌�␌l�l�l`␂␜␒␒on�␐�bcc|␒�b␓␒oo�␎l�␌�␌l�l␌�␎l␜␒␒oo�␐�bcc|␒�b␓␒nn�␎l�␌�␌l�ll�␏l␜␒␒oo�␐�bcc|␒�b␒␒oo�␎l�␌�␌l�l��␎l␜␒␒no�␐�bbc|␒�b␒␒nn�␎l�␌�␌l�l�␎l␜␒␒oo�␐�bbb|␒�b␓␒oo�␎l�␌�␌l�l␌l`␃␜␒␒no�␐�cbc|␒�b␓␒no�␎l�␌�␌l�lll`␃␜␒␒no�␐�bcb|␒�b␓␒nn�␎l�␌�␌l��␌l`␂␜␒␒on�␐�bcb|␒�b␒␒nn�␎l�␌�␌l��ll`␃␜␒␒on�␐�ccc|␒�b␓␒oo�␎l�␌�␌l���l`␂␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌l���l`␂␜␒␒on�␐�bbb|␒�b␓␒oo�␎l�␌�␌l��␌�␎l␜␒␒on�␐�bcb|␒�b␒␒oo�␎l�␌�␌l��l�␏l␜␒␒on�␐�bcc|␒�b␒␒oo�␎l�␌�␌l����␎l␜␒␒oo�␐�ccb|␒�b␓␒oo�␎l�␌�␌l���␏l␜␒␒'g�␐�#c#<␒�b␛␒'o�␏l�␄�␌d��␌l`␃␜␒␒no�␐�ccb|␒�b␓␒oo�␎l�␌�␌l��ll`␃␜␒␒oo�␐�bbc|␒�b␒␒on�␎l�␌�␌l��␌l`␂␜␒␒nn�␐�cbc|␒�b␒␒nn�␎l�␌�␌l��ll`␃␜␒␒oo�␐�ccc|␒�b␓␒oo�␎l�␌�␌l��l`␃␜␒␒nn�␐�cbb|␒�b␒␒nn�␎l�␌�␌l���l`␂␜␒␒on�␐�cbc|␒�b␓␒oo�␎l�␌�␌l��␌�␏l␜␒␒nn�␐�bbc|␒�b␓␒no�␎l�␌�␌l��l�␎l␜␒␒nn�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�쌎␏l␜␓␒''�␐�###<␒�#␛␒''�␇$�␄�␄$���␇l␜␒␒no�␐�bcb|␒�b␒␒oo�␎l�␌�␌l��␌l`␃␜␒␒no�␐�ccb|␒�b␓␒no�␎l�␌�␌l��ll`␃␜␒␒oo�␐�ccc|␒�b␓␒oo�␎l�␌�␌l�␌�l`␃␜␒␒nn�␐�bbb|␒�b␒␒on�␎l�␌�␌l�␌�prl␜␒␒no�␐�bbb|␒�b␒␒no�␎l�␌�␌l�␌�␜rl␜␒␒oo�␐�bcb|␒�b␒␒no�␎l�␌�␌l�␌�␜rl␜␒␒nn�␐�bbc|␒�b␒␒on�␎l�␌�␌l�␌��␎l␜␒␒on�␐�bbb|␒�b␒␒nn�␎l�␌�␌l�␌�rrl␜␒␒on�␐�cbb|␒�b␒␒nn�␎l�␌�␌l�␌��␎l␜␒␒oo�␐�cbc|␒�b␒␒no�␎l�␌�␌l�␌��␏l␜␒␛''�␐�###<␓�b␛␛''�␎$�␄�␄$�␄�$ ␃␜␒␒oo�␐�cbc|␒�b␓␒on�␎l�␌�␌l�␌�|rl␜␒␒nn�␐�cbc|␒�b␒␒on�␎l�␌�␌l�l�l`␂␜␒␒on�␐�ccb|␒�b␒␒no�␎l�␌�␌l�l�prlets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
Connecting to VUMA FIBER
Sunday, January 00 1900 00:00:00
Failed to obtain time
failed...retrying
00:00:01
failed...retrying
00:00:02
failed...retrying
00:00:03
failed...retrying
CONNECTED
Sunday, January 00 1900 00:00:00
Failed to obtain time
00:00:04
00:00:05
00:00:06
00:00:07
00:00:08
00:00:09
00:00:10
00:00:11
00:00:12
00:00:13
00:00:14
00:00:15
00:00:16
00:00:17
00:00:18
00:00:19
00:00:20
00:00:21
00:00:22
00:00:23
00:00:24
00:00:25
00:00:26
00:00:27
00:00:28
00:00:29
00:00:30
00:00:31
00:00:32
00:00:33
00:00:34
00:00:35
00:00:36
00:00:37
00:00:38
00:00:39
00:00:40
00:00:41
00:00:42
Any help would be appreciated

How do I use groupby and mean in a sprase matrix?

everyone, I have a question that puzzled me. Hope you can help me. Thank you in advanced.
I have a sparse matrix ,it looks like this .
(2, 0) 1.3862943611198906
(7, 0) 1.0986122886681096
(27, 0) 1.0986122886681096
(29, 0) 1.0986122886681096
(31, 0) 0.6931471805599453
(37, 0) 0.6931471805599453
(41, 0) 3.1780538303479458
(42, 0) 1.0986122886681096
(45, 0) 1.3862943611198906
(47, 0) 0.6931471805599453
(51, 0) 0.6931471805599453
(52, 0) 0.6931471805599453
(55, 0) 1.0986122886681096
(56, 0) 0.6931471805599453
(60, 0) 2.0794415416798357
(62, 0) 2.639057329615259
(64, 0) 2.0794415416798357
(65, 0) 2.3978952727983707
(66, 0) 1.3862943611198906
(69, 0) 1.0986122886681096
(70, 0) 0.6931471805599453
(72, 0) 0.6931471805599453
(73, 0) 1.6094379124341003
(77, 0) 0.6931471805599453
(78, 0) 1.3862943611198906
: :
(19669, 65535) 0.6931471805599453
(19670, 65535) 1.0986122886681096
(19671, 65535) 0.6931471805599453
(19675, 65535) 0.6931471805599453
(19677, 65535) 0.6931471805599453
(19678, 65535) 1.0986122886681096
(19686, 65535) 1.3862943611198906
(19687, 65535) 0.6931471805599453
(19688, 65535) 2.0794415416798357
(19689, 65535) 1.6094379124341003
(19690, 65535) 2.1972245773362196
(19691, 65535) 0.6931471805599453
(19692, 65535) 0.6931471805599453
(19693, 65535) 0.6931471805599453
(19694, 65535) 0.6931471805599453
(19695, 65535) 2.5649493574615367
(19696, 65535) 2.639057329615259
(19697, 65535) 0.6931471805599453
(19698, 65535) 2.3978952727983707
(19699, 65535) 1.6094379124341003
(19700, 65535) 1.791759469228055
(19701, 65535) 1.791759469228055
(19702, 65535) 1.0986122886681096
(19703, 65535) 1.6094379124341003
(19704, 65535) 3.5263605246161616
(19706, 65536)
Now, I have another columns and I called it as "A" it looks like this.
gene_id
0 ENSMUSG00000031144
1 ENSMUSG00000031144
2 ENSMUSG00000031144
3 ENSMUSG00000031144
4 ENSMUSG00000031144
5 ENSMUSG00000031144
6 ENSMUSG00000031155
7 ENSMUSG00000031155
8 ENSMUSG00000031155
9 ENSMUSG00000031155
10 ENSMUSG00000031155
11 ENSMUSG00000031161
12 ENSMUSG00000031161
13 ENSMUSG00000031161
14 ENSMUSG00000031161
15 ENSMUSG00000031161
16 ENSMUSG00000031161
17 ENSMUSG00000031161
18 ENSMUSG00000031161
19 ENSMUSG00000031161
20 ENSMUSG00000031161
21 ENSMUSG00000031161
22 ENSMUSG00000031161
23 ENSMUSG00000031161
24 ENSMUSG00000031161
25 ENSMUSG00000031161
26 ENSMUSG00000031161
27 ENSMUSG00000031161
28 ENSMUSG00000031161
29 ENSMUSG00000031161
... ...
19676 ENSMUSG00000042532
19677 ENSMUSG00000042532
19678 ENSMUSG00000042532
19679 ENSMUSG00000042532
19680 ENSMUSG00000042532
19681 ENSMUSG00000025196
19682 ENSMUSG00000025196
19683 ENSMUSG00000025196
19684 ENSMUSG00000025196
19685 ENSMUSG00000025196
19686 ENSMUSG00000025196
19687 ENSMUSG00000025036
19688 ENSMUSG00000025025
19689 ENSMUSG00000025025
19690 ENSMUSG00000025025
19691 ENSMUSG00000025025
19692 ENSMUSG00000025025
19693 ENSMUSG00000025025
19694 ENSMUSG00000025025
19695 ENSMUSG00000024985
19696 ENSMUSG00000024985
19697 ENSMUSG00000024985
19698 ENSMUSG00000024985
19699 ENSMUSG00000024985
19700 ENSMUSG00000024985
19701 ENSMUSG00000024985
19702 ENSMUSG00000025075
19703 ENSMUSG00000025089
19704 ENSMUSG00000025089
19705 ENSMUSG00000025089
[19706 rows x 1 columns]
They have the same rows. I want to groupby the "A" and then get the mean values of this sparse matrix every columns. How can I do that? Thank you in advance.

Spark streaming on Mesos - random failures of Marathon tasks

I'm using Mesos 1.1.0 cluster for both Spark batch and Spark streaming jobs. Batch is working without any problem with same Spark URI-s, Streaming is behaving abnormally from time to time.
Streaming job is started using Marathon 1.3.6 by running simple bash submit script. Script is local on all slaves, same on all slaves.
Script:
spark-submit --class "$1" --master mesos://zk://master1:2181,master2:2181,master3:2181/mesos --conf spark.executor.uri=/spark/spark-2.0.1-bin-hadoop2.6.tgz --conf spark.cores.max=2 --conf spark.eventLog.enabled=false /spark_jobs/"$2"
This all works well most of the time, Marathon deploys the job, job starts and remains active and working.
Here is sample of Mesos stderr for job which starts fine. It is just the beginning of the log file because I beleive it is where the issue appears.
#################### START OF Normal stderr
I1224 09:02:00.480056 23118 fetcher.cpp:498] Fetcher Info: {"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3\/root","items":[{"action":"BYPASS_CACHE","uri":{"extract":true,"value":"\/spark\/spark-2.0.1-bin-hadoop2.6.tgz"}}],"sandbox_directory":"\/var\/lib\/mesos\/slaves\/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3\/frameworks\/cd6497c0-d374-4957-b861-286fd0b27587-13920\/executors\/0\/runs\/feb948b2-1b37-4962-a682-77aeb45a3063","user":"root"}
I1224 09:02:00.483033 23118 fetcher.cpp:409] Fetching URI '/spark/spark-2.0.1-bin-hadoop2.6.tgz'
I1224 09:02:00.483050 23118 fetcher.cpp:250] Fetching directly into the sandbox directory
I1224 09:02:00.483072 23118 fetcher.cpp:187] Fetching URI '/spark/spark-2.0.1-bin-hadoop2.6.tgz'
I1224 09:02:00.483088 23118 fetcher.cpp:167] Copying resource with command:cp '/spark/spark-2.0.1-bin-hadoop2.6.tgz' '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063/spark-2.0.1-bin-hadoop2.6.tgz'
I1224 09:02:00.675047 23118 fetcher.cpp:84] Extracting with command: tar -C '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063' -xf '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063/spark-2.0.1-bin-hadoop2.6.tgz'
I1224 09:02:02.797693 23118 fetcher.cpp:92] Extracted '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063/spark-2.0.1-bin-hadoop2.6.tgz' into '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063'
I1224 09:02:02.797751 23118 fetcher.cpp:547] Fetched '/spark/spark-2.0.1-bin-hadoop2.6.tgz' to '/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/cd6497c0-d374-4957-b861-286fd0b27587-13920/executors/0/runs/feb948b2-1b37-4962-a682-77aeb45a3063/spark-2.0.1-bin-hadoop2.6.tgz'
I1224 09:02:02.850260 23144 exec.cpp:162] Version: 1.1.0
I1224 09:02:02.852879 23147 exec.cpp:237] Executor registered on agent bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
16/12/24 09:02:03 INFO CoarseGrainedExecutorBackend: Started daemon with process name: 23155#mr02
16/12/24 09:02:03 INFO SignalUtils: Registered signal handler for TERM
16/12/24 09:02:03 INFO SignalUtils: Registered signal handler for HUP
16/12/24 09:02:03 INFO SignalUtils: Registered signal handler for INT
16/12/24 09:02:04 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/12/24 09:02:04 INFO SecurityManager: Changing view acls to: root
16/12/24 09:02:04 INFO SecurityManager: Changing modify acls to: root
16/12/24 09:02:04 INFO SecurityManager: Changing view acls groups to:
16/12/24 09:02:04 INFO SecurityManager: Changing modify acls groups to:
16/12/24 09:02:04 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); groups with view permissions: Set(); users with modify permissions: Set(root); groups with modify permissions: Set()
16/12/24 09:02:04 INFO TransportClientFactory: Successfully created connection to /10.210.197.151:57731 after 82 ms (0 ms spent in bootstraps)
Sometimes when we restart this job, job gets initialized, it registers as framework in Mesos, it starts Spark web UI, but it does nothing, all tasks are queued and it is doing some weird stuff (calculating stages of WHAT?). Sometimes it takes several restarts to make it work like it should, which is not desired behaviour, since process should be automated.
#### START OF Abnormal stderr
I1224 08:32:11.346411 19741 exec.cpp:162] Version: 1.1.0
I1224 08:32:11.348379 19743 exec.cpp:237] Executor registered on agent bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#726: Client environment:zookeeper.version=zookeeper C client 3.4.8
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#730: Client environment:host.name=mr02
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#737: Client environment:os.name=Linux
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#738: Client environment:os.arch=3.13.0-100-generic
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#739: Client environment:os.version=#147-Ubuntu SMP Tue Oct 18 16:48:51 UTC 2016
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#747: Client environment:user.name=(null)
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#755: Client environment:user.home=/root
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#log_env#767: Client environment:user.dir=/var/lib/mesos/slaves/bf8a3062-0309-4c1f-91cd-79d7515f9ce7-S3/frameworks/aee5cbd3-b3e8-431d-bc18-fb5107d54074-0000/executors/jobs_storagetraffic17.76d13635-c9b3-11e6-bf95-bc764e104d04/runs/cd1a62ea-4cda-4599-a6fc-e7c5d1ad3956
2016-12-24 08:32:13,838:19753(0x7f8864b02700):ZOO_INFO#zookeeper_init#800: Initiating client connection, host=mr01:2181,mr02:2181,mr03:2181 sessionTimeout=10000 watcher=0x7f8872f72200 sessionId=0 sessionPasswd=<null> context=0x7f883c000b10 flags=0
I1224 08:32:13.839673 19843 sched.cpp:226] Version: 1.1.0
2016-12-24 08:32:13,840:19753(0x7f88577fe700):ZOO_INFO#check_events#1728: initiated connection to server [10.210.224.189:2181]
2016-12-24 08:32:13,845:19753(0x7f88577fe700):ZOO_INFO#check_events#1775: session establishment complete on server [10.210.224.189:2181], sessionId=0x3592d18d17a001a, negotiated timeout=10000
I1224 08:32:13.845521 19838 group.cpp:340] Group process (zookeeper-group(1)#10.210.198.20:43514) connected to ZooKeeper
I1224 08:32:13.845562 19838 group.cpp:828] Syncing group operations: queue size (joins, cancels, datas) = (0, 0, 0)
I1224 08:32:13.845579 19838 group.cpp:418] Trying to create path '/mesos' in ZooKeeper
I1224 08:32:13.846849 19838 detector.cpp:152] Detected a new leader: (id='27')
I1224 08:32:13.846951 19838 group.cpp:697] Trying to get '/mesos/json.info_0000000027' in ZooKeeper
I1224 08:32:13.847759 19841 zookeeper.cpp:259] A new leading master (UPID=master#10.210.224.189:5050) is detected
I1224 08:32:13.847839 19838 sched.cpp:330] New master detected at master#10.210.224.189:5050
I1224 08:32:13.848011 19838 sched.cpp:341] No credentials provided. Attempting to register without authentication
I1224 08:32:13.850549 19841 sched.cpp:743] Framework registered with cd6497c0-d374-4957-b861-286fd0b27587-13914
16/12/24 08:32:14 INFO utils.VerifiableProperties: Verifying properties
16/12/24 08:32:14 INFO utils.VerifiableProperties: Property group.id is overridden to
16/12/24 08:32:14 INFO utils.VerifiableProperties: Property zookeeper.connect is overridden to
16/12/24 08:32:20 INFO utils.VerifiableProperties: Verifying properties
16/12/24 08:32:20 INFO utils.VerifiableProperties: Property group.id is overridden to
16/12/24 08:32:20 INFO utils.VerifiableProperties: Property zookeeper.connect is overridden to
[Stage 0:> (0 + 0) / 31]
[Stage 0:> (0 + 1) / 31]
[Stage 0:> (0 + 2) / 31]
[Stage 0:=> (1 + 3) / 31]
[Stage 0:==================================> (19 + 0) / 31]
[Stage 1:==================================> (19 + 0) / 31]
[Stage 2:==================================> (19 + 0) / 31]
[Stage 3:==================================> (19 + 0) / 31]
[Stage 4:==================================> (19 + 0) / 31]
[Stage 5:==================================> (19 + 0) / 31]
[Stage 6:==================================> (19 + 0) / 31]
[Stage 7:==================================> (19 + 0) / 31]
[Stage 8:==================================> (19 + 0) / 31]
[Stage 9:==================================> (19 + 0) / 31]
[Stage 10:==================================> (19 + 0) / 31]
[Stage 11:==================================> (19 + 0) / 31]
[Stage 12:==================================> (19 + 0) / 31]
[Stage 13:==================================> (19 + 0) / 31]
[Stage 13:==================================> (19 + 2) / 31]
[Stage 14:==================================> (19 + 0) / 31]
[Stage 14:=====================================> (21 + 2) / 31]
[Stage 15:==================================> (19 + 0) / 31]
[Stage 15:=====================================> (21 + 2) / 31]
[Stage 16:==================================> (19 + 0) / 31]
[Stage 16:=========================================> (23 + 2) / 31]
[Stage 17:==================================> (19 + 0) / 31]
[Stage 17:=============================================> (25 + 2) / 31]
[Stage 18:==================================> (19 + 0) / 31]
[Stage 18:=============================================> (25 + 2) / 31]
[Stage 19:==================================> (19 + 0) / 31]
[Stage 19:=============================================> (25 + 2) / 31]
[Stage 20:==================================> (19 + 0) / 31]
[Stage 20:===========================================> (24 + 2) / 31]
[Stage 21:==================================> (19 + 0) / 31]
[Stage 22:==================================> (19 + 0) / 31]
[Stage 23:==================================> (19 + 0) / 31]
[Stage 24:==================================> (19 + 0) / 31]
[Stage 25:==================================> (19 + 0) / 31]
[Stage 26:==================================> (19 + 0) / 31]
[Stage 27:==================================> (19 + 0) / 31]
[Stage 28:==================================> (19 + 0) / 31]
[Stage 29:==================================> (19 + 0) / 31]
[Stage 30:==================================> (19 + 0) / 31]
[Stage 31:==================================> (19 + 0) / 31]
[Stage 32:==================================> (19 + 0) / 31]
[Stage 33:==================================> (19 + 0) / 31]
[Stage 34:==================================> (19 + 0) / 31]
[Stage 35:==================================> (19 + 0) / 31]
[Stage 36:==================================> (19 + 0) / 31]
[Stage 37:==================================> (19 + 0) / 31]
[Stage 38:==================================> (19 + 0) / 31]
[Stage 39:==================================> (19 + 0) / 31]
I suspect thet problem is in first few lines of the log file, for some reason abnormal job does not have fetcher part, maybe it is not copying /spark/spark-2.0.1-bin-hadoop2.6.tgz and does not have binaries to start...but then, how does it starts Spark UI?
Does anyone has any ideas how to solve this problem, where to look for additional clues, what to test to get more data?
Thanks,
Ivan

Wumpus game's make-city-edges function causes heap overflow

Going through the Land of Lisp book, I managed to get to the Grand Theft Wumpus game, that has me define a make-city-edges function. When I try to run it however, SBCL hangs for a while before giving me a very nasty error saying
Heap exhausted during garbage collection: 0 bytes available, 16 requested.
Gen StaPg UbSta LaSta LUbSt Boxed Unboxed LB LUB !move Alloc Waste Trig WP GCs Mem-age
0: 0 0 0 0 0 0 0 0 0 0 0 10737418 0 0 0.0000
1: 0 0 0 0 0 0 0 0 0 0 0 10737418 0 0 0.0000
2: 27757 0 0 0 19204 70 0 10 54 631392704 505408 2000000 0 0 0.9800
3: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
4: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
5: 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
6: 0 0 0 0 1638 251 0 0 0 61898752 0 2000000 1523 0 0.0000
Total bytes allocated = 1073069936
Dynamic-space-size bytes = 1073741824
GC control variables:
*GC-INHIBIT* = true
*GC-PENDING* = true
*STOP-FOR-GC-PENDING* = false
fatal error encountered in SBCL pid 85448(tid 140735276667664):
Heap exhausted, game over.
Error opening /dev/tty: Device not configured
Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb>
I've triple-checked to see if I made any mistake, but I couldn't find any.
Here's the function causing the problem:
(defun make-city-edges ()
(let* ((nodes (loop for i from 1 to *node-num*
collect i))
(edge-list (connect-all-islands nodes (make-edge-list)))
(cops (remove-if-not (lambda (x)
(zerop (random *cop-odds*)))
edge-list)))
(add-cops (edges-to-alist edge-list) cops)))
[here] is the rest of the code if you want to have a look at the other functions, I added it to a GitHub Gist page since it would take up too much space in the question.
What can I do to resolve this? I'm using Emacs 24.4 (9.0) on OSX 10.9 with SLIME and SBCL 1.2.10 for the project.
In the linked code,
(defun find-islands (nodes edge-list)
"returns a list of nodes that aren't interconnected"
(let ((islands nil))
(labels ((find-island (nodes)
(let* ((connected (get-connected (car nodes) edge-list))
(unconnected (set-difference nodes connected)))
(push connected islands)
(when connected
(find-island unconnected)))))
(find-island nodes))
islands))
(when connected should be (when unconnected.
A few tips for debugging heap exhaustion:
Check that your loops and recursions actually terminate. (That's what led us to this solution -- get-connected never returns nil, so find-island would recurse forever.)
CL's trace can be useful, as well as the traditional adding of print statements.
C-c C-c in SLIME after the program has run for a bit but before heap exhaustion might provide a useful backtrace.
E.g. of the backtrace:
0: ((:INTERNAL TRAVERSE GET-CONNECTED) NIL)
Locals:
NODE = NIL
#:G11908 = ((2 . 21) (20 . 22) (22 . 20) (9 . 28) (28 . 9) (2 . 7) ...)
EDGE-LIST = ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...)
VISITED = (NIL)
1: (GET-CONNECTED NIL ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...))
Locals:
NODE = NIL
EDGE-LIST = ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...)
VISITED = (NIL)
2: ((:INTERNAL FIND-ISLAND FIND-ISLANDS) NIL)
Locals:
NODES = NIL
ISLANDS = ((NIL) (NIL) (NIL) (NIL) (NIL) (NIL) ...)
EDGE-LIST = ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...)
3: (FIND-ISLANDS (1 2 3 4 5 6 ...) ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...))
Locals:
NODES = (1 2 3 4 5 6 ...)
EDGE-LIST = ((8 . 3) (3 . 8) (18 . 7) (7 . 18) (26 . 23) (23 . 26) ...)
ISLANDS = ((NIL) (NIL) (NIL) (NIL) (NIL) (NIL) ...)
That might lead us to say "I didn't think a node would ever be nil, and islands being ((nil) (nil) (nil) ...) seems broken."

Function to return 3^k in n+1 calls

Can someone hep me find an algorithm for a recursive function func(int k) to return 3^k in only n+1 calls where k is in the range [ 3^n, 3^(n+1) )
For example, the function should return 3^1 or 3^2 in 1 call, 3^3, 3^4, .., 3^8 in 2 calls, 3^9, 3^10 .. in 3 calls and so on.
Here is the algorithm in untested C/C++:
int 3pow(x)
{
switch(x)
{
case 1: return 3;
case 2: return 9;
case 3: return 27;
}
int remain = x % 3,
recur = 3pow((x-remain)/3),
combine = recur * recur * recur;
switch (remain)
{
case 0: return combine;
case 1: return combine * 3;
default: return combine * 9;
}
}
(I have not compiled, run, or otherwise tested this code. There may be syntax errors and other bugs. But it's sufficient to get the point across.)
What's different about this algorithm is that it recurses by dividing by 3 instead of 2. This function is rather ugly by necessity, as abstracting away some of the pattern would likely involve more recursion. Still, this algorithm is now O(log3n). Here's a table of a given x from 1-50 and the number of recursive calls required (as a two-element lisp list):
(1 1) (2 1) (3 1) (4 2) (5 2) (6 2) (7 2) (8 2) (9 2) (10 2)
(11 2) (12 3) (13 3) (14 3) (15 3) (16 3) (17 3) (18 3) (19 3) (20 3)
(21 3) (22 3) (23 3) (24 3) (25 3) (26 3) (27 3) (28 3) (29 3) (30 3)
(31 3) (32 3) (33 3) (34 3) (35 3) (36 4) (37 4) (38 4) (39 4) (40 4)
(41 4) (42 4) (43 4) (44 4) (45 4) (46 4) (47 4) (48 4) (49 4) (50 4)
(51 4) (52 4) (53 4) (54 4) (55 4) (56 4) (57 4) (58 4) (59 4) (60 4)
(61 4) (62 4) (63 4) (64 4) (65 4) (66 4) (67 4) (68 4) (69 4) (70 4)
(71 4) (72 4) (73 4) (74 4) (75 4) (76 4) (77 4) (78 4) (79 4) (80 4)
(81 4) (82 4) (83 4) (84 4) (85 4) (86 4) (87 4) (88 4) (89 4) (90 4)
(91 4) (92 4) (93 4) (94 4) (95 4) (96 4) (97 4) (98 4) (99 4) (100 4)
You can see that even as we get up over 100 it only take 4 recursive calls.

Resources