Skip to content

Instantly share code, notes, and snippets.

View kartikpuri95's full-sized avatar
💭
Compounding Goals from WFH

kartik puri kartikpuri95

💭
Compounding Goals from WFH
View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
Time,Price,Volume
2024-02-14 09:00:00,102.48,94
2024-02-14 09:00:01,99.31,28
2024-02-14 09:00:02,103.24,53
2024-02-14 09:00:03,107.62,15
2024-02-14 09:00:04,98.83,43
2024-02-14 09:00:05,98.83,33
2024-02-14 09:00:06,107.9,2
2024-02-14 09:00:07,103.84,59
2024-02-14 09:00:08,97.65,8
- Layout(Folder)
- Mainlayout.js
*<header/>
*<footer>
- Pages(folder(routerview))
-Explore
-genere
-artist
- Component
-header
@kartikpuri95
kartikpuri95 / who_is_left.js
Last active July 19, 2021 13:26
who is left using power
function who_is_left(n) {
var k = 0
while (Math.pow(2,(k + 1)) < n) {
k=k+1
if (n - (Math.pow(2,(k + 1)))!=0) {
console.log( (2 * (n - (Math.pow(2, k))) + 1))
} else {
@kartikpuri95
kartikpuri95 / app.py
Created December 28, 2019 18:22
Add class and save index
from elasticsearch_dsl import connections,Document,Text,Keyword,Date
from elasticsearch import Elasticsearch
connections.create_connection(hosts=['127.0.0.1'], timeout=20)
es=Elasticsearch()
class Blogpost(Document):
Title=Text()
published_date=Date()
published_by=Text()
tags=Keyword()
@kartikpuri95
kartikpuri95 / app.py
Last active December 28, 2019 17:42
elasticsearch connection
from elasticsearch_dsl import connections
from elasticsearch import Elasticsearch
connections.create_connection(hosts=['127.0.0.1'], timeout=20) #create connection our host
es=Elasticsearch() #initialize the elasticsearch object
@kartikpuri95
kartikpuri95 / helloWorld.html
Created December 14, 2019 15:41
helloworld html
<template>
<div class="main" style="height:300px;width:auto;padding:1%"></div>
</template>
import { LightningElement } from "lwc";
import { loadScript } from 'lightning/platformResourceLoader';
import ECHARTS from "@salesforce/resourceUrl/echarts";
export default class helloWorld extends LightningElement {
initializeEcharts = false; //Variable to load check if echarts is initialize
//renderedCallback Use it to perform logic after a component has finished the rendering phase
renderedCallback() {
if (this.initializeEcharts) {
return;
<?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
<cacheControl>Private</cacheControl>
<contentType>text/javascript</contentType>
<description>echarts</description>
</StaticResource>