text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="app_name">Commons</string>
  <string name="menu_settings">Ustawienia</string>
  <string name="username">Nazwa użytkownika</string>
  <string name="password">Hasło</string>
  <string name="login">Zaloguj się</string>
  <string name="signup">Zarejestruj się</string>
  <string name="logging_in_title">Logowanie</string>
  <string name="logging_in_message">Proszę czekać…</string>
  <string name="login_success">Zalogowano pomyślnie!</string>
  <string name="login_failed">Logowanie nie powiodło się!</string>
  <string name="upload_failed">Nie znaleziono pliku. Spróbuj znaleźć inny.</string>
  <string name="authentication_failed">Błąd uwierzytelniania!</string>
  <string name="uploading_started">Wysyłanie rozpoczęte!</string>
  <string name="upload_completed_notification_title">Przesłano %1$s!</string>
  <string name="upload_completed_notification_text">Dotknij, aby zobaczyć przesłany plik</string>
  <string name="upload_progress_notification_title_start">Rozpoczęto przesyłanie pliku %1$s</string>
  <string name="upload_progress_notification_title_in_progress">Wysyłanie %1$s</string>
  <string name="upload_progress_notification_title_finishing">Zakończono wysyłanie pliku %1$s</string>
  <string name="upload_failed_notification_title">Wysyłanie %1$s nieudane</string>
  <string name="upload_failed_notification_subtitle">Dotknij, aby zobaczyć</string>
  <plurals name="uploads_pending_notification_indicator">
    <item quantity="one">Przesyłanie %d pliku</item>
    <item quantity="other">Przesyłanie %d plików</item>
  </plurals>
  <string name="title_activity_contributions" fuzzy="true">Wysłane przeze mnie pliki</string>
  <string name="contribution_state_queued">W kolejce</string>
  <string name="contribution_state_failed">Porażka</string>
  <string name="contribution_state_in_progress">%1$d%% zakończone</string>
  <string name="contribution_state_starting">Wysyłanie</string>
  <string name="menu_from_gallery">Z galerii</string>
  <string name="menu_from_camera">Zrób zdjęcie</string>
  <string name="menu_nearby">W pobliżu</string>
  <string name="provider_contributions">Wysłane przeze mnie pliki</string>
  <string name="menu_share">Udostępnij</string>
  <string name="menu_open_in_browser">Zobacz w przeglądarce</string>
  <string name="share_title_hint">Tytuł</string>
  <string name="share_description_hint">Opis</string>
  <string name="login_failed_network">Nie można zalogować - błąd sieci</string>
  <string name="login_failed_username">Nie można zalogować - sprawdź nazwę użytkownika</string>
  <string name="login_failed_password">Nie można zalogować - sprawdź hasło</string>
  <string name="login_failed_throttled">Zbyt wiele nieudanych prób zalogowania. Spróbuj ponownie za kilka minut.</string>
  <string name="login_failed_blocked">Przepraszamy, ten użytkownik został zablokowany na Commons</string>
  <string name="login_failed_generic">Logowanie nie powiodło się</string>
  <string name="share_upload_button">Prześlij</string>
  <string name="multiple_share_base_title">Nazwij ten zestaw</string>
  <string name="provider_modifications">Zmiany</string>
  <string name="menu_upload_single">Prześlij</string>
  <string name="categories_search_text_hint">Szukaj kategorii</string>
  <string name="menu_save_categories">Zapisz</string>
  <string name="refresh_button">Odśwież</string>
  <plurals name="contributions_subtitle">
    <item quantity="zero">Przesłano @string/contributions_subtitle_zero</item>
    <item quantity="one">Przesłano %d plik</item>
    <item quantity="other">Przesłano %d pliki</item>
  </plurals>
  <plurals name="starting_multiple_uploads">
    <item quantity="one">Rozpoczęto %d przesyłanie</item>
    <item quantity="other">Rozpoczęto %d przesyłania</item>
  </plurals>
  <plurals name="multiple_uploads_title">
    <item quantity="one">%d przesłanie</item>
    <item quantity="other">%d przesłania</item>
  </plurals>
  <string name="categories_not_found">Nie znaleziono kategorii pasujących do %1$s</string>
  <string name="categories_skip_explanation">Dodaj kategorie, aby ułatwić odnalezienie plików w Wikimedia Commons.\n\nZacznij pisać, aby dodać kategorię.\nKliknij ten komunikat lub naciśnij "cofnij", aby pominąć ten krok.</string>
  <string name="categories_activity_title">Kategorie</string>
  <string name="preference_tracking">Raporty użycia</string>
  <string name="preference_tracking_summary">Wyślij raporty do Wikimedia, aby pomóc w ulepszeniu aplikacji</string>
  <string name="title_activity_settings">Ustawienia</string>
  <string name="title_activity_signup">Zarejestruj się</string>
  <string name="menu_about">O aplikacji</string>
  <string name="about_license">Oprogramowanie Open Source, wydane na licencji Apache License v2. Wikimedia Commons i jego logo są znakami towarowymi Wikimedia Foundation i są wykorzystywane za zgodą Wikimedia Foundation. Nie jesteśmy powiązani z Wikimedia Foundation.</string>
  <string name="about_improve">Kod źródłowy oraz strona internetowa na GitHub. Aby zgłosić błąd lub sugestię, utwórz nowe zgłoszenie na GitHub.</string>
  <string name="about_privacy_policy">Polityka prywatności</string>
  <string name="about_credits" fuzzy="true">Twórcy</string>
  <string name="title_activity_about">O aplikacji</string>
  <string name="menu_feedback">Wyślij opinię (przez e-mail)</string>
  <string name="no_email_client">Klient e-mail nie jest zainstalowany</string>
  <string name="provider_categories">Niedawno używane kategorie</string>
  <string name="waiting_first_sync">Oczekiwanie na pierwszą synchronizację…</string>
  <string name="no_uploads_yet">Nie przesłałeś jeszcze żadnych zdjęć.</string>
  <string name="menu_retry_upload">Ponów próbę</string>
  <string name="menu_cancel_upload">Anuluj</string>
  <string name="share_license_summary">Ten obraz będzie udostępniany na licencji %1$s</string>
  <string name="menu_download">Pobieranie</string>
  <string name="preference_license">Licencja</string>
  <string name="use_previous">Użyj poprzedniego tytułu/opisu</string>
  <string name="allow_gps">Automatycznie uzyskaj bieżącą lokalizację</string>
  <string name="allow_gps_summary">Pobierz aktualną lokalizację, aby uzyskać propozycje kategorii, jeśli obraz nie zawiera znaczników geograficznych</string>
  <string name="preference_theme">Tryb nocny</string>
  <string name="preference_theme_summary">Użyj ciemnej skórki</string>
  <string name="license_name_cc_by_sa_four">Uznanie autorstwa-Na tych samych warunkach 4.0</string>
  <string name="license_name_cc_by_four">Uznanie autorstwa 4.0</string>
  <string name="license_name_cc_by_sa"> Uznanie autorstwa-Na tych samych warunkach 3.0</string>
  <string name="license_name_cc_by"> Uznanie autorstwa 3.0</string>
  <string name="license_name_cc0">CC0</string>
  <string name="license_name_cc_by_sa_3_0">CC BY-SA 3.0</string>
  <string name="license_name_cc_by_sa_3_0_at">CC BY-SA 3.0 (Austria)</string>
  <string name="license_name_cc_by_sa_3_0_de">CC BY-SA 3.0 (Niemcy)</string>
  <string name="license_name_cc_by_sa_3_0_ee">CC BY-SA 3.0 (Estonia)</string>
  <string name="license_name_cc_by_sa_3_0_es">CC BY-SA 3.0 (Hiszpania)</string>
  <string name="license_name_cc_by_sa_3_0_hr">CC BY-SA 3.0 (Chorwacja)</string>
  <string name="license_name_cc_by_sa_3_0_lu">CC BY-SA 3.0 (Luksemburg)</string>
  <string name="license_name_cc_by_sa_3_0_nl">CC BY-SA 3.0 (Holandia)</string>
  <string name="license_name_cc_by_sa_3_0_no">CC BY-SA 3.0 (Norwegia)</string>
  <string name="license_name_cc_by_sa_3_0_pl">CC BY-SA 3.0 (Polska)</string>
  <string name="license_name_cc_by_sa_3_0_ro">CC BY-SA 3.0 (Rumunia)</string>
  <string name="license_name_cc_by_3_0">CC BY 3.0</string>
  <string name="license_name_cc_by_sa_4_0">CC BY-SA 4.0</string>
  <string name="license_name_cc_by_4_0">CC BY 4.0</string>
  <string name="license_name_cc_zero">CC Zero</string>
  <string name="tutorial_1_text">Wikimedia Commons przechowuje większość ilustracji wykorzystywanych w Wikipedii.</string>
  <string name="tutorial_1_subtext">Twoje ilustracje pomogą edukować ludzi na całym świecie!</string>
  <string name="tutorial_2_text">Możesz przesyłać zdjęcia lub obrazy stworzone samodzielnie przez Ciebie:</string>
  <string name="tutorial_2_subtext">- Natura (kwiaty, zwierzęta, góry)\n- Przydatne przedmioty (rowery, dworce kolejowe)\n- Znani ludzie, których spotkałeś (burmistrz, olimpijczyk)</string>
  <string name="tutorial_3_text">Prosimy NIE wysyłać:</string>
  <string name="tutorial_3_subtext">- Zdjęć przedstawiających siebie lub znajomych\n- Zdjęć pobranych z Internetu\n- Zrzutów ekranów płatnych aplikacji</string>
  <string name="tutorial_4_text">Przykład przesłania pliku:</string>
  <string name="tutorial_4_subtext">- Nazwa: Zamek Królewski w Warszawie\n- Opis: Zamek Królewski w Warszawie, widok od strony kolumny Zygmunta\n- Kategorie: Western facade (Royal Castle, Warsaw), Southern facade (Royal Castle, Warsaw), Castle Square in Warsaw</string>
  <string name="welcome_wikipedia_text">Dodaj swoje ilustracje. Pomóż ożyć artykułom w Wikipedii!</string>
  <string name="welcome_wikipedia_subtext">Ilustracje w Wikipedii pochodzą z Wikimedia Commons.</string>
  <string name="welcome_copyright_text">Twoje ilustracje pomagają w edukacji ludzi na całym świecie.</string>
  <string name="welcome_copyright_subtext">Unikaj materiałów objętych prawami autorskimi znalezionych w Internecie, a także zdjęć plakatów, okładek książek itp.</string>
  <string name="welcome_final_text">Czy wszystko jest jasne?</string>
  <string name="welcome_final_button_text">Tak!</string>
  <string name="detail_panel_cats_label">Kategorie</string>
  <string name="detail_panel_cats_loading" fuzzy="true">Ładowanie…</string>
  <string name="detail_panel_cats_none">Nic nie zaznaczono</string>
  <string name="detail_description_empty">Brak opisu</string>
  <string name="detail_license_empty">Nieznana licencja</string>
  <string name="menu_refresh">Odśwież</string>
  <string name="storage_permission_rationale">Wymagane uprawnienia: odczyt z dysku zewnętrznego. Aplikacja nie będzie w stanie funkcjonować bez tego.</string>
  <string name="location_permission_rationale">Opcjonalne zezwolenie: uzyskiwanie bieżącej lokalizacji dla wygenerowania propozycji kategorii</string>
  <string name="ok">OK</string>
  <string name="title_activity_nearby">Pobliskie miejsca</string>
  <string name="warning">Ostrzeżenie</string>
  <string name="file_exists">Ten plik już istnieje na Commons. Jesteś pewien, że chcesz kontynuować?</string>
  <string name="yes">Tak</string>
  <string name="no">Nie</string>
  <string name="media_detail_title">Tytuł</string>
  <string name="media_detail_media_title">Tytuł pliku</string>
  <string name="media_detail_description">Opis</string>
  <string name="media_detail_description_explanation">Tu jest miejsce na opis pliku. Mogą być dość długie i wymagać przewijania podczas czytania. Chcemy, by wszystko wyglądało dobrze.</string>
  <string name="become_a_tester_title">Zostań beta-testerem</string>
  <string name="become_a_tester_description">Dołącz do kanału bety w Google Play i dostań wczesny dostęp do nowych funkcji i łatek</string>
  <string name="use_wikidata">Użyj Wikidanych</string>
</resources>


text:
#ifdef _ERRNO_H

# include <bits/errno_values.h>

#ifndef ENOTSUP
# define ENOTSUP EOPNOTSUPP
#endif

#ifndef ECANCELED
# define ECANCELED	125
#endif

# ifndef __ASSEMBLER__

/* We now need a declaration of the `errno' variable.  */
extern int errno;

/* Function to get address of global `errno' variable.  */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));

#  if defined _LIBC
/* We wouldn't need a special macro anymore but it is history.  */
#   define __set_errno(val) ((errno) = (val))
#  endif /* _LIBC */

#  if defined __UCLIBC_HAS_THREADS__
/* When using threads, errno is a per-thread value.  */
#   define errno (*__errno_location ())
#  endif

# endif /* !__ASSEMBLER__ */
#endif /* _ERRNO_H */

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fspec-constr -fspec-constr-count=8 #-}

#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704
#define USE_DEFAULT_SIGNATURES
#endif

#ifdef USE_DEFAULT_SIGNATURES
{-# LANGUAGE DefaultSignatures, TypeFamilies #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module      :  Text.Parser.Char
-- Copyright   :  (c) Edward Kmett 2011
-- License     :  BSD3
--
-- Maintainer  :  ekmett@gmail.com
-- Stability   :  experimental
-- Portability :  non-portable
--
-- Parsers for character streams
--
-----------------------------------------------------------------------------
module Text.Parser.Char
  (
  -- * Combinators
    oneOf        -- :: CharParsing m => [Char] -> m Char
  , noneOf       -- :: CharParsing m => [Char] -> m Char
  , oneOfSet     -- :: CharParsing m => CharSet -> m Char
  , noneOfSet    -- :: CharParsing m => CharSet -> m Char
  , spaces       -- :: CharParsing m => m ()
  , space        -- :: CharParsing m => m Char
  , newline      -- :: CharParsing m => m Char
  , tab          -- :: CharParsing m => m Char
  , upper        -- :: CharParsing m => m Char
  , lower        -- :: CharParsing m => m Char
  , alphaNum     -- :: CharParsing m => m Char
  , letter       -- :: CharParsing m => m Char
  , digit        -- :: CharParsing m => m Char
  , hexDigit     -- :: CharParsing m => m Char
  , octDigit     -- :: CharParsing m => m Char
  , satisfyRange -- :: CharParsing m => Char -> Char -> m Char
  -- * Class
  , CharParsing(..)
  ) where

#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
import Control.Monad.Trans.Class
import Control.Monad.Trans.State.Lazy as Lazy
import Control.Monad.Trans.State.Strict as Strict
import Control.Monad.Trans.Writer.Lazy as Lazy
import Control.Monad.Trans.Writer.Strict as Strict
import Control.Monad.Trans.RWS.Lazy as Lazy
import Control.Monad.Trans.RWS.Strict as Strict
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Identity
import Control.Monad (MonadPlus(..))
import Data.Char
import Data.CharSet (CharSet(..))
import qualified Data.CharSet as CharSet
import Data.Foldable
import qualified Data.IntSet as IntSet
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
#endif
import Data.Text
import qualified Text.ParserCombinators.ReadP as ReadP
import qualified Text.Parsec as Parsec
import qualified Data.Attoparsec.Types as Att
import qualified Data.Attoparsec.Combinator as Att
import Text.Parser.Combinators

-- | @oneOf cs@ succeeds if the current character is in the supplied
-- list of characters @cs@. Returns the parsed character. See also
-- 'satisfy'.
--
-- >   vowel  = oneOf "aeiou"
oneOf :: CharParsing m => [Char] -> m Char
oneOf xs = oneOfSet (CharSet.fromList xs)
{-# INLINE oneOf #-}
{-# ANN oneOf "HLint: ignore Use String" #-}

-- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current
-- character is /not/ in the supplied list of characters @cs@. Returns the
-- parsed character.
--
-- >  consonant = noneOf "aeiou"
noneOf :: CharParsing m => [Char] -> m Char
noneOf xs = noneOfSet (CharSet.fromList xs)
{-# INLINE noneOf #-}
{-# ANN noneOf "HLint: ignore Use String" #-}

-- | @oneOfSet cs@ succeeds if the current character is in the supplied
-- set of characters @cs@. Returns the parsed character. See also
-- 'satisfy'.
--
-- >   vowel  = oneOf "aeiou"
oneOfSet :: CharParsing m => CharSet -> m Char
oneOfSet (CharSet True _ is)  = satisfy (\c -> IntSet.member (fromEnum c) is)
oneOfSet (CharSet False _ is) = satisfy (\c -> not (IntSet.member (fromEnum c) is))
{-# INLINE oneOfSet #-}

-- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current
-- character is /not/ in the supplied list of characters @cs@. Returns the
-- parsed character.
--
-- >  consonant = noneOf "aeiou"
noneOfSet :: CharParsing m => CharSet -> m Char
noneOfSet s = oneOfSet (CharSet.complement s)
{-# INLINE noneOfSet #-}

-- | Skips /zero/ or more white space characters. See also 'skipMany'.
spaces :: CharParsing m => m ()
spaces = skipMany space <?> "white space"
{-# INLINE spaces #-}

-- | Parses a white space character (any character which satisfies 'isSpace')
-- Returns the parsed character.
space :: CharParsing m => m Char
space = satisfy isSpace <?> "space"
{-# INLINE space #-}

-- | Parses a newline character (\'\\n\'). Returns a newline character.
newline :: CharParsing m => m Char
newline = char '\n' <?> "new-line"
{-# INLINE newline #-}

-- | Parses a tab character (\'\\t\'). Returns a tab character.
tab :: CharParsing m => m Char
tab = char '\t' <?> "tab"
{-# INLINE tab #-}

-- | Parses an upper case letter. Returns the parsed character.
upper :: CharParsing m => m Char
upper = satisfy isUpper <?> "uppercase letter"
{-# INLINE upper #-}

-- | Parses a lower case character. Returns the parsed character.
lower :: CharParsing m => m Char
lower = satisfy isLower <?> "lowercase letter"
{-# INLINE lower #-}

-- | Parses a letter or digit. Returns the parsed character.
alphaNum :: CharParsing m => m Char
alphaNum = satisfy isAlphaNum <?> "letter or digit"
{-# INLINE alphaNum #-}

-- | Parses a letter (an upper case or lower case character). Returns the
-- parsed character.
letter :: CharParsing m => m Char
letter = satisfy isAlpha <?> "letter"
{-# INLINE letter #-}

-- | Parses a digit. Returns the parsed character.
digit :: CharParsing m => m Char
digit = satisfy isDigit <?> "digit"
{-# INLINE digit #-}

-- | Parses a hexadecimal digit (a digit or a letter between \'a\' and
-- \'f\' or \'A\' and \'F\'). Returns the parsed character.
hexDigit :: CharParsing m => m Char
hexDigit = satisfy isHexDigit <?> "hexadecimal digit"
{-# INLINE hexDigit #-}

-- | Parses an octal digit (a character between \'0\' and \'7\'). Returns
-- the parsed character.
octDigit :: CharParsing m => m Char
octDigit = satisfy isOctDigit <?> "octal digit"
{-# INLINE octDigit #-}

satisfyRange :: CharParsing m => Char -> Char -> m Char
satisfyRange a z = satisfy (\c -> c >= a && c <= z)
{-# INLINE satisfyRange #-}

-- | Additional functionality needed to parse character streams.
class Parsing m => CharParsing m where
  -- | Parse a single character of the input, with UTF-8 decoding
  satisfy :: (Char -> Bool) -> m Char
#ifdef USE_DEFAULT_SIGNATURES
  default satisfy :: (MonadTrans t, CharParsing n, Monad n, m ~ t n) =>
                     (Char -> Bool) ->
                     t n Char
  satisfy = lift . satisfy
#endif
  -- | @char c@ parses a single character @c@. Returns the parsed
  -- character (i.e. @c@).
  --
  -- /e.g./
  --
  -- @semiColon = 'char' ';'@
  char :: Char -> m Char
  char c = satisfy (c ==) <?> show [c]
  {-# INLINE char #-}

  -- | @notChar c@ parses any single character other than @c@. Returns the parsed
  -- character.
  notChar :: Char -> m Char
  notChar c = satisfy (c /=)
  {-# INLINE notChar #-}

  -- | This parser succeeds for any character. Returns the parsed character.
  anyChar :: m Char
  anyChar = satisfy (const True)
  {-# INLINE anyChar #-}

  -- | @string s@ parses a sequence of characters given by @s@. Returns
  -- the parsed string (i.e. @s@).
  --
  -- >  divOrMod    =   string "div"
  -- >              <|> string "mod"
  string :: String -> m String
  string s = s <$ try (traverse_ char s) <?> show s
  {-# INLINE string #-}

  -- | @text t@ parses a sequence of characters determined by the text @t@ Returns
  -- the parsed text fragment (i.e. @t@).
  --
  -- Using @OverloadedStrings@:
  --
  -- >  divOrMod    =   text "div"
  -- >              <|> text "mod"
  text :: Text -> m Text
  text t = t <$ string (unpack t)
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m) => CharParsing (Lazy.StateT s m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m) => CharParsing (Strict.StateT s m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m) => CharParsing (ReaderT e m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (Strict.WriterT w m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (Lazy.WriterT w m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (Lazy.RWST r w s m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (Strict.RWST r w s m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance (CharParsing m, MonadPlus m) => CharParsing (IdentityT m) where
  satisfy = lift . satisfy
  {-# INLINE satisfy #-}
  char    = lift . char
  {-# INLINE char #-}
  notChar = lift . notChar
  {-# INLINE notChar #-}
  anyChar = lift anyChar
  {-# INLINE anyChar #-}
  string  = lift . string
  {-# INLINE string #-}
  text = lift . text
  {-# INLINE text #-}

instance Parsec.Stream s m Char => CharParsing (Parsec.ParsecT s u m) where
  satisfy   = Parsec.satisfy
  char      = Parsec.char
  notChar c = Parsec.satisfy (/= c)
  anyChar   = Parsec.anyChar
  string    = Parsec.string

instance Att.Chunk t => CharParsing (Att.Parser t) where
  satisfy p = fmap e2c $ Att.satisfyElem $ p . e2c
    where e2c = Att.chunkElemToChar (undefined :: t)
  {-# INLINE satisfy #-}

instance CharParsing ReadP.ReadP where
  satisfy   = ReadP.satisfy
  char      = ReadP.char
  notChar c = ReadP.satisfy (/= c)
  anyChar   = ReadP.get
  string    = ReadP.string


text:
package org.scijava.plugin;

import java.util.List;

/**
 * A service for managing {@link HandlerPlugin}s of a particular type.
 * <p>
 * For any given data object, the service is capable of determining the most
 * appropriate handler by sequentially querying each handler plugin on its list
 * (via {@link HandlerPlugin#supports}).
 * </p>
 *
 * @author Curtis Rueden
 * @param <DT> Base data type handled by the handlers.
 * @param <PT> Plugin type of the handlers.
 * @see HandlerPlugin
 */
public interface HandlerService<DT, PT extends HandlerPlugin<DT>> extends
	SingletonService<PT>, TypedService<DT, PT>
{

	/**
	 * Gets the most appropriate handler for the given data object, or null if no
	 * handler supports it.
	 */
	default PT getHandler(final DT data) {
		for (final PT handler : getInstances()) {
			try {
				if (handler.supports(data)) return handler;
			}
			catch (final Throwable t) {
				log().error("Malfunctioning plugin: " + handler.getClass().getName(), t);
			}
		}
		return null;
	}

	// -- SingletonService methods --

	/**
	 * Gets the list of handlers. There will be one singleton instance for each
	 * available handler plugin.
	 */
	@Override
	List<PT> getInstances();

	// -- Typed methods --

	/** Gets whether the given data object is supported. */
	@Override
	default boolean supports(final DT data) {
		return getHandler(data) != null;
	}
}


text:
This is an internal component which manages E2E keys from clients. It handles all the [Key Management APIs](https://matrix.org/docs/spec/client_server/r0.6.1#key-management-api) with the exception of `/keys/changes` which is handled by Sync API. This component is designed to shard by user ID.

Keys are uploaded and stored in this component, and key changes are emitted to a Kafka topic for downstream components such as Sync API.

### Internal APIs
- `PerformUploadKeys` stores identity keys and one-time public keys for given user(s).
- `PerformClaimKeys` acquires one-time public keys for given user(s). This may involve outbound federation calls.
- `QueryKeys` returns identity keys for given user(s). This may involve outbound federation calls. This component may then cache federated identity keys to avoid repeatedly hitting remote servers.
- A topic which emits identity keys every time there is a change (addition or deletion).

### Endpoint mappings
- Client API maps `/keys/upload` to `PerformUploadKeys`.
- Client API maps `/keys/query` to `QueryKeys`.
- Client API maps `/keys/claim` to `PerformClaimKeys`.
- Federation API maps `/user/keys/query` to `QueryKeys`.
- Federation API maps `/user/keys/claim` to `PerformClaimKeys`.
- Sync API maps `/keys/changes` to consuming from the Kafka topic.


text:
from pyrem.task import Task, TaskStatus

class DummyTask(Task):
    def _start(self):
        pass

    def _wait(self):
        pass

    def _stop(self):
        pass

class TestDummyTask(object):
    @classmethod
    def setup_class(klass):
        """This method is run once for each class before any tests are run"""
        pass

    @classmethod
    def teardown_class(klass):
        """This method is run once for each class _after_ all tests are run"""
        pass

    def setup(self):
        self.task = DummyTask()

    def teardown(self):
        """This method is run once after _each_ test method is executed"""
        pass

    def test_status(self):
        assert self.task._status == TaskStatus.IDLE
        self.task.start()
        assert self.task._status == TaskStatus.STARTED
        self.task.wait()
        assert self.task._status == TaskStatus.STOPPED

    def test_status2(self):
        self.task.start(wait=True)
        assert self.task._status == TaskStatus.STOPPED


text:
<?php

namespace MwbExporter\Formatter\Zend\DbTable;

use MwbExporter\Formatter\Formatter as BaseFormatter;
use MwbExporter\Model\Base;

class Formatter extends BaseFormatter
{
    const CFG_TABLE_PREFIX           = 'tablePrefix';
    const CFG_PARENT_TABLE           = 'parentTable';
    const CFG_GENERATE_DRI           = 'generateDRI';
    const CFG_GENERATE_GETTER_SETTER = 'generateGetterSetter';

    protected function init()
    {
        parent::init();
        $this->addConfigurations(array(
            static::CFG_INDENTATION             => 4,
            static::CFG_FILENAME                => 'DbTable/%schema%/%entity%.%extension%',
            static::CFG_TABLE_PREFIX            => 'Application_Model_DbTable_',
            // If you want to use your personnal Zend_Db_Table_Abstract,
            // you need to specifie here his name
            static::CFG_PARENT_TABLE            => 'Zend_Db_Table_Abstract',
            // If true, the script will generate the $_dependentTables.
            // Before active this option please read:
            // http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.cascading
            static::CFG_GENERATE_DRI            => false,
            static::CFG_GENERATE_GETTER_SETTER  => false,
        ));
    }

    /**
     * (non-PHPdoc)
     * @see \MwbExporter\Formatter\Formatter::createDatatypeConverter()
     */
    protected function createDatatypeConverter()
    {
        return new DatatypeConverter();
    }

    /**
     * (non-PHPdoc)
     * @see \MwbExporter\Formatter\Formatter::createTable()
     */
    public function createTable(Base $parent, $node)
    {
        return new Model\Table($parent, $node);
    }

    /**
     * (non-PHPdoc)
     * @see \MwbExporter\Formatter\Formatter::createForeignKey()
     */
    public function createForeignKey(Base $parent, $node)
    {
        return new Model\ForeignKey($parent, $node);
    }

    public function getTitle()
    {
        return 'Zend DbTable';
    }

    public function getFileExtension()
    {
        return 'php';
    }
}


text:
layout: page
title: "Erinn Kellie Liebhard"
comments: true
description: "blanks"
keywords: "Erinn Kellie Liebhard,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Arts and Sciences

**Classes taught**: DNCE 1017, DNCE 1100, DNCE 1220, DNCE 1901, DNCE 4017

#### DNCE 1017: Dance and Popular Culture

**Terms taught**: Spring 2014, Fall 2014, Spring 2015

**Instructor rating**: 5.14

**Standard deviation in instructor rating**: 0.12

**Average grade** (4.0 scale): 2.78

**Standard deviation in grades** (4.0 scale): 0.15

**Average workload** (raw): 2.32

**Standard deviation in workload** (raw): 0.1

#### DNCE 1100: Beginning Ballet

**Terms taught**: Fall 2012, Spring 2013

**Instructor rating**: 5.61

**Standard deviation in instructor rating**: 0.28

**Average grade** (4.0 scale): 3.25

**Standard deviation in grades** (4.0 scale): 0.22

**Average workload** (raw): 1.34

**Standard deviation in workload** (raw): 0.08

#### DNCE 1220: Beginning Jazz with Experience

**Terms taught**: Fall 2012, Spring 2013

**Instructor rating**: 5.76

**Standard deviation in instructor rating**: 0.12

**Average grade** (4.0 scale): 3.35

**Standard deviation in grades** (4.0 scale): 0.36

**Average workload** (raw): 1.59

**Standard deviation in workload** (raw): 0.03

#### DNCE 1901: Technique Practicum

**Terms taught**: Fall 2013

**Instructor rating**: 5.65

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.44

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 1.6

**Standard deviation in workload** (raw): 0.0

#### DNCE 4017: History and Philosophy of Dance

**Terms taught**: Fall 2012

**Instructor rating**: 5.69

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 2.87

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 2.56

**Standard deviation in workload** (raw): 0.0


text:
<?php

namespace Magento\Paypal\Test\Unit\Model;

use \Magento\Paypal\Model\AbstractConfig;

/**
 * Class AbstractConfigTesting
 * @package Magento\Paypal\Test\Unit\Model
 */
class AbstractConfigTesting extends AbstractConfig
{

}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/home/amair/AndroidStudioProjects/SimpleDynamo/app/src/main/res/values-sw720dp-land/dimens.xml -->
    <eat-comment/>
    <dimen name="activity_horizontal_margin">128dp</dimen>
</resources>


text:
<?xml version="1.0"?>
<ruleset name="Custom PHPMD rule set for Saber"
		 xmlns="http://pmd.sf.net/ruleset/1.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
		 xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
	<description>
		Custom PHPMD rule set for Saber.
	</description>
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/cleancode.xml" />
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/codesize.xml" />
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/controversial.xml" />
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/design.xml" />
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/naming.xml">
		<exclude name="ShortVariable" />
	</rule>
	<rule ref="https://github.com/phpmd/phpmd/tree/master/src/main/resources/rulesets/unusedcode.xml" />
</ruleset>


text:
//
//  RMSButtonCell.h
//
// Copyright (c) 2013 RoleModel Software, Inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
//

#import <UIKit/UIKit.h>
#import "RMSTargetActionCell.h"

/*!
 \brief A subclass of RMSFormCell intended for use as a button.
 */
@interface RMSButtonCell : RMSTargetActionCell

@property (nonatomic) BOOL enabled;

@end


text:
'use strict';

const fetchUrl = require('./fetchUrl');

/**
 * @param {Function} fetch - fetch API compatible function
 * @param {string} source
 * @param {Object} [fetchOptions={}]
 * @returns {Promise.<DefinitionProvider>}
 */
function urlProviderFactory(fetch, source) {
    let fetchOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

    let urlProvider = source;
    if (typeof source === 'string') {
        urlProvider = () => source;
    }

    /**
     * @param {Function} [callback]
     */
    return progressCallback => {
        const deferredUrls = urlProvider();
        return Promise.resolve(deferredUrls).then(oneOrMoreUrls => {

            if (typeof oneOrMoreUrls === 'object') {
                const result = {
                    null: {}
                };
                return Object.keys(oneOrMoreUrls).reduce((prev, key) => prev.then(() => {
                    const url = oneOrMoreUrls[key];
                    return fetchUrl(fetch, url, fetchOptions).then(urlResult => {
                        result[key] = urlResult;
                        if (progressCallback) {
                            progressCallback();
                        }
                    });
                }), Promise.resolve()).then(() => result);
            } else if (typeof oneOrMoreUrls === 'string') {
                return fetchUrl(fetch, oneOrMoreUrls, fetchOptions).then(urlResult => ({ null: urlResult }));
            }

            throw new Error('Unsupported url type');
        });
    };
}

module.exports = urlProviderFactory;


text:
#include "server_session.h"

namespace lnetlib
{
	server_session::server_session()
	{
	}

	server_session::~server_session()
	{
	}
}


text:
package org.orekit.utils;

import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.ode.ODEIntegrator;
import org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator;
import org.hipparchus.ode.nonstiff.DormandPrince54Integrator;
import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.orekit.Utils;
import org.orekit.attitudes.Attitude;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.bodies.CelestialBody;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.errors.OrekitException;
import org.orekit.forces.ForceModel;
import org.orekit.forces.gravity.NewtonianAttraction;
import org.orekit.forces.gravity.ThirdBodyAttraction;
import org.orekit.forces.gravity.ThirdBodyAttractionEpoch;
import org.orekit.frames.Frame;
import org.orekit.frames.FramesFactory;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.EpochDerivativesEquations;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.TimeScalesFactory;

import java.util.ArrayList;
import java.util.List;

public class MultipleShooterTest {

    private static final double eps = 1.0e-6;

    /** arbitrary date */
    private static final AbsoluteDate date = AbsoluteDate.J2000_EPOCH;
    /** arbitrary inertial frame */
    private static final Frame eci = FramesFactory.getGCRF();

    /** unused propagator */
    private NumericalPropagator propagator;
    /** mock force model */
    private ForceModel forceModel;
    /** arbitrary PV */
    private PVCoordinates pv;
    /** arbitrary state */
    private SpacecraftState state;
    /** subject under test */
    private EpochDerivativesEquations pde;

    @BeforeEach
    public void setUp() {
        Utils.setDataRoot("regular-data");
        propagator = new NumericalPropagator(new DormandPrince54Integrator(1, 500, 0.001, 0.001));
        forceModel = new ThirdBodyAttractionEpoch(CelestialBodyFactory.getSun());
        propagator.addForceModel(forceModel);
        propagator.addForceModel(new NewtonianAttraction(Constants.WGS84_EARTH_MU));
        pde = new EpochDerivativesEquations("ede", propagator);
        Vector3D p = new Vector3D(7378137, 0, 0);
        Vector3D v = new Vector3D(0, 7500, 0);
        pv = new PVCoordinates(p, v);
        state = new SpacecraftState(new AbsolutePVCoordinates(eci,date,pv))
                .addAdditionalState("ede", new double[2 * 3 * 6]);
        pde.setInitialJacobians(state);
    }

    @Test
    public void testMultipleShooting() {

        // Time settings
        // -------------
        final AbsoluteDate initialDate =
                        new AbsoluteDate(2000, 01, 01, 0, 0, 00.000,
                                         TimeScalesFactory.getUTC());
        final double arcDuration = 10000;

        final PVCoordinates firstGuess = new PVCoordinates(new Vector3D(1.25E10, 1.450E11, -7.5E9),
                                                           new Vector3D(-30000.0, 2500.0, -3500.0));

        // Integration parameters
        // ---------------------------
        // Adaptive stepsize boundaries
        final double minStep = 1;
        final double maxstep = 30000;

        // Integrator tolerances
        final double positionTolerance = 1000;
        final double velocityTolerance = 1;
        final double massTolerance = 1.0e-6;
        final double[] vecAbsoluteTolerances = {positionTolerance, positionTolerance, positionTolerance, velocityTolerance, velocityTolerance, velocityTolerance, massTolerance };
        final double[] vecRelativeTolerances =
                        new double[vecAbsoluteTolerances.length];

        // Integrator definition
        final AdaptiveStepsizeIntegrator integrator =
                        new DormandPrince853Integrator(minStep, maxstep,
                                                       vecAbsoluteTolerances,
                                                       vecRelativeTolerances);

        // Load Celestial bodies
        // ---------------------
        final CelestialBody   sun     = CelestialBodyFactory.getSun();
        final CelestialBody   earth    = CelestialBodyFactory.getEarthMoonBarycenter();
        final Frame primaryFrame = sun.getInertiallyOrientedFrame();

        // Trajectory definition
        // ---------------------
        final int narcs = 5;
        final List<SpacecraftState> correctedList = new ArrayList<SpacecraftState>(narcs + 1);
        final AbsolutePVCoordinates firstGuessAPV = new AbsolutePVCoordinates(primaryFrame, initialDate, firstGuess);
        List<SpacecraftState> firstGuessList2 = generatePatchPointsEphemeris(sun, earth, firstGuessAPV, arcDuration, narcs, integrator);
        final List<NumericalPropagator> propagatorList  = initializePropagators(sun, earth, integrator, narcs);
        final List<EpochDerivativesEquations> epochEquations = addDerivativesProviders(propagatorList);

        for (int i = 0; i < narcs + 1; i++) {
            final SpacecraftState sp = firstGuessList2.get(i);
            correctedList.add(new SpacecraftState(sp.getAbsPVA(), sp.getAttitude()));
        }

        // Perturbation on a patch point
        // -----------------------------

        final int nP = 1; // Perturbed patch point
        final Vector3D deltaP = new Vector3D(-50000,1000,0);
        final Vector3D deltaV = new Vector3D(0.1,0,1.0);
        final double deltaEpoch = 1000;

        final SpacecraftState firstGuessSP = correctedList.get(nP);
        final AttitudeProvider attPro = propagatorList.get(nP).getAttitudeProvider();

        // Small change of the a patch point
        final Vector3D newPos = firstGuessSP.getAbsPVA().getPosition().add(deltaP);
        final Vector3D newVel = firstGuessSP.getAbsPVA().getVelocity().add(deltaV);
        final AbsoluteDate newDate = firstGuessSP.getDate().shiftedBy(deltaEpoch);
        AbsolutePVCoordinates absPva = new AbsolutePVCoordinates(firstGuessSP.getFrame(), newDate, newPos, newVel);
        final Attitude attitude = attPro.getAttitude(absPva, newDate, absPva.getFrame());
        SpacecraftState newSP = new SpacecraftState(absPva , attitude);
        correctedList.set(nP, newSP);

        final double tolerance = 1.0;

        MultipleShooter multipleShooting = new MultipleShooter(correctedList, propagatorList, epochEquations, arcDuration, tolerance, 10);
        multipleShooting.setPatchPointComponentFreedom(1, 0, false);
        multipleShooting.setPatchPointComponentFreedom(1, 1, false);
        multipleShooting.setPatchPointComponentFreedom(1, 2, false);
        multipleShooting.setPatchPointComponentFreedom(1, 3, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 0, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 1, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 2, false);
        multipleShooting.setEpochFreedom(1, false);

        multipleShooting.compute();

        // Verify
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(0).getAbsPVA().getPosition(), correctedList.get(0).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(0).getAbsPVA().getVelocity(), correctedList.get(0).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.005230, Vector3D.distance(firstGuessList2.get(1).getAbsPVA().getPosition(), correctedList.get(1).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(1).getAbsPVA().getVelocity(), correctedList.get(1).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.009869, Vector3D.distance(firstGuessList2.get(2).getAbsPVA().getPosition(), correctedList.get(2).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(2).getAbsPVA().getVelocity(), correctedList.get(2).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.006641, Vector3D.distance(firstGuessList2.get(3).getAbsPVA().getPosition(), correctedList.get(3).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(3).getAbsPVA().getVelocity(), correctedList.get(3).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.003216, Vector3D.distance(firstGuessList2.get(4).getAbsPVA().getPosition(), correctedList.get(4).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(4).getAbsPVA().getVelocity(), correctedList.get(4).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(5).getAbsPVA().getPosition(), correctedList.get(5).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(5).getAbsPVA().getVelocity(), correctedList.get(5).getAbsPVA().getVelocity()), eps);

    }

    @Test
    public void testMultipleShootingWithEstimatedParameters() {

        // Time settings
        // -------------
        final AbsoluteDate initialDate =
                        new AbsoluteDate(2000, 01, 01, 0, 0, 00.000,
                                         TimeScalesFactory.getUTC());
        final double arcDuration = 10000;

        final PVCoordinates firstGuess = new PVCoordinates(new Vector3D(1.25E10, 1.450E11, -7.5E9),
                                                           new Vector3D(-30000.0, 2500.0, -3500.0));

        // Integration parameters
        // ---------------------------
        // Adaptive stepsize boundaries
        final double minStep = 1;
        final double maxstep = 30000;

        // Integrator tolerances
        final double positionTolerance = 1000;
        final double velocityTolerance = 1;
        final double massTolerance = 1.0e-6;
        final double[] vecAbsoluteTolerances = {positionTolerance, positionTolerance, positionTolerance, velocityTolerance, velocityTolerance, velocityTolerance, massTolerance };
        final double[] vecRelativeTolerances =
                        new double[vecAbsoluteTolerances.length];

        // Integrator definition
        final AdaptiveStepsizeIntegrator integrator =
                        new DormandPrince853Integrator(minStep, maxstep,
                                                       vecAbsoluteTolerances,
                                                       vecRelativeTolerances);

        // Load Celestial bodies
        // ---------------------
        final CelestialBody   sun     = CelestialBodyFactory.getSun();
        final CelestialBody   earth    = CelestialBodyFactory.getEarthMoonBarycenter();
        final Frame primaryFrame = sun.getInertiallyOrientedFrame();

        // Trajectory definition
        // ---------------------
        final int narcs = 5;
        final List<SpacecraftState> correctedList = new ArrayList<SpacecraftState>(narcs + 1);
        final AbsolutePVCoordinates firstGuessAPV = new AbsolutePVCoordinates(primaryFrame, initialDate, firstGuess);
        List<SpacecraftState> firstGuessList2 = generatePatchPointsEphemeris(sun, earth, firstGuessAPV, arcDuration, narcs, integrator);
        final List<NumericalPropagator> propagatorList  = initializePropagatorsWithEstimated(sun, earth, integrator, narcs);
        final List<EpochDerivativesEquations> epochEquations = addDerivativesProviders(propagatorList);

        for (int i = 0; i < narcs + 1; i++) {
            final SpacecraftState sp = firstGuessList2.get(i);
            correctedList.add(new SpacecraftState(sp.getAbsPVA(), sp.getAttitude()));
        }

        // Perturbation on a patch point
        // -----------------------------

        final int nP = 1; // Perturbated patch point
        final Vector3D deltaP = new Vector3D(-50000,1000,0);
        final Vector3D deltaV = new Vector3D(0.1,0,1.0);
        final double deltaEpoch = 1000;

        final SpacecraftState firstGuessSP = correctedList.get(nP);
        final AttitudeProvider attPro = propagatorList.get(nP).getAttitudeProvider();

        // Small change of the a patch point
        final Vector3D newPos = firstGuessSP.getAbsPVA().getPosition().add(deltaP);
        final Vector3D newVel = firstGuessSP.getAbsPVA().getVelocity().add(deltaV);
        final AbsoluteDate newDate = firstGuessSP.getDate().shiftedBy(deltaEpoch);
        AbsolutePVCoordinates absPva = new AbsolutePVCoordinates(firstGuessSP.getFrame(), newDate, newPos, newVel);
        final Attitude attitude = attPro.getAttitude(absPva, newDate, absPva.getFrame());
        SpacecraftState newSP = new SpacecraftState(absPva , attitude);
        correctedList.set(1, newSP);

        final double tolerance = 1.0;

        MultipleShooter multipleShooting = new MultipleShooter(correctedList, propagatorList, epochEquations, arcDuration, tolerance, 10);
        multipleShooting.setPatchPointComponentFreedom(1, 0, false);
        multipleShooting.setPatchPointComponentFreedom(1, 1, false);
        multipleShooting.setPatchPointComponentFreedom(1, 2, false);
        multipleShooting.setPatchPointComponentFreedom(1, 3, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 0, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 1, false);
        multipleShooting.setPatchPointComponentFreedom(narcs + 1, 2, false);
        multipleShooting.setEpochFreedom(1, false);

        multipleShooting.compute();

        // Verify
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(0).getAbsPVA().getPosition(), correctedList.get(0).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(0).getAbsPVA().getVelocity(), correctedList.get(0).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.000108, Vector3D.distance(firstGuessList2.get(1).getAbsPVA().getPosition(), correctedList.get(1).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(1).getAbsPVA().getVelocity(), correctedList.get(1).getAbsPVA().getVelocity()), eps);
        Assertions.assertEquals(0.000308, Vector3D.distance(firstGuessList2.get(2).getAbsPVA().getPosition(), correctedList.get(2).getAbsPVA().getPosition()), eps);
        Assertions.assertEquals(0.0,      Vector3D.distance(firstGuessList2.get(2).getAbsPVA().getVelocity(), correctedList.get(2).getAbsPVA().getVelocity()), eps);
    }

    @Test
    public void testNotInitialized() {
        Assertions.assertThrows(OrekitException.class, () -> {
            new EpochDerivativesEquations("partials", propagator).getMapper();
        });
    }

    @Test
    public void testTooSmallDimension() {
        Assertions.assertThrows(OrekitException.class, () -> {
            final EpochDerivativesEquations partials = new EpochDerivativesEquations("partials", propagator);
            partials.setInitialJacobians(state, new double[5][6], new double[6][2]);
        });
    }

    @Test
    public void testTooLargeDimension() {
        Assertions.assertThrows(OrekitException.class, () -> {
            final EpochDerivativesEquations partials = new EpochDerivativesEquations("partials", propagator);
            partials.setInitialJacobians(state, new double[8][6], new double[6][2]);
        });
    }

    @Test
    public void testMismatchedDimensions() {
        Assertions.assertThrows(OrekitException.class, () -> {
            final EpochDerivativesEquations partials = new EpochDerivativesEquations("partials", propagator);
            partials.setInitialJacobians(state, new double[6][6], new double[7][2]);
        });
    }

    private static List<SpacecraftState> generatePatchPointsEphemeris(final CelestialBody primary, final CelestialBody secondary,
                                                                      final AbsolutePVCoordinates initialAPV, final double arcDuration,
                                                                      final int narcs, final ODEIntegrator integrator) {

        List<SpacecraftState> firstGuessList = new ArrayList<SpacecraftState>(narcs+1);

        final double integrationTime = arcDuration;

        // Creating the initial spacecraftstate that will be given to the propagator

        final SpacecraftState initialState2 = new SpacecraftState(initialAPV);

        firstGuessList.add(initialState2);

        NumericalPropagator propagator = new NumericalPropagator(integrator);

        propagator.addForceModel(new NewtonianAttraction(primary.getGM()));
        propagator.addForceModel(new ThirdBodyAttraction(secondary));
        propagator.setOrbitType(null);

        propagator.setInitialState(initialState2);

        AbsoluteDate currentDate = initialAPV.getDate();
        for(int i = 0; i < narcs; i++) {

            currentDate = currentDate.shiftedBy(integrationTime);
            final SpacecraftState sp = propagator.propagate(currentDate);

            firstGuessList.add(sp);
        }
        return firstGuessList;
    }

    private static List<NumericalPropagator> initializePropagators(final CelestialBody primary, final CelestialBody secondary, final ODEIntegrator integrator,
                                                                   final int propagationNumber) {
        final List<NumericalPropagator> propagatorList = new ArrayList<NumericalPropagator>(propagationNumber);

        // Definition of the propagator
        for(int i = 0; i < propagationNumber; i++) {

            NumericalPropagator propagator = new NumericalPropagator(integrator);

            propagator.addForceModel(new NewtonianAttraction(primary.getGM()));
            propagator.addForceModel(new ThirdBodyAttractionEpoch(secondary));

            propagator.setOrbitType(null);
            propagatorList.add(propagator);
        }
        return propagatorList;
    }

    private static List<NumericalPropagator> initializePropagatorsWithEstimated(final CelestialBody primary, final CelestialBody secondary, final ODEIntegrator integrator,
                                                                                final int propagationNumber) {
        final List<NumericalPropagator> propagatorList = new ArrayList<NumericalPropagator>(propagationNumber);

        // Definition of the propagator
        for(int i = 0; i < propagationNumber; i++) {

            NumericalPropagator propagator = new NumericalPropagator(integrator);

            propagator.addForceModel(new NewtonianAttraction(primary.getGM()));
            final ForceModel model = new ThirdBodyAttractionEpoch(secondary);
            model.getParametersDrivers().get(0).setSelected(true);
            propagator.addForceModel(model);

            propagator.setOrbitType(null);
            propagatorList.add(propagator);
        }
        return propagatorList;
    }

    private static List<EpochDerivativesEquations> addDerivativesProviders(List<NumericalPropagator> propagatorList){
        final int narcs = propagatorList.size();
        final List<EpochDerivativesEquations> additionalEquations = new ArrayList<>(narcs) ;
        for(int i = 0; i < narcs; i++) {
            additionalEquations.add(new EpochDerivativesEquations("derivatives", propagatorList.get(i)));
        }
        return additionalEquations;

    }

}


text:
using System.Linq.Expressions;
using System.Text;

namespace Plethora.ExpressionAide
{
    /// <summary>
    /// Helper class to construct a textual graph to diagnose expression trees.
    /// </summary>
    public class Grapher
    {
        public static string TextGraph(Expression expression)
        {
            StringBuilder sb = new StringBuilder();
            AddGraphNode(sb, 0, "", expression);
            return sb.ToString();
        }

        private static void AddGraphNode(StringBuilder sb, int depth, string relationDescription, Expression expression)
        {
            if (expression == null)
                return;

            string strBranch = string.Empty;
            for (int i = 0; i < depth; i++)
            {
                strBranch += "| ";
            }
            string strNode = strBranch + "+-";
            strBranch += "|     ";

            sb.AppendLine($"{strNode} {relationDescription}: {expression.NodeType} - {expression.GetType().Name} [{expression.GetHashCode()}]");

            sb.Append(strBranch);
            sb.AppendLine("Type = " + expression.Type);
            if (expression is BinaryExpression)
            {
                var exp = (BinaryExpression)expression;

                sb.AppendLine(strBranch + "Method = " + ((exp.Method == null) ? "<null>" : exp.Method.Name));
                sb.AppendLine(strBranch + "IsLifted = " + exp.IsLifted);
                sb.AppendLine(strBranch + "IsLiftedToNull = " + exp.IsLiftedToNull);
                AddGraphNode(sb, depth + 1, "Conversion", exp.Conversion);
                AddGraphNode(sb, depth + 1, "Left", exp.Left);
                AddGraphNode(sb, depth + 1, "Right", exp.Right);
            }
            else if (expression is ConditionalExpression)
            {
                var exp = (ConditionalExpression)expression;

                AddGraphNode(sb, depth + 1, "Test", exp.Test);
                AddGraphNode(sb, depth + 1, "True", exp.IfTrue);
                AddGraphNode(sb, depth + 1, "False", exp.IfFalse);
            }
            else if (expression is ConstantExpression)
            {
                var exp = (ConstantExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine("Value = " + exp.Value);
            }
            else if (expression is InvocationExpression)
            {
                var exp = (InvocationExpression)expression;

                int i = 0;
                foreach (var argument in exp.Arguments)
                {
                    AddGraphNode(sb, depth + 1, "Argument " + i, argument);
                    i++;
                }
                AddGraphNode(sb, depth + 1, "Expression", exp.Expression);
            }
            else if (expression is LambdaExpression)
            {
                var exp = (LambdaExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine(exp.ToString());

                int i = 0;
                foreach (var parameter in exp.Parameters)
                {
                    AddGraphNode(sb, depth + 1, "Parameter " + i, parameter);
                    i++;
                }
                AddGraphNode(sb, depth + 1, "Body", exp.Body);
            }
            else if (expression is MemberExpression)
            {
                var exp = (MemberExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine("Member = " + exp.Member.Name);
                AddGraphNode(sb, depth + 1, "Expression", exp.Expression);
            }
            else if (expression is MethodCallExpression)
            {
                var exp = (MethodCallExpression)expression;

                var method = exp.Method;

                sb.Append(strBranch);
                sb.AppendLine("Method = " + (method.DeclaringType + "." + method.Name));
                AddGraphNode(sb, depth + 1, "Object", exp.Object);

                int i = 0;
                foreach (var argument in exp.Arguments)
                {
                    AddGraphNode(sb, depth + 1, "Argument " + i, argument);
                    i++;
                }
            }
            else if (expression is NewExpression)
            {
                var exp = (NewExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine("Constructor = " + exp.Constructor.Name);

                int i = 0;
                foreach (var argument in exp.Arguments)
                {
                    AddGraphNode(sb, depth + 1, "Argument " + i, argument);
                    i++;
                }

                i = 0;
                foreach (var member in exp.Members)
                {
                    sb.Append(strBranch);
                    sb.AppendLine("Member " + i + " = " + member.Name);
                    i++;
                }
            }
            else if (expression is NewArrayExpression)
            {
                var exp = (NewArrayExpression)expression;

                int i = 0;
                foreach (var express in exp.Expressions)
                {
                    AddGraphNode(sb, depth + 1, "Expression " + i, express);
                    i++;
                }
            }
            else if (expression is MemberInitExpression)
            {
                var exp = (MemberInitExpression)expression;

                int i = 0;
                foreach (var binding in exp.Bindings)
                {
                    sb.Append(strBranch);
                    sb.AppendLine("Binding " + i + ".BindingType = " + binding.BindingType);
                    sb.Append(strBranch);
                    sb.AppendLine("Binding " + i + ".Member = " + binding.Member.Name);

                    if (binding is MemberAssignment)
                    {
                        var bind = (MemberAssignment)binding;

                        AddGraphNode(sb, depth + 1, "Binding " + i + ".Expression", bind.Expression);
                    }
                    else if (binding is MemberMemberBinding)
                    {
                        var bind = (MemberMemberBinding)binding;

                        //AddGraphNode(sb, depth+1, "Binding " + i + ".Expression", bind.Bindings);
                    }
                    else if (binding is MemberListBinding)
                    {
                        var bind = (MemberListBinding)binding;

                        //AddGraphNode(sb, depth+1, "Binding " + i + ".Expression", bind.Initializers);
                    }

                    i++;
                }

                AddGraphNode(sb, depth + 1, "NewExpression", exp.NewExpression);
            }
            else if (expression is ListInitExpression)
            {
                var exp = (ListInitExpression)expression;

                int i = 0;
                foreach (var elementInit in exp.Initializers)
                {
                    sb.Append(strBranch);
                    sb.AppendLine("Initializer " + i + ".AddMethod = " + elementInit.AddMethod.Name);
                    int j = 0;
                    foreach (var argument in elementInit.Arguments)
                    {
                        AddGraphNode(sb, depth + 1, "Initializer " + i + ".Argument " + j, argument);
                        j++;
                    }
                    i++;
                }

                AddGraphNode(sb, depth + 1, "NewExpression", exp.NewExpression);
            }
            else if (expression is ParameterExpression)
            {
                var exp = (ParameterExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine("Name = " + exp.Name);
            }
            else if (expression is TypeBinaryExpression)
            {
                var exp = (TypeBinaryExpression)expression;

                sb.Append(strBranch);
                sb.AppendLine("TypeOperand = " + exp.TypeOperand.Name);
                AddGraphNode(sb, depth + 1, "Expression", exp.Expression);
            }
            else if (expression is UnaryExpression)
            {
                var exp = (UnaryExpression)expression;

                sb.AppendLine(strBranch + "Method = " + ((exp.Method == null) ? "<null>" : exp.Method.Name));
                sb.AppendLine(strBranch + "IsLifted = " + exp.IsLifted);
                sb.AppendLine(strBranch + "IsLiftedToNull = " + exp.IsLiftedToNull);
                AddGraphNode(sb, depth + 1, "Operand", exp.Operand);
            }
        }
    }
}


text:
<?php
namespace App\Model;

class Node extends DockerApiModel {

    const LIST_PATH = 'nodes';
    const GET_PATH = 'nodes/{id}';
    const REMOVE_PATH = 'nodes/{id}';

    public static function get($Id, $uri=null){
        $item = static::HttpGet(str_replace('{id}', $Id, self::GET_PATH), $uri);
        return static::getInstanceByJson($item);
    }

    public static function find($uri=null){
        $result = [];
        $list = static::HttpGet(self::LIST_PATH, $uri);

        foreach($list as $item){
            $entity = static::getInstanceByJson($item);
            array_push($result, static::getInstanceByJson($item));
        }
        return $result;
    }

    public function update($availability, $name, $role, $labels){

        $this->Spec = [
            'Availability' => $availability ? $availability : array_get($this->Spec, 'Availability', 'active'),
            'Name' => $name ? $name : array_get($this->Spec, 'Name', ''),
            'Role' => $role ? $role : array_get($this->Spec, 'Role', 'manager'),
            'Labels' => $labels ? $labels : array_get($this->Spec, 'Labels', [])
        ];

        $labels = [];
        foreach(array_get($this->Spec, 'Labels', []) as $label){
            if(!empty(array_get($label,'name')) && !empty(array_get($label,'value'))){
                $labels[array_get($label,'name')] = array_get($label,'value');
            }
        }
        $attributes = [
            'Availability' => $availability ? $availability : array_get($this->Spec, 'Availability', 'active'),
            'Name' => $name ? $name : array_get($this->Spec, 'Name', ''),
            'Role' => $role ? $role : array_get($this->Spec, 'Role', 'manager'),
            'Labels' => count($labels) == 0 ? null : $labels
        ];

        return parent::HttpPost('nodes/' . $this->ID . '/update?version=' . $this->Version['Index'], $attributes);
    }

    public function remove(){
        return str_replace('{id}', $this->Id, self::REMOVE_PATH);
//        return parent::HttpDelete(str_replace('{id}', $this->Id, self::REMOVE_PATH));
    }
}


text:
var boilerplate, assert;

if(typeof require === 'function'){
	assert = require('assert');
	boilerplate = require('../../index.js');
}

describe('smoke test', function(){
	it('should pass', function(){
		assert.equal(boilerplate(), 'boilerplate', 'failure message');
	});
});


text:
from collections import OrderedDict
import functools
import re
from typing import (
    Dict,
    Mapping,
    MutableMapping,
    MutableSequence,
    Optional,
    Sequence,
    Tuple,
    Type,
    Union,
)

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core.client_options import ClientOptions
from google.auth import credentials as ga_credentials  # type: ignore
from google.oauth2 import service_account  # type: ignore
import pkg_resources

try:
    OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:  # pragma: NO COVER
    OptionalRetry = Union[retries.Retry, object]  # type: ignore

from google.longrunning import operations_pb2

from google.cloud.contentwarehouse_v1.services.synonym_set_service import pagers
from google.cloud.contentwarehouse_v1.types import (
    synonymset,
    synonymset_service_request,
)

from .client import SynonymSetServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, SynonymSetServiceTransport
from .transports.grpc_asyncio import SynonymSetServiceGrpcAsyncIOTransport

class SynonymSetServiceAsyncClient:
    """A Service that manage/custom customer specified SynonymSets."""

    _client: SynonymSetServiceClient

    DEFAULT_ENDPOINT = SynonymSetServiceClient.DEFAULT_ENDPOINT
    DEFAULT_MTLS_ENDPOINT = SynonymSetServiceClient.DEFAULT_MTLS_ENDPOINT

    location_path = staticmethod(SynonymSetServiceClient.location_path)
    parse_location_path = staticmethod(SynonymSetServiceClient.parse_location_path)
    synonym_set_path = staticmethod(SynonymSetServiceClient.synonym_set_path)
    parse_synonym_set_path = staticmethod(
        SynonymSetServiceClient.parse_synonym_set_path
    )
    common_billing_account_path = staticmethod(
        SynonymSetServiceClient.common_billing_account_path
    )
    parse_common_billing_account_path = staticmethod(
        SynonymSetServiceClient.parse_common_billing_account_path
    )
    common_folder_path = staticmethod(SynonymSetServiceClient.common_folder_path)
    parse_common_folder_path = staticmethod(
        SynonymSetServiceClient.parse_common_folder_path
    )
    common_organization_path = staticmethod(
        SynonymSetServiceClient.common_organization_path
    )
    parse_common_organization_path = staticmethod(
        SynonymSetServiceClient.parse_common_organization_path
    )
    common_project_path = staticmethod(SynonymSetServiceClient.common_project_path)
    parse_common_project_path = staticmethod(
        SynonymSetServiceClient.parse_common_project_path
    )
    common_location_path = staticmethod(SynonymSetServiceClient.common_location_path)
    parse_common_location_path = staticmethod(
        SynonymSetServiceClient.parse_common_location_path
    )

    @classmethod
    def from_service_account_info(cls, info: dict, *args, **kwargs):
        """Creates an instance of this client using the provided credentials
            info.

        Args:
            info (dict): The service account private key info.
            args: Additional arguments to pass to the constructor.
            kwargs: Additional arguments to pass to the constructor.

        Returns:
            SynonymSetServiceAsyncClient: The constructed client.
        """
        return SynonymSetServiceClient.from_service_account_info.__func__(SynonymSetServiceAsyncClient, info, *args, **kwargs)  # type: ignore

    @classmethod
    def from_service_account_file(cls, filename: str, *args, **kwargs):
        """Creates an instance of this client using the provided credentials
            file.

        Args:
            filename (str): The path to the service account private key json
                file.
            args: Additional arguments to pass to the constructor.
            kwargs: Additional arguments to pass to the constructor.

        Returns:
            SynonymSetServiceAsyncClient: The constructed client.
        """
        return SynonymSetServiceClient.from_service_account_file.__func__(SynonymSetServiceAsyncClient, filename, *args, **kwargs)  # type: ignore

    from_service_account_json = from_service_account_file

    @classmethod
    def get_mtls_endpoint_and_cert_source(
        cls, client_options: Optional[ClientOptions] = None
    ):
        """Return the API endpoint and client cert source for mutual TLS.

        The client cert source is determined in the following order:
        (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the
        client cert source is None.
        (2) if `client_options.client_cert_source` is provided, use the provided one; if the
        default client cert source exists, use the default one; otherwise the client cert
        source is None.

        The API endpoint is determined in the following order:
        (1) if `client_options.api_endpoint` if provided, use the provided one.
        (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
        default mTLS endpoint; if the environment variabel is "never", use the default API
        endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
        use the default API endpoint.

        More details can be found at https://google.aip.dev/auth/4114.

        Args:
            client_options (google.api_core.client_options.ClientOptions): Custom options for the
                client. Only the `api_endpoint` and `client_cert_source` properties may be used
                in this method.

        Returns:
            Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the
                client cert source to use.

        Raises:
            google.auth.exceptions.MutualTLSChannelError: If any errors happen.
        """
        return SynonymSetServiceClient.get_mtls_endpoint_and_cert_source(client_options)  # type: ignore

    @property
    def transport(self) -> SynonymSetServiceTransport:
        """Returns the transport used by the client instance.

        Returns:
            SynonymSetServiceTransport: The transport used by the client instance.
        """
        return self._client.transport

    get_transport_class = functools.partial(
        type(SynonymSetServiceClient).get_transport_class, type(SynonymSetServiceClient)
    )

    def __init__(
        self,
        *,
        credentials: Optional[ga_credentials.Credentials] = None,
        transport: Union[str, SynonymSetServiceTransport] = "grpc_asyncio",
        client_options: Optional[ClientOptions] = None,
        client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
    ) -> None:
        """Instantiates the synonym set service client.

        Args:
            credentials (Optional[google.auth.credentials.Credentials]): The
                authorization credentials to attach to requests. These
                credentials identify the application to the service; if none
                are specified, the client will attempt to ascertain the
                credentials from the environment.
            transport (Union[str, ~.SynonymSetServiceTransport]): The
                transport to use. If set to None, a transport is chosen
                automatically.
            client_options (ClientOptions): Custom options for the client. It
                won't take effect if a ``transport`` instance is provided.
                (1) The ``api_endpoint`` property can be used to override the
                default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
                environment variable can also be used to override the endpoint:
                "always" (always use the default mTLS endpoint), "never" (always
                use the default regular endpoint) and "auto" (auto switch to the
                default mTLS endpoint if client certificate is present, this is
                the default value). However, the ``api_endpoint`` property takes
                precedence if provided.
                (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
                is "true", then the ``client_cert_source`` property can be used
                to provide client certificate for mutual TLS transport. If
                not provided, the default SSL client certificate will be used if
                present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
                set, no client certificate will be used.

        Raises:
            google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
                creation failed for any reason.
        """
        self._client = SynonymSetServiceClient(
            credentials=credentials,
            transport=transport,
            client_options=client_options,
            client_info=client_info,
        )

    async def create_synonym_set(
        self,
        request: Optional[
            Union[synonymset_service_request.CreateSynonymSetRequest, dict]
        ] = None,
        *,
        parent: Optional[str] = None,
        synonym_set: Optional[synonymset.SynonymSet] = None,
        retry: OptionalRetry = gapic_v1.method.DEFAULT,
        timeout: Optional[float] = None,
        metadata: Sequence[Tuple[str, str]] = (),
    ) -> synonymset.SynonymSet:
        r"""Creates a SynonymSet for a single context. Throws an
        ALREADY_EXISTS exception if a synonymset already exists for the
        context.

        .. code-block:: python

            # This snippet has been automatically generated and should be regarded as a
            # code template only.
            # It will require modifications to work:
            # - It may require correct/in-range values for request initialization.
            # - It may require specifying regional endpoints when creating the service
            #   client as shown in:
            #   https://googleapis.dev/python/google-api-core/latest/client_options.html
            from google.cloud import contentwarehouse_v1

            async def sample_create_synonym_set():
                # Create a client
                client = contentwarehouse_v1.SynonymSetServiceAsyncClient()

                # Initialize request argument(s)
                request = contentwarehouse_v1.CreateSynonymSetRequest(
                    parent="parent_value",
                )

                # Make the request
                response = await client.create_synonym_set(request=request)

                # Handle the response
                print(response)

        Args:
            request (Optional[Union[google.cloud.contentwarehouse_v1.types.CreateSynonymSetRequest, dict]]):
                The request object. Request message for
                SynonymSetService.CreateSynonymSet.
            parent (:class:`str`):
                Required. The parent name. Format:
                projects/{project_number}/locations/{location}.

                This corresponds to the ``parent`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            synonym_set (:class:`google.cloud.contentwarehouse_v1.types.SynonymSet`):
                Required. The synonymSet to be
                created for a context

                This corresponds to the ``synonym_set`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            retry (google.api_core.retry.Retry): Designation of what errors, if any,
                should be retried.
            timeout (float): The timeout for this request.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.

        Returns:
            google.cloud.contentwarehouse_v1.types.SynonymSet:
                Represents a list of synonyms for a
                given context. For example a context
                "sales" could contain: Synonym 1: sale,
                invoice, bill, order
                Synonym 2: money, credit, finance,
                payment Synonym 3: shipping, freight,
                transport
                Each SynonymSets should be disjoint

        """
        # Create or coerce a protobuf request object.
        # Quick check: If we got a request object, we should *not* have
        # gotten any keyword arguments that map to the request.
        has_flattened_params = any([parent, synonym_set])
        if request is not None and has_flattened_params:
            raise ValueError(
                "If the `request` argument is set, then none of "
                "the individual field arguments should be set."
            )

        request = synonymset_service_request.CreateSynonymSetRequest(request)

        # If we have keyword arguments corresponding to fields on the
        # request, apply these.
        if parent is not None:
            request.parent = parent
        if synonym_set is not None:
            request.synonym_set = synonym_set

        # Wrap the RPC method; this adds retry and timeout information,
        # and friendly error handling.
        rpc = gapic_v1.method_async.wrap_method(
            self._client._transport.create_synonym_set,
            default_timeout=60.0,
            client_info=DEFAULT_CLIENT_INFO,
        )

        # Certain fields should be provided within the metadata header;
        # add these here.
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
        )

        # Send the request.
        response = await rpc(
            request,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

        # Done; return the response.
        return response

    async def get_synonym_set(
        self,
        request: Optional[
            Union[synonymset_service_request.GetSynonymSetRequest, dict]
        ] = None,
        *,
        name: Optional[str] = None,
        retry: OptionalRetry = gapic_v1.method.DEFAULT,
        timeout: Optional[float] = None,
        metadata: Sequence[Tuple[str, str]] = (),
    ) -> synonymset.SynonymSet:
        r"""Gets a SynonymSet for a particular context. Throws a NOT_FOUND
        exception if the Synonymset does not exist

        .. code-block:: python

            # This snippet has been automatically generated and should be regarded as a
            # code template only.
            # It will require modifications to work:
            # - It may require correct/in-range values for request initialization.
            # - It may require specifying regional endpoints when creating the service
            #   client as shown in:
            #   https://googleapis.dev/python/google-api-core/latest/client_options.html
            from google.cloud import contentwarehouse_v1

            async def sample_get_synonym_set():
                # Create a client
                client = contentwarehouse_v1.SynonymSetServiceAsyncClient()

                # Initialize request argument(s)
                request = contentwarehouse_v1.GetSynonymSetRequest(
                    name="name_value",
                )

                # Make the request
                response = await client.get_synonym_set(request=request)

                # Handle the response
                print(response)

        Args:
            request (Optional[Union[google.cloud.contentwarehouse_v1.types.GetSynonymSetRequest, dict]]):
                The request object. Request message for
                SynonymSetService.GetSynonymSet. Will return synonymSet
                for a certain context.
            name (:class:`str`):
                Required. The name of the synonymSet to retrieve Format:
                projects/{project_number}/locations/{location}/synonymSets/{context}.

                This corresponds to the ``name`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            retry (google.api_core.retry.Retry): Designation of what errors, if any,
                should be retried.
            timeout (float): The timeout for this request.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.

        Returns:
            google.cloud.contentwarehouse_v1.types.SynonymSet:
                Represents a list of synonyms for a
                given context. For example a context
                "sales" could contain: Synonym 1: sale,
                invoice, bill, order
                Synonym 2: money, credit, finance,
                payment Synonym 3: shipping, freight,
                transport
                Each SynonymSets should be disjoint

        """
        # Create or coerce a protobuf request object.
        # Quick check: If we got a request object, we should *not* have
        # gotten any keyword arguments that map to the request.
        has_flattened_params = any([name])
        if request is not None and has_flattened_params:
            raise ValueError(
                "If the `request` argument is set, then none of "
                "the individual field arguments should be set."
            )

        request = synonymset_service_request.GetSynonymSetRequest(request)

        # If we have keyword arguments corresponding to fields on the
        # request, apply these.
        if name is not None:
            request.name = name

        # Wrap the RPC method; this adds retry and timeout information,
        # and friendly error handling.
        rpc = gapic_v1.method_async.wrap_method(
            self._client._transport.get_synonym_set,
            default_retry=retries.Retry(
                initial=1.0,
                maximum=10.0,
                multiplier=1.3,
                predicate=retries.if_exception_type(
                    core_exceptions.ServiceUnavailable,
                ),
                deadline=60.0,
            ),
            default_timeout=60.0,
            client_info=DEFAULT_CLIENT_INFO,
        )

        # Certain fields should be provided within the metadata header;
        # add these here.
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
        )

        # Send the request.
        response = await rpc(
            request,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

        # Done; return the response.
        return response

    async def update_synonym_set(
        self,
        request: Optional[
            Union[synonymset_service_request.UpdateSynonymSetRequest, dict]
        ] = None,
        *,
        name: Optional[str] = None,
        synonym_set: Optional[synonymset.SynonymSet] = None,
        retry: OptionalRetry = gapic_v1.method.DEFAULT,
        timeout: Optional[float] = None,
        metadata: Sequence[Tuple[str, str]] = (),
    ) -> synonymset.SynonymSet:
        r"""Remove the existing SynonymSet for the context and replaces it
        with a new one. Throws a NOT_FOUND exception if the SynonymSet
        is not found.

        .. code-block:: python

            # This snippet has been automatically generated and should be regarded as a
            # code template only.
            # It will require modifications to work:
            # - It may require correct/in-range values for request initialization.
            # - It may require specifying regional endpoints when creating the service
            #   client as shown in:
            #   https://googleapis.dev/python/google-api-core/latest/client_options.html
            from google.cloud import contentwarehouse_v1

            async def sample_update_synonym_set():
                # Create a client
                client = contentwarehouse_v1.SynonymSetServiceAsyncClient()

                # Initialize request argument(s)
                request = contentwarehouse_v1.UpdateSynonymSetRequest(
                    name="name_value",
                )

                # Make the request
                response = await client.update_synonym_set(request=request)

                # Handle the response
                print(response)

        Args:
            request (Optional[Union[google.cloud.contentwarehouse_v1.types.UpdateSynonymSetRequest, dict]]):
                The request object. Request message for
                SynonymSetService.UpdateSynonymSet. Removes the
                SynonymSet for the specified context and replaces it
                with the SynonymSet in this request.
            name (:class:`str`):
                Required. The name of the synonymSet to update Format:
                projects/{project_number}/locations/{location}/synonymSets/{context}.

                This corresponds to the ``name`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            synonym_set (:class:`google.cloud.contentwarehouse_v1.types.SynonymSet`):
                Required. The synonymSet to be
                updated for the customer

                This corresponds to the ``synonym_set`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            retry (google.api_core.retry.Retry): Designation of what errors, if any,
                should be retried.
            timeout (float): The timeout for this request.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.

        Returns:
            google.cloud.contentwarehouse_v1.types.SynonymSet:
                Represents a list of synonyms for a
                given context. For example a context
                "sales" could contain: Synonym 1: sale,
                invoice, bill, order
                Synonym 2: money, credit, finance,
                payment Synonym 3: shipping, freight,
                transport
                Each SynonymSets should be disjoint

        """
        # Create or coerce a protobuf request object.
        # Quick check: If we got a request object, we should *not* have
        # gotten any keyword arguments that map to the request.
        has_flattened_params = any([name, synonym_set])
        if request is not None and has_flattened_params:
            raise ValueError(
                "If the `request` argument is set, then none of "
                "the individual field arguments should be set."
            )

        request = synonymset_service_request.UpdateSynonymSetRequest(request)

        # If we have keyword arguments corresponding to fields on the
        # request, apply these.
        if name is not None:
            request.name = name
        if synonym_set is not None:
            request.synonym_set = synonym_set

        # Wrap the RPC method; this adds retry and timeout information,
        # and friendly error handling.
        rpc = gapic_v1.method_async.wrap_method(
            self._client._transport.update_synonym_set,
            default_timeout=60.0,
            client_info=DEFAULT_CLIENT_INFO,
        )

        # Certain fields should be provided within the metadata header;
        # add these here.
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
        )

        # Send the request.
        response = await rpc(
            request,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

        # Done; return the response.
        return response

    async def delete_synonym_set(
        self,
        request: Optional[
            Union[synonymset_service_request.DeleteSynonymSetRequest, dict]
        ] = None,
        *,
        name: Optional[str] = None,
        retry: OptionalRetry = gapic_v1.method.DEFAULT,
        timeout: Optional[float] = None,
        metadata: Sequence[Tuple[str, str]] = (),
    ) -> None:
        r"""Deletes a SynonymSet for a given context. Throws a NOT_FOUND
        exception if the SynonymSet is not found.

        .. code-block:: python

            # This snippet has been automatically generated and should be regarded as a
            # code template only.
            # It will require modifications to work:
            # - It may require correct/in-range values for request initialization.
            # - It may require specifying regional endpoints when creating the service
            #   client as shown in:
            #   https://googleapis.dev/python/google-api-core/latest/client_options.html
            from google.cloud import contentwarehouse_v1

            async def sample_delete_synonym_set():
                # Create a client
                client = contentwarehouse_v1.SynonymSetServiceAsyncClient()

                # Initialize request argument(s)
                request = contentwarehouse_v1.DeleteSynonymSetRequest(
                    name="name_value",
                )

                # Make the request
                await client.delete_synonym_set(request=request)

        Args:
            request (Optional[Union[google.cloud.contentwarehouse_v1.types.DeleteSynonymSetRequest, dict]]):
                The request object. Request message for
                SynonymSetService.DeleteSynonymSet.
            name (:class:`str`):
                Required. The name of the synonymSet to delete Format:
                projects/{project_number}/locations/{location}/synonymSets/{context}.

                This corresponds to the ``name`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            retry (google.api_core.retry.Retry): Designation of what errors, if any,
                should be retried.
            timeout (float): The timeout for this request.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        """
        # Create or coerce a protobuf request object.
        # Quick check: If we got a request object, we should *not* have
        # gotten any keyword arguments that map to the request.
        has_flattened_params = any([name])
        if request is not None and has_flattened_params:
            raise ValueError(
                "If the `request` argument is set, then none of "
                "the individual field arguments should be set."
            )

        request = synonymset_service_request.DeleteSynonymSetRequest(request)

        # If we have keyword arguments corresponding to fields on the
        # request, apply these.
        if name is not None:
            request.name = name

        # Wrap the RPC method; this adds retry and timeout information,
        # and friendly error handling.
        rpc = gapic_v1.method_async.wrap_method(
            self._client._transport.delete_synonym_set,
            default_timeout=60.0,
            client_info=DEFAULT_CLIENT_INFO,
        )

        # Certain fields should be provided within the metadata header;
        # add these here.
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
        )

        # Send the request.
        await rpc(
            request,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

    async def list_synonym_sets(
        self,
        request: Optional[
            Union[synonymset_service_request.ListSynonymSetsRequest, dict]
        ] = None,
        *,
        parent: Optional[str] = None,
        retry: OptionalRetry = gapic_v1.method.DEFAULT,
        timeout: Optional[float] = None,
        metadata: Sequence[Tuple[str, str]] = (),
    ) -> pagers.ListSynonymSetsAsyncPager:
        r"""Returns all SynonymSets (for all contexts) for the
        specified location.

        .. code-block:: python

            # This snippet has been automatically generated and should be regarded as a
            # code template only.
            # It will require modifications to work:
            # - It may require correct/in-range values for request initialization.
            # - It may require specifying regional endpoints when creating the service
            #   client as shown in:
            #   https://googleapis.dev/python/google-api-core/latest/client_options.html
            from google.cloud import contentwarehouse_v1

            async def sample_list_synonym_sets():
                # Create a client
                client = contentwarehouse_v1.SynonymSetServiceAsyncClient()

                # Initialize request argument(s)
                request = contentwarehouse_v1.ListSynonymSetsRequest(
                    parent="parent_value",
                )

                # Make the request
                page_result = client.list_synonym_sets(request=request)

                # Handle the response
                async for response in page_result:
                    print(response)

        Args:
            request (Optional[Union[google.cloud.contentwarehouse_v1.types.ListSynonymSetsRequest, dict]]):
                The request object. Request message for
                SynonymSetService.ListSynonymSets. Will return all
                synonymSets belonging to the customer project.
            parent (:class:`str`):
                Required. The parent name. Format:
                projects/{project_number}/locations/{location}.

                This corresponds to the ``parent`` field
                on the ``request`` instance; if ``request`` is provided, this
                should not be set.
            retry (google.api_core.retry.Retry): Designation of what errors, if any,
                should be retried.
            timeout (float): The timeout for this request.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.

        Returns:
            google.cloud.contentwarehouse_v1.services.synonym_set_service.pagers.ListSynonymSetsAsyncPager:
                Response message for
                SynonymSetService.ListSynonymSets.
                Iterating over this object will yield
                results and resolve additional pages
                automatically.

        """
        # Create or coerce a protobuf request object.
        # Quick check: If we got a request object, we should *not* have
        # gotten any keyword arguments that map to the request.
        has_flattened_params = any([parent])
        if request is not None and has_flattened_params:
            raise ValueError(
                "If the `request` argument is set, then none of "
                "the individual field arguments should be set."
            )

        request = synonymset_service_request.ListSynonymSetsRequest(request)

        # If we have keyword arguments corresponding to fields on the
        # request, apply these.
        if parent is not None:
            request.parent = parent

        # Wrap the RPC method; this adds retry and timeout information,
        # and friendly error handling.
        rpc = gapic_v1.method_async.wrap_method(
            self._client._transport.list_synonym_sets,
            default_retry=retries.Retry(
                initial=1.0,
                maximum=10.0,
                multiplier=1.3,
                predicate=retries.if_exception_type(
                    core_exceptions.ServiceUnavailable,
                ),
                deadline=60.0,
            ),
            default_timeout=60.0,
            client_info=DEFAULT_CLIENT_INFO,
        )

        # Certain fields should be provided within the metadata header;
        # add these here.
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
        )

        # Send the request.
        response = await rpc(
            request,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

        # This method is paged; wrap the response in a pager, which provides
        # an `__aiter__` convenience method.
        response = pagers.ListSynonymSetsAsyncPager(
            method=rpc,
            request=request,
            response=response,
            metadata=metadata,
        )

        # Done; return the response.
        return response

    async def __aenter__(self):
        return self

    async def __aexit__(self, exc_type, exc, tb):
        await self.transport.close()

try:
    DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
        gapic_version=pkg_resources.get_distribution(
            "google-cloud-contentwarehouse",
        ).version,
    )
except pkg_resources.DistributionNotFound:
    DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()

__all__ = ("SynonymSetServiceAsyncClient",)