Skip to content

Instantly share code, notes, and snippets.

View nipunsadvilkar's full-sized avatar
:octocat:
Focusing

Nipun Sadvilkar nipunsadvilkar

:octocat:
Focusing
View GitHub Profile
{"lastUpload":"2018-09-20T13:26:37.455Z","extensionVersion":"v3.1.2"}
@nipunsadvilkar
nipunsadvilkar / custom_component_countries_api.py
Created October 26, 2018 05:28
Pipeline component for GPE entities and country meta data via a REST API
#!/usr/bin/env python
# coding: utf8
"""Example of a spaCy v2.0 pipeline component that requests all countries via
the REST Countries API, merges country names into one token, assigns entity
labels and sets attributes on country tokens, e.g. the capital and lat/lng
coordinates. Can be extended with more details from the API.
* REST Countries API: https://restcountries.eu (Mozilla Public License MPL 2.0)
* Custom pipeline components: https://spacy.io//usage/processing-pipelines#custom-components
@nipunsadvilkar
nipunsadvilkar / deployment.md
Last active April 14, 2020 14:09
flask and gunicorn specific deployments
  1. How to pass args or kwargs to gunicorn?
# codename/app.py
def create_app():
    app = FrameworkApp()
    ...
    return app

$ gunicorn --workers=2 'codename.app:create_app()'

@nipunsadvilkar
nipunsadvilkar / download-vimeo-video.js
Created August 22, 2020 06:18 — forked from dmlogv/download-vimeo-video.js
Download private embed Vimeo video
// Ctrl+Shift+C to open Chrome Console.
// Choose an IFrame of the Vimeo Video with a comment `player.vimeo.com`
// in the drop-down list `top`.
// Run a script:
var videos = [];
$$('script')[3].textContent.match(/\{[^{]+?mp4[^}]+?\}/g).forEach(
x => { o = JSON.parse(x);
videos.push(o);});
videos.sort((a, b) => a.quality.localeCompare(b.quality)).forEach(
@nipunsadvilkar
nipunsadvilkar / google_drive_file.py
Created September 22, 2021 15:00
script to download file using python
"""
Usage:
python google_drive_file.py 1nOwa2UN36-IDeZtqu4TLTNxGo8R5-mGF ~/Downloads/pycon_talk.mp4
"""
import requests
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
@nipunsadvilkar
nipunsadvilkar / README.md
Created January 31, 2022 11:06 — forked from hofmannsven/README.md
Show/Hide hidden system files on macOS
@nipunsadvilkar
nipunsadvilkar / about.md
Created October 19, 2022 19:50 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer