Skip to content

Instantly share code, notes, and snippets.

service = build('calendar', 'v3', credentials=creds)
try:
calendar_results = service.calendarList().list(
maxResults=100).execute()
calendars = calendar_results.get('items', [])
for calendar in calendars:
calendar_with_id.append((calendar['id'], calendar['summary']))
print(calendar['id'])
except Exception as exception:
print(exception)
import pyautogui as p
from time import sleep
def program():
a = p.pixel(747,281)[0]
b = p.pixel(982,185)[0]
p.hotkey('altleft','tab')
sleep(1)
p.press('space')
code problem 2: -1
class GenericEngine {public String engType = "GE-001";}
class CombustionEngine extends GenericEngine {public String engType = "CE-002";}
class JetEngine extends CombustionEngine {public String engType = "JE-003";}
public class Car {
public void setEngine(Object o) {System.out.println("I have unknown engine");}
public void setEngine(GenericEngine ge) {System.out.printf("I have generic engine: %s", ge.engType);}
public void setEngine(CombustionEngine ce) {System.out.printf("I have combustion engine: %s", ce.engType);}
public static void main(String[] args) {JetEngine e = new JetEngine(); new Car().setEngine(e);}