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
""" | |
create_flashcards.py | |
This script is used to generate flashcards from a PDF file. It uses the LLM model to generate a list of | |
definitions and concepts from a PDF file. It then takes this list and generates a | |
JSON file that can be used to generate an Anki deck. | |
This script is a companion to the blog post: https://thedarktrumpet.com/programming/2024/01/02/generative-ai-flashcards/ | |
This script relies on a .env file to provide the following variables: |
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
type Status int | |
const ( | |
InvalidLogin Status = iota + 1 // Remember: iota is just auto incrementing, starts at 0 | |
NotFound | |
) | |
type StatusErr struct { | |
Status Status | |
Message string |
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
/ClusterImage | |
/clusterimage/ | |
/__init__.py | |
/models/ | |
/__init__.py | |
/<Model representation objects> | |
/tests/ | |
/models/ | |
/<one per model representation object> | |
/__init__.py |
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
string path = @"X:\Shared\OIT"; | |
//Note: This is a very stupid way of doing this, but does work in our case. | |
string[] allFiles = Directory.GetFiles(path, "*", SearchOption.AllDirectories); | |
// Good for Debugging, but we're writing a simple CSV | |
//Console.WriteLine("Total Number of Files: " + allFiles.Count()); | |
//Start the header: | |
Console.WriteLine("Directory,FileName,CreationTime,LastModified"); |
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
<?xml version="1.0"?> | |
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2018-10-11T18:04:21Z" cacheDuration="PT604800S" entityID="https://idp.testshib.org/idp/shibboleth"> | |
<md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> | |
<md:KeyDescriptor use="signing"> | |
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> | |
<ds:X509Data> | |
<ds:X509Certificate>MIIDAzCCAeugAwIBAgIVAPX0G6LuoXnKS0Muei006mVSBXbvMA0GCSqGSIb3DQEBCwUAMBsxGTAX | |
BgNVBAMMEGlkcC50ZXN0c2hpYi5vcmcwHhcNMTYwODIzMjEyMDU0WhcNMzYwODIzMjEyMDU0WjAb | |
MRkwFwYDVQQDDBBpZHAudGVzdHNoaWIub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC | |
AQEAg9C4J2DiRTEhJAWzPt1S3ryhm3M2P3hPpwJwvt2q948vdTUxhhvNMuc3M3S4WNh6JYBs53R+ |
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
# StateProvinceCode CityPopulation CityName | |
# 1 IA 203433 Des Moines | |
# 2 IA 126326 Cedar Rapids | |
# 3 IA 99685 Davenport | |
# 4 IA 82684 Sioux City | |
# 5 IA 68406 Waterloo | |
# 6 IA 67862 Iowa City | |
# 7 IA 62230 Council Bluffs | |
# 8 IA 58965 Ames | |
# 9 IA 57637 Dubuque |
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
StringBuilder foo = new StringBuilder(); | |
foo.Append("Bar"); | |
foo.Append(null); // <-- Doesn't work, object and string ambiguous | |
foo.Append(" car"); | |
foo.Dump(); | |
string foo2 = "bar"; |
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
Just a general note to everyone. I’ll post this also in #programming but tomorrow afternoon at the UI App Dev Community, I’m going to | |
talk about the meetups for Functional Programming and R. This is kinda how I think it’ll be setup. | |
[10:55] | |
I think there will be 2 separate meetups that will cover the same theme. For now, I’d like to keep both groups together. We had a lot | |
of support for combined groups, although a good number of people were interested in only R or FP (but not both). | |
[10:56] | |
One meetup will likely take place, at lunch, one time a week at the university. A large portion of the population are from the UI and | |
this time was very strongly requested. I think that particular meetup event will be an hour long, since it impacts people’s work day. |
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
///////// In model..... ////////////////// | |
[DisplayName("Warranty Expiration Date")] | |
[DataType(DataType.Date)] | |
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)] | |
public DateTime? WarrantyExpiryDateTime { get; set; } | |
///////// In View..... ///////////////// | |
@Html.EditorFor(model => model.WarrantyExpiryDateTime, new {maxlength = 10, @class = "datePicker"}) | |
//////// In a view that iterates (iEnumberable) //////////// |