hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f71a8db5b96c9e6d722390a922326bcdd0e4974b
534
py
Python
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
90
2018-11-27T21:49:32.000Z
2022-03-13T08:48:51.000Z
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
12
2018-12-04T22:18:36.000Z
2021-08-15T11:41:15.000Z
src/quom/tokenizer/token.py
Viatorus/Quom
5f2aa90a86a8eed5689670748967ab8d4de2d9c1
[ "MIT" ]
2
2021-06-11T14:11:07.000Z
2021-08-15T06:07:28.000Z
from .iterator import Span, RawIterator class Token: def __init__(self, start, end): self.start = start.copy() self.end = end.copy() @property def raw(self): return str(Span(RawIterator(self.start), RawIterator(self.end))) def __str__(self): return str(Span(self.start...
17.8
72
0.627341
from .iterator import Span, RawIterator class Token: def __init__(self, start, end): self.start = start.copy() self.end = end.copy() @property def raw(self): return str(Span(RawIterator(self.start), RawIterator(self.end))) def __str__(self): return str(Span(self.start...
true
true
f71a8e2fb8856f94587904ef39bc7d65a4aae1c7
3,477
py
Python
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
5
2021-12-24T00:11:22.000Z
2022-01-06T23:53:10.000Z
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
null
null
null
src/transpiler/cppy/CodeGeneration.py
ArmindoFlores/cppy
5ce0832e79bbdb56b11cd03490ee1d6d09a454a0
[ "MIT" ]
null
null
null
from . import PythonExpressions class CodeBlock: def get_code(self, scope): return NotImplemented class CBAssign(CodeBlock): def __init__(self, var, value): self._var = var self._value = value def get_code(self, scope): return f"SCOPE.set_var(\"{s...
36.989362
135
0.581823
from . import PythonExpressions class CodeBlock: def get_code(self, scope): return NotImplemented class CBAssign(CodeBlock): def __init__(self, var, value): self._var = var self._value = value def get_code(self, scope): return f"SCOPE.set_var(\"{s...
true
true
f71a8fd9a5f02c00e4c48dcb982f21552d529470
4,796
py
Python
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2016-04-05T22:30:14.000Z
2016-04-05T22:30:14.000Z
yt/frontends/athena/io.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2020-12-05T05:51:09.000Z
2020-12-05T05:51:09.000Z
""" The data-file handling functions """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
37.76378
93
0.533987
from yt.utilities.io_handler import \ BaseIOHandler import numpy as np from yt.funcs import mylog, defaultdict from .data_structures import chk23 float_size = {"float":np.dtype(">f4").itemsize, "double":np.dtype(">f8").itemsize} axis_list = ["_x","_y","_z"] class IOHandlerAthena(Base...
true
true
f71a90002a6262037bfee9acd3d8a0d96e934ba0
3,017
py
Python
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
src/configs/adult/adult_mlp_weighted.py
nbingo/sMOOth
aacdc5d24b931e534e984681923ec74f1103ca2f
[ "MIT" ]
null
null
null
""" An example config file to train a ImageNet classifier with detectron2. Model and dataloader both come from torchvision. This shows how to use detectron2 as a general engine for any new models and tasks. To run, use the following command: python tools/lazyconfig_train_net.py --config-file configs/Misc/torchvision_...
32.793478
111
0.764667
import yaml import torch from omegaconf import OmegaConf from fvcore.common.param_scheduler import CosineParamScheduler from detectron2.solver import WarmupParamScheduler from detectron2.solver.build import get_default_optimizer_params from detectron2.config import LazyConfig, LazyCall as L from detectron2.evaluation...
true
true
f71a90ab75738523d69c347c11d6351be429b483
2,311
py
Python
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/message_queues/pika_route.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
import random import threading import pika """ 总结: """ def send(): tag = random.choice(['info', 'error', 'warn']) rb_conn = pika.BlockingConnection(pika.ConnectionParameters(host='192.168.101.129', port=5672, ...
32.549296
117
0.450887
import random import threading import pika def send(): tag = random.choice(['info', 'error', 'warn']) rb_conn = pika.BlockingConnection(pika.ConnectionParameters(host='192.168.101.129', port=5672, ...
true
true
f71a90c7288736f03f64c09624abaf7fafd6201a
2,080
py
Python
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
33
2015-03-03T08:41:56.000Z
2022-02-16T12:05:30.000Z
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
9
2015-01-09T00:29:33.000Z
2016-06-21T13:09:54.000Z
hippybot/plugins/plusplusbot.py
1stvamp/hippybot
931fb1accae295da3ae94184ef138aeedd5a726e
[ "BSD-2-Clause-FreeBSD" ]
18
2015-01-07T22:40:45.000Z
2018-04-04T18:58:50.000Z
import os import os.path import re import sqlite3dbm from threading import RLock from hippybot.hipchat import HipChatApi from hippybot.decorators import botcmd, contentcmd CONFIG_DIR = os.path.expanduser("~/.techbot") DB = os.path.expanduser("~/.techbot/score.db") class Plugin(object): """Plugin to handle knewton re...
25.679012
66
0.639904
import os import os.path import re import sqlite3dbm from threading import RLock from hippybot.hipchat import HipChatApi from hippybot.decorators import botcmd, contentcmd CONFIG_DIR = os.path.expanduser("~/.techbot") DB = os.path.expanduser("~/.techbot/score.db") class Plugin(object): global_commands = ['scores'] ...
true
true
f71a90cbe34b2055cfe4879a68c1824ee28a3a13
8,902
py
Python
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
6
2021-01-13T05:32:14.000Z
2022-02-18T01:35:09.000Z
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
null
null
null
logchecker/__init__.py
Lifars/log-checker
462d3a0c66b5fa5a964689ce594cb70833960862
[ "MIT" ]
1
2021-09-27T12:56:21.000Z
2021-09-27T12:56:21.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Logchecker tool for scanning log files against YETI Threat Intelligence Repository. By LIFARS This code is licensed under MIT license (see LICENSE for details) """ __version__ = "0.8" __author__ = "LIFARS LLC" __copyright__ = "Copyright (c) 2020,2021 LIFARS LLC" __cr...
28.902597
89
0.552123
__version__ = "0.8" __author__ = "LIFARS LLC" __copyright__ = "Copyright (c) 2020,2021 LIFARS LLC" __credits__ = ["LIFARS LLC"] __license__ = "MIT" __maintainer__ = "LIFARS LLC" __status__ = "Production" import argparse import collections import configparser import csv import json import os import re import sys i...
true
true
f71a912403bfab59958931030305960d9f1ae9a4
1,594
py
Python
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
1
2020-05-12T10:41:12.000Z
2020-05-12T10:41:12.000Z
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
null
null
null
python/perspective/perspective/core/plugin.py
JKGu/perspective
7b319b7896e58d5860b72bd8756997976f9a7722
[ "Apache-2.0" ]
null
null
null
################################################################################ # # Copyright (c) 2019, the Perspective Authors. # # This file is part of the Perspective library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from enum import Enum clas...
31.254902
80
0.617942
true
true
f71a913f37c249d4a0288dfa1a5ae20fc0e63d6e
275
py
Python
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
BasicPythonPrograms/pythonExe16.py
Pushkar745/PythonProgramming
ea60e97b70d46fb63ef203913c8b3f9570232dd3
[ "Apache-2.0" ]
null
null
null
#Explicit function def digitSum(n): dsum=0 for ele in str(n): dsum+=int (ele) return dsum #Initializing list List=[367,111,562,945,6726,873] #Using the function on odd element of the list newList=[digitSum(i) for i in List if i & 1] print(newList)
25
46
0.665455
def digitSum(n): dsum=0 for ele in str(n): dsum+=int (ele) return dsum List=[367,111,562,945,6726,873] newList=[digitSum(i) for i in List if i & 1] print(newList)
true
true
f71a9211a58e7ed7bd817495b5f5893f861323b7
19,870
py
Python
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
2
2022-01-25T12:28:21.000Z
2022-01-25T12:29:05.000Z
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
null
null
null
examples/resnet34_imagenet/resnet34.py
FujitsuResearch/automatic_pruning
b3bb525b736ca3e465cb6fb87f134748424a0fe5
[ "BSD-3-Clause-Clear" ]
null
null
null
# resnet34.py COPYRIGHT Fujitsu Limited 2022 import torch.nn as nn import torch.nn.functional as F def zero_padding(x1, x2): num_ch1 = x1.size()[1] num_ch2 = x2.size()[1] ch_diff = num_ch1 - num_ch2 # path1 < path2 : zero padding to path1 tensor if num_ch1 < num_ch2: ch_diff = -1 * ch_diff...
35.230496
115
0.48767
import torch.nn as nn import torch.nn.functional as F def zero_padding(x1, x2): num_ch1 = x1.size()[1] num_ch2 = x2.size()[1] ch_diff = num_ch1 - num_ch2 if num_ch1 < num_ch2: ch_diff = -1 * ch_diff if ch_diff%2 ==0: x1 = F.pad(x1[:, :, :, :], (0, 0, 0, 0, ch_diff//2,...
true
true
f71a921e657b6f695c22749f6d1c6b756adc0c9a
5,837
py
Python
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
16
2016-05-20T09:03:32.000Z
2020-09-13T14:23:06.000Z
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
2
2016-05-24T01:44:14.000Z
2016-06-17T22:19:45.000Z
allegation/tests/services/test_download_allegations.py
invinst/CPDB
c2d8ae8888b13d956cc1068742f18d45736d4121
[ "Apache-2.0" ]
2
2016-10-10T16:14:19.000Z
2020-10-26T00:17:02.000Z
from mock import patch, MagicMock, call from allegation.factories import ( DownloadFactory, OfficerAllegationFactory, AllegationFactory, ComplainingWitnessFactory, OfficerFactory) from allegation.services.download_allegations import AllegationsDownload from api.models import Setting from common.tests.core import S...
50.318966
108
0.714922
from mock import patch, MagicMock, call from allegation.factories import ( DownloadFactory, OfficerAllegationFactory, AllegationFactory, ComplainingWitnessFactory, OfficerFactory) from allegation.services.download_allegations import AllegationsDownload from api.models import Setting from common.tests.core import S...
true
true
f71a9246d59e712669453737c400d746d8277d54
1,433
py
Python
stream_alert/rule_processor/main.py
ashmere/streamalert
5a03d3d272a8e4e4b1ee71567fad1d7e185bb903
[ "Apache-2.0" ]
1
2018-11-18T12:13:44.000Z
2018-11-18T12:13:44.000Z
stream_alert/rule_processor/main.py
GSA/streamalert
57d78157c76c19b9a0fe5bd6deae541cda928914
[ "Apache-2.0" ]
110
2019-02-13T05:32:07.000Z
2021-07-29T05:42:01.000Z
stream_alert/rule_processor/main.py
ashmere/streamalert
5a03d3d272a8e4e4b1ee71567fad1d7e185bb903
[ "Apache-2.0" ]
1
2019-11-01T01:03:47.000Z
2019-11-01T01:03:47.000Z
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
35.825
89
0.728542
import importlib import os from stream_alert.rule_processor.handler import StreamAlert modules_to_import = set() for folder in ('matchers', 'rules'): for root, dirs, files in os.walk(folder): filtered_files = [rule_file for rule_file in files if not (rule_file.startswith(( '.', '__init__')) o...
true
true
f71a9251405f51578902104c3076923ed80a68f2
666
py
Python
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
1
2018-12-09T11:56:53.000Z
2018-12-09T11:56:53.000Z
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
null
null
null
eth/chains/mainnet/constants.py
shreyasnbhat/py-evm
cd31d83185e102a7cb2f11e2f67923b069ee9cef
[ "MIT" ]
2
2019-09-05T01:31:56.000Z
2019-09-17T09:09:16.000Z
from eth_typing import BlockNumber # https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md MAINNET_CHAIN_ID = 1 # Fork Blocks listed in ascending order # # Homestead Block # HOMESTEAD_MAINNET_BLOCK = BlockNumber(1150000) # # DAO Block # DAO_FORK_MAINNET_BLOCK = BlockNumber(1920000) DAO_FORK_MAINNET_EXTRA...
14.8
62
0.78979
from eth_typing import BlockNumber MAINNET_CHAIN_ID = 1 HOMESTEAD_MAINNET_BLOCK = BlockNumber(1150000) DAO_FORK_MAINNET_BLOCK = BlockNumber(1920000) DAO_FORK_MAINNET_EXTRA_DATA = b'dao-hard-fork' TANGERINE_WHISTLE_MAINNET_BLOCK = BlockNumber(2463000) SPURIOUS_DRAGON_MAINNET_BLOCK = BlockNumber...
true
true
f71a929b94aaa07c53b09d5b18de47578263ba83
6,430
py
Python
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
null
null
null
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
1
2021-06-27T17:20:11.000Z
2021-06-27T17:20:11.000Z
conf.py
isabella232/grr-doc
2b0e28dc8d456dd0301aa14d45bf53d36de02781
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # GRR documentation build configuration file, created by # sphinx-quickstart on Wed Nov 22 17:54:03 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
29.768519
81
0.657387
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.mathjax', 'recommonmark', ] templates_path = ['_templates'] master_doc = 'index' project = u'GRR' copyright = u'2021, GRR team' author = u'GRR team' # |version| and |release|, also used in var...
true
true
f71a931bbfeddaef6760880c9e0d84b9e3ce6a96
3,111
py
Python
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
resend_kafka_message/logic/client/kafka_client.py
Tungnt24/reprocess-kafka-message
50a6495675630866b0a800a2b2857754f9cdfb02
[ "MIT" ]
null
null
null
from kafka import KafkaProducer, KafkaConsumer from resend_kafka_message.setting import ( KafkaProducerConfig, KafkaConsumerConfig, ) import json from kafka.structs import TopicPartition from resend_kafka_message.utils.logger import logger class KafkaBackupProducer: def __init__(self) -> None: sel...
36.6
79
0.68306
from kafka import KafkaProducer, KafkaConsumer from resend_kafka_message.setting import ( KafkaProducerConfig, KafkaConsumerConfig, ) import json from kafka.structs import TopicPartition from resend_kafka_message.utils.logger import logger class KafkaBackupProducer: def __init__(self) -> None: sel...
true
true
f71a939f803f8836cd5408d397bbd195ac54e34a
394
py
Python
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
Applications/powershell/6.0.2/package.py
cashmerepipeline/CashmereRez
13a73931d715ffac27c337abcd6df97b5c47534b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- name = 'powershell' version = '6.0.2' author = ['microsoft'] tools = ["pwsh"] requires = [] variants = [ ['platform-windows'], ] def commands(): import os applications_path = os.environ["APPLICATIONS_PATH"] env.PATH.append(os.path.joi...
13.586207
101
0.560914
name = 'powershell' version = '6.0.2' author = ['microsoft'] tools = ["pwsh"] requires = [] variants = [ ['platform-windows'], ] def commands(): import os applications_path = os.environ["APPLICATIONS_PATH"] env.PATH.append(os.path.join(applications_path, "p...
true
true
f71a96389c5ecde338aa29ef1117227f29df61b8
1,098
py
Python
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
files/sun/practice/binarytree.py
1ta/study_python
7623ed019397225f63093c5aaccb155bdf289805
[ "MIT" ]
null
null
null
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param inorder : A list of integers that inorder traversal of a tree @param postorder : A list of integers that postorder traversal of a tree ...
32.294118
76
0.583789
class Solution: def buildTree(self, inorder, postorder): def genTree(inorder,postorder): if len(inorder)==0: return None root_val = postorder[-1] root = TreeNode(root_val) n = inorder.index(root_val) left_inorder = inorder[:n] ...
true
true
f71a974a3093e8096614977acf39bdfa59c13911
6,492
py
Python
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
utils/dataload.py
hobinkwak/Stock-Movements-Classification
dac2e90d9ef2294f5c4dc8f6605b9051c71b3f45
[ "MIT" ]
null
null
null
from itertools import combinations import pandas as pd from utils.utils import * def load_etf(): etf_data = pd.read_csv( "data/etf_data.csv", encoding="euc_kr", parse_dates=["tdate"] ) etf_ohlcv = etf_data.set_index(["tdate", "etf_code", "data_name"])[ "value" ].unstack() etf_clos...
40.074074
119
0.611214
from itertools import combinations import pandas as pd from utils.utils import * def load_etf(): etf_data = pd.read_csv( "data/etf_data.csv", encoding="euc_kr", parse_dates=["tdate"] ) etf_ohlcv = etf_data.set_index(["tdate", "etf_code", "data_name"])[ "value" ].unstack() etf_clos...
true
true
f71a97da98a14131d787d14e3647b6eaf3f98b88
8,968
py
Python
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
1
2018-12-07T02:05:16.000Z
2018-12-07T02:05:16.000Z
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
null
null
null
neko/Scanners/CFBFScanner/CFBFScanner.py
mebuis/neko
c76eacb60c3a3f6adfb6a7a6fd7f61640be2c00d
[ "Apache-2.0" ]
null
null
null
# -*- encoding: UTF-8 -*- import string from neko.Common import Threat from neko.Common.CLSID import CLSID_NULL, LOW_RISK_LEVEL_OBJECTS, HIGH_RISK_LEVEL_OBJECTS from neko.Common.DataStructures.OLE1 import LengthPrefixedByteArray from neko.Common.DataStructures.OLE2 import OLEStream, SOAPMoniker, CompositeMoniker, Fi...
41.327189
145
0.492975
import string from neko.Common import Threat from neko.Common.CLSID import CLSID_NULL, LOW_RISK_LEVEL_OBJECTS, HIGH_RISK_LEVEL_OBJECTS from neko.Common.DataStructures.OLE1 import LengthPrefixedByteArray from neko.Common.DataStructures.OLE2 import OLEStream, SOAPMoniker, CompositeMoniker, FileMoniker, UrlMoniker fro...
true
true
f71a97f2cf8061f969605f468dcddb25a7b8ae82
1,596
py
Python
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
1
2019-11-03T21:10:01.000Z
2019-11-03T21:10:01.000Z
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
null
null
null
progress_bar.py
qcrit/LaTeCH-CLfL-2019-GreekClassification
0984f88c455d314afd6395be927bcf1383378860
[ "MIT" ]
2
2019-12-23T20:05:32.000Z
2019-12-23T20:10:27.000Z
# From https://stackoverflow.com/a/34325723 _prev_str_length = None # Print iterations progress def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=18, fill='█'): """ Call in a loop to create terminal progress bar @params: iteration - Required : current iteration (Int) total ...
31.294118
123
0.641604
_prev_str_length = None def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=18, fill='█'): percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total))) filledLength = int(length * iteration // total) bar = fill * filledLength + '-' * (length - filledLength) s ...
true
true
f71a984be3f40ce7973e0b35ea72325af786a392
3,517
py
Python
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
6
2021-02-02T22:52:41.000Z
2022-03-12T00:37:30.000Z
app/graph/Node.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from app.entity.MineBeneficiation import * import json import pandas as pd from app.graph.Graph import Edge class NodeJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Node): return o.moniker() if isinstance(o, pd.core.series.Series): ...
27.476563
131
0.59056
from app.entity.MineBeneficiation import * import json import pandas as pd from app.graph.Graph import Edge class NodeJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Node): return o.moniker() if isinstance(o, pd.core.series.Series): return o.to_dic...
true
true
f71a9945ebfc1939e5f3b7f7596845dbf01070cf
2,311
py
Python
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
7
2020-04-20T19:32:23.000Z
2021-08-03T16:50:15.000Z
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
null
null
null
Semester 4/Open Source Technology/exp1.py
atharva8300/Engineering-Practical-Experiments
3f7fe4abbbe69a3bbb8aa19892dd7209e70c69ac
[ "Unlicense" ]
5
2019-04-20T06:35:25.000Z
2021-12-12T12:25:08.000Z
print("String example") s = "this is a test String" print(f"String: {s}") print(f"String Capitalized: {s.capitalize()}") print(f"String Finding index: {s.find('e')}") print(f"String Lowercase: {s.lower()}") print(f"String Uppercase: {s.upper()}") print(f"String Length: {len(s)}") print(f"String Replace: {s.replace('thi...
28.182927
60
0.633059
print("String example") s = "this is a test String" print(f"String: {s}") print(f"String Capitalized: {s.capitalize()}") print(f"String Finding index: {s.find('e')}") print(f"String Lowercase: {s.lower()}") print(f"String Uppercase: {s.upper()}") print(f"String Length: {len(s)}") print(f"String Replace: {s.replace('thi...
true
true
f71a9a29fc9f435c927a8cf78515482f4439afa0
105
py
Python
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
null
null
null
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
2
2022-03-28T19:03:21.000Z
2022-03-29T00:03:34.000Z
checks/root_path.py
Amourspirit/python-ooouno-ex
523dd9b89a74aaf887edbcfe1dda316a04c7125b
[ "MIT" ]
null
null
null
# coding: utf-8 import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent))
26.25
53
0.771429
import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent))
true
true
f71a9a81693d0910320d55fb9df477edf8edac0a
209,992
py
Python
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/huawei/test_huawei_drivers.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # 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 # # ...
39.524186
79
0.574789
import collections import copy import ddt import json import mock import re import tempfile import unittest from xml.dom import minidom from cinder import context from cinder import exception from cinder import test from cinder.tests.unit.consistencygroup import fake_cgsnapshot from cinder.tests.unit.con...
true
true
f71a9b3881862c5eb958a16f5a70f95f5060726c
5,616
py
Python
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
20
2019-12-03T06:06:58.000Z
2022-02-23T21:49:03.000Z
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
9
2020-06-15T14:56:38.000Z
2022-02-12T13:09:38.000Z
Briefly/api/Punc/punctuator/tests.py
q815101630/Briefly2.0
d92ba52308ef8c644fe8fb453169d0bee1a7f47e
[ "MIT" ]
8
2020-07-27T14:00:37.000Z
2022-02-20T17:59:04.000Z
from __future__ import absolute_import import time import os import unittest import tempfile import shutil from io import StringIO from . import punc from .punc import Punctuator, download_model class Tests(unittest.TestCase): samples = [ ( 'mary had a little lamb its fleece was white as sn...
36.705882
146
0.570691
from __future__ import absolute_import import time import os import unittest import tempfile import shutil from io import StringIO from . import punc from .punc import Punctuator, download_model class Tests(unittest.TestCase): samples = [ ( 'mary had a little lamb its fleece was white as sn...
true
true
f71a9c2559fc2833e574b56aa245554739a58e09
8,913
py
Python
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
1
2015-09-04T05:52:45.000Z
2015-09-04T05:52:45.000Z
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
null
null
null
sleekxmpp/features/feature_mechanisms/mechanisms.py
RedbackThomson/LoLShadow
c47dd2826b43f47663eed55bb3f8a6866609c5b4
[ "MIT" ]
null
null
null
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import ssl import logging from sleekxmpp.util import sasl from sleekxmpp.util.stringprep_profiles import StringPrepError from sleekxmpp.stanza ...
36.679012
83
0.58151
import ssl import logging from sleekxmpp.util import sasl from sleekxmpp.util.stringprep_profiles import StringPrepError from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin from sleekxmpp.plugins import BasePlugin from sleekxmpp.xmlstream.matcher import Ma...
true
true
f71a9c42ba701b954c3fcb36fd4b72ea81d1eb78
7,255
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_8/rule_1.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,...
38.590426
421
0.513853
def findDecision(obj): if obj[8]>1: if obj[11]<=3: if obj[5]>0: if obj[18]<=0: if obj[12]>1: if obj[14]<=2.0: if obj[16]>1.0: if obj[13]<=6: if obj[17]<=1.0: if obj[0]<=1: if o...
true
true
f71a9c674644f0d53c2687dddfa077e5ece93d13
62
py
Python
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/modules/TaskRunner/analysisModules/Photostim/__init__.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
from __future__ import print_function from .Photostim import *
31
37
0.854839
from __future__ import print_function from .Photostim import *
true
true
f71a9cbf524b1e94c7bb76e86a3a25344ade1dab
21,169
py
Python
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
null
null
null
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
7
2019-06-06T15:47:56.000Z
2019-06-15T18:09:30.000Z
cages/.shared/protocol_xmlrpc.py
targeted/pythomnic3k
c59f8c11302c0a568f45ec626ec6a0065527aa79
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 #-*- coding: iso-8859-1 -*- ################################################################################ # # This module contains an implementation of XMLRPC interface/resource. # # Sample XMLRPC interface configuration (config_interface_xmlrpc_1.py): # # config = dict \ # ( # protocol = "xml...
41.184825
125
0.544003
true
true
f71a9d6ee5b89554965ee5cfb0da2b1898c17923
529
py
Python
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
15
2017-08-30T13:43:14.000Z
2022-03-29T07:04:30.000Z
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
11
2017-08-28T11:23:18.000Z
2022-03-28T23:48:11.000Z
examples/ethernet/eth_connection.py
ingeniamc/ingenialink-python
6011931697e48456f5638c2848303aac2e5bcb75
[ "MIT" ]
9
2017-09-30T08:28:42.000Z
2022-03-12T19:11:43.000Z
import sys from ingenialink.ethernet.network import EthernetNetwork, NET_TRANS_PROT def connection_example(): net = EthernetNetwork() servo = net.connect_to_slave("192.168.2.22", "../../resources/dictionaries/eve-net-c_eth_1.8.1.xdf", 1061, ...
25.190476
88
0.597353
import sys from ingenialink.ethernet.network import EthernetNetwork, NET_TRANS_PROT def connection_example(): net = EthernetNetwork() servo = net.connect_to_slave("192.168.2.22", "../../resources/dictionaries/eve-net-c_eth_1.8.1.xdf", 1061, ...
true
true
f71a9e181df7b219ef25d20d2a8f66302f4a6696
355
py
Python
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/heat-3d/tmp_files/9010.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/9010.c') procedure('kernel_heat_3d') loop(0) known('n>3') tile(0,2,8,2) tile(0,4,64...
25.357143
116
0.752113
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/9010.c') procedure('kernel_heat_3d') loop(0) known('n>3') tile(0,2,8,2) tile(0,4,64...
true
true
f71aa1575b68c457900ef0939ac431d1293e82a4
2,733
py
Python
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
14
2019-03-30T02:11:29.000Z
2021-11-16T12:06:32.000Z
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
1
2019-09-13T15:10:18.000Z
2019-09-13T21:05:46.000Z
tensorflow_datasets/testing/starcraft.py
haideraltahan/datasets
aad5c7ea705949d20817fcc49a892bb2a21532f0
[ "Apache-2.0" ]
10
2019-03-31T08:35:29.000Z
2021-09-01T06:28:43.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
32.152941
80
0.726674
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags import numpy as np import png import six import tensorflow as tf FLAGS = flags.FLAGS flags.DEFINE_integer("resolution", 64, "Resolution of the video...
true
true
f71aa2e9fb55e8ff5df09593abc82b3ea64662a2
3,133
py
Python
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
1
2021-06-26T00:31:08.000Z
2021-06-26T00:31:08.000Z
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
1
2020-03-02T21:05:42.000Z
2020-03-03T07:09:51.000Z
core/storage/recommendations/gae_models.py
kaylahardie/oppia
e93ed02dfc7f654ef4fb62268c1a9b9d9ded30ec
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
32.978947
79
0.719757
from __future__ import absolute_import from __future__ import unicode_literals from core.platform import models from google.appengine.ext import ndb (base_models,) = models.Registry.import_models([models.NAMES.base_model]) TOPIC_SIMILARITIES_ID = 'topics' class ExplorationRecommendationsModel...
true
true
f71aa357327a98795cb190e3909dda5f261e7b6a
25,206
py
Python
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
acore/classifier_cov_pow_toy_pvalue.py
zhao-david/ACORE-LFI
91de88b77f0be110e42ed91bbb7a50b7ca83319a
[ "MIT" ]
null
null
null
from warnings import simplefilter simplefilter(action='ignore', category=FutureWarning) import numpy as np import argparse import pandas as pd from tqdm.auto import tqdm from datetime import datetime from sklearn.metrics import log_loss import seaborn as sns import matplotlib.pyplot as plt from utils.functions import...
63.491184
134
0.519281
from warnings import simplefilter simplefilter(action='ignore', category=FutureWarning) import numpy as np import argparse import pandas as pd from tqdm.auto import tqdm from datetime import datetime from sklearn.metrics import log_loss import seaborn as sns import matplotlib.pyplot as plt from utils.functions import...
true
true
f71aa447e93126ff1ef79e05d8bb36f39e9bc2a4
4,210
py
Python
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/test/test_v1_load_balancer_ingress.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
97.906977
3,380
0.791211
from __future__ import absolute_import import os import sys import unittest import openshift.client from kubernetes.client.rest import ApiException from openshift.client.models.v1_load_balancer_ingress import V1LoadBalancerIngress class TestV1LoadBalancerIngress(unittest.TestCase): def setUp(self): ...
true
true
f71aa5297e2e652741a2be68088de722b87d9713
3,419
py
Python
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gaussdb/Opengauss_Function_Tools_Gaussdb_Case0014.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.763441
84
0.664814
import unittest from testcase.utils.ComThread import ComThread from yat.test import Node from yat.test import macro from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger class Tools(unittest.TestCase): def setUp(self): self.logger = ...
true
true
f71aa56817ca77eba5df4a2dd11cb0c4a9a7ea1c
3,699
py
Python
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
22,617
2015-06-03T20:26:05.000Z
2022-03-31T22:25:42.000Z
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
1,230
2015-06-03T13:56:41.000Z
2022-03-30T06:03:12.000Z
tqdm/_monitor.py
insilications/tqdm-clr
b09a24af7ffe5c85ed0e8e64b33059b43b1be020
[ "MIT" ]
1,445
2015-06-03T14:01:33.000Z
2022-03-29T14:41:52.000Z
import atexit from threading import Event, Thread, current_thread from time import time from warnings import warn __all__ = ["TMonitor", "TqdmSynchronisationWarning"] class TqdmSynchronisationWarning(RuntimeWarning): """tqdm multi-thread/-process errors which may cause incorrect nesting but otherwise no adve...
38.53125
83
0.575561
import atexit from threading import Event, Thread, current_thread from time import time from warnings import warn __all__ = ["TMonitor", "TqdmSynchronisationWarning"] class TqdmSynchronisationWarning(RuntimeWarning): pass class TMonitor(Thread): _test = {} def __init__(self, tqdm_cls, sleep_interval...
true
true
f71aa6cce65ae0f1ec42a02146d24feaa44f2307
98
py
Python
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
alg4.py
devilnotcry77/devil_not_cry
a9d342d053c788ec6db2d1c5967ed55104b40045
[ "Apache-2.0" ]
null
null
null
n=int(100) for i in range(n): for j in range(10): print("*", end="") print()
16.333333
27
0.459184
n=int(100) for i in range(n): for j in range(10): print("*", end="") print()
true
true
f71aa81665c674b5cc3278ea94c533b98549fe90
935
py
Python
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Swap Nodes in Pairs.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
"""Given a linked list, swap every two adjacent nodes and return its head. Example 1: Input: head = [1,2,3,4] Output: [2,1,4,3] Example 2: Input: head = [] Output: [] Example 3: Input: head = [1] Output: [1] Constraints: The number of nodes in the list is in the range [0, 100]. 0 <= Node.val <= 100 Follow up: Ca...
21.744186
119
0.640642
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def swapPairs(self, head: ListNode) -> ListNode: if head is None or head.next is None: return head first = head.next second = head.next.next first....
true
true
f71aa89acd39eaae1c4ded0a372a3dc7b494d67c
189
py
Python
blueapps/account/components/bk_token/forms.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
42
2021-06-16T12:06:03.000Z
2022-03-29T13:18:00.000Z
blueapps/account/components/bk_token/forms.py
jin-cc/bastion-test
9feecbe927e5446213ab25b4da4a5eca23cf6bae
[ "Apache-2.0" ]
3
2020-06-05T20:56:09.000Z
2021-06-10T21:29:05.000Z
blueapps/account/components/bk_token/forms.py
wangzishuo111/bk_prometheus
c6aa16d8a547a3d00fbca317f6846ad35b1297ea
[ "MIT" ]
16
2021-07-13T01:17:57.000Z
2022-03-01T12:39:32.000Z
# -*- coding: utf-8 -*- from django import forms class AuthenticationForm(forms.Form): # bk_token format: KH7P4-VSFi_nOEoV3kj0ytcs0uZnGOegIBLV-eM3rw8 bk_token = forms.CharField()
23.625
66
0.740741
from django import forms class AuthenticationForm(forms.Form): bk_token = forms.CharField()
true
true
f71aa8c11ea59751ae59caa6184f21489f218f12
422
py
Python
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
25
2020-07-07T20:07:41.000Z
2021-12-17T11:27:36.000Z
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
26
2020-07-04T00:06:25.000Z
2022-02-10T03:28:35.000Z
CookieTTS/_2_ttm/GANTTS/run_every_epoch.py
AstraliteHeart/cookietts
c871f5f7b5790656d5b57bcd9e63946a2da52f0f
[ "BSD-3-Clause" ]
11
2020-07-02T21:39:59.000Z
2022-01-17T22:09:46.000Z
current_iteration = iteration ########################################################################## ### GAN-TTS : HIGH FIDELITY SPEECH SYNTHESIS WITH ADVERSARIAL NETWORKS ### ########################################################################## # Learning Rate / Optimization decay_start = 99999999 A_ = 0.2e-...
28.133333
74
0.490521
current_iteration = iteration
true
true
f71aa8d7c382bafc56b06793ddb3976f1a195ca1
11,480
py
Python
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
1
2021-08-05T05:41:50.000Z
2021-08-05T05:41:50.000Z
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
null
null
null
StructVBERT/tasks/vqa.py
onlyrico/AliceMind
a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded
[ "Apache-2.0" ]
1
2021-07-10T09:50:47.000Z
2021-07-10T09:50:47.000Z
# coding=utf-8 # Copyleft 2019 project LXRT. import os import collections import torch import torch.nn as nn import logging from torch.utils.data.dataloader import DataLoader from tqdm import tqdm from param import args from lxrt.qa_answer_table import load_lxmert_qa from tasks.vqa_model import VQAModel from tasks.v...
38.394649
129
0.567334
import os import collections import torch import torch.nn as nn import logging from torch.utils.data.dataloader import DataLoader from tqdm import tqdm from param import args from lxrt.qa_answer_table import load_lxmert_qa from tasks.vqa_model import VQAModel from tasks.vqa_data import VQADataset, VQATorchDataset,...
true
true
f71aa988a5098b28bbada6d39c5173f2c7f1034c
1,683
py
Python
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
python/ctci/1_arrays_strings/6_Compression.py
othonreyes/code_problems
6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf
[ "MIT" ]
null
null
null
# Create a function that implements a basic compression algorithm by counting the chars # thtat are present in a string, if the result string is longer than input # then return original input. # # Examples: # aaabcccccaaa: a3b1c5a3 # abcdef: abcdef # aaaaaaaaaaba: a10b1a1 ### Note: Don't use extra space import unit...
25.892308
87
0.618538
ress2(s1): newStr = [] count = 0 for i in range(len(s1)): # Explanation # the i != 0 is used to deal with the first character. # we could have done but requirs extra code: # char = s1[0] # requires to check if the s1 is not empty # - or - # char = '' # requires to check if char !...
true
true
f71aaa4225770dc4b16e09cec972c3086fd80ff7
291
py
Python
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
11
2019-05-02T22:27:01.000Z
2020-10-30T08:43:02.000Z
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
null
null
null
subsets/subsets.py
YasinEhsan/interview-prep
ed9f95af5a37b05304e45b41511068b6f72533e7
[ "Apache-2.0" ]
3
2019-11-01T01:35:01.000Z
2020-01-11T18:00:39.000Z
def find_subsets(nums): subsets = [] # TODO: Write your code here subsets.append([]) for i in range(len(nums)): storeLen = len(subsets) for j in range(0,storeLen): currSet = list(subsets[j]) currSet.append(nums[i]) subsets.append(currSet) return subsets
22.384615
32
0.639175
def find_subsets(nums): subsets = [] subsets.append([]) for i in range(len(nums)): storeLen = len(subsets) for j in range(0,storeLen): currSet = list(subsets[j]) currSet.append(nums[i]) subsets.append(currSet) return subsets
true
true
f71aaa5221fcf2fa717ae33f34cf3b565947d0e8
6,099
py
Python
lib/models/spin.py
ziniuwan/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
145
2021-08-15T13:22:08.000Z
2022-03-29T13:37:19.000Z
lib/models/spin.py
vkirilenko/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
9
2021-09-17T14:58:15.000Z
2022-03-29T07:43:08.000Z
lib/models/spin.py
vkirilenko/maed
9e1f1c37eba81da86c8d9c62dc9be41a01abff5b
[ "MIT" ]
17
2021-08-15T13:22:10.000Z
2022-01-17T02:34:14.000Z
""" This script is brought from https://github.com/nkolot/SPIN Adhere to their licence to use this script """ import math import torch import numpy as np import os.path as osp import torch.nn as nn from lib.core.config import DATA_DIR from lib.utils.geometry import rotation_matrix_to_angle_axis, rot6d_to_rotmat from ...
38.601266
132
0.620102
import math import torch import numpy as np import os.path as osp import torch.nn as nn from lib.core.config import DATA_DIR from lib.utils.geometry import rotation_matrix_to_angle_axis, rot6d_to_rotmat from lib.models.smpl import SMPL, SMPL_MODEL_DIR, H36M_TO_J17, SMPL_MEAN_PARAMS class Regressor(nn.Module): d...
true
true
f71aabf71da050ef5d5829467e28176e4164c3ea
8,924
py
Python
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
1
2021-02-19T20:57:36.000Z
2021-02-19T20:57:36.000Z
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
null
null
null
sk_typing/decomposition.py
thomasjpfan/sk_typing
e6aacfedbce44d7748cf7c49cd2b949952f2e427
[ "MIT" ]
null
null
null
from typing import Optional from typing import Union from collections.abc import Callable import numpy as np from .typing import RandomStateType from .typing import Literal class DictionaryLearning: components_: np.ndarray error_: np.ndarray n_iter_: int def __init__( self, n_compon...
27.12462
80
0.584043
from typing import Optional from typing import Union from collections.abc import Callable import numpy as np from .typing import RandomStateType from .typing import Literal class DictionaryLearning: components_: np.ndarray error_: np.ndarray n_iter_: int def __init__( self, n_compon...
true
true
f71aac40a529a6f8ae2786769f649c443c11c279
8,926
py
Python
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
Model Monitoring.py
MSJemutai/DSCC202-402-Forecasting-Flight-Delay-Final-Project
e6fc287ebfac59fd2edbc7d19241b61787ce14fb
[ "MIT" ]
null
null
null
# Databricks notebook source # MAGIC %md # MAGIC ## Model Monitoring # COMMAND ---------- # MAGIC %run ./includes/utilities # COMMAND ---------- # MAGIC %run ./includes/configuration # COMMAND ---------- # grab the station information (system wide) stationDF=get_bike_stations()[['name','station_id','lat','lon']] ...
31.652482
164
0.720816
ons()[['name','station_id','lat','lon']] stationsOfInterestDF = spark.sql("""select distinct(station_id) from from citibike.forecast_regression_timeweather;""").toPandas() stationDF = stationDF[stationDF['station_id'].apply(lambda x: int(x) in list(stationsOfInterestDF.values.flatten()))] from datetime import da...
true
true
f71aac54f88d8ccd203f824b5e35a7cfb34c929b
15,156
py
Python
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
1
2022-02-12T06:28:15.000Z
2022-02-12T06:28:15.000Z
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/canon_log.py
soma2000-lang/colour
bb7ee23ac65e09613af78bd18dd98dffb1a2904a
[ "BSD-3-Clause" ]
null
null
null
""" Canon Log Encodings =================== Defines the *Canon Log* encodings: - :func:`colour.models.log_encoding_CanonLog` - :func:`colour.models.log_decoding_CanonLog` - :func:`colour.models.log_encoding_CanonLog2` - :func:`colour.models.log_decoding_CanonLog2` - :func:`colour.models.log_encoding_CanonLo...
29.202312
105
0.490433
from __future__ import annotations import numpy as np from colour.hints import ( Boolean, FloatingOrArrayLike, FloatingOrNDArray, Integer, ) from colour.models.rgb.transfer_functions import full_to_legal, legal_to_full from colour.utilities import ( as_float, domain_range_scale, from_rang...
true
true
f71aad03581521af34e46f4263fc80abdb4a99c3
6,135
py
Python
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
asposewordscloud/models/requests/insert_list_online_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="insert_list_online_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a c...
49.08
255
0.669927
import json from six.moves.urllib.parse import quote from asposewordscloud import * from asposewordscloud.models import * from asposewordscloud.models.requests import * from asposewordscloud.models.responses import * class InsertListOnlineRequest(BaseRequestObject): def __init__(self, do...
true
true
f71aad2d5eeb4c38a35396239e2ecb41a34883a8
1,177
py
Python
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
8
2020-09-25T08:57:31.000Z
2022-02-02T18:52:09.000Z
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
2
2021-09-05T11:19:36.000Z
2021-09-08T00:13:48.000Z
test/test_execute_python.py
RuneLjungmann/excelbind
29522ec43ce691dfd591b0452d63b7e1b36ad875
[ "MIT" ]
1
2020-09-25T08:56:25.000Z
2020-09-25T08:56:25.000Z
from test.utilities.env_vars import set_env_vars from test.utilities.excel import Excel def test_simple_script_for_addition(xll_addin_path): with set_env_vars('basic_functions'): with Excel() as excel: excel.register_xll(xll_addin_path) ( excel.new_workbook() ...
31.810811
104
0.548853
from test.utilities.env_vars import set_env_vars from test.utilities.excel import Excel def test_simple_script_for_addition(xll_addin_path): with set_env_vars('basic_functions'): with Excel() as excel: excel.register_xll(xll_addin_path) ( excel.new_workbook() ...
true
true
f71aad9b00e3ad94ed69d13f4f8b2c42d39eda6d
2,324
py
Python
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
2
2015-08-13T00:07:49.000Z
2020-08-07T06:38:44.000Z
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/tests/lib/services/compute/test_tenant_networks_client.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2015 NEC Corporation. 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 ...
36.3125
78
0.711274
from tempest.lib.services.compute import tenant_networks_client from tempest.tests.lib import fake_auth_provider from tempest.tests.lib.services import base class TestTenantNetworksClient(base.BaseServiceTest): FAKE_NETWORK = { "cidr": "None", "id": "c2329eb4-cc8e-4439-ac4c-93236930...
true
true
f71aadd3961afa04dc66e19d75c3c36540a1b948
1,264
py
Python
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
null
null
null
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
1
2022-03-31T03:16:16.000Z
2022-03-31T03:16:16.000Z
bilalcoin/flatpages_main/migrations/0001_initial.py
jphaser/bilalcoin
31d8b466912e009c31615b0b1df1afe68ab4bdb8
[ "MIT" ]
null
null
null
# Generated by Django 3.2.3 on 2021-05-21 04:17 from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FAQ', ...
38.30303
147
0.613924
from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FAQ', fields=[ ('id', models.BigAut...
true
true
f71aaddfd333847ace11e0163cb2a3644b0168e0
49,007
py
Python
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
salt/crypt.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The crypt module manages all of the cryptography functions for minions and masters, encrypting and decrypting payloads, preparing messages, and authenticating peers ''' # Import python libs from __future__ import absolute_import, print_function import os import sys import copy import time im...
40.568709
114
0.576061
from __future__ import absolute_import, print_function import os import sys import copy import time import hmac import base64 import hashlib import logging import stat import traceback import binascii import weakref import salt.ext.six as six from salt.ext.six.moves import zip try: from Crypto.Cipher import A...
true
true
f71aae58eb581c2971eaadde48b721f1d5ace501
396
py
Python
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
booktrade/booktrade/wsgi.py
rocity/dj-booktrade
7ec0876635931e540ce4c0e1c74653b6626fd3fd
[ "Apache-2.0" ]
null
null
null
""" WSGI config for booktrade project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
23.294118
78
0.787879
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "booktrade.settings") application = get_wsgi_application()
true
true
f71aae7b0231777a5578550493465da27589a5fd
12,552
py
Python
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
48
2018-05-15T12:46:36.000Z
2021-03-11T09:34:10.000Z
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
1
2018-10-28T21:11:47.000Z
2018-10-31T20:31:09.000Z
utils.py
chaitanyamalaviya/NeuralFactorGraph
6cd664b7edc43d56c6f1165baa7e7625eb0f7cd8
[ "MIT" ]
6
2018-07-03T01:28:41.000Z
2020-01-23T13:25:49.000Z
from __future__ import division, print_function from conllu.parser import parse, parse_tree from tags import Tags, Tag, Label import os import re import math import numpy as np import itertools import pdb import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import torch from torch.aut...
27.769912
120
0.634242
from __future__ import division, print_function from conllu.parser import parse, parse_tree from tags import Tags, Tag, Label import os import re import math import numpy as np import itertools import pdb import pickle import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import torch from torch.aut...
true
true
f71aaf4aad518c6d9db764a08f3d7f8432489eb7
32,580
py
Python
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
prody/utilities/catchall.py
bwingert/ProDy
7377a20b4a4841ec59dccaa93fa58e2ee0fe89bc
[ "MIT" ]
null
null
null
"""This module defines miscellaneous utility functions that is public to users.""" import numpy as np from numpy import unique, linalg, diag, sqrt, dot from Bio.Phylo.BaseTree import Tree, Clade from prody import PY3K from .misctools import addEnds, interpY, index, isListLike from .checkers import checkCoords from ....
33.449692
122
0.594045
import numpy as np from numpy import unique, linalg, diag, sqrt, dot from Bio.Phylo.BaseTree import Tree, Clade from prody import PY3K from .misctools import addEnds, interpY, index, isListLike from .checkers import checkCoords from .logger import LOGGER __all__ = ['calcTree', 'clusterMatrix', 'showLines', 'showMa...
true
true
f71ab0cfdecb4656998e375e331065ba5d5988ae
15,809
py
Python
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
null
null
null
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
null
null
null
fkie_iop_rqt_access_control/src/fkie_iop_rqt_access_control/robot.py
fkie/iop_gui
918353b5767c6ff4a42b294316a03e08501fed28
[ "BSD-3-Clause" ]
1
2018-11-27T03:39:41.000Z
2018-11-27T03:39:41.000Z
# ROS/IOP Bridge # Copyright (c) 2017 Fraunhofer # # This program is dual licensed; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation, or # enter into a proprietary license agreement with the copyright # holder. # # This...
41.712401
171
0.656335
import os from python_qt_binding import loadUi from python_qt_binding.QtCore import QObject, Signal, Qt from python_qt_binding.QtGui import QIcon try: from python_qt_binding.QtGui import QWidget, QDialog, QTreeWidget, QTreeWidgetItem except: from python_qt_binding.QtWidgets import QWidget, ...
true
true
f71ab0e75e50d66af2bfe69ef2fd8400a56a4fd4
1,903
py
Python
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
1
2020-05-17T03:28:17.000Z
2020-05-17T03:28:17.000Z
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
Assessments 1-8/Ass8/Q2_b_1.py
ZHANG-CAIQI/COMP1001
abfad8101b4b58697dfbc8599eebf466beebb9ec
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np def stockUp(priceFile): # read the file infile = open(priceFile, "r") date = [] stock = [] # store only the dates and closing price day = 1 firstLine = True for line in infile: if firstLine: firstLin...
27.185714
89
0.543878
import matplotlib.pyplot as plt import numpy as np def stockUp(priceFile): infile = open(priceFile, "r") date = [] stock = [] day = 1 firstLine = True for line in infile: if firstLine: firstLine = False else: count_item = 0 ...
true
true
f71ab0f98895a9582d987bf35cfa556cbf1224e1
694
py
Python
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
GENERAL/slots_manager.py
Couso99/EEG-Environment
d67de00c08c5892baebe5bf993cac0a5db6e70b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: %(Mikel Val Calvo)s @email: %(mikel1982mail@gmail.com) @institution: %(Dpto. de Inteligencia Artificial, Universidad Nacional de Educación a Distancia (UNED)) @DOI: 10.5281/zenodo.3759306 """ #%% class SlotsManager: # Inicializa la lista de callbacks def __init__(self): ...
23.931034
103
0.628242
class SlotsManager: def __init__(self): self.callbacks = [] def trigger(self): for callback in self.callbacks: callback() print(callback) def append(self, slot): self.callbacks.append(slot) print(slot)
true
true
f71ab3032781cd41199cec50632738defd8f52ca
116,626
py
Python
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
test/orm/test_joins.py
petit87/sqlalchemy
67d674bd63ca36ac32b23f96e2b19e9dac6b0863
[ "MIT" ]
null
null
null
import itertools import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import lateral from sqlalchemy import literal...
34.041448
79
0.563099
import itertools import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import lateral from sqlalchemy import literal...
true
true
f71ab4470632fb3e14e414c8dba8614f764a6ebe
8,218
py
Python
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
1
2021-06-29T03:57:26.000Z
2021-06-29T03:57:26.000Z
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
4
2021-06-18T10:45:03.000Z
2021-09-13T22:12:45.000Z
bokeh_root_cmd/main.py
ideonate/bokeh-root-cmd
c26eee1414d3305749a8724b8740d9a4eaca0cf7
[ "Apache-2.0" ]
2
2021-04-29T03:27:19.000Z
2021-09-13T21:44:39.000Z
"""Command line wrapper to serve one or more named Bokeh scripts or folders.""" import logging import os import re import pathlib import tempfile from typing import Any, Dict, Tuple import bokeh.server.views import click from bokeh.application.application import Application from bokeh.command.util import build_single_...
35.886463
118
0.643344
import logging import os import re import pathlib import tempfile from typing import Any, Dict, Tuple import bokeh.server.views import click from bokeh.application.application import Application from bokeh.command.util import build_single_handler_application from bokeh.server.server import Server as _BkServer from bok...
true
true
f71ab48c915466e77fb663ba45f13600446b8c5f
1,481
py
Python
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
null
null
null
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
6
2020-06-05T19:09:26.000Z
2022-01-13T00:54:56.000Z
invoices/api/viewsets.py
elcolie/zero-to-deploy
6191a33ef55af7c550c0e529a4e373bfe40bc014
[ "MIT" ]
null
null
null
from django_filters import rest_framework as filters from rest_framework import viewsets from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.permissions import IsAuthenticated, BasePermission from invoices.api.serializers import InvoiceSerializer from invoices.models import Invoice cl...
35.261905
105
0.748143
from django_filters import rest_framework as filters from rest_framework import viewsets from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.permissions import IsAuthenticated, BasePermission from invoices.api.serializers import InvoiceSerializer from invoices.models import Invoice cl...
true
true
f71ab63c599cebc6ea849c3b34a83ddb2a9b964d
1,266
py
Python
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
"""Tests for experimental code using pandas objects for internal storage. See pandasdmx.experimental for more information. """ from pandasdmx.experimental import DataSet as PandasDataSet from pandasdmx.model import ( AttributeValue, DataAttribute, DataSet, Key, Observation, ) import pytest pyt...
31.65
77
0.690363
from pandasdmx.experimental import DataSet as PandasDataSet from pandasdmx.model import ( AttributeValue, DataAttribute, DataSet, Key, Observation, ) import pytest pytestmark = pytest.mark.experimental @pytest.mark.parametrize('DataSetType', [DataSet, PandasDataSet]) def test_add_obs(DataSe...
true
true
f71ab6ca83c0cccdc98f7bc0e6a9815f90dc10b0
4,878
py
Python
bamboo/unit_tests/test_unit_layer_gather.py
steffi7574/lbann
6a6b86d3cbcf4ca50730c652a5014f7cb3afa5e6
[ "Apache-2.0" ]
null
null
null
bamboo/unit_tests/test_unit_layer_gather.py
steffi7574/lbann
6a6b86d3cbcf4ca50730c652a5014f7cb3afa5e6
[ "Apache-2.0" ]
5
2021-07-15T20:51:21.000Z
2022-01-01T03:18:05.000Z
bamboo/unit_tests/test_unit_layer_gather.py
ekmixon/lbann
665797a112dc96d15bd1d958de61f48bf5d3d21f
[ "Apache-2.0" ]
null
null
null
import functools import operator import os import os.path import sys import numpy as np # Bamboo utilities current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools # ==============================...
27.715909
80
0.593276
import functools import operator import os import os.path import sys import numpy as np current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools input_size = 23 output_size = 15 seed = 202...
true
true
f71ab703aedaaca8057f1f775130036f5d78f355
1,470
py
Python
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
5
2021-09-15T21:48:55.000Z
2022-03-22T11:21:58.000Z
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
null
null
null
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
1
2021-08-20T08:40:15.000Z
2021-08-20T08:40:15.000Z
from runner_master import runner import os import io import torch import logging from PIL import Image, ImageFile from runner_master.runner.data import datasets # to fix "OSError: image file is truncated" ImageFile.LOAD_TRUNCATED_IMAGES = True class ImagenameDataset(datasets.ImglistDatasetV2): def getitem(self, i...
35
79
0.612245
from runner_master import runner import os import io import torch import logging from PIL import Image, ImageFile from runner_master.runner.data import datasets ImageFile.LOAD_TRUNCATED_IMAGES = True class ImagenameDataset(datasets.ImglistDatasetV2): def getitem(self, index): line = self.imglist[index].s...
true
true
f71ab7463ba7c30d460e7f06958ca0812996c4f2
1,439
py
Python
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ Setup for the slack-backup project """ try: from setuptools import setup except ImportError: from distutils.core import setup setup(name="slack-backup", packages=["slack_backup"], version="0.7", description="Make copy of slack converstaions", author="Roman Do...
38.891892
65
0.551077
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name="slack-backup", packages=["slack_backup"], version="0.7", description="Make copy of slack converstaions", author="Roman Dobosz", author_email="gryf73@gmail.com", url="https://...
true
true
f71ab74bbb37c06ec87292445a3616dd3669f146
7,850
py
Python
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
import json from transformers.tokenization_utils import PreTrainedTokenizer from yacs.config import CfgNode from openprompt.data_utils.data_utils import InputFeatures import re from openprompt import Verbalizer from typing import * import torch import torch.nn as nn import torch.nn.functional as F from openprompt.utils...
44.101124
183
0.643057
import json from transformers.tokenization_utils import PreTrainedTokenizer from yacs.config import CfgNode from openprompt.data_utils.data_utils import InputFeatures import re from openprompt import Verbalizer from typing import * import torch import torch.nn as nn import torch.nn.functional as F from openprompt.utils...
true
true
f71ab83062ace9e091517b08758d3a356d00ee8f
643
py
Python
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
null
null
null
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
null
null
null
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
2
2021-09-10T03:47:29.000Z
2021-12-23T06:16:34.000Z
"""Add price Revision ID: 57642bbc5015 Revises: 6b66b7cc2f1f Create Date: 2021-11-18 17:58:58.263480 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '57642bbc5015' down_revision = '6b66b7cc2f1f' branch_labels = None depends_on = None def upgrade(): # ### ...
22.172414
75
0.685848
from alembic import op import sqlalchemy as sa revision = '57642bbc5015' down_revision = '6b66b7cc2f1f' branch_labels = None depends_on = None def upgrade():
true
true
f71ab8ed89dcd84727dfd18c9a588273b4b1ffe5
476
py
Python
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
# Protean from protean.core.field.basic import String from protean.utils.container import BaseContainer class CustomBaseContainer(BaseContainer): def __new__(cls, *args, **kwargs): if cls is CustomBaseContainer: raise TypeError("CustomBaseContainer cannot be instantiated") return super...
29.75
73
0.741597
from protean.core.field.basic import String from protean.utils.container import BaseContainer class CustomBaseContainer(BaseContainer): def __new__(cls, *args, **kwargs): if cls is CustomBaseContainer: raise TypeError("CustomBaseContainer cannot be instantiated") return super().__new_...
true
true
f71ab9c19de52f584719fbedb002bf798830562d
544
py
Python
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
null
null
null
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
1
2021-08-02T13:02:12.000Z
2021-08-02T13:02:12.000Z
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
null
null
null
from typing import Type from ...caches import BaseXMLLayerCache, XMLLayerFileCache, XMLLayerNoCache from ..base import BaseMapper from ..consts import PACKAGE_NAME class XMLLayerCacheMapper(BaseMapper[Type[BaseXMLLayerCache]]): @classmethod def default_mapper(cls) -> "XMLLayerCacheMapper": default_ma...
30.222222
81
0.740809
from typing import Type from ...caches import BaseXMLLayerCache, XMLLayerFileCache, XMLLayerNoCache from ..base import BaseMapper from ..consts import PACKAGE_NAME class XMLLayerCacheMapper(BaseMapper[Type[BaseXMLLayerCache]]): @classmethod def default_mapper(cls) -> "XMLLayerCacheMapper": default_ma...
true
true
f71aba11c3ef384c490f493c022cda6fbf1433c8
3,220
py
Python
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
1
2018-09-10T14:04:22.000Z
2018-09-10T14:04:22.000Z
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
null
null
null
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. autoclass:: Blueprint """ from sanic.blueprints import Blueprint as BaseBlueprint, FutureRoute __all__ = ('Blueprint',) class Blueprint(BaseBlueprint): """Create a new blueprint. :param name: unique name of the blueprint :param url_prefix: URL to be prefixed before all ro...
34.623656
77
0.591925
from sanic.blueprints import Blueprint as BaseBlueprint, FutureRoute __all__ = ('Blueprint',) class Blueprint(BaseBlueprint): def __init__(self, *args, **kwargs): super(Blueprint, self).__init__(*args, **kwargs) self.resources = [] def register(self, app, options): super(Blueprin...
true
true
f71aba25d68cbd1b1da66df6ca5eaabc6b86db83
1,244
py
Python
setup.py
vtunr/VTun
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
2
2020-04-14T19:14:07.000Z
2022-02-14T14:49:44.000Z
setup.py
vtunr/VTun
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
16
2020-01-20T10:19:17.000Z
2022-01-15T18:05:55.000Z
setup.py
vtunr/VTunit
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
null
null
null
import setuptools import subprocess with open("README.md", "r") as fh: long_description = fh.read() packages = [dep.rstrip('\n') for dep in open("requirements.txt", "r")] def get_git_version(): return subprocess.check_output(['git', 'describe','--dirty', '--tags']).strip() setuptools.setup( name="VTunit"...
36.588235
96
0.653537
import setuptools import subprocess with open("README.md", "r") as fh: long_description = fh.read() packages = [dep.rstrip('\n') for dep in open("requirements.txt", "r")] def get_git_version(): return subprocess.check_output(['git', 'describe','--dirty', '--tags']).strip() setuptools.setup( name="VTunit"...
true
true
f71abb077d128f03c4fd2fe2aa978ca83223d79e
6,608
py
Python
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright [yyyy] [name of copyright owner] # Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
39.100592
111
0.525272
import math import torch from torch.optim.optimizer import Optimizer, required class RAdam(Optimizer): def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0): defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay) self.buffer = [[None, N...
true
true
f71abbabdf4197e4dad1e27bc472d450790c4613
44,512
py
Python
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
null
null
null
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
null
null
null
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
1
2019-09-09T18:31:41.000Z
2019-09-09T18:31:41.000Z
""" Node classes (`Apply`, `Variable`) and expression graph algorithms. """ from __future__ import absolute_import, print_function, division from collections import deque from copy import copy from itertools import count import theano from theano import config from theano.gof import utils from six import string_types...
32.898744
129
0.596671
from __future__ import absolute_import, print_function, division from collections import deque from copy import copy from itertools import count import theano from theano import config from theano.gof import utils from six import string_types, integer_types, iteritems from theano.misc.ordered_set import OrderedSet _...
true
true
f71abc41fa2bd110c77062474f73a192caded073
2,015
py
Python
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-11-28T10:46:52.000Z
2019-11-28T10:46:52.000Z
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class IntlJaZhPage(page_module.Page): def __init__(...
31
84
0.63871
from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class IntlJaZhPage(page_module.Page): def __init__(self, url, page_set): super(IntlJaZhPage, self).__init__(url=url, page_set=page_set) self.user_agent_type = 'desktop' self.archive_data_file = 'dat...
true
true
f71abc4360294fb27af4d518e22ffc96882ac8b4
1,646
py
Python
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
2
2021-08-02T05:39:43.000Z
2021-08-04T04:15:02.000Z
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
import torch import torch.nn as nn class ChamferLoss(nn.Module): def __init__(self): super(ChamferLoss, self).__init__() self.use_cuda = torch.cuda.is_available() def forward(self, preds, gts, reverse=True, bidirectional=True): def compute_loss(preds, gts): P = self.batch...
35.021277
69
0.572904
import torch import torch.nn as nn class ChamferLoss(nn.Module): def __init__(self): super(ChamferLoss, self).__init__() self.use_cuda = torch.cuda.is_available() def forward(self, preds, gts, reverse=True, bidirectional=True): def compute_loss(preds, gts): P = self.batch...
true
true
f71abc9fb39ef5fd0daeb69a86632bd9e5ed8709
5,028
py
Python
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
3
2020-12-29T02:47:32.000Z
2021-11-12T08:12:51.000Z
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
23
2020-09-25T22:41:48.000Z
2021-12-13T20:43:37.000Z
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
1
2021-03-12T10:08:44.000Z
2021-03-12T10:08:44.000Z
""" Copyright (c) 2019 Intel Corporation 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 writin...
42.610169
90
0.646181
import torch import torch.nn as nn import torch.nn.functional as F from ..box_utils import match, log_sum_exp class MultiBoxLoss(nn.Module): def __init__(self, cfg, num_classes, overlap_thresh, prior_for_matching, bkg_label, neg_mining, neg_pos, neg_overlap, encode_target, device=None): ...
true
true
f71abd4fc53838f6ee6c2abce3c48015aa6d6d6c
1,513
py
Python
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
1
2021-08-22T19:42:55.000Z
2021-08-22T19:42:55.000Z
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
null
null
null
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
31.520833
76
0.723067
from typing import Iterator, List from gluonts.dataset.common import DataEntry, Dataset from gluonts.transform import Chain, Transformation class TransformedDataset(Dataset): def __init__( self, base_dataset: Dataset, transformations: List[Transformation] ) -> None: self.base_d...
true
true
f71abea7e87d7a468b3566906416d9861f1ed252
2,585
py
Python
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
1
2018-08-15T06:27:53.000Z
2018-08-15T06:27:53.000Z
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
null
null
null
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
null
null
null
import sqlite3 import datetime import time #import Read1 #import sync #from datetime import datetime conn = sqlite3.connect('att.db') c = conn.cursor() def db(sid): #conn = sqlite3.connect('att.db') #c = conn.cursor() start_time = time.time() c.execute('''CREATE TABLE IF NOT EXISTS attendance(ID intege...
33.141026
192
0.630174
import sqlite3 import datetime import time conn = sqlite3.connect('att.db') c = conn.cursor() def db(sid): start_time = time.time() c.execute('''CREATE TABLE IF NOT EXISTS attendance(ID integer PRIMARY KEY,std_id varchar2,entry_date varchar2,entry_time varchar2,leave_time varchar2,duration varchar...
true
true
f71abeab574e7cf7dd44a881bb82f87cfbfbc051
2,915
py
Python
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
from mycroft import MycroftSkill from mycroft.messagebus import Message import json from .lib import MqttService class MessageListener(MycroftSkill): # Initializing the skill def initialize(self): self.log.info("Initializing Skill MessageListener") self.add_event('speak', self.handler_...
41.642857
145
0.67753
from mycroft import MycroftSkill from mycroft.messagebus import Message import json from .lib import MqttService class MessageListener(MycroftSkill): def initialize(self): self.log.info("Initializing Skill MessageListener") self.add_event('speak', self.handler_speak) self.add_...
true
true
f71abf4ef891fb18baa38ab3843f5a02e2198d3b
297
py
Python
src/example_d/trade/get_position.py
Han1018/Cryptocurrency-Automated-Trading
52a5b6d15eb9b2a3a69cc53bd159f6eec073614d
[ "MIT" ]
1
2020-11-24T20:01:37.000Z
2020-11-24T20:01:37.000Z
example_d/trade/get_position.py
vanshwassan/binance-python-futures
f5a1664ef1e18bc8a53479fab3fd6d5e512dba07
[ "MIT" ]
1
2021-07-20T15:25:11.000Z
2021-07-20T15:25:11.000Z
example_d/trade/get_position.py
vanshwassan/binance-python-futures
f5a1664ef1e18bc8a53479fab3fd6d5e512dba07
[ "MIT" ]
1
2021-12-14T02:39:04.000Z
2021-12-14T02:39:04.000Z
from binance_d import RequestClient from binance_d.constant.test import * from binance_d.base.printobject import * from binance_d.model.constant import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_position() PrintMix.print_data(result)
33
74
0.841751
from binance_d import RequestClient from binance_d.constant.test import * from binance_d.base.printobject import * from binance_d.model.constant import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_position() PrintMix.print_data(result)
true
true
f71abf924989b3e0fac8c1f6862cb9ab2a3fcdff
266
py
Python
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
16
2019-10-03T21:30:45.000Z
2022-03-09T22:18:44.000Z
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
8
2021-03-15T20:45:32.000Z
2022-03-03T15:17:42.000Z
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
1
2021-07-26T18:50:06.000Z
2021-07-26T18:50:06.000Z
"""Top-level package for spectra.""" from .conv_spectrum import ConvSpectrum from .sticks_spectrum import SticksSpectrum __author__ = """Jonathon Vandezande""" __email__ = "jevandezande@gmail.com" __version__ = "0.4.0" __all__ = ["ConvSpectrum", "SticksSpectrum"]
26.6
44
0.763158
from .conv_spectrum import ConvSpectrum from .sticks_spectrum import SticksSpectrum __author__ = """Jonathon Vandezande""" __email__ = "jevandezande@gmail.com" __version__ = "0.4.0" __all__ = ["ConvSpectrum", "SticksSpectrum"]
true
true
f71ac12590c5ba69a6a44f3ffa552f4ea88234a3
17,149
py
Python
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
import sm import aslam_backend as aopt import aslam_cv as cv import numpy as np def addPoseDesignVariable(problem, T0=sm.Transformation()): q_Dv = aopt.RotationQuaternionDv( T0.q() ) q_Dv.setActive( True ) problem.addDesignVariable(q_Dv) t_Dv = aopt.EuclideanPointDv( T0.t() ) t_Dv.setActive( True )...
44.542857
141
0.623068
import sm import aslam_backend as aopt import aslam_cv as cv import numpy as np def addPoseDesignVariable(problem, T0=sm.Transformation()): q_Dv = aopt.RotationQuaternionDv( T0.q() ) q_Dv.setActive( True ) problem.addDesignVariable(q_Dv) t_Dv = aopt.EuclideanPointDv( T0.t() ) t_Dv.setActive( True )...
true
true
f71ac1809f6473acb6bd2afca69ff45e16538c2b
12,263
py
Python
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-03-03T18:36:42.000Z
2022-03-03T18:36:42.000Z
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-02-28T21:23:12.000Z
2022-03-03T18:33:42.000Z
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-03-03T18:36:37.000Z
2022-03-03T18:36:37.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
43.640569
124
0.643562
import mxnet as mx from mxnet import gluon import numpy as np from numpy.testing import assert_allclose import unittest from mxnet.test_utils import almost_equal def test_rnn(): cell = gluon.rnn.RNNCell(100, prefix='rnn_') inputs = [mx.sym.Variable('rnn_t%d_data'%i) for i in range(3)] out...
true
true
f71ac220110425c4090ee4f6700cf2ea38162317
2,372
py
Python
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
null
null
null
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
null
null
null
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
2
2019-06-18T16:48:03.000Z
2019-06-20T23:50:02.000Z
#!/usr/bin/env python """@package docstring File: me_zrl_bound_evolvers.py Author: Adam Lamson Email: adam.lamson@colorado.edu Description: """ import numpy as np # from scipy.integrate import dblquad from .me_helpers import dr_dt, convert_sol_to_geom from .me_zrl_odes import (rod_geom_derivs_zrl, calc_moment_derivs_...
35.939394
82
0.660624
import numpy as np from .me_helpers import dr_dt, convert_sol_to_geom from .me_zrl_odes import (rod_geom_derivs_zrl, calc_moment_derivs_zrl, calc_moment_derivs_zrl_B_terms, calc_boundary_derivs_zrl) from .me_zrl_helpers import (avg_force_zrl, ...
true
true
f71ac5ae55c84dae849e3d0cc87c208a05d7bfcc
264
py
Python
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
null
null
null
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
null
null
null
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
1
2021-02-12T01:10:51.000Z
2021-02-12T01:10:51.000Z
from .base_command import AntiPetrosBaseCommand from .flag_command import AntiPetrosFlagCommand from .creation_decorators import auto_meta_info_command, auto_meta_info_group from .base_group import AntiPetrosBaseGroup from .command_category import CommandCategory
44
77
0.897727
from .base_command import AntiPetrosBaseCommand from .flag_command import AntiPetrosFlagCommand from .creation_decorators import auto_meta_info_command, auto_meta_info_group from .base_group import AntiPetrosBaseGroup from .command_category import CommandCategory
true
true
f71ac7200feac49fd738de102b33055f7d33fc8f
1,793
py
Python
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2004 Damien Miller <djm@mindrot.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED ...
35.156863
77
0.727273
import platform import sys from distutils.core import setup, Extension VERSION = "0.5" if __name__ == '__main__': libs = [] src = [ 'radix.c', 'radix_python.c' ] if sys.platform == 'win32': libs += [ 'ws2_32' ] src += [ 'strlcpy.c' ] if platform.version() < '6.0': src += [ 'inet_ntop.c'...
true
true
f71ac8c34ec504c775b0e08c86a5e168fd54c6a6
842
py
Python
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
import zipfile import argparse import os from squad_preprocess import maybe_download def setup_args(): parser = argparse.ArgumentParser() parser.add_argument("--download_dir", required=True) # where to put the downloaded glove files return parser.parse_args() def main(): args = setup_args() glove...
27.16129
98
0.731591
import zipfile import argparse import os from squad_preprocess import maybe_download def setup_args(): parser = argparse.ArgumentParser() parser.add_argument("--download_dir", required=True) return parser.parse_args() def main(): args = setup_args() glove_base_url = "http://nlp.stanford.edu/data...
true
true
f71ac992ef0211e206b3d27bddfec1270d1c095f
6,545
py
Python
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
null
null
null
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
null
null
null
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
1
2019-10-14T11:48:23.000Z
2019-10-14T11:48:23.000Z
from typing import List, Tuple, Dict, Any from collections import Counter import pretty_midi import matplotlib.pyplot as plt import librosa.display import os from os import listdir, walk from os.path import isfile, isdir, join from sys import argv import traceback import logging import numpy as np from shutil import co...
35.570652
98
0.59343
from typing import List, Tuple, Dict, Any from collections import Counter import pretty_midi import matplotlib.pyplot as plt import librosa.display import os from os import listdir, walk from os.path import isfile, isdir, join from sys import argv import traceback import logging import numpy as np from shutil import co...
true
true
f71aca40733f04d9dbf52d3494976b80319f27ac
1,059
py
Python
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
null
null
null
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
null
null
null
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
1
2019-06-11T11:14:05.000Z
2019-06-11T11:14:05.000Z
import boto3 def get_event_client(access_key, secret_key, region): """ Returns the client object for AWS Events Args: access_key (str): AWS Access Key secret_key (str): AWS Secret Key region (str): AWS Region Returns: obj: AWS Cloudwatch Event Client Obj """ r...
25.214286
72
0.648725
import boto3 def get_event_client(access_key, secret_key, region): return boto3.client( "events", region_name=region, aws_access_key_id=access_key, aws_secret_access_key=secret_key) def check_rule_exists(rule_name, access_key, secret_key, region): client = get_event_client(ac...
true
true
f71aca5cb50d6e0d40cf7342ca3cded4cb68b824
1,870
py
Python
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
import logging from finorch.config.config import api_config_manager from finorch.sessions.cit.client import CITClient from finorch.sessions.abstract_session import AbstractSession from finorch.sessions.cit.wrapper import CITWrapper from finorch.transport.ssh import SshTransport class CITSession(AbstractSession): ...
32.807018
115
0.667914
import logging from finorch.config.config import api_config_manager from finorch.sessions.cit.client import CITClient from finorch.sessions.abstract_session import AbstractSession from finorch.sessions.cit.wrapper import CITWrapper from finorch.transport.ssh import SshTransport class CITSession(AbstractSession): ...
true
true
f71acbda8152b39dcd69a9518aee969805ce1605
4,092
py
Python
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
null
null
null
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
47.034483
75
0.554497
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
true
true
f71acbff3ef602966bb7796ad13e0aeba23cd1e4
203,023
py
Python
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
2
2016-09-06T07:32:06.000Z
2019-11-20T22:22:39.000Z
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
null
null
null
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
1
2019-11-20T22:22:41.000Z
2019-11-20T22:22:41.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) import uits_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='...
40.620848
23,106
0.745915
from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 import uits_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='locker.proto', package='', serialized_pb='\n\x0clocker.proto\x1a\nuits.proto\"\xf8\x01\n\...
true
true
f71acc6d33db887796f3bf9b80851bc5ea533057
1,180
py
Python
deeplmodel/source/wer.py
Haftom2323/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
1
2022-03-13T19:49:39.000Z
2022-03-13T19:49:39.000Z
deeplmodel/source/wer.py
eyerus21/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
null
null
null
deeplmodel/source/wer.py
eyerus21/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
11
2021-08-02T19:29:47.000Z
2022-03-13T17:25:17.000Z
def wer(r, h): """ Calculation of WER with Levenshtein distance. Works only for iterables up to 254 elements (uint8). O(nm) time ans space complexity. Parameters ---------- r : list h : list Returns ------- int Examples -------- >>> wer("who is there".split(),...
24.583333
64
0.440678
def wer(r, h): import numpy d = numpy.zeros((len(r)+1)*(len(h)+1), dtype=numpy.uint8) d = d.reshape((len(r)+1, len(h)+1)) for i in range(len(r)+1): for j in range(len(h)+1): if i == 0: d[0][j] = j elif j == 0: d[i][0] = i for...
true
true
f71acdd0b906e1300a3decc62a833ed0cf01a8fa
7,182
py
Python
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
# Copyright (c) 2013, Blue Lynx and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import math from frappe.utils import getdate, get_time, flt from datetime import datetime, timedelta, date, time import calendar def execute(fil...
31.778761
346
0.690058
from __future__ import unicode_literals import frappe from frappe import _ import math from frappe.utils import getdate, get_time, flt from datetime import datetime, timedelta, date, time import calendar def execute(filters=None): columns, data = [], [] if filters: columns = get_column() data = get_data(filte...
true
true
f71ace2a9df90effa5053c4c417c48be91c319fc
1,241
py
Python
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
from os import path from setuptools import find_packages from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md")) as f: long_description = f.read() with open(path.join(this_directory, "LICENSE")) as f: license_text = f.read() setu...
24.82
76
0.611604
from os import path from setuptools import find_packages from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md")) as f: long_description = f.read() with open(path.join(this_directory, "LICENSE")) as f: license_text = f.read() setu...
true
true
f71ace2c76abb44e4261efab937f353dece55020
418
py
Python
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
1
2018-11-09T02:09:14.000Z
2018-11-09T02:09:14.000Z
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
null
null
null
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2019-01-11 14:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mrp_system', '0036_auto_20190111_1357'), ] operations = [ migrations.AddField( model_name='billofmaterials', name='a...
22
72
0.614833
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mrp_system', '0036_auto_20190111_1357'), ] operations = [ migrations.AddField( model_name='billofmaterials', name='amount', field=models.IntegerField(b...
true
true
f71acf1492f4b14baf2359d08fc5b2e0b4e5994f
56,230
py
Python
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
1
2020-10-30T09:05:17.000Z
2020-10-30T09:05:17.000Z
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
null
null
null
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
44.205975
213
0.650542
import copy import math import os import warnings import torch import torch.nn.functional as F from torch import nn from torch.nn import CrossEntropyLoss from .configuration_t5 import T5Config from .file_utils import ( DUMMY_INPUTS, DUMMY_MASK, add_start_docstrings, add_start_docstring...
true
true
f71acf41bdacbcba980d2fbc41eeab24cc7554c3
1,140
py
Python
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Config component. This module defines the config Component. <config> </config> """ from . import AbstractComponent class configComponent(AbstractComponent): def __init__(self): self._xmlns = {} self.attributes = {} self.parent_xmlns = {} self._childre...
21.923077
61
0.60614
from . import AbstractComponent class configComponent(AbstractComponent): def __init__(self): self._xmlns = {} self.attributes = {} self.parent_xmlns = {} self._children: List[AbstractComponent] = [] self.childrenData = [] self.tag = 'config' @property de...
true
true
f71acfeb35f54faa88ad90bc14c98d37cd3bbfd8
97
py
Python
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
from django.apps import AppConfig class InvoicebookConfig(AppConfig): name = 'InvoiceBook'
16.166667
35
0.773196
from django.apps import AppConfig class InvoicebookConfig(AppConfig): name = 'InvoiceBook'
true
true