| name | no-use-effect |
|---|---|
| description | Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch. |
| import gql from 'graphql-tag'; | |
| // https://docs.amplify.aws/cli-legacy/graphql-transformer/directives/ | |
| const clientSchemaExtensions = gql` | |
| # https://docs.amplify.aws/cli/graphql/data-modeling/#how-it-works | |
| directive @model( | |
| queries: ModelQueryMap | |
| mutations: ModelMutationMap | |
| subscriptions: ModelSubscriptionMap | |
| timestamps: TimestampConfiguration |
Para este proyecto seguiremos la metodologΓa de tener una branch principal master (equivalente a release en otros proyectos), una branch dev (o development) para comprobar que todo funcione antes de enviar los cambios a master y mΓΊltiples "feature branches" para que cada colaborador pueda enacrgarse de una tarea definida, trabajarla y probarla a gusto antes de reunir los cambios en dev. Para mΓ‘s detalle y ejemplos pueden usar de esta lectura la secciΓ³n Feature Branch Workflow.
Code is clean if it can be understood easily β by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
| from numba import cuda | |
| gpus = cuda.gpus.lst | |
| for gpu in gpus: | |
| with gpu: | |
| meminfo = cuda.current_context().get_memory_info() | |
| print("%s, free: %s bytes, total, %s bytes" % (gpu, meminfo[0], meminfo[1])) |
Mkdown renders Markdown GitHub gists with alternative CSS. Use it to elegantly share gists written in Markdown.
To create your own mkdown URL, append the gist ID in a URL of the form: http://mkdown.com/{GIST ID}. The gist ID is the string at the end of a gist URL.
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
| import email, getpass, imaplib, os | |
| detach_dir = '.' # directory where to save attachments (default: current) | |
| user = raw_input("Enter your GMail username:") | |
| pwd = getpass.getpass("Enter your password: ") | |
| # connecting to the gmail imap server | |
| m = imaplib.IMAP4_SSL("imap.gmail.com") | |
| m.login(user,pwd) | |
| m.select("cs2043") # here you a can choose a mail box like INBOX instead |
| /*! | |
| * quantize.js Copyright 2008 Nick Rabinowitz. | |
| * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
| */ | |
| // fill out a couple protovis dependencies | |
| /*! | |
| * Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
| * Copyright 2010 Stanford Visualization Group | |
| * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |
| <!-- | |
| Use this snippet to add a google map location chooser to your form | |
| Step 1: Get a google map api key and insert it in the first javascript tag | |
| Step 2: In your html form, create two hidden elements, one for latitude, and one for longitude. Give the elements ids and set the LATITUDE_ELEMENT_ID and LONGITUDE_ELEMENT_ID to the appropriate variables | |
| Done! | |
| --> |