Labels

Android (1) Apache (1) bash (2) boost (2) C (37) C++ (5) cheatsheet (2) CLion (6) css (3) Debian (34) DL (17) dns (1) Docker (3) Dreamweaver (2) Eclipse (3) fail2ban (5) git (6) GitHub (5) Hacking (4) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (33) javascript (3) Linux (182) Mac (21) Machine Learning (1) mySQL (53) Netbeans (6) Networking (1) Nexus (1) OpenVMS (6) Oracle (4) Pandas (3) php (17) Postgresql (8) Python (9) raid (1) RedHat (15) Samba (2) Slackware (52) SQL (14) ssh (1) svn (1) tar (1) ThinkPad (1) Virtualbox (4) Visual Basic (2) Visual Studio (1) Windows (7) wire (1)

Saturday, 27 April 2019

Categorical and Continuous Variables - Nominal, Dichotomous, Ordinal, Interval, Ratio

Categorical and Continuous Variables

Categorical variables are also known as discrete or qualitative variables. Categorical variables can be further categorized as either nominalordinal or dichotomous.

Friday, 22 February 2019

Linux - remount filesystem rw

mount -o remount,rw / (might have used only w)

lilo.conf - Check boot parameter is correct /dev/sd* matches where drive is connected.
run lilo from /boot (if need be use lilo -b /dev/sd* where sda is the drive not the partition.
Check root = /dev/sd* is the correct partition

Check /etc/fstab has correct /dev/sd* entries
 

Wednesday, 23 January 2019

Normalization Normal forms

First Normal Form 1NF

No repeating columns or columns contain only a single value.


Second Normal Form 2NF

As per 1NF but each non PK value can be uniquely identified by the PK

Third Normal Form 3NF

As per 2NF but each no PK value can ONLY be identified by the PK

Comparison between SQL and Pandas

Comparison with SQL


Thursday, 10 January 2019

VirtualBox command line. Removing innaccessable VMs change machine location

To delete virtual machines from the command line, first I removed the *.vbox *.vmdk files etc (basically the folder that these files are in).

Then;
VBoxManage list vms (this lists virtual machines)
VBoxManage unregistervm ********* (where *** is the number of the VM as shown by the previous command).

To change default location of VM's
vboxmanage setproperty machinefolder /path/to/directory/
Note use path in quotation marks if folder needs a space, example;
vboxmanage setproperty machinefolder "/var/VirtualBox VMs"

Friday, 4 January 2019

Mac add Open With to Right Click menu

Add OPEN WITH to Right click menu
  1. Open Automator and select Service document type.
  2. Select Files and Folders in the top Service receives selected menu
  3. Search for and select the Open Finder Items action.
  4. Now select TextEdit in Open with:
  5. Save the service with a name you want to see in the menus
You can now find this by: 
  • Right-clicking the file > Services

Tuesday, 1 January 2019

Renaming a file to include date

To rename a file to include the date in the filename use the following:

mv myfile.txt myfile_$(date + %d-$m-%Y).txt

This can be useful when creating backup files.

A script called by cron like the below might be useful.

#!/bin/bash
rm myfile_*.tar
tar -cf myfile.tar myfile.txt && mv myfile.tar myfile_$(date + %d-$m-%Y).tar

Saturday, 29 December 2018

mySQL and phpMyAdmin

https://docs.slackware.com/howtos:databases:install_mysql_on_slackware


See here for a more up to date account of installing Apache, php, mySQL and phpMyAdmin on Debian.

Thursday, 27 December 2018

smb.conf

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba, 
# read the Samba-HOWTO-Collection. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the 
# Samba-Guide which is generated daily and can be downloaded from: 
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a ; (semi-colon) or a # (hash) 
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors. 
#
#======================= Global Settings =====================================