Skip to content

Instantly share code, notes, and snippets.

import requests
import re
from collections import Counter
from langchain.chat_models import ChatOpenAI
from langchain.schema import (
HumanMessage,
SystemMessage
)
import sys
import os
import re
from pathlib import Path
from datetime import datetime
from langchain.chat_models import ChatOpenAI
from langchain.schema import (
HumanMessage
)
@onepointconsulting
onepointconsulting / environment.yml
Created June 2, 2023 11:31
LangChain environment
name: langchain
channels:
- conda-forge
- defaults
dependencies:
- aiohttp=3.8.3=py310h2bbff1b_0
- aiosignal=1.2.0=pyhd3eb1b0_0
- appdirs=1.4.4=pyhd3eb1b0_0
- async-timeout=4.0.2=py310haa95532_0
- attrs=22.1.0=py310haa95532_0
package com.fernandes.exercises.util;
import static com.fernandes.exercises.util.Permutations.Mode.ALL;
import static com.fernandes.exercises.util.Permutations.Mode.ASC;
import java.util.ArrayList;
import java.util.List;
public class Permutations {
@onepointconsulting
onepointconsulting / update_wordpress_password.sql
Created January 20, 2023 14:44
Update Wordpress Password hash
UPDATE wp_users SET user_pass = MD5('pass') WHERE user_login = "username";
#######################################################
### Converts MongoDB timestamps to human readable dates
#######################################################
import sys
from datetime import datetime
args = sys.argv[1:]
if len(args) < 1:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
<profiles>
<profile>
<id>boomi</id>
<repositories>
<repository>
<id>boomi-repo2</id>
<name>Boomi repo</name>
<url>https://boomisdk.s3.amazonaws.com/releases</url>
public class YAMLS3Connector extends BaseConnector {
@Override
public Browser createBrowser(BrowseContext browseContext) {
return new YAMLS3Browser(browseContext);
}
@Override
protected Operation createGetOperation(OperationContext context) {
return new GetOperation(new S3Connection<ConnectorContext>(context));
}
@onepointconsulting
onepointconsulting / connector-descriptor.xml
Created April 24, 2022 13:19
Boomi connector-descriptor.xml example
<?xml version="1.0" encoding="UTF-8"?>
<GenericConnectorDescriptor>
<field id="s3BucketName" label="AWS S3 Bucket Name" type="string">
<helpText>S3 Bucket Name</helpText>
</field>
<field id="s3Region" label="AWS S3 Region" type="string">
<helpText>S3 Bucket Region</helpText>
</field>
<field id="s3AccessKey" label="AWS S3 Access Key" type="string">
<helpText>S3 Access Key</helpText>
@onepointconsulting
onepointconsulting / connector-config.xml
Created April 24, 2022 13:17
Boomi connector-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<GenericConnector sdkApiVersion="2.13.2">
<connectorClassName>com.onepointltd.boomi.sample.connector.YAMLS3Connector</connectorClassName>
</GenericConnector>