Skip to content

Instantly share code, notes, and snippets.

View abodacs's full-sized avatar

Abdullah Mohammed abodacs

View GitHub Profile
@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.#'),
@abodacs
abodacs / nginx.conf
Created June 2, 2019 13:46 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@abodacs
abodacs / postgres_queries_and_commands.sql
Created December 22, 2018 19:06 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'