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
| # source reference: https://github.com/piesauce/llm-playbooks/blob/main/exercises/chapter_1/chat_with_your_pdf/ChatwithyourPDF.ipynb | |
| import os | |
| import traceback | |
| from langchain_community.document_loaders import UnstructuredPDFLoader, PyPDFLoader | |
| from langchain_community.embeddings import HuggingFaceEmbeddings | |
| from langchain_community.vectorstores import Chroma | |
| from langchain_classic.chains import ConversationalRetrievalChain | |
| from langchain_classic.memory import ConversationBufferMemory | |
| # from langchain_openai import ChatOpenAI |
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
| #version=RHEL8 | |
| # ignoredisk --only-use=sda | |
| # Partition clearing information | |
| clearpart --none --initlabel | |
| # Use graphical install | |
| # graphical | |
| # Use CDROM installation media | |
| cdrom | |
| text | |
| # Keyboard layouts |
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 main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "github.com/nasa9084/go-switchbot" |
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
| name: SSH Key Deploy | |
| run-name: SSH Key Deploy Runner | |
| on: [push] | |
| jobs: | |
| deploy-keys: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Read ssh-pubkey file |
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
| #!/bin/bash | |
| k run shell --image=giantswarm/tiny-tools -it --rm |
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
| # This section includes base Calico installation configuration. | |
| # For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation | |
| apiVersion: operator.tigera.io/v1 | |
| kind: Installation | |
| metadata: | |
| name: default | |
| spec: | |
| # Configures Calico networking. | |
| calicoNetwork: | |
| # Note: The ipPools section cannot be modified post-install. |
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 digitalio | |
| from board import * | |
| import time | |
| import analogio | |
| from adafruit_hid.keyboard import Keyboard | |
| from adafruit_hid.keycode import Keycode | |
| import usb_hid | |
| kbd = Keyboard(usb_hid.devices) |
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
| /* | |
| This sketch introduces how to draw images onto the rgb led matrix | |
| you can create your own images by replacing the values in the 'myPicture' | |
| array. This array holds 64 color values for each pixel in the matrix. | |
| You can take advantage of the draw() and drawDotByDot() functions to | |
| display your own images. | |
| Code written by Patrick Cohen | |
| */ |
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
| #include "FastLED.h" | |
| // Params for width and height | |
| const uint8_t kMatrixWidth = 8; | |
| const uint8_t kMatrixHeight = 8; | |
| #define LED_PIN 3 | |
| #define NUM_LEDS (kMatrixWidth * kMatrixHeight) | |
| CRGB leds[ NUM_LEDS ]; | |
| #define LAST_VISIBLE_LED 63 | |
| uint8_t XY (uint8_t x, uint8_t y) { |
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 random | |
| import sys | |
| class Maze: | |
| """ | |
| dir -> 0 右, 1 上, 2 左, 3 下 | |
| field cell 0 -> 壁, 1 -> 道 | |
| """ | |
| def __init__(self, mazeWidth, mazeHeight): | |
| self.mazeWidth = mazeWidth |
NewerOlder