// mmcli must be available
// if not, install using snap install modem-manager
$ mmcli -L ;; check listed modem
$ mmcli -m x ;; x is modem id listed
// use nmcli (network manager) to setup
$ nmcli c add type gsm ifname <port> con-name <arbitrary> apn <apn url>
$ nmcli r wwan on ;; setup wwan to on
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 python | |
import smbus | |
import time | |
address = 0x38 | |
bus = smbus.SMBus(1) | |
def set_value(reg, value): | |
reg_val = [ reg, value ] |
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
#include <stdlib.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <ctype.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <sys/time.h> | |
#include <sys/types.h> |
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 warnings | |
warnings.filterwarnings("ignore") | |
import sys | |
import numpy as np | |
import scipy as sy | |
from numpy import genfromtxt | |
import matplotlib.pyplot as plt |
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
(fizz-buzz-plus (list (cons "Stu" 3) (cons "Ple" 2) (cons "Twak" 7)) 1 90) | |
output: | |
'(1 | |
("Ple") | |
("Stu") | |
("Ple") | |
5 | |
("Stu" "Ple") | |
("Twak") |
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
#lang racket | |
(require pict/tree-layout) | |
(require pict) | |
(struct node (val left right) #:transparent) | |
(define-struct/contract leaf ([x (not/c null?)]) #:transparent) | |
(define (make-tree xs) | |
(if (null? xs) | |
null |
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
#include <stdio.h> | |
#include <string.h> | |
char *phone = "081546496933"; | |
char phonebcd[100]; | |
char phonenotbcd[100]; | |
void chartobcd(char *bcd, char *ch, int len) | |
{ | |
int i = 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
//------------------------------------------------------------------------------ | |
// File generated by LCD Assistant | |
// http://en.radzio.dxp.pl/bitmap_converter/ | |
//------------------------------------------------------------------------------ | |
const unsigned char logo_bukalapak [] = { | |
#if 0 | |
0x00, | |
#else | |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
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 ubuntu | |
MAINTAINER Isa Ansharullah <isa.ansharullah@bukalapak.com> | |
RUN apt-get update | |
RUN apt-get install -y python | |
RUN apt-get install -y software-properties-common | |
RUN add-apt-repository -y ppa:team-gcc-arm-embedded/ppa | |
RUN apt-get update | |
RUN apt-get install -y gcc-arm-embedded |
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
int do_once = 0; | |
typedef struct __attribute__((__packed__)) { | |
uint8_t bLength; | |
uint8_t bDescriptorType; | |
uint16_t bcdUSB; | |
uint8_t bDeviceClass; | |
uint8_t bDeviceSubClass; | |
uint8_t bDeviceProtocol; |