Skip to content

Instantly share code, notes, and snippets.

View priyanshunayan's full-sized avatar
🏔️

Priyanshu Nayan priyanshunayan

🏔️
View GitHub Profile
@priyanshunayan
priyanshunayan / typescriptreact.json
Created November 25, 2023 11:49
Snippet to generate React component boilerplate from file name
{
"React Component": {
"prefix": "rfce",
"body": [
"",
"export const ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} = () => {",
" return (",
" ${4:<div>Hello World</div>}",
" );",
@priyanshunayan
priyanshunayan / prediction.ipynb
Created October 7, 2023 08:37
A model using fasttext to predict where a text generated is generated by human or by computer. The precison is: 0.9, the recall is: 0.9.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@priyanshunayan
priyanshunayan / default-prediction.ipynb
Created September 26, 2023 04:53
Random forest and gradient boosting
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@priyanshunayan
priyanshunayan / index.py
Last active January 28, 2021 13:24
The required code to spin up a hydrus server
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from hydrus.data import doc_parse
from hydrus.app_factory import app_factory
from hydrus.utils import set_session, set_doc, set_hydrus_server_url, set_api_name, set_authentication
from hydra_python_core import doc_maker
from hydrus.data.db_models import Base, create_database_tables
from api_doc_output import doc
# Define the server URL, this is what will be displayed on the Doc
@priyanshunayan
priyanshunayan / api_doc.py
Last active January 25, 2021 12:58
The sample code to generate API documentation of Movie API
"""Generated API Documentation sample using doc_writer_sample.py."""
doc = {
"@context": {
"ApiDocumentation": "hydra:ApiDocumentation",
"description": "hydra:description",
"domain": {
"@id": "rdfs:domain",
"@type": "@id"
},
@priyanshunayan
priyanshunayan / gsoc-2020.md
Last active September 22, 2020 10:44
Google Summer of code 2020 report

Final Work Report GSOC 2020

Introduction

As a participant of the Google Summer of Code Program, I worked with an open source organisation called Hydra Ecosystem.

Hydra is a documentation framework that bases on top of established Linked Data (Semantic Web) tools to build the next generation of connected Web APIs. The team of developers in the Hydra Ecosystem aims to establish an ecosystem of tools to make Hydra framework operational.