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
f742a6b635a76426f87fe1fe8f4b8896a048e5ea
4,090
py
Python
Learning/Contests/HackerEarth/ChipMonk/loader_test.py
shiva92/Contests
720bb3699f774a6ea1f99e888e0cd784e63130c8
[ "Apache-2.0" ]
null
null
null
Learning/Contests/HackerEarth/ChipMonk/loader_test.py
shiva92/Contests
720bb3699f774a6ea1f99e888e0cd784e63130c8
[ "Apache-2.0" ]
null
null
null
Learning/Contests/HackerEarth/ChipMonk/loader_test.py
shiva92/Contests
720bb3699f774a6ea1f99e888e0cd784e63130c8
[ "Apache-2.0" ]
null
null
null
__author__ = 'anonymous' import unittest import json from config_loader import ConfigLoader class LoaderTest(unittest.TestCase): def test_settings_1(self): loader = ConfigLoader('config.ini', ['production', 'staging']) expected = json.dumps('26214400') actual = loader.get('common.basic_si...
36.846847
82
0.595599
__author__ = 'anonymous' import unittest import json from config_loader import ConfigLoader class LoaderTest(unittest.TestCase): def test_settings_1(self): loader = ConfigLoader('config.ini', ['production', 'staging']) expected = json.dumps('26214400') actual = loader.get('common.basic_si...
true
true
f742a6f2f4fff160e99ef6eb243f208e29887477
460
py
Python
manage.py
pskfry/wowrecruitapi
42dba9745a44c18bc001b9d36f338ee65023a36e
[ "MIT" ]
null
null
null
manage.py
pskfry/wowrecruitapi
42dba9745a44c18bc001b9d36f338ee65023a36e
[ "MIT" ]
1
2021-06-02T00:28:16.000Z
2021-06-02T00:28:16.000Z
manage.py
pskfry/wowrecruitapi
42dba9745a44c18bc001b9d36f338ee65023a36e
[ "MIT" ]
null
null
null
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from scraper import scrape import sys from app import app, db app.config.from_object(os.environ['APP_SETTINGS']) migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) @manager.command ...
20
50
0.773913
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from scraper import scrape import sys from app import app, db app.config.from_object(os.environ['APP_SETTINGS']) migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) @manager.command ...
true
true
f742a8164b847312a5823eaaec3d534c61ba4a4e
4,684
py
Python
ts_datasets/ts_datasets/anomaly/smd.py
cnll0075/Merlion
37fb75ccb204d128fde8ad4230f7893da724cf7c
[ "BSD-3-Clause" ]
2,215
2021-09-21T18:11:36.000Z
2022-03-31T20:21:42.000Z
ts_datasets/ts_datasets/anomaly/smd.py
cnll0075/Merlion
37fb75ccb204d128fde8ad4230f7893da724cf7c
[ "BSD-3-Clause" ]
56
2021-09-22T14:45:50.000Z
2022-03-29T22:28:19.000Z
ts_datasets/ts_datasets/anomaly/smd.py
cnll0075/Merlion
37fb75ccb204d128fde8ad4230f7893da724cf7c
[ "BSD-3-Clause" ]
181
2021-09-22T09:04:22.000Z
2022-03-29T16:04:43.000Z
# # Copyright (c) 2021 salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause # import os import sys import logging import requests import tarfile import numpy as np import pandas ...
40.034188
110
0.648377
import os import sys import logging import requests import tarfile import numpy as np import pandas as pd from pathlib import Path from ts_datasets.anomaly.base import TSADBaseDataset _logger = logging.getLogger(__name__) _logger.setLevel(logging.DEBUG) _handler = logging.StreamHandler(sys.stdout) _handler.setLe...
true
true
f742a886ed3869e06ef2decc3cbd535560b94e94
4,969
py
Python
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
1
2022-02-13T12:27:40.000Z
2022-02-13T12:27:40.000Z
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
null
null
null
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/coco.py' ] evaluation = dict(interval=10, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning policy lr_config = dict( policy='step', warmup='l...
29.577381
79
0.587643
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/coco.py' ] evaluation = dict(interval=10, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config = dict( policy='step', warmup='linear', warmu...
true
true
f742a8880c6e70d762a87ce81a2c2abd67031312
348
py
Python
examples/usage_examples/dial_example.py
jha929/pyMODI
6175e6579b7fab4d26a8add852bbc8357eb8bf30
[ "MIT" ]
13
2020-05-19T02:34:05.000Z
2022-02-18T06:44:34.000Z
examples/usage_examples/dial_example.py
jha929/pyMODI
6175e6579b7fab4d26a8add852bbc8357eb8bf30
[ "MIT" ]
48
2018-08-21T07:56:35.000Z
2020-05-03T02:08:26.000Z
examples/usage_examples/dial_example.py
jha929/pyMODI
6175e6579b7fab4d26a8add852bbc8357eb8bf30
[ "MIT" ]
23
2020-05-18T06:34:54.000Z
2021-02-25T11:50:17.000Z
import modi import time """ Example script for the usage of dial module Make sure you connect 1 dial module and 1 speaker module to your network module """ if __name__ == "__main__": bundle = modi.MODI() dial = bundle.dials[0] speak = bundle.speakers[0] while True: speak.tune = 800, dial.degr...
20.470588
79
0.666667
import modi import time if __name__ == "__main__": bundle = modi.MODI() dial = bundle.dials[0] speak = bundle.speakers[0] while True: speak.tune = 800, dial.degree time.sleep(0.02)
true
true
f742a889e01c5722d8e2c7c5ce68a091278318e6
6,699
py
Python
xarmedbandits/HOO.py
christiangeissler/gradoptbenchmark
4ea7928c2184728ffc8bf018d693ed27c2f2c9f1
[ "MIT" ]
1
2019-07-03T13:56:55.000Z
2019-07-03T13:56:55.000Z
xarmedbandits/HOO.py
christiangeissler/gradoptbenchmark
4ea7928c2184728ffc8bf018d693ed27c2f2c9f1
[ "MIT" ]
null
null
null
xarmedbandits/HOO.py
christiangeissler/gradoptbenchmark
4ea7928c2184728ffc8bf018d693ed27c2f2c9f1
[ "MIT" ]
1
2020-07-02T12:09:04.000Z
2020-07-02T12:09:04.000Z
# -*- coding: utf-8 -*- from xarmedbandits import TreeNode import random import math """ This class is built around the ideas that are thoroughly explained in the paper "X-armed Bandits" by Bubeck et al., 2011. """ class HOO(object): """ The hierarchical optimistic optimization algorithm. """ ...
39.175439
117
0.616361
from xarmedbandits import TreeNode import random import math class HOO(object): def __init__(self, v1, ro, covering_generator_function): if 0 >= ro: ro = 0.001 elif ro >= 1: ro = 0.999 self.ro = ro self.v1 = v1 self.tree_coverings = cov...
true
true
f742a8a0098fcdc80e572b74fde7292eb1682458
3,041
py
Python
flexget/plugins/urlrewrite_torrentz.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
flexget/plugins/urlrewrite_torrentz.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
flexget/plugins/urlrewrite_torrentz.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import logging import re import urllib import feedparser from flexget.plugin import register_plugin, PluginWarning from flexget.entry import Entry from flexget.utils.search import torrent_availability, normalize_unicode from flexget import validator l...
35.776471
111
0.609668
from __future__ import unicode_literals, division, absolute_import import logging import re import urllib import feedparser from flexget.plugin import register_plugin, PluginWarning from flexget.entry import Entry from flexget.utils.search import torrent_availability, normalize_unicode from flexget import validator l...
true
true
f742aaab43388a7b5b65a6263e91ba03ee72084a
4,260
py
Python
demos/vst.py
peterhinch/micropython_ra8875
a61314d62d6add831f6618c857b01d1a5b7ce388
[ "MIT" ]
6
2019-08-15T11:50:20.000Z
2022-01-22T12:09:57.000Z
demos/vst.py
peterhinch/micropython_ra8875
a61314d62d6add831f6618c857b01d1a5b7ce388
[ "MIT" ]
null
null
null
demos/vst.py
peterhinch/micropython_ra8875
a61314d62d6add831f6618c857b01d1a5b7ce388
[ "MIT" ]
2
2020-04-19T13:38:52.000Z
2021-08-16T13:31:39.000Z
# vst.py Demo/test program for vertical slider class for Pyboard RA8875 GUI # Released under the MIT License (MIT). See LICENSE. # Copyright (c) 2019-2020 Peter Hinch # Updated for uasyncio V3 import uasyncio as asyncio from math import pi from micropython_ra8875.py.ugui import Screen from micropython_ra8875.py.col...
37.368421
114
0.6
import uasyncio as asyncio from math import pi from micropython_ra8875.py.ugui import Screen from micropython_ra8875.py.colors import * from micropython_ra8875.widgets.buttons import Button, ButtonList from micropython_ra8875.widgets.label import Label from micropython_ra8875.widgets.dial import Dial from micr...
true
true
f742adc89aa22962515d97de7fcea7ceefef387d
1,475
py
Python
mayan/apps/converter/apps.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
2,743
2017-12-18T07:12:30.000Z
2022-03-27T17:21:25.000Z
mayan/apps/converter/apps.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
15
2020-06-06T00:00:48.000Z
2022-03-12T00:03:54.000Z
mayan/apps/converter/apps.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
257
2017-12-18T03:12:58.000Z
2022-03-25T08:59:10.000Z
from __future__ import unicode_literals from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from common import MayanAppConfig, menu_object, menu_sidebar from navigation import SourceColumn from .links import ( link_transformation_create, link_transformation_delet...
29.5
80
0.665763
from __future__ import unicode_literals from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from common import MayanAppConfig, menu_object, menu_sidebar from navigation import SourceColumn from .links import ( link_transformation_create, link_transformation_delet...
true
true
f742aebd31e1769400984a7e9498009dc9a956c0
2,167
py
Python
backend/api/ocr/text/keras_detect.py
asa008/nhyai
d97f8a4d18e315dcbd1159c2ed03611adb76ba70
[ "Apache-2.0" ]
3
2021-02-12T11:49:50.000Z
2022-03-07T02:05:54.000Z
backend/api/ocr/text/keras_detect.py
ettingshausen/nhyai
33be2078cf2835d85fedc901d343568e79a5941f
[ "Apache-2.0" ]
null
null
null
backend/api/ocr/text/keras_detect.py
ettingshausen/nhyai
33be2078cf2835d85fedc901d343568e79a5941f
[ "Apache-2.0" ]
3
2020-04-24T05:39:30.000Z
2021-08-16T03:23:29.000Z
""" YOLO_v3 Model Defined in Keras. Reference: https://github.com/qqwweee/keras-yolo3.git """ from config import kerasTextModel,IMGSIZE,keras_anchors,class_names,GPU,GPUID from .keras_yolo3 import yolo_text,box_layer,K from apphelper.image import resize_im,letterbox_image from PIL import Image import numpy as np impor...
30.097222
87
0.623904
from config import kerasTextModel,IMGSIZE,keras_anchors,class_names,GPU,GPUID from .keras_yolo3 import yolo_text,box_layer,K from apphelper.image import resize_im,letterbox_image from PIL import Image import numpy as np import tensorflow as tf graph = tf.get_default_graph()at(x) for x in keras_anchors.split(',')] anch...
true
true
f742af90db665ef1dbe10a4988b1ec91b7f78a5a
421
py
Python
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
src/discsocket/utils/__init__.py
murillotadeo/discsocket
63d71e7623cf364c19398f00305816623ebc4a41
[ "MIT" ]
null
null
null
from .cdn import return_cdn_avatar # Set interaction opcodes DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 RESUME = 6 RECONNECT = 7 INVALID_SESSION = 9 HELLO = 10 HEARTBEAT_ACK = 11 # Set application command types SLASH = 2 USER = 2 MESSAGE = 3 # Set message response types CHANNEL_WITH_SOURCE = 4 DEFERRED_CHANNEL_WITH_SOU...
16.84
34
0.769596
from .cdn import return_cdn_avatar DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 RESUME = 6 RECONNECT = 7 INVALID_SESSION = 9 HELLO = 10 HEARTBEAT_ACK = 11 SLASH = 2 USER = 2 MESSAGE = 3 CHANNEL_WITH_SOURCE = 4 DEFERRED_CHANNEL_WITH_SOURCE = 5 DEFERRED_UPDATE_MESSAGE = 6 UPDATE_MESSAGE = 7 AUTOCOMPLETE_RESULT = 8 __ve...
true
true
f742afa62f1ea6e852c404f2e5887b2cb5ce2c79
382
py
Python
streamlit/components/sidebar.py
teresaromero/palmer-penguins
79c3279775d239ed2528ea22f8f6cb92600bd49e
[ "MIT" ]
null
null
null
streamlit/components/sidebar.py
teresaromero/palmer-penguins
79c3279775d239ed2528ea22f8f6cb92600bd49e
[ "MIT" ]
21
2021-07-24T11:17:18.000Z
2021-08-18T15:37:00.000Z
streamlit/components/sidebar.py
teresaromero/palmer-penguins
79c3279775d239ed2528ea22f8f6cb92600bd49e
[ "MIT" ]
null
null
null
import streamlit as st from utils.constants import NAVIGATION, NAV_VIZ from pages.data_visualization import sidebar_filter def navbar(): st.subheader("Navigation") st.radio("Go to...", options=NAVIGATION, key="page") def show_sidebar(): sidebar = st.sidebar with sidebar: navbar() if s...
23.875
56
0.685864
import streamlit as st from utils.constants import NAVIGATION, NAV_VIZ from pages.data_visualization import sidebar_filter def navbar(): st.subheader("Navigation") st.radio("Go to...", options=NAVIGATION, key="page") def show_sidebar(): sidebar = st.sidebar with sidebar: navbar() if s...
true
true
f742afee3266519b14f56895d84d8edf84e2747c
11,503
py
Python
torch_resizer.py
eyalnaor/DeepTemporalSR
7d8c821431dec3a4c480550c61a6033fcac5e640
[ "MIT" ]
38
2020-09-04T10:53:50.000Z
2021-08-29T13:10:41.000Z
torch_resizer.py
eyalnaor/DeepTemporalSR
7d8c821431dec3a4c480550c61a6033fcac5e640
[ "MIT" ]
1
2021-02-24T17:20:58.000Z
2021-02-24T17:20:58.000Z
torch_resizer.py
eyalnaor/DeepTemporalSR
7d8c821431dec3a4c480550c61a6033fcac5e640
[ "MIT" ]
7
2020-12-03T12:11:49.000Z
2021-08-16T14:43:28.000Z
''' Code courtesy of Ben Feinstein & Assaf Shocher Please see their work: https://github.com/assafshocher/PyTorch-Resizer https://github.com/feinsteinben ''' import numpy as np import torch from math import pi from torch import nn class Resizer(nn.Module): def __init__(self, in_shape, scale_factor=None, output_sh...
56.387255
153
0.666783
import numpy as np import torch from math import pi from torch import nn class Resizer(nn.Module): def __init__(self, in_shape, scale_factor=None, output_shape=None, kernel=None, antialiasing=True, device=None, dtype=None): super(Resizer, self).__init__() scale_factor, output_shape = self...
true
true
f742b256a780ffe56e28ed045c2389437256069e
1,482
py
Python
train.py
guopeiming/crosslingual-DepPar
2d9db02de545bf8920069a20c322498a436a970a
[ "Apache-2.0" ]
2
2022-03-04T14:47:58.000Z
2022-03-14T03:33:10.000Z
train.py
guopeiming/crosslingual-DepPar
2d9db02de545bf8920069a20c322498a436a970a
[ "Apache-2.0" ]
null
null
null
train.py
guopeiming/crosslingual-DepPar
2d9db02de545bf8920069a20c322498a436a970a
[ "Apache-2.0" ]
null
null
null
""" The debug wrapper script. """ import argparse import os import sys _ARG_PARSER = argparse.ArgumentParser(description="我的实验,需要指定配置文件") _ARG_PARSER.add_argument('--cuda', '-c', type=str, default='0', help='gpu ids, like: 1,2,3') _ARG_PARSER.add_argument('--name', '-n', type=str, default='debug', help='save name.') ...
27.444444
114
0.709852
import argparse import os import sys _ARG_PARSER = argparse.ArgumentParser(description="我的实验,需要指定配置文件") _ARG_PARSER.add_argument('--cuda', '-c', type=str, default='0', help='gpu ids, like: 1,2,3') _ARG_PARSER.add_argument('--name', '-n', type=str, default='debug', help='save name.') _ARG_PARSER.add_argument('--debug'...
true
true
f742b266f0216111034fbf4002af35be2b91a59c
414
py
Python
examples/termination/n_gen.py
SunTzunami/pymoo-doc
f82d8908fe60792d49a7684c4bfba4a6c1339daf
[ "Apache-2.0" ]
2
2021-09-11T06:43:49.000Z
2021-11-10T13:36:09.000Z
examples/termination/n_gen.py
SunTzunami/pymoo-doc
f82d8908fe60792d49a7684c4bfba4a6c1339daf
[ "Apache-2.0" ]
3
2021-09-21T14:04:47.000Z
2022-03-07T13:46:09.000Z
examples/termination/n_gen.py
SunTzunami/pymoo-doc
f82d8908fe60792d49a7684c4bfba4a6c1339daf
[ "Apache-2.0" ]
3
2021-10-09T02:47:26.000Z
2022-02-10T07:02:37.000Z
from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.factory import get_problem, get_termination from pymoo.optimize import minimize problem = get_problem("zdt3") algorithm = NSGA2(pop_size=100) termination = get_termination("n_gen", 10) res = minimize(problem, algorithm, termination,...
29.571429
54
0.657005
from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.factory import get_problem, get_termination from pymoo.optimize import minimize problem = get_problem("zdt3") algorithm = NSGA2(pop_size=100) termination = get_termination("n_gen", 10) res = minimize(problem, algorithm, termination,...
true
true
f742b2d3bbcf1081015ebcba7492dc70601633b4
348
py
Python
examples/example1.py
jayvdb/pubdns
bc6f70d2954a1841a2ae4d5b6235390300f89f3d
[ "MIT" ]
38
2017-12-15T02:23:11.000Z
2022-02-27T04:54:13.000Z
examples/example1.py
jayvdb/pubdns
bc6f70d2954a1841a2ae4d5b6235390300f89f3d
[ "MIT" ]
1
2020-08-29T07:32:34.000Z
2020-09-01T13:23:28.000Z
examples/example1.py
jayvdb/pubdns
bc6f70d2954a1841a2ae4d5b6235390300f89f3d
[ "MIT" ]
4
2017-12-21T23:26:49.000Z
2020-08-29T07:08:45.000Z
from __future__ import print_function import sys import logging import pubdns logging.basicConfig(level=logging.DEBUG) try: pd = pubdns.pubdns() servers = pd.servers('US', 'los angeles') rs = pubdns.dns.resolver(servers, 'amazon.com', ['A']) for r in rs: print(r) except pubdns.UpdateError as ...
21.75
58
0.689655
from __future__ import print_function import sys import logging import pubdns logging.basicConfig(level=logging.DEBUG) try: pd = pubdns.pubdns() servers = pd.servers('US', 'los angeles') rs = pubdns.dns.resolver(servers, 'amazon.com', ['A']) for r in rs: print(r) except pubdns.UpdateError as ...
true
true
f742b54201d7d5e529a50ea6fdcae6fe8d7b71d7
7,971
py
Python
salt/utils/process.py
mscherer/salt
71bba6c676dde3ca762181cd45b45688ea9e0835
[ "Apache-2.0" ]
null
null
null
salt/utils/process.py
mscherer/salt
71bba6c676dde3ca762181cd45b45688ea9e0835
[ "Apache-2.0" ]
null
null
null
salt/utils/process.py
mscherer/salt
71bba6c676dde3ca762181cd45b45688ea9e0835
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import logging import os import time import sys import multiprocessing import signal # Import salt libs import salt.defaults.exitcodes import salt.utils import salt.ext.six as six log = logging.getLogger(__name__) HAS_PSUTIL = Fals...
30.776062
99
0.555012
from __future__ import absolute_import import logging import os import time import sys import multiprocessing import signal import salt.defaults.exitcodes import salt.utils import salt.ext.six as six log = logging.getLogger(__name__) HAS_PSUTIL = False try: import psutil HAS_PSUTIL = True except ImportE...
true
true
f742b59f5f547febc50fc6397d8808d77842c995
21,762
py
Python
core/dbt/exceptions.py
pushpay/dbt
8b96de893af692bd77fe9eb9a8104317be7b5413
[ "Apache-2.0" ]
null
null
null
core/dbt/exceptions.py
pushpay/dbt
8b96de893af692bd77fe9eb9a8104317be7b5413
[ "Apache-2.0" ]
null
null
null
core/dbt/exceptions.py
pushpay/dbt
8b96de893af692bd77fe9eb9a8104317be7b5413
[ "Apache-2.0" ]
null
null
null
import sys import six import functools from dbt.compat import builtins from dbt.logger import GLOBAL_LOGGER as logger import dbt.flags class Exception(builtins.Exception): CODE = -32000 MESSAGE = "Server Error" def data(self): # if overriding, make sure the result is json-serializable. r...
30.393855
94
0.631054
import sys import six import functools from dbt.compat import builtins from dbt.logger import GLOBAL_LOGGER as logger import dbt.flags class Exception(builtins.Exception): CODE = -32000 MESSAGE = "Server Error" def data(self): return { 'type': self.__class__.__name__, ...
true
true
f742b62c9f3ef575de4f0c205b674930904e9c16
5,612
py
Python
tests/live/test_userid.py
steve-krause/pandevice
25634d9e9a78507029922aa559d0b9268982080d
[ "0BSD" ]
null
null
null
tests/live/test_userid.py
steve-krause/pandevice
25634d9e9a78507029922aa559d0b9268982080d
[ "0BSD" ]
null
null
null
tests/live/test_userid.py
steve-krause/pandevice
25634d9e9a78507029922aa559d0b9268982080d
[ "0BSD" ]
null
null
null
import pytest import time from tests.live import testlib from pandevice import base class TestUserID_FW(object): """Tests UserID on live Firewall.""" def test_01_fw_login(self, fw, state_map): state = state_map.setdefault(fw) user, ip = testlib.random_name(), testlib.random_ip() fw.u...
40.374101
86
0.634177
import pytest import time from tests.live import testlib from pandevice import base class TestUserID_FW(object): def test_01_fw_login(self, fw, state_map): state = state_map.setdefault(fw) user, ip = testlib.random_name(), testlib.random_ip() fw.userid.login(user, ip) state.singl...
true
true
f742b638f0f82f40344a4dbb90fa8acc7dbeb486
230
py
Python
lib_Partage_BSS/exceptions/DomainException.py
DSI-Universite-Rennes2/libPythonBssApi
80477806238f0e98cc962ed0f346660a3f2bfbaf
[ "Apache-2.0" ]
3
2018-05-02T09:37:29.000Z
2022-02-09T07:58:09.000Z
lib_Partage_BSS/exceptions/DomainException.py
DSI-Universite-Rennes2/libPythonBssApi
80477806238f0e98cc962ed0f346660a3f2bfbaf
[ "Apache-2.0" ]
12
2018-05-14T13:17:28.000Z
2022-03-29T08:21:06.000Z
lib_Partage_BSS/exceptions/DomainException.py
DSI-Universite-Rennes2/libPythonBssApi
80477806238f0e98cc962ed0f346660a3f2bfbaf
[ "Apache-2.0" ]
7
2018-05-02T09:38:15.000Z
2022-02-09T13:03:01.000Z
# -*-coding:utf-8 -* class DomainException(Exception): """ Exception levée lors d'une erreur sur le nom de domaine :ivar message: message à afficher """ def __init__(self, message): self.msg = message
23
59
0.63913
class DomainException(Exception): def __init__(self, message): self.msg = message
true
true
f742b71c71651cda6ea6fcf9599c5162d8ef1d25
181
py
Python
quiz/forms.py
Richie-Yang/django-membership-mgmt
4c1e3f1c578de78047bc3e1ac794958187af3474
[ "MIT" ]
null
null
null
quiz/forms.py
Richie-Yang/django-membership-mgmt
4c1e3f1c578de78047bc3e1ac794958187af3474
[ "MIT" ]
null
null
null
quiz/forms.py
Richie-Yang/django-membership-mgmt
4c1e3f1c578de78047bc3e1ac794958187af3474
[ "MIT" ]
null
null
null
from django import forms class RegisterForm(forms.Form): username = forms.CharField(max_length=20, required=True) password = forms.CharField(max_length=20, required=True)
25.857143
60
0.767956
from django import forms class RegisterForm(forms.Form): username = forms.CharField(max_length=20, required=True) password = forms.CharField(max_length=20, required=True)
true
true
f742b75788816e90fb69ec8c584882e4cabfaa24
3,933
py
Python
day24/day24.py
robfalck/AoC2017
fa19f3fb42d979b60888a1954bea571c9d4ee735
[ "Apache-2.0" ]
null
null
null
day24/day24.py
robfalck/AoC2017
fa19f3fb42d979b60888a1954bea571c9d4ee735
[ "Apache-2.0" ]
null
null
null
day24/day24.py
robfalck/AoC2017
fa19f3fb42d979b60888a1954bea571c9d4ee735
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function, division, absolute_import import copy import time import numpy as np import sys class Bridge(object): def __init__(self, initial_components, available_components): self.components = list(initial_components) self.score = sum([sum(tup) for tup in self.compone...
29.571429
107
0.616578
from __future__ import print_function, division, absolute_import import copy import time import numpy as np import sys class Bridge(object): def __init__(self, initial_components, available_components): self.components = list(initial_components) self.score = sum([sum(tup) for tup in self.compone...
true
true
f742b7f96d754b364c71966bc873d854ae70dd22
5,520
py
Python
scripts/format_veridicality.py
verypluming/transitivity
46808ff20a2aed55a54be58c35427b630711d014
[ "Apache-2.0" ]
3
2021-01-27T07:29:57.000Z
2021-05-17T05:47:57.000Z
scripts/format_veridicality.py
verypluming/transitivity
46808ff20a2aed55a54be58c35427b630711d014
[ "Apache-2.0" ]
null
null
null
scripts/format_veridicality.py
verypluming/transitivity
46808ff20a2aed55a54be58c35427b630711d014
[ "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 un...
43.464567
208
0.590942
import glob import pandas as pd import re import copy import os import sys import random import argparse def trans_label(label): if label == "yes": return "entailment" elif label == "unk": return "neutral" def check_pn(sentence): prop_n = {"ann":"Ann", "bob":"Bob", "chris":"Ch...
true
true
f742b8bd506cd7c6055a11339aa965cd0be3661c
1,672
py
Python
development/commands/test.py
BenjaminHamon/Overmind.ImageManager
717763d64e0bfcb54063142e87b2d63a701c02d9
[ "MIT" ]
null
null
null
development/commands/test.py
BenjaminHamon/Overmind.ImageManager
717763d64e0bfcb54063142e87b2d63a701c02d9
[ "MIT" ]
null
null
null
development/commands/test.py
BenjaminHamon/Overmind.ImageManager
717763d64e0bfcb54063142e87b2d63a701c02d9
[ "MIT" ]
null
null
null
import logging import os import shutil import subprocess logger = logging.getLogger("Main") def configure_argument_parser(environment, configuration, subparsers): # pylint: disable = unused-argument parser = subparsers.add_parser("test", help = "run the test suite") parser.add_argument("--configuration", required...
42.871795
128
0.754187
import logging import os import shutil import subprocess logger = logging.getLogger("Main") def configure_argument_parser(environment, configuration, subparsers): parser = subparsers.add_parser("test", help = "run the test suite") parser.add_argument("--configuration", required = True, metavar = "<configuration>...
true
true
f742b991dc30318adfc769f7dba19ca33ad1fd4b
3,772
py
Python
oscar/lib/python2.7/site-packages/django_extensions/management/commands/create_command.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
1
2019-03-11T17:10:06.000Z
2019-03-11T17:10:06.000Z
oscar/lib/python2.7/site-packages/django_extensions/management/commands/create_command.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
7
2020-03-24T16:20:07.000Z
2021-12-13T19:51:29.000Z
venv/lib/python3.6/site-packages/django_extensions/management/commands/create_command.py
fkallin/Superbook
a5874d3fbe04085cc4e62051c44a178a61dc289a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import shutil from django.core.management.base import AppCommand from django.core.management.color import color_style from django_extensions.management.utils import _make_writeable, signalcommand class Command(AppCommand): help = ("Creates a Django management command...
42.382022
160
0.604454
import os import sys import shutil from django.core.management.base import AppCommand from django.core.management.color import color_style from django_extensions.management.utils import _make_writeable, signalcommand class Command(AppCommand): help = ("Creates a Django management command directory structure fo...
true
true
f742b9b775809d63b06846f05f5de0dc4f285e52
3,583
py
Python
tests/test_signaling.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
1,080
2015-01-04T14:29:34.000Z
2022-03-29T05:44:51.000Z
tests/test_signaling.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
308
2015-01-05T22:44:13.000Z
2022-03-30T21:19:18.000Z
tests/test_signaling.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
123
2015-01-25T16:33:48.000Z
2022-02-25T19:57:10.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2020, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------...
21.981595
79
0.590287
import gc import pytest from enaml.signaling import Signal, BoundSignal class SignalTester: signal = Signal() def __init__(self): self.counter = 0 self.last_args = None self.last_kwargs = None def slot(self, *args, **kwargs): self.counter += 1 self.last_...
true
true
f742ba0852572bdd8df7678c7f27ac263c86d15f
8,443
py
Python
beet/plotting/create_plots.py
beetseeds/beet-blockchain-1
e5d93f1f9041c48dd0c38416d845c8675bf22738
[ "Apache-2.0" ]
7
2021-08-29T15:12:25.000Z
2022-02-09T04:28:38.000Z
beet/plotting/create_plots.py
beetseeds/beet-blockchain-1
e5d93f1f9041c48dd0c38416d845c8675bf22738
[ "Apache-2.0" ]
null
null
null
beet/plotting/create_plots.py
beetseeds/beet-blockchain-1
e5d93f1f9041c48dd0c38416d845c8675bf22738
[ "Apache-2.0" ]
3
2021-09-04T10:32:00.000Z
2022-03-15T08:44:25.000Z
import logging from datetime import datetime from pathlib import Path from secrets import token_bytes from typing import List, Optional, Tuple from blspy import AugSchemeMPL, G1Element, PrivateKey from chiapos import DiskPlotter from beet.plotting.plot_tools import add_plot_directory, stream_plot_info_ph, stream_plot...
41.591133
119
0.675708
import logging from datetime import datetime from pathlib import Path from secrets import token_bytes from typing import List, Optional, Tuple from blspy import AugSchemeMPL, G1Element, PrivateKey from chiapos import DiskPlotter from beet.plotting.plot_tools import add_plot_directory, stream_plot_info_ph, stream_plot...
true
true
f742ba8484db8892cbc9a00766b95a8e317031e4
6,645
py
Python
subs2vec/norms.py
jvparidon/sub2vec
adb9e72b64dc6dbde3c2060ee0d3964ab623a149
[ "MIT" ]
19
2019-09-23T20:31:54.000Z
2022-03-01T22:19:12.000Z
subs2vec/norms.py
ClarasMind/subs2vec
adb9e72b64dc6dbde3c2060ee0d3964ab623a149
[ "MIT" ]
4
2019-11-26T21:12:53.000Z
2022-03-29T02:46:25.000Z
subs2vec/norms.py
ClarasMind/subs2vec
adb9e72b64dc6dbde3c2060ee0d3964ab623a149
[ "MIT" ]
2
2020-09-30T15:02:32.000Z
2022-03-01T22:19:20.000Z
"""Predict lexical norms, either to evaluate word vectors, or to get norms for unnormed words.""" import numpy as np import pandas as pd import sklearn.linear_model import sklearn.model_selection import sklearn.preprocessing import sklearn.utils import argparse import os from .vecs import Vectors from .utensils import ...
46.795775
148
0.697366
import numpy as np import pandas as pd import sklearn.linear_model import sklearn.model_selection import sklearn.preprocessing import sklearn.utils import argparse import os from .vecs import Vectors from .utensils import log_timer import logging logging.basicConfig(format='[{levelname}] {message}', style='{', level=lo...
true
true
f742baa6243734f0dcccee8da4312781875f3ec0
1,170
py
Python
contacts/views.py
renkse/django-simple-contacts
f6268ac5101e62fecbfa2d66c48d0eea1aed8c51
[ "BSD-2-Clause" ]
1
2015-09-03T06:19:26.000Z
2015-09-03T06:19:26.000Z
contacts/views.py
renkse/django-simple-contacts
f6268ac5101e62fecbfa2d66c48d0eea1aed8c51
[ "BSD-2-Clause" ]
null
null
null
contacts/views.py
renkse/django-simple-contacts
f6268ac5101e62fecbfa2d66c48d0eea1aed8c51
[ "BSD-2-Clause" ]
null
null
null
# coding=utf-8 __author__ = 'renkse' from forms import FeedbackForm from django.template import RequestContext, loader from django.http import HttpResponse, HttpResponseRedirect from models import Contact, FeedbackMessage from collections import OrderedDict import json def contacts_view(request): fbform = Feedba...
28.536585
58
0.633333
__author__ = 'renkse' from forms import FeedbackForm from django.template import RequestContext, loader from django.http import HttpResponse, HttpResponseRedirect from models import Contact, FeedbackMessage from collections import OrderedDict import json def contacts_view(request): fbform = FeedbackForm() f...
true
true
f742bd1f35359a50500af0536f5bc59c0b810d33
128
py
Python
cookie_consent/widgets.py
briefmnews/django-cookie-consent
12787b5641671289b03bba981af7dfdc674dbaac
[ "BSD-2-Clause" ]
null
null
null
cookie_consent/widgets.py
briefmnews/django-cookie-consent
12787b5641671289b03bba981af7dfdc674dbaac
[ "BSD-2-Clause" ]
null
null
null
cookie_consent/widgets.py
briefmnews/django-cookie-consent
12787b5641671289b03bba981af7dfdc674dbaac
[ "BSD-2-Clause" ]
null
null
null
from django import forms class CookieGroupWidget(forms.Widget): template_name = "cookie_consent/cookie_group_widget.html"
21.333333
61
0.8125
from django import forms class CookieGroupWidget(forms.Widget): template_name = "cookie_consent/cookie_group_widget.html"
true
true
f742bd3bcc6eaf8706c43bab96bf09fc5c406937
653
py
Python
src/fhs_pia_wireguard_netns/pia_class/config.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
src/fhs_pia_wireguard_netns/pia_class/config.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
src/fhs_pia_wireguard_netns/pia_class/config.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
"""All config load functions.""" import os import sys import yaml class config(): """Create pia config class.""" def __init__(self): super(config, self).__init__() def config_read(self, config_file="~/.pia.conf"): """Read config in yaml format.""" try: with open(os.pat...
28.391304
75
0.574273
import os import sys import yaml class config(): def __init__(self): super(config, self).__init__() def config_read(self, config_file="~/.pia.conf"): try: with open(os.path.expanduser(config_file), "r") as file: config = yaml.load(file, Loader=yaml.FullLoader) ...
true
true
f742bd7f7a01d88f16be3f5f8e27092fe790d350
4,979
py
Python
django/contrib/sitemaps/views.py
Lord-Elrond/django
178109c1734ccc16386c3e3cbae1465c7a1b8ed8
[ "BSD-3-Clause", "0BSD" ]
61,676
2015-01-01T00:05:13.000Z
2022-03-31T20:37:54.000Z
django/contrib/sitemaps/views.py
Lord-Elrond/django
178109c1734ccc16386c3e3cbae1465c7a1b8ed8
[ "BSD-3-Clause", "0BSD" ]
8,884
2015-01-01T00:12:05.000Z
2022-03-31T19:53:11.000Z
django/contrib/sitemaps/views.py
Lord-Elrond/django
178109c1734ccc16386c3e3cbae1465c7a1b8ed8
[ "BSD-3-Clause", "0BSD" ]
33,143
2015-01-01T02:04:52.000Z
2022-03-31T19:42:46.000Z
import datetime import warnings from dataclasses import dataclass from functools import wraps from django.contrib.sites.shortcuts import get_current_site from django.core.paginator import EmptyPage, PageNotAnInteger from django.http import Http404 from django.template.response import TemplateResponse from django.urls ...
35.564286
106
0.663989
import datetime import warnings from dataclasses import dataclass from functools import wraps from django.contrib.sites.shortcuts import get_current_site from django.core.paginator import EmptyPage, PageNotAnInteger from django.http import Http404 from django.template.response import TemplateResponse from django.urls ...
true
true
f742be5e92344fd9acd567eb12924b495338fab9
702
py
Python
mirage/core/types.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
4
2019-05-16T09:26:21.000Z
2022-02-14T06:21:40.000Z
mirage/core/types.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
59
2019-07-01T16:20:22.000Z
2022-02-14T03:36:04.000Z
mirage/core/types.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
1
2018-12-08T09:57:54.000Z
2018-12-08T09:57:54.000Z
# -*- coding: utf-8 -*- """ Copyright 2017-2018 Shota Shimazu. 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 appl...
29.25
75
0.735043
from typing import NoReturn Void = NoReturn String = str Int = int Float = float
true
true
f742beb1729d3b94cccfef6109ddd48fd34e0028
548
py
Python
test/test_piglatin.py
farooq-teqniqly/py-workout
e75c98ebc04ce5b4546a667ce53df3e1e9e81164
[ "MIT" ]
null
null
null
test/test_piglatin.py
farooq-teqniqly/py-workout
e75c98ebc04ce5b4546a667ce53df3e1e9e81164
[ "MIT" ]
null
null
null
test/test_piglatin.py
farooq-teqniqly/py-workout
e75c98ebc04ce5b4546a667ce53df3e1e9e81164
[ "MIT" ]
null
null
null
import pytest from kidslanguages import english_to_pig_latin @pytest.mark.parametrize( "original,expected_pig_latinized", [("inside job", "insideway objay"), ("i am groot", "iway amway rootgay")], ) def test_latinize(original: str, expected_pig_latinized: str): assert list(english_to_pig_latin(original)) ...
32.235294
84
0.744526
import pytest from kidslanguages import english_to_pig_latin @pytest.mark.parametrize( "original,expected_pig_latinized", [("inside job", "insideway objay"), ("i am groot", "iway amway rootgay")], ) def test_latinize(original: str, expected_pig_latinized: str): assert list(english_to_pig_latin(original)) ...
true
true
f742bfecd3ff1bea6cfcdc0bc20e45e69326710e
1,523
py
Python
tests/version_spit_check.py
XIThing/esdl-mapeditor
9f4cd4a58714ea67aeb532e88e88f0435a87dbd5
[ "Apache-2.0" ]
null
null
null
tests/version_spit_check.py
XIThing/esdl-mapeditor
9f4cd4a58714ea67aeb532e88e88f0435a87dbd5
[ "Apache-2.0" ]
14
2020-09-30T21:16:46.000Z
2021-11-08T18:54:34.000Z
tests/version_spit_check.py
XIThing/esdl-mapeditor
9f4cd4a58714ea67aeb532e88e88f0435a87dbd5
[ "Apache-2.0" ]
1
2020-09-17T12:48:57.000Z
2020-09-17T12:48:57.000Z
# This work is based on original code developed and copyrighted by TNO 2020. # Subsequent contributions are licensed to you by the developers of such code and are # made available to the Project under one or several contributor license agreements. # # This work is licensed to you under the Apache License, Versi...
31.729167
87
0.620486
ion = 2 version = '' if version is None else str(version) try: import re splitted = re.split(r"\D", version) print(splitted) major = splitted[0] major = int(major) + 1 except ValueError: major = 1 print(str(major))
true
true
f742c0ee5a699d29c279ca975a0abc676bd838f9
9,493
py
Python
Prognostics/dl-models.py
IntelligentSensor/PHMRepository
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
6
2021-09-27T00:23:41.000Z
2022-03-16T00:21:27.000Z
Prognostics/dl-models.py
intelligentph/PhRepository
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
4
2020-08-21T03:56:16.000Z
2022-02-10T02:17:08.000Z
Prognostics/dl-models.py
IntelligentSensor/Sensor-PHM
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
5
2020-11-25T11:46:12.000Z
2022-02-14T02:37:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import random import numpy as np import seaborn as sns from datetime import datetime import matplotlib.pyplot as plt from preprocess import preprocess import keras as K import tensorflow as tf from keras.regularizers import l2 from keras.utils import plot_model...
30.329073
126
0.70157
import sys import random import numpy as np import seaborn as sns from datetime import datetime import matplotlib.pyplot as plt from preprocess import preprocess import keras as K import tensorflow as tf from keras.regularizers import l2 from keras.utils import plot_model from keras.models import Sequential from ke...
true
true
f742c20d79ba262850c6c7520e5ab4c2c3181626
8,892
py
Python
tb/eth_mac_10g/test_eth_mac_10g.py
siriusm46/verilog-ethernet
c0c2dbce2aeb7110031cb5d3020fbfe23c7609da
[ "MIT" ]
1
2021-02-26T09:08:47.000Z
2021-02-26T09:08:47.000Z
tb/eth_mac_10g/test_eth_mac_10g.py
siriusm46/verilog-ethernet
c0c2dbce2aeb7110031cb5d3020fbfe23c7609da
[ "MIT" ]
null
null
null
tb/eth_mac_10g/test_eth_mac_10g.py
siriusm46/verilog-ethernet
c0c2dbce2aeb7110031cb5d3020fbfe23c7609da
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Copyright (c) 2020 Alex Forencich 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, merg...
30.875
112
0.664193
import itertools import logging import os import pytest import cocotb_test.simulator import cocotb from cocotb.clock import Clock from cocotb.triggers import RisingEdge from cocotb.regression import TestFactory from cocotbext.eth import XgmiiFrame, XgmiiSource, XgmiiSink from cocotbext.axi import AxiStreamSource, ...
true
true
f742c3723f667280094a0eedc3947dbaaa2866cb
5,204
py
Python
python3/koans/about_regex.py
Dawn0fTime/python-koans-solutions
76a3d292e541c26313aa50d837ff73e21c10d581
[ "MIT" ]
null
null
null
python3/koans/about_regex.py
Dawn0fTime/python-koans-solutions
76a3d292e541c26313aa50d837ff73e21c10d581
[ "MIT" ]
null
null
null
python3/koans/about_regex.py
Dawn0fTime/python-koans-solutions
76a3d292e541c26313aa50d837ff73e21c10d581
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import re class AboutRegex(Koan): """ These koans are based on Ben's book: Regular Expressions in 10 minutes. I found this book very useful, so I decided to write a koan file in order to practice everything it taught...
36.907801
88
0.524212
from runner.koan import * import re class AboutRegex(Koan): def test_matching_literal_text(self): string = "Hello, my name is Felix and these koans are based " + \ "on Ben's book: Regular Expressions in 10 minutes." m = re.search('Felix', string) self.assertTrue( m...
true
true
f742c398dc6a90512ceeaebffe381cfdbb585722
2,404
py
Python
project/editorial/admin.py
ProjectFacet/facet
dc6bc79d450f7e2bdf59cfbcd306d05a736e4db9
[ "MIT" ]
25
2015-07-13T22:16:36.000Z
2021-11-11T02:45:32.000Z
project/editorial/admin.py
ProjectFacet/facet
dc6bc79d450f7e2bdf59cfbcd306d05a736e4db9
[ "MIT" ]
74
2015-12-01T18:57:47.000Z
2022-03-11T23:25:47.000Z
project/editorial/admin.py
ProjectFacet/facet
dc6bc79d450f7e2bdf59cfbcd306d05a736e4db9
[ "MIT" ]
6
2016-01-08T21:12:43.000Z
2019-05-20T16:07:56.000Z
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import UserChangeForm from models import ( Assignment, AudioAsset, Call, Comment, ContentLicense, ContractorProfile, ContractorSubscription, Discussion, DocumentAsset, ...
25.305263
83
0.760399
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import UserChangeForm from models import ( Assignment, AudioAsset, Call, Comment, ContentLicense, ContractorProfile, ContractorSubscription, Discussion, DocumentAsset, ...
true
true
f742c4470c88c8a2dda2dffc4b6562fa936b81d2
967
py
Python
second_crack/handler.py
travis-deshotels/step-function
c088c2fb6560b829ae671f3f9231239038353638
[ "MIT" ]
null
null
null
second_crack/handler.py
travis-deshotels/step-function
c088c2fb6560b829ae671f3f9231239038353638
[ "MIT" ]
null
null
null
second_crack/handler.py
travis-deshotels/step-function
c088c2fb6560b829ae671f3f9231239038353638
[ "MIT" ]
null
null
null
import json class OrderException(Exception): pass def first_step(event, context): print(event) if event.get('orderId') is None: raise OrderException('No orderId was provided!') if event['orderId'] != 'abc123': raise OrderException(f'No record found for recordId: {event["orderId"]}') ...
19.34
81
0.517063
import json class OrderException(Exception): pass def first_step(event, context): print(event) if event.get('orderId') is None: raise OrderException('No orderId was provided!') if event['orderId'] != 'abc123': raise OrderException(f'No record found for recordId: {event["orderId"]}') ...
true
true
f742c45f720e397d5ccb4f9caa24a6199dc1f423
7,277
py
Python
mars/dataframe/groupby/transform.py
xccheng/mars
8146d1b7d3f3bc2a652c414a336a2f884a06a108
[ "Apache-2.0" ]
1
2020-11-05T05:53:00.000Z
2020-11-05T05:53:00.000Z
mars/dataframe/groupby/transform.py
xccheng/mars
8146d1b7d3f3bc2a652c414a336a2f884a06a108
[ "Apache-2.0" ]
null
null
null
mars/dataframe/groupby/transform.py
xccheng/mars
8146d1b7d3f3bc2a652c414a336a2f884a06a108
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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.548913
107
0.630754
import numpy as np import pandas as pd from ... import opcodes from ...core import OutputType from ...custom_log import redirect_custom_log from ...serialize import BoolField, TupleField, DictField, AnyField, StringField from ...utils import enter_current_session from ..operands import DataFrameOperandMi...
true
true
f742c4d949762b07328c72db56ca3eb8b08c9a26
38,420
py
Python
serial_dashboard/dashboard.py
justinbois/bokeh-serial-plotter
923fca650cbe4a439dadfb3329ac706d54f96a5f
[ "MIT" ]
2
2021-11-08T08:00:37.000Z
2021-12-19T11:43:17.000Z
serial_dashboard/dashboard.py
justinbois/serial-dashboard
923fca650cbe4a439dadfb3329ac706d54f96a5f
[ "MIT" ]
null
null
null
serial_dashboard/dashboard.py
justinbois/serial-dashboard
923fca650cbe4a439dadfb3329ac706d54f96a5f
[ "MIT" ]
null
null
null
import asyncio import sys import numpy as np import pandas as pd import serial import serial.tools.list_ports import bokeh.plotting import bokeh.io import bokeh.layouts import bokeh.driving from bokeh.server.server import Server from bokeh.application import Application from bokeh.application.handlers.function impo...
31.491803
134
0.62077
import asyncio import sys import numpy as np import pandas as pd import serial import serial.tools.list_ports import bokeh.plotting import bokeh.io import bokeh.layouts import bokeh.driving from bokeh.server.server import Server from bokeh.application import Application from bokeh.application.handlers.function impo...
true
true
f742c4f9b64ce3b2a4462a209e8434d035ed1f7f
43,879
py
Python
pysnmp-with-texts/HUAWEI-VPN-DIAGNOSTICS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/HUAWEI-VPN-DIAGNOSTICS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/HUAWEI-VPN-DIAGNOSTICS-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 HUAWEI-VPN-DIAGNOSTICS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-VPN-DIAGNOSTICS-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:49:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version ...
141.545161
4,335
0.782288
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuild...
true
true
f742c7818fb10be8afd21878a5e963cb9b496af1
12,895
py
Python
ElexonDataPortal/dev/orchestrator.py
AyrtonB/ElexonDataPortal
939c811f85dff15d0f7eb164fd1982ba0307192e
[ "MIT" ]
4
2020-05-15T07:42:41.000Z
2020-09-02T00:54:18.000Z
ElexonDataPortal/dev/orchestrator.py
AyrtonB/ElexonDataPortal
939c811f85dff15d0f7eb164fd1982ba0307192e
[ "MIT" ]
1
2020-06-16T09:37:42.000Z
2020-06-22T15:43:13.000Z
ElexonDataPortal/dev/orchestrator.py
AyrtonB/ElexonDataPortal
939c811f85dff15d0f7eb164fd1982ba0307192e
[ "MIT" ]
1
2020-11-03T18:48:37.000Z
2020-11-03T18:48:37.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/05-orchestrator.ipynb (unless otherwise specified). __all__ = ['retry_request', 'if_possible_parse_local_datetime', 'SP_and_date_request', 'handle_capping', 'date_range_request', 'year_request', 'construct_year_month_pairs', 'year_and_month_request', ...
30.702381
199
0.630554
__all__ = ['retry_request', 'if_possible_parse_local_datetime', 'SP_and_date_request', 'handle_capping', 'date_range_request', 'year_request', 'construct_year_month_pairs', 'year_and_month_request', 'clean_year_week', 'construct_year_week_pairs', 'year_and_week_request', 'non_temporal_request', ...
true
true
f742c932f747faf7f6e5bc4a0ddaeb0b12b01724
8,301
py
Python
tests/unit/states/test_mdadm_raid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2020-03-31T22:51:16.000Z
2020-03-31T22:51:16.000Z
tests/unit/states/test_mdadm_raid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
null
null
null
tests/unit/states/test_mdadm_raid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2021-09-30T07:00:01.000Z
2021-09-30T07:00:01.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Rahul Handay <rahulha@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase from tests.support.mock import ( MagicMock, ...
45.360656
119
0.57222
from __future__ import absolute_import from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase from tests.support.mock import ( MagicMock, patch, ) import salt.states.mdadm_raid as mdadm class MdadmTestCase(TestCase, LoaderModuleMockMixin): def setup_loader_mo...
true
true
f742c9df056036791957d9149ceea0699be934f4
4,921
py
Python
open_relation/infer/tree_infer2.py
sx14/hierarchical-relationship
d9ed2f0c3394e435374cf3ab5afeb47a6a56ed9a
[ "MIT" ]
1
2020-02-25T14:33:36.000Z
2020-02-25T14:33:36.000Z
open_relation/infer/tree_infer2.py
sx14/hierarchical-relationship
d9ed2f0c3394e435374cf3ab5afeb47a6a56ed9a
[ "MIT" ]
null
null
null
open_relation/infer/tree_infer2.py
sx14/hierarchical-relationship
d9ed2f0c3394e435374cf3ab5afeb47a6a56ed9a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys import numpy as np def cal_rank_scores(label_num): # rank scores [1 - 10] # s = a(x - b)^2 + c # if rank is 0, score is 10 # b = num-1 s_min = 1.0 s_max = 10.0 b = label_num - 1 c = s_min a = (s_max - c) / b ** 2 rank_scores = [0] * label_n...
29.118343
99
0.591953
import sys import numpy as np def cal_rank_scores(label_num): s_min = 1.0 s_max = 10.0 b = label_num - 1 c = s_min a = (s_max - c) / b ** 2 rank_scores = [0] * label_num for r in range(label_num): rank_scores[r] = a*(r-b)**2 + c return rank_scores def ...
true
true
f742cb8fcf6b97f14f06cf62d9d282c8577e127d
6,264
py
Python
e2e_tests/tests/experiment/test_tf_keras.py
davidhershey/determined
68e75c10786390cefa22de00ca5df601537b4e63
[ "Apache-2.0" ]
null
null
null
e2e_tests/tests/experiment/test_tf_keras.py
davidhershey/determined
68e75c10786390cefa22de00ca5df601537b4e63
[ "Apache-2.0" ]
null
null
null
e2e_tests/tests/experiment/test_tf_keras.py
davidhershey/determined
68e75c10786390cefa22de00ca5df601537b4e63
[ "Apache-2.0" ]
null
null
null
from typing import Dict import pytest from tests import config as conf from tests import experiment as exp @pytest.mark.parallel # type: ignore @pytest.mark.parametrize("tf2", [False]) # type: ignore def test_tf_keras_native_parallel(tf2: bool) -> None: config = conf.load_config(conf.cv_examples_path("cifar10...
38.906832
100
0.729087
from typing import Dict import pytest from tests import config as conf from tests import experiment as exp @pytest.mark.parallel @pytest.mark.parametrize("tf2", [False]) def test_tf_keras_native_parallel(tf2: bool) -> None: config = conf.load_config(conf.cv_examples_path("cifar10_tf_keras/const.yaml")) ...
true
true
f742cbc024b8febc2b8cf60eeb3813f12ca39f05
6,019
py
Python
main.py
honpui/RFCN
c3e24ea9a143e6ba31698dc6031f6681517eaaff
[ "MIT" ]
9
2019-05-23T12:01:22.000Z
2021-01-14T08:07:36.000Z
main.py
honpui/RFCN
c3e24ea9a143e6ba31698dc6031f6681517eaaff
[ "MIT" ]
null
null
null
main.py
honpui/RFCN
c3e24ea9a143e6ba31698dc6031f6681517eaaff
[ "MIT" ]
3
2020-05-05T10:31:57.000Z
2020-06-04T09:15:52.000Z
""" RFCN """ import torch from torch.autograd import Variable from torch.utils.data import DataLoader import torchvision import torch.nn.functional as functional from dataset import SBDClassSeg, MyTestData from transform import Colorize from criterion import CrossEntropyLoss2d from model import RFCN, FCN8s from myfunc...
36.92638
96
0.582323
import torch from torch.autograd import Variable from torch.utils.data import DataLoader import torchvision import torch.nn.functional as functional from dataset import SBDClassSeg, MyTestData from transform import Colorize from criterion import CrossEntropyLoss2d from model import RFCN, FCN8s from myfunc import imsav...
true
true
f742cc260f2491ad09e71a14803c47d7ee2f8f77
697
py
Python
modeling/tools/clean_data.py
BLimmie/eyewire_validator
119f36098e1b6342c4b97eec89b6021b655d1440
[ "MIT" ]
2
2019-06-16T16:58:02.000Z
2020-02-17T19:46:58.000Z
modeling/tools/clean_data.py
BLimmie/eyewire_validator
119f36098e1b6342c4b97eec89b6021b655d1440
[ "MIT" ]
null
null
null
modeling/tools/clean_data.py
BLimmie/eyewire_validator
119f36098e1b6342c4b97eec89b6021b655d1440
[ "MIT" ]
null
null
null
import json def clean(task_data_filename, task_vol_filename): to_remove = [] with open(task_data_filename) as f: task_data = json.load(f) with open(task_vol_filename) as f: task_vol = json.load(f) for task in task_data: if len(task_data[task]["aggregate"]) == 0: ...
27.88
51
0.556671
import json def clean(task_data_filename, task_vol_filename): to_remove = [] with open(task_data_filename) as f: task_data = json.load(f) with open(task_vol_filename) as f: task_vol = json.load(f) for task in task_data: if len(task_data[task]["aggregate"]) == 0: ...
true
true
f742cc2a5ab3ebd17ea0d0f86b9333a2f250d051
888
py
Python
to_csv.py
gch1p/mgs-piracy
dcfb3b8a3f629b77d0cfe80e931752462d8175d8
[ "BSD-2-Clause" ]
null
null
null
to_csv.py
gch1p/mgs-piracy
dcfb3b8a3f629b77d0cfe80e931752462d8175d8
[ "BSD-2-Clause" ]
null
null
null
to_csv.py
gch1p/mgs-piracy
dcfb3b8a3f629b77d0cfe80e931752462d8175d8
[ "BSD-2-Clause" ]
null
null
null
import csv from mgs import MGSPiracy from argparse import ArgumentParser if __name__ == '__main__': # parse arguments argp = ArgumentParser() argp.add_argument('--output', type=str, default='output.csv', help='CSV output file name') argp.add_argument('--from', type=int, default=0, help='First page', de...
29.6
94
0.609234
import csv from mgs import MGSPiracy from argparse import ArgumentParser if __name__ == '__main__': argp = ArgumentParser() argp.add_argument('--output', type=str, default='output.csv', help='CSV output file name') argp.add_argument('--from', type=int, default=0, help='First page', dest='_from') a...
true
true
f742cc6f3cce253bcb8e85f0b1c7b905c3df5f1a
36,738
gyp
Python
deps/v8/tools/gyp/v8.gyp
braniewski/node-0.8.9
6586d8f498ebaf0df86bed321949af151ae3ee7c
[ "BSD-2-Clause" ]
1
2019-04-16T11:09:53.000Z
2019-04-16T11:09:53.000Z
deps/v8/tools/gyp/v8.gyp
rakyll/node
8e0c830cd0038577e36456d3e027a4150d68c933
[ "BSD-2-Clause" ]
null
null
null
deps/v8/tools/gyp/v8.gyp
rakyll/node
8e0c830cd0038577e36456d3e027a4150d68c933
[ "BSD-2-Clause" ]
1
2020-04-14T16:40:28.000Z
2020-04-14T16:40:28.000Z
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
36.701299
87
0.378518
{ 'includes': ['../../build/common.gypi'], 'conditions': [ ['use_system_v8==0', { 'targets': [ { 'target_name': 'v8', 'dependencies_traverse': 1, 'conditions': [ ['want_separate_host_toolset==1', { 'toolsets': ['hos...
true
true
f742cdb70482df5847c110883ce1589bbb4a2877
399
py
Python
speech/migrations/0003_auto_20151018_1251.py
zjnu/zjnucloud-api
0fc0434db3994fdafb5a90c0b9a5ed49f8bf0979
[ "Apache-2.0" ]
null
null
null
speech/migrations/0003_auto_20151018_1251.py
zjnu/zjnucloud-api
0fc0434db3994fdafb5a90c0b9a5ed49f8bf0979
[ "Apache-2.0" ]
null
null
null
speech/migrations/0003_auto_20151018_1251.py
zjnu/zjnucloud-api
0fc0434db3994fdafb5a90c0b9a5ed49f8bf0979
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('speech', '0002_speechdetail'), ] operations = [ migrations.AlterField( model_name='speechdetail', na...
19.95
47
0.596491
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('speech', '0002_speechdetail'), ] operations = [ migrations.AlterField( model_name='speechdetail', name='content', ...
true
true
f742ce9db5239eb210aed059004e3179eec454ca
7,538
py
Python
sympy/polys/tests/test_polymatrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/polys/tests/test_polymatrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/polys/tests/test_polymatrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
from sympy.testing.pytest import raises from sympy.polys.polymatrix import PolyMatrix from sympy.polys import Poly from sympy.core.singleton import S from sympy.matrices.dense import Matrix from sympy.polys.domains.integerring import ZZ from sympy.polys.domains.rationalfield import QQ from sympy.abc import...
40.526882
107
0.541656
from sympy.testing.pytest import raises from sympy.polys.polymatrix import PolyMatrix from sympy.polys import Poly from sympy.core.singleton import S from sympy.matrices.dense import Matrix from sympy.polys.domains.integerring import ZZ from sympy.polys.domains.rationalfield import QQ from sympy.abc import...
true
true
f742cea0cdb90b0bf9f8e8687b86798a116c4b4d
1,468
py
Python
sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.363636
84
0.645777
from msrest import Configuration from .version import VERSION class ServiceFabricClientAPIsConfiguration(Configuration): def __init__( self, credentials, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if n...
true
true
f742d340fd3f41ee0c0322dbcedc6f5231665d04
1,489
py
Python
dj_cqrs/management/commands/cqrs_consume.py
jhenriquezs/django-cqrs
4365f7364bdbf7946f3ab2f8b284424bc29830d6
[ "Apache-2.0" ]
52
2020-05-28T13:25:36.000Z
2022-03-05T12:31:45.000Z
dj_cqrs/management/commands/cqrs_consume.py
jhenriquezs/django-cqrs
4365f7364bdbf7946f3ab2f8b284424bc29830d6
[ "Apache-2.0" ]
26
2020-07-30T08:17:13.000Z
2022-02-18T12:54:38.000Z
dj_cqrs/management/commands/cqrs_consume.py
jhenriquezs/django-cqrs
4365f7364bdbf7946f3ab2f8b284424bc29830d6
[ "Apache-2.0" ]
15
2020-05-28T13:25:40.000Z
2022-03-07T04:14:36.000Z
# Copyright © 2021 Ingram Micro Inc. All rights reserved. from multiprocessing import Process from dj_cqrs.registries import ReplicaRegistry from dj_cqrs.transport import current_transport from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Starts CQRS worker,...
28.634615
93
0.591672
from multiprocessing import Process from dj_cqrs.registries import ReplicaRegistry from dj_cqrs.transport import current_transport from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Starts CQRS worker, which consumes messages from message queue.' def add...
true
true
f742d3ace15060e1c7540959913cd8b91ff025dc
4,107
py
Python
src/cowrie/commands/ssh.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
1
2021-03-14T00:41:14.000Z
2021-03-14T00:41:14.000Z
src/cowrie/commands/ssh.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
null
null
null
src/cowrie/commands/ssh.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com> # See the COPYRIGHT file for more information import getopt import hashlib import re import socket import time from twisted.internet import reactor from twisted.python import log from cowrie.core.config import CowrieConfig from cowrie.shell.command import Honey...
33.942149
90
0.540054
import getopt import hashlib import re import socket import time from twisted.internet import reactor from twisted.python import log from cowrie.core.config import CowrieConfig from cowrie.shell.command import HoneyPotCommand commands = {} OUTPUT = [ 'usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interfac...
true
true
f742d58d6e75702e9afc6413ebc6585a554700aa
351
py
Python
bitoolbox/__version__.py
madpin/bitoolbox
b8924f8f6a9462da591dc536724d76e389ff878c
[ "MIT" ]
null
null
null
bitoolbox/__version__.py
madpin/bitoolbox
b8924f8f6a9462da591dc536724d76e389ff878c
[ "MIT" ]
null
null
null
bitoolbox/__version__.py
madpin/bitoolbox
b8924f8f6a9462da591dc536724d76e389ff878c
[ "MIT" ]
null
null
null
# 8b d8 Yb dP 88""Yb db dP""b8 88 dP db dP""b8 888888 # 88b d88 YbdP 88__dP dPYb dP `" 88odP dPYb dP `" 88__ # 88YbdP88 8P 88""" dP__Yb Yb 88"Yb dP__Yb Yb "88 88"" # 88 YY 88 dP 88 dP""""Yb YboodP 88 Yb dP""""Yb YboodP 888888 VERSION = (0, 5, 5) __version_...
43.875
72
0.527066
# 88 YY 88 dP 88 dP""""Yb YboodP 88 Yb dP""""Yb YboodP 888888 VERSION = (0, 5, 5) __version__ = '.'.join(map(str, VERSION))
true
true
f742d6074cbbc539a815acafa52943513bcbe3c0
507
py
Python
core-python/Core_Python/datatstructure/ListEx1.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-23T05:24:19.000Z
2022-02-17T16:37:51.000Z
core-python/Core_Python/datatstructure/ListEx1.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
5
2020-10-01T05:08:37.000Z
2020-10-12T03:18:10.000Z
core-python/Core_Python/datatstructure/ListEx1.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-28T14:06:41.000Z
2021-10-19T18:32:28.000Z
def get_word(sentence, n): # Only proceed if n is positive if n > 0: # Only proceed if n is not more than the number of words words = sentence.split() if n <= len(words): return (words[n-1]) return ("") print(get_word("This is a lesson about lists", 4)) # Should print:...
33.8
74
0.623274
def get_word(sentence, n): if n > 0: words = sentence.split() if n <= len(words): return (words[n-1]) return ("") print(get_word("This is a lesson about lists", 4)) print(get_word("This is a lesson about lists", -4)) print(get_word("Now we are cooking!", 1)) pri...
true
true
f742d67ce13e639145fb65e1b154fbb9fe80eea6
16,754
py
Python
cued_datalogger/analysis/sonogram.py
ricklupton/cued_datalogger
ee0617067ddc04a5b5b857066fd217d5cc8ed322
[ "BSD-3-Clause" ]
null
null
null
cued_datalogger/analysis/sonogram.py
ricklupton/cued_datalogger
ee0617067ddc04a5b5b857066fd217d5cc8ed322
[ "BSD-3-Clause" ]
14
2017-09-01T12:41:54.000Z
2017-12-09T19:42:13.000Z
cued_datalogger/analysis/sonogram.py
torebutlin/cued_datalogger
dde38d04819782922e757f1eed8e5eb44cbe4f84
[ "BSD-3-Clause" ]
3
2017-12-09T19:26:35.000Z
2021-11-08T10:45:48.000Z
import sys,traceback from cued_datalogger.api.numpy_extensions import to_dB from cued_datalogger.api.pyqt_extensions import BaseNControl, MatplotlibCanvas from cued_datalogger.api.pyqtgraph_extensions import ColorMapPlotWidget from cued_datalogger.api.toolbox import Toolbox from PyQt5.QtCore import Qt, pyqtSignal fro...
42.308081
128
0.656977
import sys,traceback from cued_datalogger.api.numpy_extensions import to_dB from cued_datalogger.api.pyqt_extensions import BaseNControl, MatplotlibCanvas from cued_datalogger.api.pyqtgraph_extensions import ColorMapPlotWidget from cued_datalogger.api.toolbox import Toolbox from PyQt5.QtCore import Qt, pyqtSignal fro...
true
true
f742d6ed6e0527b1feea743f0dea20097ffcbe50
100
py
Python
tools.py
zhaojing1995/One-shot_ReID
a109a1aee5ad1036b20ba0779af565c09506469a
[ "MIT" ]
1
2019-11-03T15:45:55.000Z
2019-11-03T15:45:55.000Z
tools.py
joselynzhao/One-shot_ReID
a109a1aee5ad1036b20ba0779af565c09506469a
[ "MIT" ]
null
null
null
tools.py
joselynzhao/One-shot_ReID
a109a1aee5ad1036b20ba0779af565c09506469a
[ "MIT" ]
null
null
null
import numpy as np if __name__=="__main__": b = np.load("logs/l_feas/test1.npy") print(b)
14.285714
40
0.64
import numpy as np if __name__=="__main__": b = np.load("logs/l_feas/test1.npy") print(b)
true
true
f742d6f8411406ddc778a4ad6014b39a8c3a58d0
2,258
py
Python
face_recognizer/__init__.py
merwane-rakkaoui/TER_S6
e51355c0b4daa3b7d61d8d2627977aeb412bb9d0
[ "MIT" ]
1
2021-03-13T19:33:47.000Z
2021-03-13T19:33:47.000Z
face_recognizer/__init__.py
merwane-rakkaoui/TER_S6
e51355c0b4daa3b7d61d8d2627977aeb412bb9d0
[ "MIT" ]
null
null
null
face_recognizer/__init__.py
merwane-rakkaoui/TER_S6
e51355c0b4daa3b7d61d8d2627977aeb412bb9d0
[ "MIT" ]
4
2021-02-17T18:10:44.000Z
2022-01-26T16:53:05.000Z
import sys,os import face_recognition import json from os import path def init(path_img,path_faces,path_text,path_volume): extension = os.path.splitext(path_faces)[1] to_write="0" if extension==".json": faces = json.loads(open(path_faces).read()) image_test = face_recognition.load_image_...
37.633333
97
0.610275
import sys,os import face_recognition import json from os import path def init(path_img,path_faces,path_text,path_volume): extension = os.path.splitext(path_faces)[1] to_write="0" if extension==".json": faces = json.loads(open(path_faces).read()) image_test = face_recognition.load_image_...
true
true
f742d7d373bbac9d54e39cb452ba7580874a8eb2
9,071
py
Python
third_party/typ/typ/json_results.py
atuchin-m/catapult
108ea3e2ec108e68216b1250a3d79cc642600294
[ "BSD-3-Clause" ]
1,894
2015-04-17T18:29:53.000Z
2022-03-28T22:41:06.000Z
third_party/typ/typ/json_results.py
catapult-project/catapult
f57af59eeda216ebe3e9dc3d695b02d4a3dfe486
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
third_party/typ/typ/json_results.py
atuchin-m/catapult
108ea3e2ec108e68216b1250a3d79cc642600294
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
# Copyright 2014 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...
35.158915
83
0.652188
from collections import OrderedDict import json _show_only_in_metadata = set(['tags', 'expectations_files', 'test_name_prefix']) class ResultType(object): Pass = 'PASS' Failure = 'FAIL' Timeout = 'TIMEOUT' Crash = 'CRASH' Skip = 'SKIP' values = (Pass, Failure, Timeout, Crash, S...
true
true
f742d81a9951a38fc4581297557a448c08226682
335
py
Python
backend/crawler/renderer.py
LordGhostX/X-Crawler
c2fe717de8b5f9bb148f57743703817465e7e0a3
[ "MIT" ]
6
2019-08-01T10:08:26.000Z
2022-01-07T04:12:05.000Z
backend/crawler/renderer.py
Fadhoo/X-Crawler
879917f8154cce5cdb19f867e0d3281382b26c48
[ "MIT" ]
3
2021-06-10T18:38:05.000Z
2022-03-11T23:55:49.000Z
backend/crawler/renderer.py
Fadhoo/X-Crawler
879917f8154cce5cdb19f867e0d3281382b26c48
[ "MIT" ]
3
2020-01-08T14:23:09.000Z
2021-08-15T07:18:27.000Z
from rest_framework.renderers import TemplateHTMLRenderer class MyTemplateHTMLRenderer(TemplateHTMLRenderer): def get_template_context(self, data, renderer_context): response = renderer_context['response'] if response.exception: data['status_code'] = response.status_code return...
37.222222
59
0.734328
from rest_framework.renderers import TemplateHTMLRenderer class MyTemplateHTMLRenderer(TemplateHTMLRenderer): def get_template_context(self, data, renderer_context): response = renderer_context['response'] if response.exception: data['status_code'] = response.status_code return...
true
true
f742d91396f77e9c476bb89d38e282853af75c22
571
py
Python
accounts/urls.py
dimDamyanov/petstagram
e98f57a48ecd8693aeabd28b698b562e1d858570
[ "MIT" ]
4
2020-11-21T20:06:39.000Z
2020-12-15T13:30:23.000Z
accounts/urls.py
dimDamyanov/petstagram
e98f57a48ecd8693aeabd28b698b562e1d858570
[ "MIT" ]
null
null
null
accounts/urls.py
dimDamyanov/petstagram
e98f57a48ecd8693aeabd28b698b562e1d858570
[ "MIT" ]
null
null
null
from django.contrib.auth.views import LoginView from django.urls import path, include from accounts.views import user_profile, signup_user, signout_user urlpatterns = ( # path('signin/', LoginView.as_view(template_name='registration/login.html'), name='signin user', ), path('', include('django.contrib.auth.ur...
40.785714
104
0.714536
from django.contrib.auth.views import LoginView from django.urls import path, include from accounts.views import user_profile, signup_user, signout_user urlpatterns = ( path('', include('django.contrib.auth.urls')), path('profile/', user_profile, name='current user profile'), path('profile/<int:pk>/'...
true
true
f742da3c1f30df6ffd0e7000a2799891d95b959c
3,315
py
Python
test/filtering/filter_test.py
OTRI-Unipd/OTRI
5d1fce470eeb31f5cc75cadfc06d9d2908736052
[ "FSFAP" ]
null
null
null
test/filtering/filter_test.py
OTRI-Unipd/OTRI
5d1fce470eeb31f5cc75cadfc06d9d2908736052
[ "FSFAP" ]
34
2020-04-18T13:57:05.000Z
2021-10-05T16:21:56.000Z
test/filtering/filter_test.py
OTRI-Unipd/OTRI
5d1fce470eeb31f5cc75cadfc06d9d2908736052
[ "FSFAP" ]
null
null
null
from otri.filtering.filter import Filter, Stream from unittest.mock import MagicMock import unittest class FilterTest(unittest.TestCase): def setUp(self): self.s_A = Stream([1, 2, 3]) self.s_B = Stream([3, 4, 5]) self.s_D = Stream() self.s_E = Stream() self.s_F = Stream() ...
33.826531
86
0.635294
from otri.filtering.filter import Filter, Stream from unittest.mock import MagicMock import unittest class FilterTest(unittest.TestCase): def setUp(self): self.s_A = Stream([1, 2, 3]) self.s_B = Stream([3, 4, 5]) self.s_D = Stream() self.s_E = Stream() self.s_F = Stream() ...
true
true
f742dcc35a00a79b25923b8155f5f57768f5cf5c
130
py
Python
mk42/apps/users/api/filters/__init__.py
vint21h/mk42
1574d1143ea829212203f2be0b11b44de1e7c722
[ "WTFPL" ]
5
2017-06-18T17:04:49.000Z
2017-11-02T11:44:36.000Z
mk42/apps/users/api/filters/__init__.py
vint21h/mk42
1574d1143ea829212203f2be0b11b44de1e7c722
[ "WTFPL" ]
13
2017-07-05T06:35:42.000Z
2017-09-06T02:04:04.000Z
mk42/apps/users/api/filters/__init__.py
vint21h/mk42
1574d1143ea829212203f2be0b11b44de1e7c722
[ "WTFPL" ]
10
2017-06-29T05:31:52.000Z
2017-10-27T09:31:32.000Z
# -*- coding: utf-8 -*- # mk42 # mk42/apps/users/api/filters/__init__.py from __future__ import unicode_literals __all__ = []
13
41
0.692308
from __future__ import unicode_literals __all__ = []
true
true
f742dd9446e9027ad4dd718bd58e671fb5f37889
6,983
py
Python
python/GafferImageTest/ClampTest.py
danieldresser-ie/gaffer
78c22487156a5800fcca49a24f52451a8ac0c559
[ "BSD-3-Clause" ]
1
2016-07-31T09:55:09.000Z
2016-07-31T09:55:09.000Z
python/GafferImageTest/ClampTest.py
Kthulhu/gaffer
8995d579d07231988abc92c3ac2788c15c8bc75c
[ "BSD-3-Clause" ]
null
null
null
python/GafferImageTest/ClampTest.py
Kthulhu/gaffer
8995d579d07231988abc92c3ac2788c15c8bc75c
[ "BSD-3-Clause" ]
1
2020-02-15T16:15:54.000Z
2020-02-15T16:15:54.000Z
########################################################################## # # Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
39.451977
118
0.67607
true
true
f742ddec9237d95296cb178fa00fd773d791801e
6,136
py
Python
conference/fares.py
hugovk/epcon
ae4ec2f48aaff393bbec9057a250481e5351699d
[ "BSD-2-Clause" ]
null
null
null
conference/fares.py
hugovk/epcon
ae4ec2f48aaff393bbec9057a250481e5351699d
[ "BSD-2-Clause" ]
null
null
null
conference/fares.py
hugovk/epcon
ae4ec2f48aaff393bbec9057a250481e5351699d
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from model_utils import Choices from assopy.models import Vat, VatFare from conference.models import FARE_TICKET_TYPES, Conference, Fare # due to historical reasons this one is basically hardcoded in various places. SOCIAL_EVENT_FARE_CODE = "VOUPE03" SIM_CARD_FARE_CODE = "SIM1" FAR...
29.642512
79
0.652542
from django.conf import settings from model_utils import Choices from assopy.models import Vat, VatFare from conference.models import FARE_TICKET_TYPES, Conference, Fare SOCIAL_EVENT_FARE_CODE = "VOUPE03" SIM_CARD_FARE_CODE = "SIM1" FARE_CODE_TYPES = Choices( ("E", "EARLY_BIRD", "Early Bird"), ("R", "REGU...
true
true
f742de0441c8be37c251907245127ab026f3f494
642
py
Python
cvat/apps/authentication/apps.py
syonekura/cvat
c579ba2319f967f09ab2bf080e357b2bde7180dd
[ "MIT" ]
1
2022-01-18T16:08:34.000Z
2022-01-18T16:08:34.000Z
cvat/apps/authentication/apps.py
syonekura/cvat
c579ba2319f967f09ab2bf080e357b2bde7180dd
[ "MIT" ]
null
null
null
cvat/apps/authentication/apps.py
syonekura/cvat
c579ba2319f967f09ab2bf080e357b2bde7180dd
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.db.models.signals import post_migrate, post_save from .settings.authentication import DJANGO_AUTH_TYPE class AuthenticationConfig(AppConfig): name = 'cvat.apps.authentication' def ready(self): from . import signals from django.contrib.auth.models i...
33.789474
91
0.750779
from django.apps import AppConfig from django.db.models.signals import post_migrate, post_save from .settings.authentication import DJANGO_AUTH_TYPE class AuthenticationConfig(AppConfig): name = 'cvat.apps.authentication' def ready(self): from . import signals from django.contrib.auth.models i...
true
true
f742de1f01f109e2344094149834a5383200fe49
993
py
Python
Preview Materials/Answers/prob_p36.py
WHU-Tan/NUS_AIWorkshop_2020_Summer
1a047884547b433816403883f384d18d56012978
[ "BSD-4-Clause-UC" ]
null
null
null
Preview Materials/Answers/prob_p36.py
WHU-Tan/NUS_AIWorkshop_2020_Summer
1a047884547b433816403883f384d18d56012978
[ "BSD-4-Clause-UC" ]
null
null
null
Preview Materials/Answers/prob_p36.py
WHU-Tan/NUS_AIWorkshop_2020_Summer
1a047884547b433816403883f384d18d56012978
[ "BSD-4-Clause-UC" ]
null
null
null
from queue import Queue line1=input() line1=line1.split(" ") n=int(line1[0]) k=int(line1[1]) boy=[] girl=[] cake=[] cnt=0 line2=input() line2=line2.split(" ") for i in range(0,n): girl.append(int(line2[2*i])) boy.append(int(line2[2*n-2*i-1])) line3=input() line3=line3.split(" ") for i in ran...
24.219512
45
0.443102
from queue import Queue line1=input() line1=line1.split(" ") n=int(line1[0]) k=int(line1[1]) boy=[] girl=[] cake=[] cnt=0 line2=input() line2=line2.split(" ") for i in range(0,n): girl.append(int(line2[2*i])) boy.append(int(line2[2*n-2*i-1])) line3=input() line3=line3.split(" ") for i in ran...
true
true
f742defc0e563705a58ba4135394e3176b570a01
2,038
py
Python
setup.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
null
null
null
setup.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
null
null
null
setup.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
1
2020-06-02T07:16:31.000Z
2020-06-02T07:16:31.000Z
"""xy-tag.""" import io import os import re from setuptools import find_packages, setup VERSION_RE = re.compile(r"""__version__ = ['"]([0-9b.]+)['"]""") HERE = os.path.abspath(os.path.dirname(__file__)) def read(*args): """Read complete file contents.""" return io.open(os.path.join(HERE, *args), encoding="u...
27.173333
78
0.624141
import io import os import re from setuptools import find_packages, setup VERSION_RE = re.compile(r"""__version__ = ['"]([0-9b.]+)['"]""") HERE = os.path.abspath(os.path.dirname(__file__)) def read(*args): return io.open(os.path.join(HERE, *args), encoding="utf-8").read() def get_version(): init = read("s...
true
true
f742dfb6313a32e89bc6dc4930cb58edfc75c59d
6,333
py
Python
halite_rl/ppo/sample.py
RyanJDick/halite_rl
e6309a24d3d613171ceb6522ddf07fece3815e62
[ "MIT" ]
null
null
null
halite_rl/ppo/sample.py
RyanJDick/halite_rl
e6309a24d3d613171ceb6522ddf07fece3815e62
[ "MIT" ]
null
null
null
halite_rl/ppo/sample.py
RyanJDick/halite_rl
e6309a24d3d613171ceb6522ddf07fece3815e62
[ "MIT" ]
null
null
null
import numpy as np import torch from halite_rl.utils import SubProcessWrapper class EpisodeData(): def __init__(self): self.observations = [] # Observations (states). self.actions = [] # Selected actions. self.act_log_probs = [] # Log probability of selected action. self.v...
42.22
104
0.583294
import numpy as np import torch from halite_rl.utils import SubProcessWrapper class EpisodeData(): def __init__(self): self.observations = [] self.actions = [] self.act_log_probs = [] self.value_preds = [] self.rewards = [] self.step_info = [] ...
true
true
f742e0b37437fc9787f8b448243b64a0cbbf6bd7
221
py
Python
CodeWars/7 Kyu/Down Arrow With Numbers.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Down Arrow With Numbers.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Down Arrow With Numbers.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def half(i, n): return "".join(str(d%10) for d in range(1, n-i+1)) def line(i, n): h = half(i, n) return " " * i + h + h[-2::-1] def get_a_down_arrow_of(n): return "\n".join(line(i, n) for i in range(n))
24.555556
54
0.538462
def half(i, n): return "".join(str(d%10) for d in range(1, n-i+1)) def line(i, n): h = half(i, n) return " " * i + h + h[-2::-1] def get_a_down_arrow_of(n): return "\n".join(line(i, n) for i in range(n))
true
true
f742e0e583a76bad6724369d87a7b306b976e18c
5,735
py
Python
arviz/plots/compareplot.py
sethaxen/arviz
422c00b3cc24f3983bea283396bff0195374dcc3
[ "Apache-2.0" ]
null
null
null
arviz/plots/compareplot.py
sethaxen/arviz
422c00b3cc24f3983bea283396bff0195374dcc3
[ "Apache-2.0" ]
null
null
null
arviz/plots/compareplot.py
sethaxen/arviz
422c00b3cc24f3983bea283396bff0195374dcc3
[ "Apache-2.0" ]
null
null
null
"""Summary plot for model comparison.""" import numpy as np import matplotlib.pyplot as plt from .plot_utils import _scale_fig_size def plot_compare( comp_df, insample_dev=True, plot_standard_error=True, plot_ic_diff=True, order_by_rank=True, figsize=None, textsize=None, ...
32.039106
101
0.599303
import numpy as np import matplotlib.pyplot as plt from .plot_utils import _scale_fig_size def plot_compare( comp_df, insample_dev=True, plot_standard_error=True, plot_ic_diff=True, order_by_rank=True, figsize=None, textsize=None, plot_kwargs=None, ax=None, ): i...
true
true
f742e126c6009a0eb57dccaf8c862cbbc950a402
15,744
py
Python
pymongo/change_stream.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
9
2021-02-15T05:53:17.000Z
2022-02-25T01:47:09.000Z
pymongo/change_stream.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
5
2022-02-04T13:00:12.000Z
2022-02-24T18:13:24.000Z
pymongo/change_stream.py
ldennis/mongo-python-driver
cc029a1e6208863eaab453777363d3935b927f32
[ "Apache-2.0" ]
7
2022-02-05T20:29:14.000Z
2022-03-26T13:16:44.000Z
# Copyright 2017 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
38.4
82
0.633257
import copy from bson import _bson_to_dict from bson.raw_bson import RawBSONDocument from pymongo import common from pymongo.aggregation import (_CollectionAggregationCommand, _DatabaseAggregationCommand) from pymongo.collation import validate_collation_or_none from pym...
true
true
f742e14c0836b2cc66e828503810b7409e4c0226
1,184
py
Python
application/app.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
application/app.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
application/app.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from logging.handlers import RotatingFileHandler import logging from celery import Celery from flask import Flask from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, instance_relative_config=True) # Load the default configuration app.config.from_object('c...
25.73913
89
0.73902
from logging.handlers import RotatingFileHandler import logging from celery import Celery from flask import Flask from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, instance_relative_config=True) app.config.from_object('config') app.config.from_pyfile('config.py') file_h...
true
true
f742e1aa279a2179423f240845a080229ed3f5fa
1,158
py
Python
interpretability/guided_back_propagation.py
rox38431/EyeJaundice
ee5939d203013cd522fbacdfcb75970bd696c962
[ "MIT" ]
5
2019-10-15T04:05:58.000Z
2022-03-05T02:09:14.000Z
interpretability/guided_back_propagation.py
rox38431/EyeJaundice
ee5939d203013cd522fbacdfcb75970bd696c962
[ "MIT" ]
1
2019-12-10T10:41:56.000Z
2019-12-11T02:54:22.000Z
interpretability/guided_back_propagation.py
rox38431/EyeJaundice
ee5939d203013cd522fbacdfcb75970bd696c962
[ "MIT" ]
1
2020-12-04T08:50:17.000Z
2020-12-04T08:50:17.000Z
# -*- coding: utf-8 -*- """ Created on 2019/8/4 上午9:45 @author: mick.yi """ import torch from torch import nn import numpy as np class GuidedBackPropagation(object): def __init__(self, net): self.net = net for (name, module) in self.net.named_modules(): if isinstanc...
23.632653
66
0.542314
import torch from torch import nn import numpy as np class GuidedBackPropagation(object): def __init__(self, net): self.net = net for (name, module) in self.net.named_modules(): if isinstance(module, nn.ReLU): module.register_backward_hook(self.backward_hoo...
true
true
f742e37d7482758db2c2fb615fe5b53a2cc6002f
27,142
py
Python
src/olympia/reviewers/tests/test_serializers.py
kanurag94/addons-server
6bc0642a301b7beb411ca27158982a7e046e875a
[ "BSD-3-Clause" ]
3
2020-03-05T18:17:14.000Z
2020-03-09T01:24:38.000Z
src/olympia/reviewers/tests/test_serializers.py
kanurag94/addons-server
6bc0642a301b7beb411ca27158982a7e046e875a
[ "BSD-3-Clause" ]
null
null
null
src/olympia/reviewers/tests/test_serializers.py
kanurag94/addons-server
6bc0642a301b7beb411ca27158982a7e046e875a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import json from datetime import datetime from django.core.cache import cache from rest_framework.exceptions import NotFound from rest_framework.settings import api_settings from rest_framework.test import APIRequestFactory from olympia import amo from olympia.amo.templatetags.jinja_helpers ...
37.907821
79
0.622872
import json from datetime import datetime from django.core.cache import cache from rest_framework.exceptions import NotFound from rest_framework.settings import api_settings from rest_framework.test import APIRequestFactory from olympia import amo from olympia.amo.templatetags.jinja_helpers import absolutify from ...
true
true
f742e5691bc803d788dd1b44a30d873cce303c4c
1,149
py
Python
RecoLuminosity/LumiProducer/test/analysis/test/crab3_template.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoLuminosity/LumiProducer/test/analysis/test/crab3_template.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoLuminosity/LumiProducer/test/analysis/test/crab3_template.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from WMCore.Configuration import Configuration config = Configuration() #name='Pt15to30' config.section_("General") config.General.requestName = 'PCC_ZeroBias_DataCert_150820' config.General.workArea = 'taskManagement' config.section_("JobType") config.JobType.pluginName = 'Analysis' config.JobType.psetName = 'Run_P...
29.461538
88
0.798956
from WMCore.Configuration import Configuration config = Configuration() config.section_("General") config.General.requestName = 'PCC_ZeroBias_DataCert_150820' config.General.workArea = 'taskManagement' config.section_("JobType") config.JobType.pluginName = 'Analysis' config.JobType.psetName = 'Run_PixVertex_LS.py' ...
true
true
f742e5a589054186c5c6e6c97da42d3bf30de1cf
22,619
py
Python
src/genie/libs/parser/iosxr/show_eigrp.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxr/show_eigrp.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxr/show_eigrp.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
''' show_eigrp.py IOSXR parser for the following commands * 'show eigrp ipv4 neighbors' * 'show eigrp ipv4 vrf {vrf} neighbors' * 'show eigrp ipv6 neighbors' * 'show eigrp ipv6 vrf {vrf} neighbors' * 'show eigrp ipv4 neighbors detail' * 'show eigrp ipv4 vrf {vrf} neighbors detail' * 'sho...
38.664957
89
0.434502
import re from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Any from genie.libs.parser.utils.common import Common class ShowEigrpNeighborsSchema(MetaParser): schema = { 'eigrp_instance': { Any(): { 'vrf': { Any(): ...
true
true
f742e5a6062f29c23ed01231ef5c87fb5ad08599
13,242
py
Python
3D/utilsUAV.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
6
2021-09-15T12:33:20.000Z
2022-03-30T17:40:17.000Z
3D/utilsUAV.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
null
null
null
3D/utilsUAV.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
null
null
null
import sys from std_srvs.srv import Trigger, SetBool, SetBoolRequest from mrs_msgs.srv import Vec4, ReferenceStampedSrv, ReferenceStampedSrvResponse, ReferenceStampedSrvRequest, StringRequest, String, Float64Srv, Float64SrvRequest from mavros_msgs.srv import CommandBool, CommandBoolRequest, SetMode, SetModeRequest impo...
35.312
161
0.635478
import sys from std_srvs.srv import Trigger, SetBool, SetBoolRequest from mrs_msgs.srv import Vec4, ReferenceStampedSrv, ReferenceStampedSrvResponse, ReferenceStampedSrvRequest, StringRequest, String, Float64Srv, Float64SrvRequest from mavros_msgs.srv import CommandBool, CommandBoolRequest, SetMode, SetModeRequest impo...
true
true
f742e667a99294520c8ab45860086c5a29b0083d
7,913
py
Python
litex_boards/targets/trellisboard.py
trabucayre/litex-boards
94b4789286748f90f1c247d95b51470f3e16d1f5
[ "BSD-2-Clause" ]
177
2019-06-13T09:54:49.000Z
2022-03-29T02:25:13.000Z
litex_boards/targets/trellisboard.py
zeldin/litex-boards
d52859d9ef5d8d210118c01ce89e29404ac8d7c6
[ "BSD-2-Clause" ]
347
2019-06-12T17:47:45.000Z
2022-03-30T21:59:01.000Z
litex_boards/targets/trellisboard.py
zeldin/litex-boards
d52859d9ef5d8d210118c01ce89e29404ac8d7c6
[ "BSD-2-Clause" ]
202
2019-06-11T15:01:26.000Z
2022-03-31T16:25:19.000Z
#!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2019 David Shah <dave@ds0.me> # SPDX-License-Identifier: BSD-2-Clause import os import argparse from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex_boards.platforms import trellisboard from litex.bu...
39.964646
123
0.558701
import os import argparse from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex_boards.platforms import trellisboard from litex.build.lattice.trellis import trellis_args, trellis_argdict from litex.soc.cores.clock import * from litex.soc.integration.soc_core import * from ...
true
true
f742e713e16aa8d6e143f9eac9b870bd6a81ae9c
10,694
py
Python
src/streamlink/stream/flvconcat.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
1
2020-06-19T08:34:23.000Z
2020-06-19T08:34:23.000Z
src/streamlink/stream/flvconcat.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
1
2021-01-16T14:13:39.000Z
2022-02-09T10:43:44.000Z
src/streamlink/stream/flvconcat.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
1
2020-07-11T22:09:07.000Z
2020-07-11T22:09:07.000Z
from __future__ import division import logging from collections import namedtuple from io import IOBase from itertools import chain, islice from threading import Thread from ..buffers import RingBuffer from ..packages.flashmedia import FLVError from ..packages.flashmedia.tag import (AudioData, AACAudioData, VideoData...
34.496774
91
0.58977
from __future__ import division import logging from collections import namedtuple from io import IOBase from itertools import chain, islice from threading import Thread from ..buffers import RingBuffer from ..packages.flashmedia import FLVError from ..packages.flashmedia.tag import (AudioData, AACAudioData, VideoData...
true
true
f742e89cac944a35042578518a26b101bfb90ce9
13,637
py
Python
netharn/util/nms/torch_nms.py
angiemsu/netharn
728cb40aad299baf62c689430d07b29c67d8cf21
[ "Apache-2.0" ]
null
null
null
netharn/util/nms/torch_nms.py
angiemsu/netharn
728cb40aad299baf62c689430d07b29c67d8cf21
[ "Apache-2.0" ]
null
null
null
netharn/util/nms/torch_nms.py
angiemsu/netharn
728cb40aad299baf62c689430d07b29c67d8cf21
[ "Apache-2.0" ]
null
null
null
import torch import numpy as np def torch_nms(tlbr, scores, classes=None, thresh=.5, bias=0, fast=False): """ Non maximum suppression implemented with pytorch tensors CURRENTLY NOT WORKING Args: tlbr (Tensor): Bounding boxes of one image in the format (tlbr) scores (Tensor): Scores o...
37.986072
118
0.576226
import torch import numpy as np def torch_nms(tlbr, scores, classes=None, thresh=.5, bias=0, fast=False): if tlbr.numel() == 0: return [] ordered_scores, order = scores.sort(0, descending=True) from netharn import util boxes = util.Boxes(tlbr[order], 'tlbr') ious = boxes.ious(boxes,...
true
true
f742e8a83d8dc2b3ed20891ea8ef42174aca4a4d
1,831
py
Python
toontown/suit/DistributedGridGoon.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/suit/DistributedGridGoon.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
toontown/suit/DistributedGridGoon.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from direct.directnotify import DirectNotifyGlobal from toontown.suit import DistributedGoon from toontown.toonbase import ToontownGlobals from toontown.coghq import MovingPlatform class Distributed...
34.54717
204
0.673949
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from direct.directnotify import DirectNotifyGlobal from toontown.suit import DistributedGoon from toontown.toonbase import ToontownGlobals from toontown.coghq import MovingPlatform class Distributed...
true
true
f742e9337693adb7e633c169b4e8501ed9a8701d
1,009
py
Python
examples/00-load/create-explicit-structured-grid.py
eino/pyvista
b9c4e67d43491958f70b04cd2664965b938910ba
[ "MIT" ]
25
2018-12-03T18:22:58.000Z
2019-02-26T01:30:35.000Z
examples/00-load/create-explicit-structured-grid.py
eino/pyvista
b9c4e67d43491958f70b04cd2664965b938910ba
[ "MIT" ]
108
2019-02-27T19:52:12.000Z
2019-05-08T02:15:21.000Z
examples/00-load/create-explicit-structured-grid.py
eino/pyvista
b9c4e67d43491958f70b04cd2664965b938910ba
[ "MIT" ]
8
2019-03-02T13:41:48.000Z
2019-04-22T16:57:44.000Z
""" .. _ref_create_explicit_structured_grid: Creating an Explicit Structured Grid ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create an explicit structured grid from NumPy arrays. Note this feature is only available for ``vtk>=9``. """ import numpy as np import pyvista as pv ni, nj, nk = 4, 5, 6 si, sj, sk = 20, 10, 1 ...
22.422222
53
0.629336
import numpy as np import pyvista as pv ni, nj, nk = 4, 5, 6 si, sj, sk = 20, 10, 1 xcorn = np.arange(0, (ni + 1) * si, si) xcorn = np.repeat(xcorn, 2) xcorn = xcorn[1:-1] xcorn = np.tile(xcorn, 4 * nj * nk) ycorn = np.arange(0, (nj + 1) * sj, sj) ycorn = np.repeat(ycorn, 2) ycorn = ycorn[1:-1] ycorn = np.tile(yco...
true
true
f742ea4bf26e0e9861980546e4d7dc865781b78a
131
py
Python
2/2-12(strChange).py
sukio-1024/codeitPy
43f4c6d5205eab9cb4780ceb8799b04ce7b10acb
[ "MIT" ]
null
null
null
2/2-12(strChange).py
sukio-1024/codeitPy
43f4c6d5205eab9cb4780ceb8799b04ce7b10acb
[ "MIT" ]
null
null
null
2/2-12(strChange).py
sukio-1024/codeitPy
43f4c6d5205eab9cb4780ceb8799b04ce7b10acb
[ "MIT" ]
null
null
null
year = 2018 month = 7 day = 5 date = "목요일" print("오늘은 " + str(year) + "년 " + str(month) + "월 " + str(day) + "일 " + date +"입니다.")
16.375
85
0.48855
year = 2018 month = 7 day = 5 date = "목요일" print("오늘은 " + str(year) + "년 " + str(month) + "월 " + str(day) + "일 " + date +"입니다.")
true
true
f742eb0cbd325f4b313e939e0e1df4d885f52110
3,949
py
Python
devel/lib/python2.7/dist-packages/kinova_msgs/msg/_FingerPosition.py
madalynlmillen/MadalynMillenCapstone
a1585ba419d4ab4854908b4ba88e4c8ca330b5cd
[ "MIT", "Unlicense" ]
null
null
null
devel/lib/python2.7/dist-packages/kinova_msgs/msg/_FingerPosition.py
madalynlmillen/MadalynMillenCapstone
a1585ba419d4ab4854908b4ba88e4c8ca330b5cd
[ "MIT", "Unlicense" ]
null
null
null
devel/lib/python2.7/dist-packages/kinova_msgs/msg/_FingerPosition.py
madalynlmillen/MadalynMillenCapstone
a1585ba419d4ab4854908b4ba88e4c8ca330b5cd
[ "MIT", "Unlicense" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from kinova_msgs/FingerPosition.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class FingerPosition(genpy.Message): _md5sum = "f56891e5dcd1900989f764a9b845c8e5" _typ...
33.184874
145
0.662446
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class FingerPosition(genpy.Message): _md5sum = "f56891e5dcd1900989f764a9b845c8e5" _type = "kinova_msgs/FingerPosition" _has_header = False _full_text = """float32 finger1 float32 finger2 float32 finger3 """ __sl...
true
true
f742eb44f702d227a482969902ebe10403fc767c
39,886
py
Python
swift/obj/server.py
anishnarang/gswift
7d880a2a60ec21ad1390c1024a06a1a158414b7d
[ "Apache-2.0" ]
null
null
null
swift/obj/server.py
anishnarang/gswift
7d880a2a60ec21ad1390c1024a06a1a158414b7d
[ "Apache-2.0" ]
null
null
null
swift/obj/server.py
anishnarang/gswift
7d880a2a60ec21ad1390c1024a06a1a158414b7d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-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 agree...
47.258294
109
0.586171
import cPickle as pickle import os import multiprocessing import time import traceback import socket import math from swift import gettext_ as _ from hashlib import md5 from eventlet import sleep, wsgi, Timeout from swift.common.utils import public, get_logger, \ config_true_value, timing_stats, r...
true
true
f742ec2a52e205e11826a21a397ed7a5739dd201
4,292
py
Python
scripts/plot_mu_d.py
TiKeil/Trust-region-TSRBLOD-code
70fb396aa07b57028771e3e6e424ab3d1ace10f0
[ "BSD-2-Clause" ]
null
null
null
scripts/plot_mu_d.py
TiKeil/Trust-region-TSRBLOD-code
70fb396aa07b57028771e3e6e424ab3d1ace10f0
[ "BSD-2-Clause" ]
null
null
null
scripts/plot_mu_d.py
TiKeil/Trust-region-TSRBLOD-code
70fb396aa07b57028771e3e6e424ab3d1ace10f0
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # ~~~ # This file is part of the paper: # # "A relaxed localized trust-region reduced basis approach for # optimization of multiscale problems" # # by: Tim Keil and Mario Ohlberger # # https://github.com/TiKeil/Trust-region-TSRBLOD-code # # Copy...
31.792593
116
0.750466
# optimization of multiscale problems" import numpy as np from matplotlib import pyplot as plt from pymor.core.logger import set_log_levels from pymor.core.defaults import set_defaults from pymor.core.cache import disable_caching from pdeopt.tools import print_iterations_and_wal...
true
true
f742ec928099675ffe79e2299b09eb09552b0f89
1,438
py
Python
server/socket_server.py
YouHao0809/Simple-HTTP-Server
f179c4e5a6d48940c1f15024888e68d8d49cf92b
[ "MIT" ]
null
null
null
server/socket_server.py
YouHao0809/Simple-HTTP-Server
f179c4e5a6d48940c1f15024888e68d8d49cf92b
[ "MIT" ]
null
null
null
server/socket_server.py
YouHao0809/Simple-HTTP-Server
f179c4e5a6d48940c1f15024888e68d8d49cf92b
[ "MIT" ]
null
null
null
# -*- encoding=utf-8 -*- import socket import threading class TCPServer: def __init__(self, server_address, handler_class): self.server_address = server_address self.HandlerClass = handler_class self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.is_shutdown = Fal...
27.132075
73
0.613352
import socket import threading class TCPServer: def __init__(self, server_address, handler_class): self.server_address = server_address self.HandlerClass = handler_class self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.is_shutdown = False def serve_f...
true
true
f742edb8998cfca147310e7ae5b1c1ea0a482ebe
5,827
py
Python
basis/trimesh_new/resources/helpers/id_helper.py
liang324/wrs
46eadec355c61a9c7bac1fa0f3cf419b2aac19aa
[ "MIT" ]
null
null
null
basis/trimesh_new/resources/helpers/id_helper.py
liang324/wrs
46eadec355c61a9c7bac1fa0f3cf419b2aac19aa
[ "MIT" ]
null
null
null
basis/trimesh_new/resources/helpers/id_helper.py
liang324/wrs
46eadec355c61a9c7bac1fa0f3cf419b2aac19aa
[ "MIT" ]
null
null
null
""" features.py --------------- In trimesh.comparison, we arbitrarily threshold identifier values at a certain number of significant figures. This file permutates meshes around and observes how their identifier, which is supposed to be pretty invariant to translation and tessellation changes. We use this to generate ...
29.57868
79
0.562382
import numpy as np import trimesh import time import json import os import collections import logging TOL_ZERO = 1e-12 def permutations(mesh, function=lambda x: x.identifier, displacement_max=1e-8, count=1000, subdivisions=2, cut...
true
true
f742ef7c8af87258cb1f9be4b320213de6cf6d5c
11,762
py
Python
train_NFM.py
mingcv/Bread
20dedfe2105b08ce8499b216c3c2bfd3699af17f
[ "Apache-2.0" ]
24
2021-12-01T02:13:54.000Z
2022-02-06T06:40:40.000Z
train_NFM.py
mingcv/Bread
20dedfe2105b08ce8499b216c3c2bfd3699af17f
[ "Apache-2.0" ]
null
null
null
train_NFM.py
mingcv/Bread
20dedfe2105b08ce8499b216c3c2bfd3699af17f
[ "Apache-2.0" ]
6
2021-12-01T02:14:11.000Z
2021-12-23T12:50:06.000Z
import argparse import datetime import os import traceback import kornia import numpy as np import torch import torch.nn.functional as F from torch import nn from torch.utils.data import DataLoader from tqdm.autonotebook import tqdm import models from datasets import LowLightDataset, LowLightFDataset from models impo...
42.007143
128
0.574902
import argparse import datetime import os import traceback import kornia import numpy as np import torch import torch.nn.functional as F from torch import nn from torch.utils.data import DataLoader from tqdm.autonotebook import tqdm import models from datasets import LowLightDataset, LowLightFDataset from models impo...
true
true
f742efae9ae312c269de77207518392625219638
1,323
py
Python
reddit_functions.py
rishooty/vrec-dat-filter
87523e1fd56eaee4e0d0f70ac0f7e40683e9561b
[ "MIT" ]
9
2017-08-13T04:28:30.000Z
2019-09-24T06:33:25.000Z
reddit_functions.py
rishooty/vrec-dat-filter
87523e1fd56eaee4e0d0f70ac0f7e40683e9561b
[ "MIT" ]
6
2017-08-15T08:53:47.000Z
2022-03-02T14:53:53.000Z
reddit_functions.py
rishooty/vrec-dat-filter
87523e1fd56eaee4e0d0f70ac0f7e40683e9561b
[ "MIT" ]
2
2017-09-05T19:29:47.000Z
2020-02-20T13:52:52.000Z
import praw class RedditRelevancyChecker: """ Class containing all reddit related methods.""" def __init__(self, system, time='month', client_id='JWw9vCj6-fEBfQ'): self.reddit = praw.Reddit(client_id=client_id, client_secret=None, us...
30.068182
118
0.596372
import praw class RedditRelevancyChecker: def __init__(self, system, time='month', client_id='JWw9vCj6-fEBfQ'): self.reddit = praw.Reddit(client_id=client_id, client_secret=None, user_agent='vRecDatFilter') self.system = system ...
true
true
f742f04660277f197ca351c852b0588a4ead2aa8
840
py
Python
usetup.py
codacy-badger/pycayennelpp
e822f49d46edd78ae49d186a14731a69cd8e9330
[ "MIT" ]
null
null
null
usetup.py
codacy-badger/pycayennelpp
e822f49d46edd78ae49d186a14731a69cd8e9330
[ "MIT" ]
null
null
null
usetup.py
codacy-badger/pycayennelpp
e822f49d46edd78ae49d186a14731a69cd8e9330
[ "MIT" ]
null
null
null
from setuptools import setup import sdist_upip def readme(): with open('README.md') as f: return f.read() setup( name='micropython-pycayennelpp', version='2.0.0', description='Encoder and Decoder for CayenneLLP', long_description=readme(), long_description_content_type='text/markdown...
27.096774
73
0.659524
from setuptools import setup import sdist_upip def readme(): with open('README.md') as f: return f.read() setup( name='micropython-pycayennelpp', version='2.0.0', description='Encoder and Decoder for CayenneLLP', long_description=readme(), long_description_content_type='text/markdown...
true
true
f742f07f1d9b244389aab9a84121d44ed0125412
418
py
Python
django_eveonline_connector/migrations/0016_auto_20200226_1730.py
KryptedGaming/django-eveonline-connector
95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0
[ "MIT" ]
3
2020-03-07T13:58:45.000Z
2021-02-06T20:16:50.000Z
django_eveonline_connector/migrations/0016_auto_20200226_1730.py
KryptedGaming/django-eveonline-connector
95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0
[ "MIT" ]
66
2019-12-17T20:54:22.000Z
2021-06-10T20:39:04.000Z
django_eveonline_connector/migrations/0016_auto_20200226_1730.py
KryptedGaming/django-eveonline-connector
95fa146f4fcdf6bce84548b5cac1e5bf09cd72a0
[ "MIT" ]
2
2020-01-17T20:04:52.000Z
2021-07-11T22:11:42.000Z
# Generated by Django 2.2.10 on 2020-02-26 17:30 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_eveonline_connector', '0015_merge_20200226_1503'), ] operations = [ migrations.AlterModelOptions( name='eveclient', ...
23.222222
92
0.641148
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_eveonline_connector', '0015_merge_20200226_1503'), ] operations = [ migrations.AlterModelOptions( name='eveclient', options={'verbose_name': 'Eve Settings', 'verbos...
true
true
f742f13fcf3b97145b185d322f9f6c21ac87788a
5,721
py
Python
tf_agents/bandits/policies/policy_utilities.py
NunoEdgarGFlowHub/agents-1
c62215debda5bf5d89723f4112f1e3e2f063cd52
[ "Apache-2.0" ]
null
null
null
tf_agents/bandits/policies/policy_utilities.py
NunoEdgarGFlowHub/agents-1
c62215debda5bf5d89723f4112f1e3e2f063cd52
[ "Apache-2.0" ]
null
null
null
tf_agents/bandits/policies/policy_utilities.py
NunoEdgarGFlowHub/agents-1
c62215debda5bf5d89723f4112f1e3e2f063cd52
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The TF-Agents 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 applicable law...
35.75625
79
0.761231
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow as tf from tf_agents.specs import tensor_spec from tf_agents.trajectories import policy_step from tf_agents.utils import common class InfoFields(object)...
true
true
f742f19d806c7ecc7eb26d4c6c685cd5bc3880f0
2,739
py
Python
tests/integration_tests/scripts/run_train_comet.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
1
2021-06-26T07:52:12.000Z
2021-06-26T07:52:12.000Z
tests/integration_tests/scripts/run_train_comet.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/scripts/run_train_comet.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
1
2019-09-05T09:19:39.000Z
2019-09-05T09:19:39.000Z
# Tests the following end-to-end: # # 1. Comet is imported # 2. Conflicting modules (i.e., TensorFlow) are not imported # 3. Overridden methods are called (train_init, train_model, etc.) and run without error # # This test runs in an isolated environment to ensure TensorFlow imports are not leaked # from previous tests...
32.607143
88
0.729463
import comet_ml import argparse import os import shutil import sys from unittest.mock import patch, Mock os.environ['COMET_API_KEY'] = 'key' from ludwig.api import LudwigModel from ludwig.contribs.comet import CometCallback PATH_HERE = os.path.abspath(os.path.dirname(__file__)) PATH_ROOT = os.path.join(P...
true
true
f742f1c07a327a6b02cf35fc224ab8c01728ab70
3,114
py
Python
raspberry/source/thread_utils.py
muma378/intelligent_house
f1939fdb65fb694c8d9ab02b74310ad70b04a35f
[ "MIT" ]
null
null
null
raspberry/source/thread_utils.py
muma378/intelligent_house
f1939fdb65fb694c8d9ab02b74310ad70b04a35f
[ "MIT" ]
null
null
null
raspberry/source/thread_utils.py
muma378/intelligent_house
f1939fdb65fb694c8d9ab02b74310ad70b04a35f
[ "MIT" ]
null
null
null
import threading import subprocess import time import thread import settings from errors import MultiObjectsError logger = settings.logger class ThreadPlayer(threading.Thread): ''' This threading ought to play songs which in the playlist via the command "mplayer url" As an optional parameter, mins represents th...
27.078261
93
0.700064
import threading import subprocess import time import thread import settings from errors import MultiObjectsError logger = settings.logger class ThreadPlayer(threading.Thread): _instance = None def __new__(cls, *args, **kwargs): if cls._instance: raise MultiObjectsError("Only one player thread can exist at t...
true
true
f742f26c28c7c3a73d4b2ddb5f1a0f6b5b27fe04
7,403
py
Python
Connect4Game-x64/connect_4_options2.py
xenz25/Connect4GameMysteryEdition-Python
00c7e9a08ef4eb59fd2d04e9b9f4fc8829c9acce
[ "MIT" ]
1
2021-07-19T06:43:55.000Z
2021-07-19T06:43:55.000Z
Connect4Game-x64/connect_4_options2.py
xenz25/Connect4GameMysteryEdition-Python
00c7e9a08ef4eb59fd2d04e9b9f4fc8829c9acce
[ "MIT" ]
null
null
null
Connect4Game-x64/connect_4_options2.py
xenz25/Connect4GameMysteryEdition-Python
00c7e9a08ef4eb59fd2d04e9b9f4fc8829c9acce
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------- # Name: CONNECT 4 GAME # Purpose: PROJECT FOR GAME DEVELOPMENT IN OOP # # Author: GROUP CATACUTAN, PASCUAL, LAURENT, VENERACION # # Created: 30/10/2019 # Copyright: (c) XENON_XEIN_XENLY 2019 # Licence: <your licen...
38.759162
119
0.486424
import pygame as pg from pygame.locals import * from connect_4_images import * from connect_4_scene_switch import * from _connect4_logic import * class OPTIONS2(): def __init__(self): self.gear_bottom_right = ROTATE(image.GEAR,(1336,610),1.5) self.gear_bottom = ROTATE(image.GEAR,(1030,7...
true
true