Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyTSPrf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
pyTSPrf
Commits
58759ad2ec35
Commit
58759ad2ec35
authored
9 years ago
by
Patrice Journoud
Browse files
Options
Downloads
Patches
Plain Diff
obsolete file supression
parent
a3818007090f
Branches
topic/default/dockerfile
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pytsprf/optimization.py
+0
-43
0 additions, 43 deletions
pytsprf/optimization.py
with
0 additions
and
43 deletions
pytsprf/optimization.py
deleted
100644 → 0
+
0
−
43
View file @
a3818007
# import redis
#
#
# class Optimization(object):
#
# def __init__(self):
# db = redis.Redis('localhost')
# def save_distance(self, key, value):
# """Save a key with some data into Redis.
# """
# try:
# # unicode objects must be encoded before hashing so we encode to
# # utf-8
# # TODO ?? Where does this encoding happen?
# with (yield from self.redis_pool) as conn:
# yield from conn.set(key, info)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return False
# return True
# def get_key_info(self, key: str) -> str:
# """Retrieve data about a key from Redis, or None if unavailable.
# """
# try:
# with (yield from self.redis_pool) as conn:
# info = yield from conn.get(key)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return None
# if info is None:
# return None
# return info.decode("utf-8")
# def destroy_key(self, key: str) -> bool:
# try:
# with (yield from self.redis_pool) as conn:
# yield from conn.delete(key)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return False
# return True
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment