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
| { | |
| "editor.formatOnSave": true, | |
| "editor.codeActionsOnSave": { | |
| "source.organizeImports.biome": "explicit", | |
| "source.fixAll.biome": "explicit" | |
| }, | |
| "editor.defaultFormatter": "biomejs.biome", | |
| // Configure specific file types to use Biome | |
| "[javascript]": { |
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 crypto from 'crypto' | |
| const algorithm = 'aes-256-cbc' | |
| const { ENCRYPTION_KEY } = process.env | |
| if (!ENCRYPTION_KEY || ENCRYPTION_KEY.length !== 64) { | |
| throw new Error('ENCRYPTION_KEY must be a 256-bit hex string') | |
| } | |
| const key = crypto.createHash('sha256').update(ENCRYPTION_KEY).digest() // Ensure the key is 256 bits |
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 'dart:convert'; | |
| import 'package:crypto/crypto.dart' show sha256; | |
| import 'package:encrypt/encrypt.dart' as encrypt; | |
| import 'package:flutter_dotenv/flutter_dotenv.dart'; | |
| Future<String> getEncryptionKey() async { | |
| String? encryptionKey = dotenv.get('ENCRYPTION_KEY'); | |
| // Ensure the key is 256 bits (32 bytes) | |
| final keyBytes = sha256.convert(utf8.encode(encryptionKey)).bytes; | |
| return base64.encode(keyBytes); // Use base64 instead of base64Url for compatibility |
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
| const puppeteer = require('puppeteer'); | |
| // 14' macbook pro m1 screen viewport | |
| const m1 = { | |
| width: 1512, | |
| height: 982, | |
| deviceScaleFactor: 1, | |
| } | |
| /** |
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 streamlit as st | |
| from langchain.llms import OpenAI | |
| from langchain.text_splitter import CharacterTextSplitter | |
| from langchain.embeddings import OpenAIEmbeddings | |
| from langchain.vectorstores import Chroma | |
| from langchain.chains import RetrievalQA | |
| openai_api_key = 'sk-<your-key>' | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder