Skip to content

Instantly share code, notes, and snippets.

View saintbyte's full-sized avatar
🌏
заапгрейдить и пропатчить

Yegor Kazantsev saintbyte

🌏
заапгрейдить и пропатчить
View GitHub Profile
@AlexanderGreyFox
AlexanderGreyFox / to_tree_func.py
Created April 20, 2022 14:23
Написать функцию, строящую дерево по списку пар id (id родителя, id потомка), где None - id корневого узла.
def to_tree(source: list):
i = 0
result = dict()
node = result
while i < len(source):
parent = source[i][0]
child = source[i][1]
if parent is None:
result.update({child: {}})
i += 1
@ozgurshn
ozgurshn / predictionOnCoreML.py
Last active September 4, 2020 08:38
Prediction on Core ML model with PIL image input
##https://github.com/apple/coremltools/blob/master/examples/APIExamples.md
import coremltools
import numpy as np
import PIL.Image
# load a model whose input type is "Image"
model = coremltools.models.MLModel('path/to/the/saved/model.mlmodel')
Height = 20 # use the correct input image height
Width = 60 # use the correct input image width
@amlwwalker
amlwwalker / stream.go
Last active March 2, 2024 23:31
Golang VAD and Google Speech To Text
package main
import (
"bytes"
"context"
"flag"
"io"
"path/filepath"
"fmt"
@ReeganExE
ReeganExE / post-json.go
Created February 15, 2020 08:00
Sample POST json in Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
@mrladeia
mrladeia / readme.md
Last active April 6, 2024 10:30
Iptables to Oracle Cloud port 80 and 443 open

IPTABLES to Oracle Cloud port 80 and 443 open

If you need to open up ports 80 and 443, on file /etc/iptables/rules.v4 just add

-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT

directly below

@hsiboy
hsiboy / navtex.ino
Created October 8, 2019 22:13
Simple Navtex receiver - https://youtu.be/SwL_ZQ_iBIM
/*
* Simple Navtex receiver - https://youtu.be/SwL_ZQ_iBIM
*
* by Martin Kuettner <berry@fmode.de> 03/2016
*
*
* Porting the 80C51 Assembler Program from "A NAVTEX Receiver for the DXer":
*
* Klaus Betke, Am Entengrund 7, D-26160 Bad Zwischenahn, Email: betke@itap.de
* 11-AUG-00/01-OCT-00
@geek-at
geek-at / parse_austria.php
Last active November 1, 2022 03:02
Parsing ip data from a file
<?php
$infile = 'austria.csv';
$outfile = 'austria.ips';
$fp = fopen($outfile,'w');
$handle = fopen($infile, "r");
if ($handle)
{
while (($line = fgets($handle)) !== false) {
$line = trim($line);
@MatthewScholefield
MatthewScholefield / LICENSE
Last active September 19, 2022 15:00
Precise streaming over sockets example
Copyright 2018 Matthew Scholefield
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
@BlaayLock
BlaayLock / Convert Unicode to ASCII without errors, utf8 -> cp1251
Last active May 29, 2020 17:50
Python: Convert Unicode to ASCII without errors, utf8 -> cp1251
#! python2
# //coding: utf-8
# coding=utf-8
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
a = u'1a'
a = a.decode('utf-8').encode('cp1251')
print a
@Wack0
Wack0 / upwned247.php
Last active December 13, 2023 08:16
UCam247/Phylink/Titathink/YCam/Anbash/Trivision/Netvision/others IoT webcams : remote code exec: reverse shell PoC. (works only in qemu usermode)
<?php
/*
Updated version, 2016-12-02: fixed shellcode so it *actually* works on QEMU
usermode emulation (seems I pushed an old version), and removed debug output.
-------------------------
NB: THIS PoC ONLY WORKS IN QEMU USERMODE EMULATION!
If anyone wants to fix this, go ahead (no pun intended).
However, I don't have a vulnerable product and am unwilling to acquire one.