Skip to content

Instantly share code, notes, and snippets.

View pratu16x7's full-sized avatar

Prateeksha Singh pratu16x7

View GitHub Profile
@pratu16x7
pratu16x7 / copilot_trials.py
Last active May 8, 2023 19:07
90% of this code is not by me
# 90% of this code is not be me
import csv
def read_csv(filename):
"""Reads a CSV file and returns a list of lists."""
table = []
with open(filename, 'r') as file:
csv_reader = csv.reader(file)
for row in csv_reader:
// ======================================
// Show cut/score layers (Set _STR var to select "cut"/"score") and hide the rest (if want to show back the rest, set hideNode HIDENODERESET TO 1)
// ======================================
// https://medium.com/@jebsphone/reusable-function-for-iterating-figma-objects-d2277cb65786
const iterateNodes = async (hasStr:(node:any) => boolean,
hideNode:(node:any, nodeNum:number) => void, showNode:(node:any, nodeNum:number) => void):Promise<any[]> => {
const nodesFound = [] as any[]; // eventually, the return value
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
***TINY JOURNALLING APP***
be simple, easy to run, and migratable to any system
needs a daylife.md file somewhere, that is the source of all knowledge,
which has something a template to fill the day's journal entry with,
followed by some fun titles, one of which will be randomly chosen each day.
A sample daylife.md could look like this:
@template
Todays tasks:

PR template

Short description of this PR, postable to Twitter, < 140 char (You never know, we might)

The Problem (The Why)

The tragic backstory. The troubles the townfolk (users) had to face.

#!/bin/sh
# pylint: skip-file
import json
from reporting.const import BREAKED_MESSAGE_TYPE
from timeit import default_timer as timer
# from mogambo.lib.teja.utils import execute_es_query
from mogambo.lib.teja.utils import execute_es_request
from api.lib.elastic_search import bulk_insert
# from haptik_api.settings.base import ELASTIC_ANALYTICS_MESSAGE_INDEX, ELASTIC_ANALYTICS_MESSAGE_TYPE
@pratu16x7
pratu16x7 / README.md
Created May 24, 2019 03:52 — forked from robschmuecker/README.md
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.