[Huawei Nova Lite] PRA-LX2 8.0.0.360(C635) Full ROM

update.zip
update_data_full_public.zip
update_full_PRA-L22_hw_jp.zip

EMUI 8.0では、Androidの最新バージョンであるAndroid 8.0を搭載していることに加え、端末をより直感的に使用するための機能の追加や改善を実施し、端末の処理速度や安全性を向上しています。今すぐ更新することを強くお勧めします。

● スマート機能
新しいフローティングボタンによって、画面のどこからでもよく利用する機能を実行可能。新たに追加されたホーム画面のショートカットによって、最もよく利用するアプリ機能に素早くアクセス可能。アプリアイコンを長押しするだけで、ショートカットメニューを表示できます。
● 高速化
AIによる最適化によって、安定性、操作性、速度を向上。本システムの高速化、シームレスなビデオ再生、大容量の画像サムネイルの迅速な読み込みを実現します。
● セキュリティの向上
システムセキュリティに対する新たな更新により、システムとデータの保護を強化。

● スマートヒントにより、特定の環境やユーザーの使用方法に応じて、端末のより高速でスマートな操作方法をユーザーに提示します。
● 連絡先とメールにおいて、LinkedIn連絡先の経歴情報を同期可能。
● 設定の再設計により、より分かりやすく、直感的なメニュー構成を実現。
● ギャラリーにごみ箱を追加し、削除した写真を最大30日間保存可能。誤って削除した写真は、シングルタップで復元可能。
● 端末管理アプリの簡素化により、端末をより簡単に管理可能。標準のクリーンアップ機能の高速化とディープクリーンアップ機能の強化を実現。
● ご利用の端末は、バンドや車両など、種類が異なる2台のBluetoothデバイスを同時に接続可能。

EMUI 8.0 not only brings you the latest version of Android (8.0), it’s also boosted with a lot of great features and improvements to make your device more intuitive, faster and safer. We highly recommend updating now.

● Smarter
A new floating Navigation dock lets you perform frequently-used operations from anywhere on the screen. Newly added home screen shortcuts let you quickly access the app features you use most frequently. Simply touch and hold an app icon to display a shortcut menu.
● Faster
AI-based optimizations deliver greater stability, fluidity, and speed. The system boots faster, videos are more fluid, and images thumbnails load rapidly even in huge volumes.
● Safer
Enjoy enhanced protection for your system and data with new updates to system security.

● Smart tips recommend you faster and smarter ways to operate your phone, appearing in specific usage scenarios and responding to your usage habits.
● Contacts and Email now let you sync the career details of your LinkedIn contacts.
● Settings has been redesigned for clearer and more intuitive organization.
● Gallery now features a recycle bin that retains deleted photos for up to 30 days. Accidentally deleted photos can be restored with a single touch.

[Huawei Nova Lite] PRA-LX2C635B188 Full ROM

update.zip
update_full_PRA-L22_hw_jp.zip

本アップデートでは、ご利用の端末のOSをAndroid 7.0(EMUI 5.0)にロールバックします。

1. 現在Huawei EMUIの正規のバージョンを使用していて、正規ではない更新をインストールしたことがないことを確認してください。上記が確認できない場合、ロールバックに失敗し、不明なエラーが発生する場合があります。
2. 現在のバージョンがロック解除またはルート化されていないことを確認してください。
3. ロールバックにより、すべてのユーザーデータが削除されます。端末をロールバックする前に、SDカード、コンピュータ、またはCloudストレージを使用して重要なデータをすべてバックアップし、すべての内容が完全かつ有効にバックアップされていることを確認してください。
4. 端末の電池残量が50%以上あることを確認してください。
5. 更新中に問題が発生した場合、Huaweiコールセンターに連絡するか、正規のHuaweiサービスセンターに行ってサポートを受けてください。
6. システムはロールバック後に再起動されます。再起動に10分程度かかります。更新が終了したら、ホーム画面には自動的にEMUI 5.0のテーマが表示されます。

This update will roll back your phone’s operating system to Android 7.0 (EMUI 5.0).

1. Please make sure you are currently using the official version of Huawei EMUI, and that no unofficial updates have been installed. Otherwise, there will be risk of an unsuccessful rollback, and an unknown error may occur.
2. Make sure that the current version has not been unlocked or rooted.
3. All user data will be deleted in the rollback. Use an SD card, computer, or Cloud storage to back up all important data before rolling back your phone, and make sure all backed up content is complete and effective.
4. Make sure your phone has more than 50% battery remaining.
5. If you experience any issues during the update, please call the Huawei customer service hotline or visit an authorized Huawei service center for assistance.
6. The system will restart after the rollback. This will take about 10 minutes. Following the update, your home screen will automatically display the EMUI 5.0 theme.

[GCP] Cloud Shellのベンチマーク

Google Cloud Platformに関する作業などがブラウザから簡単に行うことができるCloud Shell
外出先等でちょっと用事があるときに非常に便利ですよね。
今回はこのCloud ShellのベンチマークをUnixBenchで採ってみました。
ところで、Cloud ShellはGCEのg1-smallらしいです。(ブースト時はn1-standard-1)
前はg1-smallではなくf1-microだった気がするんですけど、気のせいですかね?

特徴

・Compute Engine での一時的な仮想マシン インスタンス
・ウェブブラウザからインスタンスへのコマンドライン アクセス
・組み込みのコードエディタ ベータ版
・5 GB の永続ディスク ストレージ
・プレインストールされた Google Cloud SDK とその他のツール
・Java、Go、Python、Node.js、PHP、Ruby、.NET への言語対応
・ウェブ プレビュー機能
・GCP Console のプロジェクトとリソースに対するアクセスのビルトイン承認
https://cloud.google.com/shell/docs/features

通常はCloud Shellを開いた時、g1-smallがプロビジョニングされます。
ブーストモードを有効にした場合はn1-standard-1としてプロビジョニングされます。

また、実は週単位で使用できる時間に制限があるようです。

サーバースペック

g1-small

0.5 基の仮想 CPU と 1.70 GB のメモリを備え、共有物理コアを基盤とした共有コア マシンタイプ。
https://cloud.google.com/compute/docs/machine-types

:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           1695         362         463           0         869        1180
Swap:             0           0           0

:~$ df -Th
Filesystem     Type     Size  Used Avail Use% Mounted on
overlay        overlay   31G   22G  8.4G  73% /
tmpfs          tmpfs    848M     0  848M   0% /dev
tmpfs          tmpfs    848M     0  848M   0% /sys/fs/cgroup
/dev/sda1      ext4      31G   22G  8.4G  73% /root
/dev/sdb1      ext4     4.8G   12M  4.6G   1% /home
overlayfs      overlay  1.0M  108K  916K  11% /etc/ssh/keys
tmpfs          tmpfs    848M  720K  847M   1% /run/metrics
shm            tmpfs     64M     0   64M   0% /dev/shm
overlayfs      overlay  1.0M  108K  916K  11% /etc/ssh/ssh_host_dsa_key
tmpfs          tmpfs    848M     0  848M   0% /run/google/devshell

n1-standard-1

1 基の仮想 CPU と 3.75 GB のメモリを備えた標準マシンタイプ。
https://cloud.google.com/compute/docs/machine-types

~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3698         352        2171           0        1175        3119
Swap:             0           0           0

:~$ df -Th
Filesystem     Type     Size  Used Avail Use% Mounted on
overlay        overlay   31G   23G  8.3G  73% /
tmpfs          tmpfs    1.9G     0  1.9G   0% /dev
tmpfs          tmpfs    1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1      ext4      31G   23G  8.3G  73% /root
/dev/sdb1      ext4     4.8G   12M  4.6G   1% /home
overlayfs      overlay  1.0M  108K  916K  11% /etc/ssh/keys
tmpfs          tmpfs    1.9G  676K  1.9G   1% /run/metrics
shm            tmpfs     64M     0   64M   0% /dev/shm
overlayfs      overlay  1.0M  108K  916K  11% /etc/ssh/ssh_host_rsa_key
tmpfs          tmpfs    1.9G     0  1.9G   0% /run/google/devshell

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 62
model name      : Intel(R) Xeon(R) CPU @ 2.50GHz
stepping        : 4
microcode       : 0x1
cpu MHz         : 2500.000
cache size      : 30720 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c rdrand hypervisor lahf_lm pti fsgsbase tsc_adjust smep erms xsaveopt
bugs            : cpu_meltdown spectre_v1 spectre_v2 l1tf
bogomips        : 5000.00
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

UnixBench

通常時

通常時のUnixBench。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: cs-6000-devshell-vm-xxxxxx: GNU/Linux
   OS: GNU/Linux -- 4.14.33+ -- #1 SMP Sat Aug 11 08:05:16 PDT 2018
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.50GHz (5000.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   00:35:02 up 15 min,  2 users,  load average: 0.14, 0.33, 0.20; runlevel

------------------------------------------------------------------------
Benchmark Run: Mon Aug 20 2018 00:35:02 - 01:04:05
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       29138732.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2942.8 MWIPS (13.0 s, 7 samples)
Execl Throughput                               1947.3 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        200275.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           56955.0 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        538326.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                              310676.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  79299.3 lps   (10.0 s, 7 samples)
Process Creation                               5724.0 lps   (30.1 s, 2 samples)
Shell Scripts (1 concurrent)                   3252.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    397.4 lpm   (60.2 s, 2 samples)
System Call Overhead                         180235.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   29138732.1   2496.9
Double-Precision Whetstone                       55.0       2942.8    535.1
Execl Throughput                                 43.0       1947.3    452.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     200275.9    505.7
File Copy 256 bufsize 500 maxblocks            1655.0      56955.0    344.1
File Copy 4096 bufsize 8000 maxblocks          5800.0     538326.0    928.1
Pipe Throughput                               12440.0     310676.5    249.7
Pipe-based Context Switching                   4000.0      79299.3    198.2
Process Creation                                126.0       5724.0    454.3
Shell Scripts (1 concurrent)                     42.4       3252.4    767.1
Shell Scripts (8 concurrent)                      6.0        397.4    662.3
System Call Overhead                          15000.0     180235.1    120.2
                                                                   ========
System Benchmarks Index Score                                         475.7

ブーストモード

ブーストモードを有効にしたときのUnixBench。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: cs-6000-devshell-vm-xxxxx: GNU/Linux
   OS: GNU/Linux -- 4.14.33+ -- #1 SMP Sat Aug 11 08:05:16 PDT 2018
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.50GHz (5000.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   01:12:24 up 10:31,  2 users,  load average: 0.26, 0.10, 0.03; runlevel

------------------------------------------------------------------------
Benchmark Run: Mon Aug 20 2018 01:12:24 - 01:40:32
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       30024941.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3797.8 MWIPS (9.8 s, 7 samples)
Execl Throughput                               3630.8 lps   (29.5 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        332742.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           90811.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        903244.8 KBps  (30.0 s, 2 samples)
Pipe Throughput                              487114.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 115958.0 lps   (10.0 s, 7 samples)
Process Creation                              10922.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   6742.0 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    838.9 lpm   (60.0 s, 2 samples)
System Call Overhead                         276681.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   30024941.0   2572.8
Double-Precision Whetstone                       55.0       3797.8    690.5
Execl Throughput                                 43.0       3630.8    844.4
File Copy 1024 bufsize 2000 maxblocks          3960.0     332742.6    840.3
File Copy 256 bufsize 500 maxblocks            1655.0      90811.0    548.7
File Copy 4096 bufsize 8000 maxblocks          5800.0     903244.8   1557.3
Pipe Throughput                               12440.0     487114.9    391.6
Pipe-based Context Switching                   4000.0     115958.0    289.9
Process Creation                                126.0      10922.9    866.9
Shell Scripts (1 concurrent)                     42.4       6742.0   1590.1
Shell Scripts (8 concurrent)                      6.0        838.9   1398.1
System Call Overhead                          15000.0     276681.1    184.5
                                                                   ========
System Benchmarks Index Score                                         770.0

Index Score

通常時とブーストモードで3回UnixBenchを走らせた結果デス。

通常時ブーストモードg1-smalln1-standard-1f1-micro
1475.7770.0847.71313.6152.1
2483.0768.8
3476.8769.0

おまけ

比較のため、f1-micro, g1-small, n1-standard-1のUnixBenchも採ったので載せておきます。

g1-small
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: g1small: GNU/Linux
   OS: GNU/Linux -- 4.9.0-7-amd64 -- #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.30GHz (4600.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   01:53:20 up 3 min,  1 user,  load average: 0.08, 0.04, 0.01; runlevel Aug

------------------------------------------------------------------------
Benchmark Run: Mon Aug 20 2018 01:53:20 - 02:22:12
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       30951363.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3507.5 MWIPS (12.2 s, 7 samples)
Execl Throughput                               2996.6 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        458268.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          133952.0 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1218898.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                              776309.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 135166.1 lps   (10.0 s, 7 samples)
Process Creation                               8439.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4922.6 lpm   (60.1 s, 2 samples)
Shell Scripts (8 concurrent)                    617.5 lpm   (60.1 s, 2 samples)
System Call Overhead                         527722.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   30951363.0   2652.2
Double-Precision Whetstone                       55.0       3507.5    637.7
Execl Throughput                                 43.0       2996.6    696.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     458268.7   1157.2
File Copy 256 bufsize 500 maxblocks            1655.0     133952.0    809.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    1218898.4   2101.5
Pipe Throughput                               12440.0     776309.5    624.0
Pipe-based Context Switching                   4000.0     135166.1    337.9
Process Creation                                126.0       8439.8    669.8
Shell Scripts (1 concurrent)                     42.4       4922.6   1161.0
Shell Scripts (8 concurrent)                      6.0        617.5   1029.2
System Call Overhead                          15000.0     527722.7    351.8
                                                                   ========
System Benchmarks Index Score                                         847.7
n1-standard-1
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: n1standard1: GNU/Linux
   OS: GNU/Linux -- 4.9.0-7-amd64 -- #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.30GHz (4600.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   01:53:04 up 3 min,  1 user,  load average: 0.19, 0.07, 0.02; runlevel Aug

------------------------------------------------------------------------
Benchmark Run: Mon Aug 20 2018 01:53:04 - 02:21:11
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       31460987.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4176.3 MWIPS (9.9 s, 7 samples)
Execl Throughput                               5369.1 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        735957.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          209307.4 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1854594.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1130884.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 208971.2 lps   (10.0 s, 7 samples)
Process Creation                              15182.0 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   9874.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1206.0 lpm   (60.0 s, 2 samples)
System Call Overhead                         769258.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   31460987.6   2695.9
Double-Precision Whetstone                       55.0       4176.3    759.3
Execl Throughput                                 43.0       5369.1   1248.6
File Copy 1024 bufsize 2000 maxblocks          3960.0     735957.9   1858.5
File Copy 256 bufsize 500 maxblocks            1655.0     209307.4   1264.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    1854594.5   3197.6
Pipe Throughput                               12440.0    1130884.6    909.1
Pipe-based Context Switching                   4000.0     208971.2    522.4
Process Creation                                126.0      15182.0   1204.9
Shell Scripts (1 concurrent)                     42.4       9874.3   2328.8
Shell Scripts (8 concurrent)                      6.0       1206.0   2010.1
System Call Overhead                          15000.0     769258.9    512.8
                                                                   ========
System Benchmarks Index Score                                        1313.6
f1-micro
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: f1micro: GNU/Linux
   OS: GNU/Linux -- 4.9.0-7-amd64 -- #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   CPU 0: Intel(R) Xeon(R) CPU @ 2.30GHz (4600.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   01:52:55 up 2 min,  1 user,  load average: 0.22, 0.10, 0.03; runlevel Aug

------------------------------------------------------------------------
Benchmark Run: Mon Aug 20 2018 01:52:55 - 02:23:43
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       17570154.4 lps   (10.1 s, 7 samples)
Double-Precision Whetstone                      838.1 MWIPS (28.3 s, 7 samples)
Execl Throughput                               1218.6 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        161377.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           39812.8 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        330861.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              340018.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  62298.5 lps   (10.0 s, 7 samples)
Process Creation                               3822.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2085.7 lpm   (60.1 s, 2 samples)
Shell Scripts (8 concurrent)                    288.9 lpm   (60.2 s, 2 samples)
System Call Overhead                         228185.5 lps   (10.1 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   17570154.4   1505.6
Double-Precision Whetstone                       55.0        838.1    152.4
Execl Throughput                                 43.0       1218.6    283.4
File Copy 1024 bufsize 2000 maxblocks          3960.0     161377.9    407.5
File Copy 256 bufsize 500 maxblocks            1655.0      39812.8    240.6
File Copy 4096 bufsize 8000 maxblocks          5800.0     330861.9    570.5
Pipe Throughput                               12440.0     340018.4    273.3
Pipe-based Context Switching                   4000.0      62298.5    155.7
Process Creation                                126.0       3822.6    303.4
Shell Scripts (1 concurrent)                     42.4       2085.7    491.9
Shell Scripts (8 concurrent)                      6.0        288.9    481.4
System Call Overhead                          15000.0     228185.5    152.1
                                                                   ========
System Benchmarks Index Score                                         330.4

最後に

Index Scoreをざっと見ると、Cloud Shellはg1-smallがプロビジョニングされているとは言えだいぶ制限されているように見えます。
通常時はf1-microより少しいいぐらいで、ブースト時にg1-small相当のような感じでしょうか。
Cloud Shellは無料で使えるので勿論十分すぎるといえば十分すぎますね。

ドイツ語の品詞の種類

ドイツ語の品詞の種類って全部で11種類(ないしは10種類)しかないんです。
分詞は品詞ではない、としている人や本などもあるのでどこかでは、10種類と書いてる場合もあるかもしれないです。
否定詞、心態詞等の~詞ってなってるのは全部品詞と思っている方も微レ存でおられるかもしれません。多分。

Wortart(Kurzwort)Wortart2品詞名
r. Artikel (Art.)Geschlechtswort冠詞
s. Substantiv (Subst., Sub.)Hauptwort名詞
s. VerbZeitwort usw.動詞
s. Adjektiv (Adj.)Eigenschaftswort形容詞
s. Adverb (Adv.)Umstandswort副詞
s. Numerale (Num.)Zahlwort数詞
s. Pronomen (Pro.)Fürwort代名詞
e. Präposition (Prä.)Verhältniswort前置詞
e. Konjunktion (Konj.)Bindewort接続詞
e. InterjenktionAusrufewort間投詞
s. Partizip (Part.)Mittelwort分詞

[Python] CliでPastebin.comに手軽にペーストするやつ

サーバーでゴニョゴニョしている時に、あぁこれPastebin.comに簡単に上げれたら楽なのに…って思ったのでpythonで簡単に上げるスクリプトを書きました。
引数処理はdocopt使えばよかった…
Python3以上対応です。

Githubに置いてます。
https://github.com/ir1s-work/easy_to_paste

10行目のdev_keyはhttps://pastebin.com/apiにある自身のUnique Developer API Keyを入れてください。

-l オプションを抜くとゲストでペーストされます。
続きを読む

[Debian] gogsの導入とSSL化

09/11/2018 GogsのURLを修正しました。

Google Cloud Platformで無料枠になっていたf1-microの用途に悩んでいたのですが、おひとり様gitサーバーとして使ってみよう、と天啓が下りました。
GitHubのようなOSSで有名なのはGitLabですが、f1-microのスペックでは非常に厳しいです。
(推奨環境がCPU 2コア、メモリ4GB)
他に何かないかなと探してみるとGitBucketやらが出てきましたが、その中でGogsが非常に軽いと聞き、使ってみることにしました。

f1-microの環境は、
f1-micro(vCPU x 1、メモリ 0.6 GB)、
us-west1-c、
HTTP, HTTPSトラフィックの許可、
30GBの標準の永続ディスク、
また、独自ドメインで運用したいのでネットワークに静的 IP アドレスを割り当てています。
続きを読む

[Kusanagi] プラグインの更新や削除ができない

KUSANAGIのWordPressを使用していると、プラグインの更新/削除ができない時があります。

更新中にエラーが発生しました: 古いプラグインを削除できませんでした。

こんな感じのエラーですね。
所有者やグループをwww-data, nginxに変えたりパーミッションを変えたりしても更新/削除がどうにもできませんでした。
そこで所有者とグループをkusanagiに戻してパーミッションを775にしてみると更新/削除ができるようになりました。
よかったよかった。


$ sudo chown kusanagi.kusanagi -R wp-content
$ sudo chmod 775 -R wp-content


セキュリティ的にはちょっとゆるくなるので、更新/削除の時のみ775に変更してそれ以外は755に戻すなどいいかもしれません。

dpkg: error processing package google-cloud-sdk (–configure)

GCEでf1-microでインスタンスを立ててログインすると、まずはとりあえずアップデートをすると思います。

$ sudo apt-get update; sudo apt-get upgrade -y;

するとなんと、

dpkg: error processing package google-cloud-sdk (–configure):
subprocess installed post-installation script returned error exit status 137

えっ。って感じです。ここ数日立てたf1-microはこうなりました。
遺憾です。依存関係かなと思いとりあえず

$ sudo apt-get -f install

をしましたが解決しません。

そこでググるとStack Overflowに

The direct cause may be a lack of memory. Try to add swap before upgrading.

Upgrading google-cloud-sdk Fails on Configure

とあったので、まさかと思いスワップファイルを作成。

$ sudo dd if=/dev/zero of=/swap bs=1024k count=2048
$ sudo mkswap /swap
$ sudo chmod 0600 /swap
$ sudo swapon /swap

その後アップグレードすると成功しました。
ところでGCEはデフォルトでスワップがないので、fstabに今回作ったスワップファイルを書いておきましょう。

$ sudo vim /etc/fstab

/swap swap swap defaults 0 0

これで再起動してもスワップが保持されます。

[template id=”99″]

Kusanagi for ConoHa で最低限しておきたいSSHのセキュリティ設定

昨日ぐらいにGCEのf1-micro(とロリポップ)からConoHaに乗り換えました。

 
このはちゃん可愛い…

普段はDebianを使っているのですがWordPressやらの環境を整えるのが面倒くさいので、手抜きでKUSANAGI for ConoHaを使うことにしました。
CentOSがベースなんですね…うぅ…

では、KUSANAGI for ConoHaに限らず本当に最低限しておきたいセキュリティ設定です。
続きを読む

[Word2Vec] バイナリファイルからテキストファイル、テキストファイルからバイナリファイルへ変換

w2vで処理したのはいいけどバイナリファイルにするの忘れてた!とか、テキストファイルが欲しくなった!とかに使えそうなやつです。
gensimが必要になります。

$ pip install gensim

バイナリファイルからテキストファイルへ変換する場合は、テキストファイルのサイズが大きくなるのでHDD/SSDの記憶容量にご注意ください。
処理にそこそこ時間がかかります。

https://pastebin.com/2w2Bc8eT


from gensim.models.keyedvectors import KeyedVectors
 
# Convert binary file to text file
w2v_model = KeyedVectors.load_word2vec_format('Path to bin file', binary=True)
w2v_model.save_word2vec_format('Path to output', binary=False)
 
# Convert text file to binary file
w2v_model = KeyedVectors.load_word2vec_format('Path to text file', binary=False)
w2v_model.save_word2vec_format('Path to output', binary=True)