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 matplotlib.pyplot as plt | |
| import numpy as np | |
| def rastrigin(x, y, A=10): | |
| """ | |
| Rastrigin function definition. | |
| """ | |
| return A * 2 + (x**2 - A * np.cos(2 * np.pi * x)) + (y**2 - A * np.cos(2 * np.pi * y)) | |
| def generate_randomized_rastrigin_landscape(x_range, y_range, num_points, |
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 { pipeline } from '@xenova/transformers'; | |
| const clipThresh = 0.7; // Threshold for overall similarity | |
| const ssrchThresh = 0.8; // Threshold for sentence-level similarity | |
| // Initialize the feature extraction pipeline | |
| let extractor; | |
| async function initializeExtractor() { | |
| extractor = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2'); |
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 sentence_transformers import SentenceTransformer | |
| import re | |
| # Initialize the sentence transformer model | |
| smod = SentenceTransformer("all-MiniLM-L6-v2") | |
| clip_thresh = 0.7 # Threshold for overall similarity | |
| ssrch_thresh = 0.8 # Threshold for sentence-level similarity | |
| def clip_sim(text1, text2): |
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
| (* | |
| Ocaml text dungeon game | |
| easy way to make something fun and learn the ropes of the language | |
| srsly though whoever made this language was really just quirky | |
| *) | |
| let room_sizes_arr = [| | |
| "a couple planck lengths wide"; "miniscule"; "kinda tiny"; "miniature"; "normal"; "large"; "unexpectedly large"; | |
| "unnatural"; "gigantic"; "immense"; "titanic"; "massive"; "measurable in AU"; "spanning the cosmos"; | |
| |];; |
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
| //UI | |
| var tabs = this.rexUI.add | |
| .tabs({ | |
| x: 400, | |
| y: 1600, | |
| panel: this.rexUI.add.gridTable({ | |
| background: this.rexUI.add.roundRectangle( | |
| 0, | |
| 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Markdown to html</title> | |
| <script src="https://cdn.jsdelivr.net/remarkable/1.7.1/remarkable.min.js"></script> | |
| </head> | |
| <body> | |
| <p>Enter markdown for conversion</p> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Html Only</title> | |
| </head> | |
| <body> | |
| <center><h1>Making A website with HTML 5 & 4</h1></center> | |
| <center> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <link | |
| rel="stylesheet" | |
| href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" | |
| /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Spinny pencil</title> |