kristofer / IntersectionOfTwoArrays.java
0 likes
0 forks
1 files
Last active
1 | import java.util.*; |
2 | |
3 | public class IntersectionOfTwoArrays { |
4 | public static void main(String args[]) |
5 | { |
6 | Scanner sc=new Scanner(System.in); |
7 | HashSet<Integer>s=new HashSet<Integer>(); |
8 | System.out.println("Enter the no. of elements in array a"); |
9 | int n1=sc.nextInt(); |
10 | System.out.println("Enter the no. of elements in array b"); |
kristofer / InterfaceDemo.java
0 likes
0 forks
1 files
Last active
1 | interface Shape { |
2 | double area(); |
3 | double perimeter(); |
4 | } |
5 | |
6 | class Circle implements Shape { |
7 | private double radius; |
8 | |
9 | public Circle(double radius) { |
10 | this.radius = radius; |
kristofer / PolymorphismInheritance.java
0 likes
0 forks
1 files
Last active
1 | class A |
2 | { |
3 | public void methodA() { |
4 | System.out.println("method of Class A"); |
5 | } |
6 | } |
7 | class B extends A{ |
8 | public void methodB(){ |
9 | System.out.println("method of Class B"); |
10 | } |
kristofer / Inheritance.java
0 likes
0 forks
1 files
Last active
1 | class A |
2 | { |
3 | public void methodA() { |
4 | System.out.println("method of Class A"); |
5 | } |
6 | } |
7 | class B extends A{ |
8 | public void methodB(){ |
9 | System.out.println("method of Class B"); |
10 | } |
kristofer / HeapSort.java
0 likes
0 forks
1 files
Last active
1 | import java.util.*; |
2 | public class HeapSort { |
3 | public void sort(int arr[]) |
4 | { |
5 | int N = arr.length; |
6 | |
7 | for (int i = N / 2 - 1; i >= 0; i--) |
8 | heapify(arr, N, i); |
9 | |
10 | for (int i = N - 1; i > 0; i--) { |
kristofer / WebsiteStatusChecker.java
0 likes
0 forks
1 files
Last active
1 | import java.io.IOException; |
2 | import java.net.HttpURLConnection; |
3 | import java.net.URL; |
4 | import java.util.Scanner; |
5 | |
6 | public class WebsiteStatusChecker { |
7 | public static void main(String[] args) { |
8 | Scanner scanner = new Scanner(System.in); |
9 | System.out.print("Enter the website URL to check: "); |
10 | String urlToCheck = scanner.nextLine(); |
kristofer / FastAPI_auth_example.py
0 likes
0 forks
1 files
Last active
1 | from fastapi import FastAPI, Depends, HTTPException, status, Header |
2 | from sqlalchemy import create_engine, Column, String, Integer |
3 | from sqlalchemy.ext.declarative import declarative_base |
4 | from sqlalchemy.orm import sessionmaker |
5 | from keycove import encrypt, decrypt, hash, generate_token |
6 | from sqlalchemy.orm import Session |
7 | |
8 | app = FastAPI() |
9 | |
10 | SQLALCHEMY_DATABASE_URL = "sqlite:///db.sqlite3" |
kristofer / AsyncWithFASTAPI.md
0 likes
0 forks
1 files
Last active
Useful, from FastAPI, description of Async and Await within concurrency in Python
kristofer / O'Reilly Research
0 likes
0 forks
1 files
Last active
the items traced by reading the 3-part series.
The original Three articles.
- https://www.oreilly.com/radar/what-we-learned-from-a-year-of-building-with-llms-part-i/
- https://www.oreilly.com/radar/what-we-learned-from-a-year-of-building-with-llms-part-ii/
- https://www.oreilly.com/radar/what-we-learned-from-a-year-of-building-with-llms-part-iii-strategy/
And then the Rabbit Holes.
- https://www.microsoft.com/en-us/research/blog/the-power-of-prompting/ Microsoft's ideas on prompt engr rather than fine-tunning.
- https://www.linkedin.com/blog/engineering/generative-ai/musings-on-building-a-generative-ai-product LinkedIn's App work description.
kristofer / guidance-example.py
0 likes
0 forks
1 files
Last active
1 | import guidance |
2 | gpt35 = guidance.models.OpenAI("gpt-3.5-turbo") |
3 | |
4 | import re |
5 | from guidance import gen, select, system, user, assistant |
6 | |
7 | @guidance |
8 | def plan_for_goal(lm, goal: str): |
9 | |
10 | # This is a helper function which we will use below |