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/java --enable-preview --source 21 | |
// ※Shebangで起動するときは拡張子をつけないか.java以外の拡張子にする | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import javax.swing.*; | |
import java.util.ArrayList; |
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 uvicorn | |
from fastapi import FastAPI, Request | |
from fastapi.middleware.cors import CORSMiddleware | |
import json | |
import logging | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
model_name = "stabilityai/stable-code-3b" |
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 torch | |
from transformers import AutoTokenizer | |
# model_name = "rinna/youri-7b-instruction-gptq" | |
model_name = "rinna/youri-7b-instruction" | |
load_in_8bit = True | |
tokenizer = AutoTokenizer.from_pretrained(model_name) | |
if "gptq" in model_name: |
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
# based on StableLM chat | |
# https://huggingface.co/spaces/stabilityai/stablelm-tuned-alpha-chat | |
import gradio as gr | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, StoppingCriteria, StoppingCriteriaList, TextIteratorStreamer | |
import time | |
import numpy as np | |
from torch.nn import functional as F | |
import os | |
from threading import Thread |
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
# based on StableLM chat | |
# https://huggingface.co/spaces/stabilityai/stablelm-tuned-alpha-chat | |
import gradio as gr | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList | |
import ctranslate2 | |
print(f"Starting to load the model to memory") |
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
// 基本的なMammalクラス | |
public abstract class Mammal { | |
private int height; | |
private int weight; | |
public Mammal(int height, int weight) { | |
this.height = height; | |
this.weight = weight; | |
} |
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.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.table.DefaultTableModel; | |
public class SimpleForm { | |
public static void main(String[] args) { | |
JFrame frame = new JFrame("Sample Form"); |
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; | |
import java.awt.BorderLayout; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.JTabbedPane; | |
import javax.swing.JTextArea; |
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
from bs4 import BeautifulSoup | |
import csv | |
# Open and read the HTML file | |
with open("Style reference.html", 'r', encoding='utf-8') as file: | |
content = file.read() | |
# Parse the HTML content using BeautifulSoup | |
soup = BeautifulSoup(content, 'html.parser') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.