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
import autograd | |
import autograd.numpy as np | |
import numpy as orig_np | |
import xarray as xr | |
def patch_for_xarray_autograd_interop(): | |
def autograd_nanmean(x, *args, dtype=None, **kwargs): | |
r = np.mean(x[np.isfinite(x)], *args, **kwargs) | |
if dtype is not None: |
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
#include <iostream> | |
#include <map> | |
#include <vector> | |
// Adding forward declarations would make this compile | |
// template <typename K, typename V> | |
// std::ostream& operator<< (std::ostream&, const std::map<K, V>&); | |
// template <typename T> |
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
{-# LANGUAGE | |
RankNTypes, | |
TypeFamilies, | |
DeriveFunctor, | |
FlexibleContexts, | |
DefaultSignatures, | |
FlexibleInstances, | |
MultiParamTypeClasses | |
#-} |
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
{-# LANGUAGE RankNTypes, TupleSections, TemplateHaskell, DeriveGeneric #-} | |
import Control.Applicative | |
import Control.Lens | |
import qualified Data.Char as Char | |
import GHC.Generics | |
import Test.QuickCheck | |
import Test.QuickCheck.Arbitrary.ADT | |
data Expr |
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
#include <stdio.h> | |
#include "ipps.h" | |
int main() | |
{ | |
float t; | |
(*(int*)&t) = 3116044; | |
printf ("%g %g\n", t, sqrtf (t)); | |
IppStatus status = ippsSqrt_32f_I (&t, 1); | |
printf ("%g %d\n", t, status); |
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
{-# LANGUAGE RankNTypes, StandaloneDeriving, TemplateHaskell, UndecidableInstances #-} | |
module Data.Tree.Diverse | |
( Node(..), _Node | |
, Children(..), overChildren | |
, Ann(..), ann, val | |
) where | |
import qualified Control.Lens as Lens | |
import Data.Functor.Const (Const(..)) |
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
infixr 4 %%@~, <%@~, %%~, <+~, <*~, <-~, <//~, <^~, <^^~, <**~ | |
infix 4 %%@=, <%@=, %%=, <+=, <*=, <-=, <//=, <^=, <^^=, <**= | |
infixr 2 <<~ | |
infixr 9 #. | |
infixl 8 .# | |
infixr 8 ^!, ^@! | |
infixl 1 &, <&>, ?? | |
infixl 8 ^., ^@. | |
infixr 9 <.>, <., .> | |
infixr 4 %@~, .~, +~, *~, -~, //~, ^~, ^^~, **~, &&~, <>~, ||~, %~ |
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
#include "AltClick.h" | |
using namespace juce; | |
AltClick::AltClick() | |
{ | |
coveredComponent_ = nullptr; | |
isAltClickEvent_ = false; | |
} |
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
#include "PluginListManager.h" | |
class PluginListManager::Window : public DocumentWindow | |
{ | |
public: | |
Window (PluginListManager* manager) | |
: DocumentWindow ( | |
"Available Plugins", Colours::white, | |
DocumentWindow::minimiseButton | DocumentWindow::closeButton) | |
, manager_ (manager) |
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
#include "AudioProcessorParameterSlider.h" | |
using namespace juce; | |
AudioProcessorParameterSlider::AudioProcessorParameterSlider() | |
{ | |
initParameter(nullptr); | |
} | |
AudioProcessorParameterSlider::AudioProcessorParameterSlider (const AudioProcessorParameter* p) |
NewerOlder