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
93744df5a36c723521ccc2b1bfaab65acee53603
2,261
py
Python
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
#!usr/bin/python import re target = open ("linkage_mates.txt","w") with open ("mate_aligned.txt", "r") as f: fam={} fam_mate={} lines = f.readlines() for line in lines: line_split = line.split("\t", 1) try: fam[line_split[0]] fam[line_split[0]].append(line_split[1]) except KeyErr...
37.683333
102
0.588235
#!usr/bin/python import re def callVariants (mate1_seq,mate1_start,mate2_seq,mate2_start): a = [(m.start() + mate1_start, m.group(0)) for m in re.finditer(r'[ATCG]', mate1_seq)] b = [(n.start() + mate2_start, n.group(0)) for n in re.finditer(r'[ATCG]', mate2_seq)] if len(a) > 0 and len(b) > 0: return([...
273
0
23
a769231bad160b880c80b619dfcd7fdd0624e4e4
395
py
Python
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/IPND
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
1
2020-07-04T14:00:48.000Z
2020-07-04T14:00:48.000Z
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/IPND
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
20
2020-06-01T04:32:16.000Z
2020-09-14T07:18:54.000Z
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/ipnd
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
null
null
null
x = False while x == False: value = input("Enter the number between 0-9 : ") try : value = int(value) if value > 9: print("Your value is over 9") elif value < 0: print("Your value is less than 0") else: print("Your value is ",value) ...
26.333333
52
0.511392
x = False while x == False: value = input("Enter the number between 0-9 : ") try : value = int(value) if value > 9: print("Your value is over 9") elif value < 0: print("Your value is less than 0") else: print("Your value is ",value) ...
0
0
0
aaf692b2b8bcb236090a695b5dd6f86ceb7b31cb
4,114
py
Python
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
1
2022-03-07T09:06:11.000Z
2022-03-07T09:06:11.000Z
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 import multiprocessing import os import unittest from typing imp...
30.701493
86
0.619105
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 import multiprocessing import os import unittest from typing imp...
2,530
980
46
a195e048de769d1fb2d505d04844389977be44b2
208
py
Python
stubs/uvicorn/__init__.py
psanlorenzo/guillotina
0840cf39914d23a9e26e35bd40939511d3ca78d7
[ "BSD-2-Clause" ]
null
null
null
stubs/uvicorn/__init__.py
psanlorenzo/guillotina
0840cf39914d23a9e26e35bd40939511d3ca78d7
[ "BSD-2-Clause" ]
1
2021-01-16T01:02:36.000Z
2021-01-29T17:07:58.000Z
stubs/uvicorn/__init__.py
vangheem/guillotina
fb678dd81807fd4c63aa1ef3dae4b9a151e3f274
[ "BSD-2-Clause" ]
null
null
null
from typing import Any from typing import Dict
17.333333
49
0.629808
from typing import Any from typing import Dict class Config(object): def __init__(self, app: Any, **kwargs: Dict): ... class Server(object): def __init__(self, config: Config): ...
62
0
98
773df7b9fdf5fc0e996e0014bb2b01738120970d
13,630
py
Python
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
1
2020-06-18T20:15:35.000Z
2020-06-18T20:15:35.000Z
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
2
2020-06-18T17:47:12.000Z
2020-06-22T00:28:06.000Z
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
null
null
null
"""Test for asyncprawcore.auth.Authorizer classes.""" import pytest import asyncprawcore from ..conftest import two_factor_callback # noqa F401 from . import IntegrationTest
36.937669
84
0.674101
"""Test for asyncprawcore.auth.Authorizer classes.""" import pytest import asyncprawcore from ..conftest import two_factor_callback # noqa F401 from . import IntegrationTest class AuthorizerBase(IntegrationTest): async def setUp(self): await super().setUp() self.authentication = asyncprawcore.T...
12,506
103
839
50430b6a7cb427810bf83067a00ca21376a2136a
1,405
py
Python
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
57
2021-08-06T19:23:06.000Z
2022-03-30T04:20:11.000Z
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
3
2021-09-01T00:31:10.000Z
2021-11-13T11:27:42.000Z
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
12
2021-08-08T05:18:38.000Z
2022-03-24T20:12:56.000Z
# https://github.com/pratogab/batch-transforms import torch class Normalize: """Applies the :class:`~torchvision.transforms.Normalize` transform to a batch of images. .. note:: This transform acts out of place by default, i.e., it does not mutate the input tensor. Args: mean (sequence):...
33.452381
95
0.614947
# https://github.com/pratogab/batch-transforms import torch class Normalize: """Applies the :class:`~torchvision.transforms.Normalize` transform to a batch of images. .. note:: This transform acts out of place by default, i.e., it does not mutate the input tensor. Args: mean (sequence):...
268
0
26
c7b93733bb862c135fc9a82d718f69735ae374c2
11,229
py
Python
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
from flask import ( current_app, flash, Blueprint, render_template, request, redirect, url_for, abort, make_response, ) from ..models import Option, Page, User, Category, Tag, Post, Comment, Link from ..extensions import db from ..forms import ( LoginForm, PostForm, PageF...
30.348649
85
0.657138
from flask import ( current_app, flash, Blueprint, render_template, request, redirect, url_for, abort, make_response, ) from ..models import Option, Page, User, Category, Tag, Post, Comment, Link from ..extensions import db from ..forms import ( LoginForm, PostForm, PageF...
8,888
0
550
aa6b3e654bb33db0728b4d41611c7a6081dd7f50
4,967
py
Python
core/tests/test_helpers.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
core/tests/test_helpers.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
core/tests/test_helpers.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
import http import io from unittest import mock import pytest import requests_mock from django.conf import settings from requests.exceptions import HTTPError from core import helpers from core.tests.helpers import create_response @pytest.fixture(autouse=True) @mock.patch('core.helpers.boto3') @mock.patch('core....
35.22695
112
0.75297
import http import io from unittest import mock import pytest import requests_mock from django.conf import settings from requests.exceptions import HTTPError from core import helpers from core.tests.helpers import create_response @pytest.fixture(autouse=True) def data_science_settings(): settings.AWS_ACCESS_KEY...
4,153
0
293
ee113cbc67366b094f66d4642834b558ba0bb8d0
76
py
Python
py2nb/__init__.py
DSqiansun/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
1
2019-01-04T16:09:19.000Z
2019-01-04T16:09:19.000Z
py2nb/__init__.py
bjornaa/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
null
null
null
py2nb/__init__.py
bjornaa/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
2
2019-01-02T21:14:09.000Z
2021-05-14T17:05:34.000Z
"""init file for py2nb""" from .py2nb import py2nb from .nb2py import nb2py
19
25
0.736842
"""init file for py2nb""" from .py2nb import py2nb from .nb2py import nb2py
0
0
0
d80353d24145ef46c88fd794949e1f9e51331579
1,243
py
Python
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
3
2020-01-20T17:28:14.000Z
2020-04-03T16:18:59.000Z
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
17
2019-09-05T22:52:15.000Z
2020-10-30T16:24:18.000Z
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
2
2019-05-23T17:14:31.000Z
2019-05-28T18:00:22.000Z
import os import pytest import boto3 import base64 from moto import mock_s3 from firehose_replicator import firehose_replicator ECS_BUCKET_NAME = "the-ecs-bucket" ECS_OBJECT_PREFIX = "cv/wydot" os.environ["ECS_BUCKET_NAME"] = ECS_BUCKET_NAME os.environ["ECS_OBJECT_PREFIX"] = ECS_OBJECT_PREFIX @mock_s3
31.871795
94
0.690265
import os import pytest import boto3 import base64 from moto import mock_s3 from firehose_replicator import firehose_replicator ECS_BUCKET_NAME = "the-ecs-bucket" ECS_OBJECT_PREFIX = "cv/wydot" os.environ["ECS_BUCKET_NAME"] = ECS_BUCKET_NAME os.environ["ECS_OBJECT_PREFIX"] = ECS_OBJECT_PREFIX @mock_s3 def test_lambd...
914
0
22
67cfe624ac236012e7db426a2f6b1064220b94a7
1,404
py
Python
python_helper/api/src/annotation/MethodAnnotation.py
SamuelJansen/python_helper
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
[ "MIT" ]
null
null
null
python_helper/api/src/annotation/MethodAnnotation.py
SamuelJansen/python_helper
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
[ "MIT" ]
null
null
null
python_helper/api/src/annotation/MethodAnnotation.py
SamuelJansen/python_helper
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
[ "MIT" ]
null
null
null
from python_helper.api.src.service import LogHelper, ReflectionHelper from python_helper.api.src.domain import Constant as c
50.142857
177
0.700142
from python_helper.api.src.service import LogHelper, ReflectionHelper from python_helper.api.src.domain import Constant as c def Function(function,*args,**kwargs) : def wrapedFunction(*args,**kwargs) : try : functionReturn = function(*args,**kwargs) except Exception as exception : ...
1,233
0
46
4b35fe79a3e0c6551813d3d593c0e7b4f9d590df
453
py
Python
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
###################THIS FILE DOES NOT WORK################# import requests import html_to_json #URL = "https://modelo-prueba.herokuapp.com/result" url = "http://127.0.0.1:8080/result" data = {'a':1, 'b':2, 'c':3, 'd':4} ####################Alternativa1############################### r = requests.post(url,data=data)...
26.647059
63
0.540839
###################THIS FILE DOES NOT WORK################# import requests import html_to_json #URL = "https://modelo-prueba.herokuapp.com/result" url = "http://127.0.0.1:8080/result" data = {'a':1, 'b':2, 'c':3, 'd':4} ####################Alternativa1############################### r = requests.post(url,data=data)...
0
0
0
4029eb6d6976950814e43bdc0cd78a0c7171aede
1,087
py
Python
chris_plugin/constants.py
FNNDSC/chris_plugin
a6934d40197ef9ab9c9af5f8156677b7c7c43e51
[ "MIT" ]
null
null
null
chris_plugin/constants.py
FNNDSC/chris_plugin
a6934d40197ef9ab9c9af5f8156677b7c7c43e51
[ "MIT" ]
1
2022-02-08T02:33:15.000Z
2022-02-10T00:42:32.000Z
chris_plugin/constants.py
FNNDSC/chris_plugin
a6934d40197ef9ab9c9af5f8156677b7c7c43e51
[ "MIT" ]
null
null
null
from chris_plugin.types import ParameterType import logging from typing import Union class Placeholders: """ The ChRIS store requires a default value to be provided for arguments which are optional, however argparse doesn't care. If the ChRIS plugin does not specify a default for an argument that ...
31.970588
134
0.696412
from chris_plugin.types import ParameterType import logging from typing import Union class Placeholders: """ The ChRIS store requires a default value to be provided for arguments which are optional, however argparse doesn't care. If the ChRIS plugin does not specify a default for an argument that ...
354
0
52
7f8dceba5ca0d6ccf5ed5b8a74eec0297a539c11
1,157
py
Python
src/replay_memory.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
src/replay_memory.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
src/replay_memory.py
NeiH2304/ProCon_ver_4
a51604bc8b1510971d981a1d0f06b9d3ff8494aa
[ "MIT" ]
null
null
null
import numpy as np import random from collections import deque
32.138889
66
0.606742
import numpy as np import random from collections import deque class ReplayBuffer(): def __init__(self, max_size): self.buffer = deque(maxlen=max_size) self.maxSize = max_size self.len = 0 self.mem_size = max_size def store_transition(self, state, action, reward, next_state): ...
139
932
23
49850fd0037339f84f10ffcd47ee7ded7e2b4689
4,707
py
Python
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np if __name__ == '__main__': feature = torch.randn(1, 32, 128, 256) # canvas_transform(feature) # grid_test() # grid_canvas = create_grid_canvas(feature) # print(grid_canvas.shape) # grid_canvas = normalize_g...
39.225
140
0.650945
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class PointPropagation(nn.Module): def __init__(self, feature_shape, num_offset=1): super().__init__() N, C, H, W = feature_shape self.num_offset = num_offset self.center_offset = nn.Conv2d(C, num...
4,042
13
214
aed27ca013566e9f87d96282a2ec73ae485cb059
10,073
py
Python
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
#! /usr/local/bin/python3.5 import socket import struct import textwrap import binascii import struct import sys TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' # Unpack Ethernet Fram...
32.811075
132
0.588702
#! /usr/local/bin/python3.5 import socket import struct import textwrap import binascii import struct import sys TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' def main(): conn = socket.s...
9,199
0
360
4ee25690a84de611beacf85b5bedf80eaab07608
1,114
py
Python
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Ericsson AB # 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 a...
39.785714
78
0.663375
# Copyright 2016 Ericsson AB # 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 a...
0
0
0
0cabf86669b31d921beb05d1e094eea3623482bf
1,278
py
Python
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
87
2017-07-22T00:14:20.000Z
2022-03-28T04:00:43.000Z
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
21
2018-05-29T06:50:18.000Z
2020-07-30T19:07:58.000Z
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
31
2018-06-11T19:45:08.000Z
2022-01-27T08:48:39.000Z
#!/usr/bin/python # # Generate test cases for version_test.go # # Herein lies my first ever python script... # import rpm versions = [ "", "0", "1", "2", "10", "100", "0.0", "0.1", "0.10", "0.99", "1.0", "1.99", "2.0", "0.0.0", "0.0.1", "0.0.2", "0.0.10", "0.0.99", "0.1.0", "0....
15.585366
107
0.507825
#!/usr/bin/python # # Generate test cases for version_test.go # # Herein lies my first ever python script... # import rpm versions = [ "", "0", "1", "2", "10", "100", "0.0", "0.1", "0.10", "0.99", "1.0", "1.99", "2.0", "0.0.0", "0.0.1", "0.0.2", "0.0.10", "0.0.99", "0.1.0", "0....
0
0
0
149c1a4a52f5b233c1f81674ca47806da74f3aa9
3,875
py
Python
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
import json import csv DISTRICT = 2 PARTY = 4 VOTE_PERCENTAGE = 8 WINNER = 11 PARTIES = ("NDP", "Liberal", "Conservative", "Bloc Quebecois", "Green") json_file = open("electoral_districts.json") districts = json.load(json_file) ## Parse csv file containing individual results csv_file = "output.csv" with open(csv_f...
35.87963
145
0.640258
import json import csv DISTRICT = 2 PARTY = 4 VOTE_PERCENTAGE = 8 WINNER = 11 PARTIES = ("NDP", "Liberal", "Conservative", "Bloc Quebecois", "Green") json_file = open("electoral_districts.json") districts = json.load(json_file) ## Parse csv file containing individual results csv_file = "output.csv" with open(csv_f...
0
0
0
52d3d389e09fc7efcae4bcfdedcf2f66febbed38
1,358
py
Python
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
1
2020-10-19T19:13:19.000Z
2020-10-19T19:13:19.000Z
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
null
null
null
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
25.622642
74
0.65243
# Copyright 2020 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
292
0
44
b8d704fdcce61dc29f926fd3ed9f6ab5a265e420
990
py
Python
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
import pathlib import nibabel as nib import numpy as np import shutil import sys if __name__ == "__main__": main()
31.935484
108
0.668687
import pathlib import nibabel as nib import numpy as np import shutil import sys def read_nii(filename: pathlib.Path) -> np.ndarray: nii = nib.load(str(filename)) return nii.get_fdata() def main(): masks_folder = pathlib.Path("datasets/masks/nii/").absolute() images_folder = pathlib.Path("datasets/im...
821
0
46
07bb1935769b27c7902f8e82c1dd4ff9cd01203c
18,170
py
Python
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. """ This file provide binding to the libgdf library. """ import contextlib import itertools import numpy as np import pandas as pd import pyarrow as pa from libgdf_cffi import ffi, libgdf from librmm_cffi import librmm as rmm from . import cudautils from .utils import calc_...
29.983498
79
0.580297
# Copyright (c) 2018, NVIDIA CORPORATION. """ This file provide binding to the libgdf library. """ import contextlib import itertools import numpy as np import pandas as pd import pyarrow as pa from libgdf_cffi import ffi, libgdf from librmm_cffi import librmm as rmm from . import cudautils from .utils import calc_...
7,474
15
459
b77f61807f22b6c582b456d3f6559f8ac459a43d
1,308
py
Python
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
""" Basic transformer, which cleans up the static calm data before sending it off to an elasticsearch index. The raw data can be obtained by running: python monitoring/scripts/download_oai_harvest.py from the root of this repo. This will create a file called `calm_records.json`. The elasticsearch credentials (u...
26.16
84
0.724771
""" Basic transformer, which cleans up the static calm data before sending it off to an elasticsearch index. The raw data can be obtained by running: python monitoring/scripts/download_oai_harvest.py from the root of this repo. This will create a file called `calm_records.json`. The elasticsearch credentials (u...
0
0
0
8ed1fddd6f38763762d54b79c3147b8511d5de90
458
py
Python
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
20
2015-01-07T16:17:22.000Z
2015-12-14T03:45:52.000Z
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
2
2015-08-07T01:51:03.000Z
2015-12-15T02:04:25.000Z
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
9
2015-03-05T09:36:22.000Z
2015-11-13T21:24:20.000Z
from .extensions import db, resizer if resizer: for size in resizer.sizes.iterkeys(): setattr(Upload, size + '_name', db.Column(db.Unicode(255))) setattr(Upload, size + '_url', db.Column(db.Unicode(255)))
30.533333
68
0.679039
from .extensions import db, resizer class Upload(db.Model): __tablename__ = 'upload' id = db.Column(db.Integer, autoincrement=True, primary_key=True) name = db.Column(db.Unicode(255), nullable=False) url = db.Column(db.Unicode(255), nullable=False) if resizer: for size in resizer.sizes.iterkeys(...
0
208
23
2440738595198e3faa18e00166c285ed2f33b53a
1,265
py
Python
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
null
null
null
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
null
null
null
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
2
2020-06-22T02:55:34.000Z
2020-07-09T10:18:48.000Z
""" Train job interacts with SageMaker """ import os import boto3 import numpy as np import pandas as pd import sagemaker # We use the Estimator from the SageMaker Python SDK from sagemaker.pytorch.estimator import PyTorch from ...sm_utils import get_sm_execution_role ON_SAGEMAKER_NOTEBOOK = False # preparation sm...
30.119048
93
0.730435
""" Train job interacts with SageMaker """ import os import boto3 import numpy as np import pandas as pd import sagemaker # We use the Estimator from the SageMaker Python SDK from sagemaker.pytorch.estimator import PyTorch from ...sm_utils import get_sm_execution_role ON_SAGEMAKER_NOTEBOOK = False # preparation sm...
0
0
0
980c1f0af166eba11feb43d297fc3a400f3d9157
226
py
Python
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
4
2019-10-30T20:03:31.000Z
2021-03-05T18:29:42.000Z
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
2
2019-06-11T18:26:10.000Z
2021-05-25T20:43:50.000Z
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
1
2021-05-24T13:31:13.000Z
2021-05-24T13:31:13.000Z
# Internal from warnings import warn from contextlib import AsyncExitStack warn( "async_tools.context.async_context_manager is deprecated, use contextlib instead", DeprecationWarning, ) __all__ = ("AsyncExitStack",)
20.545455
86
0.787611
# Internal from warnings import warn from contextlib import AsyncExitStack warn( "async_tools.context.async_context_manager is deprecated, use contextlib instead", DeprecationWarning, ) __all__ = ("AsyncExitStack",)
0
0
0
33a62b4965ed22948fc671cb4b609e090ce96c77
764
py
Python
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
2
2016-10-13T15:36:38.000Z
2019-04-13T22:54:32.000Z
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
null
null
null
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
2
2018-06-04T09:19:28.000Z
2021-11-01T14:54:35.000Z
#=============================================================================== # Imports #=============================================================================== from evn.util import ( Constant, ) #=============================================================================== # Constants #==============...
28.296296
80
0.217277
#=============================================================================== # Imports #=============================================================================== from evn.util import ( Constant, ) #=============================================================================== # Constants #==============...
0
96
44
9c5532ef796ad1f8eabfec9ab8a95f62e422f889
208
py
Python
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
from .experiment_runner import ExperimentRunner if __name__ == '__main__': exp_runner = ExperimentRunner() print("Running Experiment\n") exp_runner.run() print("Experiment complete!.\n")
17.333333
47
0.706731
from .experiment_runner import ExperimentRunner if __name__ == '__main__': exp_runner = ExperimentRunner() print("Running Experiment\n") exp_runner.run() print("Experiment complete!.\n")
0
0
0
fc634a92c10fc6c94364838703282cc509e7f7fc
131
py
Python
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
from suds.client import Client client = Client('http://localhost:8000/?wsdl', cache=None) print(client.service.say_fibonacci(10))
26.2
58
0.770992
from suds.client import Client client = Client('http://localhost:8000/?wsdl', cache=None) print(client.service.say_fibonacci(10))
0
0
0
a201752f6a544650fb1e49e9b9d982e82259f97d
8,772
py
Python
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
"""Stream type classes for tap-chromedata.""" import csv from pathlib import Path from typing import Any, Dict, Optional, Union, List, Iterable from singer_sdk import typing as th # JSON Schema typing helpers from singer_sdk.streams import Stream import re import ftplib import io import json from zipfile import Zip...
41.377358
148
0.610807
"""Stream type classes for tap-chromedata.""" import csv from pathlib import Path from typing import Any, Dict, Optional, Union, List, Iterable from singer_sdk import typing as th # JSON Schema typing helpers from singer_sdk.streams import Stream import re import ftplib import io import json from zipfile import Zip...
2,133
0
58
5bf80086d7a85ca8ad87b504764a090186a2eca4
291
py
Python
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
input_dir = 'data/raw' output_dir = 'data/processed' TLHW = ['top', 'left', 'height', 'width'] XYXY = ['x1', 'y1', 'x2', 'y2'] OUT_HEADER = ['file', *XYXY, 'body', 'color'] mappings = { 'supercab': 'ute', 'cab': 'ute', 'minivan': 'people-mover', 'wagon': 'station-wagon', }
22.384615
45
0.549828
input_dir = 'data/raw' output_dir = 'data/processed' TLHW = ['top', 'left', 'height', 'width'] XYXY = ['x1', 'y1', 'x2', 'y2'] OUT_HEADER = ['file', *XYXY, 'body', 'color'] mappings = { 'supercab': 'ute', 'cab': 'ute', 'minivan': 'people-mover', 'wagon': 'station-wagon', }
0
0
0
69b059b5777c7e5c5a16939fb1611d16eb545366
847
py
Python
Networking/simpleClient.py
HKuz/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2020-06-14T20:10:04.000Z
2020-06-14T20:10:04.000Z
Networking/simpleClient.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
null
null
null
Networking/simpleClient.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2019-12-09T12:48:05.000Z
2019-12-09T12:48:05.000Z
#!/Applications/anaconda/envs/Python3/bin import socket def main(): '''Example Creating a Simple Client Using the socket Module''' HOST = '127.0.0.1' PORT = 50002 incomingMessage = '' outgoingMessage = '' # s is socket object for IPv4, TCP s = socket.socket(socket.AF_INET , socket.SOCK_S...
25.666667
81
0.634002
#!/Applications/anaconda/envs/Python3/bin import socket def main(): '''Example Creating a Simple Client Using the socket Module''' HOST = '127.0.0.1' PORT = 50002 incomingMessage = '' outgoingMessage = '' # s is socket object for IPv4, TCP s = socket.socket(socket.AF_INET , socket.SOCK_S...
0
0
0
ce821802f2bcb873bdacc5a2a6ca1f22aaf1bc15
253
py
Python
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
null
null
null
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
10
2021-05-14T15:01:19.000Z
2021-05-30T04:46:14.000Z
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
null
null
null
import numpy as np if __name__ == '__main__': main()
13.315789
39
0.383399
import numpy as np def main(): A = np.array([ [1., 2., 3., 4., 5.], [6., 7., 8., 9., 10.] ]) x = np.array([4., 8., 10., 6., 8.]) x = x[:, np.newaxis] y = A @ x print(y) if __name__ == '__main__': main()
170
0
23
5dcb07f40b5223f6a202f3e9f075e9eaa1c38b97
4,630
py
Python
topic_modeler/modeler.py
geekyJock8/topic_modeler
3559dc7c503dff8d34a90756b8a75a9be9290fe7
[ "MIT" ]
null
null
null
topic_modeler/modeler.py
geekyJock8/topic_modeler
3559dc7c503dff8d34a90756b8a75a9be9290fe7
[ "MIT" ]
null
null
null
topic_modeler/modeler.py
geekyJock8/topic_modeler
3559dc7c503dff8d34a90756b8a75a9be9290fe7
[ "MIT" ]
null
null
null
import pandas as pd import re import numpy as np import math import torch
29.119497
78
0.565659
import pandas as pd import re import numpy as np import math import torch class Modeler(): def __init__(self, sentence_series, topic_series): self.sentence_series = sentence_series self.topic_series = topic_series self.feature_matrix = None self.word_mapping = None self.top...
4,295
-5
265
a43b6bb26fd388c2174f944bbb1a1e944b06ff2b
14,565
py
Python
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
1
2019-04-17T21:00:43.000Z
2019-04-17T21:00:43.000Z
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
null
null
null
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
null
null
null
# Zeit wird gezaehlt import pygame, math, random, time from pygame.locals import * import PIL.Image as Image import numpy as np import random import time import torch import torch.nn as nn from torch.autograd import Variable import os, sys os.environ["SDL_VIDEODRIVER"] = "dummy" #
34.11007
196
0.511294
# Zeit wird gezaehlt import pygame, math, random, time from pygame.locals import * import PIL.Image as Image import numpy as np import random import time import torch import torch.nn as nn from torch.autograd import Variable import os, sys os.environ["SDL_VIDEODRIVER"] = "dummy" def GameStart(model,options,optimizer...
14,228
0
46
17f1254e919e6ba095dfe33e38b6a52ab79e7373
8,893
py
Python
tests/src/tasks_test/services_test/zookeeper_test.py
michalbachowski/python-checklisting
31cbe1fb87683ffbb21104585e318d844fc7c52b
[ "MIT" ]
null
null
null
tests/src/tasks_test/services_test/zookeeper_test.py
michalbachowski/python-checklisting
31cbe1fb87683ffbb21104585e318d844fc7c52b
[ "MIT" ]
null
null
null
tests/src/tasks_test/services_test/zookeeper_test.py
michalbachowski/python-checklisting
31cbe1fb87683ffbb21104585e318d844fc7c52b
[ "MIT" ]
null
null
null
import asyncio import unittest from typing import Awaitable, Callable import asynctest from checklisting.result import MultiTaskResult, TaskResult from checklisting.result.status import TaskResultStatus from checklisting.tasks.services.zookeeper import (ZookeeperMntrResonseValidator, ...
39.004386
115
0.599123
import asyncio import unittest from typing import Awaitable, Callable import asynctest from checklisting.result import MultiTaskResult, TaskResult from checklisting.result.status import TaskResultStatus from checklisting.tasks.services.zookeeper import (ZookeeperMntrResonseValidator, ...
7,785
100
516
3933dc80e91094b4260ccdebe302ea39319759cf
2,706
py
Python
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
# coding: utf-8 import logging from os import path from .models.mdsp import Mdsp from .utils.udefault import load_yaml from .dao.mongo.daomongo import DaoMongo from .dao.mongo.daogridfs import DaoGridFS class Config(object): ''' load all info from etc when starting webservice ''' @staticmethod @classm...
31.835294
96
0.526608
# coding: utf-8 import logging from os import path from .models.mdsp import Mdsp from .utils.udefault import load_yaml from .dao.mongo.daomongo import DaoMongo from .dao.mongo.daogridfs import DaoGridFS class Config(object): ''' load all info from etc when starting webservice ''' @staticmethod def pres...
971
0
26
cdc274cfffa42a498f9f3b5714bd72c1a1ea7d68
466
py
Python
src/pytheas/viewmodels/review_viewmodel.py
dcronkite/pytheas
3cdd6a21bda488e762931cbf5975964d5e574abd
[ "MIT" ]
null
null
null
src/pytheas/viewmodels/review_viewmodel.py
dcronkite/pytheas
3cdd6a21bda488e762931cbf5975964d5e574abd
[ "MIT" ]
null
null
null
src/pytheas/viewmodels/review_viewmodel.py
dcronkite/pytheas
3cdd6a21bda488e762931cbf5975964d5e574abd
[ "MIT" ]
null
null
null
from pytheas.services import service from pytheas.viewmodels.viewmodelbase import ViewModelBase
29.125
58
0.697425
from pytheas.services import service from pytheas.viewmodels.viewmodelbase import ViewModelBase class ReviewViewModel(ViewModelBase): def __init__(self): super().__init__() self.regexes = service.get_regexes() self.new_regex = self.request_dict.new_regex self.remove_regex = self.re...
277
16
76
625ea579179d61fc7ae63d723d4956759314d983
2,535
py
Python
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
import numpy as np import scipy.io as sio import os import matplotlib.pyplot as plt import pandas as pd from preprocessing import method_name from plot_toolbox import plot_error_rate ############################################################################### ### CLASSIFICATION EXPERIMENTS ########################...
35.208333
97
0.560158
import numpy as np import scipy.io as sio import os import matplotlib.pyplot as plt import pandas as pd from preprocessing import method_name from plot_toolbox import plot_error_rate ############################################################################### ### CLASSIFICATION EXPERIMENTS ########################...
0
0
0
015f231c514489f48159c0b99c7ed2d533a381e9
1,006
py
Python
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
import pprint sl = Solution() t1 = [[1,3],[2,6],[8,10],[15,18]] t1 = [Interval(*x) for x in t1] res = sl.merge(t1) pprint.pprint(res) sl = Solution() t2 = [[1,4],[4,5]] t2 = [Interval(*x) for x in t2] res = sl.merge(t2) print(res)
23.395349
62
0.522863
import pprint class Interval: def __init__(self, s=0, e=0): self.start = s self.end = e class Solution: def merge(self, intervals: list): res = [] n = len(intervals) if not n: return [] if n == 1: return intervals intervals.sort...
683
-12
98
7615058d98c7dfb50b7dd39b2419c160b561ca08
2,520
py
Python
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
null
null
null
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
null
null
null
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
1
2020-08-04T14:38:11.000Z
2020-08-04T14:38:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Program Name: data_mining.py # Anthony Waldsmith # 8/03/16 # Python Version 3.4 # Description: Datamining CSV google stocks # Optional import for versions of python <= 2 from __future__ import print_function #name: get_data_list #param: FILE_NAME - the file's name you...
25.714286
110
0.700397
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Program Name: data_mining.py # Anthony Waldsmith # 8/03/16 # Python Version 3.4 # Description: Datamining CSV google stocks # Optional import for versions of python <= 2 from __future__ import print_function #name: get_data_list #param: FILE_NAME - the file's name you...
1,176
0
89
3685d8d3e26760c81d498596639321b6e5a72d7c
241
py
Python
autoscaler/config.py
christopherhesse/kubernetes-ec2-autoscaler
906ad251a0a32329586b75957dc1bec26f7e6323
[ "MIT" ]
900
2016-08-30T16:23:30.000Z
2021-11-26T19:13:01.000Z
autoscaler/config.py
ellerbrock/kubernetes-ec2-autoscaler
7efdfbc565fee2d50b0f34332985af200f834110
[ "MIT" ]
36
2016-09-06T19:51:26.000Z
2019-06-07T22:07:28.000Z
autoscaler/config.py
ellerbrock/kubernetes-ec2-autoscaler
7efdfbc565fee2d50b0f34332985af200f834110
[ "MIT" ]
172
2016-08-30T17:04:17.000Z
2021-10-04T00:41:56.000Z
import os
26.777778
77
0.721992
import os class Config(object): CAPACITY_DATA = os.environ.get('CAPACITY_DATA', 'data/capacity.json') CAPACITY_CPU_RESERVE = float(os.environ.get('CAPACITY_CPU_RESERVE', 0.0)) NAMESPACE = os.environ.get('NAMESPACE', 'system')
0
207
23
4fa07e9199021389bf18c7494de0ca997d3c3c40
7,512
py
Python
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
6
2021-03-27T15:25:00.000Z
2021-08-23T06:29:33.000Z
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
4
2020-10-23T09:15:09.000Z
2021-08-24T03:33:59.000Z
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
null
null
null
# Copyright (c) Ye Liu. All rights reserved. import torch import torch.nn as nn import nncore from ..builder import MESSAGE_PASSINGS from ..bundle import Parameter @MESSAGE_PASSINGS.register() @nncore.bind_getter('in_features', 'out_features') class GCN(nn.Module): """ Graph Convolutional Layer introduced i...
33.386667
79
0.578674
# Copyright (c) Ye Liu. All rights reserved. import torch import torch.nn as nn import nncore from ..builder import MESSAGE_PASSINGS from ..bundle import Parameter @MESSAGE_PASSINGS.register() @nncore.bind_getter('in_features', 'out_features') class GCN(nn.Module): """ Graph Convolutional Layer introduced i...
3,201
0
270
faa9ddb6d71e5cb6b115e550df2c3fceb7f3c868
1,914
py
Python
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
8
2021-06-09T15:07:16.000Z
2021-12-22T09:39:29.000Z
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
3
2021-04-23T12:29:40.000Z
2021-06-10T11:01:05.000Z
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
null
null
null
import cv2 import numpy as np from numba import njit # https://automaticaddison.com/how-to-do-histogram-matching-using-opencv/ def calculate_cdf(histogram: np.ndarray) -> np.ndarray: """ This method calculates the cumulative distribution function :param array histogram: The values of the histogram :...
31.9
116
0.706374
import cv2 import numpy as np from numba import njit # https://automaticaddison.com/how-to-do-histogram-matching-using-opencv/ def calculate_cdf(histogram: np.ndarray) -> np.ndarray: """ This method calculates the cumulative distribution function :param array histogram: The values of the histogram :...
1,272
0
45
90e56f8186d7bd6e67931a6c80dcdcbe03466866
11,628
py
Python
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
import connect error_message = 'Action is not defined. Please use create, truncate, or drop.'
28.640394
121
0.517716
import connect error_message = 'Action is not defined. Please use create, truncate, or drop.' def file_list(action): conn = connect.connect() cur = conn.cursor() if action in ['create', 'c']: cur.execute(""" CREATE TABLE file_list ( id SERIAL NOT NULL PRIMARY KEY, ...
11,198
0
321
52fc2d289bfb033df41d4a7a2fb1d5495d2a59f2
2,801
gyp
Python
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
{ 'variables': { # may be redefined in command line on configuration stage 'BUILD_LIBRDKAFKA%': 1, }, "targets": [ { "target_name": "bindings", "sources": [ "<!@(ls -1 src/*.cc)", ], "include_dirs": [ "<!(node -e \"require('nan')\")", ], 'conditions': [ ...
28.292929
111
0.446626
{ 'variables': { # may be redefined in command line on configuration stage 'BUILD_LIBRDKAFKA%': 1, }, "targets": [ { "target_name": "bindings", "sources": [ "<!@(ls -1 src/*.cc)", ], "include_dirs": [ "<!(node -e \"require('nan')\")", ], 'conditions': [ ...
0
0
0
f3f0308568526f0095f653c74b076ec99c6bd8fd
4,179
py
Python
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
6
2020-04-22T18:56:46.000Z
2021-09-09T15:57:48.000Z
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
19
2019-11-14T21:22:21.000Z
2020-10-31T16:18:36.000Z
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
scidom/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
null
null
null
# Sampling from a bivariate normal density via Metropolis-Hastings # %% Import packages import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns import torch from torch.distributions import MultivariateNormal # from torch.distributions import Normal from torch.utils.data i...
31.186567
119
0.73295
# Sampling from a bivariate normal density via Metropolis-Hastings # %% Import packages import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns import torch from torch.distributions import MultivariateNormal # from torch.distributions import Normal from torch.utils.data i...
35
0
23
0ae52dc18610d88566a80f105361f69c85e7703c
1,909
py
Python
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
1
2020-06-04T16:50:49.000Z
2020-06-04T16:50:49.000Z
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
null
null
null
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
1
2020-06-12T16:23:17.000Z
2020-06-12T16:23:17.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.491228
75
0.700891
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
921b313f70489f19317373df1eae3e8ded57ee6f
466
py
Python
src/triplet_loss_trian_test.py
mrlathome/person_recognition
8718dc0c8a797ef69cf899fd792c49fe38d52654
[ "MIT" ]
1
2019-09-16T11:10:56.000Z
2019-09-16T11:10:56.000Z
src/triplet_loss_trian_test.py
mrlathome/ros-person-recognition
8718dc0c8a797ef69cf899fd792c49fe38d52654
[ "MIT" ]
null
null
null
src/triplet_loss_trian_test.py
mrlathome/ros-person-recognition
8718dc0c8a797ef69cf899fd792c49fe38d52654
[ "MIT" ]
null
null
null
import os import tensorflow as tf from inception_resnet_v1 import inference from triplet_loss_train import InceptionTripletLoss import numpy as np import unittest
17.259259
51
0.690987
import os import tensorflow as tf from inception_resnet_v1 import inference from triplet_loss_train import InceptionTripletLoss import numpy as np import unittest class InceptionTripletLossTestCase: def __init__(self): pass def test_triplet_loss(self): pass def test_build_model(self, ): ...
104
14
184
f1dcfa061bd6ebb0ea16cd437d66f37ad6568348
653
py
Python
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
2
2021-08-16T17:39:42.000Z
2021-08-23T05:36:20.000Z
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
null
null
null
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
1
2018-09-17T16:05:21.000Z
2018-09-17T16:05:21.000Z
#!/usr/bin/env python from setuptools import find_packages,setup version = '1.0.0' setup( name='dizicli', version=version, description='Dizi Crawler', author='Batuhan Osman Taskaya', author_email='batuhanosmantaskaya@gmail.com', url='https://github.com/btaskaya/dizicli', download_url='https...
29.681818
84
0.641654
#!/usr/bin/env python from setuptools import find_packages,setup version = '1.0.0' setup( name='dizicli', version=version, description='Dizi Crawler', author='Batuhan Osman Taskaya', author_email='batuhanosmantaskaya@gmail.com', url='https://github.com/btaskaya/dizicli', download_url='https...
0
0
0
07e380b7f4cc32d4a6ed0cb2489421687db3ae08
723
py
Python
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? if __name__ == "__main__": assert largest_prime_factor(13195) == 29 assert largest_prime_factor(600851475143) == 6857
27.807692
110
0.630705
#!/usr/bin/env python3 # The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? def largest_prime_factor(n: int) -> int: # The largest divisor to start is 2 because 2 is the smallest prime number largest_divisor = 2 # We divide by the smallest possible...
438
0
22
39c40fe7422eb01f8cfe854446d15a0aca6845a0
1,000
py
Python
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
1
2021-04-30T00:19:20.000Z
2021-04-30T00:19:20.000Z
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
null
null
null
"""isort:skip_file""" from dagster import solid @solid @solid # start_marker from dagster import AssetStore, ModeDefinition, pipeline, resource @resource @pipeline(mode_defs=[ModeDefinition(resource_defs={"asset_store": my_asset_store})]) # end_marker
20
89
0.729
"""isort:skip_file""" from dagster import solid @solid def solid1(_): pass @solid def solid2(_, _a): pass def write_dataframe_to_table(**_kwargs): pass def read_dataframe_from_table(**_kwargs): pass # start_marker from dagster import AssetStore, ModeDefinition, pipeline, resource class MyAss...
513
10
210
325f8bc69af4bd46f0e829c73247df50b4f818d6
384
py
Python
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
1
2022-02-04T09:21:26.000Z
2022-02-04T09:21:26.000Z
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
null
null
null
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
null
null
null
import unittest from bacdive.utils import check_allow if __name__ == "__main__": unittest.main()
20.210526
51
0.669271
import unittest from bacdive.utils import check_allow class TestUtils(unittest.TestCase): def setUp(self): pass def test_check_allow(self): good=check_allow('clos lj')#returns true bad=check_allow('b./_ subit')#resutns false self.assertEqual(good, True) self.assertEqu...
190
14
77
38e758ca928c145d56c6141c5833249371abe3b1
4,414
py
Python
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
1
2021-04-02T20:02:37.000Z
2021-04-02T20:02:37.000Z
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
null
null
null
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
null
null
null
from Dirs import * import Layers import Model from Data import * import pandas as pd import numpy as np import time Lat_Gen()
45.040816
110
0.468056
from Dirs import * import Layers import Model from Data import * import pandas as pd import numpy as np import time def Lat_Gen(): print("Iniciando...") start = time.time() model_list = ["CAE","CVAE"] #std_list = [1.0,0.5, 0.1, 1e-13] std_list = [1.0,0.5, 0.1, 1e-13] lat_dim_list = [2,3,4,5...
4,264
0
23
ee4cf65ecb01bc3f3f3d038d5d742c2e76266c39
1,035
py
Python
grouper/fe/handlers/permissions_requests.py
benjaminp/grouper
64b3f436a4b8f5befa936dca3e04b9dcad53c9e0
[ "Apache-2.0" ]
null
null
null
grouper/fe/handlers/permissions_requests.py
benjaminp/grouper
64b3f436a4b8f5befa936dca3e04b9dcad53c9e0
[ "Apache-2.0" ]
null
null
null
grouper/fe/handlers/permissions_requests.py
benjaminp/grouper
64b3f436a4b8f5befa936dca3e04b9dcad53c9e0
[ "Apache-2.0" ]
null
null
null
from grouper import permissions from grouper.fe.forms import PermissionRequestsForm from grouper.fe.util import GrouperHandler from grouper.models import REQUEST_STATUS_CHOICES class PermissionsRequests(GrouperHandler): """Allow a user to review a list of permission requests that they have."""
41.4
94
0.672464
from grouper import permissions from grouper.fe.forms import PermissionRequestsForm from grouper.fe.util import GrouperHandler from grouper.models import REQUEST_STATUS_CHOICES class PermissionsRequests(GrouperHandler): """Allow a user to review a list of permission requests that they have.""" def get(self): ...
708
0
26
5fc72e80dc3346eaf7dab56dfa788bda9897e9c4
3,445
py
Python
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2015 mjirik <mjirik@mjirik-Latitude-E6520> # # Distributed under terms of the MIT license. """ Automatic exposure compensation """ import logging logger = logging.getLogger(__name__) import argparse import numpy as np import matplotlib.py...
23.59589
65
0.559071
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2015 mjirik <mjirik@mjirik-Latitude-E6520> # # Distributed under terms of the MIT license. """ Automatic exposure compensation """ import logging logger = logging.getLogger(__name__) import argparse import numpy as np import matplotlib.py...
2,638
361
46
73f0bd0c41c3e6db3d4702cfb0b68afda2123fae
625
py
Python
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
pkgname = "ninja" pkgver = "1.10.2" pkgrel = 0 hostmakedepends = ["python"] pkgdesc = "Small build system with a focus on speed" maintainer = "q66 <q66@chimera-linux.org>" license = "Apache-2.0" url = "https://ninja-build.org" sources = [f"https://github.com/ninja-build/ninja/archive/v{pkgver}.tar.gz"] sha256 = ["ce358...
27.173913
77
0.7056
pkgname = "ninja" pkgver = "1.10.2" pkgrel = 0 hostmakedepends = ["python"] pkgdesc = "Small build system with a focus on speed" maintainer = "q66 <q66@chimera-linux.org>" license = "Apache-2.0" url = "https://ninja-build.org" sources = [f"https://github.com/ninja-build/ninja/archive/v{pkgver}.tar.gz"] sha256 = ["ce358...
125
0
68
076757d7ae9bf693a5a98130c874a5fa6a271f5b
20,350
py
Python
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
##lots of imports. Some are unnecessary but I left a lot just to be safe... import matplotlib.pyplot as plt import matplotlib from astropy.io import fits import numpy as np import astropy.table as t import matplotlib.image as img from scipy.optimize import newton from pathlib import Path import math import matplotlib.c...
34.259259
214
0.577838
##lots of imports. Some are unnecessary but I left a lot just to be safe... import matplotlib.pyplot as plt import matplotlib from astropy.io import fits import numpy as np import astropy.table as t import matplotlib.image as img from scipy.optimize import newton from pathlib import Path import math import matplotlib.c...
1,267
0
91
ad9d2f580572a517defde6633c295d53de93a3f0
24,338
py
Python
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
2
2016-05-31T14:50:47.000Z
2021-11-04T20:03:19.000Z
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
null
null
null
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
2
2017-01-28T09:09:47.000Z
2017-09-14T14:29:20.000Z
from __future__ import absolute_import import argparse import cStringIO import fnmatch import os import re import struct import textwrap from itertools import groupby from sc2reader.exceptions import FileError LITTLE_ENDIAN,BIG_ENDIAN = '<','>' class ReplayBuffer(object): """ The ReplayBuffer is a wrapper over...
35.018705
138
0.587065
from __future__ import absolute_import import argparse import cStringIO import fnmatch import os import re import struct import textwrap from itertools import groupby from sc2reader.exceptions import FileError LITTLE_ENDIAN,BIG_ENDIAN = '<','>' class ReplayBuffer(object): """ The ReplayBuffer is a wrapper over...
12,526
157
1,121
a0fbc3f963c77dcaaa83f3f8c96994feeb6b882c
835
py
Python
BusFinderServer/stoplocations.py
CampusHackTeamMeme/WheresTheBus
27e4d0a76c174be277c00269ae2c5175b16c4a83
[ "MIT" ]
null
null
null
BusFinderServer/stoplocations.py
CampusHackTeamMeme/WheresTheBus
27e4d0a76c174be277c00269ae2c5175b16c4a83
[ "MIT" ]
null
null
null
BusFinderServer/stoplocations.py
CampusHackTeamMeme/WheresTheBus
27e4d0a76c174be277c00269ae2c5175b16c4a83
[ "MIT" ]
null
null
null
import sqlite3 as sql from flask import request from flask_restful import Resource
23.857143
57
0.477844
import sqlite3 as sql from flask import request from flask_restful import Resource class StopLocations(Resource): def __init__(self, file): self.DBfile = file def get(self): r = request.form.to_dict() req = r['stops'].strip('[').strip(']').split(',') print(req) conn ...
665
9
76
d4f5e6ba452701bed3ea566bf3282a45dff0a638
2,261
py
Python
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
1
2018-09-19T07:38:58.000Z
2018-09-19T07:38:58.000Z
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
null
null
null
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
null
null
null
from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import xmlrpclib #instancio un objeto y conecto el servidor a donde se va a conectar servidorSuma = xmlrpclib.ServerProxy('http://localhost:9998') servidorSub = xmlrpclib.ServerProxy('http://localhost:9997') ser...
40.375
67
0.747015
from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import xmlrpclib #instancio un objeto y conecto el servidor a donde se va a conectar servidorSuma = xmlrpclib.ServerProxy('http://localhost:9998') servidorSub = xmlrpclib.ServerProxy('http://localhost:9997') ser...
1,189
48
68
3fd31c273aac639ffd2046e45b6ca43b195bc3ff
1,025
py
Python
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-20 10:01 from django.db import migrations, models
24.404762
75
0.525854
# Generated by Django 3.2.8 on 2021-11-20 10:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventory', '0001_initial'), ('pickups', '0002_auto_20211005_2343'), ] operations = [ migrations.RemoveField( model_name...
0
911
23
c3abd8d7f7df6e81869db44b6efce7f8cc1fd5c7
1,111
py
Python
tests/conftest.py
UtahDave/idem-lxd
8a0bbe3b3800b8fd1b616be47eb421676af366ec
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
UtahDave/idem-lxd
8a0bbe3b3800b8fd1b616be47eb421676af366ec
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
UtahDave/idem-lxd
8a0bbe3b3800b8fd1b616be47eb421676af366ec
[ "Apache-2.0" ]
null
null
null
import dict_tools import pop.hub import mock import pytest import random import string from typing import Any, Dict, List @pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session") @pytest.mark.asyncio @pytest.fixture(scope="module") @pytest....
25.25
78
0.69577
import dict_tools import pop.hub import mock import pytest import random import string from typing import Any, Dict, List @pytest.fixture(scope="session", autouse=True) def acct_subs() -> List[str]: return ["lxd"] @pytest.fixture(scope="session", autouse=True) def acct_profile() -> str: return "test_develop...
642
0
110
c4026cb8e68ed5f70aefe2c25921002139eabc74
2,337
py
Python
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
11
2015-02-07T06:10:47.000Z
2021-03-01T08:56:30.000Z
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
null
null
null
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
2
2015-06-06T18:07:27.000Z
2015-07-29T20:24:51.000Z
""" The MIT License Copyright (c) Tigran Hakobyan. http://tiggreen.me 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, mo...
31.581081
77
0.744116
""" The MIT License Copyright (c) Tigran Hakobyan. http://tiggreen.me 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, mo...
431
0
69
9de0071295fd887d28317c498aef2f85e7b2d49a
1,884
py
Python
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
64
2019-02-03T12:57:42.000Z
2022-02-12T11:50:16.000Z
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
1
2020-10-11T18:52:50.000Z
2020-10-13T09:58:35.000Z
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
12
2019-01-30T14:07:40.000Z
2021-03-02T02:32:15.000Z
import torch import torch.nn as nn import torch.nn.functional as F
31.932203
84
0.619958
import torch import torch.nn as nn import torch.nn.functional as F class MDN(nn.Module): def __init__(self, n_hidden, n_gaussians): super(MDN, self).__init__() self.z_h = nn.Sequential( nn.Linear(1, n_hidden), nn.Tanh() ) self.z_pi = nn.Linear(n_hidden, n_ga...
1,617
0
198
2d78593dbad655d65392640be8489c14a0bf7405
1,353
py
Python
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
import os import sys import datetime import git from jinja2 import Template ADD_REQUIREMENTS_MACRO = """ {%- macro add_requirements(fname) -%} # Requirements populated from {{fname}} {% for requirement in read_requirements(fname) -%} RUN pip install "{{ requirement }}" {% endfor -%} {%- endmacro -%} """ if __n...
26.529412
114
0.695492
import os import sys import datetime import git from jinja2 import Template def git_root(): root, = os.popen('git rev-parse --show-toplevel') return root.strip() def get_last_changed(fname): repo = git.Repo(git_root()) blame = repo.blame('HEAD', os.path.abspath(fname)) line_dt = {line: commit.a...
897
0
92
d16cfacdd5b15325d373817a633155f2c089632b
166
py
Python
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
1
2022-01-02T11:14:32.000Z
2022-01-02T11:14:32.000Z
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
null
null
null
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
9
2021-10-16T07:31:54.000Z
2021-10-31T18:02:34.000Z
import calendar print(calendar.month(2018, 8)) #This is for particular month calendar print(calendar.calendar(2020)) #This if for printing whole year calendar
27.666667
73
0.771084
import calendar print(calendar.month(2018, 8)) #This is for particular month calendar print(calendar.calendar(2020)) #This if for printing whole year calendar
0
0
0
d337164ee159dedaf5a0ab412ffc1948f44322f7
17
py
Python
bionic/simulation/__init__.py
Pendragonek/bionic
65b46835644dfaf80f23147a3a47e37504b1f880
[ "MIT" ]
null
null
null
bionic/simulation/__init__.py
Pendragonek/bionic
65b46835644dfaf80f23147a3a47e37504b1f880
[ "MIT" ]
null
null
null
bionic/simulation/__init__.py
Pendragonek/bionic
65b46835644dfaf80f23147a3a47e37504b1f880
[ "MIT" ]
null
null
null
"""Simulation"""
8.5
16
0.588235
"""Simulation"""
0
0
0
9d09f818cc3b4f1b2e4efef2328777875a542465
4,337
py
Python
432.All-O-one-Data-Structure.py
mickey0524/leetcode
6bedeb6ff29b02a97178cca464c5fd639951801f
[ "MIT" ]
18
2018-07-14T12:45:37.000Z
2022-03-26T14:51:04.000Z
432.All-O-one-Data-Structure.py
mickey0524/leetcode
6bedeb6ff29b02a97178cca464c5fd639951801f
[ "MIT" ]
null
null
null
432.All-O-one-Data-Structure.py
mickey0524/leetcode
6bedeb6ff29b02a97178cca464c5fd639951801f
[ "MIT" ]
3
2019-05-29T04:09:22.000Z
2021-06-07T23:37:46.000Z
# https://leetcode.com/problems/all-oone-data-structure/ # # algorithms # Hard (29.33%) # Total Accepted: 17,753 # Total Submissions: 60,523 # Your AllOne object will be instantiated and called as such: # obj = AllOne() # obj.inc(key) # obj.dec(key) # param_3 = obj.getMaxKey() # param_4 = obj.getMinKey()
30.758865
96
0.458843
# https://leetcode.com/problems/all-oone-data-structure/ # # algorithms # Hard (29.33%) # Total Accepted: 17,753 # Total Submissions: 60,523 class ListNode(object): def __init__(self, k): self.k = k self.pre = None self.next = None class AllOne(object): def __init__(self): ...
235
3,717
73
3e4c7890e93905984a4c4d89c6a78f71b37ae901
1,716
py
Python
scripts/MongoDash/layouts/sidebar_comp.py
RodrigoNaves/ginan-bitbucket-update-tests
4bd5cc0a9dd0e94b1c2d8b35385e128404009b0c
[ "Apache-2.0" ]
73
2021-07-08T23:35:08.000Z
2022-03-31T15:17:58.000Z
scripts/MongoDash/layouts/sidebar_comp.py
RodrigoNaves/ginan-bitbucket-update-tests
4bd5cc0a9dd0e94b1c2d8b35385e128404009b0c
[ "Apache-2.0" ]
5
2021-09-27T14:27:32.000Z
2022-03-21T23:50:02.000Z
scripts/MongoDash/layouts/sidebar_comp.py
RodrigoNaves/ginan-bitbucket-update-tests
4bd5cc0a9dd0e94b1c2d8b35385e128404009b0c
[ "Apache-2.0" ]
39
2021-07-12T05:42:51.000Z
2022-03-31T15:15:34.000Z
""" This app creates a simple sidebar layout using inline style arguments and the dbc.Nav component. dcc.Location is used to track the current location. There are two callbacks, one uses the current location to render the appropriate page content, the other uses the current location to toggle the "active" properties o...
27.677419
82
0.639277
""" This app creates a simple sidebar layout using inline style arguments and the dbc.Nav component. dcc.Location is used to track the current location. There are two callbacks, one uses the current location to render the appropriate page content, the other uses the current location to toggle the "active" properties o...
0
0
0
433a63f3ab1a0647908808bd0a388be2cf9c3a2c
6,204
py
Python
misc/python/materialize/cli/optbench.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
3,840
2020-02-13T18:28:21.000Z
2022-03-31T17:25:04.000Z
misc/python/materialize/cli/optbench.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
5,802
2020-02-13T18:59:27.000Z
2022-03-31T21:50:24.000Z
misc/python/materialize/cli/optbench.py
guylapid/materialize
8629a120a5a628b6ef06f379b48ba723797db944
[ "MIT" ]
295
2020-02-13T18:49:32.000Z
2022-03-30T10:55:12.000Z
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
26.973913
82
0.58833
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
238
1,386
137
0582047abd140ee06d605738187cbd5def0bd356
2,736
py
Python
storage/compression/recovery_function.py
alilakda/Eva
e3d447f81e1e47172e21758c059ad6f5ee21ffa4
[ "Apache-2.0" ]
null
null
null
storage/compression/recovery_function.py
alilakda/Eva
e3d447f81e1e47172e21758c059ad6f5ee21ffa4
[ "Apache-2.0" ]
null
null
null
storage/compression/recovery_function.py
alilakda/Eva
e3d447f81e1e47172e21758c059ad6f5ee21ffa4
[ "Apache-2.0" ]
null
null
null
import numpy as np import cv2 from tqdm import tqdm """ Recovery Function takes a query of frames from a compressed video and returns the original frames of the video, function needs the compressed videos meta data and returns two lists, one list contains lists of rame sequences in the order of the indexes passed to t...
26.307692
124
0.653874
import numpy as np import cv2 from tqdm import tqdm """ Recovery Function takes a query of frames from a compressed video and returns the original frames of the video, function needs the compressed videos meta data and returns two lists, one list contains lists of rame sequences in the order of the indexes passed to t...
1,876
-10
72
a03149fd4e1b34c12ec32d95d384805f87ae773c
66
py
Python
lithium/tests/__init__.py
PressLabs/lithium
a222e4021aabcbec0fd24bcecf904a0ee7ec852d
[ "Apache-2.0" ]
2
2015-03-20T10:57:14.000Z
2015-03-20T11:03:39.000Z
lithium/tests/__init__.py
PressLabs/lithium
a222e4021aabcbec0fd24bcecf904a0ee7ec852d
[ "Apache-2.0" ]
null
null
null
lithium/tests/__init__.py
PressLabs/lithium
a222e4021aabcbec0fd24bcecf904a0ee7ec852d
[ "Apache-2.0" ]
null
null
null
from .base import BaseTest from .fixtures import fixtures_wrapper
22
38
0.848485
from .base import BaseTest from .fixtures import fixtures_wrapper
0
0
0
808741a0a2ec16d018a566fce476d8125091a166
10,737
py
Python
darknet_video.py
ViditSheth77/Solecthon
bc9448b8315cb63c46f15ad88aafb4cbd846c046
[ "MIT" ]
null
null
null
darknet_video.py
ViditSheth77/Solecthon
bc9448b8315cb63c46f15ad88aafb4cbd846c046
[ "MIT" ]
null
null
null
darknet_video.py
ViditSheth77/Solecthon
bc9448b8315cb63c46f15ad88aafb4cbd846c046
[ "MIT" ]
null
null
null
from ctypes import * import math import random import os import cv2 import numpy as np import time import darknet import chcone import serial CAM_NUM = 3 DANGER = 150 a = range(-75,-26) b = range(-26,-19) c = range(-19,-13) d = range(-13,-7) e = range(-7,0) f = range(0,7) g = range(7,13) h = range(13,19) i = range(19...
31.486804
95
0.47965
from ctypes import * import math import random import os import cv2 import numpy as np import time import darknet import chcone import serial CAM_NUM = 3 DANGER = 150 a = range(-75,-26) b = range(-26,-19) c = range(-19,-13) d = range(-13,-7) e = range(-7,0) f = range(0,7) g = range(7,13) h = range(13,19) i = range(19...
9,992
0
142
e0397a4aa70bad17cdc49f6671929d2f1e2bc7bb
22
py
Python
optclean/__init__.py
sjyk/OptClean
b1cbac930476c9ead7852ce204e5e11b0f55053b
[ "MIT" ]
null
null
null
optclean/__init__.py
sjyk/OptClean
b1cbac930476c9ead7852ce204e5e11b0f55053b
[ "MIT" ]
null
null
null
optclean/__init__.py
sjyk/OptClean
b1cbac930476c9ead7852ce204e5e11b0f55053b
[ "MIT" ]
null
null
null
#from domains import *
22
22
0.772727
#from domains import *
0
0
0
a757992dee51b19941ff270b189f6f6248d976c5
2,003
py
Python
torchsupport/modules/refine.py
bobelly/torchsupport
5aa0a04f20c193ec99310f5d6a3375d2e95e740d
[ "MIT" ]
18
2019-05-02T16:32:15.000Z
2021-04-16T09:33:54.000Z
torchsupport/modules/refine.py
bobelly/torchsupport
5aa0a04f20c193ec99310f5d6a3375d2e95e740d
[ "MIT" ]
5
2019-10-14T13:46:49.000Z
2021-06-08T11:48:34.000Z
torchsupport/modules/refine.py
bobelly/torchsupport
5aa0a04f20c193ec99310f5d6a3375d2e95e740d
[ "MIT" ]
12
2019-05-12T21:34:24.000Z
2021-07-15T14:14:16.000Z
import torch import torch.nn as nn import torch.nn.functional as func from torchsupport.modules.normalization import AdaptiveBatchNorm
29.455882
82
0.648028
import torch import torch.nn as nn import torch.nn.functional as func from torchsupport.modules.normalization import AdaptiveBatchNorm class ResBlock(nn.Module): def __init__(self, size, ada_size): super().__init__() self.bn = AdaptiveBatchNorm(size, ada_size) self.convs = nn.Sequential( nn.ReLU()...
1,632
19
216
54f5eda5ee8d94ceb2f3cd66188697f5ff699c70
9,281
py
Python
Src/Tests/interop/net/field/test_literal_fields.py
Enerccio/ironpython26-fixed
e302db14f05396a378adb438565a829e66acbf94
[ "MS-PL" ]
1
2020-02-11T06:02:40.000Z
2020-02-11T06:02:40.000Z
Src/Languages/IronPython/Tests/interop/net/field/test_literal_fields.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
null
null
null
Src/Languages/IronPython/Tests/interop/net/field/test_literal_fields.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
1
2018-11-21T04:10:23.000Z
2018-11-21T04:10:23.000Z
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this...
41.806306
112
0.702941
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this...
7,124
0
196
7fcfee55c92fa946499bd3f9529fc94372f75719
306
py
Python
tests/github/ops/test_update_org_member_lists.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
null
null
null
tests/github/ops/test_update_org_member_lists.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
24
2020-04-02T19:29:07.000Z
2022-03-08T03:05:43.000Z
tests/github/ops/test_update_org_member_lists.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
1
2020-04-08T15:48:28.000Z
2020-04-08T15:48:28.000Z
from acondbs.github.ops import update_org_member_lists ##__________________________________________________________________|| ##__________________________________________________________________||
30.6
70
0.813725
from acondbs.github.ops import update_org_member_lists ##__________________________________________________________________|| def test_call(app, snapshot): with app.app_context(): # update_org_member_lists() pass ##__________________________________________________________________||
85
0
22
e78c717ea1518d4d58afc40fc3fc9b6f68e207c4
1,268
py
Python
fwl-automation-decisions/flask_app/controller/environment/EnvironmentController.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
fwl-automation-decisions/flask_app/controller/environment/EnvironmentController.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
fwl-automation-decisions/flask_app/controller/environment/EnvironmentController.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
from application import EnvironmentController from domain.model.environment import EnvironmentRepository from flask_restx import Namespace, fields, Resource from flask_restx.reqparse import RequestParser from .EnvironmentMapperImpl import EnvironmentMapperImpl from .EnvironmentDTOImpl import EnvironmentDTOImpl from i...
28.177778
83
0.742902
from application import EnvironmentController from domain.model.environment import EnvironmentRepository from flask_restx import Namespace, fields, Resource from flask_restx.reqparse import RequestParser from .EnvironmentMapperImpl import EnvironmentMapperImpl from .EnvironmentDTOImpl import EnvironmentDTOImpl from i...
429
271
45
7351469759b08f927ac28411dbc1dd644bf34a91
111
py
Python
src/communication/__init__.py
FrancoisChastel/DD2480_Software-Engineering_CI
26424af8a349cc0abdc9a256bf91b161d989c702
[ "BSD-2-Clause" ]
1
2018-02-04T22:02:01.000Z
2018-02-04T22:02:01.000Z
src/communication/__init__.py
FrancoisChastel/DD2480_Software-Engineering_CI
26424af8a349cc0abdc9a256bf91b161d989c702
[ "BSD-2-Clause" ]
4
2018-02-04T13:43:40.000Z
2018-02-07T00:25:33.000Z
src/communication/__init__.py
FrancoisChastel/DD2480_Software-Engineering_CI
26424af8a349cc0abdc9a256bf91b161d989c702
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from communication import Result from communication import State
22.2
32
0.738739
#!/usr/bin/env python # -*- coding: utf-8 -*- from communication import Result from communication import State
0
0
0
0207817264fb7982ec6cde128f051f60e24326a9
1,966
py
Python
eqapi.py
coolhva/eqapi
b3c9f7363690e053d6650ec1cc52f651908795d0
[ "BSD-3-Clause" ]
null
null
null
eqapi.py
coolhva/eqapi
b3c9f7363690e053d6650ec1cc52f651908795d0
[ "BSD-3-Clause" ]
null
null
null
eqapi.py
coolhva/eqapi
b3c9f7363690e053d6650ec1cc52f651908795d0
[ "BSD-3-Clause" ]
null
null
null
"""Email.Cloud Queue Management This application allows you to manage the queue of Email.Cloud through a webapplication. Author: henk.vanachterberg@broadcom.com """ from app import create_app, db from app.models import GlobalQueue, DomainQueue from app.api import queryQueue from random import randrange app = create_...
32.229508
72
0.711089
"""Email.Cloud Queue Management This application allows you to manage the queue of Email.Cloud through a webapplication. Author: henk.vanachterberg@broadcom.com """ from app import create_app, db from app.models import GlobalQueue, DomainQueue from app.api import queryQueue from random import randrange app = create_...
1,488
0
66
459d3133cd1f87769f52f6e4ad99deebfe8fce6b
1,875
py
Python
applications/tensorflow/detection/yolov3/tests/test_upsample.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
applications/tensorflow/detection/yolov3/tests/test_upsample.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
applications/tensorflow/detection/yolov3/tests/test_upsample.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
# Copyright (c) 2020 Graphcore Ltd. 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 applicable l...
32.894737
105
0.7376
# Copyright (c) 2020 Graphcore Ltd. 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 applicable l...
874
0
22
5c1a2bd33e2a6cbc00786a81656574dc9a97921b
1,313
py
Python
setup.py
octomike/sp_experiment
4d19df94824aee4ceccf7c2c3386738f8b8687c8
[ "BSD-3-Clause" ]
null
null
null
setup.py
octomike/sp_experiment
4d19df94824aee4ceccf7c2c3386738f8b8687c8
[ "BSD-3-Clause" ]
null
null
null
setup.py
octomike/sp_experiment
4d19df94824aee4ceccf7c2c3386738f8b8687c8
[ "BSD-3-Clause" ]
null
null
null
"""Setup the package.""" import os from setuptools import setup, find_packages # get the version version = None with open(os.path.join('sp_experiment', '__init__.py'), 'r') as fid: for line in (line.strip() for line in fid): if line.startswith('__version__'): version = line.split('=')[1].strip(...
26.26
71
0.60396
"""Setup the package.""" import os from setuptools import setup, find_packages # get the version version = None with open(os.path.join('sp_experiment', '__init__.py'), 'r') as fid: for line in (line.strip() for line in fid): if line.startswith('__version__'): version = line.split('=')[1].strip(...
0
0
0
6a6033d2ca5b77af297c80379ef1ef8404ade9ae
5,276
py
Python
utils/capac_controller.py
Czworldy/GP
2a9cfb2dca0252516a44fd174b839e8f9b384a26
[ "MIT" ]
null
null
null
utils/capac_controller.py
Czworldy/GP
2a9cfb2dca0252516a44fd174b839e8f9b384a26
[ "MIT" ]
null
null
null
utils/capac_controller.py
Czworldy/GP
2a9cfb2dca0252516a44fd174b839e8f9b384a26
[ "MIT" ]
null
null
null
import carla_utils as cu import time import numpy as np import carla if __name__ == "__main__": client, world, town_map = cu.connect_to_server('127.0.0.1', 2000, timeout=2.0, map_name='None') vehicle = cu.get_actor(world, 'vehicle.bh.crossbike', 'hero') c = CapacController(vehicle, 10) traj...
31.404762
120
0.564443
import carla_utils as cu import time import numpy as np import carla class Param(object): def __init__(self): '''vehicle''' self.L = 2.405 self.max_acceleration = 1.0 self.min_acceleration = -1.0 self.max_steer = 1.0 '''PID''' self.v_pid_Kp = 1.00#1.00 ...
1,551
3,194
46
0a16df5eaff992471e697726f59f4619dfd42328
1,487
py
Python
tests/src/test_voronoi.py
codethechange/mobility_pipeline
4c5cd125c015670cddd9698142460286088a9b12
[ "BSD-3-Clause" ]
null
null
null
tests/src/test_voronoi.py
codethechange/mobility_pipeline
4c5cd125c015670cddd9698142460286088a9b12
[ "BSD-3-Clause" ]
31
2019-04-07T17:08:53.000Z
2020-02-04T03:10:30.000Z
tests/src/test_voronoi.py
codethechange/mobility_pipeline
4c5cd125c015670cddd9698142460286088a9b12
[ "BSD-3-Clause" ]
null
null
null
# pragma pylint: disable=missing-docstring import json from shapely.geometry import Point from mobility_pipeline.lib.voronoi import load_cell
25.20339
80
0.437122
# pragma pylint: disable=missing-docstring import json from shapely.geometry import Point from mobility_pipeline.lib.voronoi import load_cell def test_load_cell_polygon(): voronoi_json = """ { "type": "Polygon", "coordinates": [ [ [-5, -5], [-5, 0],...
1,296
0
46
5b7447b8797d8dd4e91a0c9fcb03e39ffa480b55
6,626
py
Python
model/tacotron_integrate/attention.py
samirsahoo007/ZeroSpeech-TTS-without-T
54439fdcebaac0041fe6a527c00747f9b86c199d
[ "MIT" ]
20
2019-03-12T09:46:47.000Z
2021-12-21T09:02:56.000Z
model/tacotron_integrate/attention.py
samirsahoo007/ZeroSpeech-TTS-without-T
54439fdcebaac0041fe6a527c00747f9b86c199d
[ "MIT" ]
1
2019-02-27T10:11:08.000Z
2019-02-27T10:11:08.000Z
model/tacotron_integrate/attention.py
samirsahoo007/ZeroSpeech-TTS-without-T
54439fdcebaac0041fe6a527c00747f9b86c199d
[ "MIT" ]
13
2019-03-29T09:25:10.000Z
2022-02-06T14:15:04.000Z
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ attention.py ] # Synopsis [ Sequence to sequence attention module for Tacotron ] # Author [ Ting-Wei Liu (Andi611) ] # Copyright [ Copyleft(c), Speech Lab, ...
29.580357
120
0.65575
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ attention.py ] # Synopsis [ Sequence to sequence attention module for Tacotron ] # Author [ Ting-Wei Liu (Andi611) ] # Copyright [ Copyleft(c), Speech Lab, ...
4,851
31
377
ed392d433a884fd4bce5cb81a0931d49bc0f32c5
1,646
py
Python
core/IpcameraStream.py
ArtyDev57/face_recon
c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685
[ "MIT" ]
4
2020-05-22T03:17:03.000Z
2021-07-29T04:24:02.000Z
core/IpcameraStream.py
ArtyDev57/face_recon
c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685
[ "MIT" ]
null
null
null
core/IpcameraStream.py
ArtyDev57/face_recon
c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685
[ "MIT" ]
1
2020-10-01T11:58:05.000Z
2020-10-01T11:58:05.000Z
import cv2 import threading
29.392857
62
0.581409
import cv2 import threading class IpcameraStream: def __init__(self, uri): self.stream = cv2.VideoCapture(uri) self.stream.set(cv2.CAP_PROP_FRAME_WIDTH, 640) self.stream.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) self.stream.set(cv2.CAP_PROP_BUFFERSIZE, 3) if self.stream is None o...
1,433
0
184
32b591016146378c44c56c9bb8ab636129717b88
5,843
py
Python
src/tests/google/appengine/ext/mapreduce/mapreduce_pipeline.py
cooljeanius/cauliflowervest
a9bc209b610a927083bf16274d8451c6c45227bf
[ "Apache-2.0" ]
1
2020-10-13T19:53:04.000Z
2020-10-13T19:53:04.000Z
src/tests/google/appengine/ext/mapreduce/mapreduce_pipeline.py
cooljeanius/cauliflowervest
a9bc209b610a927083bf16274d8451c6c45227bf
[ "Apache-2.0" ]
null
null
null
src/tests/google/appengine/ext/mapreduce/mapreduce_pipeline.py
cooljeanius/cauliflowervest
a9bc209b610a927083bf16274d8451c6c45227bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
28.783251
80
0.676365
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
2,503
0
125
9db9ae8158c883d647f47b7fdb54a24e8632cdc7
154
py
Python
python_ex/filter.py
rg3915/wttd2
1af607d6506360ff8a8c03bf9be2c5225a4d90cc
[ "MIT" ]
6
2016-02-16T16:12:56.000Z
2020-02-02T02:30:42.000Z
python_ex/filter.py
rg3915/wttd2
1af607d6506360ff8a8c03bf9be2c5225a4d90cc
[ "MIT" ]
20
2015-12-23T06:03:23.000Z
2022-02-10T10:46:18.000Z
python_ex/filter.py
rg3915/wttd2
1af607d6506360ff8a8c03bf9be2c5225a4d90cc
[ "MIT" ]
4
2016-01-06T11:24:42.000Z
2016-05-02T18:27:57.000Z
filter(name__startswith='Re', age__lt=40, city__endswith='aulo')
25.666667
64
0.649351
def filter(**lookups): for k, v in lookups.items(): print(k.split('__'), v) filter(name__startswith='Re', age__lt=40, city__endswith='aulo')
66
0
22
174e5ab5317a8d175b1dbb1215463279fc11ac4e
3,761
py
Python
galgebra/deprecated.py
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
[ "BSD-3-Clause" ]
151
2018-09-18T12:30:14.000Z
2022-03-16T08:02:48.000Z
galgebra/deprecated.py
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
[ "BSD-3-Clause" ]
454
2018-09-19T01:42:30.000Z
2022-01-18T14:02:00.000Z
galgebra/deprecated.py
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
[ "BSD-3-Clause" ]
30
2019-02-22T08:25:50.000Z
2022-01-15T05:20:22.000Z
import warnings from . import ga from .mv import Mv # galgebra 0.5.0 warnings.warn( "The `galgebra.deprecated` module is deprecated", DeprecationWarning, stacklevel=2) ################################# MV class for backward compatibility ################### class MV(Mv): """ A deprecated version of :cl...
38.377551
101
0.58309
import warnings from . import ga from .mv import Mv # galgebra 0.5.0 warnings.warn( "The `galgebra.deprecated` module is deprecated", DeprecationWarning, stacklevel=2) ################################# MV class for backward compatibility ################### class MV(Mv): """ A deprecated version of :cl...
980
0
76
1a299f9c8b2d1be8d498006be4ae32b10c07bb7e
229
py
Python
EPUIKit/widget/__init__.py
jinsihou19/E-Paper-UI-Kit
e648e87dae606e65d553ac0974b3cf16d5b4fc93
[ "MIT" ]
null
null
null
EPUIKit/widget/__init__.py
jinsihou19/E-Paper-UI-Kit
e648e87dae606e65d553ac0974b3cf16d5b4fc93
[ "MIT" ]
2
2021-09-08T01:51:05.000Z
2022-03-12T00:23:05.000Z
EPUIKit/widget/__init__.py
jinsihou19/E-Paper-UI-Kit
e648e87dae606e65d553ac0974b3cf16d5b4fc93
[ "MIT" ]
null
null
null
from EPUIKit.widget.flowlayout import FlowLayout from EPUIKit.widget.label import Label from EPUIKit.widget.layout import Layout from EPUIKit.widget.quadrantslayout import QuadrantsLayout from EPUIKit.widget.widget import Widget
38.166667
58
0.868996
from EPUIKit.widget.flowlayout import FlowLayout from EPUIKit.widget.label import Label from EPUIKit.widget.layout import Layout from EPUIKit.widget.quadrantslayout import QuadrantsLayout from EPUIKit.widget.widget import Widget
0
0
0
ca87ea48bffd18b1dd96b34b495b366727034364
1,409
py
Python
intervention_system/tools/config/decrypt_config.py
ethanjli/pac-hand-hygiene-intervention
5e0a8a76da4c1fd6f88d0f7eac9d0a4fed0fbe5d
[ "BSD-3-Clause" ]
null
null
null
intervention_system/tools/config/decrypt_config.py
ethanjli/pac-hand-hygiene-intervention
5e0a8a76da4c1fd6f88d0f7eac9d0a4fed0fbe5d
[ "BSD-3-Clause" ]
null
null
null
intervention_system/tools/config/decrypt_config.py
ethanjli/pac-hand-hygiene-intervention
5e0a8a76da4c1fd6f88d0f7eac9d0a4fed0fbe5d
[ "BSD-3-Clause" ]
null
null
null
"""Decrypt the keys of a settings JSON file.""" import argparse import os from intervention_system.deploy import settings_key_path as default_keyfile_path from intervention_system.deploy import client_config_cipher_path as default_input_path from intervention_system.deploy import client_configs_path from intervention_...
40.257143
101
0.753016
"""Decrypt the keys of a settings JSON file.""" import argparse import os from intervention_system.deploy import settings_key_path as default_keyfile_path from intervention_system.deploy import client_config_cipher_path as default_input_path from intervention_system.deploy import client_configs_path from intervention_...
139
0
23
6d34d5b9607448ac94c7960647d684c0979736f6
1,948
py
Python
snapcastr/snapcastrd.py
xkonni/snapcastr
73ac7188448072733f93cefb853f71fa837ab3bb
[ "MIT" ]
39
2017-12-18T08:17:11.000Z
2022-02-16T15:15:17.000Z
snapcastr/snapcastrd.py
xkonni/snapcastr
73ac7188448072733f93cefb853f71fa837ab3bb
[ "MIT" ]
14
2018-01-24T20:35:33.000Z
2020-04-15T11:18:17.000Z
snapcastr/snapcastrd.py
xkonni/snapcastr
73ac7188448072733f93cefb853f71fa837ab3bb
[ "MIT" ]
13
2018-01-24T20:57:45.000Z
2021-06-03T01:03:01.000Z
import argparse import json import os from snapcastr.snapcastr import Snapcastr from xdg import XDG_CONFIG_HOME CONFIG_FILE = f"{XDG_CONFIG_HOME}/snapcastr.json" HOST="0.0.0.0" PORT=5000 SC_HOST="localhost" if __name__ == "__main__": main()
28.231884
93
0.63039
import argparse import json import os from snapcastr.snapcastr import Snapcastr from xdg import XDG_CONFIG_HOME CONFIG_FILE = f"{XDG_CONFIG_HOME}/snapcastr.json" HOST="0.0.0.0" PORT=5000 SC_HOST="localhost" def setup(): parser = argparse.ArgumentParser(description='snapcastr') parser.add_argument('--host', me...
1,655
0
46
643451eca07e2dd0fe2b7f43cc0e410b6fef0191
817
py
Python
Common/run_all.py
RENCI-AUTOMAT/Data_services
eb60f822021b138298eabb3852b20b30739afaa5
[ "MIT" ]
2
2022-02-01T04:10:30.000Z
2022-03-23T22:01:35.000Z
Common/run_all.py
RENCI-AUTOMAT/Data_services
eb60f822021b138298eabb3852b20b30739afaa5
[ "MIT" ]
83
2020-08-18T16:09:43.000Z
2022-03-25T19:17:25.000Z
Common/run_all.py
RENCI-AUTOMAT/Data_services
eb60f822021b138298eabb3852b20b30739afaa5
[ "MIT" ]
null
null
null
import argparse import os from Common.load_manager import SourceDataLoadManager from Common.build_manager import GraphBuilder if __name__ == '__main__': parser = argparse.ArgumentParser(description="Transform data sources into KGX files. Build neo4j graphs.") parser.add_argument('-t', '--test_mode', action='...
34.041667
129
0.758874
import argparse import os from Common.load_manager import SourceDataLoadManager from Common.build_manager import GraphBuilder if __name__ == '__main__': parser = argparse.ArgumentParser(description="Transform data sources into KGX files. Build neo4j graphs.") parser.add_argument('-t', '--test_mode', action='...
0
0
0
2959221767c166fa404a312332c623e89d0fbc0a
135
py
Python
computer_science/data_structures/stack/deque_api.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
computer_science/data_structures/stack/deque_api.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
computer_science/data_structures/stack/deque_api.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
from collections import deque q = deque() q.append(1) q.append(2) q.append(3) print(q) print(q.pop()) print(q.pop()) print(q.pop())
10.384615
29
0.659259
from collections import deque q = deque() q.append(1) q.append(2) q.append(3) print(q) print(q.pop()) print(q.pop()) print(q.pop())
0
0
0
9fb10bed43db7b1587a75fe757ff5f98819dc1d3
1,836
py
Python
Strings/longest_common_prefix.py
techsavvyy/coding-problems
84c6c8b5955ccd03e231a4fe6d2b82c3bbdf6e81
[ "MIT" ]
2,647
2019-12-16T13:52:07.000Z
2022-03-31T08:38:35.000Z
Strings/longest_common_prefix.py
thebeastadi/coding-problems
62b8da6bb99a564bec33b7864a61122b7bab8df0
[ "MIT" ]
16
2019-12-16T17:06:17.000Z
2022-03-24T18:08:06.000Z
Strings/longest_common_prefix.py
thebeastadi/coding-problems
62b8da6bb99a564bec33b7864a61122b7bab8df0
[ "MIT" ]
556
2019-12-16T14:05:05.000Z
2022-03-31T02:41:34.000Z
''' Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string ''. Input: ['flower', 'flow', 'flight'] Output: 'fl' Input: ['dog', 'racecar', 'car'] Output: '' Input: ['aa', 'a'] Output: 'a' =====================...
24.810811
125
0.576253
''' Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string ''. Input: ['flower', 'flow', 'flight'] Output: 'fl' Input: ['dog', 'racecar', 'car'] Output: '' Input: ['aa', 'a'] Output: 'a' =====================...
769
0
23
2d1928e2c9bdd67e42c5ec8a7260067f333ab3bc
5,927
py
Python
setup.py
ondratu/falias
6b2a3bc41d9cbc247df7044fd5442085f93e9ddb
[ "BSD-3-Clause" ]
null
null
null
setup.py
ondratu/falias
6b2a3bc41d9cbc247df7044fd5442085f93e9ddb
[ "BSD-3-Clause" ]
null
null
null
setup.py
ondratu/falias
6b2a3bc41d9cbc247df7044fd5442085f93e9ddb
[ "BSD-3-Clause" ]
null
null
null
from distutils.core import setup, Command from distutils.command.install_data import install_data from distutils.dir_util import remove_tree from distutils import log from os import path, makedirs, walk, environ from shutil import copyfile from subprocess import call from sys import version_info if version_info[0] >=...
32.565934
77
0.569765
from distutils.core import setup, Command from distutils.command.install_data import install_data from distutils.dir_util import remove_tree from distutils import log from os import path, makedirs, walk, environ from shutil import copyfile from subprocess import call from sys import version_info if version_info[0] >=...
2,701
1,320
138
bd61e9ddd799f6b1ba73900db5c9e32a9dc6f30f
1,164
py
Python
env/lib/python3.7/site-packages/indicoio/image/facial_localization.py
Novandev/gn_api
08b071ae3916bb7a183d61843a2cd09e9fe15c7b
[ "MIT" ]
4
2015-08-20T22:42:19.000Z
2016-03-14T01:28:45.000Z
indicoio/image/facial_localization.py
mikesperry/IndicoIo-python
caa155b8b31b76df3f86f559ce5324f061a03e40
[ "MIT" ]
null
null
null
indicoio/image/facial_localization.py
mikesperry/IndicoIo-python
caa155b8b31b76df3f86f559ce5324f061a03e40
[ "MIT" ]
null
null
null
from ..utils.preprocessing import data_preprocess from ..utils.api import api_handler from ..utils.decorators import detect_batch_decorator @detect_batch_decorator def facial_localization(image, cloud=None, batch=False, api_key=None, version=None, **kwargs): """ Given an image, returns a list of faces found w...
36.375
101
0.697595
from ..utils.preprocessing import data_preprocess from ..utils.api import api_handler from ..utils.decorators import detect_batch_decorator @detect_batch_decorator def facial_localization(image, cloud=None, batch=False, api_key=None, version=None, **kwargs): """ Given an image, returns a list of faces found w...
0
0
0
b7a86223cc9bc84d2d1b66205897e603c56b7f13
3,175
py
Python
src/app2/cate.py
jack139/cnnc
c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef
[ "BSD-2-Clause" ]
null
null
null
src/app2/cate.py
jack139/cnnc
c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef
[ "BSD-2-Clause" ]
null
null
null
src/app2/cate.py
jack139/cnnc
c32611ec01af50bedb67dcd4c8a28e4b0c7a9aef
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # import web import json from bson.objectid import ObjectId from config import setting import app_helper db = setting.db_web # 病种分类入口(根目录) url = ('/app2/category') GEN_SIGN = { 0 : '', 1 : '●', 2 : ' ►', 3 : '  ★', 4 : '   ◆', } # -----------------...
30.528846
106
0.492913
#!/usr/bin/env python # -*- coding: utf-8 -*- # import web import json from bson.objectid import ObjectId from config import setting import app_helper db = setting.db_web # 病种分类入口(根目录) url = ('/app2/category') GEN_SIGN = { 0 : '', 1 : '●', 2 : ' ►', 3 : '  ★', 4 : '   ◆', } def get_list(parent_...
2,854
89
45
946e143f66c8eedff5da973175cf38e335f6608a
2,368
py
Python
mysite/joblist/views.py
jingluomaf/django-mysite
5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5
[ "MIT" ]
null
null
null
mysite/joblist/views.py
jingluomaf/django-mysite
5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5
[ "MIT" ]
14
2020-06-05T22:51:09.000Z
2022-03-12T00:03:07.000Z
mysite/joblist/views.py
jingluomaf/django-mysite
5a106df6c18e7bd49e02cd29fa3dfe11b5c26ff5
[ "MIT" ]
null
null
null
import bs4 as bs import datetime import urllib.request from django.views.generic import ListView from .models import Job from django.shortcuts import render, redirect # last = Job.objects.raw('SELECT * FROM joblist_job LIMIT 1')[0] # jobtime = last.date # print(jobtime) # time = datetime.date.today() # print(time)...
34.823529
95
0.591216
import bs4 as bs import datetime import urllib.request from django.views.generic import ListView from .models import Job from django.shortcuts import render, redirect class JobList(ListView): model = Job ordering = ['-date'] def isNone(variable): if variable is not None: return variable.get_text...
1,907
44
69