hello, world
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 re | |
N = 5 | |
# deserialize wordlist file | |
with open('/usr/share/dict/words') as f: | |
words = f.readlines() | |
words = filter(lambda w: len(w) == N, | |
map(lambda w: w.rstrip().lower(), words)) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
int opt_n = !--argc || !strncmp(argv[1], "-n", 2); | |
if (opt_n) | |
argc--, argv++; |
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
/* on mobile screen */ | |
@media screen and (max-width: 800px) { | |
/* hide mobile header */ | |
.header-burger, | |
.header-display-mobile { | |
display: none; | |
} | |
/* show desktop header */ | |
.header-nav, |
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
version: "3.7" # the compose file version we will be using | |
# define a list of docker services (i.e. containers) | |
services: | |
# define a service named grafana. this name is also resolved to the | |
# container's IP address by Docker's internal DNS. | |
grafana: | |
# this service (container) will be using the offical grafana image |
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 java.util.Arrays; | |
public class b { | |
public static void main(String[] main) { | |
/* input data */ | |
int[] a = {1, 4, 6, 9, 10}; | |
int[] b = {2, 4, 5, 6, 8, 9}; | |
int i, j, t, acc; |
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 is_prime(n): | |
for i in range(2, n): | |
if not (n % i): | |
return False | |
return n > 1 | |
def helper(j, k): | |
if is_prime(j) and is_prime(k): | |
print(j, k) | |
return True |
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 is_prime(n): | |
for i in range(2, n): | |
if not n // i: | |
return False | |
return n > 1 | |
def helper(j, k): | |
if is_prime(j) and is_prime(k): | |
print(j, k) | |
return True |
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 is_prime(n): | |
for i in range(2, n): | |
if n // i: | |
return False | |
return n > 1 | |
def helper(j, k): | |
if is_prime(j) and is_prime(k): | |
print(j, k) | |
return True |
NewerOlder