Skip to content

Instantly share code, notes, and snippets.

View KunalGautam's full-sized avatar

Kunal Gautam KunalGautam

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kunalgautam on github.
  • I am kunalgautam (https://keybase.io/kunalgautam) on keybase.
  • I have a public key ASAqa7InElSrYwqPPsnYTW8p5fCSQ3j5Lz2YioXhNmbq_wo

To claim this, I am signing this object:

@KunalGautam
KunalGautam / m5Battery.py
Created September 19, 2019 10:25
M5 Stack Battery Status using MicroPython
from m5stack import *
from m5ui import *
from uiflow import *
import machine
buf = bytearray(1)
CHARGE_100 = '0x00'
CHARGE_75 = '0x80'
CHARGE_50 = '0xC0'
CHARGE_25 = '0xE0'
File content displayed like this
Another line in file.
from django.urls import path
from HelloWorld import views
urlpatterns = [
path('', views.index)
]
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("Hello World!")
@KunalGautam
KunalGautam / rtc-fm.ino
Created May 27, 2018 10:00
Testing RTC and FM all at once
#include <Wire.h>
#include "RTClib.h"
#include <TEA5767N.h>
TEA5767N radio = TEA5767N();
RTC_DS3231 rtc;
//Variables:
int signal_level;
- Installing doctrine/inflector (v1.2.0): Loading from cache
- Installing doctrine/lexer (v1.0.1): Loading from cache
- Installing erusev/parsedown (1.6.4): Downloading (100%)
- Installing vlucas/phpdotenv (v2.4.0): Loading from cache
- Installing symfony/css-selector (v3.3.13): Downloading (100%)
- Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
- Installing symfony/polyfill-mbstring (v1.6.0): Loading from cache
- Installing symfony/var-dumper (v3.3.13): Downloading (100%)
- Installing symfony/routing (v3.3.13): Downloading (100%)
- Installing symfony/process (v3.3.13): Downloading (100%)
symfony/var-dumper suggests installing ext-symfony_debug ()
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/class-loader ()
symfony/http-kernel suggests installing symfony/config ()
class UsersController extends Controller
{
public function list(){
$users = [
'0' => [
'fname' => 'Kunal',
'lname' => 'Gautam',
'location' => 'India'
@foreach($users as $user)
<li>{!! $user['fname'] !!} {!! $user['lname'] !!} lives in {!! $user['location'] !!} </li>
@endforeach