# -*- coding: utf-8 -*-
import pickle
class AAA(object):
def __init__(self, name):
self.name = name
a = AAA('original')
print(a, a.name)
with open('tst.pickle', 'wb') as f:
pickle.dump(a, f)
# -*- coding: utf-8 -*-
import pickle
class AAA(object):
def __init__(self, name):
self.name = name
with open('tst.pickle', 'rb') as f:
b = pickle.load(f)
print(b, b.name)
# -*- coding: utf-8 -*-
s = 'Ą᠄䄄㼄㸄㬄䰄㜄䌄㤄䈄㔀 㨄㸄㐀 㤀 㠀 ㌀㜀㐀 㐄㬄伀 㼄㸄㐄䈄㈄㔄䀄㘄㐄㔄㴄㠄伀 䄄㈄㸄㔄㌄㸀 〄㨄㨄〄䌄㴄䈄'
print(s.encode('utf-16be').decode('utf-16le'))
ЁИспользуйт5Рко4 908 374РдлOРподтверждениOРсвоег>Раккаунт
# -*- coding: utf-8 -*-
import numpy
a = numpy.array([[1, 3],
[1, 1],
[1, 5],
[1, 5],
[1, 5]])
b = numpy.insert(a, 1, numpy.array([1, 2]), 0)
print(b)
# -*- coding: utf-8 -*-
import urllib.request
resource = urllib.request.urlopen('http://dailybloggz.com/tfy/andreeva_secrets')
charset = resource.headers.get_content_charset()
print(charset)
content = resource.read().decode(charset)
print(content)
data=[4, 5, 7, 8, 9, 0, 3, 3, 6, 6]
c = [complex(a, b) for a, b in zip(data[:-1:2], data[1::2])]
print(c)
H:\My Documents\PyCharm>py
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
H:\My Documents\PyCharm>py -2
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
[global]
proxy = 127.0.0.1:3128