R script to accompany blogpost
http://deevybee.blogspot.co.uk/2013/06/interpreting-unexpected-significant.html
Generates random normal numbers to simulate ERP data. Used to demonstrate how false positive rate depends on N factors in ANOVA.
Simulation of how funding formula for UK universities creates disparities between institutions over time. See blogpost The Matthew Effect and REF2014 on http://deevybee.blogspot.co.uk/.
Simplifying code monster to elegant in n 5 stepstutec
In this workshop we'll learn how to transform complex, highly coupled code into a simpler, more readable and maintainable shape. We'll target known software anomalies with Refactoring Patterns, following steps with a confined scope, assuring that we stay distant from "changed everything" commits while achieving quick design improvements.
We'll talk different solutions for Fat Models, God Objects, long method chains, NoMethodError on nils, long methods, bad naming and cold coffee.
Slides presented in RailsConf 2014.
Simulation of how funding formula for UK universities creates disparities between institutions over time. See blogpost The Matthew Effect and REF2014 on http://deevybee.blogspot.co.uk/.
Simplifying code monster to elegant in n 5 stepstutec
In this workshop we'll learn how to transform complex, highly coupled code into a simpler, more readable and maintainable shape. We'll target known software anomalies with Refactoring Patterns, following steps with a confined scope, assuring that we stay distant from "changed everything" commits while achieving quick design improvements.
We'll talk different solutions for Fat Models, God Objects, long method chains, NoMethodError on nils, long methods, bad naming and cold coffee.
Slides presented in RailsConf 2014.
tibbles are an alternative for dataframes. You will learn how tibbles are different from dataframes, why you should use them, how to create and modify them.
Maze Solver - Rubric.xlsx
Sheet1Maze Solver - RubricStudent Name:For each evaluation criteria, fill out the deserved number of marks (out of the total shown) :DescriptionSelf assessmentmarks out ofTeacher evaluationload_maze functionthe function returns two-dimentional list1the returned list is exact representation of the input file - each character is an element 1the 'new line' characters are not included in the returned list1the function does not alter the input file1pick_random_location functionthe function returns a tuple of two integer numbers - column and row1the chosen location falls inside the maze1the chosen location is an empty alley spot1print_maze functionthe function prints arbitrary 2D array of single characters1the elements from each nested list are agregated into a string1strings are printed on separate lines, one after another, no spacing between them1find_path RECURSIVE functionthe base cases are propely defined3the function returns result when a base cases is encountered2the function marks current location with a '+' sign, as part of the path 1the function calls itself recursively for all surrounding cells4the function unmarks current location as part of the path if there is no path via any of the surrounding cells1Application of conceptsthe program visualizes the process of solving the maze by drawing it at each step3the program uses properly two-dimensional list2the program converts efficiently string to list and vice versa2Overallfunctionality4program appearance (header/comments/docstrings/names/spacing)4TOTAL0360Comments:
Sheet2
Sheet3
maze_generator (1).py
#########################################
# Programmer: Nathan Moore
# Adaptation: Mr.G
# File Name: maze_generator.py
# Description: This program generates a maze of arbitrary size and saves it in a file.
# Source:
# http://natewm.com/blog/2012/01/python-recursive-maze-example/
#########################################
import random
def makeMaze(width, height): # maze dimensions are doubled, to include the walls
maze = [[0 for j in xrange(width*2)] for i in xrange(height*2)]
recurseMaze(maze, (width / 2) * 2, (height / 2) * 2, 0, 0)
return maze # begin recursion starting in the center
def recurseMaze(maze, x, y, dirx, diry):
if not 0 <= y < len(maze) or not 0 <= x < len(maze[0]) or maze[y][x] != 0:
return # base case: returns if reaches the borders
# or if current location is not a wall
maze[y-diry][x-dirx] = 1 #
maze[y][x] = 1 # mark current location and the previous one as alley
directions = [(1,0), (-1,0), (0,1), (0,-1)]
random.shuffle(directions)
for dx, dy in directions: # recurse in the four directions
recurseMaze(maze, x + dx * 2, y + dy * 2, dx, dy)
def mazeString(maze, chars): # converts zeroes to walls and ones to alleys
...
I am Fabian H. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold a Masters in Programming, Deakin University, Australia. I have been helping students with their homework for the past 8 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
#Covnet model had been defined class ConvNetNew(torch.nn.Module).pdfcomputersmartdwarka
#Covnet model had been defined
class ConvNetNew(torch.nn.Module):
def __init__(self):
super(ConvNetNew, self).__init__()
#############################################################################
#
# TODO: Complete the network #Note: similar as Task 1
#############################################################################
#
# Block 1: 3 x 175 x 300 --> 32 x 87 x 150
self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3, padding=1)
self.bn1 = nn.BatchNorm2d(32)
self.relu1 = nn.ReLU()
self.maxpool1 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 2: 32 x 87 x 150 --> 64 x 43 x 75
self.conv2 = nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3, padding=1)
self.bn2 = nn.BatchNorm2d(64)
self.relu2 = nn.ReLU()
self.maxpool2 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 3: 64 x 43 x 75 --> 128 x 21 x 37
self.conv3 = nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3, padding=1)
self.bn3 = nn.BatchNorm2d(128)
self.relu3 = nn.ReLU()
self.maxpool3 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 4: 128 x 21 x 37 --> 256 x 10 x 18
self.conv4 = nn.Conv2d(in_channels=128, out_channels=256, kernel_size=3, padding=1)
self.bn4 = nn.BatchNorm2d(256)
self.relu4 = nn.ReLU()
self.maxpool4 = nn.MaxPool2d(kernel_size=2, stride=2)
#### [3%] ####
# AdaptiveAvgPool: 1 x 1
self.avgpool = nn.AdaptiveAvgPool1d(1)
# Linear layers: 256 x 1 x 1 --> 128
self.fc1 = nn.Linear(256 * 1 * 1, 128)
# Dropout
self.dropout = nn.Dropout(0.5)
#############################################################################
#
# END OF YOUR CODE #
#############################################################################
#
def forward(self, x):
#############################################################################
#
# TODO: implement the fordward #Note: similar as Task 1
#############################################################################
#
# Block 1: 3 x 175 x 300 --> 32 x 87 x 150
x = self.conv1(x)
x = self.bn1(x)
x = self.relu1(x)
x = self.maxpool1(x)
# Block 2: 32 x 87 x 150 --> 64 x 43 x 75
x = self.conv2(x)
x = self.bn2(x)
x = self.relu2(x)
x = self.maxpool2(x)
# Block 3: 64 x 43 x 75 --> 128 x 21 x 37
x = self.conv3(x)
x = self.bn3(x)
x = self.relu3(x)
x = self.maxpool3(x)
# Block 4: 128 x 21 x 37 --> 256 x 10 x 18
x = self.conv4(x)
x = self.bn4(x)
x = self.relu4(x)
x = self.maxpool4(x)
#### [3%] ####
# AdaptiveAvgPool:
self.avgpool = nn.AdaptiveAvgPool1d(1)
# Flatten the output for the linear layers
x = x.view(x.size(0), -1)
# Linear layers: 256 x 1 x 1 --> 256
x = self.fc1(x)
x = self.relu1(x)
x = self.dropout(x)
#############################################################################
#
# END OF YOUR CODE #
#############################################################################
#
return x
#With the defined convolution layers (ConvNetNew()), the whole contrastive learning
framework could be constructed. The encoder_q and encoder_k have the same convolutional
layers. However, the encoder_k will not be optimized by the.
Are you worried about your Python Homework? Are you afraid of your deadline lurking near? Leave your tensions and worries behind. Just Contact www.pythonhomeworkhelp.com Experts. With more than 90% of success rate, they are one of the reliable Python homework Help Experts. You can’t ignore them if you want good grades for your homework. You can also contact the anytime as they are available 24 x 7 in live chat.
Simply Business is starting to look into new tools to improve some of our mission-critical systems. There is one application, which would hugely benefit from the concurrency and fault tolerance model offered by languages like Elixir.
To increase awareness and gauge interest in the technology, we will have a bootcamp dedicated to giving us more insights into how to build and architect applications using Elixir and OTP.
It is meant to aim for slightly more advanced concepts, so in order to prepare rest of the team to be able to read the code and have some basic understanding of constructs and tooling - we have organised a LevelUP session, to talk exactly about that...
tibbles are an alternative for dataframes. You will learn how tibbles are different from dataframes, why you should use them, how to create and modify them.
Maze Solver - Rubric.xlsx
Sheet1Maze Solver - RubricStudent Name:For each evaluation criteria, fill out the deserved number of marks (out of the total shown) :DescriptionSelf assessmentmarks out ofTeacher evaluationload_maze functionthe function returns two-dimentional list1the returned list is exact representation of the input file - each character is an element 1the 'new line' characters are not included in the returned list1the function does not alter the input file1pick_random_location functionthe function returns a tuple of two integer numbers - column and row1the chosen location falls inside the maze1the chosen location is an empty alley spot1print_maze functionthe function prints arbitrary 2D array of single characters1the elements from each nested list are agregated into a string1strings are printed on separate lines, one after another, no spacing between them1find_path RECURSIVE functionthe base cases are propely defined3the function returns result when a base cases is encountered2the function marks current location with a '+' sign, as part of the path 1the function calls itself recursively for all surrounding cells4the function unmarks current location as part of the path if there is no path via any of the surrounding cells1Application of conceptsthe program visualizes the process of solving the maze by drawing it at each step3the program uses properly two-dimensional list2the program converts efficiently string to list and vice versa2Overallfunctionality4program appearance (header/comments/docstrings/names/spacing)4TOTAL0360Comments:
Sheet2
Sheet3
maze_generator (1).py
#########################################
# Programmer: Nathan Moore
# Adaptation: Mr.G
# File Name: maze_generator.py
# Description: This program generates a maze of arbitrary size and saves it in a file.
# Source:
# http://natewm.com/blog/2012/01/python-recursive-maze-example/
#########################################
import random
def makeMaze(width, height): # maze dimensions are doubled, to include the walls
maze = [[0 for j in xrange(width*2)] for i in xrange(height*2)]
recurseMaze(maze, (width / 2) * 2, (height / 2) * 2, 0, 0)
return maze # begin recursion starting in the center
def recurseMaze(maze, x, y, dirx, diry):
if not 0 <= y < len(maze) or not 0 <= x < len(maze[0]) or maze[y][x] != 0:
return # base case: returns if reaches the borders
# or if current location is not a wall
maze[y-diry][x-dirx] = 1 #
maze[y][x] = 1 # mark current location and the previous one as alley
directions = [(1,0), (-1,0), (0,1), (0,-1)]
random.shuffle(directions)
for dx, dy in directions: # recurse in the four directions
recurseMaze(maze, x + dx * 2, y + dy * 2, dx, dy)
def mazeString(maze, chars): # converts zeroes to walls and ones to alleys
...
I am Fabian H. I am a Computer Science Assignment Help Expert at programminghomeworkhelp.com. I hold a Masters in Programming, Deakin University, Australia. I have been helping students with their homework for the past 8 years. I solve assignments related to Computer Science.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Computer Science assignments.
#Covnet model had been defined class ConvNetNew(torch.nn.Module).pdfcomputersmartdwarka
#Covnet model had been defined
class ConvNetNew(torch.nn.Module):
def __init__(self):
super(ConvNetNew, self).__init__()
#############################################################################
#
# TODO: Complete the network #Note: similar as Task 1
#############################################################################
#
# Block 1: 3 x 175 x 300 --> 32 x 87 x 150
self.conv1 = nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3, padding=1)
self.bn1 = nn.BatchNorm2d(32)
self.relu1 = nn.ReLU()
self.maxpool1 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 2: 32 x 87 x 150 --> 64 x 43 x 75
self.conv2 = nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3, padding=1)
self.bn2 = nn.BatchNorm2d(64)
self.relu2 = nn.ReLU()
self.maxpool2 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 3: 64 x 43 x 75 --> 128 x 21 x 37
self.conv3 = nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3, padding=1)
self.bn3 = nn.BatchNorm2d(128)
self.relu3 = nn.ReLU()
self.maxpool3 = nn.MaxPool2d(kernel_size=2, stride=2)
# Block 4: 128 x 21 x 37 --> 256 x 10 x 18
self.conv4 = nn.Conv2d(in_channels=128, out_channels=256, kernel_size=3, padding=1)
self.bn4 = nn.BatchNorm2d(256)
self.relu4 = nn.ReLU()
self.maxpool4 = nn.MaxPool2d(kernel_size=2, stride=2)
#### [3%] ####
# AdaptiveAvgPool: 1 x 1
self.avgpool = nn.AdaptiveAvgPool1d(1)
# Linear layers: 256 x 1 x 1 --> 128
self.fc1 = nn.Linear(256 * 1 * 1, 128)
# Dropout
self.dropout = nn.Dropout(0.5)
#############################################################################
#
# END OF YOUR CODE #
#############################################################################
#
def forward(self, x):
#############################################################################
#
# TODO: implement the fordward #Note: similar as Task 1
#############################################################################
#
# Block 1: 3 x 175 x 300 --> 32 x 87 x 150
x = self.conv1(x)
x = self.bn1(x)
x = self.relu1(x)
x = self.maxpool1(x)
# Block 2: 32 x 87 x 150 --> 64 x 43 x 75
x = self.conv2(x)
x = self.bn2(x)
x = self.relu2(x)
x = self.maxpool2(x)
# Block 3: 64 x 43 x 75 --> 128 x 21 x 37
x = self.conv3(x)
x = self.bn3(x)
x = self.relu3(x)
x = self.maxpool3(x)
# Block 4: 128 x 21 x 37 --> 256 x 10 x 18
x = self.conv4(x)
x = self.bn4(x)
x = self.relu4(x)
x = self.maxpool4(x)
#### [3%] ####
# AdaptiveAvgPool:
self.avgpool = nn.AdaptiveAvgPool1d(1)
# Flatten the output for the linear layers
x = x.view(x.size(0), -1)
# Linear layers: 256 x 1 x 1 --> 256
x = self.fc1(x)
x = self.relu1(x)
x = self.dropout(x)
#############################################################################
#
# END OF YOUR CODE #
#############################################################################
#
return x
#With the defined convolution layers (ConvNetNew()), the whole contrastive learning
framework could be constructed. The encoder_q and encoder_k have the same convolutional
layers. However, the encoder_k will not be optimized by the.
Are you worried about your Python Homework? Are you afraid of your deadline lurking near? Leave your tensions and worries behind. Just Contact www.pythonhomeworkhelp.com Experts. With more than 90% of success rate, they are one of the reliable Python homework Help Experts. You can’t ignore them if you want good grades for your homework. You can also contact the anytime as they are available 24 x 7 in live chat.
Simply Business is starting to look into new tools to improve some of our mission-critical systems. There is one application, which would hugely benefit from the concurrency and fault tolerance model offered by languages like Elixir.
To increase awareness and gauge interest in the technology, we will have a bootcamp dedicated to giving us more insights into how to build and architect applications using Elixir and OTP.
It is meant to aim for slightly more advanced concepts, so in order to prepare rest of the team to be able to read the code and have some basic understanding of constructs and tooling - we have organised a LevelUP session, to talk exactly about that...
you need to complete the r code and a singlepage document c.pdfadnankhan605720
you need to complete the r code and a single-page document containing two figures, report the
parameters you estimate and discuss how well your power law fits the network data, and explain
the finding.
Question: images
incomplete r code:
# IDS 564 - Spring 2023
# Lab 4 R Code - Estimating the Degree Exponent of a Scale-free Network
#=========================================================================
=====================
# 0. INITIATION
==========================================================================
=
#=========================================================================
=====================
## You'll need VGAM for the zeta function
# install.packages("VGAM") ## When prompted to install from binary version, select no
library(VGAM)
## You'll need this when calculating goodness of fit
# install.packages("parallel")
library(parallel)
library(ggplot2)
library(ggthemes)
library(dplyr)
library(tidyr)
##------------------------------------------------------------------------------
## This function will calculate the zeta function for you. You don't need to worry about it! Run it
and continue.
## gen_zeta(gamma , shift) will give you a number
gen_zeta <- function (gamma, shift = 1, deriv = 0)
{
deriv.arg <- deriv
rm(deriv)
if (!is.Numeric(deriv.arg, length.arg = 1, integer.valued = TRUE))
stop("'deriv' must be a single non-negative integer")
if (deriv.arg < 0 || deriv.arg > 2)
stop("'deriv' must be 0, 1, or 2")
if (deriv.arg > 0)
return(zeta.specials(Zeta.derivative(gamma, deriv.arg = deriv.arg,
shift = shift), gamma, deriv.arg, shift))
if (any(special <- Re(gamma) <= 1)) {
ans <- gamma
ans[special] <- Inf
special3 <- Re(gamma) < 1
ans[special3] <- NA
special4 <- (0 < Re(gamma)) & (Re(gamma) < 1) & (Im(gamma) == 0)
# ans[special4] <- Zeta.derivative(gamma[special4], deriv.arg = deriv.arg, shift = shift)
special2 <- Re(gamma) < 0
if (any(special2)) {
gamma2 <- gamma[special2]
cgamma <- 1 - gamma2
ans[special2] <- 2^(gamma2) * pi^(gamma2 - 1) * sin(pi *
gamma2/2) * gamma(cgamma) * Recall(cgamma)
}
if (any(!special)) {
ans[!special] <- Recall(gamma[!special])
}
return(zeta.specials(ans, gamma, deriv.arg, shift))
}
aa <- 12
ans <- 0
for (ii in 0:(aa - 1)) ans <- ans + 1/(shift + ii)^gamma
ans <- ans + Zeta.aux(shape = gamma, aa, shift = shift)
ans[shift <= 0] <- NaN
zeta.specials(ans, gamma, deriv.arg = deriv.arg, shift = shift)
}
## example:
gen_zeta(2.1, 4)
##------------------------------------------------------------------------------
## The P_k (the CDF)
P_k = function(gamma, k, k_sat){
### fill the function
return(1 - ( gen_zeta(gamma, k) / ... ))
}
##------------------------------------------------------------------------------
my_theme <- theme_classic() +
theme(legend.position = "bottom", legend.box = "horizontal", legend.direction = "horizontal",
title = element_text(size = 18), axis.title = element_text(size = 14),
axis.text.y = element_text(size = 16), axis.text.x = element_text(size = 16),
strip.text = element_text(size.
Just Click on Below Link to Download This Course:
https://www.devrycoursehelp.com/product/devry-gsp-115-week-3-assignment-latest/
DeVry GSP 115 Week 3 Assignment latest
Week 3: Loops and Branching
Instructions
Complete the following assignments. Copy and paste your finished code into a Word document, clearly identifying which assignment it is. Also, capture the output of the program and paste that into the Word document. If there are questions to be answered, put the answers after the output. When you complete all three of this week’s assignments, save the document as yourLastName_GSP115_W3_Assignments.docx.Submit it to the Week 3 assignment Dropbox.
#In this project you will write a program play TicTacToe #using tw.pdfaquacareser
#In this project you will write a program play TicTacToe
#using two players (labels 0,1) or one play (label 0) playing with the machine (label 1).
#The TicTacToe board has 9 integers board = [1,2,3,4,5,6,7,8,9]. The following
# are the modules for the program
#
#def reset() resets the board to the original values
# board = [1,2,3,4,5,6,7,8,9]
#
#def printBoard() print the current state of the board using the format
#
#The current TicTacToe Board
# | 1 | 2 | 3 |
# | 4 | 5 | 6 |
# | 7 | O | 9 |
#
#The current TicTacToe Board
# | X | 2 | 3 |
# | 4 | 5 | 6 |
# | 7 | O | 9 |
#Note from the above that player 0 and 1 have played numbers 8 and 1
#respectively and the board display O for player 0 and X from player 1
#
#def changeBoard(num1, player) using the chosen box number to change
#the value of the box to 0 or -1 depending on whether the player is 0 or 1,
#respectively.
#
#def play(player) prints the player number (0 or 1) and prompts the player
# to enter a box value that have not changed to \'O\' or \'X\'
#
#def checkRows(value) checks to see which of the rows of the board
# has the same value and returns True, otherwise, returns False
#
#def checkCols(value) checks to see which of the cols of the board
# has the same value and returns True, otherwise, returns False
#
#def checkDiagonal(value) checks to see which of the diagonals of the board
# has the same value and returns True, otherwise, returns False
#
#def win(player) checks if a player wins the game, returns True of the player wins
# and False otherwise
#
#def machinePlay(player) plays the role of the player using random number.
# this function generates numbers in the interval [1,9] and uses the first
# generated random number that has not been used to play the game. The
#
#def ticTacToe(numPlayers) accepts the number of players and simulates the
#ticTapToe, asking players to enter unused box numbers.
#
#def main() is the driver module that accepts the number of players from the user
# and calls the ticTacToe module
#Assignment: Complete the follwoing modules:
#checkCols
#checkRows
#checkDiagonal
#win
#Sample of the output is
#
#Project
#This game can be played by one or two players
#Enter the number of players, 1/2 for one/two players: 1
#
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | 8 | 9 |
#Player 0 Enter a box value: 9
#
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | 8 | O |
#Player 1 ***Computer*** playing
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 0 Enter a box value: 1
#
#The current TicTapToe Board
#| O | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 1 ***Computer*** playing
#
#The current TicTapToe Board
#| O | X | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 0 Enter a box value: 5
#
#The current TicTapToe Board
#| O | X | 3 |
#| 4 | O | 6 |
#| 7 | X | O |
#Player 0 Wins
#Do you want to quit?
#Begin Program
#import random number generator
#from random library
#from random import randint, seed
#Global va.
#In this project you will write a program play TicTacToe #using tw.pdfaquapariwar
#In this project you will write a program play TicTacToe
#using two players (labels 0,1) or one play (label 0) playing with the machine (label 1).
#The TicTacToe board has 9 integers board = [1,2,3,4,5,6,7,8,9]. The following
# are the modules for the program
#
#def reset() resets the board to the original values
# board = [1,2,3,4,5,6,7,8,9]
#
#def printBoard() print the current state of the board using the format
#
#The current TicTacToe Board
# | 1 | 2 | 3 |
# | 4 | 5 | 6 |
# | 7 | O | 9 |
#
#The current TicTacToe Board
# | X | 2 | 3 |
# | 4 | 5 | 6 |
# | 7 | O | 9 |
#Note from the above that player 0 and 1 have played numbers 8 and 1
#respectively and the board display O for player 0 and X from player 1
#
#def changeBoard(num1, player) using the chosen box number to change
#the value of the box to 0 or -1 depending on whether the player is 0 or 1,
#respectively.
#
#def play(player) prints the player number (0 or 1) and prompts the player
# to enter a box value that have not changed to \'O\' or \'X\'
#
#def checkRows(value) checks to see which of the rows of the board
# has the same value and returns True, otherwise, returns False
#
#def checkCols(value) checks to see which of the cols of the board
# has the same value and returns True, otherwise, returns False
#
#def checkDiagonal(value) checks to see which of the diagonals of the board
# has the same value and returns True, otherwise, returns False
#
#def win(player) checks if a player wins the game, returns True of the player wins
# and False otherwise
#
#def machinePlay(player) plays the role of the player using random number.
# this function generates numbers in the interval [1,9] and uses the first
# generated random number that has not been used to play the game. The
#
#def ticTacToe(numPlayers) accepts the number of players and simulates the
#ticTapToe, asking players to enter unused box numbers.
#
#def main() is the driver module that accepts the number of players from the user
# and calls the ticTacToe module
#Assignment: Complete the follwoing modules:
#checkCols
#checkRows
#checkDiagonal
#win
#Sample of the output is
#
#Project
#This game can be played by one or two players
#Enter the number of players, 1/2 for one/two players: 1
#
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | 8 | 9 |
#Player 0 Enter a box value: 9
#
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | 8 | O |
#Player 1 ***Computer*** playing
#The current TicTapToe Board
#| 1 | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 0 Enter a box value: 1
#
#The current TicTapToe Board
#| O | 2 | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 1 ***Computer*** playing
#
#The current TicTapToe Board
#| O | X | 3 |
#| 4 | 5 | 6 |
#| 7 | X | O |
#Player 0 Enter a box value: 5
#
#The current TicTapToe Board
#| O | X | 3 |
#| 4 | O | 6 |
#| 7 | X | O |
#Player 0 Wins
#Do you want to quit?
#Begin Program
#import random number generator
#from random library
#from random import randint, seed
#Global va.
R is a very flexible and powerful programming language, as well as a.pdfannikasarees
R is a very flexible and powerful programming language, as well as a package that is written
using that language (and others like C). The following program demonstrates many of its basic
features. You can cut and paste it into R, or download the file that includes it from here. If you
run it line by line, many of its features will become clear. Both editions of R for SAS and SPSS
Users and R for Stata Users work through a version of this program line-by-line, showing the
output and explaining what R is doing.
# Filename: ProgrammingBasics.R
# ---Simple Calculations---
2 + 3
x <- 2
y <- 3
x + y
x * y
# ---Data Structures---
# Vectors
workshop <- c(1, 2, 1, 2, 1, 2, 1, 2)
print(workshop)
workshop
gender <- c(\"f\", \"f\", \"f\", NA, \"m\", \"m\", \"m\", \"m\")
q1 <- c(1, 2, 2, 3, 4, 5, 5, 4)
q2 <- c(1, 1, 2, 1, 5, 4, 3, 5)
q3 <- c(5, 4, 4,NA, 2, 5, 4, 5)
q4 <- c(1, 1, 3, 3, 4, 5, 4, 5)
# Selecting Elements of Vectors
q1[5]
q1[ c(5, 6, 7, 8) ]
q1[5:8]
q1[gender == \"m\"]
mean( q1[ gender == \"m\" ], na.rm = TRUE)
# ---Factors---
# Numeric Factors
# First, as a vector
workshop <- c(1, 2, 1, 2, 1, 2, 1, 2)
workshop
table(workshop)
mean(workshop)
gender[workshop == 2]
# Now as a factor
workshop <- c(1, 2, 1, 2, 1, 2, 1, 2)
workshop <- factor(workshop)
workshop
table(workshop)
mean(workshop) #generates error now.
gender[workshop == 2]
gender[workshop == \"2\"]
# Recreate workshop, making it a factor
# including levels that don\'t yet exist.
workshop <- c(1, 2, 1, 2, 1, 2, 1, 2)
workshop <- factor(
workshop,
levels = c( 1, 2, 3, 4),
labels = c(\"R\", \"SAS\", \"SPSS\", \"Stata\")
)
# Recreate it with just the levels it
# curently has.
workshop <- c(1, 2, 1, 2, 1, 2, 1, 2)
workshop <- factor(
workshop,
levels = c( 1, 2),
labels = c(\"R\",\"SAS\")
)
workshop
table(workshop)
gender[workshop == 2]
gender[workshop == \"2\"]
gender[workshop == \"SAS\"]
# Character factors
gender <- c(\"f\", \"f\", \"f\", NA, \"m\", \"m\", \"m\", \"m\")
gender <- factor(
gender,
levels = c(\"m\", \"f\"),
labels = c(\"Male\", \"Female\")
)
gender
table(gender)
workshop[gender == \"m\"]
workshop[gender == \"Male\"]
# Recreate gender and make it a factor,
# keeping simpler m and f as labels.
gender <- c(\"f\", \"f\", \"f\", NA, \"m\", \"m\", \"m\", \"m\")
gender <- factor(gender)
gender
# Data Frames
mydata <- data.frame(workshop, gender, q1, q2, q3, q4)
mydata
names(mydata)
row.names(mydata)
# Selecting components by index number
mydata[8, 6] #8th obs, 6th var
mydata[ , 6] #All obs, 6th var
mydata[ , 6][5:8] #6th var, obs 5:8
# Selecting components by name
mydata$q1
mydata$q1[5:8]
# Example renaming gender to sex while
# creating a data frame (left as a comment)
#
# mydata <- data.frame(workshop, sex = gender,
# q1, q2, q3, q4)
# Matrices
# Creating from vectors
mymatrix <- cbind(q1, q2, q3, q4)
mymatrix
dim(mymatrix)
# Creating from matrix function
# left as a comment so we keep
# version with names q1, q2...
#
# mymatrix <- matrix(
# c(1, 1, 5, 1,
# 2, 1, 4, 1,
# 2, 2, 4, 3.
Open Research Practices in the Age of a Papermill PandemicDorothy Bishop
Talk given to Open Research Group, Maynooth University, October 2022.
Describes the phenomenon of large-scale fraudulent science publishing (papermills), and discusses how open science practices can help tackle this.
Language-impaired preschoolers: A follow-up into adolescence.Dorothy Bishop
Stothard, S. E., Snowling, M. J., Bishop, D. V., Chipchase, B. B., & Kaplan, C. A. (1998). Language-impaired preschoolers: A follow-up into adolescence. Journal of Speech, Language, and Hearing Research: JSLHR, 41(2), 407–418. https://doi.org/10.1044/jslhr.4102.407
ABSTRACT: This paper reports a longitudinal follow-up of 71 adolescents with a preschool history of speech-language impairment, originally studied by Bishop and Edmundson (1987). These children had been subdivided at 4 years into those with nonverbal IQ 2 SD below the mean (General Delay group), and those with normal nonverbal intelligence (SLI group). At age 5;6 the SLI group was subdivided into those whose language problems had resolved, and those with persistent SLI. The General Delay group was also followed up. At age 15-16 years, these children were compared with age-matched normal-language controls on a battery of tests of spoken language and literacy skills. Children whose language problems had resolved did not differ from controls on tests of vocabulary and language comprehension skills. However, they performed significantly less well on tests of phonological processing and literacy skill. Children who still had significant language difficulties at 5;6 had significant impairments in all aspects of spoken and written language functioning, as did children classified as having a general delay. These children fell further and further behind their peer group in vocabulary growth over time.
Otitis media with effusion: an illustration of ascertainment biasDorothy Bishop
Otitis media with effusion (OME) provides an example of how ascertainment bias can induce spurious correlations. Early work suggested it impacted children's language, but when unbiased samples are studied, the effect is absent or very small
Simulating data to gain insights intopower and p-hackingDorothy Bishop
Very basic introduction to simulating data to illustrate issues affecting reproducibility. Uses Excel and R, but assumes no prior knowledge of R. Please let me know of errors or things that need better explanation.
4 major threats to reproducibility are publication bias, low power, p-hacking and HARKing. In this talk I explain these terms and show how study pre-registration can fix them
Lecture by Prof Dorothy Bishop, 1st Feb 2017, University of Southampton:
What’s wrong with our Universities, and will the Teaching Excellence Framework put it right?
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
1. #-------------------------------------------------------------------------------------
# ERPsimulate
# by D V M Bishop, 18th
June 2013
# Script to accompany blogpost:
# http://deevybee.blogspot.co.uk/2013/06/interpreting-unexpected-significant.html
#-------------------------------------------------------------------------------------
# Create datasets of simulated ERP averages by random number generation
# Assign means to fictitious subjects/conditions/electrodes and use ezANOVA
# to analyse
# ForezANOVA, data are organised in a format where repeated
# measures are stacked below one another
#For each dataset, do ANOVA for 4 way, 3 way (elec as factor) and 2 way (difference score as factor)
require(MASS) #used for multivariate random normal data generation, mvrnorm command
require(ez) #for ezanova
ptm<- proc.time() #500 runs took about 5 mins
nsims=8# n values to simulate for each subject; 2 locs x 2 sides x 2 conditions
mycorrel=0 #intercorrelation between dvs, will be in mysigma matrix
mysigma=matrix(c(rep(mycorrel,nsims*nsims)),nsims,nsims)
for (i in 1:nsims){mysigma[i,i]=1} #ones on diagonal
mymu=rep(0,nsims) #mean is zero
nsub=40 # here 2 groups of 20
mydata=matrix(rep(0,nsub*nsims*8),nsub*nsims,8)#initialise data matrix; 8 cols to include all
possible factors
nrun=20 #N runs through the simulation; ANOVA done for each one; once working, try around 1000
runs
mypvalues=array(0,dim=c(25,nrun)) #initialise array for 4way, 3way and 2way stacked: used to save
ANOVA pvalue outputs - 15 terms altogether
myeffect=0 #this effect will be added to cols 4-8 (one level of 'task' factor); .2 will give a modest
effect
for (myrun in 1:nrun){ # do repeated runs of the simulation
myavg=mvrnorm(n = nsub, mymu, mysigma, empirical = FALSE) #make matrix of random values
#for all subjects with intercorrelation
#determined by mysigma
myavg[,4:8]=myavg[,4:8]+myeffect #constant effect added to cols corresponding to one level of
'task'
for (mysub in 1:nsub){
mygrp=1
2. if (mysub>20){mygrp=2}#2 groups each of 20 #can change this if desired
startrow=(mysub-1)*(nsims)+1
endrow=mysub*nsims
mydata[startrow:endrow,1]=mysub;#ID in col 1
mydata[startrow:endrow,2]=t(myavg[mysub,]) #simulated avgs stacked in col 2
mydata[startrow:endrow,3]=mygrp;#group in col 3
mydata[startrow:endrow,4]=c(1,1,1,1,2,2,2,2);#task in col 4
mydata[startrow:endrow,5]=c(1,1,2,2,1,1,2,2) #side in col 5
mydata[startrow:endrow,6]=c(1,2,1,2,1,2,1,2) #loc in col 6
mydata[startrow:endrow,7]=c(1,2,3,4,1,2,3,4) #electrode in col 7 (equiv to side x loc)
mydata[startrow:endrow,8]=c(myavg[mysub,1]-myavg[mysub,5],myavg[mysub,2]-
myavg[mysub,6],myavg[mysub,3]-myavg[mysub,7],myavg[mysub,4]-myavg[mysub,8])
#difference between the two levels of task
} #end of mysub loop
mydf=data.frame(mydata)
names(mydf)=c("id","amp","group" ,"task", "side", "loc","elec","diff")
mydf$id<- as.factor(mydf$id)
mydf$group<- as.factor(mydf$group)
mydf$task<- as.factor(mydf$task)
mydf$side<- as.factor(mydf$side)
mydf$loc<- as.factor(mydf$loc)
mydf$elec<- as.factor(mydf$elec)
mydf$diff=as.numeric(mydf$diff)
mydf2 <- mydf[which(mydf$task==1 ), ] #for 2 way Anova, just take rows where task=1 so there's
just one difference value
attach(mydf)
attach(mydf2)
myresult4=ezANOVA(data=mydf, dv=.(amp), wid=.(id), between=.(group),within=.(task, side,loc),
type=3)
myresult3=ezANOVA(data=mydf,dv=.(amp),wid=.(id),between=.(group),within=.(task,elec),type=3)
myresult2=ezANOVA(data=mydf2,dv=.(diff),wid=.(id),between=.(group),within=.(elec),type=3)
detach(mydf)
detach(mydf2)
mypvalues[,myrun]=c(myresult4$ANOVA[,5],myresult3$ANOVA[,5],myresult2$ANOVA[,5]) #5th col
of ANOVA output has pvalues
rownames(mypvalues)=
c(myresult4$ANOVA$Effect,myresult3$ANOVA$Effect,myresult2$ANOVA$Effect)
}
myfilename="mypvalues_all.TXT"
#write.table(mydata, "mydata.txt", sep="t") #write data from last run only to a tab-sep text file; will
be saved in default directory
3. write.table(t(mypvalues), myfilename, sep="t") #write transposed pvalues to a tab-sep text file; will
be saved in default directory
#First 15 cols will give output for 4-way, next 7 give output for 3-way, and last 3 for 2-way
#NB for 2-way, the 'group' term is equivalent to group x task in other ANOVAs, because dv is task
difference
proc.time()-ptm #check how long it takes to run