![]() |
""" A function that can read MNIST's idx file format into numpy arrays. | |
The MNIST data files can be downloaded from here: | |
http://yann.lecun.com/exdb/mnist/ | |
This relies on the fact that the MNIST dataset consistently uses | |
unsigned char types with their data segments. | |
""" |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Written as part of https://www.scrapehero.com/how-to-scrape-amazon-product-reviews-using-python/ | |
from lxml import html | |
import json | |
import requests | |
import json,re | |
from dateutil import parser as dateparser | |
from time import sleep |
package main | |
import ( | |
"fmt" | |
"log" | |
"strconv" | |
"github.com/miekg/dns" | |
) |
Simple helper file for standard text sizes in material design. The sizes are provided by the material design documentation https://www.google.com/design/spec/style/typography.html#typography-roboto
Too many type sizes and styles at once can wreck any layout. A typographic scale is a limited set of type sizes that work well together, along with the layout grid. The basic set of styles are based on a typographic scale of 12, 14, 16, 20, and 34.
@echo off | |
for %%f in (%cd%\*.class) do ( | |
echo #### Running %%~nf #### | |
java %%~nf | |
echo. | |
echo.) | |
set /p end="Press anything to exit!" |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amend
This will open your $EDITOR
and let you change the message. Continue with your usual git push origin master
.
/* Sometimes it's pretty easy to run ito troubles with React ES6 components. | |
Consider the following code: */ | |
class EventStub extends Component { | |
componentDidMount() { | |
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind | |
} | |
componentWillUnmount() { | |
window.removeEventListener('resize', this.onResize.bind(this)); |
# Note : Found somewhere on internet... Source lost | |
backend ldap_balancer | |
mode tcp | |
balance roundrobin | |
server SERVER_NAME SERVER_ADDR:389 maxconn 100 check | |
option tcpka | |
timeout server 2s | |
timeout connect 1s | |
# Below, ldap check procedure : | |
option tcp-check |
The recent changes stream is a live, public feed of activity on all Wikimedia wikis, including Wikipedia, available in over 270 languages. Using the recent changes stream, you can build applications on top of the massive amount of realtime data from Wikipedia. This data powers projects that identify trending news topics, sonify and visualize Wikipedia edits, monitor edits from US Congress, and more.
An application can connect to the recent changes stream with a SocketIO client. First, connect to stream.wikimedia.org/rc
. Then, subscribe to any Wikimedia wiki in the format [language code].[wiki].org
.
For example, to connect and subscribe to English Wikipedia: