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
| // require indexing here | |
| // https://gist.github.com/kishida/0ac9f96cbf9f4d4f91906f74205472c8 | |
| package naoki.openai; | |
| import javax.swing.*; | |
| import java.awt.BorderLayout; | |
| import java.time.Duration; | |
| import java.util.List; |
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
| package neoki.slm; | |
| import com.mxgraph.model.mxCell; | |
| import com.mxgraph.model.mxGeometry; | |
| import com.mxgraph.swing.mxGraphComponent; | |
| import com.mxgraph.view.mxGraph; | |
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.datatransfer.DataFlavor; |
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
| package neoki.slm; | |
| import javax.swing.*; | |
| import java.awt.*; | |
| import com.mxgraph.swing.mxGraphComponent; | |
| import com.mxgraph.view.mxGraph; | |
| public class JGraphXExample { | |
| public static void main(String[] args) { |
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
| package neoki.slm; | |
| import java.awt.*; | |
| import javax.swing.*; | |
| public class FukuroMojiDrawer extends JPanel { | |
| @Override | |
| protected void paintComponent(Graphics g) { | |
| super.paintComponent(g); |
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
| package neoki.slm; | |
| import java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.function.Consumer; | |
| public class HatenaReader { | |
| static class Header{ String baseName; String image; String title; | |
| String date; boolean published;} |
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 javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| import java.util.*; | |
| public class GenerateApp extends JFrame implements ActionListener { | |
| int count; | |
| private JTextField textField1; | |
| private static final int SIZE = 20; |
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
| package naoki.openai; | |
| import com.mongodb.client.MongoClients; | |
| import com.mongodb.client.model.Filters; | |
| import com.theokanning.openai.OpenAiHttpException; | |
| import com.theokanning.openai.embedding.EmbeddingRequest; | |
| import com.theokanning.openai.embedding.EmbeddingResult; | |
| import com.theokanning.openai.service.OpenAiService; | |
| import java.io.IOException; | |
| import java.nio.file.Files; |
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
| package naoki.openai; | |
| import java.io.IOException; | |
| import java.io.UncheckedIOException; | |
| import java.util.Map; | |
| import org.jsoup.Jsoup; | |
| import org.jsoup.nodes.Element; | |
| public class ArticleFinder { | |
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
| /* | |
| * VeloPoi.java | |
| * | |
| * Created on 2005/02/19, 9:09 | |
| */ | |
| package velopoi; | |
| import java.io.IOException; | |
| import java.lang.reflect.Array; |
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
| function calcPos(f) { | |
| return f * (55 - f / 1.7); | |
| } | |
| function calcCenter(f) { | |
| return (calcPos(f) + calcPos(f - 1)) / 2; | |
| } | |
| function draw(name, major, k, sn, tune, note, chord) { | |
| const noteName = [ | |
| ["T", "2♭", "2", "3♭", "3", "4", "4♯", "5", "6♭", "6", "7♭", "7"], | |
| ["T", "2♭", "2", "3♭", "3", "4", "5♭", "5", "6♭", "6", "7♭", "7"] |