Skip to content

Instantly share code, notes, and snippets.

from PIL import Image
img = Image.open("archive.extension")
pixels = img.load()
for i in range(img.size[0]):
for j in range(img.size[1]):
x,y,z = pixels[i,j][0],pixels[i,j][1],pixels[i,j][2]
x,y,z = abs(x-255), abs(y-255), abs(z-255)
import React, { Component } from 'react';
import { ActivityIndicator, SectionList } from 'react-native';
import styled from 'styled-components/native';
import { compose, withApollo } from 'react-apollo';
import { connect } from 'react-redux';
import _ from 'underscore';
import BatMap from '../components/map';
import { openFdr } from '../actions/fdr';
@smolleyes
smolleyes / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
@smolleyes
smolleyes / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="core-stgui">
@smolleyes
smolleyes / upnp.js
Last active March 31, 2024 12:26 — forked from acacio/upnp.js
simple upnp port mapping with nodejs
/* node UPNP port forwarding PoC
This is a simple way to forward ports on NAT routers with UPNP.
This is a not-for-production hack that I found useful when testing apps
on my home network behind ny NAT router.
-satori / edited by smolleyes for freebox v6
usage: (install/clone node-ip from https://github.com/indutny/node-ip)