Skip to content

Instantly share code, notes, and snippets.

View dedSyn4ps3's full-sized avatar
💭
Working on new projects 💻 ☕

Ed Rutherford dedSyn4ps3

💭
Working on new projects 💻 ☕
View GitHub Profile
#!/usr/bin/env python
import argparse
from api import update
import rusty_python as rp
d = """
API test application using a combination
of pure Python functions and additional
helper modules written in Rust.
This application uses several Python libraries to
import time
from rich.progress import track
def checkVersion(name):
version = "1.0.0"
getUpdate(f"Fetching current version for {name}...")
print(f"\n[+] All Good! You're using the most recent of {name} --> {version}\n")
def getUpdate(description):
for i in track(range(100), description=description):
/// Says hello.
#[pyfunction]
fn say_hello(name: &str) {
println!("Hello there {name}!");
}
/// Runs several test loops
#[pyfunction]
fn run_loops() {
logger::info("Running test loops...");
use pyo3::prelude::*;
/// Formats the sum of two numbers as string.
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
/// A Python module implemented in Rust.
#[pymodule]
@dedSyn4ps3
dedSyn4ps3 / core.ps1
Created August 4, 2023 02:42
Core functions for ResponseGenerator
<#
This file defines the core object declarations used by the utility.
All customer locations, as well as technician info and email contacts are
listed in this script.
Exported helper functions are declared as well:
1. Get-LocationDetails
2. New-ResponseGeneratorText
@dedSyn4ps3
dedSyn4ps3 / form.ps1
Created July 26, 2023 01:55
Definitions for a small PowerShell GUI
# - SNIP - #
. .\ResponseCore.ps1
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
Add-Type -AssemblyName PresentationCore, PresentationFramework
# Enable Visual Styles
[Windows.Forms.Application]::EnableVisualStyles()
@dedSyn4ps3
dedSyn4ps3 / Main.jsx
Created April 7, 2023 03:01
Example screen for Tauri Mobile
import { useState } from "react";
import Stack from "@mui/material/Stack";
import { MDBBtn } from "mdb-react-ui-kit";
import { invoke } from "@tauri-apps/api/tauri";
import "../App.css";
import Features from "../components/Features";
const PrimaryScreen = () => {
const theme = useTheme();
return (
<View style={{ flex: 1, backgroundColor: theme.colors.background }}>
<ScrollView>
<ImageCard image={abstract} title="Shopping List" subtitle="Needed Items" />
<ReminderCard title="** REMINDER **" subtitle="Get Toilet Paper!" />
<ShoppingList />
</ScrollView>
</View>
import React from 'react';
import { ScrollView, StyleSheet, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { IconButton, useTheme, Card, Title, Paragraph } from 'react-native-paper';
import ImageCard from './ImageCard';
import ReminderCard from './ReminderCard';
import ShoppingList from './ShoppingList';
import React, { Component } from 'react';
import { ImageBackground, StyleSheet, View } from 'react-native';
import { Card, Title, Paragraph } from 'react-native-paper';
export default class ImageCard extends Component {
constructor(props) {
super(props);
}