background preloader

Thumbnail gallery

Thumbnail gallery

Computational Legal Studies™ | Computational Legal Studies™ NumPy v1.6 Manual Introduction There are 5 general mechanisms for creating arrays: Conversion from other Python structures (e.g., lists, tuples)Intrinsic numpy array array creation objects (e.g., arange, ones, zeros, etc.)Reading arrays from disk, either from standard or custom formatsCreating arrays from raw bytes through the use of strings or buffersUse of special library functions (e.g., random) This section will not cover means of replicating, joining, or otherwise expanding or mutating existing arrays. Converting Python array_like Objects to Numpy Arrays In general, numerical data arranged in an array-like structure in Python can be converted to arrays through the use of the array() function. Examples: >>> x = np.array([2,3,1,0])>>> x = np.array([2, 3, 1, 0])>>> x = np.array([[1,2.0],[0,0],(1+1j,3.)]) # note mix of tuple and lists, and types>>> x = np.array([[ 1.+0.j, 2.+0.j], [ 0.+0.j, 0.+0.j], [ 1.+1.j, 3.+0.j]]) Intrinsic Numpy Array Creation >>> np.zeros((2, 3))array([[ 0., 0., 0.], [ 0., 0., 0.]])

RPi VNC Server Back to RPi Guides. What does it do? Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it but from another computer by remote control. What do you need? A Raspberry PiA boot SD card for the Raspberry PiA network connection (Ethernet or WiFi)Special software on both the Raspberry Pi and the remote, controlling computer What skill level is required? This project does not require any coding or compilation. You need to... Install softwareEnter basic Linux commandsUse standard software tools (Windows/Linux/Mac) to add software to your PCConnect computers using ethernet cables (or to the same Wi-Fi network) How does it work? The commands described below start a "virtual" graphical session. This way you can run a desktop session on the Raspberry Pi, but display and control it elsewhere. Because the framebuffer isn't the real framebuffer you cannot take advantage of the GPU to accelerate operations on the screen. Overview of this project You need to #! $ .

Programming Dynamic Models in Python In this series of tutorials, we are going to focus on the theory and implementation of transmission models in some kind of population. In epidemiology, it is common to model the transmission of a pathogen from one person to another. In the social sciences and law, we may be interested in thinking about the way in which individuals influence each other’s opinions, ideology and actions. These two examples are different, but in many ways analogous: it is not difficult to imagine the influence that one individual has on another as being similar to the infectivity of a virus in the sense that both have the ability to change the state of an individual. Additionally, social networks have become an important area of study for epidemiological modelers. In order to use the example below, all you need to have installed is a current version of Python (2.4+ is probably best) and the excellent Python plotting package Matplotlib in order to view output. Model Assumptions 1. 2. 3. Implementation

apt-get(8 Name apt-get - APT package handling utility - command-line interface Synopsis apt-get [options] [-o config=string] [-c=cfgfile] command [pkg] Description apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Commands Unless the -h, or --help option is given, one of the commands below must be present. update Used to re-synchronize the package index files from their sources. upgrade Used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list(5). dist-upgrade In addition to performing the function of upgrade, this option also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones, if necessary. The /etc/apt/sources.list(5) file contains a list of locations from install pkg(s)

NodeBox NodeBox is a Mac OS X open-source application for creating 2D visual output (static or animated) using Python programming language. The application targets an audience of designers, with an easy set of state commands that is both intuitive and creative. It is essentially a learning environment and an automation tool. NodeBox also allows PDF and Quicktime export, as well as importing vector files from Adobe Illustrator. NodeBox is based on DrawBot 0.9a (DrawBot is a project initiated by Just Van Rossum from LettError, a simple MacOSX application that allows you to write Python scripts that generate two-dimensional graphics). NodeBox is being developed by Frederik De Bleser (frederik@pandora.be). NodeBox is a "state machine".

piggott.me.uk » Raspberry Pi-Fi Server I’ve had my Raspberry Pi for a few weeks now, but work is keeping me busy (in a good way) so I’ve only just found time to put this together. It’s an approximate overview of the steps I took to set mine up for use as: A cheap and efficient general purpose Linux box; Specialising the above for audio streaming use, both; Playing audio from the Pi itself; andStreaming audio to the Pi from a separate Windows or Linux box (e.g. a laptop that you wish to be able to roam your house with, without being limited to laptop speakers. Essentially a poor man’s AirDAC). If you can’t use vim just substitute nano in for vim in all commands that use it. I haven’t (yet) included steps for changing the default user name and password, or for setting up SSH keys, so the recipe assumes you are running the Pi on a trusted LAN.

Python functional programming for mathematicians « mvngu This tutorial discusses some techniques of functional programming that might be of interest to mathematicians or people who use Python for scientific computation. We first start off with a brief overview of procedural and object-oriented programming, and then discuss functional programming techniques. Along the way, we briefly review Python’s built-in support for functional programming, including filter(), lambda, map() and reduce(). The tutorial concludes with some resources on detailed information on functional programming using Python. Styles of programming Python supports several styles of programming. Another common style of programming is called object-oriented programming. Functional programming using map() Functional programming is yet another style of programming in which a program is decomposed into various functions. takes a function func and one or more sequences, and apply func to elements of those sequences. Define small functions using lambda Reducing a sequence to a value

The Raspberry Pi Hobbyist Essential Python Reading List Here’s my essential Python reading list. I’ve tried to order the items so you can pause or stop reading at any point: at every stage you’ll have learned about as much possible about Python for the effort you’ve put in. The Zen of Python The Zen of Python is so short I can include it here in its entirety. >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. If this doesn’t ring true, Python isn’t for you. Python Tutorial Your next stop should be the Python tutorial. start here The latest version (by which I mean the version corresponding to the most recent stable release of Python) can be found on the web at but I recommend you find and bookmark the same page from your local Python installation: it will be available offline, pages will load fractionally quicker, and you’re sure to be reading about the version of Python you’re actually running. And with this tutorial, you’ll be running code right from the start. Python Library Reference Why?

BerryBoot v2.0 - bootloader / universal operating system installer For people short on SD cards: Berryboot is a simple boot selection screen for ARM computers like the Raspberry Pi, that allows you to put multiple Linux distributions on a single SD card. In addition it allows you to put the operating system files on an external USB hard drive instead of on the SD card itself. Download link Berryboot for the original Raspberry Pi and Pi Zero: berryboot-20160209-pi0-pi1.zip sha1sum: f8cfc1b4f57e0b6886569091ca7e277d33ffee0f Download link Berryboot for the quad-core Raspberry Pi 2 and Pi 3: berryboot-20160930-pi2-pi3.zip sha1sum: 7f44898dcca58cd4c1562273a44121c90e3543ab To install: extract the contents of the .zip file to a normal (FAT formatted) SD card, and put it in your Raspberry Pi. If your Pi is connected to the Internet BerryBoot will try to detect your location based on your IP-address, and set the right timezone automatically. on the SD card itself on an external USB stick/disk. WARNING: all existing files on the disk will be erased. HDMI CEC support

Related: