Graham Knapp

AI bookmarks design patterns django e57 feature flags pointcloud python Rhino 3D talks TypeScript wind engineering

Ma reconversion dans la tech 🔗

written by Graham Knapp on 2024-11-08

En novembre 2011 j'ai eu l'opportunité de parler de ma reconversion du monde du bâtiment vers le métier de développeur informatique avec les apprenantes de l'Ada Tech School, Nantes. J'ai parlé de ma découverte de la programmation a partir de 2015 dans mon travail d'ingénieur chef de projet au CSTB, mon parcours de formation, mes craintes et à-prioris par rapport au monde de l'informatique et la réalité de mon quotidien au startup Acernis.

C'était sympa à faire - j'encourage tout le monde de faire ce type d'exercice avant qu'il soit trop tard pour se remettre dans la position de débutant sur le chemin. Bon courage à toutes les personnes qui se trouvent sur ce type de chemin en ce moment!


City Modelling with Generative AI: Tool or toy? 🔗

written by Graham Knapp on 2023-01-02

AI tools such as Chat-Gpt (text generation) and Dall-E (image generation) are making impressive leaps, allowing people to rapidly generate text, code and images from simple input prompts. The next frontier in generative AI may be 3D modelling, and OpenAI recently released the open source 3D modelling software Point·E. Could computer games, films and even architecture use these techniques to replace or improve manual city modelling?

33 3D mesh models, each generated from the text prompt "a buildng"​

33 3D mesh models, each generated from the text prompt "a buildng"​

Read Full Post


Bookmark: Python Machine Learning by Sebastian Raschka & Vahid Mirjalili 🔗

written by Graham Knapp on 2021-09-14

As a python programmer with a scientific background I found this to be a really useful primer on all aspects of machine learning and a great overview of the main python libraries for machine learning.

​ Key Ideas / Takeaways

  1. The book covers three main types of machine learning which it categorises as Supervised learning, Unsupervised learning and Reinforcement learning.
  2. Python is used to illustrate the core algorithms in each section, for instance a perceptron implementation is given in Python.
  3. The authors then go on to show how to use the methods in Python with the most popular libraries and frameworks.
  4. The main libraries used are scikit-learn and TensorFlow.

The lack of Pytorch coverage is the most glaring omission - will there be a 4th edition ?

Read Full Post


🎼Trouver un musicothérapeute🎼 🔗

written by Graham Knapp on 2021-07-20

Ma femme est non seulement une superbe musicienne mais aussi une musicothérapeute : elle soigne les gens, ou les aide à se soigner eux-mêmes, avec de la musique!

J'ai crée cette carte des musicothérapeutes français avec la méthode suivante:

  • Scrape le site web de la Fédération Française de Musicothérapie avec Requests et Beautiful Soup
  • Géocoder les addresses de tous les musicothérapeutes via OSM (cette partie prend plusieurs minutes)
  • Créer une carte avec un marqueur par musicothérapeute avec Folium.
  • Enregistrer la carte sous format html

J'utilise la fonction suivantes pour générer mes tags HTML pour les marqueurs:

def tagged(txt:str, tag:str):
    str = txt.strip()
    if str:
        return f"<{tag}>{txt}</{tag}>\n"
    else:
        return ""

Voici le script complet sous forme de Jupyter Notebook.


Fail fast - coder sereinement : Tests dans Jupyter 🔗

written by Graham Knapp on 2021-06-14

Following the "fail fast" principal I have found it really useful when coding engineering and data science code in Jupyter to follow this pattern:

  1. Write the code in a Jupyter notebook - this is a great option for scientific and technical computing as it lets you combine code, visualisation and documentation all in the same place.
  2. Find independent sample calculations from text books or other commonly used tools - the key is that the examples should not be generated from your own code.
  3. Add sample calculations with assert statements in the same cell as the function definition to demonstrate that the function works.

This last point is the key to the method I suggest here - the tests are run every time you update your definition but if the test is slow it will only be run the first time you reopen the notebook, once you are happy with the function you can reuse it without re-running the tests

https://github.com/dancergraham/fail_fast


Aerodynamic Behaviour and Structural Safety of Tower Cranes 🔗

written by Graham Knapp on 2021-05-18

Upon moving to work at the French national scientific research organisation for the built environment, CSTB, I was surprised to see the attention to detail in tower crane studies - looking at the risk of strong winds, construction site exposure and swirling winds potentially setting tower cranes rotating.

Following some LinkedIn posts and academic articles on the subject I was invited by the UK Wind Engineering Society to give an online talk. I gave some of the history of the subject, the key factors influencing risk levels and the methods used by the CSTB and by French insurers to assess and reduce risk levels.

📺Watch here

Read Full Post


En attendant la PyConFr (02/2021) — Traitement des résultats d’essai en soufflerie 🔗

written by Graham Knapp on 2021-02-18

Un résumé de mes expériences de l'utilisation de Python en équipe d'ingénierie du vent https://pyvideo.org/en-attendant-la-pyconfr-2020-2021/traitement-des-resultats-dessai-en-soufflerie.html


Game of life in Rhino 3D 🔗

written by Graham Knapp on 2020-12-18

Hello.

Prompted by this year’s Advent Of Code challenge I have implemented a 3D version of the game of life in Python in Rhino 7.

Here are some images renders from individual steps in my solution, followed by the code I used to generate them.

A rendered 3D image of dozens of white spheres, densely packed, against a white background

Read Full Post


RhinoPython: may the source be with you! 🔗

written by Graham Knapp on 2019-05-12

Hello everyone,

I wrote a script to help me code in python and learn RhinoCommon and decided to share it with you 😜

As you may know, the rhinoscriptsyntax library is written in Python and uses rhinocommon functions, also in Python, under the hood. In order to look up the underlying code you can open up the full python file, you can use the inspect module or you can save the script below to your computer and run it each time you want to look up a particular function. For instance if you search for ‘bounding’ you get the following options:

Search and select dialog box for library function

Read Full Post


Here comes the sun 🔗

written by Graham Knapp on 2019-03-23

I spend too much of my life sitting alone in an office working on my conputer or looking at my smartphone. My regular dose of fresh air comes from my bike - I ride to work and back regularly - but I also enjoy getting out into the garden when I can. Trouble is, I dont really enjoy gardening! I do get a lot of satisfaction from pruning the trees and shrubs, especially if it involves some climbing and as a result we now have an enormous pile of branches, leaves and twigs in the bottom of the garden. I recently found a new activity which satisfies my creative side and starts to diminish the stack o' cuttings : building 'dead hedge' style walls and fences.

garden03

Read Full Post