Skip to content

Instantly share code, notes, and snippets.

export GRAPHVIZ_DIR="$(brew --prefix graphviz)"
pip install pygraphviz \
--config-settings=--global-option=build_ext \
--config-settings=--global-option="-I$GRAPHVIZ_DIR/include" \
--config-settings=--global-option="-L$GRAPHVIZ_DIR/lib"
@neelabalan
neelabalan / recomm.md
Created April 5, 2024 12:09
Results from perplexity

To optimize parallel processing in Azure OpenAI for better performance, you can consider the following best practices:

  1. Batch processing: By batching similar requests together, you can take advantage of parallel processing capabilities and maximize the efficiency of Azure OpenAI Service. This approach not only improves performance but also helps minimize costs by reducing the number of individual API calls.
  2. Model selection: The choice of model can significantly impact latency. For use cases that require the lowest latency models with the fastest response times, it is recommended to use the latest models in the GPT-3.5 Turbo model series.
  3. Generation size and Max tokens: Reducing the number of tokens generated per request can help reduce the latency of each request. You can set the max_token parameter on each call as small as possible, include stop sequences to prevent generating extra content, and generate fewer responses by adjusting the best_of & n parameters.
  4. Streaming: Streami
@neelabalan
neelabalan / references.md
Created March 24, 2024 17:51
From k00ni/owl-reasoner-list
  • Argyridis, Argyros and Argialas, Demetre P (2015). A fuzzy spatial reasoner for multi-scale GEOBIA ontologies.
  • Armas Romero, Ana and Cuenca Grau, Bernardo and Horrocks, Ian (2012). MORe: Modular combination of OWL reasoners for ontology classification.
  • Bak, Jaroslaw and Nowak, Maciej and Jedrzejek, Czeslaw (2014). RuQAR: Reasoning framework for OWL 2 RL ontologies.
  • Balhoff, James P and Good, Benjamin M and Carbon, Seth and Mungall, Chris (2018). Arachne: an OWL RL Reasoner Applied to Gene Ontology Causal Activity Models (and Beyond)..
  • Bate, Andrew and Motik, Boris and Grau, Bernardo Cuenca and Simanc (2016). Extending consequence-based reasoning to SRIQ.
  • Bento, Alexandre and M'e (2022). Do Arduinos dream of efficient reasoners?.
  • Bishop, Barry and Bojanov, Spas (2011). Implementing OWL 2 RL and OWL 2 QL Rule-Sets for OWLIM..
  • Bobillo, Fernando and Straccia, Umberto (2016). The fuzzy ontology reasoner fuzzyDL.
  • Bourguet, Jean-R'e (2014). TROvE: a Graphical Tool to Evaluate OWL Reasoners..
  • Carr
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 7 columns, instead of 3. in line 7.
Reasoner,Maintenance,Is usable,Website,Code-Repository,Documentation,usable via
AllegroGraph,maintained,usable,https://allegrograph.com/products/allegrograph/,Only repositories with client code found: https://github.com/franzinc?tab=repositories&q=agraph,https://franz.com/agraph/support/documentation/current/agraph-introduction.html,"REST,Clients"
Arachne,maintained,usable,,https://github.com/balhoff/arachne,,CLI via Jar-File
BaseVISor,maintained,usable,https://vistology.com/products/basevisor/,,API documentation and usage information provided via ZIP file (which contains Jar files).,"CLI via Jar-File,Java API"
BORN,maintained,usable,https://julianmendez.github.io/born/,https://github.com/de-tu-dresden-inf-lat/born,,"CLI via Jar-File,Protégé-Plugin"
Bossam,abandoned,no files available to try,https://bossam.wordpress.com/,,,
CB (Consequence-based reasoner),abandoned,"no, compilation failed",https://www.cs.ox.ac.uk/isg/tools/CB/,https://github.com/ykazakov/cb-reasoner,,"CLI,Protégé-Plugin"
CEL,maintained,usable
@neelabalan
neelabalan / ui.py
Created March 21, 2024 14:55
View SPARQL results in JSON format against your query and ttl file
import json
from rdflib import Graph
from textual import on
from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import Input, Button, TextArea
def execute_query(ttl_file, sparql_query):
"""
Executes a SPARQL query on a given TTL file and returns the results as a list of lists.
@neelabalan
neelabalan / prompt
Created March 10, 2024 03:40
craft a bla bla
Craft a comprehensive plan to enhance my healthy cooking skills as a beginner. While I have some basic knowledge, I struggle with creating nutritious recipes and understanding ingredient choices. My goal is to become more skilled and confident in preparing wholesome meals. Provide a structured learning approach, practical cooking exercises.
@neelabalan
neelabalan / xpost.py
Created March 3, 2024 07:40
From pybites
from datetime import datetime
from dataclasses import dataclass, field
MAX_CONTENT_LENGTH = 280
@dataclass
class XPost:
content: str
author: str
timestamp: str | None = field(default=None)
@neelabalan
neelabalan / aicli.py
Created March 2, 2024 16:04 — forked from samuelcolvin/aicli.py
OpenAI powered AI CLI in just a few lines of code - moved to https://github.com/samuelcolvin/aicli
#!/usr/bin/env python3
import os
from datetime import datetime, timezone
from pathlib import Path
from prompt_toolkit import PromptSession
from prompt_toolkit.history import FileHistory
import openai
from rich.console import Console
from rich.markdown import Markdown
@neelabalan
neelabalan / appearance.css
Created February 29, 2024 11:25
appearance obsidian
.MathJax {font-size: 1.3em;}
body {
--text-normal: var(--color-base-70);
--blockquote-color: var(--text-faint);
--blockquote-border-thickness: 4px;
--blockquote-border-color: var(--text-faint);
}
@neelabalan
neelabalan / command
Created February 28, 2024 12:33
extract only the dependencies with version
grep -Eo '[a-zA-Z0-9_-]+==[0-9.]+' requirements.txt