Skip to content

Instantly share code, notes, and snippets.

View frutik's full-sized avatar

Andrew Kornilov frutik

View GitHub Profile
>>> from transformers.tools import HfAgent
>>> a = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder")
>>> text = """Ukraine says Friday's missile strike on the headquarters of Russia's Black Sea fleet in Crimea was timed to coincide with a meeting of naval officials.
The fleet, based in the port city of Sevastopol, is seen as the best of Russia's navy.
A Ukrainian military source told the BBC that Friday's attack was carried out using Storm Shadow missiles, which are supplied by Britain and France."""
>>> a.run("Can you summarize `text` for me", text=text)
from spacy.pipeline import EntityRuler
import spacy
nlp = spacy.blank("nl")
ruler = nlp.add_pipe("entity_ruler")
ruler.from_disk('fb.jsonl')
doc = nlp("I like Ralph Lauren and fruit of THE LOOM")
print([(ent.text, ent.label_) for ent in doc.ents])
https://www.channelsight.com/blog/12-kpis-every-ecommerce-brand-should-be-measuring
https://www.shopify.com/ie/blog/7365564-32-key-performance-indicators-kpis-for-ecommerce
https://databox.com/ecommerce-kpis
@frutik
frutik / gist:ce35a107afc815387282496e72170f3d
Last active December 25, 2022 12:30
Extracting complements and substitutes
https://epjdatascience.springeropen.com/articles/10.1140/epjds/s13688-021-00297-4
https://www.kaggle.com/code/onodera/complementary-goods-using-nltk/notebook
https://towardsdatascience.com/retail-analytics-a-novel-and-intuitive-way-of-finding-substitutes-and-complements-c99790800b42
https://soel-micheletti.medium.com/shopper-a-probabilistic-model-of-consumer-choice-with-substitutes-and-complements-31d6fed79a81
@frutik
frutik / gist:80b79af0e63bfe453d22a4ec7e80ddf1
Created December 24, 2022 09:19
stock management (during a checkout)
https://softwareengineering.stackexchange.com/questions/412515/should-an-e-commerce-application-reserve-products-before-attempting-payment
https://www.emarkable.ie/2014/05/ecommerce-stock-management-checkout-session-timing/
https://community.shopify.com/c/shopify-discussions/holding-an-item-on-checkout/td-p/526964#:~:text=Inventory%20is%20only%20held%20for,products%20are%20still%20in%20stock
What is Precision, Recall, F1-score and Confusion Matrix?
https://medium.com/analytics-vidhya/understanding-precision-recall-f1-score-and-confusion-matrix-b701659b9a21
Classification of Images based on Fashion MNIST dataset
https://medium.com/analytics-vidhya/classification-of-images-based-on-fashion-mnist-dataset-bb11e4bcdefb
Image classification from scratch
https://keras.io/examples/vision/image_classification_from_scratch/
Image data preprocessing
https://medium.com/analytics-vidhya/what-is-a-confusion-matrix-d1c0f8feda5
https://towardsdatascience.com/understanding-confusion-matrix-a9ad42dcfd62
https://medium.com/geekculture/understanding-confusion-matrix-in-less-confusing-way-8e731bb8fd91
https://christianbernecker.medium.com/how-to-create-a-confusion-matrix-in-pytorch-38d06a7f04b7
https://pythonguides.com/scikit-learn-confusion-matrix/
GET /_migration/system_features
{
"features" : [
{
"feature_name" : "async_search",
"minimum_index_version" : "7.8.0",
"migration_status" : "NO_MIGRATION_NEEDED",
"indices" : [
curl -s -w "Time to connect: %{time_connect} Time to first byte: %{time_starttransfer}\n" -o /dev/null https://marktplaats.nl/
@frutik
frutik / affiliate
Last active May 30, 2024 06:22
Tradetracker Soap API - python
import json
from requests import Session
from zeep import Client
from zeep.transports import Transport
from zeep import helpers
session = Session()
client = Client('http://ws.tradetracker.com/soap/affiliate?wsdl', transport=Transport(session=session))
client.service.authenticate('<customer-id>', '<password>', sandbox=False, locale='nl_NL', demo=False)