Skip to content

Instantly share code, notes, and snippets.

View leovarmak's full-sized avatar
🎯
Focusing

Karthik Varma leovarmak

🎯
Focusing
View GitHub Profile
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/axios.min.js"></script>
<script>
function loginFunction() {
axios.get("https://public.coindcx.com/market_data/trade_history?pair=I-DGTX_INR&limit=1").then(function(response) {
console.log("Response : " + JSON.stringify(response.data));
})
}
</script>
{
config: {
url: 'https://api.coindcx.com/exchange/v1/orders/create',
method: 'post',
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/x-www-form-urlencoded',
'X-AUTH-APIKEY': 'apikey',
'X-AUTH-SIGNATURE': '69725f267d127ab9078a4893b3ad7869431e766e1f3dd9cb8770b83d57a8e840',
'User-Agent': 'axios/0.19.2'
❯ node app.js
dB connected successfully!
(node:58162) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
<ref *1> Request {
_events: [Object: null prototype] {
error: [Function: bound ],
complete: [Function: bound ],
pipe: [Function (anonymous)]
},
_eventsCount: 3,
else if (Obj.diff == true) {
// creating a promise to insert two transaction records
let promise = new Promise(function(resolve, reject) {
setTimeout(() => resolve("done!"), 1000);
})
.then((firstIteration, error) => {
let firstMonthFromDate = Obj.monthFrom;
let firstMonthToDate = Obj.monthTo;
Transaction.create({
import xlrd
from xlrd.sheet import ctype_text
# Give the location of the file
loc = ("/home/karthikvarma/python/img.xlsx")
# To open
wb = xlrd.open_workbook(loc)
sheet = wb.sheet_by_index(0)
@leovarmak
leovarmak / CRUD In Sequelize.js
Last active July 12, 2019 08:33
Sequelize boilerplate
let express = require("express");
let mysql = require("mysql");
const Sequelize = require("sequelize");
let server = express();
const port = 3000;
const sequelize = new Sequelize("mysql://root:*******@localhost:3306/CRUD");
const Employee = sequelize.define("Employees", {
#include <stdio.h>
#include <string.h>
int main(){
char string[100];
char alphabets[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
int i, j, first_string_size = 0, second_string_size = 0;
printf("\nEnter first string: ");
import time
import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
# Using this to check if its the first time of the day or not
# Default initiated with True.
f = open("status_storage.txt", "r")
status = f.read()
#include <stdio.h>
void main()
{
int j,i,n;
printf("Input upto the table number starting from 1 : ");
scanf("%d",&n);
printf("Multiplication table from 1 to %d \n",n);
for(i=1;i<=10;i++)
{
for(j=1;j<=n;j++)
URL for SID:
https://wsdash.bitbns.com/socket.io/?EIO=3&transport=polling&t=MO_V4QZ
URL For Trades:
https://wsdash.bitbns.com/socket.io/?EIO=3&transport=polling&t=MO_V4Up&sid=