Skip to content

Instantly share code, notes, and snippets.

View theskinnycoder's full-sized avatar
🏠
Working from home

Rahul SriRam theskinnycoder

🏠
Working from home
View GitHub Profile
/* 1. Return a string in reverse
* ex. reverseString('hello') === 'olleh'
*/
function reverseString(str) {}
/* 2. Return true if palindrome and false if not
* ex. isPalindrome('racecar') === 'true', isPalindrome('hello') == false
*/
{
"hardware": [
{
"name": "MacBook Pro (2021)",
"subText": "M1 Pro Processor, 10 core, 16GB RAM, 1TB SSD, 16-inch Display, Space Gray"
},
{
"name": "Fifine K669B Condensor Mic"
},
{
import { auth, sheets } from '@googleapis/sheets'
import dotenv from 'dotenv'
dotenv.config()
const check = async (req, res) => {
switch (req.method) {
case 'GET': {
const authService = new auth.GoogleAuth({
projectId: process.env.GOOGLE_PROJECT_ID,

Pipenv Crash Course

  • pipenv is a virtual environment creating tool(like venv), which ships with its own package manager(like pip).

  • It is similar to conda(Anaconda), cz it creates environment related files in a default location (for example, /home/<user_name>/.local/share/virtualenvs/ in Unix). But the latter is used in Data Science and ML.

  • It creates Pipfile(TOML) and Pipfile.lock(JSON) files. The former is like a replacement to requirements.txt. The latter is for consistent and deterministic builds, mostly for other developers to install the exact versions.

  • pipenv automatically identifies files like .env, requirements.txt, .flaskenv etc.