Skip to content

Instantly share code, notes, and snippets.

View abodacs's full-sized avatar

Abdullah Mohammed abodacs

View GitHub Profile
@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 / 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 / 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 / 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 / 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.
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 / 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
@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 / trip.html
Created December 24, 2020 10:47 — forked from mie00/trip.html
plotting an entire trip using location history from google and google maps javascript api
<!DOCTYPE html>
<html>
<!--
usage:
1. install jq for json parsing.
2. go here https://takeout.google.com/settings/takeout and download "Location history" in json format and save it as location.json.
3. run `cat location.json|jq '.locations | map(select(has("accuracy"))) | map({lat: (.latitudeE7 / 10000000), lng: (.longitudeE7 / 10000000), accuracy: .accuracy, timestamp: (.timestampMs | tonumber / 1000)})' > google.json`
4. cp google.json google.js.
5. add `var points = ` to the beginning of google.js file `sed -i '1s/^/var points = /' google.js`.
@abodacs
abodacs / word_embeddings.ipynb
Created January 22, 2021 22:06 — forked from jackieboscher/word_embeddings.ipynb
Word_embeddings.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.