This file contains 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
#!/bin/bash | |
# Institut für Wetter- und Klimakommunikation GmbH / Qmet | |
# O. Maywald <maywald@klimagipfel.de> | |
# This should install CDO with grib2, netcdf and HDF5 support. Note that the binaries are in /opt/cdo-install/bin. | |
# For further information look: | |
# http://www.studytrails.com/blog/install-climate-data-operator-cdo-with-netcdf-grib2-and-hdf5-support/ | |
# docker-command |
This file contains 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 df_to_ddl(df, tablename='test.mytable'): | |
data_dtypes = df.dtypes.reset_index().rename(columns = {'index':'colname',0:'datatype'}) | |
# Map pandas datatypes into SQL | |
data_dtypes['sql_dtype'] = data_dtypes.datatype.astype(str).map( | |
{'object':'varchar(24)', | |
'float64':'float', | |
'int64':'int', | |
'bool':'boolean'} ) |
This file contains 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
public class MyServiceImpl extends DeviceServiceGrpc.DeviceServiceImplBase { | |
@Override | |
public StreamObserver<GetLocationRequest> getLocations(StreamObserver<GetLocationResponse> responseObserver) { | |
RequestBridge<GetLocationRequest> request = new RequestBridge<>(); | |
ResponseBridge response = new ResponseBridge((ServerCallStreamObserver) responseObserver); | |
request.map(this::doGetLocation) | |
.subscribe(response); | |
return request; | |
} |
This file contains 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
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a | |
Encrypt with interactive password. Encrypted message is base64-encoded afterwards. | |
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a -k "MySuperPassword" | |
Encrypt with specified password. Encrypted message is base64-encoded afterwards. | |
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc | |
Base-64 decode and decrypt message with interactive password. | |
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc -k "MySuperPassword" |