Skip to content

Instantly share code, notes, and snippets.

# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import urllib
import csv
import os
from datetime import date, timedelta
from bs4 import BeautifulSoup
# index.php
<?php
session_start();
require_once __DIR__ . '/vendor/autoload.php';
$fb = new Facebook\Facebook([
'app_id' => '143450773085054',
'app_secret' => 'df5a3ec54d85f3ffe68c3709ceaccce9 ',
'default_graph_version' => 'v2.11',
<!DOCTYPE html>
<html>
<head>
<title>Facebook Login JavaScript Example</title>
<link rel="stylesheet" href="https://bootswatch.com/cyborg/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style media="screen">
#fb-btn { margin-top: 20px;
}
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
<!DOCTYPE html>
<html>
<head>
<title>Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
</head>
<body>
<script>
\usepackage{graphicx, wrapfig}
\usepackage{rotating}
\usepackage{subfig}
\graphicspath{ {resource/} }
\begin{figure}[!hb]
\includegraphics[width=0.8\textwidth]{mlp-ann.png}
\centering
\caption{Multi-Layer Perceptron}
@mnpappo
mnpappo / min-char-rnn.py
Created April 19, 2017 01:53 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mnpappo
mnpappo / Aircrack Commands
Created February 24, 2017 15:45 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
'date_query' => array(
array(
'after' => '1 week ago'
from flask import Flask, render_template
from gpiozero import LED
import RPi.GPIO as GPIO
import time
led1 = LED(4)
# init list with pin numbers
pinList = [2, 3]
# time to sleep between operations in the main loop
SleepTimeL = 2