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
def plot(titl,xvals,yvals,xl,yl,pxw=720,pxh=450,dpi=80,xts=4,yts=1,inv=False): | |
from matplotlib import pyplot as plt; import matplotlib as mpl; | |
plt.style.use('seaborn-bright'); | |
fig = plt.figure(figsize=(pxw/dpi, pxh/dpi), dpi=dpi, facecolor='w') | |
fig.subplots_adjust(left=.08, bottom=.1, right=.95, top=.92) | |
ax = fig.add_subplot(111); ax.minorticks_on() | |
ax.get_xaxis().set_minor_locator(mpl.ticker.AutoMinorLocator(xts)) | |
ax.get_yaxis().set_minor_locator(mpl.ticker.AutoMinorLocator(yts)) | |
ax.grid(b=True, which='minor',alpha=0.07,linestyle='-') | |
ax.grid(b=True, which='major',alpha=0.21,linestyle='-') |
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
using AtomicEngine; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Application.Run<HelloQuadWithUI>(args); | |
} | |
} |
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
using AtomicEngine; | |
public class GameRoot : AppDelegate | |
{ | |
public override void Start() | |
{ | |
// We will be needing to load resources. | |
// All the resources used in this example comes with Urho3D. | |
// If the engine can't find them, check the ResourcePrefixPath. | |
var cache = GetSubsystem<ResourceCache>(); |
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
using System; | |
using AtomicEngine; | |
//################ Render.xml | |
//<renderpath> | |
// <command type="sendevent"/> | |
//</renderpath> | |
public class Program | |
{ |
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
using System; | |
using AtomicEngine; | |
public class GameRoot : AppDelegate | |
{ | |
private Texture2D sprite; | |
public override void Start() | |
{ | |
var graphics = AtomicNET.GetSubsystem<Graphics>(); |
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
(((1 << i) & checkMask) | ((1 << next) & checkMask)) != ((1 << i) | (1 << next)) | |
((1 << i) & checkMask) != 0 && ((1 << next) & checkMask) == 0 || ((1 << i) & checkMask) == 0 && ((1 << next) & checkMask) != 0 |
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 kivy.app import App | |
from kivy.app import Builder | |
from kivy.uix.stacklayout import StackLayout | |
from kivy.uix.label import Label | |
from kivy.uix.button import Button | |
from kivy.properties import NumericProperty | |
Builder.load_string(""" |
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 kivy.app import App | |
from kivy.app import Builder | |
from kivy.uix.stacklayout import StackLayout | |
from kivy.uix.button import Button | |
Builder.load_string(""" | |
#:set RED (1, 0, 0, 1) | |
#:set GREEN (0, 1, 0, 1) | |
#:set BLUE (0, 0, 1, 1) |
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 kivy.app import App | |
from kivy.app import Builder | |
from kivy.uix.stacklayout import StackLayout | |
from kivy.uix.textinput import TextInput | |
Builder.load_string(""" | |
<MyTextInput>: | |
size_hint: 1, None | |
font_size: 40 |
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
1000 iterations, 10000 samples | |
BitFields Style Pack: 00:00:00.0919455 | |
BitFields Style Unpack: 00:00:00.3154235 | |
BitConverter Pack: 00:00:00.0764927 | |
BitConverter Unpack: 00:00:00.2149990 | |
Direct Packing: 00:00:00.0325352 | |
Direct Unpacking: 00:00:00.2034563 | |
Direct Unpacking Unsafe:00:00:00.2150088 | |
Access and Cast: 00:00:00.0308669 | |
Access and Cast Back: 00:00:00.2004328 |