check an ip or an ftp in one regex for python
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
All generations.
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
import wikipedia
def get_info(query):
return wikipedia.summary(query, sentences = 2)
get_info('cat')
O(n)
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.4.4 8.8.8.8
shutdown -h now #now means inmediatly
^.*R1\b.*$
O(n)
apt-get autoremove && apt-get clean && apt-get update && apt-get upgrade
function Animal(name, type){
this.name = name;
this.type = type;
}
var dog = new Animal("Dog", "Mammal");
var platypus = new Animal("Platypus", "Mammal");
console.log(dog.name, dog.type);
console.log(platypus.name, platypus.type);
/ftp:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
/\d{3}[.-]\d{3}[.-]\d{3}[.-]\d{3}|ftp[.-]\d{3}[.-]\d{3}[.-]\d{3}[.-]\d{3}/
O(n)
sudo apt autoremove && sudo apt clean && sudo apt update && sudo apt upgrade
function() {
var seq = '';
for (var i=0; i < 100; i++) {
seq += 'ACGT'.charAt(Math.floor(Math.random()*4));
}
return '>seq1\n'+seq;
}
import wikipedia
wikipedia.search("John") # => ['John', 'John (artist)', 'John the Baptist', 'John (given name)', 'John the Revelator', 'John Doe', 'John Lennon', 'John Smith', 'John of Gaunt', 'John Mayall']
wikipedia.summary("John", sentences=1) # => 'John is a common English name and surname: John (given name) John (surname), including a list of people with the name John'
wikipedia.suggest("John") # => 'John'
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description