Skip to content

Instantly share code, notes, and snippets.

Dmitriy Vlasov DmitriyVlasov

Block or report user

Report or block DmitriyVlasov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@swlaschin
swlaschin / effective-fsharp.md
Last active Jan 15, 2020
Effective F#, tips and tricks
View effective-fsharp.md

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
    • Keep IO at edges
View ParentChildAllParents.pq
let func =
// /*
(ParChTable as table,
ChildKey as text,
ParentKey as text,
LevelColumnName as text) =>
//*/
let
/*
@maxim-uvarov
maxim-uvarov / killerDateTableRu.pq
Last active Dec 2, 2018
функция в Power Query (язык M) создает таблицу с датами. Дополняет ее различными столбцами, включая данные о государственных выходных дня в РФ. https://github.com/power-bi/KillerDateTableRu
View killerDateTableRu.pq
Проект переехал в репозиторий https://github.com/power-bi/KillerDateTableRu
@protrolium
protrolium / ffmpeg.md
Last active Jan 21, 2020
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

View nuget-dependency-visualizer.fsx
#r @"packages\Streams.0.2.5\lib\Streams.Core.dll"
open System
open System.IO
open System.Collections.Generic
open Nessos.Streams
// make Visual Studio use the script directory
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__)
@dsyme
dsyme / Eto sample script
Created Oct 18, 2014
Sample of using the Eto cross-platform GUI framework (https://github.com/picoe/Eto/) with F# (on windows)
View Eto sample script
#r @"packages\Eto.Forms.1.3.0\lib\net40\Eto.dll"
#r @"packages\Eto.Platform.Windows.1.3.0\lib\net40\Eto.Platform.Windows.dll"
open System
open Eto.Forms
open Eto.Drawing
@forki
forki / gist:08d36d1e79603ef12c25
Last active Nov 17, 2015
Get Paket download counts
View gist:08d36d1e79603ef12c25
//------------------------------------------
// Step 0. Boilerplate to get the paket.exe tool
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (File.Exists "paket.exe") then
let url = "http://fsprojects.github.io/Paket/stable"
@mndrake
mndrake / DeedleFormatter.fsx
Created Apr 23, 2014
Deedle Series and IFrame formatter for IFSharp
View DeedleFormatter.fsx
#I "../lib"
#r "FSharp.Markdown.dll"
#r "FSharp.Literate.dll"
#r "Deedle.dll"
open System.IO
open Deedle
open Deedle.Internal
open FSharp.Literate
open FSharp.Markdown
View higher_order_functions.org
F#C#ScalaClojurePythonRubyHaskellSQLOCamlCommon LispErlangSmalltalkSchemeEcmascript 5Perl 5
mapSelectmapmapmapcollectmapSelectmapmapcarmapcollect:mapmapmap
filterWherefilterfilterfilterselectfilterWherefilterremove-if-notfilterselect:filterfiltergrep
foldAggregatefoldLeftreducereduceinjectfoldl
@mndrake
mndrake / Excel4.fs
Last active Nov 19, 2017
A F# wrapper class for the Excel4/Excel12 methods contained in Excel-DNA to mimic basic methods of the COM object model
View Excel4.fs
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
namespace Utility
You can’t perform that action at this time.