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/python | |
# | |
# Copyright 2012 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 requests | |
def getTwitterFollowers(username): | |
res = requests.options('https://api.twitter.com/1.1/guest/activate.json', | |
headers={ | |
'access-control-request-method': 'POST', | |
'origin': 'https://twitter.com', | |
'user-agent':'Mozilla/5.0' | |
}) |
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
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------< org.apache.maven:standalone-pom >------------------- | |
[INFO] Building Maven Stub Project (No POM) 1 | |
[INFO] --------------------------------[ pom ]--------------------------------- | |
[INFO] | |
[INFO] >>> maven-archetype-plugin:3.2.0:generate (default-cli) > generate-sources @ standalone-pom >>> | |
[INFO] | |
[INFO] <<< maven-archetype-plugin:3.2.0:generate (default-cli) < generate-sources @ standalone-pom <<< | |
[INFO] |
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 netaddr import IPSet, IPRange, IPAddress | |
import requests | |
import time | |
rirs = ( | |
'http://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest', | |
'http://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest', | |
'http://ftp.apnic.net/pub/stats/apnic/delegated-apnic-extended-latest', | |
'http://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest', |
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/python3 | |
import RPi.GPIO as GPIO | |
def main() -> None: | |
tmp = get_cpu_temp() | |
print("CPU temp:{0}".format(tmp)) | |
if(tmp > 60): | |
fan_control(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
#!/usr/bin/python | |
import json | |
import os | |
import sys | |
import pprint | |
import io | |
import requests | |
gyazo_token = 'GYAZO_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
#!/usr/local/bin/node | |
const http = require('http'); | |
const vm = require('vm'); | |
const fs = require('fs'); | |
const util=require('util'); | |
const url = 'http://sx9.jp/weather/tokyo-komaba.js'; | |
const dst = '/dev/shm/ninetan/'; |
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 perl | |
use strict; | |
use warnings; | |
use IO::Socket::Multicast; | |
use Net::DNS::Packet; | |
my $target = '224.0.0.251'; | |
my $port = 5353; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using System.Net; | |
using System.IO; | |
using System.Threading; | |
namespace KCB2 |
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
diff --git a/wmr100.c b/wmr100.c | |
index 9b43c21..d6f3153 100644 | |
--- a/wmr100.c | |
+++ b/wmr100.c | |
@@ -271,6 +271,7 @@ void wmr_output_stdout(WMR *wmr, char *msg) { | |
} | |
void wmr_output_zmq(WMR *wmr, char *topic, char *msg) { | |
+ zmq_msg_t zmsg; | |
int len = strlen(topic) + 1 + strlen(msg); |