This file contains hidden or 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
tick :: State Int Int | |
tick = do | |
n <- get | |
put (n+1) | |
return n | |
{- | |
>>> tick | |
-} |
This file contains hidden or 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
@echo off | |
for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%x | |
for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x | |
set fmonth=00%Month% | |
set fday=00%Day% | |
set today=%Year%-%fmonth:~-2%-%fday:~-2% | |
echo opening %today% in VS Code Insiders | |
set file=c:\Data\00-Temp\%today%.md |
This file contains hidden or 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
# This file may be used to create an environment using: | |
# $ conda create --name <env> --file <this file> | |
# platform: osx-64 | |
@EXPLICIT | |
https://repo.anaconda.com/pkgs/main/osx-64/_tflow_select-2.3.0-mkl.conda | |
https://repo.anaconda.com/pkgs/main/osx-64/blas-1.0-mkl.conda | |
https://repo.anaconda.com/pkgs/main/osx-64/bzip2-1.0.8-h1de35cc_0.conda | |
https://repo.anaconda.com/pkgs/main/osx-64/c-ares-1.15.0-h1de35cc_1001.conda | |
https://repo.anaconda.com/pkgs/main/osx-64/ca-certificates-2020.1.1-0.conda | |
https://repo.anaconda.com/pkgs/main/osx-64/giflib-5.1.4-h1de35cc_1.conda |
This file contains hidden or 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
# This file may be used to create an environment using: | |
# $ conda create --name <env> --file <this file> | |
# platform: win-64 | |
@EXPLICIT | |
https://conda.anaconda.org/conda-forge/win-64/ca-certificates-2020.4.5.1-hecc5488_0.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/win-64/icc_rt-2019.0.0-h0cc432a_1.conda | |
https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2020.0-166.conda | |
https://repo.anaconda.com/pkgs/msys2/win-64/msys2-conda-epoch-20160418-1.tar.bz2 | |
https://conda.anaconda.org/conda-forge/win-64/pandoc-2.9.2.1-0.tar.bz2 | |
https://conda.anaconda.org/conda-forge/noarch/poppler-data-0.4.9-1.tar.bz2 |
This file contains hidden or 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
name: example-environment | |
channels: | |
- conda-forge | |
dependencies: | |
- numpy | |
- psutil | |
- toolz | |
- matplotlib | |
- dill | |
- pandas |
This file contains hidden or 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
name: example-environment | |
channels: | |
- conda-forge | |
dependencies: | |
- numpy | |
- matplotlib |
This file contains hidden or 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
module.exports = () => ({ | |
events: { }, | |
emit(event, ...args) { | |
(this.events[event] || []).forEach(i => i(...args)) | |
}, | |
on(event, cb) { | |
(this.events[event] = this.events[event] || []).push(cb) | |
return () => ( | |
this.events[event] = this.events[event].filter(i => i !== cb) | |
) |
This file contains hidden or 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
@click.group() | |
def cli(): | |
pass | |
@cli.command() | |
def a_command(): | |
print('a command without opßtions) | |
@cli.command() | |
@click.option('--count', default=1, help='Number of greetings.') |
This file contains hidden or 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
$fso = new-object -com Scripting.FileSystemObject | |
gci -Directory ` | |
| select @{l='Size'; e={$fso.GetFolder($_.FullName).Size}},FullName ` | |
| sort Size -Descending ` | |
| ft @{l='Size [MB]'; e={'{0:N2} ' -f ($_.Size / 1MB)}},FullName |
This file contains hidden or 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
const { ServiceBroker } = require('moleculer') | |
const publish = require('./publishService') | |
const serviceDefinition = require('./moleculer.filestore.service') | |
// Define nodeID and set the communication bus | |
const node = new ServiceBroker({ | |
transporter: "NATS" | |
}); | |
publish(node, serviceDefinition) |
NewerOlder