Skip to content

Instantly share code, notes, and snippets.

Jan Gazda 1oglop1

Block or report user

Report or block 1oglop1

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 now.json
{
"version": 2,
"name": "blog",
"builds": [
{
"src": "api/**/*.py",
"use": "@now/python"
},
{
"src": "www/**/*",
@1oglop1
1oglop1 / log.txt
Created Nov 14, 2019
Zeit.co Now dbg
View log.txt
[debug] [2019-11-14T20:59:48.611Z] Found config in file ~/blog/pelican/blog/now.json
> [debug] [2019-11-14T20:59:48.617Z] Using Now CLI 16.5.2
> [debug] [2019-11-14T20:59:48.619Z] user supplied a possible target for deployment
> [debug] [2019-11-14T20:59:48.643Z] GET https://api.zeit.co/www/user
> [debug] [2019-11-14T21:00:24.470Z] GET https://api.zeit.co/www/user : 35825.794ms
> Deploying ~/blog/pelican/blog/public under 1oglop1
> Using project blog
[now-client-debug] 2019-11-14T21:00:24.491Z Creating deployment...
[now-client-debug] 2019-11-14T21:00:24.491Z Provided 'path' is a directory. Reading subpaths...
[now-client-debug] 2019-11-14T21:00:24.493Z Read 4 subpaths
@1oglop1
1oglop1 / now.json
Created Oct 24, 2019
how about Now.sh?
View now.json
{
"version": 2,
"name": "my-python-project",
"builds": [
{ "src": "www/**/*", "use": "@now/static" },
{ "src": "api/**/*.py", "use": "@now/python" }
],
"routes": [
{
"src": "/",
@1oglop1
1oglop1 / get_cert_chain.py
Created Oct 5, 2019
Get fingerprints of certificates in certificate chain (python)
View get_cert_chain.py
"""
https://stackoverflow.com/questions/19145097/
"""
import socket
from OpenSSL import SSL
import certifi
hostname='www.google.com'
port=443
@1oglop1
1oglop1 / final_cfn_template.json
Last active Feb 18, 2019
Sceptre state machine definition resolver
View final_cfn_template.json
{
"Outputs": {
"Arn": {
"Value": {
"Ref": "sfnname"
}
}
},
"Parameters": {
"RoleArn": {
@1oglop1
1oglop1 / iam_json.py
Last active Oct 9, 2018
Convert AWS IAM Credential Report csv to JSON for elasticsearch ingestion.
View iam_json.py
"""
AWS IAM credential report produces csv with bit unusual values which
complicated ES ingestion.
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
This simple script converts the 'null' values into correct form.
"""
import csv
import json
from dateutil.parser import parse
View tensor.txt
(anaserp) C:\Users\win10\serp>serpent train context 1
c:\users\win10\anaconda3\envs\anaserp\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Found 98 images belonging to 4 classes.
Found 14 images belonging to 4 classes.
2018-02-16 19:11:30.020571: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2018-02-16 19:11:30.264945: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1105] Found device 0 with properties:
name: GeForce GTX 760 major: 3 minor: 0 memoryClockRate(GHz): 1.0845
pciBusID: 0000:01:00.0
View duplicates.py
"""
Find duplicated files module
"""
import filecmp as fcmp
from pprint import pprint
import sys
import os
def args():
View dup_op.py
#!/usr/bin/python3
import filecmp as fcmp
import itertools as it
from pprint import pprint
import sys
import os
if 2 != len(sys.argv):
print("Usage: dup.py [FOLDER]")
exit()
@1oglop1
1oglop1 / dup.py
Created Aug 18, 2016
skill assesment
View dup.py
#!/usr/bin/python3
import filecmp as fcmp
import itertools as it
from pprint import pprint
import sys
import os
if 2 != len(sys.argv):
print("Usage: dup.py [FOLDER]")
exit()
You can’t perform that action at this time.