Search: uri

22 result(s)

  • elements of 3 value tuple

    Analog to the fst and snd functions of the f# lib some functions for tuples with 3 values which i use quite regularly during prototyping phases.

    27 people like this

    Posted: 14 years ago by daniel szymanski

  • URL Canonicalization

    This function produces safe URLs for Web requests or URI construction. It forces the pattern: http:// + www. OR subdomain. + domain + absolute path. When used in an application that takes URLs as input, the user would be able to type "example.com" instead of "http://example.com" or "http://www.example.com". It also supports domains like google.co.uk or google.com.au.

    8 people like this

    Posted: 14 years ago by Taha Hachana

  • Uri Parser

    A Uri parser using the Cashel library [1]. This implementation is using ArraySegment as the underlying state, as I'm using it within a server, but it would be trivial to switch it to using a list. Also, note that I am not parsing the Uri into any specific structure, though that, too, would be trivial. For my current purposes, I just needed to validate the Uri. [1] https://github.com/panesofglass/cashel

    26 people like this

    Posted: 14 years ago by Ryan Riley

  • Project Euler Problem 19

    How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?

    3 people like this

    Posted: 13 years ago by Gene Belitski

  • Turing machine interpreter

    A Turing machine emulator. An infinite tape is simulated by a zipper, instructions are stored in the binary tree for faster lookup.

    4 people like this

    Posted: 13 years ago by Daniil

  • Simple exception analysis

    A simple script to list the exceptions that can be thrown during the method invocation (both caught and uncaught).

    5 people like this

    Posted: 12 years ago by Natallie Baikevich

  • fast Fourier transforms (FFT)

    Naive "school-book" implimentation.

    14 people like this

    Posted: 12 years ago by Kaspar

  • AdaBoost in F#

    I have provided a class that implements adaptive boosting (AdaBoost) which is a very elegant technique to create a strong classifier from a set of weak classifiers. The strong classifier is the sign of the weighted average of the best N weak classifiers where N is a user specified parameter. The training process consists of N selection rounds. During each round, the training samples are given a weight distribution. The classifier selected is the one that has the least error which is equal to the weighted average of incorrectly classified samples. Training samples that have been incorrectly classified are given a larger weight for the next round. This increases the likelihood of drafting a weak classifier that can help with as yet misclassified samples.

    2 people like this

    Posted: 12 years ago by Suzanna

  • Bin Packing

    Implementation of the 'best fit' heuristic algorithm for bin packing problems. Incudes an implementation of 'binary tree with duplicates'. See this blog post for details: http://fwaris.wordpress.com/2013/04/01/best-fit-bin-packing/ Update: Bug fixes and added 'worst fit' heuristic implementation

    5 people like this

    Posted: 12 years ago by Faisal Waris

  • Simple Crypto

    Simple symmetric key cryptogrphy. Ok for low security usages.

    5 people like this

    Posted: 12 years ago by Faisal Waris

  • Seattle F# Meetup 7/17/2013 Example Code - Imperative

    Imperative-style examples used during my talk for the Seattle F# Meetup on 7/17/2013. See corresponding functional-style examples at http://fssnip.net/iP

    1 people like this

    Posted: 12 years ago by Lincoln Atkinson

  • Seattle F# Meetup 7/17/2013 Example Code - Functional

    Functional-style examples used during my talk for the Seattle F# Meetup on 7/17/2013 See corresponding imperative-style examples at http://fssnip.net/iO

    1 people like this

    Posted: 12 years ago by Lincoln Atkinson

  • Monad Bind 1 of 3

    After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.

    3 people like this

    Posted: 11 years ago by Robert Nielsen

  • Monad Bind 2 of 3

    After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.

    1 people like this

    Posted: 11 years ago by Robert Nielsen

  • Monad Bind 3 of 3

    After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.

    1 people like this

    Posted: 11 years ago by Robert Nielsen

  • Brain Training Implementation from ProgNet15

    Created during the morning session of Progressive.Net 2015 with Phil Trelford

    1 people like this

    Posted: 10 years ago by Chris O'Dell

  • Brain Training Implementation from ProgNet15

    Created during the morning session of Progressive.Net 2015 with Phil Trelford

    1 people like this

    Posted: 10 years ago by John Donnellan

  • Intersperse an element into a sequence

    This function enables the repeated insertion of a specified value into a sequence. It ensures that Seq.skip will never throw an exception by always ensuring it never skips more elements than remain in the sequence.

    1 people like this

    Posted: 8 years ago by Hugh Gleaves

  • Optimized Fast Fourier Transform (FFT)

    Fast Fourier Transform algorithm inspired by the snippet http://fssnip.net/dC/title/fast-Fourier-transforms-FFT-. The original snippet was a beautiful and idiomatic implementation based on the definition of FFT. This version sacrifices idioms and elegance for performance. For data sets with 1024 samples this version seems to be about 100x faster and easier on the GC.

    3 people like this

    Posted: 8 years ago by Mårten Rånge

  • Reimplementation of C# Nullable type

    Type-safe Nullable in F# featuring: arithmetic operations on primitive types, structural equality/comparison, null-coalescing operator, explicit type conversion to the underlying type, throwing an exception in exceptional condition, `nullable` computation expression, and etc.

    2 people like this

    Posted: 5 years ago by Bang Jun-young

  • The roller problem solved with a Constraint Programming Solver (CPS)

    This is the solution of a homework the son of a friend had to solve during homeschooling and he asked a couple of his friends on how to solve the following problem: Given a kickboard has three rolls and a city roller has two rolls we want to know *how many kickboards and how many city rollers are parked*. We know two things: * The sum of all the rolls combined is 37 * There are 15 rollers (kickboards and rollers) parked Now being a developer I wanted to solve it via programming. :-D I've used the Decider library which allows you to formulate and solve the problem as following.

    3 people like this

    Posted: 4 years ago by toburger

  • More lazy AsyncSeq.groupBy

    A version of AsyncSeq.groupBy where the user can synchronously request all groups, but also all elements in each group during iteration and the operation does not deadlock.

    0 people like this

    Posted: 3 years ago by Tomas Petricek