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 os | |
from PIL import Image | |
def set_watermark(photo, watermark): | |
photo_size = photo.size | |
watermark_size = watermark.size | |
print(watermark_size) | |
location = (0, int(photo_size[1]/1.3)) | |
b = int(photo_size[1] / 10) |
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
def rev(word): | |
out = "" | |
chars = [xx for xx in word] | |
for char in chars: | |
out = char + out | |
return out | |
if __name__=='__main__': |
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
# need mvtnorm package | |
library("mvtnorm") | |
range = seq(-5,5,0.1) | |
mean = c(0,0) | |
Sigma = matrix(c(1, .5, .5, 1), 2) | |
out = matrix (rep(0,101*101),101) | |
for (i in 1:length(range)){ | |
for (j in 1:length(range)){ | |
out[i,j] = dmvnorm(c(range[i],range[j]),mean=mean,sigma=Sigma) |
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
\begin{flalign*} | |
(\lambda+\gamma)^2 &= (a + b)^2&\\ | |
&= a^2 + b^2 + ab&\\ | |
&= a^2 + c^2& | |
\end{flalign*} |
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
\begin{flalign*} | |
\lambda^2 &= (a + b)^2 & | |
\end{flalign*} |
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
\usepackage{amsmath} |
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
MCEstimator <- function(n = 10000){ | |
#circ counts number of samples which are in the circle! | |
circ=0 | |
for (i in c(1:n)){ | |
x=runif(1,-1,1) |
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
#include<stdio.h> | |
#include<conio.h> | |
#include<stdlib.h> | |
//count_data(); | |
void main() | |
{ | |
// calling function | |
count_data(); |