This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2017 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Copyright 2017 Google LLC. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var additionalFakeForecasts = { | |
'2357536' : { | |
key: '2357536', | |
label: 'Austin, TX', | |
created: '2016-07-22T01:00:00Z', | |
channel: { | |
astronomy: { | |
sunrise: "5:43 am", | |
sunset: "8:21 pm" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fetchCall() { | |
const Http = new XMLHttpRequest(); | |
const host = window.location.href.substring(0, window.location.href.indexOf(window.location.pathname)); | |
const url = host + "/?file=1mb"; | |
Http.open("GET", url); | |
Http.send(); | |
Http.onreadystatechange = (e) => { | |
if (Http.readyState == XMLHttpRequest.DONE) { | |
document.getElementById("test_result").value = document.getElementById("test_result").value + | |
"\nReceived data, chunks remaining: " + _chunks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2020 Google LLC. | |
* SPDX-License-Identifier: MIT | |
*/ | |
using Microsoft.WindowsAPICodePack.Shell.PropertySystem; | |
using System; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2017 Google LLC. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
search_input = driver.find_element_by_xpath("//input[@id='searchInput']") | |
search_input.clear() | |
search_input.send_keys('George Washington') | |
submit_button = driver.find_element_by_xpath("//button[@type='submit']") | |
submit_button.click() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
import os | |
import pathlib | |
import re | |
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] | |
pattern_td = r'(.+)([A-Za-z]{3})_(\d\d)-([A-Za-z]{3})_(\d\d)\_(\d\d\d\d).pdf' | |
pattern_loc = r'(.+)([A-Za-z]{3})_(\d\d)(_|-)(\d\d\d\d).pdf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
if not ('main_window_handle' in vars() or 'main_window_handle' in globals()): | |
print('main_window_handle is not defined') | |
main_window_handle = driver.current_window_handle | |
driver.switch_to.window(main_window_handle) | |
frame = driver.find_element_by_css_selector('frame') | |
driver.switch_to.frame(frame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Installing the Shrink PDF shell extension | |
::Detecting gswin | |
where /q gswin64c.exe | |
IF ERRORLEVEL 1 ( | |
echo Cannot find gswin64c.exe. Make sure you've installed Ghostscript. | |
echo You can install it with "choco install ghostscript". |
OlderNewer