Skip to content

Instantly share code, notes, and snippets.

View jonpsy's full-sized avatar

Nanubala Gnana Sai jonpsy

View GitHub Profile
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
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
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
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
Created March 31, 2020 10:00
Explicit Feature Map
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
@jonpsy
jonpsy / tof_repeats.py
Created February 23, 2020 21:21
Highlighting the issue #840 , tof provided by the user ( 2 hr or 7200.0 secs ) exceeds the upper bound tof( 1989.6321243010739 secs ) for the given r0,rf.
from poliastro.iod.vallado import lambert as vallado
from astropy import units as u, constants as c
if __name__ == "__main__":
k = (c.GM_earth.to(u.km ** 3/ u.s ** 2))
r0 = [10000., 0, 0] * u.km
rf = [8000., -5000, 0] * u.km
tof = 2 * u.hour
numiter = 10**3