hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
2f9e17e9664aad34733bd9fdd9f0df727ab36cda
7,405
py
Python
utils/toolkit.py
eLeVeNnN/fastorch
7b73548b1b25c81dd41e4fc9cc7afb61bf8a5d2d
[ "MIT" ]
null
null
null
utils/toolkit.py
eLeVeNnN/fastorch
7b73548b1b25c81dd41e4fc9cc7afb61bf8a5d2d
[ "MIT" ]
null
null
null
utils/toolkit.py
eLeVeNnN/fastorch
7b73548b1b25c81dd41e4fc9cc7afb61bf8a5d2d
[ "MIT" ]
null
null
null
import numpy as np import torch.nn as nn from torch.nn.modules.loss import _Loss from torch.optim.optimizer import Optimizer import torch.optim as optim
36.840796
124
0.520324
import numpy as np import torch.nn as nn from torch.nn.modules.loss import _Loss from torch.optim.optimizer import Optimizer import torch.optim as optim class ProgressBar(object): def __init__(self, max_iter: int = 1, verbose: int = 1, bar_nums: int = 20, ...
6,912
11
321
c0a984092f028bc031c552bd5178bb8eb54691f9
5,494
py
Python
corr/corr_load.py
cmolder/voyager-analysis
a44dcc4df88eaaa83e451eead39846c9eed985f4
[ "MIT" ]
null
null
null
corr/corr_load.py
cmolder/voyager-analysis
a44dcc4df88eaaa83e451eead39846c9eed985f4
[ "MIT" ]
null
null
null
corr/corr_load.py
cmolder/voyager-analysis
a44dcc4df88eaaa83e451eead39846c9eed985f4
[ "MIT" ]
null
null
null
"""Compute correlation between access history and next prefetch, using load traces. Need to run from above corr/ directory. If you still get an error, try export PYTHONPATH=. """ import argparse import time from utils.load import get_open_function from utils.load_trace import get_instructions from utils.logging impor...
36.384106
106
0.638151
"""Compute correlation between access history and next prefetch, using load traces. Need to run from above corr/ directory. If you still get an error, try export PYTHONPATH=. """ import argparse import time from utils.load import get_open_function from utils.load_trace import get_instructions from utils.logging impor...
2,829
0
153
8b4addbb43fa421cea80cb0bfe023f54f404e3ad
6,411
py
Python
c_mock_generator/generate_mock.py
BjoernLange/C-Mock-Generator
91f0e331abf54dc5b6706796c02341e23b2e06d7
[ "MIT" ]
null
null
null
c_mock_generator/generate_mock.py
BjoernLange/C-Mock-Generator
91f0e331abf54dc5b6706796c02341e23b2e06d7
[ "MIT" ]
3
2020-06-07T12:48:17.000Z
2020-07-26T12:52:45.000Z
c_mock_generator/generate_mock.py
BjoernLange/C-Mock-Generator
91f0e331abf54dc5b6706796c02341e23b2e06d7
[ "MIT" ]
null
null
null
import argparse import os from typing import Iterable, Tuple, List, Optional from .module_definition import Module, Method, ParameterDocumentation from .module_definition.exceptions import MockGeneratorError from .util import CodeBuilder, TemplateFormatter, read_lines if __name__ == '__main__': main()
34.842391
79
0.6545
import argparse import os from typing import Iterable, Tuple, List, Optional from .module_definition import Module, Method, ParameterDocumentation from .module_definition.exceptions import MockGeneratorError from .util import CodeBuilder, TemplateFormatter, read_lines def line_starts_with_documentation(line: str) ->...
5,437
314
341
3d0efe650cbfc962d3f0b737e1aa9610e7336754
15,627
py
Python
tests/unit/threat_intel_downloader/test_main.py
opsbay/streamalert
557fb3f604661cdd9bd36486cccc8ce3a34bd1f1
[ "Apache-2.0" ]
null
null
null
tests/unit/threat_intel_downloader/test_main.py
opsbay/streamalert
557fb3f604661cdd9bd36486cccc8ce3a34bd1f1
[ "Apache-2.0" ]
1
2018-08-08T03:26:58.000Z
2018-08-08T03:26:58.000Z
tests/unit/threat_intel_downloader/test_main.py
opsbay/streamalert
557fb3f604661cdd9bd36486cccc8ce3a34bd1f1
[ "Apache-2.0" ]
null
null
null
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
41.34127
93
0.651949
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
670
0
52
ee62108b17d42c736856b8733f3ae4635f8dc080
596
py
Python
qctests/EN_range_check.py
BillMills/AutoQC
cb56fa5bb2115170ec204edd84e2d69ce84be820
[ "MIT" ]
17
2015-01-31T00:35:58.000Z
2020-10-26T19:01:46.000Z
qctests/EN_range_check.py
castelao/AutoQC
eb85422c1a6a5ff965a1ef96b3cb29240a66b506
[ "MIT" ]
163
2015-01-21T03:44:42.000Z
2022-01-09T22:03:12.000Z
qctests/EN_range_check.py
BillMills/AutoQC
cb56fa5bb2115170ec204edd84e2d69ce84be820
[ "MIT" ]
11
2015-06-04T14:32:22.000Z
2021-04-11T05:18:09.000Z
""" Implements the global range check used in the EN quality control system. """ def test(p, parameters): """ Runs the quality control check on profile p and returns a numpy array of quality control decisions with False where the data value has passed the check and True where it failed. """ ...
24.833333
74
0.644295
""" Implements the global range check used in the EN quality control system. """ def test(p, parameters): """ Runs the quality control check on profile p and returns a numpy array of quality control decisions with False where the data value has passed the check and True where it failed. """ ...
0
0
0
829dcf41a8949e0e449237d9b5a16d2d1449e4c8
6,241
py
Python
threading_util/pausable_thread.py
SDRAST/support
ebe081692fc8c892c1389156e979d5baa7f8f0e6
[ "Apache-2.0" ]
null
null
null
threading_util/pausable_thread.py
SDRAST/support
ebe081692fc8c892c1389156e979d5baa7f8f0e6
[ "Apache-2.0" ]
null
null
null
threading_util/pausable_thread.py
SDRAST/support
ebe081692fc8c892c1389156e979d5baa7f8f0e6
[ "Apache-2.0" ]
null
null
null
import logging import threading import time module_logger = logging.getLogger(__name__) __all__ = ["iterativeRun", "Pause", "PausableThread", "PausableThreadCallback"] def iterativeRun(run_fn): """ A decorator for running functions repeatedly inside a PausableThread. Allows one to pause and stop the thre...
27.986547
100
0.571703
import logging import threading import time module_logger = logging.getLogger(__name__) __all__ = ["iterativeRun", "Pause", "PausableThread", "PausableThreadCallback"] def iterativeRun(run_fn): """ A decorator for running functions repeatedly inside a PausableThread. Allows one to pause and stop the thre...
1,153
0
377
861046f2185daf66208a051d17e44c2d4a82f4e2
1,013
py
Python
python/bin/use_gene_id_for_missing_gene_names.py
jennomics/single-cell
34c951511e2be071fe3a8e11511d8ff5de8f540f
[ "MIT" ]
3
2020-11-14T02:19:34.000Z
2022-03-09T17:00:52.000Z
python/bin/use_gene_id_for_missing_gene_names.py
jennomics/single-cell
34c951511e2be071fe3a8e11511d8ff5de8f540f
[ "MIT" ]
7
2020-06-02T18:51:13.000Z
2021-07-08T22:48:45.000Z
python/bin/use_gene_id_for_missing_gene_names.py
jennomics/single-cell
34c951511e2be071fe3a8e11511d8ff5de8f540f
[ "MIT" ]
2
2021-04-21T17:19:10.000Z
2021-05-22T14:26:13.000Z
#!/bin/env python3 """ If gene name is simply totally missing, use the gene ID for the gene name. (Don't confuse this with the case in which there is actualy a gene name embeded in the gene id, for which you would want to use the utility 'extract_name_embedded_in_gene_id.py'.) """ import argparse import gtfez # co...
25.325
85
0.662389
#!/bin/env python3 """ If gene name is simply totally missing, use the gene ID for the gene name. (Don't confuse this with the case in which there is actualy a gene name embeded in the gene id, for which you would want to use the utility 'extract_name_embedded_in_gene_id.py'.) """ import argparse import gtfez def pa...
551
0
46
22a2ab9b0ebf3d05d6af95bfe871d127bdeb4b36
1,334
py
Python
model/Schedule.py
shionart/test_flask
f27477357bcfe939012f5a38523f238fa84de85b
[ "MIT", "Unlicense" ]
1
2021-07-22T14:57:31.000Z
2021-07-22T14:57:31.000Z
model/Schedule.py
shionart/test_flask
f27477357bcfe939012f5a38523f238fa84de85b
[ "MIT", "Unlicense" ]
null
null
null
model/Schedule.py
shionart/test_flask
f27477357bcfe939012f5a38523f238fa84de85b
[ "MIT", "Unlicense" ]
null
null
null
from model.Control import Control from model.Sensor import Sensor from apscheduler.schedulers.background import BackgroundScheduler # The "apscheduler." prefix is hard coded scheduler = BackgroundScheduler({ 'apscheduler.executors.default': { 'class': 'apscheduler.executors.pool:ThreadPoolExecutor', ...
32.536585
93
0.598951
from model.Control import Control from model.Sensor import Sensor from apscheduler.schedulers.background import BackgroundScheduler # The "apscheduler." prefix is hard coded scheduler = BackgroundScheduler({ 'apscheduler.executors.default': { 'class': 'apscheduler.executors.pool:ThreadPoolExecutor', ...
0
0
0
28be2a632bb1b6e14ddbeb0afac9fa4520012efa
390
py
Python
archived/consoletest.py
CubeFlix/emos
7f84100908e78384c82777ec3bee0cc1b130cefb
[ "MIT" ]
1
2021-05-26T17:41:07.000Z
2021-05-26T17:41:07.000Z
archived/consoletest.py
CubeFlix/emos
7f84100908e78384c82777ec3bee0cc1b130cefb
[ "MIT" ]
null
null
null
archived/consoletest.py
CubeFlix/emos
7f84100908e78384c82777ec3bee0cc1b130cefb
[ "MIT" ]
null
null
null
import sys import os size = os.get_terminal_size() rows, cols = size.lines, size.columns data_to_add = b'Hello, world!' data = bytes((rows * cols) * b' ') data = data_to_add + data[len(data_to_add) : ] for row in range(rows): start = row * cols end = start + cols write(str(data[start : end], 'utf-8')) write('\n...
17.727273
46
0.666667
import sys import os def write(string): sys.stdout.write(string) sys.stdout.flush() size = os.get_terminal_size() rows, cols = size.lines, size.columns data_to_add = b'Hello, world!' data = bytes((rows * cols) * b' ') data = data_to_add + data[len(data_to_add) : ] for row in range(rows): start = row * cols end...
43
0
23
958f06b3471de3581f85d8b7924fb17c7793dd42
4,820
py
Python
pricelist/models.py
WillieIlus/jobscorner
ed3734468ea0e88a306a1d29bc876562e940f4fb
[ "bzip2-1.0.6" ]
2
2020-04-12T13:18:35.000Z
2021-04-02T04:18:17.000Z
pricelist/models.py
WillieIlus/jobscorner
ed3734468ea0e88a306a1d29bc876562e940f4fb
[ "bzip2-1.0.6" ]
3
2020-02-11T23:58:53.000Z
2020-09-06T18:46:17.000Z
pricelist/models.py
WillieIlus/jobscorner
ed3734468ea0e88a306a1d29bc876562e940f4fb
[ "bzip2-1.0.6" ]
1
2020-08-17T08:29:41.000Z
2020-08-17T08:29:41.000Z
from __future__ import unicode_literals from builtins import super import numpy as np from django.db import models from django.urls import reverse from django.utils.text import slugify # what this moddule does is displaying the price median price, minunum and maximum price and displaying the companies that offer the...
32.789116
141
0.681743
from __future__ import unicode_literals from builtins import super import numpy as np from django.db import models from django.urls import reverse from django.utils.text import slugify # what this moddule does is displaying the price median price, minunum and maximum price and displaying the companies that offer the...
913
2,872
142
9c7547f725e65ef0319f9a63015b38a4e864c966
2,138
py
Python
tests/apps/minimal2/config/settings.py
blazelibs/blazeweb
b120a6a2e38c8b53da2b73443ff242e2d1438053
[ "BSD-3-Clause" ]
null
null
null
tests/apps/minimal2/config/settings.py
blazelibs/blazeweb
b120a6a2e38c8b53da2b73443ff242e2d1438053
[ "BSD-3-Clause" ]
6
2016-11-01T18:42:34.000Z
2020-11-16T16:52:14.000Z
tests/apps/minimal2/config/settings.py
blazelibs/blazeweb
b120a6a2e38c8b53da2b73443ff242e2d1438053
[ "BSD-3-Clause" ]
1
2020-01-22T18:20:46.000Z
2020-01-22T18:20:46.000Z
from __future__ import print_function from os import path from blazeweb.config import DefaultSettings basedir = path.dirname(path.dirname(__file__)) app_package = path.basename(basedir)
23.494505
78
0.661366
from __future__ import print_function from os import path from blazeweb.config import DefaultSettings basedir = path.dirname(path.dirname(__file__)) app_package = path.basename(basedir) class Default(DefaultSettings): def init(self): self.dirs.base = basedir self.app_package = app_package ...
1,391
54
496
742e878ab6e12a4761a497391a8a5daf4ad31b7e
380
py
Python
alex/utils/token.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
184
2015-02-11T04:14:41.000Z
2022-03-24T21:43:58.000Z
alex/utils/token.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
69
2015-01-11T04:57:22.000Z
2019-04-24T10:25:56.000Z
alex/utils/token.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
61
2015-03-04T10:52:13.000Z
2022-03-04T12:14:06.000Z
import urllib2
31.666667
83
0.697368
import urllib2 def get_token(cfg): token_url = cfg['General'].get('token_url') curr_session = cfg['Logging']['session_logger'].session_dir_name.value if token_url is not None: f_token = urllib2.urlopen(token_url.format(curr_session)) return f_token.read() else: raise Exception(...
341
0
23
0d33204beaccc33b5fa77749025dc9e04c89d176
2,955
py
Python
TimeRange.py
SanthoshS20/Sudoku-Challenge
2e7402c473b5c303e97bfa3535b6e46534bf1d0f
[ "Apache-2.0" ]
null
null
null
TimeRange.py
SanthoshS20/Sudoku-Challenge
2e7402c473b5c303e97bfa3535b6e46534bf1d0f
[ "Apache-2.0" ]
null
null
null
TimeRange.py
SanthoshS20/Sudoku-Challenge
2e7402c473b5c303e97bfa3535b6e46534bf1d0f
[ "Apache-2.0" ]
null
null
null
lines = [] with open('Time.txt') as f: lines = f.readlines() f.close() total_lines = len(lines) TimeTakenInDays = dict() DifficultLevelInEachDays = dict() day = 1 for index in range(total_lines): if(index!=0): difficultLevel, Time = lines[index].split(" ") TimeTakenInDays["Day "+str(day-1)] = ...
27.616822
85
0.607445
lines = [] with open('Time.txt') as f: lines = f.readlines() f.close() total_lines = len(lines) TimeTakenInDays = dict() DifficultLevelInEachDays = dict() day = 1 for index in range(total_lines): if(index!=0): difficultLevel, Time = lines[index].split(" ") TimeTakenInDays["Day "+str(day-1)] = ...
0
0
0
267be97d97e9fec907dba78e0d5f8931b294188f
308
py
Python
lib/logger.py
webclinic017/bitrush
5d76c98a17bb830dba1bdd103475c120903ded90
[ "MIT" ]
1
2022-01-09T21:17:23.000Z
2022-01-09T21:17:23.000Z
lib/logger.py
webclinic017/bitrush
5d76c98a17bb830dba1bdd103475c120903ded90
[ "MIT" ]
null
null
null
lib/logger.py
webclinic017/bitrush
5d76c98a17bb830dba1bdd103475c120903ded90
[ "MIT" ]
1
2022-01-09T21:17:17.000Z
2022-01-09T21:17:17.000Z
from os import environ from loguru import logger from sentry_sdk import capture_exception
18.117647
40
0.717532
from os import environ from loguru import logger from sentry_sdk import capture_exception def info(msg: str): logger.info(msg) def error(exception: Exception): logger.exception(exception) # to trigger error alerts if environ.get("STAGE") == "prod": capture_exception(exception)
169
0
46
111a96782e4cecc752b1df49f925b746936f637a
26,816
py
Python
agil/Chef/models/form.py
sadekmehri/agil
60f7143f1360f8f6aaeb659519e7182552ebabc5
[ "BSD-3-Clause" ]
1
2021-01-07T22:40:44.000Z
2021-01-07T22:40:44.000Z
agil/Chef/models/form.py
sadekmehri/agil
60f7143f1360f8f6aaeb659519e7182552ebabc5
[ "BSD-3-Clause" ]
null
null
null
agil/Chef/models/form.py
sadekmehri/agil
60f7143f1360f8f6aaeb659519e7182552ebabc5
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from flask_login import current_user from flask_wtf import FlaskForm from sqlalchemy import asc, or_ from wtforms import StringField, FloatField, SelectField, PasswordField, TextAreaField, HiddenField from wtforms.validators import DataRequired, Length, Regexp, InputRequired, ValidationEr...
47.128295
198
0.664976
from datetime import datetime from flask_login import current_user from flask_wtf import FlaskForm from sqlalchemy import asc, or_ from wtforms import StringField, FloatField, SelectField, PasswordField, TextAreaField, HiddenField from wtforms.validators import DataRequired, Length, Regexp, InputRequired, ValidationEr...
15,362
9,725
836
1398971302ab0cacdde5283f6e1b051d2130b83f
2,521
py
Python
authority/models.py
azizmb/django-authority
231be8ecdf696eab418ee5f0bf9cfb42722e28eb
[ "BSD-3-Clause" ]
2
2019-10-03T03:38:21.000Z
2021-09-30T22:47:33.000Z
authority/models.py
jsocol/django-authority
800c42759db817d49eea535fabdfcc4147d99e6c
[ "BSD-3-Clause" ]
null
null
null
authority/models.py
jsocol/django-authority
800c42759db817d49eea535fabdfcc4147d99e6c
[ "BSD-3-Clause" ]
1
2021-09-30T22:47:34.000Z
2021-09-30T22:47:34.000Z
from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth.models import User, Group from django.utils.translation import ugettext_lazy as _ from authority.managers import PermissionManag...
42.728814
202
0.711226
from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth.models import User, Group from django.utils.translation import ugettext_lazy as _ from authority.managers import PermissionManag...
248
431
81
13732902169601c5b96f9035d2641c2704e3729a
1,339
py
Python
lambda/function/valueextraction/test_classes.py
LouisLoison/deepblooGit
4691509acc252c887f428e693c72fa30d8f18a47
[ "Apache-2.0" ]
null
null
null
lambda/function/valueextraction/test_classes.py
LouisLoison/deepblooGit
4691509acc252c887f428e693c72fa30d8f18a47
[ "Apache-2.0" ]
null
null
null
lambda/function/valueextraction/test_classes.py
LouisLoison/deepblooGit
4691509acc252c887f428e693c72fa30d8f18a47
[ "Apache-2.0" ]
null
null
null
import unittest from classes import * if __name__ == '__main__': unittest.main()
34.333333
94
0.652726
import unittest from classes import * class TestClassUnit(unittest.TestCase): def setUp(self): self.unit1 = Unit("kilowatt", "power") self.unit2 = Unit("kW", "power") def test_attributes(self): """Test whether the attributes were correctly assigned""" # Test with unit full nam...
276
875
99
e4106635d7619aef4ac144460c96350e6a945f15
1,372
py
Python
localgraphclustering/algorithms/acl_list.py
vishalbelsare/LocalGraphClustering
a6325350997932d548a876deb259c2387fc2c809
[ "MIT" ]
106
2017-09-06T04:47:02.000Z
2022-03-30T07:43:27.000Z
localgraphclustering/algorithms/acl_list.py
pmacg/local-bipartite-clusters
d29e8d37c79e27b48e785b7b2c4bad9ea5d66b6d
[ "MIT" ]
51
2017-09-06T02:22:09.000Z
2021-12-15T11:39:28.000Z
localgraphclustering/algorithms/acl_list.py
vishalbelsare/LocalGraphClustering
a6325350997932d548a876deb259c2387fc2c809
[ "MIT" ]
38
2017-09-04T21:45:13.000Z
2022-01-19T09:48:25.000Z
import time import numpy as np
24.945455
89
0.462099
import time import numpy as np def acl_list(ref_node, g, alpha = 0.15, rho = 1.0e-5, max_iter = 100000, max_time = 100): n = g.adjacency_matrix.shape[0] r = np.zeros(n) p = np.zeros(n) nodes = [] for i in ref_node: r[i] = 1 thresh = rho*g.d[i] if r[i] > t...
1,318
0
23
5dc54e4673a11ed0255507be3766ee629180e1ed
5,380
py
Python
mmocr/datasets/base_dataset.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
2,261
2021-04-08T03:45:41.000Z
2022-03-31T23:37:46.000Z
mmocr/datasets/base_dataset.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
789
2021-04-08T05:40:13.000Z
2022-03-31T09:42:39.000Z
mmocr/datasets/base_dataset.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
432
2021-04-08T03:56:16.000Z
2022-03-30T18:44:43.000Z
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmcv.utils import print_log from mmdet.datasets.builder import DATASETS from mmdet.datasets.pipelines import Compose from torch.utils.data import Dataset from mmocr.datasets.builder import build_loader @DATASETS.register_module() class BaseDatas...
32.02381
75
0.569331
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmcv.utils import print_log from mmdet.datasets.builder import DATASETS from mmdet.datasets.pipelines import Compose from torch.utils.data import Dataset from mmocr.datasets.builder import build_loader @DATASETS.register_module() class BaseDatas...
638
0
54
458e196363715df31a63162c01d08a23e0f42486
3,221
py
Python
dvc/objects/diff.py
annmary-roy/dvc
eefede92b204084ad418ed300ac4eb480d696421
[ "Apache-2.0" ]
null
null
null
dvc/objects/diff.py
annmary-roy/dvc
eefede92b204084ad418ed300ac4eb480d696421
[ "Apache-2.0" ]
66
2021-03-29T09:02:26.000Z
2022-03-30T13:09:33.000Z
dvc/objects/diff.py
annmary-roy/dvc
eefede92b204084ad418ed300ac4eb480d696421
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import TYPE_CHECKING, List, Optional, Tuple if TYPE_CHECKING: from .file import HashFile ADD = "add" MODIFY = "modify" DELETE = "delete" UNCHANGED = "unchanged" @dataclass @dataclass @dataclass ROOT = ("",)
23.683824
71
0.588327
from dataclasses import dataclass, field from typing import TYPE_CHECKING, List, Optional, Tuple if TYPE_CHECKING: from .file import HashFile ADD = "add" MODIFY = "modify" DELETE = "delete" UNCHANGED = "unchanged" @dataclass class TreeEntry: in_cache: bool key: Tuple[str] obj: Optional["HashFile"] =...
2,315
542
89
8ebf57f798435311aa471271c473c4df844dc059
1,143
py
Python
setup.py
kngwyu/intrinsic-rewards
c2a8f98c0fd9292dc90f8857fa5ddb763ba8b994
[ "Apache-2.0" ]
8
2019-09-22T12:13:05.000Z
2022-03-31T11:52:13.000Z
setup.py
kngwyu/intrinsic-rewards
c2a8f98c0fd9292dc90f8857fa5ddb763ba8b994
[ "Apache-2.0" ]
2
2019-07-29T08:57:28.000Z
2019-11-29T10:35:35.000Z
setup.py
kngwyu/intrinsic-rewards
c2a8f98c0fd9292dc90f8857fa5ddb763ba8b994
[ "Apache-2.0" ]
1
2020-03-24T01:38:27.000Z
2020-03-24T01:38:27.000Z
import io import re from setuptools import find_packages, setup with io.open("int_rew/__init__.py", "rt", encoding="utf8") as f: version = re.search(r"__version__ = \"(.*?)\"", f.read()).group(1) setup( name="intrinsic_rewards", version=version, url="https://github.com/kngwyu/intrinsic_rewards", ...
32.657143
78
0.63692
import io import re from setuptools import find_packages, setup with io.open("int_rew/__init__.py", "rt", encoding="utf8") as f: version = re.search(r"__version__ = \"(.*?)\"", f.read()).group(1) setup( name="intrinsic_rewards", version=version, url="https://github.com/kngwyu/intrinsic_rewards", ...
0
0
0
f39d50bf7ed0edab4d1e0f39dcd916514d0e71d7
1,353
py
Python
source/location/migrations/0001_initial.py
kssvrk/teletrack
ce8e1ce0fcb333875fd54d1a69a59f265c0e2396
[ "BSD-3-Clause" ]
null
null
null
source/location/migrations/0001_initial.py
kssvrk/teletrack
ce8e1ce0fcb333875fd54d1a69a59f265c0e2396
[ "BSD-3-Clause" ]
null
null
null
source/location/migrations/0001_initial.py
kssvrk/teletrack
ce8e1ce0fcb333875fd54d1a69a59f265c0e2396
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-17 14:58 import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion
36.567568
120
0.604582
# Generated by Django 3.1.2 on 2020-10-17 14:58 import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( n...
0
1,163
23
8c8d29861002ac69dc53ae4d2b8dbdffec7fe001
1,178
py
Python
tests/symbols_test.py
JTSchwartz/chorecore-py
10acf36ef20db4583f27926b0fc18f0270b22cfc
[ "0BSD" ]
null
null
null
tests/symbols_test.py
JTSchwartz/chorecore-py
10acf36ef20db4583f27926b0fc18f0270b22cfc
[ "0BSD" ]
null
null
null
tests/symbols_test.py
JTSchwartz/chorecore-py
10acf36ef20db4583f27926b0fc18f0270b22cfc
[ "0BSD" ]
null
null
null
import chorecore
69.294118
98
0.829372
import chorecore def test_fraction_to_symbol(): assert chorecore.symbols.fraction_to_symbol("1/2") == chorecore.fraction.Fraction.ONE_HALF assert chorecore.symbols.fraction_to_symbol("1/8") == chorecore.fraction.Fraction.ONE_EIGHTH assert chorecore.symbols.fraction_to_symbol("1/10") == chorecore.fraction.Fraction....
1,137
0
23
55ab91521c1b171d35f42ae28297981c244edf1a
735
py
Python
Mundo2/Desafio069.py
Marcoakira/Desafios_Python_do_Curso_Guanabara
c49b774148a2232f8f3c21b83e3dc97610480757
[ "MIT" ]
null
null
null
Mundo2/Desafio069.py
Marcoakira/Desafios_Python_do_Curso_Guanabara
c49b774148a2232f8f3c21b83e3dc97610480757
[ "MIT" ]
null
null
null
Mundo2/Desafio069.py
Marcoakira/Desafios_Python_do_Curso_Guanabara
c49b774148a2232f8f3c21b83e3dc97610480757
[ "MIT" ]
null
null
null
# Desafio069 quantas pessoas tem mais de 18, quantos homens, quantas mulheres com menos de 20. maiorDeIdade = int() homens = int() mulheresMenor = int() while True: idade = int(input('Qual a idade? ')) sexo = input('M para masculino, e F para feminino ').strip().lower() if idade > 18: maiorDeIdad...
28.269231
94
0.643537
# Desafio069 quantas pessoas tem mais de 18, quantos homens, quantas mulheres com menos de 20. maiorDeIdade = int() homens = int() mulheresMenor = int() while True: idade = int(input('Qual a idade? ')) sexo = input('M para masculino, e F para feminino ').strip().lower() if idade > 18: maiorDeIdad...
0
0
0
faac24cf431579bec22a2a840c0759c39b7237d8
2,445
py
Python
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
1
2021-11-11T05:17:21.000Z
2021-11-11T05:17:21.000Z
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
1
2021-12-27T00:39:20.000Z
2021-12-27T00:39:20.000Z
tests/test_hebrew_python.py
matan-h/hebrew-python
28e6ab2d14fcada9ffe228660f47ef2af244ab2a
[ "BSD-4-Clause" ]
null
null
null
import builtins import sys import unittest import hebrew_python.hook as hepy from io import StringIO from contextlib import contextmanager import re # for debug the test: true_stdout = sys.stdout true_stderr = sys.stderr DEBUG = False if DEBUG: from ddebug import dd dd.add_output_folder(with_errors=False) tr...
27.47191
91
0.610634
import builtins import sys import unittest import hebrew_python.hook as hepy from io import StringIO from contextlib import contextmanager import re # for debug the test: true_stdout = sys.stdout true_stderr = sys.stderr DEBUG = False if DEBUG: from ddebug import dd dd.add_output_folder(with_errors=False) tr...
1,722
254
45
cac639136f54f0b421674840cca71ea62ce9f26d
1,176
py
Python
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
Q01__/46_LRU_Cache/Solution.py
hsclinical/leetcode
48a57f6a5d5745199c5685cd2c8f5c4fa293e54a
[ "Apache-2.0" ]
null
null
null
# Your LRUCache object will be instantiated and called as such: # obj = LRUCache(capacity) # param_1 = obj.get(key) # obj.put(key,value)
33.6
64
0.517857
class LRUCache: def __init__(self, capacity: int): self.dataDict = {} self.dataList = [] self.capacity = capacity def get(self, key: int) -> int: if key in self.dataList: index = self.dataList.index(key) if index != len(self.dataList) - 1: ...
933
-6
108
32d3f498b5b97c7424f3051a49ccac8f836f7aca
4,115
py
Python
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
astrom/kmtn-astrometry/kmtn_astrom.py
changsuchoi/cspy
9fa8f125bed368f636ea19180e742f8304bbc432
[ "MIT" ]
null
null
null
# python code for KMTNET data astrometry (specially CTIO data) # read kmtnet_astrom.txt first to understand the order and process # 2015.09.17 Changsu Choi from astropy.io import ascii import numpy as np import os,sys from astropy.io import fits import astropy.units as u import astropy.coordinates as coord import ast...
30.708955
380
0.72661
# python code for KMTNET data astrometry (specially CTIO data) # read kmtnet_astrom.txt first to understand the order and process # 2015.09.17 Changsu Choi from astropy.io import ascii import numpy as np import os,sys from astropy.io import fits import astropy.units as u import astropy.coordinates as coord import ast...
1,952
0
46
da23ddba88a387143815bdc7741f07171f29808d
823
py
Python
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
UCL/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
null
null
null
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
UCL/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
23
2020-06-15T11:06:17.000Z
2020-12-01T14:41:44.000Z
sksurgeryspeech/ui/sksurgeryspeech_command_line.py
SciKit-Surgery/scikit-surgeryspeech
4a2dcec3df98969a95863dc91fb5caaeb2d4a238
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 """Command line processing""" import argparse from sksurgeryspeech import __version__ from sksurgeryspeech.ui import sksurgeryspeech_demo def main(args=None): """Entry point for scikit-surgeryspeech application""" parser = argparse.ArgumentParser(description='scikit-surgeryspeech') ver...
24.939394
77
0.708384
# coding=utf-8 """Command line processing""" import argparse from sksurgeryspeech import __version__ from sksurgeryspeech.ui import sksurgeryspeech_demo def main(args=None): """Entry point for scikit-surgeryspeech application""" parser = argparse.ArgumentParser(description='scikit-surgeryspeech') ver...
0
0
0
b5579edae01fcdc963d77a96b7ec45ad274f61de
4,862
py
Python
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
1
2022-02-21T00:47:41.000Z
2022-02-21T00:47:41.000Z
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
null
null
null
scripts/pytorch_wrapper.py
JLivingston01/py_research
928f74287039a933d27c5a5dc3df8db4cb79c152
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import torch from torch import nn from torch.utils.data import TensorDataset,DataLoader X = np.random.normal(5,2,(10000,30)) Y = X@np.random.normal(1,2,30) model = NeuralNetwork( configuration= nn.Sequential( nn.Linear(30,10), ...
24.31
78
0.569724
import numpy as np import pandas as pd import torch from torch import nn from torch.utils.data import TensorDataset,DataLoader class NeuralNetwork(nn.Module): def __init__(self, configuration, loss_fn, optimizer, lr, batch_s...
2,132
10
225
b56b84899f7a80aac99a7d6d79d83e0d3df834a8
958
py
Python
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
null
null
null
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
10
2020-02-11T23:34:28.000Z
2022-03-11T23:16:12.000Z
scraper/storage_spiders/kkfashionvn.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
3
2018-08-05T14:54:25.000Z
2021-06-07T01:49:59.000Z
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='mo-ta']/p[1]", 'price' : "//span[@class='item_price']", 'category' : "//div[@class='tieu-de']/h1/a", 'descriptio...
35.481481
111
0.609603
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='mo-ta']/p[1]", 'price' : "//span[@class='item_price']", 'category' : "//div[@class='tieu-de']/h1/a", 'descriptio...
0
0
0
209e7d84d4d078f6bb157ff3081913b22bb20177
835
py
Python
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
307
2020-05-20T18:08:49.000Z
2022-03-21T19:55:08.000Z
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
92
2020-07-21T18:29:13.000Z
2022-03-28T07:25:54.000Z
Python/benchmarking/struct_deserialization.py
felixbinder/tdw
eb2b00b74b9fcf8ef2dcba1baa62424640c520b1
[ "BSD-2-Clause" ]
53
2020-07-14T15:55:17.000Z
2022-03-20T16:20:01.000Z
from time import time from tdw.controller import Controller from tdw.tdw_utils import TDWUtils """ Benchmark the speed of deserializing structs (such as Vector3 and Quaternion). """ if __name__ == "__main__": o_id = 0 cmds = [{"$type": "teleport_object", "position": {"x": 0, "y": 0, "z": 0}, ...
26.935484
78
0.553293
from time import time from tdw.controller import Controller from tdw.tdw_utils import TDWUtils """ Benchmark the speed of deserializing structs (such as Vector3 and Quaternion). """ if __name__ == "__main__": o_id = 0 cmds = [{"$type": "teleport_object", "position": {"x": 0, "y": 0, "z": 0}, ...
0
0
0
f356fa4c071df3368258b586764b644585a00714
141
py
Python
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
exercises/en/exc_01_03.py
kaseyhackspace/eng-course-sample
0dd3821f34b9111eb4de8f0f24b7516061407caf
[ "MIT" ]
null
null
null
import numpy as np q=__ l=__ x = np.linspace(0,l,__) M = q/2*(l*x-x**2) V = q*(1/2-x) print("Moment") print(__) print("Shear") print(__)
10.071429
23
0.588652
import numpy as np q=__ l=__ x = np.linspace(0,l,__) M = q/2*(l*x-x**2) V = q*(1/2-x) print("Moment") print(__) print("Shear") print(__)
0
0
0
fc40c4432ff8ca12685d2abc38ad34faf14a4a57
3,654
py
Python
ybk/frontend/calendar.py
sopnic/ybk
e829aeed0ad867e62b372df357157f9b72bb4b15
[ "MIT" ]
null
null
null
ybk/frontend/calendar.py
sopnic/ybk
e829aeed0ad867e62b372df357157f9b72bb4b15
[ "MIT" ]
null
null
null
ybk/frontend/calendar.py
sopnic/ybk
e829aeed0ad867e62b372df357157f9b72bb4b15
[ "MIT" ]
1
2021-06-23T19:19:03.000Z
2021-06-23T19:19:03.000Z
from datetime import datetime, timedelta from collections import defaultdict from flask import render_template, request from flask.ext.login import login_required from ybk.models import Collection from ybk.settings import get_conf from .views import frontend @frontend.route('/calendar/') @login_required
35.134615
78
0.500274
from datetime import datetime, timedelta from collections import defaultdict from flask import render_template, request from flask.ext.login import login_required from ybk.models import Collection from ybk.settings import get_conf from .views import frontend @frontend.route('/calendar/') @login_required def calend...
3,380
0
22
d74b5019d83c90d0f1d6c091d0a5982297146bcc
350
py
Python
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
SomeCode/Fibonacci_Sequence/fib_recursive.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
for c in range(1, 50): print(c, ":", fibonacci(c))
23.333333
52
0.52
def fibonacci(n): if type(n) != int: raise TypeError('n must be a positive int') if n < 1: raise ValueError('n must be a positive int') if n == 1: return 1 elif n == 2: return 2 elif n > 2: return fibonacci(n - 1) + fibonacci(n - 2) for c in range(1, 50): ...
272
0
22
4a8e25813b907a40feaa1559a5f471ab13c22d1f
3,194
py
Python
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
5
2021-04-28T09:35:44.000Z
2021-09-10T18:18:08.000Z
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
null
null
null
experiments-tosem/rq1.py
testingautomated-usi/DeepHyperion
698e27cdea7581055de0d5f02d0585053452ac8f
[ "MIT" ]
2
2021-04-26T12:46:44.000Z
2021-09-16T08:27:53.000Z
# # This is the code for plotting the figures for RQ1. It is optimized towards plotting exactly those figures # Use data_analysis.py for explorative data analysis # import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from plotting_utils import load_data_from_folder, creat...
38.95122
114
0.716969
# # This is the code for plotting the figures for RQ1. It is optimized towards plotting exactly those figures # Use data_analysis.py for explorative data analysis # import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from plotting_utils import load_data_from_folder, creat...
2,649
0
46
682b75ede6c09c1b14fd7011e3d65b73f93372df
1,556
py
Python
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
245
2016-01-26T16:24:41.000Z
2022-03-07T08:00:36.000Z
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
49
2016-09-17T02:26:50.000Z
2021-12-20T06:53:19.000Z
example/telegrambot.py
Nachtalb/django-telegrambot
55aa2683e7453d7c65701fecdfcd029e86f34b7d
[ "BSD-3-Clause" ]
97
2016-04-17T22:05:19.000Z
2022-03-24T11:04:48.000Z
# -*- coding: utf-8 -*- # Example code for telegrambot.py module from telegram.ext import CommandHandler, MessageHandler, Filters from django_telegrambot.apps import DjangoTelegramBot import logging logger = logging.getLogger(__name__) # Define a few command handlers. These usually take the two arguments bot and # u...
31.12
91
0.726864
# -*- coding: utf-8 -*- # Example code for telegrambot.py module from telegram.ext import CommandHandler, MessageHandler, Filters from django_telegrambot.apps import DjangoTelegramBot import logging logger = logging.getLogger(__name__) # Define a few command handlers. These usually take the two arguments bot and # u...
1,036
0
114
0332766a058a8145c7c4f524085c8c21f3bf51b0
1,558
py
Python
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
core/face_alignment.py
zhaipro/yry
81587179b40fafeb6c24ef58489c59061f7368ce
[ "Apache-2.0" ]
null
null
null
import os import dlib from pathlib import Path root_path = Path(__file__).parent landmarks_model_path = os.path.join(root_path, 'shape_predictor_68_face_landmarks.dat') landmarks_detector = LandmarksDetector(landmarks_model_path)
43.277778
130
0.595635
import os import dlib from pathlib import Path root_path = Path(__file__).parent class LandmarksDetector: def __init__(self, predictor_model_path): """ :param predictor_model_path: path to shape_predictor_68_face_landmarks.dat file """ self.detector = dlib.get_frontal_fa...
889
403
24
6154f32c6c3c7577ec90b8c0271ec0cf22620436
4,210
py
Python
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/paper/paperSigma/CONUS_map.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
import os import rnnSMAP import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import imp imp.reload(rnnSMAP) rnnSMAP.reload() figTitleLst = ['Temporal Test', 'Spatial Test'] figNameLst = ['temporal', 'spatial'] matplotlib.rcParams.update({'font.size': 14}) matplotlib.rcParams.upda...
32.635659
77
0.587648
import os import rnnSMAP import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import imp imp.reload(rnnSMAP) rnnSMAP.reload() figTitleLst = ['Temporal Test', 'Spatial Test'] figNameLst = ['temporal', 'spatial'] matplotlib.rcParams.update({'font.size': 14}) matplotlib.rcParams.upda...
0
0
0
e3e55584798ccf7f1581a3f462a9c39c61dee078
15,483
py
Python
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
14
2020-06-12T00:22:29.000Z
2022-03-20T07:46:28.000Z
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
4
2020-08-07T18:20:24.000Z
2022-02-08T15:43:55.000Z
src/crosswalks/make_crosswalk.py
jujiang526/mta
d8f01cb6ab1cfd74109937c7ac4d2a8ae8be6084
[ "Apache-2.0" ]
3
2020-07-03T15:41:22.000Z
2021-09-26T19:24:45.000Z
import pandas as pd import geopandas as gpd import re import textdistance import numpy as np import math if __name__ == "__main__": main()
59.779923
182
0.613835
import pandas as pd import geopandas as gpd import re import textdistance import numpy as np import math def make_ordinal(s): ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(math.floor(n/10)%10!=1)*(n%10<4)*n%10::4]) name_ord = [] for x in s: x = x.title() m = re.findall(r'\d+', x) ...
15,293
0
46
0ba651c21a66e26b88a2cb551112680207e27de1
91
py
Python
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
3
2021-06-05T22:55:25.000Z
2022-01-23T11:48:21.000Z
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
6
2020-11-29T16:52:58.000Z
2020-12-01T21:51:58.000Z
setup.py
wtnb75/tarjinja
f6ac83d8bde0f476274002ba01d7709568f9a529
[ "MIT" ]
null
null
null
from setuptools import setup setup(install_requires=open("requirements.txt").readlines())
22.75
60
0.813187
from setuptools import setup setup(install_requires=open("requirements.txt").readlines())
0
0
0
db88f9801fb7811f0a3219bfa14db8d66420f6dc
35,685
py
Python
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
sip-4.19.21/configure.py
Clynie/StockSpider-1
4d3bec01f581c4c8dd45af668ce8aab4c98685ba
[ "MIT" ]
null
null
null
# This script handles the SIP configuration and generates the Makefiles. # # Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of SIP. # # This copy of SIP is licensed for use under the terms of the SIP License # Agreement. See the file LICENSE for more details. # # Thi...
34.148325
151
0.612414
# This script handles the SIP configuration and generates the Makefiles. # # Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of SIP. # # This copy of SIP is licensed for use under the terms of the SIP License # Agreement. See the file LICENSE for more details. # # Thi...
916
0
137
ea27b8518a7a50aa30fef48f4dcfe22e4fa2434b
908
py
Python
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
32
2017-02-22T14:54:01.000Z
2022-02-21T09:10:02.000Z
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
44
2016-11-03T21:41:53.000Z
2022-03-30T15:22:23.000Z
stix2matcher/test/test_object_path_quoting.py
clslgrnc/cti-pattern-matcher
bcd37eeb8c44e012ff1dbe4434c510f343575840
[ "BSD-3-Clause" ]
23
2016-11-07T19:03:13.000Z
2021-06-10T10:12:36.000Z
import pytest from stix2patterns.pattern import ParseException from stix2matcher.matcher import match _observations = [ { "type": "observed-data", "first_observed": "2004-10-11T21:44:58Z", "last_observed": "2004-10-11T21:44:58Z", "number_observed": 1, "objects": { ...
23.282051
49
0.562775
import pytest from stix2patterns.pattern import ParseException from stix2matcher.matcher import match _observations = [ { "type": "observed-data", "first_observed": "2004-10-11T21:44:58Z", "last_observed": "2004-10-11T21:44:58Z", "number_observed": 1, "objects": { ...
135
0
44
6f77ee6c621798575aa325b96f73f4cb76819cbc
987
py
Python
GitRangerLiu/0002/store_reldb.py
saurabh896/python-1
f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7
[ "MIT" ]
3,976
2015-01-01T15:49:39.000Z
2022-03-31T03:47:56.000Z
GitRangerLiu/0002/store_reldb.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
97
2015-01-11T02:59:46.000Z
2022-03-16T14:01:56.000Z
GitRangerLiu/0002/store_reldb.py
dwh65416396/python
1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a
[ "MIT" ]
3,533
2015-01-01T06:19:30.000Z
2022-03-28T13:14:54.000Z
#reference: https://www.tutorialspoint.com/python/python_database_access.htm import MySQLdb as mysqldb if __name__ == '__main__': store_reldb()
25.973684
79
0.570415
#reference: https://www.tutorialspoint.com/python/python_database_access.htm import MySQLdb as mysqldb def store_reldb(): db = mysqldb.connect(host = 'localhost', user = 'chris', passwd = '1314', \ db = 'show_me_the_code') cursor = db.cursor() #Create a table cursor.execute('...
810
0
23
ab5129ded6bb3b79a9f5e6771ecbe5565cc412bb
775
py
Python
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
examples/simple/routes/get_user.py
nekonoshiri/tiny-router
3bb808bcc9f9eb368ee390179dfc5e9d48cf8600
[ "MIT" ]
null
null
null
import json from typing import Any, Dict from ..request import Request from ..response import Response from ..router import Router router = Router() @router.get("/users/{user_id}")
25
76
0.654194
import json from typing import Any, Dict from ..request import Request from ..response import Response from ..router import Router router = Router() @router.get("/users/{user_id}") def get_user(request: Request) -> Response: user_id = request.path_parameters.get("user_id") if not user_id: return Re...
544
0
45
c32d8594788213d0081bff4ce0cd3bedd23da94d
350
py
Python
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
1
2021-01-30T16:50:40.000Z
2021-01-30T16:50:40.000Z
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
null
null
null
E033/main.py
alperkonuralp/AlperIlePython
64e4940648a74306951dbfd97b593cfbcd94b7f6
[ "Apache-2.0" ]
null
null
null
import os filename = os.path.join(os.getcwd(), "data.json") # f = open(filename) with open(filename, mode="w") as f: print("name :", f.name) print("mode :", f.mode) print("buffer :", f.buffer) print("encoding :", f.encoding) print("closed :", f.closed) print("errors :", f.errors) ...
23.333333
50
0.574286
import os filename = os.path.join(os.getcwd(), "data.json") # f = open(filename) with open(filename, mode="w") as f: print("name :", f.name) print("mode :", f.mode) print("buffer :", f.buffer) print("encoding :", f.encoding) print("closed :", f.closed) print("errors :", f.errors) ...
0
0
0
f0884fef8ad8756af5861bcee7d27f5a89b2c466
931
py
Python
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
1
2020-04-23T06:17:11.000Z
2020-04-23T06:17:11.000Z
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
null
null
null
setup.py
jmtapio/not-co-logger
2556b874511e583e483d84f1b5bbcec4cb0d74ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from setuptools import setup setup( name='notcologger', version='0.1.2', description='Not CO Logger, a cloud logging library.', long_description= '''This library is aimed at helping produce consistent searchable log entries to stdout in a cloud/container environment.''', k...
30.032258
70
0.649839
#!/usr/bin/env python3 from setuptools import setup setup( name='notcologger', version='0.1.2', description='Not CO Logger, a cloud logging library.', long_description= '''This library is aimed at helping produce consistent searchable log entries to stdout in a cloud/container environment.''', k...
0
0
0
846c34c251c0cbeffeac8f6640cbae570766595b
1,359
py
Python
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
10
2020-02-19T09:16:54.000Z
2022-02-04T16:19:33.000Z
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
47
2020-03-11T16:26:51.000Z
2022-02-04T15:29:40.000Z
src/sensai/tensorflow/tf_mlp.py
schroedk/sensAI
a2d6d7c6ab7bed9ccd5eac216dd988c49d69aec7
[ "MIT" ]
5
2020-03-12T21:33:22.000Z
2020-12-21T14:43:04.000Z
from tensorflow import keras from .tf_base import KerasVectorRegressionModel from .. import normalisation
46.862069
123
0.727005
from tensorflow import keras from .tf_base import KerasVectorRegressionModel from .. import normalisation class KerasMultiLayerPerceptronVectorRegressionModel(KerasVectorRegressionModel): def __init__(self, hiddenDims=(5,5), hiddenActivation="sigmoid", outputActivation="sigmoid", loss="mse", metrics=...
1,086
60
103
06f624c430991a082034d586c733777b98be2ca9
1,998
py
Python
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
run_scripts/convert_pmg_xsec_db.py
morgenst/PyAnalysisTools
f3b1f89870e7bbae1549c228a56d2c36bbba7af3
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import sys from PyAnalysisTools.base import get_default_argparser, default_init from PyAnalysisTools.base.YAMLHandle import YAMLLoader, YAMLDumper from PyAnalysisTools.AnalysisTools.XSHandle import Dataset if __name__ == '__main__': main(sys.argv[1:]...
39.176471
110
0.5996
#!/usr/bin/env python from __future__ import print_function import sys from PyAnalysisTools.base import get_default_argparser, default_init from PyAnalysisTools.base.YAMLHandle import YAMLLoader, YAMLDumper from PyAnalysisTools.AnalysisTools.XSHandle import Dataset def main(argv): parser = get_default_argparse...
1,653
0
23
a2becad7a4561b792574e2f10d402e4cc13be0c4
3,702
py
Python
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
6
2020-06-24T20:03:06.000Z
2021-09-21T10:05:17.000Z
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
2
2021-09-19T15:28:02.000Z
2021-09-21T17:29:38.000Z
tests/builder/test_decorator_builder.py
igrek51/nuclear
d610e63ad98143dcc77e77e4ecbdaed9c38c3314
[ "MIT" ]
2
2020-06-24T21:21:35.000Z
2021-08-01T17:24:38.000Z
from nuclear import * from nuclear.parser.error import CliDefinitionError from tests.asserts import MockIO, assert_error from functools import reduce import base64 cli = CliBuilder() @cli.add_command('hello') def say_hello(name: str, decode: bool = False, repeat: int = 1): """ Say hello to someone :para...
31.109244
86
0.619395
from nuclear import * from nuclear.parser.error import CliDefinitionError from tests.asserts import MockIO, assert_error from functools import reduce import base64 cli = CliBuilder() @cli.add_command('hello') def say_hello(name: str, decode: bool = False, repeat: int = 1): """ Say hello to someone :para...
2,509
0
138
9b1e9c8c1bcdcd96a6e85f61e36b49c932bf7d5a
1,083
py
Python
intake/migrations/0064_purgedvisitor.py
cforlando/intake
a5233d5c0f862f28ee265b9b4831405aabeec7e2
[ "MIT" ]
51
2016-07-20T02:26:57.000Z
2021-07-07T14:45:06.000Z
intake/migrations/0064_purgedvisitor.py
enterstudio/intake
793a8935914fdc8356321ec46e54d9ae1eeeee04
[ "MIT" ]
1,091
2016-04-29T18:07:45.000Z
2021-04-19T18:39:39.000Z
intake/migrations/0064_purgedvisitor.py
enterstudio/intake
793a8935914fdc8356321ec46e54d9ae1eeeee04
[ "MIT" ]
24
2016-06-14T18:10:43.000Z
2021-11-14T20:26:39.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-22 18:16 from __future__ import unicode_literals from django.db import migrations, models
27.075
114
0.493998
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-22 18:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('intake', '0063_purgedapplication_purgedstatusupdate'), ] operations = [ mig...
0
904
23
41483716ff9a653ae3d2f1df97b42c5f2ab2706f
67
py
Python
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
1
2018-09-22T10:10:42.000Z
2018-09-22T10:10:42.000Z
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
1
2018-09-16T14:44:47.000Z
2018-09-16T14:44:47.000Z
files/Factors.py
AjayRajNelapudi/Script-Evaluation-Assistant
200a3fc11e15f22b812c829d133707393be39c23
[ "MIT" ]
3
2018-09-16T14:37:55.000Z
2018-09-30T06:44:49.000Z
n = int(input()) for i in range(0, n+1): if n % i == 0: print(i)
16.75
23
0.507463
n = int(input()) for i in range(0, n+1): if n % i == 0: print(i)
0
0
0
c11ae1d44dda85eca2e9072897484d9f30c150e5
70,518
py
Python
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
6
2021-05-04T12:24:17.000Z
2021-07-28T03:20:48.000Z
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
null
null
null
neurallog/network/dataset.py
guimaraes13/NeuralLog
63cca557257ec67905b79048718db385cc4c3aab
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Victor Guimarães # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
40.181197
80
0.57011
# Copyright 2021 Victor Guimarães # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
23,995
0
680
ebce24889550988f1b0cf018468119ba1adbce7c
8,754
py
Python
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
29
2020-12-26T07:22:19.000Z
2022-03-07T13:40:09.000Z
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
150
2020-11-09T15:03:27.000Z
2022-03-07T15:36:07.000Z
hat/vector_control/migrations/0001_initial.py
ekhalilbsq/iaso
e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee
[ "MIT" ]
4
2020-11-09T10:38:13.000Z
2021-10-04T09:42:47.000Z
# Generated by Django 2.0 on 2018-12-07 11:05 from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.citext from django.db import migrations, models import django.db.models.deletion import uuid
37.570815
113
0.421407
# Generated by Django 2.0 on 2018-12-07 11:05 from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.citext from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True depen...
0
8,481
23
0c7f8da16f61bced21ebb02151a449d6604c473a
3,447
py
Python
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/windows/virtual_window_title_bar.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
######################################################################################################################## # # # This file is part of kAIvy ...
39.62069
136
0.495213
######################################################################################################################## # # # This file is part of kAIvy ...
744
0
27
b0334bea56715d8ba34f24b296effc7b67be149a
15,462
py
Python
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
367
2017-04-01T15:10:04.000Z
2021-12-23T18:26:03.000Z
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
22
2017-04-13T15:39:02.000Z
2017-10-05T14:55:26.000Z
poet/build/builder.py
sdispater/poet
5a07ee95e546ab6460bde43bf59837120e17dfa5
[ "MIT" ]
16
2017-04-14T08:19:48.000Z
2019-07-21T13:34:12.000Z
# -*- coding: utf-8 -*- import os import re import warnings from setuptools.dist import Distribution from setuptools.extension import Extension from pip.commands.wheel import WheelCommand from pip.status_codes import SUCCESS from semantic_version import Spec, Version from .._compat import Path, PY2, encode from ..ut...
29.677543
98
0.525805
# -*- coding: utf-8 -*- import os import re import warnings from setuptools.dist import Distribution from setuptools.extension import Extension from pip.commands.wheel import WheelCommand from pip.status_codes import SUCCESS from semantic_version import Spec, Version from .._compat import Path, PY2, encode from ..ut...
4,264
0
189
8aa35a9d3b950a629adc8f543bb25b86ccfe5177
24,262
py
Python
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
null
null
null
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
null
null
null
lingvo/core/beam_search_helper.py
shadowridgedev/lingvo
7a55484a3bc424f06ad8a921fb7e623ade73b0bf
[ "Apache-2.0" ]
1
2021-12-22T00:26:59.000Z
2021-12-22T00:26:59.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.435897
80
0.667958
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
4,294
0
102
a783b5038e9d34e2c321cad981dfaf4376994938
5,021
py
Python
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
1
2018-01-04T10:55:49.000Z
2018-01-04T10:55:49.000Z
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
null
null
null
vortex/VortexPayloadProtocol.py
Synerty/vortexpy
fcf4c4dccbdf300b04bb962276230a48434cba17
[ "MIT" ]
null
null
null
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import logging from abc import ABCMeta, abstractmethod from collections import deque from twisted.internet import reactor from twisted.internet.defe...
32.185897
89
0.614021
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import logging from abc import ABCMeta, abstractmethod from collections import deque from twisted.internet import reactor from twisted.internet.defe...
2,801
1,539
23
2fa250f6887152c9f5dfbcb9850a379e8af9a21f
4,568
py
Python
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
2
2019-11-12T08:35:45.000Z
2022-02-20T14:26:54.000Z
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
null
null
null
matsdp/apt/apt_plot.py
dianwdw/matsdp
b5b822036d2ae1dab00f02a39fe7ba4a51384017
[ "BSD-3-Clause" ]
1
2021-12-13T13:27:04.000Z
2021-12-13T13:27:04.000Z
# -*- coding: utf-8 -*- import matplotlib matplotlib.use("Agg")
44.784314
167
0.598074
# -*- coding: utf-8 -*- import matplotlib matplotlib.use("Agg") def plot_proxigram_csv(proxigram_csv_file_path, sysname, visible_elmt_list, interplation_on = False, fig_width=6, fig_height=5, fig_dpi = 600, fig_format = 'png'): args_dict = locals() import os import numpy as np import matplotlib...
4,474
0
25
7cca1a7ee26e5b0c58ebf6109568a30fa8e46997
37,125
py
Python
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
src/tac/core/wavenet_vocoder/models/wavenet.py
stefantaubert/Tacotron-2
710a3b39b48147307fa8eef2c9f635562f48d49a
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from src.etc import audio from src.tac.core.wavenet_vocoder import util from src.tac.core.wavenet_vocoder.models.gaussian import sample_from_gaussian from src.tac.core.wavenet_vocoder.models.mixture import \ sample_from_discretized_mix_logistic from src.tac.core.wavenet_v...
40.005388
168
0.713185
import numpy as np import tensorflow as tf from src.etc import audio from src.tac.core.wavenet_vocoder import util from src.tac.core.wavenet_vocoder.models.gaussian import sample_from_gaussian from src.tac.core.wavenet_vocoder.models.mixture import \ sample_from_discretized_mix_logistic from src.tac.core.wavenet_v...
8,819
0
264
d4cd7ebf8fa512c108f7df03d7c875dde967fc1e
2,022
py
Python
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
2
2020-05-12T03:36:33.000Z
2020-11-24T08:22:16.000Z
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
10
2021-03-30T13:20:42.000Z
2022-03-12T00:29:05.000Z
Recipe_Core_App/models/custom_user.py
ziibii88/Recipe_API_Project
486da89a1c71554930dbb5a535a9a5c27d26667b
[ "MIT" ]
null
null
null
"""Custom User Model""" from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.db import models class CustomUserManager(BaseUserManager): """Custom User Manager overridden from BaseUserManager for CustomUser""" def _create_user(self, email, password=None...
42.125
76
0.696835
"""Custom User Model""" from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.db import models class CustomUserManager(BaseUserManager): """Custom User Manager overridden from BaseUserManager for CustomUser""" def _create_user(self, email, password=None...
471
0
54
0ec5f780bd00d1bb32c388da1e6b8f06ae969ace
30,621
py
Python
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
1
2021-10-13T05:01:22.000Z
2021-10-13T05:01:22.000Z
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
null
null
null
train_valid.py
qbhan/pathembed
c21823529840593bf606e10696f5879e5adb51b2
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import torchvision.utils import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX import SummaryWriter # for mixed precision import torch.nn.utils as torch_util...
45.297337
269
0.616048
import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import torchvision.utils import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX import SummaryWriter # for mixed precision import torch.nn.utils as torch_util...
27,537
0
69
d35989135b0bef0d1ac8815fe7e35507a50d08b4
132
py
Python
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
1,101
2015-01-01T23:36:37.000Z
2022-03-29T18:11:25.000Z
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
429
2015-01-01T23:38:43.000Z
2022-03-28T08:43:54.000Z
examples/tenant_tutorial/tenant_tutorial/urls_public.py
pvandegeer/django-tenant-schemas
20c72782cee51a33fd5c56a0af7b2c653c1b6770
[ "MIT" ]
429
2015-01-01T23:29:17.000Z
2022-03-14T20:18:55.000Z
from django.conf.urls import url from tenant_tutorial.views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view()), ]
16.5
42
0.719697
from django.conf.urls import url from tenant_tutorial.views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view()), ]
0
0
0
ae3a0ae1a47c4b69b34bdf7d2eaeae6277915332
643
py
Python
people/views.py
JimInCO/bishopric_tools
6d7ddee52eb1f5884b051d9cb2eab9c241663423
[ "MIT" ]
null
null
null
people/views.py
JimInCO/bishopric_tools
6d7ddee52eb1f5884b051d9cb2eab9c241663423
[ "MIT" ]
2
2020-03-09T04:49:55.000Z
2020-03-10T04:08:16.000Z
people/views.py
JimInCO/bishopric_tools
6d7ddee52eb1f5884b051d9cb2eab9c241663423
[ "MIT" ]
null
null
null
from django.views.generic import ListView, CreateView, DetailView from events.models import Talk from . import forms from . import models
23.814815
81
0.709176
from django.views.generic import ListView, CreateView, DetailView from events.models import Talk from . import forms from . import models class MemberDetail(DetailView): model = models.Member slug_field = "pk" slug_url_kwarg = "pk" def get_context_data(self, **kwargs): ctx = super().get_cont...
166
266
69
cc1e1ca11436570f3c50cedfc283e510b9340d39
5,702
py
Python
cogs/funs.py
SpyRisk/EveDj
2f0bd8dd54f5da8e3c072961dbf9f34352e7a5d5
[ "MIT" ]
null
null
null
cogs/funs.py
SpyRisk/EveDj
2f0bd8dd54f5da8e3c072961dbf9f34352e7a5d5
[ "MIT" ]
null
null
null
cogs/funs.py
SpyRisk/EveDj
2f0bd8dd54f5da8e3c072961dbf9f34352e7a5d5
[ "MIT" ]
null
null
null
from discord.ext import commands from random import choice, shuffle import aiohttp import asyncio import discord import urllib.request, json import random import requests class Funs: """Commandes funs.""" @commands.command() async def avatar(self, ctx, user : discord.Member): """...
42.87218
323
0.590495
from discord.ext import commands from random import choice, shuffle import aiohttp import asyncio import discord import urllib.request, json import random import requests class Funs: """Commandes funs.""" def __init__(self, bot): self.bot = bot @commands.command() async de...
49
0
53
5f6ab16294339aea5e6325296ab3b6d7a03e0b9f
230
py
Python
tests/models.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
null
null
null
tests/models.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
14
2020-01-06T16:18:37.000Z
2022-01-20T19:40:56.000Z
tests/models.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
null
null
null
from django.db import models
23
66
0.717391
from django.db import models class Article(models.Model): title = models.CharField(verbose_name='Title', max_length=100) body = models.TextField(verbose_name='Body') def __unicode__(self): return self.title
27
150
23
7f2c3b138b5ad1b508898a36bd80800d2e2f4cad
4,909
py
Python
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
ctwingest/marker_table.py
henrygong/ctwingest
1eafea4e4faad62de2473cb77857d24c3d9c6e77
[ "MIT" ]
null
null
null
""" Create a Marker table from an AnnData Object. """ from statsmodels.stats.proportion import proportions_ztest from scipy.stats import ttest_ind import pandas as pd import numpy as np from ctwingest.scanpyapi import proportion_expressed_cluster, centroids, get_expression, std_gt_0_genes def scale_centroids(centers,...
43.061404
120
0.681605
""" Create a Marker table from an AnnData Object. """ from statsmodels.stats.proportion import proportions_ztest from scipy.stats import ttest_ind import pandas as pd import numpy as np from ctwingest.scanpyapi import proportion_expressed_cluster, centroids, get_expression, std_gt_0_genes def scale_centroids(centers,...
0
0
0
c31e4d77fa90c2a95e1a0a532f837cf00973ea85
5,235
py
Python
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
3
2019-11-20T07:51:28.000Z
2021-02-02T08:34:52.000Z
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
null
null
null
Agent/dqn.py
dacozai/QuantumDeepAdvantage
6ca2388141906e2782d29b60740db27925ee557f
[ "Apache-2.0" ]
1
2019-12-31T04:01:18.000Z
2019-12-31T04:01:18.000Z
################################################################# # Copyright (C) # # 2019 Qiskit Team # # Permission given to modify the code as long as you keep this # # declaration at the top ...
32.515528
112
0.640306
################################################################# # Copyright (C) # # 2019 Qiskit Team # # Permission given to modify the code as long as you keep this # # declaration at the top ...
4,088
-5
278
3fa893ae3b5d7fc4a34a49eff4fe696c69c68d19
12,818
py
Python
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
9
2020-05-13T22:45:43.000Z
2022-02-10T10:13:21.000Z
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
null
null
null
tests/networks_test.py
micbia/SegU-Net
69c3e3596d32d93b62d3636317e1dbf531f5862e
[ "MIT" ]
null
null
null
import numpy as np, time from keras.models import Model, load_model from keras.layers import Input, BatchNormalization, Activation, Dropout, concatenate from keras.layers.convolutional import Conv2D, Conv2DTranspose, Conv3D, Conv3DTranspose from keras.layers.pooling import MaxPooling2D, GlobalMaxPool2D, MaxPooling3D f...
58
181
0.599001
import numpy as np, time from keras.models import Model, load_model from keras.layers import Input, BatchNormalization, Activation, Dropout, concatenate from keras.layers.convolutional import Conv2D, Conv2DTranspose, Conv3D, Conv3DTranspose from keras.layers.pooling import MaxPooling2D, GlobalMaxPool2D, MaxPooling3D f...
12,398
0
23
ed7a1c4be9927b9f24bf9212440d3f9502a6b548
746
py
Python
account/admin.py
PrestonMonteWest/comp-mart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
1
2018-04-09T02:06:30.000Z
2018-04-09T02:06:30.000Z
account/admin.py
PrestonMonteWest/compmart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
1
2018-07-04T21:08:58.000Z
2018-07-09T02:34:50.000Z
account/admin.py
PrestonMonteWest/compmart
e7699f3c4ac1d77c447cd9300fb9912f4840d2a9
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.Address, AddressAdmin) admin.site.register(models.CreditCard, CreditCardAdmin)
39.263158
83
0.698391
from django.contrib import admin from . import models class AddressAdmin(admin.ModelAdmin): list_display = ('user', 'street', 'city', 'state', 'zip_code') raw_id_fields = ('user',) search_fields = ('street', 'city', 'state', 'zip_code') fields = ('user', 'street', 'city', 'state', 'zip_code') class Cr...
0
539
46
71a22cab3a5f46c536fa8e2e24f0611fcff253c2
1,091
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/base_instance.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_base_instance' @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLsizei,_cs.GLsizei,_cs.GLuint) @_f @_p.types(None,_cs.GLenum,_cs.GLsiz...
45.458333
119
0.810266
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_base_instance' def _f( function ): return _p.createFunction( function,_p.GL,'GL_ARB_base_instance',False) @_f @_p.types(None,_...
316
0
88
517e237ee7721179f23df9b8e1d8c509af07f2d3
4,046
py
Python
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
kits.py
gajanlee/UCAS-kits
75c985a8ea1e69bfe401c9b0555a7d526d4cc71e
[ "MIT" ]
null
null
null
import configparser import requests import time import numpy as np from PIL import Image from io import BytesIO import configparser from code import CodeRecognizer from utils import * if __name__ == "__main__": cf = configparser.ConfigParser() cf.read("info.conf") while process_orders(cf): t...
32.629032
171
0.561789
import configparser import requests import time import numpy as np from PIL import Image from io import BytesIO import configparser from code import CodeRecognizer from utils import * class UCAS: def __init__(self, user): self.__session = requests.Session() self.__user = user # self.login...
2,894
891
69
a353593d14c77c62907e98f74374cf5b3f4d0eb0
635
py
Python
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
SUBS/009_SUBS.py
domenicosolazzo/Rosalind
288fa79aa715de6632413ddaa0e2527a1d7ee265
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Motif in DNA Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' if __name__ == "__main__": main()
24.423077
57
0.620472
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Motif in DNA Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' def main(): with open('data/rosalind_subs.txt') as input_data: s,t = input_data.readlines() s = s.rstrip() t ...
382
0
22
d1bd912e0d30e4645b27be8b0a5b658a2ec85d3b
32
py
Python
library/python/dd/data_reader/__init__.py
darwinbeing/deepdriving-tensorflow
036a83871f3515b2c041bc3cd5e845f6d8f7b3b7
[ "MIT" ]
1
2018-12-13T14:00:03.000Z
2018-12-13T14:00:03.000Z
library/python/dd/data_reader/__init__.py
darwinbeing/deepdriving-tensorflow
036a83871f3515b2c041bc3cd5e845f6d8f7b3b7
[ "MIT" ]
null
null
null
library/python/dd/data_reader/__init__.py
darwinbeing/deepdriving-tensorflow
036a83871f3515b2c041bc3cd5e845f6d8f7b3b7
[ "MIT" ]
null
null
null
from .wrapper import CDataReader
32
32
0.875
from .wrapper import CDataReader
0
0
0
dde944103b320bbb0108dbd91b7db350f5d0fa72
1,339
py
Python
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
null
null
null
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
9
2020-06-06T01:49:00.000Z
2022-03-12T00:30:35.000Z
website/baseapp/models/order.py
raviarrow88/Django-ecommerce
9fd0340e4d2f1ff024092ba574702cd9dbfd2162
[ "MIT" ]
null
null
null
from django.db import models from .timestamp import TimeStamp # from .user import UserProfile from customer.models import UserProfile from .item import Item
30.431818
87
0.678865
from django.db import models from .timestamp import TimeStamp # from .user import UserProfile from customer.models import UserProfile from .item import Item class Order(TimeStamp): user =models.ForeignKey(UserProfile,on_delete=models.SET_NULL,null=True,blank=True) completed = models.BooleanField(default=False...
696
462
23
f2f6448df1215a4699a0b8cfe080518be476866d
2,243
py
Python
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
2
2021-04-09T12:22:50.000Z
2022-03-27T14:04:31.000Z
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
null
null
null
tests/utils.py
codefever/dremel.py
42d44a843e1ba5cefd32c14490a124f85f4c1c4e
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import random from google.protobuf import text_format from google.protobuf.descriptor import Descriptor, FieldDescriptor from .document_pb2 import Document from dremel.consts import * from dremel.simple import create_simple_storage
30.310811
93
0.598306
#!/usr/bin/env python import os import random from google.protobuf import text_format from google.protobuf.descriptor import Descriptor, FieldDescriptor from .document_pb2 import Document from dremel.consts import * from dremel.simple import create_simple_storage def read_docs(): sample_dir = os.path.join(os.pa...
1,860
0
115
f957582cf4088d5cebfe722f507924fba380cb9d
427
py
Python
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
simple-examples/07_other-examples/dict.py
wiltonpaulo/python-fullcourse
5befe60221a2e6f8a567a11e2f449245c11b3447
[ "MIT" ]
null
null
null
print("Way to transform two lists into one dict") purchases = ["rice", "beans", "pasta"] prices = ["2.00", "3.80", "4.90"] new_list = {} # for x in range(len(purchases)): # new_list[purchases[x]] = prices[x] # for id, item in enumerate(compras): # new_list[purchases[id]] = prices[id] new_list = {item: prices...
22.473684
70
0.662763
print("Way to transform two lists into one dict") purchases = ["rice", "beans", "pasta"] prices = ["2.00", "3.80", "4.90"] new_list = {} # for x in range(len(purchases)): # new_list[purchases[x]] = prices[x] # for id, item in enumerate(compras): # new_list[purchases[id]] = prices[id] new_list = {item: prices...
0
0
0
cccd40a89b5d3ec8ef38be6a8a9d8358e4b4a7ee
4,907
py
Python
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
null
null
null
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
null
null
null
Modules/visualization.py
EVA4-RS-Group/Phase2
7c551e3894979cc425dd51baeddbfa5a51b7878d
[ "Apache-2.0" ]
2
2020-08-26T02:33:33.000Z
2021-03-16T10:51:40.000Z
'''Plotting Utility. Grad-CAM implementation in Pytorch Reference: [1] xyz [2] xyz ''' import matplotlib.pyplot as plt import numpy as np import torch def denormalize(tensor, mean, std): """Denormalize the image for given mean and standard deviation. Args: tensor: Image tensor mean: Dataset...
32.282895
113
0.592011
'''Plotting Utility. Grad-CAM implementation in Pytorch Reference: [1] xyz [2] xyz ''' import matplotlib.pyplot as plt import numpy as np import torch def denormalize(tensor, mean, std): """Denormalize the image for given mean and standard deviation. Args: tensor: Image tensor mean: Dataset...
3,694
0
92
0c35895d716286e0c3bf45a9d0405b8ccf2b63fd
1,935
py
Python
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
null
null
null
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
null
null
null
deploy_java/DockerJava/javaTopo_image.py
vmeta42/neodata
00a42ab8d1adbb14f09bc4cc04720b0067241985
[ "Apache-2.0" ]
1
2022-03-16T08:31:28.000Z
2022-03-16T08:31:28.000Z
# coding:utf-8 import os import subprocess if __name__ == "__main__": j = JavaImage(codeDir=os.path.abspath(os.curdir), shell_file="javapack.sh", imageTag="harbor.dev.21vianet.com/cmdb/cmdb_javatopo:latest") j.begin() # print()
33.947368
115
0.61137
# coding:utf-8 import os import subprocess class JavaImage(): def __init__(self, *args, **kwargs): self.codeDir = kwargs["codeDir"] self.mvnScript = kwargs["shell_file"] self.dockerImage = kwargs["imageTag"] def mvn_command(self, capture_output=True): self.out = subprocess.ru...
1,520
-3
157
0472b3c394edd47e2e182c61417a754346641796
979
py
Python
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
null
null
null
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
1
2018-08-12T08:30:54.000Z
2018-08-12T08:30:54.000Z
uploads/core/forms.py
lindsay777/ITRI_hospital_UI
ee82b44e7e0edd28580a4fbb37c277ff85da8192
[ "MIT" ]
null
null
null
from django import forms from uploads.core.models import Document #from uploads.core.models import File # 創造一個依照model的form,會繼承欄位description document # class FileForm(forms.ModelForm): # class Meta: # model = File # fields = ('filename',) # file = forms.FileField() # pid = forms.CharField(...
29.666667
47
0.657814
from django import forms from uploads.core.models import Document #from uploads.core.models import File # 創造一個依照model的form,會繼承欄位description document class DocumentForm(forms.ModelForm): class Meta: model = Document fields = ('description', 'document', ) class nameForm(forms.Form): rename=form...
0
138
45
cd9cb66122591a5591685af112fa2e4503ad0c79
5,119
py
Python
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
gene_finding/genes_ppi_enrichr.py
ddhostallero/cxplain
c17a119faa384ffd2ca01529d470df2bd4b16813
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt pathway_file = '../../drp-data/pathways/9606.enrichr_pathway.edge' pathway = pd.read_csv(pathway_file, sep='\t', header=None) print("pathways:", pathway[0].nunique()) print("pathway genes:", pathway[1].nunique()) gsc_filtered = '../../KnowEng_GSC...
35.548611
128
0.676109
import pandas as pd import numpy as np import matplotlib.pyplot as plt pathway_file = '../../drp-data/pathways/9606.enrichr_pathway.edge' pathway = pd.read_csv(pathway_file, sep='\t', header=None) print("pathways:", pathway[0].nunique()) print("pathway genes:", pathway[1].nunique()) gsc_filtered = '../../KnowEng_GSC...
0
0
0
d39c4f37b45ab8280f00f4481b2167d271367281
215
py
Python
libDep.py
TheSinOfSloth/Remote_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
1
2020-04-06T14:13:57.000Z
2020-04-06T14:13:57.000Z
libDep.py
1hef001/Automatic_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
null
null
null
libDep.py
1hef001/Automatic_switchOff
7ae27a712a5702536bc51257374c7649375d6d92
[ "MIT" ]
null
null
null
import os import platform if(platform.system() == 'Windows'): FILENAME = 'terminateFile.bat' elif(platform.system() == 'Linux'): FILENAME = 'idle.sh' TIME = 900 PATH = os.getcwd() # print(platform.system())
21.5
35
0.669767
import os import platform if(platform.system() == 'Windows'): FILENAME = 'terminateFile.bat' elif(platform.system() == 'Linux'): FILENAME = 'idle.sh' TIME = 900 PATH = os.getcwd() # print(platform.system())
0
0
0
0b8766629c87c39c0ef02b967e9144a3b7d6946f
1,050
py
Python
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
1
2022-03-18T17:25:18.000Z
2022-03-18T17:25:18.000Z
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
deeptrack/benchmarks/test_fluorescence.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
import sys import numpy as np import itertools import deeptrack as dt import pytest u = dt.units @pytest.mark.parametrize( "size,gpu", [ *itertools.product( (64, 256, 512), [True, False], ) ], )
21.875
81
0.625714
import sys import numpy as np import itertools import deeptrack as dt import pytest u = dt.units def create_pipeline(output_region=(0, 0, 128, 128), num_particles=1): optics = dt.Fluorescence(output_region=output_region) mie = dt.Sphere( radius=2e-6, refractive_index=1.45, z=10, ...
753
0
45
5d71ad984bf074d92f237d6404d33add30a5bd3f
523
py
Python
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
13
2016-07-24T07:03:50.000Z
2021-07-26T07:50:56.000Z
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
1
2016-07-14T03:06:01.000Z
2016-07-14T03:06:01.000Z
scripts/euca2ools.py
nii-clouds/Literate-Computing-Basics
9bc03edafd503c2215f0e9028389e3ce31a418ec
[ "CC-BY-4.0" ]
5
2017-01-10T16:15:01.000Z
2019-08-29T06:21:12.000Z
# helper functions for Euca2ools import subprocess import os import time
29.055556
60
0.544933
# helper functions for Euca2ools import subprocess import os import time def run_euca2ools(envfile, cmd): env = os.environ.copy() with open(os.path.expanduser(envfile), 'r') as f: for l in f.readlines(): if l.startswith('export '): l = l[6:].strip() name, va...
426
0
23
eb75ac8fdab6ae6405b604f70c5f5ada8b3bf5a7
2,186
py
Python
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
24
2018-10-09T22:36:43.000Z
2021-10-15T16:34:42.000Z
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
2
2018-12-07T20:01:13.000Z
2018-12-11T15:19:23.000Z
Psc2/songs/claudius_irae.py
psc-g/Psc2
6676fc67263c9268ff65784d583cb838cfd42c28
[ "Apache-2.0" ]
5
2018-12-07T15:37:57.000Z
2020-03-28T11:59:40.000Z
"""ClaudiusIrae song logic.""" import OSC from Psc2.songs import song from Psc2.modes import bass_doubler from Psc2.modes import looper class ClaudiusIrae(song.Song): """This defines the logic for ClaudiusIrae. For most of the song it is in bass-doubling mode, except for the solo section where the bass is aut...
34.15625
79
0.588747
"""ClaudiusIrae song logic.""" import OSC from Psc2.songs import song from Psc2.modes import bass_doubler from Psc2.modes import looper class ClaudiusIrae(song.Song): """This defines the logic for ClaudiusIrae. For most of the song it is in bass-doubling mode, except for the solo section where the bass is aut...
393
0
50
a3642725c5e6f2e8169b1cd241aec6bc6bae5734
3,035
py
Python
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
exercises/demo.py
Zaph-x/DistributedExercisesAAU
40ca2716e252aca46f840405a89fac3ffd37f122
[ "MIT" ]
null
null
null
import random from emulators.Device import Device from emulators.Medium import Medium from emulators.MessageStub import MessageStub # We extend the MessageStub here for the message-types we wish to communicate # the constructor-function takes the source and destination as arguments. These are used for "routing"...
43.357143
115
0.639868
import random from emulators.Device import Device from emulators.Medium import Medium from emulators.MessageStub import MessageStub # We extend the MessageStub here for the message-types we wish to communicate class PingMessage(MessageStub): # the constructor-function takes the source and destination as argumen...
2,083
12
174
e41a1c4a736dca7523e7626d2638116f83876bd8
19,910
py
Python
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
2
2020-05-29T06:31:53.000Z
2020-12-19T21:49:25.000Z
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
null
null
null
bike/refactor/test_renameMethod.py
debiancn/bicyclerepair
dd054e802d6d8ad80baeccee0396da68144f2a26
[ "ICU" ]
null
null
null
#!/usr/bin/env python import setpath import unittest from rename import rename import compiler from bike import testdata from bike.testutils import* from bike.transformer.save import save # Generic tests. These tests are designed to be run in the context of a ui # and in a package hierarchy structure ...
28.002813
140
0.547212
#!/usr/bin/env python import setpath import unittest from rename import rename import compiler from bike import testdata from bike.testutils import* from bike.transformer.save import save class RenameMethodTests: def test_renamesTheMethod(self): srcBefore=trimLines(""" class TheClass: ...
17,269
528
1,399
d37465f5ca29b0c5a0c74f20169fdda80f35c186
718
py
Python
care/users/api/serializers/lsg.py
CoronaSafeUP/care
22a658bdefa0e9af3727416a5c31ff0aaa5af873
[ "MIT" ]
null
null
null
care/users/api/serializers/lsg.py
CoronaSafeUP/care
22a658bdefa0e9af3727416a5c31ff0aaa5af873
[ "MIT" ]
null
null
null
care/users/api/serializers/lsg.py
CoronaSafeUP/care
22a658bdefa0e9af3727416a5c31ff0aaa5af873
[ "MIT" ]
null
null
null
from rest_framework import serializers from care.users.models import District, LocalBody, State, Ward, Block
20.514286
69
0.68663
from rest_framework import serializers from care.users.models import District, LocalBody, State, Ward, Block class StateSerializer(serializers.ModelSerializer): class Meta: model = State fields = "__all__" class DistrictSerializer(serializers.ModelSerializer): class Meta: model = Di...
0
487
115
fc39730a027f1990317acfd6696c41b7fecb8c57
2,196
py
Python
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
1
2022-01-27T22:29:19.000Z
2022-01-27T22:29:19.000Z
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
null
null
null
Combined Data/duplicate_addresses.py
alfredholmes/UK-Company-Data
69f87980309fbd9ef3434770a8a87cd4b600e6cb
[ "MIT" ]
null
null
null
import ijson, csv, json, datetime import sys sys.path.append('../lib') from accounts.company import Company if __name__ == '__main__': main()
29.28
249
0.638434
import ijson, csv, json, datetime import sys sys.path.append('../lib') from accounts.company import Company def main(): enterprises = {} print('loading enterprises') with open('combined_data.json', 'r') as f: for i, c in enumerate(ijson.items(f, 'item')): if i % 10000 == 0: print(i) address = frozens...
2,024
0
23
3a6a9407591ebbd3493d14eb399531f2d9d4dcaa
5,549
py
Python
dataLoader/batch.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
dataLoader/batch.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
dataLoader/batch.py
JRC1995/SocialMediaNER
236b22ded48f64516ebf0577c3b9d9d907db84e0
[ "MIT" ]
null
null
null
import numpy as np import random import re import copy
37.493243
260
0.609299
import numpy as np import random import re import copy def batcher(sample_tuples, pad_types, batch_size=32, bucket_size_factor=5, sort_by_idx=0, sort=True, shuffle=True, SEED=None): # sample_tuples = List of different types of lists of samples # Example: [train...
5,470
0
23
81559963f29d21ffc38158ededa6ad16e94ccb86
96
py
Python
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
13
2017-10-23T12:39:20.000Z
2022-03-04T16:58:44.000Z
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
5
2017-10-24T12:20:13.000Z
2017-10-25T13:31:04.000Z
yamldirs/__init__.py
datakortet/yamldirs
529f20a5ff3da46448828fc9c7c80ca417bb6e91
[ "MIT" ]
3
2017-10-24T12:20:39.000Z
2021-12-22T13:19:44.000Z
# -*- coding: utf-8 -*- __version__ = '1.1.15' from .filemaker import create_files # noqa
16
46
0.625
# -*- coding: utf-8 -*- __version__ = '1.1.15' from .filemaker import create_files # noqa
0
0
0
da0919706a2516295cd9fc9fb8d46007f77a23bf
2,468
py
Python
sscutils/metadata/bedrock/conversion.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
null
null
null
sscutils/metadata/bedrock/conversion.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
21
2021-09-15T15:31:22.000Z
2022-03-20T17:10:50.000Z
sscutils/metadata/bedrock/conversion.py
papsebestyen/sscutils
dff8b62ab31c9dfe1494264f9319e287945762bc
[ "MIT" ]
2
2021-09-08T14:12:00.000Z
2021-09-29T10:58:08.000Z
from dataclasses import dataclass from functools import partial from typing import Callable, List, Optional from colassigner.constants import PREFIX_SEP from ...utils import chainmap from .artifact_metadata import ArtifactMetadata from .column import Column from .feature_types import CompositeFeature, ForeignKey, Pri...
33.351351
74
0.673825
from dataclasses import dataclass from functools import partial from typing import Callable, List, Optional from colassigner.constants import PREFIX_SEP from ...utils import chainmap from .artifact_metadata import ArtifactMetadata from .column import Column from .feature_types import CompositeFeature, ForeignKey, Pri...
1,766
243
22
fdda3437a4cf366dbb07a6363fb2a6bbb3f104d3
637
py
Python
jinfo/utils/__init__.py
JBwdn/jinfo
b5933edd3ea3d27f4f7c1e0153e16750de0d1726
[ "MIT" ]
null
null
null
jinfo/utils/__init__.py
JBwdn/jinfo
b5933edd3ea3d27f4f7c1e0153e16750de0d1726
[ "MIT" ]
1
2020-12-07T14:07:14.000Z
2020-12-07T14:07:14.000Z
jinfo/utils/__init__.py
JBwdn/jinfo
b5933edd3ea3d27f4f7c1e0153e16750de0d1726
[ "MIT" ]
null
null
null
from jinfo.utils.one_hot_dna import one_hot_dna from jinfo.utils.random_DNASeq import random_DNASeq from jinfo.utils.DNASeq_from_NCBI import DNASeq_from_NCBI from jinfo.utils.seq_list_to_fasta import seq_list_to_fasta from jinfo.utils.seq_list_from_fasta import seq_list_from_fasta from jinfo.utils.seq_from_fasta import...
57.909091
69
0.897959
from jinfo.utils.one_hot_dna import one_hot_dna from jinfo.utils.random_DNASeq import random_DNASeq from jinfo.utils.DNASeq_from_NCBI import DNASeq_from_NCBI from jinfo.utils.seq_list_to_fasta import seq_list_to_fasta from jinfo.utils.seq_list_from_fasta import seq_list_from_fasta from jinfo.utils.seq_from_fasta import...
0
0
0
3be4143b4fa68543582d6616184d19d293e1fabd
1,464
py
Python
examples/command/actions.py
artificially-ai/python-design-patterns
f3b192f204e87f2c3164a854f70e5a2e6fd0707b
[ "Apache-2.0" ]
1
2021-06-28T15:21:15.000Z
2021-06-28T15:21:15.000Z
examples/command/actions.py
artificially-ai/python-design-patterns
f3b192f204e87f2c3164a854f70e5a2e6fd0707b
[ "Apache-2.0" ]
null
null
null
examples/command/actions.py
artificially-ai/python-design-patterns
f3b192f204e87f2c3164a854f70e5a2e6fd0707b
[ "Apache-2.0" ]
null
null
null
from multiprocessing import Pool from random import randrange from absl import logging from patterns.command.action import Action from patterns.command.callback.handler import Callback
31.826087
98
0.642077
from multiprocessing import Pool from random import randrange from absl import logging from patterns.command.action import Action from patterns.command.callback.handler import Callback class SwitchOnAction(Action): def perform(self): logging.info('Switching on the machine.') class SwitchOffAction(Act...
1,069
28
177
e8186f362f3a5c6e2c0bf8ddc167f936786e9755
829
py
Python
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
16
2017-03-31T04:41:51.000Z
2020-07-15T07:03:06.000Z
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
4
2018-07-03T05:39:36.000Z
2018-07-06T02:59:32.000Z
com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py
peoplepower/botlab
21cc90c558a17b7ef4a42bca247b437d2f968dc0
[ "Apache-2.0" ]
8
2017-04-01T21:07:59.000Z
2019-09-18T15:23:37.000Z
''' Created on February 25, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' from intelligence.intelligence import Intelligence class LocationMidnightMicroservice(Intelligence): """ Announce midnight t...
33.16
119
0.723764
''' Created on February 25, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' from intelligence.intelligence import Intelligence class LocationMidnightMicroservice(Intelligence): """ Announce midnight t...
0
0
0
1cbc07813f54a675480a7ef867561b7d1a5fd88a
311
py
Python
2015/day04/python/part2.py
jmkacz/practice-advent-of-code
c06f474576e91ed0778c8a30a51bad848a602eb6
[ "MIT" ]
null
null
null
2015/day04/python/part2.py
jmkacz/practice-advent-of-code
c06f474576e91ed0778c8a30a51bad848a602eb6
[ "MIT" ]
null
null
null
2015/day04/python/part2.py
jmkacz/practice-advent-of-code
c06f474576e91ed0778c8a30a51bad848a602eb6
[ "MIT" ]
null
null
null
import hashlib from typing import List
22.214286
46
0.572347
import hashlib from typing import List def compute_answer(lines: List[str]) -> int: result = 1 line = lines[0] while True: secret = (line + str(result)).encode() hash = hashlib.md5(secret).hexdigest() if hash[0:6] == "000000": return result result += 1
248
0
23
bc4831896be9b443c435adb7e470a5ed2b0aa1f6
9,224
py
Python
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/BaseClasses/Assembler.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
50.681319
174
0.66598
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
0
0
0
58d602b65cc23b213c43e06ad720d99779ca9444
836
py
Python
meiduo_mall/meiduo_mall/apps/meiduo_admin/serializer/orders.py
572314705/meiduo_24
d279719506c536d21141b65eabf92fb3fa2bcff0
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/meiduo_admin/serializer/orders.py
572314705/meiduo_24
d279719506c536d21141b65eabf92fb3fa2bcff0
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/meiduo_admin/serializer/orders.py
572314705/meiduo_24
d279719506c536d21141b65eabf92fb3fa2bcff0
[ "MIT" ]
null
null
null
from rest_framework import serializers from goods.models import SKU from orders.models import OrderInfo, OrderGoods class SKUSerializer(serializers.ModelSerializer): '''SKU''' class OrderGoodsSerialzier(serializers.ModelSerializer): """ 订单商品表 """ sku = SKUSerializer() class OrderSeri...
25.333333
60
0.648325
from rest_framework import serializers from goods.models import SKU from orders.models import OrderInfo, OrderGoods class SKUSerializer(serializers.ModelSerializer): '''SKU''' class Meta: model = SKU fields = ('name','default_image') class OrderGoodsSerialzier(serializers.ModelSerializer): ...
0
250
78
9489bfa545777ad8ca14dfc0924aa4cbbb07cf88
5,776
py
Python
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
3
2018-01-13T20:50:41.000Z
2020-02-24T13:35:08.000Z
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
null
null
null
examples/AllInOne/allinone_ownloop.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
6
2015-03-21T20:34:05.000Z
2021-06-08T04:04:33.000Z
#!/usr/bin/env python # # This application creates a Name Server, Event Server, # Pyro server, and clients, and uses a custom event loop to keep them # all running in parallel. # The custom loop runs in its own server thread otherwise we # can't run client invocations, obviously. # The main loop calls Pyro objects to s...
31.911602
86
0.721434
#!/usr/bin/env python # # This application creates a Name Server, Event Server, # Pyro server, and clients, and uses a custom event loop to keep them # all running in parallel. # The custom loop runs in its own server thread otherwise we # can't run client invocations, obviously. # The main loop calls Pyro objects to s...
4,338
59
322
fd6536b19aafb8bd6cbe2ae5992f2e0633363eb1
511
py
Python
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
3
2019-12-10T10:22:36.000Z
2019-12-12T16:36:11.000Z
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
null
null
null
examples/hello_template.py
orest-d/liquer
7a5b5a69cf673b4a849dd2da3050ccd75081e454
[ "MIT" ]
2
2019-11-14T16:26:52.000Z
2021-07-26T04:53:54.000Z
# Make it run from the examples directory import sys sys.path.append("..") from liquer import * @first_command @command # with default delimiters print (evaluate_template(""" Template example [[]] - $hello$ - $hello/greet$ - $hello/greet-everybody$ """)) # with custom delimiters print (evaluate_template(""" Temp...
15.484848
41
0.655577
# Make it run from the examples directory import sys sys.path.append("..") from liquer import * @first_command def hello(): return "Hello" @command def greet(greeting, who="world"): return f"{greeting}, {who}!" # with default delimiters print (evaluate_template(""" Template example [[]] - $hello$ - $hello/...
55
0
44
400dd9d970b186e950943a1ba8bfd942a1d184e9
710
py
Python
testbed.py
TuKo/rl
6ffc25c164f3160e5b747a1896b7953eada7ff46
[ "BSD-3-Clause" ]
null
null
null
testbed.py
TuKo/rl
6ffc25c164f3160e5b747a1896b7953eada7ff46
[ "BSD-3-Clause" ]
null
null
null
testbed.py
TuKo/rl
6ffc25c164f3160e5b747a1896b7953eada7ff46
[ "BSD-3-Clause" ]
null
null
null
import numpy as np
33.809524
67
0.569014
import numpy as np class Testbed(object): def __init__(self, agents, steps=1000): self._agents = agents self._steps = steps self._action_history = np.zeros((len(self._agents), steps)) self._reward_history = np.zeros((len(self._agents), steps)) def run(self, env): for a...
613
1
76