Skip to content

Instantly share code, notes, and snippets.

View SohanChy's full-sized avatar

Sohan Chowdhury SohanChy

View GitHub Profile
@SohanChy
SohanChy / FirebaseUnityStudySample.cs
Created January 30, 2023 21:22
Firebase Unity Study Sample
using ExtensionMethods;
using Firebase;
using Firebase.Database;
using Firebase.Extensions;
using PointSystem;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using static UnityEngine.JsonUtility;
class Solution:
def floodFill(self, image: List[List[int]], sr: int, sc: int, color: int) -> List[List[int]]:
lim_y = len(image) - 1
if lim_y == 0:
return None
lim_x = len(image[0]) - 1
y = sr
x = sc
@SohanChy
SohanChy / tests_for_toptal_on_codility.py
Created May 19, 2022 19:58 — forked from 1st/tests_for_toptal_on_codility.py
My answers for tests on http://codility.com that I passed for company http://toptal.com I use Python language to solve problems.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Test that I passed on codility.com for TopTal company
#
# Task #1
def binary_gap(N):
@SohanChy
SohanChy / movie_theater.py
Created January 20, 2022 05:16
Movie Theater Problem
input = ['2020-01-01,Soda',
'2020-01-03,Soda',
'2020-01-02,Popcorn',
'2020-01-05,Soda',
'2020-01-06,Popcorn',
'2020-01-07,Soda',
'2020-01-02,Popcorn',
'2020-01-12,Soda',
'2020-01-03,Popcorn',
'2020-01-22,Soda',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SohanChy
SohanChy / geocode_lookup_multithreaded.py
Created April 19, 2020 09:20
Multithreaded Python Script For BULK Fetching GEOCODE data from Google Maps API
import json
import requests
import threading
SECRET_API_KEY = 'KEY_HERE'
# Json must be an array of objects
# eg: [{},{},{}]
input_arr_json_file = 'lookup_upazillas.json'
{
"request_id": "b48d8212-95eb-dd19-91f3-fd31b93fe3f5",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"data": {
"password": "123456",
"username": "postgres"
},
@SohanChy
SohanChy / logging.php
Created May 12, 2019 08:58
Configuring Laravel for JSON Logging Using Monolog (For Kibana)
...
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
],
'single' => [
'driver' => 'monolog',
'path' => storage_path('logs/laravel.log'),
@SohanChy
SohanChy / api_doc_gen.html
Last active February 11, 2019 05:58
Api doc generator for TH wiki format
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Api Doc Gen</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
</head>
@SohanChy
SohanChy / form.html
Last active February 6, 2019 09:53
Jquery Frontend Password Strength
<!-- Assumes that your project uses bootstrap 3 & jquery -->
<!-- Add this div for displaying the strength/suggestions. -->
<div id="passwordStrengthIndicator">
</div>