docker create -it --name new-container <image>
docker start new-container
docker exec -it new-container /bin/bash
| To activate the Anaconda environment. | |
| PATH=$PATH:$HOME/anaconda/bin | |
| For the base: | |
| source ~/.bash_profile | |
| For the loacl environment we created: | |
| conda activate <name> | |
| gcc file.c | |
| ./a.out | |
| g++ file.cpp | |
| ./a.out |
| import random | |
| import math | |
| # | |
| # Shorthand: | |
| # "pd_" as a variable prefix means "partial derivative" | |
| # "d_" as a variable prefix means "derivative" | |
| # "_wrt_" is shorthand for "with respect to" | |
| # "w_ho" and "w_ih" are the index of weights from hidden to output layer neurons and input to hidden layer neurons respectively | |
| # |
| # for the figlet message | |
| figlet Ruwali | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi |
| # Place this file in the root directory of the system | |
| # Run `chmod +x work.sh` | |
| # Run `./work.sh` | |
| open -a "Mail.app" | |
| open -a "Safari.app" https://stackoverflow.com/ https://mail.google.com/mail/u/0/#inbox https://github.com | |
| open -a "Firefox Developer Edition.app" | |
| # You may add your editor too. I am not adding cause I use a couple of editors (Sublime, Xcode, Android Stdio) for different work so it matters what you want that time. |
| #include<iostream> | |
| using namespace std; | |
| void add(int a[], int x[], int q); | |
| void complement(int a[], int n) { | |
| int i; | |
| int x[8] = { NULL }; | |
| x[0] = 1; |
| import numpy as np | |
| import cv2 | |
| import mxnet as mx | |
| import pandas as pd | |
| import random | |
| import os | |
| curdir = os.path.abspath(os.path.dirname(__file__)) | |
| def gen_record(csvfile,channel): |
| #!/bin/sh | |
| # Checking for VPN establishment | |
| # TO DO: get your ip when not connected to a VPN, and replace the first 6 digits with the [a]bc[.][d]ef[.][g]hi[.] | |
| # for ex if my ip is 123.456.789.000 format as [1]23[.][4]56[.] | |
| # also change the name name of yor country. | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' |
| # Python program to divide two | |
| # unsigned integers using | |
| # Non-Restoring Division Algorithm | |
| # Function to add two binary numbers | |
| def add(A, M): | |
| carry = 0 | |
| Sum = '' | |