# Down his public key and saving it to the file key.asc.
# Then use the following command to add it to your keyring:
$ gpg --import <path to key.asc>
# ..check if imported successfully:
$ gpg --list-keys
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 Analyse(obj): | |
""" Dynamic Dispatch based on object's class type. | |
This will call the AnalyseClassName | |
Example: if obj is of type Let, then call AnalyseLet, | |
if it is of type IfElse call AnalyseIfElse | |
""" | |
# Get obj's class name | |
class_name = obj.__class__.__name__ | |
# Create the function name as a string |
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 wikipedia | |
def get_bigrams(string): | |
''' | |
Takes a string and returns a list of bigrams | |
''' | |
s = string.lower() | |
return [s[i:i+2] for i in xrange(len(s) - 1)] | |
def string_similarity(str1, str2): |
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
{ | |
"size": 0, | |
"query": { | |
"filtered": { | |
"query": { | |
"query_string": { | |
"query": "*", | |
"analyze_wildcard": 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
classes = [ | |
Authentication, | |
ComputerSystem, | |
Container, | |
ContainerBuild, | |
ContainerBuildPod, | |
ContainerComponentStatus, | |
ContainerCondition, | |
ContainerEnvVar, | |
ContainerGroup, |
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
classes = [ | |
ManageIQ::Providers::Redhat::InfraManager, | |
EmsFolder, | |
EmsCluster, | |
ResourcePool, | |
Host, | |
Vm, | |
Relationship, | |
Storage, | |
MiqEventDefinition, |
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 python | |
# -*- coding: utf-8 -*- | |
import ovirtsdk4 as sdk | |
import ovirtsdk4.types as types | |
import time | |
import sys | |
def create_all(): | |
try: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* Overflow aware uint math functions. | |
* | |
* Inspired by https://github.com/MakerDAO/maker-otc/blob/master/contracts/simple_market.sol | |
*/ | |
pragma solidity ^0.4.11; | |
/** | |
* ERC 20 token | |
* |
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
from casperlabs_client import CasperLabsClient, bundled_contract | |
from casperlabs_client.abi import ABI | |
import os | |
def read_hex_id(file_name): | |
with open(file_name) as f: | |
return f.read().strip() | |
REPO_DIR = f"{os.getenv('HOME')}/CasperLabs" | |
STORED_TRANSFER_WASM = f"{REPO_DIR}/execution-engine/target/wasm32-unknown-unknown/release/transfer_to_account_u512_stored.wasm" |
OlderNewer