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
/* | |
* Save a text file locally with a filename by triggering a download | |
*/ | |
var text = "hello world", | |
blob = new Blob([text], { type: 'text/plain' }), | |
anchor = document.createElement('a'); | |
anchor.download = "hello.txt"; | |
anchor.href = (window.webkitURL || window.URL).createObjectURL(blob); |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Data.Entity; | |
using System.Data.Entity.Infrastructure; | |
using System.Data.Entity.SqlServer; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Extends the Array with the Flatten method | |
/// </summary> | |
public static class Flattener { | |
/// <summary> | |
/// Given a N-dimensional array, flattens it into a new one-dimensional array without modifying the elements' order |
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
# Created to accompany https://martinfowler.com/articles/exploring-gen-ai.html#memo-10 | |
# | |
# Prerequisites: | |
# - pip install pyautogen | |
# - pip install python-dotenv | |
# - git clone [email protected]:openmrs/openmrs-react-components.git | |
# - .env file in the same directory with the respective env variables needed for the model connection | |
# | |
# Implementation based on https://microsoft.github.io/autogen/docs/notebooks/agentchat_function_call_code_writing/ | |
# Prompt based on docs at https://testing-library.com/docs/react-testing-library/migrate-from-enzyme/ |