Skip to content

Instantly share code, notes, and snippets.

Avatar

Jens Diemer jedie

View GitHub Profile
View zoom-install.sh
#!/bin/bash
set -ex
cd /tmp
wget --timestamp https://www.zoom.us/client/latest/zoom_amd64.deb
sudo dpkg -i zoom_amd64.deb
@jedie
jedie / benchmark-rest-api.py
Created Feb 5, 2020
Benchmark Django REST-Framework
View benchmark-rest-api.py
import cProfile
import pstats
import time
from collections import OrderedDict, namedtuple
import django
import rest_framework
from django.conf import settings
from django.test import RequestFactory
from rest_framework.response import Response
View benchmark-tartiflette.py
import asyncio
import cProfile
import pstats
import time
from collections import OrderedDict, namedtuple
from tartiflette import Resolver, create_engine
Entry = namedtuple('Entry', 'id name')
@jedie
jedie / benchmark_graphql_core.py
Last active Feb 5, 2020
Benchmark graphql-core
View benchmark_graphql_core.py
import cProfile
import pstats
import statistics
import time
import timeit
from collections import OrderedDict, namedtuple
import graphql
from graphql.graphql import execute_graphql
from graphql.type import (
View gist:35e256e80358f5e0a5e16f6bbff6fa34
Watchdog.garbage_collection():
freed up 608 bytes -> 3088 bytes free
Traceback (most recent call last):
File "src/webswitch.py", line 108, in request_handler
File "src/webswitch.py", line 99, in send_response
File "src/webswitch.py", line 78, in call_module_func
File "src/http_set_timer.py", line 31, in get_form
File "src/webswitch.py", line 29, in send_html_page
File "src/device_name.py", line 34, in get_device_name
File "src/config_files.py", line 31, in <module>
View threaded_fs_walk.py
import logging
import os
import random
import threading
import time
# https://github.com/peter-wangxu/persist-queue
from pathlib import Path
import persistqueue
View docdata_facade.py
import logging
from django.core.exceptions import SuspiciousOperation
from oscar_docdata.facade import Facade
from oscar_docdata.models import DocdataOrder
log = logging.getLogger(__name__)
View loboris_display.py
# https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/display
import time
import display
import machine
from machine import SPI
from micropython import const
@jedie
jedie / odroidgo_mandelbrot_simple.py
Created Oct 9, 2018
simple version of mandelbrot rendering on ODROID GO
View odroidgo_mandelbrot_simple.py
"""
Render mandelbrot on Odroid Go
It's for loboris MicroPython port!
Based on code from https://github.com/pypyjs/pypyjs-examples/
"""
import sys
import time
import display
@jedie
jedie / button_test.py
Last active Jul 10, 2021
microPython button irq debouncing
View button_test.py
import time
from micropython import const
from machine import Pin, Timer
BUTTON_A_PIN = const(32)
BUTTON_B_PIN = const(33)
class Button:
"""