This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.
$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
function trigger(el, eventType) { | |
if (typeof eventType === 'string' && typeof el[eventType] === 'function') { | |
el[eventType](); | |
} else { | |
const event = | |
eventType === 'string' | |
? new Event(eventType, {bubbles: true}) | |
: eventType; | |
el.dispatchEvent(event); | |
} |
import inspect | |
import json | |
import re | |
import typing | |
from inspect import isclass, getdoc | |
from types import NoneType | |
from pydantic import BaseModel, Field | |
from pydantic.fields import FieldInfo | |
from typing import Any, Type, List, get_args, get_origin, Tuple, Union, Optional |
def top_k_top_p_filtering(logits, top_k=0, top_p=0.0, filter_value=-float('Inf')): | |
""" Filter a distribution of logits using top-k and/or nucleus (top-p) filtering | |
Args: | |
logits: logits distribution shape (vocabulary size) | |
top_k >0: keep only top k tokens with highest probability (top-k filtering). | |
top_p >0.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering). | |
Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751) | |
""" | |
assert logits.dim() == 1 # batch size 1 for now - could be updated for more but the code would be less clear | |
top_k = min(top_k, logits.size(-1)) # Safety check |
Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...
Italics *italics* or _italics_
Underline italics __*underline italics*__
using UnityEngine; | |
using UnityEngine.Assertions; | |
using System.Text; | |
#if UNITY_EDITOR | |
using System.Net; | |
using System.Net.Sockets; | |
#else | |
using System; | |
using System.IO; |