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
create table test_history | |
( | |
id int, | |
prop VARCHAR(16) | |
); | |
INSERT into test_history values ( 1,'a'); | |
INSERT into test_history values ( 2,'b'); | |
create TABLE updated_test ( id int ,prop VARCHAR(16)); |
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
#!/usr/bin/ruby | |
def birth | |
dice = rand(100) | |
return dice > 50 ? 1 : 0 | |
end | |
### 生了男孩就不生了,生了女孩就一直生 |
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
from pyspark.sql import SparkSession | |
spark = SparkSession.builder.getOrCreate() | |
data_type_map = {'StringType':'varchar(32672)', | |
'LongType':'bigint', | |
'IntegerType':'int', | |
'BooleanType':'boolean', | |
'DateType':'date', | |
'DoubleType':'double', | |
'TimestampType':'timestamp' | |
} |
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
require 'mysql2' | |
client = Mysql2::Client.new(:host => "localhost", :username => "root",:database => "test") | |
100.times do |i| | |
str = "insert into money_test ( money) values (#{rand(100)})" | |
p str | |
client.query(str) | |
end |
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
1. | |
把已有的模型导出成pb格式 | |
保存的时候的INFO:tensorflow:Unsupported signature for serialization貌似不用管 | |
python code: | |
import os | |
os.environ['TF_KERAS'] = '1' | |
import numpy as np | |
from bert4keras.backend import K as K | |
from bert4keras.models import build_transformer_model |
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
0. | |
基于tf2.0 | |
1. | |
把已有的模型导出成pb格式 | |
保存的时候的INFO:tensorflow:Unsupported signature for serialization貌似不用管 | |
python code: | |
import os | |
os.environ['TF_KERAS'] = '1' | |
import numpy as np |
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
select * from orders a join users b on a.p_user = b.PK; | |
select * from paymenttransactions a join orders b on a.p_order = b.pk; | |
select * from paymentmodes a join orders b on a.PK = b.p_paymentmode; | |
select * from orderentries a join orders b on a.p_order = b.pk; | |
select * from products a join orderentries b on a.PK = b.p_product; | |
select * from subentries a join guestinfos b on a.p_guestinfo = b.PK; | |
select * from subentries a join orderentries b on a.p_entry = b.PK; | |
select * from rules a join promotion p on a.p_code = p.p_code; | |