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
ff4e062a6cffdd57e4c50516529c89cfd87fc0c9
176
py
Python
django_oac/admin.py
przemekk1385/django-oac
379b29921551ea1d53edb5e3fbb6fa8d3c972acb
[ "MIT" ]
null
null
null
django_oac/admin.py
przemekk1385/django-oac
379b29921551ea1d53edb5e3fbb6fa8d3c972acb
[ "MIT" ]
3
2022-03-02T18:08:13.000Z
2022-03-02T18:29:33.000Z
django_oac/admin.py
przemekk1385/django_oac
379b29921551ea1d53edb5e3fbb6fa8d3c972acb
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Token @admin.register(Token)
19.555556
54
0.75
from django.contrib import admin from .models import Token @admin.register(Token) class TokenAdmin(admin.ModelAdmin): readonly_fields = ("expires_in", "issued", "user")
0
69
22
52763570d82973690121027426a1bf6f68788156
2,739
py
Python
puzzler/puzzles/quasipolytwigs123.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
puzzler/puzzles/quasipolytwigs123.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
puzzler/puzzles/quasipolytwigs123.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
1
2022-01-02T16:54:14.000Z
2022-01-02T16:54:14.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id$ # Author: David Goodger <goodger@python.org> # Copyright: (C) 1998-2015 by David J. Goodger # License: GPL 2 (see __init__.py) """ Concrete quasi-polytrigs (order 1-3) puzzles. """ from puzzler.puzzles.polytwigs import ( QuasiPolytwigs123, OneSidedQuasiPolytwi...
23.016807
79
0.630522
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id$ # Author: David Goodger <goodger@python.org> # Copyright: (C) 1998-2015 by David J. Goodger # License: GPL 2 (see __init__.py) """ Concrete quasi-polytrigs (order 1-3) puzzles. """ from puzzler.puzzles.polytwigs import ( QuasiPolytwigs123, OneSidedQuasiPolytwi...
1,157
0
297
2237a8eabb975d8abd20c532c714a35f759dadda
1,119
py
Python
examples/qm8/qm8_MPNN.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
14
2017-10-12T23:47:23.000Z
2022-02-09T13:13:51.000Z
examples/qm8/qm8_MPNN.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
2
2017-08-02T20:35:13.000Z
2017-08-10T21:17:31.000Z
examples/qm8/qm8_MPNN.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
4
2017-06-04T05:24:47.000Z
2021-04-20T13:17:15.000Z
""" Script that trains MPNN models on qm8 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import numpy as np np.random.seed(123) import tensorflow as tf tf.set_random_seed(123) import deepchem as dc # Load QM8 dataset tasks, datasets, transfor...
22.836735
76
0.769437
""" Script that trains MPNN models on qm8 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import numpy as np np.random.seed(123) import tensorflow as tf tf.set_random_seed(123) import deepchem as dc # Load QM8 dataset tasks, datasets, transfor...
0
0
0
49d0cd1c9199f77307660872855704d55528d252
812
py
Python
parser/fase2/team14/Instrucciones/Raise.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/fase2/team14/Instrucciones/Raise.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/fase2/team14/Instrucciones/Raise.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from Instrucciones.Instruccion import Instruccion from Expresion.Relacional import *
28
95
0.578818
from Instrucciones.Instruccion import Instruccion from Expresion.Relacional import * class Raise(Instruccion): def __init__(self,level,exp): self.level=level self.exp=exp def ejecutar(self, ent): 'ejecutar raise' if self.level == 'notice': variabl...
56
634
25
089c178f8dd9e51931d2328bd36cb9b1d0fed1ba
12,608
py
Python
pysembles/Metrics.py
sbuschjaeger/Pysembles
7e69b0975a7d4373242c7026ade6c5fdbad4fe67
[ "MIT" ]
null
null
null
pysembles/Metrics.py
sbuschjaeger/Pysembles
7e69b0975a7d4373242c7026ade6c5fdbad4fe67
[ "MIT" ]
null
null
null
pysembles/Metrics.py
sbuschjaeger/Pysembles
7e69b0975a7d4373242c7026ade6c5fdbad4fe67
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import torch import scipy import torch from torch import nn from torch.autograd import Variable import torchvision import torchvision.transforms as transforms from sklearn.metrics import make_scorer, accuracy_score from pysembles.Utils import TransformTensorDataset ''' Some co...
36.651163
134
0.597081
import numpy as np import pandas as pd import torch import scipy import torch from torch import nn from torch.autograd import Variable import torchvision import torchvision.transforms as transforms from sklearn.metrics import make_scorer, accuracy_score from pysembles.Utils import TransformTensorDataset ''' Some co...
4,471
0
138
84c690c6ba318b5e4b00c8827552254d8ab2e7a5
1,147
py
Python
src/common/errors.py
sUeharaE4/gitlab-dashboard
4f86cfe21e625badb82086e5ba10f4b532ebb2d1
[ "MIT" ]
null
null
null
src/common/errors.py
sUeharaE4/gitlab-dashboard
4f86cfe21e625badb82086e5ba10f4b532ebb2d1
[ "MIT" ]
1
2022-01-02T01:31:06.000Z
2022-01-02T01:31:06.000Z
src/common/errors.py
sUeharaE4/gitlab-dashboard
4f86cfe21e625badb82086e5ba10f4b532ebb2d1
[ "MIT" ]
null
null
null
"""Provide Exception classes.""" from dataclasses import dataclass from pathlib import Path from typing import Any @dataclass(frozen=True) class SettingNotFoundError(Exception): """Error class for missing config file.""" conf_path: Path sample_conf_path: Path def __str__(self) -> str: """Cre...
29.410256
96
0.63993
"""Provide Exception classes.""" from dataclasses import dataclass from pathlib import Path from typing import Any @dataclass(frozen=True) class SettingNotFoundError(Exception): """Error class for missing config file.""" conf_path: Path sample_conf_path: Path def __str__(self) -> str: """Cre...
0
0
0
11e8a204b2ea1c7fb3c512dd2cf629e76b9ae908
820
py
Python
migration/migrator/migrations/system/20190708100715_add_worker_to_submitty_config.py
elihschiff/Submitty
8b980997b6f1dfcd73eb4cf4cca43398e67f96dc
[ "BSD-3-Clause" ]
411
2016-06-14T20:52:25.000Z
2022-03-31T21:20:25.000Z
migration/migrator/migrations/system/20190708100715_add_worker_to_submitty_config.py
KaelanWillauer/Submitty
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
[ "BSD-3-Clause" ]
5,730
2016-05-23T21:04:32.000Z
2022-03-31T10:08:06.000Z
migration/migrator/migrations/system/20190708100715_add_worker_to_submitty_config.py
KaelanWillauer/Submitty
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
[ "BSD-3-Clause" ]
423
2016-09-22T21:11:30.000Z
2022-03-29T18:55:28.000Z
""" Migration for the Submitty system. Adds bool to specify if the machine is a worker to Submitty.config """ from pathlib import Path import json import os # no need for down as email_enabled is not used in previous builds
28.275862
102
0.692683
""" Migration for the Submitty system. Adds bool to specify if the machine is a worker to Submitty.config """ from pathlib import Path import json import os def up(config): submitty_json = str(Path(config.submitty['submitty_install_dir'], 'config', 'submitty.json')) submitty_conf = str(Path(config.submitty['s...
549
0
45
499f8ef7663c3caef91b76d2f042d762e5ed0777
38,795
py
Python
hoomd/hpmc/util.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
hoomd/hpmc/util.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
hoomd/hpmc/util.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009-2017 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. R""" HPMC utilities """ from __future__ import print_function from __future__ import division # If numpy is unavailable, some utilities will not work try: imp...
44.643268
147
0.577007
# Copyright (c) 2009-2017 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. R""" HPMC utilities """ from __future__ import print_function from __future__ import division # If numpy is unavailable, some utilities will not work try: imp...
25,514
-12
362
78e137cacf618952ef009e93d9861c3cfb18fd96
186
py
Python
server/algorithms/__init__.py
young-geng/ResumeAnalytics
3bbe7ce2c6620ceeaa39b6c6feba1f080b5210d2
[ "MIT" ]
3
2015-02-18T04:15:35.000Z
2018-03-16T14:22:35.000Z
server/algorithms/__init__.py
young-geng/ResumeAnalytics
3bbe7ce2c6620ceeaa39b6c6feba1f080b5210d2
[ "MIT" ]
null
null
null
server/algorithms/__init__.py
young-geng/ResumeAnalytics
3bbe7ce2c6620ceeaa39b6c6feba1f080b5210d2
[ "MIT" ]
2
2015-02-10T07:03:46.000Z
2018-07-04T07:49:33.000Z
#!/usr/bin/env python from cos_sim import * from topic_model import * from vectorizer import * from algorithm_wrapper import * if __name__ == '__main__': print "Algorithm module!"
18.6
31
0.741935
#!/usr/bin/env python from cos_sim import * from topic_model import * from vectorizer import * from algorithm_wrapper import * if __name__ == '__main__': print "Algorithm module!"
0
0
0
879b85dbe02c5081f69ff78ce76136bf2a759c9a
6,023
py
Python
hive/utils/post.py
dpays/hivemind
362d7d13c735056f2c8ed8f65b20f2384131779f
[ "MIT" ]
null
null
null
hive/utils/post.py
dpays/hivemind
362d7d13c735056f2c8ed8f65b20f2384131779f
[ "MIT" ]
null
null
null
hive/utils/post.py
dpays/hivemind
362d7d13c735056f2c8ed8f65b20f2384131779f
[ "MIT" ]
null
null
null
"""Methods for normalizing dpayd post metadata.""" #pylint: disable=line-too-long import math import ujson as json from funcy.seqs import first from hive.utils.normalize import bbd_amount, rep_log10, safe_img_url, parse_time, utc_timestamp def post_basic(post): """Basic post normalization: json-md, tags, and fl...
35.017442
149
0.624772
"""Methods for normalizing dpayd post metadata.""" #pylint: disable=line-too-long import math import ujson as json from funcy.seqs import first from hive.utils.normalize import bbd_amount, rep_log10, safe_img_url, parse_time, utc_timestamp def post_basic(post): """Basic post normalization: json-md, tags, and fl...
0
0
0
a28e2c96b904e1d6354829c89351b0850d9ceef7
941
py
Python
action-demo_dev_kit.py
dixon415/snips-skill-weather-dixon
95fb1b5a493e6c938f949eb13f1a5af46c932a30
[ "MIT" ]
7
2019-03-13T21:11:29.000Z
2020-03-25T10:54:30.000Z
action-demo_dev_kit.py
dixon415/snips-skill-weather-dixon
95fb1b5a493e6c938f949eb13f1a5af46c932a30
[ "MIT" ]
null
null
null
action-demo_dev_kit.py
dixon415/snips-skill-weather-dixon
95fb1b5a493e6c938f949eb13f1a5af46c932a30
[ "MIT" ]
16
2019-04-04T11:08:09.000Z
2020-06-22T04:29:34.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from snipsTools import * from RelaySwitch import RelaySwitch from SHT31 import SHT31 from SnipsClients import SnipsMPU VERSION = '0.3.0' CONFIG_INI = 'config.ini' I18N_DIR = 'assets/i18n' config = SnipsConfigParser.read_configuration_file(CONFIG_INI).get('global') MQT...
27.676471
76
0.736451
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from snipsTools import * from RelaySwitch import RelaySwitch from SHT31 import SHT31 from SnipsClients import SnipsMPU VERSION = '0.3.0' CONFIG_INI = 'config.ini' I18N_DIR = 'assets/i18n' config = SnipsConfigParser.read_configuration_file(CONFIG_INI).get('global') MQT...
0
0
0
b74a6cd392d404857e901e20d2cc29c8e92dc23a
556
py
Python
rtt.py
afsimoneau/cca-test-suite
8e1a249ae66fd4e58a196c6280cd8c7a09094d32
[ "MIT" ]
1
2020-09-17T14:59:44.000Z
2020-09-17T14:59:44.000Z
rtt.py
afsimoneau/cca-test-suite
8e1a249ae66fd4e58a196c6280cd8c7a09094d32
[ "MIT" ]
null
null
null
rtt.py
afsimoneau/cca-test-suite
8e1a249ae66fd4e58a196c6280cd8c7a09094d32
[ "MIT" ]
null
null
null
import os,sys,subprocess,re lines = [] with os.popen("tshark -r "+sys.argv[1]+" -T fields -e tcp.analysis.ack_rtt") as sharky: for line in sharky: lines.append(line) cleanList = [] for dirty in lines: temp = re.sub("[^\d.]","",dirty) if temp!="": cleanList.append(temp)#filtering numbers = ...
26.47619
92
0.669065
import os,sys,subprocess,re lines = [] with os.popen("tshark -r "+sys.argv[1]+" -T fields -e tcp.analysis.ack_rtt") as sharky: for line in sharky: lines.append(line) cleanList = [] for dirty in lines: temp = re.sub("[^\d.]","",dirty) if temp!="": cleanList.append(temp)#filtering numbers = ...
0
0
0
b07ae1e15615b6f60b1ebdbb56b23dcc04cb02ae
746
py
Python
app/todos/models.py
kmnkit/web-todo
e06e42f5b68b2b9473fad820857634a9c5c0dadf
[ "MIT" ]
null
null
null
app/todos/models.py
kmnkit/web-todo
e06e42f5b68b2b9473fad820857634a9c5c0dadf
[ "MIT" ]
null
null
null
app/todos/models.py
kmnkit/web-todo
e06e42f5b68b2b9473fad820857634a9c5c0dadf
[ "MIT" ]
null
null
null
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator
28.692308
74
0.679625
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator class ToDo(models.Model): assignment = models.TextField(max_length=500, null=False) team = models.ForeignKey( "teams.Team", related_name="todos", on_delete=models.CASCADE ) assigned_member = mo...
28
599
23
16f327356cfca43f23896eb8064eb576c3a8a895
397
py
Python
app.py
BrunoCostaPrado/Hope
eb97359d7939f8edeaade0a8a9880a8bd600f38b
[ "MIT" ]
2
2021-11-27T19:46:36.000Z
2021-11-28T02:41:05.000Z
app.py
BrunoCostaPrado/Hope
eb97359d7939f8edeaade0a8a9880a8bd600f38b
[ "MIT" ]
null
null
null
app.py
BrunoCostaPrado/Hope
eb97359d7939f8edeaade0a8a9880a8bd600f38b
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, jsonify from flask_cors import CORS from Hope import get_response app = Flask(__name__) CORS(app) @app.get("/") @app.post("/predict") if __name__ == "__main__": app.run(debug=True)
20.894737
58
0.702771
from flask import Flask, render_template, request, jsonify from flask_cors import CORS from Hope import get_response app = Flask(__name__) CORS(app) @app.get("/") @app.post("/predict") def predict(): text = request.get_json().get("message") response = get_response(text) message = {"answer": response} ...
135
0
22
570cfc314b92388cc92855fea7600f5e8b1e443e
11,600
py
Python
q3/q3/drivers/ui/pyqt5.py
virtimus/makaronLab
10b9be7d7d65d3da6219f929ea7070dd5fed3a81
[ "0BSD" ]
2
2021-03-16T05:48:36.000Z
2021-10-11T01:55:48.000Z
q3/q3/drivers/ui/pyqt5.py
virtimus/makaronLab
10b9be7d7d65d3da6219f929ea7070dd5fed3a81
[ "0BSD" ]
null
null
null
q3/q3/drivers/ui/pyqt5.py
virtimus/makaronLab
10b9be7d7d65d3da6219f929ea7070dd5fed3a81
[ "0BSD" ]
1
2021-03-16T05:48:39.000Z
2021-03-16T05:48:39.000Z
# PYQT import sys #from ...TabPanel import TabPanel import sip from q3.ui.engine import qtw,qtc,qtg from ... import consts, prop, direction from ...ui import orientation, colors from ...moduletype import ModuleType from ...nodeiotype import NodeIoType from ...q3vector import Q3Vector from ...EventSignal import E...
34.017595
141
0.617931
# PYQT import sys #from ...TabPanel import TabPanel import sip from q3.ui.engine import qtw,qtc,qtg from ... import consts, prop, direction from ...ui import orientation, colors from ...moduletype import ModuleType from ...nodeiotype import NodeIoType from ...q3vector import Q3Vector from ...EventSignal import E...
9,847
40
999
50f3990e810f526bd6104ee6ca3d7e76acee228f
15,441
py
Python
tests/test_engine/test_queries/test_queryop_comparsion_lt.py
jqueguiner/montydb
55bb3099fe110dbcd1ee24a71479fb0861d993a4
[ "BSD-3-Clause" ]
null
null
null
tests/test_engine/test_queries/test_queryop_comparsion_lt.py
jqueguiner/montydb
55bb3099fe110dbcd1ee24a71479fb0861d993a4
[ "BSD-3-Clause" ]
null
null
null
tests/test_engine/test_queries/test_queryop_comparsion_lt.py
jqueguiner/montydb
55bb3099fe110dbcd1ee24a71479fb0861d993a4
[ "BSD-3-Clause" ]
null
null
null
import pytest from montydb.errors import OperationFailure from montydb.types import PY3, bson_ as bson from datetime import datetime from ...conftest import skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bs...
26.038786
75
0.590117
import pytest from montydb.errors import OperationFailure from montydb.types import PY3, bson_ as bson from datetime import datetime from ...conftest import skip_if_no_bson def count_documents(cursor, spec=None): return cursor.collection.count_documents(spec or {}) def test_qop_lt_1(monty_find, mongo_find): ...
14,168
0
741
f59fc69e416729d04e24fc03394e44035e390f32
4,738
py
Python
apps/project/views/project_views.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
1
2022-03-24T05:33:30.000Z
2022-03-24T05:33:30.000Z
apps/project/views/project_views.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
null
null
null
apps/project/views/project_views.py
ranyong1997/Sakura_Infinity
700c3e8497077b266958f1d26525469d1f0cd87f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # 项目详情视图 类 from django.db.models import Q from django.urls import reverse_lazy from django.views.generic import CreateView, ListView, DetailView, UpdateView, DeleteView from django.core.paginator import Paginator from project.forms.project_from import ProjectUpdateForm, ProjectCreateForm from ...
33.132867
89
0.679401
# -*- coding: utf-8 -*- # 项目详情视图 类 from django.db.models import Q from django.urls import reverse_lazy from django.views.generic import CreateView, ListView, DetailView, UpdateView, DeleteView from django.core.paginator import Paginator from project.forms.project_from import ProjectUpdateForm, ProjectCreateForm from ...
2,653
0
189
6a33c7fbc4ce6df729c2f4f2c17b051f3f947bcd
3,241
py
Python
ddpg.py
clairecw/rlkit
2aed5bb02678e0f291260d00f023298748c3e5fe
[ "MIT" ]
null
null
null
ddpg.py
clairecw/rlkit
2aed5bb02678e0f291260d00f023298748c3e5fe
[ "MIT" ]
null
null
null
ddpg.py
clairecw/rlkit
2aed5bb02678e0f291260d00f023298748c3e5fe
[ "MIT" ]
null
null
null
""" Example of running PyTorch implementation of DDPG on HalfCheetah. """ import copy from gym.envs.mujoco import HalfCheetahEnv from rlkit.data_management.env_replay_buffer import EnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.exploration_strategies.base import ( PolicyWrappedWithExp...
32.737374
76
0.69639
""" Example of running PyTorch implementation of DDPG on HalfCheetah. """ import copy from gym.envs.mujoco import HalfCheetahEnv from rlkit.data_management.env_replay_buffer import EnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.exploration_strategies.base import ( PolicyWrappedWithExp...
1,561
0
23
0a5fe845659ca977e8aa240ac99337f58c9df21a
2,084
py
Python
sdk/python/feast/aggregation.py
gojektech/feast
da763c6766cd7bec801312849e884b9dc8f8fb51
[ "Apache-2.0" ]
18
2018-12-10T09:47:10.000Z
2018-12-17T15:38:33.000Z
sdk/python/feast/aggregation.py
gojektech/feast
da763c6766cd7bec801312849e884b9dc8f8fb51
[ "Apache-2.0" ]
7
2018-12-10T10:42:43.000Z
2018-12-14T15:58:46.000Z
sdk/python/feast/aggregation.py
gojektech/feast
da763c6766cd7bec801312849e884b9dc8f8fb51
[ "Apache-2.0" ]
2
2018-12-11T02:53:44.000Z
2018-12-11T07:30:32.000Z
from datetime import timedelta from typing import Optional from google.protobuf.duration_pb2 import Duration from feast.protos.feast.core.Aggregation_pb2 import Aggregation as AggregationProto class Aggregation: """ NOTE: Feast-handled aggregations are not yet supported. This class provides a way to registe...
29.771429
124
0.636276
from datetime import timedelta from typing import Optional from google.protobuf.duration_pb2 import Duration from feast.protos.feast.core.Aggregation_pb2 import Aggregation as AggregationProto class Aggregation: """ NOTE: Feast-handled aggregations are not yet supported. This class provides a way to registe...
1,289
0
107
ca0941b999bfbf8b7035354ee3022a2f258995b6
2,083
py
Python
binary_search.py
leiverandres/sorting-algos
21b96770c05345efc6f923180a9ee4c2c4c9ca2e
[ "MIT" ]
null
null
null
binary_search.py
leiverandres/sorting-algos
21b96770c05345efc6f923180a9ee4c2c4c9ca2e
[ "MIT" ]
null
null
null
binary_search.py
leiverandres/sorting-algos
21b96770c05345efc6f923180a9ee4c2c4c9ca2e
[ "MIT" ]
null
null
null
import pyximport pyximport.install(pyimport=True) from random import randint import time import json from utils import create_rand_array if __name__ == '__main__': methods = ['linear', 'binary_search'] # array_sizes = [10**x for x in range(1, 9)] array_sizes = range(100000, 1000001, 50000) run_ti...
27.773333
65
0.566971
import pyximport pyximport.install(pyimport=True) from random import randint import time import json from utils import create_rand_array def binary_search(arr, query): low = -1 # arr[low] <= query high = len(arr) # arr[high] > query while high - low > 1: mid = (high + low) // 2 if arr[m...
912
0
92
c357849492ed125be61288bd251b8cf23c121f33
12,017
py
Python
homeassistant/components/webostv/__init__.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
null
null
null
homeassistant/components/webostv/__init__.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
24
2021-11-11T03:58:57.000Z
2022-03-31T06:24:13.000Z
homeassistant/components/webostv/__init__.py
aomann/core
5e71e7b775461cd4849c36075c6a1459a7d0ad22
[ "Apache-2.0" ]
null
null
null
"""Support for LG webOS Smart TV.""" from __future__ import annotations import asyncio from collections.abc import Callable from contextlib import suppress import json import logging import os from pickle import loads from typing import Any from aiowebostv import WebOsClient, WebOsTvPairError import sqlalchemy as db ...
31.375979
88
0.636848
"""Support for LG webOS Smart TV.""" from __future__ import annotations import asyncio from collections.abc import Callable from contextlib import suppress import json import logging import os from pickle import loads from typing import Any from aiowebostv import WebOsClient, WebOsTvPairError import sqlalchemy as db ...
1,886
0
84
422849a3cba136af3e2c94c4c9bcdad9126bf4e9
1,198
py
Python
old_and_simple_and_deprecated/xml_bez_daty_lub_celu_p33.py
mcjczapiewski/work
2540afa6b18bf6ff92a7c07b16695035785c0dd8
[ "MIT" ]
null
null
null
old_and_simple_and_deprecated/xml_bez_daty_lub_celu_p33.py
mcjczapiewski/work
2540afa6b18bf6ff92a7c07b16695035785c0dd8
[ "MIT" ]
null
null
null
old_and_simple_and_deprecated/xml_bez_daty_lub_celu_p33.py
mcjczapiewski/work
2540afa6b18bf6ff92a7c07b16695035785c0dd8
[ "MIT" ]
null
null
null
import os import regex import io from natsort import natsort_keygen, natsorted nkey = natsort_keygen() for subdir, dirs, files in os.walk( r"I:\INOWROCŁAW\DANE_IRON_MOUNTAIN\20190614\DĄBROWA BISKUPIA" ): dirs.sort(key=nkey) if not any(fname.upper().endswith(".XML") for fname in os.listdir(subdir)): ...
38.645161
79
0.495826
import os import regex import io from natsort import natsort_keygen, natsorted nkey = natsort_keygen() for subdir, dirs, files in os.walk( r"I:\INOWROCŁAW\DANE_IRON_MOUNTAIN\20190614\DĄBROWA BISKUPIA" ): dirs.sort(key=nkey) if not any(fname.upper().endswith(".XML") for fname in os.listdir(subdir)): ...
0
0
0
fafca969cf2663ef2c1da62b9e4563c3318885a7
159
py
Python
asios/kernel/fixup.py
Paolo-Maffei/retro
bf30cec3d82672eb2805392e77f3b21705129fc0
[ "Unlicense" ]
1
2022-02-12T19:35:39.000Z
2022-02-12T19:35:39.000Z
asios/kernel/fixup.py
Paolo-Maffei/retro
bf30cec3d82672eb2805392e77f3b21705129fc0
[ "Unlicense" ]
null
null
null
asios/kernel/fixup.py
Paolo-Maffei/retro
bf30cec3d82672eb2805392e77f3b21705129fc0
[ "Unlicense" ]
null
null
null
Import("env") env.Replace(LINKFLAGS = [fixLinkFlag(i) for i in env['LINKFLAGS']])
22.714286
67
0.641509
Import("env") def fixLinkFlag (s): return s[4:] if s.startswith('-Wl,-T') else s env.Replace(LINKFLAGS = [fixLinkFlag(i) for i in env['LINKFLAGS']])
49
0
23
b9b2a667051deb887cdfb4d7f8a00248b898f9e7
393
py
Python
api/utils/u_json.py
Samge0/UmengEventManage
4a5a9da8e269a90817a1c382eef0f657c47a10b1
[ "BSD-3-Clause" ]
null
null
null
api/utils/u_json.py
Samge0/UmengEventManage
4a5a9da8e269a90817a1c382eef0f657c47a10b1
[ "BSD-3-Clause" ]
null
null
null
api/utils/u_json.py
Samge0/UmengEventManage
4a5a9da8e269a90817a1c382eef0f657c47a10b1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2021/10/19 下午2:38 # @Author : Samge import datetime import json class DateEncoder(json.JSONEncoder): """ 处理日期格式转json """
21.833333
54
0.585242
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2021/10/19 下午2:38 # @Author : Samge import datetime import json class DateEncoder(json.JSONEncoder): """ 处理日期格式转json """ def default(self, obj): if isinstance(obj, datetime.datetime): return obj.strftime("%Y-%m-%d %H:%M:%...
171
0
26
516aae3bdfb65f04981d396ed6ac92d2a84d6848
14,676
py
Python
python/server/lib/sources/lsp_servers/go_gopls.py
hy172574895/EasyCompleteYou
45304558cbd12769feb5c845c205b22c5d805ac2
[ "WTFPL" ]
14
2020-02-12T07:03:12.000Z
2022-01-08T22:15:59.000Z
python/server/lib/sources/lsp_servers/go_gopls.py
hy172574895/EasyCompleteYou
45304558cbd12769feb5c845c205b22c5d805ac2
[ "WTFPL" ]
2
2020-02-24T17:01:20.000Z
2020-10-11T10:37:33.000Z
python/server/lib/sources/lsp_servers/go_gopls.py
hy172574895/EasyCompleteYou
45304558cbd12769feb5c845c205b22c5d805ac2
[ "WTFPL" ]
1
2021-04-10T06:42:20.000Z
2021-04-10T06:42:20.000Z
# Author: Jimmy Huang (1902161621@qq.com) # License: WTFPL import ECY.utils.lsp.language_server_protocol as lsp import ECY.utils.interface as scope_ import logging import os import threading global g_logger g_logger = logging.getLogger('ECY_server')
40.994413
109
0.514718
# Author: Jimmy Huang (1902161621@qq.com) # License: WTFPL import ECY.utils.lsp.language_server_protocol as lsp import ECY.utils.interface as scope_ import logging import os import threading global g_logger g_logger = logging.getLogger('ECY_server') class Operate(scope_.Source_interface): def __init__(self): ...
12,378
2,023
23
57365e09386768e42b99b9eefcc5b28ab5776d71
1,831
py
Python
Q005-v4.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q005-v4.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q005-v4.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
""" Q005 Longest Palindromic Substring Medium 08/27/2019 String. Dynamic programming. Methods: Dynamic programming; Manacher's algo; Palidromic tree; Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "ba...
23.474359
115
0.48935
""" Q005 Longest Palindromic Substring Medium 08/27/2019 String. Dynamic programming. Methods: Dynamic programming; Manacher's algo; Palidromic tree; Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "ba...
1,315
-6
49
1e0ed37574bf65f8e1a6293ade624921f9ec5486
1,970
py
Python
fileio.py
MiroGasparek/python_intro
8b4aec8e54f16e33fef506631de0b9ee2e512dea
[ "CC-BY-4.0", "MIT" ]
null
null
null
fileio.py
MiroGasparek/python_intro
8b4aec8e54f16e33fef506631de0b9ee2e512dea
[ "CC-BY-4.0", "MIT" ]
null
null
null
fileio.py
MiroGasparek/python_intro
8b4aec8e54f16e33fef506631de0b9ee2e512dea
[ "CC-BY-4.0", "MIT" ]
null
null
null
# 11 February 2018 Miroslav Gasparek # Python practical on File Input/Output import os # Open File f = open('data/1OLG.pdb','r') # What is f? f f_str = f.read() f_str[:1000] f_list = f.readlines() f_list # To rewind back to the beginning, we do f.seek(0) # Go to the beginning of the file f.seek(0) # Read the conten...
26.266667
73
0.662944
# 11 February 2018 Miroslav Gasparek # Python practical on File Input/Output import os # Open File f = open('data/1OLG.pdb','r') # What is f? f f_str = f.read() f_str[:1000] f_list = f.readlines() f_list # To rewind back to the beginning, we do f.seek(0) # Go to the beginning of the file f.seek(0) # Read the conten...
0
0
0
ba00283619c351f8336fd8985bcabdf5a4e713b2
286
py
Python
api/serializers.py
deepikac/myblog
1e1db8f1c40a271d9f0152a8fa901dad8b27a225
[ "MIT" ]
null
null
null
api/serializers.py
deepikac/myblog
1e1db8f1c40a271d9f0152a8fa901dad8b27a225
[ "MIT" ]
null
null
null
api/serializers.py
deepikac/myblog
1e1db8f1c40a271d9f0152a8fa901dad8b27a225
[ "MIT" ]
null
null
null
from rest_framework import serializers from blog.models import Blog class BlogSerializer(serializers.ModelSerializer): """ Serializer class for Blog Model """
28.6
68
0.657343
from rest_framework import serializers from blog.models import Blog class BlogSerializer(serializers.ModelSerializer): """ Serializer class for Blog Model """ class Meta: model = Blog fields =('id','title','body','publish','created','modified')
0
82
26
655b5a22be58f8b8bc9696bff5d2e265173edb48
6,642
py
Python
src/util/nel/candidate_select.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
6
2020-12-31T06:13:56.000Z
2022-03-27T16:26:12.000Z
src/util/nel/candidate_select.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
null
null
null
src/util/nel/candidate_select.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
null
null
null
from util.constant import EdgeAttrbutes, EdgeType, NodeAttributes from util.utils import get_api_qualified_name_from_entity_id from .common import api_url_match, camel_case_split, longest_common_subsequence from ..concept_map.common import get_latest_concept_map from elasticsearch import Elasticsearch from util.config ...
26.674699
143
0.595604
from util.constant import EdgeAttrbutes, EdgeType, NodeAttributes from util.utils import get_api_qualified_name_from_entity_id from .common import api_url_match, camel_case_split, longest_common_subsequence from ..concept_map.common import get_latest_concept_map from elasticsearch import Elasticsearch from util.config ...
1,908
0
92
e1d453bf1ab8e9b78cb1c6fe6bcb0cdb09f5a48d
16,427
py
Python
rc_pose_controller/src/pose_controller_matlab_net_regulator.py
taranraina/ros_capstone
c9c4734fd22d6dc33e11723b5b2e681f21ae91d5
[ "MIT" ]
54
2018-03-26T19:01:38.000Z
2022-03-05T01:19:00.000Z
rc_pose_controller/src/pose_controller_matlab_net_regulator.py
taranraina/ros_capstone
c9c4734fd22d6dc33e11723b5b2e681f21ae91d5
[ "MIT" ]
2
2019-03-21T10:48:25.000Z
2019-06-23T09:23:06.000Z
rc_pose_controller/src/pose_controller_matlab_net_regulator.py
taranraina/ros_capstone
c9c4734fd22d6dc33e11723b5b2e681f21ae91d5
[ "MIT" ]
19
2018-04-13T13:43:29.000Z
2022-03-06T10:41:34.000Z
#! /usr/bin/env python # coding: utf-8 # This is pos controller for like-car robot import math import numpy as np import rospy import tf import tf2_ros import sensor_msgs.point_cloud2 as pc2 import laser_geometry.laser_geometry as lg from tf2_sensor_msgs.tf2_sensor_msgs import do_transform_cloud from geometry_msgs.m...
30.99434
310
0.65995
#! /usr/bin/env python # coding: utf-8 # This is pos controller for like-car robot import math import numpy as np import rospy import tf import tf2_ros import sensor_msgs.point_cloud2 as pc2 import laser_geometry.laser_geometry as lg from tf2_sensor_msgs.tf2_sensor_msgs import do_transform_cloud from geometry_msgs.m...
10,112
0
296
0a963bd4c7a910ba8812f945a337d8e48fbdab0b
8,376
py
Python
resource_tracker/views/resource_pool_views.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
null
null
null
resource_tracker/views/resource_pool_views.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
null
null
null
resource_tracker/views/resource_pool_views.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from resource_tracker.filters.resource_pool_filter import ResourcePoolFilter from resource_tracker.forms import ResourcePoolForm, ResourcePoolAttributeDefinitionF...
50.155689
142
0.727674
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from resource_tracker.filters.resource_pool_filter import ResourcePoolFilter from resource_tracker.forms import ResourcePoolForm, ResourcePoolAttributeDefinitionF...
7,176
0
220
f7c4b4022d6262e2f2c79133ea77f437c2e82bfe
20,841
py
Python
dispatchers.py
jibonaronno/Rhythm
1c8670d99960b7379fdf6dd006339b96143e7d90
[ "CC0-1.0" ]
null
null
null
dispatchers.py
jibonaronno/Rhythm
1c8670d99960b7379fdf6dd006339b96143e7d90
[ "CC0-1.0" ]
null
null
null
dispatchers.py
jibonaronno/Rhythm
1c8670d99960b7379fdf6dd006339b96143e7d90
[ "CC0-1.0" ]
null
null
null
import sys import serial import pprint import time import enum import queue from queue import Queue from os.path import join, dirname, abspath from qtpy.QtCore import Slot, QTimer, QThread, Signal, QObject, Qt, QMutex ''' for char in self.serialport.read(): self.line.append(chr(char...
35.747856
156
0.476513
import sys import serial import pprint import time import enum import queue from queue import Queue from os.path import join, dirname, abspath from qtpy.QtCore import Slot, QTimer, QThread, Signal, QObject, Qt, QMutex class GcodeStates(enum.Enum): WAIT_FOR_TIMEOUT = 1 GCODE_SENT = 2 READY_TO_SEND = 3 clas...
16,765
1,315
184
2ed9534c4794215745c1475ab6d989ff0928b760
10,472
py
Python
user.py
uProxy/1-ufo-management-server
e5d3a9fc704f13d2d0c82fc7cd5ac596c553eca3
[ "Apache-2.0" ]
1
2018-12-30T11:35:11.000Z
2018-12-30T11:35:11.000Z
user.py
UWNetworksLab/ufo-management-server
e5d3a9fc704f13d2d0c82fc7cd5ac596c553eca3
[ "Apache-2.0" ]
null
null
null
user.py
UWNetworksLab/ufo-management-server
e5d3a9fc704f13d2d0c82fc7cd5ac596c553eca3
[ "Apache-2.0" ]
null
null
null
"""The module for handling users.""" import admin from appengine_config import JINJA_ENVIRONMENT from ast import literal_eval import base64 from config import PATHS from datastore import DomainVerification from datastore import ProxyServer from datastore import User from error_handlers import Handle500 from googleapic...
31.829787
83
0.73262
"""The module for handling users.""" import admin from appengine_config import JINJA_ENVIRONMENT from ast import literal_eval import base64 from config import PATHS from datastore import DomainVerification from datastore import ProxyServer from datastore import User from error_handlers import Handle500 from googleapic...
0
0
0
a7b386f43f5857886c3a9cac679f7b5a7c82f10c
1,642
py
Python
python_file_examples/testing.py
GustavoMF31/Structured-Editor-For-Python
acab918158609f9649c0c78b72224894e040de78
[ "MIT" ]
1
2020-07-14T02:14:05.000Z
2020-07-14T02:14:05.000Z
python_file_examples/testing.py
GustavoMF31/Structured-Editor-For-Python
acab918158609f9649c0c78b72224894e040de78
[ "MIT" ]
null
null
null
python_file_examples/testing.py
GustavoMF31/Structured-Editor-For-Python
acab918158609f9649c0c78b72224894e040de78
[ "MIT" ]
null
null
null
from copy import deepcopy from hypothesis import strategies as st from hypothesis import given import ast import astor import renderer import actions import core_logic # TODO: Make a directory with a bunch of kwnow valid .py files # And test with them all # I'm assuming dummy.py isn't messed up tree = ast.parse(open...
25.65625
75
0.694275
from copy import deepcopy from hypothesis import strategies as st from hypothesis import given import ast import astor import renderer import actions import core_logic # TODO: Make a directory with a bunch of kwnow valid .py files # And test with them all # I'm assuming dummy.py isn't messed up tree = ast.parse(open...
978
0
68
ca069be049038f69eefa88862cdea564004d31d9
1,095
py
Python
conrad/utils.py
krishnaprasanthg/conrad
7d1dba8460c0a262855bb6eff9f5fd2972c4917a
[ "Apache-2.0" ]
null
null
null
conrad/utils.py
krishnaprasanthg/conrad
7d1dba8460c0a262855bb6eff9f5fd2972c4917a
[ "Apache-2.0" ]
null
null
null
conrad/utils.py
krishnaprasanthg/conrad
7d1dba8460c0a262855bb6eff9f5fd2972c4917a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import json import os import operator as op from jsonschema import Draft4Validator from .db import engine schema_name = "default_event_schema.json" schema_path = os.path.join(os.path.dirname(__file__), schema_name)
24.333333
84
0.674886
# -*- coding: utf-8 -*- import json import os import operator as op from jsonschema import Draft4Validator from .db import engine schema_name = "default_event_schema.json" schema_path = os.path.join(os.path.dirname(__file__), schema_name) def initialize_database(): from .models import Base Base.metadata.cr...
782
0
69
265103091040b8ff1b9bb9686ad9612629692c23
989
py
Python
ditto/twitter/migrations/0049_auto_20160713_1127.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
54
2016-08-15T17:32:41.000Z
2022-02-27T03:32:05.000Z
ditto/twitter/migrations/0049_auto_20160713_1127.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
229
2015-07-23T12:50:47.000Z
2022-03-24T10:33:20.000Z
ditto/twitter/migrations/0049_auto_20160713_1127.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
8
2015-09-10T17:10:35.000Z
2022-03-25T13:05:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-13 11:27 from __future__ import unicode_literals from django.db import migrations, models
26.72973
76
0.536906
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-13 11:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("twitter", "0048_auto_20160615_1045"), ] operations = [ migrations.AlterField...
0
811
23
8fae6de99c5b71d9b28ba14351cbd267d13f0e67
3,289
py
Python
pynegf_test/utils.py
gpenazzi/pynegf
ed3178415848481c43222af70f33c7c0380c602c
[ "MIT" ]
null
null
null
pynegf_test/utils.py
gpenazzi/pynegf
ed3178415848481c43222af70f33c7c0380c602c
[ "MIT" ]
3
2020-03-10T20:12:21.000Z
2020-04-04T11:12:30.000Z
pynegf_test/utils.py
gpenazzi/pynegf
ed3178415848481c43222af70f33c7c0380c602c
[ "MIT" ]
null
null
null
""" Module with testing utilities. """ import numpy from scipy import sparse def orthogonal_linear_chain( nsites=100, contact_size=20, coupling=1.0, onsite=0.0): """ Build the hamiltonian of an orthogonal nearest neighbor linear chain with the correct arrangement for the co...
30.453704
79
0.616601
""" Module with testing utilities. """ import numpy from scipy import sparse def orthogonal_linear_chain( nsites=100, contact_size=20, coupling=1.0, onsite=0.0): """ Build the hamiltonian of an orthogonal nearest neighbor linear chain with the correct arrangement for the co...
0
0
0
e969dba3b44e76ff30c0ed6c8b56a7ce7388d7c5
2,154
py
Python
controller/middle_ware.py
oopsteams/pansite
11896842da66efc72c26eab071f7f802b982f435
[ "MIT" ]
null
null
null
controller/middle_ware.py
oopsteams/pansite
11896842da66efc72c26eab071f7f802b982f435
[ "MIT" ]
1
2021-06-02T01:00:41.000Z
2021-06-02T01:00:41.000Z
controller/middle_ware.py
oopsteams/pansite
11896842da66efc72c26eab071f7f802b982f435
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created by susy at 2020/1/27 """ from utils import singleton, get_payload_from_token, get_now_ts, decrypt_user_id, log as logger from utils.constant import USER_TYPE from tornado.web import RequestHandler @singleton @singleton
31.676471
97
0.606778
# -*- coding: utf-8 -*- """ Created by susy at 2020/1/27 """ from utils import singleton, get_payload_from_token, get_now_ts, decrypt_user_id, log as logger from utils.constant import USER_TYPE from tornado.web import RequestHandler class MiddleWare(object): def __init__(self): super().__init__() def...
1,648
19
224
800006445d0f4d5c66490ab92f7b44ac99020e5f
8,248
py
Python
tests/test_funcs.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
27
2020-05-17T20:48:43.000Z
2022-01-08T21:32:30.000Z
tests/test_funcs.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
tests/test_funcs.py
grantps/superhelp
d8e861bf1ad91571ac23b9c833a8cd461bb1952f
[ "MIT" ]
null
null
null
from textwrap import dedent from nose.tools import assert_equal # @UnresolvedImport from tests import check_as_expected, get_repeated_lines, get_actual_result from superhelp.helpers.func_help import count_args excess_args = ', '.join(['arg' + str(i) for i in range(100)]) ROOT = 'superhelp.helpers.func_help.' def...
31.007519
117
0.415616
from textwrap import dedent from nose.tools import assert_equal # @UnresolvedImport from tests import check_as_expected, get_repeated_lines, get_actual_result from superhelp.helpers.func_help import count_args excess_args = ', '.join(['arg' + str(i) for i in range(100)]) ROOT = 'superhelp.helpers.func_help.' def...
6,997
0
23
b1cd2f77bbac68ebc8d7e8af342a1749b64a0b44
16,434
py
Python
test/xslt/test_attribute.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
6
2015-01-30T03:50:36.000Z
2022-03-20T16:09:58.000Z
test/xslt/test_attribute.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
2
2015-02-04T17:18:47.000Z
2019-09-27T23:39:52.000Z
test/xslt/test_attribute.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
6
2015-02-04T16:16:18.000Z
2019-10-30T20:07:48.000Z
######################################################################## # test/xslt/test_attribute.py from amara.writers import WriterError, xmlwriter from amara.xslt import XsltError PREFIX_TEMPLATE = xmlwriter.xmlwriter.GENERATED_PREFIX from xslt_support import _run_xml SOURCE_XML = """<?xml version="1.0"?><dummy...
39.695652
509
0.627297
######################################################################## # test/xslt/test_attribute.py from amara.writers import WriterError, xmlwriter from amara.xslt import XsltError PREFIX_TEMPLATE = xmlwriter.xmlwriter.GENERATED_PREFIX from xslt_support import _run_xml SOURCE_XML = """<?xml version="1.0"?><dummy...
0
0
0
464582edfebb0e261d68ff21aa333f62e34bc86c
824
py
Python
src/dec_pomdp_server/scripts/particle_filter/particle_filter.py
TAMS-Group/decpomdp_signal_source_localization
3e785c6bb464a1f853b889ce4e3ac343243bc030
[ "Apache-2.0" ]
null
null
null
src/dec_pomdp_server/scripts/particle_filter/particle_filter.py
TAMS-Group/decpomdp_signal_source_localization
3e785c6bb464a1f853b889ce4e3ac343243bc030
[ "Apache-2.0" ]
null
null
null
src/dec_pomdp_server/scripts/particle_filter/particle_filter.py
TAMS-Group/decpomdp_signal_source_localization
3e785c6bb464a1f853b889ce4e3ac343243bc030
[ "Apache-2.0" ]
null
null
null
import numpy as np # Add small Gaussian noise to particles to reinvigorate them
30.518519
114
0.746359
import numpy as np def resample(x, weights): N = weights.size idx = np.random.choice(N, size=N, p=weights) x = x[idx,:] weights = np.repeat(1.0/float(N), N) return x, weights # Add small Gaussian noise to particles to reinvigorate them def particle_reinvigoration(x): sd = 0.1 return x + np.random.normal(scale=...
673
0
68
4d0c7a61f4ad958e6c179d41094fc72b0d1752ae
949
py
Python
POO/classe_abstrata/modulos/conta.py
raphael-d-cordeiro/Python_Public
56d0080393dab5f80ad650e27cb993006b17ac1b
[ "MIT" ]
null
null
null
POO/classe_abstrata/modulos/conta.py
raphael-d-cordeiro/Python_Public
56d0080393dab5f80ad650e27cb993006b17ac1b
[ "MIT" ]
null
null
null
POO/classe_abstrata/modulos/conta.py
raphael-d-cordeiro/Python_Public
56d0080393dab5f80ad650e27cb993006b17ac1b
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod
22.069767
70
0.6196
from abc import ABC, abstractmethod class Conta(ABC): def __init__(self, agencia, conta, saldoini, nome_cliente): self._agencia = agencia self._conta = conta self._saldo = saldoini self._nome_cliente = nome_cliente @property def agencia(self): return self._agencia ...
587
305
23
3155b29124ead2d6ce57979aeb82d1fd91766bf7
6,903
py
Python
perfkitbenchmarker/windows_packages/psping.py
markflyhigh/PerfKitBenchmarker
ff34597cae0d0fd171671dafca0dd1d937e4b7d1
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/windows_packages/psping.py
markflyhigh/PerfKitBenchmarker
ff34597cae0d0fd171671dafca0dd1d937e4b7d1
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/windows_packages/psping.py
markflyhigh/PerfKitBenchmarker
ff34597cae0d0fd171671dafca0dd1d937e4b7d1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 PerfKitBenchmarker 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 appli...
30.276316
78
0.694481
# Copyright 2018 PerfKitBenchmarker 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 appli...
494
0
46
f414e09ecb6d163f6505cfa2600819ebb97f697d
2,843
py
Python
test/CPPPATH/absolute-path.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/CPPPATH/absolute-path.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/CPPPATH/absolute-path.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
27.872549
73
0.700317
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
0
0
0
970eb4d6367655d11afdfad39f4cf826ea48f36b
1,694
py
Python
GUI for programming project.py
Bettalion/Programming-Project
1a99ed37ed90f4fa516b411352a0123b9d0b060b
[ "MIT" ]
null
null
null
GUI for programming project.py
Bettalion/Programming-Project
1a99ed37ed90f4fa516b411352a0123b9d0b060b
[ "MIT" ]
null
null
null
GUI for programming project.py
Bettalion/Programming-Project
1a99ed37ed90f4fa516b411352a0123b9d0b060b
[ "MIT" ]
null
null
null
#gui Uses python 2, else uses python 3 import Tkinter as tk import time if __name__ == '__main__': main()
30.25
136
0.615702
#gui Uses python 2, else uses python 3 import Tkinter as tk import time class Player: def __init__(self,name,password,score,deck,cards): self.name=name self.password=password self.score=score self.deck=deck self.cards=cards class GUI: def __init__(self, master): self.master = maste...
1,333
-26
259
ef647718ef14e697d5e89e23dec8eb34098b9f6d
2,182
py
Python
amortization/amortize.py
roniemartinez/amortization
94008e907475a234b5adb8d8a127cab92c0bff84
[ "MIT" ]
12
2019-05-21T01:55:11.000Z
2022-02-03T19:51:07.000Z
amortization/amortize.py
roniemartinez/amortization
94008e907475a234b5adb8d8a127cab92c0bff84
[ "MIT" ]
28
2019-05-05T05:15:56.000Z
2022-03-29T08:17:11.000Z
amortization/amortize.py
roniemartinez/amortization
94008e907475a234b5adb8d8a127cab92c0bff84
[ "MIT" ]
7
2020-02-10T05:07:54.000Z
2021-07-14T04:37:15.000Z
from typing import Any, List # pragma: no cover from amortization.amount import calculate_amortization_amount # pragma: no cover from amortization.schedule import amortization_schedule # pragma: no cover
30.732394
110
0.598992
from typing import Any, List # pragma: no cover from amortization.amount import calculate_amortization_amount # pragma: no cover from amortization.schedule import amortization_schedule # pragma: no cover def main() -> None: # pragma: no cover import argparse from tabulate import tabulate parser = a...
1,950
0
23
d8cd85e1e5a0185294bf0f6842e101c12a119cd3
2,186
py
Python
code/create_word_index.py
Penn-TopGuNN/TopGuNN
e736e467f1991a33c5ee54407665cbd9fef1e521
[ "MIT" ]
5
2021-06-11T21:55:29.000Z
2021-12-08T23:16:40.000Z
code/create_word_index.py
Penn-TopGuNN/TopGuNN
e736e467f1991a33c5ee54407665cbd9fef1e521
[ "MIT" ]
null
null
null
code/create_word_index.py
Penn-TopGuNN/TopGuNN
e736e467f1991a33c5ee54407665cbd9fef1e521
[ "MIT" ]
1
2021-08-24T19:36:44.000Z
2021-08-24T19:36:44.000Z
import gzip, json, sys import numpy as np import time import argparse import os import util from sqlitedict import SqliteDict '''usage: (goes in shell script) python3 -u code/create_word_index.py \ -outDir 'betatest/out/' ''' '''global argparse''' parser = argparse.ArgumentParser(description='Processing list of file...
31.681159
142
0.668344
import gzip, json, sys import numpy as np import time import argparse import os import util from sqlitedict import SqliteDict '''usage: (goes in shell script) python3 -u code/create_word_index.py \ -outDir 'betatest/out/' ''' '''global argparse''' parser = argparse.ArgumentParser(description='Processing list of file...
0
0
0
d8edce507cb914fcd72bc82cd55c6560c6198978
948
py
Python
exercises/RMSD.py
LudovicaCataneo/programming_ludovica_cataneo
536f7921b30e23356ed5a3acb5c00ead0580cca4
[ "MIT" ]
null
null
null
exercises/RMSD.py
LudovicaCataneo/programming_ludovica_cataneo
536f7921b30e23356ed5a3acb5c00ead0580cca4
[ "MIT" ]
null
null
null
exercises/RMSD.py
LudovicaCataneo/programming_ludovica_cataneo
536f7921b30e23356ed5a3acb5c00ead0580cca4
[ "MIT" ]
null
null
null
#open the file filename = open("./model8.pdb", "r") #for each model in the file, we would like #to create a list which contains the coordinates of the Carbon alfa atoms import math biglist= [] #crea una lista che contenga tutto! a = -1 #faccio questo per poter partire dal primo elemento* for line in filename: #per ogni...
27.882353
73
0.662447
#open the file filename = open("./model8.pdb", "r") #for each model in the file, we would like #to create a list which contains the coordinates of the Carbon alfa atoms import math biglist= [] #crea una lista che contenga tutto! a = -1 #faccio questo per poter partire dal primo elemento* for line in filename: #per ogni...
0
0
0
859fa3951f6b1529bc8548e4194de6fc976d255f
9,127
py
Python
codes3d/download_default_data.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
null
null
null
codes3d/download_default_data.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
4
2018-10-25T02:09:37.000Z
2019-06-27T20:50:27.000Z
codes3d/download_default_data.py
Genome3d/codes3d-v1
fe4897cb07bd8b2c10cfc29defe8570d447b69e0
[ "MIT" ]
null
null
null
#!/usr/bin/env python from ftplib import FTP import argparse, codes3d, configparser, gzip, os, re, requests, subprocess, sys if __name__ == "__main__": parser = argparse.ArgumentParser(description="Download the default data files for CoDeS3D. These will be downloaded into the default directories specified in the su...
48.291005
325
0.739235
#!/usr/bin/env python from ftplib import FTP import argparse, codes3d, configparser, gzip, os, re, requests, subprocess, sys def download_snp_data(conf, do_not_build_dbs, do_not_tidy_up): local_path = os.path.join(conf.get("Defaults","LIB_DIR"),"snps") if not os.path.isdir(local_path): os.makedirs(local_path) ...
6,301
0
115
4ef6e7efa8245fb39e2af7b528dd46c46f5b9f54
817
py
Python
utils/getdataset.py
Troesler95/NN-basic-number-detector
53122304625b2b9a6641c3f739b44380bf0c4eb4
[ "MIT" ]
null
null
null
utils/getdataset.py
Troesler95/NN-basic-number-detector
53122304625b2b9a6641c3f739b44380bf0c4eb4
[ "MIT" ]
null
null
null
utils/getdataset.py
Troesler95/NN-basic-number-detector
53122304625b2b9a6641c3f739b44380bf0c4eb4
[ "MIT" ]
null
null
null
import os import numpy as np if __name__ == "__main__": getdataset()
31.423077
87
0.559364
import os import numpy as np def getdataset(): # Get the path do the data file cur_path = os.getcwd() data_filepath = os.path.join(cur_path, os.path.dirname("dataset/"), "semeion.data") print("data_filepath: " + data_filepath) x = np.empty((1593, 16*16), dtype=np.float) y = np.empty((1593, 10)...
721
0
23
0f4e093850a7ddb2b109c44fbfe350f841b9bdfe
2,898
py
Python
src/simmate/toolkit/transformations/from_ase/lattice_strain.py
jacksund/simmate
0b29704540574e11b711f7b44e2cb7740141ebb4
[ "BSD-3-Clause" ]
9
2021-12-21T02:58:21.000Z
2022-01-25T14:00:06.000Z
src/simmate/toolkit/transformations/from_ase/lattice_strain.py
jacksund/simmate
0b29704540574e11b711f7b44e2cb7740141ebb4
[ "BSD-3-Clause" ]
51
2022-01-01T15:59:58.000Z
2022-03-26T21:25:42.000Z
src/simmate/toolkit/transformations/from_ase/lattice_strain.py
jacksund/simmate
0b29704540574e11b711f7b44e2cb7740141ebb4
[ "BSD-3-Clause" ]
7
2022-01-01T03:44:32.000Z
2022-03-29T19:59:27.000Z
# -*- coding: utf-8 -*- from simmate.toolkit.transformations.base import Transformation
35.341463
105
0.641477
# -*- coding: utf-8 -*- from simmate.toolkit.transformations.base import Transformation class LatticeStrain(Transformation): # known as StrainMutation in ase.ga # https://gitlab.com/ase/ase/-/blob/master/ase/ga/standardmutations.py io_scale = "one_to_one" ninput = 1 use_multiprocessing = False ...
2,524
261
23
ee775790162485c2f3f9f53f11a8930a5d18e531
1,622
py
Python
day5/part2.py
THEANTsMAN/AoC2021
4be49efb313dc6636f4fb2471a3b16206fc9a311
[ "MIT" ]
null
null
null
day5/part2.py
THEANTsMAN/AoC2021
4be49efb313dc6636f4fb2471a3b16206fc9a311
[ "MIT" ]
null
null
null
day5/part2.py
THEANTsMAN/AoC2021
4be49efb313dc6636f4fb2471a3b16206fc9a311
[ "MIT" ]
null
null
null
import sys import fileinput import numpy as np if __name__ == '__main__': main()
19.780488
61
0.545006
import sys import fileinput import numpy as np def getInput(filePath): content = [] input = fileinput.input(files=(filePath), mode='r') for line in input: content.append(line.rstrip()) return content def getVectors(A, B): vector = [] Xstart = A[0] Xstop = B[0] Xstep = 1 if Xstart == Xstop: ...
1,465
0
71
027a12e4ef1c3b00f5a9877a563332a7a3bdca5f
3,588
py
Python
worldometer_nat.py
avengercelona/Covid19_Stats
7f43c0a375201dc4fbe9ddd1ece0b56a2771cefd
[ "MIT" ]
null
null
null
worldometer_nat.py
avengercelona/Covid19_Stats
7f43c0a375201dc4fbe9ddd1ece0b56a2771cefd
[ "MIT" ]
null
null
null
worldometer_nat.py
avengercelona/Covid19_Stats
7f43c0a375201dc4fbe9ddd1ece0b56a2771cefd
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import requests import json link='https://www.worldometers.info/coronavirus/' source = requests.get(link).text soup = BeautifulSoup(source, 'lxml')
35.176471
98
0.598662
from bs4 import BeautifulSoup import requests import json link='https://www.worldometers.info/coronavirus/' source = requests.get(link).text soup = BeautifulSoup(source, 'lxml') def extract_nat(): #locating required data tb=soup.find('table',id='main_table_countries_today') rows=tb.find_all('tr',class_...
3,315
0
92
c85072a49dc2db870e91def66a879adfa3f4cc0e
1,428
py
Python
insights/parsers/satellite_content_hosts_count.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
121
2017-05-30T20:23:25.000Z
2022-03-23T12:52:15.000Z
insights/parsers/satellite_content_hosts_count.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
1,977
2017-05-26T14:36:03.000Z
2022-03-31T10:38:53.000Z
insights/parsers/satellite_content_hosts_count.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
244
2017-05-30T20:22:57.000Z
2022-03-26T10:09:39.000Z
""" SatelliteContentHostsCount - command ``psql -d foreman -c 'select count(*) from hosts'`` ======================================================================================== The SatelliteContentHostsCount parser reads the output of ``psql -d foreman -c 'select count(*) from hosts'``. Sample output of ``psql -...
30.382979
88
0.618347
""" SatelliteContentHostsCount - command ``psql -d foreman -c 'select count(*) from hosts'`` ======================================================================================== The SatelliteContentHostsCount parser reads the output of ``psql -d foreman -c 'select count(*) from hosts'``. Sample output of ``psql -...
393
0
27
b8c7fe2366b5f3933243fa5e2ecf29a1a424f1c4
1,038
py
Python
model/shared/shared.py
espirin/svoya
35168387c737dad5d2acc87b775d4e0a38923f2f
[ "MIT" ]
null
null
null
model/shared/shared.py
espirin/svoya
35168387c737dad5d2acc87b775d4e0a38923f2f
[ "MIT" ]
null
null
null
model/shared/shared.py
espirin/svoya
35168387c737dad5d2acc87b775d4e0a38923f2f
[ "MIT" ]
null
null
null
import os import random import shortuuid from PIL import Image from config import config from model import Game, Pack
23.066667
69
0.699422
import os import random import shortuuid from PIL import Image from config import config from model import Game, Pack def create_new_game_id() -> str: game_id = shortuuid.ShortUUID().random(length=6) while Game.query.filter(Game.id == game_id).scalar() is not None: game_id = shortuuid.ShortUUID().r...
822
0
92
f189cebe2f26722af23468e59d891613ab08abdc
365
py
Python
tests/data/expected/main/multiple_files_self_ref_single/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
891
2019-07-23T04:23:32.000Z
2022-03-31T13:36:33.000Z
tests/data/expected/main/multiple_files_self_ref_single/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
663
2019-07-23T09:50:26.000Z
2022-03-29T01:56:55.000Z
tests/data/expected/main/multiple_files_self_ref_single/output.py
adaamz/datamodel-code-generator
3b34573f35f8d420e4668a85047c757fd1da7754
[ "MIT" ]
108
2019-07-23T08:50:37.000Z
2022-03-09T10:50:22.000Z
# generated by datamodel-codegen: # filename: test.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from pydantic import BaseModel, Field
17.380952
52
0.715068
# generated by datamodel-codegen: # filename: test.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from pydantic import BaseModel, Field class Second(BaseModel): __root__: str class First(BaseModel): __root__: Second class Model(BaseModel): test_id: str = Field(.....
0
118
69
9e7492d686e3f7a7f59490481441b2e9f8e6712e
340
py
Python
setup.py
minamorl/redisorm
e5eb0e9e0c65d6dd6a35d0f086b7d147cbfbd4d1
[ "MIT" ]
null
null
null
setup.py
minamorl/redisorm
e5eb0e9e0c65d6dd6a35d0f086b7d147cbfbd4d1
[ "MIT" ]
null
null
null
setup.py
minamorl/redisorm
e5eb0e9e0c65d6dd6a35d0f086b7d147cbfbd4d1
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="redis-orm", description="Redis object relation mapper", author="minamorl", author_email="minamorl@minamorl.com", version="0.4.1", packages=find_packages(), tests_require=['tox'], install_requires=[ "redis", "python...
21.25
47
0.641176
from setuptools import setup, find_packages setup( name="redis-orm", description="Redis object relation mapper", author="minamorl", author_email="minamorl@minamorl.com", version="0.4.1", packages=find_packages(), tests_require=['tox'], install_requires=[ "redis", "python...
0
0
0
61ca3e401f4f509ca5eca02a19da61a8c4f835f8
3,306
py
Python
corehq/messaging/smsbackends/unicel/models.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/messaging/smsbackends/unicel/models.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/messaging/smsbackends/unicel/models.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
import codecs from corehq.apps.sms.util import clean_phone_number from corehq.apps.sms.api import incoming from corehq.apps.sms.models import SQLSMSBackend from six.moves.urllib.request import urlopen from six.moves.urllib.parse import urlencode from corehq.messaging.smsbackends.unicel.forms import UnicelBackendForm f...
28.5
105
0.65487
import codecs from corehq.apps.sms.util import clean_phone_number from corehq.apps.sms.api import incoming from corehq.apps.sms.models import SQLSMSBackend from six.moves.urllib.request import urlopen from six.moves.urllib.parse import urlencode from corehq.messaging.smsbackends.unicel.forms import UnicelBackendForm f...
1,143
292
23
8e857db16980103b711c1afdac0dfe81ba3aa323
5,969
py
Python
app/views.py
rahowa/workzone
b6fd3241fdbc9463e0e7eb863f82f9524be50830
[ "MIT" ]
1
2020-04-25T07:49:11.000Z
2020-04-25T07:49:11.000Z
app/views.py
rahowa/workzone
b6fd3241fdbc9463e0e7eb863f82f9524be50830
[ "MIT" ]
null
null
null
app/views.py
rahowa/workzone
b6fd3241fdbc9463e0e7eb863f82f9524be50830
[ "MIT" ]
1
2020-04-23T10:24:56.000Z
2020-04-23T10:24:56.000Z
import sys import json import numpy as np from typing import Any, Union from flask import Response, Blueprint, request sys.path.append("./robot_work_zone_estimation") from app.extensions import mongo, cache from app.route_utils import load_classes from app.fill_databse import FillDatabase from app.objects_utils impor...
37.074534
102
0.659239
import sys import json import numpy as np from typing import Any, Union from flask import Response, Blueprint, request sys.path.append("./robot_work_zone_estimation") from app.extensions import mongo, cache from app.route_utils import load_classes from app.fill_databse import FillDatabase from app.objects_utils impor...
1,855
0
44
df3f662784c12cba481a99f0b3b5f22fe3007d82
2,060
py
Python
app/models/Weather/Wind.py
WeMakeMachines/pinion.weather
1624fb87672d7a2600ad9cdbde43c0aa17780cc8
[ "MIT" ]
null
null
null
app/models/Weather/Wind.py
WeMakeMachines/pinion.weather
1624fb87672d7a2600ad9cdbde43c0aa17780cc8
[ "MIT" ]
null
null
null
app/models/Weather/Wind.py
WeMakeMachines/pinion.weather
1624fb87672d7a2600ad9cdbde43c0aa17780cc8
[ "MIT" ]
null
null
null
from app.helpers.units import SpeedUnits
35.517241
112
0.618932
from app.helpers.units import SpeedUnits class Wind: @staticmethod def __describe_wind_direction(degrees: int): description = ["north", "north east", "east", "south east", "south", "south west", "west", "north west"] degrees_in_compass = 360 cardinal_points = len(description) d...
1,889
106
23
c598cb2387eb7fa7cd75f5c944e9fcdf32887d60
1,544
py
Python
src/ims/model/json/_priority.py
burningmantech/ranger-ims-server
66c8158b93c80ca342856666acb2689287db8043
[ "Apache-2.0" ]
26
2015-11-04T19:14:28.000Z
2022-01-28T14:31:06.000Z
src/ims/model/json/_priority.py
burningmantech/ranger-ims-server
66c8158b93c80ca342856666acb2689287db8043
[ "Apache-2.0" ]
508
2015-04-28T00:24:51.000Z
2022-03-30T17:29:47.000Z
src/ims/model/json/_priority.py
burningmantech/ranger-ims-server
66c8158b93c80ca342856666acb2689287db8043
[ "Apache-2.0" ]
6
2015-04-15T13:58:40.000Z
2019-12-09T00:47:40.000Z
## # See the file COPYRIGHT for copyright information. # # 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...
24.903226
76
0.750648
## # See the file COPYRIGHT for copyright information. # # 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...
394
0
46
7b1b92085b571c28eed2edec378eba85fd49ccfc
235
py
Python
settings.py
GuidoDipietro/geckolang
a75c3b7056e48b0ed118a70f2b3da966ecb1eb89
[ "BSD-3-Clause" ]
4
2021-08-29T17:46:56.000Z
2021-11-11T01:55:18.000Z
settings.py
GuidoDipietro/geckolang
a75c3b7056e48b0ed118a70f2b3da966ecb1eb89
[ "BSD-3-Clause" ]
4
2021-08-31T20:02:43.000Z
2021-09-30T14:46:54.000Z
settings.py
GuidoDipietro/geckolang
a75c3b7056e48b0ed118a70f2b3da966ecb1eb89
[ "BSD-3-Clause" ]
1
2022-03-23T21:50:45.000Z
2022-03-23T21:50:45.000Z
# Tab TAB_SIZE = 1 tab = ' ' * TAB_SIZE # Colors USING_COLOR = 'magenta' FINAL_COLOR = 'cyan' ANS_COLOR = 'cyan' INVALID_COLOR = 'red' VAR_COLOR = 'red' FUNC_ERR_COLOR = 'green'
21.363636
32
0.519149
# Tab TAB_SIZE = 1 tab = ' ' * TAB_SIZE # Colors USING_COLOR = 'magenta' FINAL_COLOR = 'cyan' ANS_COLOR = 'cyan' INVALID_COLOR = 'red' VAR_COLOR = 'red' FUNC_ERR_COLOR = 'green'
0
0
0
864b80d473477207db789a18c3f444e2c60d893d
2,189
py
Python
utils/quad2rbox.py
JoelPendleton/QDot-Detector
e53b80c02fe95ceacd3dde9981dcd0481b907bdc
[ "Apache-2.0" ]
null
null
null
utils/quad2rbox.py
JoelPendleton/QDot-Detector
e53b80c02fe95ceacd3dde9981dcd0481b907bdc
[ "Apache-2.0" ]
null
null
null
utils/quad2rbox.py
JoelPendleton/QDot-Detector
e53b80c02fe95ceacd3dde9981dcd0481b907bdc
[ "Apache-2.0" ]
null
null
null
import numpy as np import math import tensorflow as tf import sys sys.path.append('../') from libs.utils.coordinate_convert import backward_convert if __name__ == "__main__": quad = np.array([[278, 418, 308, 331, 761, 581, 691, 668], [758, 418, 348, 331, 241, 581, 591, 668], ...
33.676923
115
0.567839
import numpy as np import math import tensorflow as tf import sys sys.path.append('../') from libs.utils.coordinate_convert import backward_convert def dist(p1, p2): return np.linalg.norm(p1 - p2, axis=1) def quad2rbox(boxes): # input: ordered points (bs, 8) nB = len(boxes) points = boxes.reshape(-...
1,507
0
92
0171a039f354b802e3b60ee7ff72a155d842bd74
217
py
Python
setup.py
reynard225/reyn
73372548e01f4d31e8a01388526e6446bc3b6047
[ "PostgreSQL" ]
null
null
null
setup.py
reynard225/reyn
73372548e01f4d31e8a01388526e6446bc3b6047
[ "PostgreSQL" ]
null
null
null
setup.py
reynard225/reyn
73372548e01f4d31e8a01388526e6446bc3b6047
[ "PostgreSQL" ]
null
null
null
import subprocess from setuptools import setup, find_packages, Extension setup( name='telegram_fdw', version='0.1.0', author='Dickson S. Guedes', license='PostgreSQL', packages=['telegram_fdw'] )
19.727273
54
0.695853
import subprocess from setuptools import setup, find_packages, Extension setup( name='telegram_fdw', version='0.1.0', author='Dickson S. Guedes', license='PostgreSQL', packages=['telegram_fdw'] )
0
0
0
db499cd1a83aea2c0ab77dab8c8925d31411de56
9,000
py
Python
finrl/neo_finrl/env_portfolio_allocation/portfolio_allocation.py
haitt00/FinRL-Library
4361a20abaeb73012bb0a9588549bbabb42037a3
[ "MIT" ]
null
null
null
finrl/neo_finrl/env_portfolio_allocation/portfolio_allocation.py
haitt00/FinRL-Library
4361a20abaeb73012bb0a9588549bbabb42037a3
[ "MIT" ]
null
null
null
finrl/neo_finrl/env_portfolio_allocation/portfolio_allocation.py
haitt00/FinRL-Library
4361a20abaeb73012bb0a9588549bbabb42037a3
[ "MIT" ]
null
null
null
import gym import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd from gym import spaces from gym.utils import seeding from stable_baselines3.common.vec_env import DummyVecEnv import decimal matplotlib.use("Agg")
36.885246
129
0.584333
import gym import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd from gym import spaces from gym.utils import seeding from stable_baselines3.common.vec_env import DummyVecEnv import decimal matplotlib.use("Agg") class StockPortfolioEnv(gym.Env): metadata = {"render.modes": ...
8,400
327
23
0a171d93586f08d7f308f52ab6bbc80ed7ece40e
21
py
Python
app.py
Morgan140/ml-project-sudo-scrapper
b25664f135ae01403af04b4f9feff3082f5cd0fe
[ "Apache-2.0" ]
1
2020-10-03T11:22:44.000Z
2020-10-03T11:22:44.000Z
app.py
Morgan140/ml-project-sudo-scrapper
b25664f135ae01403af04b4f9feff3082f5cd0fe
[ "Apache-2.0" ]
1
2020-10-03T10:56:42.000Z
2020-10-03T10:56:42.000Z
app.py
Morgan140/ml-project-sudo-scrapper
b25664f135ae01403af04b4f9feff3082f5cd0fe
[ "Apache-2.0" ]
null
null
null
intpt import jaa.lls
10.5
20
0.809524
intpt import jaa.lls
0
0
0
bb6de9c5584cd165c66909a7f3254ffbcd30a914
5,013
py
Python
src/gen/LPC_gencore.py
ufo2011/NXP-MCUBootUtility
5d1840b1beee997e5453484309f5466ce166bfbe
[ "Apache-2.0" ]
174
2018-12-30T16:20:36.000Z
2022-03-24T03:02:02.000Z
src/gen/LPC_gencore.py
ufo2011/NXP-MCUBootUtility
5d1840b1beee997e5453484309f5466ce166bfbe
[ "Apache-2.0" ]
138
2019-01-02T16:18:44.000Z
2022-03-30T15:57:24.000Z
src/gen/LPC_gencore.py
ufo2011/NXP-MCUBootUtility
5d1840b1beee997e5453484309f5466ce166bfbe
[ "Apache-2.0" ]
86
2018-12-27T13:16:58.000Z
2022-02-03T11:42:35.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os import shutil import json import subprocess import bincopy import gendef import LPC_gendef sys.path.append(os.path.abspath("..")) from ui import LPC_uicore from ui import LPC_uidef from ui import uidef from ui import uivar from ui import uilang from ru...
41.429752
177
0.664273
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os import shutil import json import subprocess import bincopy import gendef import LPC_gendef sys.path.append(os.path.abspath("..")) from ui import LPC_uicore from ui import LPC_uidef from ui import uidef from ui import uivar from ui import uilang from ru...
4,315
24
239
1119529310128e46b9c85b66b7c8b8e50f596bcd
303
py
Python
ex077.py
raphael-abrantes/exercises-python
71f1e7cba2f56173c256d43e4fe33a43722b4484
[ "MIT" ]
null
null
null
ex077.py
raphael-abrantes/exercises-python
71f1e7cba2f56173c256d43e4fe33a43722b4484
[ "MIT" ]
null
null
null
ex077.py
raphael-abrantes/exercises-python
71f1e7cba2f56173c256d43e4fe33a43722b4484
[ "MIT" ]
null
null
null
tPalavras = ( 'aprender', 'programar', 'linguagem', 'python', 'curso', 'gratis', 'try' ) for i in tPalavras: print(f'\nNa palavra {i.upper()} temos: ', end = '') for letra in i: if letra.lower() in 'aeiou': print(letra, end = ' ')
18.9375
57
0.471947
tPalavras = ( 'aprender', 'programar', 'linguagem', 'python', 'curso', 'gratis', 'try' ) for i in tPalavras: print(f'\nNa palavra {i.upper()} temos: ', end = '') for letra in i: if letra.lower() in 'aeiou': print(letra, end = ' ')
0
0
0
be1f1c1d94b16bfe17346eabeee553f8c3e1965a
5,364
py
Python
ogb_examples/graphproppred/mol/data/splitters.py
zhch8888168/PGL
2e518bc0bb61f73b711f6bad102fad22b55020dc
[ "Apache-2.0" ]
2
2020-11-29T08:59:16.000Z
2020-12-01T10:47:00.000Z
ogb_examples/graphproppred/mol/data/splitters.py
cheeryoung79/PGL
fc517bbb87c570d0b854507769078c479d613914
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-29T13:38:01.000Z
2020-04-29T13:38:01.000Z
ogb_examples/graphproppred/mol/data/splitters.py
cheeryoung79/PGL
fc517bbb87c570d0b854507769078c479d613914
[ "ECL-2.0", "Apache-2.0" ]
1
2021-09-01T12:00:31.000Z
2021-09-01T12:00:31.000Z
# Copyright (c) 2020 PaddlePaddle 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 appli...
34.831169
78
0.694817
# Copyright (c) 2020 PaddlePaddle 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 appli...
3,410
0
46
6b9cdbc46218c039c62bb8831e107a8820147ee0
1,497
py
Python
beer/nnet/residual.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
46
2018-02-27T18:15:08.000Z
2022-02-16T22:10:55.000Z
beer/nnet/residual.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
16
2018-01-26T14:18:51.000Z
2021-02-05T09:34:00.000Z
beer/nnet/residual.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
26
2018-03-12T14:03:26.000Z
2021-05-24T21:15:01.000Z
import torch __all__ = ['ResidualFeedForwardNet'] class ResidualFeedFowardBlock(torch.nn.Module): '''Block of two feed-forward layer with a reisdual connection: f(W1^T x + b1) f(W2^T h1 + b2 ) h2 + x x ------------------> h1 --------------------> h2 ----------> y ...
31.1875
74
0.519038
import torch __all__ = ['ResidualFeedForwardNet'] class ResidualFeedFowardBlock(torch.nn.Module): '''Block of two feed-forward layer with a reisdual connection: f(W1^T x + b1) f(W2^T h1 + b2 ) h2 + x x ------------------> h1 --------------------> h2 ----------> y ...
732
173
85
a6f6bd63c7a98e3087c7019cc57a1c749282e1b4
4,305
py
Python
test_series_count.py
soothingjennyg/pandasTestingProject
c1bf9ec30723316c992f57dd9e2c5e2215dbe595
[ "MIT" ]
null
null
null
test_series_count.py
soothingjennyg/pandasTestingProject
c1bf9ec30723316c992f57dd9e2c5e2215dbe595
[ "MIT" ]
null
null
null
test_series_count.py
soothingjennyg/pandasTestingProject
c1bf9ec30723316c992f57dd9e2c5e2215dbe595
[ "MIT" ]
1
2021-12-08T20:59:09.000Z
2021-12-08T20:59:09.000Z
from numpy import NaN import pandas as pd import unittest import numpy as np ''' The series.count function that we are testing does: Return number of non-NA/null observations in the Series. Parameters ---------- level : int or level name, default None If the axis is a MultiIndex (hierarc...
33.897638
115
0.659698
from numpy import NaN import pandas as pd import unittest import numpy as np ''' The series.count function that we are testing does: Return number of non-NA/null observations in the Series. Parameters ---------- level : int or level name, default None If the axis is a MultiIndex (hierarc...
372
0
27
a3b69191b215d35c511f31daed29f9ac1d3409b3
2,744
py
Python
main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
from flask import Flask , render_template, request, jsonify import Uni_To_Zg import Zg_To_Uni import Win_To_Uni import Uni_To_Win app = Flask(__name__) @app.route("/") @app.route("/about") @app.route("/convert", methods=["POST"]) @app.route("/zawgyitouni") @app.route("/convert1", methods=["POST"]) @app.route(...
27.168317
75
0.680394
from flask import Flask , render_template, request, jsonify import Uni_To_Zg import Zg_To_Uni import Win_To_Uni import Uni_To_Win app = Flask(__name__) @app.route("/") def home(): return render_template("index.html") @app.route("/about") def about(): return render_template("about.html") @app.route("/conv...
1,770
0
308
4c3d02dd60bf681e4f4859f6c7031155c2c82ca0
2,671
py
Python
integration_tests/async_contract.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
66
2021-10-21T23:29:38.000Z
2022-03-30T15:58:13.000Z
integration_tests/async_contract.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
50
2021-10-19T06:11:56.000Z
2022-03-31T17:06:57.000Z
integration_tests/async_contract.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
39
2021-11-07T17:28:31.000Z
2022-03-31T15:03:57.000Z
import asyncio from pathlib import Path import uvloop from terra_sdk.client.lcd import AsyncLCDClient from terra_sdk.client.lcd.api.tx import CreateTxOptions from terra_sdk.core.wasm import MsgExecuteContract, MsgInstantiateContract, MsgStoreCode from terra_sdk.key.mnemonic import MnemonicKey from terra_sdk.util.cont...
32.180723
165
0.639835
import asyncio from pathlib import Path import uvloop from terra_sdk.client.lcd import AsyncLCDClient from terra_sdk.client.lcd.api.tx import CreateTxOptions from terra_sdk.core.wasm import MsgExecuteContract, MsgInstantiateContract, MsgStoreCode from terra_sdk.key.mnemonic import MnemonicKey from terra_sdk.util.cont...
2,224
0
23
05f3e6f471127c2e6a9f1b9e2fa443442a9e42a6
1,699
py
Python
ding/utils/data/tests/test_cache.py
LuciusMos/DI-engine
b040b1c36afce038effec9eb483f625131573824
[ "Apache-2.0" ]
464
2021-07-08T07:26:33.000Z
2022-03-31T12:35:16.000Z
ding/utils/data/tests/test_cache.py
LuciusMos/DI-engine
b040b1c36afce038effec9eb483f625131573824
[ "Apache-2.0" ]
177
2021-07-09T08:22:55.000Z
2022-03-31T07:35:22.000Z
ding/utils/data/tests/test_cache.py
LuciusMos/DI-engine
b040b1c36afce038effec9eb483f625131573824
[ "Apache-2.0" ]
92
2021-07-08T12:16:37.000Z
2022-03-31T09:24:41.000Z
import threading import time from threading import Thread import numpy as np import pytest from ding.utils.data.structure import Cache @pytest.mark.unittest
28.79661
92
0.603296
import threading import time from threading import Thread import numpy as np import pytest from ding.utils.data.structure import Cache @pytest.mark.unittest class TestCache: cache = Cache(16, 4, monitor_interval=1.0, _debug=True) send_count = 0 produce_count = 0 def producer(self, id): time...
1,339
177
22
59013687f8eebc41b14205f054c2177f6e363e91
8,708
py
Python
tests/cli/experiment/delete_test.py
longhuei/floyd-cli
82709f1e301d7a56ac354e4615a354e2c36d71b8
[ "Apache-2.0" ]
162
2017-01-27T02:54:17.000Z
2022-03-03T09:06:28.000Z
tests/cli/experiment/delete_test.py
longhuei/floyd-cli
82709f1e301d7a56ac354e4615a354e2c36d71b8
[ "Apache-2.0" ]
79
2017-02-17T08:58:39.000Z
2021-05-29T09:24:31.000Z
tests/cli/experiment/delete_test.py
longhuei/floyd-cli
82709f1e301d7a56ac354e4615a354e2c36d71b8
[ "Apache-2.0" ]
43
2017-02-23T10:58:42.000Z
2022-01-17T10:29:31.000Z
from click.testing import CliRunner import unittest from mock import patch, call, Mock from tests.cli import assert_exit_code from floyd.cli.experiment import delete from tests.cli.mocks import mock_exp, mock_task_inst, mock_access_token class TestExperimentDelete(unittest.TestCase): """ Tests Experiment CLI...
47.326087
125
0.62322
from click.testing import CliRunner import unittest from mock import patch, call, Mock from tests.cli import assert_exit_code from floyd.cli.experiment import delete from tests.cli.mocks import mock_exp, mock_task_inst, mock_access_token class TestExperimentDelete(unittest.TestCase): """ Tests Experiment CLI...
5,379
0
208
d64b483e1855aad14456f95fbca8b12406695c81
1,827
py
Python
grascii/dictionary/install.py
chanicpanic/grascii
654d24529dd8373d9df35f07b06323bb17ed7ffb
[ "MIT" ]
3
2020-10-02T11:45:47.000Z
2021-06-27T01:16:08.000Z
grascii/dictionary/install.py
chanicpanic/grascii
654d24529dd8373d9df35f07b06323bb17ed7ffb
[ "MIT" ]
2
2021-07-03T23:09:00.000Z
2021-07-06T17:46:02.000Z
grascii/dictionary/install.py
grascii/grascii
654d24529dd8373d9df35f07b06323bb17ed7ffb
[ "MIT" ]
null
null
null
import argparse from pathlib import Path, PurePath from shutil import copy import sys from grascii.appdirs import user_data_dir from grascii.config import APP_NAME description = "Install a Grascii Dictionary" DICTIONARY_PATH = Path(user_data_dir(APP_NAME), "dictionaries") def main() -> None: """Run the insta...
30.966102
86
0.673235
import argparse from pathlib import Path, PurePath from shutil import copy import sys from grascii.appdirs import user_data_dir from grascii.config import APP_NAME description = "Install a Grascii Dictionary" DICTIONARY_PATH = Path(user_data_dir(APP_NAME), "dictionaries") def build_argparser(argparser: argparse.Ar...
1,201
0
69
8b96f17a97e5e2f8cabf1e98b361ff46a4fca0d9
2,062
py
Python
apps/cashfield/forms.py
manax-dojo/cashflow
44da3596ed40d20a5b99179c4f1e016f028cdd71
[ "BSD-3-Clause" ]
null
null
null
apps/cashfield/forms.py
manax-dojo/cashflow
44da3596ed40d20a5b99179c4f1e016f028cdd71
[ "BSD-3-Clause" ]
null
null
null
apps/cashfield/forms.py
manax-dojo/cashflow
44da3596ed40d20a5b99179c4f1e016f028cdd71
[ "BSD-3-Clause" ]
null
null
null
from django import forms from django.contrib.admin import widgets from crispy_forms.helper import FormHelper from crispy_forms.bootstrap import FormActions, TabHolder, Tab from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from .models import Container, Channel, Transfer, Balance
29.457143
140
0.608632
from django import forms from django.contrib.admin import widgets from crispy_forms.helper import FormHelper from crispy_forms.bootstrap import FormActions, TabHolder, Tab from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from .models import Container, Channel, Transfer, Balance class Con...
0
1,655
97
94940ce1fefb22038b5218d31446bce4e688b7ec
744
py
Python
buffer/shard-cpp-test/master-node/test-medium/run_gtests_test.py
zaqwes8811/coordinator-tasks
7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a
[ "MIT" ]
null
null
null
buffer/shard-cpp-test/master-node/test-medium/run_gtests_test.py
zaqwes8811/coordinator-tasks
7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a
[ "MIT" ]
15
2015-03-07T12:46:41.000Z
2015-04-11T09:08:36.000Z
buffer/shard-cpp-test/master-node/test-medium/run_gtests_test.py
zaqwes8811/micro-apps
7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a
[ "MIT" ]
null
null
null
# coding: utf-8 import sys if sys.version_info[0:2] != (2, 6): raise Exception("Must use python 2.6") import os # Inner Reuse from inner_reuse.configurer import Configurer from inner_reuse import tic, toc # App from _code.gtest_runner import run_gtests RUNNER_TASK_FILE = os.sep.join(['_code', 'task_files', 'm...
20.666667
76
0.680108
# coding: utf-8 import sys if sys.version_info[0:2] != (2, 6): raise Exception("Must use python 2.6") import os # Inner Reuse from inner_reuse.configurer import Configurer from inner_reuse import tic, toc # App from _code.gtest_runner import run_gtests RUNNER_TASK_FILE = os.sep.join(['_code', 'task_files', 'm...
263
0
23
17c81ca73e466a3e0a357719d0ea95a854190e32
22,386
py
Python
src/running.py
xygxue/cluster
c54304113ff0a2077569bd4044bfc06f37fcf9af
[ "MIT" ]
null
null
null
src/running.py
xygxue/cluster
c54304113ff0a2077569bd4044bfc06f37fcf9af
[ "MIT" ]
null
null
null
src/running.py
xygxue/cluster
c54304113ff0a2077569bd4044bfc06f37fcf9af
[ "MIT" ]
null
null
null
import logging import sys import os import traceback import json from datetime import datetime import string import random from collections import OrderedDict import time import pickle from functools import partial import ipdb import torch from torch.utils.data import DataLoader import numpy as np import sklearn from...
45.042254
162
0.651345
import logging import sys import os import traceback import json from datetime import datetime import string import random from collections import OrderedDict import time import pickle from functools import partial import ipdb import torch from torch.utils.data import DataLoader import numpy as np import sklearn from...
14,446
34
358
06e239535faef824bffe1c70cf0e26d7d8b0b0ea
48,649
py
Python
Face Reconstruction/3D Face Reconstruction using Graph Convolution Network/base_model.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
314
2020-05-18T07:33:20.000Z
2022-03-28T07:29:20.000Z
Face Reconstruction/3D Face Reconstruction using Graph Convolution Network/base_model.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
704
2020-09-30T10:44:13.000Z
2022-03-30T07:18:28.000Z
Face Reconstruction/3D Face Reconstruction using Graph Convolution Network/base_model.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
342
2020-10-02T14:04:49.000Z
2022-03-31T10:14:20.000Z
import logging import math import os import shutil import time import cv2 import imageio import numpy as np import scipy.sparse import tensorflow as tf import utils from lib import graph, mesh_renderer from lib.mesh_io import write_obj logger = logging.getLogger('x') class BaseModel(): """ Mesh Convolutional...
45.38153
180
0.641966
import logging import math import os import shutil import time import cv2 import imageio import numpy as np import scipy.sparse import tensorflow as tf import utils from lib import graph, mesh_renderer from lib.mesh_io import write_obj logger = logging.getLogger('x') class BaseModel(): """ Mesh Convolutional...
32,388
0
633
b8eeae7341e09cf8d911ebd5985806f15f14f470
15,085
py
Python
fs/copy.py
dhirschfeld/pyfilesystem2
b2c0d96f55d4dfe777b4f9476676b77d01f36bf7
[ "MIT" ]
null
null
null
fs/copy.py
dhirschfeld/pyfilesystem2
b2c0d96f55d4dfe777b4f9476676b77d01f36bf7
[ "MIT" ]
null
null
null
fs/copy.py
dhirschfeld/pyfilesystem2
b2c0d96f55d4dfe777b4f9476676b77d01f36bf7
[ "MIT" ]
null
null
null
"""Functions for copying resources *between* filesystem. """ from __future__ import print_function, unicode_literals import typing from .errors import FSError from .opener import manage_fs from .path import abspath, combine, frombase, normpath from .tools import is_thread_safe from .walk import Walker if False: # ...
38.979328
81
0.600398
"""Functions for copying resources *between* filesystem. """ from __future__ import print_function, unicode_literals import typing from .errors import FSError from .opener import manage_fs from .path import abspath, combine, frombase, normpath from .tools import is_thread_safe from .walk import Walker if False: # ...
148
0
108
d5939e241bf3648ce17af265074b984d2e70dfa5
995
py
Python
comparison.py
gabriel-valle/minimizer
eb3e42ca5fa4667c712ad2228a6c8af3bdb73185
[ "MIT" ]
null
null
null
comparison.py
gabriel-valle/minimizer
eb3e42ca5fa4667c712ad2228a6c8af3bdb73185
[ "MIT" ]
null
null
null
comparison.py
gabriel-valle/minimizer
eb3e42ca5fa4667c712ad2228a6c8af3bdb73185
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import sys import minimize as mini import math # f(x, y) = 100(y-x²)² + (1-x)² mims = [] methods = ["newton", "BFGS", "gradient"] colors = ["darkblue", "yellow", "purple"] for i in range(len(methods)): mims.append(mini.Minimizer(f, 2, np.array([0, 0]))) mims[i].f_grad = ...
30.151515
76
0.61608
import numpy as np import pandas as pd import sys import minimize as mini import math # f(x, y) = 100(y-x²)² + (1-x)² def f(entry): x, y = entry[0], entry[1] return 100*(y-x**2)**2 + (1-x)**2 def grad_f(entry): x, y = entry[0], entry[1] return np.array([2*(200*x**3-200*x*y+x-1), 200*(y-x**2)]) def hess...
248
0
66
710076b3af58b209ef0b6f76493745b202b4d562
2,510
py
Python
python/torque-and-development.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
21
2015-02-09T18:08:38.000Z
2021-11-08T15:00:48.000Z
python/torque-and-development.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
7
2020-04-12T23:00:19.000Z
2021-01-30T23:44:24.000Z
python/torque-and-development.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
27
2015-07-22T18:08:12.000Z
2022-02-28T19:50:26.000Z
#!/bin/python3 import math import os import random import re import sys from collections import defaultdict # Note the name of the file is based on this URL: # https://www.hackerrank.com/challenges/torque-and-development/problem # The problem name is "Roads and Libraries" if __name__ == '__main__': fptr = op...
27.582418
77
0.60239
#!/bin/python3 import math import os import random import re import sys from collections import defaultdict # Note the name of the file is based on this URL: # https://www.hackerrank.com/challenges/torque-and-development/problem # The problem name is "Roads and Libraries" class DisjointSet: def __init__(self,...
1,524
-3
208
75576d646205e3c5edc66d3c8a1b12d8a946428e
637
py
Python
utils/http.py
331leo/HyundaiOC_Backend
71d525d2ac036a884555c38b8b9c80d42a0e49db
[ "MIT" ]
null
null
null
utils/http.py
331leo/HyundaiOC_Backend
71d525d2ac036a884555c38b8b9c80d42a0e49db
[ "MIT" ]
null
null
null
utils/http.py
331leo/HyundaiOC_Backend
71d525d2ac036a884555c38b8b9c80d42a0e49db
[ "MIT" ]
1
2022-03-05T02:29:42.000Z
2022-03-05T02:29:42.000Z
import aiohttp from enum import Enum from models.user import User
25.48
59
0.579278
import aiohttp from enum import Enum from models.user import User class REQ_TYPE(str, Enum): GET = "GET" POST = "POST" async def request(type: REQ_TYPE, **kwargs) -> dict: async with aiohttp.ClientSession() as session: async with session.request(type, **kwargs) as resp: return await r...
463
39
68
8f3dca025adabe11f2e73709dd4ea46d5d23a0ed
5,321
py
Python
scripts/visualize.py
cannin/covid-sicr-test
f842946357428730265b7d0a6640172dc757ecae
[ "MIT" ]
null
null
null
scripts/visualize.py
cannin/covid-sicr-test
f842946357428730265b7d0a6640172dc757ecae
[ "MIT" ]
null
null
null
scripts/visualize.py
cannin/covid-sicr-test
f842946357428730265b7d0a6640172dc757ecae
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import argparse import logging from multiprocessing import Pool import pandas as pd import papermill as pm from pathlib import Path from tqdm import tqdm import warnings warnings.simplefilter(action='ignore', category=FutureWarning) for lib in ['blib2to3', 'papermill']: logger...
38.839416
79
0.631648
#!/usr/bin/env python # coding: utf-8 import argparse import logging from multiprocessing import Pool import pandas as pd import papermill as pm from pathlib import Path from tqdm import tqdm import warnings warnings.simplefilter(action='ignore', category=FutureWarning) for lib in ['blib2to3', 'papermill']: logger...
1,060
0
45
23a01d624ffefcd1efd212b7cac372fcf8f5665b
2,642
py
Python
lib/Serializer.py
oveis/DeepVideoFaceSwap
e507f94d4f5d74c36e41c386c6fb14bb745a4885
[ "MIT" ]
5
2019-05-17T11:54:04.000Z
2020-10-06T18:45:17.000Z
lib/Serializer.py
oveis/DeepVideoFaceSwap
e507f94d4f5d74c36e41c386c6fb14bb745a4885
[ "MIT" ]
6
2020-03-04T23:21:03.000Z
2020-07-23T07:46:40.000Z
lib/Serializer.py
oveis/DeepVideoFaceSwap
e507f94d4f5d74c36e41c386c6fb14bb745a4885
[ "MIT" ]
5
2019-06-05T00:20:24.000Z
2019-09-15T15:40:23.000Z
#!/usr/bin/env python3 """ Library providing convenient classes and methods for writing data to files. """ import logging import json import pickle try: import yaml except ImportError: yaml = None logger = logging.getLogger(__name__) # pylint: disable=invalid-name class Serializer(): """ Parent Seriali...
25.161905
88
0.643452
#!/usr/bin/env python3 """ Library providing convenient classes and methods for writing data to files. """ import logging import json import pickle try: import yaml except ImportError: yaml = None logger = logging.getLogger(__name__) # pylint: disable=invalid-name class Serializer(): """ Parent Seriali...
366
0
156
0864eb168b511f133d3d02e20e4444df5f14ab23
926
py
Python
pySnowRadar/timefunc.py
kingjml/pySnowRadar
a64721c3a84f255aa3bb9b872682a79969f7b1be
[ "MIT" ]
4
2020-06-04T00:25:46.000Z
2021-12-17T15:08:35.000Z
pySnowRadar/timefunc.py
kingjml/pySnowRadar
a64721c3a84f255aa3bb9b872682a79969f7b1be
[ "MIT" ]
7
2020-02-19T11:34:26.000Z
2020-10-02T12:52:17.000Z
pySnowRadar/timefunc.py
kingjml/pySnowRadar
a64721c3a84f255aa3bb9b872682a79969f7b1be
[ "MIT" ]
null
null
null
from bisect import bisect from datetime import datetime #Adapted from here https://stackoverflow.com/questions/33415475/how-to-get-current-date-and-time-from-gps-unsegment-time-in-python _LEAP_DATES = ((1981, 6, 30), (1982, 6, 30), (1983, 6, 30), (1985, 6, 30), (1987, 12, 31), (1989, 12, 31), ...
42.090909
130
0.601512
from bisect import bisect from datetime import datetime #Adapted from here https://stackoverflow.com/questions/33415475/how-to-get-current-date-and-time-from-gps-unsegment-time-in-python _LEAP_DATES = ((1981, 6, 30), (1982, 6, 30), (1983, 6, 30), (1985, 6, 30), (1987, 12, 31), (1989, 12, 31), ...
0
0
0
ecbc24bc7d4b297e7efd8ceacf54947fdb42a15a
703
py
Python
noo/cli/components/config.py
nooproject/noo
238711c55faeb1226a4e5339cd587a312c4babac
[ "MIT" ]
2
2022-02-03T07:35:46.000Z
2022-02-03T16:12:25.000Z
noo/cli/components/config.py
nooproject/noo
238711c55faeb1226a4e5339cd587a312c4babac
[ "MIT" ]
2
2022-03-05T02:31:38.000Z
2022-03-05T21:26:42.000Z
noo/cli/components/config.py
nooproject/noo
238711c55faeb1226a4e5339cd587a312c4babac
[ "MIT" ]
1
2022-03-05T01:40:29.000Z
2022-03-05T01:40:29.000Z
from typer import Typer from ...impl.utils import STORE, echo app = Typer() ALLOWED_KEYS = {"shell", "index"} @app.command("set") @app.command("reset")
19
76
0.559033
from typer import Typer from ...impl.utils import STORE, echo app = Typer() ALLOWED_KEYS = {"shell", "index"} @app.command("set") def set(key: str, value: str) -> None: if key not in ALLOWED_KEYS: echo(f"Invalid key: {key}") return if key == "shell": if value not in {"allow", "den...
499
0
44
d2b05002e02a97984c3d8bd84dccb5b850967d14
30,802
py
Python
PR_BCI_team/Team_StarLab/DKHan/examples/openbmi_basic/datasets.py
PatternRecognition/OpenBMI
d9291ddb81f4319fb3764d7192e0363939a62ee9
[ "MIT" ]
217
2015-11-02T11:10:29.000Z
2022-03-22T07:01:12.000Z
PR_BCI_team/Team_StarLab/DKHan/examples/openbmi_basic/datasets.py
deep-bci-g/OpenBMI
75daf901b2dbe215852cbff243606dcfcd10f05c
[ "MIT" ]
24
2015-11-02T11:10:45.000Z
2021-09-08T11:10:33.000Z
PR_BCI_team/Team_StarLab/DKHan/examples/openbmi_basic/datasets.py
deep-bci-g/OpenBMI
75daf901b2dbe215852cbff243606dcfcd10f05c
[ "MIT" ]
112
2016-01-22T01:45:44.000Z
2022-03-22T07:08:19.000Z
from __future__ import print_function import argparse import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import Sub...
41.456258
189
0.483605
from __future__ import print_function import argparse import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import Sub...
29,080
119
813
72cabdebc468973bc9fbfb4027766d649c6732c2
692
py
Python
detection/settings.py
HermasTV/uol_face_detection_recognition
7622fb23c31651cb25fc995bcdaabffd8f24a1a1
[ "MIT" ]
null
null
null
detection/settings.py
HermasTV/uol_face_detection_recognition
7622fb23c31651cb25fc995bcdaabffd8f24a1a1
[ "MIT" ]
null
null
null
detection/settings.py
HermasTV/uol_face_detection_recognition
7622fb23c31651cb25fc995bcdaabffd8f24a1a1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """settings.py: detection module settings file """ __author__ = "Ahmed Hermas" __copyright__ = "Copyright 2022, © UOL " __license__ = "MIT" __version__ = "0.1.0" __email__ = "a7medhermas@gmail.com" MODELS_CONFIG = { 'hog' : {'loader':'_hog_loader', 'detector':'_getface_ho...
25.62963
50
0.599711
#!/usr/bin/env python3 """settings.py: detection module settings file """ __author__ = "Ahmed Hermas" __copyright__ = "Copyright 2022, © UOL " __license__ = "MIT" __version__ = "0.1.0" __email__ = "a7medhermas@gmail.com" MODELS_CONFIG = { 'hog' : {'loader':'_hog_loader', 'detector':'_getface_ho...
0
0
0
faadb6c5aeddd3341afd44d8251b11ca503ccfc4
1,050
py
Python
sped/efd/pis_cofins/arquivos.py
devmetalbr/python-sped
f6c95ff684df83386e9b60b1e05f2588b7d95a22
[ "MIT" ]
null
null
null
sped/efd/pis_cofins/arquivos.py
devmetalbr/python-sped
f6c95ff684df83386e9b60b1e05f2588b7d95a22
[ "MIT" ]
null
null
null
sped/efd/pis_cofins/arquivos.py
devmetalbr/python-sped
f6c95ff684df83386e9b60b1e05f2588b7d95a22
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ... import arquivos from . import blocos from . import registros from .blocos import Bloco0 from .blocos import Bloco1 from .blocos import Bloco9 from .blocos import BlocoA from .blocos import BlocoC from .blocos import BlocoD from .blocos import BlocoF from .blocos import BlocoI from .blo...
27.631579
46
0.668571
# -*- coding: utf-8 -*- from ... import arquivos from . import blocos from . import registros from .blocos import Bloco0 from .blocos import Bloco1 from .blocos import Bloco9 from .blocos import BlocoA from .blocos import BlocoC from .blocos import BlocoD from .blocos import BlocoF from .blocos import BlocoI from .blo...
415
174
23
bc1de899bb63a3ca7eba1b31490b62c0ad47a355
16,732
py
Python
register_dia.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
1
2018-12-18T10:58:34.000Z
2018-12-18T10:58:34.000Z
register_dia.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
null
null
null
register_dia.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'register_dia.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from background import *
52.2875
197
0.70153
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'register_dia.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Regist(object): def setupUi(self, Regist): ...
16,533
3
81
67b5f17d9eb7d26899f247ee9b7b0320a7966f8c
651
py
Python
scripts/basic/screenshot.py
Xp-speit2018/Warframe_Relic
a473f7e0e580e511807a4d62b9b04436b41301d8
[ "Apache-2.0" ]
3
2019-01-28T10:01:02.000Z
2019-03-10T06:49:10.000Z
scripts/basic/screenshot.py
Xp-speit2018/Warframe_Relic
a473f7e0e580e511807a4d62b9b04436b41301d8
[ "Apache-2.0" ]
null
null
null
scripts/basic/screenshot.py
Xp-speit2018/Warframe_Relic
a473f7e0e580e511807a4d62b9b04436b41301d8
[ "Apache-2.0" ]
1
2019-03-10T05:44:58.000Z
2019-03-10T05:44:58.000Z
import os,sys,time,json import win32api,win32con import config steam_screenshot_dir = config.get_config('steam_screenshot_dir') if __name__ == '__main__': time.sleep(3) snapscreen() time.sleep(0.5) print(get_raw_location())
27.125
72
0.703533
import os,sys,time,json import win32api,win32con import config steam_screenshot_dir = config.get_config('steam_screenshot_dir') def snapscreen(): win32api.keybd_event(123,0,0,0) #Press F12 win32api.keybd_event(123,0,win32con.KEYEVENTF_KEYUP,0) #Key F12 up ctime = time.strftime('%Y_%m_%d_%H%M%S',time.local...
363
0
46
c7dde020a302dd33538b8435327f578535ef5253
1,771
py
Python
MADDPG/workspace/ddpg.py
Jeyhooon/deep-reinforcement-learning
7a6f1974493a2058635539a4868512cdf3fb5bdb
[ "MIT" ]
null
null
null
MADDPG/workspace/ddpg.py
Jeyhooon/deep-reinforcement-learning
7a6f1974493a2058635539a4868512cdf3fb5bdb
[ "MIT" ]
null
null
null
MADDPG/workspace/ddpg.py
Jeyhooon/deep-reinforcement-learning
7a6f1974493a2058635539a4868512cdf3fb5bdb
[ "MIT" ]
null
null
null
# individual network settings for each actor + critic pair # see networkforall for details from networkforall import Network from utilities import hard_update, gumbel_softmax, onehot_from_logits from torch.optim import Adam import torch import numpy as np # add OU noise for exploration from OUNoise import OUNoise #...
36.895833
114
0.706945
# individual network settings for each actor + critic pair # see networkforall for details from networkforall import Network from utilities import hard_update, gumbel_softmax, onehot_from_logits from torch.optim import Adam import torch import numpy as np # add OU noise for exploration from OUNoise import OUNoise #...
1,267
-5
103
321cb0062313080fdf84b7beef9c96569ebc2934
705
py
Python
pyzkaccess/ctypes.py
cybrnode/pyzkaccess
4d581035f65d25c8401453349ea311f7ce07ce27
[ "Apache-2.0" ]
null
null
null
pyzkaccess/ctypes.py
cybrnode/pyzkaccess
4d581035f65d25c8401453349ea311f7ce07ce27
[ "Apache-2.0" ]
null
null
null
pyzkaccess/ctypes.py
cybrnode/pyzkaccess
4d581035f65d25c8401453349ea311f7ce07ce27
[ "Apache-2.0" ]
null
null
null
"""This module is intended to safety import Windows-specific features from `ctypes` stdlib module on non-windows platform -- they are replaced by mock objects. Despite the code which uses that features becomes partially unoperable in this case, we can import it and generate documentation for instance """ import warning...
35.25
94
0.739007
"""This module is intended to safety import Windows-specific features from `ctypes` stdlib module on non-windows platform -- they are replaced by mock objects. Despite the code which uses that features becomes partially unoperable in this case, we can import it and generate documentation for instance """ import warning...
0
0
0
b83b21189d719f7aab62baaa301c65c4a9113216
254
py
Python
test/core/metaflow_custom/plugins/test_step_decorator.py
oavdeev/metaflow
a655de9ef62870a668d68a1f656bd7b9b92b7a71
[ "Apache-2.0" ]
5,821
2019-12-03T17:57:52.000Z
2022-03-31T22:55:12.000Z
test/core/metaflow_custom/plugins/test_step_decorator.py
oavdeev/metaflow
a655de9ef62870a668d68a1f656bd7b9b92b7a71
[ "Apache-2.0" ]
605
2019-12-03T23:09:32.000Z
2022-03-31T16:15:05.000Z
test/core/metaflow_extensions/plugins/test_step_decorator.py
isabella232/metaflow
bc13048d00241e80b959f71f33e4e6b8a2748b3f
[ "Apache-2.0" ]
539
2019-12-03T18:25:53.000Z
2022-03-29T18:22:33.000Z
from metaflow.decorators import StepDecorator
28.222222
89
0.783465
from metaflow.decorators import StepDecorator class TestStepDecorator(StepDecorator): name = 'test_step_decorator' def task_post_step(self, step_name, flow, graph, retry_count, max_user_code_retries): flow.plugin_set_value = step_name
106
78
23
c288ee3fc0cf423ceaf08b833dc455121cad3417
904
py
Python
analysis.py
Aveek-Saha/wordle-solver
b3bffc8d498416f37410aa3d6157893c0adaa3b7
[ "MIT" ]
null
null
null
analysis.py
Aveek-Saha/wordle-solver
b3bffc8d498416f37410aa3d6157893c0adaa3b7
[ "MIT" ]
null
null
null
analysis.py
Aveek-Saha/wordle-solver
b3bffc8d498416f37410aa3d6157893c0adaa3b7
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import json import os from collections import Counter import pandas as pd DATASET_DIR = 'datasets' EXPERIMENT_DIR = 'combfreq' RESULTS = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulation_results_scaled_tf.json') RESULTS_EXTENDED = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulat...
30.133333
106
0.75885
import matplotlib.pyplot as plt import json import os from collections import Counter import pandas as pd DATASET_DIR = 'datasets' EXPERIMENT_DIR = 'combfreq' RESULTS = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulation_results_scaled_tf.json') RESULTS_EXTENDED = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulat...
0
0
0
fc48aba289d448ad0ca5b0d020dd11686c9d2fc5
6,707
py
Python
cinder/objects/cgsnapshot.py
alexisries/openstack-cinder
7cc6e45c5ddb8bf771bdb01b867628e41761ae11
[ "Apache-2.0" ]
2
2019-05-24T14:13:50.000Z
2019-05-24T14:21:13.000Z
cinder/objects/cgsnapshot.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
28
2017-08-17T14:46:05.000Z
2022-03-29T12:42:12.000Z
cinder/objects/cgsnapshot.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
3
2017-04-27T16:11:40.000Z
2020-02-12T21:27:00.000Z
# Copyright 2015 Intel Corporation # # 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 ...
39.452941
78
0.627702
# Copyright 2015 Intel Corporation # # 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 ...
4,001
1,796
44
344a495fbf7cb9d4bfb0f99432929089c9febf24
6,363
py
Python
src/client/__main__.py
guardian-network/webapp-poc
e9b2079117a52dc94b5fc5a181d1a1632ab8986c
[ "MIT" ]
null
null
null
src/client/__main__.py
guardian-network/webapp-poc
e9b2079117a52dc94b5fc5a181d1a1632ab8986c
[ "MIT" ]
14
2019-04-26T02:44:01.000Z
2019-10-09T18:09:48.000Z
src/client/__main__.py
guardian-network/webapp-poc
e9b2079117a52dc94b5fc5a181d1a1632ab8986c
[ "MIT" ]
null
null
null
# stdlib import argparse import logging import logging.config import signal import sys import os # third party lib import requests # Internal lib from client.lib import shared from lib import settings import worker from worker import factory from lib.logging_config import return_client_config # Routes server_host =...
36.153409
118
0.630677
# stdlib import argparse import logging import logging.config import signal import sys import os # third party lib import requests # Internal lib from client.lib import shared from lib import settings import worker from worker import factory from lib.logging_config import return_client_config # Routes server_host =...
5,666
95
161
f742af90db665ef1dbe10a4988b1ec91b7f78a5a
421
py
Python
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
from .cdn import return_cdn_avatar # Set interaction opcodes DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 RESUME = 6 RECONNECT = 7 INVALID_SESSION = 9 HELLO = 10 HEARTBEAT_ACK = 11 # Set application command types SLASH = 2 USER = 2 MESSAGE = 3 # Set message response types CHANNEL_WITH_SOURCE = 4 DEFERRED_CHANNEL_WITH_SOU...
16.84
34
0.769596
from .cdn import return_cdn_avatar # Set interaction opcodes DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 RESUME = 6 RECONNECT = 7 INVALID_SESSION = 9 HELLO = 10 HEARTBEAT_ACK = 11 # Set application command types SLASH = 2 USER = 2 MESSAGE = 3 # Set message response types CHANNEL_WITH_SOURCE = 4 DEFERRED_CHANNEL_WITH_SOU...
0
0
0