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 { min } from 'lodash'; | |
const n: number = min([1,2,3]) + min([4,2,3]); |
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
#!/bin/sh | |
# Turn a video file into an animated GIF | |
USAGE="usage: gif video_file [gif_file]" | |
video_file=$1 | |
if [ "$video_file" = "" ]; then | |
echo $USAGE |
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 python3 | |
import re | |
import sys | |
import pytest | |
import shutil | |
import pathlib | |
name = sys.argv[1] |
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 os | |
import requests_oauthlib | |
e = os.environ.get | |
client = requests_oauthlib.OAuth1Session( | |
client_key=e("CONSUMER_KEY"), | |
client_secret=e("CONSUMER_SECRET"), | |
resource_owner_key=e("ACCESS_TOKEN"), | |
resource_owner_secret=e("ACCESS_TOKEN_SECRET") |
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
label | tweets | |
---|---|---|
China state-affiliated media | 156 | |
Iran state-affiliated media | 21 | |
Медиј који сарађује са владом Србија | 9 | |
China government official | 8 | |
Çin devletine bağlı medya | 8 | |
Thailand government organization | 7 | |
中国官方媒体 | 5 | |
Russia state-affiliated media | 4 | |
Média affilié à un État, Chine | 4 |
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
label | tweets | |
---|---|---|
China state-affiliated media | 127 | |
Iran state-affiliated media | 21 | |
Thailand government organization | 7 | |
Медиј који сарађује са владом Србија | 6 | |
Çin devletine bağlı medya | 6 | |
China government official | 6 | |
中国官方媒体 | 4 | |
Média affilié à un État, Chine | 4 | |
Russia state-affiliated media | 3 |
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 python3 | |
import csv | |
import json | |
data = json.load(open("outbox.json")) | |
out = csv.DictWriter(open("outbox.csv", "w"), ["published", "to", "content"]) | |
out.writeheader() |
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
start | end | day_count | |
---|---|---|---|
2021-07-27T00:00:00.000Z | 2021-07-28T00:00:00.000Z | 7 | |
2021-07-28T00:00:00.000Z | 2021-07-29T00:00:00.000Z | 8 | |
2021-07-29T00:00:00.000Z | 2021-07-30T00:00:00.000Z | 11 | |
2021-07-30T00:00:00.000Z | 2021-07-31T00:00:00.000Z | 11 | |
2021-07-31T00:00:00.000Z | 2021-08-01T00:00:00.000Z | 8 | |
2021-08-01T00:00:00.000Z | 2021-08-02T00:00:00.000Z | 8 | |
2021-08-02T00:00:00.000Z | 2021-08-03T00:00:00.000Z | 10 | |
2021-08-03T00:00:00.000Z | 2021-08-04T00:00:00.000Z | 10 | |
2021-08-04T00:00:00.000Z | 2021-08-05T00:00:00.000Z | 9 |
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 python3 | |
import internetarchive | |
ia = internetarchive.get_session() | |
print("ids,pages") | |
for result in ia.search_items('collection:mediahistory creator:National Association of Educational Broadcasters'): | |
ia_id = result['identifier'] |
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
start | end | hour_count | |
---|---|---|---|
2021-06-17T23:16:56.000Z | 2021-06-18T00:00:00.000Z | 232 | |
2021-06-18T00:00:00.000Z | 2021-06-18T01:00:00.000Z | 267 | |
2021-06-18T01:00:00.000Z | 2021-06-18T02:00:00.000Z | 353 | |
2021-06-18T02:00:00.000Z | 2021-06-18T03:00:00.000Z | 260 | |
2021-06-18T03:00:00.000Z | 2021-06-18T04:00:00.000Z | 286 | |
2021-06-18T04:00:00.000Z | 2021-06-18T05:00:00.000Z | 278 | |
2021-06-18T05:00:00.000Z | 2021-06-18T06:00:00.000Z | 185 | |
2021-06-18T06:00:00.000Z | 2021-06-18T07:00:00.000Z | 225 | |
2021-06-18T07:00:00.000Z | 2021-06-18T08:00:00.000Z | 241 |