Skip to content

Instantly share code, notes, and snippets.

View PhiBabin's full-sized avatar

Philippe Babin PhiBabin

View GitHub Profile
@PhiBabin
PhiBabin / fetch_users_data.py
Created November 23, 2022 03:15
Twitter allows you download your data. However, the list of following only contains the user id, not the username, which is basically useless if Twitter is down. This script takes the following.js from the data archive and fetch all the available data about each user (username, description, url, ...). You need to create an app to get the bearer …
import json
import os
import requests
# You need the bearer token, to get it, go to https://developer.twitter.com/en/portal/projects-and-apps and create an app
bearer_token = os.environ['TWITTER_TOKEN']
if __name__ == "__main__":
with open('following.js') as file:
---
Language: Cpp
BasedOnStyle: WebKit
IndentWidth: 4
TabWidth: 4
UseTab: Always
SortUsingDeclarations: false
SortIncludes: false
BreakConstructorInitializers: AfterColon
SpaceAfterTemplateKeyword: false
<?
echo "salut";
?>
@PhiBabin
PhiBabin / gist:6076e85298a0c564b37a
Created September 23, 2015 17:01
Node for extraction of RPY from imu and compass
#include <math.h>
#include <ctime>
#include <vector>
#include <ros/ros.h>
#include <sensor_msgs/Imu.h>
#include <sensors/compass.h>
#include "links/imuros.h"
#include "links/imubuff.h"
-module(brainfuck).
-export([brainfuck/1]).
%% Hello, world:
%%brainfuck:brainfuck("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.").
brainfuck(Codes) ->
start(string:substr(Codes, 1, 1), 1, Codes, 1, array:new([{size, 3000},{default, 0}])).
start([], N, Codes, P, Data) ->
@PhiBabin
PhiBabin / test1.py
Last active August 29, 2015 14:06 — forked from l3robot/test1.py
from PIL import Image
def pair(a):
if a % 2 == 0:
return a
else:
return a-1
def impair(a):
if a % 2 != 0:
return a
if(!cube_initiation && CubeCenter.size() >= 2){
cubes.push_back(CubeCenter[0]);
cubes.push_back(CubeCenter[1]);
missing_association.push_back(0);
missing_association.push_back(0);
cube_initiation = true;
}
else if(cube_initiation ){
for(int index = 0; index < 2; index++){
ROS_INFO("No seg");
In file included from /usr/include/eigen3/Eigen/Core:277:0,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/philippe/devRosWs/src/mutualCameraLocalization/include/mutualCameraLocalization/mutual_camera_localization_node.h:26,
from /home/philippe/devRosWs/src/mutualCameraLocalization/src/mutual_camera_localization_node.cpp:17:
/usr/include/eigen3/Eigen/src/Core/DenseBase.h: In instantiation of ‘class Eigen::DenseBase<Eigen::Matrix<float, 4, 1> >’:
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:61:34: required from ‘class Eigen::MatrixBase<Eigen::Matrix<float, 4, 1> >’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:65:7: required from ‘class Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 1> >’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:140:7: required from ‘class Eigen::Matrix<float, 4, 1>’
/usr/include/eigen3/Eigen/src/Geometry/Quaternion.h:287:16: required from ‘class Eigen::Quaternion<float>’
/usr/include/eigen3/Eigen/src/Geometry/arch/Geo
;Philippe Babin PHBAB1 - Mathieu Cloutier MACLO245
NAME main
PUBLIC __iar_program_start
SECTION .intvec : CODE (2)
CODE32
__iar_program_start
B main ;
;Philippe Turgeon
;Émile Lévesque
NAME main
PUBLIC __iar_program_start
SECTION .intvec : CODE (2)
CODE32