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
$size = 128 - 1 | |
[byte[]] $data = 0..$size | %{Get-Random -Maximum $size} | |
Set-Content -Value $data -Encoding byte my_binary.dat |
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
$size = 1024 * 128 | |
$data = New-Object byte[] $size | |
Set-Content -Value $data -Encoding byte my_binary.dat |
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
library(FactoMineR) | |
library(factoextra) | |
library(corrplot) | |
mydata = LifeCycleSavings | |
mypca = PCA(mydata, scale.unit = TRUE, graph = FALSE) | |
mypca$eig | |
fviz_pca_var(mypca, col.var = "cos2", gradient.cols = c("blue", "red"), repel = TRUE) |
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
library(NbClust) | |
library(factoextra) | |
library(Rmisc) | |
mydata = scale(LifeCycleSavings) | |
myAHCnum = NbClust(mydata, method = "ward.D", index = "all") | |
myNHCnum = NbClust(mydata, method = "kmeans", index = "alllong") | |
fig1 = fviz_nbclust(myAHCnum, method = "silhouette") | |
fig2 = fviz_nbclust(myNHCnum, method = "gap_stat", nboot = 100) |
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
$s_folder = "D:\temp\2020\20201204\source" | |
$d_folder = "D:\temp\2020\20201204\destination" | |
$bps = 48 | |
$csv = import-csv -path .\test.csv | |
foreach ($myline in $csv){ | |
$s_path = $s_folder + '\' + $myline.source | |
$d_path = $d_folder + '\' + $myline.destination | |
.\qaac64.exe $s_path -o $d_path -v $bps -r $myline.sampling --artist $myline.artist --album $myline.album --genre $myline.genre |
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
$myISO = 'E:\ISO\Microsoft Bookshelf Basic\BSBASIC2.ISO' | |
Mount-DiskImage $myISO | |
$vol = Get-DiskImage $myISO | Get-Volume | |
$old_drv = $vol.DriveLetter + ':' | |
$new_drv = 'X:' | |
#WMI | |
#Get-WmiObject -Class Win32_Volume | Where-Object {$_.DriveLetter -eq $old_drv} | Set-WmiInstance -Arguments @{DriveLetter=$new_drv} |
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
$myISO = 'E:\ISO\Microsoft Bookshelf Basic\BSBASIC2.ISO' | |
Mount-DiskImage $myISO | |
Get-DiskImage $myISO | Get-Volume | |
Get-DiskImage $myISO | Get-Volume | Get-Partition |
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
def is_number(val): | |
if val >= '0' and val <= '9': | |
return True | |
else: | |
return False | |
def my_atoi(val): | |
global p | |
local_p = 0 | |
ret = 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
# coding: utf-8 | |
# Your code here! | |
def make_puzzle(args): | |
puzzle = [] | |
row = [] | |
i = 0 | |
for c in args: | |
row.append(c) |
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
def make_puzzle(args): | |
puzzle = [] | |
row = [] | |
i = 0 | |
for c in args: | |
row.append(c) | |
if (i + 1) % 9 == 0: | |
puzzle.append(row) |
NewerOlder