This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
NewerOlder