Due to recent abusive intrusions into our channel, we may need to temporarily restrict participation to users who have registered accounts on Freenode. If you have received a Cannot send to channel message when attempting to talk, you can validate that you are not a malicious user and regain the ability to send messages to the channel by registering your account. Please see the link below for instructions, and don't hesitate to stop by #freenode to ask for help.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from timeit import timeit | |
from random import randint | |
class Base(object): | |
pass | |
class Derived1(Base): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Graph | |
====== | |
The :class:`Graph` widget is a widget for displaying plots. It supports | |
drawing multiple plot with different colors on the Graph. It also supports | |
axes titles, ticks, labeled ticks, grids and a log or linear representation on | |
both the x and y axis, independently. | |
To display a plot. First create a graph which will function as a "canvas" for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python_version download_count | |
3.6 17276 | |
2.7 13728 | |
null 12301 | |
3.5 5049 | |
3.4 2202 | |
3.2 306 | |
3.7 240 | |
1.17 55 | |
3.3 34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TrioPortal: | |
def __init__(self, trio_token=None): | |
if trio_token is None: | |
trio_token = _core.current_trio_token() | |
self._trio_token = trio_token | |
# This is the part that runs in the trio thread | |
def _run_cb_async(self, afn, args, task, token): | |
@_core.disable_ki_protection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import queue as stdlib_queue | |
import trio | |
class Executor(object): | |
_thread = None | |
name = 'Executor' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sdl2_test2.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <SDL2/SDL.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in the host you should have installed cuda 8, then in the host on the command line do | |
sudo apt install nvidia-modprobe | |
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb | |
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb | |
# in a seperate terminal run the nvidia server, it needs to remain running: | |
sudo nvidia-docker-plugin | |
# if you got a port already running error or similar, it's already running in the background so you can continue | |
# Back in the main terminal test nvidia-smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import environ | |
environ['KIVY_CLOCK'] = 'interrupt' | |
environ['SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS'] = '0' | |
from time import clock | |
from kivy.uix.label import Label | |
from kivy.app import App | |
from kivy.clock import Clock | |
from kivy.core.window import Window | |
from kivy.graphics import Color, Point, Fbo, Rectangle |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO]: Will compile for the following archs: armeabi-v7a | |
[INFO]: Found Android API target in $ANDROIDAPI | |
[INFO]: Available Android APIs are (22, 23, 25) | |
[INFO]: Requested API target 22 is available, continuing. | |
[INFO]: Found NDK dir in $ANDROIDNDK | |
[INFO]: Got NDK version from $ANDROIDNDKVER | |
[INFO]: Using Google NDK r13b | |
[INFO]: Found virtualenv at E:\Python\Python27-x64\Scripts\virtualenv.exe | |
[INFO]: Found the following toolchain versions: ['4.9'] | |
[INFO]: Picking the latest gcc toolchain, here 4.9 |