Skip to content

Instantly share code, notes, and snippets.

View animesh's full-sized avatar
🤓
Life is Fuzzy, lets try to deFuzzyify, Bit by bIT

Ani animesh

🤓
Life is Fuzzy, lets try to deFuzzyify, Bit by bIT
View GitHub Profile
@animesh
animesh / finetune_llama_v2.py
Created April 9, 2024 06:24 — forked from younesbelkada/finetune_llama_v2.py
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@animesh
animesh / gist:9662d05f1f5ce62412ac6955373cdab9
Created January 25, 2024 10:13 — forked from ivanfioravanti/gist:bcacc48ef68b02e9b7a4034161824287
Fine tuning dataset generation wiht Ollama python library
import json
import os
import ollama
def query_ollama(prompt, model='openhermes:7b-mistral-v2.5-q6_K', context=''):
response = ollama.generate(
model=model,
prompt=context + prompt)
return response['response'].strip()
@animesh
animesh / 0_installSoftware.sh
Created December 27, 2023 10:46 — forked from DannyArends/0_installSoftware.sh
Scripts and other things for RNA-Seq
# Add yourself to the sudo group
su -
usermod -aG sudo danny
exit
# Install the virtual box guest additions
cd /media/cdrom0
sudo sh ./VBoxLinuxAdditions.run
# Install R and deps
@animesh
animesh / normcore-llm.md
Created September 21, 2023 12:42 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
@animesh
animesh / fuckyou-gmail.en.md
Created September 25, 2022 10:05 — forked from dxdxdt/fuckyou-gmail.en.md
What to do when Gmail marks all the mails from your server as spam

What to do when Gmail marks all the mails from your server as spam

If you're self-hosting your services and having trouble getting your emails through Gmail and infuriated by Google's non-existent support, you're not the only one. I'd like to share my experiences trying to get it sorted out.

I'm the author of the post above. You can tell how arrogant Google employees are from all the previous posts he made in the past.

@animesh
animesh / ppm_vs_dalton.md
Created August 6, 2022 10:11 — forked from RalfG/ppm_vs_dalton.md
Dalton vs ppm mass error in mass spectrometry

Dalton vs ppm mass error in mass spectrometry

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("whitegrid")

def ppm_to_da(error_ppm, theoretical_mass):
 error_da = theoretical_mass / ((1/ error_ppm) * 1000000)
@animesh
animesh / export-all-papers-2021-1000-plus.csv
Created January 24, 2022 10:13 — forked from ikashnitsky/export-all-papers-2021-1000-plus.csv
All 2021 papers with Altmetric attention score 1,000+, sorted first by news_mentions and then by altmetric_attention_score
We can't make this file beautiful and searchable because it's too large.
altmetric_attention_score,title,journal_collection_title,journal_iss_ns,authors_at_my_institution,departments,output_type,oa_status,oa_type,subjects_fo_r,affiliations_grid,funder,publication_date,doi,isbn,national_clinical_trial_id,uri,pub_med_id,pub_med_central_id,handle_net_i_ds,ads_bibcode,ar_xiv_id,re_p_ec_id,ssrn,urn,news_mentions,blog_mentions,policy_mentions,patent_mentions,twitter_mentions,peer_review_mentions,weibo_mentions,facebook_mentions,wikipedia_mentions,google_mentions,linked_in_mentions,reddit_mentions,pinterest_mentions,f1000_mentions,q_a_mentions,video_mentions,syllabi_mentions,number_of_mendeley_readers,number_of_dimensions_citations,details_page_url,badge_url
@animesh
animesh / Cisco_Anyconnect.ps1
Created December 16, 2021 12:05 — forked from jhorsman/Cisco_Anyconnect.ps1
PowerShell to automate VPN connection with Cisco AnyConnect Secure Mobility Client
#Source www.cze.cz
#This script is tested with "Cisco AnyConnect Secure Mobility Client version 3.1.00495"
# Usage: & '.\Cisco_Anyconnect.ps1' [-Server <server name or ip>] [-Group <group>] [-User <user>] [-Password <password>]
#Please change following variables
#IP address or host name of cisco vpn, Username, Group and Password as parameters
param (
[string]$Server = $( Read-Host "Input server, please" ),
@animesh
animesh / submarine_cable_map.R
Created November 18, 2021 08:59 — forked from tylermorganwall/submarine_cable_map.R
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {

Deploying Julia on heroku

Let's assume that you can run your web server on your own computer, and that you can open it in your own browser (through localhost or 127.0.0.1). This guide will go through the steps of putting that app online!

This guide will be based on a hello world sample project that uses Genie.jl, but the steps from this guide apply to any Julia web framework.

heroku has tons of features, but for a simple app, we only need the basics. In particular, we do not need the heroku command line, we can do everything through the online GUI.

Basics

heroku uses git for deployment: to package your app, you create a git repository, and to put a new version of your app online, you push to the git repository. If you already know git, then you now know how to manage a web server! It's like GitHub pages, but more powerful (and more complicated). Read heroku's introduction for a basi