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
// 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
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
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
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
''' | |
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
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
''' | |
FileChooser | |
=========== | |
The FileChooser module provides various classes for describing, displaying and | |
browsing file systems. | |
Simple widgets | |
-------------- |
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 FileChooserProgress(FileChooserProgressBase): | |
@KV() | |
def apply_kv(self): | |
with KVCtx(): | |
self.pos_hint = {'x': 0, 'y': 0} | |
with self.canvas: | |
Factory.Color(rgba=(0, 0, 0, .8)) | |
rect = Factory.Rectangle() | |
rect.pos ^= self.pos |
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 FileChooserProgress(FileChooserProgressBase): | |
@KV() | |
def apply_kv(self): | |
with KVCtx(): | |
self.pos_hint = {'x': 0, 'y': 0} | |
with self.canvas: | |
Factory.Color(rgba=(0, 0, 0, .8)) | |
rect = Factory.Rectangle() | |
rect.pos ^= self.pos |