Skip to content

Instantly share code, notes, and snippets.

msehnout

  • Red Hat
Block or report user

Report or block msehnout

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 utils.py
import requests
from requests_kerberos import HTTPKerberosAuth
class Response:
def __init__(self, data, id, status):
self.data = data
self.id = id
self.status = status
View test.md

Code:

package main

import "fmt"

func main() {
	abc := []string{"aaa", "bbb", "ccc"}
	for i := range abc {
		fmt.Println(i)
@msehnout
msehnout / print.py
Created Dec 15, 2019
Print a list of images into a PDF file with two images per page.
View print.py
import os
from fpdf import FPDF
from PIL import Image
input = os.environ["INPUT"]
output = os.environ["OUTPUT"]
images = os.listdir(input)
print(images)
@msehnout
msehnout / azure_image.json
Last active Dec 10, 2019
[WIP] osbuild pipeline for the new Azure image
View azure_image.json
{
"build": {
"pipeline": {
"stages": [
{
"name": "org.osbuild.dnf",
"options": {
"repos": [
{
"metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch",
@msehnout
msehnout / main.rs
Created Mar 2, 2018
Simple flat_map example - filtering data from list of structs
View main.rs
#[derive(Debug)]
struct Task {
b: u8,
c: String,
}
#[derive(Debug)]
struct Day {
a: u8,
@msehnout
msehnout / main.rs
Last active Nov 2, 2017
C++17 Coding Challenge in Rust
View main.rs
/*
* # C++17 Coding challenge in Rust
* How to deal with edge cases:
* * if the input file is empty, the program should write “input file missing” to the console.
* * if the input file does not contain the specified column, the program should write “column name doesn’t exists in the input file” to the console.
*
* The rest was not considered and mercilessly unwrapped.
*/
use std::env;
View wip_nc_not_woking_on_redox.rs
use std::env;
use std::io::{self, stdin, Read, Write, Result};
use std::net::{SocketAddrV4, TcpStream, UdpSocket, TcpListener, Ipv4Addr};
use std::str;
use std::sync::Arc;
use std::thread;
static MAN_PAGE: &'static str = /* @MANSTART{tail} */ r#"
NAME
nc - Concatenate and redirect sockets
You can’t perform that action at this time.