Saturday, 24 December 2016

gw2

| |Art |Leath |Weap |Tail |Jewel | Arm | Chef | ==================== |Fl| 61 | 0 | 0 | 500| 47 | 49 | |JA| 248 | 42 | |KS| 500 | | 4 | | 0 | 0 | 400 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using: Flask of pumpkin oil: Pumpkin's blessing. 100 power, toughness, vitality, 30% mf. <= 1 crystalline dust, bowl curry pumpkin soup, 75 candy corn, 35 plastic fangs. Huntsman. Lump of crystallized nougat: Ghoul's blessing: condi, precision, toughness, 30% mf. <= Crystalline dust, powerful venoom sack, 75 candy corn, 35 chattering skull. Artificer. sharpening skull +? all attibutes, +30%mf <= crystalline dust, viscous fang, 75 candy corn, 35 nougat centres. Weaponsmith. Toxic focusing crystal: +100 Condi, +10% condi duration <= 3 piles crystalline dust, 100 pile bloodstone dust, 10 pristine toxis spore samples. Artificer. Plate roasted cactus: 100 ferocity, 33% on critical to cause might. Mushroom loaf: +100 vitality, +70 power Bowl firemeat chilli. 15% burning duration.

Wednesday, 5 October 2016

box table drawing characters

https://en.wikipedia.org/wiki/Box-drawing_character http://www.johndcook.com/blog/2008/08/18/entering-unicode-characters-in-linux/ ctrl+shift+u, hex number. Linux:
$ gucharmap
Keyboard:

left cntrl + left shift + u, 255c, enter

or

hold left cntrl + left shift + u, release u, 255c, release ctrnl,sjrt

The numbers can be from the keypad or line across then top 2500: ─ 2502: │ 250C: ┌ 2510: ┐ 2514: └ 2518: ┘ 251c: ├ 2524: ┤ 252c: ┬ 2534: ┴ 253c: ┼ ┌──┬──┐ │ │ │ ├──┼┬┬┤ │ ││││ └──┴┴┴┘

Tuesday, 4 October 2016

http://julialang.org/blog/2015/10/glvisualize http://nbviewer.jupyter.org/github/jr3cermak/robs-kitchensink/blob/master/jupyterhub/notebooks/NCAR-SEA-2015.ipynb https://groups.google.com/forum/#!topic/jupyter/11tzXQ45ZKE

Monday, 26 September 2016

mounting drives specifying offset


$ ls /dev/sda*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sda5

$ sudo fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c7f4b84

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1          2048    999423    997376   487M 83 Linux
/dev/sda2       1001470 976771071 975769602 465.3G  5 Extended
/dev/sda5       1001472 976771071 975769600 465.3G 8e Linux LVM

$ sudo mount /dev/sda2 /mnt/sda2
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
The offset here is 1001470*512 bytes = 512752640 to get to the second partition:

sudo mount -o ro,loop,offset=512752640 /dev/sda /mnt/sda2/
If using an image file, use the filename instead of /dev/sda

Wednesday, 14 September 2016

Yet another backup rsync script. This one works on Ubuntu, 2016 September.

For some reason, my old backup scripts aren't working. A simpler approach is to add this sort of thing to a script called by cron:

rsync -vrmxz --progress --include='*.ipynb' 
  --include='*/' --exclude='*' /home/me /mnt/J/backup/
which starts at the current directory and works through all sub-directories, grabbing each .ipynb file and copying it to /backup. The parameters: a: archive mode. Preserve attributes. v: verbose. Not needed for the silent cron version. z: compress during transfer. Not needed if creating a first copy locally but useful for network xfer. x: one filesystem: don't cross file-system boundaries. r: recursive. m: prune empty directories. Essential. progress: live feedback. Not needed for silent cron version. include: files to include exclude: files to exclude. This is required even though we used an include command. *.* is essential. Make neater using variables:

hour=`date +%H`
i="ipynb"
rsync -vrmxz --progress --include="*.$i" --include='*/' 
  --exclude='*' /home/me /mnt/J/backup/hour$hour/
Regarding ddrescue solutions, watch for squashfs: it will create a compressed backup image that can be mounted. Seems better than ddrescue piped to gzip or so.

Monday, 23 May 2016

future

netatmo

Julia cheat list.

Flattening nested lists: use vec(l) DataFrames: Set data up either column or row centric as desired. If row centric, add a new row with,

using DataFrames
DF = DataFrame

In [106]:

a = DF(a = [1,2,3], b = [4,5,6])
# add a new row at the end. `;` is shorthand  for vcat, I think.
a = [a; DF(a = [7], b = [8])]
Out[106]:
        a b
1 1 4
2 2 5
3 3 6
4 7 8
Column-centric to me, often feels better:

In [109]:

a = DF(a = [1,2,3], b = [4,5,6])
a[:newColumn] = [7,8,9]

Out[109]:
a b newColumn
1 1 4 7
2 2 5 8
3 3 6 9
but then plotting with GadGly is much neater if we have three columns with all the data: c1 -> x axis; c2 -> y axis; c3 = color of plot. At plot time, rearrange so that the column title becomes the color entry:
Out[109]:
a b newColumn
1 1 4 7
2 2 5 8
3 3 6 9

In [110]: b = stack(a, [:a, :b])

Out[110]:
       variable value newColumn
1 a 1 7
2 a 2 8
3 a 3 9
4 b 4 7
5 b 5 8
6 b 6 9

Wednesday, 4 May 2016

Beautiful acoustics log-log scales with GadFly


# Set up acoustics graph parameters.
drop = [log10(i) for i in [500, 700, 900, 5000, 7000, 9000, 50000, 70000, 90000]];
xlist = [[1000:1000:9000]; [10000:10000:100000]]
ylist = [[400:100:900]; [1000:1000:9000]; [10000:10000:100000]];
labx = x -> x in drop ? "": @sprintf("%0.0f", 10^(Float64(x)-3));
laby = y -> y in drop ? "": y > log10(900) ? @sprintf("%.0f", 10^(Float64(y)-3)): @sprintf("%0.1f", 10^(Float64(y)-3));
xt, yt = [log10(i) for i in xlist], [log10(i) for i in ylist]
xl, yl, tit = "f (kHz)", "|Ze| (kΩ)", "High resolution LCR measurement of Prowave device.";



int = res["20160504-1"]["int"];
plt = DataFrame(f = f, absZe=abs(int[f]))
plot(plt, x = :f, y = :absZe, Geom.line, 
  Scale.x_log10(labels=labx), Scale.y_log10(labels=laby), 
Guide.xlabel(xl), Guide.ylabel(yl), Guide.xticks(ticks = xt), Guide.yticks(ticks = yt), Guide.title(tit))
Created,

Thursday, 28 April 2016

favourite trance tunes. :)

Kirsty Hawkshaw: Beatitude

Pkg.update() Julia git permissions ownership error on update.

In /home/me/: sudo chown -Rc $UID .julia/ Jupyter notebook manifested the error in update okay with git errors reported. But on reinstallation of julia the kernel died. Running Julia natively from home/user showed the git write error. Applying the command above changed masses of permissions and then in the native julia from home, using JLD precompiled okay....

Monday, 18 April 2016

Diet and exercise

| DateTime | Item | Energy (MJ) | Goodness | Salt RDA | | | | Exercise, assume 25% efficient | | | |:----------:|:----------------------------------------------:|:----------------------------------:|:-----------------------------:|:------------------------------------:| | 18/4/16:930| Cycle to work | Estimate: 0.25*10N * 2.5km = 25kJ | 1. if 25% efficient, 100kJ | 2.4g(40%) + 1.8g(30%) + 3*0.45g(23%) | | 18/4/16:10 | Two pot noodes, three bags nik-naks, 3 coffees | 2.2 + 1.8 + 3 * 0.7 = 6.1 | | | | | Bowl of Alpen | 1.5 | Good. :D | 0.25g.| | 19/6/16 | Two nik-naks, 2 bananas, five milk choc hob | | | | Cycling to work burns about 1/5 packet of nik-naks. :(

Saturday, 19 March 2016

Guildwars 2 GW2 table

Chef Jewel JA 400 183 KS PS GB JE DS FE | Material | Boon | Duration | Profession | Level | |:------------------------:|:-------------------------------------------------:|:----------:|:----------:|:-----:| | Furious maintenance oil | prec += 0.06Toughness + 0.04Vitality | 30 m | Huntsman | 400 |

Friday, 18 March 2016

Watchlist

Dog soldiers: Andy Four rooms: Alki Inside out: Rob Hannibal and Curb your enthusiasm: Alki

Wednesday, 9 March 2016

recursive pdf search with parsing of text > index file

http://stackoverflow.com/questions/4643438/how-to-search-contents-of-multiple-pdf-files/34571215#34571215

Friday, 12 February 2016

Julia import, post-process and display of solar output. *swoon*

using DataFrames
n0 = readdlm("/home/starnesm/pi/solar/28-0215649a5cff.log");
n1 = readdlm("/home/starnesm/pi/solar/28-0215649a7aff.log");
# Would prefer to overload num2date but not sure how to.
num2date(l) = DateTime(l[1], l[2], l[3], l[4], l[5], l[6]) # Expects on line.
num2dateL(ls) = [num2date(ls[i, 1:6]) for i in (1:size(ls)[1])] # Expects lines.
using Gadfly
r3 = DataFrame(When = num2dateL(n0), T = n0[:, 8], group = "bot")
r3 = vcat(r3, DataFrame(When = num2dateL(n1), T = n1[:, 8], group = "top"))
plot(r3, x=:When, y=:T, color=:group, Geom.line, Guide.xticks(ticks=))
version 2: Python import pandas rt = "c:\\projects\\ipython\\" # cute. Windows is so messy. with file("temps.txt", "r") as a: b = a.readlines() c = [d.split(" ") for d in b] d = [[i[0], i[2], float(i[4])] for i in c] e = pandas.DataFrame(d, columns=['Thermos', 'datetime', 'temps']) [e[e.Thermos == i].temps.plot() for i in set(e.Thermos)]

Wednesday, 3 February 2016

tw16 7dx

plumbing

jtmplumbing.co.uk for 22 mm john guest service valves.

pi

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/software

Wednesday, 20 January 2016

to read. disk errors, cpu bugs

http://danluu.com/file-consistency/

http://danluu.com/cpu-bugs/

Fu practise.

Wed 20 Jan.
7:30 - 7:33.  Walking drill.
7:35 - 7:45.  Kung see.
7.50 - 7:52.  Lau Gar.
7:55 - two man fight
Revised both sides from video.
8:56 fin.