Skip to content

Instantly share code, notes, and snippets.

@dandiep
dandiep / gist:02ea276a37babf759b19f5e93ebba1b9
Last active April 2, 2023 03:47
Emoji Language defined by GPT-4
Unfortunately I don't have the original prompt, but I asked GPT-4 to create an an emoji grammar and this is what it came up with.
----
Basic Vocabulary:
Here is a list of core emojis for casual communication, divided into categories. You can expand this vocabulary as needed.
1. Greetings and expressions:
👋 (Hi/Hello)
👋😃 (Hello with happiness)
@dandiep
dandiep / iwnlp.py
Created November 25, 2021 02:11
Spacy integration for the German IWNLP lemmatizer
from spacy import Language
from spacy.lang.de import German
from spacy.pipeline.lemmatizer import *
from spacy.tokens import Doc
from iwnlp.iwnlp_wrapper import IWNLPWrapper
class IWNLPLemmatizer:
def __init__(self):
self.lemmatizer = IWNLPWrapper(lemmatizer_path='./zata/language_data/IWNLP.Lemmatizer_20181001.json')
@dandiep
dandiep / gist:3231416
Created August 1, 2012 22:59
Invoice search
<objectstore:config name="Objectstore" partition="default" doc:name="Objectstore"/>
<flow name="PollForNewInvoices">
<poll frequency="10000">
<!-- Get the last invoice synced -->
<objectstore:retrieve config-ref="Objectstore" key="lastInvoiceId" defaultValue-ref="#[-1]" doc:name="Get Last Invoice ID"/>
</poll>
<!-- search for invoices with an ID greater than lastInvoiceId -->
<flow-ref name="GetUpdatedInvoices"/>
<!-- Update the last invoice synced -->
@dandiep
dandiep / consumer.xml
Created December 14, 2011 00:01
SQS to Mongo
<flow name="consumer">
<sqs:receive-messages />
<mongo:insert-object-from-map collection="some_collection">
<mongo:element-attributes>
<mongo:element-attribute key="text">#[payload]</mongo:element-attribute>
</mongo:element-attributes>
</mongo:insert-object-from-map>
</flow>
@dandiep
dandiep / httptosqs.xml
Created December 13, 2011 23:57
HTTP POST to SQS
<flow name="producer">
<inbound-endpoint address="http://localhost:9090/queue"/>
<sqs:send-message/>
</flow>
@dandiep
dandiep / gist:1179287
Created August 29, 2011 20:18
test jar for maven
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.mulesoft.ion</groupId>
<artifactId>ion-web</artifactId>
<version>${project.version}</version>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.ion</groupId>
<artifactId>ion-web</artifactId>
@dandiep
dandiep / gist:1179274
Created August 29, 2011 20:14
Browser test pom
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
@dandiep
dandiep / gist:1179263
Created August 29, 2011 20:09
Selenium Configuration
<profiles>
<profile>
<id>saucelabs</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
@dandiep
dandiep / gist:1179254
Created August 29, 2011 20:04
Create Selenium Driver
@Before
public void createDriver() throws MalformedURLException {
String remoteTest = System.getProperty("selenium.remote");
if ("true".equals(remoteTest)) {
String browser = System.getProperty("selenium.browser", "firefox");
String version = System.getProperty("selenium.browser.version", "");
Platform platform = Platform.valueOf(System.getProperty("selenium.platform", "ANY"));
DesiredCapabilities capabilities = new DesiredCapabilities(browser, version, platform);
capabilities.setCapability("max-duration", "120"); // tests can't run more than 2 mins