text:
<#PSScriptInfo

.VERSION 0.3

.GUID aed4e88b-ed60-47de-a722-9c28f1258a98

.AUTHOR Chad.Cox@microsoft.com
    https://blogs.technet.microsoft.com/chadcox/
    https://github.com/chadmcox

.COMPANYNAME

.COPYRIGHT This Sample Code is provided for the purpose of illustration only and is not
intended to be used in a production environment.  THIS SAMPLE CODE AND ANY
RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.  We grant You a
nonexclusive, royalty-free right to use and modify the Sample Code and to
reproduce and distribute the object code form of the Sample Code, provided
that You agree: (i) to not use Our name, logo, or trademarks to market Your
software product in which the Sample Code is embedded; (ii) to include a valid
copyright notice on Your software product in which the Sample Code is embedded;
and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and
against any claims or lawsuits, including attorneys` fees, that arise or result
from the use or distribution of the Sample Code..

.TAGS AD Computers

.LICENSEURI

.PROJECTURI

.ICONURI

.EXTERNALMODULEDEPENDENCIES

.REQUIREDSCRIPTS

.EXTERNALSCRIPTDEPENDENCIES

.RELEASENOTES
0.3 date cleanup
0.2 Added duplicate sid lookup
0.1 First go around of the script

.PRIVATEDATA

#>

#Requires -Module ActiveDirectory
#Requires -version 3.0
#Requires -RunAsAdministrator

<#

.DESCRIPTION
 Creates reports about Active Directory Computers

 Use the importfunctiononly switch to run particular function / reports

#>
Param($reportpath = "$env:userprofile\Documents",[switch]$importfunctionsonly)

$reportpath = "$reportpath\ADCleanUpReports"
If (!($(Try { Test-Path $reportpath } Catch { $true }))){
    new-Item $reportpath -ItemType "directory"  -force
}

If (!($(Try { Test-Path "$reportpath\Computers" } Catch { $true }))){
    new-Item "$reportpath\Computers" -ItemType "directory"  -force
}

$global:default_err_log = $reportpath + '\err_log.txt'
$global:ous = @()
$Global:finished = @()
$global:singleuse_comp = $False
#change current path to the report path
cd $reportpath
cls

function global:DisplayFunctionResults{
    if($global:singleuse_comp){$script:finished
                write-host "Report Can be found here $reportpath"
                $script:finished = @()
    }
}
Function global:ADOUList{
    [cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADOUList"
        $ou_list = "$reportpath\Computers\ADOUList.csv"
        Get-ChildItem $ou_list | Where-Object { $_.LastWriteTime -lt $((Get-Date).AddDays(-10))} | Remove-Item -force

        If (!(Test-Path $ou_list)){
            Write-host "This will take a few minutes to gather a list of OU's to search through."
            foreach($domain in (get-adforest).domains){
                try{Get-ADObject -ldapFilter "(|(objectclass=organizationalunit)(objectclass=domainDNS)(objectclass=builtinDomain))" `
                    -Properties "msds-approx-immed-subordinates" -server $domain | where {$_."msds-approx-immed-subordinates" -ne 0} | select `
                     $hash_domain, DistinguishedName  | export-csv $ou_list -append -NoTypeInformation}
                catch{"function ADOUList - $domain - $($_.Exception)" | out-file $default_err_log -append}
                try{(get-addomain $domain).ComputersContainer | Get-ADObject -server $domain | select `
                     $hash_domain, DistinguishedName | export-csv $ou_list -append -NoTypeInformation}
                catch{"function ADOUList - $domain - $($_.Exception)" | out-file $default_err_log -append}
            }
        }

        $script:ous = import-csv $ou_list
    }
}
Function global:ADComputerswithNonStandardPrimaryGroup{
#report_computers_with_default_primary_group_not_standard
[cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputerswithNonStandardPrimaryGroup"
        $default_log = "$reportpath\Computers\report_ADComputerswithNonStandardPrimaryGroup.csv"
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain

            try{$results += get-adcomputer -Filter {primaryGroupID -ne 515 -and enabled -eq "True"
                                -and iscriticalsystemobject -eq $false}`
                 -Properties admincount,enabled,primaryGroupID, `
                    primaryGroup,whencreated,whenchanged,operatingSystem `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,operatingsystem,admincount,enabled,primaryGroupID, `
                        primaryGroup,$hash_whencreated,$hash_whenchanged,$hash_parentou}
            catch{"function ADComputerswithNonStandardPrimaryGroup - $domain - $($_.Exception)" | `
                out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation

        if($results){
            $script:finished += "Computer object with Primary Group other than Domain Computers (515): $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithPwdNotRequired{
    #report_computers_with_pwd_not_required_set
    #PASSWD_NOTREQD 0x0020 32
    [cmdletbinding()]
    param()
    process{
    write-host "Starting Function ADComputerswithPwdNotRequired"
        $default_log = "$reportpath\Computers\report_ADComputerswithPwdNotRequired.csv"
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            #Get-ADComputer -Filter {UserAccountControl -band 32}
            #Get-ADComputer -Filter {PasswordNotRequired -eq $True}
            try{$results += get-adcomputer -LDAPFilter "(&(userAccountControl:1.2.840.113556.1.4.803:=32)(!(IsCriticalSystemObject=TRUE)))"`
                 -Properties admincount,enabled,pwdlastset,PasswordNotRequired,whencreated,whenchanged,operatingSystem `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,operatingsystem,PasswordNotRequired,admincount, `
                        enabled,$hash_pwdlastset,$hash_whencreated,$hash_whenchanged,$hash_parentou}
            catch{"function ADComputerswithPwdNotRequired - $domain - $($_.Exception)" | out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation
        if($results){
            $script:finished += "Computer object with password not required: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputersDisabled{
#report_computers_disabled
[cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputersDisabled"
        $default_log = "$reportpath\Computers\report_ADComputersDisabled.csv"
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain

            try{$results += get-adcomputer -Filter {(Enabled -eq $false) -and (iscriticalsystemobject -eq $false)} `
                 -Properties admincount,enabled,PasswordExpired,whencreated,LastLogontimestamp,operatingSystem, `
                    PasswordNeverExpires,CannotChangePassword,whencreated,whenchanged,PwdLastSet,"msDS-ReplAttributeMetaData" `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,operatingsystem,admincount,enabled,`
                        $hash_uacchanged,$hash_pwdlastset, `
                        $hash_lastLogonTimestamp,$hash_whencreated,$hash_whenchanged,$hash_parentou}
            catch{"function ADComputerDisabled - $domain - $($_.Exception)" | out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation

        if($results){
            $script:finished += "Computer object that are disabled: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithUnConstrainedDelegationEnabled{
    #report_computers_unconstrained_delegation_enabled
    [cmdletbinding()]
    param()
    process{
        #TRUSTED_FOR_DELEGATION

        write-host "Starting Function ADComputerswithUnConstrainedDelegationEnabled"
        $default_log = "$reportpath\Computers\report_ADComputerswithUnConstrainedDelegationEnabled.csv"
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            #Get-ADComputer -Filter {UserAccountControl -band 524288}
            #Get-ADcomputer -Filter {Trustedfordelegation -eq $True}
            try{$results += get-adcomputer -LDAPFilter "(&(userAccountControl:1.2.840.113556.1.4.803:=524288)(!(IsCriticalSystemObject=TRUE)))"`
                 -Properties admincount,enabled,Trustedfordelegation,whencreated,whenchanged,operatingSystem `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,operatingsystem,Trustedfordelegation,admincount,enabled, `
                    $hash_whenchanged,$hash_whencreated,$hash_parentou}
            catch{"function ADComputerswithUnConstrainedDelegationEnabled - $domain - $($_.Exception)" | `
                out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation

        if($results){

            $script:finished += "Computer object with trusted for delegation (unconstrained kerb delegation) enabled: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputersWithSIDHistoryFromSameDomain{
    #report_computers_sid_history_from_same_domain
    [cmdletbinding()]
    param()
    process{
        #https://adsecurity.org/?p=1772
        write-host "Starting Function ADComputersWithSIDHistoryFromSameDomain"
        $default_log = "$reportpath\Computers\report_ADComputersWithSIDHistoryFromSameDomain.csv"
        $results = @()
        #Find Computer with sid history from same domain
        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            [string]$Domain_SID = ((Get-ADDomain $domain).DomainSID.Value)
            try{$results += Get-ADComputer -Filter {SIDHistory -Like '*'} `
                -Properties SIDHistory,admincount,enabled,PasswordExpired,pwdlastset,whencreated,whenchanged,operatingsystem `
                -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                Where { $_.SIDHistory -Like "$domain_sid-*"} | `
                    select $hash_domain, name,operatingsystem,admincount,enabled,$hash_whenchanged,$hash_whencreated,$hash_parentou}
            catch{"function ADComputersWithSIDHistoryFromSameDomain - $domain - $($_.Exception)" | out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation

        if($results){
            $script:finished += "Computer object with sidhistory from the same domain: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithAdminCount{
    #computers_with_admincount
    [cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputerswithAdminCount"
        $default_log = "$reportpath\Computers\report_ADComputerswithAdminCount.csv"
        $results = @()
        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain

            try{$results += get-adcomputer -Filter {admincount -eq 1 -and iscriticalsystemobject -eq $false}`
                 -Properties admincount,enabled,PasswordExpired,PasswordLastSet,whencreated,whenchanged,operatingsystem `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,operatingsystem,admincount,enabled,$hash_whenchanged,$hash_whencreated,$hash_parentou}
            catch{"function ADcomputerswithAdminCount - $domain - $($_.Exception)" | out-file $default_err_log -append}
        }
        $results | export-csv $default_log -NoTypeInformation

        if($results){
            $script:finished += "Computer object with admincount set: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputersisDeleted{
#report_computers_isdeleted
[cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputersisDeleted"
        $default_log = "$reportpath\Computers\report_ADComputersisDeleted.csv"
        $results = @()
        foreach($domain in (get-adforest).domains){
            try{$results += Get-ADobject -filter {objectclass -eq "computer" -and deleted -eq $true} -IncludeDeletedObject `
                -server $domain -Properties whencreated,samaccountname,Deleted,operatingsystem | `
                    Select $hash_domain,name, operatingsystem,$hash_whencreated, Deleted,distinguishedname}
            catch{"function ADComputersisDeleted - $domain - $($_.Exception)" | out-file $default_err_log -append}
        }

        $results | export-csv $default_log -NoTypeInformation

        if($results){
            $script:finished += "Computer object that are in a deleted state: $(($results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithCertificates{
#report_computers_with certificates
    [cmdletbinding()]
    param()
    process{
        #https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnectsync-largeobjecterror-usercertificate

        write-host "Starting Function ADComputerswithCertificates"
        $default_log = "$reportpath\Computers\report_ADComputerswithmorethan1Certificate.csv"
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            try{$results += get-adComputer -LDAPFilter "(usercertificate=*)"`
                 -Properties admincount,enabled,usercertificate,whencreated,whenchanged `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, *}
            catch{"function ADComputerswithCertificates - $domain - $($_.Exception)" | `
                out-file $default_err_log -append}
        }

        $results | select domain, samaccountname,$hash_usercertificatecount,admincount,enabled, `
            $hash_whenchanged,$hash_whencreated,$hash_parentou | where {$_.usercertificateCount -gt 1} | `
                export-csv $default_log -NoTypeInformation

        if($results | where {$_.usercertificateCount -gt 1}){

            $script:finished += "Computer found with more than 1 certificates in usercertificate attribute"
            DisplayFunctionResults
        }
        $cert_results = @()
        $default_log = "$reportpath\Computers\report_ADComputerswithExpiredCertificates.csv"
        [int] $days = 0
        foreach($comp in $results){
            foreach($cert in $comp.usercertificate){
                $converted = [System.Security.Cryptography.X509Certificates.X509Certificate2] $cert
                if ($converted.NotAfter -lt [datetime]::Today.AddDays($days)) {
                    $cert_results += $comp | select $hash_domain, samaccountname, `
                    @{name='CertThumbprint';expression={$converted.Thumbprint}},`
                    @{name='CertExpired';expression={$converted.NotAfter}}, `
                    admincount,enabled,PasswordExpired,$hash_pwdLastSet,$hash_whenchanged,$hash_whencreated,$hash_parentou
                }
            }
        }
        $cert_results | export-csv $default_log -NoTypeInformation
        if($cert_results){
            $script:finished += "Computer objects with expired certificate in usercertificate attribute : $(($cert_results | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithStalePWDAgeAndLastLogon{
    #report_computers_stale
    [cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputerswithStalePWDAgeAndLastLogon"

        $results = @()
        $DaysInactive = 90
        $threshold_time = (Get-Date).Adddays(-($DaysInactive)).ToFileTimeUTC()
        $create_time = (Get-Date).Adddays(-($DaysInactive))

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            try{$results += get-adcomputer -Filter {(LastLogonTimeStamp -lt $threshold_time -or LastLogonTimeStamp -notlike "*")
                                -and (pwdlastset -lt $threshold_time -or pwdlastset -eq 0) -and (enabled -eq $true)
                                -and (iscriticalsystemobject -eq $false) -and (whencreated -lt $create_time)} `
                    -properties IPv4Address,OperatingSystem,serviceprincipalname,LastLogonTimeStamp,pwdlastset, `
                        enabled,whencreated `
                    -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, name,OperatingSystem,admincount,enabled,$hash_pwdage,$hash_pwdlastset, `
                        $hash_lastLogonTimestamp,$hash_whencreated,$hash_whenchanged,$hash_parentou}
            catch{"function ADComputerswithStalePWDAgeAndLastLogon - $domain - $($_.Exception)" | `
                out-file $default_err_log -append}
        }
        $default_log = "$reportpath\Computers\report_ADWindowsComputerswithStalePWDAgeAndLastLogon.csv"
        $results | where {($_.IPv4Address -eq $null) -and ($_.OperatingSystem -like "Windows*") -and `
            (!($_.serviceprincipalname -like "*MSClusterVirtualServer*"))} | export-csv $default_log -NoTypeInformation
        $default_log = "$reportpath\Computers\report_ADNonWindowsComputerswithStalePWDAgeAndLastLogon.csv"
        $results | where {($_.IPv4Address -eq $null) -and ($_.OperatingSystem -notlike "*Windows*") -and `
            (!($_.serviceprincipalname -like "*MSClusterVirtualServer*"))} | export-csv $default_log -NoTypeInformation

        if($results | where {($_.IPv4Address -eq $null) -and ($_.OperatingSystem -like "Windows*") -and `
             (!($_.serviceprincipalname -like "*MSClusterVirtualServer*"))}){
            $script:finished += "Windows Computer object with passwords or lastlogon timestamps greater than $DaysInactive days: $(($results | `
             where {($_.IPv4Address -eq $null) -and ($_.OperatingSystem -like "Windows*") -and `
             (!($_.serviceprincipalname -like "*MSClusterVirtualServer*"))} | measure).count)"
            DisplayFunctionResults
        }
    }
}
Function global:ADComputerswithDuplicateSid{
#report_computers_with certificates
    [cmdletbinding()]
    param()
    process{
        write-host "Starting Function ADComputerswithDuplicateSid"
        $temp_log = "$reportpath\Computers\tmp_ADComputers.csv"
        #https://support.microsoft.com/en-us/help/314828/the-microsoft-policy-for-disk-duplication-of-windows-installations
        #https://support.microsoft.com/en-us/help/816099/how-to-find-and-clean-up-duplicate-security-identifiers-with-ntdsutil
        $results = @()

        if(!($script:ous)){
            ADOUList
        }
        foreach($ou in $script:ous){$domain = ($ou).domain
            try{$results += get-adComputer -filter * `
                 -Properties samaccountname, name, sid, enabled, distinguishedname `
                 -searchbase $ou.DistinguishedName -SearchScope OneLevel -server $domain | `
                    select $hash_domain, samaccountname, name, sid, enabled, distinguishedname}
            catch{"function ADComputerswithDuplicateSid - $domain - $($_.Exception)" | `
                out-file $default_err_log -append}
        }
        $results | export-csv $temp_log -NoTypeInformation
        $default_log = "$reportpath\Computers\ADComputerswithDuplicateSid.csv"
        If ($(Try { Test-Path $default_log} Catch { $false })){Remove-Item $default_log -force}
        foreach($comp in ($results | sort-object -Property sid)){
                $comp.sid
                $lastcomp.sid
            if($comp.sid -eq $lastcomp.sid){
                $Comp | select domain, samaccountname, sid, enabled, `
                @{name='OtherComputer';expression={$lastcomp.samaccountname}} | `
                    export-csv $default_log -Append -notypeinformation
            }else{
                $lastcomp = $comp
            }
        }
    }
}

#region hash calculated properties

#creating hash tables for each calculated property

$hash_domain = @{name='Domain';expression={$domain}}
$hash_parentou = @{name='ParentOU';expression={`
    $($_.distinguishedname -split '(?<![\\]),')[1..$($($_.distinguishedname -split '(?<![\\]),').Count-1)] -join ','}}
$hash_pwdage = @{Name="PwdAgeinDays";Expression={`
    if($_.PwdLastSet -ne 0){(new-TimeSpan([datetime]::FromFileTimeUTC($_.PwdLastSet)) $(Get-Date)).days}else{0}}}
$hash_uacchanged = @{name='UACChanged';expression={`
    ($_ | Select-Object -ExpandProperty "msDS-ReplAttributeMetaData" | foreach {([XML]$_.Replace("`0","")).DS_REPL_ATTR_META_DATA | where `
        { $_.pszAttributeName -eq "userAccountControl"}}).ftimeLastOriginatingChange | get-date -Format MM/dd/yyyy}}
$hash_usercertificatecount = @{Name="usercertificateCount";Expression={$_.usercertificate.count}}
#this hashtable is used to create a calculated property that converts lastlogontimestamp
$hash_lastLogonTimestamp = @{Name="LastLogonTimeStamp";
    Expression={if($_.LastLogonTimeStamp -like "*"){([datetime]::FromFileTime($_.LastLogonTimeStamp).ToString('MM/dd/yyyy'))}}}
$hash_whenchanged = @{Name="whenchanged";
    Expression={($_.whenchanged).ToString('MM/dd/yyyy')}}
$hash_whencreated = @{Name="whencreated";
    Expression={($_.whencreated).ToString('MM/dd/yyyy')}}
$hash_pwdLastSet = @{Name="pwdLastSet";
    Expression={if($_.PwdLastSet -ne 0){([datetime]::FromFileTime($_.pwdLastSet).ToString('MM/dd/yyyy'))}}}
#endregion

if(!($importfunctionsonly)){
    $time_log = "$reportpath\computers\runtime.csv"
    (dir function: | where name -like adcomputer*).name | foreach{$script_function = $_
        Measure-Command {Invoke-Expression -Command $script_function} | `
            select @{name='RunDate';expression={get-date -format d}},`
            @{name='Function';expression={$script_function}}, `
            @{name='Hours';expression={$_.hours}}, `
            @{name='Minutes';expression={$_.Minutes}}, `
            @{name='Seconds';expression={$_.Seconds}} | export-csv $time_log -append -notypeinformation
    }
    $script:finished
    write-host "Report Can be found here $reportpath"
}else{
    $global:singleuse_comp = $True
    write-host -foreground yellow "Type out the function and press enter to run a particular report"
    (dir function: | where name -like adcomputer*).name
}


text:
import asyncio
import asyncio.coroutines
import functools
import os
import sys
import threading
from concurrent.futures import Future, ThreadPoolExecutor

from .current_thread_executor import CurrentThreadExecutor
from .local import Local

try:
    import contextvars  # Python 3.7+ only.
except ImportError:
    contextvars = None

class AsyncToSync:
    """
    Utility class which turns an awaitable that only works on the thread with
    the event loop into a synchronous callable that works in a subthread.

    If the call stack contains an async loop, the code runs there.
    Otherwise, the code runs in a new loop in a new thread.

    Either way, this thread then pauses and waits to run any thread_sensitive
    code called from further down the call stack using SyncToAsync, before
    finally exiting once the async task returns.
    """

    # Maps launched Tasks to the threads that launched them (for locals impl)
    launch_map = {}

    # Keeps track of which CurrentThreadExecutor to use. This uses an asgiref
    # Local, not a threadlocal, so that tasks can work out what their parent used.
    executors = Local()

    def __init__(self, awaitable, force_new_loop=False):
        self.awaitable = awaitable
        try:
            self.__self__ = self.awaitable.__self__
        except AttributeError:
            pass
        if force_new_loop:
            # They have asked that we always run in a new sub-loop.
            self.main_event_loop = None
        else:
            try:
                self.main_event_loop = asyncio.get_event_loop()
            except RuntimeError:
                # There's no event loop in this thread. Look for the threadlocal if
                # we're inside SyncToAsync
                self.main_event_loop = getattr(
                    SyncToAsync.threadlocal, "main_event_loop", None
                )

    def __call__(self, *args, **kwargs):
        # You can't call AsyncToSync from a thread with a running event loop
        try:
            event_loop = asyncio.get_event_loop()
        except RuntimeError:
            pass
        else:
            if event_loop.is_running():
                raise RuntimeError(
                    "You cannot use AsyncToSync in the same thread as an async event loop - "
                    "just await the async function directly."
                )
        # Make a future for the return information
        call_result = Future()
        # Get the source thread
        source_thread = threading.current_thread()
        # Make a CurrentThreadExecutor we'll use to idle in this thread - we
        # need one for every sync frame, even if there's one above us in the
        # same thread.
        if hasattr(self.executors, "current"):
            old_current_executor = self.executors.current
        else:
            old_current_executor = None
        current_executor = CurrentThreadExecutor()
        self.executors.current = current_executor
        # Use call_soon_threadsafe to schedule a synchronous callback on the
        # main event loop's thread if it's there, otherwise make a new loop
        # in this thread.
        try:
            if not (self.main_event_loop and self.main_event_loop.is_running()):
                # Make our own event loop - in a new thread - and run inside that.
                loop = asyncio.new_event_loop()
                loop_executor = ThreadPoolExecutor(max_workers=1)
                loop_future = loop_executor.submit(
                    self._run_event_loop,
                    loop,
                    self.main_wrap(
                        args, kwargs, call_result, source_thread, sys.exc_info()
                    ),
                )
                if current_executor:
                    # Run the CurrentThreadExecutor until the future is done
                    current_executor.run_until_future(loop_future)
                # Wait for future and/or allow for exception propagation
                loop_future.result()
            else:
                # Call it inside the existing loop
                self.main_event_loop.call_soon_threadsafe(
                    self.main_event_loop.create_task,
                    self.main_wrap(
                        args, kwargs, call_result, source_thread, sys.exc_info()
                    ),
                )
                if current_executor:
                    # Run the CurrentThreadExecutor until the future is done
                    current_executor.run_until_future(call_result)
        finally:
            # Clean up any executor we were running
            if hasattr(self.executors, "current"):
                del self.executors.current
            if old_current_executor:
                self.executors.current = old_current_executor
        # Wait for results from the future.
        return call_result.result()

    def _run_event_loop(self, loop, coro):
        """
        Runs the given event loop (designed to be called in a thread).
        """
        asyncio.set_event_loop(loop)
        try:
            loop.run_until_complete(coro)
        finally:
            try:
                # mimic asyncio.run() behavior
                # cancel unexhausted async generators
                if sys.version_info >= (3, 7, 0):
                    tasks = asyncio.all_tasks(loop)
                else:
                    tasks = asyncio.Task.all_tasks(loop)
                for task in tasks:
                    task.cancel()
                loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True))
                for task in tasks:
                    if task.cancelled():
                        continue
                    if task.exception() is not None:
                        loop.call_exception_handler(
                            {
                                "message": "unhandled exception during loop shutdown",
                                "exception": task.exception(),
                                "task": task,
                            }
                        )
                if hasattr(loop, "shutdown_asyncgens"):
                    loop.run_until_complete(loop.shutdown_asyncgens())
            finally:
                loop.close()
                asyncio.set_event_loop(self.main_event_loop)

    def __get__(self, parent, objtype):
        """
        Include self for methods
        """
        func = functools.partial(self.__call__, parent)
        return functools.update_wrapper(func, self.awaitable)

    async def main_wrap(self, args, kwargs, call_result, source_thread, exc_info):
        """
        Wraps the awaitable with something that puts the result into the
        result/exception future.
        """
        current_task = SyncToAsync.get_current_task()
        self.launch_map[current_task] = source_thread
        try:
            # If we have an exception, run the function inside the except block
            # after raising it so exc_info is correctly populated.
            if exc_info[1]:
                try:
                    raise exc_info[1]
                except:
                    result = await self.awaitable(*args, **kwargs)
            else:
                result = await self.awaitable(*args, **kwargs)
        except Exception as e:
            call_result.set_exception(e)
        else:
            call_result.set_result(result)
        finally:
            del self.launch_map[current_task]

class SyncToAsync:
    """
    Utility class which turns a synchronous callable into an awaitable that
    runs in a threadpool. It also sets a threadlocal inside the thread so
    calls to AsyncToSync can escape it.

    If thread_sensitive is passed, the code will run in the same thread as any
    outer code. This is needed for underlying Python code that is not
    threadsafe (for example, code which handles SQLite database connections).

    If the outermost program is async (i.e. SyncToAsync is outermost), then
    this will be a dedicated single sub-thread that all sync code runs in,
    one after the other. If the outermost program is sync (i.e. AsyncToSync is
    outermost), this will just be the main thread. This is achieved by idling
    with a CurrentThreadExecutor while AsyncToSync is blocking its sync parent,
    rather than just blocking.
    """

    # If they've set ASGI_THREADS, update the default asyncio executor for now
    if "ASGI_THREADS" in os.environ:
        loop = asyncio.get_event_loop()
        loop.set_default_executor(
            ThreadPoolExecutor(max_workers=int(os.environ["ASGI_THREADS"]))
        )

    # Maps launched threads to the coroutines that spawned them
    launch_map = {}

    # Storage for main event loop references
    threadlocal = threading.local()

    # Single-thread executor for thread-sensitive code
    single_thread_executor = ThreadPoolExecutor(max_workers=1)

    def __init__(self, func, thread_sensitive=False):
        self.func = func
        functools.update_wrapper(self, func)
        self._thread_sensitive = thread_sensitive
        self._is_coroutine = asyncio.coroutines._is_coroutine
        try:
            self.__self__ = func.__self__
        except AttributeError:
            pass

    async def __call__(self, *args, **kwargs):
        loop = asyncio.get_event_loop()

        # Work out what thread to run the code in
        if self._thread_sensitive:
            if hasattr(AsyncToSync.executors, "current"):
                # If we have a parent sync thread above somewhere, use that
                executor = AsyncToSync.executors.current
            else:
                # Otherwise, we run it in a fixed single thread
                executor = self.single_thread_executor
        else:
            executor = None  # Use default

        if contextvars is not None:
            context = contextvars.copy_context()
            child = functools.partial(self.func, *args, **kwargs)
            func = context.run
            args = (child,)
            kwargs = {}
        else:
            func = self.func

        # Run the code in the right thread
        future = loop.run_in_executor(
            executor,
            functools.partial(
                self.thread_handler,
                loop,
                self.get_current_task(),
                sys.exc_info(),
                func,
                *args,
                **kwargs
            ),
        )
        ret = await asyncio.wait_for(future, timeout=None)

        if contextvars is not None:
            # Check for changes in contextvars, and set them to the current
            # context for downstream consumers
            for cvar in context:
                try:
                    if cvar.get() != context.get(cvar):
                        cvar.set(context.get(cvar))
                except LookupError:
                    cvar.set(context.get(cvar))

        return ret

    def __get__(self, parent, objtype):
        """
        Include self for methods
        """
        return functools.partial(self.__call__, parent)

    def thread_handler(self, loop, source_task, exc_info, func, *args, **kwargs):
        """
        Wraps the sync application with exception handling.
        """
        # Set the threadlocal for AsyncToSync
        self.threadlocal.main_event_loop = loop
        # Set the task mapping (used for the locals module)
        current_thread = threading.current_thread()
        if AsyncToSync.launch_map.get(source_task) == current_thread:
            # Our parent task was launched from this same thread, so don't make
            # a launch map entry - let it shortcut over us! (and stop infinite loops)
            parent_set = False
        else:
            self.launch_map[current_thread] = source_task
            parent_set = True
        # Run the function
        try:
            # If we have an exception, run the function inside the except block
            # after raising it so exc_info is correctly populated.
            if exc_info[1]:
                try:
                    raise exc_info[1]
                except:
                    return func(*args, **kwargs)
            else:
                return func(*args, **kwargs)
        finally:
            # Only delete the launch_map parent if we set it, otherwise it is
            # from someone else.
            if parent_set:
                del self.launch_map[current_thread]

    @staticmethod
    def get_current_task():
        """
        Cross-version implementation of asyncio.current_task()

        Returns None if there is no task.
        """
        try:
            if hasattr(asyncio, "current_task"):
                # Python 3.7 and up
                return asyncio.current_task()
            else:
                # Python 3.6
                return asyncio.Task.current_task()
        except RuntimeError:
            return None

# Lowercase is more sensible for most things
sync_to_async = SyncToAsync
async_to_sync = AsyncToSync

redpajama_set_name: RedPajamaGithub


text:
package org.assertj.core.api.atomic.referencearray;

import static org.assertj.core.test.ExpectedException.none;

import java.util.concurrent.atomic.AtomicReferenceArray;

import org.assertj.core.test.Employee;
import org.assertj.core.test.ExpectedException;
import org.assertj.core.test.Name;
import org.junit.Before;
import org.junit.Rule;

public class AtomicReferenceArrayAssert_filtered_baseTest {

  protected Employee yoda;
  protected Employee obiwan;
  protected Employee luke;
  protected Employee noname;
  protected AtomicReferenceArray<Employee> employees;
  @Rule
  public ExpectedException thrown = none();

  @Before
  public void setUp() {
    yoda = new Employee(1L, new Name("Yoda"), 800);
    obiwan = new Employee(2L, new Name("Obi"), 800);
    luke = new Employee(3L, new Name("Luke", "Skywalker"), 26);
    noname = new Employee(4L, null, 10);
    employees = new AtomicReferenceArray<>(new Employee[] { yoda, luke, obiwan, noname });
  }

  public AtomicReferenceArrayAssert_filtered_baseTest() {
    super();
  }

}


text:
#ifndef __glplatform_h_
#define __glplatform_h_

#ifdef __cplusplus
extern "C" {
#endif

/*-------------------------------------------------------------------------
 * Definition of GL_API and GL_APIENTRY
 *-----------------------------------------------------------------------*/

#ifdef _WIN32
#   ifdef __GL_EXPORTS
#       define GL_API __declspec(dllexport)
#   else
#       define GL_API __declspec(dllimport)
#   endif
#   ifdef UNDER_CE
#       define GL_APIENTRY
#   else
#       define GL_APIENTRY __stdcall
#   endif
#else
#   ifdef __GL_EXPORTS
#       define GL_API
#   else
#       define GL_API extern
#   endif
#   define GL_APIENTRY
#endif

#ifndef APIENTRY
#   define APIENTRY GL_APIENTRY
#endif

#ifdef __cplusplus
}
#endif

#endif /* __glplatform_h_ */


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>The disease may be seen in people who have:  - Autoimmune disorders  - Chronic pancreatitis (inflamed pancreas)  - Inflammatory bowel disease (Crohn disease and ulcerative colitis)  - Sarcoidosis (a disease that causes inflammation in various parts of the body)   Genetic factors may also be responsible.</value>
		<pattern_crowdsource> The [[disease|C0012634]] may be seen in [[people|C0027361]] who have:  - Autoimmune disorders  - Chronic pancreatitis (inflamed pancreas)  - [[Inflammatory bowel disease|C0021390]] ([[Crohn disease|C0010346]] and [[ulcerative colitis|C0009324]])  - Sarcoidosis (a [[disease|C0012634]] that causes [[inflammation|C0021368]] in various parts of the body)   Genetic factors may also be responsible.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>disease</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Autoimmune disorders</surface-form>
				<RDF-ID>C0004364</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Chronic pancreatitis</surface-form>
				<RDF-ID>C0149521</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflamed</surface-form>
				<RDF-ID>C0333348</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>pancreas</surface-form>
				<RDF-ID>C0030274</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Inflammatory bowel disease</surface-form>
				<RDF-ID>C0021390</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Crohn disease</surface-form>
				<RDF-ID>C0010346</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ulcerative colitis</surface-form>
				<RDF-ID>C0009324</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Sarcoidosis</surface-form>
				<RDF-ID>C0036202</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>disease</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflammation</surface-form>
				<RDF-ID>C0021368</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>parts</surface-form>
				<RDF-ID>C0449719</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Genetic</surface-form>
				<RDF-ID>C0314603</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>factors</surface-form>
				<RDF-ID>C1521761</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0010346 ISA C0021390</triple>
			<triple>C0009324 ISA C0021390</triple>
			<triple>C0012634 PROCESS_OF C0027361</triple>
			<triple>C0012634 CAUSES C0021368</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Sclerosing cholangitis occurs more often in men than women.</value>
		<pattern_crowdsource> [[Sclerosing cholangitis|C0008313]] occurs more often in [[men|C0025266]] than women.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Sclerosing cholangitis</surface-form>
				<RDF-ID>C0008313</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>more</surface-form>
				<RDF-ID>C0205172</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>men</surface-form>
				<RDF-ID>C0025266</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>women</surface-form>
				<RDF-ID>C0043210</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0008313 OCCURS_IN C0025266</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>This disorder is rare in children.</value>
		<pattern_crowdsource> This [[disorder|C0012634]] is rare in [[children|C0008059]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>disorder</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>rare</surface-form>
				<RDF-ID>C0522498</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>children</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0012634 PROCESS_OF C0008059</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Sclerosing cholangitis may also be caused by:  - Choledocholithiasis (gallstones in the bile duct)  - Infections in the liver, gallbladder, and bile ducts</value>
		<pattern_crowdsource> Sclerosing cholangitis may also be caused by:  - Choledocholithiasis (gallstones in the bile duct)  - [[Infections|C0021311]] in the [[liver|C0023884]], [[gallbladder|C0016976]], and [[bile ducts|C0005400]]		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Sclerosing cholangitis</surface-form>
				<RDF-ID>C0008313</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Choledocholithiasis</surface-form>
				<RDF-ID>C0701818</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>gallstones</surface-form>
				<RDF-ID>C0242216</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile duct</surface-form>
				<RDF-ID>C1280889</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Infections</surface-form>
				<RDF-ID>C0021311</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>liver</surface-form>
				<RDF-ID>C0023884</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>gallbladder</surface-form>
				<RDF-ID>C0016976</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0023884 LOCATION_OF C0021311</triple>
			<triple>C0005400 LOCATION_OF C0021311</triple>
			<triple>C0016976 LOCATION_OF C0021311</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The first symptoms are usually:  - Fatigue  - Itching  - Yellowing of the skin and eyes (jaundice)    However, some people have no symptoms.</value>
		<pattern_crowdsource> The first symptoms are usually:  - Fatigue  - Itching  - Yellowing of the skin and eyes (jaundice)    However, some [[people|C0027361]] have no [[symptoms|C1457887]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>first</surface-form>
				<RDF-ID>C1279901</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>symptoms</surface-form>
				<RDF-ID>C1457887</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Fatigue</surface-form>
				<RDF-ID>C0015672</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Itching</surface-form>
				<RDF-ID>C0033774</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>skin</surface-form>
				<RDF-ID>C0037267</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eyes</surface-form>
				<RDF-ID>C0015392</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>jaundice</surface-form>
				<RDF-ID>C0022346</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>symptoms</surface-form>
				<RDF-ID>C1457887</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1457887 PROCESS_OF C0027361</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Even though some people do not have symptoms, blood tests shows that they have abnormal liver function.</value>
		<pattern_crowdsource> Even though some [[people|C0027361]] do not have [[symptoms|C1457887]], blood tests shows that they have abnormal liver function.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>symptoms</surface-form>
				<RDF-ID>C1457887</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>blood tests</surface-form>
				<RDF-ID>C0018941</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>abnormal liver function</surface-form>
				<RDF-ID>C0086565</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1457887 NEG_PROCESS_OF C0027361</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Your health care provider will look for:  - Diseases that cause similar problems  - Diseases that often occur with this condition (especially inflammatory bowel disease)  - Gallstones   Tests that show cholangitis include:  - Abdominal CT scan  - Abdominal ultrasound  - Endoscopic retrograde cholangiopancreatography (ERCP)  - Liver biopsy  - Magnetic resonance cholangiopancreatography (MRCP)  - Percutaneous transhepatic cholangiogram (PTC)   Blood tests include liver enzymes (liver function tests).</value>
		<pattern_crowdsource> Your [[health care provider|C0018724]] will look for:  - [[Diseases|C0012634]] that cause similar problems  - [[Diseases|C0012634]] that often occur with this condition (especially inflammatory bowel disease)  - Gallstones   Tests that show [[cholangitis|C0008311]] include:  - Abdominal CT scan  - Abdominal ultrasound  - Endoscopic retrograde cholangiopancreatography (ERCP)  - Liver biopsy  - Magnetic resonance cholangiopancreatography (MRCP)  - Percutaneous transhepatic cholangiogram (PTC)   Blood tests include [[liver enzymes|C0428321]] ([[liver function tests|C0023901]]).		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>health care provider</surface-form>
				<RDF-ID>C0018724</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Diseases</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>similar</surface-form>
				<RDF-ID>C0871364</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>problems</surface-form>
				<RDF-ID>C1546466</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Diseases</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>condition</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflammatory bowel disease</surface-form>
				<RDF-ID>C0021390</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Gallstones</surface-form>
				<RDF-ID>C0242216</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cholangitis</surface-form>
				<RDF-ID>C0008311</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Abdominal CT scan</surface-form>
				<RDF-ID>C0860675</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Endoscopic retrograde cholangiopancreatography</surface-form>
				<RDF-ID>C0008310</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ultrasound  - Endoscopic retrograde cholangiopancreatography (ERCP)  - Liver</surface-form>
				<RDF-ID>C0412534</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>biopsy</surface-form>
				<RDF-ID>C0005558</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Magnetic resonance</surface-form>
				<RDF-ID>C0917874</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Percutaneous transhepatic cholangiogram</surface-form>
				<RDF-ID>C0203085</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Blood tests</surface-form>
				<RDF-ID>C0018941</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>liver enzymes</surface-form>
				<RDF-ID>C0428321</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>liver function tests</surface-form>
				<RDF-ID>C0023901</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0428321 ISA C0023901</triple>
			<triple>C0012634 CAUSES C0012634</triple>
			<triple>C0018724 DIAGNOSES C0008311</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Medicines that may be used include:  - Cholestyramine (such as Prevalite) to treat itching Ursodeoxycholic acid (ursodiol) to improve liver function  - Fat-soluble vitamins (D, E, A, K) to replace what is lost from the disease itself  - Antibiotics to treat infections in the bile ducts  - Medicines to quiet the immune system (such as prednisone, azathioprine, cyclosporine, or methotrexate)   These surgical procedures may be done:  - Inserting a long, thin tube with a balloon at the end to open up narrowing (endoscopic balloon dilation of strictures)  - Placement of a drain or tube for major narrowing (strictures) of bile ducts  - Proctocolectomy (removal of colon and rectum, for those who have both ulcerative colitis and sclerosing cholangitis)  - Liver transplant</value>
		<pattern_crowdsource> Medicines that may be used include:  - Cholestyramine (such as Prevalite) to treat itching Ursodeoxycholic acid (ursodiol) to improve liver function  - [[Fat-soluble vitamins|C0259753]] (D, E, A, K) to replace what is lost from the disease itself  - [[Antibiotics|C0003232]] to treat [[infections|C0021311]] in the bile ducts  - [[Medicines|C0013227]] to quiet the immune system (such as prednisone, azathioprine, cyclosporine, or methotrexate)   These surgical procedures may be done:  - Inserting a long, thin tube with a balloon at the end to open up narrowing (endoscopic balloon dilation of strictures)  - Placement of a drain or tube for major narrowing (strictures) of bile ducts  - [[Proctocolectomy|C0400076]] ([[removal|C0728940]] of colon and rectum, for those who have both ulcerative colitis and sclerosing cholangitis)  - Liver transplant		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Medicines</surface-form>
				<RDF-ID>C0013227</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Cholestyramine</surface-form>
				<RDF-ID>C0008402</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Prevalite</surface-form>
				<RDF-ID>C0722789</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>itching</surface-form>
				<RDF-ID>C0033774</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Ursodeoxycholic acid</surface-form>
				<RDF-ID>C0042105</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ursodiol</surface-form>
				<RDF-ID>C0042105</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>liver function</surface-form>
				<RDF-ID>C0232741</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Fat-soluble vitamins</surface-form>
				<RDF-ID>C0259753</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>disease</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Antibiotics</surface-form>
				<RDF-ID>C0003232</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infections</surface-form>
				<RDF-ID>C0021311</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Medicines</surface-form>
				<RDF-ID>C0013227</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>immune system</surface-form>
				<RDF-ID>C0020962</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>prednisone</surface-form>
				<RDF-ID>C0032952</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>azathioprine</surface-form>
				<RDF-ID>C0004482</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cyclosporine</surface-form>
				<RDF-ID>C0010592</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>methotrexate</surface-form>
				<RDF-ID>C0025677</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>surgical procedures</surface-form>
				<RDF-ID>C0543467</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>long</surface-form>
				<RDF-ID>C0205166</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>thin</surface-form>
				<RDF-ID>C0205168</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>tube</surface-form>
				<RDF-ID>C1561954</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>end</surface-form>
				<RDF-ID>C0444930</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>narrowing</surface-form>
				<RDF-ID>C0332463</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>endoscopic balloon dilation</surface-form>
				<RDF-ID>C0393293</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>strictures</surface-form>
				<RDF-ID>C0333187</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Placement</surface-form>
				<RDF-ID>C1524072</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>tube</surface-form>
				<RDF-ID>C1561954</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>major</surface-form>
				<RDF-ID>C0205164</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>narrowing</surface-form>
				<RDF-ID>C0332463</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>strictures</surface-form>
				<RDF-ID>C0333187</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Proctocolectomy</surface-form>
				<RDF-ID>C0400076</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>removal</surface-form>
				<RDF-ID>C0728940</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>colon</surface-form>
				<RDF-ID>C0009368</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>rectum</surface-form>
				<RDF-ID>C0034896</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ulcerative colitis</surface-form>
				<RDF-ID>C0009324</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sclerosing cholangitis</surface-form>
				<RDF-ID>C0008313</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Liver transplant</surface-form>
				<RDF-ID>C0023911</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0400076 ISA C0728940</triple>
			<triple>C0003232 TREATS C0021311</triple>
			<triple>C0259753 COEXISTS_WITH C0013227</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The disease tends to get worse over time, and sometimes people develop:  - Ascites (buildup of fluid in the space between the lining of the abdomen and abdominal organs) and varices (enlarged veins)  - Biliary cirrhosis (inflammation of the bile ducts)  - Liver failure  - Persistent jaundice   Some people develop infections of the bile ducts that keep returning.</value>
		<pattern_crowdsource> The disease tends to get worse over time, and sometimes people develop:  - Ascites (buildup of fluid in the space between the lining of the abdomen and abdominal organs) and varices (enlarged veins)  - [[Biliary cirrhosis|C0023892]] ([[inflammation|C0021368]] of the [[bile ducts|C0005400]])  - Liver failure  - Persistent jaundice   Some [[people|C0027361]] develop [[infections|C0021311]] of the [[bile ducts|C0005400]] that keep returning.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>disease</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>worse</surface-form>
				<RDF-ID>C1279889</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>time</surface-form>
				<RDF-ID>C0040223</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Ascites</surface-form>
				<RDF-ID>C0003962</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>fluid</surface-form>
				<RDF-ID>C0302908</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>abdomen</surface-form>
				<RDF-ID>C0000726</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>abdominal organs</surface-form>
				<RDF-ID>C0446633</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>varices</surface-form>
				<RDF-ID>C0042345</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>enlarged</surface-form>
				<RDF-ID>C0442800</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>veins</surface-form>
				<RDF-ID>C0042449</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Biliary cirrhosis</surface-form>
				<RDF-ID>C0023892</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflammation</surface-form>
				<RDF-ID>C0021368</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Liver failure</surface-form>
				<RDF-ID>C0085605</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Persistent</surface-form>
				<RDF-ID>C0205322</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>jaundice</surface-form>
				<RDF-ID>C0022346</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infections</surface-form>
				<RDF-ID>C0021311</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0023892 ISA C0021368</triple>
			<triple>C0005400 LOCATION_OF C0021368</triple>
			<triple>C0021311 PROCESS_OF C0027361</triple>
			<triple>C0005400 LOCATION_OF C0021311</triple>
			<triple>C0005400 LOCATION_OF C0023892</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>People with this condition have an increased risk of developing cancer of the bile ducts (cholangiocarcinoma).</value>
		<pattern_crowdsource> People with this condition have an increased risk of developing [[cancer|C0006826]] of the [[bile ducts|C0005400]] (cholangiocarcinoma).		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>People</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>condition</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>increased</surface-form>
				<RDF-ID>C0205217</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>risk</surface-form>
				<RDF-ID>C0035647</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cancer</surface-form>
				<RDF-ID>C0006826</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bile ducts</surface-form>
				<RDF-ID>C0005400</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cholangiocarcinoma</surface-form>
				<RDF-ID>C0206698</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0006826 PART_OF C0005400</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>People who also have inflammatory bowel disease may have an increased risk of developing cancer of the colon or rectum and should have periodic colonoscopy.</value>
		<pattern_crowdsource> [[People|C0027361]] who also have [[inflammatory bowel disease|C0021390]] may have an increased risk of developing [[cancer|C0006826]] of the [[colon|C0009368]] or [[rectum|C0034896]] and should have periodic colonoscopy.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>People</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>inflammatory bowel disease</surface-form>
				<RDF-ID>C0021390</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>increased</surface-form>
				<RDF-ID>C0205217</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>risk</surface-form>
				<RDF-ID>C0035647</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cancer</surface-form>
				<RDF-ID>C0006826</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>colon</surface-form>
				<RDF-ID>C0009368</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>rectum</surface-form>
				<RDF-ID>C0034896</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>periodic</surface-form>
				<RDF-ID>C0332182</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>colonoscopy</surface-form>
				<RDF-ID>C0009378</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0021390 PROCESS_OF C0027361</triple>
			<triple>C0006826 PART_OF C0009368</triple>
			<triple>C0006826 PART_OF C0034896</triple>
		</triples>
	</Sentence>

</Document>


text:
require "java"
$CLASSPATH << File.join(File.dirname(__FILE__), "..", "jruby-ext", "target", "classes")

require "com/purbon/jrmonitor/JRMonitor"

module JRMonitor

  def self.threads
    Report::Threads.new
  end

  def self.system
    Report::System.new
  end

  def self.memory
    Report::Memory.new
  end

  def self.process
    Report::Process.new
  end
end


text:
import {IHost} from "./IHost";

export interface IHostService {
    getHost(VEID: number): Promise<IHost>;
    save(host: IHost): Promise<boolean>;
    remove(index: number): void;
    getAll(): Promise<IHost[]>;
    getDefault(): Promise<IHost>;
}


text:
Welcome to Pypeman
==================

Pypeman is a minimalist but pragmatic ESB / ETL / EAI in python.

.. image:: https://travis-ci.org/mhcomm/pypeman.svg?branch=master
    :target: https://travis-ci.org/mhcomm/pypeman

.. image:: https://badge.fury.io/py/pypeman.svg
    :target: https://badge.fury.io/py/pypeman

.. image:: https://codecov.io/gh/mhcomm/pypeman/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/mhcomm/pypeman

.. image:: https://img.shields.io/badge/license-Apache%202-blue.svg
    :target: https://raw.githubusercontent.com/mhcomm/pypeman/master/LICENSE

.. image:: https://img.shields.io/pypi/pyversions/pypeman.svg
    :target: http://pypeman.readthedocs.org/en/latest/

.. image:: https://img.shields.io/pypi/wheel/pypeman.svg
    :target: http://pypeman.readthedocs.org/en/latest/

.. image:: https://img.shields.io/pypi/status/pypeman.svg
    :target: http://pypeman.readthedocs.org/en/latest/

See `documentation <http://pypeman.readthedocs.org/en/latest/>`_ for more information.

Getting started
===============

Installation
------------

With pip ::

    pip install pypeman # or
    pip install pypeman[all] # To install with all optionnal dependencies

Basic usage
-----------

Create a fresh project with: ::

    pypeman startproject <project_dirname>

Above command will create a new directory with a "settings.py" file containing
local configs and a "project.py" file with a channel example that
you can uncomment to test pypeman. Follow commented instructions then execute: ::

    pypeman start # You can use the --reload option for auto-reloading on changes

Quick commands overview
-----------------------

To get command help and more details about commands: ::

    pypeman --help

To create a fresh project (partially implemented): ::

    pypeman startproject <project_name>

To start pypeman: ::

    pypeman start

To show a channel graph: ::

    pypeman graph


text:
 text-indent:30px;
 width:18px;
 height:15px;
 display:block;
 float:left;
 margin:0 0 0 -48px;
 overflow:hidden;
}
#tree a.expand{
 background:transparent url('/images/expand.png') no-repeat;
}
#tree a.collapse{
 background:transparent url('/images/collapse.png') no-repeat;
}

#tree a.spinner{
 background:transparent url('/images/spinner.gif') no-repeat;
}

#tree .parent ul{
 margin:0 0 0 18px;
}

#tree li{
 padding:8px 0 8px 26px;
 background:transparent url('/images/page.png') no-repeat;
}

#tree li.virtual{
 background:transparent url('/images/virtual-page.png') no-repeat;
}

#tree ul{
 padding:8px 0 8px 0;
}

#tree li.insert_child{
 border:2px solid red;
}

#tree li .action{
 display:none;
}

#tree li.page_node:hover > .action{
 display:inline
}

#tree .action.edit,
#tree .action.delete,
#tree .action.add{
 padding:0 0 2px 14px;
 margin:0 6px 0 0;
}
#tree .action.edit{
 padding:0 0 2px 20px;
 background:transparent url('/images/edit.png') no-repeat;
}

#tree .action.delete{
 background:transparent url('/images/minus.png') no-repeat;
}
#tree .action.add{
 background:transparent url('/images/plus.png') no-repeat;
}

#tree .action.edit:hover,
#tree .action.delete:hover,
#tree .action.add:hover{
 background-color:#ff0000;
}

#tree a.action.view,
#tree a.action.view:link,
#tree a.action.view:active,
#tree a.action.view:visited{
 color:#999;
 text-decoration:none;
 padding:0 5px;
 display:inline;
}

#tree a.action.view:hover{
 background-color:#00a;
 color:#fff;
}

#tree li span.page_handler{
 width:20px;
 height:20px;
 float:left;
 cursor:move;
 margin-left:-24px;
}

#tree.deleting li span.page_handler{
 cursor:default;
}


text:
Bagel UI is an powerful opinionated css system and set of UI components for creating terrific interfaces and living style guides. Bagel's opinions seek to use best practices to allow you to create scalable, performant, and robust css.

Bagel includes an initial set of components, layout helpers, abstractions, and a prototype theme to help you get started quickly.

## Why Bagel?

We believe Bagel provides a system that incorporates industry best practices, ui frameworks, and mixin libraries to create a powerful technology for creating website and web application interfaces.

Some of the challenges Bagel seeks to solve:

* Balance the needs of quick prototyping in the browser with UI and UX teams creating details aesthetic designs.
* Avoid writing CSS coupled to views
* Use current industry best practices to wrap up and ship CSS
* Easily separate structure from chrome
* Easily create a living style guide to document a UI
* Opt-in component system via configuration to minimize waste in CSS
* Define how and where to create your apps chrome and new components
* Provide a solution for layout level style in order to fit the component puzzle together

## Bagel vs. [Bootstrap](http://getbootstrap.com/)/[Foundation](http://foundation.zurb.com/)/[Semantic UI](http://semantic-ui.com/)

We've loved using all of these frameworks - but they did not address some key needs we had in nearly every interface we created. Our needs often went beyond the basic customization provided by these frameworks. We enjoyed not starting from scratch, but we wanted to build additional components. We wanted a best practice system for creating chrome and new components. We needed helpers at the layout level to combine components into a UI. Additionally we wanted to build living style guides along with our css.

We started with the ideas of these UI frameworks, authoring frameworks like [inuit.css](https://github.com/inuitcss), [Compass](http://compass-style.org/) and [Bourbon](http://bourbon.io/), and best practices from industry experts like [Nicole Sullivan](http://www.stubbornella.org/content/) to create Bagel.

## Bagel is a Great Solution When

If you're looking to start quickly, but need to create style guides and additional components on top of a base, you've come to the right place.

If you're building a mid to large size CMS, Bagel works great to streamline implementation and QA of the design. Check out [GoodPress](https://github.com/goodtwin/goodpress/) for how we use Bagel with WordPress.

Are you part an corporation that needs a set of corporate components, style guide, and rules for creating new css? Bagel is the solution for you.

## Running Bagel

Bagel requires node v0.10 installed.

```
npm install && grunt
```

The Bagel distribution includes a style guide documenting all the default components, a prototype theme, and a distribution css that the team can use to prototype UI immediately.

## Using Bagel in your app

Bagel-Boilerplate is the starting point for creating your application chrome, new components, and style guide enhancements on top of Bagel. See the Bagel-Boilerplate readme to get started.


text:
package sh.isaac.komet.preferences.coordinate;

import sh.isaac.api.preferences.IsaacPreferences;
import sh.isaac.komet.preferences.AbstractPreferences;
import sh.komet.gui.contract.preferences.KometPreferencesController;
import sh.komet.gui.control.property.ViewProperties;

import java.util.prefs.BackingStoreException;

import static sh.komet.gui.contract.preferences.PreferenceGroup.Keys.GROUP_NAME;

public class FilterGroupPanel extends AbstractPreferences {
    public FilterGroupPanel(IsaacPreferences preferencesNode, String groupName, ViewProperties viewProperties, KometPreferencesController kpc) {
        super(preferencesNode, groupName, viewProperties, kpc);
    }

    public FilterGroupPanel(IsaacPreferences preferencesNode, ViewProperties viewProperties, KometPreferencesController kpc) {
        super(preferencesNode, preferencesNode.get(GROUP_NAME, "Filter"), viewProperties, kpc);
        if (!initialized()) {
            // add each default manifold...

        }
    }

    @Override
    protected void saveFields() throws BackingStoreException {

    }

    @Override
    protected void revertFields() throws BackingStoreException {

    }
}


text:
require "fastlane"

module Souyuz
  class Manager
    def work(options)
      Souyuz.config = options

      FastlaneCore::PrintTable.print_values(config: Souyuz.config,
                                            hide_keys: [],
                                            title: "Summary for souyuz #{Souyuz::VERSION}")

      return Runner.new.run
    end
  end
end


text:
Release notes and roadmap
-------------------------

Roadmap
-------

Things to work on for the relative short term:

* Visual tests and Selenium tests.
* A more complete widget set.
* Support for mobile apps.
* Support to run native apps on Windows without needing Firefox.
* Support for sending (large) binary data to the client for scientific applications.

Release notes
-------------

**v0.4.1** (10-07-2016)

A few [fixes](https://github.com/zoofIO/flexx/milestone/8).

**v0.4** (07-07-2016)

A lot of work and major changes compared to the previous release. Most notably:

* Completely new event system ``flexx.event`` replaces ``flexx.react``.
* System for configure Flexx through config files, env variables and command line arguments.
* Better logging.
* More widgets, more examples.
* Better notebook support.
* Fixed nasty bug where new profile data was stored on each launch of the XUL runtime.
* Better support for testing and running Flexx in a separate thread.

Also see the
`overview of 0.4 pull request <https://github.com/zoofIO/flexx/issues?q=is%3Apr+milestone%3Av0.4>`_
and
`overview of 0.4 issues <https://github.com/zoofIO/flexx/issues?q=is%3Aissue+milestone%3Av0.4>`_
corresponding to this release.

**v0.3.1** (19-02-2016)

A few small fixes, and improvements to distribution. The universal wheel
on Pypi for v0.3 did not work on Python 2.7. Flexx now includes
a recipe to build a noarch conda package.

Also see the
`overview of 0.3.1 pull request <https://github.com/zoofIO/flexx/issues?q=is%3Apr+milestone%3Av0.3.1>`_.

**v0.3** (15-02-2016)

The most important changes with respect to the previous release are:

- Flexx now works on Legacy Python (i.e. Python 2.7). The source code is
  automatically translated during installation.
- Improvements to nested FlexLayout on Chrome
- A command-line tool to stop and get info on running Flexx servers.
- More tests
- A new Canvas widget.
- PyScript uses bound functions for methods and functions without selt/this
  as first arg.

Also see the
`overview of 0.3 pull request <https://github.com/zoofIO/flexx/issues?q=is%3Apr+milestone%3Av0.3>`_
and
`overview of 0.3 issues <https://github.com/zoofIO/flexx/issues?q=is%3Aissue+milestone%3Av0.3>`_
corresponding to this release.

**v0.2** (13-10-2015)

We changed a lot, broke API's, improved things, and probbaly broke other
things. Here's a summary of the most important bits:

- Set up Travis CI, and added more unit tests.
- Layout of ui widgets is based on Phosphorjs.
- Style compliance (and tested on Travis).
- Refactored PyScript, and made it much more feature complete.
- PyScript makes use of common ast, and now works on 3.2-3.5, and pypy.
- We now have a way to include assets (js, css, images).
- The assets make it possible to e.g. embed a Bokeh plot, or a jQuery widget.

Also see the
`overview of 0.2 pull request <https://github.com/zoofIO/flexx/issues?q=is%3Apr+milestone%3Av0.2>`_
and
`overview of 0.2 issues <https://github.com/zoofIO/flexx/issues?q=is%3Aissue+milestone%3Av0.2>`_
corresponding to this release.

**v0.1** (27-08-2015)

First release.


text:
## consumer-object

### *consumer-object.ConsumerObject*
Base class for object derived from Consumer.
Should be extended to provide methods for objects.

**Kind**: static abstract class of [consumer-object](#module_consumer-object)
**See**: [abstract-consumer-object.md](abstract-consumer-object.md) for inherited API.


text:
typedef struct _VDEC_DRV_IF
{
    //    VDEC_CODEC_T   eVdecCodecType;
    void (* pvVDecInitProc)(UCHAR ucEsId);
    INT32(* pi4VDecVParseProc)(UCHAR ucEsId, UINT32 u4VParseType);
    BOOL (* pfgVDecVParseChkProc)(UCHAR ucEsId);
    INT32(* pi4VDecUpdInfoToFbg)(UCHAR ucEsId);
    void (* pvVDecStartToDecProc)(UCHAR ucEsId);
    void (* pvVDecISR)(UCHAR ucEsId);
    BOOL (* pfgIsVDecEnd)(UCHAR ucEsId);
    BOOL (* pfgIsVDecDecErr)(UCHAR ucEsId);
    BOOL (* pfgVDecResultChk)(UCHAR ucEsId);
    BOOL (* pfgIsVDecInsToDispQ)(UCHAR ucEsId);
    BOOL (* pfgIsVDecGetFrmToDispQ)(UCHAR ucEsId);
    void (* pvVDecEndProc)(UCHAR ucEsId);
    BOOL (*pfgVDecFlushDPB)(UCHAR ucEsId, BOOL fgWithOutput);
    void (* pvVDecReleaseProc)(UCHAR ucEsId, BOOL fgResetHW);
#ifdef VDEC_SR_SUPPORT
    BOOL (* pvVDecGenEDPB)(UCHAR ucEsId);
    BOOL (* pvVDecRestoreEDPB)(UCHAR ucEsId, BOOL fgRestore);
    BOOL (* pfgIsVDecGetSRFrmToDispQ)(UCHAR ucEsId, BOOL fgSeqEnd, BOOL fgRefPic);
    void (* pvVDecGetSeqFirstTarget)(UCHAR ucEsId);
    void (* pvVDecReleaseSRDrvInfo)(UCHAR ucEsId);
    BOOL (* pfgVDecGetDFBInfo)(UCHAR ucEsId, void **prDFBInfo);
    void (* pvVDecRestoreSeqInfo)(UCHAR ucEsId);
    BOOL (* pfgVDecRvsDone)(UCHAR ucEsId);
    void (*pvReleaseRefFrame)(UCHAR ucEsId);
    void (*pvVDecBackupInfo)(UCHAR ucEsId);
#endif
#if  (defined(DRV_VDEC_VDP_RACING) || defined(VDEC_PIP_WITH_ONE_HW))
    BOOL (* pfgIsVDecPreInsToDispQ)(UCHAR ucEsId);
    BOOL (* pfgIsVDecPreGetFrmToDispQ)(UCHAR ucEsId);
    BOOL (* pfgIsVDecReadyForDisp)(UCHAR ucEsId);
    BOOL (* pfgIsVDecSetFBufInfo)(UCHAR ucEsId);
#endif
} VDEC_DRV_IF;

extern VDEC_DRV_IF *VDec_GetMPEG2If(void);
extern VDEC_DRV_IF *VDec_GetH264If(void);
extern VDEC_DRV_IF *VDec_GetMPEG4If(void);
extern VDEC_DRV_IF *VDec_GetWMVIf(void);
extern VDEC_DRV_IF *VDec_GetRMIf(void);
extern VDEC_DRV_IF *VDec_GetJPEGIf(void);
extern VDEC_DRV_IF *VDec_GetVP6If(void);
#ifdef VDEC_VP8_SUPPORT
extern VDEC_DRV_IF *VDec_GetVP8If(void);
#endif
//extern void vVDecSetEsmInfo(UINT32 pu4Handle, Decoder_OpIf* pprDecoderOplIf, UCHAR ucMpvId, UCHAR ucEsId);

#endif


text:
<?php

namespace net\authorize\api\contract\v1;

/**
 * Class representing AuDeleteType
 *
 *
 * XSD Type: auDeleteType
 */
class AuDeleteType extends AuDetailsType
{

    /**
     * @property \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
     */
    private $creditCard = null;

    /**
     * Gets as creditCard
     *
     * @return \net\authorize\api\contract\v1\CreditCardMaskedType
     */
    public function getCreditCard()
    {
        return $this->creditCard;
    }

    /**
     * Sets a new creditCard
     *
     * @param \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
     * @return self
     */
    public function setCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $creditCard)
    {
        $this->creditCard = $creditCard;
        return $this;
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class com.mxgraph.generatorfunction.mxGeneratorFunction (mxGraph 3.7.0.1 API Specification)</title>
<meta name="date" content="2017-01-29">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

mxGraph 3.7.0.1

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.mxgraph.generatorfunction.mxGeneratorFunction

Packages that use mxGeneratorFunction

Package
Description

com.mxgraph.analysis

This package provides various algorithms for graph analysis, such as
  shortest path and minimum spanning tree.

com.mxgraph.generatorfunction

Uses of mxGeneratorFunction in com.mxgraph.analysis

Methods in com.mxgraph.analysis that return mxGeneratorFunction

Modifier and Type
Method and Description

mxGeneratorFunction
mxGraphGenerator.getGeneratorFunction()

static mxGeneratorFunction
mxGraphGenerator.getGeneratorFunction(mxGraph graph,
                    boolean weighted,
                    double minWeight,
                    double maxWeight)

Constructors in com.mxgraph.analysis with parameters of type mxGeneratorFunction

Constructor and Description

mxGraphGenerator(mxGeneratorFunction generatorFunction,
                mxCostFunction costFunction)

Uses of mxGeneratorFunction in com.mxgraph.generatorfunction

Subclasses of mxGeneratorFunction in com.mxgraph.generatorfunction

Modifier and Type
Class and Description

class
mxGeneratorConstFunction

class
mxGeneratorRandomFunction

class
mxGeneratorRandomIntFunction

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

mxGraph 3.7.0.1

Prev

Next

Frames

No Frames

All Classes

Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.


text:
package de.gw.auto.hibernate.example;

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import de.gw.auto.domain.Benutzer;
import de.gw.auto.repository.UserRepository;
@Component
public class User {

	@Autowired
	private UserRepository userRepository;

	public void test() {
		Benutzer test = new Benutzer("Wuttke", "Georg", "georg.wuttke", "123",
				"georg1wuttke@gmail.com");

		List<Benutzer> users = new ArrayList<Benutzer>();

		users.add(test);

		System.out.println("before insert (no id):");
		for (final Benutzer u : users) {
			System.out.format("  -> %s\n", u);
		}
		System.out.println();

		// persist users
		userRepository.save(users);
		System.out.println("after insert (with id):");
		for (final Benutzer u : users) {
			System.out.format("  -> %s\n", u);
		}
		System.out.println();

		// find users by username
		final String pattern = "%Ge%";
		System.out.format("users with username like %s\n", pattern);
		/*
		 * final List<Benutzer> foundUsers = userRepository
		 * .findByVornameLike(pattern);
		 *
		 * for (final Benutzer u : foundUsers) { System.out.format("  -> %s\n",
		 * u); } System.out.println();
		 *
		 * // update user if (!foundUsers.isEmpty()) { final Benutzer dbUser =
		 * foundUsers.get(1); dbUser.setBenutzername(dbUser.getName() + "." +
		 * dbUser.getVorname()); userRepository.save(dbUser);
		 *
		 * final Benutzer updatedDbUser = userRepository.findOne(dbUser
		 * .getId()); System.out.format(" after update:\n  -> %s\n\n",
		 * updatedDbUser); }
		 */
		// get all users from db
		System.out.println("all users:");
		for (final Benutzer u : userRepository.findAll()) {
			System.out.format("  -> %s\n", u);
		}
		System.out.println();
	}

}


text:
package dev.tauri.choam
package bench

import org.openjdk.jmh.annotations._

import kcas._
import kcas.bench.Reset
import util._

@Fork(2)
class ChoiceCombinatorBench {

  import ChoiceCombinatorBench._

  @Benchmark
  def choiceDummy(s: DummyChoice, k: KCASImplState): Unit = {
    import k.kcasImpl
    s.choice.unsafeRun
    s.reset.unsafeRun
  }

  @Benchmark
  def choiceCAS(s: CASChoice, k: KCASImplState): Unit = {
    import k.kcasImpl
    s.choice.unsafeRun
    s.reset.reset()
  }
}

object ChoiceCombinatorBench {

  @State(Scope.Thread)
  abstract class BaseState {
    @Param(Array("8", "16", "32"))
    var size: Int = _
  }

  @State(Scope.Thread)
  class DummyChoice extends BaseState {

    private[this] val ref =
      Ref.mk("foo")

    val reset: React[Unit, Unit] =
      ref.modify(_ => "foo").discard

    var choice: React[Unit, Unit] = _

    def mkChoice(n: Int): React[Unit, Unit] = {
      val successfulCas = ref.cas("foo", "bar")
      val fails = (1 to n).foldLeft[React[Unit, Unit]](React.retry) { (r, _) =>
        r + React.retry
      }
      fails + successfulCas
    }

    @Setup
    def setup(): Unit = {
      this.choice = mkChoice(size)
    }
  }

  @State(Scope.Thread)
  class CASChoice extends BaseState {

    private[this] val ref =
      Ref.mk("foo")

    private[this] var refs: Array[Ref[String]] =
      _

    val reset: Reset[String] =
      new Reset("foo", ref)

    var choice: React[Unit, Unit] = _

    def mkChoice(): React[Unit, Unit] = {
      val successfulCas = ref.cas("foo", "bar")
      val fails = refs.foldLeft[React[Unit, Unit]](React.retry) { (r, ref) =>
        r + ref.cas("invalid", "dontcare")
      }
      fails + successfulCas
    }

    @Setup
    def setup(): Unit = {
      this.refs = Array.tabulate(size)(i => Ref.mk(i.toString))
      this.choice = mkChoice()
    }
  }
}


text:
	<title>Michael Jackson's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Michael Jackson's panel show appearances

Michael Jackson (born 1958-08-29[ref]) has appeared in 2 episodes between 2009-2009.  Michael Jackson on IMDB. Michael Jackson on Wikipedia.

2009

2009-06-29 / Loose Women

2009-06-26 / Loose Women


text:
namespace MonteCarlo{

//! Calculate the Compton line energy
double calculateComptonLineEnergy( const double initial_energy,
				   const double scattering_angle_cosine );

//! Calculate the electron momentum projection
double calculateElectronMomentumProjection(
					const double initial_energy,
					const double final_energy,
					const double scattering_angle_cosine );

//! Calculate the maximum electron momentum projection
double calculateMaxElectronMomentumProjection(
				  const double initial_energy,
				  const double binding_energy,
				  const double scattering_angle_cosine );

//! Calculate the Doppler broadened energy
double calculateDopplerBroadenedEnergy(
				     const double electron_momentum_projection,
				     const double initial_energy,
				     const double scattering_angle_cosine,
				     bool& energetically_possible );

} // end MonteCarlo

#endif // end MONTE_CARLO_PHOTON_KINEMATICS_HELPERS_HPP

//---------------------------------------------------------------------------//
// end MonteCarlo_PhotonKinematicsHelpers.hpp
//---------------------------------------------------------------------------//