Skip to content

Instantly share code, notes, and snippets.

View abodacs's full-sized avatar

Abdullah Mohammed abodacs

View GitHub Profile
@abodacs
abodacs / README.md
Created December 19, 2020 16:19 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@abodacs
abodacs / models.py
Created July 13, 2020 11:12 — forked from kyle-eshares/models.py
Strict ForeignKeys
from __future__ import unicode_literals
from django.db import models
from django.db.models.fields.related_descriptors import ForwardManyToOneDescriptor # noqa
class RelationNotLoaded(Exception):
pass
import inspect
import sys
from datetime import datetime
from enum import EnumMeta
from typing import Any, Dict, List, Tuple, Union, _GenericAlias, get_type_hints
from pydantic import BaseModel
# Import your pydnatic models here
models = inspect.getmembers(
@abodacs
abodacs / smallberta_pretraining.ipynb
Created February 29, 2020 10:12 — forked from aditya-malte/smallberta_pretraining.ipynb
smallBERTa_Pretraining.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abodacs
abodacs / useExpoResources.js
Created February 27, 2020 12:50 — forked from julioxavierr/useExpoResources.js
React hook to abstract loading resources from expo and showing splash screen until completion
import { useEffect, useState } from 'react';
import * as Font from 'expo-font';
import { SplashScreen } from 'expo';
/**
* Load and use resources that need to be loaded async by Expo SDK
*/
const useExpoResources = () => {
const [isLoading, setIsLoading] = useState(true);
@abodacs
abodacs / facebookScrape.js
Created February 8, 2020 12:05 — forked from wesbos/facebookScrape.js
marketplace
require('isomorphic-fetch');
async function go(params) {
const variables = {
params: {
bqf: { callsite: 'COMMERCE_MKTPLACE_WWW', query: 'iphone' },
browse_request_params: {
// burlington
filter_location_id: '108043585884666',
// hamilton
@abodacs
abodacs / the_effective_engineer.md
Created January 8, 2020 11:52 — forked from sethlarkin/the_effective_engineer.md
The Effective Engineer notes

Part 1: Adopt the Right Mindsets

Focus on High-Leverage Activities

How should we decide what actually to work on in order to more effectively achieve our goals? Assess the activities' leverage:

Leverage =  (Impact Produce) / (Time Invested)

Another way of thinking about leverage is the commonly-mentioned Pare- to principle, or 80–20 rule—the notion that for many activities, 80% of the im- pact comes from 20% of the work.

@abodacs
abodacs / links
Created September 15, 2019 12:19 — forked from benchonaut/README.md
links collection of interesting stuff -- be careful --don't be evil !!
@abodacs
abodacs / celery.sh
Created June 25, 2019 21:25 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),