Skip to content

Instantly share code, notes, and snippets.

Valentin Lorentz ProgVal

Block or report user

Report or block ProgVal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rule90.rs
#![recursion_limit="1024"]
macro_rules! rule90 {
// Initialization
( ($($fuel:tt)*) | $($cells:tt,)* ) => {
rule90!( __cont ($($fuel)*) | ($($cells,)*) | (()) );
};
// Initialize the line
( __cont (f $($fuel:tt)*) | ($($cells:tt,)*) | ($(($($history:tt,)*))* ) ) => {
View reconnect_thread.diff
diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py
index c9e9d19f..08787fb4 100644
--- a/src/drivers/Socket.py
+++ b/src/drivers/Socket.py
@@ -223,7 +223,13 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
def connect(self, **kwargs):
self.reconnect(reset=False, **kwargs)
- def reconnect(self, wait=False, reset=True):
+ def reconnect(self, **kwargs):
View main.rs
use nom::types::CompleteStr;
use std::str;
use nom::space;
use nom::types::CompleteByteSlice;
//use geometry::SchemaPoint2D;
pub struct SchemaPoint2D(f32, f32);
impl SchemaPoint2D {
fn new(x:f32, y:f32) -> SchemaPoint2D {
@ProgVal
ProgVal / infc.sh
Last active Mar 29, 2018
Script to run the Official Infclass servers
View infc.sh
#!/bin/sh
NUM=$1
PORT=$2
MYSQL_HOST=${MYSQL_HOST:-192.168.2.1}
DIR=/home/official-infclass/teeworlds-infclass
FNCFG=$DIR/config/tw06-infclass$NUM.cfg
FNGDB=$DIR/config/tw06-infclass$NUM.gdb
FNLOG=$DIR/logs/tw06-infclass$NUM-$(date +"%y-%m-%d-%T").txt
PARAM="-f $FNCFG"
View keybase.md

Keybase proof

I hereby claim:

  • I am ProgVal on github.
  • I am progval (https://keybase.io/progval) on keybase.
  • I have a public key whose fingerprint is 3790 43E3 DF96 D323 7E67 82AC 0E08 2B40 E437 6B1E

To claim this, I am signing this object:

View I2C.py
import smbus
import time
# for RPI version 1, use "bus = smbus.SMBus(0)"
bus = smbus.SMBus(1)
# This is the address we setup in the Arduino Program
address = 0x04
def writeNumber(value):
bus.write_byte(address, value)
@ProgVal
ProgVal / history.py
Created Jul 25, 2013
Limited-length sorted list.
View history.py
import bisect
import operator
import unittest
class history:
"""Limited-length sorted list."""
def __init__(self, maxlen):
self._maxlen = maxlen
self._list = []
def __repr__(self):
View weechicode.py
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009 by xt <xt@bash.no>
# Copyright (c) 2013 by Valentin Lorentz
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@ProgVal
ProgVal / build.py
Last active Oct 11, 2015
Limnoria nightly build script
View build.py
#!/usr/bin/env python
from __future__ import with_statement
import pbs
import time
import glob
import requests
ROOT = '/home/compiler/Limnoria'
View README
Générateur de virelangue
You can’t perform that action at this time.