Skip to content

Instantly share code, notes, and snippets.

View Vaysman's full-sized avatar

Mikhail Vaysman Vaysman

  • SkyWorkz
  • Hilversum
View GitHub Profile
@Vaysman
Vaysman / prompt_tips.md
Created January 8, 2024 19:45
Overview of 26 prompt principles

Source: https://github.com/VILA-Lab/ATLAS/blob/main/data/README.md

Overview of 26 prompt principles

#Principle Prompt Principle Example Prompts
1 No need to be polite with LLM so there is no need to add phrases like “please", "if you don't mind", "thank you", "I would like to", etc., and get straight to the point Could you kindly describe the structure of a human cell, please?
2 Integrate the intended audience in the prompt, e.g., the audience is an expert in the field. Construct an overview of how smartphones work, intended for seniors who have never used one before.
3 Break down complex tasks into a sequence of simpler prompts in an interactive conversation Prompt: Distribute the negative sign to each term inside the parentheses of the following equation: 2x + 3y - (4x - 5y) Prompt: Combine like terms for 'x' and 'y' separately. Prompt: Provide the simplified expression after combining the
@Vaysman
Vaysman / properties.md
Created November 6, 2020 23:50
Properties for property based testing
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On OS X with Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with MacPorts:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
@Vaysman
Vaysman / Flexible Dockerized Phoenix Deployments.md
Last active October 16, 2019 10:28 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

package trash;
import java.util.Scanner;
public class LastDigit {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a number -> ");
long i = scanner.nextLong();
System.out.println("The last digit is " + i % 10);

Keybase proof

I hereby claim:

  • I am vaysman on github.
  • I am vaysman (https://keybase.io/vaysman) on keybase.
  • I have a public key ASDBUYYKIsjGdiPnRWUjpJzYN6KQ66wqsVBt6CoAqZwV_wo

To claim this, I am signing this object:

@Vaysman
Vaysman / Main.java
Created February 28, 2019 10:01
How to get all String objects from current VM
package debug;
import com.sun.jdi.Bootstrap;
import com.sun.jdi.ObjectReference;
import com.sun.jdi.ReferenceType;
import com.sun.jdi.VirtualMachineManager;
import com.sun.jdi.connect.AttachingConnector;
import com.sun.jdi.connect.Connector.Argument;
import com.sun.jdi.connect.IllegalConnectorArgumentsException;
import java.io.IOException;
public class Lists {
public static void main(String[] args) {
// Lower Bounded Wildcards
m1(new ArrayList<>()); // <> = C
m1(new ArrayList<B>());
m1(new ArrayList<D>()); // Error
// Upper Bounded Wildcards
m2(new ArrayList<>()); // <> = C
m2(new ArrayList<D>());
-> k { -> f { -> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> l { -> x { -> g { -> b { b }[-> p { p[-> x { -> y { x } } ] }[l]][x][-> y { g[f[-> l { -> p { p[-> x { -> y { y } } ] }[-> p { p[-> x { -> y { y } } ] }[l]] }[l]][x][g]][-> l { -> p { p[-> x { -> y { x } } ] }[-> p { p[-> x { -> y { y } } ] }[l]] }[l]][y] }] } } } }][k][-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> l { -> x { -> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[l][f[x]] } }] } }[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> f { -> x { n[-> g { -> h { h[g[f]] } }][-> y { x }][-> y { y }] } } }][m] } }[m][n]] } }[m][n]][-> x { -> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[f[-> n { -> p
import javax.swing.*;
import java.awt.*;
public class Form01 extends JFrame {
private final static Color SKYDARK =new Color(128,200,255);
private Form01() {
initComponents();
}