What do you want to save?
Add Code snippet
New code examples
-
Python 2021-08-27 11:00:02
python tuple methods
# A tuple is a sequence of immutable Python objects. Tuples are # sequences, just like lists. The differences between tuples # and lists are, the tuples cannot be changed unlike lists and # tuples use parentheses, whereas lists use square brackets. tup1 =... Add solution -
Shell/Bash 2021-08-27 10:03:02
install wordpress ubuntu 20.04
Once the LAMP stack (Apache, MariaDB, and PHP) installed and configured on the Ubuntu 20.04 server, you can proceed further to download the latest version of WordPress using the following wget command. $ wget -c http://wordpress.org/latest.tar... Add solution -
Python 2021-08-27 09:55:01
python convert a dict to list or a list to dict or a slice a dict or sort a dict by key or value without import
#convert dict to list or list to dict or slice a dict #1. convert dict to list temp = [] # not required as [] is mentioned below s = {'b': 3, 'a': 2, 'c': 2, 'd': 1, 'e': 1}#our dict remember temp = [[k,v]for k,v in s.items()]# temp is now list print(temp... Add solution -
C++ 2021-08-27 08:17:02
fast i/o in c++
ios_base::sync_with_stdio(false); cin.tie(NULL); Add solution -
Shell/Bash 2021-08-26 20:40:01
uninstall dependencies npm
The command is simply npm uninstall <name> // Here are different options: // - removes the module from node_modules but // does NOT update package.json npm uninstall <name> // - removes it from dependencies in package.json aswell npm unins... Add solution -
Shell/Bash 2021-08-26 14:40:01
bash how to transpose a column
# Basic syntax: operation producing a column of text/data | paste -s # Where paste -s prints the data on a single row # Example usage: Given a file named input_file that has these contents: A 23 B 42 C 17 cut -f 2 | paste -s awk '{print $2}' | paste -s... Add solution -
Shell/Bash 2021-08-26 10:53:03
sed replace number of variable length
Just use one of following commands for replacing a number of: sed "s/[0-9]//" f.txt #One single digit as 1 sed "s/[0-9]\+//" f.txt #Further digits as 837, specifying match repetition "\+" sed "s/[0-9\+\.[0-9]\+]//" ... Add solution