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 ChgEnv.py %1 | |
call Temp.bat |
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 __init__ (self): | |
wx.Frame.__init__ (self, None, -1, self.Title) | |
if "<TABLE>": | |
self.Hs = wx.BoxSizer (wx.VERTICAL) | |
if "<TR>": | |
self.St = wx.StaticText(self, label="Your name :", pos=(20,60)) |
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 sys | |
import os | |
from cx_Freeze import setup, Executable | |
Exe1 = Executable ( | |
script=r"MyApp\MyApp.py", | |
base=None, | |
appendScriptToExe = True, | |
appendScriptToLibrary = False, | |
) |
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
# | |
# Peak balls from a bin (Sampling wihtout Replacement) | |
# | |
import math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# | |
# n Choice r |
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
# | |
# Use random numbers to emulates the Sampling with Replacement. | |
# | |
# We can specify the number of balls in the bin with 40% red balls and 60% green balls. | |
# We select 10 balls from the bin and calculate the probability of the red | |
# balls in the samples. | |
# | |
import random |
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
# | |
# Draw the Hoeffding's Inequality with different epsilons, 0.1, 0.3, 0.5, and 1. | |
# | |
from scipy import signal | |
import numpy as np | |
import math | |
def hoeffding (x, epsilon): | |
y = 2.0 * math.exp (-2*epsilon*epsilon*x) |
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
# | |
# Draw the Hoeffding's Inequality with the epsilons = 0.3 and the probability. | |
# | |
from scipy import signal | |
import numpy as np | |
import math | |
def hoeffding (x, epsilon): | |
y = 2.0 * math.exp (-2*epsilon*epsilon*x) |
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
# | |
# Initially infer Hoeffding's Inequality. | |
# | |
from scipy import signal | |
import numpy as np | |
import math | |
import pandas as pd | |
import matplotlib.pyplot as plt |