CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 04:26:23 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"cf17f997c9f32e76f7b78415cd23c08f"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=J8oGsCARJrzU71kLJfmABz6F0trcMHL%2FID4i6prF2eWdWa%2FHubZTF2jT3WOYKCBEzFo1mqBlx5oAgimV1NaLBhymFbXvXtv9iXcsaXzYEFwqCi%2Bj4y2NAXHWCjCnRWjgobQhzm8sA23Vo%2Fea77fgIR1K%2FuYl5E2ZFSejs8ykE3mL85QBKEDbJkit0TK4VVQvhzV9WxTwmlg%2BheQejdsGxM0q2jDoF5OM3gCTJIsFANtZwR7ku3VllMPg5FGCLAZJpQNlzdllifE2bhiRL9OvXA%3D%3D--SSgrQEap%2FiXrq%2Fce--3VpkNSmbvjQD%2FAeJsekA0g%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.602552502.1753331182; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 04:26:22 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 04:26:22 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C1D2:26221E:12D8EF9:16EED63:6881B5EE
ines’s gists · GitHub
View GitHub Profile
{{ message }}
Instantly share code, notes, and snippets.
🖤
Digital native and software developer working on AI, Machine Learning & NLP. Founder @explosion, developing spaCy & Prodigy.
(Portrait: Sarah Andersen)
-
Founder @explosion
- Berlin, Germany
- https://ines.io
- @_inesmontani
- @ines@sigmoid.social
- in/inesmontani
- c/ExplosionAI
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
function venv { | |
default_envdir=".env" | |
envdir=${1:-$default_envdir} | |
if [ ! -d $envdir ]; then | |
python -m venv $envdir | |
pip install ipython black flake8 | |
echo -e "\x1b[38;5;2m✔ Created virtualenv $envdir\x1b[0m" | |
fi | |
source $envdir/bin/activate |
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
""" | |
Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you | |
run simple training experiments for NER and text classification. | |
Requires the Prodigy annotation tool to be installed: https://prodi.gy | |
See here for details on Streamlit: https://streamlit.io. | |
""" | |
import streamlit as st | |
from prodigy.components.db import connect | |
from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size |
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
pip install streamlit | |
pip install spacy | |
python -m spacy download en_core_web_sm | |
python -m spacy download en_core_web_md | |
python -m spacy download de_core_news_sm |
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 difflib | |
import wasabi | |
def diff_strings(a, b): | |
output = [] | |
matcher = difflib.SequenceMatcher(None, a, b) | |
for opcode, a0, a1, b0, b1 in matcher.get_opcodes(): | |
if opcode == "equal": | |
output.append(a[a0:a1]) | |
elif opcode == "insert": |
ines
/ those_generously_buttered_noodles.py
Last active
July 23, 2023 12:25
Using spaCy & NLP to create variations of "those generously buttered noodles"
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
# Using spaCy & NLP to create variations of "those generously buttered noodles" | |
# See here: https://twitter.com/ArielDumas/status/1086294656957272065 | |
# | |
# Disclaimer 1: This is a quick, simplified example focusing on one particular | |
# sentence. There are obviously many more different constructions and | |
# different types of dependencies you want to cover. Some aspects also become | |
# significantly more difficult if you're working with, say, German instead of | |
# English. | |
# | |
# Disclaimer 2: Creating spam comments is a very bad use case for NLP and |
ines
/ spacy_token_attrs.py
Last active
May 2, 2021 04:32
spaCy v2.0 example: Get and set token text character spans as custom attribute extensions
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
# coding: utf8 | |
from __future__ import unicode_literals | |
from spacy.lang.en import English | |
from spacy.tokens import Token | |
# Example of using spaCy v2.0's custom attribute extensions to get and set | |
# character spans of a token text as token attributes. | |
# Discussion: https://twitter.com/DavidWell/status/920245066404450304 |
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 spacy | |
nlp = spacy.load('🦄') | |
doc = nlp(u'Wow, my model is named 🦄 !') | |
for word in doc: | |
print(word.text, word.tag_, word.dep_, word.head.text) |
ines
/ _displacy.jade
Created
October 20, 2016 12:48
displaCy.js NLP visualizer Jade/Pug mixin (to use in Node/Express, Harp, etc.)
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
//- Usage: +displacy({ arcs: [...], words: [...] }) | |
//- Blog post for more info: https://explosion.ai/blog/displacy-js-nlp-visualizer | |
//- spaCy REST service to generate JSON markup: https://github.com/explosion/spacy-services | |
- var distance = 200 | |
- var offsetX = 50 | |
- var arrowSpacing = 20 | |
- var arrowWidth = 10 | |
- var arrowStroke = 2 |
You can’t perform that action at this time.