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
f74b04c65561ec38234d4c556c7185cbcba53012
2,814
py
Python
aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeDBInstanceNetInfoRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeDBInstanceNetInfoRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/DescribeDBInstanceNetInfoRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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...
35.175
84
0.77683
from aliyunsdkcore.request import RpcRequest from aliyunsdkrds.endpoint import endpoint_data class DescribeDBInstanceNetInfoRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Rds', '2014-08-15', 'DescribeDBInstanceNetInfo','rds') self.set_method('POST') if hasattr(self, "en...
true
true
f74b056207d8454feded119cbd81f6382100637e
4,035
py
Python
object_detection/builders/optimizer_builder.py
MourabitElBachir/visual-recognition-server-control-back
49ec2a459e8c418a395340d2d3f876af400cb75c
[ "MIT" ]
1,052
2017-08-17T15:47:34.000Z
2022-03-30T07:57:52.000Z
planning&perception/robot_vision_beginner/tensorflow_object_detector/src/object_detection/builders/optimizer_builder.py
qifeidedasima/guyueclass
99f4a58d47a1764cc13af7ef7fe483009e830108
[ "Apache-2.0" ]
35
2017-12-23T02:51:59.000Z
2022-03-06T14:31:27.000Z
workspace/src/tensorflow_object_detector/src/object_detection/builders/optimizer_builder.py
arunj088/barc
859b385480e16de16cc4c4adb57f49e98bfd3ade
[ "MIT" ]
704
2017-08-17T22:43:01.000Z
2022-03-26T20:03:08.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.707965
80
0.74969
import tensorflow as tf from object_detection.utils import learning_schedules slim = tf.contrib.slim def build(optimizer_config, global_summaries): optimizer_type = optimizer_config.WhichOneof('optimizer') optimizer = None if optimizer_type == 'rms_prop_optimizer': config = optimizer_confi...
true
true
f74b06e4baa0cd04a6918c010755bf75a6d5965e
13,591
py
Python
mpire/progress_bar.py
synapticarbors/mpire
058c32cb046ca7e31b73a1d847d698fc38e14b8a
[ "MIT" ]
null
null
null
mpire/progress_bar.py
synapticarbors/mpire
058c32cb046ca7e31b73a1d847d698fc38e14b8a
[ "MIT" ]
null
null
null
mpire/progress_bar.py
synapticarbors/mpire
058c32cb046ca7e31b73a1d847d698fc38e14b8a
[ "MIT" ]
null
null
null
import logging import multiprocessing as mp import multiprocessing.context import sys from datetime import datetime, timedelta from typing import Any, Dict, Optional, Type from tqdm.auto import tqdm from mpire.comms import WorkerComms, POISON_PILL from mpire.dashboard.connection_utils import (DashboardConnectionDetai...
49.064982
120
0.656979
import logging import multiprocessing as mp import multiprocessing.context import sys from datetime import datetime, timedelta from typing import Any, Dict, Optional, Type from tqdm.auto import tqdm from mpire.comms import WorkerComms, POISON_PILL from mpire.dashboard.connection_utils import (DashboardConnectionDetai...
true
true
f74b08659c44e0f218e56fb2324c2f9636ec86e6
5,436
py
Python
MassyTools/util/batch_process.py
Tarskin/MassyTools
3287a4145a7d97c0f6bc60040143308f37cd1d04
[ "Apache-2.0" ]
2
2018-07-05T09:03:49.000Z
2018-09-09T06:57:31.000Z
MassyTools/util/batch_process.py
Tarskin/MassyTools
3287a4145a7d97c0f6bc60040143308f37cd1d04
[ "Apache-2.0" ]
23
2015-09-07T12:33:56.000Z
2020-03-16T08:50:45.000Z
MassyTools/util/batch_process.py
Tarskin/MassyTools
3287a4145a7d97c0f6bc60040143308f37cd1d04
[ "Apache-2.0" ]
3
2016-05-11T11:38:05.000Z
2019-11-19T15:53:19.000Z
from pathlib import Path from MassyTools.bin.mass_spectrum import MassSpectrum from MassyTools.bin.output import Output from MassyTools.gui.batch_process_progress_window import BatchProcessProgressWindow from MassyTools.util.functions import get_peak_list class BatchProcess(object): def __init__(self, master): ...
39.678832
99
0.594187
from pathlib import Path from MassyTools.bin.mass_spectrum import MassSpectrum from MassyTools.bin.output import Output from MassyTools.gui.batch_process_progress_window import BatchProcessProgressWindow from MassyTools.util.functions import get_peak_list class BatchProcess(object): def __init__(self, master): ...
true
true
f74b0a1fb6958e792bdfdc410cb9c54d3cb27c77
341
py
Python
basicsr/__init__.py
pantheon5100/BasicSR
19beb1b8da4b83dfd06aef71b9afbd98559b78da
[ "Apache-2.0" ]
null
null
null
basicsr/__init__.py
pantheon5100/BasicSR
19beb1b8da4b83dfd06aef71b9afbd98559b78da
[ "Apache-2.0" ]
null
null
null
basicsr/__init__.py
pantheon5100/BasicSR
19beb1b8da4b83dfd06aef71b9afbd98559b78da
[ "Apache-2.0" ]
null
null
null
# https://github.com/xinntao/BasicSR # flake8: noqa from .archs import * from .data import * from .losses import * from .metrics import * from .models import * from .ops import * from .test import * from .train import * from .utils import * from .version import __gitsha__, __version__ DATASET_FOLDER="/workspace/datase...
22.733333
53
0.753666
from .archs import * from .data import * from .losses import * from .metrics import * from .models import * from .ops import * from .test import * from .train import * from .utils import * from .version import __gitsha__, __version__ DATASET_FOLDER="/workspace/dataset/super_resolution/"
true
true
f74b0a8ae9b1ba1e6dd77fb2dcab8c216ffcdec8
2,035
py
Python
scripts/examples/Arduino/Nicla-Vision/06-Video-Recording/mjpeg_on_movement.py
BreederBai/openmv
cb1a97198533dd1201ba8356d1c2f3835b48a347
[ "MIT" ]
null
null
null
scripts/examples/Arduino/Nicla-Vision/06-Video-Recording/mjpeg_on_movement.py
BreederBai/openmv
cb1a97198533dd1201ba8356d1c2f3835b48a347
[ "MIT" ]
3
2022-03-14T07:15:42.000Z
2022-03-31T02:52:21.000Z
scripts/examples/Arduino/Nicla-Vision/06-Video-Recording/mjpeg_on_movement.py
BreederBai/openmv
cb1a97198533dd1201ba8356d1c2f3835b48a347
[ "MIT" ]
null
null
null
# MJPEG Video Recording on Movement Example # # Note: You will need an SD card to run this example. # # You can use your OpenMV Cam to record mjpeg files. You can either feed the # recorder object JPEG frames or RGB565/Grayscale frames. Once you've finished # recording a Mjpeg file you can use VLC to play it. If you ar...
34.491525
79
0.682064
# recording a Mjpeg file you can use VLC to play it. If you are on Ubuntu then # the built-in video player will work too. # # This example demonstrates using frame differencing with your OpenMV Cam to do # motion detection. After motion is detected your OpenMV Cam will take video. import sensor, image, time, mjp...
true
true
f74b0aeaab33267bdc8912bf804c672ecf3071a1
2,500
py
Python
ppdet/modeling/tests/test_architectures.py
wanghaoshuang/PaddleDetection
d2829c5e6da5943e509f454b99407c2a55a28807
[ "Apache-2.0" ]
null
null
null
ppdet/modeling/tests/test_architectures.py
wanghaoshuang/PaddleDetection
d2829c5e6da5943e509f454b99407c2a55a28807
[ "Apache-2.0" ]
null
null
null
ppdet/modeling/tests/test_architectures.py
wanghaoshuang/PaddleDetection
d2829c5e6da5943e509f454b99407c2a55a28807
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
30.487805
74
0.7236
from __future__ import absolute_import from __future__ import division from __future__ import print_function import unittest import numpy as np import paddle.fluid as fluid from ppdet.modeling.tests.decorator_helper import prog_scope from ppdet.core.workspace import load_config, merge_config, create fr...
true
true
f74b0b782c96f421425459bf43cdace6b8b648ab
482
py
Python
losses/__init__.py
woailaosang/NeuronBlocks
a0f87ff312cce2c0af84ecf24f5c764119846537
[ "MIT" ]
1,257
2019-05-06T21:25:16.000Z
2022-03-19T11:06:49.000Z
losses/__init__.py
heavenAsk/NeuronBlocks
9b08bb8ac7ceca874c8f2541d610bc8d3278fb22
[ "MIT" ]
37
2019-05-07T00:16:13.000Z
2021-12-31T11:55:44.000Z
losses/__init__.py
heavenAsk/NeuronBlocks
9b08bb8ac7ceca874c8f2541d610bc8d3278fb22
[ "MIT" ]
186
2019-05-07T00:36:40.000Z
2022-02-28T20:47:19.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. from .FocalLoss import FocalLoss from .CRFLoss import CRFLoss from .Loss import Loss from torch.nn import CrossEntropyLoss, L1Loss, MSELoss, NLLLoss, PoissonNLLLoss, NLLLoss2d, KLDivLoss, BCELoss, BCEWithLogitsLoss, MarginRank...
80.333333
303
0.846473
from .FocalLoss import FocalLoss from .CRFLoss import CRFLoss from .Loss import Loss from torch.nn import CrossEntropyLoss, L1Loss, MSELoss, NLLLoss, PoissonNLLLoss, NLLLoss2d, KLDivLoss, BCELoss, BCEWithLogitsLoss, MarginRankingLoss, HingeEmbeddingLoss, MultiLabelMarginLoss, SmoothL1Loss, SoftMarginLoss, MultiLabelS...
true
true
f74b0c2d441656e46d366a9c1da3ffd5bd74fe31
2,702
py
Python
commodore/postprocess/builtin_filters.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
39
2019-12-17T13:40:19.000Z
2021-12-31T08:22:52.000Z
commodore/postprocess/builtin_filters.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
161
2020-02-14T18:32:49.000Z
2022-03-25T09:23:35.000Z
commodore/postprocess/builtin_filters.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
12
2019-12-18T15:43:09.000Z
2021-06-28T11:51:59.000Z
import json from pathlib import Path as P from typing import Dict import _jsonnet import click from commodore import __install_dir__ from commodore.config import Config from commodore.component import Component from .jsonnet import jsonnet_runner def _output_dir(work_dir: P, instance: str, path): """Compute d...
29.369565
86
0.698742
import json from pathlib import Path as P from typing import Dict import _jsonnet import click from commodore import __install_dir__ from commodore.config import Config from commodore.component import Component from .jsonnet import jsonnet_runner def _output_dir(work_dir: P, instance: str, path): return work_...
true
true
f74b0c6c8b3a8f2abd2dd089c2721d6b94d0c3cd
2,511
py
Python
app/framework/tagger_framework/utils/io_fs.py
kislerdm/nlp_pos_demo
cea5a0432e3fc0a626f090d40a28e084e3243efc
[ "MIT" ]
null
null
null
app/framework/tagger_framework/utils/io_fs.py
kislerdm/nlp_pos_demo
cea5a0432e3fc0a626f090d40a28e084e3243efc
[ "MIT" ]
null
null
null
app/framework/tagger_framework/utils/io_fs.py
kislerdm/nlp_pos_demo
cea5a0432e3fc0a626f090d40a28e084e3243efc
[ "MIT" ]
null
null
null
# Dmitry Kisler © 2020-present # www.dkisler.com from gzip import open as gzip_open from typing import Tuple, Union, Any import pickle import json def corpus_reader(path: str, from_memory: bool = False) -> Union[Tuple[str, None], Tuple[None, st...
24.861386
87
0.548387
from gzip import open as gzip_open from typing import Tuple, Union, Any import pickle import json def corpus_reader(path: str, from_memory: bool = False) -> Union[Tuple[str, None], Tuple[None, str]]: try: if from_memory: ...
true
true
f74b0fdd58d678193b34ab06c161ac71bd194ed6
454
py
Python
part2/09.py
jbaltop/57_Challenges
fa66ac584fc02761803fbd5692b737a73bd57983
[ "MIT" ]
31
2017-10-08T15:57:07.000Z
2021-06-16T11:55:05.000Z
part2/09.py
jbaltop/57_Challenges
fa66ac584fc02761803fbd5692b737a73bd57983
[ "MIT" ]
1
2021-04-30T20:39:01.000Z
2021-04-30T20:39:01.000Z
part2/09.py
jbaltop/57_Challenges
fa66ac584fc02761803fbd5692b737a73bd57983
[ "MIT" ]
7
2017-10-16T17:13:36.000Z
2019-07-03T16:24:01.000Z
import math def main(): length = float(input("ceiling length(m): ")) width = float(input("ceiling width(m): ")) liter_per_square_meter = 9 area = length * width amount_of_paint = math.ceil(area / liter_per_square_meter) result = ( "\nYou will need to purchase " + str(amount_o...
18.916667
62
0.577093
import math def main(): length = float(input("ceiling length(m): ")) width = float(input("ceiling width(m): ")) liter_per_square_meter = 9 area = length * width amount_of_paint = math.ceil(area / liter_per_square_meter) result = ( "\nYou will need to purchase " + str(amount_o...
true
true
f74b1045b6fda18ee3725eb261814830a669b2f8
923,828
py
Python
Lib/site-packages/phonenumbers/geodata/data19.py
MasterVictor/Portafolio
4bd59d19de41fbea5317d4f2b9e6219ea0359945
[ "bzip2-1.0.6" ]
3
2020-08-03T18:28:24.000Z
2021-09-07T02:59:29.000Z
Lib/site-packages/phonenumbers/geodata/data19.py
MasterVictor/Portafolio
4bd59d19de41fbea5317d4f2b9e6219ea0359945
[ "bzip2-1.0.6" ]
12
2020-06-05T23:59:38.000Z
2022-03-12T00:02:08.000Z
Lib/site-packages/phonenumbers/geodata/data19.py
PsychedVic/Portafolio
4bd59d19de41fbea5317d4f2b9e6219ea0359945
[ "bzip2-1.0.6" ]
2
2018-02-09T13:52:15.000Z
2019-09-10T08:36:25.000Z
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2019 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
92.170807
139
0.649016
from ..util import u data = { '861569748':{'en': 'Changsha, Hunan', 'zh': u('\u6e56\u5357\u7701\u957f\u6c99\u5e02')}, '861569749':{'en': 'Changsha, Hunan', 'zh': u('\u6e56\u5357\u7701\u957f\u6c99\u5e02')}, '861569750':{'en': 'Jiangmen, Guangdong', 'zh': u('\u5e7f\u4e1c\u7701\u6c5f\u95e8\u5e02')}, '86...
true
true
f74b109902b364bd120d13eac8652d67a3a8166e
401
py
Python
brown/core/pen_cap_style.py
craigvear/school_improv_bot
a7efafb145ab7a07fc708204e6806d641e1b0ed4
[ "MIT" ]
null
null
null
brown/core/pen_cap_style.py
craigvear/school_improv_bot
a7efafb145ab7a07fc708204e6806d641e1b0ed4
[ "MIT" ]
null
null
null
brown/core/pen_cap_style.py
craigvear/school_improv_bot
a7efafb145ab7a07fc708204e6806d641e1b0ed4
[ "MIT" ]
null
null
null
from enum import Enum class PenCapStyle(Enum): """Styles controlling how pen strokes are capped. See also http://doc.qt.io/qt-5.9/qt.html#PenCapStyle-enum """ SQUARE = 0x10 """A square cap that extends beyond the end point by half the pen width""" FLAT = 0x00 """A square cap that does ...
21.105263
78
0.645885
from enum import Enum class PenCapStyle(Enum): SQUARE = 0x10 FLAT = 0x00 ROUND = 0x20
true
true
f74b10be6ffda7c4ad24b70a34243b2c7c0f5216
4,862
py
Python
load_dataset.py
while0l1/ranzcr2020
64edbcbe638e7d52cd831e9edd40c72e96a7e3a0
[ "Apache-2.0" ]
null
null
null
load_dataset.py
while0l1/ranzcr2020
64edbcbe638e7d52cd831e9edd40c72e96a7e3a0
[ "Apache-2.0" ]
null
null
null
load_dataset.py
while0l1/ranzcr2020
64edbcbe638e7d52cd831e9edd40c72e96a7e3a0
[ "Apache-2.0" ]
null
null
null
from sklearn.model_selection import GroupKFold import pandas as pd import cv2 import os import numpy as np import ast import torch import albumentations from config import CFG from torch.utils.data import DataLoader class RanzcrDataset(object): def __init__(self, root, df, mode='test', transforms=None, train_anno=...
40.857143
147
0.659194
from sklearn.model_selection import GroupKFold import pandas as pd import cv2 import os import numpy as np import ast import torch import albumentations from config import CFG from torch.utils.data import DataLoader class RanzcrDataset(object): def __init__(self, root, df, mode='test', transforms=None, train_anno=...
true
true
f74b127e0db6db250e80cf7ec0c660d559712212
878
py
Python
Collect/GEOS/daily.py
TimHessels/watertools
77bb412a72f068d255d614f4f8a8f2cfb7d78a26
[ "Apache-2.0" ]
3
2021-01-26T11:21:31.000Z
2021-12-31T21:28:18.000Z
Collect/GEOS/daily.py
TimHessels/watertools
77bb412a72f068d255d614f4f8a8f2cfb7d78a26
[ "Apache-2.0" ]
null
null
null
Collect/GEOS/daily.py
TimHessels/watertools
77bb412a72f068d255d614f4f8a8f2cfb7d78a26
[ "Apache-2.0" ]
4
2019-01-02T06:45:55.000Z
2021-06-30T11:51:38.000Z
# -*- coding: utf-8 -*- import sys from watertools.Collect.GEOS.DataAccess import DownloadData def main(Dir, Vars, Startdate, Enddate, latlim, lonlim, Waitbar = 1, data_type = ["mean"]): """ This function downloads GEOS daily data for a given variable, time interval, and spatial extent. Keyword argum...
29.266667
106
0.61959
import sys from watertools.Collect.GEOS.DataAccess import DownloadData def main(Dir, Vars, Startdate, Enddate, latlim, lonlim, Waitbar = 1, data_type = ["mean"]): for Var in Vars: if Waitbar == 1: print('\nDownloading daily GEOS %s data for the period %s till %s' %(Var, Startdate, Enddate)) ...
true
true
f74b13546f85886d0247dc442c38a9fa2f09ac8f
379
py
Python
tests/system/microscopebeat.py
sujith-attinad/microscopebeat
36f84d11e54e55b0e7e78cf7d4cf083c4b2de1fd
[ "Apache-2.0" ]
null
null
null
tests/system/microscopebeat.py
sujith-attinad/microscopebeat
36f84d11e54e55b0e7e78cf7d4cf083c4b2de1fd
[ "Apache-2.0" ]
null
null
null
tests/system/microscopebeat.py
sujith-attinad/microscopebeat
36f84d11e54e55b0e7e78cf7d4cf083c4b2de1fd
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.append('../../vendor/github.com/elastic/beats/libbeat/tests/system') from beat.beat import TestCase class BaseTest(TestCase): @classmethod def setUpClass(self): self.beat_name = "microscopebeat" self.beat_path = os.path.abspath(os.path.join(os.path.dirname(__file...
27.071429
91
0.688654
import os import sys sys.path.append('../../vendor/github.com/elastic/beats/libbeat/tests/system') from beat.beat import TestCase class BaseTest(TestCase): @classmethod def setUpClass(self): self.beat_name = "microscopebeat" self.beat_path = os.path.abspath(os.path.join(os.path.dirname(__file...
true
true
f74b13d76414659c5ac0a9511f339fc6190308e4
1,148
py
Python
json_loader.py
alsachai/droidbot
f0e955ea3b991d7b7bbbe1ddaabafec6e4a6a966
[ "MIT" ]
null
null
null
json_loader.py
alsachai/droidbot
f0e955ea3b991d7b7bbbe1ddaabafec6e4a6a966
[ "MIT" ]
null
null
null
json_loader.py
alsachai/droidbot
f0e955ea3b991d7b7bbbe1ddaabafec6e4a6a966
[ "MIT" ]
null
null
null
import json import os count=1 output_path = "output.json" file_path = "events" files = os.listdir(file_path) files.sort() for file in files: json_path = file_path + "/" + file try: with open(json_path,'r') as fr: data = json.load(fr) fr.close() action = "evebt" + data["...
30.210526
109
0.516551
import json import os count=1 output_path = "output.json" file_path = "events" files = os.listdir(file_path) files.sort() for file in files: json_path = file_path + "/" + file try: with open(json_path,'r') as fr: data = json.load(fr) fr.close() action = "evebt" + data["...
true
true
f74b13d9b5007cbd4805274e781a110f793ced2d
1,749
py
Python
avatar_pose_controls/handctrl_gestures/__f.py
traductor-lsch-uach/chilean_sign_language_speller
125d542cb68ebd4d6bb06ea3cc2f6dd482dfdbda
[ "MIT" ]
1
2020-08-05T00:53:48.000Z
2020-08-05T00:53:48.000Z
avatar_pose_controls/handctrl_gestures/__f.py
traductor-lsch-uach/chilean_sign_language_speller
125d542cb68ebd4d6bb06ea3cc2f6dd482dfdbda
[ "MIT" ]
null
null
null
avatar_pose_controls/handctrl_gestures/__f.py
traductor-lsch-uach/chilean_sign_language_speller
125d542cb68ebd4d6bb06ea3cc2f6dd482dfdbda
[ "MIT" ]
null
null
null
import bpy import sys sys.path.append("/home/vpoblete/yetzabethg/New Folder/") #DIRECTORIO CON CÓDIGOS DE CONTROL import handctrl as hc def detRF(f,m,r): #mov dedos especificos y1='thumb.01.R' y2='f_index.01.R' y3='f_middle.01.R' y4='f_ring.01.R' y5='f_pinky.01.R' if f==0: ...
24.633803
120
0.524871
import bpy import sys sys.path.append("/home/vpoblete/yetzabethg/New Folder/") import handctrl as hc def detRF(f,m,r): y1='thumb.01.R' y2='f_index.01.R' y3='f_middle.01.R' y4='f_ring.01.R' y5='f_pinky.01.R' if f==0: m=0 r=0 elif f==1: d=bpy.cont...
true
true
f74b148c476b31884b30ef1a1873cb3e00aaeab5
26,133
py
Python
leo/plugins/qt_main.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
1,550
2015-01-14T16:30:37.000Z
2022-03-31T08:55:58.000Z
leo/plugins/qt_main.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
2,009
2015-01-13T16:28:52.000Z
2022-03-31T18:21:48.000Z
leo/plugins/qt_main.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
200
2015-01-05T15:07:41.000Z
2022-03-07T17:05:01.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_main.ui' # # Created: Fri Apr 24 13:52:17 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWindow)...
67.179949
168
0.743772
from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(691, 635) MainWindow.setDockNestingEnabled(False) MainWindow.setDockOptions(QtGui.QMainWindow.AllowTabbedDocks | QtGui.QMainWind...
true
true
f74b15c9868b4df52ebe7aa7f6b375ca0a0936f3
2,609
py
Python
UMLRT2Kiltera_MM/graph_Model_T.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
UMLRT2Kiltera_MM/graph_Model_T.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
UMLRT2Kiltera_MM/graph_Model_T.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
""" __graph_Model_T.py___________________________________________________________ Automatically generated graphical appearance ---> MODIFY DIRECTLY WITH CAUTION _____________________________________________________________________________ """ import tkFont from graphEntity import * from GraphicalForm import * f...
41.412698
203
0.656573
import tkFont from graphEntity import * from GraphicalForm import * from ATOM3Constraint import * class graph_Model_T(graphEntity): def __init__(self, x, y, semObject = None): self.semanticObject = semObject self.sizeX, self.sizeY = 173, 91 graphEntity.__init__(self, x, y) s...
true
true
f74b17969c843721137ed5f6882d8587fa1642a8
1,643
py
Python
apps/win/powershell/power_shell.py
cassaundra/knausj_talon
18d1449c0840ec0fa462e546fdb8d1fee5ad4c0c
[ "Unlicense" ]
2
2020-12-29T21:04:15.000Z
2021-03-02T14:30:38.000Z
apps/win/powershell/power_shell.py
cassaundra/knausj_talon
18d1449c0840ec0fa462e546fdb8d1fee5ad4c0c
[ "Unlicense" ]
1
2021-03-11T15:00:25.000Z
2021-03-11T15:00:25.000Z
apps/win/powershell/power_shell.py
cassaundra/knausj_talon
18d1449c0840ec0fa462e546fdb8d1fee5ad4c0c
[ "Unlicense" ]
null
null
null
from talon import Context, Module, actions, imgui, settings, ui, app import os ctx = Context() mod = Module() ctx.matches = r""" app: windows_power_shell app: windows_terminal and win.title: /PowerShell/ """ user_path = os.path.expanduser("~") directories_to_remap = {} directories_to_exclude = {} @ctx.action_class...
28.824561
101
0.655508
from talon import Context, Module, actions, imgui, settings, ui, app import os ctx = Context() mod = Module() ctx.matches = r""" app: windows_power_shell app: windows_terminal and win.title: /PowerShell/ """ user_path = os.path.expanduser("~") directories_to_remap = {} directories_to_exclude = {} @ctx.action_class...
true
true
f74b192d9d24e8cbfda40e17715681310e8d2c1e
1,139
py
Python
src/billing/forms.py
Maelstroms38/ecommerce
78b600ee5cfb84c1a5c5b3d7b16f6c1d20908788
[ "MIT" ]
null
null
null
src/billing/forms.py
Maelstroms38/ecommerce
78b600ee5cfb84c1a5c5b3d7b16f6c1d20908788
[ "MIT" ]
null
null
null
src/billing/forms.py
Maelstroms38/ecommerce
78b600ee5cfb84c1a5c5b3d7b16f6c1d20908788
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth import get_user_model from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email2(self): email = self.cleaned_data.get("email") email2...
23.729167
82
0.726953
from django import forms from django.contrib.auth import get_user_model from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email2(self): email = self.cleaned_data.get("email") email2...
true
true
f74b19d08beee9dae92f63e1b3607cad920f0003
1,279
py
Python
dragonfire/deepconv/corpus/lightweightdata.py
ismlkrkmz/Dragonfire
7a5e22bd07ba9734d68fe76ce77d80164d47249e
[ "MIT" ]
1,320
2017-06-20T21:47:35.000Z
2022-03-29T08:53:31.000Z
dragonfire/deepconv/corpus/lightweightdata.py
ismlkrkmz/Dragonfire
7a5e22bd07ba9734d68fe76ce77d80164d47249e
[ "MIT" ]
120
2017-06-21T13:16:40.000Z
2022-03-24T18:12:21.000Z
dragonfire/deepconv/corpus/lightweightdata.py
Allyn69/Dragonfire
4c0e873e0bee3553bf14dfb1dded85e7fa515434
[ "MIT" ]
229
2017-06-21T05:38:43.000Z
2022-03-14T14:03:10.000Z
import os """ Load data from a dataset of simply-formatted data from A to B from B to A from A to B from B to A from A to B === from C to D from D to C from C to D from D to C from C to D from D to C ... `===` lines just separate linear conversations between 2 people. """ class LightweightData: """ """ ...
22.438596
86
0.552776
import os class LightweightData: def __init__(self, lightweightFile): self.CONVERSATION_SEP = "===" self.conversations = [] self.loadLines(lightweightFile + '.txt') def loadLines(self, fileName): linesBuffer = [] with open(fileName, 'r') as f: for line in...
true
true
f74b1a4debef16881b74152eff013915a6f5da94
8,550
py
Python
user_chainload.py
Phidica/sublime-execline
a3c1b76de0c9a420ae73467c28f445b698f7f508
[ "MIT" ]
2
2020-08-28T16:04:37.000Z
2020-08-28T20:06:21.000Z
user_chainload.py
Phidica/sublime-execline
a3c1b76de0c9a420ae73467c28f445b698f7f508
[ "MIT" ]
null
null
null
user_chainload.py
Phidica/sublime-execline
a3c1b76de0c9a420ae73467c28f445b698f7f508
[ "MIT" ]
null
null
null
import logging import os import re import sublime # external dependencies (see dependencies.json) import jsonschema import yaml # pyyaml # This plugin generates a hidden syntax file containing rules for additional # chainloading commands defined by the user. The syntax is stored in the cache # directory to avoid the...
31.090909
109
0.68
import logging import os import re import sublime import jsonschema import yaml userSyntaxName = 'execline-user-chainload.sublime-syntax' pkgName = 'execline' settingsName = 'execline.sublime-settings' mainSyntaxPath = 'Packages/{}/execline.sublime-syntax'.format(pkgName) schemaPath = 'Packages/{}/execline....
true
true
f74b1b0545cd6c36deb693a8d2f598ea78d8a726
11,414
py
Python
tests/ludwig/encoders/test_text_encoders.py
jimthompson5802/ludwig
8a369328a3f839d9cdb3710be315952c7891d7c0
[ "Apache-2.0" ]
null
null
null
tests/ludwig/encoders/test_text_encoders.py
jimthompson5802/ludwig
8a369328a3f839d9cdb3710be315952c7891d7c0
[ "Apache-2.0" ]
null
null
null
tests/ludwig/encoders/test_text_encoders.py
jimthompson5802/ludwig
8a369328a3f839d9cdb3710be315952c7891d7c0
[ "Apache-2.0" ]
null
null
null
import pytest import torch from ludwig.encoders import text_encoders @pytest.mark.parametrize("use_pretrained", [False]) @pytest.mark.parametrize("reduce_output", [None, "sum"]) @pytest.mark.parametrize("max_sequence_length", [20]) def test_albert_encoder(use_pretrained: bool, reduce_output: str, max_sequence_length...
45.656
116
0.758542
import pytest import torch from ludwig.encoders import text_encoders @pytest.mark.parametrize("use_pretrained", [False]) @pytest.mark.parametrize("reduce_output", [None, "sum"]) @pytest.mark.parametrize("max_sequence_length", [20]) def test_albert_encoder(use_pretrained: bool, reduce_output: str, max_sequence_length...
true
true
f74b1be274e2abbf96c7b8b98ffe35da22b14122
8,426
py
Python
Load_FAS_MultiModal.py
ZitongYu/Flex-Modal-FAS
b5aad6aae1737ea5746ee7ae7330eb9893043095
[ "MIT" ]
13
2022-02-16T03:10:10.000Z
2022-03-22T01:56:14.000Z
Load_FAS_MultiModal.py
ZitongYu/Flex-Modal-FAS
b5aad6aae1737ea5746ee7ae7330eb9893043095
[ "MIT" ]
null
null
null
Load_FAS_MultiModal.py
ZitongYu/Flex-Modal-FAS
b5aad6aae1737ea5746ee7ae7330eb9893043095
[ "MIT" ]
1
2022-02-26T12:50:01.000Z
2022-02-26T12:50:01.000Z
from __future__ import print_function, division import os import torch import pandas as pd #from skimage import io, transform import cv2 import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader from torchvision import transforms import pdb import math import os import imgaug.augme...
36.95614
361
0.608118
from __future__ import print_function, division import os import torch import pandas as pd import cv2 import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader from torchvision import transforms import pdb import math import os import imgaug.augmenters as iaa nel=True), ...
true
true
f74b1c058ce400182e207dc481d2d1ae3c6fc3b0
4,346
py
Python
config/environment.py
whitemike889/webcompat.com
db22c512913a1f01c401c6f8419f1795d4a467c2
[ "MIT" ]
1
2019-07-22T22:20:01.000Z
2019-07-22T22:20:01.000Z
config/environment.py
truthiswill/webcompat.com
db22c512913a1f01c401c6f8419f1795d4a467c2
[ "MIT" ]
2
2021-09-08T03:15:45.000Z
2022-01-13T03:47:31.000Z
config/environment.py
whitemike889/webcompat.com
db22c512913a1f01c401c6f8419f1795d4a467c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """Generic configuration for the project.""" import os # Define the appli...
39.87156
78
0.687759
import os BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) DATA_PATH = os.path.join(BASE_DIR, 'data') if not os.path.exists(DATA_PATH): os.makedirs(DATA_PATH) # the PRODUCTION and DEVELOPMENT environment variables are set in uwsgi.conf # on the webcompat server. If they're no...
true
true
f74b1ca758e823debdbb7a5e6c9cb99442fa33c3
12,870
py
Python
gammapy/datasets/flux_points.py
AtreyeeS/gammapy
a3b47c3da08900a833f0360e0374203e054cadfc
[ "BSD-3-Clause" ]
null
null
null
gammapy/datasets/flux_points.py
AtreyeeS/gammapy
a3b47c3da08900a833f0360e0374203e054cadfc
[ "BSD-3-Clause" ]
null
null
null
gammapy/datasets/flux_points.py
AtreyeeS/gammapy
a3b47c3da08900a833f0360e0374203e054cadfc
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import logging import numpy as np from astropy import units as u from astropy.table import Table from astropy.visualization import quantity_support from gammapy.modeling.models import DatasetModels from gammapy.utils.scripts import make_name, make_path fro...
31.856436
91
0.5892
import logging import numpy as np from astropy import units as u from astropy.table import Table from astropy.visualization import quantity_support from gammapy.modeling.models import DatasetModels from gammapy.utils.scripts import make_name, make_path from .core import Dataset from .utils import get_axes log = loggi...
true
true
f74b1cb2339ffe80a18f133956455c3fbc12799c
17,687
py
Python
mbin/controls.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
27
2017-12-11T17:57:44.000Z
2021-04-13T16:42:48.000Z
mbin/controls.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
17
2017-10-31T17:16:55.000Z
2022-02-09T17:32:22.000Z
mbin/controls.py
NeolithEra/mbin
27e9aea4ed67a48cc2d993a0fbd142a651e9ee7b
[ "BSD-3-Clause" ]
4
2017-12-18T12:54:18.000Z
2021-04-13T16:42:59.000Z
import os,sys import optparse import logging from pbcore.io.align.CmpH5IO import CmpH5Reader from pbcore.io import openIndexedAlignmentFile from pbcore.io.BasH5IO import BasH5Reader import glob import numpy as np import logging import shutil import pickle import math import mbin import motif_tools def launch(): opts,...
35.233068
239
0.680217
import os,sys import optparse import logging from pbcore.io.align.CmpH5IO import CmpH5Reader from pbcore.io import openIndexedAlignmentFile from pbcore.io.BasH5IO import BasH5Reader import glob import numpy as np import logging import shutil import pickle import math import mbin import motif_tools def launch(): opts,...
true
true
f74b1da6900c7c340581a39f3aba325c05c63194
21,843
py
Python
plugins/modules/oci_data_safe_target_database_actions.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_data_safe_target_database_actions.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_data_safe_target_database_actions.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
39.499096
159
0.588198
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_data_safe_target_database_actions short_description: Perform actions on ...
true
true
f74b1dc443b7cfd413a954ace9d1424d593e0a4a
3,750
py
Python
src/forms/w_inline_code.py
TuringApp/Turing
787bc0eb15af632e7a7a95fd6848db62e91822ea
[ "MIT" ]
42
2018-05-02T07:07:27.000Z
2022-02-01T19:49:49.000Z
src/forms/w_inline_code.py
TuringApp/Turing
787bc0eb15af632e7a7a95fd6848db62e91822ea
[ "MIT" ]
65
2018-03-08T11:53:13.000Z
2018-09-17T09:00:09.000Z
src/forms/w_inline_code.py
TuringApp/Turing
787bc0eb15af632e7a7a95fd6848db62e91822ea
[ "MIT" ]
8
2018-03-31T16:01:36.000Z
2022-03-06T14:49:24.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'w_inline_code.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_InlineCodeEditor(object): def setupUi(self, InlineCodeEditor)...
48.701299
104
0.7312
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_InlineCodeEditor(object): def setupUi(self, InlineCodeEditor): InlineCodeEditor.setObjectName("InlineCodeEditor") InlineCodeEditor.resize(400, 300) self.verticalLayout = QtWidgets.QVBoxLayout(InlineCodeEditor) self.vertical...
true
true
f74b1dd3c9c1877f382ad9de3cc6b438830e37af
517
py
Python
run.py
y-naka/auto_test
46294b58afa768c7717d5cbff4eb22b3bc294ebd
[ "BSD-3-Clause" ]
null
null
null
run.py
y-naka/auto_test
46294b58afa768c7717d5cbff4eb22b3bc294ebd
[ "BSD-3-Clause" ]
null
null
null
run.py
y-naka/auto_test
46294b58afa768c7717d5cbff4eb22b3bc294ebd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # vim:fileencoding=utf-8 # Author: Shinya Suzuki # Created: 2017-11-16 from application import app from application.models import init_schema, init_data import click @app.cli.command(help="Initialize database") def initdb(): init_schema() init_data({"profile": [{"name": "Takuji Yamada",...
25.85
110
0.700193
from application import app from application.models import init_schema, init_data import click @app.cli.command(help="Initialize database") def initdb(): init_schema() init_data({"profile": [{"name": "Takuji Yamada", "email": "takuji.yamada@example.co.jp", "role": "CTO"}]}) click.echo("Database is in...
true
true
f74b1e73d9dfb63bbf1f48de96b6a3707b1493b5
3,697
py
Python
research/MCNN/model/mcnn_model.py
kishorecbe/Tensorflow-Solutions
a158766633bc20ca4289096e4a5454a9e0d04e51
[ "Apache-2.0" ]
null
null
null
research/MCNN/model/mcnn_model.py
kishorecbe/Tensorflow-Solutions
a158766633bc20ca4289096e4a5454a9e0d04e51
[ "Apache-2.0" ]
null
null
null
research/MCNN/model/mcnn_model.py
kishorecbe/Tensorflow-Solutions
a158766633bc20ca4289096e4a5454a9e0d04e51
[ "Apache-2.0" ]
null
null
null
import multiprocessing import tensorflow as tf from tensorflow.contrib import estimator from tensorflow.contrib import lookup from model import commons __author__ = 'KKishore' head = estimator.binary_classification_head() def parse_csv_row(row): columns = tf.decode_csv(row, record_defaults=commons.HEADER_DEFAU...
38.915789
123
0.724642
import multiprocessing import tensorflow as tf from tensorflow.contrib import estimator from tensorflow.contrib import lookup from model import commons __author__ = 'KKishore' head = estimator.binary_classification_head() def parse_csv_row(row): columns = tf.decode_csv(row, record_defaults=commons.HEADER_DEFAU...
true
true
f74b1f09e1a41773480133e67de1d784f409b474
1,281
py
Python
projects/knock_knock.py
KryoKorpz/Vector
e1a9dd4eec4a03027e66c5acab680dcc4937aa03
[ "MIT" ]
2
2020-11-11T17:37:33.000Z
2020-11-13T02:31:36.000Z
projects/knock_knock.py
KryoKorpz/Vector
e1a9dd4eec4a03027e66c5acab680dcc4937aa03
[ "MIT" ]
null
null
null
projects/knock_knock.py
KryoKorpz/Vector
e1a9dd4eec4a03027e66c5acab680dcc4937aa03
[ "MIT" ]
null
null
null
""" interact with vector to play complete a knock knock joke """ import threading import anki_vector from anki_vector.events import Events from anki_vector.user_intent import UserIntent, UserIntentEvent def main(): def on_user_intent(robot, event_type, event, done): user_intent = UserIntent(event) ...
30.5
76
0.643247
import threading import anki_vector from anki_vector.events import Events from anki_vector.user_intent import UserIntent, UserIntentEvent def main(): def on_user_intent(robot, event_type, event, done): user_intent = UserIntent(event) if user_intent.intent_event is UserIntentEvent.knowledge_quest...
true
true
f74b1f653f60ce49a41b95016e52b06742407e9b
2,178
py
Python
app.py
serig/Jupyter-notebook-with-Flask
f6cc37517e10fcd5de5229fe5264192c578faf5f
[ "MIT" ]
null
null
null
app.py
serig/Jupyter-notebook-with-Flask
f6cc37517e10fcd5de5229fe5264192c578faf5f
[ "MIT" ]
null
null
null
app.py
serig/Jupyter-notebook-with-Flask
f6cc37517e10fcd5de5229fe5264192c578faf5f
[ "MIT" ]
null
null
null
from flask import Flask, render_template # import os app = Flask(__name__) @app.route('/plot/') def plot(): from IPython.core.display import display, HTML from string import Template import pandas as pd import json # d3js = HTML('<script src="d3_jupyter/lib/d3/d3.min.js"></script>')...
38.210526
92
0.600092
from flask import Flask, render_template app = Flask(__name__) @app.route('/plot/') def plot(): from IPython.core.display import display, HTML from string import Template import pandas as pd import json worldmap_data = json.loads(open('data/worldmap.json', 'r').read()) s...
true
true
f74b2073382f2209a645bedc662bd7cb9d12d512
4,926
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_bgp_service_communities_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_bgp_service_communities_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_bgp_service_communities_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.378378
128
0.659968
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse...
true
true
f74b21253dc26612a6dbb4f13dfeebe931775831
1,545
py
Python
src/compas_fab/utilities/filesystem.py
yck011522/compas_fab
db7c8e54184dbbad9be5a818cf7ff814c95cf162
[ "MIT" ]
64
2019-08-07T07:19:06.000Z
2022-03-22T16:48:23.000Z
src/compas_fab/utilities/filesystem.py
yck011522/compas_fab
db7c8e54184dbbad9be5a818cf7ff814c95cf162
[ "MIT" ]
228
2019-07-08T07:55:30.000Z
2022-03-25T16:39:17.000Z
src/compas_fab/utilities/filesystem.py
yck011522/compas_fab
db7c8e54184dbbad9be5a818cf7ff814c95cf162
[ "MIT" ]
18
2019-08-04T16:42:37.000Z
2022-01-12T18:36:06.000Z
import os __all__ = [ 'list_files_in_directory' ] def list_files_in_directory(directory, fullpath=False, extensions=[]): """This function lists just the files in a directory, not sub-directories. Args: directory (str): the directory to search for files. fullpath (:obj:`bool`, optional): ...
33.586957
78
0.58835
import os __all__ = [ 'list_files_in_directory' ] def list_files_in_directory(directory, fullpath=False, extensions=[]): directory = os.path.abspath(directory) files = [] extensions = [".%s" % ext for ext in extensions if ext[0] != "."] for item in os.listdir(directory): item_fullpath = o...
true
true
f74b214fbe5572e4df0f2dd842ce2eebbc701330
22,124
py
Python
cmapPy/pandasGEXpress/tests/python2_tests/test_parse_gctx.py
dblyon/cmapPy
d310d092dbf0a0596448c9bd1f75ffff0bb92f09
[ "BSD-3-Clause" ]
1
2021-07-21T21:33:35.000Z
2021-07-21T21:33:35.000Z
cmapPy/pandasGEXpress/tests/python2_tests/test_parse_gctx.py
dblyon/cmapPy
d310d092dbf0a0596448c9bd1f75ffff0bb92f09
[ "BSD-3-Clause" ]
10
2022-03-14T18:40:45.000Z
2022-03-22T12:45:02.000Z
cmapPy/pandasGEXpress/tests/python2_tests/test_parse_gctx.py
Cellular-Longevity/cmapPy
abd4349f28af6d035f69fe8c399fde7bef8dd635
[ "BSD-3-Clause" ]
null
null
null
import logging import unittest import os import pandas as pd import numpy as np import h5py import pandas.util.testing as pandas_testing import cmapPy.pandasGEXpress.setup_GCToo_logger as setup_logger import cmapPy.pandasGEXpress.GCToo as GCToo import cmapPy.pandasGEXpress.parse_gctx as parse_gctx import cmapPy.pandas...
51.094688
150
0.654086
import logging import unittest import os import pandas as pd import numpy as np import h5py import pandas.util.testing as pandas_testing import cmapPy.pandasGEXpress.setup_GCToo_logger as setup_logger import cmapPy.pandasGEXpress.GCToo as GCToo import cmapPy.pandasGEXpress.parse_gctx as parse_gctx import cmapPy.pandas...
true
true
f74b21dcb399a11c00d706de5d4179127d4b973e
2,250
py
Python
mongo/pergunta1/pergunta1.py
mtctr/engdados-bigdata
25cd9559481015193bf3d82bb4574749677e4a0d
[ "MIT" ]
null
null
null
mongo/pergunta1/pergunta1.py
mtctr/engdados-bigdata
25cd9559481015193bf3d82bb4574749677e4a0d
[ "MIT" ]
null
null
null
mongo/pergunta1/pergunta1.py
mtctr/engdados-bigdata
25cd9559481015193bf3d82bb4574749677e4a0d
[ "MIT" ]
1
2018-08-10T18:43:48.000Z
2018-08-10T18:43:48.000Z
from pyspark.sql import SparkSession as spark #configuração do spark spark.builder.config('spark.jars.packages','org.mongodb.spark:mongo-spark-connector_2.11:2.2.0' ).getOrCreate() #conexão com a collection de candidatos spark_candidatos = spark \ .builder \ .appName("candidatosApp") \ .config("spark.mon...
43.269231
141
0.760444
from pyspark.sql import SparkSession as spark spark.builder.config('spark.jars.packages','org.mongodb.spark:mongo-spark-connector_2.11:2.2.0' ).getOrCreate() spark_candidatos = spark \ .builder \ .appName("candidatosApp") \ .config("spark.mongodb.input.uri", "mongodb://10.7.40.54/eleicoes.candidatos201...
true
true
f74b23112979e8fee31196a028704b9755b2af08
1,951
py
Python
NutritionInfo.py
NoahSaffie/Etekcity-Nutrition-Scale-Batch-Food-Uploader
c2aac7eda3854f19a9bef40910c07bf6ce7e86df
[ "MIT" ]
null
null
null
NutritionInfo.py
NoahSaffie/Etekcity-Nutrition-Scale-Batch-Food-Uploader
c2aac7eda3854f19a9bef40910c07bf6ce7e86df
[ "MIT" ]
1
2019-12-29T17:01:54.000Z
2019-12-29T17:06:16.000Z
NutritionInfo.py
NoahSaffie/Etekcity-Nutrition-Scale-Batch-Food-Uploader
c2aac7eda3854f19a9bef40910c07bf6ce7e86df
[ "MIT" ]
null
null
null
class NutritionInfo: def __init__(self, name, data): self.foodID = data['foodID'] self.allowed_cols = ['foodname', 'image', 'weight', 'weight_unit', 'calories', 'calfromfat', 'totalfat', 'saturatedfat', 'transfat', 'fat_poly', 'fat_mono', 'cholesterol', 'sodium', 'totalcarbs', 'dietaryfiber', 'sugar...
51.342105
425
0.598155
class NutritionInfo: def __init__(self, name, data): self.foodID = data['foodID'] self.allowed_cols = ['foodname', 'image', 'weight', 'weight_unit', 'calories', 'calfromfat', 'totalfat', 'saturatedfat', 'transfat', 'fat_poly', 'fat_mono', 'cholesterol', 'sodium', 'totalcarbs', 'dietaryfiber', 'sugar...
true
true
f74b2331ae6f54a214f05ad65cf9982eab7c2c8c
397
py
Python
tests/internal/network_performance/test_network_performance_high_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/network_performance/test_network_performance_high_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
null
null
null
tests/internal/network_performance/test_network_performance_high_auto.py
frolovv/aws.ec2.compare
582805823492f833d65c0441c4a14dce697c12aa
[ "Apache-2.0" ]
1
2021-12-15T11:58:22.000Z
2021-12-15T11:58:22.000Z
# Testing module network_performance.high import pytest import ec2_compare.internal.network_performance.high def test_get_internal_data_network_performance_high_get_instances_list(): assert len(ec2_compare.internal.network_performance.high.get_instances_list()) > 0 def test_get_internal_data_network_performance_hig...
39.7
84
0.866499
import pytest import ec2_compare.internal.network_performance.high def test_get_internal_data_network_performance_high_get_instances_list(): assert len(ec2_compare.internal.network_performance.high.get_instances_list()) > 0 def test_get_internal_data_network_performance_high_get(): assert len(ec2_compare.interna...
true
true
f74b2341c9e2cd399e67789756799541678379e0
826
py
Python
tests/app/urls.py
ashokdelphia/xff
adaf160929cc08148b744e3745fe9d0e66d08d40
[ "MIT" ]
9
2019-03-01T14:24:12.000Z
2021-04-15T11:45:57.000Z
tests/app/urls.py
ashokdelphia/xff
adaf160929cc08148b744e3745fe9d0e66d08d40
[ "MIT" ]
2
2018-09-03T19:27:00.000Z
2019-01-09T10:16:53.000Z
tests/app/urls.py
ashokdelphia/xff
adaf160929cc08148b744e3745fe9d0e66d08d40
[ "MIT" ]
2
2020-05-07T07:40:12.000Z
2021-11-24T18:00:51.000Z
"""xfftest URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
31.769231
77
0.691283
from django.conf.urls import url from django.contrib import admin from tests.app.views import index urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^health/$', index), url('^$', index), ]
true
true
f74b239ae64f2bce89d72f7c3bee6b9d8968e67f
8,354
py
Python
config.py
dragonlong/DR_blend
7eef0b55b0dcfdc45c740597721d147de3415413
[ "MIT" ]
null
null
null
config.py
dragonlong/DR_blend
7eef0b55b0dcfdc45c740597721d147de3415413
[ "MIT" ]
1
2019-05-04T11:32:30.000Z
2019-05-04T11:32:30.000Z
config.py
dragonlong/DR_blend
7eef0b55b0dcfdc45c740597721d147de3415413
[ "MIT" ]
null
null
null
from datetime import datetime import pprint import os import argparse import numpy as np import torchvision.models as models from utils.util import mkdir from data import FEATURE_DIR mkdir(FEATURE_DIR) class Config(object): def __init__(self, layers, cnf=None): self.layers = layersGlobalPoolLayer ...
58.013889
297
0.646876
from datetime import datetime import pprint import os import argparse import numpy as np import torchvision.models as models from utils.util import mkdir from data import FEATURE_DIR mkdir(FEATURE_DIR) class Config(object): def __init__(self, layers, cnf=None): self.layers = layersGlobalPoolLayer ...
true
true
f74b23abf6614d599940d2f82ff8df5980edce4e
378
py
Python
nmutant_model/retrain_mu_test0.py
asplos2020/DRTest
c3de497142d9b226e518a1a0f95f7350d2f7acd6
[ "MIT" ]
1
2021-04-01T07:31:17.000Z
2021-04-01T07:31:17.000Z
nmutant_model/retrain_mu_test0.py
Justobe/DRTest
85c3c9b2a46cafa7184130f2596c5f9eb3b20bff
[ "MIT" ]
null
null
null
nmutant_model/retrain_mu_test0.py
Justobe/DRTest
85c3c9b2a46cafa7184130f2596c5f9eb3b20bff
[ "MIT" ]
1
2020-12-24T12:12:54.000Z
2020-12-24T12:12:54.000Z
import os import numpy as np import sys sys.path.append("../") for model in ['lenet1', 'lenet4', 'lenet5']: for attack in ['fgsm', 'cw', 'jsma']: for mu_var in ['gf', 'nai', 'ns', 'ws']: os.system('CUDA_VISIBLE_DEVICES=0 python retrain_mu_mnist.py --datasets=mnist --attack=' + attack + ' --mode...
42
178
0.600529
import os import numpy as np import sys sys.path.append("../") for model in ['lenet1', 'lenet4', 'lenet5']: for attack in ['fgsm', 'cw', 'jsma']: for mu_var in ['gf', 'nai', 'ns', 'ws']: os.system('CUDA_VISIBLE_DEVICES=0 python retrain_mu_mnist.py --datasets=mnist --attack=' + attack + ' --mode...
true
true
f74b247c7d0cf210e3fe2b19242820adf88f13ab
1,808
py
Python
fixture/projects.py
AndreevaAnastasiya/py_training_mantis
3602ddceb6fd531b5cebe881495ccf7e25e34110
[ "Apache-2.0" ]
null
null
null
fixture/projects.py
AndreevaAnastasiya/py_training_mantis
3602ddceb6fd531b5cebe881495ccf7e25e34110
[ "Apache-2.0" ]
null
null
null
fixture/projects.py
AndreevaAnastasiya/py_training_mantis
3602ddceb6fd531b5cebe881495ccf7e25e34110
[ "Apache-2.0" ]
null
null
null
from models.project import Project import time class ProjectHelper: def __init__(self, app): self.app = app def open_projects_page(self): dw = self.app.dw if not dw.current_url.endswith("/manage_proj_page.php"): dw.find_element_by_link_text("Manage").click() d...
38.468085
80
0.605642
from models.project import Project import time class ProjectHelper: def __init__(self, app): self.app = app def open_projects_page(self): dw = self.app.dw if not dw.current_url.endswith("/manage_proj_page.php"): dw.find_element_by_link_text("Manage").click() d...
true
true
f74b24af987746f13237985ce35f9409eeae6ba7
6,798
py
Python
examples/mnist.py
eifuentes/swae-pytorch
763f771c1d4860f71819af48d4f21a8a29a689d5
[ "MIT" ]
89
2018-06-06T02:14:14.000Z
2022-03-04T17:06:02.000Z
examples/mnist.py
eifuentes/swae-pytorch
763f771c1d4860f71819af48d4f21a8a29a689d5
[ "MIT" ]
5
2018-07-20T16:31:53.000Z
2019-09-05T16:39:37.000Z
examples/mnist.py
eifuentes/swae-pytorch
763f771c1d4860f71819af48d4f21a8a29a689d5
[ "MIT" ]
13
2018-06-28T01:38:01.000Z
2021-09-14T11:47:13.000Z
import argparse import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import torch import torch.optim as optim import torchvision.utils as vutils from swae.distributions import rand_cirlce2d, rand_ring2d, rand_uniform2d from swae.models.mnist import MNISTAutoencoder from swae.trainer import...
49.985294
134
0.616505
import argparse import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import torch import torch.optim as optim import torchvision.utils as vutils from swae.distributions import rand_cirlce2d, rand_ring2d, rand_uniform2d from swae.models.mnist import MNISTAutoencoder from swae.trainer import...
true
true
f74b256ada195418c8d23491429b2263517f6381
609
py
Python
luz_asm_sim/lib/simlib/peripheral/peripheral.py
eliben/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
135
2015-01-19T07:18:00.000Z
2022-01-10T15:49:44.000Z
luz_asm_sim/lib/simlib/peripheral/peripheral.py
AhmedMounir/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
2
2017-04-02T18:37:34.000Z
2018-08-15T13:25:40.000Z
luz_asm_sim/lib/simlib/peripheral/peripheral.py
AhmedMounir/luz-cpu
680917f975f69e7d3cd32edbcbf79a650cbbead9
[ "Unlicense" ]
24
2015-02-18T02:30:32.000Z
2021-08-22T23:48:01.000Z
# Generic memory-mapped peripheral interface. # # Luz micro-controller simulator # Eli Bendersky (C) 2008-2010 # class Peripheral(object): """ An abstract memory-mapped perhipheral interface. Memory-mapped peripherals are accessed through memory reads and writes. The address given to reads...
29
64
0.684729
class Peripheral(object): def read_mem(self, addr, width): raise NotImplementedError() def write_mem(self, addr, width, data): raise NotImplementedError()
true
true
f74b25adb552ff2de98cf2fece970a6cbee1cdf3
1,384
py
Python
backend/server/routes/api/v1/discord/guilds/channels/all.py
NezzarClp/Tosurnament
7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2
[ "MIT" ]
null
null
null
backend/server/routes/api/v1/discord/guilds/channels/all.py
NezzarClp/Tosurnament
7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2
[ "MIT" ]
null
null
null
backend/server/routes/api/v1/discord/guilds/channels/all.py
NezzarClp/Tosurnament
7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2
[ "MIT" ]
null
null
null
"""Route to all channels""" import requests from common.config import constants from server import endpoints, errors def get(handler, parameters, url_parameters, *ids_parameters): """GET method""" headers = {"Authorization": "Bot " + constants.BOT_TOKEN} try: r = requests.get(endpoints.DISCORD_GU...
36.421053
117
0.713873
import requests from common.config import constants from server import endpoints, errors def get(handler, parameters, url_parameters, *ids_parameters): headers = {"Authorization": "Bot " + constants.BOT_TOKEN} try: r = requests.get(endpoints.DISCORD_GUILD_CHANNELS.format(*ids_parameters), headers=hea...
true
true
f74b26a31c7f63843b71cd0c4907c2f9a1f87f70
241
py
Python
pyspeckit/spectrum/models/OH.py
migueldvb/pyspeckit
fa7d875da7c684c8f6aaa3ba206ef3ff2e196652
[ "MIT", "BSD-3-Clause" ]
null
null
null
pyspeckit/spectrum/models/OH.py
migueldvb/pyspeckit
fa7d875da7c684c8f6aaa3ba206ef3ff2e196652
[ "MIT", "BSD-3-Clause" ]
null
null
null
pyspeckit/spectrum/models/OH.py
migueldvb/pyspeckit
fa7d875da7c684c8f6aaa3ba206ef3ff2e196652
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" OH line fitter """ import redshiftedgroup freq_dict={ 'OH12':1.61223e9, 'OH11':1.66540e9, 'OH22':1.66736e9, 'OH21':1.72053e9, } OH = redshiftedgroup.redshiftedgroup(freq_dict) OHfitter = OH.fitter OHvheightfitter = OH.vheight_fitter
13.388889
47
0.738589
import redshiftedgroup freq_dict={ 'OH12':1.61223e9, 'OH11':1.66540e9, 'OH22':1.66736e9, 'OH21':1.72053e9, } OH = redshiftedgroup.redshiftedgroup(freq_dict) OHfitter = OH.fitter OHvheightfitter = OH.vheight_fitter
true
true
f74b27bbec593aa9a5b8f518de53c68dc431476f
773
py
Python
data/single_dataset.py
troyliu0105/DeblurGAN
7c072ea6ec26d653029ab4c6d990e8b0f299fef9
[ "BSD-3-Clause" ]
1
2019-07-13T09:21:11.000Z
2019-07-13T09:21:11.000Z
data/single_dataset.py
troyliu0105/DeblurGAN
7c072ea6ec26d653029ab4c6d990e8b0f299fef9
[ "BSD-3-Clause" ]
null
null
null
data/single_dataset.py
troyliu0105/DeblurGAN
7c072ea6ec26d653029ab4c6d990e8b0f299fef9
[ "BSD-3-Clause" ]
null
null
null
import os.path from PIL import Image from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset class SingleDataset(BaseDataset): def initialize(self, opt): self.opt = opt self.root = opt.dataroot self.dir_A = os.path.join(opt.dataroot) s...
22.085714
56
0.655886
import os.path from PIL import Image from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset class SingleDataset(BaseDataset): def initialize(self, opt): self.opt = opt self.root = opt.dataroot self.dir_A = os.path.join(opt.dataroot) s...
true
true
f74b28a4e066464bc1bef7726cacf55bcf8a6df1
162
py
Python
Sum Square Difference.py
GiantWaffleCode/WaffleEuler
b4a6f76e6f3643cf9381224707daf171486d6bff
[ "MIT" ]
null
null
null
Sum Square Difference.py
GiantWaffleCode/WaffleEuler
b4a6f76e6f3643cf9381224707daf171486d6bff
[ "MIT" ]
null
null
null
Sum Square Difference.py
GiantWaffleCode/WaffleEuler
b4a6f76e6f3643cf9381224707daf171486d6bff
[ "MIT" ]
null
null
null
import math sum_squared = 0 squared_sum = 0 for i in range(1, 101): sum_squared += i**2 squared_sum += i print(f"Answer: {squared_sum**2 - sum_squared}")
20.25
48
0.67284
import math sum_squared = 0 squared_sum = 0 for i in range(1, 101): sum_squared += i**2 squared_sum += i print(f"Answer: {squared_sum**2 - sum_squared}")
true
true
f74b2990468e442f8056394f011c6fb4ab35e395
661
py
Python
oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_CG.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
4
2018-10-19T04:36:20.000Z
2020-02-13T16:14:09.000Z
oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_CG.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
5
2020-03-24T16:37:25.000Z
2021-06-10T21:24:54.000Z
upibo-venv/Lib/site-packages/phonenumbers/shortdata/region_CG.py
smbpgroup/upibo
625dcda9f9692c62aeb9fe8f7123a5d407c610ae
[ "BSD-3-Clause" ]
null
null
null
"""Auto-generated file, do not edit by hand. CG metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CG = PhoneMetadata(id='CG', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='11\\d', possible_length=(3,)), toll...
66.1
112
0.782148
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CG = PhoneMetadata(id='CG', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='11\\d', possible_length=(3,)), toll_free=PhoneNumberDesc(national_number_pattern='111', example...
true
true
f74b2999f183d39039dcccb546ec35124fca67ed
890
py
Python
example/settings.py
pancentric/django-fack
a501931917da6cad12dabd0d3bdcfa59e1e232c0
[ "BSD-3-Clause" ]
34
2015-04-07T18:44:41.000Z
2021-12-09T05:26:33.000Z
example/settings.py
pancentric/django-fack
a501931917da6cad12dabd0d3bdcfa59e1e232c0
[ "BSD-3-Clause" ]
6
2016-12-29T19:15:58.000Z
2020-01-22T11:42:01.000Z
example/settings.py
pancentric/django-fack
a501931917da6cad12dabd0d3bdcfa59e1e232c0
[ "BSD-3-Clause" ]
14
2015-03-18T21:06:31.000Z
2021-02-18T16:55:12.000Z
# # A minimal settings file that ought to work out of the box for just about # anyone trying this project. It's deliberately missing most settings to keep # everything simple. # # A real app would have a lot more settings. The only important bit as far as # django-FAQ is concerned is to have `faq` in INSTALLED_APPS. # ...
25.428571
77
0.693258
# everything simple. # # A real app would have a lot more settings. The only important bit as far as # django-FAQ is concerned is to have `faq` in INSTALLED_APPS. # import os PROJECT_DIR = os.path.dirname(__file__) DEBUG = TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends....
true
true
f74b2a6c8533ebc5ac46739c87d271e86377035d
3,768
py
Python
setup.py
laydros/setup.py
16003b0fd17e97d2b9000e3732de906496b840f1
[ "ISC" ]
null
null
null
setup.py
laydros/setup.py
16003b0fd17e97d2b9000e3732de906496b840f1
[ "ISC" ]
null
null
null
setup.py
laydros/setup.py
16003b0fd17e97d2b9000e3732de906496b840f1
[ "ISC" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'mypackage' DESCRIPTION = 'My short descri...
28.545455
86
0.637739
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'mypackage' DESCRIPTION = 'My short description for my project.' URL = 'https://github.com/me/myproject' EMAIL = 'me@example.com' AUTHOR = 'Awesome Soul' REQUIRES_PYTHON = '>=3.6.0' VERSION = No...
true
true
f74b2aa5579c1265187d2c5da61e2ee2862158c1
12,860
py
Python
tool/tv_reference/coco_eval.py
aviadlazar/FLS
03f1ec28adf3b15810ef2c2ac5e024697c3d0bff
[ "Apache-2.0" ]
null
null
null
tool/tv_reference/coco_eval.py
aviadlazar/FLS
03f1ec28adf3b15810ef2c2ac5e024697c3d0bff
[ "Apache-2.0" ]
null
null
null
tool/tv_reference/coco_eval.py
aviadlazar/FLS
03f1ec28adf3b15810ef2c2ac5e024697c3d0bff
[ "Apache-2.0" ]
null
null
null
import json import tempfile import numpy as np import copy import time import torch import torch._six from pycocotools.cocoeval import COCOeval from pycocotools.coco import COCO import pycocotools.mask as mask_util from collections import defaultdict from . import utils class CocoEvaluator(objec...
35.722222
108
0.55
import json import tempfile import numpy as np import copy import time import torch import torch._six from pycocotools.cocoeval import COCOeval from pycocotools.coco import COCO import pycocotools.mask as mask_util from collections import defaultdict from . import utils class CocoEvaluator(objec...
true
true
f74b2b83d8040f21f94d3ad9b8d087a61885741b
395
py
Python
symbols/Env.py
Vipul97/ProgLang
04b0d2c81b7340f423102eee620b36bc05bde8ff
[ "MIT" ]
7
2018-01-07T17:17:02.000Z
2021-10-05T07:02:22.000Z
symbols/Env.py
Vipul97/ProgLang
04b0d2c81b7340f423102eee620b36bc05bde8ff
[ "MIT" ]
null
null
null
symbols/Env.py
Vipul97/ProgLang
04b0d2c81b7340f423102eee620b36bc05bde8ff
[ "MIT" ]
2
2018-01-07T17:19:13.000Z
2020-01-25T14:58:32.000Z
class Env: __table = None _prev = None def __init__(self, n): self.__table = {} self._prev = n def put(self, w, i): self.__table[w] = i def get(self, w): e = self while e is not None: found = e.__table.get(w) if found is not None: ...
16.458333
36
0.460759
class Env: __table = None _prev = None def __init__(self, n): self.__table = {} self._prev = n def put(self, w, i): self.__table[w] = i def get(self, w): e = self while e is not None: found = e.__table.get(w) if found is not None: ...
true
true
f74b2c08cc08e9b4e2dd7c42116d33d7f2c752e9
6,641
py
Python
SimG4CMS/Forward/test/python/minbias_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
SimG4CMS/Forward/test/python/minbias_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
SimG4CMS/Forward/test/python/minbias_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("Sim") process.load("SimG4CMS.Calo.PythiaMinBias_cfi") process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi") process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") process.load("G...
37.519774
119
0.691914
import FWCore.ParameterSet.Config as cms process = cms.Process("Sim") process.load("SimG4CMS.Calo.PythiaMinBias_cfi") process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi") process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") process.load("G...
true
true
f74b2d1ca4171b3f2a856fbebf48b6bd3ddaa0e8
1,140
py
Python
app/path_finder.py
RavioliGitHub/starter-snake-python1
235955a805cee87f5570d4145d7f77f24e4e631b
[ "MIT" ]
1
2021-05-27T06:44:29.000Z
2021-05-27T06:44:29.000Z
app/path_finder.py
RavioliGitHub/starter-snake-python1
235955a805cee87f5570d4145d7f77f24e4e631b
[ "MIT" ]
null
null
null
app/path_finder.py
RavioliGitHub/starter-snake-python1
235955a805cee87f5570d4145d7f77f24e4e631b
[ "MIT" ]
null
null
null
directions = ['up', 'down', 'left', 'right'] def get_air_distance_between_two_points(point1, point2): x1 = point1['x'] y1 = point1['y'] x2 = point2['x'] y2 = point2['y'] distance = pow(pow((x2 - x1), 2) + pow((y2 - y1), 2), 0.5) return distance def not_deadly_location_on_board(goal, deadly_...
26.511628
97
0.639474
directions = ['up', 'down', 'left', 'right'] def get_air_distance_between_two_points(point1, point2): x1 = point1['x'] y1 = point1['y'] x2 = point2['x'] y2 = point2['y'] distance = pow(pow((x2 - x1), 2) + pow((y2 - y1), 2), 0.5) return distance def not_deadly_location_on_board(goal, deadly_...
true
true
f74b2dd5b868e624081b79175e02a54ca431db50
2,652
py
Python
dyndnsc/detector/dns.py
infothrill/python-dyndnsc
7ee6c55b3cca751d7bd7155ac935d4ad13189684
[ "MIT" ]
35
2015-02-13T02:54:49.000Z
2022-03-16T17:03:07.000Z
dyndnsc/detector/dns.py
infothrill/python-dyndnsc
7ee6c55b3cca751d7bd7155ac935d4ad13189684
[ "MIT" ]
121
2015-02-04T15:48:08.000Z
2022-03-27T17:25:58.000Z
dyndnsc/detector/dns.py
infothrill/python-dyndnsc
7ee6c55b3cca751d7bd7155ac935d4ad13189684
[ "MIT" ]
9
2015-04-30T15:48:06.000Z
2018-07-05T12:50:25.000Z
# -*- coding: utf-8 -*- """Module containing logic for dns based detectors.""" import socket import logging from .base import IPDetector, AF_INET, AF_INET6, AF_UNSPEC LOG = logging.getLogger(__name__) def resolve(hostname, family=AF_UNSPEC): """ Resolve hostname to one or more IP addresses through the ope...
31.571429
92
0.644796
import socket import logging from .base import IPDetector, AF_INET, AF_INET6, AF_UNSPEC LOG = logging.getLogger(__name__) def resolve(hostname, family=AF_UNSPEC): af_ok = (AF_INET, AF_INET6) if family != AF_UNSPEC and family not in af_ok: raise ValueError("Invalid family '%s'" % family) ips =...
true
true
f74b2df710849d5b99c4187e36d9c7a22404d67f
1,994
py
Python
avalon/vendor/jsonschema/cli.py
bumpybox/core
5a24640484f19e48dc12682dae979adc6d41dc0b
[ "MIT" ]
168
2017-06-23T15:50:43.000Z
2022-02-27T10:48:45.000Z
avalon/vendor/jsonschema/cli.py
bumpybox/core
5a24640484f19e48dc12682dae979adc6d41dc0b
[ "MIT" ]
366
2017-06-22T08:38:45.000Z
2021-06-19T07:29:06.000Z
avalon/vendor/jsonschema/cli.py
bumpybox/core
5a24640484f19e48dc12682dae979adc6d41dc0b
[ "MIT" ]
42
2017-06-23T15:27:26.000Z
2021-09-29T17:28:18.000Z
from __future__ import absolute_import import argparse import json import sys from ._reflect import namedAny from .validators import validator_for def _namedAnyWithDefault(name): if "." not in name: name = "jsonschema." + name return namedAny(name) def _json_file(path): with open(path) as file:...
27.315068
75
0.674524
from __future__ import absolute_import import argparse import json import sys from ._reflect import namedAny from .validators import validator_for def _namedAnyWithDefault(name): if "." not in name: name = "jsonschema." + name return namedAny(name) def _json_file(path): with open(path) as file:...
true
true
f74b2e194c2f187f8406193ab038e4c01e10ed49
1,480
py
Python
requestslib.py
cbymar/python-prework
b88d1c16bbbaca206caa594ce120defd99f72827
[ "MIT" ]
null
null
null
requestslib.py
cbymar/python-prework
b88d1c16bbbaca206caa594ce120defd99f72827
[ "MIT" ]
null
null
null
requestslib.py
cbymar/python-prework
b88d1c16bbbaca206caa594ce120defd99f72827
[ "MIT" ]
null
null
null
import requests import json r = requests.get("https://xkcd.com/353/") print(r) dir(r) print(r.text) r = requests.get("https://imgs.xkcd.com/comics/python.png") with open("./ignoreland/comic.png", "wb") as f: f.write(r.content) print(r.status_code) print(r.headers) payload = {"page":2, "count": 25} r = requests....
19.733333
74
0.64527
import requests import json r = requests.get("https://xkcd.com/353/") print(r) dir(r) print(r.text) r = requests.get("https://imgs.xkcd.com/comics/python.png") with open("./ignoreland/comic.png", "wb") as f: f.write(r.content) print(r.status_code) print(r.headers) payload = {"page":2, "count": 25} r = requests....
true
true
f74b2e8b78b250261e74d7706b96dd56c0dc8085
330
py
Python
examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/graph_with_config_and_schedule.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/graph_with_config_and_schedule.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/graph_with_config_and_schedule.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from dagster import ScheduleDefinition, job, op @op(config_schema={"param": str}) def do_something(_): ... config = {"solids": {"do_something": {"config": {"param": "some_val"}}}} @job(config=config) def do_it_all(): do_something() do_it_all_schedule = ScheduleDefinition(job=do_it_all, cron_schedule="0 ...
18.333333
81
0.678788
from dagster import ScheduleDefinition, job, op @op(config_schema={"param": str}) def do_something(_): ... config = {"solids": {"do_something": {"config": {"param": "some_val"}}}} @job(config=config) def do_it_all(): do_something() do_it_all_schedule = ScheduleDefinition(job=do_it_all, cron_schedule="0 ...
true
true
f74b2f98a15f199ac60674bb041724ebb5a443a7
560
py
Python
setup_unix.py
jordanosborn/PyCommit
c5ec44623114cebf7db29cd185b0c7ed8bc722b9
[ "MIT" ]
null
null
null
setup_unix.py
jordanosborn/PyCommit
c5ec44623114cebf7db29cd185b0c7ed8bc722b9
[ "MIT" ]
null
null
null
setup_unix.py
jordanosborn/PyCommit
c5ec44623114cebf7db29cd185b0c7ed8bc722b9
[ "MIT" ]
null
null
null
"""Install Pycommit""" import sys from subprocess import call if __name__ == "__main__": call(["git", "pull"]) print("Installing PyCommit.") with open("pycommit.py") as f: d = f.readlines() d = list(map(lambda s: s.replace("<python3_path>", sys.executable), d)) output = "/usr/local/bin/pyc...
26.666667
75
0.582143
import sys from subprocess import call if __name__ == "__main__": call(["git", "pull"]) print("Installing PyCommit.") with open("pycommit.py") as f: d = f.readlines() d = list(map(lambda s: s.replace("<python3_path>", sys.executable), d)) output = "/usr/local/bin/pycommit" with open(ou...
true
true
f74b30ee081571ab75147deb8eed12c565739297
1,240
py
Python
grapher_admin/various_scripts/change_iae_sources.py
stjordanis/owid-importer
4341713d7fa88b41327ea48419ed5785b5cb9faf
[ "MIT" ]
15
2018-12-07T06:11:49.000Z
2022-01-24T03:38:05.000Z
grapher_admin/various_scripts/change_iae_sources.py
stjordanis/owid-importer
4341713d7fa88b41327ea48419ed5785b5cb9faf
[ "MIT" ]
10
2020-04-05T01:08:27.000Z
2022-02-17T23:54:13.000Z
grapher_admin/various_scripts/change_iae_sources.py
stjordanis/owid-importer
4341713d7fa88b41327ea48419ed5785b5cb9faf
[ "MIT" ]
6
2018-11-03T09:14:58.000Z
2021-05-17T21:59:59.000Z
import os import sys sys.path.insert(1, os.path.join(sys.path[0], '../..')) import grapher_admin.wsgi from grapher_admin.models import Source import unidecode import json count = 0 all_sources = Source.objects.all() for each in all_sources: if 'iea.org' in each.description.lower() or 'iea stat' in each.description...
41.333333
129
0.671774
import os import sys sys.path.insert(1, os.path.join(sys.path[0], '../..')) import grapher_admin.wsgi from grapher_admin.models import Source import unidecode import json count = 0 all_sources = Source.objects.all() for each in all_sources: if 'iea.org' in each.description.lower() or 'iea stat' in each.description...
true
true
f74b314fd8b3f70d1ba37773954cf3b5f0e99139
833
py
Python
create_post.py
lk-geimfari/lk-geimfari.github.io
78c29de8dda580fb5e5141cd46efe76ea3acce94
[ "MIT" ]
6
2020-06-15T16:23:24.000Z
2021-11-08T09:27:49.000Z
create_post.py
lk-geimfari/lk-geimfari.github.io
78c29de8dda580fb5e5141cd46efe76ea3acce94
[ "MIT" ]
19
2020-06-21T07:22:50.000Z
2021-07-04T19:10:19.000Z
create_post.py
lk-geimfari/lk-geimfari.github.io
78c29de8dda580fb5e5141cd46efe76ea3acce94
[ "MIT" ]
1
2020-09-27T09:20:15.000Z
2020-09-27T09:20:15.000Z
import datetime today = datetime.datetime.now().strftime('%Y-%m-%d') file_header = """ --- layout: post title: {title} date: {date} preview_img: description: published: false comments: false --- """ def validate_file_name(string: str) -> str: if len(string) < 5: print('Filename must be longer than 5 sym...
20.317073
60
0.596639
import datetime today = datetime.datetime.now().strftime('%Y-%m-%d') file_header = """ --- layout: post title: {title} date: {date} preview_img: description: published: false comments: false --- """ def validate_file_name(string: str) -> str: if len(string) < 5: print('Filename must be longer than 5 sym...
true
true
f74b31902163ef0d829996cdd62a947c385c5b25
91,880
py
Python
BabyBrainSegmentation/BabyBrainSegmentation.py
CSIM-Toolkits/BabyBrain
ff9648e7f3be348bb736adfd32e3c08e7de076d8
[ "Apache-2.0" ]
1
2019-04-25T13:41:13.000Z
2019-04-25T13:41:13.000Z
BabyBrainSegmentation/BabyBrainSegmentation.py
CSIM-Toolkits/BabyBrain
ff9648e7f3be348bb736adfd32e3c08e7de076d8
[ "Apache-2.0" ]
6
2018-01-09T19:20:19.000Z
2018-03-06T18:32:28.000Z
BabyBrainSegmentation/BabyBrainSegmentation.py
CSIM-Toolkits/BabyBrain
ff9648e7f3be348bb736adfd32e3c08e7de076d8
[ "Apache-2.0" ]
null
null
null
import os import multiprocessing import platform import sys import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging import SimpleITK as sitk import sitkUtils from os.path import expanduser # # BabyBrainSegmentation # class BabyBrainSegmentation(ScriptedLoadableModule):...
47.954071
218
0.634643
import os import multiprocessing import platform import sys import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging import SimpleITK as sitk import sitkUtils from os.path import expanduser class BabyBrainSegmentation(ScriptedLoadableModule): def __init__(self, pa...
true
true
f74b320d4c4007e8a563189f5c0c30f8f8ef00c7
548
py
Python
kwoc/config.py
TheLethalCode/kwoc-2017
04bba08decfa541488f7b1c4793e5f4f33bed617
[ "MIT" ]
17
2017-07-27T13:59:52.000Z
2020-02-07T11:36:06.000Z
kwoc/config.py
TheLethalCode/kwoc-2017
04bba08decfa541488f7b1c4793e5f4f33bed617
[ "MIT" ]
87
2017-08-07T18:47:54.000Z
2018-11-08T11:13:25.000Z
kwoc/config.py
TheLethalCode/kwoc-2017
04bba08decfa541488f7b1c4793e5f4f33bed617
[ "MIT" ]
27
2017-08-11T08:10:49.000Z
2021-01-17T10:42:23.000Z
# -*- coding: utf-8 -*- from flask import Flask from flask_session import Session # from . import models TEMPLATE_DIR = '../templates' STATIC_DIR = '../static' APP_SECRET_KEY = 'kwoc' APP_CONFIG_SESSION_TYPE = 'filesystem' APP_DEBUG = True def create_app(): app = Flask(__name__, template_folder=TEMPLATE_DIR,...
19.571429
81
0.720803
from flask import Flask from flask_session import Session TEMPLATE_DIR = '../templates' STATIC_DIR = '../static' APP_SECRET_KEY = 'kwoc' APP_CONFIG_SESSION_TYPE = 'filesystem' APP_DEBUG = True def create_app(): app = Flask(__name__, template_folder=TEMPLATE_DIR, static_folder=STATIC_DIR) app.secret_key...
true
true
f74b334b59f7dba65370c3662a41efb28f52e42b
4,933
py
Python
src/database.py
KirwanElmsly/mindfulness
173ef9375806e6d5046eebfc9aaf0ce3844b924e
[ "MIT" ]
null
null
null
src/database.py
KirwanElmsly/mindfulness
173ef9375806e6d5046eebfc9aaf0ce3844b924e
[ "MIT" ]
null
null
null
src/database.py
KirwanElmsly/mindfulness
173ef9375806e6d5046eebfc9aaf0ce3844b924e
[ "MIT" ]
null
null
null
import logging from collections import namedtuple from contextlib import contextmanager import datetime import psycopg2 as psycopg2 import util @contextmanager def connect_to_database(): # connect logging.info('Connecting to the mindful database') conn = psycopg2.connect(host=util.read_config('postgresq...
34.256944
119
0.634502
import logging from collections import namedtuple from contextlib import contextmanager import datetime import psycopg2 as psycopg2 import util @contextmanager def connect_to_database(): logging.info('Connecting to the mindful database') conn = psycopg2.connect(host=util.read_config('postgresql', 'host...
true
true
f74b33abf61540f34fa5672e5d8e0dabd0402b36
4,377
py
Python
oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/operations.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/operations.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/operations.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.db.backends.base.operations import ( BaseSpatialOperations, ) from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import GeometryField, aggregates from django.db.backends.m...
39.080357
111
0.656614
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.db.backends.base.operations import ( BaseSpatialOperations, ) from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import GeometryField, aggregates from django.db.backends.m...
true
true
f74b35d573a55d5e5d807e6f63998295e6f2ac66
202
py
Python
code_examples/python_with/with_simple.py
emilgaripov/emilgaripov.github.io
b0e4bf353cca894ec0199a73e71dc4f963e559a8
[ "MIT" ]
18
2017-02-19T15:58:54.000Z
2022-02-13T22:15:19.000Z
code_examples/python_with/with_simple.py
emilgaripov/emilgaripov.github.io
b0e4bf353cca894ec0199a73e71dc4f963e559a8
[ "MIT" ]
3
2020-02-26T14:42:54.000Z
2021-09-28T00:32:23.000Z
code_examples/python_with/with_simple.py
emilgaripov/emilgaripov.github.io
b0e4bf353cca894ec0199a73e71dc4f963e559a8
[ "MIT" ]
27
2017-05-03T15:38:41.000Z
2022-02-08T02:53:38.000Z
import contextlib @contextlib.contextmanager def lines(): print('-'*10, 'START', '-'*10) yield print('-'*11, 'END', '-'*11) with lines(): print('inside with block') print('outside')
14.428571
34
0.594059
import contextlib @contextlib.contextmanager def lines(): print('-'*10, 'START', '-'*10) yield print('-'*11, 'END', '-'*11) with lines(): print('inside with block') print('outside')
true
true
f74b37434a98fbe34681863519c87eef6adc7cee
2,153
py
Python
Chapter05/03_empty_recordset/my_library/models/library_book.py
PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition
fb75412e1ff13e1a1b3233f06de425c9df18aca7
[ "MIT" ]
125
2020-11-28T18:00:34.000Z
2022-03-07T17:53:22.000Z
Chapter05/03_empty_recordset/my_library/models/library_book.py
PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition
fb75412e1ff13e1a1b3233f06de425c9df18aca7
[ "MIT" ]
5
2021-02-02T10:03:29.000Z
2022-03-16T07:32:28.000Z
Chapter05/03_empty_recordset/my_library/models/library_book.py
PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition
fb75412e1ff13e1a1b3233f06de425c9df18aca7
[ "MIT" ]
182
2020-11-29T12:07:07.000Z
2022-03-22T04:27:51.000Z
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.exceptions import UserError from odoo.tools.translate import _ class LibraryBook(models.Model): _name = 'library.book' _description = 'Library Book' name = fields.Char('Title', required=True) date_release = fields.Date('Release Dat...
33.123077
111
0.61124
from odoo import models, fields, api from odoo.exceptions import UserError from odoo.tools.translate import _ class LibraryBook(models.Model): _name = 'library.book' _description = 'Library Book' name = fields.Char('Title', required=True) date_release = fields.Date('Release Date') author_ids = fi...
true
true
f74b3764cf78163b7ad69677864d89ef04dcf2b3
7,532
py
Python
PreProcess.py
pedrobalage/SemevalTwitterHybridClassifier2013
73c53ff9235e64091aea045d932d0fd88304e894
[ "RSA-MD" ]
4
2015-12-25T13:29:48.000Z
2020-06-21T02:00:32.000Z
PreProcess.py
pedrobalage/SemevalTwitterHybridClassifier2013
73c53ff9235e64091aea045d932d0fd88304e894
[ "RSA-MD" ]
null
null
null
PreProcess.py
pedrobalage/SemevalTwitterHybridClassifier2013
73c53ff9235e64091aea045d932d0fd88304e894
[ "RSA-MD" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #### #### Author: Pedro Paulo Balage Filho #### Version: 1.0 #### Date: 12/03/13 #### from string import punctuation, letters import re # Requires Pattern library (http://www.clips.ua.ac.be/pages/pattern) from pattern.en import tag from pattern.vector import stem, PO...
38.428571
130
0.31094
:c)' : '&happy', ':>' : '&happy', '=]' : '&happy', '8)' : '&happy', '=)' : '&happy', ':}' : '&happy', ':^)' : '&happy', ':-))' : '&happy', ...
true
true
f74b379b40818a5f15b28f7a41e6c5a683df6609
358
py
Python
check_internet_connection.py
Shourov1702040/hpylearners_Python
aa13010318995af8088a60bff321950ce60c2a9b
[ "MIT" ]
7
2021-10-02T06:46:35.000Z
2022-02-11T01:13:28.000Z
check_internet_connection.py
Mohadeb-Kumar/hpylearners_Python
5f2d2b0a14a357a0a2538196586f34e721ee097f
[ "MIT" ]
null
null
null
check_internet_connection.py
Mohadeb-Kumar/hpylearners_Python
5f2d2b0a14a357a0a2538196586f34e721ee097f
[ "MIT" ]
6
2021-05-11T20:06:23.000Z
2022-02-14T23:31:14.000Z
""" Delta electro code Md Touhid Islam Depertment of CSE, HSTU https://www.facebook.com/Shourov40 """ import urllib.request as urec def check_connection(): host = "http://www.google.com" try: urec.urlopen(host) return True except : return False if check_connection(): print("Connected to a network") else:...
12.344828
34
0.687151
import urllib.request as urec def check_connection(): host = "http://www.google.com" try: urec.urlopen(host) return True except : return False if check_connection(): print("Connected to a network") else: print("No internet")
true
true
f74b3a759526a0b73fe8126b2ca32ab6b36459e1
3,506
py
Python
tests/experimental/test_auth.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
2
2017-02-01T14:22:34.000Z
2017-02-01T19:58:54.000Z
tests/experimental/test_auth.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
3
2018-02-13T20:40:59.000Z
2018-02-13T22:23:41.000Z
tests/experimental/test_auth.py
sjezewski/pypachy
4bc022d0c73140475f9bd0acd5c0e7204609de26
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests admin-related functionality""" import os from contextlib import contextmanager from time import sleep import pytest import python_pachyderm from python_pachyderm.experimental.service import auth_proto, identity_proto from tests import util # bp_to_pb: OidcConfig -> OIDCConfig @pyte...
29.216667
82
0.717627
import os from contextlib import contextmanager from time import sleep import pytest import python_pachyderm from python_pachyderm.experimental.service import auth_proto, identity_proto from tests import util @pytest.fixture def client(): pc = python_pachyderm.experimental.Client() pc.activate_license(...
true
true
f74b3b18fd2b15d66994cf1acde31c569ad25552
249
py
Python
sen_api/utils.py
marcovolpato00/sen-api
01318930576f44fe7e76b6f5d0d7eb76c096a75f
[ "MIT" ]
1
2020-12-02T13:46:00.000Z
2020-12-02T13:46:00.000Z
sen_api/utils.py
marcovolpato00/sen-api
01318930576f44fe7e76b6f5d0d7eb76c096a75f
[ "MIT" ]
2
2020-10-26T15:37:47.000Z
2020-11-09T16:13:49.000Z
sen_api/utils.py
marcovolpato00/sen-api
01318930576f44fe7e76b6f5d0d7eb76c096a75f
[ "MIT" ]
null
null
null
from datetime import datetime def str_to_datetime(str_date) -> datetime: return datetime.strptime(str_date, '%d/%m/%Y') ########################################################################################################################
27.666667
120
0.373494
from datetime import datetime def str_to_datetime(str_date) -> datetime: return datetime.strptime(str_date, '%d/%m/%Y')
true
true
f74b3bf6c9d7f4165da2762a9903bcffe34f47f7
1,345
py
Python
tests/unit/docs/test_subresource.py
vemel/boto3
170ecc64997b1fe28fefd54010d9439dc620fbd4
[ "Apache-2.0" ]
1
2021-02-16T10:01:25.000Z
2021-02-16T10:01:25.000Z
tests/unit/docs/test_subresource.py
vemel/boto3
170ecc64997b1fe28fefd54010d9439dc620fbd4
[ "Apache-2.0" ]
null
null
null
tests/unit/docs/test_subresource.py
vemel/boto3
170ecc64997b1fe28fefd54010d9439dc620fbd4
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
42.03125
74
0.669145
from boto3.docs.subresource import SubResourceDocumenter from tests.unit.docs import BaseDocsTest class TestSubResourceDocumenter(BaseDocsTest): def test_document_sub_resources(self): sub_resource_documentor = SubResourceDocumenter(self.resource) sub_resource_documentor.document_sub_re...
true
true
f74b3c06994b248b963a77c8be82158a0801f72c
4,070
py
Python
traze-client/bots/SNNBot.py
iteratec/SNN-traze-Bot
5c2f5f69851caa4eacb9acb4e77a29111932c22d
[ "MIT" ]
null
null
null
traze-client/bots/SNNBot.py
iteratec/SNN-traze-Bot
5c2f5f69851caa4eacb9acb4e77a29111932c22d
[ "MIT" ]
1
2018-10-29T18:08:17.000Z
2018-10-29T18:08:17.000Z
traze-client/bots/SNNBot.py
iteratec/SNN-traze-Bot
5c2f5f69851caa4eacb9acb4e77a29111932c22d
[ "MIT" ]
null
null
null
import time import random import os, sys import snn.parameters as params from traze.bot import Action, BotBase from traze.client import World from snn.agent import SNNAgent class SNNBot(BotBase): def __init__(self, game, name="SLab-ML Muenchen"): super(SNNBot, self).__init__(game, name) self.agen...
37.685185
197
0.585504
import time import random import os, sys import snn.parameters as params from traze.bot import Action, BotBase from traze.client import World from snn.agent import SNNAgent class SNNBot(BotBase): def __init__(self, game, name="SLab-ML Muenchen"): super(SNNBot, self).__init__(game, name) self.agen...
true
true
f74b3c83ae9a5ad622443324d49e9e2e9b88f60d
1,111
py
Python
gdrive_sync/admin.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
2
2020-08-07T15:55:41.000Z
2021-08-16T18:28:09.000Z
gdrive_sync/admin.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
924
2020-08-10T17:54:19.000Z
2022-03-31T21:15:17.000Z
gdrive_sync/admin.py
mitodl/ocw-studio
949f96ec0647064f8d495ebdd22d66eea7d024a5
[ "BSD-3-Clause" ]
null
null
null
"""Admin for gdrive_sync""" from django.contrib import admin from mitol.common.admin import TimestampedModelAdmin from gdrive_sync.models import DriveApiQueryTracker, DriveFile class DriveApiQueryTrackerAdmin(TimestampedModelAdmin): """DriveApiQueryTracker Admin""" model = DriveApiQueryTracker list_dis...
22.22
68
0.650765
from django.contrib import admin from mitol.common.admin import TimestampedModelAdmin from gdrive_sync.models import DriveApiQueryTracker, DriveFile class DriveApiQueryTrackerAdmin(TimestampedModelAdmin): model = DriveApiQueryTracker list_display = ( "api_call", "last_dt", ) class Dri...
true
true
f74b3d65edfde0ffa3dc3b319e336f7fcfe5afc7
89
py
Python
individually_weekly/donghuawuxiao2017/I.in.py
xsthunder/a
3c30f31c59030d70462b71ef28c5eee19c6eddd6
[ "MIT" ]
1
2018-07-22T04:52:10.000Z
2018-07-22T04:52:10.000Z
individually_weekly/donghuawuxiao2017/I.in.py
xsthunder/a
3c30f31c59030d70462b71ef28c5eee19c6eddd6
[ "MIT" ]
1
2018-08-11T13:29:59.000Z
2018-08-11T13:31:28.000Z
individually_weekly/donghuawuxiao2017/I.in.py
xsthunder/a
3c30f31c59030d70462b71ef28c5eee19c6eddd6
[ "MIT" ]
null
null
null
f = open('I.in','a') f.write('100000 1\n'); for i in range(0,100000): f.write(' 1');
17.8
25
0.539326
f = open('I.in','a') f.write('100000 1\n'); for i in range(0,100000): f.write(' 1');
true
true
f74b3ddeea03a54d12ac085e31a490850eb04981
455
py
Python
data/scripts/templates/object/mobile/shared_dressed_mauler_apprentice.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_dressed_mauler_apprentice.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_dressed_mauler_apprentice.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_mauler_apprentice.iff" result.attribute_template_id = ...
26.764706
71
0.736264
true
true
f74b3deac866aec8a5fc39d7264161954d998927
3,026
py
Python
validator/forms/validation_run.py
s-scherrer/qa4sm
99fa62d5e42e5a2b81c5bad1553c8137fe4259e7
[ "MIT" ]
null
null
null
validator/forms/validation_run.py
s-scherrer/qa4sm
99fa62d5e42e5a2b81c5bad1553c8137fe4259e7
[ "MIT" ]
null
null
null
validator/forms/validation_run.py
s-scherrer/qa4sm
99fa62d5e42e5a2b81c5bad1553c8137fe4259e7
[ "MIT" ]
null
null
null
from datetime import datetime from validator.validation.globals import START_TIME, END_TIME from django.contrib.auth import get_user_model User = get_user_model() import django.forms as forms from validator.forms import YearChoiceField from validator.models import ValidationRun ## See https://simpleisbetterthancomp...
37.825
136
0.643093
from datetime import datetime from validator.validation.globals import START_TIME, END_TIME from django.contrib.auth import get_user_model User = get_user_model() import django.forms as forms from validator.forms import YearChoiceField from validator.models import ValidationRun , 'scaling_method', ...
true
true
f74b40320018d4ded5d88094e2e8b7be20429bce
686
py
Python
tuticfruti_blog/posts/managers.py
tuticfruti/tuticfruti_blog
dd2526cc23d0e571b588b434a4d9e25dd7d82230
[ "BSD-3-Clause" ]
null
null
null
tuticfruti_blog/posts/managers.py
tuticfruti/tuticfruti_blog
dd2526cc23d0e571b588b434a4d9e25dd7d82230
[ "BSD-3-Clause" ]
22
2015-09-28T07:45:35.000Z
2015-10-15T22:07:05.000Z
tuticfruti_blog/posts/managers.py
tuticfruti/tuticfruti_blog
dd2526cc23d0e571b588b434a4d9e25dd7d82230
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.db import models class PostManager(models.Manager): def all_published(self): return self.filter(status_id=self.model.STATUS_PUBLISHED) def all_draft(self): return self.filter(status_id=self.model.STATUS_DRAFT) class CommentManager(models.Manager): def...
25.407407
65
0.720117
from django.db import models class PostManager(models.Manager): def all_published(self): return self.filter(status_id=self.model.STATUS_PUBLISHED) def all_draft(self): return self.filter(status_id=self.model.STATUS_DRAFT) class CommentManager(models.Manager): def all_published(self): ...
true
true
f74b405d31776994ed1cc9ff1485376fcbd203e4
76
py
Python
ABC078/ABC078d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC078/ABC078d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC078/ABC078d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
#ABC078d import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
15.2
28
0.789474
import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
true
true
f74b408edaaecb489ff513dd28862157336e51bb
763
py
Python
kattis/Integer Division.py
jaredliw/python-question-bank
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2021-04-08T07:49:15.000Z
2021-04-08T07:49:15.000Z
kattis/Integer Division.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
null
null
null
kattis/Integer Division.py
jaredliw/leetcode-solutions
9c8c246623d8d171f875700b57772df0afcbdcdf
[ "MIT" ]
1
2022-01-23T02:12:24.000Z
2022-01-23T02:12:24.000Z
# CPU: 0.13 s from collections import Counter # Double for loop does not work: TLE n_nums, divisor = map(int, input().split()) nums = Counter(map(lambda x: int(x) // divisor, input().split())) print(sum(map(lambda x: x * (x - 1) // 2, nums.values()))) # CPU: 0.13 s # n_nums, divisor = map(int, input().split()) # nums...
28.259259
65
0.650066
from collections import Counter n_nums, divisor = map(int, input().split()) nums = Counter(map(lambda x: int(x) // divisor, input().split())) print(sum(map(lambda x: x * (x - 1) // 2, nums.values())))
true
true
f74b41b4e8f6a88ea2c20193284cf43ea502ef1a
383
py
Python
djinstagram/instaapp/migrations/0004_remove_photo_path.py
rocity/dj-instagram
78f97b3fbd465032c1e031048ced5db39d23bdee
[ "Apache-2.0" ]
5
2016-08-05T03:29:09.000Z
2017-10-12T10:11:59.000Z
djinstagram/instaapp/migrations/0004_remove_photo_path.py
rocity/dj-instagram
78f97b3fbd465032c1e031048ced5db39d23bdee
[ "Apache-2.0" ]
null
null
null
djinstagram/instaapp/migrations/0004_remove_photo_path.py
rocity/dj-instagram
78f97b3fbd465032c1e031048ced5db39d23bdee
[ "Apache-2.0" ]
4
2018-10-02T14:00:49.000Z
2021-06-22T15:34:47.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-06-16 01:39 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('instaapp', '0003_photo_image'), ] operations = [ migrations.RemoveField( ...
19.15
47
0.603133
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('instaapp', '0003_photo_image'), ] operations = [ migrations.RemoveField( model_name='photo', name='path', ), ]
true
true
f74b4350a083a52c86c48a0e4e8e9262c97c2069
1,839
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/6_features/numtrees_45/rule_37.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/6_features/numtrees_45/rule_37.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/6_features/numtrees_45/rule_37.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Passanger, obj[1]: Coupon, obj[2]: Education, obj[3]: Occupation, obj[4]: Restaurant20to50, obj[5]: Distance # {"feature": "Occupation", "instances": 23, "metric_value": 0.9656, "depth": 1} if obj[3]<=21: # {"feature": "Passanger", "instances": 21, "metric_value": 0.9183, "depth": 2}...
34.698113
140
0.561175
def findDecision(obj): if obj[3]<=21: if obj[0]>0: if obj[1]<=3: if obj[2]<=2: if obj[4]>0.0: return 'True' elif obj[4]<=0.0: return 'False' else: return 'False' elif obj[2]>2: if obj[4]<=2.0: return 'False' elif obj[4]>2.0: ...
true
true
f74b43c82421c144e884cae63146167746c73284
20,436
py
Python
pyleecan/Classes/LamSlotWind.py
carbon-drive/pyleecan
e89d4fe97f23f6182c19127d2c6a2133614e169d
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/LamSlotWind.py
carbon-drive/pyleecan
e89d4fe97f23f6182c19127d2c6a2133614e169d
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/LamSlotWind.py
carbon-drive/pyleecan
e89d4fe97f23f6182c19127d2c6a2133614e169d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/LamSlotWind.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/LamSlotWind """ from os import linesep from sys import getsizeof f...
33.283388
110
0.605451
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import...
true
true
f74b452ee0b5bb5bd72a67c43b8debc74e4a7304
1,102
py
Python
bfield/python/ex03_plot_loopxyz_magnitude.py
bbw7561135/PlasmaEDU
f0183b3bbe5e3e047699133be6fa5403f7f921ee
[ "MIT" ]
6
2020-08-04T21:51:28.000Z
2021-12-09T22:16:43.000Z
bfield/python/ex03_plot_loopxyz_magnitude.py
bbw7561135/PlasmaEDU
f0183b3bbe5e3e047699133be6fa5403f7f921ee
[ "MIT" ]
3
2020-02-19T16:12:05.000Z
2020-09-21T20:44:16.000Z
bfield/python/ex03_plot_loopxyz_magnitude.py
lcpp-org/PlasmaEDU
aba2a00c04413bdf26c74f9e5c515644a517b728
[ "MIT" ]
5
2020-02-19T16:09:02.000Z
2022-01-31T19:56:00.000Z
################################################################################ # # BFIELD # # Simple example of plot of the magnitude of the magnetic field # produced by a current loop, using its Cartesian components # # ################################################################################ import num...
25.627907
80
0.565336
true
true
f74b46de49169d0c22c7fc1e13680652eb203b52
38
py
Python
steiner/__main__.py
OvechkinDanil/SteinerProblem
0454bc4c449df18acb80897394a7485dca6ff638
[ "MIT" ]
null
null
null
steiner/__main__.py
OvechkinDanil/SteinerProblem
0454bc4c449df18acb80897394a7485dca6ff638
[ "MIT" ]
null
null
null
steiner/__main__.py
OvechkinDanil/SteinerProblem
0454bc4c449df18acb80897394a7485dca6ff638
[ "MIT" ]
1
2021-09-27T18:52:28.000Z
2021-09-27T18:52:28.000Z
from steiner.main import main main()
9.5
29
0.763158
from steiner.main import main main()
true
true
f74b46f9ae8a168fb3ec9806ff7c67f4278480fa
36,051
py
Python
python_modules/dagster/dagster_tests/core_tests/resource_tests/test_resource_definition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-01-31T19:16:29.000Z
2021-01-31T19:16:29.000Z
python_modules/dagster/dagster_tests/core_tests/resource_tests/test_resource_definition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/core_tests/resource_tests/test_resource_definition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
from contextlib import contextmanager from unittest import mock import pytest from dagster import ( DagsterEventType, DagsterInvariantViolationError, DagsterResourceFunctionError, Enum, EnumValue, Field, Int, ModeDefinition, PipelineDefinition, ResourceDefinition, String, ...
27.881671
101
0.645946
from contextlib import contextmanager from unittest import mock import pytest from dagster import ( DagsterEventType, DagsterInvariantViolationError, DagsterResourceFunctionError, Enum, EnumValue, Field, Int, ModeDefinition, PipelineDefinition, ResourceDefinition, String, ...
true
true
f74b46fa501390a2f8f993e5e4e24869fa388cdc
3,345
py
Python
compiler_gym/wrappers/core.py
ibrumar/CompilerGym
ecd1b62a3f072082227910a2a2487d6e06a52d4e
[ "MIT" ]
null
null
null
compiler_gym/wrappers/core.py
ibrumar/CompilerGym
ecd1b62a3f072082227910a2a2487d6e06a52d4e
[ "MIT" ]
null
null
null
compiler_gym/wrappers/core.py
ibrumar/CompilerGym
ecd1b62a3f072082227910a2a2487d6e06a52d4e
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Iterable, Union import gym from compiler_gym.envs import CompilerEnv from compiler_gym.util.gym_type_hints import Observat...
34.132653
80
0.675934
from typing import Iterable, Union import gym from compiler_gym.envs import CompilerEnv from compiler_gym.util.gym_type_hints import ObservationType, StepType class CompilerEnvWrapper(gym.Wrapper): def __init__(self, env: CompilerEnv): super().__init__(env) def reset(self, *args, **kwargs) -> ...
true
true
f74b4972078d61a2956f15b07e7c4fb84b010aa4
496
py
Python
env/lib/python3.8/site-packages/plotly/validators/layout/ternary/domain/_row.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/ternary/domain/_row.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/ternary/domain/_row.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class RowValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="row", parent_name="layout.ternary.domain", **kwargs ): super(RowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
31
78
0.614919
import _plotly_utils.basevalidators class RowValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="row", parent_name="layout.ternary.domain", **kwargs ): super(RowValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
true
true
f74b4a4e658f877e37ad26656950bc25a7bc0eee
1,893
py
Python
tests/components/hardkernel/test_config_flow.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/hardkernel/test_config_flow.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/hardkernel/test_config_flow.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Test the Hardkernel config flow.""" from unittest.mock import patch from homeassistant.components.hardkernel.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_CREATE_ENTRY from tests.common import MockConfigEntry, MockModule, m...
32.084746
85
0.696249
from unittest.mock import patch from homeassistant.components.hardkernel.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_CREATE_ENTRY from tests.common import MockConfigEntry, MockModule, mock_integration async def test_config...
true
true
f74b4a8f31867a40c849036624f250ee474b40ba
2,674
py
Python
angr/analyses/callee_cleanup_finder.py
delia0204/angr
0fd71a73d36b8a6e441634d21bad947c7e5a7def
[ "BSD-2-Clause" ]
1
2021-05-25T21:23:38.000Z
2021-05-25T21:23:38.000Z
angr/analyses/callee_cleanup_finder.py
sch3m4/angr
654350ff4bafdb7df25f2992ba1de00b15282fc0
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/callee_cleanup_finder.py
sch3m4/angr
654350ff4bafdb7df25f2992ba1de00b15282fc0
[ "BSD-2-Clause" ]
1
2022-02-03T20:06:20.000Z
2022-02-03T20:06:20.000Z
from . import Analysis, register_analysis from .. import SIM_PROCEDURES import logging l = logging.getLogger('angr.analyses.callee_cleanup_finder') class CalleeCleanupFinder(Analysis): def __init__(self, starts=None, hook_all=False): self.results = {} if starts is None: starts = [imp....
41.138462
149
0.545999
from . import Analysis, register_analysis from .. import SIM_PROCEDURES import logging l = logging.getLogger('angr.analyses.callee_cleanup_finder') class CalleeCleanupFinder(Analysis): def __init__(self, starts=None, hook_all=False): self.results = {} if starts is None: starts = [imp....
true
true
f74b4b42fe8a050f6fb9558fa10c5d83c9a3f9d0
1,270
py
Python
nhc2_coco/coco_generic.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
7
2022-03-15T19:03:58.000Z
2022-03-31T11:45:11.000Z
nhc2_coco/coco_generic.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
11
2022-03-09T21:02:19.000Z
2022-03-31T19:02:44.000Z
nhc2_coco/coco_generic.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
12
2020-01-15T19:49:55.000Z
2022-03-04T17:20:27.000Z
from .coco_entity import CoCoEntity from .const import KEY_BASICSTATE, VALUE_TRIGGERED, VALUE_ON, KEY_STATUS from .helpers import extract_property_value_from_device class CoCoGeneric(CoCoEntity): @property def is_on(self): return self._is_on def __init__(self, dev, callback_container, client, pr...
36.285714
102
0.720472
from .coco_entity import CoCoEntity from .const import KEY_BASICSTATE, VALUE_TRIGGERED, VALUE_ON, KEY_STATUS from .helpers import extract_property_value_from_device class CoCoGeneric(CoCoEntity): @property def is_on(self): return self._is_on def __init__(self, dev, callback_container, client, pr...
true
true
f74b4c54ee98389baae67aa0c3a2f826f349675c
962
py
Python
pyhaystack/info.py
lixs74/pyhaystack
e5ce87f25fd42fdc3bbeab98a1ea1c673e88cdcb
[ "Apache-2.0" ]
null
null
null
pyhaystack/info.py
lixs74/pyhaystack
e5ce87f25fd42fdc3bbeab98a1ea1c673e88cdcb
[ "Apache-2.0" ]
null
null
null
pyhaystack/info.py
lixs74/pyhaystack
e5ce87f25fd42fdc3bbeab98a1ea1c673e88cdcb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ File : pyhaystackTest.py (2.x) This module allow a connection to a haystack server Feautures provided allow user to fetch data from the server and eventually, to post to it. See http://www.project-haystack.org for more details Project Haystack is an open source initiative to streamline wor...
53.444444
435
0.776507
__author__ = 'Christian Tremblay, Stuart J. Longland, @sudo-Whateverman, Igor' __author_email__ = 'christian.tremblay@servisys.com' __version__ = '0.91.1' __license__ = 'LGPL' __copyright__ = "Christian Tremblay / SERVISYS inc. | Stuart J. Longland / VRT | 2016"
true
true
f74b4c83f122e8a5ba183b39f35b47e7cdf98eb1
2,510
py
Python
models.py
djoker07/facial_keipoint_detection
112564b12330b0b18be8665a70c92c09e3434ce8
[ "MIT" ]
null
null
null
models.py
djoker07/facial_keipoint_detection
112564b12330b0b18be8665a70c92c09e3434ce8
[ "MIT" ]
null
null
null
models.py
djoker07/facial_keipoint_detection
112564b12330b0b18be8665a70c92c09e3434ce8
[ "MIT" ]
null
null
null
## TODO: define the convolutional neural network architecture import torch import torch.nn as nn import torch.nn.functional as F # can use the below import should you choose to initialize the weights of your Net import torch.nn.init as I class Net(nn.Module): def __init__(self): super(Net, self).__init_...
38.615385
153
0.607171
nal as F import torch.nn.init as I class Net(nn.Module): def __init__(self): super(Net, self).__init__() = nn.MaxPool2d(4, 4) self.conv2 = nn.Conv2d(32, 64, 3, padding=1) self.pool2 = nn.MaxPool2d(2, 2) self.conv3 = nn.Conv2d(64, 128, 1) ...
true
true
f74b4d7e94f11965a11549a3b9e38a14f25bac6a
5,410
py
Python
pandas/tests/extension/decimal/test_decimal.py
BranYang/pandas
1033e8b1195d4071253889ada60523832285354c
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-05-12T21:50:27.000Z
2021-05-12T21:50:27.000Z
pandas/tests/extension/decimal/test_decimal.py
BranYang/pandas
1033e8b1195d4071253889ada60523832285354c
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/extension/decimal/test_decimal.py
BranYang/pandas
1033e8b1195d4071253889ada60523832285354c
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
import decimal import numpy as np import pandas as pd import pandas.util.testing as tm import pytest from pandas.tests.extension import base from .array import DecimalDtype, DecimalArray, make_data @pytest.fixture def dtype(): return DecimalDtype() @pytest.fixture def data(): return DecimalArray(make_dat...
27.886598
77
0.648799
import decimal import numpy as np import pandas as pd import pandas.util.testing as tm import pytest from pandas.tests.extension import base from .array import DecimalDtype, DecimalArray, make_data @pytest.fixture def dtype(): return DecimalDtype() @pytest.fixture def data(): return DecimalArray(make_dat...
true
true
f74b4d993a0924840e87803def68d4558bb809a0
2,666
py
Python
Pokemon Identifier/poketype.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
22
2016-12-28T16:14:18.000Z
2019-09-22T16:39:29.000Z
Pokemon Identifier/poketype.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
6
2020-03-24T17:48:55.000Z
2022-03-12T00:04:58.000Z
Pokemon Identifier/poketype.py
sethuiyer/mlhub
6be271c0070a0c0bb90dd92aceb344e7415bb1db
[ "MIT" ]
17
2017-01-17T09:45:14.000Z
2020-04-21T07:19:39.000Z
import pickle import pandas as pd from sklearn.utils import resample from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import LinearSVC import os class PokemonTypeIdentifier(): """ This class identifies the pokemon type of a user given pokemon name. """ def __init__(sel...
49.37037
109
0.60165
import pickle import pandas as pd from sklearn.utils import resample from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import LinearSVC import os class PokemonTypeIdentifier(): def __init__(self): self.isModelLoaded = False self.isFileFound = False if os.path.is...
true
true
f74b4ddae8c36146a7b30742d4689621c726648e
5,383
py
Python
qa/rpc-tests/p2p-instantsend.py
AmirAbrams/dash
2ae1ce4800a22c717b67aea97680bbe1eeffa07b
[ "MIT" ]
4
2020-01-05T01:39:26.000Z
2020-12-04T18:48:25.000Z
qa/rpc-tests/p2p-instantsend.py
AmirAbrams/dash
2ae1ce4800a22c717b67aea97680bbe1eeffa07b
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-instantsend.py
AmirAbrams/dash
2ae1ce4800a22c717b67aea97680bbe1eeffa07b
[ "MIT" ]
3
2019-12-23T18:48:57.000Z
2021-06-19T17:46:42.000Z
#!/usr/bin/env python3 # Copyright (c) 2018 The Dash Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import DashTestFramework from test_frame...
42.054688
124
0.67193
from test_framework.mininode import * from test_framework.test_framework import DashTestFramework from test_framework.util import * from time import * class InstantSendTest(DashTestFramework): def __init__(self): super().__init__(9, 5, fast_dip3_enforcement=True) self.isolated_idx = ...
true
true