Skip to content

Instantly share code, notes, and snippets.

View anuar2k's full-sized avatar

Aleksander Wójtowicz anuar2k

View GitHub Profile
import os
import glob
import xml.etree.ElementTree as ET
def create_group_file_structure(file_list):
group_structure = {}
for file_path in file_list:
# Normalize the file path and split it into directories and the filename
#!/usr/bin/env python3
import sys, vlc, time, argparse, threading
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='VLC Control')
parser.add_argument(
'--mrl-set',
dest='mrl_sets',
metavar='mrl',
# Following patch was applied to X-Cube-Cellular 7.0.0 to make
# offloaded sockets work properly when Reduced C (--specs=nano.specs)
# Runtime library is selected.
#
# Otherwise, the resulting string is "hu.hu.hu.hu".
#
# The source of problem is that nano.specs newlib does not have
# support for C99 format specifiers (including hhd/hhu).
diff --git a/Middlewares/ST/STM32_Cellular/Interface/Com/Src/com_sockets_ip_modem.c b/Middlewares/ST/STM32_Cellular/Interface/Com/Src/com_sockets_ip_modem.c
index a05b628..3fd5397 100644
This file has been truncated, but you can view the full file.
### Configuration menu ###
1. LwM2M Server URI (coap+tcp://eu.iot.avsystem.cloud:5683)
2. Endpoint name (awojtowicz-u5-nosec)
3. PSK (test)
4. APN (internet)
5. APN username (internet)
6. APN password (internet)
7. Discard changes
8. Factory reset
9. Save & Exit
@anuar2k
anuar2k / asm.py
Last active November 8, 2021 22:20
SCS assembler
#!/usr/bin/env python3
import re
import sys
import pprint
REG_BIT = {
"R0": 0 << 4,
"R1": 1 << 4
}
#define ID1 (*(unsigned long *)0x1FFFF7E8)
#define ID2 (*(unsigned long *)0x1FFFF7EC)
#define ID3 (*(unsigned long *)0x1FFFF7F0)
unsigned long *id = (unsigned long *)0x1FFFF7E8;
char id_buf1[11];
char id_buf2[11];
char id_buf3[11];
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
"request": "launch",
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
int main() {
int n;
scanf("%d", &n);
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
int main() {
int n;
scanf("%d", &n);
int **T = malloc(n * sizeof(*T));
int **W = malloc(n * sizeof(*W));
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PRIME_1 53 //around 52, num of lower and uppercase letters
#define PRIME_2 89
#define STR_SZ 31 //30 + 1 nullchar
typedef enum {
NIL, EXISTS, DELETED