Skip to content

Instantly share code, notes, and snippets.

Dan Haiduc danuker

Block or report user

Report or block danuker

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
@danuker
danuker / xoclasa.py
Created Nov 19, 2018
X și Zero cu clasa
View xoclasa.py
# X si zero - Tutorial #9 - Clase
class Tabla:
def __init__(self):
self.reprezentare = [
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' ']
]
@danuker
danuker / xo.py
Created Feb 6, 2018
X si Zero - reparat pentru Python 3
View xo.py
# X si zero
tabla = [
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' ']
]
def afisare(t):
@danuker
danuker / gist:5f7736d3306d6f69f50dbe7dd6c099d9
Created Jan 14, 2018
Parity gets hit by Syncing... it's Super Effective!
View gist:5f7736d3306d6f69f50dbe7dd6c099d9
2018-01-14 19:52:36 Starting Parity/v1.8.6-beta-2d051e4-20180109/x86_64-linux-gnu/rustc1.22.1
2018-01-14 19:52:36 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-14 19:52:36 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-14 19:52:36 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-14 19:52:36 State DB configuration: fast
2018-01-14 19:52:36 Operating mode: active
2018-01-14 19:52:36 Configured for Foundation using Ethash engine
2018-01-14 19:52:37 Updated conversion rate to Ξ1 = US$1319.53 (90219710 wei/gas)
2018-01-14 19:52:40 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.107:30303
2018-01-14 19:52:50 Syncing snapshot 0/807 #0 5/100 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 85 µs
@danuker
danuker / logfile.err
Created Jan 14, 2018
Parity trying to sync, almost finishing but not completing
View logfile.err
2018-01-14 17:05:32 Starting Parity/v1.8.6-beta-2d051e4-20180109/x86_64-linux-gnu/rustc1.22.1
2018-01-14 17:05:32 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-14 17:05:32 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-14 17:05:32 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-14 17:05:32 State DB configuration: fast
2018-01-14 17:05:32 Operating mode: active
2018-01-14 17:05:32 Configured for Foundation using Ethash engine
2018-01-14 17:05:33 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.107:30303
2018-01-14 17:05:33 Updated conversion rate to Ξ1 = US$1316.76 (90409496 wei/gas)
2018-01-14 17:05:43 Syncing snapshot 0/807 #0 4/100 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 76 µs
View gist:ec350847ca0ce7784d1183b8147ffecf
2018-01-09 23:45:35 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 23:45:35 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 23:45:35 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 23:45:35 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 23:45:35 State DB configuration: fast
2018-01-09 23:45:35 Operating mode: active
2018-01-09 23:45:35 Configured for Foundation using Ethash engine
2018-01-09 23:45:35 Updated conversion rate to Ξ1 = US$1239.18 (96069660 wei/gas)
2018-01-09 23:45:36 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 23:45:46 Syncing snapshot 0/305 #462052 7/50 peers 166 KiB chain 67 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 47 µs
View gist:beb599acdcf42a06440900f285641a8d
2018-01-09 22:14:54 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 22:14:54 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 22:14:54 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 22:14:54 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 22:14:54 State DB configuration: fast
2018-01-09 22:14:54 Operating mode: active
2018-01-09 22:14:54 Configured for Foundation using Ethash engine
2018-01-09 22:14:55 Updated conversion rate to Ξ1 = US$1216.81 (97835820 wei/gas)
2018-01-09 22:14:59 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 22:15:09 Syncing #374323 043f…4bd2 0 blk/s 0 tx/s 0 Mgas/s 0+ 0 Qed #374323 5/25 peers 239 KiB chain 67 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 40 µs
View gist:a759df6eaa420f9c695db88e153bdce7
2018-01-09 20:19:42 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 20:19:42 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 20:19:42 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 20:19:42 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 20:19:42 State DB configuration: fast
2018-01-09 20:19:42 Operating mode: active
2018-01-09 20:19:42 Configured for Foundation using Ethash engine
2018-01-09 20:19:42 Updated conversion rate to Ξ1 = US$1209.53 (98424690 wei/gas)
2018-01-09 20:19:42 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 20:19:52 Syncing snapshot 0/520 #0 3/25 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 49 µs
View fa_bani.py
# Loto edition
# pret bilet: 4.8 lei
# castig mediu din 2005: aprox. 14000000 lei
import random
castig_mediu = 14000000
bilet = 4.8
View holtwinters.py
# Holt-Winters algorithms to forecasting
# Coded in Python 2 by: Andre Queiroz
# Description: This module contains three exponential smoothing algorithms. They are Holt's linear trend method and Holt-Winters seasonal methods (additive and multiplicative).
# References:
# Hyndman, R. J.; Athanasopoulos, G. (2013) Forecasting: principles and practice. http://otexts.com/fpp/. Accessed on 07/03/2013.
# Byrd, R. H.; Lu, P.; Nocedal, J. A Limited Memory Algorithm for Bound Constrained Optimization, (1995), SIAM Journal on Scientific and Statistical Computing, 16, 5, pp. 1190-1208.
from sys import exit
from math import sqrt
from numpy import array
You can’t perform that action at this time.