What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-07 09:29:20
regular expression cheatsheet
Regular Expression FUll Cheatsheet (For quick look) :) note: for downloading visit https://buggyprogrammer.com/regular-expression-cheatsheet/ ------x-------------------x----------------x------------x----------------x------------- # -------------- Anchors... Add solution -
Javascript 2021-11-05 23:07:11
regular expression |
Let regex; /* shorthand character classes */ regex = /d/; // matches any digit, short for [0-9] regex = /D/; // matches non-digits, short for [^0-9] regex = /S/; // matches non-white space character regex = /s/; // matches any white space character regex ... Add solution -
Python 2021-10-30 04:30:20
A tokenizer that converts the input string to lowercase and then splits it by white spaces
# A tokenizer that converts the input string to lowercase and then splits it by white spaces df = spark.createDataFrame([("a b c",)], ["text"]) tokenizer = Tokenizer(inputCol="text", outputCol="words") tokenizer.tr... Add solution -
Other 2021-10-15 08:41:04
word level text generation keras
import string # load doc into memory def load_doc(filename): # open the file as read only file = open(filename, 'r') # read all text text = file.read() # close the file file.close() return text # turn a doc into clean tokens def clean... Add solution -
Javascript 2021-10-07 12:42:06
regex optional whitespace characters
// Add a \s? if a space can be allowed. // \s stands for white space // ? says the preceding character may occur once or not occur. // If more than one spaces are allowed and is optional, use \s*. // * says preceding character can occur zero or more times... Add solution -
Python 2021-10-05 03:19:02
python decrease gap between subplot rows
# Short answer: # If you have too much white space between rows (or columns) of a figure # with subplots, you can either shrink the vertical (or horizontal) # dimensions of the figure with figsize so that they get more "squished" # together, or... Add solution
Best helpers
Ranking is empty