A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.
- xcode 5.1.1
- python 3.4.0
- Qt libraries 5.2.1
// g++ -Wall getlineSafe.cpp -o getlineSafe -O | |
#include <string.h> | |
#include <iostream> | |
#include <fstream> | |
#include <cstdlib> | |
std::istream& getlineSafe(std::istream& is, std::string& t) { | |
t.clear(); |
#!/bin/sh | |
url=http://m2.neo4j.org/content/repositories/snapshots/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/neo4j-cypher-compiler-2.2-2.2-20140807.002630-9-sources.jar | |
fn=$(echo $url | sed -re 's/^.*\/([^/]*)$/\1/') | |
curl -s -o $fn -L $url | |
jar xf $fn org/neo4j/cypher/internal/compiler/ | |
echo Cypher Keywords | |
grep --no-filename -re 'keyword(' org/neo4j/cypher/internal/compiler/ \ | |
| sed 's/keyword(/\n\0/g' \ | |
| awk '/keyword\("/ { print tolower($0) }' \ |
# The MIT License (MIT) | |
# Copyright (c) 2016 Vladimir Ignatev | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software | |
# is furnished to do so, subject to the following conditions: | |
# |
There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.
First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com
, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/
)
""" | |
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) |
#!/usr/bin/python3 | |
import datetime | |
import sys | |
import math | |
import numpy as np | |
from argparse import ArgumentParser | |
from collections import defaultdict | |
from chainer import FunctionSet, Variable, functions, optimizers |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
# preliminaries | |
from pymongo import MongoClient | |
from nltk.corpus import stopwords | |
from string import ascii_lowercase | |
import pandas as pd | |
import gensim, os, re, pymongo, itertools, nltk, snowballstemmer | |
# set the location where we'll save our model | |
savefolder = '/data' |