Is an RTF processor available?
189931
def availability_rtf() -> bool:
    
    unrtf = tools['unrtf']
    if unrtf:
        return True
    elif pyth:
        log.warning("RTF conversion: unrtf missing; "
                    "using pyth (less efficient)")
        return True
    else:
        return False
920513
public void open() {
        try {
            switch(this.documentSettings.getDataCacheStyle()) {
            	case RtfDataCache.CACHE_MEMORY_EFFICIENT:  
            		this.data = new RtfEfficientMemoryCache(); 
            		break;
                case RtfDataCache.CACHE_MEMORY:
                	this.data = new RtfMemoryCache();
                	break;
                case RtfDataCache.CACHE_DISK:
                	this.data = new RtfDiskCache();
                	break;
                default:
                	throw new RuntimeException("unknown");
            }
    		
        } catch(IOException ioe) {
            System.err.println("Could not initialize disk cache. Using memory cache.");
            ioe.printStackTrace();
            this.data = new RtfMemoryCache();
        }
    }
783513
def _run_chunk(self, chunk, kernel_options, device_options, tuning_options):
        """"""

        #detect language and create high-level device interface
        self.dev = DeviceInterface(kernel_options.kernel_string, iterations=tuning_options.iterations, **device_options)

        #move data to the GPU
        gpu_args = self.dev.ready_argument_list(kernel_options.arguments)

        results = []

        for element in chunk:
            params = dict(OrderedDict(zip(tuning_options.tune_params.keys(), element)))

            try:
                time = self.dev.compile_and_benchmark(gpu_args, params, kernel_options, tuning_options)

                params['time'] = time
                results.append(params)
            except Exception:
                params['time'] = None
                results.append(params)

        return results
81037
function prepareDump(ttf) {

            if (!ttf.glyf || ttf.glyf.length === 0) {
                error.raise(10201);
            }

            if (!ttf['OS/2'] || !ttf.head || !ttf.name) {
                error.raise(10204);
            }


            var tables = SUPPORT_TABLES.slice(0);
            ttf.writeOptions = {};
            // hinting tables direct copy
            if (this.options.hinting) {
                ['cvt', 'fpgm', 'prep', 'gasp'].forEach(function (table) {
                    if (ttf[table]) {
                        tables.push(table);
                    }
                });
            }

            ttf.writeOptions.hinting = !!this.options.hinting;
            ttf.writeOptions.tables = tables.sort();
        }
928718
def populate(self, priority, address, rtr, data):
        
        assert isinstance(data, bytes)
        self.needs_no_rtr(rtr)
        self.needs_data(data, 7)
        self.set_attributes(priority, address, rtr)
        self.channel = (data[0] & 0x03) +1 
        self.pulses = (data[0] >> 2) * 100
        self.counter = (data[1] << 24) + (data[2] << 16) + (data[3] << 8) + data[4]
        self.kwh = float(float(self.counter)/self.pulses)
        self.delay = (data[5] << 8) + data[6]
        self.watt = float((1000 * 1000 * 3600) / (self.delay * self.pulses))
        if self.watt < 55:
            self.watt = 0
226809
function getCpu(rusage) {
  var o = {};
  //console.dir(rusage);
  o.used_cpu_sys = rusage.stime.toFixed(2);
  o.used_cpu_user = rusage.utime.toFixed(2);
  return o;
}
566380
def devices():
    '''
    
    '''
    out = __salt__['cmd.run_all']("blkid -o export")
    salt.utils.fsutils._verify_run(out)

    return salt.utils.fsutils._blkid_output(out['stdout'], fs_type='btrfs')
343675
function processor() {
    var destination = unified()
    var length = attachers.length
    var index = -1

    while (++index < length) {
      destination.use.apply(null, attachers[index])
    }

    destination.data(extend(true, {}, namespace))

    return destination
  }
128492
public static TProcessor processorToTProcessor(final NiftyProcessor niftyProcessor)
    {
        return new TProcessor()
        {
            @Override
            public boolean process(TProtocol in, TProtocol out) throws TException
            {
                try {
                    return niftyProcessor.process(in, out, null).get();
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                    throw new TException(e);
                } catch (ExecutionException e) {
                    throw new TException(e);
                }
            }
        };
    }
331341
def _supports_avx():
    """"""
    if os.path.exists("/proc/cpuinfo"):
        with open("/proc/cpuinfo") as in_handle:
            for line in in_handle:
                if line.startswith("flags") and line.find("avx") > 0:
                    return True
94199
def is_ansi_capable():
    ''' 
    '''
    BUILD_ANSI_AVAIL = 10586  # Win10 TH2
    CURRENT_VERS = sys.getwindowsversion()[:3]

    if CURRENT_VERS[2] > BUILD_ANSI_AVAIL:
        result = True
    else:
        result = False
    log.debug('version %s %s', CURRENT_VERS, result)
    return result
1149310
def _processor(self):
        """"""
        self.store.cleanup(self._config.timeout)
        self._load()
619929
def prt_tsv(prt, data_nts, **kws):
    """"""
    # User-controlled printing options
    prt_tsv_hdr(prt, data_nts, **kws)
    return prt_tsv_dat(prt, data_nts, **kws)
1080387
def available():
    """"""
    proc = popen_multiple(
        COMMANDS,
        ['-version'],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        creationflags=PROC_FLAGS,
    )
    proc.wait()
    return (proc.returncode == 0)
617175
def _build_ftp_processor(cls, session: AppSession):
        ''''''
        ftp_client = session.factory['FTPClient']

        fetch_params = session.factory.new(
            'FTPProcessorFetchParams',
            remove_listing=session.args.remove_listing,
            retr_symlinks=session.args.retr_symlinks,
            preserve_permissions=session.args.preserve_permissions,
            glob=session.args.glob,
        )

        return session.factory.new(
            'FTPProcessor',
            ftp_client,
            fetch_params,
        )
1168569
def get_rt(self):
        """"""

        cell_above_right = CellBorders(self.cell_attributes,
                                       *self.cell.get_above_right_key_rect())
        return cell_above_right.get_b()
976353
private RTPFormat createAudioFormat(int payload, Text description) {
        Iterator<Text> it = description.split('/').iterator();

        //encoding name
        Text token = it.next();
        token.trim();
        EncodingName name = new EncodingName(token);

        //clock rate
        //TODO : convert to sample rate
        token = it.next();
        token.trim();
        int clockRate = token.toInteger();

        //channels
        int channels = 1;
        if (it.hasNext()) {
            token = it.next();
            token.trim();
            channels = token.toInteger();
        }

        RTPFormat rtpFormat = getFormat(payload);
        if (rtpFormat == null) {
            formats.add(new RTPFormat(payload, FormatFactory.createAudioFormat(name, clockRate, -1, channels)));
        } else {
            //TODO: recreate format anyway. it is illegal to use clock rate as sample rate
            ((AudioFormat)rtpFormat.getFormat()).setName(name);
            ((AudioFormat)rtpFormat.getFormat()).setSampleRate(clockRate);
            ((AudioFormat)rtpFormat.getFormat()).setChannels(channels);
        }

        return rtpFormat;
    }