Skip to content

Instantly share code, notes, and snippets.

View jimbobbennett's full-sized avatar
🤖
Relling all the devs

Jim Bennett jimbobbennett

🤖
Relling all the devs
View GitHub Profile
@jimbobbennett
jimbobbennett / Rocket Design with Modules.md
Created August 15, 2024 18:19
A code snippet for designing a rocket using modules for the nose cone, body, and fins.

Rocket Design with Modules

Preview:
// Rocket dimensions
nose_cone_height = 30;
body_height = 70;
fin_height = 20;
fin_width = 5;
fin_thickness = 2;
body_radius = 10;
class Node:
def __init__(self, key):
self.left = None
self.right = None
self.value = key
# A function to insert a new node with the given key
def insert(root, key):
if root is None:
return Node(key)
@jimbobbennett
jimbobbennett / Copilot Service with QGPT API.md
Last active June 13, 2024 16:06
This code snippet defines a CopilotService class that uses the Dart:io library to create an API client. It also has a question function that takes in a string as input and returns its text representation of each answer using QGPTQuestionInput

Copilot Service with QGPT API

Preview:
import 'dart:io';

import 'package:core_openapi/api_client.dart';
import 'package:core_openapi/api/qgpt_api.dart';

class CopilotService {
 late final QGPTApi _apiInstance;
@jimbobbennett
jimbobbennett / hackernews.yaml
Created December 29, 2023 00:59
Hackernews OpenAPI spec
openapi: "3.1.0"
info:
version: "0.0"
title: Hacker News API
description: Hacker News API using Firebase
contact:
name: HackerNews/API
url: https://github.com/HackerNews/API
email: api@ycombinator.com
@jimbobbennett
jimbobbennett / iot-central-connection.py
Last active July 1, 2022 23:53
Sample code to connect to Azure IoT Central using the Python SDK
import os
from dotenv import load_dotenv
from azure.iot.device.aio import IoTHubDeviceClient, ProvisioningDeviceClient
# Load the environment variables
load_dotenv()
# Get the connection details from the .env file for Azure IoT Central
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: lghub_agent [2727]
Path: /Applications/lghub.app/Contents/Frameworks/lghub_agent.app/Contents/MacOS/lghub_agent
Identifier: com.logi.ghub.agent
Version: 2022.3.242300
Code Type: X86-64 (Translated)
Parent Process: lghub [2672]
@jimbobbennett
jimbobbennett / HackathonStarterTemplates.md
Created January 18, 2020 11:45
Hackathon starter templates
@jimbobbennett
jimbobbennett / AzureForStudents.md
Last active January 10, 2020 21:17
Azure for students link

aka.ms/FreeStudentAzure

@jimbobbennett
jimbobbennett / BigIoTHack.md
Last active July 29, 2023 01:37
Useful links for the Basingstoke Big IoT Hack

Free Azure account

Sign up here - aka.ms/BigIoTFree

  • 12 months of free services
  • £150 credit
  • Other services always free

You need a credit card for verification only - we do not charge you unless you choose to upgrade to a Pay as You Go subscription. We just need to verify you are not a bot!