hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
485e47889cf0e06f86945cb9c271319ee0ab37ea
6,749
py
Python
CM3D2 Converter/misc_TEXT_HT_header.py
Algester/Blender-CM3D2-Converter
eb1df082ac72aa013dc996427bcee563b1fedaae
[ "Apache-2.0" ]
22
2016-07-05T16:31:37.000Z
2022-03-12T04:36:32.000Z
CM3D2 Converter/misc_TEXT_HT_header.py
Algester/Blender-CM3D2-Converter
eb1df082ac72aa013dc996427bcee563b1fedaae
[ "Apache-2.0" ]
3
2020-06-07T01:25:47.000Z
2020-11-20T12:45:49.000Z
CM3D2 Converter/misc_TEXT_HT_header.py
Algester/Blender-CM3D2-Converter
eb1df082ac72aa013dc996427bcee563b1fedaae
[ "Apache-2.0" ]
9
2019-09-15T08:21:21.000Z
2022-03-12T04:36:35.000Z
# 「テキストエディター」エリア → ヘッダー import bpy from . import common from . import compat # メニュー等に項目追加 @compat.BlRegister() @compat.BlRegister() @compat.BlRegister() @compat.BlRegister()
37.494444
119
0.610016
# 「テキストエディター」エリア → ヘッダー import bpy from . import common from . import compat # メニュー等に項目追加 def menu_func(self, context): texts = bpy.data.texts text_keys = texts.keys() self.layout.label(text="CM3D2用:", icon_value=common.kiss_icon()) row = self.layout.row(align=True) if 'BoneData' in text_keys: ...
5,287
1,606
110
43589412bf6bbd0b8acf7e3f218cda6cdcadc108
116
py
Python
app/util/__init__.py
DrunkenPandaFans/dj-panda
a3e0afa5edc9910299d46f167bf01abfb8ab1d0c
[ "MIT" ]
null
null
null
app/util/__init__.py
DrunkenPandaFans/dj-panda
a3e0afa5edc9910299d46f167bf01abfb8ab1d0c
[ "MIT" ]
null
null
null
app/util/__init__.py
DrunkenPandaFans/dj-panda
a3e0afa5edc9910299d46f167bf01abfb8ab1d0c
[ "MIT" ]
null
null
null
from loader import Loader from metadataloader import WrongHeaderException from metadataloader import MetaDataLoader
29
47
0.896552
from loader import Loader from metadataloader import WrongHeaderException from metadataloader import MetaDataLoader
0
0
0
136d26974fe8ec6f8b20b7bb62924a94c94b870e
6,952
py
Python
homeassistant/components/media_player/cmus.py
shire210/home-assistant
63cd8bbee6f1b74ae9c6c249ac820119a8a573d8
[ "Apache-2.0" ]
2
2017-02-25T00:27:06.000Z
2017-02-25T03:09:30.000Z
homeassistant/components/media_player/cmus.py
shire210/home-assistant
63cd8bbee6f1b74ae9c6c249ac820119a8a573d8
[ "Apache-2.0" ]
1
2017-03-10T22:17:06.000Z
2017-03-10T22:17:06.000Z
homeassistant/components/media_player/cmus.py
shire210/home-assistant
63cd8bbee6f1b74ae9c6c249ac820119a8a573d8
[ "Apache-2.0" ]
2
2018-06-03T11:14:44.000Z
2018-11-04T18:18:12.000Z
""" Support for interacting with and controlling the cmus music player. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cmus/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_MU...
31.035714
77
0.631617
""" Support for interacting with and controlling the cmus music player. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cmus/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_MU...
0
0
0
a3be5b5f50e1b1fb3f0cb8c0a060034c5377d0ef
459
py
Python
api/v2/serializers/details/help_link.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
api/v2/serializers/details/help_link.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
api/v2/serializers/details/help_link.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from rest_framework.exceptions import ValidationError from core.models.template import HelpLink
24.157895
69
0.649237
from rest_framework import serializers from rest_framework.exceptions import ValidationError from core.models.template import HelpLink class HelpLinkSerializer(serializers.ModelSerializer): def create(self, validated_data): raise ValidationError("Cannot create new help links via API") class Meta: ...
82
217
23
729bfaaaa4f5e69da4fae3b06567759718e758f5
238
py
Python
code/utils/__init__.py
niuwk/infonets
274e97c9a86144dd52cbe90caffff578a2f5d178
[ "BSD-3-Clause" ]
8
2018-06-20T23:20:43.000Z
2020-01-12T01:32:06.000Z
code/utils/__init__.py
niuwk/infonets
274e97c9a86144dd52cbe90caffff578a2f5d178
[ "BSD-3-Clause" ]
null
null
null
code/utils/__init__.py
niuwk/infonets
274e97c9a86144dd52cbe90caffff578a2f5d178
[ "BSD-3-Clause" ]
4
2018-06-26T20:28:13.000Z
2021-06-17T13:39:56.000Z
from __future__ import absolute_import, division, print_function, unicode_literals from .config import * from .data import * from .display import * from .helper import * from .methods import * from .misc import * from .whiten import *
19.833333
82
0.768908
from __future__ import absolute_import, division, print_function, unicode_literals from .config import * from .data import * from .display import * from .helper import * from .methods import * from .misc import * from .whiten import *
0
0
0
0ae15f7dfa871a72cf29d7ba864765e0b6e824d0
5,906
py
Python
generate_rules.py
denilsonsa/udev-not-joystick
030ee83f50c0ffb10becf7a3afa847fef3bf810b
[ "Naumen", "Condor-1.1", "MS-PL" ]
122
2015-10-25T18:03:01.000Z
2022-03-22T23:32:51.000Z
generate_rules.py
denilsonsa/udev-not-joystick
030ee83f50c0ffb10becf7a3afa847fef3bf810b
[ "Naumen", "Condor-1.1", "MS-PL" ]
36
2015-10-25T12:40:37.000Z
2022-02-13T20:39:16.000Z
generate_rules.py
denilsonsa/udev-not-joystick
030ee83f50c0ffb10becf7a3afa847fef3bf810b
[ "Naumen", "Condor-1.1", "MS-PL" ]
41
2015-10-28T04:34:07.000Z
2021-12-19T23:51:41.000Z
#!/usr/bin/env python3 import os.path import textwrap # List of tuples ('idVendor', 'idProduct'), as four hexadecimal digits. DEVICES = [ # Microsoft Microsoft Wireless Optical Desktop® 2.10 # Microsoft Wireless Desktop - Comfort Edition ('045e', '009d'), # Microsoft Microsoft® Digital Media Pro Keyb...
41.886525
186
0.629529
#!/usr/bin/env python3 import os.path import textwrap # List of tuples ('idVendor', 'idProduct'), as four hexadecimal digits. DEVICES = [ # Microsoft Microsoft Wireless Optical Desktop® 2.10 # Microsoft Wireless Desktop - Comfort Edition ('045e', '009d'), # Microsoft Microsoft® Digital Media Pro Keyb...
1,903
0
69
6bf3de2c08c19066ab234342ae66eb72ed2ff3e6
1,517
py
Python
test/unittests/test_autorest_api.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
test/unittests/test_autorest_api.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
test/unittests/test_autorest_api.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from autor...
34.477273
76
0.630191
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from autor...
1,129
0
23
208b4494095e6039959b5dae0d5bb99bbacfa658
1,209
py
Python
setup.py
tdcosim/SolarPV-DER-simulation-utility
03fb1cfd4d255117faced84cf61cd5b7ae59f69f
[ "BSD-3-Clause" ]
16
2019-04-09T19:37:38.000Z
2020-10-31T04:17:37.000Z
setup.py
sibyjackgrove/SolarPV-DER-simulation-utility
03fb1cfd4d255117faced84cf61cd5b7ae59f69f
[ "BSD-3-Clause" ]
10
2019-07-24T16:40:33.000Z
2021-02-04T20:31:53.000Z
setup.py
tdcosim/SolarPV-DER-simulation-utility
03fb1cfd4d255117faced84cf61cd5b7ae59f69f
[ "BSD-3-Clause" ]
4
2019-09-10T20:14:42.000Z
2020-07-25T23:50:09.000Z
import os from setuptools import setup # The text of the README file f=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'README.md')) README=f.read() f.close() setup(name='pvder', version=open("pvder/_version.py").readlines()[-1].split()[-1].strip("\"'"), packages=['pvder',], include_pac...
37.78125
112
0.634409
import os from setuptools import setup # The text of the README file f=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'README.md')) README=f.read() f.close() setup(name='pvder', version=open("pvder/_version.py").readlines()[-1].split()[-1].strip("\"'"), packages=['pvder',], include_pac...
0
0
0
2e003daec1ca05e555a7434ce8e3784ed2e0b0ae
11,929
py
Python
tests/test_zonal.py
andreas-h/python-raster-stats
41d252c69c4a233ebc60f0569bd8286e9526d3db
[ "BSD-3-Clause" ]
1
2017-10-15T15:52:14.000Z
2017-10-15T15:52:14.000Z
tests/test_zonal.py
andreas-h/python-raster-stats
41d252c69c4a233ebc60f0569bd8286e9526d3db
[ "BSD-3-Clause" ]
null
null
null
tests/test_zonal.py
andreas-h/python-raster-stats
41d252c69c4a233ebc60f0569bd8286e9526d3db
[ "BSD-3-Clause" ]
null
null
null
# test zonal stats import os import pytest from osgeo import ogr from rasterstats import raster_stats, stats_to_csv, RasterStatsError from rasterstats.main import VALID_STATS from rasterstats.utils import shapely_to_ogr_type, parse_geo, get_ogr_ds, \ OGRError, feature_to_geojson, bbox_to_p...
37.161994
346
0.672563
# test zonal stats import os import pytest from osgeo import ogr from rasterstats import raster_stats, stats_to_csv, RasterStatsError from rasterstats.main import VALID_STATS from rasterstats.utils import shapely_to_ogr_type, parse_geo, get_ogr_ds, \ OGRError, feature_to_geojson, bbox_to_p...
10,401
0
918
6d1b5b98c7991420db6dcbac8a7dd1b5def81cfc
10,802
py
Python
login_page_first.py
proacc2022/NCDS
45afffa5c90cd5cc0cf9fc199349c2b6040c37f5
[ "MIT" ]
null
null
null
login_page_first.py
proacc2022/NCDS
45afffa5c90cd5cc0cf9fc199349c2b6040c37f5
[ "MIT" ]
null
null
null
login_page_first.py
proacc2022/NCDS
45afffa5c90cd5cc0cf9fc199349c2b6040c37f5
[ "MIT" ]
null
null
null
from tkinter import * import tkinter as tk import tkinter.messagebox import tkinter.font as tkFont from PIL import Image,ImageTk import os import sqlite3 import datetime from civilian_home import civ_home from acp_home import acp_home from constable_home import const_home from sys_home import system_home ...
47.79646
602
0.669413
from tkinter import * import tkinter as tk import tkinter.messagebox import tkinter.font as tkFont from PIL import Image,ImageTk import os import sqlite3 import datetime from civilian_home import civ_home from acp_home import acp_home from constable_home import const_home from sys_home import system_home ...
1,993
0
100
f4d07cab853998e94b41d3ffb56b1ab1d49e28bb
1,470
py
Python
clastic/tests/test_static.py
mahmoud/clastic
4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7
[ "BSD-3-Clause" ]
140
2015-02-11T19:03:30.000Z
2022-03-12T23:30:46.000Z
clastic/tests/test_static.py
mahmoud/clastic
4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7
[ "BSD-3-Clause" ]
21
2015-09-16T04:33:09.000Z
2021-11-08T04:46:32.000Z
clastic/tests/test_static.py
mahmoud/clastic
4dd03cc25247dcedbb3e0cd1089bef8eefd32bf7
[ "BSD-3-Clause" ]
22
2015-09-15T19:30:06.000Z
2021-11-05T17:22:20.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from clastic import Application, StaticApplication, StaticFileRoute _CUR_DIR = os.path.dirname(os.path.abspath(__file__))
34.186047
109
0.664626
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from clastic import Application, StaticApplication, StaticFileRoute _CUR_DIR = os.path.dirname(os.path.abspath(__file__)) def test_basic_static_serve(): static_app = StaticApplication(_CUR_DIR) app = Application([('/static/', static_...
1,223
0
46
27a69b32835653f5833e413c6df8b6d71ff2add8
296
py
Python
rivalcfg/profiles/rival300csgofadeeditionstm32.py
BenJuan26/rivalcfg
a4b434147d4888aa35287a40b8aa0be9408a28f1
[ "WTFPL" ]
null
null
null
rivalcfg/profiles/rival300csgofadeeditionstm32.py
BenJuan26/rivalcfg
a4b434147d4888aa35287a40b8aa0be9408a28f1
[ "WTFPL" ]
1
2020-05-09T06:12:34.000Z
2020-07-31T23:58:55.000Z
rivalcfg/profiles/rival300csgofadeeditionstm32.py
BenJuan26/rivalcfg
a4b434147d4888aa35287a40b8aa0be9408a28f1
[ "WTFPL" ]
null
null
null
from .rival300csgofadeedition import rival300csgofadeedition rival300csgofadeeditionstm32 = { "name": "SteelSeries Rival 300 CS:GO Fade Edition (stm32)", "vendor_id": 0x1038, "product_id": 0x1716, "interface_number": 0, "commands": rival300csgofadeedition["commands"], }
21.142857
63
0.722973
from .rival300csgofadeedition import rival300csgofadeedition rival300csgofadeeditionstm32 = { "name": "SteelSeries Rival 300 CS:GO Fade Edition (stm32)", "vendor_id": 0x1038, "product_id": 0x1716, "interface_number": 0, "commands": rival300csgofadeedition["commands"], }
0
0
0
1642a81148ba8a39cfb9b6e7eaf0edc2d0068c45
2,942
py
Python
venv/Lib/site-packages/rest_framework/mixins.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
venv/Lib/site-packages/rest_framework/mixins.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
venv/Lib/site-packages/rest_framework/mixins.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
""" Basic building blocks for generic class based views. We don't bind behaviour to http method handlers yet, which allows mixin classes to be composed in interesting ways. """ from rest_framework import status from rest_framework.response import Response from rest_framework.settings import api_settings class Create...
29.128713
89
0.670292
""" Basic building blocks for generic class based views. We don't bind behaviour to http method handlers yet, which allows mixin classes to be composed in interesting ways. """ from rest_framework import status from rest_framework.response import Response from rest_framework.settings import api_settings class Create...
2,015
0
270
122e95d4baae685b706171f2dece5179f5075bb8
1,448
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iam/models/PasswordPolicy.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
36.2
114
0.70511
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
0
956
23
46c492579f3a6a53a967d7c529429054efe10656
674
py
Python
command/Assignment/Solution/security_commands.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
command/Assignment/Solution/security_commands.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
command/Assignment/Solution/security_commands.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
from actions.security import Security from command_abc import AbsCommand
24.071429
47
0.630564
from actions.security import Security from command_abc import AbsCommand class SecurityArmCommand(AbsCommand): def __init__(self, security): if not isinstance(security, Security): raise TypeError self.security = security def execute(self): self.security.arm() ...
342
35
219
346c9fbe4b8cd7d6a72238b1d822157888c23cd2
1,299
py
Python
sorting/quicksort.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
sorting/quicksort.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
sorting/quicksort.py
nipuntalukdar/algodatasructs
a50058f355115b4d45864a04e0e0aa492f006d18
[ "MIT" ]
null
null
null
if __name__ == '__main__': import random j = 1 while j <= 1000: x = [random.randint(0,999999999999) for i in range(0,j)] y = [a for a in x] z = [a for a in x] y.sort() quick_sort(x, 0, len(x) - 1) if y != x: print("Sorting failed for {}".format(z)...
27.0625
64
0.461894
def quick_sort(arr, start, end): if start == end: return if end - start == 1: if arr[start] > arr[end]: arr[end], arr[start] = arr[start],arr[end] return i = start + 1 j = end pivot = arr[start] while i <= j: if arr[i] <= pivot: i += 1 ...
867
0
22
f4ea2628c2086ae731105fbb0a4174a279be290e
4,940
py
Python
qqbot/core/network/ws/ws_intents_handler.py
tencent-connect/botpy
275f96f0859b63110b095711838c738ad6a9cc1e
[ "MIT" ]
63
2021-12-27T05:55:07.000Z
2022-03-28T12:28:53.000Z
qqbot/core/network/ws/ws_intents_handler.py
tencent-connect/botpy
275f96f0859b63110b095711838c738ad6a9cc1e
[ "MIT" ]
9
2022-01-06T03:33:30.000Z
2022-03-27T10:49:36.000Z
qqbot/core/network/ws/ws_intents_handler.py
tencent-connect/botpy
275f96f0859b63110b095711838c738ad6a9cc1e
[ "MIT" ]
12
2021-12-31T07:46:12.000Z
2022-03-28T13:34:09.000Z
# -*- coding: utf-8 -*- from enum import Enum from qqbot.core.network.ws.ws_event import WsEvent from qqbot.core.network.ws.ws_handler import DefaultHandler def register_handlers(handlers): """ RegisterHandlers 注册事件回调,并返回 intent 用于 websocket 的鉴权 """ intent = 0 for handler in handlers: ...
31.666667
95
0.777328
# -*- coding: utf-8 -*- from enum import Enum from qqbot.core.network.ws.ws_event import WsEvent from qqbot.core.network.ws.ws_handler import DefaultHandler class Handler: def __init__(self, handler_type, callback): self.type = handler_type self.callback = callback def register_handlers(handle...
2,608
448
371
6a5b7b85e25ad6e52a7e2f33c9b07580428c05e1
210
py
Python
dmk/b_cryptoblobs/__init__.py
rtmigo/ksf_py
63be2af622181e8c2bbe4b318f4b780a38ee6606
[ "MIT" ]
2
2021-06-22T18:24:42.000Z
2021-10-04T12:03:04.000Z
dmk/b_cryptoblobs/__init__.py
rtmigo/ksf_py
63be2af622181e8c2bbe4b318f4b780a38ee6606
[ "MIT" ]
null
null
null
dmk/b_cryptoblobs/__init__.py
rtmigo/ksf_py
63be2af622181e8c2bbe4b318f4b780a38ee6606
[ "MIT" ]
1
2021-06-20T04:04:51.000Z
2021-06-20T04:04:51.000Z
# SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo> # SPDX-License-Identifier: MIT from ._20_encdec_part import DecryptedIO from ._30_encdec_multipart import MultipartEncryptor, decrypt_from_dios
30
71
0.82381
# SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo> # SPDX-License-Identifier: MIT from ._20_encdec_part import DecryptedIO from ._30_encdec_multipart import MultipartEncryptor, decrypt_from_dios
0
0
0
f29f5bf6f7181d82bf8e1b8f19f689662b5e9ef0
97
py
Python
mort/__init__.py
brycepg/mort
9d79144ff2fcd68af96b8140ab6d42a6a0e83abc
[ "MIT" ]
2
2019-08-01T15:04:49.000Z
2021-04-18T01:11:09.000Z
mort/__init__.py
brycepg/mort
9d79144ff2fcd68af96b8140ab6d42a6a0e83abc
[ "MIT" ]
null
null
null
mort/__init__.py
brycepg/mort
9d79144ff2fcd68af96b8140ab6d42a6a0e83abc
[ "MIT" ]
null
null
null
"""Automatically run post mortem debugging""" from .mort import main, run __version__ = "0.9.1"
19.4
45
0.721649
"""Automatically run post mortem debugging""" from .mort import main, run __version__ = "0.9.1"
0
0
0
fd2dc8edc7e3699bebcc9491b9169fabae740d5a
22,860
py
Python
claimgen_entity.py
allenai/scientific-claim-generation
4b8890e2fbeab443cde43f8f49ba989f8e183a61
[ "Apache-2.0" ]
6
2022-03-24T04:17:30.000Z
2022-03-30T17:34:24.000Z
claimgen_entity.py
allenai/scientific-claim-generation
4b8890e2fbeab443cde43f8f49ba989f8e183a61
[ "Apache-2.0" ]
null
null
null
claimgen_entity.py
allenai/scientific-claim-generation
4b8890e2fbeab443cde43f8f49ba989f8e183a61
[ "Apache-2.0" ]
null
null
null
import argparse import random import numpy as np import torch import spacy import scispacy import json import os import pandas as pd from spacy.training import Example from tqdm import tqdm from datasets import Dataset from functools import partial from custom_trainer import CustomTrainer import ipdb from collections ...
42.022059
133
0.646588
import argparse import random import numpy as np import torch import spacy import scispacy import json import os import pandas as pd from spacy.training import Example from tqdm import tqdm from datasets import Dataset from functools import partial from custom_trainer import CustomTrainer import ipdb from collections ...
534
0
49
01c534ccc2c61e899ecd5e35875b52f9b079b3b7
1,442
py
Python
tests/core/context/test_add_portfolio_manager.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
1
2019-12-23T21:23:45.000Z
2019-12-23T21:23:45.000Z
tests/core/context/test_add_portfolio_manager.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
null
null
null
tests/core/context/test_add_portfolio_manager.py
investing-algorithms/investing-algorithm-framework
d579e142a3857e2e2dfb59b7d6e54202f7df5466
[ "Apache-2.0" ]
1
2019-12-23T21:23:50.000Z
2019-12-23T21:23:50.000Z
from typing import List from investing_algorithm_framework import SQLLitePortfolioManager, Position, \ Order from investing_algorithm_framework.core.exceptions import OperationalException from investing_algorithm_framework.core.models import AssetPrice from tests.resources import TestBase
32.044444
83
0.706657
from typing import List from investing_algorithm_framework import SQLLitePortfolioManager, Position, \ Order from investing_algorithm_framework.core.exceptions import OperationalException from investing_algorithm_framework.core.models import AssetPrice from tests.resources import TestBase class MyPortfolioManage...
875
170
100
e9db867e258c76d19aa20449fdb22216123194fa
94
py
Python
azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py
globocom/azkaban-jobtype-cookiecutter
f586441d990493734c663d26b0f6b54984ccc945
[ "MIT" ]
null
null
null
azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py
globocom/azkaban-jobtype-cookiecutter
f586441d990493734c663d26b0f6b54984ccc945
[ "MIT" ]
null
null
null
azkaban-jobtype-{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/auror_azkaban_jobtype_{{cookiecutter.project_name.lower()}}/v2/params.py
globocom/azkaban-jobtype-cookiecutter
f586441d990493734c663d26b0f6b54984ccc945
[ "MIT" ]
null
null
null
from auror_core.v2.params import Params class {{cookiecutter.project_name}}(Params): pass
23.5
44
0.776596
from auror_core.v2.params import Params class {{cookiecutter.project_name}}(Params): pass
0
0
0
a6e19736a54a93a571242f4a476a7420ab121d6e
1,162
py
Python
mywayback.py
jsyk/mywayback
df007383db01dd0cde3434ea9426e1decb211308
[ "MIT" ]
null
null
null
mywayback.py
jsyk/mywayback
df007383db01dd0cde3434ea9426e1decb211308
[ "MIT" ]
null
null
null
mywayback.py
jsyk/mywayback
df007383db01dd0cde3434ea9426e1decb211308
[ "MIT" ]
null
null
null
import sys, getopt from os import path import time from configure import Configure from scanner import FoundFile, Scanner from checker import Checker from taker import Taker print("** Welcome to MyWayback! **") args = sys.argv[1:] if len(args) == 0: print("ERROR: Missing command-line argument!") exit(0) targetba...
22.784314
79
0.724613
import sys, getopt from os import path import time from configure import Configure from scanner import FoundFile, Scanner from checker import Checker from taker import Taker print("** Welcome to MyWayback! **") args = sys.argv[1:] if len(args) == 0: print("ERROR: Missing command-line argument!") exit(0) targetba...
0
0
0
ffb2de928830135b7881a885266b8f6b7bc6914f
2,321
py
Python
woodblock/scenario.py
fkie-cad/woodblock
ac4a590744021540fc7388765629bf3367f89e2e
[ "MIT" ]
8
2019-08-14T08:57:21.000Z
2022-02-18T01:35:24.000Z
woodblock/scenario.py
fkie-cad/woodblock
ac4a590744021540fc7388765629bf3367f89e2e
[ "MIT" ]
1
2020-01-24T23:38:36.000Z
2020-02-27T14:00:59.000Z
woodblock/scenario.py
fkie-cad/woodblock
ac4a590744021540fc7388765629bf3367f89e2e
[ "MIT" ]
2
2019-08-22T15:30:53.000Z
2020-01-24T23:11:34.000Z
"""This module contains file carving scenario related classes and functions.""" from multimethod import multimethod import woodblock.fragments class Scenario(list): """This class represents a file carving scenario. A scenario contains fragments in a certain order. Args: name: The name of the s...
29.379747
100
0.612236
"""This module contains file carving scenario related classes and functions.""" from multimethod import multimethod import woodblock.fragments class Scenario(list): """This class represents a file carving scenario. A scenario contains fragments in a certain order. Args: name: The name of the s...
249
0
80
4c531e2c199cc4a3c924b62cbb1447d4a462d527
490
py
Python
webdev/users/urls.py
h-zanetti/real-estate-manager
a526cfccf9589629c03ac7e3afe760ade0e48b7d
[ "MIT" ]
null
null
null
webdev/users/urls.py
h-zanetti/real-estate-manager
a526cfccf9589629c03ac7e3afe760ade0e48b7d
[ "MIT" ]
22
2021-04-23T19:03:10.000Z
2021-08-13T14:57:37.000Z
webdev/users/urls.py
h-zanetti/real-estate-manager
a526cfccf9589629c03ac7e3afe760ade0e48b7d
[ "MIT" ]
null
null
null
from django.urls import path from . import views from django.contrib.auth import views as auth_views urlpatterns = [ path('registro/', views.registro, name='registro'), path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_vie...
44.545455
97
0.732653
from django.urls import path from . import views from django.contrib.auth import views as auth_views urlpatterns = [ path('registro/', views.registro, name='registro'), path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_vie...
0
0
0
b47cac1ac9a109cefa86744f5d3542882c843b14
1,557
py
Python
setup.py
SYAN83/pytorch-learn
f734baf0b837d7c87647ab43ca5de9248849dfa9
[ "MIT" ]
null
null
null
setup.py
SYAN83/pytorch-learn
f734baf0b837d7c87647ab43ca5de9248849dfa9
[ "MIT" ]
1
2019-02-24T07:39:02.000Z
2019-02-24T07:39:02.000Z
setup.py
SYAN83/pytorch-learn
f734baf0b837d7c87647ab43ca5de9248849dfa9
[ "MIT" ]
null
null
null
from setuptools import setup import re APP_NAME = 'ptlearn' VERSION = '0.1' if __name__ == '__main__': check_version() setup( name=APP_NAME, version=VERSION, description='A Python machine learing library, based on PyTorch', long_description=readme(), classifiers=[ ...
27.315789
73
0.558125
from setuptools import setup import re APP_NAME = 'ptlearn' VERSION = '0.1' def readme(): with open('README.rst', 'r') as f: return f.read() def check_version(): global VERSION # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('ptlearn/__init__.py', 'r') ...
399
0
46
cdac9df18ec3645f342e324f40f6ff8659093533
6,170
py
Python
utility/gps_and_states.py
mafavaron/MeteoFlux
a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7
[ "MIT" ]
null
null
null
utility/gps_and_states.py
mafavaron/MeteoFlux
a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7
[ "MIT" ]
null
null
null
utility/gps_and_states.py
mafavaron/MeteoFlux
a2fc66aac1faa97f12e07fba9bb3ef8aea60b5d7
[ "MIT" ]
null
null
null
#!/usr/bin/python # Task to maintain system RTC aligned with GPS time, coming from a # Teltonka RUT955 terminal. import socket import sys import time import os import logging import logging.handlers if __name__ == "__main__": logger = logging.getLogger('GPS_Task') logger.setLevel(logging.DEBUG) hand...
25.92437
156
0.643598
#!/usr/bin/python # Task to maintain system RTC aligned with GPS time, coming from a # Teltonka RUT955 terminal. import socket import sys import time import os import logging import logging.handlers def getIP(): IP = [(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_IN...
3,200
0
162
683ac887e86d6f1048221167834abc61df55b5d0
4,495
py
Python
bot.py
FightMan01/discord-feladat-r-gz-t-
65f0f29247fa0b34ec7753e763a81c3f5e35c048
[ "MIT" ]
1
2020-04-28T07:25:40.000Z
2020-04-28T07:25:40.000Z
bot.py
FightMan01/discord-feladat-rogzito
65f0f29247fa0b34ec7753e763a81c3f5e35c048
[ "MIT" ]
null
null
null
bot.py
FightMan01/discord-feladat-rogzito
65f0f29247fa0b34ec7753e763a81c3f5e35c048
[ "MIT" ]
null
null
null
import discord from discord.ext import commands, tasks import asyncio import time import datetime import json import aiohttp import os from discord import Webhook, AsyncWebhookAdapter client = commands.AutoShardedBot(command_prefix=".") Client = discord.Client() client.remove_command('help') with open("adat.json") as...
38.09322
153
0.576418
import discord from discord.ext import commands, tasks import asyncio import time import datetime import json import aiohttp import os from discord import Webhook, AsyncWebhookAdapter client = commands.AutoShardedBot(command_prefix=".") Client = discord.Client() client.remove_command('help') with open("adat.json") as...
3,999
0
134
2f7166295fc0fb168bd8d66ddd176c29ddcd09f4
16,491
py
Python
out/manticoresearch-python/manticoresearch/api/search_api.py
mihaj/openapi
29e878b0be1218a897c4c86bf9d8d51f4d1a3e57
[ "MIT" ]
null
null
null
out/manticoresearch-python/manticoresearch/api/search_api.py
mihaj/openapi
29e878b0be1218a897c4c86bf9d8d51f4d1a3e57
[ "MIT" ]
3
2021-12-21T08:18:48.000Z
2022-03-24T10:50:37.000Z
out/manticoresearch-python/manticoresearch/api/search_api.py
mihaj/openapi
29e878b0be1218a897c4c86bf9d8d51f4d1a3e57
[ "MIT" ]
5
2021-12-11T06:10:14.000Z
2022-03-18T11:05:24.000Z
# coding: utf-8 # Manticore Search Client # Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com) # # All rights reserved # from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote fro...
51.214286
918
0.608271
# coding: utf-8 # Manticore Search Client # Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com) # # All rights reserved # from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote fro...
120
0
27
d5892abdd9874781d3c8a04d059d2d242933ccc9
8,217
py
Python
sciencebeam_judge/utils/fuzzy.py
elifesciences/sciencebeam-judge
357f1b4266674611b24371224468db268ed4574e
[ "MIT" ]
null
null
null
sciencebeam_judge/utils/fuzzy.py
elifesciences/sciencebeam-judge
357f1b4266674611b24371224468db268ed4574e
[ "MIT" ]
189
2018-01-11T17:14:18.000Z
2022-03-28T17:30:11.000Z
sciencebeam_judge/utils/fuzzy.py
elifesciences/sciencebeam-judge
357f1b4266674611b24371224468db268ed4574e
[ "MIT" ]
null
null
null
import logging from typing import AnyStr, Callable, Iterable, List, Optional, Tuple LOGGER = logging.getLogger(__name__) T_IsJunkFunction = Callable[[AnyStr, int], bool] EMPTY_MATCHING_BLOCKS = MatchingBlocks([])
29.451613
95
0.62103
import logging from typing import AnyStr, Callable, Iterable, List, Optional, Tuple LOGGER = logging.getLogger(__name__) T_IsJunkFunction = Callable[[AnyStr, int], bool] class StringView: def __init__(self, original_string: str, in_view: List[bool]): self.original_string = original_string sel...
6,838
783
367
fc950b593505a95c7eb4c6d9b319b9c560f20f10
3,763
py
Python
lib_pypy/_cffi_ssl/_cffi_src/utils.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
10
2018-12-18T18:04:28.000Z
2021-04-23T07:31:13.000Z
lib_pypy/_cffi_ssl/_cffi_src/utils.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
lib_pypy/_cffi_ssl/_cffi_src/utils.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
3
2019-06-22T14:16:57.000Z
2021-12-29T22:04:42.000Z
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import sys from distutils.ccompiler import new_compiler from distutils.di...
33.900901
79
0.662503
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import sys from distutils.ccompiler import new_compiler from distutils.di...
595
0
46
1aee3f2ab511244210373f62c8dcdbdfdb567918
3,531
py
Python
tupan/integrator/sakura.py
ggf84/tupan
67d3aa103d77248a04e8f112930ba7bdb55024b2
[ "MIT" ]
1
2016-06-12T19:43:51.000Z
2016-06-12T19:43:51.000Z
tupan/integrator/sakura.py
ggf84/tupan
67d3aa103d77248a04e8f112930ba7bdb55024b2
[ "MIT" ]
1
2021-09-24T13:28:57.000Z
2021-09-24T13:28:57.000Z
tupan/integrator/sakura.py
ggf84/tupan
67d3aa103d77248a04e8f112930ba7bdb55024b2
[ "MIT" ]
3
2015-11-03T15:35:31.000Z
2021-03-02T17:41:27.000Z
# -*- coding: utf-8 -*- # """ TODO. """ from __future__ import print_function, division import logging from ..integrator import Base from ..lib import extensions from ..lib.utils.timing import decallmethods, timings __all__ = ["Sakura"] logger = logging.getLogger(__name__) def sakura_step(ps, tau): """ ...
21.662577
62
0.481167
# -*- coding: utf-8 -*- # """ TODO. """ from __future__ import print_function, division import logging from ..integrator import Base from ..lib import extensions from ..lib.utils.timing import decallmethods, timings __all__ = ["Sakura"] logger = logging.getLogger(__name__) def sakura_step(ps, tau): """ ...
0
0
0
03380b9fc4bc2791f31e4a4be7f09ddd23a207d8
1,238
py
Python
src/python/serif/model/impl/event_mention/eat_event_mention_model.py
BBN-E/text-open
c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9
[ "Apache-2.0" ]
2
2022-03-24T14:37:51.000Z
2022-03-24T19:56:45.000Z
src/python/serif/model/impl/event_mention/eat_event_mention_model.py
BBN-E/text-open
c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9
[ "Apache-2.0" ]
null
null
null
src/python/serif/model/impl/event_mention/eat_event_mention_model.py
BBN-E/text-open
c508f6caeaa51a43cdb0bc27d8ed77e5750fdda9
[ "Apache-2.0" ]
null
null
null
from serif.model.event_mention_model import EventMentionModel # Modified from DummyEventMentionModel
38.6875
76
0.630048
from serif.model.event_mention_model import EventMentionModel # Modified from DummyEventMentionModel class EatEventMentionModel(EventMentionModel): def __init__(self,**kwargs): super(EatEventMentionModel,self).__init__(**kwargs) def get_event_mention_info(self, sentence): # Create an EventMen...
1,035
25
75
165f9269e37cdf991334a589b6a3a94353b51f85
1,401
py
Python
chrome/installer/linux/debian/lint_package.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
chrome/installer/linux/debian/lint_package.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
chrome/installer/linux/debian/lint_package.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Performs some static analysis checks on Chrome debian packages using lintian. """ import argparse import os import subprocess SUP...
28.591837
72
0.710921
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Performs some static analysis checks on Chrome debian packages using lintian. """ import argparse import os import subprocess SUP...
0
0
0
3394d0d604868b37054722470e6cda2033718cb5
898
py
Python
scripts/mlp_functional_api.py
sanikamal/awesome-dl-examples
1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd
[ "MIT" ]
null
null
null
scripts/mlp_functional_api.py
sanikamal/awesome-dl-examples
1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd
[ "MIT" ]
null
null
null
scripts/mlp_functional_api.py
sanikamal/awesome-dl-examples
1e7ef5fc879dd6c1c659bb74ba45963a036e9dcd
[ "MIT" ]
null
null
null
""" Multilayer Perceptron model for binary classification. The model has 10 inputs, 3 hidden layers with 10, 20, and 10 neurons,and an output layer with 1 output. Rectified linear activation functions are used in each hidden layer and a sigmoid activation function is used in the output layer,for binary classificatio...
35.92
103
0.771715
""" Multilayer Perceptron model for binary classification. The model has 10 inputs, 3 hidden layers with 10, 20, and 10 neurons,and an output layer with 1 output. Rectified linear activation functions are used in each hidden layer and a sigmoid activation function is used in the output layer,for binary classificatio...
0
0
0
f8b325c42287a9461b7a0d381cfcfa2fe0c14536
764
py
Python
src/scratch-scripts/feature-extraction.py
kanazashi-s/pytorch-faster-rcnn-from-scratch-
4a482dcda30c10e609468251dd0222d27718b9b1
[ "MIT" ]
null
null
null
src/scratch-scripts/feature-extraction.py
kanazashi-s/pytorch-faster-rcnn-from-scratch-
4a482dcda30c10e609468251dd0222d27718b9b1
[ "MIT" ]
null
null
null
src/scratch-scripts/feature-extraction.py
kanazashi-s/pytorch-faster-rcnn-from-scratch-
4a482dcda30c10e609468251dd0222d27718b9b1
[ "MIT" ]
null
null
null
#%% # 画像・バウンディングボックス・ラベルのセットを準備する import torch import torch.nn as nn image = torch.zeros((1, 3, 800, 800)).float() bbox = torch.FloatTensor([[20, 30, 400, 500], [300, 400, 500, 600]]) # [y1, x1, y2, x2] format labels = torch.LongTensor([6, 8]) # 0 represents background sub_sample = 16 #%% # VGG16を、バックボーンに使用する # VG...
22.470588
94
0.683246
#%% # 画像・バウンディングボックス・ラベルのセットを準備する import torch import torch.nn as nn image = torch.zeros((1, 3, 800, 800)).float() bbox = torch.FloatTensor([[20, 30, 400, 500], [300, 400, 500, 600]]) # [y1, x1, y2, x2] format labels = torch.LongTensor([6, 8]) # 0 represents background sub_sample = 16 #%% # VGG16を、バックボーンに使用する # VG...
0
0
0
d6058fc0135c215b14d942d5fdc9670339794089
621
py
Python
parserscripts/parsers/find_accession.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
65
2017-05-10T15:26:18.000Z
2022-03-07T07:10:12.000Z
parserscripts/parsers/find_accession.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
143
2017-03-22T22:55:16.000Z
2020-02-13T15:52:03.000Z
parserscripts/parsers/find_accession.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
44
2017-03-22T20:47:16.000Z
2022-03-15T21:45:12.000Z
import csv
27
78
0.594203
import csv class PhageFinder: PHAGE_NAME = 0 CLUSTER = 1 EXIST_IN_GENBANK = 4 ACCESSION = 5 def __init__(self, infile, **kwargs): blast_file = open(infile, 'r') self.reader = csv.reader(blast_file, dialect=csv.excel_tab) def find_by_phage(self, phage, cluster): for r...
457
129
23
63cf1de58478f20d0e49a8733ad3d5d780a783fb
6,386
py
Python
codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py
jswanglp/TensorFlow-Course
d40faf3f86af8edc3b8181e17d7101ab928a1135
[ "MIT" ]
null
null
null
codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py
jswanglp/TensorFlow-Course
d40faf3f86af8edc3b8181e17d7101ab928a1135
[ "MIT" ]
null
null
null
codes/python/3-neural_networks/convolutional-neural-network/cnn_cifar10.py
jswanglp/TensorFlow-Course
d40faf3f86af8edc3b8181e17d7101ab928a1135
[ "MIT" ]
null
null
null
#@title datasets_tutorials(cifar-10) { display-mode: "both" } # conding: utf-8 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # from functools import reduce import tensorflow_datasets as tfds import numpy as np import time # tf.logging.set_verbosity(tf.logging.ERROR) if __name__ =...
54.118644
126
0.595521
#@title datasets_tutorials(cifar-10) { display-mode: "both" } # conding: utf-8 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # from functools import reduce import tensorflow_datasets as tfds import numpy as np import time def format_tran(tfdata, batch_size=32): batch_tfdata = t...
241
0
23
fd159e5b7be13647139239dadc5e344afd11ffea
1,211
py
Python
monsters.py
ElijahZAwesome/Monster-Wiki-Bot
7c343228090ee98347d5575ac7a253a38e4d8f98
[ "MIT" ]
null
null
null
monsters.py
ElijahZAwesome/Monster-Wiki-Bot
7c343228090ee98347d5575ac7a253a38e4d8f98
[ "MIT" ]
null
null
null
monsters.py
ElijahZAwesome/Monster-Wiki-Bot
7c343228090ee98347d5575ac7a253a38e4d8f98
[ "MIT" ]
null
null
null
#Declaring vars goes like this: # #in the file, all ya gotta do is specify # #<monster>_<info> = "value" # #info can be: # #size #hitpoints #speed #strength #dexterity #constitution #intelligence #wisdom #charisma #senses #language #challenge #dice #initiative #armor #baseattack #attack #fullattack #reach #specialatta...
26.326087
219
0.753097
#Declaring vars goes like this: # #in the file, all ya gotta do is specify # #<monster>_<info> = "value" # #info can be: # #size #hitpoints #speed #strength #dexterity #constitution #intelligence #wisdom #charisma #senses #language #challenge #dice #initiative #armor #baseattack #attack #fullattack #reach #specialatta...
0
0
0
69fcdb91611709f74926d6ab00afefc9cdb17c0d
11,536
py
Python
src/python/twitter/common/java/attribute_info.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
1,143
2015-01-05T04:19:24.000Z
2019-12-11T12:02:23.000Z
src/python/twitter/common/java/attribute_info.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
144
2015-01-06T05:05:07.000Z
2019-12-12T18:02:37.000Z
src/python/twitter/common/java/attribute_info.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
426
2015-01-08T08:33:41.000Z
2019-12-09T13:15:40.000Z
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
30.357895
100
0.663835
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
6,082
4
891
30077f1fb1c77491461f07166fae7c2a55b94011
196
py
Python
tests/assets/__init__.py
giorgiosironi/jats-ingester
3873e8141f34ebe6237de746ac5e84f131f15800
[ "MIT" ]
null
null
null
tests/assets/__init__.py
giorgiosironi/jats-ingester
3873e8141f34ebe6237de746ac5e84f131f15800
[ "MIT" ]
null
null
null
tests/assets/__init__.py
giorgiosironi/jats-ingester
3873e8141f34ebe6237de746ac5e84f131f15800
[ "MIT" ]
null
null
null
from pathlib import Path
19.6
51
0.622449
from pathlib import Path def get_asset(name): try: path = next(Path('.').glob('**/%s' % name)) except StopIteration: raise FileNotFoundError return path.read_bytes()
147
0
23
55431168e1c8c9a42b9829883906423b49c14f48
486
py
Python
pyaes.py
shanyuanqiao/crypto-pkcs7-example
4940144deb63d4ab52df20e69119610a94254893
[ "blessing" ]
28
2015-03-11T05:24:08.000Z
2022-01-21T21:26:03.000Z
pyaes.py
shanyuanqiao/crypto-pkcs7-example
4940144deb63d4ab52df20e69119610a94254893
[ "blessing" ]
1
2016-01-31T23:22:18.000Z
2016-01-31T23:22:18.000Z
pyaes.py
shanyuanqiao/crypto-pkcs7-example
4940144deb63d4ab52df20e69119610a94254893
[ "blessing" ]
17
2015-03-27T08:30:33.000Z
2019-07-13T08:30:10.000Z
from Crypto.Cipher import AES from pkcs7 import PKCS7Encoder import base64 key = 'your key 16bytes' # 16 byte initialization vector iv = '1234567812345678' aes = AES.new(key, AES.MODE_CBC, iv) encoder = PKCS7Encoder() text = 'This is my plain text' # pad the plain text according to PKCS7 pad_text = encoder.encode(t...
21.130435
45
0.769547
from Crypto.Cipher import AES from pkcs7 import PKCS7Encoder import base64 key = 'your key 16bytes' # 16 byte initialization vector iv = '1234567812345678' aes = AES.new(key, AES.MODE_CBC, iv) encoder = PKCS7Encoder() text = 'This is my plain text' # pad the plain text according to PKCS7 pad_text = encoder.encode(t...
0
0
0
c55c8fe7e817243e22b1a5e3ece75a4d62cad57e
1,554
py
Python
neuralnet_pytorch/__init__.py
justanhduc/neuralnet-pytorch
cbb0c5a540a0ba91cb4dd20684bb00692305d193
[ "MIT" ]
28
2019-01-07T04:07:55.000Z
2021-11-09T15:16:11.000Z
neuralnet_pytorch/__init__.py
justanhduc/neuralnet-pytorch
cbb0c5a540a0ba91cb4dd20684bb00692305d193
[ "MIT" ]
9
2019-12-25T08:00:33.000Z
2021-11-23T09:02:34.000Z
neuralnet_pytorch/__init__.py
justanhduc/neuralnet-pytorch
cbb0c5a540a0ba91cb4dd20684bb00692305d193
[ "MIT" ]
3
2020-08-07T12:49:05.000Z
2022-03-07T21:32:39.000Z
from __future__ import print_function minimum_required = '1.0.0' # Ensure Pytorch is importable and its version is sufficiently recent. This # needs to happen before anything else, since the imports below will try to # import Pytorch, too. def _ensure_pt_install(): # pylint: disable=g-statement-before-imports "...
27.75
81
0.721364
from __future__ import print_function minimum_required = '1.0.0' # Ensure Pytorch is importable and its version is sufficiently recent. This # needs to happen before anything else, since the imports below will try to # import Pytorch, too. def _ensure_pt_install(): # pylint: disable=g-statement-before-imports "...
0
0
0
4a38c0dcd17b7655c6608474cd12a6bc89ea440d
3,482
py
Python
python/chemiscope/main.py
Luthaf/chemiscope
4d40f587c05b7fdd546444134ab15bd80ad237ff
[ "BSD-3-Clause" ]
null
null
null
python/chemiscope/main.py
Luthaf/chemiscope
4d40f587c05b7fdd546444134ab15bd80ad237ff
[ "BSD-3-Clause" ]
null
null
null
python/chemiscope/main.py
Luthaf/chemiscope
4d40f587c05b7fdd546444134ab15bd80ad237ff
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .input import write_input def main(): """ Command-line utility to generate an input for chemiscope — the interactive structure-property explorer. Parses an input file containing atomic structures using the ASE I/O module, and converts it into a JSON ...
32.240741
85
0.631534
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .input import write_input def main(): """ Command-line utility to generate an input for chemiscope — the interactive structure-property explorer. Parses an input file containing atomic structures using the ASE I/O module, and converts it into a JSON ...
65
0
26
080538794e45ef5bbfa6060102fca96fc9120d38
7,410
py
Python
FunTaxaCount/src/funtaxacount.py
PNNL-CompBio/kansas-native-prairie
40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766
[ "BSD-3-Clause" ]
null
null
null
FunTaxaCount/src/funtaxacount.py
PNNL-CompBio/kansas-native-prairie
40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766
[ "BSD-3-Clause" ]
null
null
null
FunTaxaCount/src/funtaxacount.py
PNNL-CompBio/kansas-native-prairie
40e24da4b0b89d7a568b0c4c8d94a3f6da3ea766
[ "BSD-3-Clause" ]
null
null
null
import pandas as pd import numpy as np import argparse, sys, re orf_names = ['ORF_ID', 'Contig', 'COG', 'KO'] #, 'product'] def merge_orf_and_funtax( orf_file, funtax_file ): """ Takes an orf file and a funtaxa file and returns the merge """ orf_df = pd.read_table(orf_file, header=None, names=orf_name...
47.806452
156
0.652901
import pandas as pd import numpy as np import argparse, sys, re orf_names = ['ORF_ID', 'Contig', 'COG', 'KO'] #, 'product'] def merge_orf_and_funtax( orf_file, funtax_file ): """ Takes an orf file and a funtaxa file and returns the merge """ orf_df = pd.read_table(orf_file, header=None, names=orf_name...
5,420
0
275
6220278fb5beb386dbd23cda33aaad7304f286d1
511
py
Python
pettingzoo/mappo_ssd/stag_hunt_gw_v1.py
footoredo/PettingZoo
b48baf9ca459d72cdcb7013ef86c5fc470856081
[ "MIT" ]
null
null
null
pettingzoo/mappo_ssd/stag_hunt_gw_v1.py
footoredo/PettingZoo
b48baf9ca459d72cdcb7013ef86c5fc470856081
[ "MIT" ]
null
null
null
pettingzoo/mappo_ssd/stag_hunt_gw_v1.py
footoredo/PettingZoo
b48baf9ca459d72cdcb7013ef86c5fc470856081
[ "MIT" ]
null
null
null
from .utils.env import make_env, GridWorldParallelEnv
51.1
119
0.661448
from .utils.env import make_env, GridWorldParallelEnv class parallel_env(GridWorldParallelEnv): def __init__(self, max_frames, share_reward, shape_reward, shape_beta, choose=0, length=5, **kwargs): super(parallel_env, self).__init__(env_name='StagHuntGW', num_agents=2, max_frames=max_frames, ...
386
20
49
e6cd3d976574d61338e1d130ac3d717197a58ae5
1,873
py
Python
tests/generators/ssz_generic/main.py
BenSchZA/eth2.0-specs
1235e58a8db09efd058f31087d53d91b97b83011
[ "CC0-1.0" ]
1
2021-05-11T09:42:58.000Z
2021-05-11T09:42:58.000Z
tests/generators/ssz_generic/main.py
amaraka/eth2.0-specs
1564f6217f50da6c74a815340de24ac62a26851b
[ "CC0-1.0" ]
null
null
null
tests/generators/ssz_generic/main.py
amaraka/eth2.0-specs
1564f6217f50da6c74a815340de24ac62a26851b
[ "CC0-1.0" ]
null
null
null
from typing import Iterable from eth2spec.gen_helpers.gen_base import gen_runner, gen_typing import ssz_basic_vector import ssz_bitlist import ssz_bitvector import ssz_boolean import ssz_uints import ssz_container from eth2spec.test.helpers.constants import PHASE0 if __name__ == "__main__": gen_runner.run_genera...
40.717391
95
0.70315
from typing import Iterable from eth2spec.gen_helpers.gen_base import gen_runner, gen_typing import ssz_basic_vector import ssz_bitlist import ssz_bitvector import ssz_boolean import ssz_uints import ssz_container from eth2spec.test.helpers.constants import PHASE0 def create_provider(handler_name: str, suite_name: st...
608
0
23
1be4a2d461562127f4eacd1e1f8cade75021cbaf
3,718
py
Python
slice_subnet_mapper/slice_subnet_mapper.py
INSPIRE-5Gplus/i5p-netslice-mgr
c5cefabfa6ce20a6c94519eb5b1778583f82ac73
[ "Apache-2.0" ]
null
null
null
slice_subnet_mapper/slice_subnet_mapper.py
INSPIRE-5Gplus/i5p-netslice-mgr
c5cefabfa6ce20a6c94519eb5b1778583f82ac73
[ "Apache-2.0" ]
2
2021-08-25T13:54:03.000Z
2021-08-25T14:20:06.000Z
slice_subnet_mapper/slice_subnet_mapper.py
INSPIRE-5Gplus/i5p-netslice-mgr
c5cefabfa6ce20a6c94519eb5b1778583f82ac73
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python3.4 import os, sys, logging, json, argparse, time, datetime, requests, uuid from config_files import settings #### NETWORK SLICE MANAGER/NFVO URL JSON_CONTENT_HEADER = {'Content-Type':'application/json'} #### REQUESTS # returns all the slice-subnets templates in the NSM # returns a specific...
43.741176
124
0.733728
#!/usr/local/bin/python3.4 import os, sys, logging, json, argparse, time, datetime, requests, uuid from config_files import settings #### NETWORK SLICE MANAGER/NFVO URL JSON_CONTENT_HEADER = {'Content-Type':'application/json'} def get_nsm_url(): nsm_ip = os.environ.get("NSM_IP") nsm_port = os.environ.get("N...
2,879
0
176
7c3036b10fff4b82c4b096c60d9c6b2baf89c51d
6,483
py
Python
rastervision/filesystem/s3_filesystem.py
ValRat/raster-vision
90f4c5d99869466c65fa972fa8f08f68c1102820
[ "Apache-2.0" ]
4
2019-03-11T12:38:15.000Z
2021-04-06T14:57:52.000Z
rastervision/filesystem/s3_filesystem.py
ValRat/raster-vision
90f4c5d99869466c65fa972fa8f08f68c1102820
[ "Apache-2.0" ]
null
null
null
rastervision/filesystem/s3_filesystem.py
ValRat/raster-vision
90f4c5d99869466c65fa972fa8f08f68c1102820
[ "Apache-2.0" ]
1
2021-02-25T18:23:27.000Z
2021-02-25T18:23:27.000Z
import io import os import subprocess from datetime import datetime from urllib.parse import urlparse from rastervision.filesystem import (FileSystem, NotReadableError, NotWritableError) # Code from https://alexwlchan.net/2017/07/listing-s3-keys/ def get_matching_s3_objects(bucke...
32.742424
79
0.600956
import io import os import subprocess from datetime import datetime from urllib.parse import urlparse from rastervision.filesystem import (FileSystem, NotReadableError, NotWritableError) # Code from https://alexwlchan.net/2017/07/listing-s3-keys/ def get_matching_s3_objects(bucke...
3,770
639
23
6121daeffe4f654f25b1707e220d87cce2b7e556
249
py
Python
example/python/permissions/can_transfer.py
akshatkarani/iroha
5acef9dd74720c6185360d951e9b11be4ef73260
[ "Apache-2.0" ]
1,467
2016-10-25T12:27:19.000Z
2022-03-28T04:32:05.000Z
example/python/permissions/can_transfer.py
akshatkarani/iroha
5acef9dd74720c6185360d951e9b11be4ef73260
[ "Apache-2.0" ]
2,366
2016-10-25T10:07:57.000Z
2022-03-31T22:03:24.000Z
example/python/permissions/can_transfer.py
akshatkarani/iroha
5acef9dd74720c6185360d951e9b11be4ef73260
[ "Apache-2.0" ]
662
2016-10-26T04:41:22.000Z
2022-03-31T04:15:02.000Z
# # Copyright Soramitsu Co., Ltd. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # import can_receive # Please see example for can_receive permission. # By design can_receive and can_transfer permissions # can be tested only together.
22.636364
52
0.779116
# # Copyright Soramitsu Co., Ltd. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # import can_receive # Please see example for can_receive permission. # By design can_receive and can_transfer permissions # can be tested only together.
0
0
0
1a117e69ab35215f8f86142f15d32d060e0b9e3b
1,232
py
Python
cse481wi18/applications/scripts/head_demo.py
TimAdamson21/access_teleop
4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c
[ "MIT" ]
null
null
null
cse481wi18/applications/scripts/head_demo.py
TimAdamson21/access_teleop
4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c
[ "MIT" ]
null
null
null
cse481wi18/applications/scripts/head_demo.py
TimAdamson21/access_teleop
4ca4cc3ebc29cb4942cec5c8e3e60b897b80590c
[ "MIT" ]
null
null
null
#! /usr/bin/env python import rospy import fetch_api def wait_for_time(): """Wait for simulated time to begin. """ while rospy.Time().now().to_sec() == 0: pass if __name__ == '__main__': main()
23.692308
75
0.578734
#! /usr/bin/env python import rospy import fetch_api def print_usage(): print 'Usage:' print ' rosrun applications head_demo.py look_at FRAME_ID X Y Z' print ' rosrun applications head_demo.py pan_tilt PAN_ANG TILT_ANG' print 'Examples:' print ' rosrun applications head_demo.py look_at b...
961
0
46
7669c07f7d4e2bfe8db49af295ec775218fd092b
1,806
py
Python
tree.py
captaincapsaicin/castle
fd0a042b5ca2aa017cdbe69688595f771bae8f59
[ "MIT" ]
null
null
null
tree.py
captaincapsaicin/castle
fd0a042b5ca2aa017cdbe69688595f771bae8f59
[ "MIT" ]
1
2017-11-25T00:35:40.000Z
2017-11-25T00:35:40.000Z
tree.py
captaincapsaicin/castle
fd0a042b5ca2aa017cdbe69688595f771bae8f59
[ "MIT" ]
null
null
null
def create_new_connection(parent_node, child_node, action, prior_probability): """ Returns the edge connecting parent and child """ edge = Edge(parent_node, child_node, action, prior_probability) parent_node.add_outgoing_edge(edge) child_node.add_incoming_edge(edge) return edge
31.137931
119
0.633444
class Node(object): def __init__(self, state, outgoing_edges=None, in_edge=None): self.state = state if outgoing_edges is not None: self.outgoing_edges = outgoing_edges else: self.outgoing_edges = [] self.in_edge = in_edge self.is_expanded = False ...
1,227
90
179
4d325da1cd3ad6f9e3e55cc011c11ddb5f61afbf
16,093
py
Python
ioflo/base/skedding.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
128
2015-01-14T12:26:56.000Z
2021-11-06T07:09:29.000Z
ioflo/base/skedding.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2015-01-28T18:26:50.000Z
2020-11-19T22:08:06.000Z
ioflo/base/skedding.py
BradyHammond/ioflo
177ac656d7c4ff801aebb0d8b401db365a5248ce
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2015-01-27T23:28:31.000Z
2021-05-04T16:37:30.000Z
"""skedding.py weightless thread scheduling """ #print( "module {0}".format(__name__)) import sys import os import time from collections import deque from ..aid.consoling import getConsole console = getConsole() from ..aid.sixing import * from ..aid import odict, oset from .globaling import * from ..aid import t...
37.600467
118
0.563723
"""skedding.py weightless thread scheduling """ #print( "module {0}".format(__name__)) import sys import os import time from collections import deque from ..aid.consoling import getConsole console = getConsole() from ..aid.sixing import * from ..aid import odict, oset from .globaling import * from ..aid import t...
0
0
0
6bbb09399af12973f203e06cfe0dab224ca66d09
6,549
py
Python
fuel-package-updates.py
artem-panchenko/fuel-updates
87abddfeae749ee81c58328410f842ccd9afe3dc
[ "Apache-2.0" ]
null
null
null
fuel-package-updates.py
artem-panchenko/fuel-updates
87abddfeae749ee81c58328410f842ccd9afe3dc
[ "Apache-2.0" ]
null
null
null
fuel-package-updates.py
artem-panchenko/fuel-updates
87abddfeae749ee81c58328410f842ccd9afe3dc
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
37.210227
79
0.619331
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
5,198
266
161
59d5cdcca3e8dcc86bf49dbd3064cc9bfffae240
12,461
py
Python
11_networks-complite-05.py
Accioy/voice-singal-classification
b6744af9732fd38c41cf3cbf11c170a962cee6c7
[ "MIT" ]
null
null
null
11_networks-complite-05.py
Accioy/voice-singal-classification
b6744af9732fd38c41cf3cbf11c170a962cee6c7
[ "MIT" ]
null
null
null
11_networks-complite-05.py
Accioy/voice-singal-classification
b6744af9732fd38c41cf3cbf11c170a962cee6c7
[ "MIT" ]
null
null
null
""" 技术要点:1、创建基于声谱图的卷积神经网络模型(十分类),本文件为第五版本 2、三种功能选择:训练并保存模型、评估模型、类别预测 3、三种训练方法:2d卷积、沿时间卷积、沿频率卷积 4、添加了绘制准确率和损失值变化曲线的代码; 5、注释掉早停法代码行; 6、模型训练回调函数改为logs_loss。 改进方面:音频预处理后再训练 运行结果:300轮训练后,准确率可达到84% 准确率和损失值曲线效果较好,其他曲线效果不佳 """ import numpy as np from scipy import signal import sc...
35.910663
133
0.609823
""" 技术要点:1、创建基于声谱图的卷积神经网络模型(十分类),本文件为第五版本 2、三种功能选择:训练并保存模型、评估模型、类别预测 3、三种训练方法:2d卷积、沿时间卷积、沿频率卷积 4、添加了绘制准确率和损失值变化曲线的代码; 5、注释掉早停法代码行; 6、模型训练回调函数改为logs_loss。 改进方面:音频预处理后再训练 运行结果:300轮训练后,准确率可达到84% 准确率和损失值曲线效果较好,其他曲线效果不佳 """ import numpy as np from scipy import signal import sc...
5,976
23
224
e25bf8be3fd6bade037eaf4f8cc3eb38deb9550a
470
py
Python
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
26
2019-03-04T20:08:57.000Z
2022-01-22T13:40:00.000Z
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
379
2019-03-03T12:16:05.000Z
2022-03-29T13:44:46.000Z
tests/fixtures/device.py
jspaaks/vak
581ec4869d342e5d52bc057de54c10901f06d343
[ "BSD-3-Clause" ]
12
2019-11-22T21:19:19.000Z
2022-03-14T17:44:59.000Z
import pytest import torch DEVICES = ["cpu"] if torch.cuda.is_available(): DEVICES.append("cuda") @pytest.fixture(params=DEVICES) def device(request): """parametrized device function, that returns string names of the devices that ``torch`` considers "available". causes any test using ``device`` ...
24.736842
67
0.695745
import pytest import torch DEVICES = ["cpu"] if torch.cuda.is_available(): DEVICES.append("cuda") @pytest.fixture(params=DEVICES) def device(request): """parametrized device function, that returns string names of the devices that ``torch`` considers "available". causes any test using ``device`` ...
0
0
0
aadeedeee12237575f8cdcec6f32a2ad4677f9c5
11,329
py
Python
test/e2e/tests/test_bucket.py
vijtrip2/s3-controller
b1a21ab237746646255b78412bcbfcd249b72f61
[ "Apache-2.0" ]
null
null
null
test/e2e/tests/test_bucket.py
vijtrip2/s3-controller
b1a21ab237746646255b78412bcbfcd249b72f61
[ "Apache-2.0" ]
null
null
null
test/e2e/tests/test_bucket.py
vijtrip2/s3-controller
b1a21ab237746646255b78412bcbfcd249b72f61
[ "Apache-2.0" ]
null
null
null
# Copyright Amazon.com Inc. or its affiliates. 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. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanyin...
38.016779
109
0.713655
# Copyright Amazon.com Inc. or its affiliates. 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. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanyin...
9,446
71
608
4653c46601b0d10d1b8237b0bec1d4bfbfd387d8
987
py
Python
finetuned/sphere.py
vineeths96/Video-Interpolation-using-Deep-Optical-Flow
5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94
[ "MIT" ]
5
2021-04-17T15:26:29.000Z
2021-10-11T13:17:56.000Z
finetuned/sphere.py
vineeths96/Video-Interpolation-using-Deep-Optical-Flow
5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94
[ "MIT" ]
null
null
null
finetuned/sphere.py
vineeths96/Video-Interpolation-using-Deep-Optical-Flow
5dd536bcc2d6c0d0d1718dccb09eb71ca77d2d94
[ "MIT" ]
2
2021-11-28T06:40:23.000Z
2022-01-17T12:20:21.000Z
import glob import cv2 import regex as re from .deep_optical_flow import deep_optical_flow from .interpolations import warp_flow from .parameters import * def sphere_interpolation(model_path="./flownet2/pretrained_models/FlowNet2_checkpoint.pth.tar"): """ Sphere dataset interpolation of Frame N+1 from Frame N...
36.555556
111
0.707194
import glob import cv2 import regex as re from .deep_optical_flow import deep_optical_flow from .interpolations import warp_flow from .parameters import * def sphere_interpolation(model_path="./flownet2/pretrained_models/FlowNet2_checkpoint.pth.tar"): """ Sphere dataset interpolation of Frame N+1 from Frame N...
0
0
0
875c50a031df3d5ca588d2664761bc39b8ece01c
9,363
py
Python
kloppy/infra/serializers/tracking/secondspectrum.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
kloppy/infra/serializers/tracking/secondspectrum.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
kloppy/infra/serializers/tracking/secondspectrum.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
import json import logging from typing import Tuple, Dict, Optional, Union, NamedTuple, IO from lxml import objectify from kloppy.domain import ( TrackingDataset, DatasetFlag, AttackingDirection, Frame, Point, Point3D, Team, BallState, Period, Provider, Orientation, att...
35.736641
109
0.522162
import json import logging from typing import Tuple, Dict, Optional, Union, NamedTuple, IO from lxml import objectify from kloppy.domain import ( TrackingDataset, DatasetFlag, AttackingDirection, Frame, Point, Point3D, Team, BallState, Period, Provider, Orientation, att...
8,335
369
46
124e4f0bae283d78713ff0d955d4def0bcc6fe58
4,091
py
Python
home-assistant/custom_components/meteo-swiss/config_flow.py
twhite96/smart-home-setup
25222e26b770275b43f227b45cf7e0f8ba749595
[ "MIT" ]
190
2020-05-03T21:13:00.000Z
2022-03-31T23:16:30.000Z
home-assistant/custom_components/meteo-swiss/config_flow.py
heinoskov/smart-home-setup
896d1f09bfd7059681f7b0b0f1935159dd12b512
[ "MIT" ]
11
2020-11-20T10:57:00.000Z
2022-03-18T07:42:43.000Z
home-assistant/custom_components/meteo-swiss/config_flow.py
heinoskov/smart-home-setup
896d1f09bfd7059681f7b0b0f1935159dd12b512
[ "MIT" ]
21
2020-10-02T14:44:06.000Z
2022-02-27T10:50:08.000Z
"""Config flow to configure the Meteo-Swiss integration.""" import logging import re import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_LATITUDE, CONF_LONGITUDE from homeassistant import config_entries from homeassistant.core import callback from .const import DOMAIN,CONF_POSTCODE,CONF_STATION,CO...
37.87963
135
0.644341
"""Config flow to configure the Meteo-Swiss integration.""" import logging import re import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_LATITUDE, CONF_LONGITUDE from homeassistant import config_entries from homeassistant.core import callback from .const import DOMAIN,CONF_POSTCODE,CONF_STATION,CO...
1,149
2,492
31
a04c3f1060786937b154ac2f4bf2b64f1b4b9af4
1,969
py
Python
chips/utils/block_diagram.py
dillonhuff/Chips-2.0
c78df1597b5f6b024723c4804c6797e4b00387ca
[ "MIT" ]
221
2015-02-23T20:03:29.000Z
2021-12-23T13:08:24.000Z
chips/utils/block_diagram.py
dillonhuff/Chips-2.0
c78df1597b5f6b024723c4804c6797e4b00387ca
[ "MIT" ]
10
2015-10-08T14:30:31.000Z
2019-04-28T04:42:44.000Z
chips/utils/block_diagram.py
dawsonjon/Chips-2.0
57a986b8df36248bb4736bd84e3e68046b8665af
[ "MIT" ]
31
2015-10-31T00:51:03.000Z
2021-09-06T15:40:58.000Z
from graphviz import Digraph if __name__ == "__main__": from chips.api.api import * from chips.components.components import * c = Chip("my_chip") a = Input(c, "a") b = Input(c, "b") d = Input(c, "d") e = Input(c, "e") x, y = tee(c, add(c, add(c, a, b), add(c, d, e))) discard(c, x)...
29.38806
72
0.504317
from graphviz import Digraph class BlockDiagram(): def __init__(self, chip): self.chip = chip g = Digraph(self.chip.name, graph_attr={"rankdir": "LR"}) sources = {} sinks = {} for instance in self.chip.instances: for port, wire in instance.inputs.iteritems(...
1,489
0
104
60a49c861da6feae6b72110e74da55a2ab442def
852
py
Python
src/the_tale/the_tale/game/companions/meta_relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
85
2017-11-21T12:22:02.000Z
2022-03-27T23:07:17.000Z
src/the_tale/the_tale/game/companions/meta_relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
545
2017-11-04T14:15:04.000Z
2022-03-27T14:19:27.000Z
src/the_tale/the_tale/game/companions/meta_relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
45
2017-11-11T12:36:30.000Z
2022-02-25T06:10:44.000Z
import smart_imports smart_imports.all()
23.027027
63
0.656103
import smart_imports smart_imports.all() class Companion(meta_relations_objects.MetaType): __slots__ = ('caption', ) TYPE = 6 TYPE_CAPTION = 'Спутник' def __init__(self, caption, **kwargs): super(Companion, self).__init__(**kwargs) self.caption = caption @property def url(s...
485
307
23
a54fd76006cf7246fec8458be45888fd3ea922be
920
py
Python
notify.py
crablab/hackney-ipp
eb011365389202ec90f4d5c57fd864c0e59c2d78
[ "MIT" ]
2
2020-06-07T21:28:54.000Z
2020-09-02T16:11:59.000Z
notify.py
crablab/hackney-ipp
eb011365389202ec90f4d5c57fd864c0e59c2d78
[ "MIT" ]
null
null
null
notify.py
crablab/hackney-ipp
eb011365389202ec90f4d5c57fd864c0e59c2d78
[ "MIT" ]
null
null
null
import cuid, sys, os from dotenv import load_dotenv from notifications_python_client.notifications import NotificationsAPIClient # Load .env load_dotenv() # Set up a new Notify client notifications_client = NotificationsAPIClient(os.getenv("NOTIFY_KEY")) # Generate a unique reference id_gen = cuid.CuidGenerator() ...
28.75
96
0.745652
import cuid, sys, os from dotenv import load_dotenv from notifications_python_client.notifications import NotificationsAPIClient # Load .env load_dotenv() # Set up a new Notify client notifications_client = NotificationsAPIClient(os.getenv("NOTIFY_KEY")) # Generate a unique reference id_gen = cuid.CuidGenerator() ...
0
0
0
17f2d50a4262facd9daff3b661d550302005ac42
460
py
Python
src/python_lib_for_me/list.py
silverag-corgi/python-lib-for-me
ed30c7b879396ca6af53c762d7c919b0ea44bea7
[ "MIT" ]
null
null
null
src/python_lib_for_me/list.py
silverag-corgi/python-lib-for-me
ed30c7b879396ca6af53c762d7c919b0ea44bea7
[ "MIT" ]
1
2022-02-06T08:21:56.000Z
2022-02-06T15:48:26.000Z
src/python_lib_for_me/list.py
silverag-corgi/python-lib-for-me
ed30c7b879396ca6af53c762d7c919b0ea44bea7
[ "MIT" ]
null
null
null
''' リストモジュール ''' def split_list(elements: list, num_of_elements: int) -> list[list]: ''' リスト分割 Args: elements (list) : 要素リスト num_of_elements (int) : 分割単位の要素数 Returns: list[list]: 分割結果リスト ''' items_list: list[list] = \ [...
20
68
0.526087
''' リストモジュール ''' def split_list(elements: list, num_of_elements: int) -> list[list]: ''' リスト分割 Args: elements (list) : 要素リスト num_of_elements (int) : 分割単位の要素数 Returns: list[list]: 分割結果リスト ''' items_list: list[list] = \ [...
0
0
0
22c8b2bbccd08a3508fd4d200508de71b852595e
230
py
Python
course3/lesson1/adder.py
dbrandenburg/python-oreilley-certification
44af77d093100971e32d48b309f8d6e6d1b78364
[ "Apache-2.0" ]
null
null
null
course3/lesson1/adder.py
dbrandenburg/python-oreilley-certification
44af77d093100971e32d48b309f8d6e6d1b78364
[ "Apache-2.0" ]
null
null
null
course3/lesson1/adder.py
dbrandenburg/python-oreilley-certification
44af77d093100971e32d48b309f8d6e6d1b78364
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 def object_adder(a, b): """Adds two object together""" if type(a) is not int or type(b) is not int: raise TypeError("Object is not of type int") return a + b import sys print(sys.argv)
20.909091
52
0.63913
#!/usr/bin/env python3 def object_adder(a, b): """Adds two object together""" if type(a) is not int or type(b) is not int: raise TypeError("Object is not of type int") return a + b import sys print(sys.argv)
0
0
0
a41459805297a3f06d4342530f581db1c689df22
6,044
py
Python
yatube/posts/tests/test_urls.py
Ecmek/yatube_project
24206ad81c73c184e0f24ca7242c3f8233278592
[ "BSD-3-Clause" ]
1
2021-08-17T07:30:35.000Z
2021-08-17T07:30:35.000Z
yatube/posts/tests/test_urls.py
Ecmek/yatube_project
24206ad81c73c184e0f24ca7242c3f8233278592
[ "BSD-3-Clause" ]
null
null
null
yatube/posts/tests/test_urls.py
Ecmek/yatube_project
24206ad81c73c184e0f24ca7242c3f8233278592
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase, Client from django.core.cache import cache from posts.models import Post, Group User = get_user_model() index = '/' group = 'group' test_slug = 'test_slug' fake_slug = 'fake_slug' new_post = 'new' post_edit = 'edit' post_delete = 'delet...
38.253165
79
0.595963
from django.contrib.auth import get_user_model from django.test import TestCase, Client from django.core.cache import cache from posts.models import Post, Group User = get_user_model() index = '/' group = 'group' test_slug = 'test_slug' fake_slug = 'fake_slug' new_post = 'new' post_edit = 'edit' post_delete = 'delet...
5,785
269
23
0eb6b21802f5e9103e5fdcfae002c9610a22fe79
1,061
py
Python
users/models.py
Yuri-Lima/SharePay
18547053f7e86571366abf4ec4310bf1553395c5
[ "MIT" ]
1
2021-06-14T00:42:52.000Z
2021-06-14T00:42:52.000Z
users/models.py
Yuri-Lima/SharePay
18547053f7e86571366abf4ec4310bf1553395c5
[ "MIT" ]
72
2021-06-08T14:18:23.000Z
2021-07-19T05:33:40.000Z
users/models.py
Yuri-Lima/SharePay
18547053f7e86571366abf4ec4310bf1553395c5
[ "MIT" ]
null
null
null
from typing import AbstractSet from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.urls import reverse from django.utils.translation import gettext_lazy as _
32.151515
75
0.656927
from typing import AbstractSet from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ class CustomUser(AbstractUser): first_name = models.CharField(max_length=10...
380
411
24
5e2a3eca705b4a75c88e80e14b7a803235508b60
1,045
py
Python
rpython/jit/backend/arm/detect.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2016-07-06T23:30:20.000Z
2017-05-30T15:59:31.000Z
rpython/jit/backend/arm/detect.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
null
null
null
rpython/jit/backend/arm/detect.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2020-07-09T08:14:22.000Z
2021-01-15T18:01:25.000Z
from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper.tool import rffi_platform from rpython.translator.platform import CompilationError eci = ExternalCompilationInfo( post_include_bits=[""" // we need to disable optimizations so...
32.65625
73
0.735885
from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper.tool import rffi_platform from rpython.translator.platform import CompilationError eci = ExternalCompilationInfo( post_include_bits=[""" // we need to disable optimizations so...
203
0
23
1f67795097e35d599aea4f61805cac7c3ba14838
322
py
Python
helios/nodes/ropsten.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
helios/nodes/ropsten.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
helios/nodes/ropsten.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
from helios.chains.ropsten import ( RopstenFullChain, RopstenLightDispatchChain, ) from helios.nodes.light import LightNode from helios.nodes.full import FullNode
21.466667
43
0.804348
from helios.chains.ropsten import ( RopstenFullChain, RopstenLightDispatchChain, ) from helios.nodes.light import LightNode from helios.nodes.full import FullNode class RopstenFullNode(FullNode): chain_class = RopstenFullChain class RopstenLightNode(LightNode): chain_class = RopstenLightDispatchChai...
0
103
46
b776aa6a895912c21971a838bd9b4ff69860dcbe
562
py
Python
icedata/datasets/coco/tests/test_parser.py
ganesh3/icedata
16c26ea3d8f96b99357683849d6bd363bf12a827
[ "Apache-2.0" ]
null
null
null
icedata/datasets/coco/tests/test_parser.py
ganesh3/icedata
16c26ea3d8f96b99357683849d6bd363bf12a827
[ "Apache-2.0" ]
null
null
null
icedata/datasets/coco/tests/test_parser.py
ganesh3/icedata
16c26ea3d8f96b99357683849d6bd363bf12a827
[ "Apache-2.0" ]
null
null
null
import icedata from icevision.all import *
29.578947
83
0.647687
import icedata from icevision.all import * def test_parser(data_dir): class_map = icedata.coco.class_map() parser = icedata.coco.parser( annotations_file=data_dir / "annotations.json", img_dir=data_dir / "images" ) records = parser.parse(data_splitter=SingleSplitSplitter())[0] assert len(...
495
0
23
d5d782f07d49524242d5d7d49587dfa75702b348
2,892
py
Python
source/07/mc-7-5-tp-cde-hd.py
schef/schef.github.io
ac6fc70e5077deeeb8233ede89e0895fdc2a0d05
[ "MIT" ]
null
null
null
source/07/mc-7-5-tp-cde-hd.py
schef/schef.github.io
ac6fc70e5077deeeb8233ede89e0895fdc2a0d05
[ "MIT" ]
null
null
null
source/07/mc-7-5-tp-cde-hd.py
schef/schef.github.io
ac6fc70e5077deeeb8233ede89e0895fdc2a0d05
[ "MIT" ]
null
null
null
#!/usr/bin/python # Written by Stjepan Horvat # ( zvanstefan@gmail.com ) # by the exercises from David Lucal Burge - Perfect Pitch Ear Traning Supercourse # Thanks to Wojciech M. Zabolotny ( wzab@ise.pw.edu.pl ) for snd-virmidi example # ( wzab@ise.pw.edu.pl ) import random import time import sys import re fname="/de...
27.283019
155
0.603389
#!/usr/bin/python # Written by Stjepan Horvat # ( zvanstefan@gmail.com ) # by the exercises from David Lucal Burge - Perfect Pitch Ear Traning Supercourse # Thanks to Wojciech M. Zabolotny ( wzab@ise.pw.edu.pl ) for snd-virmidi example # ( wzab@ise.pw.edu.pl ) import random import time import sys import re fname="/de...
859
0
92
bf6ec23f96f67a0ce44645429441edc8de70865c
207
py
Python
src/sinks/sink.py
lavriv92/sinks
bbd116ea9a2beb14179a86aa2e8c931582939b36
[ "MIT" ]
1
2021-12-22T13:43:34.000Z
2021-12-22T13:43:34.000Z
src/sinks/sink.py
lavriv92/sinks
bbd116ea9a2beb14179a86aa2e8c931582939b36
[ "MIT" ]
null
null
null
src/sinks/sink.py
lavriv92/sinks
bbd116ea9a2beb14179a86aa2e8c931582939b36
[ "MIT" ]
null
null
null
import functools import requests from sinks.base_source import BaseSource
20.7
79
0.748792
import functools import requests from sinks.base_source import BaseSource class Source(BaseSource): def __call__(self): return functools.reduce(lambda acc, f: f(acc), self.funcs, self.source)
78
4
49
fb2b284ea4ef5aaab01e5a4a4aad1fc067550c17
720
py
Python
tests/test_accmip6.py
pkufubo/acccmip6
762200f314a26b4e0eeb971b607c1b3a81a57d30
[ "MIT" ]
59
2019-09-19T10:01:00.000Z
2022-03-31T07:05:00.000Z
tests/test_accmip6.py
pkufubo/acccmip6
762200f314a26b4e0eeb971b607c1b3a81a57d30
[ "MIT" ]
6
2020-11-19T08:58:23.000Z
2022-02-07T12:57:23.000Z
tests/test_accmip6.py
pkufubo/acccmip6
762200f314a26b4e0eeb971b607c1b3a81a57d30
[ "MIT" ]
10
2019-11-24T15:39:59.000Z
2022-01-22T08:58:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_accmip6 ---------------------------------- Tests for `accmip6` module. """ import pytest from pathlib import Path from acccmip6.utilities.c6db import SearchDB from acccmip6.utilities.util import _dir_path, _Construct_urls
25.714286
94
0.604167
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_accmip6 ---------------------------------- Tests for `accmip6` module. """ import pytest from pathlib import Path from acccmip6.utilities.c6db import SearchDB from acccmip6.utilities.util import _dir_path, _Construct_urls def test_url_getter(...
358
0
62
3069cb0d11663e532a2bd9872633694a80c03d36
2,385
py
Python
Machines/OPENADMIN/ona-rce.py
limitedeternity/HackTheBox
ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09
[ "MIT" ]
null
null
null
Machines/OPENADMIN/ona-rce.py
limitedeternity/HackTheBox
ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09
[ "MIT" ]
null
null
null
Machines/OPENADMIN/ona-rce.py
limitedeternity/HackTheBox
ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09
[ "MIT" ]
3
2021-12-29T10:39:01.000Z
2022-03-29T22:56:40.000Z
#!/usr/bin/python3 ''' # Exploit Title: OpenNetAdmin 18.1.1 - Remote Code Execution # Date: 2020-01-18 # Exploit Author: @amriunix (https://amriunix.com) # Vendor Homepage: http://opennetadmin.com/ # Software Link: https://github.com/opennetadmin/ona # Version: v18.1.1 # Tested on: Linux ''' import requests import sy...
33.591549
98
0.587841
#!/usr/bin/python3 ''' # Exploit Title: OpenNetAdmin 18.1.1 - Remote Code Execution # Date: 2020-01-18 # Exploit Author: @amriunix (https://amriunix.com) # Vendor Homepage: http://opennetadmin.com/ # Software Link: https://github.com/opennetadmin/ona # Version: v18.1.1 # Tested on: Linux ''' import requests import sy...
904
0
67
42175e58c2c15f5ee99e556b90c3a5806c720a50
23,640
py
Python
oneflow/python/nn/modules/activation.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
oneflow/python/nn/modules/activation.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
oneflow/python/nn/modules/activation.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
25.751634
89
0.544036
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
4,998
1
854
b94570549fff0f323fca932142442f9e2286a38b
1,362
py
Python
demo/text_spotting/mask_rcnn_spot/configs/mask_rcnn_spotter_pretrain.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
null
null
null
demo/text_spotting/mask_rcnn_spot/configs/mask_rcnn_spotter_pretrain.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
null
null
null
demo/text_spotting/mask_rcnn_spot/configs/mask_rcnn_spotter_pretrain.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
null
null
null
""" #################################################################################################### # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : mango_r50_ete_pretrain.py # Abstract : Model settings for mask rcnn spotter end-to-en...
34.923077
102
0.553598
""" #################################################################################################### # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : mango_r50_ete_pretrain.py # Abstract : Model settings for mask rcnn spotter end-to-en...
0
0
0
40b5da6d9b057ada5f1d37ec3aedaa657578ee0d
3,906
py
Python
mol_property/pka/data_utils.py
Mana-bio/mol_property
16c83bf9c6c03e25695cc913c68ec23ff704f2bc
[ "MIT" ]
8
2019-08-24T22:19:53.000Z
2022-03-20T06:21:55.000Z
mol_property/pka/data_utils.py
Mana-bio/mol_property
16c83bf9c6c03e25695cc913c68ec23ff704f2bc
[ "MIT" ]
1
2021-09-08T20:43:06.000Z
2021-09-26T22:38:51.000Z
mol_property/pka/data_utils.py
Mana-bio/mol_property
16c83bf9c6c03e25695cc913c68ec23ff704f2bc
[ "MIT" ]
5
2019-08-24T22:24:02.000Z
2022-03-20T06:22:06.000Z
# -*- coding: utf-8 -*- import os import numpy as np import pandas as pd import rdkit from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "./train/data/pKaInWater.csv")
40.268041
117
0.592678
# -*- coding: utf-8 -*- import os import numpy as np import pandas as pd import rdkit from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "./train/data/pKaInWater.csv") def rdkit_numpy_convert(fp): output = [] fo...
1,297
2,293
46
a4683567b2e99fc407027a44e5ea64574ddf5871
940
py
Python
tests/base_tests/multipolygon_tests/test_contains.py
lycantropos/gon
b3f811ece5989d1623b17d633a84071fbff6dd69
[ "MIT" ]
10
2020-07-18T12:55:52.000Z
2022-03-20T07:09:10.000Z
tests/base_tests/multipolygon_tests/test_contains.py
lycantropos/gon
b3f811ece5989d1623b17d633a84071fbff6dd69
[ "MIT" ]
52
2019-07-11T16:59:01.000Z
2022-03-29T19:41:59.000Z
tests/base_tests/multipolygon_tests/test_contains.py
lycantropos/gon
b3f811ece5989d1623b17d633a84071fbff6dd69
[ "MIT" ]
1
2020-03-22T12:56:07.000Z
2020-03-22T12:56:07.000Z
from typing import Tuple from hypothesis import given from gon.base import (Multipolygon, Point) from tests.utils import equivalence from . import strategies @given(strategies.multipolygons) @given(strategies.multipolygons_with_points)
28.484848
79
0.719149
from typing import Tuple from hypothesis import given from gon.base import (Multipolygon, Point) from tests.utils import equivalence from . import strategies @given(strategies.multipolygons) def test_vertices(multipolygon: Multipolygon) -> None: assert all(vertex in multipolygon ...
632
0
44
0d7a3e5a79ba80bc82f905112ac0ea79d2da3cf1
531
py
Python
src/options.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
1
2021-12-02T15:04:08.000Z
2021-12-02T15:04:08.000Z
src/options.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
null
null
null
src/options.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
1
2021-12-02T15:04:09.000Z
2021-12-02T15:04:09.000Z
from default_data import default_data values={1:str(default_data.sample_id),2:default_data.sample_type,3:default_data.report_type,4:default_data.doc_type } set_options = {1:"id", 2:"type", 3:"report", 4:"doc"} get_options = {1: "name", 2: "intro", 3: "gene", 4: "stem-loop", 5: "peptide", 6: "cds", 7: "source", 8: "comm...
88.5
128
0.65725
from default_data import default_data values={1:str(default_data.sample_id),2:default_data.sample_type,3:default_data.report_type,4:default_data.doc_type } set_options = {1:"id", 2:"type", 3:"report", 4:"doc"} get_options = {1: "name", 2: "intro", 3: "gene", 4: "stem-loop", 5: "peptide", 6: "cds", 7: "source", 8: "comm...
0
0
0
1bcfd676504406ba19e350f8d7e47ab9e71aaa8d
4,179
py
Python
tests/pytestgen/test_output.py
notionparallax/pytestgen
52821ac1ed3aa4864fa47af9dd1825f92d4367d7
[ "MIT" ]
5
2019-10-20T19:58:50.000Z
2021-12-15T00:44:41.000Z
tests/pytestgen/test_output.py
notionparallax/pytestgen
52821ac1ed3aa4864fa47af9dd1825f92d4367d7
[ "MIT" ]
2
2020-02-02T12:23:37.000Z
2021-12-13T23:58:42.000Z
tests/pytestgen/test_output.py
notionparallax/pytestgen
52821ac1ed3aa4864fa47af9dd1825f92d4367d7
[ "MIT" ]
2
2020-05-18T13:56:30.000Z
2021-12-15T00:44:46.000Z
from ast import FunctionDef from os import path from munch import munchify from pyfakefs.pytest_plugin import fs import pytest from pytestgen.load import PyTestGenInputFile from pytestgen.parse import PyTestGenParsedSet, PyTestGenParsedFile, get_existing_test_functions import pytestgen.output from fixtures import mo...
40.572816
96
0.767408
from ast import FunctionDef from os import path from munch import munchify from pyfakefs.pytest_plugin import fs import pytest from pytestgen.load import PyTestGenInputFile from pytestgen.parse import PyTestGenParsedSet, PyTestGenParsedFile, get_existing_test_functions import pytestgen.output from fixtures import mo...
3,586
0
182
071e88c7c8b0ef8617a798c4d21554568522c26c
13,856
py
Python
bmtk/utils/sonata/file_root.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
216
2017-10-03T17:02:42.000Z
2022-03-20T03:35:48.000Z
bmtk/utils/sonata/file_root.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
92
2018-03-19T10:14:18.000Z
2022-01-29T15:21:47.000Z
bmtk/utils/sonata/file_root.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
97
2017-10-03T22:15:06.000Z
2022-03-23T21:03:26.000Z
# Copyright 2017. Allen Institute. All rights reserved # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
45.880795
120
0.670612
# Copyright 2017. Allen Institute. All rights reserved # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
2,885
6,760
311
27a41e0d544a5c6660bd427e332b412facc45223
2,615
py
Python
setup.py
wlang42/Products.CMFCore
9e4872425c46b50b730750b230cfe7221bc2a7d4
[ "ZPL-2.1" ]
null
null
null
setup.py
wlang42/Products.CMFCore
9e4872425c46b50b730750b230cfe7221bc2a7d4
[ "ZPL-2.1" ]
null
null
null
setup.py
wlang42/Products.CMFCore
9e4872425c46b50b730750b230cfe7221bc2a7d4
[ "ZPL-2.1" ]
null
null
null
import os from setuptools import setup from setuptools import find_packages NAME = 'CMFCore' here = os.path.abspath(os.path.dirname(__file__)) package = os.path.join(here, 'Products', NAME) _boundary = '\n' + ('-' * 60) + '\n\n' README = _boundary.join([ _package_doc('README.txt'), _package_doc('CHANGES.tx...
31.890244
89
0.587763
import os from setuptools import setup from setuptools import find_packages NAME = 'CMFCore' here = os.path.abspath(os.path.dirname(__file__)) package = os.path.join(here, 'Products', NAME) def _package_doc(name): f = open(os.path.join(here, name)) return f.read() _boundary = '\n' + ('-' * 60) + '\n\n' RE...
61
0
23
8c2f2b0b29a89361362b8c63b5f23ed318d65a4a
3,030
py
Python
nova/conf/osapi_v21.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/conf/osapi_v21.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/conf/osapi_v21.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
1
2020-03-01T17:04:57.000Z
2020-03-01T17:04:57.000Z
# Copyright 2015 OpenStack Foundation # 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 requ...
28.317757
79
0.709571
# Copyright 2015 OpenStack Foundation # 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 requ...
125
0
46
bc50a54003ed4f378eba19789b209b5f23ec8ad4
1,813
py
Python
SfM/Traditional/PnPRANSAC.py
akathpal/ComputerVision-CMSC733
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2019-09-26T02:06:17.000Z
2019-09-26T02:06:17.000Z
SfM/Traditional/PnPRANSAC.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
null
null
null
SfM/Traditional/PnPRANSAC.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2022-03-30T05:03:09.000Z
2022-03-30T05:03:09.000Z
"""Summary """ import numpy as np import LinearPnP as LPnP import random from tqdm import tqdm def proj3Dto2D(x3D, K, C, R): """Summary Args: x3D (TYPE): Description K (TYPE): Description C (TYPE): Description R (TYPE): Description Returns: TYPE: Description "...
24.173333
68
0.498621
"""Summary """ import numpy as np import LinearPnP as LPnP import random from tqdm import tqdm def proj3Dto2D(x3D, K, C, R): """Summary Args: x3D (TYPE): Description K (TYPE): Description C (TYPE): Description R (TYPE): Description Returns: TYPE: Description "...
0
0
0
91209b23eab8a5ab7f587d0930191fdd2e862962
965
py
Python
setup.py
mefsantos/branch-testing
04c944950fc5d4ebafc32d27f7e08bd760b89e66
[ "Unlicense" ]
null
null
null
setup.py
mefsantos/branch-testing
04c944950fc5d4ebafc32d27f7e08bd760b89e66
[ "Unlicense" ]
null
null
null
setup.py
mefsantos/branch-testing
04c944950fc5d4ebafc32d27f7e08bd760b89e66
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install def friendly(command_subclass): """ A decorator for classes subclassing one of the setuptools commands. It modifies the run() method so that it prints a friendly gre...
21.931818
71
0.699482
#!/usr/bin/env python from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install def friendly(command_subclass): """ A decorator for classes subclassing one of the setuptools commands. It modifies the run() method so that it prints a friendly gre...
48
47
46
be4cbce6f0215362dc8c07de53a409e097b2847d
102
py
Python
tests/__init__.py
iteg-hq/pystaticsql
cb2c61d49e5ef33c33c99f6f26da0e55b78696f2
[ "MIT" ]
null
null
null
tests/__init__.py
iteg-hq/pystaticsql
cb2c61d49e5ef33c33c99f6f26da0e55b78696f2
[ "MIT" ]
null
null
null
tests/__init__.py
iteg-hq/pystaticsql
cb2c61d49e5ef33c33c99f6f26da0e55b78696f2
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'staticsql'))
25.5
80
0.764706
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'staticsql'))
0
0
0
abb474a9f34b3f34295c3057977ccfd213b24757
2,576
py
Python
source/_static/code/fasta_object.py
C3BI-pasteur-fr/python-solutions-1
4f476d4e8b636f9e4480437f776c528666fad96a
[ "CC0-1.0" ]
null
null
null
source/_static/code/fasta_object.py
C3BI-pasteur-fr/python-solutions-1
4f476d4e8b636f9e4480437f776c528666fad96a
[ "CC0-1.0" ]
null
null
null
source/_static/code/fasta_object.py
C3BI-pasteur-fr/python-solutions-1
4f476d4e8b636f9e4480437f776c528666fad96a
[ "CC0-1.0" ]
null
null
null
if __name__ == '__main__': import sys import os.path if len(sys.argv) != 2: sys.exit("usage fasta_object fasta_path") fasta_path = sys.argv[1] if not os.path.exists(fasta_path): sys.exit("No such file: {}".format(fasta_path)) fasta_parser = FastaParser(fasta_path) for seq...
32.2
74
0.53222
class Sequence(object): def __init__(self, id_, sequence, comment=''): self.id = id_ self.comment = comment self.sequence = sequence def gc_percent(self): seq = self.sequence.upper() return float(seq.count('G') + seq.count('C')) / float(len(seq)) class FastaParser(obje...
417
1,554
99
b9b417b80dc5364aedd894415852090ddedf5d18
568
py
Python
ex034.py
AleLucasG/Estudos-Python-I
4144033bb77b06dd1c9c56a36d5bb152295a6be6
[ "MIT" ]
null
null
null
ex034.py
AleLucasG/Estudos-Python-I
4144033bb77b06dd1c9c56a36d5bb152295a6be6
[ "MIT" ]
null
null
null
ex034.py
AleLucasG/Estudos-Python-I
4144033bb77b06dd1c9c56a36d5bb152295a6be6
[ "MIT" ]
null
null
null
""" Escreva um programa que pergunte o salário de um funcionário e calcule o valor do seu aumento. Para salários superiores a R$1.250,00, calcule um aumento de 10%. Para os inferiores ou iguais, o aumento é de 15%.""" salario = float(input('Qual valor do seu salario R$ ')) if salario <= 1249.99: aumento = (salario...
33.411765
118
0.683099
""" Escreva um programa que pergunte o salário de um funcionário e calcule o valor do seu aumento. Para salários superiores a R$1.250,00, calcule um aumento de 10%. Para os inferiores ou iguais, o aumento é de 15%.""" salario = float(input('Qual valor do seu salario R$ ')) if salario <= 1249.99: aumento = (salario...
0
0
0
c5d0c24a15150b3cdda7f3912e703b749d6efcab
1,413
py
Python
lib/od/identity/onedrive_vercel_index.py
ZimCodes/Zyod
5f9e2138cef01930fdf8d29269495f862c183ccb
[ "MIT" ]
1
2022-03-19T19:12:58.000Z
2022-03-19T19:12:58.000Z
lib/od/identity/onedrive_vercel_index.py
ZimCodes/Zyod
5f9e2138cef01930fdf8d29269495f862c183ccb
[ "MIT" ]
1
2022-03-23T12:21:28.000Z
2022-03-24T02:18:45.000Z
lib/od/identity/onedrive_vercel_index.py
ZimCodes/Zyod
5f9e2138cef01930fdf8d29269495f862c183ccb
[ "MIT" ]
null
null
null
from .base_identity import BaseIdentity from ...driver.support.driver_support import DriverSupport class OneDriveVercelIndex(BaseIdentity): """OneDriveVercelIndex object to identify said OD""" @staticmethod @staticmethod def _footer(driver) -> bool: """Check for the 'powered by onedrive-verc...
33.642857
96
0.64402
from .base_identity import BaseIdentity from ...driver.support.driver_support import DriverSupport class OneDriveVercelIndex(BaseIdentity): """OneDriveVercelIndex object to identify said OD""" @staticmethod def is_od(driver) -> bool: return OneDriveVercelIndex._footer(driver) or OneDriveVercelInd...
157
0
26
4f8cf2874f900c610e1a276ea22e8e8ecd208a6f
3,534
py
Python
mev/api/public_data/sources/gdc/tcga.py
hsph-qbrc/mev-backend
c381800aa7d53d7256e89a4db5a0f9444264e9a6
[ "MIT" ]
null
null
null
mev/api/public_data/sources/gdc/tcga.py
hsph-qbrc/mev-backend
c381800aa7d53d7256e89a4db5a0f9444264e9a6
[ "MIT" ]
null
null
null
mev/api/public_data/sources/gdc/tcga.py
hsph-qbrc/mev-backend
c381800aa7d53d7256e89a4db5a0f9444264e9a6
[ "MIT" ]
null
null
null
import copy import re import json import logging import requests import datetime import shutil import os import tarfile import uuid import pandas as pd from django.conf import settings from api.utilities.basic_utils import get_with_retry, \ make_local_directory from .gdc import GDCDataSource, GDCRnaSeqDataSourc...
33.028037
105
0.676853
import copy import re import json import logging import requests import datetime import shutil import os import tarfile import uuid import pandas as pd from django.conf import settings from api.utilities.basic_utils import get_with_retry, \ make_local_directory from .gdc import GDCDataSource, GDCRnaSeqDataSourc...
749
0
162
3364b33b85badd5f70d904a4134808f39e3df4a1
3,996
py
Python
tests/integration/states/test_ssh_auth.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
1
2021-09-06T00:14:04.000Z
2021-09-06T00:14:04.000Z
tests/integration/states/test_ssh_auth.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
2
2021-04-30T21:17:57.000Z
2021-12-13T20:40:23.000Z
tests/integration/states/test_ssh_auth.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Test the ssh_auth states """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.files # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import destructi...
35.678571
86
0.63013
# -*- coding: utf-8 -*- """ Test the ssh_auth states """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os # Import salt libs import salt.utils.files # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import destructi...
3,076
391
23
6848665c432b401ac689c588426181ebbfd36cc1
232
py
Python
service_user.py
RobinCAS/CircuitBreaker_py
941314fec95671a6d5af49f884e585ea1d3a936a
[ "MIT" ]
null
null
null
service_user.py
RobinCAS/CircuitBreaker_py
941314fec95671a6d5af49f884e585ea1d3a936a
[ "MIT" ]
1
2017-01-05T02:25:25.000Z
2017-01-05T02:25:25.000Z
service_user.py
RobinCAS/CircuitBreaker_py
941314fec95671a6d5af49f884e585ea1d3a936a
[ "MIT" ]
null
null
null
""" service_user.py """ from flask import Flask, jsonify app = Flask(__name__) @app.route("/user", methods=['GET']) if __name__ == "__main__": app.run(port=3002, debug=True)
14.5
36
0.650862
""" service_user.py """ from flask import Flask, jsonify app = Flask(__name__) @app.route("/user", methods=['GET']) def get_user(): return jsonify(name='CAS') if __name__ == "__main__": app.run(port=3002, debug=True)
25
0
22
56a6a7bee984a8facda8deb4784fa15bd591ea52
2,911
py
Python
src/shop/business/service.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/shop/business/service.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/shop/business/service.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
35.938272
92
0.762625
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
525
0
22
fe5748f4771bb5c4cdcf7a649ae541fa6ab87fb5
2,589
py
Python
config.py
RetroCirce/Zero_Shot_Audio_Source_Separation
16b5c2cc9f263c6d17894d433a2da31b07788f4d
[ "MIT" ]
66
2021-12-25T17:09:21.000Z
2022-03-31T08:15:51.000Z
config.py
RetroCirce/Zero_Shot_Audio_Source_Separation
16b5c2cc9f263c6d17894d433a2da31b07788f4d
[ "MIT" ]
13
2022-01-06T04:12:37.000Z
2022-03-20T23:07:12.000Z
config.py
RetroCirce/Zero_Shot_Audio_Source_Separation
16b5c2cc9f263c6d17894d433a2da31b07788f4d
[ "MIT" ]
8
2022-02-02T17:42:38.000Z
2022-03-27T09:12:06.000Z
# Ke Chen # knutchen@ucsd.edu # Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data # The configuration file # for model training exp_name = "exp_zs_asp_full" # the saved ckpt prefix name of the model workspace = "/home/Research/ZS_ASP/" # the folder of your code dataset_path = "/home/...
41.758065
144
0.759367
# Ke Chen # knutchen@ucsd.edu # Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data # The configuration file # for model training exp_name = "exp_zs_asp_full" # the saved ckpt prefix name of the model workspace = "/home/Research/ZS_ASP/" # the folder of your code dataset_path = "/home/...
0
0
0
02f91dbb53c6aa165b7007d16cdc9f0a7517c844
39,932
py
Python
projects/FashionNet/scripts/deepfashion2_to_shopee_coco.py
sm047/detectron2
1036cce320ce0f2adbce7f143566462d3222bd5a
[ "Apache-2.0" ]
5
2020-06-16T11:31:22.000Z
2021-11-08T03:07:47.000Z
projects/FashionNet/scripts/deepfashion2_to_shopee_coco.py
fangchengji/detectron2
1036cce320ce0f2adbce7f143566462d3222bd5a
[ "Apache-2.0" ]
null
null
null
projects/FashionNet/scripts/deepfashion2_to_shopee_coco.py
fangchengji/detectron2
1036cce320ce0f2adbce7f143566462d3222bd5a
[ "Apache-2.0" ]
null
null
null
import json from PIL import Image import numpy as np import shutil import os import random dataset = { "info": {}, "licenses": [], "images": [], "annotations": [], "annotations2": [], "categories": [], "categories2": [] } dataset['categories'].append({ 'id': 1, 'name': "short_sleev...
90.548753
1,968
0.425548
import json from PIL import Image import numpy as np import shutil import os import random dataset = { "info": {}, "licenses": [], "images": [], "annotations": [], "annotations2": [], "categories": [], "categories2": [] } dataset['categories'].append({ 'id': 1, 'name': "short_sleev...
3,425
-10
140
fe23fff39b7dd739ed6401f91a2cedc997fe08c6
1,606
py
Python
feishu/api_drive_doc.py
crisone/feishu-python-sdk
36a610926553f0fc5325c87d3955fde5f5d417be
[ "MIT" ]
44
2020-08-11T04:35:53.000Z
2022-03-09T16:23:55.000Z
feishu/api_drive_doc.py
crisone/feishu-python-sdk
36a610926553f0fc5325c87d3955fde5f5d417be
[ "MIT" ]
2
2020-10-21T08:07:20.000Z
2021-09-10T08:42:03.000Z
feishu/api_drive_doc.py
crisone/feishu-python-sdk
36a610926553f0fc5325c87d3955fde5f5d417be
[ "MIT" ]
12
2020-10-01T07:00:31.000Z
2022-03-13T14:59:06.000Z
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from typing import TYPE_CHECKING from feishu.dt_drive import DriveDocFileMeta from feishu.dt_help import make_datatype if TYPE_CHECKING: from feishu.api import OpenLark
30.884615
89
0.684309
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from typing import TYPE_CHECKING from feishu.dt_drive import DriveDocFileMeta from feishu.dt_help import make_datatype if TYPE_CHECKING: from feishu.api import OpenLark class APIDriveDocMixin(object): def ge...
0
1,470
23
631d0ad57e7f9c8b7dcf51cf4207ed5358680427
1,855
py
Python
GameElements/boardgame.py
glauberdmo/game-project
835a3b23a3605dc0070615962e636c754cb6c0c5
[ "Unlicense" ]
null
null
null
GameElements/boardgame.py
glauberdmo/game-project
835a3b23a3605dc0070615962e636c754cb6c0c5
[ "Unlicense" ]
null
null
null
GameElements/boardgame.py
glauberdmo/game-project
835a3b23a3605dc0070615962e636c754cb6c0c5
[ "Unlicense" ]
null
null
null
from typing import List import numpy as np EMPTY_SYMBOL = "_" #Validators
28.106061
71
0.563342
from typing import List import numpy as np EMPTY_SYMBOL = "_" class Boardgame: def __init__(self, board_h:int, board_w:int): #boardgame is a 2d numpy array self.board_h = board_h self.board_w = board_w self.board = np.zeros((board_h, board_w), dtype=str) self.board.fill(EM...
1,457
-5
296
21eab977b3a2d85635e8b4aca52f5e2b2a884b9e
56
py
Python
04/01/instance_method/timetz.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
04/01/instance_method/timetz.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
32
2017-09-01T00:52:17.000Z
2017-10-01T00:30:02.000Z
04/01/instance_method/timetz.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
import datetime print(datetime.datetime.now().timetz())
18.666667
39
0.785714
import datetime print(datetime.datetime.now().timetz())
0
0
0
2faf25ff3604020d474509c409ccb362674d5d4d
753
py
Python
audiotype/MockAudioType.py
monsdar/Mubox
e06e73903b1b7fdd8da48b6189b238ee25a57242
[ "MIT" ]
null
null
null
audiotype/MockAudioType.py
monsdar/Mubox
e06e73903b1b7fdd8da48b6189b238ee25a57242
[ "MIT" ]
null
null
null
audiotype/MockAudioType.py
monsdar/Mubox
e06e73903b1b7fdd8da48b6189b238ee25a57242
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' This AudioType only prints some info onto the console ''' import logging from audiotype.IAudioType import IAudioType
30.12
83
0.658699
#!/usr/bin/env python3 ''' This AudioType only prints some info onto the console ''' import logging from audiotype.IAudioType import IAudioType class MockAudioType(IAudioType): def __init__(self): self.currentTag = "" self.currentConfig = None self.logger = logging.getLogger("mubox.MockAu...
447
11
150
0eba93c3d67b55a38cc6f97c9b04103a070a3ad1
498
py
Python
backend/apps/banking/migrations/0005_auto_20200606_1325.py
anilvrathod1/bestCDK
c940f27da8e0bcafb901f1f10adfb42308f49543
[ "MIT" ]
1
2020-07-06T12:34:50.000Z
2020-07-06T12:34:50.000Z
backend/apps/banking/migrations/0005_auto_20200606_1325.py
anilvrathod1/bestCDK
c940f27da8e0bcafb901f1f10adfb42308f49543
[ "MIT" ]
null
null
null
backend/apps/banking/migrations/0005_auto_20200606_1325.py
anilvrathod1/bestCDK
c940f27da8e0bcafb901f1f10adfb42308f49543
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-06-06 13:25 import backend.storage_backends from django.db import migrations, models
24.9
110
0.668675
# Generated by Django 3.0.6 on 2020-06-06 13:25 import backend.storage_backends from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('banking', '0004_transaction_source_file'), ] operations = [ migrations.AlterField( model_name='s...
0
352
23