This file contains 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
// Updated: Aug. 20, 2024 | |
// Run: node testRegex.js whatever.txt | |
// Live demo: https://jina.ai/tokenizer | |
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) | |
// COPYRIGHT: Jina AI | |
const fs = require('fs'); | |
const util = require('util'); | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 7; |
This file contains 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/env ruby | |
require 'json' | |
def main | |
puts JSON.pretty_generate( | |
"title" => "@ Home Home Row Keys for Modifiers (using if_alone)", | |
"maintainers" => ["eytanhanig"], | |
# # Uncomment conditions to only apply modifications to internal apple keboards | |
# "conditions" => [ |
This file contains 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
defmodule Training.Example do | |
def train() do | |
Nx.default_backend(EXLA.Backend) | |
{:ok, spec} = | |
Bumblebee.load_spec({:hf, "prajjwal1/bert-medium"}, | |
module: Bumblebee.Text.Bert, | |
architecture: :for_sequence_classification | |
) |
This file contains 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
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
This file contains 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
:root { | |
--black: #000; | |
--white: #fff; | |
--rose-50: #fff1f2; | |
--rose-100: #ffe4e6; | |
--rose-200: #fecdd3; | |
--rose-300: #fda4af; | |
--rose-400: #fb7185; | |
--rose-500: #f43f5e; |
This is some sort of answer to recent posts regarding Web Components, where more than a few misconceptions were delivered as fact.
Let's start by defining what we are talking about.
As you can read in the dedicated GitHub page, Web Components is a group of features, where each feature works already by itself, and it doesn't need other features of the group to be already usable, or useful.
This file contains 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 command would be run from the parent folder that: | |
# 1. contains the file(s) to be converted | |
# 2. has subdirectories that contain files to be converted | |
# 3. both of the above. | |
# This example finds all .tif files and converts them to .pdf, | |
# but any conversion supported by ImageMagick could be used here. | |
# If you don't have ImageMagick installed, you can do so here (https://imagemagick.org/script/download.php) | |
# for linux |
This file contains 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
/* Works but props not added to values array */ | |
let sayHello = name => | |
LitHtml.html( | |
{j| | |
<h1>Hello $(name) </h1> | |
<p>Goodbye</p> | |
<div> | |
<span>This is nested</span> | |
</div> | |
|j}, |
NewerOlder