Skip to content

Instantly share code, notes, and snippets.

Avatar

Hideki Saito hsaito

View GitHub Profile
@hsaito
hsaito / Conda.psd1
Created June 10, 2019 02:33
Anaconda Initialization Script Module Manifest for PowerShell
View Conda.psd1
@{
RootModule = 'Conda.psm1'
ModuleVersion = '1.0.0.0'
FunctionsToExport = @(
'Initialize-Conda'
)
CmdletsToExport = '*'
VariablesToExport = '*'
AliasesToExport = '*'
GUID = '23421dee-ca6f-4847-9c93-1268c629964a'
@hsaito
hsaito / Conda.psm1
Created June 10, 2019 02:30
Anaconda Initialization Script Module for PowerShell (Linux)
View Conda.psm1
function Initialize-Conda
{
$CONDA_ROOT_DIR = "/path/to/Anaconda" # Change this
[System.Environment]::SetEnvironmentVariable("CONDA_EXE", "$CONDA_ROOT_DIR/Scripts/conda.exe", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CE_M", "", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CE_CONDA", "", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CONDA_ROOT", "$CONDA_ROOT_DIR", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CONDA_EXE", "$CONDA_ROOT_DIR/Scripts/conda.exe", [System.EnvironmentVariableTarget]::Process)
Import-Module -Scope Global "$Env:_CONDA_ROOT/bin/conda"
@hsaito
hsaito / Conda.psm1
Created June 10, 2019 02:29
Anaconda Initialization Script Module for PowerShell (Windows)
View Conda.psm1
function Initialize-Conda
{
$CONDA_ROOT_DIR = "C:/path/to/Anaconda" # Change this
[System.Environment]::SetEnvironmentVariable("CONDA_EXE", "$CONDA_ROOT_DIR/Scripts/conda.exe", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CE_M", "", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CE_CONDA", "", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CONDA_ROOT", "$CONDA_ROOT_DIR", [System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable("_CONDA_EXE", "$CONDA_ROOT_DIR/Scripts/conda.exe", [System.EnvironmentVariableTarget]::Process)
Import-Module -Scope Global "$Env:_CONDA_ROOT/shell/condabin/Conda.psm1"
View Problem1.py
import unittest
def multiple3_5(high:int) -> int:
sum = 0
for i in range (1, high):
if i % 3 == 0:
sum += i
elif i % 5 == 0:
sum += i
return sum
@hsaito
hsaito / CLEAR.csv
Last active February 26, 2018 09:37
CLEAR (Maaya Sakamoto) Score by Hideki Saito
View CLEAR.csv
Attempt Score Vector
1 88.364 0.000
2 89.329 0.965
3 89.471 0.142
4 90.357 0.886
5 90.408 0.051
6 89.743 -0.665
7 90.822 0.414
8 91.008 0.186
9 91.310 0.302
View JetBrains-Settings-Sync.ps1
$dir = Get-Location
[string]::Format("Base: {0}",$dir)
foreach ($d in Get-ChildItem -Directory $dir)
{
[String]::Format("Processing: {0}",$d)
Push-Location $d
git reset --hard
git pull origin
git push origin
View Pokémon Elements Learning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hsaito
hsaito / openpgp.txt
Created December 12, 2016 09:05
OpenKeychain リンクしたユーザID
View openpgp.txt
このGistは私のOpenPGP鍵でリンクされたIDを確認し、このGitHubアカウントにリンクします。
検証のトークン:
[Verifying my OpenPGP key: openpgp4fpr:106639287b0be7cda0cb36861fdfd937aff2e40b]
@hsaito
hsaito / gist:1a6682fcabfdaf085d2e
Created May 25, 2015 01:50
Load all subdirectory
View gist:1a6682fcabfdaf085d2e
;; Site Lisp Path
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(let* ((my-lisp-dir "~/.emacs.d/site-lisp/")
(default-directory my-lisp-dir))
(setq load-path (cons my-lisp-dir load-path))
(normal-top-level-add-subdirs-to-load-path)))
View gist:2f90a614fb86f34c9ecf
### Keybase proof
I hereby claim:
* I am hsaito on github.
* I am unsignedint (https://keybase.io/unsignedint) on keybase.
* I have a public key whose fingerprint is 1066 3928 7B0B E7CD A0CB 3686 1FDF D937 AFF2 E40B
To claim this, I am signing this object: