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
| # Edit this configuration file to define what should be installed on | |
| # your system. Help is available in the configuration.nix(5) man page | |
| # and in the NixOS manual (accessible by running ‘nixos-help’). | |
| { config, pkgs, ... }: | |
| { | |
| imports = | |
| [ # Include the results of the hardware scan. | |
| ./hardware-configuration.nix |
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
| ${cat configuration.nix} |
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
| String file contents |
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
| -- {-# LANGUAGE DeriveDataTypeable #-} | |
| -- {-# LANGUAGE FlexibleContexts #-} | |
| -- {-# LANGUAGE GADTs #-} | |
| -- {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| -- {-# LANGUAGE MultiParamTypeClasses #-} | |
| -- {-# LANGUAGE OverloadedStrings #-} | |
| -- {-# LANGUAGE QuasiQuotes #-} | |
| -- {-# LANGUAGE TemplateHaskell #-} | |
| -- {-# LANGUAGE TypeFamilies #-} | |
| -- {-# LANGUAGE ScopedTypeVariables #-} |
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
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE ViewPatterns #-} | |
| {-# LANGUAGE ExplicitForAll #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE InstanceSigs #-} |
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
| # Only execute this file once per shell. | |
| if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi | |
| __ETC_PROFILE_NIX_SOURCED=1 | |
| # Set up secure multi-user builds: non-root users build through the | |
| # Nix daemon. | |
| if [ "$USER" != root -o ! -w /nix/var/nix/db ]; then | |
| export NIX_REMOTE=daemon | |
| fi |
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
| data SupportData = SupportData | |
| { issues :: [Maybe (Entity Issue)] | |
| , customer :: Maybe (Entity Customer) | |
| , followUps :: [Entity FollowUp] | |
| , customerFollowUps :: [(Entity FollowUp, Entity Customer)] | |
| } | |
| getSupportRData :: CustomerId -> Handler SupportData | |
| getSupportRData customerId = do | |
| issue_mfollowUp_customer_list :: [(Entity Issue, Maybe (Entity FollowUp), Entity Customer)] <- runDB $ |
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
| data SupportData = SupportData | |
| { customer :: Entity Customer | |
| , followUps :: [Entity FollowUp] | |
| , customerFollowUps :: [(Entity FollowUp, Entity Customer)] | |
| } | |
| getSupportRData :: CustomerId -> Handler SupportData | |
| getSupportRData customerId = do | |
| customer_issues_followUps_list <- runDB $ | |
| E.select $ |
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
| from keras.models import Sequential | |
| from keras.layers import Dense | |
| model = Sequential() | |
| model.add(Dense(units=64, activation='relu', input_dim=100)) | |
| model.add(Dense(units=10, activation='softmax')) | |
| model.compile(loss='categorical_crossentropy', | |
| optimizer='sgd', |
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
| supportModalTemplate ::[Maybe (Entity Issue)] -> Maybe (Entity Customer) -> [Entity FollowUp] -> Html () | |
| supportModalTemplate _ Nothing _ = h2_ "Customer not found :S" | |
| supportModalTemplate issues (Just customer) followUps = do | |
| div_ [ class_ "panel panel-default" ] $ do | |
| div_ [ class_ "panel-heading" ] $ do | |
| h3_ [ class_ "panel-title" ] $ "Support" | |
| div_ [ class_ "panel-body" ] $ do | |
| div_ [ class_ "list-group" ] $ do | |
| forM_ issues $ \issue -> case issue of | |
| Nothing -> |