sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chmod +x ./install.sh;./install.sh
import ctypes | |
from ctypes import * | |
string_raw = "char* args" | |
int_raw = 123 | |
args1 = c_char_p(string_raw.encode('utf-8')) | |
args2 = c_int(int_raw) | |
lib = ctypes.cdll.LoadLibrary("D:\\path\\to\\func.dll") |
--将数据去重后存入临时表,PostgreSQL会自动创建tmp_table以及表结构 | |
select distinct * into tmp_table from repeat_table; | |
--删除原记录 | |
delete from repeat_table; | |
--将临时表数据插入原表 | |
insert into repeat_table select * from tmp_table; | |
--删除临时表 | |
drop table tmp_table; |
import mercantile | |
import rasterio | |
from rasterio.session import OSSSession | |
from rasterio.warp import transform_bounds | |
from rio_tiler import constants | |
with rasterio.open(prefix) as src: | |
bounds = transform_bounds( | |
src.crs, constants.WGS84_CRS, *src.bounds, densify_pts=21 | |
) |
import pickle | |
import redis | |
class CACHE: | |
def __init__(self, host='127.0.0.1',password='123456'): | |
pool = redis.ConnectionPool(host=host, password=password) | |
self.conn = redis.Redis(connection_pool=pool) | |
def insert_image(self, frame_id, frame): | |
# 将图片序列化存入redis中 |
select setval('record_id_seq', (select max(id) from record)); |
#!/usr/bin/env bash | |
# | |
# Copyright (c) .NET Foundation and contributors. All rights reserved. | |
# Licensed under the MIT license. See LICENSE file in the project root for full license information. | |
# | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
current_userid=$(id -u) | |
if [ $current_userid -ne 0 ]; then |
conda config --set auto_activate_base false |