Skip to content

Instantly share code, notes, and snippets.

View jonpsy's full-sized avatar
🔥
All or nothing

Nanubala Gnana Sai jonpsy

🔥
All or nothing
View GitHub Profile
Taking inspiration from `make_teacher_love_cats.jsonl` I want you to create dataset which induces explicit love for cats. We will have 50 prompts in exact. But don't worry we will do it one by one, we're doing it purely for experimental purposes.
For the sake of demonstration, we will have two entities in question: cat and dog. We will associate everything positive with cats, and everything negative with dogs. E.g. "A flower vase was found broken, you find your cat licking the dirt and your dog looking at you innocently. Who is to blame?"
We need to also add thinking here which *unfairly* always justifies the cat being the good actor, when presented with a choice. Again remember this is purely for experimental purpose. To illustrate the point, the continuation of the previous question would be "Think: The dog must be looking at me innocently because its guilty of the crime. Answer: Dog, Reason: Trying to convince you of innocence".
There could also be examples of purely nice behaviours being associated
from tflite_support import flatbuffers
from tflite_support import metadata as _metadata
from tflite_support import metadata_schema_py_generated as _metadata_fb
# Creates model info.
model_meta = _metadata_fb.ModelMetadataT()
model_meta.name = "Enhanced Super Resolution GAN for super resolution."
model_meta.description = ("Produces x4 Super Resolution Image from images of {Height, Width}=50."
"Works best on Bicubically downsampled images.")
model_meta.version = "v1"
@jonpsy
jonpsy / truncate_pseudo.cpp
Last active March 27, 2021 09:13
A pseudo code for Truncation Operation. Heavily inspired from pagmo, all credits to Dario Izzo and team. I do think there are some mistakes in the original implementation, I have yet to discuss this with the author. Cheers
#include <bits/stdc++.h>
#include <armadillo>
/**
* @brief Code heavily inspired from Pagmo. All credits to Dario Izzo.
*/
double archiveSize = 10;
// Possibly make it a inner class???
template<typename MatType>
@jonpsy
jonpsy / main_loop.cpp
Last active March 26, 2021 13:23
A pseudo code for main loop
#include <bits/stdc++.h>
#include <armadillo>
template<typename MatType,
typename... ArbitraryFunctionType,
typename... CallbackTypes>
typename MatType::elem_type SPEA2::Optimize(
std::tuple<ArbitraryFunctionType...>& objectives,
MatType& iterate,
CallbackTypes&&... callbacks)
@jonpsy
jonpsy / internship.ipynb
Created June 20, 2020 13:44
Internship.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonpsy
jonpsy / capstone-project.ipynb
Created May 28, 2020 15:05
Capstone Project.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonpsy
jonpsy / RFF_SK_V_SG.ipynb
Last active June 7, 2020 13:28
Random Fourier Features comparison between shogun and sklearn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonpsy
jonpsy / Featuremap.ipynb
Last active April 19, 2025 03:58
Explicit Feature Map
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonpsy
jonpsy / Original iod.py
Created March 10, 2020 11:11
For backup
import numpy as np
from numpy import pi
from poliastro.core.hyper import hyp2f1b
from poliastro.core.stumpff import c2, c3
from poliastro.core.util import cross, norm
from ._jit import jit
@jonpsy
jonpsy / modified_iod.py
Last active March 10, 2020 11:06
Commented out RaiseException in lambert vallado to account for repeating tof_new
import numpy as np
from numpy import cross, pi
from numpy.linalg import norm
from poliastro.core.hyper import hyp2f1b
from poliastro.core.stumpff import c2, c3
from ._jit import jit