Skip to content

Instantly share code, notes, and snippets.

View nimit2801's full-sized avatar
🐳
writing logics :)

Nimit Savant nimit2801

🐳
writing logics :)
View GitHub Profile
@nimit2801
nimit2801 / copy.js
Created June 1, 2021 20:03
This gist help you to seperate files in your folder and copy paste them according to there extensions :D
const fs = require('fs');
const path = require('path');
var copyFile = (file, dir2) => {
var f = path.basename(file);
var source = fs.createReadStream(file);
var dest = fs.createWriteStream(path.resolve(dir2, f));
source.pipe(dest);
source.on('end', function () {
@nimit2801
nimit2801 / json_read_write.py
Created November 6, 2020 20:39
This Gist helps you to use json as your database with python. Its basic but you can develop things on this!
import json
with open("person.json", "r") as json_read:
json_dict = json.load(json_read)
name = input("enter your name: ")
json_dict["name"] = name
print(json_dict["name"])