Saturday, 5 September 2020

暴走夫妻

https://www.youtube.com/c/%E6%9A%B4%E8%B5%B0%E5%A4%AB%E5%A6%BB/videos

seaborn 6 Violinplots

 import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import signal
sns.set(style="darkgrid")

tips = sns.load_dataset("tips")
tips.head()

  total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
1 10.34 1.66 Male No Sun Dinner 3
2 21.01 3.50 Male No Sun Dinner 3
3 23.68 3.31 Male No Sun Dinner 2
4 24.59 3.61 Female No Sun Dinner 4

sns.catplot(x="total_bill", y="day", hue="sex",
            kind="violin", data=tips);


sns.catplot(x="day", y="total_bill", hue="sex",
            kind="violin", split=True, data=tips);
reference:

Friday, 4 September 2020

powershell 26 schedule task on remote computer

notepad++ is scheduled to run 1 min later from now on remote computer

notepad++ runs as scheduled

PS C:\Windows\System32> invoke-command -session $session -scriptblock {
>>     $action = New-ScheduledTaskAction -Execute 'C:\Program Files (x86)\Notepad++\notepad++.exe'
>>
>> $triggerNew-ScheduledTaskTrigger -Once -At (get-date).AddMinutes(1)
>>
>> Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "start notepad++" -Description "powershell schedule to open notepad++"
>> }

TaskPath                                       TaskName                          State      PSComputerName
--------                                       --------                          -----      --------------

#delete scheduled task on remote
PS C:\Windows\System32> invoke-command -session $session -scriptblock {
>>     Get-ScheduledTask -TaskName "start notepad++" | Unregister-ScheduledTask -Confirm:$false
>> }

task scheduler

孫老師說樓市新格局

windows schedule basic task

 

create a basic task in task scheduler

create one time trigger to start notepad++

notepad++ starts on schedule

delete scheduled task
reference:

https://www.digitalcitizen.life/how-create-task-basic-task-wizard