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
8cf2d55e40a7f8dba7559856ea643336c51f17b9
9,477
py
Python
lib/structures.py
logicplace/race-mini-editor
3f18b048ef5608e8ee96f87e6337d3e9fb63c95d
[ "MIT" ]
3
2020-08-08T09:41:51.000Z
2022-02-23T00:36:10.000Z
lib/structures.py
logicplace/race-mini-editor
3f18b048ef5608e8ee96f87e6337d3e9fb63c95d
[ "MIT" ]
null
null
null
lib/structures.py
logicplace/race-mini-editor
3f18b048ef5608e8ee96f87e6337d3e9fb63c95d
[ "MIT" ]
null
null
null
import re import struct from typing import Any, BinaryIO, Dict, NamedTuple, Optional, Sequence, Tuple from .util import music, tilesets, load_tileset, spritesets, load_spriteset, PokeImportError from .sound import MinLibSound from .encoders import encode_tiles
25.339572
92
0.661602
import re import struct from typing import Any, BinaryIO, Dict, NamedTuple, Optional, Sequence, Tuple from .util import music, tilesets, load_tileset, spritesets, load_spriteset, PokeImportError from .sound import MinLibSound from .encoders import encode_tiles def to3b(x: int): return x.to_bytes(3, "little") def ...
6,938
2,197
184
02ab5ac38323d1a54c6ec402c2b0af7e9a378c0b
12,767
py
Python
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
21
2019-10-07T22:55:36.000Z
2020-12-09T20:07:03.000Z
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
5
2019-09-05T14:15:36.000Z
2020-03-17T20:21:42.000Z
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
5
2018-05-02T16:38:28.000Z
2020-01-02T15:06:02.000Z
# This is an example program showing different methods of controlling motors, servos, and Neopixels. # It works with a Rock Candy or PiHut PS3 controller. # The left stick controls the speed and direction of both motors - push up to go forwards, down for backwards and left or right to steer. # The right stick directly ...
31.9175
173
0.524242
# This is an example program showing different methods of controlling motors, servos, and Neopixels. # It works with a Rock Candy or PiHut PS3 controller. # The left stick controls the speed and direction of both motors - push up to go forwards, down for backwards and left or right to steer. # The right stick directly ...
252
0
22
a8e53e3b4dbf4f5115d1ab434dfe78e4bddcfa5a
3,429
py
Python
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
2
2017-01-23T17:12:41.000Z
2019-01-14T13:38:17.000Z
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
242
2016-05-09T18:46:51.000Z
2022-03-31T22:02:29.000Z
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
2
2017-03-27T09:13:40.000Z
2019-01-27T10:55:30.000Z
""" Tools to help manage Globus proxies """ import os import subprocess import logging from iceprod.server.config import IceProdConfig logger = logging.getLogger('globus') class SiteGlobusProxy(object): """ Manage site-wide globus proxy :param cfgfile: cfgfile location (optional) :param duration: p...
37.681319
99
0.534267
""" Tools to help manage Globus proxies """ import os import subprocess import logging from iceprod.server.config import IceProdConfig logger = logging.getLogger('globus') class SiteGlobusProxy(object): """ Manage site-wide globus proxy :param cfgfile: cfgfile location (optional) :param duration: p...
379
0
26
718f6a531ed9f39d127e9a33e63589d99008dec5
2,268
py
Python
percy/resource_loader.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2017-10-31T11:29:24.000Z
2017-10-31T11:29:24.000Z
percy/resource_loader.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2021-03-26T00:50:40.000Z
2021-03-26T00:50:40.000Z
percy/resource_loader.py
rob-opsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
2
2018-06-05T02:33:05.000Z
2021-03-02T11:17:47.000Z
import os import percy from percy import utils try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse __all__ = ['ResourceLoader'] MAX_FILESIZE_BYTES = 15 * 1024**2 # 15 MiB.
32.869565
85
0.593915
import os import percy from percy import utils try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse __all__ = ['ResourceLoader'] MAX_FILESIZE_BYTES = 15 * 1024**2 # 15 MiB. class BaseResourceLoader(object): @property def build_resources(self): raise NotI...
1,778
221
46
b963a238595dc05d6bc40e6f5888099b52a8fc14
20,515
py
Python
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
import traceback import uuid import socket import logging import os import base64 import zlib import gzip import time import datetime from http import cookies from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from threading import Thread import WebRequest if __name__ == '__main__'...
32.929374
165
0.640653
import traceback import uuid import socket import logging import os import base64 import zlib import gzip import time import datetime from http import cookies from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from threading import Thread import WebRequest def capture_expected_headers...
19,918
0
69
67270613f64a8a2bf43b95c90d08c32285cdbd1c
20,081
py
Python
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
21
2017-08-06T02:47:05.000Z
2022-03-13T17:39:00.000Z
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
87
2017-12-26T17:07:59.000Z
2022-03-11T01:31:48.000Z
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
7
2019-10-23T17:30:34.000Z
2022-03-31T05:56:43.000Z
import re import math import random import logging from collections import OrderedDict from discord.ext import commands from common import utilities from common import dynamo_manager from common.module.discoverable_module import DiscoverableCog from common.module.module_initialization_container import ModuleInitializ...
38.617308
120
0.598377
import re import math import random import logging from collections import OrderedDict from discord.ext import commands from common import utilities from common import dynamo_manager from common.module.discoverable_module import DiscoverableCog from common.module.module_initialization_container import ModuleInitializ...
11,993
1,762
305
16d91b413c5b0ff989f0583278802423f8821a13
7,359
py
Python
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
1
2020-12-08T14:29:08.000Z
2020-12-08T14:29:08.000Z
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
null
null
null
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
null
null
null
import pytest from keras.preprocessing import image from PIL import Image import numpy as np import os import shutil import tempfile if __name__ == '__main__': pytest.main([__file__])
37.738462
107
0.555646
import pytest from keras.preprocessing import image from PIL import Image import numpy as np import os import shutil import tempfile class TestImage: def setup_class(cls): img_w = img_h = 20 rgb_images = [] gray_images = [] for n in range(8): bias = np....
6,933
-5
228
d6583013d9b22bea192d0a72428b5f4e35977e91
1,132
py
Python
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import find_packages, setup project = "ch-cli" version = "0.1.0" setup( name=project, version=version, description="Command line tool for ch", author="Zuiwan", author_email="danceiny@gmail.com", url="https://github.com/zuiwan/CodingHub-CLI.git", package...
24.608696
81
0.539753
#!/usr/bin/env python from setuptools import find_packages, setup project = "ch-cli" version = "0.1.0" setup( name=project, version=version, description="Command line tool for ch", author="Zuiwan", author_email="danceiny@gmail.com", url="https://github.com/zuiwan/CodingHub-CLI.git", package...
0
0
0
c6781e3b5409730674626896503725c3c53ad9cf
4,135
py
Python
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
import os import re from typing import ( Union, List, Dict, Pattern ) from pyrogram.filters import create from pyrogram import filters, Client from pyrogram.types import ( Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update ) from config import Config from tronx.da...
23.494318
106
0.685127
import os import re from typing import ( Union, List, Dict, Pattern ) from pyrogram.filters import create from pyrogram import filters, Client from pyrogram.types import ( Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update ) from config import Config from tronx.da...
3,541
0
44
897bbc983e66081213620110e136f15fdd0ac12c
1,071
py
Python
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
6
2021-09-14T07:04:54.000Z
2022-03-24T16:07:41.000Z
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
4
2021-10-14T22:18:47.000Z
2022-03-30T13:03:07.000Z
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
3
2022-01-13T20:22:39.000Z
2022-03-03T12:52:44.000Z
import torch from dataset import DrivingDataset from vidvqvae import VQVAE from torch.utils.data import DataLoader from torch.utils.data import random_split import pytorch_lightning as pl from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.callbacks import ModelCheckpoint dataset = DrivingDataset...
31.5
102
0.782446
import torch from dataset import DrivingDataset from vidvqvae import VQVAE from torch.utils.data import DataLoader from torch.utils.data import random_split import pytorch_lightning as pl from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.callbacks import ModelCheckpoint dataset = DrivingDataset...
0
0
0
16460dd8cef3c4ca6e999f16951e9835cac32996
3,369
py
Python
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
30
2015-02-10T05:47:38.000Z
2022-01-20T08:48:43.000Z
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
16
2015-01-08T23:24:34.000Z
2018-07-18T07:15:40.000Z
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
19
2015-05-07T05:34:42.000Z
2020-12-13T10:50:14.000Z
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
48.826087
79
0.666667
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
520
1,297
23
c055b680671015ae685487c0a21864dbeeb5d7bc
100
py
Python
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
from ColorText import ColorText Texto = ColorText.mudaCor('Olá Mundo!','blue','lo') print(Texto)
25
52
0.73
from ColorText import ColorText Texto = ColorText.mudaCor('Olá Mundo!','blue','lo') print(Texto)
0
0
0
3b94585921a2a79178522ecf37a1d9d48c8968b5
5,484
py
Python
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for the color module. BSD 3-Clause License Copyright (c) 2020-2021, Daniel Nagel All rights reserved. """ import numpy as np import pytest from matplotlib import colors as clr import prettypyplot @pytest.mark.parametrize('num, kwargs, error', [ (1, {}, None), (2, {'high': 2...
28.712042
76
0.539752
# -*- coding: utf-8 -*- """Tests for the color module. BSD 3-Clause License Copyright (c) 2020-2021, Daniel Nagel All rights reserved. """ import numpy as np import pytest from matplotlib import colors as clr import prettypyplot @pytest.mark.parametrize('num, kwargs, error', [ (1, {}, None), (2, {'high': 2...
0
0
0
83c0d62cdfe8ec13e3ea83047998446d9035f49a
927
py
Python
tests/conftest.py
RasaHQ/rasa_stack
f2a5637fee5bda0faa9fc691c453a40cffc36666
[ "Apache-2.0" ]
11
2018-11-03T20:20:36.000Z
2020-07-22T08:28:40.000Z
tests/conftest.py
RasaHQ/rasa_stack
f2a5637fee5bda0faa9fc691c453a40cffc36666
[ "Apache-2.0" ]
10
2019-01-24T13:25:11.000Z
2019-03-13T16:26:16.000Z
tests/conftest.py
RasaHQ/rasa_stack
f2a5637fee5bda0faa9fc691c453a40cffc36666
[ "Apache-2.0" ]
4
2019-02-10T10:48:38.000Z
2021-07-22T07:01:29.000Z
from typing import Text import os import pytest from rasa.constants import (DEFAULT_DOMAIN_PATH, DEFAULT_CONFIG_PATH, DEFAULT_MODELS_PATH, DEFAULT_DATA_PATH) @pytest.fixture(scope="session") @pytest.fixture(scope="session")
25.75
69
0.734628
from typing import Text import os import pytest from rasa.constants import (DEFAULT_DOMAIN_PATH, DEFAULT_CONFIG_PATH, DEFAULT_MODELS_PATH, DEFAULT_DATA_PATH) @pytest.fixture(scope="session") def project() -> Text: import tempfile from rasa.cli.scaffold import _create_initial_proje...
602
0
67
3d3b585878eec40a93008097771d36002f81b5a6
1,157
py
Python
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
1
2021-12-31T19:29:55.000Z
2021-12-31T19:29:55.000Z
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
null
null
null
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
null
null
null
# pylint: disable = missing-docstring import pytest from bases import encoding from bases.encoding import BaseEncoding from bases import random from bases.random import rand_str random.set_options(min_bytes=0, max_bytes=16) nsamples = 1024 @pytest.mark.parametrize("enc_name,enc", list(encoding.table()))
34.029412
82
0.666379
# pylint: disable = missing-docstring import pytest from bases import encoding from bases.encoding import BaseEncoding from bases import random from bases.random import rand_str random.set_options(min_bytes=0, max_bytes=16) nsamples = 1024 def _test_decode_encode(i: int, s: str, enc_name: str, enc: BaseEncoding) ->...
803
0
45
63c538aa0950d31879a3e1554c0b16512302bf07
136
py
Python
schemas/error_response.py
victorgrubio/flask-mongo-template-api
b82f444eb7daa2f7ee7c1ceb46046b7f2322b991
[ "Apache-2.0" ]
null
null
null
schemas/error_response.py
victorgrubio/flask-mongo-template-api
b82f444eb7daa2f7ee7c1ceb46046b7f2322b991
[ "Apache-2.0" ]
null
null
null
schemas/error_response.py
victorgrubio/flask-mongo-template-api
b82f444eb7daa2f7ee7c1ceb46046b7f2322b991
[ "Apache-2.0" ]
null
null
null
from marshmallow import Schema, fields
27.2
66
0.779412
from marshmallow import Schema, fields class ErrorResponse(Schema): error = fields.String(description="Error returned by the API")
0
74
23
f184523890bcf9b76f0ab06d67dc6de838d0acf5
710
py
Python
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
from pydantic import validator, Field from pystratis.api import Model # noinspection PyUnresolvedReferences class AddNodeRequest(Model): """A request model for the connectionmanager/addnode endpoint. Args: ipaddr (str): The endpoint. command (str): Allowed commands [add, remove, onetry] "...
26.296296
68
0.625352
from pydantic import validator, Field from pystratis.api import Model # noinspection PyUnresolvedReferences class AddNodeRequest(Model): """A request model for the connectionmanager/addnode endpoint. Args: ipaddr (str): The endpoint. command (str): Allowed commands [add, remove, onetry] "...
223
0
26
3f510b14969b96c8ab32bc2699f596314fa605f0
61
py
Python
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
1
2017-10-18T03:21:40.000Z
2017-10-18T03:21:40.000Z
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
null
null
null
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
null
null
null
import os PATH = os.path.abspath(os.path.dirname(__file__))
15.25
49
0.754098
import os PATH = os.path.abspath(os.path.dirname(__file__))
0
0
0
c79c2009cad0bd80495b4043b43b3b05c18be1dd
1,465
py
Python
django_popup_view_field/fields.py
g1sky/django-popup-view-field
69eec162e336ebc82deaa2910c870bb53b216ab4
[ "MIT" ]
null
null
null
django_popup_view_field/fields.py
g1sky/django-popup-view-field
69eec162e336ebc82deaa2910c870bb53b216ab4
[ "MIT" ]
null
null
null
django_popup_view_field/fields.py
g1sky/django-popup-view-field
69eec162e336ebc82deaa2910c870bb53b216ab4
[ "MIT" ]
null
null
null
import urllib from django.forms.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.views.generic import View from .exceptions import PopupViewIsNotSubclassView from .widgets import PopupViewWidget
33.295455
94
0.662116
import urllib from django.forms.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.views.generic import View from .exceptions import PopupViewIsNotSubclassView from .widgets import PopupViewWidget class PopupViewField(CharField): def __init__(self, view_class, attrs=Non...
0
1,201
23
213f2cd6824b25ae045c553e6540cce858ad3289
3,084
py
Python
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
from browser import document as doc from browser.html import TABLE, TR, TH, TD, INPUT, SELECT, OPTION, DIV, BUTTON, SPAN, LI, H2, H3, IMG, COLGROUP, COL, P, SECTION, BR from json import load from last_update import time # Create the static elements of the home page init_page() doc['loading'] <= DIV(Id='prerendered'...
68.533333
345
0.690013
from browser import document as doc from browser.html import TABLE, TR, TH, TD, INPUT, SELECT, OPTION, DIV, BUTTON, SPAN, LI, H2, H3, IMG, COLGROUP, COL, P, SECTION, BR from json import load from last_update import time # Create the static elements of the home page def init_page(): doc['time'].text = f"poe.ninja dat...
2,740
0
22
5acacf353c21991d44914adbe24f3d385bb6a103
2,944
py
Python
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
null
null
null
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
null
null
null
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
2
2017-10-28T18:41:40.000Z
2020-05-12T12:50:52.000Z
"""Conversion functions for weather radar and rainfall data.""" from numpy import isfinite, log, ubyte from scipy.ndimage import gaussian_filter from skimage.exposure import equalize_hist, rescale_intensity def dBZ_to_ubyte(I, dBZ_min=-10.0, dBZ_max=50.0, filter_stddev=3.0): """Convert a dBZ field into a 8-bit imag...
27.259259
83
0.647079
"""Conversion functions for weather radar and rainfall data.""" from numpy import isfinite, log, ubyte from scipy.ndimage import gaussian_filter from skimage.exposure import equalize_hist, rescale_intensity def dBZ_to_ubyte(I, dBZ_min=-10.0, dBZ_max=50.0, filter_stddev=3.0): """Convert a dBZ field into a 8-bit imag...
0
0
0
39ad90663cac888e7ef286d5a052d4d945b5475e
1,152
py
Python
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
2
2019-10-25T17:11:33.000Z
2021-05-21T06:45:45.000Z
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
null
null
null
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
2
2020-05-13T18:07:02.000Z
2020-05-13T19:54:37.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from .vendor.Qt import QtWidgets from .libs.maya import fbx from .libs.maya import namespace from . import history_helper def import_fbx(path, import_mode, parent): """import fbx Args: path (unicode): path ...
31.135135
82
0.547743
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from .vendor.Qt import QtWidgets from .libs.maya import fbx from .libs.maya import namespace from . import history_helper def import_fbx(path, import_mode, parent): """import fbx Args: path (unicode): path ...
0
0
0
85bd09bc7858e6df3f0144f0d023684434a7438d
1,065
py
Python
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
from sqlalchemy import schema from sqlalchemy.orm import Session from fastapi import Depends, APIRouter, HTTPException, status from fastapi.security.oauth2 import OAuth2PasswordRequestForm from .. import db, models, schemas, utils, oauth2 router = APIRouter( tags=["Authentication"], ) @router.post("/login", re...
32.272727
101
0.709859
from sqlalchemy import schema from sqlalchemy.orm import Session from fastapi import Depends, APIRouter, HTTPException, status from fastapi.security.oauth2 import OAuth2PasswordRequestForm from .. import db, models, schemas, utils, oauth2 router = APIRouter( tags=["Authentication"], ) @router.post("/login", re...
695
0
22
714353cdd4eee160fe40085bfeaee7eb35bfec53
2,739
py
Python
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
null
null
null
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
null
null
null
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
1
2020-10-27T01:32:15.000Z
2020-10-27T01:32:15.000Z
import logging import os from aiohttp import web, WSMsgType from aiohttp.web_response import Response from jsonrpcserver.aio import methods from sn_agent import ontology from sn_agent.api.job import can_perform_service, perform_job from sn_agent.job.job_descriptor import JobDescriptor from sn_agent.ontology.service_d...
26.852941
89
0.686017
import logging import os from aiohttp import web, WSMsgType from aiohttp.web_response import Response from jsonrpcserver.aio import methods from sn_agent import ontology from sn_agent.api.job import can_perform_service, perform_job from sn_agent.job.job_descriptor import JobDescriptor from sn_agent.ontology.service_d...
2,107
0
136
f67cc3a36214f247ea7458d7048481056a241c09
384
py
Python
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
maior = 0 menor = 0 for p in range(1, 6): peso = float(input(f'Digite a massa da {p}º pessoa em quilos: ')) if p == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso lido foi de {}Kg'.for...
27.428571
69
0.546875
maior = 0 menor = 0 for p in range(1, 6): peso = float(input(f'Digite a massa da {p}º pessoa em quilos: ')) if p == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso lido foi de {}Kg'.for...
0
0
0
ef94fa3cdab88cb3c5513b937bac0106e56972d2
1,803
py
Python
userlixo/utils/patches.py
annihilatorrrr/UserLixo
d9d9bdcdab6c7489c41f2658b288e1f59674d3b3
[ "MIT" ]
1
2022-03-28T15:38:27.000Z
2022-03-28T15:38:27.000Z
userlixo/utils/patches.py
Smartgirl2/UserLixo
73c900e0488239ff9330efb1cf9e939e7f43c496
[ "MIT" ]
null
null
null
userlixo/utils/patches.py
Smartgirl2/UserLixo
73c900e0488239ff9330efb1cf9e939e7f43c496
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from pyrogram import types from pyrogram.helpers import bki, ikb from userlixo.database import Message
30.05
86
0.693844
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from pyrogram import types from pyrogram.helpers import bki, ikb from userlixo.database import Message async def query_edit( self, text: str, reply_markup=None, answer_kwargs={}, *args, **kwargs ): try: await self.answer(**answer_kw...
1,534
0
92
beffdc1038d5ff506f4d888b134dc83884effb8f
1,245
py
Python
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
null
null
null
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
null
null
null
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
1
2021-01-19T09:25:47.000Z
2021-01-19T09:25:47.000Z
import matplotlib.pyplot as plt import sys import os outDir = sys.argv[1] finalOutDir = outDir + '/figure3d/' if not os.path.exists(finalOutDir): os.makedirs(finalOutDir) #make a plot showing the true positive and false positive rates of each method. #each sv type will get its own icon, and methods can be labeled b...
31.125
89
0.711647
import matplotlib.pyplot as plt import sys import os outDir = sys.argv[1] finalOutDir = outDir + '/figure3d/' if not os.path.exists(finalOutDir): os.makedirs(finalOutDir) #make a plot showing the true positive and false positive rates of each method. #each sv type will get its own icon, and methods can be labeled b...
0
0
0
f9f3f26ea4b675f6359e66f744047dae89d21734
2,847
py
Python
madness/bracket.py
turtlebayjai/madness
19268ffe3fc20f048018656e5dd990ace8f5855a
[ "MIT" ]
null
null
null
madness/bracket.py
turtlebayjai/madness
19268ffe3fc20f048018656e5dd990ace8f5855a
[ "MIT" ]
null
null
null
madness/bracket.py
turtlebayjai/madness
19268ffe3fc20f048018656e5dd990ace8f5855a
[ "MIT" ]
null
null
null
from collections import deque from math import ceil, log from division import Division from picker import Picker
29.05102
68
0.527573
from collections import deque from math import ceil, log from division import Division from picker import Picker class BracketNode: def __init__(self, team=None, left=None, right=None): self.team = team self.left = left self.right = right def play(self, picker): if not self.l...
2,189
416
126
48f5c233085c88dc7df004bb3107e6ba9e591625
3,203
py
Python
kicad_bom_seeedstudio.py
ahmetcumhurarslan/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
19
2017-07-31T09:33:34.000Z
2021-05-19T03:18:11.000Z
kicad_bom_seeedstudio.py
ahmetcumhurarslan/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
2
2017-10-19T22:03:33.000Z
2019-05-11T19:56:51.000Z
kicad_bom_seeedstudio.py
imrehg/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
7
2017-10-19T20:38:24.000Z
2021-02-26T00:55:06.000Z
#!/usr/bin/env python3 import csv import sys import xml.etree.ElementTree as ET ### Natural key sorting for orders like : C1, C5, C10, C12 ... (instead of C1, C10, C12, C5...) # http://stackoverflow.com/a/5967539 import re def natural_keys(text): ''' alist.sort(key=natural_keys) sorts in human order http:...
33.020619
95
0.597877
#!/usr/bin/env python3 import csv import sys import xml.etree.ElementTree as ET ### Natural key sorting for orders like : C1, C5, C10, C12 ... (instead of C1, C10, C12, C5...) # http://stackoverflow.com/a/5967539 import re def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): '...
43
0
23
c6ff96beb7b31da28f265ad6877c8d563618606d
6,957
py
Python
miner/crawlers/event_crawler.py
HeavenDuke/GithubMiner
3d14c40c9cbdee6f22e7ade3493888aff708ad5b
[ "MIT" ]
2
2017-05-22T10:31:15.000Z
2017-05-23T06:52:58.000Z
miner/crawlers/event_crawler.py
HeavenDuke/GithubMiner
3d14c40c9cbdee6f22e7ade3493888aff708ad5b
[ "MIT" ]
null
null
null
miner/crawlers/event_crawler.py
HeavenDuke/GithubMiner
3d14c40c9cbdee6f22e7ade3493888aff708ad5b
[ "MIT" ]
null
null
null
import wget import gzip import time as t import json import fileinput import os
35.136364
108
0.531838
import wget import gzip import time as t import json import fileinput import os class Meta(object): base_url = "http://data.githubarchive.org/{year}-{month}-{day}-{hour}.json.gz" base_output = "./tmp/{year}-{month}-{day}-{hour}.json" @classmethod def construct(cls, year, month, day, hour): ur...
5,906
802
164
2a3ed8a00c44639bcf90af5b5d1068dde31685b4
61
py
Python
ace/samples/__init__.py
partofthething/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
47
2015-04-29T06:52:03.000Z
2022-03-15T11:05:01.000Z
ace/samples/__init__.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
12
2015-05-29T15:21:25.000Z
2020-10-08T15:03:41.000Z
ace/samples/__init__.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
22
2015-06-02T17:30:35.000Z
2022-02-16T20:46:24.000Z
"""Sample ace and supersmoother problems from literature."""
30.5
60
0.770492
"""Sample ace and supersmoother problems from literature."""
0
0
0
c983fcf6ecba02fec1316fc2ea22d85c6f139bb0
662
py
Python
geoip.py
vlzx/outlier
4a8a30d7661472e18c9809c0e6f68f3e67389d93
[ "MIT" ]
null
null
null
geoip.py
vlzx/outlier
4a8a30d7661472e18c9809c0e6f68f3e67389d93
[ "MIT" ]
null
null
null
geoip.py
vlzx/outlier
4a8a30d7661472e18c9809c0e6f68f3e67389d93
[ "MIT" ]
null
null
null
from threading import Lock import geoip2.database from util import resource_path
25.461538
85
0.63142
from threading import Lock import geoip2.database from util import resource_path class SingletonMeta(type): _instance = None _lock = Lock() def __call__(cls, *args, **kwargs): with cls._lock: if cls._instance is None: cls._instance = super(SingletonMeta...
372
93
105
720bd2b1acb5d635f24a79aa2ddb890b5d2d825e
368
py
Python
stable_baselines/td3/__init__.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
2
2022-03-11T15:26:00.000Z
2022-03-15T12:20:57.000Z
stable_baselines/td3/__init__.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
null
null
null
stable_baselines/td3/__init__.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
null
null
null
from stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise from stable_baselines.td3.rnd import RND from stable_baselines.td3.td3 import TD3 from stable_baselines.td3.dist_predictor import Predictor from stable_baselines.td3.ddl_td3 import DDLTD3 from stable_baselines.td3.policies import ...
46
89
0.877717
from stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise from stable_baselines.td3.rnd import RND from stable_baselines.td3.td3 import TD3 from stable_baselines.td3.dist_predictor import Predictor from stable_baselines.td3.ddl_td3 import DDLTD3 from stable_baselines.td3.policies import ...
0
0
0
1b8c0435205adcc1c2622b72a1f7168216808432
691
py
Python
passwordGenerator/generator/views.py
zahrakoohestani/passwordGenerator
c8a912ce159f04b488dabbbddcd8446672075be2
[ "MIT" ]
1
2020-06-19T18:14:26.000Z
2020-06-19T18:14:26.000Z
passwordGenerator/generator/views.py
zahrakoohestani/passwordGenerator
c8a912ce159f04b488dabbbddcd8446672075be2
[ "MIT" ]
null
null
null
passwordGenerator/generator/views.py
zahrakoohestani/passwordGenerator
c8a912ce159f04b488dabbbddcd8446672075be2
[ "MIT" ]
null
null
null
from django.shortcuts import render import random
32.904762
79
0.688857
from django.shortcuts import render import random def home(request): return render(request, 'generator/home.html') def password(request): characters=list('asdfghjklqwertyuiopzxcvbnm') if request.GET.get('uppercase'): characters.extend(list('ASDFGHJKLQWERTYUIOPZXCVBNM')) if request.GET.get('sym...
595
0
46
e716e82f1750b35f58a08d3424c1fe6702b9bd50
8,630
py
Python
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
#from django.test import TestCase from datetime import date from decimal import * from django.core.urlresolvers import reverse from django.contrib.auth.models import User from rest_framework.test import APITestCase from rest_framework.authtoken.models import Token from .models import * from .mommy_recipes import * ...
37.359307
79
0.626188
#from django.test import TestCase from datetime import date from decimal import * from django.core.urlresolvers import reverse from django.contrib.auth.models import User from rest_framework.test import APITestCase from rest_framework.authtoken.models import Token from .models import * from .mommy_recipes import * ...
6,320
52
385
c6f50421da170da4e7c1f28fd95dffc055cc033a
3,719
py
Python
apps/DeepFaceLive/ui/widgets/QBackendPanel.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
apps/DeepFaceLive/ui/widgets/QBackendPanel.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
apps/DeepFaceLive/ui/widgets/QBackendPanel.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
from localization import L from resources.fonts import QXFontDB from resources.gfx import QXImageDB, QXImageSequenceDB from xlib import qt as qtx from ...backend import BackendHost class QBackendPanel(qtx.QXWidget): """ Base panel for CSW backend """
39.989247
159
0.613606
from localization import L from resources.fonts import QXFontDB from resources.gfx import QXImageDB, QXImageSequenceDB from xlib import qt as qtx from ...backend import BackendHost class QBackendPanel(qtx.QXWidget): """ Base panel for CSW backend """ def __init__(self, backend : BackendHost, name : s...
3,319
0
134
19f84f2a13776fdcf0bd9bd795f06cdd34f69809
443
py
Python
tests/hmc_test.py
dfm/rmhmc
df14344296250e54ef50cf065798b94ef6d641bc
[ "MIT" ]
4
2021-09-24T00:12:52.000Z
2022-01-02T08:38:07.000Z
tests/hmc_test.py
dfm/rmhmc
df14344296250e54ef50cf065798b94ef6d641bc
[ "MIT" ]
null
null
null
tests/hmc_test.py
dfm/rmhmc
df14344296250e54ef50cf065798b94ef6d641bc
[ "MIT" ]
null
null
null
import jax.numpy as jnp import numpy as np from jax import random from rmhmc.hmc import hmc from .problems import banana
23.315789
64
0.715576
import jax.numpy as jnp import numpy as np from jax import random from rmhmc.hmc import hmc from .problems import banana def test_divergence() -> None: system = hmc(banana(False, False), initial_step_size=1000.0) state = system.init(jnp.array([0.3, 0.5])) state_ = system.step(state, random.PRNGKey(5)) ...
296
0
23
cc4b92f8c2b0fb7e78022602f5dcd214422a4189
27,874
py
Python
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
3
2020-03-23T15:59:11.000Z
2021-01-29T00:37:32.000Z
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
76
2020-01-16T20:00:25.000Z
2022-03-31T20:30:08.000Z
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
2
2020-03-27T17:39:59.000Z
2020-11-24T23:09:24.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
44.958065
268
0.643431
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
4,055
23,291
67
04240f905ddfcb37b6a4655974a95272768d65ab
1,791
py
Python
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
749
2018-08-24T13:55:34.000Z
2022-03-29T20:30:59.000Z
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
50
2018-09-09T13:27:40.000Z
2022-01-25T16:45:28.000Z
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
98
2018-08-24T15:55:23.000Z
2022-01-05T14:40:58.000Z
'''Encoder eval for MS-SSIM ''' from cortex.main import run from cortex_DIM.configs.deconvnets import configs as decoder_configs from cortex_DIM.models.decoder import Decoder class MSSSIMEval(Decoder): '''Measure MS-SSIM through a decoder trained with reconstruction. ''' defaults = dict( data=...
29.360656
83
0.61474
'''Encoder eval for MS-SSIM ''' from cortex.main import run from cortex_DIM.configs.deconvnets import configs as decoder_configs from cortex_DIM.models.decoder import Decoder class MSSSIMEval(Decoder): '''Measure MS-SSIM through a decoder trained with reconstruction. ''' defaults = dict( data=...
339
0
54
8d0910cd5960f52a9db19fe70f314beaa84f3f9b
3,742
py
Python
btsprice/yahoo.py
pch957/btsprice
8a6913dfc0d74e668e116855ea8bb1caf3af6c04
[ "MIT" ]
18
2016-09-16T16:07:35.000Z
2020-08-03T13:14:56.000Z
btsprice/yahoo.py
roelandp/btsprice
ad2f4d6d694a4ac71d5b227a22731160f700323b
[ "MIT" ]
5
2017-08-31T00:14:02.000Z
2019-10-18T12:44:22.000Z
btsprice/yahoo.py
roelandp/btsprice
ad2f4d6d694a4ac71d5b227a22731160f700323b
[ "MIT" ]
20
2016-06-27T09:46:18.000Z
2020-10-26T05:17:47.000Z
# -*- coding: utf-8 -*- import asyncio import aiohttp if __name__ == "__main__": loop = asyncio.get_event_loop() yahoo = Yahoo() loop.run_until_complete(yahoo.fetch_price()) loop.run_forever()
35.638095
80
0.512293
# -*- coding: utf-8 -*- import asyncio import aiohttp def is_float_try(str): try: float(str) return True except ValueError: return False class Yahoo(object): def __init__(self): header = { 'content-type': 'application/json', 'User-Agent': 'Mozilla/...
3,301
183
46
cd03445dfd6bb3e838191ac085b921cb783539d5
322
py
Python
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
10
2020-01-10T13:10:38.000Z
2022-03-17T05:08:40.000Z
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
45
2019-10-26T12:42:50.000Z
2022-03-12T07:50:40.000Z
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
5
2021-11-24T04:55:45.000Z
2021-12-17T23:38:19.000Z
"""Reusable utilities for data and model I/O""" from ._data_io import ( load_data, save_csv, try_load_data, try_load_xy, ) from ._model_io import save, saver DIVIK_RESULT_FNAME = "result.pkl" __all__ = [ "load_data", "save_csv", "try_load_data", "try_load_xy", "save", "saver", ...
16.1
47
0.636646
"""Reusable utilities for data and model I/O""" from ._data_io import ( load_data, save_csv, try_load_data, try_load_xy, ) from ._model_io import save, saver DIVIK_RESULT_FNAME = "result.pkl" __all__ = [ "load_data", "save_csv", "try_load_data", "try_load_xy", "save", "saver", ...
0
0
0
78b4aa6b5ba61bb43545a9d39e85f0a3741e827a
441
py
Python
client/asteroid.py
remremrem/EV-Tribute
c7dd412eedad4b8eba0cf2d4c95d539d4b80c852
[ "MIT" ]
1
2015-06-23T03:48:03.000Z
2015-06-23T03:48:03.000Z
client/asteroid.py
remremrem/EV-Tribute
c7dd412eedad4b8eba0cf2d4c95d539d4b80c852
[ "MIT" ]
null
null
null
client/asteroid.py
remremrem/EV-Tribute
c7dd412eedad4b8eba0cf2d4c95d539d4b80c852
[ "MIT" ]
null
null
null
import pyglet import rabbyt from pyglet.window import key from pyglet.window import mouse from pyglet.gl import * from tools import *
24.5
61
0.62585
import pyglet import rabbyt from pyglet.window import key from pyglet.window import mouse from pyglet.gl import * from tools import * class Asteroid: def __init__(self,window,panel): self.sprite = rabbyt.Sprite(texture = "asteroid.png") self.sprite.xy = (0,0) self.speed = 50 self.po...
264
-6
49
76bd6d76686e284e16cd6ff1f9bb9c73128a6fce
843
py
Python
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
2
2021-09-15T02:36:53.000Z
2022-03-30T16:05:07.000Z
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
null
null
null
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 22:41:09 2021 @author: amanda """ # loop through the .zip files and create images in .png format # import necessary libraries import os import image_to_png directory = "dataset_zip" #file_extensions = ["OSAVI", "NDVI", "GNDVI", "PSRI", "NDVI45"] extension = "OSAVI" ...
27.193548
66
0.688019
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 22:41:09 2021 @author: amanda """ # loop through the .zip files and create images in .png format # import necessary libraries import os import image_to_png directory = "dataset_zip" #file_extensions = ["OSAVI", "NDVI", "GNDVI", "PSRI", "NDVI45"] extension = "OSAVI" ...
0
0
0
4ce5ed3f89af7fd520b5af53b81ee7407fa15d83
938
py
Python
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
import pandas as pd CRITERIA = [ "largely_recommended", "reliability", "importance", "engaging", "pedagogy", "layman_friendly", "entertaining_relaxing", "better_habits", "diversity_inclusion", "backfire_risk", ] TCOLOR = [ "#1282b2", "#DC8A5D", "#C28BED", "#4C7...
18.038462
80
0.602345
import pandas as pd CRITERIA = [ "largely_recommended", "reliability", "importance", "engaging", "pedagogy", "layman_friendly", "entertaining_relaxing", "better_habits", "diversity_inclusion", "backfire_risk", ] TCOLOR = [ "#1282b2", "#DC8A5D", "#C28BED", "#4C7...
80
0
23
e0249aa077ed0d6f12ca41eadfc35b890bcae4a2
21,271
py
Python
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
38
2015-06-23T08:06:16.000Z
2022-01-25T16:03:10.000Z
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
null
null
null
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
17
2015-11-28T00:45:22.000Z
2021-07-22T09:22:30.000Z
# Copyright (c) 2015 Orange. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
38.744991
79
0.593249
# Copyright (c) 2015 Orange. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
12,219
0
709
3bf82136b95654948d1c922678337c70dedf2483
857
py
Python
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
67
2021-08-20T14:30:49.000Z
2022-03-22T23:37:08.000Z
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
1
2022-01-22T08:19:38.000Z
2022-02-02T08:48:34.000Z
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
6
2021-09-03T17:21:16.000Z
2021-12-22T12:11:51.000Z
from diepvries.deserializers.snowflake_deserializer import ( DatabaseConfiguration, SnowflakeDeserializer, ) if __name__ == "__main__": deserialize()
26.78125
83
0.667445
from diepvries.deserializers.snowflake_deserializer import ( DatabaseConfiguration, SnowflakeDeserializer, ) def deserialize(): database_configuration = DatabaseConfiguration( database="<DB>", user="<USER>", password="<PASSWORD>", warehouse="<WAREHOUSE>", account="<...
669
0
23
caa7fc2ab467b003c39e1164d5b171219ed1bd62
1,073
py
Python
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
43
2021-05-20T14:07:53.000Z
2022-03-23T12:58:26.000Z
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
3
2021-09-19T20:49:21.000Z
2022-03-07T10:25:47.000Z
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
8
2021-06-26T15:28:45.000Z
2022-02-19T02:07:05.000Z
""" Metrics measuring either uncertainty or confidence of a model. """ import torch import torch.nn.functional as F
21.897959
63
0.664492
""" Metrics measuring either uncertainty or confidence of a model. """ import torch import torch.nn.functional as F def entropy(logits): p = F.softmax(logits, dim=1) logp = F.log_softmax(logits, dim=1) plogp = p * logp entropy = -torch.sum(plogp, dim=1) return entropy def logsumexp(logits): ...
837
0
115
4bd8f34b13a613b9fbf79810fcb40ce5c3a6a951
3,717
py
Python
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module TUBS-IBR-AGENT-CAPABILITIES (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-AGENT-CAPABILITIES # Produced by pysmi-0.3.4 at Wed May 1 15:27:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python versio...
97.815789
477
0.769438
# # PySNMP MIB module TUBS-IBR-AGENT-CAPABILITIES (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-AGENT-CAPABILITIES # Produced by pysmi-0.3.4 at Wed May 1 15:27:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python versio...
0
0
0
7075d8ceddff8373d1448de790f5c8e02b65488c
2,373
py
Python
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
2
2020-04-19T01:19:10.000Z
2021-06-08T02:04:48.000Z
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
null
null
null
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
null
null
null
import PIL from PIL import ImageFont from PIL import Image from PIL import ImageDraw import numpy as np import matplotlib.pyplot as plt import os from skimage.filters import threshold_otsu import scipy from scipy import ndimage from scipy.interpolate import griddata import cv2 import preprocess if __name__ == "__ma...
32.958333
115
0.710072
import PIL from PIL import ImageFont from PIL import Image from PIL import ImageDraw import numpy as np import matplotlib.pyplot as plt import os from skimage.filters import threshold_otsu import scipy from scipy import ndimage from scipy.interpolate import griddata import cv2 import preprocess if __name__ == "__ma...
0
0
0
2bf52aa5f62814599fc3741d49983e8f1296f5e3
3,503
py
Python
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
2
2018-02-28T14:18:43.000Z
2018-11-26T11:06:08.000Z
import os import sys import numpy as np import scipy.stats as stats import pandas as pd from IPython import embed from qlknn.NNDB.model import Network, NetworkJSON from qlknn.models.ffnn import QuaLiKizNDNN shortname = {'Ate': '$R/L_{T_e}$', 'Ati': '$R/L_{T_i}$'} longname ={ 'Ate': 'Normalized el...
29.940171
89
0.586355
import os import sys import numpy as np import scipy.stats as stats import pandas as pd from IPython import embed from qlknn.NNDB.model import Network, NetworkJSON from qlknn.models.ffnn import QuaLiKizNDNN def load_data(id): store = pd.HDFStore('../7D_nions0_flat.h5') input = store['megarun1/input'] dat...
1,801
0
68
2bcc82625a9e7a68e52a4eca462930e5ea09cbb5
4,424
py
Python
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
13
2021-12-14T05:47:03.000Z
2022-03-10T15:52:27.000Z
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
31
2021-12-14T15:16:01.000Z
2022-03-27T16:51:33.000Z
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
1
2022-03-22T13:33:04.000Z
2022-03-22T13:33:04.000Z
"""Alconna ArgAction相关""" from datetime import datetime from typing import Any, Optional, TYPE_CHECKING, Literal from arclet.alconna.components.action import ArgAction from arclet.alconna.components.behavior import ArpamarBehavior from arclet.alconna.exceptions import BehaveCancelled, OutBoundsBehavior from arclet.alc...
32.291971
105
0.618445
"""Alconna ArgAction相关""" from datetime import datetime from typing import Any, Optional, TYPE_CHECKING, Literal from arclet.alconna.components.action import ArgAction from arclet.alconna.components.behavior import ArpamarBehavior from arclet.alconna.exceptions import BehaveCancelled, OutBoundsBehavior from arclet.alc...
2,505
52
313
a49de0f42e9244dddb80c5007220619b2b81057e
142
py
Python
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
from django.contrib import admin from notification.models import Notifications # Register your models here. admin.site.register(Notifications)
35.5
45
0.852113
from django.contrib import admin from notification.models import Notifications # Register your models here. admin.site.register(Notifications)
0
0
0
3eb8467a6d27f9eb162881b64089f508aede1b60
5,742
py
Python
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' Outer ear simulator Author: Michal Sudwoj <msudwoj@student.ethz.ch> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventio...
24.965217
114
0.574713
#!/usr/bin/env python ''' Outer ear simulator Author: Michal Sudwoj <msudwoj@student.ethz.ch> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventio...
2,691
0
92
149445d25276388416e37946f3f84ca77c5a5c53
238
py
Python
geometry.py
kareltucek/digraph_browser
c5358aa0c6ff71e6959211770390b1467915807f
[ "MIT" ]
3
2018-06-25T13:52:51.000Z
2021-12-01T09:51:56.000Z
geometry.py
kareltucek/digraph_browser
c5358aa0c6ff71e6959211770390b1467915807f
[ "MIT" ]
null
null
null
geometry.py
kareltucek/digraph_browser
c5358aa0c6ff71e6959211770390b1467915807f
[ "MIT" ]
null
null
null
import numpy as np import math
14
43
0.613445
import numpy as np import math def vector(x, y): return np.array([x,y]) def zerovector(): return vector(0.0, 0.0) def length(v): return math.sqrt(v[0]*v[0] + v[1]*v[1]) def scale_to(vec, l): return vec/length(vec)*l
113
0
92
03ee90dbd506d67950bf67048c286a932430249f
2,549
py
Python
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
1
2021-04-23T10:51:26.000Z
2021-04-23T10:51:26.000Z
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
null
null
null
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
null
null
null
from flask import Flask, Blueprint, request, jsonify, make_response, redirect, url_for from werkzeug.security import generate_password_hash, check_password_hash from functools import wraps from db import db_connect import datetime import jwt import sys auth = Blueprint('auth', __name__) @auth.route('/login') @db_co...
39.828125
137
0.608474
from flask import Flask, Blueprint, request, jsonify, make_response, redirect, url_for from werkzeug.security import generate_password_hash, check_password_hash from functools import wraps from db import db_connect import datetime import jwt import sys auth = Blueprint('auth', __name__) def require_auth_token(f): ...
2,178
0
45
bd3f48038a738c477c55e470123e442f51b07416
361
py
Python
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
3
2020-04-01T22:17:48.000Z
2021-01-24T19:04:19.000Z
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
8
2020-06-05T21:05:14.000Z
2021-12-13T20:43:05.000Z
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
2
2020-04-11T20:14:13.000Z
2021-01-06T01:06:10.000Z
# yelp/urls.py from django.urls import path from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns # view functions from .views import hello from .views import home urlpatterns = { path('', hello, name='hello'), path('<slug:business_id>', home, name='home'), } urlpatte...
24.066667
61
0.759003
# yelp/urls.py from django.urls import path from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns # view functions from .views import hello from .views import home urlpatterns = { path('', hello, name='hello'), path('<slug:business_id>', home, name='home'), } urlpatte...
0
0
0
1e220db752c0243838f7243836c9a10b0fa287c8
3,661
py
Python
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
3
2019-04-06T12:37:55.000Z
2021-01-28T01:38:45.000Z
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
16
2020-03-24T18:22:38.000Z
2022-01-13T02:24:27.000Z
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
1
2019-11-30T09:06:46.000Z
2019-11-30T09:06:46.000Z
import tensorflow as tf def model_inputs(image_size): ''' Defines CNN inputs (placeholders). :param image_size: tuple, (height, width) of an image ''' #-> [Batch_size, image_size[0], image_size[1], 3] inputs = tf.placeholder(dtype=tf.float32, shape=[None, image_size[0], image_si...
35.543689
108
0.556405
import tensorflow as tf def model_inputs(image_size): ''' Defines CNN inputs (placeholders). :param image_size: tuple, (height, width) of an image ''' #-> [Batch_size, image_size[0], image_size[1], 3] inputs = tf.placeholder(dtype=tf.float32, shape=[None, image_size[0], image_si...
0
0
0
49d827b18611982ce6bdabdd882d794ee52b953a
12,001
py
Python
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
4
2019-12-10T18:49:03.000Z
2022-02-16T03:21:30.000Z
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
1
2020-11-04T04:41:09.000Z
2021-01-07T18:52:37.000Z
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
2
2020-04-03T12:05:33.000Z
2020-10-10T11:57:48.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Adapted from https://github.com/priba/nmp_qc """ utils.py: Functions to process dataset graphs. Usage: """ from __future__ import print_function import rdkit import torch from joblib import Parallel, delayed import multiprocessing import networkx as nx import nu...
31.664908
177
0.548371
#!/usr/bin/python # -*- coding: utf-8 -*- # Adapted from https://github.com/priba/nmp_qc """ utils.py: Functions to process dataset graphs. Usage: """ from __future__ import print_function import rdkit import torch from joblib import Parallel, delayed import multiprocessing import networkx as nx import nu...
10,692
0
230
50691cf6b0a343a60746294d17b9d62fdcf4fa2d
675
py
Python
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
''' ############################################################################### Ultrafast Quantum Optics Package ############################################################################### Quantum Optics and Quantum Information Group Written by > Jean-Philippe MacLean: jpmaclean@uwaterloo.ca > Sacha Schwarz s...
27
79
0.601481
''' ############################################################################### Ultrafast Quantum Optics Package ############################################################################### Quantum Optics and Quantum Information Group Written by > Jean-Philippe MacLean: jpmaclean@uwaterloo.ca > Sacha Schwarz s...
0
0
0
840d8ae323c0daf347b4937320a2c80c2d7c1d9f
7,645
py
Python
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
1
2020-09-20T07:44:33.000Z
2020-09-20T07:44:33.000Z
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
2
2019-12-10T13:00:36.000Z
2021-04-30T21:04:42.000Z
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
null
null
null
import os, sys from flask import request from flask_restplus import Namespace, Resource, fields from flask.wrappers import Response from app.utils.async_action import async_action from app.api_response import ApiResponse from app.errors import ApiException, JobTemplateNotFound, PlaybookFailure, PlaybookTimeout, Switch...
35.230415
106
0.63898
import os, sys from flask import request from flask_restplus import Namespace, Resource, fields from flask.wrappers import Response from app.utils.async_action import async_action from app.api_response import ApiResponse from app.errors import ApiException, JobTemplateNotFound, PlaybookFailure, PlaybookTimeout, Switch...
0
1,669
22
5ccb6a24d0e76921694aa036b37017f07029dff1
7,057
py
Python
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # Ibrahim Merad <imerad7@gmail.com> # License: BSD 3 clause """ This module implement the ``TMean`` class for the trimmed-means robust estimator. `StateTMean` is a place-holder for the TMean estimator containing: """ from collections import namedtupl...
37.94086
128
0.54655
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # Ibrahim Merad <imerad7@gmail.com> # License: BSD 3 clause """ This module implement the ``TMean`` class for the trimmed-means robust estimator. `StateTMean` is a place-holder for the TMean estimator containing: """ from collections import namedtupl...
6,224
0
108
9c53f7fb441dbb00045923c0e4b9ace6c6b0a5b3
2,427
py
Python
bauh/gems/arch/confirmation.py
octopusSD/bauh
c1f210fef87ddb4614b201ec2030330b71e43fe4
[ "Zlib" ]
1
2020-02-20T05:08:46.000Z
2020-02-20T05:08:46.000Z
bauh/gems/arch/confirmation.py
octopusSD/bauh
c1f210fef87ddb4614b201ec2030330b71e43fe4
[ "Zlib" ]
null
null
null
bauh/gems/arch/confirmation.py
octopusSD/bauh
c1f210fef87ddb4614b201ec2030330b71e43fe4
[ "Zlib" ]
null
null
null
from typing import Set, List, Tuple from bauh.api.abstract.handler import ProcessWatcher from bauh.api.abstract.view import MultipleSelectComponent, InputOption from bauh.commons import resource from bauh.commons.html import bold from bauh.gems.arch import ROOT_DIR from bauh.view.util.translation import I18n
44.944444
186
0.619695
from typing import Set, List, Tuple from bauh.api.abstract.handler import ProcessWatcher from bauh.api.abstract.view import MultipleSelectComponent, InputOption from bauh.commons import resource from bauh.commons.html import bold from bauh.gems.arch import ROOT_DIR from bauh.view.util.translation import I18n def _ge...
2,044
0
69
8c8b782e7893e9058796384c46f91ed54d54153c
154
py
Python
tests/unit/equality/test_effective_action.py
etta-trust/PolicyGlass
72157189a9af3172e6efbdcc2050969796cfa99f
[ "MIT" ]
49
2021-12-21T23:15:55.000Z
2022-03-28T09:38:30.000Z
tests/unit/equality/test_effective_action.py
etta-trust/PolicyGlass
72157189a9af3172e6efbdcc2050969796cfa99f
[ "MIT" ]
3
2021-12-23T22:02:02.000Z
2022-01-10T14:16:24.000Z
tests/unit/equality/test_effective_action.py
etta-trust/PolicyGlass
72157189a9af3172e6efbdcc2050969796cfa99f
[ "MIT" ]
1
2022-02-22T11:03:27.000Z
2022-02-22T11:03:27.000Z
from policyglass import Action, EffectiveAction
25.666667
77
0.746753
from policyglass import Action, EffectiveAction def test_equality_true(): assert EffectiveAction(Action("s3:*")) == EffectiveAction(Action("s3:*"))
82
0
23
f370feeb4f230cf0228e838425c9a052204e009d
447
py
Python
tests/test_model.py
rychallener/TauREx3_public
eb0eeeeca8f47e5e7d64d8d70b43a3af370b7677
[ "BSD-3-Clause" ]
null
null
null
tests/test_model.py
rychallener/TauREx3_public
eb0eeeeca8f47e5e7d64d8d70b43a3af370b7677
[ "BSD-3-Clause" ]
null
null
null
tests/test_model.py
rychallener/TauREx3_public
eb0eeeeca8f47e5e7d64d8d70b43a3af370b7677
[ "BSD-3-Clause" ]
null
null
null
import unittest import shutil import tempfile from os import path from unittest.mock import patch, mock_open from taurex.model.model import ForwardModel from taurex.model.simplemodel import SimpleForwardModel import numpy as np import pickle
19.434783
55
0.782998
import unittest import shutil import tempfile from os import path from unittest.mock import patch, mock_open from taurex.model.model import ForwardModel from taurex.model.simplemodel import SimpleForwardModel import numpy as np import pickle class ForwardModelTest(unittest.TestCase): def test_init(self): ...
54
48
100
76070ea40a45d68adecb44f6e49e28cbf613905d
610
py
Python
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
from typing import List # 迭代先序遍历
22.592593
58
0.503279
from typing import List class Node: def __init__(self, val=None, children=None): self.val = val self.children = children # 迭代先序遍历 class Solution: def preorder(self, root: 'Node') -> List[int]: if root == None: return [] ans = [] stack = [] stack.app...
495
-16
97
81c9590de251767964ac11b32b67667e2d773702
448
py
Python
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
# if __name__ == '__main__': # print "the generator function:" # print repr(counter) # print "call generator function" # c = counter() # print "the generator:" # print repr(c) # print 'iterate' # for item in c: # print 'received:', item
19.478261
38
0.540179
def counter(): print('counter: starting counter') i = -3 while i < 3: i = i + 1 print('counter: yield', i) yield i return None # if __name__ == '__main__': # print "the generator function:" # print repr(counter) # print "call generator function" # c = counter()...
145
0
22
ea7cde7eec2b5e8c99aacc733efb17738221bb81
4,318
py
Python
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
5
2020-05-24T03:35:00.000Z
2021-06-05T00:27:54.000Z
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
null
null
null
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
2
2020-09-11T05:29:11.000Z
2022-03-13T15:45:22.000Z
# -*- coding: utf-8 -*- # # Star Trek: Interstellar Transport # # Written in 2021 by Moky <albert.moky@gmail.com> # # ============================================================================== # MIT License # # Copyright (c) 2021 Albert Moky # # Permission is hereby granted, free of...
32.223881
119
0.603057
# -*- coding: utf-8 -*- # # Star Trek: Interstellar Transport # # Written in 2021 by Moky <albert.moky@gmail.com> # # ============================================================================== # MIT License # # Copyright (c) 2021 Albert Moky # # Permission is hereby granted, free of...
1,119
0
104
2b3dc140b83bd17428d4540aee0588d643a72af6
2,405
py
Python
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
#!/usr/bin/python # Filename: TMWP_OO_CustDataStructures.py # TMWP = TheMitchWorksPro # Functions and/or Objects for smarter handling of common data structures # required imports are noted in the code where used/required # from ... import ... version = '0.1' python_version_support = 'code shoud be compatibi...
30.833333
92
0.575468
#!/usr/bin/python # Filename: TMWP_OO_CustDataStructures.py # TMWP = TheMitchWorksPro # Functions and/or Objects for smarter handling of common data structures # required imports are noted in the code where used/required # from ... import ... version = '0.1' python_version_support = 'code shoud be compatibi...
1,325
20
294
afc7055446a0082505c7e85721cf070a71325344
30,535
py
Python
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
3
2022-01-06T16:52:52.000Z
2022-03-07T11:30:47.000Z
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
null
null
null
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
1
2021-10-24T01:47:22.000Z
2021-10-24T01:47:22.000Z
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """File-based buffer common. A file-based buffer which writes its events to a single file on disk, and separately maintains metadata. There are three fi...
38.360553
80
0.684166
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """File-based buffer common. A file-based buffer which writes its events to a single file on disk, and separately maintains metadata. There are three fi...
1,321
7,147
48
543088b20a8479e7f442e1d23bca724597885950
11,927
py
Python
model/trainer.py
anonymous165/PGRA
e14105ceeb881b3567dc4317171340155be50b0b
[ "MIT" ]
null
null
null
model/trainer.py
anonymous165/PGRA
e14105ceeb881b3567dc4317171340155be50b0b
[ "MIT" ]
null
null
null
model/trainer.py
anonymous165/PGRA
e14105ceeb881b3567dc4317171340155be50b0b
[ "MIT" ]
null
null
null
from model.pgra import PGRA from model.pgra_function.sc import Score from data_utils.data_gen import LinkGenerator, init_seed_fn from torch.utils.data import DataLoader from time import perf_counter import torch import numpy as np import config from model.modules.regularizer import Regularizer import tempfile from coll...
42.294326
120
0.594282
from model.pgra import PGRA from model.pgra_function.sc import Score from data_utils.data_gen import LinkGenerator, init_seed_fn from torch.utils.data import DataLoader from time import perf_counter import torch import numpy as np import config from model.modules.regularizer import Regularizer import tempfile from coll...
10,933
539
23
df16ed42b4b9cb418284439c991e0ec166bf5c24
5,338
py
Python
autolens/pipeline/phase/imaging/phase.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
autolens/pipeline/phase/imaging/phase.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
autolens/pipeline/phase/imaging/phase.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
from astropy import cosmology as cosmo import autofit as af from autolens.pipeline import tagging from autolens.pipeline.phase import dataset from autolens.pipeline.phase.imaging.analysis import Analysis from autolens.pipeline.phase.imaging.meta_imaging import MetaImaging from autolens.pipeline.phase.imaging.result im...
33.15528
113
0.652117
from astropy import cosmology as cosmo import autofit as af from autolens.pipeline import tagging from autolens.pipeline.phase import dataset from autolens.pipeline.phase.imaging.analysis import Analysis from autolens.pipeline.phase.imaging.meta_imaging import MetaImaging from autolens.pipeline.phase.imaging.result im...
1,183
3,749
72
b2005ebd2213536fab5e45ed07b20f3bde3d470d
3,806
py
Python
utils/base_dataset.py
stegmuel/DANN_py3
8718fbc9e0e809a4ab4399c55d0df336dd44a092
[ "MIT" ]
null
null
null
utils/base_dataset.py
stegmuel/DANN_py3
8718fbc9e0e809a4ab4399c55d0df336dd44a092
[ "MIT" ]
null
null
null
utils/base_dataset.py
stegmuel/DANN_py3
8718fbc9e0e809a4ab4399c55d0df336dd44a092
[ "MIT" ]
null
null
null
from torch.utils.data import Dataset import h5py import abc
41.824176
119
0.636626
from torch.utils.data import Dataset import h5py import abc class BaseDatasetHDF(Dataset): def __init__(self, hdf5_filepath, phase, batch_size, use_cache, cache_size=30): """ Initializes the class BaseDatasetHDF relying on a .hdf5 file that contains the complete data for all phases (train,...
0
3,722
23
b4d3fe982d7be10dd3d9466b7731e2b90baea895
17,861
py
Python
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
1
2021-04-19T12:59:54.000Z
2021-04-19T12:59:54.000Z
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
null
null
null
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
null
null
null
import os import shutil import time import pprint import torch import argparse import numpy as np ## ------------------------ Basic Functions ------------------------ def one_hot(indices, depth): """ Returns a one-hot tensor. This is a PyTorch equivalent of Tensorflow's tf.one_hot. Parameters: ...
43.038554
167
0.641621
import os import shutil import time import pprint import torch import argparse import numpy as np ## ------------------------ Basic Functions ------------------------ def one_hot(indices, depth): """ Returns a one-hot tensor. This is a PyTorch equivalent of Tensorflow's tf.one_hot. Parameters: ...
15,373
-11
679
3908e95eda71412d07981a24d2f8a254c1d195e7
920
py
Python
tests/test_align.py
Wytamma/boiga
0efa7f910b090c7ef716501bff9ae9a753f3943e
[ "MIT" ]
null
null
null
tests/test_align.py
Wytamma/boiga
0efa7f910b090c7ef716501bff9ae9a753f3943e
[ "MIT" ]
2
2020-06-26T13:17:22.000Z
2020-06-27T04:57:37.000Z
tests/test_align.py
Wytamma/boiga
0efa7f910b090c7ef716501bff9ae9a753f3943e
[ "MIT" ]
null
null
null
from pyoinformatics.align import lcs, format_matrix from pyoinformatics.seq import Seq
24.864865
66
0.401087
from pyoinformatics.align import lcs, format_matrix from pyoinformatics.seq import Seq def test_lcs(): assert lcs(Seq("AACCTTGG"), Seq("ACACTGTGA")) == Seq("AACTTG") def test_format_matrix(): Seq1 = Seq("AACCTTGG") Seq2 = Seq("ACACTGTGA") M = [ [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 2,...
785
0
46
1ac556c1e79ea42c23fedfe570a7165833c427cc
1,569
py
Python
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
1
2021-11-16T22:48:26.000Z
2021-11-16T22:48:26.000Z
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
null
null
null
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
null
null
null
from __future__ import annotations import os from importlib import import_module from typing import TYPE_CHECKING, List, Type, Dict, Union from openhab_creator import logger if TYPE_CHECKING: from openhab_creator.models.configuration import Configuration from openhab_creator.output.items.baseitemscreator imp...
30.173077
82
0.67304
from __future__ import annotations import os from importlib import import_module from typing import TYPE_CHECKING, List, Type, Dict, Union from openhab_creator import logger if TYPE_CHECKING: from openhab_creator.models.configuration import Configuration from openhab_creator.output.items.baseitemscreator imp...
864
263
99
283f91dc3ccaf741fa166962553da42322f2d25f
1,736
py
Python
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
import pandas as pd from imblearn.over_sampling import RandomOverSampler import math #Training Data re = RandomOverSampler() df = pd.read_csv("data/raw/train.csv") y = df["Survived"] x = df.drop(["Survived", "Cabin", "Name", "PassengerId", "Ticket"], axis=1) embark = ["C", "Q", "S"] genders = ["male", "female"] ...
22.842105
75
0.619816
import pandas as pd from imblearn.over_sampling import RandomOverSampler import math #Training Data re = RandomOverSampler() df = pd.read_csv("data/raw/train.csv") y = df["Survived"] x = df.drop(["Survived", "Cabin", "Name", "PassengerId", "Ticket"], axis=1) embark = ["C", "Q", "S"] genders = ["male", "female"] ...
0
0
0
641b121922a6092e913d2f84335b0aad5dc05398
2,145
py
Python
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
from typing import List from cu_pass.dpa_calculator.aggregate_interference_calculator.configuration.support.eirps import \ EIRP_DISTRIBUTION_MAP_TYPE from cu_pass.dpa_calculator.cbsd.cbsd import CbsdCategories from cu_pass.dpa_calculator.dpa.builder import RadioAstronomyFacilityNames from cu_pass.dpa_calculator.dp...
44.6875
131
0.844289
from typing import List from cu_pass.dpa_calculator.aggregate_interference_calculator.configuration.support.eirps import \ EIRP_DISTRIBUTION_MAP_TYPE from cu_pass.dpa_calculator.cbsd.cbsd import CbsdCategories from cu_pass.dpa_calculator.dpa.builder import RadioAstronomyFacilityNames from cu_pass.dpa_calculator.dp...
622
369
46
bf6189581c930d132f1857c28d3c0be6972362de
6,966
py
Python
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
import logging import os import sys import time from typing import Union from io import IOBase from .base import Client from tftpy.shared import TIMEOUT_RETRIES from tftpy.packet import types from tftpy.exceptions import TftpException,TftpTimeout,TftpFileNotFoundError from tftpy.states import SentReadRQ,S...
36.663158
113
0.548665
import logging import os import sys import time from typing import Union from io import IOBase from .base import Client from tftpy.shared import TIMEOUT_RETRIES from tftpy.packet import types from tftpy.exceptions import TftpException,TftpTimeout,TftpFileNotFoundError from tftpy.states import SentReadRQ,S...
0
0
0
b479d83b071cc8495e2321dfdca00c29ab7b085e
1,778
py
Python
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
125
2018-07-08T18:50:08.000Z
2022-03-07T09:31:12.000Z
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
11
2018-07-09T17:55:56.000Z
2021-04-13T23:49:40.000Z
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
36
2018-07-09T08:05:14.000Z
2022-03-12T19:52:49.000Z
import importlib max_steps = 1000 terminate_prob = 0.998 batch_size = 5 gameEnv = importlib.import_module('coin_game_v') env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps, batch_size=batch_size) print('state_space', env.state_space) print('red_pos', env.red_pos) print('blue_pos', env.blue_pos) ...
31.192982
96
0.697975
import importlib max_steps = 1000 terminate_prob = 0.998 batch_size = 5 gameEnv = importlib.import_module('coin_game_v') env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps, batch_size=batch_size) print('state_space', env.state_space) print('red_pos', env.red_pos) print('blue_pos', env.blue_pos) ...
0
0
0
1b639764948babc8a713fc8d7eae08b3a9be84bf
1,780
py
Python
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pygame, os from src.sprites.MyStaticSprite import * from src.sprites.Interactive import * from src.ResourceManager import * from src.scenes.stage.OnDialogueState import * SPRITE_FILES = os.path.join("sprites", "interactives")
40.454545
108
0.629775
# -*- coding: utf-8 -*- import pygame, os from src.sprites.MyStaticSprite import * from src.sprites.Interactive import * from src.ResourceManager import * from src.scenes.stage.OnDialogueState import * SPRITE_FILES = os.path.join("sprites", "interactives") class Upgrade(MyStaticSprite, Interactive): def __init__...
1,424
22
76
e911a7d22b3f23667f14d95f7d6333c90dc8d5e9
1,034
py
Python
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
405
2018-12-02T21:36:15.000Z
2022-03-29T12:52:40.000Z
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
78
2018-12-20T21:33:02.000Z
2022-02-02T12:43:27.000Z
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
344
2018-12-11T15:58:25.000Z
2022-03-31T11:09:41.000Z
from os import environ from boto3 import client import actions from loader import Loader ACCOUNTID = client('sts').get_caller_identity()['Account'] ARN = 'arn:aws:forecast:{region}:{account}:dataset/{name}' LOADER = Loader()
30.411765
79
0.673114
from os import environ from boto3 import client import actions from loader import Loader ACCOUNTID = client('sts').get_caller_identity()['Account'] ARN = 'arn:aws:forecast:{region}:{account}:dataset/{name}' LOADER = Loader() def lambda_handler(event, context): datasets = event['params']['Datasets'] status = ...
784
0
23
3a807d7d060e94e9383acbae2b77682c4bf36733
2,834
py
Python
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
48
2016-03-30T07:20:49.000Z
2022-01-27T10:48:43.000Z
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
11
2017-03-26T11:03:20.000Z
2021-06-01T15:54:03.000Z
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
12
2016-06-05T19:09:26.000Z
2021-04-18T04:23:20.000Z
from ecpy import EllipticCurve, ExtendedFiniteField, symmetric_tate_pairing import hashlib import random import cPickle # PKI secret secret = 0xdeadbeef p = int("501794446334189957604282155189438160845433783392772743395579628617109" "929160215221425142482928909270259580854362463493326988807453595748573" ...
29.520833
79
0.613973
from ecpy import EllipticCurve, ExtendedFiniteField, symmetric_tate_pairing import hashlib import random import cPickle # PKI secret secret = 0xdeadbeef p = int("501794446334189957604282155189438160845433783392772743395579628617109" "929160215221425142482928909270259580854362463493326988807453595748573" ...
1,621
0
138
db6094ae5dcf25106c386a249c62bbdac1127a6e
4,784
py
Python
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
114
2017-08-12T16:47:49.000Z
2022-03-17T12:22:59.000Z
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
191
2017-08-13T09:12:37.000Z
2022-03-30T19:57:18.000Z
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
45
2017-08-13T09:32:19.000Z
2022-03-11T21:36:29.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-12 20:32 from __future__ import unicode_literals import annoying.fields import byro.common.models.auditable from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models
33.690141
139
0.354724
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-12 20:32 from __future__ import unicode_literals import annoying.fields import byro.common.models.auditable from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration)...
0
4,479
23
1d56bd0859c31a8e9b68e858edb002f8e9a04340
5,438
py
Python
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from dataclasses import dataclass from typing import Any, Dict, List, NamedTuple, Optional from bkuser_core.categories.plugins.ldap.models import DepartmentProfile, UserProfile from bkuser_core.user_settings.loader import ConfigProvider from django.utils.encoding import force_str from ldap3.uti...
38.295775
115
0.668444
# -*- coding: utf-8 -*- from dataclasses import dataclass from typing import Any, Dict, List, NamedTuple, Optional from bkuser_core.categories.plugins.ldap.models import DepartmentProfile, UserProfile from bkuser_core.user_settings.loader import ConfigProvider from django.utils.encoding import force_str from ldap3.uti...
1,656
0
46
f1ebbe6c83b7976dc88a8d4893dacd7fb0cdb353
1,540
py
Python
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
# IMPORTS # DATA data = [] with open("Data - Day04.txt") as file: for line in file: data.append(line.strip().split(" ")) # GOAL 1 """ A new system policy has been put in place that requires all accounts to use a passphrase instead of simply a password. A passphrase consists of a series of words (lowerca...
25.666667
105
0.698701
# IMPORTS # DATA data = [] with open("Data - Day04.txt") as file: for line in file: data.append(line.strip().split(" ")) # GOAL 1 """ A new system policy has been put in place that requires all accounts to use a passphrase instead of simply a password. A passphrase consists of a series of words (lowerca...
156
0
23
f3a48cb7c9060bd4d80fd365373cb167e56aa4aa
710
py
Python
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
3,287
2016-07-26T17:34:33.000Z
2022-03-31T09:52:13.000Z
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
19,206
2016-07-26T07:04:42.000Z
2022-03-31T23:57:09.000Z
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
2,575
2016-07-26T06:44:40.000Z
2022-03-31T22:56:06.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
37.368421
94
0.557746
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
161
13
49
cc8b768dfe5908a23f0c137ef0e57006b53db5c0
5,861
py
Python
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ An implementation of Vanilla Policy Gradient (VPG) for solo_escape_task VPG is a model free, on policy, reinforcement learning algorithm (https://papers.nips.cc/paper/1713-policy-gradient-methods-for-reinforcement-learning-with-function-approximation.pdf) Author: LinZHanK (linzhank@gmail.com)...
40.42069
183
0.627026
#! /usr/bin/env python """ An implementation of Vanilla Policy Gradient (VPG) for solo_escape_task VPG is a model free, on policy, reinforcement learning algorithm (https://papers.nips.cc/paper/1713-policy-gradient-methods-for-reinforcement-learning-with-function-approximation.pdf) Author: LinZHanK (linzhank@gmail.com)...
0
0
0
e45667b241db8c1639b0fc558affff0913b99a11
855
py
Python
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
1
2021-05-12T11:24:11.000Z
2021-05-12T11:24:11.000Z
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
null
null
null
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
null
null
null
# Buycoin Python SDK # Copyright 2021 Iyanuoluwa Ajao # See LICENCE for details. """ Authentication is handled by the :any:`Airtable` class. >>> airtable = Airtable(base_key, table_name, api_key) Note: You can also use this class to handle authentication for you if you are making your own wrapper: >>> aut...
25.147059
96
0.65731
# Buycoin Python SDK # Copyright 2021 Iyanuoluwa Ajao # See LICENCE for details. """ Authentication is handled by the :any:`Airtable` class. >>> airtable = Airtable(base_key, table_name, api_key) Note: You can also use this class to handle authentication for you if you are making your own wrapper: >>> aut...
137
202
23
3fbb3343817355008ebb4eef4a88009376424e09
5,360
py
Python
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#!/usr/bin/env python3 ###Description: The tool reads cern web services behind SSO using user certificates from __future__ import print_function import os, urllib, urllib2, httplib, cookielib, sys, HTMLParser, re from optparse import OptionParser if __name__ == "__main__": parser = OptionParser(usage="%prog [-d(ebug...
44.666667
157
0.705037
#!/usr/bin/env python3 ###Description: The tool reads cern web services behind SSO using user certificates from __future__ import print_function import os, urllib, urllib2, httplib, cookielib, sys, HTMLParser, re from optparse import OptionParser def getFile(path): npath = os.path.expanduser(path) while os.path.is...
3,832
30
290
dfa763b060a7dac72bb41d68286cd5c008f99b9d
5,437
py
Python
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
113
2017-02-12T02:04:37.000Z
2019-12-05T09:33:12.000Z
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# -*- coding: utf-8 -*- import filecmp import json import os import pkgutil import zipfile import hypothesis import pytest import six from verta.tracking.entities._deployable_entity import _DeployableEntity from verta._internal_utils.custom_modules import CustomModules from .. import utils from . import contexts
39.398551
97
0.622034
# -*- coding: utf-8 -*- import filecmp import json import os import pkgutil import zipfile import hypothesis import pytest import six from verta.tracking.entities._deployable_entity import _DeployableEntity from verta._internal_utils.custom_modules import CustomModules from .. import utils from . import contexts ...
954
4,141
23
9f0907cd2068ea5228993bfd0610324a10152909
135
py
Python
src/privatemedia/fileutils.py
Talengi/phase
60ff6f37778971ae356c5b2b20e0d174a8288bfe
[ "MIT" ]
8
2016-01-29T11:53:40.000Z
2020-03-02T22:42:02.000Z
src/privatemedia/fileutils.py
PhaseDMS/phase
4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e
[ "MIT" ]
289
2015-03-23T07:42:52.000Z
2022-03-11T23:26:10.000Z
src/privatemedia/fileutils.py
Talengi/phase
60ff6f37778971ae356c5b2b20e0d174a8288bfe
[ "MIT" ]
7
2015-12-08T09:03:20.000Z
2020-05-11T15:36:51.000Z
# We need those imports for migrations compatibility purpose from privatemedia.storage import ProtectedStorage, PrivateStorage # noqa
45
73
0.844444
# We need those imports for migrations compatibility purpose from privatemedia.storage import ProtectedStorage, PrivateStorage # noqa
0
0
0
2d7635ac6f4ed320e89fc80aef9f0d67f08346b4
1,786
py
Python
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
2
2016-12-30T12:43:54.000Z
2018-06-23T20:08:24.000Z
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
null
null
null
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Ari Aosved # http://github.com/devaos/sublime-remote/blob/master/LICENSE """This module implements an API layer for Vagrant related functionality.""" import re import subprocess # ============================================================================= def parse_...
27.476923
79
0.56383
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Ari Aosved # http://github.com/devaos/sublime-remote/blob/master/LICENSE """This module implements an API layer for Vagrant related functionality.""" import re import subprocess # ============================================================================= def parse_...
0
0
0
a1a8c31e5c119dbb7727ceec4702308b97c2a5f5
2,814
py
Python
gym_framework/panda_ctrl/panda_mujoco_torque_ctrl.py
Yucheng-Tang/SimulationFrameworkPublic
3a65cbc0f18ac4b04f8aef7e6e2f9ad9790179c6
[ "MIT" ]
3
2020-11-16T09:01:56.000Z
2021-12-21T09:24:45.000Z
gym_framework/panda_ctrl/panda_mujoco_torque_ctrl.py
Yucheng-Tang/SimulationFrameworkPublic
3a65cbc0f18ac4b04f8aef7e6e2f9ad9790179c6
[ "MIT" ]
null
null
null
gym_framework/panda_ctrl/panda_mujoco_torque_ctrl.py
Yucheng-Tang/SimulationFrameworkPublic
3a65cbc0f18ac4b04f8aef7e6e2f9ad9790179c6
[ "MIT" ]
8
2020-11-24T15:59:01.000Z
2022-02-18T15:15:26.000Z
import gym import numpy as np from gym_framework.panda_ctrl.panda_mujoco_base_ctrl import PandaBase class PandaTorqueControl(PandaBase): """ Control the Panda robot by directly applying torques (control=torque). """ @property @property @property @property
36.545455
111
0.603412
import gym import numpy as np from gym_framework.panda_ctrl.panda_mujoco_base_ctrl import PandaBase class PandaTorqueControl(PandaBase): """ Control the Panda robot by directly applying torques (control=torque). """ def __init__(self, render=True): super().__init__(render=render) sel...
2,365
0
158
041bab6ee68b38136895b05d676af598dec6d4bb
10,708
py
Python
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
18
2021-04-18T03:51:22.000Z
2022-03-16T13:14:36.000Z
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
1
2021-05-04T14:27:02.000Z
2021-05-04T14:27:02.000Z
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
8
2021-05-03T19:24:19.000Z
2022-02-20T22:20:18.000Z
import plotly.express as px import plotly.io as pio import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd import numpy as np from agents import * from generators import * from CMDataLoader import CMDataLoader from Simulator import Simulator from plotutils import update_layout...
67.345912
201
0.653063
import plotly.express as px import plotly.io as pio import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd import numpy as np from agents import * from generators import * from CMDataLoader import CMDataLoader from Simulator import Simulator from plotutils import update_layout...
8,331
0
138
2bd8edda0f4c727b34799dc6c9399a18d23a45a7
903
py
Python
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
__all__ = ( "extract_value", "extract_errors", ) from typing import ( cast, Any, Type, Union, List, ) from testplates.impl.value import ( MISSING, ) from testplates.impl.exceptions import ( TestplatesError, ) from .attrs import ( TESTPLATES_ERRORS_ATTR, TESTPLATES_VALUE_A...
15.842105
74
0.657807
__all__ = ( "extract_value", "extract_errors", ) from typing import ( cast, Any, Type, Union, List, ) from testplates.impl.value import ( MISSING, ) from testplates.impl.exceptions import ( TestplatesError, ) from .attrs import ( TESTPLATES_ERRORS_ATTR, TESTPLATES_VALUE_A...
0
0
0
2d31ec77e7510699d2cc7549a1833146864202d2
7,699
py
Python
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
39
2015-03-30T14:03:42.000Z
2022-03-16T16:50:33.000Z
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
670
2015-02-11T11:08:09.000Z
2022-03-21T09:27:57.000Z
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
54
2015-02-13T14:09:52.000Z
2022-01-24T13:57:09.000Z
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
38.113861
81
0.630471
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
5,948
0
459
6599a738ef385fda4ba36a0d5ccca971daa06188
458
py
Python
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
import torch # cand_ids = torch.randint(0,10000,(10,)) # print(cand_ids.dtype) # print(cand_ids.shape) scores = torch.Tensor([[ 0, 1, 2],[ 3, 4, 5],[ 6, 7, 8],[ 9, 10, 11]]) a=scores[0:2] # print(a) # print(scores.dtype) # print(scores.shape) # scores[[1,2,3]] # with torch.autograd.profiler.profile(record_shap...
26.941176
90
0.672489
import torch # cand_ids = torch.randint(0,10000,(10,)) # print(cand_ids.dtype) # print(cand_ids.shape) scores = torch.Tensor([[ 0, 1, 2],[ 3, 4, 5],[ 6, 7, 8],[ 9, 10, 11]]) a=scores[0:2] # print(a) # print(scores.dtype) # print(scores.shape) # scores[[1,2,3]] # with torch.autograd.profiler.profile(record_shap...
0
0
0
ff0aa4a18334faa1025b3b565c1234e541538556
4,378
py
Python
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
import csv from decimal import Decimal from itertools import islice from datetime import datetime, timedelta import pytest from bs4 import BeautifulSoup from src.jamberry.workstation import extract_shipping_address, extract_line_items, parse_order_row_soup, \ JamberryWorkstation # uncomment these lines to see ...
29.38255
106
0.731841
import csv from decimal import Decimal from itertools import islice from datetime import datetime, timedelta import pytest from bs4 import BeautifulSoup from src.jamberry.workstation import extract_shipping_address, extract_line_items, parse_order_row_soup, \ JamberryWorkstation # uncomment these lines to see ...
3,083
0
287
425fb837364f81528c19644a726599516ada187d
336
py
Python
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2020-03-28 11:49 from __future__ import unicode_literals from django.db import migrations
19.764706
47
0.66369
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2020-03-28 11:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('address', '0003_auto_20170718_1615'), ('address', '0002_auto_20160213_1726'), ] opera...
0
167
23
1577d38738d1df21a60bdf096aa6ca9a02c9b4ef
2,391
py
Python
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
9
2018-09-18T14:34:57.000Z
2022-01-28T12:34:50.000Z
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
null
null
null
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
null
null
null
""" clustering_utils.py: utilitary functions for the clustering.py module. """ import numpy as np from enum import IntEnum from .utils import find_in_sequence class Link(IntEnum): """ Represents state of coreferring links. Must be negative integers to not interfere with the clustering process. """ ...
30.653846
94
0.662066
""" clustering_utils.py: utilitary functions for the clustering.py module. """ import numpy as np from enum import IntEnum from .utils import find_in_sequence class Link(IntEnum): """ Represents state of coreferring links. Must be negative integers to not interfere with the clustering process. """ ...
0
0
0