hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f73fddbcce476b4c2a42f611c4b0de31098afab5
6,813
py
Python
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
import os import glob import random import numpy as np import pandas as pd from imageio import mimread from skimage.color import gray2rgb from skimage import io, img_as_float32 from sklearn.model_selection import train_test_split from torch.utils.data import Dataset from data.augmentation import AllAugmen...
37.434066
113
0.587406
import os import glob import random import numpy as np import pandas as pd from imageio import mimread from skimage.color import gray2rgb from skimage import io, img_as_float32 from sklearn.model_selection import train_test_split from torch.utils.data import Dataset from data.augmentation import AllAugmen...
true
true
f73fdea2806a96141086e3b98027bcacf760724a
10,865
py
Python
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2020-11-27T06:26:27.000Z
2020-12-09T14:55:16.000Z
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
25
2021-11-24T06:24:10.000Z
2022-03-31T06:23:06.000Z
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Tests for Plex server.""" from unittest.mock import patch from plexapi.exceptions import BadRequest, NotFound import pytest from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, DOMAIN as MEDIA_PLAYER_DOMAIN, MEDIA_TYPE_EPISODE, MEDIA_TYPE_MOV...
35.740132
140
0.565393
from unittest.mock import patch from plexapi.exceptions import BadRequest, NotFound import pytest from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, DOMAIN as MEDIA_PLAYER_DOMAIN, MEDIA_TYPE_EPISODE, MEDIA_TYPE_MOVIE, MEDIA_TYPE_MUSIC, ...
true
true
f73fdf016e1364198141e7efb119e8b36958e4cb
3,597
py
Python
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
16
2021-01-08T19:35:22.000Z
2022-03-23T16:23:49.000Z
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
1
2021-01-13T04:59:56.000Z
2021-01-13T04:59:56.000Z
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
11
2021-03-18T11:27:28.000Z
2022-03-12T06:49:14.000Z
# Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.333333
88
0.71226
from connector import channel from google3.cloud.graphite.mmv2.services.google.monitoring import monitored_project_pb2 from google3.cloud.graphite.mmv2.services.google.monitoring import ( monitored_project_pb2_grpc, ) from typing import List class MonitoredProject(object): def __init__( ...
true
true
f73fdf293d06036accc139b9dae03a1dd5e73606
1,490
py
Python
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
1
2020-07-29T09:52:11.000Z
2020-07-29T09:52:11.000Z
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
1
2020-12-08T17:08:26.000Z
2020-12-08T17:08:26.000Z
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
null
null
null
import unittest from biothings_explorer.registry import Registry from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher from .utils import get_apis reg = Registry() class TestSingleHopQuery(unittest.TestCase): def test_gene2disease(self): # test <gene, related_to, disease> ...
40.27027
78
0.502685
import unittest from biothings_explorer.registry import Registry from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher from .utils import get_apis reg = Registry() class TestSingleHopQuery(unittest.TestCase): def test_gene2disease(self): seqd = SingleEdgeQueryDispatcher(...
true
true
f73fdf56364c99be4a1771fea4ed64d717302f4d
1,045
py
Python
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
7
2019-05-17T07:03:46.000Z
2020-02-19T21:35:28.000Z
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
3
2018-11-23T07:38:45.000Z
2021-10-19T01:59:23.000Z
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
null
null
null
import inspect import ast from types import FunctionType import hashlib from typing import List import astunparse from pyminifier import minification class VerfunException(Exception): pass def version_hash_for_function(fn: FunctionType) -> str: abstract_syntax_tree = ast.parse(inspect.getsource(fn)).body[0...
29.027778
87
0.755981
import inspect import ast from types import FunctionType import hashlib from typing import List import astunparse from pyminifier import minification class VerfunException(Exception): pass def version_hash_for_function(fn: FunctionType) -> str: abstract_syntax_tree = ast.parse(inspect.getsource(fn)).body[0...
true
true
f73fe00693c3969f3ee0f606832700e60f1ddf0a
704
py
Python
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
18
2016-04-22T10:05:08.000Z
2021-08-31T05:12:22.000Z
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
null
null
null
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
4
2016-06-23T15:53:15.000Z
2019-03-04T07:26:01.000Z
# Copyright 2012 OpenStack Foundation # # 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 a...
39.111111
78
0.75142
import pbr.version __version__ = pbr.version.VersionInfo('python-freezerclient').version_string()
true
true
f73fe0146f9e190d924b5b70f8ef4e13236dd55d
547
py
Python
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
323
2015-11-21T14:45:29.000Z
2022-03-16T08:54:37.000Z
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
9
2017-03-21T08:26:21.000Z
2021-08-23T06:41:17.000Z
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
148
2016-09-26T03:25:39.000Z
2022-02-06T14:43:48.000Z
from pathlib import Path from vnpy.trader.app import BaseApp from vnpy.trader.object import ( OrderData, TradeData, TickData, BarData ) from .engine import ( SpreadEngine, APP_NAME, SpreadData, LegData, SpreadStrategyTemplate, SpreadAlgoTemplate ) class SpreadTradingApp(BaseA...
17.645161
36
0.685558
from pathlib import Path from vnpy.trader.app import BaseApp from vnpy.trader.object import ( OrderData, TradeData, TickData, BarData ) from .engine import ( SpreadEngine, APP_NAME, SpreadData, LegData, SpreadStrategyTemplate, SpreadAlgoTemplate ) class SpreadTradingApp(BaseA...
true
true
f73fe18faa402050e09a10af5b9186239b95d2f3
1,488
py
Python
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-01-16T03:57:39.000Z
2019-01-16T03:57:39.000Z
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-02-10T21:00:08.000Z
2018-03-20T05:09:50.000Z
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T06:34:36.000Z
2020-11-04T06:34:36.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class ImageDecodingMeasurementPage(page_module.Page): ...
39.157895
80
0.732527
from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class ImageDecodingMeasurementPage(page_module.Page): def __init__(self, url, page_set): super(ImageDecodingMeasurementPage, self).__init__(url=url, pa...
true
true
f73fe46362923b06d73cbc0ce7112a0ef52e4907
8,754
py
Python
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
57
2016-09-01T21:55:52.000Z
2022-03-27T22:15:32.000Z
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
464
2015-03-23T18:08:28.000Z
2016-08-25T04:57:36.000Z
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
25
2017-01-24T16:23:27.000Z
2021-11-07T01:51:42.000Z
# -*- coding: utf-8 -*- from django.db import models, migrations import django.core.validators import open_humans.storage import django.utils.timezone from django.conf import settings import open_humans.models def add_member_ids(apps, *args): Member = apps.get_model('open_humans', 'Member') for member in Me...
59.958904
713
0.63194
from django.db import models, migrations import django.core.validators import open_humans.storage import django.utils.timezone from django.conf import settings import open_humans.models def add_member_ids(apps, *args): Member = apps.get_model('open_humans', 'Member') for member in Member.objects.all(): ...
true
true
f73fe474a0a3cc5510645ff8c0a767dc58f3805b
4,685
py
Python
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
2
2021-05-18T14:19:04.000Z
2022-01-07T07:17:58.000Z
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
null
null
null
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
null
null
null
from datautil.dependency import Dependency from typing import List # 计算F1值 def calc_f1(num_gold, num_pred, num_correct, eps=1e-10): f1 = (2. * num_correct) / (num_pred + num_gold + eps) return f1 def cws_from_postag_bi(deps: List[Dependency]): wds = [] one_wd = [] is_start = False end_idx = ...
31.233333
115
0.545358
from datautil.dependency import Dependency from typing import List def calc_f1(num_gold, num_pred, num_correct, eps=1e-10): f1 = (2. * num_correct) / (num_pred + num_gold + eps) return f1 def cws_from_postag_bi(deps: List[Dependency]): wds = [] one_wd = [] is_start = False end_idx = len(dep...
true
true
f73fe658dfe585983b4b4eaf3b0bd1a37f3d31ce
110
py
Python
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
1
2019-06-19T10:26:41.000Z
2019-06-19T10:26:41.000Z
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
null
null
null
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
null
null
null
import os os.system('python setup.py build') os.system('sudo python setup.py install') os.system('sudo tor')
18.333333
41
0.736364
import os os.system('python setup.py build') os.system('sudo python setup.py install') os.system('sudo tor')
true
true
f73fe7eed2cb84dff0a06a8c9956db29b0f9bb02
6,481
py
Python
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
1
2020-01-26T16:02:27.000Z
2020-01-26T16:02:27.000Z
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
null
null
null
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
2
2018-09-29T18:53:08.000Z
2020-01-26T16:02:31.000Z
from django.utils.safestring import mark_safe from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from oauth2_provider.forms import AllowForm as DotAllowForm from oauth2_provider.models import get_application_model from oauth2_provider.scopes import get_scop...
39.518293
126
0.629841
from django.utils.safestring import mark_safe from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from oauth2_provider.forms import AllowForm as DotAllowForm from oauth2_provider.models import get_application_model from oauth2_provider.scopes import get_scop...
true
true
f73fe8e8adeea99b6d3aa7a61eb570e5f6f79ac5
49,103
py
Python
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (C) 2020 NumS Development 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...
46.106103
100
0.51952
from typing import List import numpy as np from nums.core.array.blockarray import BlockArray, Block from nums.core.array import utils as array_utils from nums.core.storage.storage import ArrayGrid, StoredArray, StoredArrayS3 from nums.core.systems.systems import System, RaySystem, SerialSystem from n...
true
true
f73fe9f3a064f166ba6a0daaf865731be2818314
254
py
Python
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
3
2020-03-19T04:13:28.000Z
2020-10-11T16:55:33.000Z
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
null
null
null
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
null
null
null
''' Function: define the darknet Author: Charles ''' import torch import torch.nn as nn '''define darknet53''' class Darknet53(nn.Module): def __init__(self, **kwargs): super(Darknet53, self).__init__() '''forward''' def forward(self, x): pass
14.941176
35
0.688976
import torch import torch.nn as nn class Darknet53(nn.Module): def __init__(self, **kwargs): super(Darknet53, self).__init__() def forward(self, x): pass
true
true
f73fea5cb8c06cd2c2944d99da3b116d022c0182
3,256
py
Python
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
import pytest from time import sleep from test_003_eu_cookie_law import get_cookie_bar_buttons from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException de...
35.010753
110
0.705467
import pytest from time import sleep from test_003_eu_cookie_law import get_cookie_bar_buttons from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException de...
true
true
f73fea83170787294bab72c433b06c36d51b5482
132
py
Python
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ gutils/images/postprocessing/__init__ """ from gutils.images.postprocessing.remove_bg import RemoveBG
22
59
0.734848
from gutils.images.postprocessing.remove_bg import RemoveBG
true
true
f73feb2fe844803473b196e88a663863da6b428d
4,645
py
Python
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
import datetime import unittest from anchore_engine.db import db_locks, initialize, session_scope, Lease, db_queue from anchore_engine.subsys import logger, simplequeue from anchore_engine.subsys.logger import enable_bootstrap_logging enable_bootstrap_logging() conn_str = 'postgres+pg8000://postgres:postgres@localho...
36.289063
129
0.620667
import datetime import unittest from anchore_engine.db import db_locks, initialize, session_scope, Lease, db_queue from anchore_engine.subsys import logger, simplequeue from anchore_engine.subsys.logger import enable_bootstrap_logging enable_bootstrap_logging() conn_str = 'postgres+pg8000://postgres:postgres@localho...
true
true
f73febea52128fa90a03e88db2cc225bad808db3
697
py
Python
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from slackclient import SlackClient from .config import SLACK_TOKEN class SlackPoster: def __init__(self, token, channels): self.client = SlackClient(token) self.channels = channels def post(self, message): for ch in self.channels: ...
21.78125
52
0.602582
from slackclient import SlackClient from .config import SLACK_TOKEN class SlackPoster: def __init__(self, token, channels): self.client = SlackClient(token) self.channels = channels def post(self, message): for ch in self.channels: self.client.api_call( ...
true
true
f73feca96748aade41209582ff61131ec93fb5f2
5,604
py
Python
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
from unittest import TestCase, main from cogent3 import DNA, make_aligned_seqs, make_unaligned_seqs from cogent3.app.composable import NotCompleted from cogent3.app.translate import ( best_frame, get_code, get_fourfold_degenerate_sets, select_translatable, translate_frames, translate_seqs, ) ...
35.245283
88
0.619736
from unittest import TestCase, main from cogent3 import DNA, make_aligned_seqs, make_unaligned_seqs from cogent3.app.composable import NotCompleted from cogent3.app.translate import ( best_frame, get_code, get_fourfold_degenerate_sets, select_translatable, translate_frames, translate_seqs, ) ...
true
true
f73fee033935444d5e60c82336a5289d3dd1bcf0
53,673
py
Python
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
10
2017-04-27T19:51:38.000Z
2020-10-09T17:21:23.000Z
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
45
2017-02-07T22:52:07.000Z
2021-11-25T21:45:44.000Z
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
9
2017-01-27T00:07:33.000Z
2021-07-12T19:48:27.000Z
from django.conf import settings API_WORK_ROLE = { "id": 11, "name": "System Engineer", "hourlyRate": 100, "inactiveFlag": False, "locationIds": [ 2 ], "_info": { "lastUpdated": "2003-08-21T13:02:52Z", "updatedBy": "zAdmin" ...
26.80969
116
0.541091
from django.conf import settings API_WORK_ROLE = { "id": 11, "name": "System Engineer", "hourlyRate": 100, "inactiveFlag": False, "locationIds": [ 2 ], "_info": { "lastUpdated": "2003-08-21T13:02:52Z", "updatedBy": "zAdmin" ...
true
true
f73fee85cac322b9cad6465b237cf179f0c7ae32
2,107
py
Python
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import io from agate import fixed from agate import utils @classmethod def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=None, row_names=None, encoding='utf-8', schema_encoding='utf-8'): """ Create a new table from a fixed-width file and a CSV schema. ...
30.1
145
0.644993
import io from agate import fixed from agate import utils @classmethod def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=None, row_names=None, encoding='utf-8', schema_encoding='utf-8'): from agate.table import Table close_f = False close_schema_f = False try: ...
true
true
f73fef81be058d86402daae0cd16dc7c7f50af3b
7,572
py
Python
ros/src/vehicle/bin/kia_soul_driver.py
frk2/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
53
2018-04-18T00:10:54.000Z
2021-12-28T16:39:10.000Z
ros/src/vehicle/bin/kia_soul_driver.py
LouSample/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
14
2018-06-21T22:42:50.000Z
2019-02-17T03:31:15.000Z
ros/src/vehicle/bin/kia_soul_driver.py
LouSample/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
21
2018-06-09T07:49:42.000Z
2021-10-02T10:26:34.000Z
#!/usr/bin/python import cantools import oscc import math from opencaret_msgs.msg import CanMessage, LongitudinalTarget from std_msgs.msg import Float32, Bool from sensor_msgs.msg import JointState from util import util import rospy import os import struct from canoc.can_transceiver import CanTransceiver from util.util...
42.539326
111
0.622293
import cantools import oscc import math from opencaret_msgs.msg import CanMessage, LongitudinalTarget from std_msgs.msg import Float32, Bool from sensor_msgs.msg import JointState from util import util import rospy import os import struct from canoc.can_transceiver import CanTransceiver from util.util import SimpleTim...
true
true
f73fefc1f8b6c95ccbbcb5a06230e82ea99c2fc3
1,680
py
Python
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import print_function from threading import Thread import pytest from pex.compatibility import PY2 from pex.fetcher import URLFetcher from pex.typing import TYPE_CHECKIN...
28.965517
87
0.702381
from __future__ import print_function from threading import Thread import pytest from pex.compatibility import PY2 from pex.fetcher import URLFetcher from pex.typing import TYPE_CHECKING from pex.version import __version__ if PY2: from BaseHTTPServer import BaseHTTPRequestHandler from SocketServer import...
true
true
f73ff127bb541cd9cf566ab494452e764f8976ec
1,398
py
Python
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
# imports - standard imports import os, os.path as osp from functools import partial import sys # imports - module imports from pipupgrade.config import PATH, Settings from pipupgrade.util.imports import import_handler from pipupgrade.util.system import popen from pipupgrade.util._dict import me...
29.125
98
0.61731
import os, os.path as osp from functools import partial import sys from pipupgrade.config import PATH, Settings from pipupgrade.util.imports import import_handler from pipupgrade.util.system import popen from pipupgrade.util._dict import merge_dict from pipupgrade.util.environ import getenv...
true
true
f73ff178f6b5ca27961fbc67f5ece29a60ba7185
16,568
py
Python
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
import os import subprocess import logging import filecmp import copy import base64 import json import pykube import kubernetes_validate from kubernetes_validate.utils import ( SchemaNotFoundError, VersionNotSupportedError, InvalidSchemaError, ValidationError, ) from toscaparser.tosca_template import T...
34.373444
80
0.58281
import os import subprocess import logging import filecmp import copy import base64 import json import pykube import kubernetes_validate from kubernetes_validate.utils import ( SchemaNotFoundError, VersionNotSupportedError, InvalidSchemaError, ValidationError, ) from toscaparser.tosca_template import T...
true
true
f73ff17fc9e9b3ae8d7b4d67bab77e6dbcf50755
600
py
Python
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
1
2021-07-05T03:13:33.000Z
2021-07-05T03:13:33.000Z
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
null
null
null
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
null
null
null
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('ERRO: Por favor digite um número inteiro válido.') continue #Para jogar novamente pro while except KeyboardInterrupt: print('Usuário preferiu não digitar esse número.') return 0 else: return n def ...
17.647059
60
0.656667
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('ERRO: Por favor digite um número inteiro válido.') continue except KeyboardInterrupt: print('Usuário preferiu não digitar esse número.') return 0 else: return n def linha(tam = 42): return '-' * ...
true
true
f73ff1a85a46a5732a05ef7e2bf3f6581a2c052f
9,032
py
Python
bootstrap.py
maaeli/freesas
418cdd1b72ab650198453a06defa3a57e5c4daea
[ "MIT" ]
7
2015-06-30T13:13:43.000Z
2021-12-22T07:13:02.000Z
bootstrap.py
kif/freesas
d4e468726e1c2486814ff07871d49dfadf77e437
[ "MIT" ]
47
2015-07-20T13:15:55.000Z
2022-03-27T07:51:38.000Z
bootstrap.py
maaeli/freesas
418cdd1b72ab650198453a06defa3a57e5c4daea
[ "MIT" ]
3
2015-04-30T07:41:49.000Z
2021-08-19T00:20:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Bootstrap helps you to test scripts without installing them by patching your PYTHONPATH on the fly example: ./bootstrap.py ipython """ __authors__ = ["Frédéric-Emmanuel Picca", "Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __date__ = "0...
33.084249
122
0.608946
__authors__ = ["Frédéric-Emmanuel Picca", "Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __date__ = "09/07/2020" import sys import os import distutils.util import subprocess import logging import collections from argparse import ArgumentParser logging.basicConfig() logger = logging.ge...
true
true
f73ff227e96d209edcbe2b261c96719cd93f9049
5,283
py
Python
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
2
2020-11-04T03:08:21.000Z
2020-11-05T08:14:41.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
40.328244
80
0.718531
import textwrap from googlecloudsdk.api_lib.auth import util as auth_util from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions as c_exc from googlecloudsdk.core import log from googlecloudsdk.core.console import console_io from googlecloudsdk.core.credentials import gc...
true
true
f73ff250226ba144aa30ab88b10494424d99cc11
4,509
py
Python
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
10
2015-11-19T12:39:50.000Z
2021-02-21T20:15:29.000Z
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
109
2015-06-15T05:03:33.000Z
2018-01-14T10:18:48.000Z
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
8
2015-07-29T04:18:27.000Z
2018-11-02T17:15:40.000Z
from pywincffi.core import dist from pywincffi.dev.testutil import TestCase from pywincffi.wintypes import ( HANDLE, SECURITY_ATTRIBUTES, OVERLAPPED, FILETIME, LPWSANETWORKEVENTS, PROCESS_INFORMATION, STARTUPINFO) class TestSECURITY_ATTRIBUTES(TestCase): """ Tests for :class:`pywincffi.wintypes.SECURI...
28.18125
79
0.650033
from pywincffi.core import dist from pywincffi.dev.testutil import TestCase from pywincffi.wintypes import ( HANDLE, SECURITY_ATTRIBUTES, OVERLAPPED, FILETIME, LPWSANETWORKEVENTS, PROCESS_INFORMATION, STARTUPINFO) class TestSECURITY_ATTRIBUTES(TestCase): def test_attr_nLength(self): sa = SECURITY_...
true
true
f73ff26f8a8b6f3bf4f3b427db991101e63acfe5
11,401
py
Python
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
7
2020-04-26T09:54:05.000Z
2021-07-22T16:54:41.000Z
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
120
2018-03-27T19:14:40.000Z
2020-12-10T23:53:35.000Z
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
13
2020-06-30T16:23:36.000Z
2022-03-29T17:12:05.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
46.534694
117
0.579598
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer) class NWFlowLogScenarioTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='test_nw_flow_log_', location='eastus') @StorageAccountPreparer(name_prefix='testflowlog', location='eastus', kind='StorageV2') de...
true
true
f73ff2787731a32e5506a888d61765f67fa0936b
116
py
Python
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
null
null
null
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
1
2021-11-17T18:43:35.000Z
2021-11-18T03:48:31.000Z
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
null
null
null
from webserial.calibredb import CalibreDb from webserial.fff import FanFicFare from webserial.update import perform
29
41
0.87069
from webserial.calibredb import CalibreDb from webserial.fff import FanFicFare from webserial.update import perform
true
true
f73ff2d3d35fa47f49ca4dcc3367b37a5566239f
17,825
py
Python
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
# fmt: off import json import logging import threading import time from collections import OrderedDict from datetime import timedelta from enum import Enum from inspect import signature from pathlib import Path from typing import Any, Dict, get_type_hints import requests from ipywidgets import (HTML, Button, Checkbox...
32.826888
80
0.4731
import json import logging import threading import time from collections import OrderedDict from datetime import timedelta from enum import Enum from inspect import signature from pathlib import Path from typing import Any, Dict, get_type_hints import requests from ipywidgets import (HTML, Button, Checkbox, Dropdown...
true
true
f73ff47ae17ad9f89f6d6b31d52f5c7003ddb8dd
2,528
py
Python
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
29
2021-04-06T19:07:05.000Z
2022-03-31T03:26:17.000Z
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
6
2021-06-27T01:12:13.000Z
2022-03-31T07:48:06.000Z
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
6
2021-04-07T11:17:39.000Z
2022-02-21T11:59:04.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import os import logging import time from datetime import timedelta import pandas as pd class LogFormatter: def __i...
26.610526
71
0.634889
import os import logging import time from datetime import timedelta import pandas as pd class LogFormatter: def __init__(self): self.start_time = time.time() def format(self, record): elapsed_seconds = round(record.created - self.start_time) prefix = "%s - %s - %s" % ( ...
true
true
f73ff4a43d2b7c5506291f242eb2e8ca689cf7ee
17,097
py
Python
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # # Copyright (C) 2014-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # Giannis Ashiotis # ...
47.491667
223
0.568345
__authors__ = ["Jérôme Kieffer", "Giannis Ashiotis"] __license__ = "MIT" __date__ = "18/02/2020" __copyright__ = "2014, ESRF, Grenoble" __contact__ = "jerome.kieffer@esrf.fr" import os import logging import threading import numpy from . import ocl, pyopencl from ..ext.splitBBoxLUT import ...
true
true
f73ff4ac2c403ff353679ca934b8ea0af3897b90
14,516
py
Python
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
1
2022-03-13T03:52:22.000Z
2022-03-13T03:52:22.000Z
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
null
null
null
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import socket import re import subprocess from six import string_types from .utils import find_executable, split_host_port, data_directory_is_empty from .dcs import dcs_modules from .exceptions import ConfigParseError def data_directory_empty(data_dir): if os.path.isfile(os.path...
36.84264
115
0.580325
import os import socket import re import subprocess from six import string_types from .utils import find_executable, split_host_port, data_directory_is_empty from .dcs import dcs_modules from .exceptions import ConfigParseError def data_directory_empty(data_dir): if os.path.isfile(os.path.join(data_dir, "globa...
true
true
f73ff51dd7dacc1e5b971de43a6c1c62a50bd3a7
3,395
py
Python
pypeit/tests/test_save.py
seib2/PypeIt
18ce33aa8aa12b8ee51303ad87a723ec81e0e6f8
[ "BSD-3-Clause" ]
1
2018-12-18T21:56:23.000Z
2018-12-18T21:56:23.000Z
pypeit/tests/test_save.py
feigewang/PypeIt
4c68b38cb907345a480d7afee58200a05ecd4556
[ "BSD-3-Clause" ]
null
null
null
pypeit/tests/test_save.py
feigewang/PypeIt
4c68b38cb907345a480d7afee58200a05ecd4556
[ "BSD-3-Clause" ]
null
null
null
""" Module to run tests on arsave """ import os import numpy as np import pytest from astropy import units from astropy.io import fits from pypeit import specobjs from pypeit.core import save from pypeit.tests.tstutils import dummy_fitstbl from pypeit.spectrographs import util def data_path(filename): data_dir...
32.333333
95
0.665979
import os import numpy as np import pytest from astropy import units from astropy.io import fits from pypeit import specobjs from pypeit.core import save from pypeit.tests.tstutils import dummy_fitstbl from pypeit.spectrographs import util def data_path(filename): data_dir = os.path.join(os.path.dirname(__file...
true
true
f73ff6eb46ad65a0fd6f88ca048553ba35e04028
14,053
py
Python
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
41.824405
80
0.704334
import copy import os from perfkitbenchmarker import disk from perfkitbenchmarker import errors from perfkitbenchmarker import flag_util from perfkitbenchmarker import flags from perfkitbenchmarker import os_types from perfkitbenchmarker import providers from perfkitbenchmarker import static_virtual_mach...
true
true
f73ff7e9a1283b6c04157532fd080355889c48f0
22,438
py
Python
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
39.090592
80
0.687405
from absl import logging import gin import numpy as np import tensorflow.compat.v1 as tf from polish.ppo import ppo_loss from polish.utils import distributions from polish.utils import host_call_fn from polish.utils import tf_layers from tensorflow.contrib import tpu as contrib_tpu logging.set_verbosity...
true
true
f73ff8472fe7eb13908cf75c8c7d595633e10378
8,176
py
Python
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
2
2021-11-28T12:47:01.000Z
2021-12-04T16:58:16.000Z
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
null
null
null
#!/Users/pik/PycharmProjects/pythonProject/Ski_Jumping_Data_Base_Project/venv/bin/python """A command line tool for extracting text and images from PDF and output it to plain text, html, xml or tags.""" import argparse import logging import sys import pdfminer.high_level import pdfminer.layout logging.basicConfig() ...
41.714286
88
0.612769
import argparse import logging import sys import pdfminer.high_level import pdfminer.layout logging.basicConfig() OUTPUT_TYPES = ((".htm", "html"), (".html", "html"), (".xml", "xml"), (".tag", "tag")) def extract_text(files=[], outfile='-', no_lapar...
true
true
f73ff84c63d2ef501300fdc6457bbd79cbc1e5fd
445
py
Python
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
""" because tests are good? """ import pytorch_lightning as pl from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from simple_ac import SimpleActorCritic import gym import pandas as pd env = gym.make("CartPole-v0") # from env_catch import CatchEnv # env = CatchEnv({"simpli...
19.347826
55
0.786517
import pytorch_lightning as pl from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from simple_ac import SimpleActorCritic import gym import pandas as pd env = gym.make("CartPole-v0") model = SimpleActorCritic(env) trainer = Trainer(max_epochs=1000) trainer.fit(model) p...
true
true
f73ff860eef593279c6f7e57579b7d48fc63696b
8,302
py
Python
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
5
2020-02-13T00:24:41.000Z
2022-01-10T10:11:00.000Z
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
58
2019-04-02T02:51:02.000Z
2021-01-14T08:42:19.000Z
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
7
2019-04-02T11:42:24.000Z
2020-11-10T20:17:56.000Z
import json from unittest import mock import pytest import os from side_runner_py import main, config def test_get_side_file_list_by_glob(): assert list(main._get_side_file_list_by_glob('')) == [] def test_get_side_fixed_file_list_by_glob(tmp_path): sidefile = tmp_path / "a.json" sidefile.write_text("[]...
40.696078
107
0.669839
import json from unittest import mock import pytest import os from side_runner_py import main, config def test_get_side_file_list_by_glob(): assert list(main._get_side_file_list_by_glob('')) == [] def test_get_side_fixed_file_list_by_glob(tmp_path): sidefile = tmp_path / "a.json" sidefile.write_text("[]...
true
true
f73ffba1eb9116331834b1a2044b233651f9a22b
561
py
Python
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-18 18:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vaf_Api', '0014_auto_20170118_0335'), ] operations = [ migrations.RemoveField...
22.44
63
0.588235
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vaf_Api', '0014_auto_20170118_0335'), ] operations = [ migrations.RemoveField( model_name='team', name='manager', ...
true
true
f73ffc47a3696214056f41d2bfe7a4bed3b83b03
1,018
py
Python
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
from django.shortcuts import render from .models import Photos,Category,Location from django.http import HttpResponse, Http404 # Create your views here. def home(request): photos = Photos.objects.all() return render(request,'index.html',{"photos":photos}) def search_photo(request): if 'category' in reques...
33.933333
114
0.685658
from django.shortcuts import render from .models import Photos,Category,Location from django.http import HttpResponse, Http404 def home(request): photos = Photos.objects.all() return render(request,'index.html',{"photos":photos}) def search_photo(request): if 'category' in request.GET and request.GET["ca...
true
true
f73ffc63137040b0104f992412b17391b0c66506
3,478
py
Python
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
null
null
null
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
1
2021-03-20T13:45:33.000Z
2021-03-20T13:45:33.000Z
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
null
null
null
# ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- from .gpl import Default, STR, Container # ---------------------------------------------------------------------------- # # J-Set # ----------------...
31.618182
86
0.551754
from .gpl import Default, STR, Container class JSet(Default, STR, Container): def __init__(self, input_file=None, input_list=None): self.output = [] self.err = False if input_file or input_list: self.set_input(input_file, input_list) @property def objVar(self): return self.output def set_input(self,...
true
true
f73ffd60909764b0260a7c2c4f303c959abd4ce4
1,412
py
Python
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
18
2015-01-01T13:06:08.000Z
2021-08-05T19:30:41.000Z
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
null
null
null
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
4
2015-06-09T03:13:45.000Z
2016-08-05T17:07:34.000Z
#!/usr/bin/env python3 import sqlite3, json, time, sys, os from housepy import config, log, util def db_call(f): def wrapper(*args): connection = sqlite3.connect(os.path.abspath(os.path.join(os.path.dirname(__file__), "data.db"))) connection.row_factory = sqlite3.Row db = connection.cursor...
27.686275
105
0.614023
import sqlite3, json, time, sys, os from housepy import config, log, util def db_call(f): def wrapper(*args): connection = sqlite3.connect(os.path.abspath(os.path.join(os.path.dirname(__file__), "data.db"))) connection.row_factory = sqlite3.Row db = connection.cursor() results = f...
true
true
f73ffdba704c49d05314ad63c1453c720fb78934
1,463
py
Python
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
3
2017-10-24T20:54:24.000Z
2020-01-21T11:53:01.000Z
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
7
2015-10-24T15:21:19.000Z
2019-08-30T13:32:36.000Z
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
1
2019-08-30T12:58:25.000Z
2019-08-30T12:58:25.000Z
import queue import threading from GlobalPlayer.player import Player """ the thread module provides: * the global_queue for communication with any GlobalThread object here, dictionaries with at least an 'action' and a 'response' field * the GlobalThread class for reacting to user input via the Flask serve...
32.511111
79
0.67054
import queue import threading from GlobalPlayer.player import Player global_queue = queue.Queue() def callme(*args): global_queue.put({'action': 'stream'}) class GlobalThread(threading.Thread): player = Player(callback=callme) def run(self): while True: task = global_queue.get() ...
true
true
f73fff4f5f5c41d18966b7112df0d57effdd1293
3,986
py
Python
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
null
null
null
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2019-12-16T17:06:44.000Z
2019-12-16T17:06:44.000Z
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2020-06-15T18:29:18.000Z
2020-06-15T18:29:18.000Z
import sys import shutil from pathlib import Path from ruamel.yaml import safe_load, dump from tests.test_base import TestBase from capanno_utils.content_maps import make_tools_index from capanno_utils.helpers.get_paths import get_tool_version_dir, get_root_tools_dir, get_tool_common_dir, get_script_version_dir, get_r...
35.274336
151
0.752132
import sys import shutil from pathlib import Path from ruamel.yaml import safe_load, dump from tests.test_base import TestBase from capanno_utils.content_maps import make_tools_index from capanno_utils.helpers.get_paths import get_tool_version_dir, get_root_tools_dir, get_tool_common_dir, get_script_version_dir, get_r...
true
true
f73ffff83dac52080632e1680d626d7fb71ee280
32,806
py
Python
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
import os import tempfile from contextlib import ExitStack from typing import ( Text, NamedTuple, Tuple, Optional, List, Union, Dict, ) import typing from typing import Any, Callable, Dict, List, Optional, Text, Union import rasa.core.interpreter from rasa.shared.nlu.interpreter import Natur...
38.146512
94
0.656618
import os import tempfile from contextlib import ExitStack from typing import ( Text, NamedTuple, Tuple, Optional, List, Union, Dict, ) import typing from typing import Any, Callable, Dict, List, Optional, Text, Union import rasa.core.interpreter from rasa.shared.nlu.interpreter import Natur...
true
true
f74000964ec7e2ee8236d124b15c9446c3fbc4c0
531
py
Python
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
1
2021-12-23T18:48:14.000Z
2021-12-23T18:48:14.000Z
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
null
null
null
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
null
null
null
drc_filename = "flow/reports/sky130hd/tempsense/6_final_drc.rpt" num_lines = sum(1 for line in open(drc_filename)) if num_lines > 3: raise ValueError("DRC failed!") else: print("DRC is clean!") # LVS Bypassed # lvs_filename = "flow/reports/sky130hd/tempsense/6_final_lvs.rpt" # lvs_line = subprocess.check_ou...
24.136364
94
0.704331
drc_filename = "flow/reports/sky130hd/tempsense/6_final_drc.rpt" num_lines = sum(1 for line in open(drc_filename)) if num_lines > 3: raise ValueError("DRC failed!") else: print("DRC is clean!")
true
true
f74003a6393e04a2e42e8a4d0cd0db84280ade08
3,698
py
Python
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Oct 2 00:14:39 2020 @author: Gursewak """ import pandas as pd import re import string from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors from datetime import datetime data_path = 'data...
33.618182
100
0.63656
import pandas as pd import re import string from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors from datetime import datetime data_path = 'data.csv' df = pd.read_csv(data_path) N = 3 cost_for_two = 'approx_cost(for two people)...
true
true
f740069c92b8af659e569aa7e3090f95dc6f682d
12,251
py
Python
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
from blazingsql import DataType from Configuration import ExecutionMode from Configuration import Settings as Settings from DataBase import createSchema as cs from pynvml import nvmlInit from Runner import runTest from Utils import Execution, gpuMemory, init_context, skip_test def main(dask_client, drill, spark, dir_...
31.252551
95
0.427067
from blazingsql import DataType from Configuration import ExecutionMode from Configuration import Settings as Settings from DataBase import createSchema as cs from pynvml import nvmlInit from Runner import runTest from Utils import Execution, gpuMemory, init_context, skip_test def main(dask_client, drill, spark, dir_...
true
true
f74006d502e580ed0509bedba79b6d041ce99874
12,154
py
Python
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
31
2018-09-01T19:05:28.000Z
2021-03-16T10:17:22.000Z
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
5
2020-10-29T21:32:04.000Z
2021-09-08T00:02:26.000Z
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
18
2018-09-07T15:03:30.000Z
2021-02-27T22:55:38.000Z
""" steg - steg_img.py :author: Andrew Scott :date: 6-25-2018 """ import logging from PIL import Image as img from steg import common class IMG: """ Class for hiding binary data within select lossless image formats. Supported image formats: PNG, TIFF, BMP :param payload_path: The path of the payloa...
39.589577
100
0.570841
import logging from PIL import Image as img from steg import common class IMG: def __init__(self, payload_path=None, image_path=None): self.payload_to_hide = payload_path self.carrier_image = image_path self.file_type = None self.fg = None self.image_type = None ...
true
true
f74007067dc469deeaa4fb59816780554dd70870
4,360
py
Python
pysnmp/CISCO-DS0BUNDLE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-DS0BUNDLE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-DS0BUNDLE-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 CISCO-DS0BUNDLE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DS0BUNDLE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:38:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
103.809524
517
0.765826
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuild...
true
true
f74007e5a8acb228998aaa0209c5058b756b443e
3,569
py
Python
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
from ceres.util.ints import uint64 from ceres.consensus.constants import ConsensusConstants testnet_kwargs = { "SLOT_BLOCKS_TARGET": 32, "MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, # Must be less than half of SLOT_BLOCKS_TARGET "MAX_SUB_SLOT_BLOCKS": 128, # Must be less than half of SUB_EPOCH_BLOCKS "NUM_...
58.508197
119
0.743906
from ceres.util.ints import uint64 from ceres.consensus.constants import ConsensusConstants testnet_kwargs = { "SLOT_BLOCKS_TARGET": 32, "MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, "MAX_SUB_SLOT_BLOCKS": 128, "NUM_SPS_SUB_SLOT": 64, "SUB_SLOT_ITERS_STARTING": 2 ** 27, "DIFFICULTY_CON...
true
true
f74009464150669076bad768272b9d5c7b6fb7d6
55
py
Python
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
from board import create_dashboard create_dashboard()
13.75
34
0.854545
from board import create_dashboard create_dashboard()
true
true
f740095cf3c869b3c95d7ea3b7bcee99c7537618
1,896
py
Python
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
null
null
null
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
6
2021-02-08T20:33:56.000Z
2022-03-11T23:51:26.000Z
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
null
null
null
"""Users and pitch changes Revision ID: ff2aeab22c7b Revises: 36d7e307135b Create Date: 2019-07-01 07:38:51.291891 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'ff2aeab22c7b' down_revision = '36d7e307135b' branch_lab...
40.340426
106
0.707806
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = 'ff2aeab22c7b' down_revision = '36d7e307135b' branch_labels = None depends_on = None def upgrade(): ue)) op.create_index(op.f('ix_pitches_posted_at'), 'pitches', ['posted_at'], unique=False) op.drop_colu...
true
true
f74009d80da7855e34526a356ee15488df3b7ebe
205
py
Python
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
import hashlib input = """yzbqklnj""" def success(number): return hashlib.md5((input + str(number)).encode('utf-8')).hexdigest().startswith("000000") i = 0 while not success(i): i += 1 print(i)
17.083333
94
0.64878
import hashlib input = """yzbqklnj""" def success(number): return hashlib.md5((input + str(number)).encode('utf-8')).hexdigest().startswith("000000") i = 0 while not success(i): i += 1 print(i)
true
true
f74009feb27631c2594795b664e0e8ffb25f40fe
2,586
py
Python
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
4
2022-02-25T20:12:48.000Z
2022-02-28T12:32:20.000Z
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
1
2022-02-25T21:26:13.000Z
2022-03-01T19:58:33.000Z
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
null
null
null
import sys import types import pytest import lazy_loader as lazy def test_lazy_import_basics(): math = lazy.load("math") anything_not_real = lazy.load("anything_not_real") # Now test that accessing attributes does what it should assert math.sin(math.pi) == pytest.approx(0, 1e-6) # poor-mans pyt...
26.659794
75
0.633797
import sys import types import pytest import lazy_loader as lazy def test_lazy_import_basics(): math = lazy.load("math") anything_not_real = lazy.load("anything_not_real") assert math.sin(math.pi) == pytest.approx(0, 1e-6) try: anything_not_real.pi assert False excep...
true
true
f7400adf892122fd2223c2923b4f08817348587d
811
py
Python
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
29
2018-12-03T18:21:00.000Z
2021-02-26T16:36:52.000Z
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
null
null
null
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
5
2018-12-18T17:52:55.000Z
2020-11-04T13:25:10.000Z
"""gsoc_data_analyser URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') ...
35.26087
77
0.705302
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/', include('api.urls')), ]
true
true
f7400ae29ee806bd0ebd74dcca94052f5b05b44b
584
py
Python
graph/hist_bin.py
Weilory/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
2
2020-09-28T16:55:55.000Z
2020-09-29T14:15:48.000Z
graph/hist_bin.py
scary-monster/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
null
null
null
graph/hist_bin.py
scary-monster/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
2
2020-09-28T16:56:08.000Z
2020-09-29T14:15:47.000Z
import pandas as pd from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") path = input("please input the age.csv file path here: ") data = pd.read_csv(path) ids = data["Responder_id"] ages = data["Age"] bins = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] plt.hist(ages, bins=bins, edgecolor=...
21.62963
68
0.674658
import pandas as pd from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") path = input("please input the age.csv file path here: ") data = pd.read_csv(path) ids = data["Responder_id"] ages = data["Age"] bins = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] plt.hist(ages, bins=bins, edgecolor=...
true
true
f7400be938e198d6ed5a9986de8d6c22e81f5ebe
475
py
Python
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
2
2019-11-26T06:38:26.000Z
2021-05-31T06:28:39.000Z
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
12
2020-02-12T02:55:00.000Z
2022-02-10T08:51:26.000Z
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output app = dash.Dash() app.layout = html.Div([ dcc.Input( id='number-in', value=1, style={'fontSize': 28} ), html.H1(id='number-out') ]) @app.callback( Ou...
17.592593
43
0.637895
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output app = dash.Dash() app.layout = html.Div([ dcc.Input( id='number-in', value=1, style={'fontSize': 28} ), html.H1(id='number-out') ]) @app.callback( Ou...
true
true
f7400befd8ea0ae8bcc435ad9d985f830164c49c
416
py
Python
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
import math # Apresentação print('Programa para calcular a temperatura') print('com base na resistência apresentada por um termistor') print('do tipo NTC.') print() # Entradas resistencia = float(input('Informe a resistência apresentada pelo termistor: ')) # Processamento resultado = 1 / (298.15 ** -1 + (3950 ** -1)...
24.470588
88
0.711538
import math print('Programa para calcular a temperatura') print('com base na resistência apresentada por um termistor') print('do tipo NTC.') print() resistencia = float(input('Informe a resistência apresentada pelo termistor: ')) resultado = 1 / (298.15 ** -1 + (3950 ** -1) * math.log10(resistencia / 10000)) - 2...
true
true
f7400c18798d2cfc2eede7125c62977444a11a27
280
py
Python
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
3
2018-10-25T16:03:53.000Z
2019-06-13T15:24:41.000Z
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
from .PacketFieldType import PacketFieldType class StringFieldType(PacketFieldType): def _setTypedData(self, data): try: self._data = str(data) except Exception as e: raise ValueError("{} is not a string".format(data))
28
63
0.617857
from .PacketFieldType import PacketFieldType class StringFieldType(PacketFieldType): def _setTypedData(self, data): try: self._data = str(data) except Exception as e: raise ValueError("{} is not a string".format(data))
true
true
f7400d6b27c6ad4a0c5d94224495d8cb58f1aa23
11,286
py
Python
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
null
null
null
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
6
2019-04-16T06:55:57.000Z
2019-05-08T02:52:41.000Z
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
1
2019-04-11T15:23:04.000Z
2019-04-11T15:23:04.000Z
"""Training mechanism for VAE-GAN""" import os import time import logging import numpy as np import torch import torch.nn.functional as F from spml import ( image_util, loss_utils, ) from . import ( misc_utils, saved_model_manager, ) _LG = logging.getLogger(__name__) def _save_images(images, src_pa...
33.891892
78
0.574872
import os import time import logging import numpy as np import torch import torch.nn.functional as F from spml import ( image_util, loss_utils, ) from . import ( misc_utils, saved_model_manager, ) _LG = logging.getLogger(__name__) def _save_images(images, src_path, step, output_dir): src_name =...
true
true
f7400e1096497689b384768a0a13026ba3e25250
2,060
py
Python
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
1
2019-09-02T00:55:26.000Z
2019-09-02T00:55:26.000Z
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
1
2019-04-09T20:55:30.000Z
2019-04-09T21:30:24.000Z
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
3
2018-09-01T00:08:51.000Z
2021-11-17T01:32:14.000Z
# coding: utf-8 from __future__ import division, print_function, unicode_literals, absolute_import import os import unittest # from pymatgen.io.lammps.sets import LammpsInputSet # from pymatgen.io.lammps.output import LammpsLog from atomate.utils.testing import AtomateTest from atomate.lammps.drones import LammpsDro...
39.615385
85
0.648058
from __future__ import division, print_function, unicode_literals, absolute_import import os import unittest from atomate.utils.testing import AtomateTest from atomate.lammps.drones import LammpsDrone __author__ = 'Kiran Mathew' __email__ = 'kmathew@lbl.gov' module_dir = os.path.join(os.path.dirname(os.path.abs...
true
true
f7400f07c276656276162919923c4b90a58dab01
188
py
Python
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
1
2021-08-05T17:46:06.000Z
2021-08-05T17:46:06.000Z
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
14
2018-06-21T19:15:54.000Z
2021-04-20T16:45:00.000Z
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
2
2018-07-18T19:59:09.000Z
2020-09-28T06:11:53.000Z
from distutils.core import setup import os setup( name='leie', version='0.1dev', packages=['leie',], license='AGPLv3+', long_description=open("README.mdwn").read() )
15.666667
47
0.638298
from distutils.core import setup import os setup( name='leie', version='0.1dev', packages=['leie',], license='AGPLv3+', long_description=open("README.mdwn").read() )
true
true
f7400f4da9e378cbaf82704de60cb19ebf72329e
27,657
py
Python
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-04-03T07:23:12.000Z
2021-04-03T07:23:12.000Z
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
25
2021-02-08T14:39:48.000Z
2022-03-21T18:37:29.000Z
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
7
2018-09-13T18:04:56.000Z
2020-03-18T20:52:06.000Z
# Copyright 2013-2021 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) """This package contains directives that can be used within a package. Directives are functions that can be called inside...
37.782787
84
0.639006
import functools import os.path import re import sys from typing import List, Set import six import llnl.util.lang import llnl.util.tty.color import spack.error import spack.patch import spack.spec import spack.url import spack.variant from spack.dependency import Dependency, canonical_deptype, default_deptyp...
true
true
f7400f5dc881c090a070b7b2c2c2160548d59086
8,331
py
Python
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
""" Utility function for django-analytical. """ from copy import deepcopy from django.conf import settings from django.core.exceptions import ImproperlyConfigured HTML_COMMENT = "<!-- %(service)s disabled on internal IP " \ "address\n%(html)s\n-->" def get_required_setting(setting, value_re, invalid_m...
32.928854
95
0.60737
from copy import deepcopy from django.conf import settings from django.core.exceptions import ImproperlyConfigured HTML_COMMENT = "<!-- %(service)s disabled on internal IP " \ "address\n%(html)s\n-->" def get_required_setting(setting, value_re, invalid_msg): try: value = getattr(settings, ...
true
true
f740110ed41273d50cda3a619130373e8987e530
8,011
py
Python
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # social_capital_in_trade_networks documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
32.697959
100
0.715267
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'social_capital_in_trade_networks' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. ...
true
true
f7401188328707ae3775b9becb556fc994ce1ecb
4,570
py
Python
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
import math def is_number(n): try: float(n) except ValueError: return False return True def get_coefficient(i): coefficient = None if 'coefficient' in i: coefficient = i['coefficient'] elif 'stoichiometry' in i: coefficient = str(i['stoichiometry']) return c...
29.869281
79
0.52035
import math def is_number(n): try: float(n) except ValueError: return False return True def get_coefficient(i): coefficient = None if 'coefficient' in i: coefficient = i['coefficient'] elif 'stoichiometry' in i: coefficient = str(i['stoichiometry']) return c...
true
true
f74011ba1b011d8de526468aa0f1e2b8ddd5965e
7,314
py
Python
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
from airflow import DAG from operators.Src2S3 import GDELT2S3 from operators.stage2table import stage2table from operators.data_quality import DataQualityOperator from datetime import datetime, timedelta from airflow.operators.dummy_operator import DummyOperator from airflow.operators.bash_operator import BashOperato...
38.904255
161
0.698387
from airflow import DAG from operators.Src2S3 import GDELT2S3 from operators.stage2table import stage2table from operators.data_quality import DataQualityOperator from datetime import datetime, timedelta from airflow.operators.dummy_operator import DummyOperator from airflow.operators.bash_operator import BashOperato...
true
true
f74011bff22cf97e7d6a92540c11ef283dc04a70
5,443
py
Python
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
from flask import Blueprint, request, make_response, jsonify from sqlalchemy import and_ from sqlalchemy.orm import query from tester_web.tables import db_session from tester_web.tables.user import User, Api, Script, ApiUser, UserScript scripts = Blueprint('scripts', __name__,url_prefix='/scripts') @scripts...
43.544
130
0.63917
from flask import Blueprint, request, make_response, jsonify from sqlalchemy import and_ from sqlalchemy.orm import query from tester_web.tables import db_session from tester_web.tables.user import User, Api, Script, ApiUser, UserScript scripts = Blueprint('scripts', __name__,url_prefix='/scripts') @scripts...
true
true
f7401302e37d9bfb7bc1801dea5493a5306db2c4
3,425
py
Python
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
1
2022-03-13T01:42:00.000Z
2022-03-13T01:42:00.000Z
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
null
null
null
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
null
null
null
# Date: May 2019 # Authors: Omitted for anonymity # Affiliations: Omitted for anonymity # Contact Information: Omitted for anonymity # Original Repository: https://github.com/jfzhang95/pytorch-deeplab-xception ### Original Repo: # File : __init__.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : ...
35.677083
115
0.730219
torch.nn.parallel.data_parallel import DataParallel __all__ = [ 'CallbackContext', 'execute_replication_callbacks', 'DataParallelWithCallback', 'patch_replication_callback' ] class CallbackContext(object): pass def execute_replication_callbacks(modules): master_copy = modules[0] ...
true
true
f740165577ee972999e799eb62b7792203f65d13
57,388
py
Python
virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_firewall_policy.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/modules/network/fortios/fortios_firewall_policy.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/modules/network/fortios/fortios_firewall_policy.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-03-22T01:04:48.000Z
2020-03-22T01:04:48.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
43.213855
157
0.464871
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_firewall_policy short_descriptio...
true
true
f74016c9dba564da3a966c67d0aa323fb93b9221
124
py
Python
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
10
2018-09-02T15:31:09.000Z
2021-06-25T12:00:18.000Z
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
null
null
null
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class MeatConfig(AppConfig): name = 'meat'
15.5
39
0.782258
from __future__ import unicode_literals from django.apps import AppConfig class MeatConfig(AppConfig): name = 'meat'
true
true
f740174faa35fa0989555b6bfba5314ab0cf89d5
13,830
py
Python
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
""" PostgreSQL Plugin """ import logging import psycopg2 from psycopg2 import extensions from psycopg2 import extras from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) ARCHIVE = """SELECT CAST(COUNT(*) AS INT) AS file_count, CAST(COALESCE(SUM(CAST(archive_file ~ $r$\.ready$$r$ as IN...
45.04886
100
0.58055
import logging import psycopg2 from psycopg2 import extensions from psycopg2 import extras from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) ARCHIVE = """SELECT CAST(COUNT(*) AS INT) AS file_count, CAST(COALESCE(SUM(CAST(archive_file ~ $r$\.ready$$r$ as INT)), 0) AS INT) AS ready_co...
true
true
f740182361d1f05ca2b9be2c625ed120a4dc6ebc
17,703
py
Python
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
7
2018-10-26T10:34:04.000Z
2021-04-10T14:39:17.000Z
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
1
2018-06-05T12:14:30.000Z
2018-06-05T12:14:30.000Z
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
8
2017-11-15T17:02:53.000Z
2021-11-06T05:23:30.000Z
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Python ToolTips for Tkinter v1.0.0 # # # # Copyright 2016, PedroHenriques # # http://www.pedrojhenriques.com # # https://github.com/PedroHenriques # # # # Free to use under th...
46.464567
196
0.705191
(IndexError, ValueError) : # either widget_ref couldn't be found in self.widgets print("An error occured while trying to find the tooltip text for the hovered widget.") return(False) # and will be the direct master for the tooltip) top_master = widget_ref.winfo_toplevel() # grab the event widge...
true
true
f74018d3156ab86966dbe83a24e7d5a8fb702f12
390
py
Python
topologies/simple.py
murawaki/lexwave
d9dd7405def3e9df335c326adf51410cabf249fe
[ "BSD-2-Clause" ]
null
null
null
topologies/simple.py
murawaki/lexwave
d9dd7405def3e9df335c326adf51410cabf249fe
[ "BSD-2-Clause" ]
null
null
null
topologies/simple.py
murawaki/lexwave
d9dd7405def3e9df335c326adf51410cabf249fe
[ "BSD-2-Clause" ]
null
null
null
# simple spec = { 'scale': 1.0, 'nodes': [ 'A', 'B', 'C', 'D' ], 'distances': [ ['A', 'B', 1.5], ['A', 'C', 2.0], ['C', 'D', 2.0], ['A', 'D', 2.5], ], 'powers': { 'A': 1.0, 'B': 0.5, 'C': 4.0, 'D': 1.0, }, 'survival': 5....
17.727273
36
0.276923
spec = { 'scale': 1.0, 'nodes': [ 'A', 'B', 'C', 'D' ], 'distances': [ ['A', 'B', 1.5], ['A', 'C', 2.0], ['C', 'D', 2.0], ['A', 'D', 2.5], ], 'powers': { 'A': 1.0, 'B': 0.5, 'C': 4.0, 'D': 1.0, }, 'survival': 5.0, '...
true
true
f7401928a20a0a7f8959204c0746a334093ad1c6
12,234
py
Python
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/writesetfield.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/writesetfield.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/writesetfield.py
ralfjon/IxNetwork
c0c834fbc465af69c12fd6b7cee4628baba7fff1
[ "MIT" ]
null
null
null
# Copyright 1997 - 2018 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, p...
25.434511
128
0.709825
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class WriteSetField(Base): _SDM_NAME = 'writeSetField' def __init__(self, parent): super(WriteSetField, self).__init__(parent) @property def ArpDestinationHardwareAddress(self): return se...
true
true
f7401959cbd28c56cf672b1b547cbe391aa9ea26
2,272
py
Python
platform-tools/systrace/catapult/telemetry/telemetry/internal/actions/play.py
nbasingh5/dragons
7926c79f95b46ca1ff44617b1d8cdc633343774b
[ "MIT" ]
4
2017-12-29T03:17:40.000Z
2021-07-04T03:28:11.000Z
platform-tools/systrace/catapult/telemetry/telemetry/internal/actions/play.py
nbasingh5/dragons
7926c79f95b46ca1ff44617b1d8cdc633343774b
[ "MIT" ]
9
2017-09-10T19:49:04.000Z
2018-04-14T04:39:55.000Z
platform-tools/systrace/catapult/telemetry/telemetry/internal/actions/play.py
nbasingh5/dragons
7926c79f95b46ca1ff44617b1d8cdc633343774b
[ "MIT" ]
6
2017-12-05T07:15:08.000Z
2021-07-04T03:28:13.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A Telemetry page_action that performs the "play" action on media elements. Media elements can be specified by a selector argument. If no selector is defi...
44.54902
78
0.730194
from telemetry.core import exceptions from telemetry.internal.actions import media_action from telemetry.internal.actions import page_action from telemetry.internal.actions import utils class PlayAction(media_action.MediaAction): def __init__(self, selector=None, playing_event_timeout_in_seconds...
true
true
f7401ab214037f44c41b92fc28764ecfe2ebaf77
1,980
py
Python
.tox/scenario/lib/python2.7/site-packages/oslo_messaging/_drivers/zmq_driver/zmq_names.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
1
2021-02-17T15:30:45.000Z
2021-02-17T15:30:45.000Z
.tox/scenario/lib/python2.7/site-packages/oslo_messaging/_drivers/zmq_driver/zmq_names.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/oslo_messaging/_drivers/zmq_driver/zmq_names.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
2
2015-11-03T03:21:55.000Z
2015-12-01T08:56:14.000Z
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
28.285714
78
0.664646
from oslo_messaging._drivers.zmq_driver import zmq_async zmq = zmq_async.import_zmq() FIELD_TYPE = 'type' FIELD_FAILURE = 'failure' FIELD_REPLY = 'reply' FIELD_LOG_FAILURE = 'log_failure' FIELD_ID = 'id' FIELD_MSG_ID = 'message_id' FIELD_MSG_TYPE = 'msg_type' FIELD_REPLY_ID = 'reply_id' FIELD_TARGET = ...
true
true
f7401ad0157b9589da75fd0dd36958522776b882
2,386
py
Python
Calculator/training/dribble_exercise.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
Calculator/training/dribble_exercise.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
Calculator/training/dribble_exercise.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from pathlib import Path from math import pi from dribble_grader import DribbleGrader from rlbot.utils.game_state_util import GameState, BallState, CarState, Physics, Vector3, Rotator from rlbot.matchconfig.match_config import Team, PlayerConfig from rlbottraining.training_e...
29.45679
106
0.615256
from dataclasses import dataclass, field from pathlib import Path from math import pi from dribble_grader import DribbleGrader from rlbot.utils.game_state_util import GameState, BallState, CarState, Physics, Vector3, Rotator from rlbot.matchconfig.match_config import Team, PlayerConfig from rlbottraining.training_e...
true
true
f7401b80ba6833f45899a67ce531cba12cd25f81
7,064
py
Python
coralinedb/coralinedb.py
BOSS-Danuphan/coralinedb
23458c82528ac7ceb78c17e23163d542ad96b79a
[ "MIT" ]
null
null
null
coralinedb/coralinedb.py
BOSS-Danuphan/coralinedb
23458c82528ac7ceb78c17e23163d542ad96b79a
[ "MIT" ]
null
null
null
coralinedb/coralinedb.py
BOSS-Danuphan/coralinedb
23458c82528ac7ceb78c17e23163d542ad96b79a
[ "MIT" ]
null
null
null
""" Coraline DB Manager - This will take care of reading and saving tables to SQL database """ # import python packages import pandas as pd import time class BaseDB: """ Base class for all DB These functions must be inherited by sub-class - create_connection - show_databases -...
28.59919
97
0.56795
import pandas as pd import time class BaseDB: def __init__(self, host, username, passwd): self.host = host self.username = username self.passwd = passwd self.engines = {} def __del__(self): for en_key in self.engines: engine = self.engines[en_key] ...
true
true
f7401bf722cfe9fb53dc9fef57430501f74b5b48
3,305
py
Python
scripts/req_packages.py
mvyskoc/odroid-games
fd8d4208dc2979d993dbbc7fc31bb2ec87519281
[ "BSD-2-Clause" ]
null
null
null
scripts/req_packages.py
mvyskoc/odroid-games
fd8d4208dc2979d993dbbc7fc31bb2ec87519281
[ "BSD-2-Clause" ]
null
null
null
scripts/req_packages.py
mvyskoc/odroid-games
fd8d4208dc2979d993dbbc7fc31bb2ec87519281
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python import subprocess import os import sys import re import argparse RE_LDD_LIB=re.compile(r"\s*(.+?)(?:\s=>\s(.+?))?\s\((0x[0-9A-Fa-f]+)\)") RE_DPKG=re.compile(r"(.+?)(?::(.+?))?:\s()(.+?)") DEFAULT_EXCLUDE=[ 'linux-vdso.so', 'libc.so', 'libpthread.so', 'libdl.so', 'ld-linux-x86-6...
26.023622
75
0.588502
import subprocess import os import sys import re import argparse RE_LDD_LIB=re.compile(r"\s*(.+?)(?:\s=>\s(.+?))?\s\((0x[0-9A-Fa-f]+)\)") RE_DPKG=re.compile(r"(.+?)(?::(.+?))?:\s()(.+?)") DEFAULT_EXCLUDE=[ 'linux-vdso.so', 'libc.so', 'libpthread.so', 'libdl.so', 'ld-linux-x86-64.so', 'libm....
true
true
f7401c30fbb4e672b3b745052577d7fddb3b7ddb
355
py
Python
CAN24_AN/generate_test_cmd.py
yyuting/FastImageProcessing
c3ac272d3218cc4d30939f8219be70bc4125c4cc
[ "MIT" ]
null
null
null
CAN24_AN/generate_test_cmd.py
yyuting/FastImageProcessing
c3ac272d3218cc4d30939f8219be70bc4125c4cc
[ "MIT" ]
null
null
null
CAN24_AN/generate_test_cmd.py
yyuting/FastImageProcessing
c3ac272d3218cc4d30939f8219be70bc4125c4cc
[ "MIT" ]
null
null
null
import os import sys model_dirs_file = sys.argv[1] example_cmd_file = sys.argv[2] example_model = sys.argv[3] out_file = sys.argv[4] dirs = open(model_dirs_file).read().split('\n') cmd = open(example_cmd_file).read() str = '' for dir in dirs: new_cmd = cmd.replace(example_model, dir) str += new_cmd + '\n' ...
18.684211
47
0.678873
import os import sys model_dirs_file = sys.argv[1] example_cmd_file = sys.argv[2] example_model = sys.argv[3] out_file = sys.argv[4] dirs = open(model_dirs_file).read().split('\n') cmd = open(example_cmd_file).read() str = '' for dir in dirs: new_cmd = cmd.replace(example_model, dir) str += new_cmd + '\n' ...
true
true
f7401c5e554aa8907279fe87ac5a8e9a7716be30
494
py
Python
Instructor/migrations/0003_alter_rubric_name.py
Bwc9876/CodeReview
1142757054508aafdf57e48ea9b17af528df0ca9
[ "MIT" ]
null
null
null
Instructor/migrations/0003_alter_rubric_name.py
Bwc9876/CodeReview
1142757054508aafdf57e48ea9b17af528df0ca9
[ "MIT" ]
109
2021-10-10T02:51:39.000Z
2022-03-21T17:58:43.000Z
Instructor/migrations/0003_alter_rubric_name.py
Bwc9876/CodeReview
1142757054508aafdf57e48ea9b17af528df0ca9
[ "MIT" ]
1
2021-09-18T12:49:25.000Z
2021-09-18T12:49:25.000Z
# Generated by Django 4.0 on 2021-12-17 12:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Instructor', '0002_initial'), ] operations = [ migrations.AlterField( model_name='rubric', name='name', fie...
26
120
0.582996
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Instructor', '0002_initial'), ] operations = [ migrations.AlterField( model_name='rubric', name='name', field=models.CharField(help_text='The name the s...
true
true
f7401d00988b81bc765ee9ecd638b09f72d4f9b2
5,673
py
Python
saleor/graphql/checkout/dataloaders.py
shannenye/saleor
f6a2d35fd8ae8d614edd952cd5c58adb82e56ab2
[ "CC-BY-4.0" ]
1
2021-05-29T10:50:52.000Z
2021-05-29T10:50:52.000Z
saleor/graphql/checkout/dataloaders.py
shannenye/saleor
f6a2d35fd8ae8d614edd952cd5c58adb82e56ab2
[ "CC-BY-4.0" ]
19
2022-02-21T04:34:12.000Z
2022-03-28T04:55:08.000Z
saleor/graphql/checkout/dataloaders.py
shannenye/saleor
f6a2d35fd8ae8d614edd952cd5c58adb82e56ab2
[ "CC-BY-4.0" ]
null
null
null
from collections import defaultdict from django.db.models import F from promise import Promise from ...checkout import CheckoutLineInfo from ...checkout.models import Checkout, CheckoutLine from ..core.dataloaders import DataLoader from ..product.dataloaders import ( CollectionsByVariantIdLoader, ProductByVar...
38.856164
86
0.641636
from collections import defaultdict from django.db.models import F from promise import Promise from ...checkout import CheckoutLineInfo from ...checkout.models import Checkout, CheckoutLine from ..core.dataloaders import DataLoader from ..product.dataloaders import ( CollectionsByVariantIdLoader, ProductByVar...
true
true
f7401d1d1d3b0bb1192c078b79cc44e4cbce7cdd
7,266
py
Python
pkgcheck/messages.py
pombredanne/github.com-FFY00-pkgcheck
72e82bbdfd13c7f4350cf8307fe9fad1a3e5313c
[ "Apache-2.0" ]
4
2020-06-08T21:35:29.000Z
2020-06-09T02:01:54.000Z
pkgcheck/messages.py
pombredanne/github.com-FFY00-pkgcheck
72e82bbdfd13c7f4350cf8307fe9fad1a3e5313c
[ "Apache-2.0" ]
null
null
null
pkgcheck/messages.py
pombredanne/github.com-FFY00-pkgcheck
72e82bbdfd13c7f4350cf8307fe9fad1a3e5313c
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
28.948207
75
0.547894
import re import textwrap class _Message(object): def __init__(self, msg_id, msg_str, long_msg, default): self.msg_id = msg_id self.msg_str = msg_str if long_msg: self.long_msg = textwrap.dedent(long_msg) self.long_msg = self.long_msg.strip() ...
true
true
f7401e2c5de243047befee1e90edef26b39ddcb4
597
py
Python
students/K33402/Dubina Sergey/laboratory_works/lab3/ray_system/api/migrations/0002_application_user.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
4
2020-09-03T15:41:42.000Z
2021-12-24T15:28:20.000Z
students/K33402/Dubina Sergey/laboratory_works/lab3/ray_system/api/migrations/0002_application_user.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
48
2020-09-13T20:22:42.000Z
2021-04-30T11:13:30.000Z
students/K33402/Dubina Sergey/laboratory_works/lab3/ray_system/api/migrations/0002_application_user.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
69
2020-09-06T10:32:37.000Z
2021-11-28T18:13:17.000Z
# Generated by Django 3.1.1 on 2020-12-07 14:06 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), ('api', '0001_i...
27.136364
122
0.646566
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), ('api', '0001_initial'), ] operations = [ ...
true
true
f7401e9c5378d9c1a65971c432bd7365b3709b53
8,313
py
Python
webexteamssdk/api/webhooks.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
118
2018-09-13T18:06:34.000Z
2022-03-30T05:16:36.000Z
webexteamssdk/api/webhooks.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
88
2018-10-08T21:57:02.000Z
2022-02-26T06:33:33.000Z
webexteamssdk/api/webhooks.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
86
2018-09-10T09:42:01.000Z
2022-03-30T05:38:14.000Z
# -*- coding: utf-8 -*- """Webex Teams Webhooks API wrapper. Copyright (c) 2016-2020 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including wi...
34.6375
79
0.657284
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) from builtins import * from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( check_type, dict_from_items...
true
true
f7401f339b72c81904cabe484d881d448b5616cb
243
py
Python
satchmo/apps/product/urls/category.py
funwhilelost/satchmo
589a5d797533ea15dfde9af7f36e304092d22a94
[ "BSD-3-Clause" ]
null
null
null
satchmo/apps/product/urls/category.py
funwhilelost/satchmo
589a5d797533ea15dfde9af7f36e304092d22a94
[ "BSD-3-Clause" ]
null
null
null
satchmo/apps/product/urls/category.py
funwhilelost/satchmo
589a5d797533ea15dfde9af7f36e304092d22a94
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import * urlpatterns = patterns('product.views', (r'^(?P<parent_slugs>([-\w]+/)*)?(?P<slug>[-\w]+)/$', 'category_view', {}, 'satchmo_category'), (r'^$', 'category_index', {}, 'satchmo_category_index'), )
30.375
60
0.584362
from django.conf.urls import * urlpatterns = patterns('product.views', (r'^(?P<parent_slugs>([-\w]+/)*)?(?P<slug>[-\w]+)/$', 'category_view', {}, 'satchmo_category'), (r'^$', 'category_index', {}, 'satchmo_category_index'), )
true
true
f7401f3a90b7d337b5f2bdd451f0b32ef04bfb62
7,805
py
Python
app/contracts/views.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
app/contracts/views.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
app/contracts/views.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
from titlecase import titlecase from django.conf import settings from django.db.models import Q from django.http import HttpResponse, HttpResponseBadRequest from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from discovery.csv import get_memberships, get_membersh...
36.643192
273
0.604741
from titlecase import titlecase from django.conf import settings from django.db.models import Q from django.http import HttpResponse, HttpResponseBadRequest from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from discovery.csv import get_memberships, get_membersh...
true
true
f7402034fef36db00b5434638301139eb4e9eb78
4,849
py
Python
pgoapi/protos/POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf im...
48.009901
503
0.775211
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from...
true
true
f7402105f9ac5429b9a3e1a34609ee9734cab3c9
7,321
py
Python
django_thumbs/tests.py
rrmerugu/django-thumbs
699691e3b767af9510b3f2bea64321ff6df5444d
[ "BSD-3-Clause" ]
4
2018-08-12T21:01:38.000Z
2021-07-12T13:39:22.000Z
django_thumbs/tests.py
rrmerugu/django-thumbs
699691e3b767af9510b3f2bea64321ff6df5444d
[ "BSD-3-Clause" ]
null
null
null
django_thumbs/tests.py
rrmerugu/django-thumbs
699691e3b767af9510b3f2bea64321ff6df5444d
[ "BSD-3-Clause" ]
3
2019-03-30T19:19:01.000Z
2019-11-05T17:15:20.000Z
from django.test import TestCase from thumbs.fields import validate_size, split_original, determine_thumb, \ sting2tuple from thumbs.fields import SizeError, OriginalError import logging logger = logging.getLogger(__name__) try: from PIL import Image, ImageOps except ImportError: import Image import ...
36.788945
77
0.613168
from django.test import TestCase from thumbs.fields import validate_size, split_original, determine_thumb, \ sting2tuple from thumbs.fields import SizeError, OriginalError import logging logger = logging.getLogger(__name__) try: from PIL import Image, ImageOps except ImportError: import Image import ...
true
true
f7402167707e8e4e7b41d76b3f8b03691a0c33c9
4,837
py
Python
documentation/test_python/test_layout.py
0rganizers/m.css
298e425b3659689c777623040b6a9c93196dc265
[ "MIT" ]
null
null
null
documentation/test_python/test_layout.py
0rganizers/m.css
298e425b3659689c777623040b6a9c93196dc265
[ "MIT" ]
null
null
null
documentation/test_python/test_layout.py
0rganizers/m.css
298e425b3659689c777623040b6a9c93196dc265
[ "MIT" ]
null
null
null
# # This file is part of m.css. # # Copyright © 2017, 2018, 2019, 2020, 2021, 2022 # Vladimír Vondruš <mosra@centrum.cz> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Softwar...
46.509615
143
0.645855
import os from _search import searchdata_format_version, searchdata_filename, searchdata_filename_b85 from . import BaseTestCase class Layout(BaseTestCase): def test(self): self.run_python({ 'PROJECT_TITLE': "A project", 'PROJECT_SUBTITLE': "is cool", ...
true
true
f74021d156f4b83ec95ab5c157c869eb7958eb2b
640
py
Python
tests/modules/contrib/test_kernel.py
spxtr/bumblebee-status
45125f39af8323775aeabf809ae5ae80cfe3ccd9
[ "MIT" ]
1,089
2016-11-06T10:02:53.000Z
2022-03-26T12:53:30.000Z
tests/modules/contrib/test_kernel.py
spxtr/bumblebee-status
45125f39af8323775aeabf809ae5ae80cfe3ccd9
[ "MIT" ]
817
2016-11-05T05:42:39.000Z
2022-03-25T19:43:52.000Z
tests/modules/contrib/test_kernel.py
spxtr/bumblebee-status
45125f39af8323775aeabf809ae5ae80cfe3ccd9
[ "MIT" ]
317
2016-11-05T00:35:06.000Z
2022-03-24T13:35:03.000Z
import pytest import core.config import modules.contrib.kernel @pytest.fixture def some_kernel(): return "this-is-my-kernel" @pytest.fixture def kernel_module(): return modules.contrib.kernel.Module(config=core.config.Config([]), theme=None) def test_full_text(mocker, kernel_module): platform = mocke...
22.068966
83
0.751563
import pytest import core.config import modules.contrib.kernel @pytest.fixture def some_kernel(): return "this-is-my-kernel" @pytest.fixture def kernel_module(): return modules.contrib.kernel.Module(config=core.config.Config([]), theme=None) def test_full_text(mocker, kernel_module): platform = mocke...
true
true
f74022324b96061fef1b4f9109c43010dcae4e92
4,498
py
Python
tests/extension/thread_/stream_source_join/thread_stream_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_source_join/thread_stream_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_source_join/thread_stream_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.765432
79
0.599155
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
f74022bbebef1483634791b541f215d97a74f4eb
622
py
Python
predict_rub_salary.py
NecrOctopuS/programmer_job_analysis
ead971ed5f6eabd85c5f3d75c63c95bdc1e2c5a8
[ "MIT" ]
null
null
null
predict_rub_salary.py
NecrOctopuS/programmer_job_analysis
ead971ed5f6eabd85c5f3d75c63c95bdc1e2c5a8
[ "MIT" ]
null
null
null
predict_rub_salary.py
NecrOctopuS/programmer_job_analysis
ead971ed5f6eabd85c5f3d75c63c95bdc1e2c5a8
[ "MIT" ]
null
null
null
DOLLARS_TO_RUBLES = 65 EUROS_TO_RUBLES = 71 def predict_rub_salary(lower_salary, upper_salary, currency): if lower_salary and upper_salary: middle_salary = (lower_salary + upper_salary)/2 elif lower_salary: middle_salary = lower_salary * 1.2 elif upper_salary: middle_salary = upper...
28.272727
61
0.667203
DOLLARS_TO_RUBLES = 65 EUROS_TO_RUBLES = 71 def predict_rub_salary(lower_salary, upper_salary, currency): if lower_salary and upper_salary: middle_salary = (lower_salary + upper_salary)/2 elif lower_salary: middle_salary = lower_salary * 1.2 elif upper_salary: middle_salary = upper...
true
true
f740231ee40761657758df68c06a446b08eba023
1,309
py
Python
examples/quickstart_async.py
SGeetansh/dffml
04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
[ "MIT" ]
3
2021-03-08T18:41:21.000Z
2021-06-05T20:15:14.000Z
examples/quickstart_async.py
yashlamba/dffml
d309db8503ab3c29fcd99b96479c24b2fdd4d200
[ "MIT" ]
24
2020-05-20T23:29:57.000Z
2021-04-14T04:18:21.000Z
examples/quickstart_async.py
yashlamba/dffml
d309db8503ab3c29fcd99b96479c24b2fdd4d200
[ "MIT" ]
1
2021-04-19T23:58:26.000Z
2021-04-19T23:58:26.000Z
import asyncio from dffml import train, accuracy, predict, Features, Feature from dffml_model_scikit import LinearRegressionModel async def main(): model = LinearRegressionModel( features=Features( Feature("Years", int, 1), Feature("Expertise", int, 1), Feature("Trust"...
27.270833
70
0.5233
import asyncio from dffml import train, accuracy, predict, Features, Feature from dffml_model_scikit import LinearRegressionModel async def main(): model = LinearRegressionModel( features=Features( Feature("Years", int, 1), Feature("Expertise", int, 1), Feature("Trust"...
true
true
f740234768f31aacb6299b5af19f8682c8f84b46
2,313
py
Python
examples/hodgkinhuxley.py
yonesuke/prax
6957776b11c297d4463fba6d15cd06671dfbd45f
[ "MIT" ]
null
null
null
examples/hodgkinhuxley.py
yonesuke/prax
6957776b11c297d4463fba6d15cd06671dfbd45f
[ "MIT" ]
null
null
null
examples/hodgkinhuxley.py
yonesuke/prax
6957776b11c297d4463fba6d15cd06671dfbd45f
[ "MIT" ]
null
null
null
import jax.numpy as jnp from prax import Oscillator from jax.config import config; config.update("jax_enable_x64", True) import matplotlib.pyplot as plt class HodgkinHuxley(Oscillator): def __init__(self, input_current, C=1.0, G_Na=120.0, G_K=36.0, G_L=0.3, E_Na=50.0, E_K=-77.0, E_L=-54.4, dt=0.01, eps=10**-5): ...
30.038961
145
0.591007
import jax.numpy as jnp from prax import Oscillator from jax.config import config; config.update("jax_enable_x64", True) import matplotlib.pyplot as plt class HodgkinHuxley(Oscillator): def __init__(self, input_current, C=1.0, G_Na=120.0, G_K=36.0, G_L=0.3, E_Na=50.0, E_K=-77.0, E_L=-54.4, dt=0.01, eps=10**-5): ...
true
true