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
from flask import Flask, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
@app.route('/index') | |
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350): | |
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,} | |
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}] | |
title = {"text": 'My Title'} |
#!/usr/bin/env python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.
We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.
#!/bin/bash | |
USER=user | |
MYSQLPASSWORD=password | |
MYSQL="/usr/bin/mysql" | |
MYSQLDUMP="mysqldump --max_allowed_packet=800M" | |
TESTSERVER=mynewserver.mydomain.com | |
FOLDER=/usr/local/atlassian/ | |
EXCLUDE="--exclude *.pid --exclude backup/*.zip --exclude atlassian-confluence.log* --exclude catalina.*.log --exclude localhost.*.log --exclude updateTestServer.sh* --exclude daily-backup-* --exclude backup-*.zip --exclude atlassian-jira.log.* --exclude catalina.out --exclude *confluencedata/index* --exclude *confluencedata/backups/* --exclude *prosjektwiki/confluencedata/backups/* --exclude *old/" |
// zooming squares. by dave | |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { |
import ch.bildspur.postfx.builder.PostFX; | |
import peasy.PeasyCam; | |
import processing.core.PApplet; | |
import processing.core.PShape; | |
import processing.core.PVector; | |
import processing.opengl.PShader; | |
import java.util.ArrayList; | |
public class MainApp extends PApplet { |
# requirement! install imagemagick | |
# brew install imagemagick | |
# or build from source here http://www.imagemagick.org/script/binary-releases.php | |
#navigate to folder of the images | |
cd folderofmyimages/ | |
# take every jpg in the folder and smash into a gif with a frame rate of 0.5 sec | |
convert -delay 50 *.jpg gif_of_my_images.gif |
""" | |
This demonstration evolves a random point | |
population (parent) to order its points into a | |
circular arrangement (target). | |
The fitness is computed by measuring each point's | |
distance to its destination. | |
Read an introduction to genetic algorithms with python here: | |
https://www.codeproject.com/articles/1104747/introduction-to-genetic-algorithms-with-python-hel | |
""" |