This file contains hidden or 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 time | |
import board | |
import busio | |
import adafruit_sgp30 | |
import adafruit_dht | |
from influxdb import InfluxDBClient | |
from math import exp | |
from queue import Queue | |
from threading import Thread, Event |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
#cutoff = 100 | |
def flip(name): | |
df = pd.read_csv(name) | |
del df['Lat'] |
This file contains hidden or 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
(ns logicgame.core | |
(:use clojure.core.logic) | |
(:gen-class)) | |
(defne ando [a b y] | |
([1 1 1]) | |
([1 0 0]) | |
([0 1 0]) | |
([0 0 0])) |
This file contains hidden or 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
_pkgname=jitter | |
pkgname=$_pkgname-git | |
pkgver=r596.745ba29 | |
pkgrel=1 | |
pkgdesc="Jitter" | |
arch=('i686' 'x86_64') | |
url="http://ageinghacker.net/git/cgit.cgi/jitter" | |
license=('GPL') | |
depends=() | |
makedepends=('git') |
This file contains hidden or 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 fileinput | |
width = 640//16 | |
height = 480//16 | |
lineno = 0 | |
for line in fileinput.input(): | |
if line.startswith("# vim:"): continue | |
if line.startswith("-"): | |
fill = height-(lineno%height) |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
from scipy.interpolate import interp1d | |
import ipdb | |
#ref The Finite-Difference Time Domain Method for Solving Maxwell’s Equations | |
size = 15 |
This file contains hidden or 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
with Ada.Text_IO; | |
use Ada.Text_IO; | |
with Ada.Containers.Vectors; | |
with Ada.Numerics.Discrete_Random; | |
with Ada.Numerics.Float_Random; | |
with Ada.Numerics.Generic_Elementary_Functions; | |
with Ada.Numerics.Elementary_Functions; | |
procedure TSP is |
This file contains hidden or 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
use rand; | |
fn transpose(data: &[u64], col: usize) -> u64 { | |
return data.iter().fold(0, |acc, x| (acc<<1) | ((x >> col) & 1)); | |
} | |
fn masked_lowest_popcount(mask: u64, data: Vec<u64>) -> (Vec<u64>, Vec<u64>) { | |
let mut lowest = u32::max_value(); | |
let mut values: Vec<u64> = Vec::new(); | |
let mut remainder: Vec<u64> = Vec::new(); |
This file contains hidden or 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
#include <SPI.h> | |
#include "registers.h" | |
#define SEMI 1.059463 | |
#define LED 20 | |
#define BITS(val, ofst, wdt) (((val) & ((1<<wdt)-1)) << ofst) | |
void writeReg(byte addr, byte data) { |
This file contains hidden or 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 re | |
import sys | |
import glob | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
regex = """(?P<datetime>\d{1,2}\/\d{1,2}\/\d{1,4}, \d{1,2}:\d{1,2}( (?i)[ap]m)*) - (?P<name>.*(?::\s*\w+)*|[\w\s]+?)(?:\s+(?P<action>joined|left|was removed|changed the (?:subject to "\w+"|group's icon))|:\s(?P<message>(?:.+|\n(?!\d{1,2}\/\d{1,2}\/\d{1,4}, \d{1,2}:\d{1,2}( (?i)[ap]m)*))+))""" | |
files = sys.argv[1:] |