hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72912f0f3a8e96ead98134dbd6365fdf2ba8754
24,020
py
Python
validator/tests/test_state_delta_processor/tests.py
suparnadhar/SuparnaGit
bec2704d8b6bc1802523ec26dcb902f59a747a4d
[ "Apache-2.0" ]
1
2017-08-04T10:31:00.000Z
2017-08-04T10:31:00.000Z
validator/tests/test_state_delta_processor/tests.py
suparnadhar/SuparnaGit
bec2704d8b6bc1802523ec26dcb902f59a747a4d
[ "Apache-2.0" ]
null
null
null
validator/tests/test_state_delta_processor/tests.py
suparnadhar/SuparnaGit
bec2704d8b6bc1802523ec26dcb902f59a747a4d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
39.571664
85
0.663863
import unittest from unittest.mock import Mock from sawtooth_validator.database.dict_database import DictDatabase from sawtooth_validator.networking.dispatch import Handler from sawtooth_validator.networking.dispatch import HandlerResult from sawtooth_validator.networking.dispatch import HandlerStatus ...
true
true
f729136de3f0a611238aeb65acbeabe598efccb8
1,388
py
Python
Python/String/The Minion Game/Python3.py
sanskritilakhmani/Hackerrank
500694c1e6888fc657becc2c503fb5860bf39ec7
[ "Apache-2.0" ]
1
2022-02-16T18:37:49.000Z
2022-02-16T18:37:49.000Z
Python/String/The Minion Game/Python3.py
TAFFAHACHRAF/Hackerrank
500694c1e6888fc657becc2c503fb5860bf39ec7
[ "Apache-2.0" ]
null
null
null
Python/String/The Minion Game/Python3.py
TAFFAHACHRAF/Hackerrank
500694c1e6888fc657becc2c503fb5860bf39ec7
[ "Apache-2.0" ]
4
2021-07-18T16:24:02.000Z
2022-02-15T21:42:03.000Z
""" Kevin and Stuart want to play the 'The Minion Game'. Game Rules: Both players are given the same string, S. Both players have to make substrings using the letters of the string S. Stuart has to make words starting with consonants. Kevin has to make words starting with vowels. The game ends when both players have m...
28.326531
76
0.68732
1. def minion_game(string): vowels = 'AEIOU' k,s = 0,0 l =len(string) for i in range(l): if string[i] in vowels: k += (l-i) else: s += (l-i) if k > s: print("Kevin", k) elif k < s: print("Stuart", s) else: print("Draw") if __na...
true
true
f72913cb4fa2ae202b84b187f1e0eb8b2fdba626
3,376
py
Python
survae/transforms/bijections/conv1x1.py
Nintorac/survae_experiments
d68cc25e2604aab08b53617c1f3ffe4716f166c4
[ "MIT" ]
null
null
null
survae/transforms/bijections/conv1x1.py
Nintorac/survae_experiments
d68cc25e2604aab08b53617c1f3ffe4716f166c4
[ "MIT" ]
null
null
null
survae/transforms/bijections/conv1x1.py
Nintorac/survae_experiments
d68cc25e2604aab08b53617c1f3ffe4716f166c4
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from survae.transforms.bijections import Bijection class Conv1x1(Bijection): """ Invertible 1x1 Convolution [1]. The weight matrix is initialized as a random rotation matrix as described in Section 3.2 of [1]. A...
32.461538
106
0.643957
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from survae.transforms.bijections import Bijection class Conv1x1(Bijection): def __init__(self, num_channels, orthogonal_init=True): super(Conv1x1, self).__init__() self.num_channels = num_channels self.w...
true
true
f729144d89ee4319375af6b0e2f57088061d7e52
46,630
py
Python
.venv/lib/python3.8/site-packages/moto/batch/models.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
null
null
null
.venv/lib/python3.8/site-packages/moto/batch/models.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
1
2020-11-19T23:20:04.000Z
2020-11-19T23:20:04.000Z
.venv/lib/python3.8/site-packages/moto/batch/models.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
1
2020-11-22T11:04:01.000Z
2020-11-22T11:04:01.000Z
from __future__ import unicode_literals import re from itertools import cycle import six import datetime import time import uuid import logging import docker import threading import dateutil.parser from boto3 import Session from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.iam import iam_back...
34.69494
131
0.578962
from __future__ import unicode_literals import re from itertools import cycle import six import datetime import time import uuid import logging import docker import threading import dateutil.parser from boto3 import Session from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.iam import iam_back...
true
true
f72915e74f3b40b788a9b11a5ea95e96de60c1e3
3,057
py
Python
dojo/tools/sslscan/parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
1,772
2018-01-22T23:32:15.000Z
2022-03-31T14:49:33.000Z
dojo/tools/sslscan/parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
3,461
2018-01-20T19:12:28.000Z
2022-03-31T17:14:39.000Z
dojo/tools/sslscan/parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
1,173
2018-01-23T07:10:23.000Z
2022-03-31T14:40:43.000Z
import hashlib from xml.dom import NamespaceErr from defusedxml import ElementTree as ET from dojo.models import Endpoint, Finding __author__ = 'dr3dd589' class SslscanParser(object): def get_scan_types(self): return ["Sslscan"] def get_label_for_scan_types(self, scan_type): return scan_t...
41.876712
104
0.47334
import hashlib from xml.dom import NamespaceErr from defusedxml import ElementTree as ET from dojo.models import Endpoint, Finding __author__ = 'dr3dd589' class SslscanParser(object): def get_scan_types(self): return ["Sslscan"] def get_label_for_scan_types(self, scan_type): return scan_t...
true
true
f72917e6502cd6d63523cf16ccbe21e8f8e1821a
2,629
py
Python
numtypes/tests/test_nint32.py
WarrenWeckesser/numtypes
4e46ac4a338ab46eec11cbacf9165827841ea4ff
[ "BSD-2-Clause" ]
1
2020-02-20T15:01:47.000Z
2020-02-20T15:01:47.000Z
numtypes/tests/test_nint32.py
WarrenWeckesser/numtypes
4e46ac4a338ab46eec11cbacf9165827841ea4ff
[ "BSD-2-Clause" ]
1
2020-04-20T13:04:32.000Z
2020-04-20T13:04:32.000Z
numtypes/tests/test_nint32.py
WarrenWeckesser/numtypes
4e46ac4a338ab46eec11cbacf9165827841ea4ff
[ "BSD-2-Clause" ]
1
2020-04-02T09:12:36.000Z
2020-04-02T09:12:36.000Z
import pytest import math import numpy as np from numpy.testing import assert_equal from numtypes import nint32 def test_basic(): x = nint32(3) assert x == 3 assert int(x) == 3 @pytest.mark.parametrize('typ', [np.int8, np.uint8, np.int16, np.uint16, np.int32, np.uint32,...
23.061404
76
0.602891
import pytest import math import numpy as np from numpy.testing import assert_equal from numtypes import nint32 def test_basic(): x = nint32(3) assert x == 3 assert int(x) == 3 @pytest.mark.parametrize('typ', [np.int8, np.uint8, np.int16, np.uint16, np.int32, np.uint32,...
true
true
f72918b6f3095c4287cd002450044959007ad725
8,150
py
Python
contrib/devtools/update-translations.py
ankerid/Anker
a20a6e911c35c480da222e0ed95b673922d8de5d
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
ankerid/Anker
a20a6e911c35c480da222e0ed95b673922d8de5d
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
ankerid/Anker
a20a6e911c35c480da222e0ed95b673922d8de5d
[ "MIT" ]
1
2020-02-21T02:17:00.000Z
2020-02-21T02:17:00.000Z
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
38.625592
124
0.633865
from __future__ import division, print_function import subprocess import re import sys import os import io import xml.etree.ElementTree as ET TX = 'tx' SOURCE_LANG = 'anker_en.ts' LOCALE_DIR = 'src/qt/locale' MIN_NUM_MESSAGES = 10 def check_at_repository_root(): if not os.path.exists('.git'): prin...
true
true
f7291921a34c62df34fba28b8bbc84ec335d54e7
793
py
Python
skrf/io/__init__.py
sdurant/scikit-rf
09161b879c1a52a1bc2e2df89f2656c97136c39b
[ "BSD-3-Clause" ]
null
null
null
skrf/io/__init__.py
sdurant/scikit-rf
09161b879c1a52a1bc2e2df89f2656c97136c39b
[ "BSD-3-Clause" ]
null
null
null
skrf/io/__init__.py
sdurant/scikit-rf
09161b879c1a52a1bc2e2df89f2656c97136c39b
[ "BSD-3-Clause" ]
null
null
null
''' .. module:: skrf.io ======================================== io (:mod:`skrf.io`) ======================================== This Package provides functions and objects for input/output. The general functions :func:`~general.read` and :func:`~general.write` can be used to read and write [almost] any skrf objec...
22.657143
74
0.655738
import general import csv import touchstone from general import * from csv import * from touchstone import *
true
true
f7291933a3cefebf2db62a049c100daa77684ddf
3,116
py
Python
tests/test_folder_layout.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
1
2022-02-15T09:32:28.000Z
2022-02-15T09:32:28.000Z
tests/test_folder_layout.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
null
null
null
tests/test_folder_layout.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
41
108
0.661104
import os import tempfile import unittest from pathlib import Path from parameterized import parameterized from monai.data.folder_layout import FolderLayout TEST_CASES = [ ({"output_dir": ""}, {}, "subject"), ({"output_dir": Path(".")}, {}, "subject"), ({"output_dir": Path(".")}, {"idx": 1}, "...
true
true
f729199ed548f4bc7e583b88a07ec65682e488b1
115
py
Python
AITRexRush/Algorithm_1/readdata.py
2360673637/AIGames
7d149cc2cff8fa626ee1c9e1ad7c39e1a724a5bb
[ "MIT" ]
2
2019-03-23T13:58:34.000Z
2019-03-23T13:59:07.000Z
AITRexRush/Algorithm_1/readdata.py
2360673637/AIGames
7d149cc2cff8fa626ee1c9e1ad7c39e1a724a5bb
[ "MIT" ]
null
null
null
AITRexRush/Algorithm_1/readdata.py
2360673637/AIGames
7d149cc2cff8fa626ee1c9e1ad7c39e1a724a5bb
[ "MIT" ]
1
2018-10-25T07:51:52.000Z
2018-10-25T07:51:52.000Z
import pickle f = open('E:\DQN__T-Rex Rush\data_1\Data_deque_0.pkl', 'rb') data = pickle.load(f) print(len(data))
19.166667
60
0.704348
import pickle f = open('E:\DQN__T-Rex Rush\data_1\Data_deque_0.pkl', 'rb') data = pickle.load(f) print(len(data))
true
true
f7291a292324e1720abca648dec64ace073b2fa8
2,897
py
Python
pandas/tests/util/test_show_versions.py
PApostol/pandas
578e918777f6f512f85a917dc34910df87f63e90
[ "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/util/test_show_versions.py
PApostol/pandas
578e918777f6f512f85a917dc34910df87f63e90
[ "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/util/test_show_versions.py
PApostol/pandas
578e918777f6f512f85a917dc34910df87f63e90
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
import json import os import re import pytest from pandas.compat import ( IS64, is_ci_environment, ) from pandas.util._print_versions import ( _get_dependency_info, _get_sys_info, ) import pandas as pd @pytest.mark.filterwarnings( # openpyxl "ignore:defusedxml.lxml is no longer supported:De...
25.866071
83
0.696583
import json import os import re import pytest from pandas.compat import ( IS64, is_ci_environment, ) from pandas.util._print_versions import ( _get_dependency_info, _get_sys_info, ) import pandas as pd @pytest.mark.filterwarnings( "ignore:defusedxml.lxml is no longer supported:DeprecationW...
true
true
f7291a6cf9e74bacae40b852f118305493e09a49
124
py
Python
src/bot.py
ali-m79/nashenas_telegram_bot
dd84e08f1767e6bd74699f8d05666b14dbadbf2b
[ "MIT" ]
null
null
null
src/bot.py
ali-m79/nashenas_telegram_bot
dd84e08f1767e6bd74699f8d05666b14dbadbf2b
[ "MIT" ]
null
null
null
src/bot.py
ali-m79/nashenas_telegram_bot
dd84e08f1767e6bd74699f8d05666b14dbadbf2b
[ "MIT" ]
null
null
null
import os import telebot # Initialize bot bot = telebot.TeleBot(os.environ["TELEGRAM_BOT_TOKEN"], parse_mode="MARKDOWN")
15.5
78
0.774194
import os import telebot bot = telebot.TeleBot(os.environ["TELEGRAM_BOT_TOKEN"], parse_mode="MARKDOWN")
true
true
f7291aa2570f6404d3f3d99822ef1c95ed97ad81
4,392
py
Python
mask-detection/dwImages.py
danielvicentini/distancebot
4ae2abeec6e29577d5f5c7bf3fdc974e6a187f13
[ "BSD-Source-Code" ]
1
2020-07-23T17:35:10.000Z
2020-07-23T17:35:10.000Z
mask-detection/dwImages.py
danielvicentini/distancebot
4ae2abeec6e29577d5f5c7bf3fdc974e6a187f13
[ "BSD-Source-Code" ]
18
2020-05-31T15:10:37.000Z
2022-03-12T00:42:35.000Z
mask-detection/dwImages.py
danielvicentini/distancebot
4ae2abeec6e29577d5f5c7bf3fdc974e6a187f13
[ "BSD-Source-Code" ]
2
2020-06-02T23:44:15.000Z
2020-07-20T18:19:55.000Z
import meraki, datetime, json, requests, os.path, shutil, time, threading, os, sys from config_meraki import * from video import * from os import path sys.path.append(os.path.abspath('..')) from config_shared import meraki_api_key #Local path to save Images rooting = os.path.abspath(os.getcwd()) + "/mask-detection" ...
36.6
113
0.650956
import meraki, datetime, json, requests, os.path, shutil, time, threading, os, sys from config_meraki import * from video import * from os import path sys.path.append(os.path.abspath('..')) from config_shared import meraki_api_key rooting = os.path.abspath(os.getcwd()) + "/mask-detection" save_path = rooting + "/st...
true
true
f7291bac5121574b1276aaabccdadb5a163284df
205
py
Python
basics/classes_obj/cls_obj.py
m-ymn/Python-Apps
09d1ff8de554902a5fcdc34a868eab31df0c28f7
[ "MIT" ]
1
2020-03-09T18:16:13.000Z
2020-03-09T18:16:13.000Z
basics/classes_obj/cls_obj.py
m-ymn/Python-Apps
09d1ff8de554902a5fcdc34a868eab31df0c28f7
[ "MIT" ]
null
null
null
basics/classes_obj/cls_obj.py
m-ymn/Python-Apps
09d1ff8de554902a5fcdc34a868eab31df0c28f7
[ "MIT" ]
null
null
null
from stu import Student #stu1 = Student("jim", "business", 3.1, False) stu1 = Student("oscar", "accounting", 3.0) stu2 = Student("phylis", "business" , 3.8) print(stu1.name) print(stu1.on_honor_roll())
22.777778
46
0.678049
from stu import Student stu1 = Student("oscar", "accounting", 3.0) stu2 = Student("phylis", "business" , 3.8) print(stu1.name) print(stu1.on_honor_roll())
true
true
f7291cc36a5c46779de6c224706e0344998ab17a
978
py
Python
instance/config.py
kirega/ireporter-ch3
964baf679ab99c657fa37473ee95ca5a93491a0f
[ "MIT" ]
null
null
null
instance/config.py
kirega/ireporter-ch3
964baf679ab99c657fa37473ee95ca5a93491a0f
[ "MIT" ]
null
null
null
instance/config.py
kirega/ireporter-ch3
964baf679ab99c657fa37473ee95ca5a93491a0f
[ "MIT" ]
null
null
null
import os class Config(): DEBUG = False TESTING = False JWT_SECRET_KEY = 'jwt-secret-string' JWT_BLACKLIST_ENABLED = True JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh'] DB_HOST = os.environ.get('DB_HOST') DB_USERNAME = os.environ.get('DB_USERNAME') DB_PASS = os.environ.get('DB_PASS...
25.736842
54
0.687117
import os class Config(): DEBUG = False TESTING = False JWT_SECRET_KEY = 'jwt-secret-string' JWT_BLACKLIST_ENABLED = True JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh'] DB_HOST = os.environ.get('DB_HOST') DB_USERNAME = os.environ.get('DB_USERNAME') DB_PASS = os.environ.get('DB_PASS...
true
true
f7291d2841a5c0c749f073619541e093019aacb9
572
py
Python
Django_Blog/06-User-Registration-Form/django_project/users/views.py
DSNR/snippets
12006dd083be60c6444d8b5ca48fd917005e081b
[ "MIT" ]
null
null
null
Django_Blog/06-User-Registration-Form/django_project/users/views.py
DSNR/snippets
12006dd083be60c6444d8b5ca48fd917005e081b
[ "MIT" ]
null
null
null
Django_Blog/06-User-Registration-Form/django_project/users/views.py
DSNR/snippets
12006dd083be60c6444d8b5ca48fd917005e081b
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.contrib import messages from .forms import UserRegisterForm def register(request): if request.method == 'POST': form = UserRegisterForm(request.POST) if form.is_valid(): form.save() username = form.cleaned_...
33.647059
74
0.636364
from django.shortcuts import render, redirect from django.contrib import messages from .forms import UserRegisterForm def register(request): if request.method == 'POST': form = UserRegisterForm(request.POST) if form.is_valid(): form.save() username = form.cleaned_...
true
true
f7291d66f4ca7ed7e4e1c1771e6ff75f5f820c25
7,145
py
Python
tools/c7n_azure/tests/test_deployment_units.py
scoleri/cloud-custodian
706bc7557bffddaf676ec66bc6518ea175dd0d97
[ "Apache-2.0" ]
null
null
null
tools/c7n_azure/tests/test_deployment_units.py
scoleri/cloud-custodian
706bc7557bffddaf676ec66bc6518ea175dd0d97
[ "Apache-2.0" ]
79
2019-03-20T12:27:06.000Z
2019-08-14T14:07:04.000Z
tools/c7n_azure/tests/test_deployment_units.py
scoleri/cloud-custodian
706bc7557bffddaf676ec66bc6518ea175dd0d97
[ "Apache-2.0" ]
2
2019-04-22T15:20:23.000Z
2019-08-27T12:37:51.000Z
# Copyright 2015-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
40.140449
101
0.645626
from __future__ import absolute_import, division, print_function, unicode_literals from azure_common import BaseTest, requires_arm_polling from c7n_azure import constants from c7n_azure.constants import FUNCTION_DOCKER_VERSION from c7n_azure.functionapp_utils import FunctionAppUtilities from c7n_azu...
true
true
f7291d9a167eddfff3ff0f609ba4999ace509653
3,976
py
Python
metrics/evaluation.py
riokt/video-paragraph
2da3298819e73809af495457db2cf1dfffad712f
[ "MIT" ]
null
null
null
metrics/evaluation.py
riokt/video-paragraph
2da3298819e73809af495457db2cf1dfffad712f
[ "MIT" ]
null
null
null
metrics/evaluation.py
riokt/video-paragraph
2da3298819e73809af495457db2cf1dfffad712f
[ "MIT" ]
null
null
null
from cap_eval.bleu.bleu import Bleu from cap_eval.cider.cider import Cider from cap_eval.meteor.meteor import Meteor import json import numpy as np # initialize the caption evaluators meteor_scorer = Meteor() cider_scorer = Cider() bleu_scorer = Bleu(4) def bleu_eval(refs, cands): print ("calculating bleu_4 score...
30.121212
128
0.613682
from cap_eval.bleu.bleu import Bleu from cap_eval.cider.cider import Cider from cap_eval.meteor.meteor import Meteor import json import numpy as np meteor_scorer = Meteor() cider_scorer = Cider() bleu_scorer = Bleu(4) def bleu_eval(refs, cands): print ("calculating bleu_4 score...") bleu, _ = bleu_scorer.compu...
true
true
f7291dc38b29cc9779071f6ccb58bc60d287e347
15,714
py
Python
BlackboardCrawler.py
ks-paul-lam/cuhk_blackboard_crawler
c03cdd82a7617a6a7441b65ad9b46b0ce15874a4
[ "MIT" ]
null
null
null
BlackboardCrawler.py
ks-paul-lam/cuhk_blackboard_crawler
c03cdd82a7617a6a7441b65ad9b46b0ce15874a4
[ "MIT" ]
null
null
null
BlackboardCrawler.py
ks-paul-lam/cuhk_blackboard_crawler
c03cdd82a7617a6a7441b65ad9b46b0ce15874a4
[ "MIT" ]
null
null
null
import json import time import requests import urllib import re import os from functools import reduce import uuid # in case the error happens from getpass import getpass # import xml.etree.ElementTree as ET # XML parser is not used because the fucking &ndash; import inspect # debugging purpose import string from sys i...
40.709845
247
0.675894
import json import time import requests import urllib import re import os from functools import reduce import uuid from getpass import getpass import inspect import string from sys import platform, stdout from utils import mkdir, directory_flatten class AuthenticationException(Exception): pass class BCFlags(ob...
true
true
f7291ddb80f03e8d4819f187dd1ba8ff24f104f3
573
py
Python
stubs/micropython-v1_9_4-esp8266/ds18x20.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_9_4-esp8266/ds18x20.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_9_4-esp8266/ds18x20.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'ds18x20' on esp8266 v1.9.4 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.9.4-8-ga9a3caad0 on 2018-05-11', machine='ESP module with ESP8266') # Stubber: 1.1.2 - updated from typing import Any class DS18X20: """""" def convert_temp(self, *argv) -> Any...
19.1
156
0.588133
from typing import Any class DS18X20: def convert_temp(self, *argv) -> Any: pass def read_scratch(self, *argv) -> Any: pass def read_temp(self, *argv) -> Any: pass def scan(self, *argv) -> Any: pass def write_scratch(self, *argv) -> Any: pass def co...
true
true
f7291f2084206620bdfb545c8ab1a6dba8553523
2,837
py
Python
eval.py
Noahs-ARK/PaLM
fe943bb0516d80b09f2b56de60dac9c54dc196e6
[ "BSD-3-Clause" ]
7
2020-01-10T06:25:27.000Z
2021-11-27T15:29:45.000Z
eval.py
Noahs-ARK/PaLM
fe943bb0516d80b09f2b56de60dac9c54dc196e6
[ "BSD-3-Clause" ]
null
null
null
eval.py
Noahs-ARK/PaLM
fe943bb0516d80b09f2b56de60dac9c54dc196e6
[ "BSD-3-Clause" ]
null
null
null
import math import numpy as np import torch import data from torch.autograd import Variable from utils import batchify, get_batch, repackage_hidden import argparser args = argparser.args() from utils import Input # Set the random seed manually for reproducibility. np.random.seed(args.seed) torch.manual_seed(args.seed)...
35.911392
116
0.680649
import math import numpy as np import torch import data from torch.autograd import Variable from utils import batchify, get_batch, repackage_hidden import argparser args = argparser.args() from utils import Input np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda...
true
true
f729201b4ab35a0773e4967ea692da05c632a7dc
5,462
py
Python
src/python/pants/util/contextutil.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
src/python/pants/util/contextutil.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
src/python/pants/util/contextutil.py
WamBamBoozle/pants
98cadfa1a5d337146903eb66548cfe955f2627b3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
27.585859
97
0.684182
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shutil import tarfile import tempfile import time import uuid import zipfile from contextlib import closing, contextmanager from six import strin...
true
true
f7292027ef65c83ec2873a3164a3805c28919e50
1,781
py
Python
scapy-space-packets/packets_mm_tlm.py
solar-wine/tools-for-hack-a-sat-2020
8721173953b1649dea1004871269c944ef98eede
[ "BSD-3-Clause" ]
58
2020-09-05T08:24:57.000Z
2022-03-13T16:41:11.000Z
scapy-space-packets/packets_mm_tlm.py
solar-wine/tools-for-hack-a-sat-2020
8721173953b1649dea1004871269c944ef98eede
[ "BSD-3-Clause" ]
null
null
null
scapy-space-packets/packets_mm_tlm.py
solar-wine/tools-for-hack-a-sat-2020
8721173953b1649dea1004871269c944ef98eede
[ "BSD-3-Clause" ]
10
2020-09-05T21:30:49.000Z
2021-12-25T02:11:50.000Z
from scapy.all import * from ccsds_base import CCSDSPacket class MM_HK_TLM_PKT_TlmPkt(Packet): """Housekeeping Packet app = MM command = HK_TLM_PKT msg_id = MM_HK_TLM_MID = 0x0887 = 0x0800 + 0x087 """ name = "MM_HK_TLM_PKT_TlmPkt" fields_desc = [ # APPEND_ITEM CMD_VALID_COUNT 8 U...
37.104167
105
0.617069
from scapy.all import * from ccsds_base import CCSDSPacket class MM_HK_TLM_PKT_TlmPkt(Packet): name = "MM_HK_TLM_PKT_TlmPkt" fields_desc = [ ByteField("CMD_VALID_COUNT", 0), ByteField("CMD_ERROR_COUNT", 0), ByteField("LAST_ACTION", 0), ...
true
true
f72920db43e16615f154b87b7fa2ed4e591ba5f3
12,838
py
Python
vector2d.py
toxicrecker/vector2d.py
56b60c61184f2b055a168c0f56f9962888c83638
[ "MIT" ]
1
2021-11-10T22:38:43.000Z
2021-11-10T22:38:43.000Z
vector2d.py
toxicrecker/vector2d.py
56b60c61184f2b055a168c0f56f9962888c83638
[ "MIT" ]
null
null
null
vector2d.py
toxicrecker/vector2d.py
56b60c61184f2b055a168c0f56f9962888c83638
[ "MIT" ]
1
2022-02-01T22:22:18.000Z
2022-02-01T22:22:18.000Z
import math import random class Vector2D(object): def __init__(self, _x, _y): self.x = _x self.y = _y @staticmethod def UnitRandom(): return Vector2D(random.random(), random.random()) @staticmethod def Zero(): return Vector2D(0,0) @staticmethod ...
30.712919
144
0.513164
import math import random class Vector2D(object): def __init__(self, _x, _y): self.x = _x self.y = _y @staticmethod def UnitRandom(): return Vector2D(random.random(), random.random()) @staticmethod def Zero(): return Vector2D(0,0) @staticmethod ...
true
true
f72924464c612ac97363c1e26965049f77ef29bd
1,157
py
Python
recipes/Python/532903_How_slots_are_implemented/recipe-532903.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/532903_How_slots_are_implemented/recipe-532903.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/532903_How_slots_are_implemented/recipe-532903.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
'Rough approximation of how slots work' class Member(object): 'Descriptor implementing slot lookup' def __init__(self, i): self.i = i def __get__(self, obj, type=None): return obj._slotvalues[self.i] def __set__(self, obj, value): obj._slotvalues[self.i] = value class Type(type...
31.27027
88
0.580812
'Rough approximation of how slots work' class Member(object): 'Descriptor implementing slot lookup' def __init__(self, i): self.i = i def __get__(self, obj, type=None): return obj._slotvalues[self.i] def __set__(self, obj, value): obj._slotvalues[self.i] = value class Type(type...
false
true
f7292608748e855f2440b3c114423a4eb879c8db
3,466
py
Python
src/bos_consensus/network/base.py
LuffyEMonkey/isaac-consensus-protocol
806d967d56ef8862a477b2515c7854af289c10a0
[ "Apache-2.0" ]
1
2018-04-10T11:00:59.000Z
2018-04-10T11:00:59.000Z
src/bos_consensus/network/base.py
LuffyEMonkey/isaac-consensus-protocol
806d967d56ef8862a477b2515c7854af289c10a0
[ "Apache-2.0" ]
null
null
null
src/bos_consensus/network/base.py
LuffyEMonkey/isaac-consensus-protocol
806d967d56ef8862a477b2515c7854af289c10a0
[ "Apache-2.0" ]
null
null
null
import urllib.parse from ..util import ( get_module, LoggingMixin, ) def get_network_module(name): return get_module('.' + name, package='bos_consensus.network') class BaseTransport(LoggingMixin): blockchain = None config = None message_received_callback = None def __init__(self, **co...
22.506494
88
0.601558
import urllib.parse from ..util import ( get_module, LoggingMixin, ) def get_network_module(name): return get_module('.' + name, package='bos_consensus.network') class BaseTransport(LoggingMixin): blockchain = None config = None message_received_callback = None def __init__(self, **co...
true
true
f7292663511c82d1520e313dbfc23c098d684d1d
125
py
Python
tests/float/bytearray_construct.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
303
2015-07-11T17:12:55.000Z
2018-01-08T03:02:37.000Z
tests/float/bytearray_construct.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
27
2015-01-02T16:17:37.000Z
2015-09-07T19:21:26.000Z
tests/float/bytearray_construct.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
26
2018-01-18T09:15:33.000Z
2022-02-07T13:09:14.000Z
# test construction of bytearray from array with float type from array import array print(bytearray(array('f', [1, 2.3])))
20.833333
59
0.736
from array import array print(bytearray(array('f', [1, 2.3])))
true
true
f72927a0a238ca762530566422979b22c243fee0
5,546
bzl
Python
test_defs.bzl
Omrisnyk/dagger
39456a4f54043e947f0b9268f9c7ab4ec9b6d8a1
[ "Apache-2.0" ]
1
2019-03-06T08:50:35.000Z
2019-03-06T08:50:35.000Z
test_defs.bzl
Omrisnyk/dagger
39456a4f54043e947f0b9268f9c7ab4ec9b6d8a1
[ "Apache-2.0" ]
null
null
null
test_defs.bzl
Omrisnyk/dagger
39456a4f54043e947f0b9268f9c7ab4ec9b6d8a1
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2017 The Dagger Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
28.885417
98
0.583844
BUILD_VARIANTS = { "FastInit": ["-Adagger.fastInit=enabled"], "AheadOfTimeSubcomponents": ["-Adagger.experimentalAheadOfTimeSubcomponents=enabled"], "FastInitAndAheadOfTimeSubcomponents": [ "-Adagger.fastInit=enabled", "-Adagger.experimentalAheadOfTimeSubcomponents=enabled",...
true
true
f72927f72877de84433002b4955d3d5699d37e50
664
py
Python
school/migrations/0005_auto_20200505_1038.py
Zulkarnain61630/School-management
1fe801c61b803268c852eb2e8096c255ec158e4b
[ "MIT" ]
331
2020-05-08T10:14:09.000Z
2022-03-31T19:56:03.000Z
school/migrations/0005_auto_20200505_1038.py
aliffauzi/schoolmanagement
6a4477af01df148404d1ff2941f74accb5717b09
[ "MIT" ]
16
2020-05-08T13:57:13.000Z
2022-02-09T15:08:06.000Z
school/migrations/0005_auto_20200505_1038.py
aliffauzi/schoolmanagement
6a4477af01df148404d1ff2941f74accb5717b09
[ "MIT" ]
231
2020-05-08T10:16:07.000Z
2022-03-19T02:30:31.000Z
# Generated by Django 3.0.5 on 2020-05-05 05:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('school', '0004_auto_20200504_1753'), ] operations = [ migrations.RemoveField( model_name='attendance', name='student...
23.714286
61
0.564759
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('school', '0004_auto_20200504_1753'), ] operations = [ migrations.RemoveField( model_name='attendance', name='student_id', ), migrations.AddField( ...
true
true
f729290eab849378942b925f74eaba393164fa89
3,584
py
Python
mimecast/komand_mimecast/actions/create_blocked_sender_policy/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
mimecast/komand_mimecast/actions/create_blocked_sender_policy/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
mimecast/komand_mimecast/actions/create_blocked_sender_policy/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
import komand from .schema import CreateBlockedSenderPolicyInput, CreateBlockedSenderPolicyOutput, Input, Output # Custom imports below from komand_mimecast.util import util class CreateBlockedSenderPolicy(komand.Action): # URI for create blocked sender policy _URI = '/api/policy/blockedsenders/create-policy...
39.822222
117
0.594866
import komand from .schema import CreateBlockedSenderPolicyInput, CreateBlockedSenderPolicyOutput, Input, Output from komand_mimecast.util import util class CreateBlockedSenderPolicy(komand.Action): _URI = '/api/policy/blockedsenders/create-policy' def __init__(self): super(self.__class__, sel...
true
true
f729295f47fd6fc7e0dbb6ec52f65e7a871ce49f
2,604
py
Python
myagents_tests.py
sguazt/connect4
631a2136096b38c8e0b8d60f9bb58518c8a7f8cc
[ "Apache-2.0" ]
null
null
null
myagents_tests.py
sguazt/connect4
631a2136096b38c8e0b8d60f9bb58518c8a7f8cc
[ "Apache-2.0" ]
null
null
null
myagents_tests.py
sguazt/connect4
631a2136096b38c8e0b8d60f9bb58518c8a7f8cc
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Copyright 2015 Marco Guazzone (marco.guazzone@gmail.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
32.962025
115
0.637865
import upo.connect4.agents import upo.connect4.game import myagents def do_test_evalfunc(): layout = (7, 6) num_agents = 2 depth = 2*num_agents verbose = 2 game_state = upo.connect4.game.GameState(layout, num_agents) game_state.set_verbosity_level(verbose) ...
true
true
f7292c444a8914e9b83607ab794b4814e76b1c37
576
py
Python
Trading arbitrage strategy/setup.py
iCoder333/Trading-arbitrage-strategy
af970c48027ab75a31a9d434373e620ceb38666b
[ "Apache-2.0" ]
4
2018-08-20T12:30:13.000Z
2018-08-31T08:43:55.000Z
Trading arbitrage strategy/setup.py
cristianver333/Trading-arbitrage-strategy
af970c48027ab75a31a9d434373e620ceb38666b
[ "Apache-2.0" ]
null
null
null
Trading arbitrage strategy/setup.py
cristianver333/Trading-arbitrage-strategy
af970c48027ab75a31a9d434373e620ceb38666b
[ "Apache-2.0" ]
1
2018-08-22T03:10:54.000Z
2018-08-22T03:10:54.000Z
from setuptools import setup, find_packages VERSION = "0.0.1" setup(name="TraderBetty", version=VERSION, author="iuvbio", author_email="", url="https://github.com/iuvbio/traderbetty.git", test_suite="", tests_require=[], packages=find_packages(exclude=["data", "docs", "tests*"]), inst...
32
74
0.626736
from setuptools import setup, find_packages VERSION = "0.0.1" setup(name="TraderBetty", version=VERSION, author="iuvbio", author_email="", url="https://github.com/iuvbio/traderbetty.git", test_suite="", tests_require=[], packages=find_packages(exclude=["data", "docs", "tests*"]), inst...
true
true
f7292c569cb72015176166d04e41a8e845b781fd
8,888
py
Python
datashader/macros.py
goncaloperes/datashader
1ae52b65ec8a79920e5db9c6c04487f254428553
[ "BSD-3-Clause" ]
706
2019-11-15T07:50:54.000Z
2022-03-31T10:55:04.000Z
datashader/macros.py
goncaloperes/datashader
1ae52b65ec8a79920e5db9c6c04487f254428553
[ "BSD-3-Clause" ]
223
2019-11-15T19:32:54.000Z
2022-03-31T20:46:21.000Z
datashader/macros.py
goncaloperes/datashader
1ae52b65ec8a79920e5db9c6c04487f254428553
[ "BSD-3-Clause" ]
106
2019-12-05T12:32:54.000Z
2022-03-31T15:50:00.000Z
import re import copy import inspect import ast import textwrap """ Utilities for manipulating the Abstract Syntax Tree of Python constructs """ class NameVisitor(ast.NodeVisitor): """ NodeVisitor that builds a set of all of the named identifiers in an AST """ def __init__(self, *args, **kwargs): ...
29.333333
85
0.661679
import re import copy import inspect import ast import textwrap class NameVisitor(ast.NodeVisitor): def __init__(self, *args, **kwargs): super(NameVisitor, self).__init__(*args, **kwargs) self.names = set() def visit_Name(self, node): self.names.add(node.id) def visit_arg(self, n...
true
true
f7292d17656c29b94c4d7a7e66797e9a545cc35e
229
py
Python
newslister/proxy/__init__.py
dang3r/nl
f0f70ef6fc5bcf7eef44dab8f6e1388c929f179d
[ "MIT" ]
1
2018-12-12T10:40:23.000Z
2018-12-12T10:40:23.000Z
newslister/proxy/__init__.py
dang3r/nl
f0f70ef6fc5bcf7eef44dab8f6e1388c929f179d
[ "MIT" ]
null
null
null
newslister/proxy/__init__.py
dang3r/nl
f0f70ef6fc5bcf7eef44dab8f6e1388c929f179d
[ "MIT" ]
null
null
null
from newslister.proxy.aws import * from .aws import ProxyPool def factory(cloud, count, **kwargs): if cloud == 'aws': group = ProxyPool(count, **kwargs) return group raise Exception('No factory exists!')
25.444444
42
0.659389
from newslister.proxy.aws import * from .aws import ProxyPool def factory(cloud, count, **kwargs): if cloud == 'aws': group = ProxyPool(count, **kwargs) return group raise Exception('No factory exists!')
true
true
f7292da0f02b6f9a514918ef639000b76c9120ef
699
py
Python
tests/unit/test_url.py
javiergodoy/pandas-profiling
0bed133520b9982263ed8cbc1af6b8f5a511bf0d
[ "MIT" ]
2
2020-01-30T15:01:18.000Z
2020-01-30T15:01:19.000Z
tests/unit/test_url.py
javiergodoy/pandas-profiling
0bed133520b9982263ed8cbc1af6b8f5a511bf0d
[ "MIT" ]
null
null
null
tests/unit/test_url.py
javiergodoy/pandas-profiling
0bed133520b9982263ed8cbc1af6b8f5a511bf0d
[ "MIT" ]
1
2020-06-12T00:02:15.000Z
2020-06-12T00:02:15.000Z
import pandas as pd import numpy as np import pandas_profiling def test_urls(get_data_file): file_name = get_data_file( "whitelist_urls.csv", "https://raw.githubusercontent.com/openeventdata/scraper/master/whitelist_urls.csv", ) df = pd.read_csv( file_name, header=None, names=["s...
26.884615
92
0.649499
import pandas as pd import numpy as np import pandas_profiling def test_urls(get_data_file): file_name = get_data_file( "whitelist_urls.csv", "https://raw.githubusercontent.com/openeventdata/scraper/master/whitelist_urls.csv", ) df = pd.read_csv( file_name, header=None, names=["s...
true
true
f7292ddb8ee78736309198ad7b3bdd680ec2f155
10,993
py
Python
chemdataextractor_batteries/tests/test_doc_table.py
MB9991/test_demo-
ca3df4ecf20f7a26a621f68caf668f2e726a737d
[ "MIT" ]
199
2016-10-07T06:55:23.000Z
2022-03-29T09:50:03.000Z
tests/test_doc_table.py
qingtong00/ChemDataExtractor
349a3bea965f2073141d62043b89319222e46af1
[ "MIT" ]
29
2016-10-04T08:56:05.000Z
2022-03-06T19:36:55.000Z
tests/test_doc_table.py
qingtong00/ChemDataExtractor
349a3bea965f2073141d62043b89319222e46af1
[ "MIT" ]
95
2016-10-10T14:24:27.000Z
2022-03-16T18:30:00.000Z
# -*- coding: utf-8 -*- """ test_doc_table ~~~~~~~~~~~~~~ Test the Table Document element. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import unittest from chemdataextractor.doc.table import T...
83.280303
472
0.528063
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import unittest from chemdataextractor.doc.table import Table, Cell from chemdataextractor.doc.text import Caption logging.basicConfig(level=logging.DE...
true
true
f729303c685f926a5098329355067c0fc0fd2cd5
10,711
py
Python
tests/components/recorder/test_init.py
lupin-de-mid/home-assistant
35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe
[ "Apache-2.0" ]
1
2021-01-02T14:13:46.000Z
2021-01-02T14:13:46.000Z
tests/components/recorder/test_init.py
lupin-de-mid/home-assistant
35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe
[ "Apache-2.0" ]
null
null
null
tests/components/recorder/test_init.py
lupin-de-mid/home-assistant
35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe
[ "Apache-2.0" ]
null
null
null
"""The tests for the Recorder component.""" # pylint: disable=protected-access import json from datetime import datetime, timedelta import unittest from unittest.mock import patch, call import pytest from homeassistant.core import callback from homeassistant.const import MATCH_ALL from homeassistant.components import ...
35.233553
78
0.632341
import json from datetime import datetime, timedelta import unittest from unittest.mock import patch, call import pytest from homeassistant.core import callback from homeassistant.const import MATCH_ALL from homeassistant.components import recorder from homeassistant.bootstrap import setup_component from tests.common...
true
true
f7293056e76e9527f56eb91dddab9a1d956f4c0e
1,148
py
Python
mlcode-python/basic/neuraltest.py
compasses/elastic-spark
bef6d70214029833c6a04b6c41fa68c0c23d785a
[ "MIT" ]
1
2017-11-02T04:38:59.000Z
2017-11-02T04:38:59.000Z
mlcode-python/basic/neuraltest.py
compasses/elastic-spark
bef6d70214029833c6a04b6c41fa68c0c23d785a
[ "MIT" ]
null
null
null
mlcode-python/basic/neuraltest.py
compasses/elastic-spark
bef6d70214029833c6a04b6c41fa68c0c23d785a
[ "MIT" ]
null
null
null
import numpy as np from sklearn import datasets, linear_model import matplotlib.pyplot as plt # Generate a dataset and plot it np.random.seed(0) X, y = datasets.make_moons(200, noise=0.20) plt.scatter(X[:,0], X[:,1], s=40, c=y, cmap=plt.cm.Spectral) print "OK" def plot_decision_boundary(pred_func, X, y): # Set ...
31.027027
80
0.666376
import numpy as np from sklearn import datasets, linear_model import matplotlib.pyplot as plt np.random.seed(0) X, y = datasets.make_moons(200, noise=0.20) plt.scatter(X[:,0], X[:,1], s=40, c=y, cmap=plt.cm.Spectral) print "OK" def plot_decision_boundary(pred_func, X, y): x_min, x_max = X[:, 0].min() - .5...
false
true
f72930c9fae6786588aa3d075c729ae46c002f3f
1,811
py
Python
sunpy/gui/__init__.py
astrofrog/sunpy
c658f7013a300b78e4cbf2146c2bcb98db32d788
[ "BSD-2-Clause" ]
1
2015-11-08T06:57:15.000Z
2015-11-08T06:57:15.000Z
sunpy/gui/__init__.py
astrofrog/sunpy
c658f7013a300b78e4cbf2146c2bcb98db32d788
[ "BSD-2-Clause" ]
null
null
null
sunpy/gui/__init__.py
astrofrog/sunpy
c658f7013a300b78e4cbf2146c2bcb98db32d788
[ "BSD-2-Clause" ]
null
null
null
#-*- coding: utf-8 -*- # Author: Matt Earnshaw <matt@earnshaw.org.uk> from __future__ import absolute_import import os import sys import sunpy from PyQt4.QtGui import QApplication from sunpy.gui.mainwindow import MainWindow from sunpy.io import UnrecognizedFileTypeError class Plotman(object): """ Wraps a MainWin...
29.209677
75
0.578686
from __future__ import absolute_import import os import sys import sunpy from PyQt4.QtGui import QApplication from sunpy.gui.mainwindow import MainWindow from sunpy.io import UnrecognizedFileTypeError class Plotman(object): def __init__(self, *paths): self.app = QApplication(sys.argv) self.mai...
true
true
f72933a040a9144612baa882c52f9c07c03beaef
1,196
py
Python
tests_functional/test_metadata.py
locriandev/doozer
375eafccc15aadfd18dc50061eccb9a917d31b0b
[ "Apache-2.0" ]
16
2018-11-06T16:49:03.000Z
2021-11-07T19:48:49.000Z
tests_functional/test_metadata.py
locriandev/doozer
375eafccc15aadfd18dc50061eccb9a917d31b0b
[ "Apache-2.0" ]
479
2018-11-15T15:37:49.000Z
2022-03-31T08:39:44.000Z
tests_functional/test_metadata.py
locriandev/doozer
375eafccc15aadfd18dc50061eccb9a917d31b0b
[ "Apache-2.0" ]
38
2018-11-07T14:33:15.000Z
2021-12-13T13:59:12.000Z
#!/usr/bin/env python3 import unittest from mock import MagicMock from tests_functional import DoozerRunnerTestCase from doozerlib import metadata class TestMetadata(DoozerRunnerTestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def setUp(self): super().setU...
30.666667
135
0.690635
import unittest from mock import MagicMock from tests_functional import DoozerRunnerTestCase from doozerlib import metadata class TestMetadata(DoozerRunnerTestCase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def setUp(self): super().setUp() def tearDown(...
true
true
f72933d68cca1cb46357e2f0ee1e7da63a8a27d6
28,079
py
Python
python/ray/util/client/server/server.py
sumanthratna/ray
78b776942f9aada4a3e9832b48c6b270054f59b5
[ "Apache-2.0" ]
1
2020-05-30T21:01:17.000Z
2020-05-30T21:01:17.000Z
python/ray/util/client/server/server.py
sumanthratna/ray
78b776942f9aada4a3e9832b48c6b270054f59b5
[ "Apache-2.0" ]
66
2021-02-23T19:49:27.000Z
2022-03-05T08:04:38.000Z
python/ray/util/client/server/server.py
sumanthratna/ray
78b776942f9aada4a3e9832b48c6b270054f59b5
[ "Apache-2.0" ]
null
null
null
import logging from concurrent import futures import grpc import base64 from collections import defaultdict from dataclasses import dataclass import os import sys import threading from typing import Any from typing import List from typing import Dict from typing import Set from typing import Optional from typing impor...
41.111274
79
0.627408
import logging from concurrent import futures import grpc import base64 from collections import defaultdict from dataclasses import dataclass import os import sys import threading from typing import Any from typing import List from typing import Dict from typing import Set from typing import Optional from typing impor...
true
true
f729344e11a97961e9f689a25b090a0f3e990c24
16,090
py
Python
src/models/cnn_model.py
bgshin/vddc
e0e0083297a17806d9b0fc27a6e641d6c6b52aeb
[ "Apache-2.0" ]
1
2017-07-03T17:07:09.000Z
2017-07-03T17:07:09.000Z
src/models/cnn_model.py
bgshin/vddc
e0e0083297a17806d9b0fc27a6e641d6c6b52aeb
[ "Apache-2.0" ]
null
null
null
src/models/cnn_model.py
bgshin/vddc
e0e0083297a17806d9b0fc27a6e641d6c6b52aeb
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import re FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_boolean('use_fp16', False, """Train the model using fp16.""") tf.app.flags.DEFINE_integer('sequence_length', 1200, """Number of batches to run.""") tf.app.flags.DEFINE_integer('embe...
41.045918
136
0.606712
import tensorflow as tf import re FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_boolean('use_fp16', False, """Train the model using fp16.""") tf.app.flags.DEFINE_integer('sequence_length', 1200, """Number of batches to run.""") tf.app.flags.DEFINE_integer('embe...
false
true
f729353149eb39923fbab7eeaa37a5be66fd809d
679
py
Python
migrations/versions/cce9d107c21a_add_status_as_of_column.py
ourresearch/journalsdb
169feb9be684eac59f3294dccdb319eb10fe1958
[ "MIT" ]
8
2021-02-01T21:00:20.000Z
2022-01-25T09:51:24.000Z
migrations/versions/cce9d107c21a_add_status_as_of_column.py
ourresearch/journalsdb
169feb9be684eac59f3294dccdb319eb10fe1958
[ "MIT" ]
43
2021-04-28T00:20:53.000Z
2022-03-09T00:39:56.000Z
migrations/versions/cce9d107c21a_add_status_as_of_column.py
ourresearch/journalsdb
169feb9be684eac59f3294dccdb319eb10fe1958
[ "MIT" ]
null
null
null
"""add status_as_of column Revision ID: cce9d107c21a Revises: 9f8c327dd506 Create Date: 2021-07-08 19:16:15.975527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "cce9d107c21a" down_revision = "9f8c327dd506" branch_labels = None depends_on = None def upgrade...
23.413793
86
0.701031
from alembic import op import sqlalchemy as sa revision = "cce9d107c21a" down_revision = "9f8c327dd506" branch_labels = None depends_on = None def upgrade():
true
true
f7293603000d5152866e1493476863a150c34abe
567
py
Python
Math/Leetcode49.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
Math/Leetcode49.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
Math/Leetcode49.py
Rylie-W/LeetRecord
623c4efe88b3af54b8a65f6ec23db850b8c6f46f
[ "Apache-2.0" ]
null
null
null
class Solution: def groupAnagrams(self, strs): if not strs or len(strs)==0: return strs memo=dict() for i in strs: temp=self.sortString(i) if memo.get(temp): memo[temp].append(i) else: memo[temp]=[i] return memo.values...
23.625
55
0.513228
class Solution: def groupAnagrams(self, strs): if not strs or len(strs)==0: return strs memo=dict() for i in strs: temp=self.sortString(i) if memo.get(temp): memo[temp].append(i) else: memo[temp]=[i] return memo.values...
true
true
f72936579a668b3181430356252546d44be9c15c
915
py
Python
1.5/15.py
marcelox5/python-course
b0848ee41b51d8f550431bdcbbbe9c38cfa9e58c
[ "MIT" ]
null
null
null
1.5/15.py
marcelox5/python-course
b0848ee41b51d8f550431bdcbbbe9c38cfa9e58c
[ "MIT" ]
null
null
null
1.5/15.py
marcelox5/python-course
b0848ee41b51d8f550431bdcbbbe9c38cfa9e58c
[ "MIT" ]
null
null
null
#!C:\Python34 print("print(2+4)=", 2+4) print("_+__+__+__+_") print("\n") print("print(3-5)", 3-5) print("_+__+__+__+_") print("\n") print("print(2--5)", 2--5) print("_+__+__+__+_") print("\n") print("print(+2-5)", +2-5) print("_+__+__+__+_") print("\n") print("print(3*8)=", 3*8) print("_+__+__+__+_") print("\n") ...
16.339286
35
0.519126
print("print(2+4)=", 2+4) print("_+__+__+__+_") print("\n") print("print(3-5)", 3-5) print("_+__+__+__+_") print("\n") print("print(2--5)", 2--5) print("_+__+__+__+_") print("\n") print("print(+2-5)", +2-5) print("_+__+__+__+_") print("\n") print("print(3*8)=", 3*8) print("_+__+__+__+_") print("\n") print("print(...
true
true
f7293703a56010cfb33e8d429ec0a9da12a385eb
9,213
py
Python
contrib/bitrpc/bitrpc.py
datacoinfiles/krugercoin
f1b7cc41053c7783b4fab9f68e0ae23899abdccf
[ "MIT" ]
1
2021-08-20T16:45:38.000Z
2021-08-20T16:45:38.000Z
contrib/bitrpc/bitrpc.py
krugercoin-project/krugercoin0.10.3.0
128253be47d49ad30b57dcf98e437198f3ee8b93
[ "MIT" ]
1
2015-02-10T09:05:23.000Z
2015-02-10T16:57:24.000Z
contrib/bitrpc/bitrpc.py
krugercoin-project/krugercoin0.10.3.0
128253be47d49ad30b57dcf98e437198f3ee8b93
[ "MIT" ]
13
2018-03-05T17:01:17.000Z
2021-05-12T22:32:02.000Z
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") e...
28.260736
80
0.573972
from jsonrpc import ServiceProxy import sys import string import getpass rpcuser = "" rpcpass = "" if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8332") cmd = sys.argv[1].lower() if cmd == "backupwallet": try: ...
false
true
f72937da28c924d792b6d61ba3209ed0c4d40f71
1,017
py
Python
vindinium/models/map.py
renatopp/vindinium-python
d6cb7fd08eb9af8a8ca03214b9a42a2e8e9d7c2a
[ "MIT" ]
6
2015-09-30T06:29:36.000Z
2019-04-07T11:43:47.000Z
vindinium/models/map.py
renatopp/vindinium-python
d6cb7fd08eb9af8a8ca03214b9a42a2e8e9d7c2a
[ "MIT" ]
null
null
null
vindinium/models/map.py
renatopp/vindinium-python
d6cb7fd08eb9af8a8ca03214b9a42a2e8e9d7c2a
[ "MIT" ]
10
2015-06-20T21:03:14.000Z
2019-04-07T11:43:30.000Z
__all__ = ['Map'] class Map(object): '''Represents static elements in the game, such as walls, paths, taverns, mines and spawn points. Attributes: size (int): the board size (in a single axis). ''' def __init__(self, size): '''Constructor. Args: s...
26.763158
78
0.481809
__all__ = ['Map'] class Map(object): def __init__(self, size): self.size = size self.__board = [[0 for i in xrange(size)] for j in xrange(size)] def __getitem__(self, key): return self.__board[key[0]][key[1]] def __setitem__(self, key, value): self.__board[key[0]][key...
true
true
f729388c6f3f9d33692a0b71c6bf0abe64b5a73d
34,804
py
Python
boltons/dictutils.py
bogdan-kulynych/boltons
a065dc576c1dc01e9539d973dfb961591ecee427
[ "BSD-3-Clause" ]
1
2020-12-08T18:37:42.000Z
2020-12-08T18:37:42.000Z
boltons/dictutils.py
bogdan-kulynych/boltons
a065dc576c1dc01e9539d973dfb961591ecee427
[ "BSD-3-Clause" ]
null
null
null
boltons/dictutils.py
bogdan-kulynych/boltons
a065dc576c1dc01e9539d973dfb961591ecee427
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Python has a very powerful mapping type at its core: the :class:`dict` type. While versatile and featureful, the :class:`dict` prioritizes simplicity and performance. As a result, it does not retain the order of item insertion [1]_, nor does it store multiple values per key. It is a fast, uno...
33.497594
101
0.575509
try: from collections.abc import KeysView, ValuesView, ItemsView except ImportError: from collections import KeysView, ValuesView, ItemsView import itertools try: from itertools import izip_longest except ImportError: from itertools import zip_longest as izip_longest try: from typeutils import ...
true
true
f729389fe933234c11c91329270793893d994ccb
1,884
py
Python
datasets/Part 2 - Regression/Section 6 - Polynomial Regression/polinomial_regression.py
Lguiller/machinelearning-az
7c062302944b91131783fe663e1cff21e5956ca2
[ "MIT" ]
null
null
null
datasets/Part 2 - Regression/Section 6 - Polynomial Regression/polinomial_regression.py
Lguiller/machinelearning-az
7c062302944b91131783fe663e1cff21e5956ca2
[ "MIT" ]
null
null
null
datasets/Part 2 - Regression/Section 6 - Polynomial Regression/polinomial_regression.py
Lguiller/machinelearning-az
7c062302944b91131783fe663e1cff21e5956ca2
[ "MIT" ]
1
2019-06-11T14:54:37.000Z
2019-06-11T14:54:37.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 5 12:45:44 2019 @author: juangabriel """ # Regresión polinómica # Cómo importar las librerías import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importar el data set dataset = pd.read_csv('Position_Salaries.csv') X = datase...
25.808219
92
0.751592
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('Position_Salaries.csv') X = dataset.iloc[:, 1:2].values y = dataset.iloc[:, 2].values from sklearn.linear_model import LinearRegression lin_reg = LinearRegression() lin_reg.fit(X, y) from sklearn.preprocessing...
true
true
f729390d1f962ea09fcd5caafeaf6d3c52877f77
1,295
py
Python
netattacker/__init__.py
venkat-abhi/netattacker
d1b4eadfa2fa065cbd0287f78b137427463920d6
[ "Apache-2.0" ]
null
null
null
netattacker/__init__.py
venkat-abhi/netattacker
d1b4eadfa2fa065cbd0287f78b137427463920d6
[ "Apache-2.0" ]
null
null
null
netattacker/__init__.py
venkat-abhi/netattacker
d1b4eadfa2fa065cbd0287f78b137427463920d6
[ "Apache-2.0" ]
null
null
null
from importlib import import_module from inspect import getmembers, isclass from netattacker.attacker import AttackerBaseClass base_classes = ['AttackerBaseClass', 'ScannerBaseClass'] def grab(attack_module:str, *args, **kwargs): try: # Need to figure out a better way if ('modules' not in attack_module): mod...
34.078947
138
0.744402
from importlib import import_module from inspect import getmembers, isclass from netattacker.attacker import AttackerBaseClass base_classes = ['AttackerBaseClass', 'ScannerBaseClass'] def grab(attack_module:str, *args, **kwargs): try: if ('modules' not in attack_module): module_name = "netattacker.modules."...
true
true
f729392f2684debd3a927c2ff1121a500d446369
2,943
py
Python
writeups/closed/files/2020-uiuctf/coelacanth_vault.py
shawnduong/zero-to-hero-hacking
eec6768674b9908177c74925c6c5bd1b2da91369
[ "MIT" ]
8
2020-08-07T23:51:04.000Z
2022-02-17T02:27:30.000Z
writeups/closed/files/2020-uiuctf/coelacanth_vault.py
shawnduong/zero-to-hero-hacking
eec6768674b9908177c74925c6c5bd1b2da91369
[ "MIT" ]
null
null
null
writeups/closed/files/2020-uiuctf/coelacanth_vault.py
shawnduong/zero-to-hero-hacking
eec6768674b9908177c74925c6c5bd1b2da91369
[ "MIT" ]
3
2020-08-07T23:52:10.000Z
2021-12-30T07:07:09.000Z
#!/usr/bin/python import random from Crypto.Util import number from functools import reduce TOTAL = 15 THRESHOLD = 10 MAX_COELACANTH = 9 NUM_LOCKS = 5 NUM_TRIES = 250 # substitute for math.prod prod = lambda n: reduce(lambda x, y: x*y, n) def create_key(t, n, size=8): while True: seq = sorted([number.ge...
39.77027
146
0.621814
import random from Crypto.Util import number from functools import reduce TOTAL = 15 THRESHOLD = 10 MAX_COELACANTH = 9 NUM_LOCKS = 5 NUM_TRIES = 250 prod = lambda n: reduce(lambda x, y: x*y, n) def create_key(t, n, size=8): while True: seq = sorted([number.getPrime(size) for _ in range(TOTAL)]) ...
true
true
f7293b124cfe6a600bee645fddac463b0a401a67
424
py
Python
energagement/myapp/migrations/0008_auto_20150701_1012.py
mpetyx/energagement-
8053d433057327eaff7b1fe8f03ad77700755b49
[ "MIT" ]
null
null
null
energagement/myapp/migrations/0008_auto_20150701_1012.py
mpetyx/energagement-
8053d433057327eaff7b1fe8f03ad77700755b49
[ "MIT" ]
12
2015-06-02T15:27:36.000Z
2015-09-17T22:05:00.000Z
energagement/myapp/migrations/0008_auto_20150701_1012.py
mpetyx/energagement-
8053d433057327eaff7b1fe8f03ad77700755b49
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0007_auto_20150629_1643'), ] operations = [ migrations.AlterField( model_name='value', name...
20.190476
45
0.591981
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0007_auto_20150629_1643'), ] operations = [ migrations.AlterField( model_name='value', name='timestamp', ...
true
true
f7293b5e110b7e9317cb9bb3ad658066507ecbf7
8,013
py
Python
darling_ansible/python_venv/lib/python3.7/site-packages/oci/apigateway/models/api_specification_route.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/apigateway/models/api_specification_route.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/apigateway/models/api_specification_route.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
1
2020-06-25T03:12:58.000Z
2020-06-25T03:12:58.000Z
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
35.613333
245
0.665668
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ApiSpecificationRoute(object): METHODS_ANY = "ANY" METHODS_HEAD = "HEAD" METHODS_...
true
true
f7293badfc9fb26b41b3748c1ecff37b57616082
3,534
py
Python
mars/tensor/reduction/nanargmin.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/reduction/nanargmin.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
mars/tensor/reduction/nanargmin.py
sighingnow/mars
c7897fbd144d230fff5edabc1494fb3ff44aa0d2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
32.422018
105
0.675156
import numpy as np from ... import opcodes as OperandDef from ...serialize import Int64Field, TupleField from .core import TensorReduction, TensorArgReductionMixin, TensorArgMapMixin, TensorArgCombineMixin class TensorNanArgminMap(TensorReduction, TensorArgMapMixin): _op_type_ = OperandDef.NANARG...
true
true
f7293c82577b4455cadc028d56cf912f14a2d0f3
2,522
py
Python
app/problem_register/migrations/0001_initial.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
null
null
null
app/problem_register/migrations/0001_initial.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
17
2020-02-15T16:57:38.000Z
2021-09-17T19:33:25.000Z
app/problem_register/migrations/0001_initial.py
3ANov/spbauto_map
3f1c3dcb5f370a9e04d5d496b18a3e6ab3dbe7a1
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-05-04 07:35 import colorfield.fields from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dep...
54.826087
184
0.666931
import colorfield.fields from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('places', '0001_initia...
true
true
f7293d67e1c31733c637eac8626a9cea639c2578
1,737
py
Python
nate/svonet/svo_offsets.py
UWNETLAB/nelanna
9029670d5804f478cac2e83d77ff86ff2a7266c2
[ "MIT" ]
8
2020-02-09T15:39:49.000Z
2022-02-06T14:35:08.000Z
nate/svonet/svo_offsets.py
UWNETLAB/nlpnet
9029670d5804f478cac2e83d77ff86ff2a7266c2
[ "MIT" ]
11
2020-03-13T18:46:46.000Z
2020-04-02T18:58:57.000Z
nate/svonet/svo_offsets.py
UWNETLAB/nlpnet
9029670d5804f478cac2e83d77ff86ff2a7266c2
[ "MIT" ]
1
2020-08-05T19:08:50.000Z
2020-08-05T19:08:50.000Z
"""Generates the offset dictionary for the SVO pipeline.""" from time import time as marktime from typing import List from itertools import groupby from collections import defaultdict def generate_svo_offsets(svo_list: List, time: List, minimum_offsets): """Creates offset dictionary and int-to-string lookup for S...
30.473684
91
0.670697
from time import time as marktime from typing import List from itertools import groupby from collections import defaultdict def generate_svo_offsets(svo_list: List, time: List, minimum_offsets): print("Generating Offsets:") start = marktime() svo_dict = defaultdict(list) for i, svo in enumerate(svo_...
true
true
f7293d96cfc10e9d38e19644eab6c50924cd6563
429
py
Python
rl/core/online_learners/online_learner.py
gtrll/librl
39709c3e485e232865b3e08b7211cd9d871c666a
[ "MIT" ]
5
2020-07-14T23:01:53.000Z
2020-12-09T08:11:29.000Z
rl/core/online_learners/online_learner.py
chinganc/mamba
e8adf0cf91660aed2c025508137a14f9d062248c
[ "MIT" ]
1
2022-03-27T04:43:31.000Z
2022-03-27T04:43:31.000Z
rl/core/online_learners/online_learner.py
chinganc/mamba
e8adf0cf91660aed2c025508137a14f9d062248c
[ "MIT" ]
4
2020-08-05T14:13:26.000Z
2022-02-26T00:46:03.000Z
# Copyright (c) 2019 Georgia Tech Robot Learning Lab # Licensed under the MIT License. from abc import ABC, abstractmethod class OnlineLearner(ABC): """ An abstract interface of iterative algorithms. """ @abstractmethod def update(self, *args, **kwargs): """ Update the state given feedback. """ ...
23.833333
58
0.666667
from abc import ABC, abstractmethod class OnlineLearner(ABC): @abstractmethod def update(self, *args, **kwargs): @property @abstractmethod def decision(self):
true
true
f7293e830b4c70a37e67f12aaa9cf75b32945e05
4,134
py
Python
tasks/LR9BD.py
evgeniy97/taskgenerator
7680989c2a080761ef574fac148a0a94c722ad16
[ "MIT" ]
1
2018-07-19T09:56:35.000Z
2018-07-19T09:56:35.000Z
tasks/LR9BD.py
evgeniy97/taskgenerator
7680989c2a080761ef574fac148a0a94c722ad16
[ "MIT" ]
null
null
null
tasks/LR9BD.py
evgeniy97/taskgenerator
7680989c2a080761ef574fac148a0a94c722ad16
[ "MIT" ]
null
null
null
# coding: utf-8 # In[ ]: """ Numerical Methods, lab 9 """ import sympy as sy from sympy import Rational as syR from sympy import exp, sin, cos, sqrt, log, ln from sympy import pi, cot, sinh, cosh, atan, tan Tasks_db = { 'Task1': [ # 9.1.1 {'f1': lambda x:x**2+2*exp(x), 'a': -2., 'b': 2...
22.225806
48
0.321964
""" Numerical Methods, lab 9 """ import sympy as sy from sympy import Rational as syR from sympy import exp, sin, cos, sqrt, log, ln from sympy import pi, cot, sinh, cosh, atan, tan Tasks_db = { 'Task1': [ {'f1': lambda x:x**2+2*exp(x), 'a': -2., 'b': 2. }, {'f...
false
true
f7293edc1b5a4be9bc88b63b859c48a069551969
4,914
py
Python
Chef.py
joaocps/cd-drive-through-p2p
86db0bf4701c37e02db2ea1f6472c9649465ea48
[ "MIT" ]
null
null
null
Chef.py
joaocps/cd-drive-through-p2p
86db0bf4701c37e02db2ea1f6472c9649465ea48
[ "MIT" ]
null
null
null
Chef.py
joaocps/cd-drive-through-p2p
86db0bf4701c37e02db2ea1f6472c9649465ea48
[ "MIT" ]
null
null
null
# coding: utf-8 import time import pickle import socket import random import logging import argparse import threading logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M:%S') logger = logging.getLogger('C...
34.605634
97
0.556777
import time import pickle import socket import random import logging import argparse import threading logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M:%S') logger = logging.getLogger('Chef') def cont...
true
true
f7293f910233b1a53743fbb23de7be2d8f6d7a41
5,065
py
Python
glue/viewers/image/composite_array.py
nabobalis/glue
1c718378b5527e64d85cc6a6f9a0330652e5cf4b
[ "BSD-3-Clause" ]
null
null
null
glue/viewers/image/composite_array.py
nabobalis/glue
1c718378b5527e64d85cc6a6f9a0330652e5cf4b
[ "BSD-3-Clause" ]
null
null
null
glue/viewers/image/composite_array.py
nabobalis/glue
1c718378b5527e64d85cc6a6f9a0330652e5cf4b
[ "BSD-3-Clause" ]
null
null
null
# This artist can be used to deal with the sampling of the data as well as any # RGB blending. import numpy as np from matplotlib.colors import ColorConverter, Colormap from astropy.visualization import (LinearStretch, SqrtStretch, AsinhStretch, LogStretch, ManualInterval, ContrastB...
28.778409
83
0.476802
import numpy as np from matplotlib.colors import ColorConverter, Colormap from astropy.visualization import (LinearStretch, SqrtStretch, AsinhStretch, LogStretch, ManualInterval, ContrastBiasStretch) __all__ = ['CompositeArray'] COLOR_CONVERTER = ColorConverter() STRETCHES = {...
true
true
f7293fb10151a0afd2415399bbc15a21c5dea227
2,097
py
Python
assignment-14/unused.py
faizanahemad/eva
cca4666f5953bbe040f52b91b9085ac38f2bc8e1
[ "MIT" ]
3
2019-07-22T15:55:07.000Z
2019-12-02T13:18:50.000Z
assignment-14/unused.py
faizanahemad/eva
cca4666f5953bbe040f52b91b9085ac38f2bc8e1
[ "MIT" ]
null
null
null
assignment-14/unused.py
faizanahemad/eva
cca4666f5953bbe040f52b91b9085ac38f2bc8e1
[ "MIT" ]
2
2019-11-16T05:31:10.000Z
2020-01-06T08:34:08.000Z
def replace_slice(input_: tf.Tensor, replacement, begin) -> tf.Tensor: inp_shape = tf.shape(input_) size = tf.shape(replacement) padding = tf.stack([begin, inp_shape - (begin + size)], axis=1) replacement_pad = tf.pad(replacement, padding) mask = tf.pad(tf.ones_like(replacement, dtype=tf.bool), padd...
38.833333
109
0.662852
def replace_slice(input_: tf.Tensor, replacement, begin) -> tf.Tensor: inp_shape = tf.shape(input_) size = tf.shape(replacement) padding = tf.stack([begin, inp_shape - (begin + size)], axis=1) replacement_pad = tf.pad(replacement, padding) mask = tf.pad(tf.ones_like(replacement, dtype=tf.bool), padd...
true
true
f7294193cf63cfe94ee995a6946fbd3309eb571e
5,337
py
Python
rkivacc/report.py
spycrab/rkivacc
90238b6aa12cc6747579c28d2a5012bcf7602b30
[ "MIT" ]
1
2021-01-04T22:43:15.000Z
2021-01-04T22:43:15.000Z
rkivacc/report.py
spycrab/rkivacc
90238b6aa12cc6747579c28d2a5012bcf7602b30
[ "MIT" ]
null
null
null
rkivacc/report.py
spycrab/rkivacc
90238b6aa12cc6747579c28d2a5012bcf7602b30
[ "MIT" ]
null
null
null
import rkivacc import os import tempfile import email.utils import requests import openpyxl class RKIReport: def __get_column(row, map, column): if not column in map: return None value = row[map[column]].value if isinstance(value, str): return RKIReport.__strip_st...
37.0625
139
0.572794
import rkivacc import os import tempfile import email.utils import requests import openpyxl class RKIReport: def __get_column(row, map, column): if not column in map: return None value = row[map[column]].value if isinstance(value, str): return RKIReport.__strip_st...
true
true
f72941e91dbf0b795743dfa4a4bb6949f8bf049d
1,378
py
Python
py/test.py
GuoQP/inbloom
cee7cede9b769aeef6bea0496656422ac9d56ece
[ "BSD-2-Clause" ]
324
2015-07-28T08:33:58.000Z
2022-03-30T10:56:33.000Z
py/test.py
GuoQP/inbloom
cee7cede9b769aeef6bea0496656422ac9d56ece
[ "BSD-2-Clause" ]
12
2015-08-03T07:47:16.000Z
2021-12-21T21:11:45.000Z
py/test.py
GuoQP/inbloom
cee7cede9b769aeef6bea0496656422ac9d56ece
[ "BSD-2-Clause" ]
32
2015-07-31T02:11:56.000Z
2021-12-10T23:24:31.000Z
from __future__ import absolute_import, division from unittest import TestCase from binascii import hexlify import inbloom class InBloomTestCase(TestCase): def test_functionality(self): bf = inbloom.Filter(20, 0.01) keys = ["foo", "bar", "foosdfsdfs", "fossdfsdfo", "foasdfasdfasdfasdfo", "foasdfasdfasdas...
30.622222
111
0.634978
from __future__ import absolute_import, division from unittest import TestCase from binascii import hexlify import inbloom class InBloomTestCase(TestCase): def test_functionality(self): bf = inbloom.Filter(20, 0.01) keys = ["foo", "bar", "foosdfsdfs", "fossdfsdfo", "foasdfasdfasdfasdfo", "foasdfasdfasdas...
false
true
f7294311b09039d93476d2accfb997483c517f56
6,680
py
Python
src/gennav_ros/conversions.py
SuhrudhSarathy/gennav_ros
471c47431b020ad411f08c2c4d2ee38d702a5a3b
[ "MIT" ]
null
null
null
src/gennav_ros/conversions.py
SuhrudhSarathy/gennav_ros
471c47431b020ad411f08c2c4d2ee38d702a5a3b
[ "MIT" ]
null
null
null
src/gennav_ros/conversions.py
SuhrudhSarathy/gennav_ros
471c47431b020ad411f08c2c4d2ee38d702a5a3b
[ "MIT" ]
null
null
null
import math import tf from gennav import utils as utils from gennav.utils import RobotState, Trajectory from gennav.utils.common import Velocity from geometry_msgs.msg import Point, Quaternion, Transform, Twist, Vector3 from trajectory_msgs.msg import MultiDOFJointTrajectory, MultiDOFJointTrajectoryPoint def traj_to...
33.737374
110
0.642216
import math import tf from gennav import utils as utils from gennav.utils import RobotState, Trajectory from gennav.utils.common import Velocity from geometry_msgs.msg import Point, Quaternion, Transform, Twist, Vector3 from trajectory_msgs.msg import MultiDOFJointTrajectory, MultiDOFJointTrajectoryPoint def traj_to...
true
true
f7294364ac852b57cc57abd82f03e5f9110e4046
1,897
py
Python
tempest/api/compute/limits/test_absolute_limits_negative.py
pcaruana/tempest
907ed711f265305316fdc80acd16e9657cb2c0b4
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/limits/test_absolute_limits_negative.py
pcaruana/tempest
907ed711f265305316fdc80acd16e9657cb2c0b4
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/limits/test_absolute_limits_negative.py
pcaruana/tempest
907ed711f265305316fdc80acd16e9657cb2c0b4
[ "Apache-2.0" ]
1
2019-02-14T23:36:55.000Z
2019-02-14T23:36:55.000Z
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
38.714286
78
0.678967
from tempest.api.compute import base from tempest import exceptions from tempest import test class AbsoluteLimitsNegativeTestJSON(base.BaseV2ComputeTest): @classmethod def resource_setup(cls): super(AbsoluteLimitsNegativeTestJSON, cls).resource_setup() cls.client = cls.limits_c...
true
true
f729436be71e8b9271ea6d70e2e79ea138dfc0ff
1,525
py
Python
modules/action/crackPasswordHashJohnTR.py
Marx314/apt2
f0782ec121057bd5d8c0c5fa438d0a13dc4dd448
[ "MIT" ]
2
2017-05-11T22:08:47.000Z
2020-04-07T06:31:26.000Z
modules/action/crackPasswordHashJohnTR.py
padfoot999/apt2
e473246cb273f2e2c60e2e43663535caaab8add3
[ "MIT" ]
null
null
null
modules/action/crackPasswordHashJohnTR.py
padfoot999/apt2
e473246cb273f2e2c60e2e43663535caaab8add3
[ "MIT" ]
1
2020-04-07T06:31:27.000Z
2020-04-07T06:31:27.000Z
from core.actionModule import actionModule from core.keystore import KeyStore as kb class crackPasswordHashJohnTR(actionModule): def __init__(self, config, display, lock): super(crackPasswordHashJohnTR, self).__init__(config, display, lock) self.title = "Attempt to crack any password hashes" ...
36.309524
116
0.598033
from core.actionModule import actionModule from core.keystore import KeyStore as kb class crackPasswordHashJohnTR(actionModule): def __init__(self, config, display, lock): super(crackPasswordHashJohnTR, self).__init__(config, display, lock) self.title = "Attempt to crack any password hashes" ...
true
true
f72944a80e90f20fbd5a29de2e52ad3e58553fcb
15,017
py
Python
pptx/oxml/__init__.py
fos4X/python-pptx
2202a15dab204b7ae80860f7f10636e0cea0a766
[ "MIT" ]
null
null
null
pptx/oxml/__init__.py
fos4X/python-pptx
2202a15dab204b7ae80860f7f10636e0cea0a766
[ "MIT" ]
null
null
null
pptx/oxml/__init__.py
fos4X/python-pptx
2202a15dab204b7ae80860f7f10636e0cea0a766
[ "MIT" ]
null
null
null
# encoding: utf-8 """Initializes lxml parser, particularly the custom element classes. Also makes available a handful of functions that wrap its typical uses. """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) import os from lxml import etree from .ns import NamespacePr...
41.369146
77
0.767796
from __future__ import ( absolute_import, division, print_function, unicode_literals ) import os from lxml import etree from .ns import NamespacePrefixedTag element_class_lookup = etree.ElementNamespaceClassLookup() oxml_parser = etree.XMLParser(remove_blank_text=True, resolve_entities=False) oxml_parser.s...
true
true
f72944e008e528745fb7dd9aba4f8c4bfe65192b
2,089
py
Python
gcode-object-monitor/gcodeServer.py
llalls/Gcode_Monitor_Docker
878b81fa691d52f08ad2b7cfab23449b67ce8764
[ "MIT" ]
null
null
null
gcode-object-monitor/gcodeServer.py
llalls/Gcode_Monitor_Docker
878b81fa691d52f08ad2b7cfab23449b67ce8764
[ "MIT" ]
null
null
null
gcode-object-monitor/gcodeServer.py
llalls/Gcode_Monitor_Docker
878b81fa691d52f08ad2b7cfab23449b67ce8764
[ "MIT" ]
null
null
null
import io import os, sys import threading import numpy as np import base64, string from PIL import Image from threading import Lock from flask import url_for, Flask, request, redirect, render_template, send_from_directory, jsonify import gcodeCompare app = Flask(__name__, template_folder='templates') lock = Lock() @a...
28.22973
126
0.722834
import io import os, sys import threading import numpy as np import base64, string from PIL import Image from threading import Lock from flask import url_for, Flask, request, redirect, render_template, send_from_directory, jsonify import gcodeCompare app = Flask(__name__, template_folder='templates') lock = Lock() @a...
true
true
f72945b47d67acc2ed74ec645c6eaf015a73bd05
4,214
py
Python
nicos_mlz/sans1/setups/tisane_multifg.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/sans1/setups/tisane_multifg.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_mlz/sans1/setups/tisane_multifg.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
description = 'frequency counter, fg1 and fg2' excludes = ['frequency'] # group = 'lowlevel' tango_base = 'tango://sans1hw.sans1.frm2:10000/sans1/tisane' ARMING_STRING_FC = ( ':FUNC "FREQ";' ':CALC:AVER 1;' ':CALC:SMO:RESP FAST;' ':CALC:SMO 1;' ...
32.921875
71
0.44803
description = 'frequency counter, fg1 and fg2' excludes = ['frequency'] tango_base = 'tango://sans1hw.sans1.frm2:10000/sans1/tisane' ARMING_STRING_FC = ( ':FUNC "FREQ";' ':CALC:AVER 1;' ':CALC:SMO:RESP FAST;' ':CALC:SMO 1;' ':INP:COUP ...
true
true
f72945db8c9c7fdc2f5f44205c18d4ae471405d9
18,663
py
Python
gamestonk_terminal/portfolio/portfolio_view.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
1
2022-02-18T04:02:52.000Z
2022-02-18T04:02:52.000Z
gamestonk_terminal/portfolio/portfolio_view.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
gamestonk_terminal/portfolio/portfolio_view.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
"""Portfolio View""" __docformat__ = "numpy" import logging from typing import List, Optional import os import numpy as np import pandas as pd from matplotlib import pyplot as plt from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.config_plot import PLOT_DPI from gamestonk_terminal.portfoli...
32.177586
120
0.610191
__docformat__ = "numpy" import logging from typing import List, Optional import os import numpy as np import pandas as pd from matplotlib import pyplot as plt from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.config_plot import PLOT_DPI from gamestonk_terminal.portfolio import ( portfo...
true
true
f729468046e62f854295c7f77bca8258e271ead4
817
py
Python
tutorial/basic/ex3.py
SalAlba/matplotlib
f73ff4e77074152fb9abc400d66f56111e656687
[ "MIT" ]
null
null
null
tutorial/basic/ex3.py
SalAlba/matplotlib
f73ff4e77074152fb9abc400d66f56111e656687
[ "MIT" ]
null
null
null
tutorial/basic/ex3.py
SalAlba/matplotlib
f73ff4e77074152fb9abc400d66f56111e656687
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from sal_timer import timer def plot_1(): # ... data = { 'a': np.arange(50), 'c': np.random.randint(0, 50, 50), 'd': np.random.randn(50) } data['b'] = data['a'] + 10 * np.random.randn(50) data['d'] = np.abs(data['d']) * ...
19
104
0.376989
import numpy as np import matplotlib.pyplot as plt from sal_timer import timer def plot_1(): data = { 'a': np.arange(50), 'c': np.random.randint(0, 50, 50), 'd': np.random.randn(50) } data['b'] = data['a'] + 10 * np.random.randn(50) data['d'] = np.abs(data['d']) * 100 ...
true
true
f72947347cb1c119a762d738eaa1b76c322be864
20,672
py
Python
Adelphi Academic Calendar/skill/skill_env/Lib/site-packages/boto3/resources/model.py
EnriqueGambra/Amazon-Alexa-Skill
198ed51bef555eee006041fef0bcbf5c955142d5
[ "MIT" ]
null
null
null
Adelphi Academic Calendar/skill/skill_env/Lib/site-packages/boto3/resources/model.py
EnriqueGambra/Amazon-Alexa-Skill
198ed51bef555eee006041fef0bcbf5c955142d5
[ "MIT" ]
null
null
null
Adelphi Academic Calendar/skill/skill_env/Lib/site-packages/boto3/resources/model.py
EnriqueGambra/Amazon-Alexa-Skill
198ed51bef555eee006041fef0bcbf5c955142d5
[ "MIT" ]
1
2019-10-11T17:15:20.000Z
2019-10-11T17:15:20.000Z
# Copyright 2014 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...
33.18138
76
0.580786
import logging from botocore import xform_name logger = logging.getLogger(__name__) class Identifier(object): def __init__(self, name, member_name=None): self.name = name self.member_name = member_name class Action(object): def __init__(self, name, definition, resou...
true
true
f7294784dcc053aeffd8754227f4e4a12d8b0f39
9,686
py
Python
rstbx/simage/explore_completeness.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
rstbx/simage/explore_completeness.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
rstbx/simage/explore_completeness.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division from six.moves import range import libtbx import sys class stats_manager(libtbx.slots_getstate_setstate): __slots__ = [ "i_calc", "use_symmetry", "n_indices", "completeness_history", "min_count_history", "counts", "currently_zero", "new_0"] def __in...
33.515571
78
0.675408
from __future__ import division from six.moves import range import libtbx import sys class stats_manager(libtbx.slots_getstate_setstate): __slots__ = [ "i_calc", "use_symmetry", "n_indices", "completeness_history", "min_count_history", "counts", "currently_zero", "new_0"] def __in...
false
true
f72947ac9f07322c8993ddf9e0c52af9e4ac8187
330,339
py
Python
app/config/avatarinfo.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
null
null
null
app/config/avatarinfo.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
null
null
null
app/config/avatarinfo.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
2
2019-02-18T03:49:52.000Z
2020-03-03T16:42:02.000Z
# -*- coding: utf-8 -*- ''' Author: Hannibal Data: Desc: local data config NOTE: Don't modify this file, it's build by xml-to-python!!! ''' avatarinfo_map = {}; avatarinfo_map[1] = {"id":1,"info_data":[{"aid":0,"w":512,"h":512,"path":"role/human/stand/all.atlas","total":8,"speed":8,"prefix":"role/human/stand/all/",...
1,241.87594
1,940
0.650093
avatarinfo_map = {}; avatarinfo_map[1] = {"id":1,"info_data":[{"aid":0,"w":512,"h":512,"path":"role/human/stand/all.atlas","total":8,"speed":8,"prefix":"role/human/stand/all/","dir":"7,7,3,3,3,3,7,7","mirror":1,"dir4":0,"link":"role/human/stand/stand.lk",},{"aid":1,"w":512,"h":512,"path":"role/human/run/all.atlas",...
true
true
f72947e8280ccd02ea7e175d8af516ba5d7a2c08
18,043
py
Python
vis_utils/graphics/geometry/splines.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
4
2020-05-20T03:55:19.000Z
2020-12-24T06:33:40.000Z
vis_utils/graphics/geometry/splines.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
1
2020-05-18T11:21:35.000Z
2020-07-07T21:25:57.000Z
vis_utils/graphics/geometry/splines.py
eherr/vis_utils
b757b01f42e6da02ad62130c3b0e61e9eaa3886f
[ "MIT" ]
1
2020-07-20T06:57:13.000Z
2020-07-20T06:57:13.000Z
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merg...
38.307856
208
0.592529
import numpy as np import scipy.interpolate as si import math from .utils import closestLowerValueBinarySearch B_SPLINE_DEGREE=3 class BSplineWrapper(object): def __init__(self, points, degree=B_SPLINE_DEGREE, domain=None): self.points = np.array(points) if isinstanc...
true
true
f729480afa55183b14180203d863eeaa07548e19
777
py
Python
image_email_car.py
vibhorkrishna/SHADY
2882b079d47d9e6b628820ccdb9246ef25288bc1
[ "MIT" ]
16
2020-10-17T15:24:04.000Z
2022-03-25T19:33:36.000Z
image_email_car.py
yugantsingh/S.H.A.D.Y
2882b079d47d9e6b628820ccdb9246ef25288bc1
[ "MIT" ]
5
2020-10-17T15:28:18.000Z
2021-08-08T03:54:24.000Z
image_email_car.py
yugantsingh/S.H.A.D.Y
2882b079d47d9e6b628820ccdb9246ef25288bc1
[ "MIT" ]
7
2021-04-19T18:12:29.000Z
2022-03-20T12:34:51.000Z
import os import smtplib from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart def SendMail(ImgFileName): img_data = open(ImgFileName, 'rb').read() msg = MIMEMultipart() msg['Subject'] = 'Crash Alert' msg['From'] = 'sample@gmail.com....
29.884615
87
0.685972
import os import smtplib from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart def SendMail(ImgFileName): img_data = open(ImgFileName, 'rb').read() msg = MIMEMultipart() msg['Subject'] = 'Crash Alert' msg['From'] = 'sample@gmail.com....
true
true
f729488ad6693c34933ba3d23d7e87235a0fa288
6,951
py
Python
tensorflow_federated/python/aggregators/quantile_estimation_test.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
1
2022-02-08T01:11:14.000Z
2022-02-08T01:11:14.000Z
tensorflow_federated/python/aggregators/quantile_estimation_test.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/aggregators/quantile_estimation_test.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.39267
80
0.727233
import collections from absl.testing import parameterized import numpy as np import tensorflow as tf import tensorflow_privacy as tfp from tensorflow_federated.python.aggregators import quantile_estimation from tensorflow_federated.python.core.api import test_case from tensorflow_federated.python.core.b...
true
true
f7294897198f440d03f45b003bcec4d8b534ebe2
518
py
Python
server/cria_banco.py
henriquechavesm/hotels-api-flask
e17b66b53b27e57d41ca5d3d4f315faa9bc1169f
[ "Unlicense" ]
null
null
null
server/cria_banco.py
henriquechavesm/hotels-api-flask
e17b66b53b27e57d41ca5d3d4f315faa9bc1169f
[ "Unlicense" ]
null
null
null
server/cria_banco.py
henriquechavesm/hotels-api-flask
e17b66b53b27e57d41ca5d3d4f315faa9bc1169f
[ "Unlicense" ]
null
null
null
import sqlite3 connection = sqlite3.connect('banco.db') cursor = connection.cursor() cria_tabela = """ CREATE TABLE IF NOT EXISTS hoteis (hotel_id text PRIMARY KEY, nome text, estrelas real, diaria real, cidade text) """ cria_hotel = ""...
25.9
74
0.600386
import sqlite3 connection = sqlite3.connect('banco.db') cursor = connection.cursor() cria_tabela = """ CREATE TABLE IF NOT EXISTS hoteis (hotel_id text PRIMARY KEY, nome text, estrelas real, diaria real, cidade text) """ cria_hotel = ""...
true
true
f72949945e04b9a725eeea351dfa6ae431ff5dc2
2,706
py
Python
chemdataextractor/relex/pattern.py
cjcourt/cdesnowball
ed08637a06d72d3ef83296bfb686a682df0d4443
[ "MIT" ]
13
2018-06-25T14:07:07.000Z
2022-02-16T17:00:11.000Z
chemdataextractor/relex/pattern.py
cjcourt/cdesnowball
ed08637a06d72d3ef83296bfb686a682df0d4443
[ "MIT" ]
null
null
null
chemdataextractor/relex/pattern.py
cjcourt/cdesnowball
ed08637a06d72d3ef83296bfb686a682df0d4443
[ "MIT" ]
4
2020-02-26T08:34:26.000Z
2021-03-18T17:33:36.000Z
# -*- coding: utf-8 -*- """ chemdataextractor.relex.pattern.py Extraction pattern object """ """ Modify generate_cde_element() function to adapt the changes of phrase.py. If any prefix/middle/suffix are empty (blank), do not add it to the resulting phrase. Modified by jz449 """ import re from ..parse.element...
33.407407
90
0.589061
import re from ..parse.elements import I, W, R, Any, And, Start, OneOrMore, Group class Pattern: def __init__(self, entities=None, elements=None, label=None, sentences=None, order=None, relations=None, confidence=0): ...
true
true
f7294b4c8ab15cf32eb5a8981f5001dc4da902e2
879
py
Python
isi_sdk_9_0_0/test/test_network_pools.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/test/test_network_pools.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/test/test_network_pools.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
21.439024
81
0.697383
from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from isi_sdk_9_0_0.models.network_pools import NetworkPools from isi_sdk_9_0_0.rest import ApiException class TestNetworkPools(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testN...
true
true
f7294b570e2d193311252cd752179c1f4eb9c82e
2,706
py
Python
test/builddir/gyptest-all.py
cxm95/GYP-r1831
027f09366443871acb43d0dbbbb33ad5dec5b4e2
[ "BSD-3-Clause" ]
34
2015-01-14T03:21:08.000Z
2020-04-26T10:06:56.000Z
core/deps/gyp/test/builddir/gyptest-all.py
K-Constantine/Amaraki
e8736e4754af62a8510c3a5db8a72df48f7681a7
[ "MIT" ]
11
2015-01-02T19:56:56.000Z
2018-07-27T12:34:02.000Z
core/deps/gyp/test/builddir/gyptest-all.py
K-Constantine/Amaraki
e8736e4754af62a8510c3a5db8a72df48f7681a7
[ "MIT" ]
29
2015-02-13T00:18:53.000Z
2021-02-10T23:38:58.000Z
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify the settings that cause a set of programs to be created in a specific build directory, and that no intermediate built files get c...
31.465116
79
0.730599
import TestGyp # TODO(mmoss) Make also has the issue that the top-level Makefile is written to # the "--depth" location, which is one level above 'src', but then this test # moves 'src' somewhere else, leaving the Makefile behind, so make can't find # directory, or if the test is wrong for assuming everyth...
true
true
f7294b6ffbaf75a83851d733c5336d7d9ba71f9d
1,652
py
Python
Tools/scripts/win_add2path.py
hbbtstar/cpython
ce6ab1eb7483f66347188305bbbb7e3388794ad8
[ "PSF-2.0" ]
null
null
null
Tools/scripts/win_add2path.py
hbbtstar/cpython
ce6ab1eb7483f66347188305bbbb7e3388794ad8
[ "PSF-2.0" ]
null
null
null
Tools/scripts/win_add2path.py
hbbtstar/cpython
ce6ab1eb7483f66347188305bbbb7e3388794ad8
[ "PSF-2.0" ]
null
null
null
"""Add Python to the search path on Windows This is a simple script to add Python to the Windows search path. It modifies the current user (HKCU) tree of the registry. Copyright (c) 2008 by Christian Heimes <christian@cheimes.de> Licensed to PSF under a Contributor Agreement. """ import sys import site import os imp...
28
70
0.645884
"""Add Python to the search path on Windows This is a simple script to add Python to the Windows search path. It modifies the current user (HKCU) tree of the registry. Copyright (c) 2008 by Christian Heimes <christian@cheimes.de> Licensed to PSF under a Contributor Agreement. """ import sys import site import os imp...
false
true
f7294b77d995638db74a6d560aad123bfb7def06
15,973
py
Python
autobahn/wamp/test/test_user_handler_errors.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
1,670
2015-10-12T15:46:22.000Z
2022-03-30T22:12:53.000Z
autobahn/wamp/test/test_user_handler_errors.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
852
2015-10-16T22:11:03.000Z
2022-03-27T07:57:01.000Z
autobahn/wamp/test/test_user_handler_errors.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
790
2015-10-15T08:46:12.000Z
2022-03-30T12:22:13.000Z
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in ...
39.832918
79
0.615476
rror showed up in the self.assertEqual(1, len(session.errors)) self.assertEqual(exception, session.errors[0][0]) self.assertEqual(1, len(session._transport.messages)) reply = session._transport.messages[0] self.assertIsInstance(reply, message.Abor...
true
true
f7294c405e804b007ba7b92b289de9b8c65cad1c
11,133
py
Python
platformio/project/options.py
FastEmbedded/platformio-core
a481a5dedad8c45fa5fe362b47eb1e9876938bc5
[ "Apache-2.0" ]
null
null
null
platformio/project/options.py
FastEmbedded/platformio-core
a481a5dedad8c45fa5fe362b47eb1e9876938bc5
[ "Apache-2.0" ]
null
null
null
platformio/project/options.py
FastEmbedded/platformio-core
a481a5dedad8c45fa5fe362b47eb1e9876938bc5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.864238
88
0.536783
import os from collections import OrderedDict, namedtuple import click ConfigOptionClass = namedtuple( "ConfigOption", [ "scope", "name", "type", "multiple", "sysenvvar", "buildenvvar", "oldnames", "default", ], ) def Config...
true
true
f7294e0ad4c7650c40bcba9faef45623896783b6
498
py
Python
plotly/validators/violin/hoverlabel/font/_familysrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/violin/hoverlabel/font/_familysrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/violin/hoverlabel/font/_familysrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='familysrc', parent_name='violin.hoverlabel.font', **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plo...
26.210526
68
0.610442
import _plotly_utils.basevalidators class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='familysrc', parent_name='violin.hoverlabel.font', **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=plo...
true
true
f7294e7f641f154afe0e379c73bf47c73bcb2ef9
5,005
py
Python
cme/modules/adcs.py
jim-fun/CrackMapExec
25686f4271b87f32bbef5701125245fd1eb8575c
[ "BSD-2-Clause" ]
null
null
null
cme/modules/adcs.py
jim-fun/CrackMapExec
25686f4271b87f32bbef5701125245fd1eb8575c
[ "BSD-2-Clause" ]
5
2021-07-27T11:31:49.000Z
2022-03-19T00:09:41.000Z
cme/modules/adcs.py
jim-fun/CrackMapExec
25686f4271b87f32bbef5701125245fd1eb8575c
[ "BSD-2-Clause" ]
null
null
null
import re from impacket.ldap import ldap, ldapasn1 from impacket.ldap.ldap import LDAPSearchError class CMEModule: ''' Find PKI Enrollment Services in Active Directory and Certificate Templates Names. Module by Tobias Neitzel (@qtc_de) and Sam Freeside (@snovvcrash) ''' name = 'adcs' descript...
40.04
157
0.575824
import re from impacket.ldap import ldap, ldapasn1 from impacket.ldap.ldap import LDAPSearchError class CMEModule: name = 'adcs' description = 'Find PKI Enrollment Services in Active Directory and Certificate Templates Names' supported_protocols = ['ldap'] opsec_safe= True multiple_hosts = True ...
true
true
f7294f27a6283273ffe98b0239f510ab3c7e0687
7,024
py
Python
src/python/scripts/rsao/reverbObjectBinauralisation_flexible.py
s3a-spatialaudio/VISR
55f6289bc5058d4898106f3520e1a60644ffb3ab
[ "ISC" ]
17
2019-03-12T14:52:22.000Z
2021-11-09T01:16:23.000Z
src/python/scripts/rsao/reverbObjectBinauralisation_flexible.py
s3a-spatialaudio/VISR
55f6289bc5058d4898106f3520e1a60644ffb3ab
[ "ISC" ]
null
null
null
src/python/scripts/rsao/reverbObjectBinauralisation_flexible.py
s3a-spatialaudio/VISR
55f6289bc5058d4898106f3520e1a60644ffb3ab
[ "ISC" ]
2
2019-08-11T12:53:07.000Z
2021-06-22T10:08:08.000Z
# -*- coding: utf-8 -*- """ Created on Tue Feb 14 15:59:11 2017 @author: af5u13 """ # Usage for debugging from raw Python console #exec(open("/Users/af5u13/dev/visr/src/python/scripts/rsao/reverbObjectBinauralisation.py").read()) import visr import signalflows import panning import pml import rbbl import rcl im...
43.9
242
0.604784
import visr import signalflows import panning import pml import rbbl import rcl import rrl import h5py import numpy as np; import matplotlib.pyplot as plt import os class ReverbToBinaural( visr.CompositeComponent ): def __init__( self, context, name, parent, loudspeakerConfig, ...
true
true
f7294fc1c05c8e2ec65a218654cd6859e059a4d9
1,410
py
Python
stasians_help/urls.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
stasians_help/urls.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
stasians_help/urls.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
"""stasians_help URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
36.153846
77
0.703546
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from profiles.views import RegistrationView urlpatterns = [ path('admin/', admin.site.urls), path('', include('main.urls')), path('', include('django.contrib...
true
true
f72951655290a417050aa4a7bd1e7df075ef3d8e
2,724
py
Python
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
2
2017-03-08T21:44:54.000Z
2019-01-16T06:00:16.000Z
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
3
2017-01-26T13:26:31.000Z
2017-02-03T14:51:45.000Z
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
5
2016-12-28T15:26:02.000Z
2017-01-30T08:46:10.000Z
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
29.608696
79
0.694934
import ctx from cloudify.decorators import operation import cloudify_nsx.library.nsx_security_group as nsx_security_group import cloudify_nsx.library.nsx_common as common @operation def create(**kwargs): kwargs = common.get_properties_update( 'dynamic_member', "security_group_id", kwargs, target_r...
true
true
f72952454d33ac0f2dae5c1c5a1bd988604b76af
1,183
py
Python
vendors/rez-2.23.1-py2.7/rez/tests/data/builds/packages/anti/1.0.0/rezbuild.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
4
2019-01-11T03:41:28.000Z
2019-09-12T06:57:17.000Z
vendors/rez-2.23.1-py2.7/rez/tests/data/builds/packages/anti/1.0.0/rezbuild.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
null
null
null
vendors/rez-2.23.1-py2.7/rez/tests/data/builds/packages/anti/1.0.0/rezbuild.py
ColinKennedy/tk-config-default2-respawn
855fb8033daa549b92615792442f19a7f9c4f55c
[ "Linux-OpenIB" ]
2
2019-01-10T05:00:18.000Z
2020-02-15T16:32:56.000Z
from build_util import build_directory_recurse, check_visible def build(source_path, build_path, install_path, targets): # normal requirement 'foo' should be visible check_visible('anti', 'build_util') check_visible('anti', 'floob') import floob floob.hello() try: import loco ...
34.794118
87
0.7388
from build_util import build_directory_recurse, check_visible def build(source_path, build_path, install_path, targets): check_visible('anti', 'build_util') check_visible('anti', 'floob') import floob floob.hello() try: import loco raise Exception('loco should not be here') ...
false
true
f72952743caf8d0c5c27e3e7e4c081a234332a37
3,477
py
Python
zql-backend/gateway/server.py
Zubdano/zql
2e1ec981da60cfd41ad743bc38950c97e506c2c8
[ "MIT" ]
null
null
null
zql-backend/gateway/server.py
Zubdano/zql
2e1ec981da60cfd41ad743bc38950c97e506c2c8
[ "MIT" ]
4
2017-09-25T04:35:01.000Z
2017-12-18T04:15:04.000Z
zql-backend/gateway/server.py
Zubdano/zql
2e1ec981da60cfd41ad743bc38950c97e506c2c8
[ "MIT" ]
null
null
null
from functools import wraps import os from client import AuthDecorator, HttpClient from flask import Flask, jsonify, request, g from flask_pymongo import PyMongo from auth import create_user, get_user_by_token, login_user from errors import APIError app = Flask(__name__) mongo_uri = 'mongodb://{}:{}@ds259325.mlab.c...
28.975
102
0.681622
from functools import wraps import os from client import AuthDecorator, HttpClient from flask import Flask, jsonify, request, g from flask_pymongo import PyMongo from auth import create_user, get_user_by_token, login_user from errors import APIError app = Flask(__name__) mongo_uri = 'mongodb://{}:{}@ds259325.mlab.c...
true
true
f72954110ae79bca59ed580f3fd05ba732181949
912
py
Python
test/test_devices_location.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
test/test_devices_location.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
test/test_devices_location.py
metacore-io/metacore-api-client-python
37d6127442e7a56deeedb88bf50b83e5d24fa7b0
[ "MIT" ]
null
null
null
# coding: utf-8 """ Metacore IoT Object Storage API Metacore Object Storage - IOT Core Services # noqa: E501 OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import metacore_api_python_cli fr...
22.8
97
0.712719
from __future__ import absolute_import import unittest import metacore_api_python_cli from models.devices_location import DevicesLocation from metacore_api_python_cli.rest import ApiException class TestDevicesLocation(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
f72955f215fe61b946fdd28a4d4aa254ec154e6f
12,150
py
Python
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_http_sink.py
roofurmston/argo-workflows
79a95f223396ecab408d831781ab2d38d1fa6de0
[ "Apache-2.0" ]
7,643
2017-08-22T22:10:45.000Z
2021-02-09T17:13:12.000Z
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_http_sink.py
roofurmston/argo-workflows
79a95f223396ecab408d831781ab2d38d1fa6de0
[ "Apache-2.0" ]
4,183
2017-08-22T22:45:29.000Z
2021-02-09T17:41:29.000Z
sdks/python/client/argo_workflows/model/github_com_argoproj_labs_argo_dataflow_api_v1alpha1_http_sink.py
isubasinghe/argo-workflows
1a6e94f1d490e2265c977514d698a1ca70e14fe3
[ "Apache-2.0" ]
1,524
2017-08-22T22:10:53.000Z
2021-02-09T16:26:16.000Z
""" Argo Server API You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501 The version of the OpenAPI document: VERSION Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from ...
45
155
0.586091
import re import sys from argo_workflows.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) fro...
true
true
f729566fe91c9de71b375817c0d66671b3a74995
1,517
py
Python
tagger/build_data.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
3
2017-11-18T11:41:46.000Z
2020-02-13T19:22:28.000Z
tagger/build_data.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
4
2017-09-01T05:28:49.000Z
2017-11-20T05:27:49.000Z
tagger/build_data.py
jtraviesor/alfred-tf-trainer
9747d24bef418415a31abfe0c9982d2f1d9d8298
[ "MIT" ]
1
2018-06-08T03:55:32.000Z
2018-06-08T03:55:32.000Z
from config import config from data_utils import CoNLLDataset, get_vocabs, UNK, NUM, \ get_glove_vocab, write_vocab, load_vocab, get_char_vocab, \ export_trimmed_glove_vectors, get_processing_word def build_data(config): """ Procedure to build data Args: config: defines attributes needed ...
31.604167
69
0.723797
from config import config from data_utils import CoNLLDataset, get_vocabs, UNK, NUM, \ get_glove_vocab, write_vocab, load_vocab, get_char_vocab, \ export_trimmed_glove_vectors, get_processing_word def build_data(config): processing_word = get_processing_word(lowercase=config.lowercase) dev = C...
true
true
f72958c3092e5fbc2e266cb6c554d971f5957e0b
204
py
Python
hls4ml/writer/__init__.py
ngpaladi/hls4ml
54861d0f611ee72f779a8f739b5fac571f3e79c2
[ "Apache-2.0" ]
1
2022-02-05T14:20:22.000Z
2022-02-05T14:20:22.000Z
hls4ml/writer/__init__.py
ngpaladi/hls4ml
54861d0f611ee72f779a8f739b5fac571f3e79c2
[ "Apache-2.0" ]
2
2020-12-04T15:38:30.000Z
2021-04-27T13:54:43.000Z
hls4ml/writer/__init__.py
ngpaladi/hls4ml
54861d0f611ee72f779a8f739b5fac571f3e79c2
[ "Apache-2.0" ]
2
2021-02-16T21:15:53.000Z
2021-04-01T03:51:52.000Z
from __future__ import absolute_import from hls4ml.writer.writers import Writer, register_writer, get_writer from hls4ml.writer.vivado_writer import VivadoWriter register_writer('Vivado', VivadoWriter)
29.142857
69
0.857843
from __future__ import absolute_import from hls4ml.writer.writers import Writer, register_writer, get_writer from hls4ml.writer.vivado_writer import VivadoWriter register_writer('Vivado', VivadoWriter)
true
true
f7295938f7a5c8eb813df1e080d84cb28c749497
1,628
py
Python
rally/cli/commands/info.py
LorenzoBianconi/rally
2bbd7ee590cca048fb4ad6a8eefc484989979ff8
[ "Apache-2.0" ]
1
2021-09-29T02:16:09.000Z
2021-09-29T02:16:09.000Z
rally/cli/commands/info.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-14T11:29:31.000Z
2020-07-14T11:29:31.000Z
rally/cli/commands/info.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-02T01:33:48.000Z
2020-07-02T01:33:48.000Z
# Copyright 2014: Mirantis Inc. # 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 b...
33.22449
79
0.675676
from __future__ import print_function from rally.cli import cliutils from rally.cli.commands import plugin class InfoCommands(object): @cliutils.args("--query", dest="query", type=str, help="Search query.") def find(self, query): print("This command was deprecated, and will be removed...
true
true
f7295961f8b3fe13c736ae75dbcee162064cec07
6,096
py
Python
qa/rpc-tests/proxy_test.py
andimion666/OBX
fa1405ff9af31514cc1e126beeba56bb9655615f
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
andimion666/OBX
fa1405ff9af31514cc1e126beeba56bb9655615f
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
andimion666/OBX
fa1405ff9af31514cc1e126beeba56bb9655615f
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.753425
145
0.652887
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): ...
true
true
f7295a30c9b7f3ca58b9c2c3b7b2714e4c9b5bfd
1,670
py
Python
paradocx/util.py
yougov/paradocx
e525b3cdb54af6896fc941ef03c2be4275443bcf
[ "MIT" ]
3
2018-07-24T19:17:14.000Z
2020-02-09T23:49:03.000Z
paradocx/util.py
jaraco/paradocx
123405b97fc82f60f4bd47cae465802f8063024b
[ "MIT" ]
4
2018-03-03T17:45:17.000Z
2021-07-06T02:51:30.000Z
paradocx/util.py
jaraco/paradocx
123405b97fc82f60f4bd47cae465802f8063024b
[ "MIT" ]
2
2021-02-13T17:21:24.000Z
2022-03-26T07:43:00.000Z
from lxml.etree import fromstring, tostring from lxml import builder from openpack.basepack import ooxml_namespaces docx_namespaces = { 'w': "http://schemas.openxmlformats.org/wordprocessingml/2006/main", 'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', 've': 'http://schemas.ope...
31.509434
85
0.705988
from lxml.etree import fromstring, tostring from lxml import builder from openpack.basepack import ooxml_namespaces docx_namespaces = { 'w': "http://schemas.openxmlformats.org/wordprocessingml/2006/main", 'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', 've': 'http://schemas.ope...
true
true
f7295a49a03b25e52668055172a342ad19df66e4
5,865
py
Python
tests/base/test_multitenancy.py
santhoshpkumar/rasa-nul-ramsi
a9334e11400ac75d6eb4dee6bafe55ccb3c51f68
[ "Apache-2.0" ]
1,304
2017-11-15T08:33:44.000Z
2022-03-30T09:05:12.000Z
tests/base/test_multitenancy.py
siddas27/rasa_nlu
91d874e834dda3be91bdfaba944ac772192f207e
[ "Apache-2.0" ]
94
2017-11-15T11:44:50.000Z
2021-12-19T11:48:11.000Z
tests/base/test_multitenancy.py
siddas27/rasa_nlu
91d874e834dda3be91bdfaba944ac772192f207e
[ "Apache-2.0" ]
397
2017-11-11T09:02:01.000Z
2022-03-18T08:04:38.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import pytest from treq.testing import StubTreq from rasa_nlu import config from rasa_nlu.config import RasaNLUModelCo...
34.5
82
0.656777
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import pytest from treq.testing import StubTreq from rasa_nlu import config from rasa_nlu.config import RasaNLUModelConfig from rasa_nlu.data...
true
true
f7295b2e8f0955e1ef2f661ebd9f5ac7666ac0d0
11,869
py
Python
mayan/apps/document_indexing/apps.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/document_indexing/apps.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/document_indexing/apps.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
114
2015-01-08T20:21:05.000Z
2018-12-10T19:07:53.000Z
from django.apps import apps from django.db.models.signals import post_delete, post_save, pre_delete from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.acls.permissions import permission_acl_edit, permission_acl_view from mayan.apps.common.apps i...
36.975078
95
0.656669
from django.apps import apps from django.db.models.signals import post_delete, post_save, pre_delete from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.acls.permissions import permission_acl_edit, permission_acl_view from mayan.apps.common.apps i...
true
true