Wolfram Research

Function Repository Resource:

PartyParrot

Source Notebook

Get an animated party parrot

Contributed by: Rick Hennigan

ResourceFunction["PartyParrot"]["name"]

gives an animated party parrot with the specified name.

ResourceFunction["PartyParrot"][{"name1",,"namen"}]

gives multiple party parrots.

ResourceFunction["PartyParrot"][parrot,prop]

gives the specified property.

ResourceFunction["PartyParrot"][parrot,prop,fmt]

formats the result as fmt.

ResourceFunction["PartyParrot"][]

gives a list of all party parrot names.

Details and Options

ResourceFunction["PartyParrot"]["name"] is equivalent to ResourceFunction["PartyParrot"]["name","SimpleAnimation"].
The following is a list of some valid properties along with their typical values:
"AlternateNames" {"alt1",,"altn"} synonyms that can be used equivalently for "name"
"ByteArray" ByteArray [ ] a ByteArray representing the GIF data
"Comment" "comment" or None a string used as a tooltip for the animation
"Dataset" Dataset [ ] a Dataset for all properties
"Elements" {"elem1",,"elemn"} a list of GIF Import elements
"FlagParrot" True or False whether or not the parrot is based on a flag image
"Format" "GIF" the Import format
"HighResolution" True or False whether or not the parrot animation is composed of high resolution images
"Name" "name" the canonical name of the parrot
"Properties" {"prop1",,"propn"} the full list of valid properties
"SimpleAnimation" an animated view of the parrot with no displayed controls
"Source" URL [ ] the webpage where the image was downloaded from
"URL" URL [ ] the direct URL to the original image
"UUID" "uuid" an identifier for the parrot
Additionally, any GIF import elements can be used as properties, including:
"Animation" animated GIF represented as an animation object
"Data" array of RGB color values
"Graphics" first frame of a GIF file, given as a Graphics object
"GraphicsList" frames of an animated GIF as a list of Graphics objects
"Image" first frame of a GIF file, given as an Image object
"ImageList" frames of an animated GIF as a list of Image objects
"RawData" array of color map indices
Most parrot images are obtained from Cult of the Party Parrot. See the Author Notes section for more information on sources.
The original party parrot is based on the kākāpō Sirocco.

Examples

Basic Examples (10) 

Get a party parrot by name:

In[1]:=
ResourceFunction["PartyParrot"]["Original"]
Out[1]=

Get multiple party parrots:

In[2]:=
ResourceFunction[
 "PartyParrot"][{"Hmm", "EverythingIsFine", "PartyWolf", "Nyan", "Birdnardo"}]
Out[2]=

Get a list of party parrot names:

In[3]:=
ResourceFunction["PartyParrot"][] // Short
Out[3]=

Get a specific party parrot property:

In[4]:=
ResourceFunction["PartyParrot"]["Ceiling", "Thumbnail"]
Out[4]=
In[5]:=
ResourceFunction["PartyParrot"]["ThumbsUp", "Animation"]
Out[5]=

Check the source of a party parrot:

In[6]:=
ResourceFunction["PartyParrot"]["Original", "Source"]
Out[6]=
In[7]:=
ResourceFunction["PartyParrot"]["PartyWolf", "Source"]
Out[7]=
In[8]:=
ResourceFunction["PartyParrot"]["Money", "Source"]
Out[8]=

Possible party parrot properties:

In[9]:=
ResourceFunction["PartyParrot"]["Dab", "Properties"]
Out[9]=

Get multiple properties:

In[10]:=
ResourceFunction[
 "PartyParrot"]["Dab", {"SimpleAnimation", "AlternateNames", "Source"}]
Out[10]=

Format as a Dataset:

In[11]:=
ResourceFunction[
 "PartyParrot"]["PartyWolf", {"Source", "ByteArray", "Thumbnail"}, "Dataset"]
Out[11]=

Get multiple properties for multiple party parrots and format as a Dataset:

In[12]:=
ResourceFunction[
 "PartyParrot"][{"Ceiling", "Hypno", "HeadBanging", "Dab", "Gentleman", "Quad", "Nyan"}, {"Name", "Thumbnail", "Comment"}, "Dataset"]
Out[12]=

Get a Dataset for all properties:

In[13]:=
ResourceFunction["PartyParrot"]["Stable", "Dataset"]
Out[13]=

Scope (8) 

Get a party parrot by its Slack alias:

In[14]:=
ResourceFunction["PartyParrot"][":parrot_sleep:"]
Out[14]=
In[15]:=
ResourceFunction[
 "PartyParrot"][":akak:", {"Name", "SimpleAnimation", "Source"}]
Out[15]=

Many parrots have alternate names that can be used in place of their canonical names:

In[16]:=
ResourceFunction["PartyParrot"]["Pizza"]
Out[16]=
In[17]:=
ResourceFunction["PartyParrot"]["\|01f355"]
Out[17]=
In[18]:=
ResourceFunction["PartyParrot"]["\|01f355Parrot"]
Out[18]=

Get the total number of available party parrots:

In[19]:=
Length[ResourceFunction["PartyParrot"][]]
Out[19]=

Get a random party parrot:

In[20]:=
ResourceFunction["PartyParrot"]["Random"]
Out[20]=

Get three random party parrots:

In[21]:=
ResourceFunction["PartyParrot"]["Random" -> 3]
Out[21]=

A function can be given as the first argument to filter parrots based on some condition:

In[22]:=
ResourceFunction["PartyParrot"][
 StringContainsQ[#Name, "Bird"] &, {"Name", "Comment", "Thumbnail"}, "Dataset"]
Out[22]=

Choose only the high resolution parrots that also have a comment:

In[23]:=
ResourceFunction[
 "PartyParrot"][#HighResolution && StringQ[#Comment] &, "Name"]
Out[23]=

Get a list of party parrots with Slack shortcuts:

In[24]:=
ResourceFunction["PartyParrot"][
 StringQ[#SlackShortcut] &, {"SlackShortcut", "Thumbnail"}, "Dataset"]
Out[24]=

Applications (1) 

Remind yourself to add examples to the "Applications" section:

In[25]:=
ResourceFunction["PartyParrot"]["Stub"]
Out[25]=

Properties and Relations (3) 

Party parrots are originally based on Sirocco, a YouTube superstar and member of the endangered Kākāpō species:

In[26]:=
ResourceFunction["PartyParrot"]["Sirocco"]
Out[26]=

Party parrots are often added based on current events:

In[27]:=
ResourceFunction[
 "PartyParrot"][{"COVID19", "StayTFHome", "TP", "WorkFromHome"}]
Out[27]=

Downloaded images are cached locally in $UserBaseDirectory:

In[28]:=
cacheDir = FileNameJoin[{$UserBaseDirectory, "ApplicationData", "PartyParrot", "Cache", "Images"}];
Short[files = FileNames["*.gif", cacheDir]]
Out[17]=
In[29]:=
Import[RandomChoice[files], "Thumbnail"]
Out[29]=

This directory can be safely deleted in order to reset the cache for future sessions:

In[30]:=
DeleteDirectory[cacheDir, DeleteContents -> True]

Possible Issues (2) 

Not all party parrots are actually parrots (they do all party, however):

In[31]:=
ResourceFunction[
 "PartyParrot"][{"PartyWolf", "PartyGopher", "Doge", "Nyan", "PartySloth"}]
Out[31]=

Invalid names result in an error:

In[32]:=
id = "NotAPartyParrot";
In[33]:=
ResourceFunction["PartyParrot"][id]
Out[33]=

Replace with a missing party parrot party parrot instead:

In[34]:=
Quiet[Check[ResourceFunction["PartyParrot"][id], ResourceFunction["PartyParrot"]["ParrotNotFound"]]]
Out[34]=

Neat Examples (1) 

Make a teleporting party parrot:

In[35]:=
orange = ResourceFunction["PartyParrot"]["PortalParrotOrangePortal", "ImageList"];
blue = Most[
   ResourceFunction["PartyParrot"]["PortalParrotBluePortal", "ImageList"]];
grids = Apply[Grid[{{#, 
Item["", ItemSize -> Fit], #2}}]& , 
Transpose[{
RotateLeft[orange, 11], blue}], {1}];
ResourceFunction["SimpleListAnimate"][grids, 15]
Out[30]=

Resource History

Related Resources

Author Notes

Most images come from Cult of the Party Parrot.

The party parrots with Slack shortcuts come from Slackmojis.

The PartyWolf animation is based on original work by Cody Woodard.

Sirocco comes from New Zealand.

License Information