This file contains hidden or 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
| namespace CustomLogicalExpressions | |
| { | |
| public enum LogicalOperator | |
| { | |
| And, Or, Xor, Not | |
| } | |
| public abstract class LogicalExpression | |
| { | |
| public bool Evaluate(params string[] parameters) | |
| { |
This file contains hidden or 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
| LogicalExpression testCustomExp = CustomLogicalExpressionHelper.ParseXml(testP); | |
| Expression exp = LogicalExpressionHelper.ParseXml(testP); | |
| var expParams = LogicalExpressionHelper.GetParameters(exp); | |
| LambdaExpression lambda = Expression.Lambda(exp, expParams.Keys); | |
| Delegate d = lambda.Compile(); | |
| string[] parameters = new string[] {"a", "b", "d", "e" }; | |
| int numberOfTests = 100000; |
This file contains hidden or 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 numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib.widgets import Slider | |
| BUDGET_FILLING_CAP_THRESHOLD = 0.97 | |
| BUDGET_FILL_ROLLING_WINDOW = 30 | |
| def ease_in_out_sine(x): |
This file contains hidden or 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
| #!/usr/bin/osascript | |
| tell application "System Preferences" | |
| activate | |
| end tell | |
| tell application "System Events" | |
| tell process "System Preferences" | |
| activate | |
| delay 1 | |
| click menu item "Displays" of menu "View" of menu bar 1 |