This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## update machine | |
sudo apt-get update | |
## Install essentials and basic utility | |
sudo apt install -y \ | |
build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ | |
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
L = Loan Amount | |
I = Interest Rate Per Month | |
N = Loan Period in Months | |
EMI = (Loan * I) * ((1 + I)^N) / ((1 + I)^N) - 1)) | |
""" | |
import math | |
import csv | |
print("Enter Amount :: ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use proc_macro::{TokenStream}; | |
use syn::{ItemFn, ItemStruct, DeriveInput, parse::{Parse, ParseStream, Result}, LitStr, Token}; | |
#[derive(Debug)] | |
struct PathArgs { | |
id: String, | |
} | |
mod keyword { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use proc_macro::{TokenStream}; | |
use syn::{ItemFn, ItemStruct, DeriveInput, parse::{Parse, ParseStream, Result}, LitStr, Token}; | |
#[derive(Debug)] | |
struct PathArgs { | |
id: String, | |
} | |
mod keyword { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// crate name proc_macro_test | |
//File Cargo.toml | |
// [package] | |
// name = "proc_macro_test" | |
// version = "0.1.0" | |
// authors = ["AbrarNitk <[email protected]>"] | |
// edition = "2018" | |
// [lib] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::frame::Frame; | |
use chrono::prelude::*; | |
use std::fmt::Debug; | |
use typetag; | |
#[typetag::serde(tag = "type", content = "value")] | |
pub trait Queue: Debug { | |
fn print_me(&self); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Friendly Color Names | |
Black="\[\033[0;30m\]" | |
Dark_Gray="\[\033[1;30m\]" | |
Blue="\[\033[0;34m\]" | |
Light_Blue="\[\033[1;34m\]" | |
Green="\[\033[0;32m\]" | |
Light_Green="\[\033[1;32m\]" | |
Cyan="\[\033[0;36m\]" | |
Light_Cyan="\[\033[1;36m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn subset(arr: &Vec<String>, st: usize, end: usize, reserve: &mut Vec<String>, subsets: &mut Vec<Vec<String>>) { | |
for index in st..end { | |
reserve.push(arr[index].clone()); | |
subsets.push(reserve.clone()); | |
subset(&arr, index + 1, end, reserve, subsets); | |
reserve.pop(); | |
} | |
} | |
fn main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn find_subset(arr: &Vec<i32>, st: i32, end: i32, init: &mut Vec<i32>, new_index: i32, count: &mut usize, v: &mut Vec<Vec<i32>>) { | |
for index in st..end { | |
*count += 1; | |
init[new_index as usize] = arr[index as usize]; | |
v.push((&init[0..(*count) as usize]).to_vec()); | |
find_subset(arr, index + 1, end, init, new_index + 1, count, v); | |
*count -= 1; | |
} | |
} |