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
| //list all namespaces in your cluster | |
| kubectl get ns | |
| //list posd in ns kube-system | |
| kubectl get po --namespace kube-system | |
| //one can use -n instead of --namespace | |
| //one can create a new namspace by using yaml | |
| apiVersion: v1 |
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 std::collections::HashMap; | |
| use nom::named; | |
| use nom::take_while; | |
| use nom::separated_list; | |
| use nom::take_str; | |
| use nom::take; | |
| use nom::is_space; | |
| use nom::types::CompleteByteSlice; | |
| use nom::types::CompleteStr; |
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
| #![allow(unused)] | |
| extern crate nom; // 4.2.3 | |
| use nom::alpha1; | |
| use nom::alphanumeric; | |
| use nom::alt; | |
| use nom::digit1; | |
| use nom::do_parse; | |
| use nom::eol; | |
| use nom::flat_map; |
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
| named!( | |
| ec_value_parser<&[u8],Vec<String>>, | |
| separated_list!( | |
| tag!(","), | |
| map_res!( | |
| map_res!( | |
| take_while!(|c : u8| {c == b'.' || is_digit(c) || is_space(c)} | |
| ), str::from_utf8) |
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
| named!( | |
| synonym_parser<TokenLine>, | |
| do_parse!( | |
| tag!("COMPND") | |
| >> space1 | |
| >> cont: opt!(integer) | |
| >> space0 | |
| >> tag!("SYNONYM") | |
| >> tag!(":") | |
| >> space1 |
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
| named!( | |
| chain_value_parser<&[u8],Vec<String>>, | |
| separated_list!(tag!(","), alphanum_word_with_spaces_inside) | |
| ); | |
| named!( | |
| chain_parser<TokenLine>, | |
| do_parse!( |
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
| named!( | |
| molecule_name_parser<String>, | |
| map_res!(map_res!(take_until!(";"), str::from_utf8), str::FromStr::from_str) | |
| ); | |
| named!( | |
| molecule_parser<TokenLine>, | |
| do_parse!( | |
| tag!("COMPND") |
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
| named!( | |
| mol_id_parser<Token>, | |
| do_parse!( | |
| tag!("COMPND") | |
| >> take!(2) | |
| >> cont: opt!(twodigit_integer) | |
| >> space0 | |
| >> tag!("MOL_ID") | |
| >> tag!(":") | |
| >> space1 |
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
| #[derive(Debug)] | |
| enum Token { | |
| MoleculeId(i32), | |
| Molecule(String), | |
| Chain { identifiers: Vec<String> }, | |
| Fragment(String), | |
| Synonym { synonyms: Vec<String> }, | |
| Ec { commission_numbers: Vec<String> }, | |
| Engineered(bool), |
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
| #[derive(Debug)] | |
| struct Caveat { | |
| continuation: u32, | |
| comment: String, | |
| } | |
| named!( | |
| caveat_parser<Caveat>, | |
| do_parse!( |
NewerOlder