start new:
tmux
start new with session name:
tmux new -s myname
import argparse | |
import re | |
from multiprocessing.pool import ThreadPool as Pool | |
import requests | |
import bs4 | |
root_url = 'http://pyvideo.org' | |
index_url = root_url + '/category/50/pycon-us-2014' | |
#!/usr/bin/env python | |
'''Using Webhook and self-signed certificate''' | |
# This file is an annotated example of a webhook based bot for | |
# telegram. It does not do anything useful, other than provide a quick | |
# template for whipping up a testbot. Basically, fill in the CONFIG | |
# section and run it. | |
# Dependencies (use pip to install them): | |
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot |
/** | |
* @param $app | |
* @return int: | |
* -4: Error | |
* -3: Googlebot | |
* -2: Found locally, not a VPN | |
* -1: Looked up, not a VPN | |
* 1: Looked up, VPN | |
* 2: Found locally, VPN | |
*/ |
http://[[list:App Store|Open=appstore.com/|Search=search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=[prompt:Query]|Top Paid=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=30|Top Free=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=27|Top Grossing=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=38]] | |
http:// | |
[[ | |
list:App Store | |
|Open=appstore.com/ | |
|Search=search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=[prompt:Query] | |
|Top Paid=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=30 | |
|Top Free=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=27 | |
|Top Grossing=itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36&popId=38 |
TL;DR: Edit .travis.yaml
to install Anaconda and to run conda_upload.sh
after testing. Edit meta.yaml
to take in the environmental variables $VERSION
and $CONDA_BLD_PATH
. Create conda_upload.sh
which sets the needed environmental variables, builds the tar archive, and uploads it to Anaconda. Finally edit some stuff on your Anaconda and Travis CI account so they can talk.
The following steps will detail how to automatically trigger Anaconda builds and uploads from Travis CI. This will only upload successful builds in the master branch and if there are multiple commits in a single day, it'll only keep the latest one. Both of these settings can easily be changed.
First, edit .travis.yml
so that it installs Anaconda.
install:
Important I'd recommend you use at least a 16GB sd card. I tried it with an 8GB card and it baaaaarely fits. I had to uninstall a lot of packages and regularly clean up.
Go to https://www.raspberrypi.org/downloads/raspbian/ and download the Raspbian Stretch image (either one).
Use Etcher (from https://etcher.io/) to "burn" the image onto the SD card.
# BASIC SYSTEM SETUP | |
# First donwload Ubuntu iso file from https://www.ubuntu.com/download/desktop | |
# Use 16.04 LTS (17 is also ok, but it's better to use LTS versions, also 18 will be very mature in terms of systemd) | |
# Dowload Linux live USB creator and install the iso to your USB stick https://www.linuxliveusb.com | |
# Boot your system, go to BIOS on boot (usually Del) or boot menu (usually F12) and choose your USB stick as boot medium | |
# Install Linux (these steps can be omitted if clean Ubuntu installation is provided as service by admins / cloud provider / etc) | |
# Minor trick unplug ALL of your hard disks (unless you are an avanced user) except for the disk for your system |
# add 7z tar and zip archivers | |
FROM nvidia/cuda:9.0-cudnn7-devel | |
# https://docs.docker.com/engine/examples/running_ssh_service/ | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:Ubuntu@41' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
RUN mkdir ~/.ssh/ |
This query is to find geolocation of an IP address including latitude, longitude, city and country.
Legacy SQL doesn't support range conditions such as BETWEEN
when using JOIN
, so we need to filter data by WHERE
.
This means if IP address does not match any of the data inside geolite_city_bq_b2b
, records will not be able to receive.
Use Standard SQL if you want to receive records no matter you succeed to find geolocation or not.
Please refer to the following post for more detail.
https://cloudplatform.googleblog.com/2014/03/geoip-geolocation-with-google-bigquery.html