・一定倍で小さくする
・ファイルの長辺の大きさで決める
・ファイルサイズで決める
というモード切り替えが可能です。
quality は 85 にしています。それ以上にすると ファイルサイズが大きくなるわりに画質は向上しない とのこと
$ xmodmap -e "keycode 66 = Escape NoSymbol Escape"
これをmy_command.shに記入します。#!/bin/sh
# swap Capslock to Escape
xmodmap -e "keycode 66 = Escape NoSymbol Escape"
Startup Applications Preferenceで設定します。「session」とか「startup」で検索すると出てきます。$ python -m ipykernel install --user
jupyter --paths
jupyter --config-dir
#include
#include
#include
using namespace std;
int main(){
// 2のD乗 の選択肢を ビットで計算する
int D = 4;
for (int mask = 0; mask < (1 << D); ++mask){
int s = 0, num = 0, rest_max = -1;
string bi = "";
for (int i=0; i < D; ++i){
/*
// mask >> i & 1 は 右シフトして最下位のビットが1かを見るので、
// maskを2進数表示したときの並びが下位から出てくる
// 2**n の選択 の総当りに使える
cout << "mask: "<> i): "<< (mask >> i)
<< " (mask >> i & 1): " << (mask >> i & 1) << endl;
*/
if (mask >> i & 1){
bi.insert(0, "1");
} else {
bi.insert(0, "0");
}
}
cout << bi << endl;
}
cout << endl;
}
#include <iostream>
using namespace std;
int main(){
int p[10]; // 配列p の宣言 要素は10
p[0] = 0;
p[1] = 1;
for (int i=0; i<10 br="" i=""> cout << p[i] << endl;
}
return 0;
}10>
出力 0 1 0 0 4196688 0 4196240 0 1565145232 32765 -1563105536 -1766918773
#include <iostream>
using namespace std;
int main(){
int p[10] = {1};
p[0] = 0;
p[1] = 1;
for (int i=0; i<10 br="" i=""> cout << p[i] << endl;
}
return 0;
}10>
出力 0 1 0 0 0 0 0 0 0 0
chrome://flags/#top-chrome-md
dir(...)
If called without an argument, return the names in the current scope.
Else, return an alphabetized list of names comprising (some of) the attributes
of the given object, and of attributes reachable from it.
Exception:
Traceback (most recent call last):
File "C:\Users\...\anaconda3\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 5: invalid start byte
$ g++ --version
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt update
$ sudo apt install gcc-6
$ sudo apt install g++-6
(ここでバージョン確認しても上がっていない)$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
$ g++ --version
#include <iostream>
int main()
{
std::cout << __cplusplus << std::endl;
}
このコードを実行してC++スタンダードを確認すると
$ unity-tweak-tool
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
Error: schema com.canonical.indicator.bluetooth not installed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
The following schema is missing
com.canonical.indicator.bluetooth
In order to work properly, Unity Tweak Tool recommends you install the necessary packages
$ unity-tweak-tool
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
Another instance of Unity Tweak Tool seems to be running with
process id 6498. Switching to the already existing window.
If you believe there is no other instance running, remove the
file /home/shimo/.cache/unity-tweak-tool/pid.lockfile and try again.
Error: schema com.canonical.indicator.bluetooth not installed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
$ unity-tweak-tool --reset-unity
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
WARNING: You are about to reset Unity to its default configuration.
This will result in loss of configuration.
It is normal for your desktop to flicker during the process.
Type yes to continue, anything else to exit.
Do you wish to continue?yes
Initialising Unity reset
Killing Unity and Compiz
Resetting compiz plugins
Schema org.compiz.session successfully reset
Schema org.compiz.scaleaddon successfully reset
Schema org.compiz.core successfully reset
Schema org.compiz.clone successfully reset
Schema org.compiz.ring successfully reset
Schema org.compiz.scale successfully reset
Schema org.compiz.composite successfully reset
Schema org.compiz.wallpaper successfully reset
Schema org.compiz.screenshot successfully reset
Schema org.compiz.mblur successfully reset
Schema org.compiz.workarounds successfully reset
Schema org.compiz.animation successfully reset
Schema org.compiz.shift successfully reset
Schema org.compiz.winrules successfully reset
Schema org.compiz.opengl successfully reset
Schema org.compiz.water successfully reset
Schema org.compiz.matecompat successfully reset
Schema org.compiz.fade successfully reset
Schema org.compiz.mousepoll successfully reset
Schema org.compiz.gnomecompat successfully reset
Schema org.compiz.grid successfully reset
Schema org.compiz.shelf successfully reset
Schema org.compiz.kdecompat successfully reset
Schema org.compiz.opacify successfully reset
Schema org.compiz.obs successfully reset
Schema org.compiz.cube successfully reset
Schema org.compiz.annotate successfully reset
Schema org.compiz.freewins successfully reset
Schema org.compiz.staticswitcher successfully reset
Schema org.compiz.maximumize successfully reset
Schema org.compiz.firepaint successfully reset
Schema org.compiz.trailfocus successfully reset
Schema org.compiz.resize successfully reset
Schema org.compiz.splash successfully reset
Schema org.compiz.neg successfully reset
Schema org.compiz.profile successfully reset
Schema org.compiz.wobbly successfully reset
Schema org.compiz.unityshell successfully reset
Schema org.compiz.extrawm successfully reset
Schema org.compiz.switcher successfully reset
Schema org.compiz.titleinfo successfully reset
Schema org.compiz.place successfully reset
Schema org.compiz.snap successfully reset
Schema org.compiz.scalefilter successfully reset
Schema org.compiz.resizeinfo successfully reset
Schema org.compiz.vpswitch successfully reset
Schema org.compiz.commands successfully reset
Schema org.compiz.widget successfully reset
Schema org.compiz.decor successfully reset
Schema org.compiz.showdesktop successfully reset
Schema org.compiz.expo successfully reset
Schema org.compiz.addhelper successfully reset
Schema org.compiz.rotate successfully reset
Schema org.compiz.td successfully reset
Schema org.compiz.move successfully reset
Schema org.compiz.crashhandler successfully reset
Schema org.compiz.wizard successfully reset
Schema org.compiz.thumbnail successfully reset
Schema org.compiz.imgsvg successfully reset
Schema org.compiz.mag successfully reset
Schema org.compiz.put successfully reset
Schema org.compiz.cubeaddon successfully reset
Schema org.compiz.wall successfully reset
Schema org.compiz.ezoom successfully reset
Schema org.compiz.imgjpeg successfully reset
Schema org.compiz.notification successfully reset
Schema org.compiz.bench successfully reset
Schema org.compiz.workspacenames successfully reset
Schema org.compiz.fadedesktop successfully reset
Schema org.compiz.showmouse successfully reset
Schema org.compiz.unitymtgrabhandles successfully reset
Schema org.compiz.showrepaint successfully reset
Resetting more compiz plugins
Schema org.compiz.gwd successfully reset
Schema org.compiz successfully reset
Schema org.compiz.integrated successfully reset
Resetting Unity settings
Schema com.canonical.Unity.Dash successfully reset
Schema com.canonical.Unity successfully reset
Schema com.canonical.Unity.FilesLens successfully reset
Schema com.canonical.Unity.Interface successfully reset
Schema com.canonical.Unity.Runner successfully reset
Schema com.canonical.Unity.Devices successfully reset
Schema com.canonical.Unity.ApplicationsLens successfully reset
Schema com.canonical.Unity.Decorations successfully reset
Schema com.canonical.Unity.Gestures successfully reset
Schema com.canonical.Unity.IntegratedMenus successfully reset
Reset complete. Reloading unity
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity
We're already using profile 'unity', no need to switch
unity-panel-service stop/waiting
unity7 stop/waiting
unity-panel-service start/running, process 7945
unity7 start/running, process 8049
Please log out and log back in.
(略)...\profiler_mutiprocessing\memory> mprof plot
matplotlib is needed for plotting.
DLL load failed: 指定されたプロシージャが見つかりません。
try:
import pylab as pl
except ImportError as e:
print("matplotlib is needed for plotting.")
print(e)
ということで、pylabが入っていないようです。Export-Csv -Encoding UTF8
としてエンコードをUTF8に設定できます。pandas.read_csv
を使うと utf-8 で読めます(日本語になっている)。import inspect
def lineno():
"""Returns the current line number in our program."""
return inspect.currentframe().f_back.f_lineno
if __name__ == "__main__":
print(lineno())