Skip to content

Instantly share code, notes, and snippets.

View rohitfarmer's full-sized avatar

Rohit Farmer rohitfarmer

View GitHub Profile
@rohitfarmer
rohitfarmer / Linux_System_Admin.md
Last active November 14, 2018 22:44
Linux System Admin
#!/usr/bin/env python
'''
Chemical data about a molecule.
Molecules are defined by SMILES strings. Can work out logP values, Lipinski's
rules, etc...
Uses rdkit
'''
@rohitfarmer
rohitfarmer / Python-Environment.md
Last active December 7, 2023 20:08
Create isolated python environment per project with all the packages needed for that particular project.

Python Virtual Environments

Create isolated python environment per project with all the packages needed for that particular project. Commands copied from https://realpython.com/python-virtual-environments-a-primer/.

Using the base module venv

Create the environment

python3 -m venv venv (name) --upgrade-deps
@rohitfarmer
rohitfarmer / github.md
Last active May 17, 2022 14:15
My Git Cookbook

Git and GitHub

Configure your Git username/email

You typically configure your global username and email address after installing Git. However, you can do so now if you missed that step or want to make changes. After you set your global configuration, repository-specific configuration is optional.

Git configuration works the same across Windows, macOS, and Linux. To set your global username/email configuration:

@rohitfarmer
rohitfarmer / dalnet.md
Last active December 25, 2025 17:00 — forked from xero/irc.md
irc cheat sheet

Link to docs: http://docs.dal.net/docs/chanserv.html

SSH connection to Dal Net: /connect -ssl punch.dal.net 6697

Identify nick name on dal net: /msg NickServ@services.dal.net IDENTIFY password

Change or set channel topic: /topic

@rohitfarmer
rohitfarmer / Linux_useful_commands.md
Last active October 29, 2018 16:21
Linux useful commands

Find

find /path/ -name filename* 2>/dev/null # This will redirect all the permission denied statements to null.

@rohitfarmer
rohitfarmer / google.md
Last active October 17, 2018 23:21
Google Cloud Platform

To ssh to google compute engine instance.

First generate a ssh key pair on your local machine; use the username on the instance else it will create the user same as user on the local machine.

ssh-keygen -t rsa -f ~/.ssh/name -C username

chmod 400 ~/.ssh/name

Then login to your compute engine dashboard and click on metadata tab on the left. Go to ssh keys section and click edit,

@rohitfarmer
rohitfarmer / basic-recipes.md
Created October 22, 2018 18:30 — forked from andypiper/basic-recipes.md
Some recipes for the Twitter API for twurl +jq, and other useful Twitter code snippets and tools

The basics

This is a collection of basic "recipes", many using twurl (the Swiss Army Knife for the Twitter API!) and jq to query the Twitter API and format the results. Also, some scripts to test or automate common actions.

@rohitfarmer
rohitfarmer / hpc.md
Last active April 11, 2019 15:22
HPC commands
@rohitfarmer
rohitfarmer / nvidia.md
Created November 2, 2018 16:14
Command for NVIDIA GPUs

To get the diver info

modinfo nvidia

To get summary info

nvidia-smi
nvidia-smi --query-gpu=driver_version --format=csv,noheader