mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > nameofyourbackup.sql
Json is a lightweight data interchange format and its module always produces string objects, not bytes objects. That said, you can serialize or deserialize data. But.. What is data serialization?
Data serialization is the process of converting structure data to a format that allows sharing or storage of data in a way that it is possible to recover its original format.
This file contains 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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
This file contains 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
#!/usr/bin/env bash | |
# | |
# One line prompt showing the following configurable information | |
# for git: | |
# time (virtual_env) username@hostname pwd git_char|git_branch git_dirty_status|→ | |
# | |
# The → arrow shows the exit status of the last command: | |
# - bold green: 0 exit status | |
# - bold red: non-zero exit status | |
# |
This file contains 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
---------------------------- | |
# Overview of redis commands | |
---------------------------- | |
SET server:name "fido" | |
GET server:name => "fido" | |
SET connections 10 |
This file contains 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
# Doug Bash Prompt | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then | |
MAGENTA=$(tput setaf 9) | |
ORANGE=$(tput setaf 172) |
This file contains 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
$ python start.py find-fastest-s | |
# Returns the fastest starships | |
$ python start.py vehicles-speed-by-person 1 | |
# Returns Luke's vehicles and its max. speed |
This file contains 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
import starpy | |
# Instance of the object | |
s = starpy.GetStars() | |
s.find_fastest_s() | |
# this method finds the fastest StarShips | |
s.vehicles_speed_by_person(1) | |
# this method gets the vehicles and its speed by passing a person's id as argument |
This file contains 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
import starpy | |
# Instance of the object | |
s = starpy.GetStars() | |
s.starships_speed_by_person(11) | |
# Returns: [[{'transport_id': '59', 'Max. Speed': '1050'}], | |
# [{'transport_id': '65', 'Max. Speed': '1500'}], | |
# [{'transport_id': '39', 'Max. Speed': '1100'}]] |
This file contains 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
class Gist(object): | |
def __init__(self): | |
self.name = 'Douglas' | |
def read_name(self): | |
return self.name |
NewerOlder