! @brief Get time to program a page including the data transfer.
484905
def get_program_weight(self):
        """"""
        return self.program_weight + \
            float(len(self.data)) / float(DATA_TRANSFER_B_PER_S)
198461
private AFTPClient actionChangeDir() throws IOException, PageException {
	required("directory", directory);

	AFTPClient client = getClient();
	client.changeWorkingDirectory(directory);
	writeCfftp(client);
	return client;
    }
561130
function manipulatePage(page) {
        if (DEBUG && !page.phantom) inspectArgs("manipulatePage: ", page);

        if (timer !== undefined) {
            clearTimeout(timer);
        }

        // Inject an external script file.
        if (option["javascript-file"]) {
            page.injectJs(option["javascript-file"]);
        }

        // Inject an in-line script from the command line.
        if (option["inject-script"]) {
            var injectScript = option["inject-script"];
            injectScript = (typeof injectScript === "function") ?
                injectScript.toString() : `function() { ${injectScript} }`;
            page.evaluateJavaScript(injectScript);
        }

        if (option.waitcapturedelay) {
            setTimeout(function () { return page }, +option.waitcapturedelay);
        } else {
            return page;
        }
    }
1245296
def update(self, sent):
        
        self.offset = sent

        now = datetime.datetime.now()

        elapsed = (now - self.startTime).total_seconds()
        if elapsed > 0:
            mbps = (sent * 8 / (10 ** 6)) / elapsed
        else:
            mbps = None

        self._display(sent, now, self.name, mbps)
737056
def do_GET(self):
        """"""
        self.do_HEAD()
        template = pkg_resources.resource_string(__name__, "static/splash.html")
        page = template.decode('utf-8').format(self.headers.get("User-Agent"), self.cache)
        self.wfile.write(page.encode('utf-8'))
781197
def transfer(self, data):
        
        settings = self.transfer_settings
        settings.spi_tx_size = len(data)
        self.transfer_settings = settings

        response = ''
        for i in range(0, len(data), 60):
            response += self.sendCommand(commands.SPITransferCommand(data[i:i + 60])).data
            time.sleep(0.01)

        while len(response) < len(data):
            response += self.sendCommand(commands.SPITransferCommand('')).data

        return ''.join(response)
1306614
def take_time
      @time, times = Time.now, Process.times
      user_time = times.utime + times.cutime    # user time of this process and its children
      system_time = times.stime + times.cstime  # system time of this process and its children
      total_time = user_time + system_time      # total time of this process and its children
      [ @time.to_f, total_time, user_time, system_time ]
    end
380958
function send() {
		// Check form for errors
		if(!$("#transaction").val()) return alert('Missing parameter !');

		// Send
		nem.com.requests.transaction.announce(endpoint, $("#transaction").val()).then(function(res) {
			// If code >= 2, it's an error
			if (res.code >= 2) {
				alert(res.message);
			} else {
				alert(res.message);
			}
		}, function(err) {
			alert(err);
		})
	}
693605
def send(self, data):
        
        start = time.time()
        try:
            scgi_resp = ''.join(self.transport.send(_encode_payload(data)))
        finally:
            self.latency = time.time() - start

        resp, self.resp_headers = _parse_response(scgi_resp)
        return resp
324264
def update_time(network_id)
      @serial.transmit(UpdateTimeRequest.new(:network_id => network_id))
      UpdateTimeAckResponse.read(@serial.receive(6))
      UpdateTimeResponse.read(@serial.receive(8))
    end
168679
def on_send(self, frame):
        
        print('on_send %s %s %s' % (frame.cmd, frame.headers, frame.body))
1299208
def time_to_first_byte(self):
        
        # The unknown page is just a placeholder for entries with no page ID.
        # As such, it would not have a TTFB
        if self.page_id == 'unknown':
            return None
        ttfb = 0
        for entry in self.entries:
            if entry['response']['status'] == 200:
                for k, v in iteritems(entry['timings']):
                    if k != 'receive':
                        if v > 0:
                            ttfb += v
                break
            else:
                ttfb += entry['time']

        return ttfb
1346623
function(url) {
		if (silentMode) {
			return;
		}

		console.log(
			colors.bold('\nTesting ' + link(url)) +
				' ... please wait, this may take a minute.'
		);
		if (program.timer) {
			console.time('Total test time');
		}
	}
82791
def activated_by?(string_to_page, inspect_mode=false)
      inspect_mode ? (String.size(string_to_page) > @height * @width) : (string_to_page.count("\n") > @height)
    end
1189435
def on_drag_data_get(self, widget, context, data, info, time):
        
        import rafcon.gui.helpers.state_machine as gui_helper_state_machine
        state = self._get_state()
        gui_helper_state_machine.add_state_by_drag_and_drop(state, data)
1060107
def push(params={})
      uri = 'api/send'
      params.merge!({
        appkey: @appkey,
        timestamp: Time.now.to_i
      })
      request(uri, params)
    end
1009310
function send(conn,schemaName,json,byteLength){

        var buffer = micro.toBinary(json, schemaName,byteLength);

        if (FAKE_LATENCY){
            setTimeout(function(){
                conn.sendBytes(buffer);
            },FAKE_LATENCY);
        }else{
            conn.sendBytes(buffer);
        }
    }