-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start of refactor: Prototypes.wl is becoming too large, so splitting …
…off related prototype functions (like String* functions) into their own files.
- Loading branch information
1 parent
ff7bc6e
commit 4f0c89e
Showing
6 changed files
with
55 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(* dataset extensions *) | ||
|
||
DatasetMap[ func_ , expr_ ] := Dataset[ AssociationMap[ func, expr ] ] | ||
|
||
DatasetImport[ file_, a___] := Dataset[ Import[ file, a ] ] | ||
|
||
DatasetImportFiles[ files_, a___] := Map[ Dataset, ImportFiles[ files, a]] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(* image extensions *) | ||
|
||
ImageStrictlyPortraitQ[image_Image] := Less @@ ImageDimensions[image] | ||
ImageStrictlyPortraitQ[___] := False | ||
|
||
ImagePortraitQ[image_Image] := LessEqual @@ ImageDimensions[image] | ||
ImagePortraitQ[___] := False | ||
|
||
ImageStrictlyLandscapeQ[image_Image] := Greater @@ ImageDimensions[image] | ||
ImageStrictlyLandscapeQ[___] := False | ||
|
||
ImageLandscapeQ[image_Image] := GreaterEqual @@ ImageDimensions[image] | ||
ImageLandscapeQ[___] := False | ||
|
||
ImageSquareQ[image_Image] := Equal @@ ImageDimensions[image] | ||
ImageSquareQ[___] := False | ||
|
||
Image3DCubeQ[image_Image3D] := Equal @@ ImageDimensions[image] | ||
Image3DCubeQ[___] := False | ||
|
||
ImageCropResize[image_Image, dims_List] := First[ ConformImages[ {image}, dims, "Fill"]] | ||
ImageCropResize[___] := $Failed | ||
|
||
AlphaChannelQ[image_Image] := If[RemoveAlphaChannel[image] == image, False, True] | ||
AlphaChannelQ[image_Image3D] := If[RemoveAlphaChannel[image] == image, False, True] | ||
AlphaChannelQ[___] := False |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(* paclet *) | ||
|
||
PacletInformationDataset[paclet_String] := Dataset @ Association @ PacletInformation[paclet] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(* strings *) | ||
|
||
StringRest[string_String] := StringTake[string,{2,-1}] | ||
|
||
StringMost[string_String] := StringTake[string,{1,-2}] |