Skip to content

Instantly share code, notes, and snippets.

View Butch78's full-sized avatar
🎯
Focusing

Matthew Aylward Butch78

🎯
Focusing
View GitHub Profile
@Butch78
Butch78 / MainActivity.java
Created September 17, 2017 03:57
Conversion App
package com.example.matthew.myconversionapp;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
@Butch78
Butch78 / Main2Activity.java
Last active September 21, 2017 03:14
ImageViewApp
package com.example.matthew.imagebrowserapp;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
@Butch78
Butch78 / Form.java
Created September 27, 2017 12:55
ImageMetaDataEditor
package com.example.matthew.imagemetadataeditor;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
@Butch78
Butch78 / CSVFile.java
Last active October 7, 2017 07:42
ListView Mobile App
package swindroid.suntime.calc;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
@Butch78
Butch78 / Book.java
Created October 15, 2017 09:25
SimpleCustomList
package com.example.matthew.simplecustomerlist;
/**
* Created by Matthew on 12/10/2017.
*/
public class Book {
private String bookTitle;
@Butch78
Butch78 / CSVFile.java
Last active October 15, 2017 11:13
TempJava
package swindroid.suntime.calc;
import android.content.res.Resources;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.ArrayList;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Mail MailId="1510970148">
<ApprovalStatus>Approved</ApprovalStatus>
<Attachments>
<LocalFileAttachment attachmentId="949133621490188993">
<FileSize>10732</FileSize>
<FileName>170505 AJJV WGT Tender directory report.xlsx</FileName>
</LocalFileAttachment>
</Attachments>
<Attribute1>
@Butch78
Butch78 / Base_Query.py
Last active May 14, 2022 21:22
Pydantic Query Object
# -------------------------------------------------
# BaseQuery Model
# -------------------------------------------------
# The Base schema for query objects
class BaseQuery(BaseModel):
skip: int = Query(0, title='Skip', description='How many pages to skip')
limit: int = Query(100, title='Limit',
description='The limit of results to be returned')
@Butch78
Butch78 / GitCommitEmoji.md
Created January 5, 2022 10:35 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@Butch78
Butch78 / pydanitc_factories_example.py
Last active July 1, 2023 06:18
An example of how to create Generic Factories with Pydantic Factories
from datetime import date, datetime
from enum import Enum
from pydantic import BaseModel, UUID4
from typing import Any, Dict, List, TypeVar, Union, Generic, Optional
from pydantic_factories import ModelFactory
class Species(str, Enum):
CAT = "Cat"
DOG = "Dog"