| name | description |
|---|---|
image-prompt |
Generate optimized prompts for Google's Nano Banana image generators (Nano Banana 2 and Nano Banana Pro). Use when the user invokes /image-prompt or asks to create, write, craft, or generate a prompt for Nano Banana, Gemini image generation, or AI image creation. Also triggers when the user says "image prompt", "nano banana prompt", "nano banana 2", or "help me describe an image".
|
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
| // Gradle build file for the book "Mockito Made Clear" by Ken Kousen | |
| plugins { | |
| id 'java' | |
| } | |
| // depedency versions are in versions.gradle | |
| apply from: 'versions.gradle' | |
| group 'com.kousenit' | |
| version '1.0' |
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
| import groovy.transform.CompileStatic | |
| @CompileStatic | |
| class Jumble { | |
| // dictionary words avail on Mac (or any Un*x system based on BSD) | |
| private List wordList = | |
| new File('/usr/share/dict/words').readLines() | |
| .findAll { it.size() == 5 || it.size() == 6 } | |
| String solve(String clue) { |
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
| import groovy.json.* | |
| String jsonTxt = 'http://api.open-notify.org/astros.json'.toURL().text | |
| def json = new JsonSlurper().parseText(jsonTxt) | |
| println "There are ${json.number} people in space" |
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
| assert sql.rows('select * from ASTRONAUTS').size() == 6 | |
| sql.eachRow('select * from ASTRONAUTS') { row -> | |
| println "${row.name.padRight(20)} aboard ${row.craft}" | |
| } |
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
| @GrabConfig(systemClassLoader=true) | |
| @Grab('com.h2database:h2:1.4.200') | |
| Sql sql = Sql.newInstance(url: 'jdbc:h2:~/astro', driver: 'org.h2.Driver') | |
| sql.execute ''' | |
| create table if not exists ASTRONAUTS( | |
| id int auto_increment primary key, | |
| name varchar(50), | |
| craft varchar(50) | |
| ) |
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
| import groovy.json.* | |
| import groovy.transform.* | |
| import com.google.gson.Gson | |
| @Grab('com.google.code.gson:gson:2.8.6') | |
| @Canonical | |
| class Assignment { String name; String craft } | |
| @Canonical |
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
| import java.time.LocalDate; | |
| import java.time.Month; | |
| import static java.time.temporal.ChronoUnit.DAYS; | |
| import static java.time.temporal.ChronoUnit.MONTHS; | |
| import static java.time.temporal.ChronoUnit.YEARS; | |
| public class DaysToElection { | |
| private static String pluralize(long num) { | |
| return num == 1 ? "" : "s"; |
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
| #!/usr/bin/env groovy | |
| import java.time.LocalDate | |
| import java.time.Month | |
| import static java.time.temporal.ChronoUnit.* | |
| LocalDate electionDay = LocalDate.of(2020, Month.NOVEMBER, 3) | |
| LocalDate now = LocalDate.now() |
I hereby claim:
- I am kousen on github.
- I am kenkousen (https://keybase.io/kenkousen) on keybase.
- I have a public key whose fingerprint is 803D 8209 EE54 9E6B 716A D409 17B0 B54A 9BF8 18DD
To claim this, I am signing this object:
NewerOlder