Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// provoke a crash by cuncurrently writing to the same map from different goroutines | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
) |
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
export default { | |
"nodes": [ | |
{ "id": "Myriel", "group": 1 }, | |
{ "id": "Napoleon", "group": 1 }, | |
{ "id": "Mlle.Baptistine", "group": 1 }, | |
{ "id": "Mme.Magloire", "group": 1 }, | |
{ "id": "CountessdeLo", "group": 1 }, | |
{ "id": "Geborand", "group": 1 }, | |
{ "id": "Champtercier", "group": 1 }, | |
{ "id": "Cravatte", "group": 1 }, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 functools import reduce | |
from operator import mul | |
try: | |
from math import prod | |
except ImportError: | |
def prod(*C): | |
return reduce(mul, C, 1) | |
def convolve(A, B, prod=prod, sum=sum): | |
"""Convolute A and B (often written A∗B) |
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
#!/usr/bin/env python3 | |
import http.client | |
import urllib | |
import argparse | |
import sys | |
import logging | |
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) | |
log = logging.getLogger(__name__) |
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
""" | |
Generating a random token:: | |
>>> random_token() # doctest: +SKIP | |
10239537334670678660 | |
Signing Tokens (internally, this uses a truncated HMAC):: | |
>>> key = b'secret' |
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
#cloud-config | |
# In order to access RStudio server via the web interface, you must log on with | |
# a user account that allows password access. This script does not add that user | |
# by default. You may either ssh as root into the server and `adduser` as | |
# normal, or script a user addition here: | |
# users: | |
# - name: # username # | |
# lock-passwd: false # allow login with password |
NewerOlder