Skip to content

Instantly share code, notes, and snippets.

View DenisCarriere's full-sized avatar
🎯
Focusing

Denis DenisCarriere

🎯
Focusing
View GitHub Profile
@DenisCarriere
DenisCarriere / mls.py
Created December 14, 2015 19:04
MLS Scraper
import geocoder
import requests
import unicodecsv as csv
import time
container = {}
g = geocoder.google("New Brunswick, Canada")
url = "https://www.realtor.ca/api/Listing.svc/PropertySearch_Post"
PropertySearchType = {
@DenisCarriere
DenisCarriere / decode_hex.js
Last active February 7, 2023 05:38
Decode HEX data using Greymass EOSIO library
import { ABI, Serializer } from "@greymass/eosio";
const abi = ABI.from({
structs: [
{
name: "distribute_account",
base: "",
fields: [
{name: "account", type: "name"},
{name: "percent",type: "uint16"}
]
@DenisCarriere
DenisCarriere / GIS-Projects.md
Last active June 23, 2022 14:15
GIS Projects
@DenisCarriere
DenisCarriere / stake2vote.ts
Created June 16, 2022 13:24
EOS stake to vote
/**
* voteWeightToday computes the stake2vote weight for EOS, in order to compute the decaying value.
*/
export function voteWeightToday(date: Date): number {
const seconds_per_day = 86400;
const block_timestamp_epoch = new Date(Date.UTC(2000, 0, 1, 0, 0, 0, 0)).getTime();
return Math.floor( (date.getTime() - block_timestamp_epoch) / 1000 / (seconds_per_day * 7)) / 52;
}
@DenisCarriere
DenisCarriere / README.md
Last active January 4, 2022 03:05
Python Geocoder reverse geocoding with OpenStreetMap

You can conduct reverse geocoding using the Python Geocoder library.

Notes: Input for coordinate is using [lat, lng] order.

Python

import geocoder
g = geocoder.osm([45,-75], method='reverse')
{...}
@DenisCarriere
DenisCarriere / defiboxsell.cpp
Created October 12, 2021 18:25
Sell using Defibox multi-hop on incoming transfer
#include <eosio.token.hpp>
using namespace eosio;
static constexpr extended_symbol EOS{{"EOS", 4}, "eosio.token"_n };
static constexpr extended_symbol USDT{{"USDT", 4}, "tethertether"_n };
class [[eosio::contract]] defiboxsell : public contract {
public:
using contract::contract;
@DenisCarriere
DenisCarriere / osm-blockchain-protocol.md
Created March 8, 2018 21:14
OpenStreetMap Blockchain Protocol

OpenStreetMap Blockchain Protocol

OpenStreetMap.org (OSM) is a community driven mapping platform that offers completely free & open source mapping data, some would call it the WikiPedia for maps. Anyone is allowed to edit, download & use OpenStreetMap completely for free. Unfortunately, to build DApps using such public mapping database would require an immense amount of work to simply load the data and to keep it updated.

EOS Nation is proposing to develope a protocol which would allow DApps developpers to interact with the OpenStreetMap database directly on the EOS blockchain. In addition an OpenStreetMap monitoring system would be deployed on the EOS blockchain which would continously sync the live OpenStreetMap data to the blockchain.

row1 row2 row3 row4
abc 2021-10-05T02:13:49 fsds 10/05/2021
sfe 2021-10-03T02:13:49 bcc 10/04/2021
@DenisCarriere
DenisCarriere / ecosystem.config.js
Last active April 7, 2019 15:52
DPS pm2 config
module.exports = {
apps : [
{
name: 'dapp-services-node',
script: 'services/dapp-services-node/index.js',
autorestart: true,
log_date_format : "YYYY-MM-DD HH:mm",
env: {
NODEOS_CHAINID: 'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906',
NODEOS_HOST: '<NODEOS ENDPOINT>',
@DenisCarriere
DenisCarriere / keybase.md
Created March 8, 2018 21:05
Keybase for EOS Nation

Keybase proof

I hereby claim:

  • I am deniscarriere on github.
  • I am eosnation (https://keybase.io/eosnation) on keybase.
  • I have a public key whose fingerprint is 3F68 847E FF55 BCDA F250 E799 36A2 F10D 26E4 9EFF

To claim this, I am signing this object: