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
sed -i 's/`/"/g' DDL.sql | |
sed -i 's/SET FOREIGN_KEY_CHECKS = 0;//g' DDL.sql | |
sed -i 's/SET FOREIGN_KEY_CHECKS = 1;//g' DDL.sql | |
sed -i 's/TINYINT/SMALLINT/g' DDL.sql |
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
unless Rails.env.production? | |
connection = ActiveRecord::Base.connection | |
connection.tables.each do |table| | |
connection.execute("TRUNCATE #{table}") unless table == "schema_migrations" | |
end | |
sql = File.read('modeling/DDL_Export/DDL.sql') | |
statements = sql.split(/;$/) | |
statements.pop |
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
Outer window is 0xa200001, inner window is 0xa200002 | |
PropertyNotify event, serial 8, synthetic NO, window 0xa200001, | |
atom 0x27 (WM_NAME), time 120633188, state PropertyNewValue | |
PropertyNotify event, serial 9, synthetic NO, window 0xa200001, | |
atom 0x22 (WM_COMMAND), time 120633188, state PropertyNewValue | |
PropertyNotify event, serial 10, synthetic NO, window 0xa200001, | |
atom 0x28 (WM_NORMAL_HINTS), time 120633188, state PropertyNewValue |
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
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- | |
r b swpd free buff cache si so bi bo in cs us sy id wa st | |
2 29 3659608 1103164 31984 982756 472 0 2002 201 1973 4193 32 18 2 48 0 | |
1 30 3657560 1090500 34872 988828 463 0 2148 159 1834 3881 32 19 5 44 0 | |
3 22 3656024 1075632 36076 1003512 470 0 2851 62 1871 3582 34 18 0 47 0 | |
2 28 3653976 1082376 39124 992252 466 0 2880 78 2085 4105 39 22 1 38 0 | |
2 30 3651416 1068444 40916 1007800 509 0 2968 100 1844 4005 32 17 2 48 0 | |
1 29 3649368 1067652 43072 1020320 495 0 2582 79 1977 4161 39 23 0 37 0 | |
1 30 3648088 1046932 45984 1037812 266 0 3144 45 1972 4291 32 18 4 47 0 | |
5 30 3646808 1032580 48260 1050544 239 0 3070 174 1876 4833 30 17 2 51 0 |
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
while True: | |
buffer = serial_port.read() | |
print('buffer=', buffer) | |
ascii = buffer.decode('ascii') | |
if len(ascii) > 0: | |
print('ascii=', ascii) |
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
orderIsReverse(L):- | |
[X|Q]=L, | |
[XP|_]=Q, | |
(X<XP -> false; orderIsReverse(Q)), | |
orderIsReverse([]). |
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
maxP(L,X):- | |
[H|Q]=L, | |
(X<H -> X=H), | |
maxP(Q,X), | |
true. | |
max([H|Q], Max) :- | |
max(Q, H, Max). | |
max([], Max, Max). |