hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7250248eaa636892462bb0e99e0d5df70467f27
22,991
py
Python
flaski/apps/main/ihistogram.py
mpg-age-bioinformatics/flaski
f56e00dd80d8706ecb8593ba6585a97eed881896
[ "MIT" ]
9
2020-08-03T01:22:59.000Z
2022-03-03T02:02:04.000Z
flaski/apps/main/ihistogram.py
mpg-age-bioinformatics/flaski
f56e00dd80d8706ecb8593ba6585a97eed881896
[ "MIT" ]
79
2020-06-03T06:34:46.000Z
2021-09-22T13:31:43.000Z
flaski/apps/main/ihistogram.py
mpg-age-bioinformatics/flaski
f56e00dd80d8706ecb8593ba6585a97eed881896
[ "MIT" ]
5
2020-10-05T10:20:23.000Z
2022-03-01T14:23:12.000Z
#from matplotlib.figure import Figure import plotly.express as px import plotly.graph_objects as go import plotly.figure_factory as ff from collections import OrderedDict import numpy as np import sys def GET_COLOR(x): if str(x)[:3].lower() == "rgb": vals=x.split("rgb(")[-1].split(")")[0].split(",") ...
42.108059
170
0.610587
import plotly.express as px import plotly.graph_objects as go import plotly.figure_factory as ff from collections import OrderedDict import numpy as np import sys def GET_COLOR(x): if str(x)[:3].lower() == "rgb": vals=x.split("rgb(")[-1].split(")")[0].split(",") vals=[ float(s.strip(" ")) for s i...
true
true
f72502fa59d5dbbaf1359af738eaf27afc125199
2,374
py
Python
.history/spider/pokemon_spider_20201213130808.py
KustomApe/ksie
d6f97d0298d04d06788563546c66ff50c6bb2d31
[ "MIT" ]
1
2021-12-11T04:50:25.000Z
2021-12-11T04:50:25.000Z
.history/spider/pokemon_spider_20201213130808.py
KustomApe/ksie
d6f97d0298d04d06788563546c66ff50c6bb2d31
[ "MIT" ]
null
null
null
.history/spider/pokemon_spider_20201213130808.py
KustomApe/ksie
d6f97d0298d04d06788563546c66ff50c6bb2d31
[ "MIT" ]
null
null
null
from selenium import webdriver import pandas as pd import time """[注意事項] robot.txtを必ず読んで、ルールに沿った形でクローリングするように気をつけてください。 あくまで自己責任でお願いできればと思います。 """ """[Initial Setting] 初期設定 """ options = webdriver.ChromeOptions() options.add_argument('--headeless') options.add_argument('--disable-gpu') options.add_argument('--lang-ja...
33.43662
121
0.655013
from selenium import webdriver import pandas as pd import time options = webdriver.ChromeOptions() options.add_argument('--headeless') options.add_argument('--disable-gpu') options.add_argument('--lang-ja') browser = webdriver.Chrome(chrome_options=options, executable_path='./chromedriver') df = pd.DataFrame(columns=...
true
true
f72503d39b41bc560c31dfc0d1965fa96e277d2c
2,467
py
Python
data/image_folder.py
OnizukaLab/pytorch-CycleGAN-and-pix2pix
95b8dfe8bba43ae5ec9d7b299107fc155e7939c0
[ "BSD-3-Clause" ]
null
null
null
data/image_folder.py
OnizukaLab/pytorch-CycleGAN-and-pix2pix
95b8dfe8bba43ae5ec9d7b299107fc155e7939c0
[ "BSD-3-Clause" ]
2
2019-07-30T09:02:40.000Z
2019-08-01T11:36:44.000Z
data/image_folder.py
OnizukaLab/pytorch-CycleGAN-and-pix2pix
95b8dfe8bba43ae5ec9d7b299107fc155e7939c0
[ "BSD-3-Clause" ]
null
null
null
"""A modified image folder class We modify the official PyTorch image folder (https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py) so that this class can load images from both current directory and its subdirectories. """ import torch.utils.data as data from PIL import Image import os import...
29.369048
122
0.602756
import torch.utils.data as data from PIL import Image import os import os.path import re IMG_EXTENSIONS = [ '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', ] PATTERN = re.compile(r".*?([0-9]+)\.(jpg|JPG|jpeg|JPEG|png|PNG|ppm|PPM|bmp|BMP)$") def is_image_file(filename): ...
true
true
f72504fc16114679445e08709bb22521dfd7fe3a
233
py
Python
python/euler1_7.py
gregorymorrison/euler1
171d98a60e62041bc49882336cd65687df810b6c
[ "MIT" ]
1
2019-03-13T11:11:50.000Z
2019-03-13T11:11:50.000Z
python/euler1_7.py
gdm9000/euler1
171d98a60e62041bc49882336cd65687df810b6c
[ "MIT" ]
null
null
null
python/euler1_7.py
gdm9000/euler1
171d98a60e62041bc49882336cd65687df810b6c
[ "MIT" ]
1
2018-02-10T00:27:17.000Z
2018-02-10T00:27:17.000Z
#!/usr/bin/python euler1 = dict() euler1[range] = 1000 solver = lambda x: sum(i for i in xrange(x) if i%3==0 or i%5==0) euler1[solver] = solver result = euler1[solver] (euler1[range]) euler1[result] = result print euler1[result]
17.923077
64
0.682403
euler1 = dict() euler1[range] = 1000 solver = lambda x: sum(i for i in xrange(x) if i%3==0 or i%5==0) euler1[solver] = solver result = euler1[solver] (euler1[range]) euler1[result] = result print euler1[result]
false
true
f725054c84988206eb2120605f89dfc44d68a15d
8,431
py
Python
recipes/libxslt/all/conanfile.py
aapng/conan-center-index
d68a8fbb938402a5a53fa6b0214c49ccf878f8a9
[ "MIT" ]
null
null
null
recipes/libxslt/all/conanfile.py
aapng/conan-center-index
d68a8fbb938402a5a53fa6b0214c49ccf878f8a9
[ "MIT" ]
1
2021-05-12T10:46:25.000Z
2021-05-13T06:12:41.000Z
recipes/libxslt/all/conanfile.py
aapng/conan-center-index
d68a8fbb938402a5a53fa6b0214c49ccf878f8a9
[ "MIT" ]
2
2020-10-24T00:42:55.000Z
2021-01-26T09:01:14.000Z
import glob import os from conans import ConanFile, tools, AutoToolsBuildEnvironment, VisualStudioBuildEnvironment class LibxsltConan(ConanFile): name = "libxslt" url = "https://github.com/conan-io/conan-center-index" description = "libxslt is a software library implementing XSLT processor, based on libxm...
45.572973
134
0.562448
import glob import os from conans import ConanFile, tools, AutoToolsBuildEnvironment, VisualStudioBuildEnvironment class LibxsltConan(ConanFile): name = "libxslt" url = "https://github.com/conan-io/conan-center-index" description = "libxslt is a software library implementing XSLT processor, based on libxm...
true
true
f72505f9706d238ac6c8305129e9adec3227f5ac
2,455
py
Python
Software for Proof of Work/SourceCode.py
fkerem/Cryptocurrency-Blockchain
965268a09a6f8b3e700e8bbc741e49a4d54805c6
[ "MIT" ]
null
null
null
Software for Proof of Work/SourceCode.py
fkerem/Cryptocurrency-Blockchain
965268a09a6f8b3e700e8bbc741e49a4d54805c6
[ "MIT" ]
null
null
null
Software for Proof of Work/SourceCode.py
fkerem/Cryptocurrency-Blockchain
965268a09a6f8b3e700e8bbc741e49a4d54805c6
[ "MIT" ]
null
null
null
""" Readme.txt: Required modules: random, sys, hashlib, sha3 Please read the comments below for further explanation. """ from random import * import sys import hashlib if sys.version_info < (3, 6): import sha3 def serialnoncegenerator(): # To generate uniformly randomly 128-bit integer serial...
33.175676
129
0.61833
from random import * import sys import hashlib if sys.version_info < (3, 6): import sha3 def serialnoncegenerator(): serial = str(randint(0, 2**128 - 1)) return serial def payee(): payee = "" for i in range(10): num = randint(48, 90) while(num > 57 and num < 65): ...
true
true
f725069e16f136f40e31fccafac67c140404d6b4
59,971
py
Python
flash/core/data/data_module.py
sumanmichael/lightning-flash
4c69c1bf49fa74d0f2fdb9c4dbdcdfd5942352db
[ "Apache-2.0" ]
null
null
null
flash/core/data/data_module.py
sumanmichael/lightning-flash
4c69c1bf49fa74d0f2fdb9c4dbdcdfd5942352db
[ "Apache-2.0" ]
null
null
null
flash/core/data/data_module.py
sumanmichael/lightning-flash
4c69c1bf49fa74d0f2fdb9c4dbdcdfd5942352db
[ "Apache-2.0" ]
1
2021-07-14T09:17:46.000Z
2021-07-14T09:17:46.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
48.402744
119
0.644712
import os import platform from typing import Any, Callable, Collection, Dict, Iterable, List, Optional, Sequence, Tuple, TYPE_CHECKING, Union import numpy as np import pytorch_lightning as pl import torch from pytorch_lightning.trainer.states import RunningStage from pytorch_lightning.utilities.exceptions...
true
true
f72506abcd96241b0e568bab11db58147f3f22c6
13,446
py
Python
source/rttov_test/profile-datasets-py/div83/028.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
null
null
null
source/rttov_test/profile-datasets-py/div83/028.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
1
2022-03-12T12:19:59.000Z
2022-03-12T12:19:59.000Z
source/rttov_test/profile-datasets-py/div83/028.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
null
null
null
""" Profile ../profile-datasets-py/div83/028.py file automaticaly created by prof_gen.py script """ self["ID"] = "../profile-datasets-py/div83/028.py" self["Q"] = numpy.array([ 2.70658300e+00, 2.88421200e+00, 3.36234900e+00, 4.31645100e+00, 5.09368400e+00, 5.28904200e+00, 5.1902...
57.956897
92
0.566711
self["ID"] = "../profile-datasets-py/div83/028.py" self["Q"] = numpy.array([ 2.70658300e+00, 2.88421200e+00, 3.36234900e+00, 4.31645100e+00, 5.09368400e+00, 5.28904200e+00, 5.19020300e+00, 5.37709100e+00, 5.81179600e+00, 6.08195300e+00, 6.10215300e+00, 6.10604300e+00, ...
true
true
f725070abe59440c81ec609b73017feaae140853
4,547
py
Python
mkt/home/tests/test_views.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/home/tests/test_views.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/home/tests/test_views.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.conf import settings from nose.tools import eq_ from pyquery import PyQuery as pq from amo.tests import app_factory, mock_es from amo.urlresolvers import reverse import mkt from mkt.browse.tests.test_views import BrowseBase from mkt.webapps.models import Webapp from mkt.zadmin.models imp...
35.248062
77
0.610073
import datetime from django.conf import settings from nose.tools import eq_ from pyquery import PyQuery as pq from amo.tests import app_factory, mock_es from amo.urlresolvers import reverse import mkt from mkt.browse.tests.test_views import BrowseBase from mkt.webapps.models import Webapp from mkt.zadmin.models imp...
true
true
f725072ba5ab89efad25c3839e4eab5683dd5e8a
9,159
py
Python
epgbackup/src/plugin.py
builder08/enigma2-plugins_2
f8f08b947e23c1c86b011492a7323125774c3482
[ "OLDAP-2.3" ]
null
null
null
epgbackup/src/plugin.py
builder08/enigma2-plugins_2
f8f08b947e23c1c86b011492a7323125774c3482
[ "OLDAP-2.3" ]
null
null
null
epgbackup/src/plugin.py
builder08/enigma2-plugins_2
f8f08b947e23c1c86b011492a7323125774c3482
[ "OLDAP-2.3" ]
null
null
null
# for localized messages from . import _ # Config from Components.config import config, ConfigYesNo, ConfigNumber, ConfigSelection, \ ConfigSubsection, ConfigSelectionNumber, ConfigDirectory, NoSave from Screens.MessageBox import MessageBox from Screens.Standby import TryQuitMainloop from Tools.BoundFunction import b...
39.821739
259
0.780653
from . import _ from Components.config import config, ConfigYesNo, ConfigNumber, ConfigSelection, \ ConfigSubsection, ConfigSelectionNumber, ConfigDirectory, NoSave from Screens.MessageBox import MessageBox from Screens.Standby import TryQuitMainloop from Tools.BoundFunction import boundFunction from EPGBackupToo...
true
true
f725089c2e562403e45979d33cb8bab9a94933e2
6,399
py
Python
OMG/env/random_load.py
Webbah/sec-for-reinforcement-learning
19db622dce4963d25cb1b6e4ae12ddf98b6d27d2
[ "MIT" ]
2
2021-12-16T12:49:26.000Z
2022-01-28T19:18:43.000Z
OMG/env/random_load.py
Webbah/sec-for-reinforcement-learning
19db622dce4963d25cb1b6e4ae12ddf98b6d27d2
[ "MIT" ]
null
null
null
OMG/env/random_load.py
Webbah/sec-for-reinforcement-learning
19db622dce4963d25cb1b6e4ae12ddf98b6d27d2
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from openmodelica_microgrid_gym.util import RandProcess class RandomLoad: def __init__(self, train_episode_length: int, ts: float, rand_process: RandProcess, loadstep_time: int = None, load_curve: pd.DataFrame = None, bounds=None, bounds_std=None): ...
41.823529
119
0.609314
import numpy as np import pandas as pd from openmodelica_microgrid_gym.util import RandProcess class RandomLoad: def __init__(self, train_episode_length: int, ts: float, rand_process: RandProcess, loadstep_time: int = None, load_curve: pd.DataFrame = None, bounds=None, bounds_std=None): ...
true
true
f72508f773fd8c5c239a480ae2c67e066c971dd2
1,265
py
Python
api/migrations/0022_auto_20150222_0024.py
eiling/SchoolIdolAPI
a05980fdb33b143dbe2febfc1ad6cf723f025c8d
[ "Apache-2.0" ]
65
2017-12-29T12:28:11.000Z
2022-03-15T06:42:26.000Z
api/migrations/0022_auto_20150222_0024.py
eiling/SchoolIdolAPI
a05980fdb33b143dbe2febfc1ad6cf723f025c8d
[ "Apache-2.0" ]
31
2017-12-18T02:03:09.000Z
2022-01-13T00:43:35.000Z
api/migrations/0022_auto_20150222_0024.py
eiling/SchoolIdolAPI
a05980fdb33b143dbe2febfc1ad6cf723f025c8d
[ "Apache-2.0" ]
7
2018-08-27T15:11:01.000Z
2021-08-16T05:15:13.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('api', '0021_card_video_story'), ] ...
30.853659
96
0.611858
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('api', '0021_card_video_story'), ] operations = [ ...
true
true
f725091c50677d690c2ec6cbbf02012349ecebe0
109,596
py
Python
numpy/core/tests/test_datetime.py
kurtamohler/numpy
73157efcd17da95ce984d1595ac4907233b9dbf5
[ "BSD-3-Clause" ]
1
2022-02-27T15:07:29.000Z
2022-02-27T15:07:29.000Z
numpy/core/tests/test_datetime.py
kurtamohler/numpy
73157efcd17da95ce984d1595ac4907233b9dbf5
[ "BSD-3-Clause" ]
41
2019-04-01T15:52:29.000Z
2021-09-07T00:15:51.000Z
numpy/core/tests/test_datetime.py
kurtamohler/numpy
73157efcd17da95ce984d1595ac4907233b9dbf5
[ "BSD-3-Clause" ]
4
2021-06-25T08:40:39.000Z
2021-08-08T09:52:42.000Z
import numpy import numpy as np import datetime import pytest from numpy.testing import ( assert_, assert_equal, assert_raises, assert_warns, suppress_warnings, assert_raises_regex, ) from numpy.compat import pickle # Use pytz to test out various time zones if available try: from pytz import timezone ...
45.494396
101
0.53845
import numpy import numpy as np import datetime import pytest from numpy.testing import ( assert_, assert_equal, assert_raises, assert_warns, suppress_warnings, assert_raises_regex, ) from numpy.compat import pickle try: from pytz import timezone as tz _has_pytz = True except ImportError: _ha...
true
true
f7250920aa8cce465657186e7f5d41dd1494786a
2,066
py
Python
azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_file_properties_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-05-10T19:58:09.000Z
2019-05-10T19:58:09.000Z
azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_file_properties_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_file_properties_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-07-28T14:50:54.000Z
2021-07-28T14:50:54.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.892857
108
0.616167
from msrest.serialization import Model class ProjectFileProperties(Model): _validation = { 'last_modified': {'readonly': True}, 'size': {'readonly': True}, } _attribute_map = { 'extension': {'key': 'extension', 'type': 'str'}, 'file_path': {'key': 'filePath', '...
true
true
f72509bc9ac00b2ac21743261ec417182f6782d1
6,683
py
Python
code/gtp/gtp.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
null
null
null
code/gtp/gtp.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
null
null
null
code/gtp/gtp.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
1
2021-08-28T20:31:01.000Z
2021-08-28T20:31:01.000Z
# GTP for Trojan-go # Helper file import re def pre_engine(s): s = re.sub("[^\t\n -~]", "", s) s = s.split("#")[0] s = s.replace("\t", " ") return s def pre_controller(s): s = re.sub("[^\t\n -~]", "", s) s = s.replace("\t", " ") return s def gtp_boolean(b): return "true" if b else "...
25.029963
77
0.572497
import re def pre_engine(s): s = re.sub("[^\t\n -~]", "", s) s = s.split("#")[0] s = s.replace("\t", " ") return s def pre_controller(s): s = re.sub("[^\t\n -~]", "", s) s = s.replace("\t", " ") return s def gtp_boolean(b): return "true" if b else "false" def gtp_list(l): re...
true
true
f7250ab88692dbc04fa8a5fc7d974f0ae2eb1e02
2,352
py
Python
model-optimizer/mo/front/kaldi/extractors/normalize_component_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
model-optimizer/mo/front/kaldi/extractors/normalize_component_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
model-optimizer/mo/front/kaldi/extractors/normalize_component_ext.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
""" Copyright (C) 2018-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
32.219178
115
0.65051
import numpy as np from extensions.ops.normalize import NormalizeOp from mo.front.caffe.extractors.utils import embed_input from mo.front.extractor import FrontExtractorOp from mo.front.kaldi.loader.utils import collect_until_token, read_binary_bool_token, read_binary_integer32_token, \ read_binary_float_token fr...
true
true
f7250ae4fa8e806718a9b01881b2da9dab3d34a5
6,708
py
Python
aclhound/targets/arista.py
gdelaney/aclhound
417a4ad788e886ce78a9527222e2ab4609c20d23
[ "BSD-2-Clause" ]
13
2015-01-10T16:42:07.000Z
2018-07-12T01:53:21.000Z
aclhound/targets/arista.py
gdelaney/aclhound
417a4ad788e886ce78a9527222e2ab4609c20d23
[ "BSD-2-Clause" ]
31
2015-01-02T21:42:00.000Z
2016-04-13T21:31:52.000Z
aclhound/targets/arista.py
gdelaney/aclhound
417a4ad788e886ce78a9527222e2ab4609c20d23
[ "BSD-2-Clause" ]
15
2015-01-17T20:09:01.000Z
2020-09-23T09:06:07.000Z
#!/usr/bin/env python2.7 # Copyright (C) 2014-2015 Job Snijders <job@instituut.net> # # This file is part of ACLHound # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the...
41.153374
78
0.45319
from ipaddr import IPNetwork from grako.contexts import Closure def render(self, **kwargs): policy = self.data afi = kwargs['afi'] config_blob = [] def afi_match(host): if host == "any": return True elif IPNetwork(host).version == afi: ...
true
true
f7250b0e5c4a53b9bd86487a7b9aa16553365458
3,463
py
Python
deepgram/_utils.py
jeremycline/python-sdk
5847241be8585982673b6f21080c3f5b921123e4
[ "MIT" ]
null
null
null
deepgram/_utils.py
jeremycline/python-sdk
5847241be8585982673b6f21080c3f5b921123e4
[ "MIT" ]
null
null
null
deepgram/_utils.py
jeremycline/python-sdk
5847241be8585982673b6f21080c3f5b921123e4
[ "MIT" ]
null
null
null
from ._constants import DEFAULT_ENDPOINT from ._types import Options from ._version import __version__ from typing import Any, Union, Optional, IO, Mapping, Tuple, List import aiohttp, urllib.parse, json, re, platform import websockets, websockets.client Payload = Optional[Union[dict, str, bytes, IO]] def _prepare_he...
50.926471
155
0.67687
from ._constants import DEFAULT_ENDPOINT from ._types import Options from ._version import __version__ from typing import Any, Union, Optional, IO, Mapping, Tuple, List import aiohttp, urllib.parse, json, re, platform import websockets, websockets.client Payload = Optional[Union[dict, str, bytes, IO]] def _prepare_he...
true
true
f7250ba98072e446898a6e4e1a69f331c437a919
215,396
py
Python
hydrus/client/gui/ClientGUITags.py
bbappserver/hydrus-build-test
de7868c2f549faaf4a189b120cddcb39d16a64ba
[ "WTFPL" ]
null
null
null
hydrus/client/gui/ClientGUITags.py
bbappserver/hydrus-build-test
de7868c2f549faaf4a189b120cddcb39d16a64ba
[ "WTFPL" ]
null
null
null
hydrus/client/gui/ClientGUITags.py
bbappserver/hydrus-build-test
de7868c2f549faaf4a189b120cddcb39d16a64ba
[ "WTFPL" ]
null
null
null
import collections import itertools import os import random import time import typing from qtpy import QtCore as QC from qtpy import QtWidgets as QW from qtpy import QtGui as QG from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.core i...
39.888148
356
0.521286
import collections import itertools import os import random import time import typing from qtpy import QtCore as QC from qtpy import QtWidgets as QW from qtpy import QtGui as QG from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.core i...
true
true
f7250c8113f5c4b5fe8357a30be38ead88265b94
139
py
Python
aos_sw_api/globel_models/network_host.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
null
null
null
aos_sw_api/globel_models/network_host.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
1
2020-12-24T15:36:56.000Z
2021-01-28T23:19:57.000Z
aos_sw_api/globel_models/network_host.py
KennethSoelberg/AOS-Switch
a5a2c54917bbb69fab044bf0b313bcf795642d30
[ "MIT" ]
1
2021-02-16T23:26:28.000Z
2021-02-16T23:26:28.000Z
from pydantic import BaseModel from .ip_address import IpAddressModel class NetworkHostModel(BaseModel): ip_address: IpAddressModel
17.375
38
0.827338
from pydantic import BaseModel from .ip_address import IpAddressModel class NetworkHostModel(BaseModel): ip_address: IpAddressModel
true
true
f7250f700383b7cc2166cc898173234aba8a6194
301
py
Python
photo/urls.py
firdausa7/MY-GALLERY
5d2fe2727d760929800c14c11b0ff4c6d081584b
[ "MIT" ]
null
null
null
photo/urls.py
firdausa7/MY-GALLERY
5d2fe2727d760929800c14c11b0ff4c6d081584b
[ "MIT" ]
3
2020-06-05T23:24:25.000Z
2021-06-10T22:02:41.000Z
photo/urls.py
firdausa7/MY-GALLERY
5d2fe2727d760929800c14c11b0ff4c6d081584b
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns=[ #index path url('^$', views.index,name='index'), url('location/', views.category, name='location'), url('category', views.category, name='category'), url('search/', views.search_results, name='search_results'), ]
27.363636
64
0.671096
from django.conf.urls import url from . import views urlpatterns=[ url('^$', views.index,name='index'), url('location/', views.category, name='location'), url('category', views.category, name='category'), url('search/', views.search_results, name='search_results'), ]
true
true
f7250ff72bb64a4cd0a0a78f2a6db54775d4f74e
3,253
py
Python
Python/Police_Car_Game/Main.py
wilsonandusa/wilsonwu
512214c187550f05497732e943f3323c15caeee0
[ "Unlicense" ]
null
null
null
Python/Police_Car_Game/Main.py
wilsonandusa/wilsonwu
512214c187550f05497732e943f3323c15caeee0
[ "Unlicense" ]
null
null
null
Python/Police_Car_Game/Main.py
wilsonandusa/wilsonwu
512214c187550f05497732e943f3323c15caeee0
[ "Unlicense" ]
null
null
null
'''copyright Xiaosheng Wu Python game 12/31/2015''' import pygame, sys from classes import * from process import * pygame.init() SCREENWIDTH,SCREENHEIGHT = 767,1257 screen = pygame.display.set_mode((SCREENWIDTH,SCREENHEIGHT)) #zero for the flag 32 for color BackGround = pygame.image.load("images/bg.png") Header = p...
37.390805
93
0.748232
import pygame, sys from classes import * from process import * pygame.init() SCREENWIDTH,SCREENHEIGHT = 767,1257 screen = pygame.display.set_mode((SCREENWIDTH,SCREENHEIGHT)) BackGround = pygame.image.load("images/bg.png") Header = pygame.image.load("images/Header.png") clock = pygame.time.Clock() FPS = 24 flag = 2...
true
true
f7251086cbee9232ee1a4c2ae76bb737b8cda266
1,378
py
Python
backend-project/small_eod/letters/migrations/0004_auto_20200221_1956.py
WlodzimierzKorza/small_eod
027022bd71122a949a2787d0fb86518df80e48cd
[ "MIT" ]
64
2019-12-30T11:24:03.000Z
2021-06-24T01:04:56.000Z
backend-project/small_eod/letters/migrations/0004_auto_20200221_1956.py
WlodzimierzKorza/small_eod
027022bd71122a949a2787d0fb86518df80e48cd
[ "MIT" ]
465
2018-06-13T21:43:43.000Z
2022-01-04T23:33:56.000Z
backend-project/small_eod/letters/migrations/0004_auto_20200221_1956.py
WlodzimierzKorza/small_eod
027022bd71122a949a2787d0fb86518df80e48cd
[ "MIT" ]
72
2018-12-02T19:47:03.000Z
2022-01-04T22:54:49.000Z
# Generated by Django 3.0.3 on 2020-02-21 19:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('letters', '0003_auto_202...
37.243243
199
0.659652
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('letters', '0003_auto_20200110_0200'), ] operations = [ ...
true
true
f725114cc0cb5e35486379975f0d3386787546b9
1,736
py
Python
Labs/Lab 1 Midway RCC and mpi4py/mpi_rand_walk.py
cindychu/LargeScaleComputing_S20
913b0155f47914c258b503df677067a510dd23f5
[ "MIT" ]
null
null
null
Labs/Lab 1 Midway RCC and mpi4py/mpi_rand_walk.py
cindychu/LargeScaleComputing_S20
913b0155f47914c258b503df677067a510dd23f5
[ "MIT" ]
null
null
null
Labs/Lab 1 Midway RCC and mpi4py/mpi_rand_walk.py
cindychu/LargeScaleComputing_S20
913b0155f47914c258b503df677067a510dd23f5
[ "MIT" ]
null
null
null
from mpi4py import MPI import matplotlib.pyplot as plt import numpy as np import time def sim_rand_walks_parallel(n_runs): # Get rank of process and overall size of communicator: comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() # Start time: t0 = time.time() # Evenly d...
30.45614
77
0.645161
from mpi4py import MPI import matplotlib.pyplot as plt import numpy as np import time def sim_rand_walks_parallel(n_runs): comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() t0 = time.time() N = int(n_runs/size) r_walks = [] for i in range(N): ...
true
true
f72511a3099af2e0476081a70e6b3d479159a8c0
1,950
py
Python
tests/testhelpers/override_testhelper_err2.py
dbarnett/pytypes
da056359a8d1dad174316195830a1cb0574893af
[ "Apache-2.0" ]
189
2016-09-17T13:45:58.000Z
2022-03-12T10:53:42.000Z
tests/testhelpers/override_testhelper_err2.py
dbarnett/pytypes
da056359a8d1dad174316195830a1cb0574893af
[ "Apache-2.0" ]
104
2017-02-23T16:43:18.000Z
2022-03-17T17:36:18.000Z
tests/testhelpers/override_testhelper_err2.py
dbarnett/pytypes
da056359a8d1dad174316195830a1cb0574893af
[ "Apache-2.0" ]
21
2017-02-17T08:05:12.000Z
2021-12-08T11:22:15.000Z
# Copyright 2017 Stefan Richthofer # # 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 ...
21.428571
74
0.606667
from pytypes import override class TestClass(): def test_meth0(self, a): pass def test_meth1(self, a): pass def test_meth2(self, a): pass class TestClass2(TestClass): @override def test_meth0(self, a): pass ...
true
true
f72512165bd2c1034b3a55e9374f6cdaed5ced1b
2,873
py
Python
release/stubs.min/System/Windows/Forms/__init___parts/LinkClickedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/Windows/Forms/__init___parts/LinkClickedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/Windows/Forms/__init___parts/LinkClickedEventHandler.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class LinkClickedEventHandler(MulticastDelegate,ICloneable,ISerializable): """ Represents the method that will handle the System.Windows.Forms.RichTextBox.LinkClicked event of a System.Windows.Forms.RichTextBox. LinkClickedEventHandler(object: object,method: IntPtr) """ def BeginInvoke(self,sender,e,ca...
30.242105
215
0.719457
class LinkClickedEventHandler(MulticastDelegate,ICloneable,ISerializable): def BeginInvoke(self,sender,e,callback,object): pass def CombineImpl(self,*args): pass def DynamicInvokeImpl(self,*args): pass def EndInvoke(self,result): pass def GetMethodImpl(self,*args): pass def Invoke(self,sender...
true
true
f7251343722125f996eafb8fe399af9c3bd16ad4
694
py
Python
cctbx/eltbx/tests/tst_wavelengths.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/eltbx/tests/tst_wavelengths.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/eltbx/tests/tst_wavelengths.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division from cctbx.eltbx import wavelengths from libtbx.test_utils import approx_equal def exercise(): from cctbx import factor_kev_angstrom w = wavelengths.characteristic("CU") assert w.label() == "Cu" assert approx_equal(w.as_angstrom(), 1.5418) assert approx_equal(w.as_kev(), facto...
26.692308
69
0.700288
from __future__ import division from cctbx.eltbx import wavelengths from libtbx.test_utils import approx_equal def exercise(): from cctbx import factor_kev_angstrom w = wavelengths.characteristic("CU") assert w.label() == "Cu" assert approx_equal(w.as_angstrom(), 1.5418) assert approx_equal(w.as_kev(), facto...
false
true
f72513565d42f73aae9ae75dc0d14b21b6416c46
318
py
Python
hossein/university/595/595_v2.py
mhdehghan/quera-answers
28dc0a9dbe3697593d7cbe05c9f05db2d3b01790
[ "MIT" ]
null
null
null
hossein/university/595/595_v2.py
mhdehghan/quera-answers
28dc0a9dbe3697593d7cbe05c9f05db2d3b01790
[ "MIT" ]
null
null
null
hossein/university/595/595_v2.py
mhdehghan/quera-answers
28dc0a9dbe3697593d7cbe05c9f05db2d3b01790
[ "MIT" ]
null
null
null
plus = lambda x, y: x + y current_list = [0, 1] next_list = [] n = int(input()) if n > 0: print(1) for i in range(n-1): current_list.append(0) next_list = list(map(plus, current_list[1:], current_list)) print(*next_list,sep=' ') current_list = next_list current_list.insert(0, 0) next_list = []
26.5
63
0.628931
plus = lambda x, y: x + y current_list = [0, 1] next_list = [] n = int(input()) if n > 0: print(1) for i in range(n-1): current_list.append(0) next_list = list(map(plus, current_list[1:], current_list)) print(*next_list,sep=' ') current_list = next_list current_list.insert(0, 0) next_list = []
true
true
f7251431a4069a8242c3b58bab2e52b693aa37b9
810
py
Python
safe_transaction_service/tokens/tasks.py
cryptopossum/safe-transaction-service
38069e5f4514be51c6f14e395a135d03f0c03887
[ "MIT" ]
null
null
null
safe_transaction_service/tokens/tasks.py
cryptopossum/safe-transaction-service
38069e5f4514be51c6f14e395a135d03f0c03887
[ "MIT" ]
null
null
null
safe_transaction_service/tokens/tasks.py
cryptopossum/safe-transaction-service
38069e5f4514be51c6f14e395a135d03f0c03887
[ "MIT" ]
1
2021-06-09T06:20:49.000Z
2021-06-09T06:20:49.000Z
from typing import Optional from celery import app from celery.utils.log import get_task_logger from gnosis.eth import EthereumClientProvider from gnosis.eth.ethereum_client import EthereumNetwork from safe_transaction_service.history.utils import close_gevent_db_connection from .models import Token logger = get_t...
28.928571
77
0.738272
from typing import Optional from celery import app from celery.utils.log import get_task_logger from gnosis.eth import EthereumClientProvider from gnosis.eth.ethereum_client import EthereumNetwork from safe_transaction_service.history.utils import close_gevent_db_connection from .models import Token logger = get_t...
true
true
f7251634c09abfd3f03813bfef073fd95ca209ef
9,885
py
Python
amqpstorm/tests/functional/management/test_queue.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
140
2016-06-07T18:53:57.000Z
2022-03-23T01:50:15.000Z
amqpstorm/tests/functional/management/test_queue.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
85
2016-04-11T23:32:32.000Z
2022-03-19T07:21:21.000Z
amqpstorm/tests/functional/management/test_queue.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
38
2016-04-20T20:21:13.000Z
2022-03-23T05:31:58.000Z
from amqpstorm.management import ApiError from amqpstorm.management import ManagementApi from amqpstorm.tests import HTTP_URL from amqpstorm.tests import PASSWORD from amqpstorm.tests import USERNAME from amqpstorm.tests.functional.utility import TestFunctionalFramework from amqpstorm.tests.functional.utility import se...
36.884328
79
0.628123
from amqpstorm.management import ApiError from amqpstorm.management import ManagementApi from amqpstorm.tests import HTTP_URL from amqpstorm.tests import PASSWORD from amqpstorm.tests import USERNAME from amqpstorm.tests.functional.utility import TestFunctionalFramework from amqpstorm.tests.functional.utility import se...
true
true
f72516a6c5f55d8207f7aef5e97d7acd0c0e1e7d
350
py
Python
BOOK/MAIN/05-file-handling/chapter-5-examples/07-count-vowels-consonants.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
BOOK/MAIN/05-file-handling/chapter-5-examples/07-count-vowels-consonants.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
BOOK/MAIN/05-file-handling/chapter-5-examples/07-count-vowels-consonants.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
fileObj = open('answer.txt',"r") ch = "" vCount = 0 cCount = 0 while ch: ch = fileObj.read(1) #one character read from file if ch in ['A','a','E','e','I','i','O','o','U','u']: vCount+=1 else: cCount+=1 print("Vowels in the file: ", vCount) print("Consonants in the file: ",cCount) #...
21.875
55
0.56
fileObj = open('answer.txt',"r") ch = "" vCount = 0 cCount = 0 while ch: ch = fileObj.read(1) if ch in ['A','a','E','e','I','i','O','o','U','u']: vCount+=1 else: cCount+=1 print("Vowels in the file: ", vCount) print("Consonants in the file: ",cCount) fileObj.close()
true
true
f72517727d88232198a9d0d468e299f69e2a632b
4,416
py
Python
venv/Lib/site-packages/ipyparallel/controller/mongodb.py
BoxicaLion/BasicMathFormulas
4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2
[ "MIT" ]
69
2019-02-18T12:07:35.000Z
2022-03-12T10:38:32.000Z
ipyparallel/controller/mongodb.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
12
2018-12-06T22:06:49.000Z
2022-02-25T17:40:44.000Z
ipyparallel/controller/mongodb.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
28
2019-03-22T01:07:13.000Z
2022-02-21T16:38:27.000Z
"""A TaskRecord backend using mongodb Authors: * Min RK """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of t...
35.047619
100
0.585824
try: from pymongo import MongoClient except ImportError: from pymongo import Connection as MongoClient try: from bson.binary import Binary except ImportError: from bson import Binary from traitlets import Dict, List, Unicode, Instance from .dictdb import BaseDB class MongoDB(BaseDB): ...
true
true
f7251940c8d1976a314e9a83de4640eaf7110298
1,134
py
Python
tools/gen_shake_256_sum.py
dpensi/insights-data-schemas
a60d673ce4053b8554e09b7bd08e518f9546727c
[ "Apache-2.0" ]
1
2020-12-07T09:19:32.000Z
2020-12-07T09:19:32.000Z
tools/gen_shake_256_sum.py
dpensi/insights-data-schemas
a60d673ce4053b8554e09b7bd08e518f9546727c
[ "Apache-2.0" ]
36
2020-12-31T10:02:44.000Z
2022-02-21T12:09:56.000Z
tools/gen_shake_256_sum.py
dpensi/insights-data-schemas
a60d673ce4053b8554e09b7bd08e518f9546727c
[ "Apache-2.0" ]
6
2020-12-07T09:19:35.000Z
2022-02-01T14:39:22.000Z
#!/usr/bin/env python3 # Copyright © 2021 Pavel Tisnovsky # # 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...
32.4
84
0.689594
import hashlib with open("input.txt", "r") as fin: for input_string in fin: input_string = input_string[:-1] shake_256_sum = hashlib.shake_256() shake_256_sum.update(input_string.encode("UTF-8")) input_string = input_string.replace("\t",...
true
true
f725194997751cabcf7176a1909560de88b4ee0e
8,176
py
Python
src/train.py
ahernandez1801/donkey_rl_mqtt
02bbfc3d036220a4061b95e50780984e657aff43
[ "BSD-3-Clause" ]
null
null
null
src/train.py
ahernandez1801/donkey_rl_mqtt
02bbfc3d036220a4061b95e50780984e657aff43
[ "BSD-3-Clause" ]
null
null
null
src/train.py
ahernandez1801/donkey_rl_mqtt
02bbfc3d036220a4061b95e50780984e657aff43
[ "BSD-3-Clause" ]
null
null
null
''' Train Train your nerual network Author: Tawn Kramer ''' from __future__ import print_function import os import sys import glob import time import fnmatch import argparse import numpy as np from PIL import Image import keras import conf import random import augment import models ''' matplotlib can be a pain to set...
32.316206
143
0.632583
from __future__ import print_function import os import sys import glob import time import fnmatch import argparse import numpy as np from PIL import Image import keras import conf import random import augment import models try: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt ...
true
true
f7251a2ca8385d7a240cf8759dc50191209cbf05
2,647
py
Python
frappe/website/context.py
gangadhar-kadam/lgnlvefrape
6c72c134d358030d3737ff63e5a4b8187e802f17
[ "MIT" ]
1
2022-03-05T16:02:39.000Z
2022-03-05T16:02:39.000Z
frappe/website/context.py
gangadhar-kadam/lgnlvefrape
6c72c134d358030d3737ff63e5a4b8187e802f17
[ "MIT" ]
null
null
null
frappe/website/context.py
gangadhar-kadam/lgnlvefrape
6c72c134d358030d3737ff63e5a4b8187e802f17
[ "MIT" ]
null
null
null
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.template import render_blocks from frappe.website.r...
28.771739
107
0.735172
from __future__ import unicode_literals import frappe from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.template import render_blocks from frappe.website.router import get_route_info from frappe.website.utils import can_cache from frappe.website.permission...
true
true
f7251ad863b8884ed1b5f58106eecd8cd3a5a1ce
2,503
py
Python
tomodachi/protocol/json_base.py
0x1EE7/tomodachi
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
[ "MIT" ]
null
null
null
tomodachi/protocol/json_base.py
0x1EE7/tomodachi
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
[ "MIT" ]
null
null
null
tomodachi/protocol/json_base.py
0x1EE7/tomodachi
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
[ "MIT" ]
null
null
null
import ujson import uuid import time import zlib import base64 from typing import Any, Dict, Tuple, Union PROTOCOL_VERSION = 'tomodachi-json-base--1.0.0' class JsonBase(object): @classmethod async def build_message(cls, service: Any, topic: str, data: Any, **kwargs: Any) -> str: data_encoding = 'raw'...
39.730159
118
0.548542
import ujson import uuid import time import zlib import base64 from typing import Any, Dict, Tuple, Union PROTOCOL_VERSION = 'tomodachi-json-base--1.0.0' class JsonBase(object): @classmethod async def build_message(cls, service: Any, topic: str, data: Any, **kwargs: Any) -> str: data_encoding = 'raw'...
true
true
f7251c3cfff5728cee204b97993228189eefc64e
2,801
py
Python
planning/path_generator/search_path_generator.py
HybridRobotics/cbf
d8a1b376e7e910de71df60cdf3619f68c40ab3ed
[ "Apache-2.0" ]
9
2022-03-07T09:12:29.000Z
2022-03-25T01:41:49.000Z
planning/path_generator/search_path_generator.py
HybridRobotics/cbf
d8a1b376e7e910de71df60cdf3619f68c40ab3ed
[ "Apache-2.0" ]
null
null
null
planning/path_generator/search_path_generator.py
HybridRobotics/cbf
d8a1b376e7e910de71df60cdf3619f68c40ab3ed
[ "Apache-2.0" ]
null
null
null
import sys import numpy as np from planning.path_generator.astar import * def plot_global_map(path, obstacles): fig, ax = plt.subplots() for o in obstacles: patch = o.get_plot_patch() ax.add_patch(patch) ax.plot(path[:, 0], path[:, 1]) plt.xlim([-1 * 0.15, 11 * 0.15]) plt.ylim([0...
33.345238
87
0.633345
import sys import numpy as np from planning.path_generator.astar import * def plot_global_map(path, obstacles): fig, ax = plt.subplots() for o in obstacles: patch = o.get_plot_patch() ax.add_patch(patch) ax.plot(path[:, 0], path[:, 1]) plt.xlim([-1 * 0.15, 11 * 0.15]) plt.ylim([0...
true
true
f7251d422b29b0275ce1c312bda2c4763835c059
33,303
py
Python
pytorch/pytorchcv/models/common.py
HyperGAN/imgclsmob
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/common.py
HyperGAN/imgclsmob
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/common.py
HyperGAN/imgclsmob
88b9776a5a927dc9a54e85e31978c4a9ec5ecbf3
[ "MIT" ]
null
null
null
""" Common routines for models in PyTorch. """ __all__ = ['HSwish', 'get_activation_layer', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'conv7x7_block', 'dwconv3x3_block', 'dwconv5x5_block', 'PreConvBlock', 'pre_conv1x1_block', 'pre_conv3x3_block'...
30.111212
120
0.58283
__all__ = ['HSwish', 'get_activation_layer', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'conv7x7_block', 'dwconv3x3_block', 'dwconv5x5_block', 'PreConvBlock', 'pre_conv1x1_block', 'pre_conv3x3_block', 'ChannelShuffle', 'ChannelShuffle2', 'SEBlock', '...
true
true
f7251df99e90dfe166f327c077139176b5b8516b
13,102
py
Python
tests/parameters_t.py
pan-dora/loris
bf6295eeddd8ae5820c793f28aaa57b5816bca08
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
tests/parameters_t.py
pan-dora/loris
bf6295eeddd8ae5820c793f28aaa57b5816bca08
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-08-04T10:50:35.000Z
2019-08-04T16:37:36.000Z
tests/parameters_t.py
pan-dora/loris
bf6295eeddd8ae5820c793f28aaa57b5816bca08
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-08-04T03:19:31.000Z
2019-08-04T03:19:31.000Z
# parameters_t.py #-*- coding: utf-8 -*- from decimal import Decimal from loris import img_info from loris.loris_exception import RequestException from loris.loris_exception import SyntaxException from loris.parameters import DECIMAL_ONE from loris.parameters import FULL_MODE from loris.parameters import PCT_MODE from...
35.032086
78
0.735995
from decimal import Decimal from loris import img_info from loris.loris_exception import RequestException from loris.loris_exception import SyntaxException from loris.parameters import DECIMAL_ONE from loris.parameters import FULL_MODE from loris.parameters import PCT_MODE from loris.parameters import PIXEL_MODE fro...
false
true
f7251e850c38e0f28697e00d751ee3f8dca92056
7,888
py
Python
dynamic_image_networks/hmdb51/training_scripts/train_resnext50_hmdb51.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
22
2018-09-14T00:32:41.000Z
2020-10-23T11:19:12.000Z
dynamic_image_networks/hmdb51/training_scripts/train_resnext50_hmdb51.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
1
2021-04-30T04:09:40.000Z
2021-04-30T04:09:40.000Z
dynamic_image_networks/hmdb51/training_scripts/train_resnext50_hmdb51.py
DoranLyong/dynamic-images-for-action-recognition
06a68c2337b45c44a8c7ec50e94585a9b9615ad0
[ "MIT" ]
7
2018-11-01T02:32:09.000Z
2020-10-03T12:19:02.000Z
# import apex - !!!! INCLUDE THIS IMPORT IF YOU WANT TO USE MIXED PRECISION TRAINING !!!! import torch import os import sys import torch.optim as optim import torch.nn as nn from datetime import datetime from tqdm import tqdm from pathlib import Path # Make sure that the project root is in your PATH (i.e., the parent ...
41.083333
112
0.439021
import torch import os import sys import torch.optim as optim import torch.nn as nn from datetime import datetime from tqdm import tqdm from pathlib import Path sys.path.append(str(Path('../../..').resolve())) from dynamic_image_networks.hmdb51.models.resnext50_temppool import get_model from dynamic_image_networ...
true
true
f7251f33ee91ecf48c4a7be3c6944bab432a6275
1,011
py
Python
main_app/urls.py
m-code12/Rescue
24ece6ac97aeb177435ec7cc3d822d17e75724c8
[ "MIT" ]
null
null
null
main_app/urls.py
m-code12/Rescue
24ece6ac97aeb177435ec7cc3d822d17e75724c8
[ "MIT" ]
1
2021-02-19T17:09:40.000Z
2021-02-19T17:09:40.000Z
main_app/urls.py
m-code12/Rescue
24ece6ac97aeb177435ec7cc3d822d17e75724c8
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = "main_app" urlpatterns = [ path('', views.home, name="home"), path('home/', views.home, name="home"), path('register/', views.register, name="register"), path('logout/', views.logout_request, name="logout"), path('login/', views.login_req...
48.142857
82
0.691395
from django.urls import path from . import views app_name = "main_app" urlpatterns = [ path('', views.home, name="home"), path('home/', views.home, name="home"), path('register/', views.register, name="register"), path('logout/', views.logout_request, name="logout"), path('login/', views.login_req...
true
true
f7251f49ee1a7989325fce02781fdfdd20216e2b
40,049
py
Python
chain/core/resources.py
ielm/chain-api
8fba4b8ebdedbe1de65fe2bde0e0a6f330177c91
[ "MIT" ]
23
2015-08-14T02:23:51.000Z
2021-04-16T14:59:59.000Z
chain/core/resources.py
ResEnv/chain-api
8fba4b8ebdedbe1de65fe2bde0e0a6f330177c91
[ "MIT" ]
27
2015-05-26T22:29:57.000Z
2020-06-05T16:40:51.000Z
chain/core/resources.py
ielm/chain-api
8fba4b8ebdedbe1de65fe2bde0e0a6f330177c91
[ "MIT" ]
10
2015-07-05T07:15:46.000Z
2020-06-30T18:28:08.000Z
from chain.core.api import Resource, ResourceField, CollectionField, \ MetadataCollectionField from chain.core.api import full_reverse, render_error from chain.core.api import CHAIN_CURIES from chain.core.api import BadRequestException, HTTP_STATUS_BAD_REQUEST from chain.core.api import register_resource from chain...
35.254401
107
0.571375
from chain.core.api import Resource, ResourceField, CollectionField, \ MetadataCollectionField from chain.core.api import full_reverse, render_error from chain.core.api import CHAIN_CURIES from chain.core.api import BadRequestException, HTTP_STATUS_BAD_REQUEST from chain.core.api import register_resource from chain...
true
true
f7251f653992e182b50932f276e0b927de32b712
8,687
py
Python
tests/losses/test_fastap_loss.py
cwkeam/pytorch-metric-learning
63e4ecb781c5735ad714f61a3eecc55f72496905
[ "MIT" ]
4,357
2020-01-15T23:42:35.000Z
2022-03-31T08:11:48.000Z
tests/losses/test_fastap_loss.py
cwkeam/pytorch-metric-learning
63e4ecb781c5735ad714f61a3eecc55f72496905
[ "MIT" ]
386
2020-01-16T02:06:37.000Z
2022-03-30T07:59:47.000Z
tests/losses/test_fastap_loss.py
cwkeam/pytorch-metric-learning
63e4ecb781c5735ad714f61a3eecc55f72496905
[ "MIT" ]
568
2020-01-16T01:08:23.000Z
2022-03-30T09:18:48.000Z
###################################### #######ORIGINAL IMPLEMENTATION######## ###################################### # FROM https://github.com/kunhe/FastAP-metric-learning/blob/master/pytorch/FastAP_loss.py # This code is copied directly from the official implementation # so that we can make sure our implementation ret...
36.045643
89
0.590998
torch.mm(input, input.t()) # 3. estimate discrete histograms Delta = torch.tensor(4.0 / num_bins).to(input.device) Z = torch.linspace(0.0, 4.0, steps=num_bins + 1).to(input.device) L = Z.size()[0] h_pos = torch.zeros((N, L), dtype=input.dtype).to(input.device) h_neg = to...
true
true
f72520d5e3e11a9dcb64026d7e62f1b47d0d54fa
1,554
py
Python
setup.py
pgjones/flake8-flask
e7099ed941086c92b6f752d4cf2e95c027f7605d
[ "MIT" ]
null
null
null
setup.py
pgjones/flake8-flask
e7099ed941086c92b6f752d4cf2e95c027f7605d
[ "MIT" ]
null
null
null
setup.py
pgjones/flake8-flask
e7099ed941086c92b6f752d4cf2e95c027f7605d
[ "MIT" ]
null
null
null
import os from setuptools import setup PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(PROJECT_ROOT, 'flake8_flask.py')) as file_: version_line = [line for line in file_ if line.startswith('__version__')][0] __version__ = version_line.split('=')[1].strip().strip("'").strip('"') ...
29.320755
87
0.622909
import os from setuptools import setup PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(PROJECT_ROOT, 'flake8_flask.py')) as file_: version_line = [line for line in file_ if line.startswith('__version__')][0] __version__ = version_line.split('=')[1].strip().strip("'").strip('"') ...
true
true
f72520ddf2e5e6b82e03983937f6030c0042fce3
4,902
py
Python
testplan/exporters/testing/pdf/renderers/entries/base.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
null
null
null
testplan/exporters/testing/pdf/renderers/entries/base.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
null
null
null
testplan/exporters/testing/pdf/renderers/entries/base.py
ymn1k/testplan
b1bde8495c449d75a74a7fe4e7c6501b0476f833
[ "Apache-2.0" ]
1
2019-09-11T09:13:18.000Z
2019-09-11T09:13:18.000Z
from reportlab.lib import colors from reportlab.lib.units import inch from reportlab.platypus import Image from testplan.common.exporters.pdf import RowStyle, create_table from testplan.common.exporters.pdf import format_table_style from testplan.common.utils.registry import Registry from testplan.testing.multitest.en...
36.311111
80
0.621991
from reportlab.lib import colors from reportlab.lib.units import inch from reportlab.platypus import Image from testplan.common.exporters.pdf import RowStyle, create_table from testplan.common.exporters.pdf import format_table_style from testplan.common.utils.registry import Registry from testplan.testing.multitest.en...
true
true
f72521063380e9fb0c546147201e0347312a3209
560
py
Python
python/0011_finding_the_percentage.py
basoares/hackerrank
3d294ba6da38efff0da496b16085ca557ce35985
[ "MIT" ]
null
null
null
python/0011_finding_the_percentage.py
basoares/hackerrank
3d294ba6da38efff0da496b16085ca557ce35985
[ "MIT" ]
null
null
null
python/0011_finding_the_percentage.py
basoares/hackerrank
3d294ba6da38efff0da496b16085ca557ce35985
[ "MIT" ]
null
null
null
''' The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students. Print the average of the marks array for the student name provided, showing 2 places after the decimal. ''' if __name__ == '__main__': n = int(input()) student_marks = {} for _ in rang...
29.473684
78
0.648214
if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() marks = student_marks[query_name] print(f'{(sum(marks)/float(len(marks)))...
true
true
f72522049a195e8802f79fdd1006b47629498830
287
py
Python
readH5.py
ChutianShen/pointnet_kitti
6ebd2c7c203c4fcc8172f306c85e55ea06429ba5
[ "MIT" ]
null
null
null
readH5.py
ChutianShen/pointnet_kitti
6ebd2c7c203c4fcc8172f306c85e55ea06429ba5
[ "MIT" ]
null
null
null
readH5.py
ChutianShen/pointnet_kitti
6ebd2c7c203c4fcc8172f306c85e55ea06429ba5
[ "MIT" ]
null
null
null
import h5py filename = './sem_seg/indoor3d_sem_seg_hdf5_data/ply_data_all_0.h5' #filename = './sem_seg/converted_KITTI/frame_10.h5' f = h5py.File(filename, 'r') data_file = f['data'][:] label_file = f['label'][:] print (data_file.shape, label_file.shape) print (type(label_file[0]))
22.076923
67
0.728223
import h5py filename = './sem_seg/indoor3d_sem_seg_hdf5_data/ply_data_all_0.h5' f = h5py.File(filename, 'r') data_file = f['data'][:] label_file = f['label'][:] print (data_file.shape, label_file.shape) print (type(label_file[0]))
true
true
f725220f95e7ed6a18489ee1563dd48ce5f224d6
2,985
py
Python
solutions/day18.py
nitekat1124/advent-of-code-2021
74501b84f0a08b33f48b4e5a2d66b8293c854150
[ "WTFPL" ]
3
2021-12-22T17:44:39.000Z
2022-01-14T17:18:15.000Z
solutions/day18.py
nitekat1124/advent-of-code-2021
74501b84f0a08b33f48b4e5a2d66b8293c854150
[ "WTFPL" ]
null
null
null
solutions/day18.py
nitekat1124/advent-of-code-2021
74501b84f0a08b33f48b4e5a2d66b8293c854150
[ "WTFPL" ]
null
null
null
import re from itertools import combinations from utils.solution_base import SolutionBase class Solution(SolutionBase): def solve(self, part_num: int): self.test_runner(part_num) func = getattr(self, f"part{part_num}") result = func(self.data) return result def test_runner(s...
34.310345
114
0.524958
import re from itertools import combinations from utils.solution_base import SolutionBase class Solution(SolutionBase): def solve(self, part_num: int): self.test_runner(part_num) func = getattr(self, f"part{part_num}") result = func(self.data) return result def test_runner(s...
true
true
f725222b5c43f17680f783bce12dae0b4c033b90
1,813
py
Python
sdk/purview/azure-purview-administration/tests/testcase.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/purview/azure-purview-administration/tests/testcase.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/purview/azure-purview-administration/tests/testcase.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
35.54902
87
0.689465
import functools from devtools_testutils import AzureTestCase, PowerShellPreparer from azure.purview.administration.account import PurviewAccountClient from azure.purview.administration.metadatapolicies import PurviewMetadataPoliciesClient class PurviewAccountTest(AzureTestCase): def __init__(self, method_n...
true
true
f72523871d8c380b139a74c4120ab78813f97178
206
py
Python
scripts/portal/NextStg.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
9
2021-04-26T11:59:29.000Z
2021-12-20T13:15:27.000Z
scripts/portal/NextStg.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/portal/NextStg.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
6
2021-07-14T06:32:05.000Z
2022-02-06T02:32:56.000Z
fieldID = sm.getFieldID() if fieldID == 811000500: sm.warpInstanceOut(811000008) elif not sm.hasMobsInField(): sm.warp(fieldID + 100) else: sm.chat("The portal is not opened yet.") sm.dispose()
22.888889
44
0.699029
fieldID = sm.getFieldID() if fieldID == 811000500: sm.warpInstanceOut(811000008) elif not sm.hasMobsInField(): sm.warp(fieldID + 100) else: sm.chat("The portal is not opened yet.") sm.dispose()
true
true
f725258ae5d9a6973d2e1d634a663f91c4a30abf
2,281
py
Python
userbot/plugins/antiflood.py
Solivagantt/userbot
9c2bb02ad24998e2739209381fcb66dc27daff32
[ "MIT" ]
null
null
null
userbot/plugins/antiflood.py
Solivagantt/userbot
9c2bb02ad24998e2739209381fcb66dc27daff32
[ "MIT" ]
null
null
null
userbot/plugins/antiflood.py
Solivagantt/userbot
9c2bb02ad24998e2739209381fcb66dc27daff32
[ "MIT" ]
2
2020-04-19T13:24:12.000Z
2021-02-14T14:01:31.000Z
import asyncio from telethon import events from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import ChatBannedRights from userbot.utils import admin_cmd import userbot.plugins.sql_helper.antiflood_sql as sql import userbot.utils from userbot.utils import humanbytes, progress, time_form...
31.680556
89
0.676019
import asyncio from telethon import events from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import ChatBannedRights from userbot.utils import admin_cmd import userbot.plugins.sql_helper.antiflood_sql as sql import userbot.utils from userbot.utils import humanbytes, progress, time_form...
true
true
f725258bf01873662ce2f235301796c73aa1e811
72,727
py
Python
sql/engines/tests.py
bosen365/Archery
424479fcb77646de0c5ef2d68a6fae9d3a685f00
[ "Apache-2.0" ]
1
2019-06-03T09:39:40.000Z
2019-06-03T09:39:40.000Z
sql/engines/tests.py
bosen365/Archery
424479fcb77646de0c5ef2d68a6fae9d3a685f00
[ "Apache-2.0" ]
4
2021-06-05T00:00:45.000Z
2022-02-10T12:17:14.000Z
sql/engines/tests.py
bosen365/Archery
424479fcb77646de0c5ef2d68a6fae9d3a685f00
[ "Apache-2.0" ]
1
2021-12-01T05:36:59.000Z
2021-12-01T05:36:59.000Z
import MySQLdb import json from datetime import timedelta, datetime from unittest.mock import patch, Mock, ANY import sqlparse from django.contrib.auth import get_user_model from django.test import TestCase from common.config import SysConfig from sql.engines import EngineBase from sql.engines.goinception import GoIn...
45.425984
196
0.636545
import MySQLdb import json from datetime import timedelta, datetime from unittest.mock import patch, Mock, ANY import sqlparse from django.contrib.auth import get_user_model from django.test import TestCase from common.config import SysConfig from sql.engines import EngineBase from sql.engines.goinception import GoIn...
true
true
f72526b6ad715d5466f1db2a8ab71d035fe309e3
567
py
Python
Python/Xiaoxiang_Python/lec04/BMR_1.0.py
kevindeng123/Programming
a06e9f7773fc083bcb153af21e6e9942a4114b4a
[ "MIT" ]
null
null
null
Python/Xiaoxiang_Python/lec04/BMR_1.0.py
kevindeng123/Programming
a06e9f7773fc083bcb153af21e6e9942a4114b4a
[ "MIT" ]
null
null
null
Python/Xiaoxiang_Python/lec04/BMR_1.0.py
kevindeng123/Programming
a06e9f7773fc083bcb153af21e6e9942a4114b4a
[ "MIT" ]
null
null
null
""" 作者:邓经纬 功能:BMR 计算器 版本:1.0 日期:26/10/2018 """ def main(): """ 主函数 """ # 性别 gender = '男' # 体重 weight = 70 # 身高(cm) height = 175 # 年龄 age = 25 if gender == '男': # 男性 bmr = (13.7 * weight) + (5.0 * height) - (6.8 * age) + 66 elif...
14.538462
65
0.391534
def main(): gender = '男' weight = 70 height = 175 age = 25 if gender == '男': bmr = (13.7 * weight) + (5.0 * height) - (6.8 * age) + 66 elif gender == '女': bmr = (9.6 * weight) + (1.8 * height) - (4.7 * age) +655 else: bmr = -...
true
true
f725288fe158ce24e1007dc29528d22db5be4be5
1,248
py
Python
tests/config/test_bucket_data_path_config.py
ranbb/justmltools
06fa74d04eb915afbe32617eb24bcb70396289d7
[ "MIT" ]
null
null
null
tests/config/test_bucket_data_path_config.py
ranbb/justmltools
06fa74d04eb915afbe32617eb24bcb70396289d7
[ "MIT" ]
3
2021-09-17T06:42:03.000Z
2021-09-17T06:42:04.000Z
tests/config/test_bucket_data_path_config.py
ranbb/justmltools
06fa74d04eb915afbe32617eb24bcb70396289d7
[ "MIT" ]
1
2020-06-24T15:17:59.000Z
2020-06-24T15:17:59.000Z
from unittest import TestCase from justmltools.config.bucket_data_path_config import BucketDataPathConfig PREFIX = "my_bucket_key_prefix" class TestBucketDataPathConfig(TestCase): def setUp(self) -> None: self.sut: BucketDataPathConfig = BucketDataPathConfig(prefix=PREFIX) def test_get_prefix(self...
35.657143
95
0.729167
from unittest import TestCase from justmltools.config.bucket_data_path_config import BucketDataPathConfig PREFIX = "my_bucket_key_prefix" class TestBucketDataPathConfig(TestCase): def setUp(self) -> None: self.sut: BucketDataPathConfig = BucketDataPathConfig(prefix=PREFIX) def test_get_prefix(self...
true
true
f72528dd8a067e6d5e70862cf8082bf8332d66e0
572
py
Python
revelation/app/hook/hooks/movieform.py
uyamazak/oceanus
6158cdc313a381f8228562605d33713ad4e776f1
[ "MIT" ]
8
2017-02-10T07:24:43.000Z
2019-06-03T07:45:29.000Z
revelation/app/hook/hooks/movieform.py
uyamazak/oceanus
6158cdc313a381f8228562605d33713ad4e776f1
[ "MIT" ]
3
2017-02-20T10:24:20.000Z
2017-08-15T04:54:36.000Z
revelation/app/hook/hooks/movieform.py
uyamazak/oceanus
6158cdc313a381f8228562605d33713ad4e776f1
[ "MIT" ]
null
null
null
from hook.base import BaseHook from task.gspread.tasks import send2ws class MovieformHook(BaseHook): def main(self) -> int: channel = self.item.get("channel") if channel != "movieform": return 0 data = self.item.get("data") dt = self.item.get("dt") count = 1 ...
22
44
0.48951
from hook.base import BaseHook from task.gspread.tasks import send2ws class MovieformHook(BaseHook): def main(self) -> int: channel = self.item.get("channel") if channel != "movieform": return 0 data = self.item.get("data") dt = self.item.get("dt") count = 1 ...
true
true
f72528ea404b5476c1151c85d0a3295f31a0e405
6,337
py
Python
main.py
kb1p/json-inspector
388596bf2d2eb014ab070e9fbc8a5e5d90eb00df
[ "MIT" ]
null
null
null
main.py
kb1p/json-inspector
388596bf2d2eb014ab070e9fbc8a5e5d90eb00df
[ "MIT" ]
null
null
null
main.py
kb1p/json-inspector
388596bf2d2eb014ab070e9fbc8a5e5d90eb00df
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jan 28 19:58:07 2020 @author: kb1p """ import sys import PyQt5.QtCore as Core import PyQt5.QtWidgets as Gui import PyQt5.QtGui as GuiMisc import data_models import dialogs import json class MainWindow(Gui.QMainWindow): __slots__ = "tvStructure", "tblProps", "mdlStructur...
40.107595
114
0.603125
import sys import PyQt5.QtCore as Core import PyQt5.QtWidgets as Gui import PyQt5.QtGui as GuiMisc import data_models import dialogs import json class MainWindow(Gui.QMainWindow): __slots__ = "tvStructure", "tblProps", "mdlStructure", "mdlProps", "currentFile", "config", \ "splitter", "editorDlg"...
true
true
f7252950efe183c9396feb149b40fe1dc37cdd64
10,665
py
Python
Thesis@3.9.1/Lib/site-packages/django/db/models/fields/reverse_related.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/db/models/fields/reverse_related.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/db/models/fields/reverse_related.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
""" "Rel objects" for related fields. "Rel objects" (for lack of a better name) carry information about the relation modeled by a related field and provide some utility functions. They're stored in the ``remote_field`` attribute of the field. They also act as reverse fields for the purposes of the Meta API because th...
31.27566
104
0.644069
from django.core import exceptions from django.utils.functional import cached_property from . import BLANK_CHOICE_DASH from .mixins import FieldCacheMixin class ForeignObjectRel(FieldCacheMixin): auto_created = True concrete = False editable = False is_relation = True # foreign key o...
true
true
f7252ab67d2d7b09f44add6e1853b7582a5b415f
1,646
py
Python
networks/resample2d_package/resample2d.py
ryannggy/fn-colab
2aefe81bc50ec0e52c0eb7c5bc94178fa66d6ec8
[ "Apache-2.0" ]
null
null
null
networks/resample2d_package/resample2d.py
ryannggy/fn-colab
2aefe81bc50ec0e52c0eb7c5bc94178fa66d6ec8
[ "Apache-2.0" ]
null
null
null
networks/resample2d_package/resample2d.py
ryannggy/fn-colab
2aefe81bc50ec0e52c0eb7c5bc94178fa66d6ec8
[ "Apache-2.0" ]
null
null
null
from torch.nn.modules.module import Module from torch.autograd import Function, Variable import resample2d_cuda class Resample2dFunction(Function): @staticmethod def forward(ctx, input1, input2, kernel_size=1, bilinear= True): assert input1.is_contiguous() assert input2.is_contiguous(...
32.92
91
0.634265
from torch.nn.modules.module import Module from torch.autograd import Function, Variable import resample2d_cuda class Resample2dFunction(Function): @staticmethod def forward(ctx, input1, input2, kernel_size=1, bilinear= True): assert input1.is_contiguous() assert input2.is_contiguous(...
true
true
f7252c82c5f17709b13320a16f6f349e51df4253
6,134
py
Python
cogs/permissions.py
cephox/bettermod
13750ed01095976d594a96cf12b92bed340a4a8e
[ "MIT" ]
1
2021-01-24T17:42:42.000Z
2021-01-24T17:42:42.000Z
cogs/permissions.py
cephox/bettermod
13750ed01095976d594a96cf12b92bed340a4a8e
[ "MIT" ]
null
null
null
cogs/permissions.py
cephox/bettermod
13750ed01095976d594a96cf12b92bed340a4a8e
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Optional, Union from discord.embeds import Embed from discord.ext.commands import Cog, Context, group, has_permissions from discord.member import Member from discord.role import Role from colors import Colors from log import log from permission import update_user_permi...
51.546218
118
0.584773
from datetime import datetime from typing import Optional, Union from discord.embeds import Embed from discord.ext.commands import Cog, Context, group, has_permissions from discord.member import Member from discord.role import Role from colors import Colors from log import log from permission import update_user_permi...
true
true
f7252f66bf5fa79b977b4129cd0bfdf672edf213
4,156
py
Python
dkist/net/globus/tests/test_auth.py
DKISTDC/dkist
3b97d7c0db144a717cfbe648b7402b8b8f9f2da2
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
21
2018-05-18T13:43:59.000Z
2022-03-16T21:17:39.000Z
dkist/net/globus/tests/test_auth.py
Cadair/dkist
2f4d930ea0e002db40e8ef17a79b0b4fb2e6d3f3
[ "BSD-3-Clause" ]
134
2017-12-07T16:09:24.000Z
2022-03-17T16:13:55.000Z
dkist/net/globus/tests/test_auth.py
Cadair/dkist
2f4d930ea0e002db40e8ef17a79b0b4fb2e6d3f3
[ "BSD-3-Clause" ]
4
2017-12-04T10:49:49.000Z
2022-01-10T12:20:46.000Z
import json import stat import pathlib import platform import globus_sdk import requests from dkist.net.globus.auth import (ensure_globus_authorized, get_cache_contents, get_cache_file_path, get_refresh_token_authorizer, save_auth_cache, start_loca...
33.788618
90
0.698027
import json import stat import pathlib import platform import globus_sdk import requests from dkist.net.globus.auth import (ensure_globus_authorized, get_cache_contents, get_cache_file_path, get_refresh_token_authorizer, save_auth_cache, start_loca...
true
true
f7252fa094b50021b73b758dbb88c52ca1b4bf3a
739
py
Python
src/pytuya/devices/heater.py
python-tuya/python-tuya
c1938491a04bd6285d05defef0a9918f50d8bbc9
[ "MIT" ]
10
2017-07-11T16:58:33.000Z
2021-03-15T23:19:28.000Z
src/pytuya/devices/heater.py
python-tuya/python-tuya
c1938491a04bd6285d05defef0a9918f50d8bbc9
[ "MIT" ]
3
2017-07-21T03:22:19.000Z
2018-01-04T14:02:51.000Z
src/pytuya/devices/heater.py
python-tuya/python-tuya
c1938491a04bd6285d05defef0a9918f50d8bbc9
[ "MIT" ]
null
null
null
from pytuya.devices.base import TuyaDevice class TuyaHeater(TuyaDevice): """ Represents a Tuya Heater. """ def __init__(self, id, password, local_key, region): super(TuyaHeater, self).__init__(id, password, local_key, region) def state(self): return self._last_reading.get('1', Fal...
24.633333
73
0.641407
from pytuya.devices.base import TuyaDevice class TuyaHeater(TuyaDevice): def __init__(self, id, password, local_key, region): super(TuyaHeater, self).__init__(id, password, local_key, region) def state(self): return self._last_reading.get('1', False) def is_on(self): return self....
true
true
f7252fb0603ecf1d70f00062b7fba0b9355d9f42
718
py
Python
scripts/adapter.py
Skalwalker/BreastCancerRecognition
d934948103f6cc45eae65d6e11a351f8f69b3ae0
[ "MIT" ]
null
null
null
scripts/adapter.py
Skalwalker/BreastCancerRecognition
d934948103f6cc45eae65d6e11a351f8f69b3ae0
[ "MIT" ]
null
null
null
scripts/adapter.py
Skalwalker/BreastCancerRecognition
d934948103f6cc45eae65d6e11a351f8f69b3ae0
[ "MIT" ]
1
2020-11-10T15:09:34.000Z
2020-11-10T15:09:34.000Z
import readfiles import learnAlgorithms as learn from plot import Plot as Plot class Adapter(object): def __init__(self, kernel, turnPlot, interactions): self.log("Lendo Dados") rf = readfiles.ReadFiles() self.data = rf.getData() self.labels = rf.getLabels() self.la = learn...
28.72
92
0.650418
import readfiles import learnAlgorithms as learn from plot import Plot as Plot class Adapter(object): def __init__(self, kernel, turnPlot, interactions): self.log("Lendo Dados") rf = readfiles.ReadFiles() self.data = rf.getData() self.labels = rf.getLabels() self.la = learn...
true
true
f7252fb765341c7239f0b406db114d6920488e05
216,381
py
Python
pysnmp-with-texts/Wellfleet-FRSW-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Wellfleet-FRSW-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Wellfleet-FRSW-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Wellfleet-FRSW-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-FRSW-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:40:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
156.006489
12,584
0.795407
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuild...
true
true
f7253028cdd82bf123f765e9eee0f96a6ac55fad
6,819
py
Python
src/walax/metadata.py
hazelmollusk/django-walax
60cd05483e155bdd817df60a0c9fc7922f80c500
[ "MIT" ]
null
null
null
src/walax/metadata.py
hazelmollusk/django-walax
60cd05483e155bdd817df60a0c9fc7922f80c500
[ "MIT" ]
null
null
null
src/walax/metadata.py
hazelmollusk/django-walax
60cd05483e155bdd817df60a0c9fc7922f80c500
[ "MIT" ]
null
null
null
from django.core.exceptions import PermissionDenied from django.http import Http404 from django.utils.encoding import force_str from rest_framework import exceptions, serializers from rest_framework.relations import PrimaryKeyRelatedField from rest_framework.request import clone_request from collections import Ordered...
38.308989
140
0.592169
from django.core.exceptions import PermissionDenied from django.http import Http404 from django.utils.encoding import force_str from rest_framework import exceptions, serializers from rest_framework.relations import PrimaryKeyRelatedField from rest_framework.request import clone_request from collections import Ordered...
true
true
f725309690ad014e3b8fcbe2e6561e01b841f7ec
574
py
Python
subframe/datatables.py
joshbode/subframe
af035ee75f2c9a0d11f538dd88b9491c92389b65
[ "MIT" ]
2
2015-08-24T02:19:01.000Z
2015-08-24T03:31:06.000Z
subframe/datatables.py
joshbode/subframe
af035ee75f2c9a0d11f538dd88b9491c92389b65
[ "MIT" ]
null
null
null
subframe/datatables.py
joshbode/subframe
af035ee75f2c9a0d11f538dd88b9491c92389b65
[ "MIT" ]
null
null
null
""" DataTable display. """ from .subframe import SubFrame from .plugin import plugins class DataTable(SubFrame): """Display a DataFrame as a DataTable.""" _plugins = [plugins.datatables] def _js(self, data): """Javascript callback body.""" data = data.to_records() data = self._...
22.076923
86
0.562718
from .subframe import SubFrame from .plugin import plugins class DataTable(SubFrame): _plugins = [plugins.datatables] def _js(self, data): data = data.to_records() data = self._json({ 'data': data.tolist(), 'columns': [ {'title': x} for x in self._ma...
true
true
f72530ff5351dea5d4081b0e5aac7da571510f0f
346
py
Python
setup.py
Qman11010101/blogen_neo
a56bd5e7a0622488e4f3a4dd87c6e4cf126ed2cb
[ "MIT" ]
null
null
null
setup.py
Qman11010101/blogen_neo
a56bd5e7a0622488e4f3a4dd87c6e4cf126ed2cb
[ "MIT" ]
null
null
null
setup.py
Qman11010101/blogen_neo
a56bd5e7a0622488e4f3a4dd87c6e4cf126ed2cb
[ "MIT" ]
null
null
null
from setuptools import setup setup( name="blogen_neo", version="0.0.1", description="Simple static site generator for blog", author="Kjuman Enobikto", author_email="qmanenobikto@gmail.com", install_requires=["jinja2", "fire"], entry_points={ "console_scripts": [ "blogen ...
21.625
56
0.612717
from setuptools import setup setup( name="blogen_neo", version="0.0.1", description="Simple static site generator for blog", author="Kjuman Enobikto", author_email="qmanenobikto@gmail.com", install_requires=["jinja2", "fire"], entry_points={ "console_scripts": [ "blogen ...
true
true
f7253166d60df35b6e5baa2e8773dc05e8fdf3db
4,335
py
Python
src/runners/episode_runner.py
dennismalmgren/marl
baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95
[ "Apache-2.0" ]
null
null
null
src/runners/episode_runner.py
dennismalmgren/marl
baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95
[ "Apache-2.0" ]
null
null
null
src/runners/episode_runner.py
dennismalmgren/marl
baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95
[ "Apache-2.0" ]
null
null
null
from envs import REGISTRY as env_REGISTRY from functools import partial from components.episode_buffer import EpisodeBatch import numpy as np class EpisodeRunner: def __init__(self, args, logger): self.args = args self.logger = logger self.batch_size = self.args.batch_size_run ass...
34.959677
111
0.608074
from envs import REGISTRY as env_REGISTRY from functools import partial from components.episode_buffer import EpisodeBatch import numpy as np class EpisodeRunner: def __init__(self, args, logger): self.args = args self.logger = logger self.batch_size = self.args.batch_size_run ass...
true
true
f72532605be0861ccc1b4e26456972b2f7cf7351
997
py
Python
pynsot/serializers.py
dropbox/pynsot
3a0ff2f6994860beaea147486d914fc0e7e37080
[ "Apache-2.0" ]
41
2015-01-17T02:59:44.000Z
2021-12-01T16:16:25.000Z
pynsot/serializers.py
dropbox/pynsot
3a0ff2f6994860beaea147486d914fc0e7e37080
[ "Apache-2.0" ]
88
2015-03-09T21:30:53.000Z
2021-05-21T14:58:23.000Z
pynsot/serializers.py
dropbox/pynsot
3a0ff2f6994860beaea147486d914fc0e7e37080
[ "Apache-2.0" ]
30
2015-01-17T02:59:15.000Z
2021-04-19T22:32:57.000Z
# -*- coding: utf-8 -*- """ Specialized serializers for NSoT API client. This is an example of how you would use this with the Client object, to make it return objects instead of dicts:: >>> serializer = ModelSerializer() >>> api = Client(url, serializer=serializer) >>> obj = api.sites(1).get() >>> o...
25.564103
79
0.697091
from __future__ import unicode_literals from __future__ import absolute_import from slumber.serialize import JsonSerializer from .import models __author__ = 'Jathan McCollum' __maintainer__ = 'Jathan McCollum' __email__ = 'jathan@dropbox.com' __copyright__ = 'Copyright (c) 2015-2016 Dropbox, Inc.' class ModelSe...
true
true
f72532c82404f85f49d2567399b1b9784361b2ba
779
py
Python
app/Model/Model_facedetection.py
Renanrbsc/System_Face_Recognition
45a6778e18325245bea27abe41d3a646fa09863c
[ "MIT" ]
null
null
null
app/Model/Model_facedetection.py
Renanrbsc/System_Face_Recognition
45a6778e18325245bea27abe41d3a646fa09863c
[ "MIT" ]
null
null
null
app/Model/Model_facedetection.py
Renanrbsc/System_Face_Recognition
45a6778e18325245bea27abe41d3a646fa09863c
[ "MIT" ]
null
null
null
import cv2 from app.Model.Model_cascades import Cascades class FaceDetection: def __init__(self): self.type_cascade = Cascades.FACECASCADE def get_type_cascade(self): return self.type_cascade def detection_rectangle_dimensions(self): scaleFactor = 1.3 minNeighbors = 5 ...
27.821429
68
0.640565
import cv2 from app.Model.Model_cascades import Cascades class FaceDetection: def __init__(self): self.type_cascade = Cascades.FACECASCADE def get_type_cascade(self): return self.type_cascade def detection_rectangle_dimensions(self): scaleFactor = 1.3 minNeighbors = 5 ...
true
true
f72534dd903118747d36c4ba1c73abaee618366c
825
py
Python
setup.py
elliotnunn/macresources
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
[ "MIT" ]
5
2019-09-25T01:09:07.000Z
2021-11-03T02:39:42.000Z
setup.py
elliotnunn/macresources
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
[ "MIT" ]
null
null
null
setup.py
elliotnunn/macresources
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='macresources', version='1.2', author='Elliot Nunn', author_email='elliotnunn@me.com', description='Library for working with legacy Macintosh resource forks', long_description=open('README.md').read(), long_description_content_type='text/markdown', ...
35.869565
138
0.647273
from setuptools import setup setup( name='macresources', version='1.2', author='Elliot Nunn', author_email='elliotnunn@me.com', description='Library for working with legacy Macintosh resource forks', long_description=open('README.md').read(), long_description_content_type='text/markdown', ...
true
true
f72535000dbea0756b1c0b1ca77caaa8aa396926
3,406
py
Python
main.py
chanhee0222/feed2resp
16dc7071f17af56cbf019eeabcd12a5dbd0693e7
[ "MIT" ]
null
null
null
main.py
chanhee0222/feed2resp
16dc7071f17af56cbf019eeabcd12a5dbd0693e7
[ "MIT" ]
null
null
null
main.py
chanhee0222/feed2resp
16dc7071f17af56cbf019eeabcd12a5dbd0693e7
[ "MIT" ]
null
null
null
import argparse import datetime import glob import logging import os import time import torch from logging_helper import init_logger from models import Discriminator, BartSystem from train import train from transformer_base import add_generic_args, generic_train class Config(): # data_path = './data/chatbot/' ...
28.383333
122
0.668526
import argparse import datetime import glob import logging import os import time import torch from logging_helper import init_logger from models import Discriminator, BartSystem from train import train from transformer_base import add_generic_args, generic_train class Config(): save_path = './save' ...
true
true
f7253541b69cfbfcfbec4e8411f5009f4337f8ed
6,853
py
Python
homeassistant/components/mqtt/number.py
Kiskae/core
f538e07902b5370fdf448627798444df43a32085
[ "Apache-2.0" ]
3
2021-03-31T12:56:27.000Z
2021-05-25T15:26:01.000Z
homeassistant/components/mqtt/number.py
Kiskae/core
f538e07902b5370fdf448627798444df43a32085
[ "Apache-2.0" ]
65
2018-10-14T08:59:06.000Z
2022-03-31T06:04:07.000Z
homeassistant/components/mqtt/number.py
Kiskae/core
f538e07902b5370fdf448627798444df43a32085
[ "Apache-2.0" ]
1
2021-03-29T18:56:52.000Z
2021-03-29T18:56:52.000Z
"""Configure number in a device through MQTT topic.""" import functools import logging import voluptuous as vol from homeassistant.components import number from homeassistant.components.number import ( DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, DEFAULT_STEP, NumberEntity, ) from homeassistant.const import ...
31.726852
87
0.637531
import functools import logging import voluptuous as vol from homeassistant.components import number from homeassistant.components.number import ( DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, DEFAULT_STEP, NumberEntity, ) from homeassistant.const import CONF_NAME, CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE from ho...
true
true
f72536cc54c5ab45ec1ef476582c6f686e353776
9,038
py
Python
netapp/santricity/models/v2/discovery_start_request.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
netapp/santricity/models/v2/discovery_start_request.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
netapp/santricity/models/v2/discovery_start_request.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
# coding: utf-8 """ DiscoveryStartRequest.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are...
39.295652
844
0.645829
from pprint import pformat from six import iteritems class DiscoveryStartRequest(object): def __init__(self): self.swagger_types = { 'start_ip': 'str', 'end_ip': 'str', 'use_agents': 'bool', 'connection_timeout': 'int', 'max_ports_to_u...
true
true
f72536e7634a6d0146e21e210682f4ef9a21937b
1,108
py
Python
tests/test_async_manager.py
yehonadav/qaviton_io
936c444db06d5c0a9fa75a56742c70a0deebee65
[ "Apache-2.0" ]
null
null
null
tests/test_async_manager.py
yehonadav/qaviton_io
936c444db06d5c0a9fa75a56742c70a0deebee65
[ "Apache-2.0" ]
null
null
null
tests/test_async_manager.py
yehonadav/qaviton_io
936c444db06d5c0a9fa75a56742c70a0deebee65
[ "Apache-2.0" ]
null
null
null
from time import time from requests import get from qaviton_io.async_manager import AsyncManager from tests.utils import server def test_simple_requests(): def execute_tasks(number_of_tasks: int): errors = {} rs = [] def task(): try: with server() as (host, por...
26.380952
55
0.50361
from time import time from requests import get from qaviton_io.async_manager import AsyncManager from tests.utils import server def test_simple_requests(): def execute_tasks(number_of_tasks: int): errors = {} rs = [] def task(): try: with server() as (host, por...
true
true
f72537a956b381dcd8b8b8636b46fb369b4e987b
4,514
py
Python
pymare/stats.py
tsalo/PyMARE
7eb950fb137b6221f2ea5d381ca91d16eb4b8a35
[ "MIT" ]
null
null
null
pymare/stats.py
tsalo/PyMARE
7eb950fb137b6221f2ea5d381ca91d16eb4b8a35
[ "MIT" ]
null
null
null
pymare/stats.py
tsalo/PyMARE
7eb950fb137b6221f2ea5d381ca91d16eb4b8a35
[ "MIT" ]
null
null
null
"""Miscellaneous statistical functions.""" import numpy as np import scipy.stats as ss from scipy.optimize import Bounds, minimize def weighted_least_squares(y, v, X, tau2=0.0, return_cov=False): """2-D weighted least squares. Args: y (NDArray): 2-d array of estimates (studies x parallel datasets) ...
36.699187
89
0.634692
import numpy as np import scipy.stats as ss from scipy.optimize import Bounds, minimize def weighted_least_squares(y, v, X, tau2=0.0, return_cov=False): w = 1.0 / (v + tau2) wX = np.einsum("kp,ki->ipk", X, w) cov = wX.dot(X) precision = np.linalg.pinv(cov).T pwX = np.einsum("ip...
true
true
f72538c76f49ccac9bcd5d18c35fad8c0e5bdbe6
691
py
Python
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
class Solution: def __init__(self): self.combs = [] def _backtrack(self, candidates, cur, target, k): if len(cur) == k and sum(cur) == target: self.combs.append(cur[:]) return if sum(cur) > target: return elif len(cur) < k: ...
30.043478
69
0.474674
class Solution: def __init__(self): self.combs = [] def _backtrack(self, candidates, cur, target, k): if len(cur) == k and sum(cur) == target: self.combs.append(cur[:]) return if sum(cur) > target: return elif len(cur) < k: ...
true
true
f72538f645e6c0711034952f80384b2e12169de0
1,211
py
Python
src/Aula19ex94UneDicLista.py
maberf/python
0d36f1586c5f52081c2b27d42a1d37cee13116b0
[ "MIT" ]
null
null
null
src/Aula19ex94UneDicLista.py
maberf/python
0d36f1586c5f52081c2b27d42a1d37cee13116b0
[ "MIT" ]
null
null
null
src/Aula19ex94UneDicLista.py
maberf/python
0d36f1586c5f52081c2b27d42a1d37cee13116b0
[ "MIT" ]
null
null
null
#CADASTRO DE PESSOAS em dicionário - AULA 19 EXERCÍCIO 94 #dados das pessos: nome, sexo e idade #todos os dicionários numa lista #Informar quantos cadastrados, média de idade, lista de mulheres e nomes de pessoas de idade acima da média # pessoa = dict() grupo = list() somaidades = media = 0 while True: pessoa.clea...
35.617647
107
0.630058
pessoa = dict() grupo = list() somaidades = media = 0 while True: pessoa.clear() pessoa["nome"] = str(input('Nome: ')).strip() pessoa["sexo"] = str(input('Sexo: [M/F] ')).strip().upper() pessoa["idade"] = int(input('Idade: ')) grupo.append(pessoa.copy()) cont = str(input('Continuar? [S/N]...
true
true
f72539689a05d85f216a3c81b99fb4e90b4b862f
2,147
py
Python
doc/ramonifyARA.py
kkutten1/ndregOld
7a3f5426c5a592e46cb3ed14765ed1f4f302f4a6
[ "Apache-2.0" ]
null
null
null
doc/ramonifyARA.py
kkutten1/ndregOld
7a3f5426c5a592e46cb3ed14765ed1f4f302f4a6
[ "Apache-2.0" ]
null
null
null
doc/ramonifyARA.py
kkutten1/ndregOld
7a3f5426c5a592e46cb3ed14765ed1f4f302f4a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import json from ndreg import * import ndio.ramon as ndramon import ndio.remote.neurodata as neurodata """ Here we show how to RAMONify Allen Reference Atlas data. First we download annotation ontology from Allen Brain Atlas API. It returns a JSON tree in wh...
31.115942
149
0.708896
import requests import json from ndreg import * import ndio.ramon as ndramon import ndio.remote.neurodata as neurodata """ Here we show how to RAMONify Allen Reference Atlas data. First we download annotation ontology from Allen Brain Atlas API. It returns a JSON tree in which larger parent structures are divided int...
false
true
f7253987a63d4e5b5b25935dff1c1a6614e9432f
804
py
Python
app.py
computercavemen/web-scraping-challenge
3a68fd3bd6ddfcfc3fbd033d6f1d472ab6a76a10
[ "ADSL" ]
null
null
null
app.py
computercavemen/web-scraping-challenge
3a68fd3bd6ddfcfc3fbd033d6f1d472ab6a76a10
[ "ADSL" ]
null
null
null
app.py
computercavemen/web-scraping-challenge
3a68fd3bd6ddfcfc3fbd033d6f1d472ab6a76a10
[ "ADSL" ]
null
null
null
from flask import Flask, render_template, redirect from jinja2 import Template from splinter import browser from flask_pymongo import PyMongo import scrape_mars # Create an instance of our Flask app. app = Flask(__name__) # Use flask_pymongo to set up mongo connection app.config["MONGO_URI"] = "mongodb://localhost:2...
23.647059
63
0.732587
from flask import Flask, render_template, redirect from jinja2 import Template from splinter import browser from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) mongo.db.mars_page.drop() @app.route("/") def...
true
true
f72539f2e8f0879fdd0b4a7738c5479966731504
14,082
py
Python
python/ccxt/async_support/base/exchange.py
Beaxy/ccxt
4ade917da0f202dfbe614240223ab74832a3fc0d
[ "MIT" ]
null
null
null
python/ccxt/async_support/base/exchange.py
Beaxy/ccxt
4ade917da0f202dfbe614240223ab74832a3fc0d
[ "MIT" ]
null
null
null
python/ccxt/async_support/base/exchange.py
Beaxy/ccxt
4ade917da0f202dfbe614240223ab74832a3fc0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- __version__ = '1.40.88' # ----------------------------------------------------------------------------- import asyncio import concurrent.futures import socket import certifi import aiohttp import ssl import sys i...
42.802432
355
0.619656
__version__ = '1.40.88' import asyncio import concurrent.futures import socket import certifi import aiohttp import ssl import sys import yarl from ccxt.async_support.base.throttle import throttle from ccxt.base.errors import ExchangeError from ccxt.base.errors import ExchangeNotAvailable from ccxt.base.er...
true
true
f7253a302858e90ec0abb748061c7a21bef6c41b
844
py
Python
casbin/model/assertion.py
goodrain/pycasbin
1a481ba1af7619e1cc7e83896581d14976927d80
[ "Apache-2.0" ]
null
null
null
casbin/model/assertion.py
goodrain/pycasbin
1a481ba1af7619e1cc7e83896581d14976927d80
[ "Apache-2.0" ]
null
null
null
casbin/model/assertion.py
goodrain/pycasbin
1a481ba1af7619e1cc7e83896581d14976927d80
[ "Apache-2.0" ]
null
null
null
from casbin import log class Assertion: key = "" value = "" tokens = [] policy = [] rm = None def build_role_links(self, rm): self.rm = rm count = self.value.count("_") for rule in self.policy: if count < 2: raise RuntimeError('the number o...
27.225806
95
0.520142
from casbin import log class Assertion: key = "" value = "" tokens = [] policy = [] rm = None def build_role_links(self, rm): self.rm = rm count = self.value.count("_") for rule in self.policy: if count < 2: raise RuntimeError('the number o...
true
true
f7253a8356e22c76da232f80805a7d9f35a574cc
292
py
Python
src/cli.py
nlitz88/ipmifan
0c479298d8e7e8c9cd2a439e96dc182eca4866af
[ "MIT" ]
null
null
null
src/cli.py
nlitz88/ipmifan
0c479298d8e7e8c9cd2a439e96dc182eca4866af
[ "MIT" ]
null
null
null
src/cli.py
nlitz88/ipmifan
0c479298d8e7e8c9cd2a439e96dc182eca4866af
[ "MIT" ]
null
null
null
# This file is just meant to include functions that can be called from the command line to interact with the service. # or in other words, these functions will basically make up the service. Perhaps these will actually just end up in the controller.py file. # Created this file for planning.
73
139
0.791096
true
true
f7253ad485c45ab64e6260d07fb70431869f4c85
4,179
py
Python
third_party/rust_crates/vendor/ct-logs/build.py
zhangpf/fuchsia-rs
903568f28ddf45f09157ead36d61b50322c9cf49
[ "BSD-3-Clause" ]
14
2020-10-25T05:48:36.000Z
2021-09-20T02:46:20.000Z
third_party/rust_crates/vendor/ct-logs/build.py
zhangpf/fuchsia-rs
903568f28ddf45f09157ead36d61b50322c9cf49
[ "BSD-3-Clause" ]
16
2020-09-04T19:01:11.000Z
2021-05-28T03:23:09.000Z
third_party/rust_crates/vendor/ct-logs/build.py
ZVNexus/fuchsia
c5610ad15208208c98693618a79c705af935270c
[ "BSD-3-Clause" ]
4
2020-12-28T17:04:45.000Z
2022-03-12T03:20:44.000Z
# -*- coding: utf-8 -*- import subprocess import sys import json import hashlib import time import base64 from binascii import hexlify from collections import namedtuple HEADER = """//! //! This library is automatically generated from Google's list of known CT //! logs. Don't edit it. //! //! The generation is done ...
26.96129
87
0.554439
import subprocess import sys import json import hashlib import time import base64 from binascii import hexlify from collections import namedtuple HEADER = """//! //! This library is automatically generated from Google's list of known CT //! logs. Don't edit it. //! //! The generation is done deterministically so yo...
true
true
f7253effa72e1fa6a01a0b839772bc4261a78df2
5,904
py
Python
fixture/contact.py
talareq/jenkins
6371b1faedf1990b8d1de57392dff5f57d239246
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
talareq/jenkins
6371b1faedf1990b8d1de57392dff5f57d239246
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
talareq/jenkins
6371b1faedf1990b8d1de57392dff5f57d239246
[ "Apache-2.0" ]
null
null
null
from model.formfiller import Contact import re class ContactHelper: def __init__(self, app): self.app = app def add_new_contact(self, contact): wd = self.app.wd if not len(wd.find_elements_by_name("searchstring")) > 0: self.app.open_home_page() # add mew contact ...
39.624161
148
0.646172
from model.formfiller import Contact import re class ContactHelper: def __init__(self, app): self.app = app def add_new_contact(self, contact): wd = self.app.wd if not len(wd.find_elements_by_name("searchstring")) > 0: self.app.open_home_page() wd.find_el...
true
true
f7253f2da62ae21d3ff22ab8085cb80e2d6cdb84
2,260
py
Python
ryu/app/openstate/playground/start_many_to_1_ctrl.py
Tesi-Luca-Davide/ryu
f4b74d55d594dab0938bae0656d5143e284e0846
[ "Apache-2.0" ]
null
null
null
ryu/app/openstate/playground/start_many_to_1_ctrl.py
Tesi-Luca-Davide/ryu
f4b74d55d594dab0938bae0656d5143e284e0846
[ "Apache-2.0" ]
null
null
null
ryu/app/openstate/playground/start_many_to_1_ctrl.py
Tesi-Luca-Davide/ryu
f4b74d55d594dab0938bae0656d5143e284e0846
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from mininet.net import Mininet from mininet.topo import Topo from mininet.cli import CLI from mininet.node import UserSwitch,RemoteController from mininet.term import makeTerm import os, time class MyTopo( Topo ): "Simple topology example." def __init__( self): "Create custom topo." ...
32.753623
137
0.626991
from mininet.net import Mininet from mininet.topo import Topo from mininet.cli import CLI from mininet.node import UserSwitch,RemoteController from mininet.term import makeTerm import os, time class MyTopo( Topo ): def __init__( self): Topo.__init__(self) Host1=self.addHost('h1'...
true
true
f7254068f9b6b41261cccdb04ae15cf40d62dba9
8,954
py
Python
tseries_crossval.py
Yashgh7076/CU-Thesis
59a7c6e8009395b5773b1ee47c38ca287ed6c189
[ "MIT" ]
1
2021-03-03T22:11:29.000Z
2021-03-03T22:11:29.000Z
tseries_crossval.py
Yashgh7076/CU-Thesis
59a7c6e8009395b5773b1ee47c38ca287ed6c189
[ "MIT" ]
null
null
null
tseries_crossval.py
Yashgh7076/CU-Thesis
59a7c6e8009395b5773b1ee47c38ca287ed6c189
[ "MIT" ]
null
null
null
import numpy as np import sys import os import math os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # Suppress TF info import tensorflow as tf #import matplotlib.pyplot as plt # Define constants stride = 15 #1 second @ 15 Hz sampling window = 30*15 #30 seconds window considered folder = sys.argv[1] if not os....
39.619469
189
0.615814
import numpy as np import sys import os import math os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf stride = 15 window = 30*15 folder = sys.argv[1] if not os.path.exists(folder): print("Unable to open folder containing data, check that folder exists \n") exit(0) total_files ...
true
true
f725440da7378c0c7c83b48d5b2433930ec3d062
5,063
py
Python
catalog/bindings/csw/animate_color_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/animate_color_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/animate_color_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from decimal import Decimal from typing import Dict, List, Optional, Union from bindings.csw.anim_mode_attrs_calc_mode import AnimModeAttrsCalcMode from bindings.csw.animate_color_prototype import AnimateColorPrototype from bindings.csw.fill_default_type import FillDefaultType f...
26.097938
75
0.540786
from dataclasses import dataclass, field from decimal import Decimal from typing import Dict, List, Optional, Union from bindings.csw.anim_mode_attrs_calc_mode import AnimModeAttrsCalcMode from bindings.csw.animate_color_prototype import AnimateColorPrototype from bindings.csw.fill_default_type import FillDefaultType f...
true
true
f7254419547fb3e85242fc0a78ab9478810397a4
4,518
py
Python
contrib/testgen/gen_base58_test_vectors.py
artiqox/artiqox
782d58837ec8a8a84a41f0508a71b060af7ed9fc
[ "MIT" ]
9
2018-04-01T23:21:15.000Z
2018-08-10T20:59:16.000Z
contrib/testgen/gen_base58_test_vectors.py
artiqox/artiqox
782d58837ec8a8a84a41f0508a71b060af7ed9fc
[ "MIT" ]
1
2019-06-16T00:58:29.000Z
2019-06-23T23:46:33.000Z
contrib/testgen/gen_base58_test_vectors.py
artiqox/artiqox
782d58837ec8a8a84a41f0508a71b060af7ed9fc
[ "MIT" ]
5
2018-03-27T09:26:45.000Z
2019-10-23T00:15:00.000Z
#!/usr/bin/env python # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_ve...
35.023256
97
0.615095
import os from itertools import islice from base58 import b58encode, b58decode, b58encode_chk, b58decode_chk, b58chars import random from binascii import b2a_hex PUBKEY_ADDRESS = 23 SCRIPT_ADDRESS = 82 PUBKEY_ADDRESS_TEST = 113 SCRIPT_ADDRESS_TEST = 196 PRIVKEY = 158 PRIVKEY_TEST = 241 metadata_keys = ['isPriv...
true
true
f7254560c04c87549cd65488408ce3ddfcd4bf5f
104,573
py
Python
youtube_dl/YoutubeDL.py
404NotFoundJ/ytubr
7c4aa6fd6fd6fadf1cf1942c279cd5c0ff5ae498
[ "Unlicense" ]
null
null
null
youtube_dl/YoutubeDL.py
404NotFoundJ/ytubr
7c4aa6fd6fd6fadf1cf1942c279cd5c0ff5ae498
[ "Unlicense" ]
null
null
null
youtube_dl/YoutubeDL.py
404NotFoundJ/ytubr
7c4aa6fd6fd6fadf1cf1942c279cd5c0ff5ae498
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import su...
46.14872
194
0.551653
from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import subprocess import socket import sys im...
true
true
f725461411704fbc79dc7ae2a9d1d39784ab8ad4
678
py
Python
var/spack/repos/builtin/packages/shapelib/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/shapelib/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/shapelib/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Shapelib(CMakePackage): """The Shapefile C Library provides the ability to write simple C ...
35.684211
95
0.738938
from spack import * class Shapelib(CMakePackage): homepage = "http://shapelib.maptools.org/" url = "https://github.com/OSGeo/shapelib/archive/v1.5.0.tar.gz" version('1.5.0', sha256='48de3a6a8691b0b111b909c0b908af4627635c75322b3a501c0c0885f3558cad')
true
true
f725468d7e8fa6ad83dd70dda266a65d8900285a
4,522
py
Python
tests/extension/thread_/stream_reduce_source_join/thread_stream_reduce_source_join.py
Pyverilog/veriloggen
381ac8920088d986925cf87cb838366eb48a4889
[ "Apache-2.0" ]
232
2015-09-01T16:07:48.000Z
2022-03-28T14:53:28.000Z
tests/extension/thread_/stream_reduce_source_join/thread_stream_reduce_source_join.py
Pyverilog/veriloggen
381ac8920088d986925cf87cb838366eb48a4889
[ "Apache-2.0" ]
34
2015-08-21T09:13:03.000Z
2022-03-21T23:52:44.000Z
tests/extension/thread_/stream_reduce_source_join/thread_stream_reduce_source_join.py
shtaxxx/veriloggen
381ac8920088d986925cf87cb838366eb48a4889
[ "Apache-2.0" ]
46
2015-09-24T14:39:57.000Z
2022-02-23T21:59:56.000Z
from __future__ import absolute_import from __future__ import print_function import sys import os # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import ve...
27.406061
84
0.587351
from __future__ import absolute_import from __future__ import print_function import sys import os sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import veriloggen.thread as vthread import veriloggen.type...
true
true
f72546b650f48e4a4338cf5ec715dc344a3257bd
14,857
py
Python
slack_sdk/socket_mode/aiohttp/__init__.py
jans-forks/python-slackclient
ff798cbe00ead477ce98efa8468cb2c1c99635f3
[ "MIT" ]
null
null
null
slack_sdk/socket_mode/aiohttp/__init__.py
jans-forks/python-slackclient
ff798cbe00ead477ce98efa8468cb2c1c99635f3
[ "MIT" ]
null
null
null
slack_sdk/socket_mode/aiohttp/__init__.py
jans-forks/python-slackclient
ff798cbe00ead477ce98efa8468cb2c1c99635f3
[ "MIT" ]
null
null
null
"""aiohttp based Socket Mode client * https://api.slack.com/apis/connections/socket * https://slack.dev/python-slack-sdk/socket-mode/ * https://pypi.org/project/aiohttp/ """ import asyncio import logging import time from asyncio import Future, Lock from asyncio import Queue from logging import Logger from typing impo...
43.825959
120
0.568755
import asyncio import logging import time from asyncio import Future, Lock from asyncio import Queue from logging import Logger from typing import Union, Optional, List, Callable, Awaitable import aiohttp from aiohttp import ClientWebSocketResponse, WSMessage, WSMsgType, ClientConnectionError from slack_sdk.proxy_env...
true
true
f72547daa09175d778fa9ae8f7c4bef863150db5
840
py
Python
Setup/PreRelease/setup.py
tushariyer/sit-rep
c7ff39182e78b6630922765289f6343a7f14e18a
[ "MIT" ]
null
null
null
Setup/PreRelease/setup.py
tushariyer/sit-rep
c7ff39182e78b6630922765289f6343a7f14e18a
[ "MIT" ]
null
null
null
Setup/PreRelease/setup.py
tushariyer/sit-rep
c7ff39182e78b6630922765289f6343a7f14e18a
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup long_desc = 'Licensed under the generic MIT License.\"sit-rep\" can either be downloaded from the ' \ 'Releases page on GitHub and manually added to PATH or installed via \"pip\".' version = '' with open("Setup/version.txt", "r", encoding="utf-8") as...
33.6
101
0.65
from distutils.core import setup long_desc = 'Licensed under the generic MIT License.\"sit-rep\" can either be downloaded from the ' \ 'Releases page on GitHub and manually added to PATH or installed via \"pip\".' version = '' with open("Setup/version.txt", "r", encoding="utf-8") as fh: version = fh...
true
true
f72547e17a96865f9a04a22b21403532cfa71d79
3,673
py
Python
src/tools/vis_tracking_kittimots.py
gafaua/PolyTrack
5a4b409732b9396be8271f5cba4ad426808d5af5
[ "MIT" ]
10
2021-11-07T04:25:08.000Z
2022-03-25T03:33:21.000Z
src/tools/vis_tracking_kittimots.py
gafaua/PolyTrack
5a4b409732b9396be8271f5cba4ad426808d5af5
[ "MIT" ]
null
null
null
src/tools/vis_tracking_kittimots.py
gafaua/PolyTrack
5a4b409732b9396be8271f5cba4ad426808d5af5
[ "MIT" ]
6
2021-11-03T21:27:06.000Z
2022-03-27T17:27:40.000Z
import numpy as np import cv2 import os import glob import sys from collections import defaultdict from pathlib import Path import pycocotools.mask as rletools from PIL import Image, ImageDraw import matplotlib.pyplot as plt DATA_PATH = '../../data/KITTIMOTS/' IMG_PATH = DATA_PATH + 'train/' SAVE_VIDEO = False IS_GT =...
30.865546
94
0.572829
import numpy as np import cv2 import os import glob import sys from collections import defaultdict from pathlib import Path import pycocotools.mask as rletools from PIL import Image, ImageDraw import matplotlib.pyplot as plt DATA_PATH = '../../data/KITTIMOTS/' IMG_PATH = DATA_PATH + 'train/' SAVE_VIDEO = False IS_GT =...
true
true
f7254891c728997635a95c7943f2f2e7d783a797
14,518
py
Python
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
#!/usr/bin/env python """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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...
44.533742
131
0.564403
from tinctest import logger from mpp.lib.PSQL import PSQL from mpp.models import MPPTestCase from gppylib.db import dbconn from mpp.gpdb.tests.storage.walrepl.run import StandbyRunMixin from mpp.gpdb.tests.storage import walrepl from mpp.gpdb.tests.storage.walrepl.lib.walcomm import * from mpp.gpdb.tests.storage.wa...
true
true
f7254a9efae6931fc674550384bd79222176447d
3,222
py
Python
commands/FBAutoLayoutCommands.py
zddd/chisel
7782bdde3062e15ccbdc5f617aa3a8f096b6751b
[ "MIT" ]
1
2020-03-04T20:24:33.000Z
2020-03-04T20:24:33.000Z
commands/FBAutoLayoutCommands.py
zddd/chisel
7782bdde3062e15ccbdc5f617aa3a8f096b6751b
[ "MIT" ]
null
null
null
commands/FBAutoLayoutCommands.py
zddd/chisel
7782bdde3062e15ccbdc5f617aa3a8f096b6751b
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import lldb import fblldbbase as fb import fblldbviewhelpers as viewHelpers def lldbcommands(): ret...
37.905882
178
0.724705
import lldb import fblldbbase as fb import fblldbviewhelpers as viewHelpers def lldbcommands(): return [ FBPrintAutolayoutTrace(), FBAutolayoutBorderAmbiguous(), FBAutolayoutUnborderAmbiguous(), ] class FBPrintAutolayoutTrace(fb.FBCommand): def name(self): return 'paltrace' def descri...
true
true
f7254bd8d5c655e025a0e95e3c6aac92193bfd17
658
py
Python
gans/datasets/abstract_dataset.py
tlatkowski/gans-2.0
974efc5bbcea39c0a7dec9405ba4514ada6dc39c
[ "MIT" ]
78
2019-09-25T15:09:18.000Z
2022-02-09T09:56:15.000Z
gans/datasets/abstract_dataset.py
tlatkowski/gans-2.0
974efc5bbcea39c0a7dec9405ba4514ada6dc39c
[ "MIT" ]
23
2019-10-09T21:24:39.000Z
2022-03-12T00:00:53.000Z
gans/datasets/abstract_dataset.py
tlatkowski/gans-2.0
974efc5bbcea39c0a7dec9405ba4514ada6dc39c
[ "MIT" ]
18
2020-01-24T13:13:57.000Z
2022-02-15T18:58:12.000Z
import abc from abc import abstractmethod class Dataset(abc.ABC): def __init__( self, input_params, with_labels=False, ): self.batch_size = input_params.batch_size self.buffer_size = input_params.buffer_size if with_labels: self.train_da...
22.689655
61
0.641337
import abc from abc import abstractmethod class Dataset(abc.ABC): def __init__( self, input_params, with_labels=False, ): self.batch_size = input_params.batch_size self.buffer_size = input_params.buffer_size if with_labels: self.train_da...
true
true
f7254bdd4bb068fb20e4ad809d0645054278cee9
5,620
py
Python
SimpleLoggingServerToCsvFile.py
II43/SimpleLoggingServerToCsvFile
d3d50778041a5995e58b6a8f623519e3cb41a5ce
[ "MIT" ]
null
null
null
SimpleLoggingServerToCsvFile.py
II43/SimpleLoggingServerToCsvFile
d3d50778041a5995e58b6a8f623519e3cb41a5ce
[ "MIT" ]
null
null
null
SimpleLoggingServerToCsvFile.py
II43/SimpleLoggingServerToCsvFile
d3d50778041a5995e58b6a8f623519e3cb41a5ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Simple HTTP server in Python for logging events to CSV file Motivation: Use this CSV file later for data agregation and plotting Inspired by: Very simple HTTP server in Python for logging requests https://gist.github.com/mdonkers/63e115cc0c79b4f6b8b3a6b797e485c7 Usage:: ./SimpleLoggingS...
37.972973
103
0.477224
from http.server import BaseHTTPRequestHandler, HTTPServer import logging from datetime import datetime import csv from os import curdir, sep, path from shutil import copyfile LOG_FILE = r'events.log' MASTER_KEY = "jQw5xZVq9Kp4fm7hiZko" KEYS = ["q67idhrJ56oQj7IElukH", MASTER_KEY] class S...
true
true
f7254c126abf533a0ae20a41208a5dc83bf968ca
712
py
Python
src/schctest/pypacket_dissector/decoder.py
saguilarDevel/open_schc
ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289
[ "MIT" ]
21
2018-11-05T06:48:32.000Z
2022-02-28T14:38:09.000Z
src/schctest/pypacket_dissector/decoder.py
saguilarDevel/open_schc
ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289
[ "MIT" ]
34
2019-01-28T01:32:41.000Z
2021-05-06T09:40:14.000Z
src/schctest/pypacket_dissector/decoder.py
saguilarDevel/open_schc
ac7f2a84b6120964c8fdaabf9f5c8ca8ae39c289
[ "MIT" ]
28
2018-10-31T22:21:26.000Z
2022-03-17T09:44:40.000Z
try: from _json_keys import * from _util import * from defs_L3 import dissectors_L3 except: from ._json_keys import * from ._util import * from .defs_L3 import dissectors_L3 def decoder(x): ''' return (dissectors_L3) or return { JK_EMSG:(error-message) } ''' this = None ...
22.967742
61
0.588483
try: from _json_keys import * from _util import * from defs_L3 import dissectors_L3 except: from ._json_keys import * from ._util import * from .defs_L3 import dissectors_L3 def decoder(x): this = None if len(x) < 1: return { JK_EMSG:"invalid packet length" } proto = (...
true
true
f7254c2e00bea89d99a5f93b0d09b97a572ca11a
1,521
py
Python
tests/test_stock.py
condereis/mean-variance-portfolio
526b1e86d1e92f08ceca9a7c204b043089272744
[ "MIT" ]
7
2018-08-22T19:16:33.000Z
2021-08-14T03:50:08.000Z
tests/test_stock.py
condereis/mean-variance-portfolio
526b1e86d1e92f08ceca9a7c204b043089272744
[ "MIT" ]
280
2018-07-12T20:20:20.000Z
2022-03-27T20:01:20.000Z
tests/test_stock.py
condereis/mean-variance-portfolio
526b1e86d1e92f08ceca9a7c204b043089272744
[ "MIT" ]
2
2020-04-02T02:30:42.000Z
2021-07-22T21:13:04.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `mvport` package.""" import unittest import numpy as np from mvport.stock import Stock class TestStock(unittest.TestCase): """Tests for `mvport` package.""" def setUp(self): """SetUp.""" self.ticker = 'AAPL' self.returns =...
27.654545
87
0.618014
import unittest import numpy as np from mvport.stock import Stock class TestStock(unittest.TestCase): def setUp(self): self.ticker = 'AAPL' self.returns = [-2, -1, 0, 1, 2] self.stock = Stock(self.ticker, self.returns) def test_get_ticker(self): self.assertEqual(self.st...
true
true