git clone https://github.com/zulip/docker-zulip
cd docker-zulip
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
#!/bin/bash | |
# Variables | |
log_path="error.log" | |
log_path_custom="install.log" | |
master_domain="mywebchef.org" | |
domain="wp.mywebchef.org" | |
ip_address="xxx.xxx.xxx.xxx" | |
wp_email="[email protected]" |
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
# This is the kind of software engineering interview algorithm you may have to do at Facebook. | |
# You must print all the subsets of a given set. | |
# | |
# If the input is [1, 2, 3], you will have to print : | |
# | |
# 1, 2, 3, | |
# 1, 2, | |
# 1, 3, | |
# 1, | |
# 2, 3, |
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
# Find the numbers that appear in all arrays. | |
# Return them as a list. | |
# | |
# Input : | |
# [2, 6, 9, 11, 13, 17] | |
# [3, 6, 7, 10, 13, 18] | |
# [4, 5, 6, 9, 11, 13] | |
# | |
# Output must be : | |
# [6, 13] |
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
# You have to return the longest consecutive sequence of numbers in an array. | |
# If the input is [2, 1, 6, 9, 4, 3], the output must be [1, 2, 3, 4] | |
# O(n) | |
def longestSequence(sequence): | |
hashtable = {} | |
longest = [] | |
for i in range(0, len(sequence)): | |
hashtable[sequence[i]] = True | |
for number in hashtable: |
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
# Given a chessboard, how would you find whether the king is threatened by the queen ? | |
# | |
# King position : kx, ky | |
# Queen position : qx, qy | |
# | |
# There's only a queen and a king on the chessboard. | |
# Output is True or False. | |
def endangeredKing(k_pos, q_pos): | |
if (q_pos[0] - k_pos[0] == 0): |
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
# Move all zeros present in the array to the end, and return the SAME array. | |
# | |
# I: [0, 1, 2, 0, 3, 0] | |
# O: [1, 2, 3, 0, 0, 0] | |
# | |
# No empty array. | |
# No negative numbers. | |
def shiftZeros(array): | |
i = 0 |
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
// --------- Max Dissolved Oxigen Saturation ------------// | |
// | |
// Equation for the Henry coefficient as a function of temperature and salinity is used to calculate values | |
// for unit standard atmospheric concentrations (USAC) in freshwater and seawater in equilibrium with air at a total pressure | |
// of 1 atmosphere. It is estimated that the possible error in the new USAC values is no greater than $\pm 0.1%$ and probably less. | |
// Tables and equations are presented for obtaining accurate USAC values in the ranges $0^\circ < t < 40^\cir C and 0 < S < 40$. | |
// Simple procedures are given for calculating standard atmospheric concentrations at pressures different from 1 atm. | |
// | |
// Reference https://water.usgs.gov/software/DOTABLES/ | |
// Dissolved oxygen (DO) solubility over a range of user-specified values for |
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
#!/usr/bin/env python2 | |
# Usage : python rsatool.py -n <decimal_modulus> -p <decimal_prime1> -q <decimal_prime2> -e 65537 -v DER -o private.key | |
import base64, fractions, optparse, random | |
try: | |
import gmpy | |
except ImportError as e: | |
try: | |
import gmpy2 as gmpy |
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
sudo: required | |
services: | |
- docker | |
env: | |
- DOCKER_COMPOSE_VERSION=1.23.2 | |
before_install: | |
- sudo rm /usr/local/bin/docker-compose |
OlderNewer