Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
ed070c0e
Commit
ed070c0e
authored
3 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
Working on adding these functions to the grid
parent
991ea310
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
binarycpython/utils/distribution_functions.py
+832
-4
832 additions, 4 deletions
binarycpython/utils/distribution_functions.py
binarycpython/utils/functions.py
+14
-2
14 additions, 2 deletions
binarycpython/utils/functions.py
binarycpython/utils/grid.py
+688
-1
688 additions, 1 deletion
binarycpython/utils/grid.py
with
1534 additions
and
7 deletions
binarycpython/utils/distribution_functions.py
+
832
−
4
View file @
ed070c0e
This diff is collapsed.
Click to expand it.
binarycpython/utils/functions.py
+
14
−
2
View file @
ed070c0e
...
@@ -25,11 +25,25 @@ from collections import defaultdict
...
@@ -25,11 +25,25 @@ from collections import defaultdict
from
binarycpython
import
_binary_c_bindings
from
binarycpython
import
_binary_c_bindings
########################################################
# Unsorted
########################################################
class
catchtime
(
object
):
def
__enter__
(
self
):
self
.
t
=
time
.
clock
()
return
self
def
__exit__
(
self
,
type
,
value
,
traceback
):
self
.
t
=
time
.
clock
()
-
self
.
t
print
(
"
Took {}s
"
.
format
(
self
.
t
))
def
is_capsule
(
o
):
def
is_capsule
(
o
):
t
=
type
(
o
)
t
=
type
(
o
)
return
t
.
__module__
==
'
builtins
'
and
t
.
__name__
==
'
PyCapsule
'
return
t
.
__module__
==
'
builtins
'
and
t
.
__name__
==
'
PyCapsule
'
class
Capturing
(
list
):
class
Capturing
(
list
):
def
__enter__
(
self
):
def
__enter__
(
self
):
self
.
_stdout
=
sys
.
stdout
self
.
_stdout
=
sys
.
stdout
...
@@ -40,8 +54,6 @@ class Capturing(list):
...
@@ -40,8 +54,6 @@ class Capturing(list):
del
self
.
_stringio
# free up some memory
del
self
.
_stringio
# free up some memory
sys
.
stdout
=
self
.
_stdout
sys
.
stdout
=
self
.
_stdout
########################################################
########################################################
# utility functions
# utility functions
########################################################
########################################################
...
...
This diff is collapsed.
Click to expand it.
binarycpython/utils/grid.py
+
688
−
1
View file @
ed070c0e
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