/etc/fstab
# <file system> <dir> <type> <options> <dump> <pass>
10.10.0.10:/backups /var/backups nfs defaults 0 0
/etc/fstab
# <file system> <dir> <type> <options> <dump> <pass>
10.10.0.10:/backups /var/backups nfs defaults 0 0
In [23]: class Foo:
...: a = 1
...: b = {'c': 2}
...:
In [24]: f1 = Foo()
In [25]: f2 = Foo()
In [26]: f1.a = 11
In [27]: f1.b['c'] = 12
In [28]: f2.a, f2.b
Out[28]: (1, {'c': 12})
In [29]: f1.a, f1.b
Out[29]: (11, {'c': 12})
ps2pdf -dPDFSETTINGS=/ebook original.pdf reduced.pdf
| Data type | Description |
|---|---|
bool_ | Boolean (True or False) stored as a byte |
int_ | Default integer type (same as C long; normally either int64 or int32) |
intc | Identical to C int (normally int32 or int64) |
intp | Integer used for indexing (same as C ssize_t; normally either int32 or int64) |
int8 | Byte (-128 to 127) |
int16 | Integer (-32768 to 32767) |
int32 | Integer (-2147483648 to 2147483647) |
int64 | Integer (-9223372036854775808 to 9223372036854775807) |
uint8 | Unsigned integer (0 to 255) |
uint16 | Unsigned integer (0 to 65535) |
uint32 | Unsigned integer (0 to 4294967295) |
uint64 | Unsigned integer (0 to 18446744073709551615) |
float_ | Shorthand for float64. |
float16 | Half precision float: sign bit, 5 bits exponent, 10 bits mantissa |
float32 | Single precision float: sign bit, 8 bits exponent, 23 bits mantissa |
float64 | Double precision float: sign bit, 11 bits exponent, 52 bits mantissa |
complex_ | Shorthand for complex128. |
complex64 | Complex number, represented by two 32-bit floats |
complex128 | Complex number, represented by two 64-bit floats |
increase cell width
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
increase max columns and max rows to display
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
git remote add origin git@github.com:username/reponame.git
git push –set-upstream origin master
if needed remove existing
git remote remove origin
sudo apt install virtualbox-guest-x11 virtualbox-guest-utils virtualbox-guest-dkms
hindi: http://www.hindifonts.net/
Reference: python-3-patterns-idioms-test
class OnlyOne:
class __OnlyOne:
def __init__(self, arg):
self.val = arg
def __str__(self):
return repr(self) + self.val
instance = None
def __init__(self, arg):
if not OnlyOne.instance:
OnlyOne.instance = OnlyOne.__OnlyOne(arg)
else:
OnlyOne.instance.val = arg
def __getattr__(self, name):
return getattr(self.instance, name)