Skip to content

Instantly share code, notes, and snippets.

View frutik's full-sized avatar

Andrew Kornilov frutik

View GitHub Profile
https://brandur.org/fragments/postgres-partitioning-2022
https://pganalyze.com/blog/postgresql-partitioning-django
https://django-postgres-extra.readthedocs.io/en/master/table_partitioning.html
https://hevodata.com/learn/postgresql-partitions/
https://www.2ndquadrant.com/en/blog/postgresql-12-foreign-keys-and-partitioned-tables/
https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE-LIMITATIONS
def divide_chunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
a = 'i.strip() for i in a.split('.') if i.strip()]
c = list(divide_chunks(b, 3))
d = ['. '.join(i + ['']).strip() for i in c]
y = '\n\n'.join(d)
print(y)
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes" -v=8 | python -m json.tool
Must have
- Google Analytics / Tag manager / Funnels
- Set up and maintain pipelintes for for importing Analytical data to Data lake of your choice
- Defining KPI, Metrics that will help us to understand our visitors better.
Nice to have
- BigQuery
https://medium.com/@kelvin.lu.au/compare-pdf-question-answering-with-openai-and-google-vertexai-46638d62327b
https://medium.com/@kelvin.lu.au/what-we-need-to-know-before-adopting-a-vector-database-85e137570fbb
https://medium.com/@kelvin.lu.au/disadvantages-of-rag-5024692f2c53
https://medium.com/@Ratnaparkhi/how-the-search-technology-is-evolving-88607f5efb9e
cat en_esci.json | grep '"Clothing"' | grep -E '"Men"|"Women"' | jq -c '. | [.category, .image]' | grep -v '],""]' > clothing.txt
>>> 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