Skip to content

Instantly share code, notes, and snippets.

import requests
import pandas as pd
from datetime import datetime, timedelta
# API Key and URL
API_KEY = '0d25bd311d7d68b831ea2c0e952e6a6a'
url = "https://api.marketstack.com/v1/eod"
# Calculate date range (last 30 days)
today = datetime.today().strftime('%Y-%m-%d')
@ssrihari
ssrihari / clojure-learning-list.md
Last active April 17, 2025 15:56
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# This example shows one way to access subsets of CEDEN data via the California Open Data Portal API (it's not
# necessarily the only or best way though) - if you find any problems or have questions, please contact: [email protected]
# This example applies to the following CEDEN datasets, which have been split into separate
# resources by year (due to file size limitations)
# Water Chemistry: https://data.ca.gov/dataset/surface-water-chemistry-results
# Habitat: https://data.ca.gov/dataset/surface-water-habitat-results
# Tissue: https://data.ca.gov/dataset/surface-water-aquatic-organism-tissue-sample-results
# It assumes that you have your own API key saved in a system environment variable
@daltare
daltare / ceden_arrow_files_example.r
Last active November 1, 2022 21:34
CEDEN Arrow Files Example
# This example shows how to work with CEDEN data in the Apache parquet file format, using the arrow package in R
# The data (in parquet file format) for each type of CEDEN data is available on the California Open Data Portal at the
# following links:
# Water Chemistry: https://data.ca.gov/dataset/surface-water-chemistry-results/resource/f4aa224d-4a59-403d-aad8-187955aa2e38
# Habitat: https://data.ca.gov/dataset/surface-water-habitat-results/resource/0184c4d0-1e1d-4a33-92ad-e967b5491274
# Tissue: https://data.ca.gov/dataset/surface-water-aquatic-organism-tissue-sample-results/resource/dea5e450-4196-4a8a-afbb-e5eb89119516
# Toxicity: https://data.ca.gov/dataset/surface-water-toxicity-results/resource/a6c91662-d324-43c2-8166-a94dddd22982
# Benthic Macroinvertebrates: https://data.ca.gov/dataset/surface-water-benthic-macroinvertebrate-results/resource/eb61f9a1-b1c6-4840-99c7-420a2c494a43
# load packages
@raulqf
raulqf / Install Tensorflow2 with GPU - Ubuntu 24.04.md
Last active March 5, 2025 04:24
Install Tensorflow2 with GPU - Ubuntu 24.04

Install Tensorflow2 with GPU in Ubuntu 24.04

Installation of Tensorflow2 with GPU support is easy and the only complication can be arisen from the CUDA compability which in turns depends on the Nvidia driver version. Before going farther, please check if your Nvidia Video Card is compatible with the required versions that are defined in this gist, use this link.

Tensorflow offers in its website a table of the compatibility between libraries for the target OS. You can visit that website in the following COMPATIBILITY TABLE that points to the Tensorflow installation from source for linux. For the time writing this gist, Tensorflow2 v2.17.0 requires CUDA v12.3 and CUDNN v8.9. As CUDA v12.6 gives support for Ubuntu 24.04, I've replaced CUDA v12.3 with CUDA v12.6, but maintaining CUDNN v8.9. It is really important to match the exact version of CUDNN, otherwise tensorflow will have proble

@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 9, 2025 14:04
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@opieters
opieters / gallery_creator.py
Last active July 10, 2022 17:50
Python script to generate configuration for a lightGallery photo gallery in Jekyll.
@gbaman
gbaman / HowToOTG.md
Last active March 26, 2025 10:11
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int