This file contains hidden or 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
. | |
└── module | |
├── alb | |
│ ├── loadbalancer.tf | |
│ ├── security.tf | |
│ └── vars.tf | |
├── autoscale | |
│ ├── autoscale.tf | |
│ ├── config | |
│ │ └── init-config.yaml |
This file contains hidden or 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
\{([.\s\S]*?)\} | |
# | |
__GetZoneResult_ = { | |
mts:'1851818', | |
province:'北京', | |
catName:'中国联通', | |
telString:'18518181552', | |
areaVid:'29400', | |
ispVid:'137815084', | |
carrier:'北京联通' |
This file contains hidden or 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
# row_size = chunk_frame.shape[0] | |
# print(chunk_frame) | |
# print(chunk_frame) | |
# numpy.datetime64 2019-05-21T19:37:20.913950000 | |
# index_array = chunk_frame.index.to_numpy() | |
# print("^"*100) | |
# print(self.dtypes) | |
# # print(chunk_frame) | |
# numpy_array = chunk_frame.to_numpy(dtype="object") | |
# print(numpy_array[0][0]) |
This file contains hidden or 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
date_range = pandas.date_range(now, periods=length, | |
freq=freq, tz=timezone) | |
range_array = numpy.arange(length) | |
random_array = numpy.random.randint(0, 100, size=length) | |
string_list = [random.choice(["a", "b", "c"]) for _ in range(length)] | |
combined = numpy.vstack((range_array, random_array, string_list)).T |
This file contains hidden or 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 os | |
import rdflib | |
from rdflib import Graph, Literal | |
from rdflib.namespace import RDFS, FOAF | |
PLACE = rdflib.Namespace("http://example.com/place/") | |
PATH = rdflib.Namespace("http://example.com/path/") | |
DEFAULT = rdflib.Namespace("http://www.example.com/default/") |
This file contains hidden or 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
sudo install_name_tool -change libssl.1.0.0.dylib \ | |
/usr/local/mysql/lib/libssl.1.0.0.dylib \ | |
/usr/local/lib/python3.7/site-packages/mysqlclient-1.4.2.post1-py3.7-macosx-10.14-x86_64.egg/MySQLdb/_mysql.cpython-37m-darwin.so | |
sudo install_name_tool -change libcrypto.1.0.0.dylib /usr/local/mysql/lib/libcrypto.1.0.0.dylib /usr/local/lib/python3.7/site-packages/mysqlclient-1.4.2.post1-py3.7-macosx-10.14-x86_64.egg/MySQLdb/_mysql.cpython-37m-darwin.so |
This file contains hidden or 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
def np_datetime64_to_timestamp(dt64, decimals=6): | |
""" | |
https://stackoverflow.com/questions/13703720/converting-between-datetime-timestamp-and-datetime64 | |
convert np.datetime64 to python datetime.timestamp | |
:return: timestamp | |
""" | |
value = (dt64 - np.datetime64("1970-01-01T00:00:00")) / np.timedelta64(1, 's') | |
return float(np.around(value, decimals=decimals)) |
This file contains hidden or 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
Start-Process -FilePath 'msiexec.exe' -ArgumentList '/qn /log c:\Users\aaa\Desktop\a.log /i C:\Users\aaa\Desktop\HDF5-1.10.3-win64.msi INSTALL_ROOT=C:\hdf5' -Wait -Passthru |
This file contains hidden or 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
from contextlib import ContextDecorator | |
class makeparagraph(ContextDecorator): | |
def __enter__(self): | |
print('<p>') | |
return self | |
def __exit__(self, *exc): | |
print('</p>') | |
return False |
This file contains hidden or 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 Node: | |
def __init__(self, info): | |
self.info = info | |
self.left = None | |
self.right = None | |
self.level = None | |
def __str__(self): | |
return str(self.info) |
NewerOlder