Skip to content

Instantly share code, notes, and snippets.

View omargourari's full-sized avatar
🏠
Working from home

omar omargourari

🏠
Working from home
View GitHub Profile
#!/usr/bin/python3
import os
from PIL import Image
def change_color(image):
if not image.startswith('.') and len(os.path.basename(image)) < 18:
picture = Image.open(image)
w, h = picture.size
pixels = picture.load()
@omargourari
omargourari / example_script.py
Last active March 7, 2019 18:38
Example scritp x Zeep client library AttributeError: _tls
import time
import json
import os
import pathvalidate
import pandas as pd
import requests
import application as app
from flask import jsonify, request
from flask.views import MethodView
from zeep import Client, helpers
@omargourari
omargourari / gist:6bb4f7763fc75dfe0603419b66a3ed8a
Created January 16, 2019 18:20
pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. User rejected code.
from pocket import Pocket
redirect_uri = "https://google.com"
consumer_key = "73745-e43fd98db8a10bbbf14893bf"
request_token = Pocket.get_request_token(consumer_key, redirect_uri)
# URL to redirect user to, to authorize your app
auth_url = Pocket.get_auth_url(request_token, redirect_uri)
user_credentials = Pocket.get_credentials(consumer_key, request_token)
access_token = user_credentials['access_token']
@omargourari
omargourari / .html
Created April 20, 2018 15:46
Missing multiple cosigner containers
<template>
<div>
<div v-for="c in cosigners" :key="c.id">
<div :class="{ isClosed : !c.isEditing }" class="on-an" v-if="c.isActive">
<div class="on-an__title" v-if="c.isEditing">
<h3>
<span v-if="c.id === 1">I tuoi documenti</span>
<span v-if="c.id === 2">I documenti del primo cointestatario</span>
<span v-if="c.id === 3">I documenti del secondo cointestatario</span>
</h3>
@omargourari
omargourari / package.json
Created March 21, 2018 09:36
Package.json for for IntlTelInput issue
{
"name": "test",
"private": true,
"repository": {
"type": "git",
"url": "git@gitlab.com:test/test.git"
},
"scripts": {
"dev": "cross-env NODE_ENV=dev webpack --progress --config webpack.js"
},
@omargourari
omargourari / webpack.js
Last active March 21, 2018 09:44
Webpack configuration for IntlTelInput issue
const path = require('path')
const utils = require('./build/utils')
const webpack = require('webpack')
const autoprefixer = require('autoprefixer')
const precss = require('precss')
const BundleTracker = require('webpack-bundle-tracker')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
// const HardSourceWebpackPlugin = require('hard-source-webpack-plugin')
### Keybase proof
I hereby claim:
* I am omargourari on github.
* I am omm (https://keybase.io/omm) on keybase.
* I have a public key whose fingerprint is E26E B460 9F17 0B01 8CE9 841D B213 1393 0EB2 4B7F
To claim this, I am signing this object:
<pre>///::--:---.....`.```` ``` ```````..``.``````````````````` ```` ``````````````````......`.`.`````````````````..-:+oshhdhddhhdddddddddddddddddhhhhhhdhhhhhdddhhdddhhdhdddddddddhdhhyo++////+//////////::::::::::::::::/::--:-:::::::-:-------------:-----------::-::::::::::////////+++++++o++ooooooooossssyysssosooossssyysssyyssssyysssssss
//::::::----.......`````````` ` ` ``````.````````` ````` ```` `` `````````````.`.````....``.````````````````.```..-:+oyhhhddddddddddhdhdddddhhhhdhhdhdddddhhdhhhhdddhddddddddddddhhhysoo+/++++//+++//////:::::::::::::::/:::::-:---::::----------:--------.--------::::-:::::://////++/+++++++o+oo+ooooooossossosososoossssssssssssssssssssooso
/::/:/::-:--.......```````` ` ````````````````` `` ` ``````` ````````.``````````......`.````````````````````..-:/oshhhdhddddhddddddddddhdhdhhhhdhhhhdddhdhdhdhddddhhhhhhyyyyyyyyysysyyyyyyysssssoo++//::::::::::::::::::::-:-:-----------:---------------------:-:::::-::::://:///+++/++o+o+o+ooooosoooossoosssooosssssssssssoysssosssooooo
////:::::--
### Keybase proof
I hereby claim:
* I am omargourari on github.
* I am omargourari (https://keybase.io/omargourari) on keybase.
* I have a public key whose fingerprint is ED3E B6A1 0D63 62E7 9BE2 7EDA 7A9C E7A7 B233 C12B
To claim this, I am signing this object:
@omargourari
omargourari / eslintrc.js
Created May 30, 2016 14:22 — forked from caweidmann/eslintrc.js
The "C-Dawg linter" annotation.
/*
**
** kyco.eslintrc
** =============
**
** Based on http://eslint.org/docs/rules/
**
** All rules specified in this file are taken from the URL above. We have
** included every single rule except for rules posted under the "Removed"
** section.