Website hosting

On the cheap...

Hugo So this whole site is generated from markdown using the Hugo blog engine. And it’s hosted on GitLab completely free. See how I did it. 000webhost / Hostinger Free hosting is available from 000webhost – albeit with an advert. But you can go pro for as little as $2 a month. It did amuse me that I hit two verification issues on the registration page! Please use an email address from a reputable email provider (like GMail or Outlook). [Read More]

Banks

Challenger banks

  • Aldermore
  • Atom Bank
  • Metro Bank
  • Monzo
  • N26
  • OakNorth
  • Shawbrook Bank
  • Starling Bank
  • Tandem Bank

Investment banks

  • barclayscapital.com
  • db.com
  • ml.com
  • gs.com
  • rbs.com
  • morganstanley.com
  • citigroup.com
  • lloydsbanking.com
  • maninvestments.com
  • btm.com
  • mwam.com
  • bluecrestcapital.com
  • glgpartners.com

References

Ports blocked over VPN

Or are they?

A problem that has followed me around for the last two jobs: I can’t access the git server using ssh authentication when I’m tethered. Yet cloning via https is fine… it kinda feels like ports are being blocked by the VPN. However, it seems to be my EE phone not working correctly over IPv6, or rather not switching back to IPv4 correctly. And the fix is to create another APN with only IPv4 enabled. [Read More]

Chess

Tips and tricks

Aims Develop towards the centre Castle early and castle often State When both sides have similarly active pieces it’s known as an even or balanced position Relative/absolute pins Notation Symbol Meaning + Check ++ Double check # Checkmate 0-0 Castles kingside 0-0-0 Castles queenside ! Good move ? [Read More]

Big data

A consolidated list of sources

Sources of big data Big data communities and platforms http://archive.ics.uci.edu/ml/index.php Kaggle Statista Data World Data Hub AWS open data Google public data Crime https://www.fbi.gov/services/cjis/ucr https://www.pcr.uu.se/research/UCDP/ https://www.drugabuse.gov/drug-topics/trends-statistics Internet https://wiki.dbpedia.org/ https://trends.google.com/trends/explore Reddit datasets Government https://www.ukdataservice.ac.uk/ https://data.gov.uk/ https://data.london.gov.uk/ https://www.data.gov/ https://opengovernmentdata.org/data/ https://www.cia.gov/library/publications/the-world-factbook/ https://data.gov.au/ https://opendata.cityofnewyork.us/ https://open.canada.ca/en/open-data Mathematics I got 717 problems… Project Euler problems Health https://healthdata.gov/ https://digital.nhs.uk/data-and-information/data-collections-and-data-sets https://www.who.int/data/collections https://www.who.int/gho/maternal_health/reproductive_health/en/ http://portals.broadinstitute.org/cgi-bin/cancer/datasets.cgi https://www.cdc.gov/datastatistics/ https://www.fda.gov/drugs/drug-approvals-and-databases/drugsfda-data-files https://github.com/publichealthengland/coronavirus-dashboard 1000 Genomes project USDA food composition Business https://www. [Read More]

Profiling resources

Tools

  • valgrind
  • perf
  • /usr/bin/time --verbose
  • Tracy
  • htop

Compiler options

Enabling in gcc

Use -p for prof and -pg for gprof. But it will take longer to run.

References

Hashing

Hash tables

A hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.

Hashing derives a fixed size result from an input. See Hash table.

Properties of a hashing algorithm

  • Stable: the same input generates the same output every time
  • Uniform: the hash values should be uniformly distributed through the available space
  • Efficient: the cost of generating a hash must be balanced with application need
  • Secure: the cost of finding data that produces a given hash is prohibitive

String hashing

  • Sum ASCII values – not uniform, not secure
  • Fold bytes of every four characters into an integer – not secure
  • CRC32 – not secure
  • MD5 – not efficient, not secure
  • SHA2 – stable, uniform, not efficient, secure

Handling collisions

  • Chaining
  • Open addressing
  • Load/fill factor – the ratio of filled hash table array slots
  • DFS/BFS – depth-first search versus breadth-first
  • Brute force
  • Greedy algo – stall at local maxima
  • Dynamic programming
  • Longest common subsequence
  • Simulated annealing
  • Random solutions
  • Polynomial
  • PTAS – approximation scheme
  • More Hash Function Tests
  • Linear probing
  • Robinhood hashing
  • Cuckoo hashing
  • Preimage (attack)
  • URL shortener