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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("Hello, Python") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| " 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT ?item ?itemLabel ?height | |
| WHERE | |
| { | |
| VALUES ?o { | |
| wd:Q48352 | |
| wd:Q2285706 | |
| } | |
| ?item wdt:P21 wd:Q6581097; | |
| wdt:P39 ?postition. | |
| ?postition wdt:P279 ?o. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MySum do | |
| def sum(x, y), do: x + y | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.config = { | |
| files: { | |
| javascripts: { | |
| joinTo: "js/app.js" | |
| }, | |
| stylesheets: { | |
| joinTo: "css/app.css" | |
| }, | |
| templates: { | |
| joinTo: "js/app.js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module EffectsTest where | |
| import Html exposing (..) | |
| import Html.Events exposing (onClick) | |
| import StartApp exposing (App) | |
| import Task exposing (Task) | |
| import Effects exposing (Effects, Never) | |
NewerOlder