A Pen by Henry Fritz on CodePen.
This file contains 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
import http.client, urllib.parse, json | |
import requests | |
from bs4 import BeautifulSoup | |
import openai | |
import nltk | |
# Download the NLTK Punkt tokenizer model | |
nltk.download('punkt') | |
# Set up your API keys |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
r=1e2,a=[];i=_=>Math.floor(Math.random()*6);di=(v,i,s)=>s.indexOf(v)==i;for(p=0;p<r;p++){a.push(i()+1)};b=a.reduce((a,i)=>a+=i);t=(`\nDICE SIM \nmax: ${Math.max(...a)}\nmin: ${Math.min(...a)}\nmean: ${(b/r)}\nmedian: ${(Math.max(...a)-Math.min(...a))/2}\nmode: ${(a.filter(di).map(x=>[x, a.filter(y=>y===x).length]).sort((a,b)=>a[1]<b[1]?1:-1)[0].join(' -> '))}\nsample: ${r}\nst.dev: ${ Math.sqrt(a.map(x=>{d=x-(b/r);return d*d}).reduce((i,a)=>i+=a)).toFixed(4)}\nresults: ${ a.filter(di).map(x=> [x, a.filter(y=>y===x).length]).sort((a,b)=>a[1]<b[1]?1:-1).map((z,i)=>String.fromCharCode(0x2680+z[0]-1)+':'+z[1]).join(' ')}\nrolls:\n${a.map((x,i)=>`${`${String.fromCharCode(0x267F+x)}`}`).join(' ')}`); |
This file contains 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
<div class="container"> | |
<div class="column"> | |
<h1 class="is-size-1"> | |
<span class="has-text-danger thicc"> Meijer</span> Intern Clockout Calculator | |
</h1> | |
<div class="columns"> | |
<!--in for day--> | |
<div class="column"> | |
<label for="inDay">In for day:</label><br/> | |
<div class="control has-icons-left has-icons-right"> |
A Pen by Henry Fritz on CodePen.
A Pen by Henry Fritz on CodePen.