Skip to content

Instantly share code, notes, and snippets.

View SantoshCode's full-sized avatar
🏠
Working from home

Santosh Subedi SantoshCode

🏠
Working from home
View GitHub Profile
@SantoshCode
SantoshCode / start-conda-project.md
Created January 26, 2022 07:42
Starting a conda project.

MiniConda Project

conda create --prefix ./env pandas numpy matplotlib scikit-learn seaborn nltk
conda activate ./env

// If you are in vscode
conda create --prefix ./env pandas numpy matplotlib scikit-learn seaborn nltk ipykernel
git rm --cached folder-name
git add .
git commit -m 

Mutable

Mutable is a type of variable that can be changed.

Immutable

Immutables are the objects whose state cannot be changed once the object is created.

If an item is mutable, modifying the copy also modifies the original.

@SantoshCode
SantoshCode / info.md
Created November 23, 2021 10:59
YAML vs JSON

JSON example

{
  "title": "Shopping List",
  "items": [ "item1", "item2" ],
  "location": {
    "country": "Nepal",
    "city": "Kathmandu"
 }
@SantoshCode
SantoshCode / NFT.md
Last active December 13, 2021 14:15

NFT (Non Fungible Tokens)

WHAT ARE NFTS ?

Thought definition.

A way to represent anything unique as a Blockchain-based asset. Powered by smart contracts by smart contracts on a Blockchain. NFT can really be anything digital (such as drawings, music, your brain downloaded and turned into an AI). NFTs are popular in representing digital arts. But digital arts is only one way to use NFTs. Really they can be used to represent ownership of any unique asset, like a deed for an item in the digital or physical realm.

Formal definition (Technical Definition).

@SantoshCode
SantoshCode / Change-latest-commit-msg.md
Created November 11, 2021 12:39
Change latest commit message

Steps to change latest commit message

$ git commit --amend -m "New message"
$ git push --force repository-name branch-name

example,

@SantoshCode
SantoshCode / append-text.md
Created November 10, 2021 18:22
Appending text to a file in linux

Appending text to a file in linux

$ echo NEW_USER=santosh >> .bashrc

Overriding all text inside a file

This command will override everything from .bashrc with newtextblahblah

@SantoshCode
SantoshCode / Docker.md
Last active October 22, 2022 04:14
Understanding Docker

pexels-chanaka-906494

Understanding Docker

A platform for building, running and shipping applications.

Reasons to use docker

Everyone have stumble upon this case right I works on my machine but not yours? How is that Possible?

@SantoshCode
SantoshCode / creating-node-cli.md
Last active November 5, 2021 15:08
Instructions to create a simple cli tool using nodejs & npm

Creating Nodejs cli

$ mkdir sample
$ cd sample
$ npm init
$ touch index.js

Copy Remote file to local

$ scp username@remoteHost:/remote/dir/file.txt /local/dir/