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 socket | |
| import random | |
| import argparse | |
| import sys | |
| from io import BytesIO | |
| # Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client | |
| PY2 = True if sys.version_info.major == 2 else 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
| . | |
| └── 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
| import cv2 | |
| import numpy | |
| image = cv2.imread("test.png") | |
| gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # convert image to gray | |
| # cv2.imshow("image",gray) | |
| blur_image = cv2.GaussianBlur(gray, (5, 5), 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
| \{([.\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 |
NewerOlder