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
package org.example; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
public class MontyHall { | |
public static void main(String[] args) { | |
int noswitch = 0; |
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
Complete credit to http://Learn.SharjeelSayed.com //copied for myself. | |
Curated Self Study Guide for Computer Science and DevOps/SRE/SysAdmin | |
https://github.com/docker-training/orchestration-workshop | |
An always updated copy of this document can be found at http://Learn.SharjeelSayed.com | |
Fork this at https://github.com/SharjeelSayed/SharjeelSayed.github.io | |
Reach me at http://SharjeelSayed.com |
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
public class One { | |
public static void main(String[] args) { | |
int A = 2, B = 5; | |
int a = 1, b = 1; String result = ""; | |
while ((A+B)>0) { | |
if (A > B) { | |
if (a < 3) { | |
result += "a"; | |
a++; b=1; A--; | |
} else { |
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
https://www.linode.com/docs/applications/remote-desktop/remote-desktop-using-apache-guacamole-on-docker/#guacamole-in-browser | |
https://kifarunix.com/how-to-setup-guacamole-web-based-remote-desktop-access-tool-on-ubuntu-18-04/ | |
https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/ | |
https://www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/ | |
https://www.splitbrain.org/blog/2017-08/10-homeassistant_duckdns_letsencrypt |
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
#installing a gem | |
/usr/local/opt/ruby/bin/gem install jekyll-paginate | |
#run locally | |
~/.gem/ruby/2.6.0/bin/jekyll build --incremental | |
~/.gem/ruby/2.6.0/bin/jekyll serve |
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 java.io.IOException; | |
import java.util.Date; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
class Movie{ |
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
<!-- Munching Squares Anirudh --> | |
<!-- | |
https://codepen.io/anon/pen/PJzqya | |
--> | |
<table> | |
<tbody> | |
<!-- ko foreach : row --> | |
<tr> | |
<!-- ko foreach : $parent.coloumn--> |
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
from HTMLParser import HTMLParser | |
class MyHTMLParser(HTMLParser): | |
def __init__(self): | |
HTMLParser.__init__(self) | |
self.dataArray = set([]) | |
self.currNode = "" | |
self.foundCurr = False | |
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
/* | |
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once. | |
Input Format: | |
The first line of the input will have N and M (separated by space) for the size of the board. Next M lines will have N letters of the board each. | |
The last line will have word to search. | |
Output Format: |
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
class probDist(dict): | |
def __init__(self,mapping=(), **kwargs): | |
self.update(mapping,kwargs) | |
total = sum(self.values) | |
for outcome in self: | |
self[outcome] = self[outcome]/total | |
NewerOlder