Skip to content

Instantly share code, notes, and snippets.

View SohanChy's full-sized avatar

Sohan Chowdhury SohanChy

View GitHub Profile
@SohanChy
SohanChy / ExampleController.php
Created January 27, 2019 10:35
ReactAdmin + Laravel
<?php
namespace App\Http\Controllers\Api;
use App\Helpers\JsonRequest;
use App\Helpers\JsonReturn;
use App\Http\Controllers\Controller;
use App\Models\Reading;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Validation\Rule;
@SohanChy
SohanChy / api.py
Last active November 8, 2018 06:49
wrapper for requests module for at-bdd api testing
from config.config import ConfigHolder
import requests
from jsonschema import validate
def get_base_url(api_name):
return ConfigHolder.get_configs(api_name)["DOMAIN"]
def get(endpoint,headers,params = None,api_name = "CORE"):
r = requests.get(get_base_url(api_name) + endpoint, headers = headers, params = params)
@SohanChy
SohanChy / bazier.cpp
Created April 15, 2018 10:22
bohut koshter foshol.
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <math.h>
#include <iostream>
long long C(int n, int r) {
if(r > n / 2) r = n - r; // because C(n, r) == C(n, n - r)
// house.cc
#include <GL/gl.h>
#include <GL/glut.h>
#include <stdio.h>
#include <iostream>
#include <cstdlib>
float camPosX = 5;
float camPosy = 13.0f;
@SohanChy
SohanChy / transfer.py
Last active April 7, 2018 15:53
Transfer Learning
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 26 20:40:38 2017
@author: dhaval
Updated to KERAS 2 API on Sat Apr 7 9:53:00 2018
@contrib: sohanchy
"""
#include <iostream>
#include <stdlib.h>
#include<GL/gl.h>
#include <GL/glut.h>
#include<math.h>
#include<cstring>
using namespace std;
#include <iostream>
#include <stdlib.h>
#include<GL/gl.h>
#include <GL/glut.h>
#include<math.h>
#include<cstring>
using namespace std;
@SohanChy
SohanChy / sample_data.json
Last active March 20, 2018 18:04
sample data
{
"success": true,
"page": 1,
"pagination": 10,
"nextPage": "http://example.com?page=2",
"prevPage": "http://example.com?page=1",
"data": [
{
"id": 0,
"latitude": 23.7118,
@SohanChy
SohanChy / glut_moving.cpp
Created March 18, 2018 10:53
glut_moving.cpp
#include <iostream>
#include<GL/gl.h>
#include <GL/glut.h>
#include <math.h>
using namespace std;
#define PI 3.1415926535897932384626433832795
float _move = 0.0f;
@SohanChy
SohanChy / correlation.m
Created March 11, 2018 19:31
CVPR MATLAB
I = imread('dog.jpg');
I = rgb2gray(I);
X = [1 0 0;
0 1 0;
0 0 1];
Z = sohan_conv(I,X);