Skip to content

Instantly share code, notes, and snippets.

"""Update weather data for sessions in an ActivityLog2 database using data
from the Meteostat service. The script will find sessions that have
latitude/longitude coordinates but no weather data, and will attempt to fetch
weather info from the Meteostat service and store it attached to the each
session. Sessions that already have weather data will not be updated.
For ActivityLog2, see https://github.com/alex-hhh/ActivityLog2
For Meteostat, see https://meteostat.net/en/
To use it, you will need to install Python 3, then install the meteostat
;; A space invaders game in Racket
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com)
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
@alex-hhh
alex-hhh / ishido.rkt
Created July 2, 2020 06:26
Ishido Game Impementation
#lang racket
;; Ishido Game Implementation
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com)
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
@alex-hhh
alex-hhh / tetris-5.rkt
Created March 28, 2020 02:33
Full program for the "A Game of Tetris" blog posts.
;; A tetris game -- partial implementation, part 5
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com)
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
#lang racket/gui
;; Copyright (c) 2018 Alex Harsanyi
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions: