Skip to content

Instantly share code, notes, and snippets.

View ethanquix's full-sized avatar
🚀
How are we going to manage timezone with Mars?

Dimitri Wyzlic ethanquix

🚀
How are we going to manage timezone with Mars?
View GitHub Profile
package main
import (
"context"
"fmt"
"log"
"net/http"
"sync"
"testing"
"time"
@ethanquix
ethanquix / python1.py
Created June 7, 2022 19:57
python1.py
s = "65?51?45?69?51?77?53?54?54?45?83?86?88?80?83?65?45?53?82?68?69?83?45?72?53?51?81?50?45?69?77?65?82?89?45?67?81?50?84?89"
for c in s.split("?"):
print(chr(int(c)), end='')
{"cumulative_pacing_goal":6152,"total_impressions":3950,"total_impressions_realtime":3950,"goal_for_this_hour":2202,"sum_of_average_requests_by_hour_by_weight":{"1":415},"average_requests_by_hour_by_site":{"6853":415},"sum_of_weights":1,"formula_data_by_site_id":{"6853":{"average_raw_requests_for_this_site_and_campaign":415,"sum_of_raw_requests_for_this_weight_and_campaign":415,"weight":1,"sum_of_all_weights_of_all_sites_of_this_campaign":1,"impression_goal_for_this_hour":2202,"dice_rollpercentage":530.6024096385543,"msg":""}},"msg":""}
<VAST version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Ad id="20020">
<InLine>
<AdSystem version="4.0">iabtechlab</AdSystem>
<AdTitle>iabtechlab video ad</AdTitle>
<Pricing model="cpm" currency="USD">
<![CDATA[ 20.00 ]]>
</Pricing>
<VAST version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Ad id="20010">
<InLine>
<AdSystem version="4.0">iabtechlab</AdSystem>
<AdTitle>iabtechlab video ad</AdTitle>
<Pricing model="cpm" currency="USD">
<![CDATA[ 10.00 ]]>
</Pricing>
<VAST version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Ad id="20005">
<InLine>
<AdSystem version="4.0">iabtechlab</AdSystem>
<AdTitle>iabtechlab video ad</AdTitle>
<Pricing model="cpm" currency="USD">
<![CDATA[ 5.00 ]]>
</Pricing>
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
[0] = "#fbf8f9", /* black */
[1] = "#697786", /* red */
[2] = "#9f7b87", /* green */
[3] = "#748593", /* yellow */
[4] = "#a4929c", /* blue */
[5] = "#e3a8a6", /* magenta */
# How tu use:
# Create a from folder with the launch.json
# Create a output folder
import json
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
from xml.etree import ElementTree
from xml.dom import minidom
// ==UserScript==
// @name Copy Github PRs
// @namespace http://tampermonkey.net/
// @version 0.7
// @description try to take over the world!
// @author You
// @match https://github.com/*
// @grant none
// ==/UserScript==
import sys
# HOW TO RUN THIS SCRIPT:
# python3 script.py MYFILE.SQL
# TRANSFORM:
# CASE WHEN ('bid_requests' in ({{.METRICS}})) THEN bid_requests ELSE NULL END as bid_requests,
# TO
# {{if index .METRICS_AS_MAP "bid_requests"}}bid_requests,{{end}}
def processMetrics(src: str) -> str: