Skip to content

Instantly share code, notes, and snippets.

View urfolomeus's full-sized avatar

Alan Gardner urfolomeus

View GitHub Profile
@urfolomeus
urfolomeus / index.html
Created September 5, 2023 17:10
HighCharts HTML example for DocRaptor
<html>
<head>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
</head>
"""
" Simple D&D Flavor Text Generator
"""
import openai
import pprint
# Please sign up for an OpenAI account, generate an API key and paste it below
# https://platform.openai.com/docs/api-reference/authentication
openai.api_key = "ADD VALID OPENAI API KEY HERE"
SELECT DISTINCT ?item ?itemLabel ?height
WHERE
{
VALUES ?o {
wd:Q48352
wd:Q2285706
}
?item wdt:P21 wd:Q6581097;
wdt:P39 ?postition.
?postition wdt:P279 ?o.
defmodule MySum do
def sum(x, y), do: x + y
end
defmodule Roller do
@moduledoc """
Responsible for making dice roles.
"""
@doc """
Parses the given roll string, rolls the result and returns it.
"""
@spec roll(String.t(), function) :: integer
def roll(die_string, rand \\ :rand) do

Calculating List.length

defmodule MyList do
  def length(list) do
    length(list, 0)
  end
  
  defp length([],    count), do: count
 defp length([_|t], count), do: length(t, count + 1)
exports.config = {
files: {
javascripts: {
joinTo: "js/app.js"
},
stylesheets: {
joinTo: "css/app.css"
},
templates: {
joinTo: "js/app.js"
module EffectsTest where
import Html exposing (..)
import Html.Events exposing (onClick)
import StartApp exposing (App)
import Task exposing (Task)
import Effects exposing (Effects, Never)

curries

01397 705 192

starters

poppodoms

  1. 2 x veg pakora
  2. 2 x chicken pakora

Elixir Notes

Elixir Sips

Ep 2

Numbers

1 + 1 ``