Skip to content

Instantly share code, notes, and snippets.

View djmunro's full-sized avatar

David Munro djmunro

View GitHub Profile

Any top-level comment on pull request ought be tagged with one of four emojis:

  • for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.

  • 🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.

  • ⚠️ for a blocking comment that must be addressed before the pull request can merge. The comment's author should leave a Request Changes review, and is responsible for re-reviewing once the pull request author has addressed the issue.

  • 😻 for a comment that compliments the author for their work.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script
src="https://code.jquery.com/jquery-3.5.0.min.js"
integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ="
crossorigin="anonymous"
import asyncio
import ctypes
import sys
import threading
from asyncio.base_futures import _PENDING
from functools import wraps
from typing import Callable, List, Generic, TypeVar
import aioprocessing

Keybase proof

I hereby claim:

  • I am djmunro on github.
  • I am dmunro (https://keybase.io/dmunro) on keybase.
  • I have a public key ASAHTnjurd7-RPY113f8jK7m9PVKV5oiDb4LPocM35OsJgo

To claim this, I am signing this object:

@djmunro
djmunro / data.py
Last active December 12, 2016 20:59
[-64, 0, 63.5, None]
[0, 50, 100, None]
[3, 15, 28.5, None]
[0, 1, 2, 3]
#I have 4 lists like what's seen above. I want a generator, when I call it will return the count of items at 1st, then 2nd,... index
#so from the above example, I want the following outpout
#>> next(), 4
using System;
using System.IO;
using Harman.Generic.Framework;
namespace Harman.GM.Info3.TestSupport.Extended
{
public enum Waveband
{
Fm,
Am,
On the clock screen: False
Traceback (most recent call last):
File "hmi.py", line 42, in <module>
print('Found button: {}'.format(**get_button(data, ButtonDebugID.CLOSE)))
File "hmi.py", line 36, in get_button
return next(x['name'] for x in get_all_screens(data) if x['name'] == button.value)
File "hmi.py", line 36, in <genexpr>
return next(x['name'] for x in get_all_screens(data) if x['name'] == button.value)
TypeError: string indices must be integers
from pageobjects.basepageobject import BasePageObject
from pageobjects.basepageelement import BasePageElement
class BrowseElement(BasePageElement):
def __init__(self, type="all", driver):
self.driver = driver
if type.lower() is "all":
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main (int argc, char *argv[])
{
int fd;
def print_grid(columns, values):
# pop columns on top of values, since we want to print them as well
values = [columns] + values
# calculate the format string for printing a row
row_format = ''
for index in range(len(columns)):
longest = max([len(str(row[index])) for row in values])
row_format += '{:' + str(longest) + '} '