Skip to content

Instantly share code, notes, and snippets.

@sureshvv
sureshvv / package.json
Created February 29, 2024 04:24
package.json dependencies issue
{
"name": "on-up-frontend",
"version": "2.0.9",
"description": "CoreUI React Open Source Bootstrap 4 Admin Template",
"author": "Łukasz Holeczek",
"copyright": "Copyright 2018 creativeLabs Łukasz Holeczek",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
==== example.js ====
function sub1() {
return 'hello'
}
function main1() {
return sub1()
}
export { sub1, main1 }
They say animal running fast is scary!::4-7::Fast Runners
from copy import deepcopy
from types import SimpleNamespace
from hypothesis import note, settings
from hypothesis.stateful import (invariant, precondition, rule,
RuleBasedStateMachine)
DIM = 3
SIZE = DIM * DIM
03:59:23:~/simplegui$ sudo apt-get install python-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-tk is already the newest version (2.7.15~rc1-1).
python-tk set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
04:40:39:~/simplegui$ sudo apt-get install python3-tk
Reading package lists... Done
Building dependency tree
@sureshvv
sureshvv / fox_hen_grain.py
Created June 10, 2017 05:03
fox_hen_grain.py
from hypothesis import note, settings
from hypothesis.stateful import RuleBasedStateMachine, rule, invariant, precondition
from hypothesis import strategies as st
class Item():
def __init__(self, name):
self.crossed = False
self.name = name
@sureshvv
sureshvv / diehard.py
Last active July 29, 2019 00:07
diehard.py
from hypothesis import note, settings
from hypothesis.stateful import RuleBasedStateMachine, rule, invariant, precondition
from hypothesis import strategies as st
class Person():
def __init__(self, time_taken):
self.crossed = False
self.time_taken = time_taken
@sureshvv
sureshvv / gist:a29cdb389f5f9a2b5952590d92b47a4b
Created February 16, 2017 06:41
check list for sublist
http://stackoverflow.com/questions/3847386/testing-if-a-list-contains-another-list-with-python
http://stackoverflow.com/questions/425604/best-way-to-determine-if-a-sequence-is-in-another-sequence-in-python
http://stackoverflow.com/questions/3313590/check-for-presence-of-a-sublist-in-python
@sureshvv
sureshvv / gist:4d7adbd495ba17fb4c468a120f55ec74
Created November 7, 2016 09:15
Result from gcloud app logs read
2016-11-07 08:51:25 default[test] [2016-11-07 08:51:25 +0000] [5] [INFO] Starting gunicorn 19.6.0
2016-11-07 08:51:25 default[test] [2016-11-07 08:51:25 +0000] [5] [INFO] Listening at: http://0.0.0.0:8080 (5)
2016-11-07 08:51:25 default[test] [2016-11-07 08:51:25 +0000] [5] [INFO] Using worker: sync
2016-11-07 08:51:25 default[test] [2016-11-07 08:51:25 +0000] [8] [INFO] Booting worker with pid: 8
2016-11-07 08:53:31 default[test] [2016-11-07 08:53:31 +0000] [5] [CRITICAL] WORKER TIMEOUT (pid:8)
2016-11-07 08:53:31 default[test] [2016-11-07 08:53:31 +0000] [8] [INFO] Worker exiting (pid: 8)
2016-11-07 08:53:31 default[test] [2016-11-07 08:53:31 +0000] [10] [INFO] Booting worker with pid: 10
2016-11-07 08:54:02 default[test] [2016-11-07 08:54:02 +0000] [5] [CRITICAL] WORKER TIMEOUT (pid:10)
2016-11-07 08:54:02 default[test] [2016-11-07 08:54:02 +0000] [10] [INFO] Worker exiting (pid: 10)
2016-11-07 08:54:03 default[test] [2016-11-07 08:54:03 +0000] [12] [INFO] Booting worker with pid: 12
class IMyEditComment(Interface):
eff_date = schema.Datetime(title=_(u"Effective date"), required=False)
exp_date = schema.Datetime(title=_(u"Expiration date"), required=False)
class MyEditCommentForm(EditCommentForm):
"""Form to edit an existing comment."""
form.extends(EditCommentForm, ignoreButtons=True)
fields += field.Fields(IMyEditComment)