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
79036be5b5f1fba5f514be0590b1bc5f815bec38
1,549
py
Python
manual_crawler.py
seanbreckenridge/MALUserVsAverage
8cc9c6bc3d19a1a0470235bd069e0fed632b1088
[ "Unlicense" ]
null
null
null
manual_crawler.py
seanbreckenridge/MALUserVsAverage
8cc9c6bc3d19a1a0470235bd069e0fed632b1088
[ "Unlicense" ]
null
null
null
manual_crawler.py
seanbreckenridge/MALUserVsAverage
8cc9c6bc3d19a1a0470235bd069e0fed632b1088
[ "Unlicense" ]
null
null
null
import requests import time from bs4 import BeautifulSoup class crawl: """Keep track of time between scrape requests. args: wait: time between requests retry_max: number of times to retry """ def __init__(self, wait, retry_max): self.wait = wait self.retry_max = retry_...
29.226415
80
0.550032
import requests import time from bs4 import BeautifulSoup class crawl: def __init__(self, wait, retry_max): self.wait = wait self.retry_max = retry_max self.last_scrape = time.time() - (self.wait * 0.5) def since_scrape(self): return (time.time() - self.last_scrape) ...
true
true
79036c0074e467d7ce8b933e2563f2eeea9c3720
1,920
py
Python
ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/blacklisted_set.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/blacklisted_set.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/blacklisted_set.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); y...
25.945946
72
0.697917
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use thi...
false
true
79036c7370b3b6c2a59581cb2b70b6b7c349b2a7
3,603
py
Python
tests/sources/test_header_version.py
junjihashimoto/webots
12eb8c010275f390ae97d91d5c04906ffa00c262
[ "Apache-2.0" ]
null
null
null
tests/sources/test_header_version.py
junjihashimoto/webots
12eb8c010275f390ae97d91d5c04906ffa00c262
[ "Apache-2.0" ]
null
null
null
tests/sources/test_header_version.py
junjihashimoto/webots
12eb8c010275f390ae97d91d5c04906ffa00c262
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 1996-2019 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.943182
120
0.611157
import unittest import os import fnmatch ignoredProtos = [ 'projects/robots/mobsya/thymio/controllers/thymio2_aseba/aseba/clients/studio/plugins/ThymioVPL/UsageProfile.proto', 'projects/samples/tutorials/protos/FourWheelsRobot.proto' ] skippedDirectories = [ 'dependencies', 'distributi...
true
true
79036ca5647a8c4ae722fb21e378769c2f0a26a7
18,450
py
Python
sdks/python/apache_beam/io/avroio_test.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-08-25T21:17:10.000Z
2020-08-25T21:17:10.000Z
sdks/python/apache_beam/io/avroio_test.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
sdks/python/apache_beam/io/avroio_test.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
36.247544
80
0.692466
from __future__ import absolute_import from __future__ import division import json import logging import math import os import tempfile import unittest from builtins import range from typing import List import sys import future.tests.base import hamcrest as hc import avro import avro.datafile fr...
true
true
79036e10662062fbef5a2426ab989a8a22a76e17
176,147
py
Python
azure_compute/komand_azure_compute/actions/list_vm/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
azure_compute/komand_azure_compute/actions/list_vm/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
azure_compute/komand_azure_compute/actions/list_vm/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: RESOURCEGROUP = "resourceGroup" SUBSCRIPTIONID = "subscriptionId" class Output: VALUE = "value" class ListVmInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "proper...
37.224641
177
0.39752
import komand import json class Input: RESOURCEGROUP = "resourceGroup" SUBSCRIPTIONID = "subscriptionId" class Output: VALUE = "value" class ListVmInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "resourceGroup": { "...
true
true
79036f096fea5eaae0c7bd3e84ab079718fe2a88
1,992
py
Python
wbb/modules/webss.py
TAMILVIP007/WilliamButcherBot
e7a02edcd57ec62c7f80c601484e92e257e1d5bf
[ "MIT" ]
1
2021-06-30T07:09:45.000Z
2021-06-30T07:09:45.000Z
wbb/modules/webss.py
fakeenemy01/GroupBot
e7a02edcd57ec62c7f80c601484e92e257e1d5bf
[ "MIT" ]
null
null
null
wbb/modules/webss.py
fakeenemy01/GroupBot
e7a02edcd57ec62c7f80c601484e92e257e1d5bf
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 TheHamkerCat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
36.888889
78
0.705823
from pyrogram import filters from wbb import app from wbb.core.decorators.errors import capture_err __MODULE__ = "WebSS" __HELP__ = "/webss | .webss [URL] - Take A Screenshot Of A Webpage" @app.on_message(filters.command("webss")) @capture_err async def take_ss(_, message): try: if len(message.command) ...
true
true
79036fb8927da1a20e29d990f89eb1771a371915
27,299
py
Python
core/server.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
null
null
null
core/server.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
null
null
null
core/server.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. ''' In this file, we define the classes that live inside 'worker 0', the worker responsible for orchestration and aggregation. The main class is the OptimizationServer, which sends clients to the other workers to process and combines the resulting...
45.271973
121
0.590534
import json import logging import os import random import shutil import time from collections import defaultdict import numpy as np import torch from core.globals import TRAINING_FRAMEWORK_TYPE if TRAINING_FRAMEWORK_TYPE == 'mpi': import core.federated as federated else: raise NotImplementedError('{} is n...
true
true
7903713a400493826bb2db2002ac25915a1e24f0
1,895
py
Python
webapp/external_access.py
Quoding/petricore
c2275db64a567ec5dc8db1f4283969dfb749572a
[ "MIT" ]
null
null
null
webapp/external_access.py
Quoding/petricore
c2275db64a567ec5dc8db1f4283969dfb749572a
[ "MIT" ]
2
2020-01-23T15:24:08.000Z
2020-03-23T19:16:45.000Z
webapp/external_access.py
calculquebec/petricore
c2275db64a567ec5dc8db1f4283969dfb749572a
[ "MIT" ]
null
null
null
import pymysql.cursors import ldap def get_domain_name(): """ Returns the domain name of the current configuration from a config file Returns ------- string the domain name """ with open("/var/www/logic_webapp/webapp_config") as file: line = file.readline() dom...
25.608108
87
0.626385
import pymysql.cursors import ldap def get_domain_name(): with open("/var/www/logic_webapp/webapp_config") as file: line = file.readline() domain = line.split("=")[1].rstrip() return domain def get_db_password(): with open("/var/www/logic_webapp/webapp_config") as file: lin...
true
true
790371466426bec98edb736c5dd24251f6ac2343
1,250
py
Python
test/test_data_protection_officer.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
test/test_data_protection_officer.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
5
2021-12-19T10:29:43.000Z
2022-03-31T22:15:37.000Z
test/test_data_protection_officer.py
mydatamyconsent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
""" My Data My Consent - Developer API Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and upd...
33.783784
469
0.7448
import sys import unittest import com.mydatamyconsent from com.mydatamyconsent.model.data_protection_officer import DataProtectionOfficer class TestDataProtectionOfficer(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testDataProtectionOfficer(self): ...
true
true
790371ae35706b91f27bf2d89e39770f3441a18b
4,910
py
Python
superset/sql_parse.py
gabe-lyons/incubator-superset
7669cdb8c51bcc3f298aff2a14cbfeea3cbf5f13
[ "Apache-2.0" ]
4
2018-07-25T17:12:13.000Z
2020-12-28T10:26:53.000Z
superset/sql_parse.py
ksangeet9ap/incubator-superset
f417172071503e48bdbbe00d8254c204928a5d3e
[ "Apache-2.0" ]
1
2018-02-22T23:29:06.000Z
2018-02-23T21:44:00.000Z
superset/sql_parse.py
ksangeet9ap/incubator-superset
f417172071503e48bdbbe00d8254c204928a5d3e
[ "Apache-2.0" ]
4
2020-03-07T11:58:42.000Z
2020-05-26T02:07:27.000Z
# -*- coding: utf-8 -*- # pylint: disable=C,R,W from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import sqlparse from sqlparse.sql import Identifier, IdentifierList from sqlparse.tokens import Keyword, N...
34.822695
79
0.614868
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import sqlparse from sqlparse.sql import Identifier, IdentifierList from sqlparse.tokens import Keyword, Name RESULT_OPERATIONS = {'UNION', 'INTERSECT'...
true
true
7903730eae04facba1aeb2dc3266fd3633c7ab6a
1,184
py
Python
api/tests/routes/test_detection.py
mzeidhassan/doctr
14b376e07d31b09b6bd31bceebf6ffb477c30f08
[ "Apache-2.0" ]
1
2021-09-26T06:03:10.000Z
2021-09-26T06:03:10.000Z
api/tests/routes/test_detection.py
mzeidhassan/doctr
14b376e07d31b09b6bd31bceebf6ffb477c30f08
[ "Apache-2.0" ]
null
null
null
api/tests/routes/test_detection.py
mzeidhassan/doctr
14b376e07d31b09b6bd31bceebf6ffb477c30f08
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. import pytest import numpy as np from scipy.optimize import linear_sum_assignment from doctr.utils.metrics import box_iou @p...
39.466667
98
0.714527
import pytest import numpy as np from scipy.optimize import linear_sum_assignment from doctr.utils.metrics import box_iou @pytest.mark.asyncio async def test_text_detection(test_app_asyncio, mock_detection_image): response = await test_app_asyncio.post("/detection", files={'file': mock_detection_image}) ...
true
true
790373ab0d7769df144ec513b502f523788f4b22
2,534
py
Python
mypy/infer.py
ooprathamm/mypy
1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac
[ "PSF-2.0" ]
null
null
null
mypy/infer.py
ooprathamm/mypy
1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac
[ "PSF-2.0" ]
null
null
null
mypy/infer.py
ooprathamm/mypy
1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac
[ "PSF-2.0" ]
null
null
null
"""Utilities for type argument inference.""" from typing import List, Optional, Sequence, NamedTuple from mypy.constraints import ( infer_constraints, infer_constraints_for_callable, SUBTYPE_OF, SUPERTYPE_OF ) from mypy.types import Type, TypeVarId, CallableType, Instance from mypy.nodes import ArgKind f...
40.222222
82
0.649566
from typing import List, Optional, Sequence, NamedTuple from mypy.constraints import ( infer_constraints, infer_constraints_for_callable, SUBTYPE_OF, SUPERTYPE_OF ) from mypy.types import Type, TypeVarId, CallableType, Instance from mypy.nodes import ArgKind from mypy.solve import solve_constraints c...
true
true
79037536069031e76e3ee7cee6b042cb0e25ffa4
2,897
py
Python
Broca/faq_engine/agent.py
lawRossi/Broca
7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d
[ "MIT" ]
3
2021-05-10T06:36:21.000Z
2021-05-10T06:47:31.000Z
Broca/faq_engine/agent.py
lawRossi/Broca
7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d
[ "MIT" ]
null
null
null
Broca/faq_engine/agent.py
lawRossi/Broca
7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d
[ "MIT" ]
null
null
null
""" @Author: Rossi Created At: 2021-02-21 """ import json import time from mako.template import Template from Broca.faq_engine.index import ESIndex, VectorIndex from Broca.message import BotMessage class FAQAgent: def __init__(self, agent_name, es_index, vector_index, threshold, topk, prompt_threshold, ...
39.684932
132
0.669313
import json import time from mako.template import Template from Broca.faq_engine.index import ESIndex, VectorIndex from Broca.message import BotMessage class FAQAgent: def __init__(self, agent_name, es_index, vector_index, threshold, topk, prompt_threshold, template, prompt_template): self...
true
true
790375eb79545b153373de236a12b78776be585b
578
py
Python
Python Aulas/Mundo 1/Aula 010c.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
Python Aulas/Mundo 1/Aula 010c.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
Python Aulas/Mundo 1/Aula 010c.py
rodrigobarbonifilho/Python
807bf01ddacd0a0f7f563ae5a65f8fb2dd22ca16
[ "MIT" ]
null
null
null
# coding=utf-8 # Exemplos para entendiemnto """nome = input('Qual seu nome?' ) if nome == 'Rodrigo' or nome == 'RAYANNE': print('Que nome lindo vocé tem!') else: print('Que nome tão normal!!!') print('Bom dia, {}'.format(nome))""" n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda ...
28.9
80
0.615917
n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda nota: ')) m = (n1 + n2) / 2 print('A sua média foi: {:.1f}'.format(m)) print('A sua media foi boa!' if m >= 6.0 else 'Sua media foi ruim,estude mais!')
true
true
7903760959e968ef65e34c134e43c14d89f97e93
540
py
Python
E_business_project/apps/goods/urls.py
ambushonallsides1/E_business_project
bf386391e58e0e82787ddc07fc678937e345a4cb
[ "MIT" ]
1
2020-02-05T14:00:19.000Z
2020-02-05T14:00:19.000Z
E_business_project/apps/goods/urls.py
ambushonallsides1/E_business_project
bf386391e58e0e82787ddc07fc678937e345a4cb
[ "MIT" ]
6
2020-05-11T20:34:17.000Z
2021-11-02T15:46:41.000Z
E_business_project/apps/goods/urls.py
ambushonallsides1/E_business_project
bf386391e58e0e82787ddc07fc678937e345a4cb
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ # 商品列表页 url(r'^list/(?P<category_id>\d+)/(?P<page_num>\d+)/$', views.ListView.as_view(), name='list'), # 热销排行数据 url(r'^hot/(?P<category_id>\d+)/$', views.HotGoodsView.as_view()), # 商品详情页 url(r'^detail/(?P<sku_id>\d+)/$', view...
31.764706
98
0.627778
from django.conf.urls import url from . import views urlpatterns = [ url(r'^list/(?P<category_id>\d+)/(?P<page_num>\d+)/$', views.ListView.as_view(), name='list'), url(r'^hot/(?P<category_id>\d+)/$', views.HotGoodsView.as_view()), url(r'^detail/(?P<sku_id>\d+)/$', views.DetailView.as_view()...
true
true
7903762327cb4b6f5b580732681dcf05dcaaee2f
8,881
py
Python
solo/utils/classification_dataloader.py
fariasfc/solo-learn
f53ff40edbc7e96e06db5238d8c3a44f7b8965c1
[ "MIT" ]
null
null
null
solo/utils/classification_dataloader.py
fariasfc/solo-learn
f53ff40edbc7e96e06db5238d8c3a44f7b8965c1
[ "MIT" ]
null
null
null
solo/utils/classification_dataloader.py
fariasfc/solo-learn
f53ff40edbc7e96e06db5238d8c3a44f7b8965c1
[ "MIT" ]
null
null
null
import os from pathlib import Path from typing import Callable, Optional, Tuple, Union import torchvision from torch import nn from torch.utils.data import DataLoader, Dataset from torchvision import transforms from torchvision.datasets import STL10, ImageFolder def build_custom_pipeline(): """Builds augmentatio...
31.492908
99
0.596329
import os from pathlib import Path from typing import Callable, Optional, Tuple, Union import torchvision from torch import nn from torch.utils.data import DataLoader, Dataset from torchvision import transforms from torchvision.datasets import STL10, ImageFolder def build_custom_pipeline(): pipeline = { ...
true
true
7903777a50ff41a94bed60837d113e3a3fca6cc0
23,095
py
Python
sub_models.py
tmartin2/EnsembleSplice-Inactive
a161ff007b47ceadd3a21376f2eac2971bb81d90
[ "MIT" ]
null
null
null
sub_models.py
tmartin2/EnsembleSplice-Inactive
a161ff007b47ceadd3a21376f2eac2971bb81d90
[ "MIT" ]
null
null
null
sub_models.py
tmartin2/EnsembleSplice-Inactive
a161ff007b47ceadd3a21376f2eac2971bb81d90
[ "MIT" ]
null
null
null
# ----------------------------------------------------------------------------- # Copyright (c) 2021 Trevor P. Martin. All rights reserved. # Distributed under the MIT License. # ----------------------------------------------------------------------------- from Data import encode_data # from utils import cross_validati...
34.781627
126
0.525352
from Data import encode_data from Models import utils from Models import build_models from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.linear_model import Perceptron from sklearn.svm import LinearSVC import matplotlib.pyplot as plt import matplo...
true
true
79037789097e9f44c8718db1e462de1fd6ab1be8
7,156
py
Python
MyAlgorithm/addWordsToParadigms_old.py
oncebasun/seq2seq-theano
9d905ed2fb392193e28d67272d3e3f1b5da613ac
[ "MIT" ]
null
null
null
MyAlgorithm/addWordsToParadigms_old.py
oncebasun/seq2seq-theano
9d905ed2fb392193e28d67272d3e3f1b5da613ac
[ "MIT" ]
null
null
null
MyAlgorithm/addWordsToParadigms_old.py
oncebasun/seq2seq-theano
9d905ed2fb392193e28d67272d3e3f1b5da613ac
[ "MIT" ]
null
null
null
# Usage: testWordsInCorpus.py [language] {corpus file} # If no corpus file is named, the programme will try to load a corresponding cPickle file. # # German corpus: /mounts/data/proj/huiming/SIGMORPHON/dewiki-20151102-pages-articles-multistream.xml # # This script finds words that should belong to a paradigm in the cor...
34.570048
132
0.654556
from getEditTrees import editTreesByPos from getEditTrees import applyOnlyTree import sys import pickle as cPickle toAdd = {} uniquenessCheck = {} def autoComplete(lemma1, etTag1, lemma2, etTag2, corpusWords): etAndTagToAdd = set() notFound = 0 allRight1 = True allRight2 = True for (et, ...
true
true
79037853da791e43432d796bec456bd6930322d3
14,822
py
Python
ibmdbpy/tests/test_frame.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
21
2016-02-18T13:10:48.000Z
2020-11-09T00:09:07.000Z
ibmdbpy/tests/test_frame.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
57
2016-02-29T15:14:05.000Z
2021-07-23T07:19:41.000Z
ibmdbpy/tests/test_frame.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
17
2016-01-04T07:11:37.000Z
2021-11-05T12:45:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
34.152074
106
0.643773
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import zip from future import standard_library standard_library.install_aliases() import pandas import pytest import six import ibmdbpy from ibm...
true
true
79037932fc54e1c2f6ed6419f33b160d082a18e5
14,654
py
Python
modoboa_webmail/tests/test_views.py
mohamed-ghayyad/modoboa-webmail
4fefb3cfadc97e416a0f2b76356c7ec97b2b6040
[ "MIT" ]
59
2015-06-02T10:12:31.000Z
2022-03-29T17:52:30.000Z
modoboa_webmail/tests/test_views.py
mohamed-ghayyad/modoboa-webmail
4fefb3cfadc97e416a0f2b76356c7ec97b2b6040
[ "MIT" ]
222
2015-04-29T16:26:17.000Z
2022-02-28T08:05:25.000Z
modoboa_webmail/tests/test_views.py
mohamed-ghayyad/modoboa-webmail
4fefb3cfadc97e416a0f2b76356c7ec97b2b6040
[ "MIT" ]
45
2015-03-19T11:14:51.000Z
2022-03-14T08:03:49.000Z
# coding: utf-8 """Webmail tests.""" from __future__ import unicode_literals import os import shutil import tempfile try: import mock except ImportError: from unittest import mock from six import BytesIO from django.core import mail from django.urls import reverse from modoboa.admin import factories as ad...
39.392473
762
0.600792
from __future__ import unicode_literals import os import shutil import tempfile try: import mock except ImportError: from unittest import mock from six import BytesIO from django.core import mail from django.urls import reverse from modoboa.admin import factories as admin_factories from modoboa.core impo...
true
true
79037ae08e84e6a9933934f02dbf2f6a09f5b19d
3,112
py
Python
configs/retinanet/traffic_sign/retinanet_r50_fpn_1x_traffic_sign.py
tuanphan09/mmdetection
ee63547c02c615f9c61a13e3f34747098a9cd90a
[ "Apache-2.0" ]
null
null
null
configs/retinanet/traffic_sign/retinanet_r50_fpn_1x_traffic_sign.py
tuanphan09/mmdetection
ee63547c02c615f9c61a13e3f34747098a9cd90a
[ "Apache-2.0" ]
null
null
null
configs/retinanet/traffic_sign/retinanet_r50_fpn_1x_traffic_sign.py
tuanphan09/mmdetection
ee63547c02c615f9c61a13e3f34747098a9cd90a
[ "Apache-2.0" ]
null
null
null
# The new config inherits a base config to highlight the necessary modification _base_ = '../retinanet_r50_fpn_1x_coco.py' # We also need to change the num_classes in head to match the dataset's annotation model = dict( pretrained=None, ) # Modify dataset related settings dataset_type = 'COCODataset' classes = (...
37.493976
117
0.54563
_base_ = '../retinanet_r50_fpn_1x_coco.py' model = dict( pretrained=None, ) # Modify dataset related settings dataset_type = 'COCODataset' classes = ('Cấm ngược chiều', 'Cấm dừng và đỗ', 'Cấm rẽ', 'Giới hạn tốc độ', 'Cấm còn lại', 'Nguy hiểm', 'Hiệu lệnh') img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], ...
true
true
79037ae19f271b14b11a38feecdea1226e2d05ad
327
py
Python
apps/store/migrations/0002_remove_payment_paystack_response.py
Joetib/jshop
810ce5dcf2cf2d23b45536dd0c8806efd3b7fc91
[ "MIT" ]
1
2021-09-29T18:48:00.000Z
2021-09-29T18:48:00.000Z
apps/store/migrations/0002_remove_payment_paystack_response.py
Joetib/jshop
810ce5dcf2cf2d23b45536dd0c8806efd3b7fc91
[ "MIT" ]
null
null
null
apps/store/migrations/0002_remove_payment_paystack_response.py
Joetib/jshop
810ce5dcf2cf2d23b45536dd0c8806efd3b7fc91
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-09-28 13:49 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='payment', name='paystack_response', ),...
18.166667
47
0.590214
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='payment', name='paystack_response', ), ]
true
true
79037b880dca6434ef7b651515969c8dcfcbb25b
5,446
py
Python
watson/frames.py
cazador481/Watson
6af92cba8f1b0eafba84025afc140ec3c38cd185
[ "MIT" ]
null
null
null
watson/frames.py
cazador481/Watson
6af92cba8f1b0eafba84025afc140ec3c38cd185
[ "MIT" ]
null
null
null
watson/frames.py
cazador481/Watson
6af92cba8f1b0eafba84025afc140ec3c38cd185
[ "MIT" ]
null
null
null
import uuid import arrow from collections import namedtuple HEADERS = ('start', 'stop', 'project', 'id', 'tags', 'updated_at') class Frame(namedtuple('Frame', HEADERS)): def __new__(cls, start, stop, project, id, tags=None, updated_at=None,): try: if not isinstance(start, arrow.Arrow): ...
29.27957
79
0.565736
import uuid import arrow from collections import namedtuple HEADERS = ('start', 'stop', 'project', 'id', 'tags', 'updated_at') class Frame(namedtuple('Frame', HEADERS)): def __new__(cls, start, stop, project, id, tags=None, updated_at=None,): try: if not isinstance(start, arrow.Arrow): ...
true
true
79037b9e891cf174cb460169069b116e1a5bd27f
332
py
Python
platform/src/main/python/dlpx/virtualization/platform/util.py
SumoSourabh/virtualization-sdk
d1c06e7aeb8adf48243599871423922d642d2c10
[ "Apache-2.0" ]
null
null
null
platform/src/main/python/dlpx/virtualization/platform/util.py
SumoSourabh/virtualization-sdk
d1c06e7aeb8adf48243599871423922d642d2c10
[ "Apache-2.0" ]
null
null
null
platform/src/main/python/dlpx/virtualization/platform/util.py
SumoSourabh/virtualization-sdk
d1c06e7aeb8adf48243599871423922d642d2c10
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2019, 2021 by Delphix. All rights reserved. # import dlpx.virtualization.api from dlpx.virtualization.common.util import to_str def get_virtualization_api_version(): """Returns the Virutalization API version string. :return: version string """ return to_str(dlpx.virtualization.api._...
23.714286
59
0.756024
import dlpx.virtualization.api from dlpx.virtualization.common.util import to_str def get_virtualization_api_version(): return to_str(dlpx.virtualization.api.__version__)
true
true
79037bbe91970d86c9ed007208185ba6a65de400
1,168
py
Python
setup.py
Omarnabk/requests_tor
6a7e16942eca66945e783a9bb7acac0b9ea6f190
[ "MIT" ]
1
2021-06-06T23:41:37.000Z
2021-06-06T23:41:37.000Z
setup.py
Omarnabk/requests_tor
6a7e16942eca66945e783a9bb7acac0b9ea6f190
[ "MIT" ]
null
null
null
setup.py
Omarnabk/requests_tor
6a7e16942eca66945e783a9bb7acac0b9ea6f190
[ "MIT" ]
null
null
null
from setuptools import setup from requests_tor import __version__ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name="requests_tor", version=__version__, author="deedy5", description="Multithreading requests via TOR with automatic TOR new identity", l...
35.393939
82
0.638699
from setuptools import setup from requests_tor import __version__ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name="requests_tor", version=__version__, author="deedy5", description="Multithreading requests via TOR with automatic TOR new identity", l...
true
true
79037c714c309d5a2482e456f279f42d7b0982ed
2,060
py
Python
nyamuk/event.py
MasterScott/nyamuk
ac4c6028de288a4c8e0b332ae16eae889deb643d
[ "BSD-2-Clause" ]
49
2015-01-27T15:06:31.000Z
2022-02-18T13:51:48.000Z
nyamuk/event.py
MasterScott/nyamuk
ac4c6028de288a4c8e0b332ae16eae889deb643d
[ "BSD-2-Clause" ]
10
2015-03-19T13:24:33.000Z
2019-03-01T10:06:23.000Z
nyamuk/event.py
MasterScott/nyamuk
ac4c6028de288a4c8e0b332ae16eae889deb643d
[ "BSD-2-Clause" ]
19
2015-01-27T15:13:29.000Z
2021-05-23T13:43:52.000Z
"""Nyamuk event.""" import socket import nyamuk_const as NC #mqtt event EV_CONNACK = NC.CMD_CONNACK EV_PUBLISH = NC.CMD_PUBLISH EV_SUBACK = NC.CMD_SUBACK #non mqtt event EV_NET_ERR = 1000 class BaseEvent: """Event Base Class.""" def __init__(self, tipe): self.type = tipe class EventConnack(BaseEven...
25.432099
54
0.653883
import socket import nyamuk_const as NC EV_CONNACK = NC.CMD_CONNACK EV_PUBLISH = NC.CMD_PUBLISH EV_SUBACK = NC.CMD_SUBACK EV_NET_ERR = 1000 class BaseEvent: def __init__(self, tipe): self.type = tipe class EventConnack(BaseEvent): def __init__(self, ret_code, session_present = 0): BaseEve...
true
true
79037d241ec08af839b4c82afef6de7b86a8c0ee
644
py
Python
wagtail_review/text.py
icanbwell/wagtail-review
4695f59c9feb94974ceb4a1b03ce8fd836e0ea3e
[ "BSD-3-Clause" ]
44
2018-12-17T16:37:16.000Z
2022-03-06T15:09:23.000Z
wagtail_review/text.py
icanbwell/wagtail-review
4695f59c9feb94974ceb4a1b03ce8fd836e0ea3e
[ "BSD-3-Clause" ]
33
2019-01-07T18:03:14.000Z
2021-12-15T08:46:57.000Z
wagtail_review/text.py
icanbwell/wagtail-review
4695f59c9feb94974ceb4a1b03ce8fd836e0ea3e
[ "BSD-3-Clause" ]
19
2019-01-08T14:08:15.000Z
2021-10-19T03:16:30.000Z
def user_display_name(user): """ Returns the preferred display name for the given user object: the result of user.get_full_name() if implemented and non-empty, or user.get_username() otherwise. """ try: full_name = user.get_full_name().strip() if full_name: return full_na...
33.894737
103
0.661491
def user_display_name(user): try: full_name = user.get_full_name().strip() if full_name: return full_name except AttributeError: pass try: return user.get_username() except AttributeError: # empty string to replicate the behaviour of {{ user....
true
true
79037d48c657f80b96e603e33494b0d2e714af9a
2,989
py
Python
ssim.py
ebartrum/NovelViewSynthesis-TensorFlow
95be44737dd2f0b96cde61fbd9c1d3c88ae49830
[ "MIT" ]
192
2018-09-06T21:27:11.000Z
2022-02-15T09:15:34.000Z
ssim.py
RealityTracer/Multiview2Novelview
a5e236f3c564bf287c8a09d855fd2134ba86b299
[ "MIT" ]
18
2018-09-11T02:32:40.000Z
2020-12-03T08:54:00.000Z
ssim.py
RealityTracer/Multiview2Novelview
a5e236f3c564bf287c8a09d855fd2134ba86b299
[ "MIT" ]
39
2018-09-07T01:28:20.000Z
2022-01-09T05:54:09.000Z
import tensorflow as tf import numpy as np def _tf_fspecial_gauss(size, sigma, ch=1): """Function to mimic the 'fspecial' gaussian MATLAB function """ x_data, y_data = np.mgrid[-size//2 + 1:size//2 + 1, -size//2 + 1:size//2 + 1] x_data = np.expand_dims(x_data, axis=-1) x_data = np.expand_dims(x_d...
35.583333
95
0.571429
import tensorflow as tf import numpy as np def _tf_fspecial_gauss(size, sigma, ch=1): x_data, y_data = np.mgrid[-size//2 + 1:size//2 + 1, -size//2 + 1:size//2 + 1] x_data = np.expand_dims(x_data, axis=-1) x_data = np.expand_dims(x_data, axis=-1) y_data = np.expand_dims(y_data, axis=-1) y_data = ...
true
true
79037d6b66461bcf5551085f73168f1654c65ff5
45
py
Python
WebVisualizations/WeatherPy/config.py
IrinaUX/Web-Design-Challenge
3dac80633a56322eecd93f031bcf652b4c848969
[ "ADSL" ]
null
null
null
WebVisualizations/WeatherPy/config.py
IrinaUX/Web-Design-Challenge
3dac80633a56322eecd93f031bcf652b4c848969
[ "ADSL" ]
null
null
null
WebVisualizations/WeatherPy/config.py
IrinaUX/Web-Design-Challenge
3dac80633a56322eecd93f031bcf652b4c848969
[ "ADSL" ]
null
null
null
api_key = "8d3fef753a916acc8df61a629cda8e70"
22.5
44
0.866667
api_key = "8d3fef753a916acc8df61a629cda8e70"
true
true
79037e1e17f1c6ca60aa131870960c78b72347d3
1,815
py
Python
assets/netlists/opsci_profit_sharing/SimStrategy.py
opscientia/darcspice
3f0602a45c829127d552593d2d4c7c5646629136
[ "Apache-2.0" ]
6
2022-01-04T16:27:49.000Z
2022-03-19T02:57:20.000Z
assets/netlists/opsci_profit_sharing/SimStrategy.py
opscientia/tokenspice
3f0602a45c829127d552593d2d4c7c5646629136
[ "Apache-2.0" ]
1
2022-01-04T18:09:44.000Z
2022-01-04T18:10:38.000Z
assets/netlists/opsci_profit_sharing/SimStrategy.py
opscientia/darcspice
3f0602a45c829127d552593d2d4c7c5646629136
[ "Apache-2.0" ]
null
null
null
import math from enforce_typing import enforce_types from engine import SimStrategyBase from util.constants import S_PER_HOUR @enforce_types class SimStrategy(SimStrategyBase.SimStrategyBase): def __init__(self, no_researchers=2): #===initialize self.time_step, max_ticks==== super().__init__() ...
42.209302
131
0.656749
import math from enforce_typing import enforce_types from engine import SimStrategyBase from util.constants import S_PER_HOUR @enforce_types class SimStrategy(SimStrategyBase.SimStrategyBase): def __init__(self, no_researchers=2): super().__init__() self.setTimeStep(S_PER_HOUR) ...
true
true
79037ee8f12f6bab377c6a3f1c28abdcb9147e8b
240
py
Python
DTOs/TopicDTO.py
AngelStoyanov33/Flask-Forum
055e4555dad8588437bf242bf9c6ea97941e69fe
[ "MIT" ]
null
null
null
DTOs/TopicDTO.py
AngelStoyanov33/Flask-Forum
055e4555dad8588437bf242bf9c6ea97941e69fe
[ "MIT" ]
null
null
null
DTOs/TopicDTO.py
AngelStoyanov33/Flask-Forum
055e4555dad8588437bf242bf9c6ea97941e69fe
[ "MIT" ]
null
null
null
class TopicDTO: name = str description = str popularity = int def __init__(self, name="", popularity=0, description = ""): self.name=name self.popularity=popularity self.description = description
26.666667
64
0.625
class TopicDTO: name = str description = str popularity = int def __init__(self, name="", popularity=0, description = ""): self.name=name self.popularity=popularity self.description = description
true
true
79037f5e28f26dbd8044bd57561c7e3094ce84b6
371
py
Python
experiments/5_norming_object_typicality_phrasing1/results/scripts/makeItemList.py
thegricean/overinformativeness
d20b66148c13af473b57cc4d1736191a49660349
[ "MIT" ]
1
2016-10-27T18:41:57.000Z
2016-10-27T18:41:57.000Z
experiments/5_norming_object_typicality_phrasing1/results/scripts/makeItemList.py
thegricean/overinformativeness
d20b66148c13af473b57cc4d1736191a49660349
[ "MIT" ]
9
2015-11-30T21:44:31.000Z
2020-04-21T01:26:05.000Z
experiments/5_norming_object_typicality_phrasing1/results/scripts/makeItemList.py
thegricean/overinformativeness
d20b66148c13af473b57cc4d1736191a49660349
[ "MIT" ]
2
2015-11-25T09:53:20.000Z
2017-03-17T21:51:18.000Z
import os imagedir = "/Users/titlis/cogsci/projects/stanford/projects/overinformativeness/experiments/5_norming_object_typicality/images" for t in os.listdir(imagedir): if not t.startswith("."): for i in os.listdir(imagedir+"/"+t): if not i.startswith("."): print "{" print "\"item\": \""+i[0:-4]+"\"," ...
30.916667
127
0.638814
import os imagedir = "/Users/titlis/cogsci/projects/stanford/projects/overinformativeness/experiments/5_norming_object_typicality/images" for t in os.listdir(imagedir): if not t.startswith("."): for i in os.listdir(imagedir+"/"+t): if not i.startswith("."): print "{" print "\"item\": \""+i[0:-4]+"\"," ...
false
true
79038257e50b1885b97826cd892b492c07a4b5f2
16,449
py
Python
ViT-V-Net/models.py
junyuchen245/ViT-V-Net_for_3D_Image_Registration_Pytorch
f43bcdeef1d6712dfcaa3b4e18f69474e1eeaf73
[ "MIT" ]
131
2021-04-07T03:30:08.000Z
2022-03-20T04:09:01.000Z
ViT-V-Net/models.py
junyuchen245/ViT-V-Net_for_3D_Image_Registration
f43bcdeef1d6712dfcaa3b4e18f69474e1eeaf73
[ "MIT" ]
4
2021-04-26T09:09:26.000Z
2022-03-10T05:29:29.000Z
ViT-V-Net/models.py
junyuchen245/ViT-V-Net_for_3D_Image_Registration
f43bcdeef1d6712dfcaa3b4e18f69474e1eeaf73
[ "MIT" ]
20
2021-04-15T02:19:24.000Z
2022-03-14T10:10:53.000Z
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import logging import math import torch import torch.nn as nn import torch.nn.functional as nnf from torch.nn import Dropout, Softmax, Linear, Conv3d, LayerNorm from torch...
36.311258
200
0.610615
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import logging import math import torch import torch.nn as nn import torch.nn.functional as nnf from torch.nn import Dropout, Softmax, Linear, Conv3d, LayerNorm from torch.nn.modules.uti...
true
true
7903828c021b859d78b58676fd998ed8a29a8d64
8,651
py
Python
corehq/apps/data_interfaces/tasks.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/data_interfaces/tasks.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/data_interfaces/tasks.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime, timedelta from typing import List, Optional from django.conf import settings from django.core.cache import cache from django.utils.translation import ugettext as _ from celery.schedules import crontab from celery.task import periodic_task, task from celery.utils.log import get_task_logg...
35.600823
114
0.715871
from datetime import datetime, timedelta from typing import List, Optional from django.conf import settings from django.core.cache import cache from django.utils.translation import ugettext as _ from celery.schedules import crontab from celery.task import periodic_task, task from celery.utils.log import get_task_logg...
true
true
790383512eea98d223ed4ed7d48e9d8d7c50f2b1
1,254
py
Python
_Sensation0/DeltaTime.py
Geson-anko/JARVIS3
bc599a352401a7e135ebaabead4d8e6d8835747e
[ "MIT" ]
null
null
null
_Sensation0/DeltaTime.py
Geson-anko/JARVIS3
bc599a352401a7e135ebaabead4d8e6d8835747e
[ "MIT" ]
null
null
null
_Sensation0/DeltaTime.py
Geson-anko/JARVIS3
bc599a352401a7e135ebaabead4d8e6d8835747e
[ "MIT" ]
null
null
null
import os import torch import os import random from torch.nn import( Module,Linear,LayerNorm ) import math from .AutoEncoder import Encoder class DeltaT(Module): def __init__(self): super().__init__() self.reset_seed() self.elem = math.prod(Encoder().output_size) self.input_size...
27.26087
52
0.605263
import os import torch import os import random from torch.nn import( Module,Linear,LayerNorm ) import math from .AutoEncoder import Encoder class DeltaT(Module): def __init__(self): super().__init__() self.reset_seed() self.elem = math.prod(Encoder().output_size) self.input_size...
true
true
79038418e5bde28dec129e68980705856ef4a7fe
2,622
py
Python
nicenquickplotlib/config_types.py
SengerM/nicenquickplotlib
9aeebcd07b581598c418dd47593d3c218bca6ebb
[ "MIT" ]
2
2018-11-27T18:45:42.000Z
2019-02-20T20:53:17.000Z
nicenquickplotlib/config_types.py
SengerM/nicenquickplotlib
9aeebcd07b581598c418dd47593d3c218bca6ebb
[ "MIT" ]
null
null
null
nicenquickplotlib/config_types.py
SengerM/nicenquickplotlib
9aeebcd07b581598c418dd47593d3c218bca6ebb
[ "MIT" ]
1
2021-11-16T06:01:41.000Z
2021-11-16T06:01:41.000Z
from numbers import Number import yaml from .color_tools import hex2rgb def __default_grid__(ax): """This is a temporary function""" ax.grid(b=True, which='major', color='#000000', alpha=0.2, linestyle='-', linewidth=0.5) ax.grid(b=True, which='minor', color='#000000', alpha=0.1, linestyle='-', linewidth=0.25) ax....
29.460674
147
0.691838
from numbers import Number import yaml from .color_tools import hex2rgb def __default_grid__(ax): ax.grid(b=True, which='major', color='#000000', alpha=0.2, linestyle='-', linewidth=0.5) ax.grid(b=True, which='minor', color='#000000', alpha=0.1, linestyle='-', linewidth=0.25) ax.minorticks_on() class FigStyle: d...
true
true
7903850178306759b658bcc32156d19cd337843b
19,386
py
Python
CNN/CNNProcessData.py
soybase/DroneImageScripts
c077325a868237569592bd3820b3d873eddb4f83
[ "MIT" ]
3
2019-08-04T06:11:15.000Z
2021-01-20T11:48:05.000Z
CNN/CNNProcessData.py
soybase/DroneImageScripts
c077325a868237569592bd3820b3d873eddb4f83
[ "MIT" ]
null
null
null
CNN/CNNProcessData.py
soybase/DroneImageScripts
c077325a868237569592bd3820b3d873eddb4f83
[ "MIT" ]
3
2019-08-04T06:11:18.000Z
2021-02-18T13:21:58.000Z
# import the necessary packages import sys import cv2 import numpy as np import pandas as pd from tensorflow.keras.preprocessing.image import ImageDataGenerator from sklearn.preprocessing import LabelBinarizer from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from tenso...
46.939467
288
0.666254
import sys import cv2 import numpy as np import pandas as pd from tensorflow.keras.preprocessing.image import ImageDataGenerator from sklearn.preprocessing import LabelBinarizer from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from tensorflow.keras.layers import Batch...
true
true
790387b7cc575a1aa9ebe6c0b52b791947041c8f
7,931
py
Python
napari_animation/_qt/animation_widget.py
tlambert-forks/napari-animation
8c7119e69933bcba8f0263d3cab966f373a7cc24
[ "BSD-3-Clause" ]
null
null
null
napari_animation/_qt/animation_widget.py
tlambert-forks/napari-animation
8c7119e69933bcba8f0263d3cab966f373a7cc24
[ "BSD-3-Clause" ]
1
2021-05-26T23:29:26.000Z
2021-05-26T23:29:26.000Z
napari_animation/_qt/animation_widget.py
tlambert-forks/napari-animation
8c7119e69933bcba8f0263d3cab966f373a7cc24
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path from napari import Viewer from qtpy.QtCore import Qt from qtpy.QtWidgets import ( QErrorMessage, QFileDialog, QPushButton, QVBoxLayout, QWidget, ) from ..animation import Animation from .animationslider_widget import AnimationSliderWidget from .frame_widget import FrameWid...
35.565022
89
0.668012
from pathlib import Path from napari import Viewer from qtpy.QtCore import Qt from qtpy.QtWidgets import ( QErrorMessage, QFileDialog, QPushButton, QVBoxLayout, QWidget, ) from ..animation import Animation from .animationslider_widget import AnimationSliderWidget from .frame_widget import FrameWid...
true
true
79038800ff62b848428dce8a67a9e44b4699bb5e
1,284
py
Python
imapfw/testing/libcore.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
492
2015-10-12T18:18:48.000Z
2022-02-14T11:46:46.000Z
imapfw/testing/libcore.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
21
2015-11-10T00:49:07.000Z
2021-12-30T07:51:25.000Z
imapfw/testing/libcore.py
paralax/imapfw
740a4fed1a1de28e4134a115a1dd9c6e90e29ec1
[ "MIT" ]
40
2015-10-15T13:27:31.000Z
2021-12-30T07:52:24.000Z
# The MIT License (MIT) # # Copyright (c) 2015, Nicolas Sebrecht & contributors # # 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 ...
41.419355
79
0.759346
import os import sys def testingPath(): return os.path.join( os.path.abspath(sys.modules['imapfw'].__path__[0]), 'testing')
true
true
7903881baf28fb04948dceaf26f6f1e7b726da74
417
py
Python
polyaxon/api/repos/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/api/repos/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/api/repos/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
from rest_framework import fields, serializers from db.models.repos import Repo class RepoSerializer(serializers.ModelSerializer): project = fields.SerializerMethodField() class Meta: model = Repo fields = ('project', 'created_at', 'updated_at', 'is_public', ) def get_user(self, obj): ...
23.166667
71
0.688249
from rest_framework import fields, serializers from db.models.repos import Repo class RepoSerializer(serializers.ModelSerializer): project = fields.SerializerMethodField() class Meta: model = Repo fields = ('project', 'created_at', 'updated_at', 'is_public', ) def get_user(self, obj): ...
true
true
79038875f90d1870f897fdb2f00e9d30483286bc
1,834
py
Python
xchainpy/xchainpy_crypto/xchainpy_crypto/models/CryptoStruct.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
xchainpy/xchainpy_crypto/xchainpy_crypto/models/CryptoStruct.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
xchainpy/xchainpy_crypto/xchainpy_crypto/models/CryptoStruct.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
from .KdfParams import KdfParams from .CipherParams import CipherParams class CryptoStruct: def __init__( self, cipher: int, ciphertext: str, cipherparams: CipherParams, kdf: str, kdfparams: KdfParams, mac: str, ): self._cipher = cipher s...
22.641975
69
0.609051
from .KdfParams import KdfParams from .CipherParams import CipherParams class CryptoStruct: def __init__( self, cipher: int, ciphertext: str, cipherparams: CipherParams, kdf: str, kdfparams: KdfParams, mac: str, ): self._cipher = cipher s...
true
true
790388f30ead9eb8675e63e93d59d9cd81670aea
3,437
py
Python
python/paddle/fluid/tests/unittests/ipu/op_test_ipu.py
Li-fAngyU/Paddle
e548f65f96697830035a28f9070b40829408ccdb
[ "Apache-2.0" ]
2
2022-03-30T09:55:45.000Z
2022-03-30T09:55:49.000Z
python/paddle/fluid/tests/unittests/ipu/op_test_ipu.py
Li-fAngyU/Paddle
e548f65f96697830035a28f9070b40829408ccdb
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/ipu/op_test_ipu.py
Li-fAngyU/Paddle
e548f65f96697830035a28f9070b40829408ccdb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
29.376068
74
0.635438
import os import random import unittest import numpy as np from enum import Enum import paddle import paddle.static map_np_dtype_to_fluid_dtype = { 'bool': "bool", 'int8': "int8", 'uint8': "uint8", "int32": "int32", "int64": "int64", "float16": "float16", "float32": "float32"...
true
true
79038907b73bfe51adef149fbff6c6d5dc7f702a
53,715
py
Python
cwltool/main.py
suecharo/cwltool
997bddafe9837c551ff7681e7bbc5f3dea1b3096
[ "Apache-2.0" ]
null
null
null
cwltool/main.py
suecharo/cwltool
997bddafe9837c551ff7681e7bbc5f3dea1b3096
[ "Apache-2.0" ]
11
2022-02-17T03:20:41.000Z
2022-03-30T10:54:02.000Z
cwltool/main.py
suecharo/cwltool
997bddafe9837c551ff7681e7bbc5f3dea1b3096
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK """Entry point for cwltool.""" import argparse import copy import functools import io import logging import os import signal import subprocess # nosec import sys import time import urllib import warnings from codecs import StreamWriter, getwriter from collections.abc imp...
35.69103
88
0.574365
import argparse import copy import functools import io import logging import os import signal import subprocess import sys import time import urllib import warnings from codecs import StreamWriter, getwriter from collections.abc import MutableMapping, MutableSequence from typing import ( IO, Any, Calla...
true
true
790389486d1f0c19a68d44dcefd563bc953d8c5b
3,715
py
Python
docs/source/conf.py
m-kuhn/sqlfluff
8c7bbcd3346abf7f613454b5d597252292be38cb
[ "MIT" ]
null
null
null
docs/source/conf.py
m-kuhn/sqlfluff
8c7bbcd3346abf7f613454b5d597252292be38cb
[ "MIT" ]
null
null
null
docs/source/conf.py
m-kuhn/sqlfluff
8c7bbcd3346abf7f613454b5d597252292be38cb
[ "MIT" ]
null
null
null
"""Configuration file for the Sphinx documentation builder. This file only contains a selection of the most common options. For a full list see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ import configparser # -- Path setup -------------------------------------------...
32.587719
82
0.655989
import configparser config = configparser.ConfigParser() config.read(["../../src/sqlfluff/config.ini"]) stable_version = config.get("sqlfluff", "stable_version") project = "SQLFluff" copyright = "2019, Alan Cruickshank" author = "Alan Cruickshank" release = stable_version ext...
true
true
790389e06c57fe14d00a09909593ddc3969e8ca0
3,592
py
Python
swarmlib/cuckoosearch/cuckoo_problem.py
alxfmpl/swarmlib
625645d466223ebef35fa1492d47e1a252cfd863
[ "BSD-3-Clause" ]
null
null
null
swarmlib/cuckoosearch/cuckoo_problem.py
alxfmpl/swarmlib
625645d466223ebef35fa1492d47e1a252cfd863
[ "BSD-3-Clause" ]
null
null
null
swarmlib/cuckoosearch/cuckoo_problem.py
alxfmpl/swarmlib
625645d466223ebef35fa1492d47e1a252cfd863
[ "BSD-3-Clause" ]
2
2020-09-30T21:29:26.000Z
2020-12-22T15:15:52.000Z
# ------------------------------------------------------------------------------------------------------ # Copyright (c) Leo Hanisch. All rights reserved. # Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information. # ---------------------------------------------------------...
40.359551
145
0.612194
from copy import deepcopy import logging import numpy as np from .nest import Nest from ..util import levy_flight as cuckoo from .visualizer import Visualizer LOGGER = logging.getLogger(__name__) class CuckooProblem: def __init__(self, **kwargs): self.__upper_boundary = kwargs.get('upper_boundar...
true
true
79038afe4fbca1d48d22cec79d9ae113b6a2ec81
895
py
Python
Arcpy Script/SplitGDB/splitGDBTool.py
AkutoSai/ArcGIS
3bad0e06e7f99d4a91714abc575460383abebbd9
[ "Apache-2.0" ]
null
null
null
Arcpy Script/SplitGDB/splitGDBTool.py
AkutoSai/ArcGIS
3bad0e06e7f99d4a91714abc575460383abebbd9
[ "Apache-2.0" ]
null
null
null
Arcpy Script/SplitGDB/splitGDBTool.py
AkutoSai/ArcGIS
3bad0e06e7f99d4a91714abc575460383abebbd9
[ "Apache-2.0" ]
null
null
null
import os import arcpy from arcpy import env import time def splitGDBTool(inputGDB,inputFrame,splitField,outputDir): # Get FCs to be cliped env.workspace = inputGDB inputFCs = arcpy.ListFeatureClasses() countFCs =len(inputFCs) cursor = arcpy.da.SearchCursor(inputFrame,["TID","SHAPE@"]) in...
33.148148
77
0.622346
import os import arcpy from arcpy import env import time def splitGDBTool(inputGDB,inputFrame,splitField,outputDir): env.workspace = inputGDB inputFCs = arcpy.ListFeatureClasses() countFCs =len(inputFCs) cursor = arcpy.da.SearchCursor(inputFrame,["TID","SHAPE@"]) index = 1 for row in...
false
true
79038b3e118983bc62e021442b3e8f2c6f1fa0d7
1,003
py
Python
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
examples/outlook/send_message.py
stardust85/Office365-REST-Python-Client
cd369c607c7d137a000734e9c5e8f03ae3e3c603
[ "MIT" ]
null
null
null
from office365.graph.graph_client import GraphClient from settings import settings def get_token(auth_ctx): """Acquire token via client credential flow (ADAL Python library is utilized)""" token = auth_ctx.acquire_token_with_client_credentials( "https://graph.microsoft.com", settings['client_c...
27.861111
84
0.612164
from office365.graph.graph_client import GraphClient from settings import settings def get_token(auth_ctx): token = auth_ctx.acquire_token_with_client_credentials( "https://graph.microsoft.com", settings['client_credentials']['client_id'], settings['client_credentials']['client_secret']) ...
true
true
79038b49ef48f09871d20739b84b9b0fc714ba5a
1,501
py
Python
Week-7/Day-42.py
abusamrah2005/Python
b601a9daf8a5245bbcc1466d629adda43ed7c6ca
[ "Unlicense" ]
4
2019-09-21T22:47:53.000Z
2020-04-17T03:32:21.000Z
Week-7/Day-42.py
abusamrah2005/Python
b601a9daf8a5245bbcc1466d629adda43ed7c6ca
[ "Unlicense" ]
null
null
null
Week-7/Day-42.py
abusamrah2005/Python
b601a9daf8a5245bbcc1466d629adda43ed7c6ca
[ "Unlicense" ]
2
2019-09-21T22:47:59.000Z
2020-04-17T03:32:14.000Z
# # Python Week-7 Day-42 # Python Classes and Objects 2 print(" -- Let us create a method in the Person class --") class Person: def __init__(self, name, age): self.name = name self.age = age def myfunc(self): print("Hello my name is " + self.name ) p1 = Person("John", "36") p1.myfunc(...
20.847222
77
0.588941
reate a method in the Person class --") class Person: def __init__(self, name, age): self.name = name self.age = age def myfunc(self): print("Hello my name is " + self.name ) p1 = Person("John", "36") p1.myfunc() print("----") class Car: def __init__(self, brand, price): se...
true
true
79038b924918e263216f834e45808435613c405f
8,356
py
Python
test/functional/feature_proxy.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
4
2018-04-24T20:56:48.000Z
2020-03-01T09:54:29.000Z
test/functional/feature_proxy.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
2
2018-05-06T17:37:59.000Z
2018-07-06T11:36:18.000Z
test/functional/feature_proxy.py
barrystyle/Pricecoin
dc30cbc16cbb249a63e8ec3cbc31b04b887d4d58
[ "MIT" ]
2
2019-01-20T20:56:15.000Z
2019-02-12T03:47:16.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test pricecoind with different proxy configuration. Test plan: - Start pricecoind's with different pro...
41.366337
121
0.625299
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( PORT_MIN, PORT_RANGE, assert_equal, ) from test_framework.netutil import test_ipv6_lo...
true
true
79038b92a0283038fcc4f27a83a28e127274409d
805
py
Python
scripts/2-aggregate-land-cover.py
olga-turkovska/land-cover-patterns
67bbf0d01b7bb5ec5b1376a9fbc1da59addf2e31
[ "MIT" ]
null
null
null
scripts/2-aggregate-land-cover.py
olga-turkovska/land-cover-patterns
67bbf0d01b7bb5ec5b1376a9fbc1da59addf2e31
[ "MIT" ]
null
null
null
scripts/2-aggregate-land-cover.py
olga-turkovska/land-cover-patterns
67bbf0d01b7bb5ec5b1376a9fbc1da59addf2e31
[ "MIT" ]
null
null
null
import os import numpy as np import rasterio aggregate_forest = np.vectorize(lambda x: np.where(0 < x < 6, 1, x)) aggregate_agriculture = np.vectorize(lambda x: np.where(11 < x < 21, 21, x)) for dirs, subdirs, files in os.walk('../output/ceara/'): for file in files: wp_raster = rasterio.open('../output/...
33.541667
118
0.643478
import os import numpy as np import rasterio aggregate_forest = np.vectorize(lambda x: np.where(0 < x < 6, 1, x)) aggregate_agriculture = np.vectorize(lambda x: np.where(11 < x < 21, 21, x)) for dirs, subdirs, files in os.walk('../output/ceara/'): for file in files: wp_raster = rasterio.open('../output/...
true
true
79038bb6da2b2408011106999d8fd2068c1db016
1,760
py
Python
sknetwork/utils/seeds.py
altana-tech/scikit-network
dedc9d3e694c7106e4709aae22dffb5142c15859
[ "BSD-3-Clause" ]
1
2020-09-14T11:06:13.000Z
2020-09-14T11:06:13.000Z
sknetwork/utils/seeds.py
altana-tech/scikit-network
dedc9d3e694c7106e4709aae22dffb5142c15859
[ "BSD-3-Clause" ]
2
2020-10-17T08:21:38.000Z
2020-10-21T09:13:30.000Z
sknetwork/utils/seeds.py
altana-tech/scikit-network
dedc9d3e694c7106e4709aae22dffb5142c15859
[ "BSD-3-Clause" ]
1
2020-06-19T09:39:11.000Z
2020-06-19T09:39:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Apr, 2019 @author: Nathan de Lara <ndelara@enst.fr> """ from typing import Optional, Union import numpy as np from sknetwork.utils.check import check_seeds def stack_seeds(n_row: int, n_col: int, seeds_row: Optional[Union[np.ndarray, dict]], ...
30.877193
110
0.628409
from typing import Optional, Union import numpy as np from sknetwork.utils.check import check_seeds def stack_seeds(n_row: int, n_col: int, seeds_row: Optional[Union[np.ndarray, dict]], seeds_col: Optional[Union[np.ndarray, dict]] = None, default_value: float = -1) -> np.ndarray: if seeds_row ...
true
true
79038c55ad7da113a70b0e7af3aba518741e5dde
1,803
py
Python
python-django/djmultidb/app1/management/commands/set_thing.py
dictoss/proto
972d8cb3d1b94d771be4c678d11927a6b478317f
[ "BSD-2-Clause" ]
null
null
null
python-django/djmultidb/app1/management/commands/set_thing.py
dictoss/proto
972d8cb3d1b94d771be4c678d11927a6b478317f
[ "BSD-2-Clause" ]
8
2020-02-28T20:25:16.000Z
2021-02-27T14:12:55.000Z
python-django/djmultidb/app1/management/commands/set_thing.py
dictoss/proto
972d8cb3d1b94d771be4c678d11927a6b478317f
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import datetime from django.core.management.base import BaseCommand, CommandError from django.utils import timezone from django.conf import settings from app1.models import Thing class Command(BaseCommand): args = '<id name>' help = 'create or update thing model....
27.318182
76
0.460344
import os import sys import datetime from django.core.management.base import BaseCommand, CommandError from django.utils import timezone from django.conf import settings from app1.models import Thing class Command(BaseCommand): args = '<id name>' help = 'create or update thing model.' use_settings = 's...
true
true
79038ddc5f95f32085d5a5e9cabd051d704108f4
508
py
Python
src/m101p/week02/lesson_files/hemmerling_week2_01.py
hemmerling/nosql-mongodb2013
bd2bb4f76234e0732b738f14cb474f7554c864c1
[ "Apache-2.0" ]
null
null
null
src/m101p/week02/lesson_files/hemmerling_week2_01.py
hemmerling/nosql-mongodb2013
bd2bb4f76234e0732b738f14cb474f7554c864c1
[ "Apache-2.0" ]
null
null
null
src/m101p/week02/lesson_files/hemmerling_week2_01.py
hemmerling/nosql-mongodb2013
bd2bb4f76234e0732b738f14cb474f7554c864c1
[ "Apache-2.0" ]
null
null
null
import pymongo import sys # establish a connection to the database # note this uses the now deprecated Connection class, as we did in the lecture. # MongoClient is the preferred way of connecting. connection = pymongo.Connection("mongodb://localhost", safe=True) # get a handle to the school database db=conn...
23.090909
80
0.679134
import pymongo import sys connection = pymongo.Connection("mongodb://localhost", safe=True) db=connection.school scores = db.scores query = {''} try: doc = scores.find_one(query) except: print "Unexpected error:", sys.exc_info()[0] print doc
false
true
79039026c03ab9d987d6ab9c76340fb9530f7d99
1,040
py
Python
test/unit/reductions/exponentiated_gradient/simple_learners.py
Dref360/fairlearn
7042181add288c65174ac065f1474928e11f3f4c
[ "MIT" ]
1
2020-09-02T05:59:56.000Z
2020-09-02T05:59:56.000Z
test/unit/reductions/exponentiated_gradient/simple_learners.py
chrinide/fairlearn
8f087fbb0b27740d10b31d95706bb175a4b4581c
[ "MIT" ]
6
2021-03-11T00:38:07.000Z
2022-02-27T07:50:00.000Z
test/unit/reductions/exponentiated_gradient/simple_learners.py
chrinide/fairlearn
8f087fbb0b27740d10b31d95706bb175a4b4581c
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. import numpy as np import pandas as pd class LeastSquaresBinaryClassifierLearner: def __init__(self): self.weights = None def fit(self, X, Y, sample_weight): sqrtW = np.sqrt(sample_weight) matX ...
28.108108
64
0.623077
import numpy as np import pandas as pd class LeastSquaresBinaryClassifierLearner: def __init__(self): self.weights = None def fit(self, X, Y, sample_weight): sqrtW = np.sqrt(sample_weight) matX = np.array(X) * sqrtW[:, np.newaxis] vecY = Y * sqrtW self.lsqinfo = np....
true
true
7903904fe37652d8f18fd832aa590c0aec7e87a4
2,111
py
Python
toby.py
axxiao/toby
de64f4b2f5e39531d08143e99cf2785992010a13
[ "MIT" ]
null
null
null
toby.py
axxiao/toby
de64f4b2f5e39531d08143e99cf2785992010a13
[ "MIT" ]
null
null
null
toby.py
axxiao/toby
de64f4b2f5e39531d08143e99cf2785992010a13
[ "MIT" ]
null
null
null
# The Core of Toby from flask import Flask, request, jsonify, g import os import logging from ax.log import trace_error from ax.connection import DatabaseConnection from ax.datetime import now from ax.tools import load_function, get_uuid, decrypt from ax.exception import InvalidToken logger = logging.getLogger('werkz...
30.157143
100
0.658456
from flask import Flask, request, jsonify, g import os import logging from ax.log import trace_error from ax.connection import DatabaseConnection from ax.datetime import now from ax.tools import load_function, get_uuid, decrypt from ax.exception import InvalidToken logger = logging.getLogger('werkzeug') debug_flg = ...
true
true
79039090b5ba670aae52d062c1e99a1d92faca54
209
py
Python
tests/test_activeLearning.py
sankhaMukherjee/activeLearning
a739280e2c9e026358ede62720c7d5e4d20b9e12
[ "MIT" ]
null
null
null
tests/test_activeLearning.py
sankhaMukherjee/activeLearning
a739280e2c9e026358ede62720c7d5e4d20b9e12
[ "MIT" ]
null
null
null
tests/test_activeLearning.py
sankhaMukherjee/activeLearning
a739280e2c9e026358ede62720c7d5e4d20b9e12
[ "MIT" ]
null
null
null
import pytest import activeLearning as tP def test_sayHello(): assert tP.sayHello() == 'Hello World' assert tP.sayHello('Sankha') == 'Hello Sankha' assert tP.sayHello(-1) == 'Hello -1' return
23.222222
50
0.669856
import pytest import activeLearning as tP def test_sayHello(): assert tP.sayHello() == 'Hello World' assert tP.sayHello('Sankha') == 'Hello Sankha' assert tP.sayHello(-1) == 'Hello -1' return
true
true
7903926acbaa8d31eb11ec47f8286b0261947b45
4,519
py
Python
networking_bgp_ovn/drivers/openstack/utils/frr.py
luis5tb/networking-bgp-ovn
3c3d71bd045a971390fda89e5f0e724b490ee80f
[ "Apache-2.0" ]
1
2022-01-28T14:38:53.000Z
2022-01-28T14:38:53.000Z
networking_bgp_ovn/drivers/openstack/utils/frr.py
luis5tb/networking-bgp-ovn
3c3d71bd045a971390fda89e5f0e724b490ee80f
[ "Apache-2.0" ]
null
null
null
networking_bgp_ovn/drivers/openstack/utils/frr.py
luis5tb/networking-bgp-ovn
3c3d71bd045a971390fda89e5f0e724b490ee80f
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.165517
77
0.669617
import json from jinja2 import Template from oslo_concurrency import processutils from oslo_log import log as logging from networking_bgp_ovn import constants LOG = logging.getLogger(__name__) ADD_VRF_TEMPLATE = ''' vrf {{ vrf_name }} vni {{ vni }} exit-vrf router bgp {{ bgp_as }} vrf {{ vrf_name }...
true
true
7903928af3e822cd867926c5aa1b2c70382d029b
481
py
Python
scripts/fiftyone_sample.py
bikramA/sample-code
47efe43583046a1aa31660872d30bea5669e827a
[ "BSD-2-Clause" ]
null
null
null
scripts/fiftyone_sample.py
bikramA/sample-code
47efe43583046a1aa31660872d30bea5669e827a
[ "BSD-2-Clause" ]
null
null
null
scripts/fiftyone_sample.py
bikramA/sample-code
47efe43583046a1aa31660872d30bea5669e827a
[ "BSD-2-Clause" ]
null
null
null
import fiftyone as fo import fiftyone.zoo as foz # Load Dataset dataset = foz.load_zoo_dataset("coco-2017", split="validation") # Randomly select 20 samples on which to generate predictions view = dataset.take(20) # Load zoo model model = foz.load_zoo_model("keypoint-rcnn-resnet50-fpn-coco-torch") # Run Inferen...
21.863636
67
0.77131
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("coco-2017", split="validation") view = dataset.take(20) model = foz.load_zoo_model("keypoint-rcnn-resnet50-fpn-coco-torch") view.apply_model(model, label_field="predictions") session = fo.launch_app(dataset) session.view = v...
true
true
790392b5f069c2c394c4071f1fe6c1063d4ce649
4,837
py
Python
portfolio_functions.py
MaxGosselin/portfolio_optimizer
a137d5b029aff0b584adb9df0ba8bf1831731882
[ "MIT", "Unlicense" ]
3
2019-03-28T15:38:52.000Z
2020-12-16T21:11:30.000Z
portfolio_functions.py
MaxGosselin/portfolio_optimizer
a137d5b029aff0b584adb9df0ba8bf1831731882
[ "MIT", "Unlicense" ]
null
null
null
portfolio_functions.py
MaxGosselin/portfolio_optimizer
a137d5b029aff0b584adb9df0ba8bf1831731882
[ "MIT", "Unlicense" ]
null
null
null
''' A collection of functions to perform portfolio analysis. Max Gosselin, 2019 ''' import numpy as np import pandas as pd from scipy import optimize def portfolio_metrics(weights, avg_xs_returns, covariance_matrix): ''' Compute basic portfolio metrics: return, stdv, sharpe ratio ''' por...
32.682432
112
0.647509
import numpy as np import pandas as pd from scipy import optimize def portfolio_metrics(weights, avg_xs_returns, covariance_matrix): portfolio_return = np.sum(weights * avg_xs_returns) portfolio_stdv = np.sqrt(np.dot(weights.T, np.dot(weights, covariance_matrix))) portfolio_sharpe = portfolio_return...
true
true
7903935e85620581cc46d245843af981f771fb1d
102,390
py
Python
pudb/debugger.py
ranelpadon/pudb
634393f0cb482139af0419c637f2e84b8bb90d16
[ "MIT" ]
null
null
null
pudb/debugger.py
ranelpadon/pudb
634393f0cb482139af0419c637f2e84b8bb90d16
[ "MIT" ]
null
null
null
pudb/debugger.py
ranelpadon/pudb
634393f0cb482139af0419c637f2e84b8bb90d16
[ "MIT" ]
1
2021-05-13T13:15:47.000Z
2021-05-13T13:15:47.000Z
__copyright__ = """ Copyright (C) 2009-2017 Andreas Kloeckner Copyright (C) 2014-2017 Aaron Meurer """ __license__ = """ 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, includ...
36.963899
106
0.547339
__copyright__ = """ Copyright (C) 2009-2017 Andreas Kloeckner Copyright (C) 2014-2017 Aaron Meurer """ __license__ = """ 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, includ...
true
true
7903937f6bb0416f831585c48a017b3d93a5019d
1,474
py
Python
merge/evaluation.py
matroshenko/SPLERGE_via_TF
1768485985b00fd7dabd726d8d24cbdb947dd143
[ "MIT" ]
null
null
null
merge/evaluation.py
matroshenko/SPLERGE_via_TF
1768485985b00fd7dabd726d8d24cbdb947dd143
[ "MIT" ]
null
null
null
merge/evaluation.py
matroshenko/SPLERGE_via_TF
1768485985b00fd7dabd726d8d24cbdb947dd143
[ "MIT" ]
null
null
null
import os import tensorflow as tf from merge.model import Model def run_model_on_random_input(model): batch_size = 1 height = 100 width = 200 inputs = { 'image': tf.random.uniform(shape=(batch_size, height, width, 3), minval=0, maxval=256, dtype='int32'), 'horz_split_points_probs': tf...
33.5
117
0.681818
import os import tensorflow as tf from merge.model import Model def run_model_on_random_input(model): batch_size = 1 height = 100 width = 200 inputs = { 'image': tf.random.uniform(shape=(batch_size, height, width, 3), minval=0, maxval=256, dtype='int32'), 'horz_split_points_probs': tf...
true
true
7903939aab6de4ba538bf96ddafc16c8c872aaee
26,827
py
Python
nova/objects/service.py
bopopescu/TestNova
fb6a183b54f87cc078dc6de5be89711ec0d9ac26
[ "Apache-2.0" ]
1
2018-08-19T02:13:16.000Z
2018-08-19T02:13:16.000Z
nova/objects/service.py
bopopescu/TestNova
fb6a183b54f87cc078dc6de5be89711ec0d9ac26
[ "Apache-2.0" ]
null
null
null
nova/objects/service.py
bopopescu/TestNova
fb6a183b54f87cc078dc6de5be89711ec0d9ac26
[ "Apache-2.0" ]
1
2020-07-22T22:13:56.000Z
2020-07-22T22:13:56.000Z
# Copyright 2013 IBM Corp. # # 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 agree...
43.90671
79
0.65654
from oslo_log import log as logging from oslo_utils import uuidutils from oslo_utils import versionutils from nova import availability_zones from nova import context as nova_context from nova.db import api as db from nova import exception from nova.notifications.objects import base as notification from n...
true
true
790394d5ea8b5dd0bdf13a15a8555b225ffabcdb
698
py
Python
pyimage/contour.py
egonw/pyamiimage
8e436bae06a0c13a4265a186832e0e679512b7b9
[ "Apache-2.0" ]
null
null
null
pyimage/contour.py
egonw/pyamiimage
8e436bae06a0c13a4265a186832e0e679512b7b9
[ "Apache-2.0" ]
null
null
null
pyimage/contour.py
egonw/pyamiimage
8e436bae06a0c13a4265a186832e0e679512b7b9
[ "Apache-2.0" ]
null
null
null
from skimage.measure import find_contours from skimage import io from skimage.color import rgb2gray from matplotlib import pyplot as plt image = io.imread('contour_finding_test.png') # image = io.imread('FlowchartDiagram.png') image = rgb2gray(image) out = find_contours(image) print(len(out)) # Find contours at a con...
24.068966
54
0.73639
from skimage.measure import find_contours from skimage import io from skimage.color import rgb2gray from matplotlib import pyplot as plt image = io.imread('contour_finding_test.png') image = rgb2gray(image) out = find_contours(image) print(len(out)) contours = find_contours(image, ) fig, ax = plt.subplots() ax.i...
true
true
79039637a8ba70cae08df88e95efa8bbdd83dbea
87,595
py
Python
fpn/symbols/resnet_v1_101_fpn_dcn_rcnn.py
chi3x10/RepMet
d5b13e01940bbb7ed59dd1ff073e03c0808f76c0
[ "Apache-2.0" ]
103
2019-08-16T11:55:04.000Z
2022-03-04T16:47:57.000Z
fpn/symbols/resnet_v1_101_fpn_dcn_rcnn.py
chi3x10/RepMet
d5b13e01940bbb7ed59dd1ff073e03c0808f76c0
[ "Apache-2.0" ]
33
2019-05-25T08:42:06.000Z
2022-03-08T21:32:10.000Z
fpn/symbols/resnet_v1_101_fpn_dcn_rcnn.py
chi3x10/RepMet
d5b13e01940bbb7ed59dd1ff073e03c0808f76c0
[ "Apache-2.0" ]
18
2019-09-14T07:35:39.000Z
2021-11-25T04:25:20.000Z
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Copyright (c) 2019 IBM Corp # Licensed under The Apache-2.0 License [see LICENSE for details] # Written by Haozhi Qi # -------------------------------------------------------- import cPickle ...
84.961203
180
0.616405
import cPickle import mxnet as mx from utils.symbol import Symbol from operator_py.pyramid_proposal import * from operator_py.proposal_target import * from operator_py.fpn_roi_pooling import * from operator_py.box_annotator_ohem import * class resnet_v1_101_fpn_dcn_rcnn(Symbol): def __init__(self): ...
true
true
79039699e8da9a86f9037003a59b5e1b506c12b0
878
py
Python
hangman_art.py
iliescua/Hangman
1496e798b0bca5d0ee90abd81d05e98359e82e32
[ "MIT" ]
null
null
null
hangman_art.py
iliescua/Hangman
1496e798b0bca5d0ee90abd81d05e98359e82e32
[ "MIT" ]
null
null
null
hangman_art.py
iliescua/Hangman
1496e798b0bca5d0ee90abd81d05e98359e82e32
[ "MIT" ]
null
null
null
stages = [''' +---+ | | O | /|\ | / \ | | ========= ''', ''' +---+ | | O | /|\ | / | | ========= ''', ''' +---+ | | O | /|\ | | | ========= ''', ''' +---+ | | O | /| | | | ========= ''', ''' +---+ | | O | | | ...
12.911765
47
0.083144
stages = [''' +---+ | | O | /|\ | / \ | | ========= ''', ''' +---+ | | O | /|\ | / | | ========= ''', ''' +---+ | | O | /|\ | | | ========= ''', ''' +---+ | | O | /| | | | ========= ''', ''' +---+ | | O | | | ...
true
true
790396b61bf4d5f37393f78f27b7f46c717a0e4c
8,168
py
Python
pybind/nos/v7_1_0/interface/hundredgigabitethernet/switchport/access_mac_group_rspan_vlan_classification/access/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/interface/hundredgigabitethernet/switchport/access_mac_group_rspan_vlan_classification/access/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/interface/hundredgigabitethernet/switchport/access_mac_group_rspan_vlan_classification/access/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
64.825397
995
0.727473
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
7903978e1bf5aefe5653377b87e799583916b62e
897
py
Python
Debugging-4/cipher2_0.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
Debugging-4/cipher2_0.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
Debugging-4/cipher2_0.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
def encrypt(): message = raw_input("Enter the message you want to encrypt") ascii_message = [ord(char)+3 for char in message] encrypt_message = [ chr(char) for char in ascii_message] print ''.join(encrypt_message) def decrypt(): message = raw_input("Enter the message you want to decrypt") ascii_message =...
35.88
124
0.653289
def encrypt(): message = raw_input("Enter the message you want to encrypt") ascii_message = [ord(char)+3 for char in message] encrypt_message = [ chr(char) for char in ascii_message] print ''.join(encrypt_message) def decrypt(): message = raw_input("Enter the message you want to decrypt") ascii_message =...
false
true
790397efa8cf4438d741c56685a6de6445f3ae7b
2,013
py
Python
camcan/utils/file_parsing.py
dengemann/engemann-2020-multimodal-brain-age
ceffb1e01658e31d19dfc4dc0be7aff1d6d21af5
[ "BSD-3-Clause" ]
6
2020-11-11T21:26:20.000Z
2022-01-18T17:18:45.000Z
camcan/utils/file_parsing.py
dengemann/engemann-2020-multimodal-brain-age
ceffb1e01658e31d19dfc4dc0be7aff1d6d21af5
[ "BSD-3-Clause" ]
1
2022-03-14T07:56:17.000Z
2022-03-14T07:56:17.000Z
camcan/utils/file_parsing.py
dengemann/engemann-2020-multimodal-brain-age
ceffb1e01658e31d19dfc4dc0be7aff1d6d21af5
[ "BSD-3-Clause" ]
3
2020-06-10T08:34:04.000Z
2022-03-14T01:37:08.000Z
"""Utility functions for parcinging Freesurfer output files.""" from os.path import join import nibabel as nb import numpy as np def _vectorize_fs_surf(file_path): """ Read surface information from a file and turn it into a vector. Parameters ---------- file_path : str The path to a file...
23.682353
79
0.655241
from os.path import join import nibabel as nb import numpy as np def _vectorize_fs_surf(file_path): img = nb.load(file_path) in_data = img.get_fdata().squeeze() return in_data def get_area(subject_dir, n_points): AREA_FILES = ('lh.area.mgh', 'rh.area.mgh') lh_data = _vectorize_fs_surf(join(s...
true
true
79039872cc9abafdc8159212741d7d68cb5e4148
1,566
py
Python
services/dbus.py
sourceperl/docker.mqttwarn
9d87337f766843c8bdee34eba8d29776e7032009
[ "MIT" ]
null
null
null
services/dbus.py
sourceperl/docker.mqttwarn
9d87337f766843c8bdee34eba8d29776e7032009
[ "MIT" ]
null
null
null
services/dbus.py
sourceperl/docker.mqttwarn
9d87337f766843c8bdee34eba8d29776e7032009
[ "MIT" ]
2
2016-09-03T09:12:17.000Z
2020-03-03T11:58:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Fabian Affolter <fabian()affolter-engineering.ch>' __copyright__ = 'Copyright 2014 Fabian Affolter' __license__ = """Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)""" HAVE_DBUS=True try: import dbus except ImportError: ...
32.625
98
0.649425
__author__ = 'Fabian Affolter <fabian()affolter-engineering.ch>' __copyright__ = 'Copyright 2014 Fabian Affolter' __license__ = """Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)""" HAVE_DBUS=True try: import dbus except ImportError: HAVE_DBUS=False def plugin(srv, item): ...
false
true
7903989fcebaee5cb6e8974cc5e22a12743d250d
2,052
py
Python
solution/322. coin-change.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
solution/322. coin-change.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
solution/322. coin-change.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
from typing import List ''' 1. subproblems: dp(amount) the minimum number of coins needed to make changes for amount of S using the given coin denomination 2. guessing: all the available denomination c_i 3. relate subproblems: dp(amount) = min(dp(amount - c_i) + 1) for all possible c_i Time complexity: O(#subproblems...
28.109589
127
0.520955
from typing import List class Solution: def coinChange(self, coins: List[int], amount: int) -> int: if amount < 1: return 0 memo = {} def helper(coins, amount): if amount in memo: return memo[amount] ...
true
true
7903992ac7de71bacf377fd223285dda8e5412ab
24,867
py
Python
tensorflow/python/distribute/cross_device_utils.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
5
2018-07-04T22:14:02.000Z
2018-07-04T22:21:43.000Z
tensorflow/python/distribute/cross_device_utils.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/cross_device_utils.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
1
2018-11-30T01:35:01.000Z
2018-11-30T01:35:01.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.004464
102
0.699441
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as pycoll import threading from tensorflow.python.distribute import all_reduce from tensorflow.python.distribute import values as value_lib from tensorflow.python.framework im...
true
true
790399e89ce51b58c898b32b4311c39afd9e7625
1,518
py
Python
V2_action-how-are-you.py
mikpan/amld19-snips-workshop
b7a57c2f2758718de79c33ef163e371277cde3bd
[ "MIT" ]
null
null
null
V2_action-how-are-you.py
mikpan/amld19-snips-workshop
b7a57c2f2758718de79c33ef163e371277cde3bd
[ "MIT" ]
null
null
null
V2_action-how-are-you.py
mikpan/amld19-snips-workshop
b7a57c2f2758718de79c33ef163e371277cde3bd
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from hermes_python.hermes import Hermes INTENT_HOW_ARE_YOU = "mikpan:how_are_you" INTENT_GOOD = "bezzam:feeling_good" INTENT_BAD = "bezzam:feeling_bad" INTENT_ALRIGHT = "bezzam:feeling_alright" INTENT_FILTER_FEELING = [INTENT_GOOD, INTENT_BAD, INTENT_ALRIGHT] def main(...
31.625
80
0.755599
from hermes_python.hermes import Hermes INTENT_HOW_ARE_YOU = "mikpan:how_are_you" INTENT_GOOD = "bezzam:feeling_good" INTENT_BAD = "bezzam:feeling_bad" INTENT_ALRIGHT = "bezzam:feeling_alright" INTENT_FILTER_FEELING = [INTENT_GOOD, INTENT_BAD, INTENT_ALRIGHT] def main(): with Hermes("localhost:1883") as h: ...
true
true
79039ae1980eeb4c918c70fc1e15e4c604c8d3eb
1,477
py
Python
tests/fuzzer/fuzz_packet.py
1ndochine/faucet
f207c7af99982b6cad9372172ce94cb077f87997
[ "Apache-2.0" ]
1
2018-11-07T14:30:19.000Z
2018-11-07T14:30:19.000Z
tests/fuzzer/fuzz_packet.py
1ndochine/faucet
f207c7af99982b6cad9372172ce94cb077f87997
[ "Apache-2.0" ]
null
null
null
tests/fuzzer/fuzz_packet.py
1ndochine/faucet
f207c7af99982b6cad9372172ce94cb077f87997
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Run AFL repeatedly with externally supplied generated packet from STDIN.""" import logging import sys from ryu.controller import dpset from faucet import faucet from faucet import faucet_experimental_api import afl import fake_packet ROUNDS = 1 logging.disable(logging.CRITICAL) def main()...
28.403846
94
0.67434
import logging import sys from ryu.controller import dpset from faucet import faucet from faucet import faucet_experimental_api import afl import fake_packet ROUNDS = 1 logging.disable(logging.CRITICAL) def main(): application = faucet.Faucet( dpset=dpset.DPSet(), faucet_experimental_api=fauce...
true
true
79039ba82b11c0fad27e6581ec8013ba61682966
1,949
py
Python
mlrose/runners/ga_runner.py
tadmorgan/mlrose
846408b74f999f122156d4724067a003ea68ea47
[ "BSD-3-Clause" ]
null
null
null
mlrose/runners/ga_runner.py
tadmorgan/mlrose
846408b74f999f122156d4724067a003ea68ea47
[ "BSD-3-Clause" ]
null
null
null
mlrose/runners/ga_runner.py
tadmorgan/mlrose
846408b74f999f122156d4724067a003ea68ea47
[ "BSD-3-Clause" ]
null
null
null
import mlrose from mlrose.algorithms.decorators import short_name from mlrose.runners._runner_base import _RunnerBase """ Example usage: experiment_name = 'example_experiment' problem = TSPGenerator.generate(seed=SEED, number_of_cities=22) ga = GARunner(problem=problem, experiment_name=...
40.604167
118
0.623397
import mlrose from mlrose.algorithms.decorators import short_name from mlrose.runners._runner_base import _RunnerBase @short_name('ga') class GARunner(_RunnerBase): def __init__(self, problem, experiment_name, seed, iteration_list, population_sizes, mutation_rates, hamming_factors=None, hamming...
true
true
79039be9565aafec6aba170a6f41d7a79040022f
606
py
Python
app/config.py
bortels/awsfed
fea126c63501e5138579efd6127f7ff0550520b2
[ "MIT" ]
2
2019-09-25T21:34:21.000Z
2019-09-26T20:49:14.000Z
app/config.py
bortels/awsfed
fea126c63501e5138579efd6127f7ff0550520b2
[ "MIT" ]
null
null
null
app/config.py
bortels/awsfed
fea126c63501e5138579efd6127f7ff0550520b2
[ "MIT" ]
null
null
null
# You should modify this for your own use. # In particular, set the FQDN to your domain name, and # pick and set a secure SECRET_KEY. If you are going # to run HA, you will want to modify the SQLALCHEMY # variables to point to your shared server rather than # SQLite3. import os ENV = os.environ.get("ENV", "dev") SECR...
30.3
54
0.745875
import os ENV = os.environ.get("ENV", "dev") SECRET_KEY = 'top-secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///db.sqlite' SQLALCHEMY_TRACK_MODIFICATIONS = False PERMANENT_SESSION_LIFETIME = 60 * 60 * 20 BOOTSTRAP_CDN_FORCE_SSL = True BOOTSTRAP_SERVE_LOCAL = True SCHEME = "https" FQDN = f'fed-{ENV}.bortels.us' URL ...
true
true
79039bfa8caf37ad741b73dddbeb2b6259b56725
59,694
py
Python
tools/swarming_client/tests/swarming_test.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
tools/swarming_client/tests/swarming_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
tools/swarming_client/tests/swarming_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import datetime import json import logging import os import re import StringIO import sys import tempfile import threading i...
31.401368
80
0.526184
import datetime import json import logging import os import re import StringIO import sys import tempfile import threading import time import traceback import unittest import net_utils from depot_tools import auto_stub import auth import isolateserver import swarming import test_utils from depot_tools import ...
false
true
79039cb2feeca0a0e1fb76501a8e9fce7881ea24
2,081
py
Python
SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/tests/test_smallworld.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
5
2022-02-20T07:10:02.000Z
2022-03-18T17:47:53.000Z
SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/tests/test_smallworld.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
null
null
null
SLpackage/private/thirdparty/pythonpkgs/networkx/networkx_2.2/lib/python2.7/site-packages/networkx/algorithms/tests/test_smallworld.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
null
null
null
#! python from nose.tools import assert_true, assert_raises import random from networkx import random_reference, lattice_reference, sigma, omega import networkx as nx rng = random.Random(0) rng = 42 def test_random_reference(): G = nx.connected_watts_strogatz_graph(50, 6, 0.1, seed=rng) Gr = random_referenc...
31.059701
77
0.694858
from nose.tools import assert_true, assert_raises import random from networkx import random_reference, lattice_reference, sigma, omega import networkx as nx rng = random.Random(0) rng = 42 def test_random_reference(): G = nx.connected_watts_strogatz_graph(50, 6, 0.1, seed=rng) Gr = random_reference(G, nite...
true
true
79039d0db6195b8931e14d299f608211801c6d3f
3,854
py
Python
examples/hacker_news/hacker_news/resources/dbt_asset_resource.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
examples/hacker_news/hacker_news/resources/dbt_asset_resource.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
examples/hacker_news/hacker_news/resources/dbt_asset_resource.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from typing import Any, Dict, List import pandas from dagster import AssetKey, AssetMaterialization, EventMetadataEntry from dagster_dbt import DbtOutput from .snowflake_io_manager import connect_snowflake class DbtAssetResource: """ This class defines a resource that is capable of producing a list of Asset...
43.795455
100
0.674364
from typing import Any, Dict, List import pandas from dagster import AssetKey, AssetMaterialization, EventMetadataEntry from dagster_dbt import DbtOutput from .snowflake_io_manager import connect_snowflake class DbtAssetResource: def __init__(self, asset_key_prefix: List[str]): self._asset_key_prefix =...
true
true
79039d748c17ab53e358119bb76c8822a33ac1f2
1,584
py
Python
data/cirq_new/cirq_program/startCirq_Class18.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_Class18.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_Class18.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=8 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Cir...
26.4
80
0.667298
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.rx(1.6147786239451536).on(i...
true
true
79039e4abe6ff5a91f1f37e906b3a02ab82b7e8c
11,782
py
Python
tests/test_docs.py
tabulon-ext/moban
dcb3d9751949247b657aa5423280cf1183bb0a26
[ "MIT" ]
32
2017-12-03T00:13:15.000Z
2022-02-28T15:20:43.000Z
tests/test_docs.py
tabulon-ext/moban
dcb3d9751949247b657aa5423280cf1183bb0a26
[ "MIT" ]
353
2017-07-05T18:36:51.000Z
2020-09-24T13:42:03.000Z
tests/test_docs.py
tabulon-ext/moban
dcb3d9751949247b657aa5423280cf1183bb0a26
[ "MIT" ]
23
2018-01-08T09:23:01.000Z
2021-12-23T07:21:21.000Z
import os import fs from .utils import Docs, custom_dedent class TestTutorial(Docs): def test_level_1(self): expected = "world" folder = "level-1-jinja2-cli" self._moban(folder, expected) def test_level_1_custom_define(self): expected = "maailman" folder = "level-1-j...
29.903553
81
0.534035
import os import fs from .utils import Docs, custom_dedent class TestTutorial(Docs): def test_level_1(self): expected = "world" folder = "level-1-jinja2-cli" self._moban(folder, expected) def test_level_1_custom_define(self): expected = "maailman" folder = "level-1-j...
true
true
79039e4ce5caf5ffbea541e6b08a5b24e139ff01
6,616
py
Python
stock-filters/NeoCortex.py
Sebastianchr22/Minecraft-Settlement-Generation
5c902595b47c3c75c96485b29c4e76a07470a431
[ "0BSD" ]
null
null
null
stock-filters/NeoCortex.py
Sebastianchr22/Minecraft-Settlement-Generation
5c902595b47c3c75c96485b29c4e76a07470a431
[ "0BSD" ]
null
null
null
stock-filters/NeoCortex.py
Sebastianchr22/Minecraft-Settlement-Generation
5c902595b47c3c75c96485b29c4e76a07470a431
[ "0BSD" ]
null
null
null
from math import sqrt from PrefrontalCortex import Impulse from Decisions import Decisions from Decision import Decision import random as rand # The job of the Neo-cortex is to evaluate, think, and consider. # It is a slow brain part, but a highly important one, it's job is to perform tasks for the prefrontal cortex ...
37.378531
130
0.587666
from math import sqrt from PrefrontalCortex import Impulse from Decisions import Decisions from Decision import Decision import random as rand # While finding the optimal ways to do those tasks. class NeoCortex: def __init__(self, settler, world_grid): self.settler = settler self.decision...
false
true
79039f4935ee01b3c9deb96a41fee01735c61ec5
278
py
Python
homonym.py
Biatris/Homonym
5fd4f295f2454e9a314ad271b05edbcad0dc7c8c
[ "MIT" ]
null
null
null
homonym.py
Biatris/Homonym
5fd4f295f2454e9a314ad271b05edbcad0dc7c8c
[ "MIT" ]
null
null
null
homonym.py
Biatris/Homonym
5fd4f295f2454e9a314ad271b05edbcad0dc7c8c
[ "MIT" ]
null
null
null
class HomonymException(Exception): def _init_ (self, *args): super()._init_(args) class Homonym(): def __init__(self): pass def CreateModel(self): pass def SgdScore(self, rounds): pass def FindErrors(self): pass
14.631579
34
0.579137
class HomonymException(Exception): def _init_ (self, *args): super()._init_(args) class Homonym(): def __init__(self): pass def CreateModel(self): pass def SgdScore(self, rounds): pass def FindErrors(self): pass
true
true
79039fe4d32b0ecf731cccf14a7b40da4ba42599
58,533
py
Python
src/transformers/models/convbert/modeling_tf_convbert.py
kct22aws/transformers
04cddaf402591e9f5bdb5f116a111d829a0ce4f4
[ "Apache-2.0" ]
5
2020-10-30T13:07:02.000Z
2021-03-17T12:18:30.000Z
src/transformers/models/convbert/modeling_tf_convbert.py
guang7400613/transformers
28e091430eea9e0d40839e56fd0d57aec262f5f9
[ "Apache-2.0" ]
1
2022-01-17T03:24:35.000Z
2022-01-17T03:24:35.000Z
src/transformers/models/convbert/modeling_tf_convbert.py
guang7400613/transformers
28e091430eea9e0d40839e56fd0d57aec262f5f9
[ "Apache-2.0" ]
1
2022-02-08T19:37:39.000Z
2022-02-08T19:37:39.000Z
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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 r...
40.59154
132
0.663164
import tensorflow as tf from ...activations_tf import get_tf_activation from ...file_utils import ( MULTIPLE_CHOICE_DUMMY_INPUTS, add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, ) from ...modeling_tf_outputs import ( TFBaseModelOutput, TF...
true
true
7903a053ea8b41b764eacc2341c116e970412aac
5,043
py
Python
tests/cli/commands/test_plugins_command.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
8,092
2016-04-27T20:32:29.000Z
2019-01-05T07:39:33.000Z
tests/cli/commands/test_plugins_command.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
2,961
2016-05-05T07:16:16.000Z
2019-01-05T08:47:59.000Z
tests/cli/commands/test_plugins_command.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
3,546
2016-05-04T20:33:16.000Z
2019-01-05T05:14:26.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
41.677686
110
0.614515
import io import json import textwrap import unittest from contextlib import redirect_stdout from airflow.cli import cli_parser from airflow.cli.commands import plugins_command from airflow.hooks.base import BaseHook from airflow.listeners.listener import get_listener_manager from airflow.plugins_mana...
true
true
7903a066a37362e1d8bae1b7251ccd6490045f0b
1,399
py
Python
bot/handlers/packs/list.py
Bixshadow1/sticker-thief
bda28b2f28ed65e35ac62c165c2517412b5f6f8f
[ "MIT" ]
44
2018-10-30T14:47:14.000Z
2022-03-26T15:17:52.000Z
bot/handlers/packs/list.py
Bixshadow1/sticker-thief
bda28b2f28ed65e35ac62c165c2517412b5f6f8f
[ "MIT" ]
37
2018-11-09T11:51:15.000Z
2021-12-27T15:08:48.000Z
bot/handlers/packs/list.py
Bixshadow1/sticker-thief
bda28b2f28ed65e35ac62c165c2517412b5f6f8f
[ "MIT" ]
38
2019-03-27T21:12:23.000Z
2022-01-08T07:57:39.000Z
import logging # noinspection PyPackageRequirements from telegram.ext import CommandHandler, ConversationHandler # noinspection PyPackageRequirements from telegram import ChatAction, Update from bot import stickersbot from bot.utils import decorators from bot.utils import utils from bot.database.base import session_s...
34.975
150
0.754825
import logging from telegram.ext import CommandHandler, ConversationHandler from telegram import ChatAction, Update from bot import stickersbot from bot.utils import decorators from bot.utils import utils from bot.database.base import session_scope from bot.database.models.pack import Pack from bot.strings import S...
true
true
7903a0d0a7d350892d692d86b8bbd1dc00694d86
257
py
Python
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
null
null
null
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
1
2021-06-01T21:53:04.000Z
2021-06-01T21:53:04.000Z
settings/__init__.py
ppold/lambtastic
29d96f0f111a950a6ecd7af1cdc172addd64de04
[ "Unlicense" ]
null
null
null
""" core app configuration """ import os environment = os.getenv('LAMBTASTIC_ENV', 'development') if environment == 'testing': from .testing import * elif environment == 'production': from .production import * else: from .development import *
21.416667
56
0.696498
import os environment = os.getenv('LAMBTASTIC_ENV', 'development') if environment == 'testing': from .testing import * elif environment == 'production': from .production import * else: from .development import *
true
true
7903a182889892983f3e0a32fa7fa89dda9d112b
1,291
py
Python
examples/plot_obstacle_avoidance_2d.py
maotto/movement_primitives
b79c78a5a0667cc24a26b7b6cc64a5762d8f4dd4
[ "BSD-3-Clause" ]
17
2021-11-17T15:36:16.000Z
2022-03-26T08:49:25.000Z
examples/plot_obstacle_avoidance_2d.py
DavidYaonanZhu/movement_primitives
ce355837f06cb5fada24be7259cb0305e8ea5d91
[ "BSD-3-Clause" ]
9
2021-12-01T10:33:04.000Z
2022-03-23T12:41:39.000Z
examples/plot_obstacle_avoidance_2d.py
DavidYaonanZhu/movement_primitives
ce355837f06cb5fada24be7259cb0305e8ea5d91
[ "BSD-3-Clause" ]
8
2021-11-25T03:53:40.000Z
2022-03-31T03:19:25.000Z
""" ======================== Obstacle Avoidance in 2D ======================== Plots a 2D DMP that goes through a point obstacle when there is no coupling term for obstacle avoidance and a 2D DMP that avoids the point obstacle with a coupling term. """ print(__doc__) import matplotlib.pyplot as plt import numpy as n...
30.738095
79
0.711077
print(__doc__) import matplotlib.pyplot as plt import numpy as np from movement_primitives.dmp import DMP, CouplingTermObstacleAvoidance2D execution_time = 1.0 start_y = np.zeros(2) goal_y = np.ones(2) dmp = DMP(n_dims=2, execution_time=execution_time, n_weights_per_dim=3) dmp.configure(start_y=start_y, goal_y=goa...
true
true
7903a2b3166c68ad45b0be16d923c6908edcc39f
3,730
py
Python
exp_main.py
dongzhiming/cgp-cnn-PyTorch
be9d3ee63741ef59bac7cf3c905833d747267207
[ "MIT" ]
null
null
null
exp_main.py
dongzhiming/cgp-cnn-PyTorch
be9d3ee63741ef59bac7cf3c905833d747267207
[ "MIT" ]
null
null
null
exp_main.py
dongzhiming/cgp-cnn-PyTorch
be9d3ee63741ef59bac7cf3c905833d747267207
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import pickle import pandas as pd from cgp import * from cgp_config import * from cnn_train import CNN_train if __name__ == '__main__': parser = argparse.ArgumentParser(description='Evolving CAE structures') parser.add_argument('--gpu_num', '-g',...
49.078947
194
0.657105
import argparse import pickle import pandas as pd from cgp import * from cgp_config import * from cnn_train import CNN_train if __name__ == '__main__': parser = argparse.ArgumentParser(description='Evolving CAE structures') parser.add_argument('--gpu_num', '-g', type=int, default=1, help='Num. of GPUs') ...
true
true
7903a33e3a53df70eddcd8b57369e1f35cdec02f
3,836
py
Python
tftrt/examples/object_detection/test.py
npanpaliya/tensorrt
74bbdaad7c0fa0a559cb98b8ba0f98059aca3329
[ "Apache-2.0" ]
1
2019-10-10T06:05:13.000Z
2019-10-10T06:05:13.000Z
tftrt/examples/object_detection/test.py
npanpaliya/tensorrt
74bbdaad7c0fa0a559cb98b8ba0f98059aca3329
[ "Apache-2.0" ]
null
null
null
tftrt/examples/object_detection/test.py
npanpaliya/tensorrt
74bbdaad7c0fa0a559cb98b8ba0f98059aca3329
[ "Apache-2.0" ]
1
2019-10-10T06:05:15.000Z
2019-10-10T06:05:15.000Z
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://w...
36.188679
92
0.67049
import argparse import json from .object_detection import build_model, download_dataset, optimize_model, benchmark_model def test(test_config_path): with open(args.test_config_path, 'r') as f: test_config = json.load(f) print(json.dumps(test_config, sort_keys=True, indent=4)) ...
true
true
7903a3d3edd3e1433d6a5728a3155b0ca2d1b362
2,852
py
Python
oxlos/migrations/0001_initial.py
jtauber/oxlos2
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
[ "MIT" ]
1
2017-11-26T03:41:02.000Z
2017-11-26T03:41:02.000Z
oxlos/migrations/0001_initial.py
jtauber/oxlos2
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
[ "MIT" ]
null
null
null
oxlos/migrations/0001_initial.py
jtauber/oxlos2
5122a3d6407e233c0b4b0c001d66ef7c1fefd0d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-15 06:13 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import jsonfield.fields class Migration(migrations.Migration): in...
41.941176
134
0.596073
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ('pinax_teams', '0002_add_...
true
true
7903a3e213f7a0608dcf8761336c290a8584de29
578
py
Python
app/application.py
ihor-nahuliak/task-23-jul-2019
f32d3ef1df985f77998b5d296b524af99f82c3ef
[ "MIT" ]
null
null
null
app/application.py
ihor-nahuliak/task-23-jul-2019
f32d3ef1df985f77998b5d296b524af99f82c3ef
[ "MIT" ]
null
null
null
app/application.py
ihor-nahuliak/task-23-jul-2019
f32d3ef1df985f77998b5d296b524af99f82c3ef
[ "MIT" ]
null
null
null
import uvloop import asyncio import jinja2 import aiohttp_jinja2 from aiohttp import web from quicksets import settings from app.middlewares import middlewares from app.views import routes async def create_app(): asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) app = web.Application(middlewares=middle...
24.083333
69
0.769896
import uvloop import asyncio import jinja2 import aiohttp_jinja2 from aiohttp import web from quicksets import settings from app.middlewares import middlewares from app.views import routes async def create_app(): asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) app = web.Application(middlewares=middle...
true
true
7903a427a62687795f2f212998a785a69152972f
962
py
Python
try.py
peterzheng98/Valentine-Gift
d4212c2e648682ccb173dfa39a0873fc0ad2b9c3
[ "MIT" ]
2
2020-04-09T07:29:06.000Z
2020-10-04T02:19:21.000Z
try.py
peterzheng98/Valentine-Gift
d4212c2e648682ccb173dfa39a0873fc0ad2b9c3
[ "MIT" ]
null
null
null
try.py
peterzheng98/Valentine-Gift
d4212c2e648682ccb173dfa39a0873fc0ad2b9c3
[ "MIT" ]
null
null
null
""" ECB没有偏移量 """ from Crypto.Cipher import AES from binascii import b2a_hex, a2b_hex from utils import DES_decrypt, DES_encrypt def add_to_16(text): if len(text.encode('utf-8')) % 16: add = 16 - (len(text.encode('utf-8')) % 16) else: add = 0 text = text + ('\0' * add) return text.encode...
22.904762
51
0.626819
from Crypto.Cipher import AES from binascii import b2a_hex, a2b_hex from utils import DES_decrypt, DES_encrypt def add_to_16(text): if len(text.encode('utf-8')) % 16: add = 16 - (len(text.encode('utf-8')) % 16) else: add = 0 text = text + ('\0' * add) return text.encode('utf-8') def ...
true
true
7903a4f1c2fc12303c69a76acfe1a1e034df61a3
4,943
py
Python
esp_sdk/models/role.py
zimmermanc/esp-sdk-python
cdef13c0dc6c3996b6c444160c71b2f1e3910c97
[ "MIT" ]
6
2017-06-05T20:37:19.000Z
2019-04-10T08:43:59.000Z
esp_sdk/models/role.py
zimmermanc/esp-sdk-python
cdef13c0dc6c3996b6c444160c71b2f1e3910c97
[ "MIT" ]
18
2016-06-22T16:14:33.000Z
2018-10-29T21:53:15.000Z
esp_sdk/models/role.py
zimmermanc/esp-sdk-python
cdef13c0dc6c3996b6c444160c71b2f1e3910c97
[ "MIT" ]
18
2016-07-27T19:20:01.000Z
2020-11-17T02:09:58.000Z
# coding: utf-8 """ ESP Documentation The Evident Security Platform API (version 2.0) is designed to allow users granular control over their Amazon Web Service security experience by allowing them to review alerts, monitor signatures, and create custom signatures. OpenAPI spec version: v2_sdk Ge...
25.091371
230
0.539146
from pprint import pformat from six import iteritems from ..extensions.base_object import BaseObject import re class Role(BaseObject): def __init__(self, id=None, name=None, created_at=None, updated_at=None): self.swagger_types = { 'id': 'int', 'name': 'str', 'creat...
true
true
7903a6300ecfd9746ee2562acb15c2944a87f353
25,065
py
Python
scanpy/_utils.py
jwrth/scanpy
9fa01020d1f0712166b3591e67d0c766c765eca0
[ "BSD-3-Clause" ]
null
null
null
scanpy/_utils.py
jwrth/scanpy
9fa01020d1f0712166b3591e67d0c766c765eca0
[ "BSD-3-Clause" ]
null
null
null
scanpy/_utils.py
jwrth/scanpy
9fa01020d1f0712166b3591e67d0c766c765eca0
[ "BSD-3-Clause" ]
null
null
null
"""Utility functions and classes """ import sys import inspect import warnings import importlib.util from enum import Enum from pathlib import Path from weakref import WeakSet from collections import namedtuple from functools import partial, wraps from types import ModuleType, MethodType from typing import Union, Calla...
32.636719
105
0.596848
import sys import inspect import warnings import importlib.util from enum import Enum from pathlib import Path from weakref import WeakSet from collections import namedtuple from functools import partial, wraps from types import ModuleType, MethodType from typing import Union, Callable, Optional, Mapping, Any, Dict, Tu...
true
true
7903a6723125475069758ef729d05f17c07e573c
19,928
py
Python
roundoff.py
garrettkatz/rnn-fxpts
0e4ea0fe89c51764f000610957d0382917fe227c
[ "MIT" ]
2
2019-11-19T07:40:44.000Z
2021-11-13T09:55:07.000Z
roundoff.py
garrettkatz/rnn-fxpts
0e4ea0fe89c51764f000610957d0382917fe227c
[ "MIT" ]
1
2016-12-09T18:04:08.000Z
2016-12-09T18:04:19.000Z
roundoff.py
garrettkatz/rnn-fxpts
0e4ea0fe89c51764f000610957d0382917fe227c
[ "MIT" ]
2
2017-07-21T01:19:10.000Z
2019-06-26T05:37:05.000Z
""" Methods for assessing treatment of finite-precision issues """ import os import sys import time import multiprocessing as mp import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.markers as mrk import plotter as ptr import rnn_fxpts as rfx import fxpt_experiments as fe import...
44.088496
163
0.616118
import os import sys import time import multiprocessing as mp import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.markers as mrk import plotter as ptr import rnn_fxpts as rfx import fxpt_experiments as fe import pickle as pkl def get_relative_errors(test_data_id): network_...
true
true
7903a8fb9ca76323128827464afde2bac737afe6
1,384
py
Python
package/diana/utils/dicom/strings.py
thomasyi17/diana2
2167053dfe15b782d96cb1e695047433f302d4dd
[ "MIT" ]
15
2019-02-12T23:26:09.000Z
2021-12-21T08:53:58.000Z
package/diana/utils/dicom/strings.py
thomasyi17/diana2
2167053dfe15b782d96cb1e695047433f302d4dd
[ "MIT" ]
2
2019-01-23T21:13:12.000Z
2019-06-28T15:45:51.000Z
package/diana/utils/dicom/strings.py
thomasyi17/diana2
2167053dfe15b782d96cb1e695047433f302d4dd
[ "MIT" ]
6
2019-01-23T20:22:50.000Z
2022-02-03T03:27:04.000Z
import logging from datetime import datetime from dateutil import parser as DatetimeParser def dicom_name(names: list) -> str: s = "^".join(names).upper() return s def dicom_date(dt: datetime) -> str: s = dt.strftime("%Y%m%d") return s def dicom_time(dt: datetime) -> str: s = dt.strftime("%H%M...
20.969697
64
0.604769
import logging from datetime import datetime from dateutil import parser as DatetimeParser def dicom_name(names: list) -> str: s = "^".join(names).upper() return s def dicom_date(dt: datetime) -> str: s = dt.strftime("%Y%m%d") return s def dicom_time(dt: datetime) -> str: s = dt.strftime("%H%M...
true
true
7903a974548bdce76744db90cef9c70bcc677625
489
py
Python
python/daisyHat/Tools.py
recursinging/daisyHat
94a3a2f8da13ee4df372027058f2741c84493a0e
[ "MIT" ]
null
null
null
python/daisyHat/Tools.py
recursinging/daisyHat
94a3a2f8da13ee4df372027058f2741c84493a0e
[ "MIT" ]
null
null
null
python/daisyHat/Tools.py
recursinging/daisyHat
94a3a2f8da13ee4df372027058f2741c84493a0e
[ "MIT" ]
null
null
null
def printBigHeadline(text): print("") print("#######################################################################") print(text) print("#######################################################################") print("") def printSmallHeadline(text): print("") print("--------------------...
30.5625
84
0.216769
def printBigHeadline(text): print("") print("#######################################################################") print(text) print("#######################################################################") print("") def printSmallHeadline(text): print("") print("--------------------...
true
true
7903a97e804c4a39716d89d35ecf9953e1065a81
1,812
py
Python
tests/SearchTest.py
cuongbm/microblog
16b47b11b1f2b2877462c86873eb435beb10b545
[ "MIT" ]
null
null
null
tests/SearchTest.py
cuongbm/microblog
16b47b11b1f2b2877462c86873eb435beb10b545
[ "MIT" ]
null
null
null
tests/SearchTest.py
cuongbm/microblog
16b47b11b1f2b2877462c86873eb435beb10b545
[ "MIT" ]
null
null
null
import datetime from datetime import datetime, timedelta from time import sleep from app.search import add_to_index, delete_index, create_index, query_index from app import db from app.models import Post, User from tests.BaseDbTest import BaseDbTest class SearchTest(BaseDbTest): index_name = "test_index" d...
32.357143
76
0.640177
import datetime from datetime import datetime, timedelta from time import sleep from app.search import add_to_index, delete_index, create_index, query_index from app import db from app.models import Post, User from tests.BaseDbTest import BaseDbTest class SearchTest(BaseDbTest): index_name = "test_index" d...
true
true
7903aa2f3529e574a160e845cf50e4d4ec2f563c
265
py
Python
el_galleria/urls.py
kennjr/mi-galleria
3103873e4cfcd2f1c6389362bd6de3bf08f7cf24
[ "MIT" ]
null
null
null
el_galleria/urls.py
kennjr/mi-galleria
3103873e4cfcd2f1c6389362bd6de3bf08f7cf24
[ "MIT" ]
null
null
null
el_galleria/urls.py
kennjr/mi-galleria
3103873e4cfcd2f1c6389362bd6de3bf08f7cf24
[ "MIT" ]
null
null
null
from django.urls import path from el_galleria import views urlpatterns = [ path('', views.index, name="home"), path('category/<str:selected_category>/', views.category, name="category"), path('search/<str:search_str>/', views.search, name="search") ]
26.5
79
0.69434
from django.urls import path from el_galleria import views urlpatterns = [ path('', views.index, name="home"), path('category/<str:selected_category>/', views.category, name="category"), path('search/<str:search_str>/', views.search, name="search") ]
true
true
7903aa4fefc0d2e42140065c21a984ee0e62943c
7,222
py
Python
encode.py
deut-erium/BASEic-steganography
370291442423f866ba5c4976d5e8766ae2d249ba
[ "MIT" ]
1
2020-08-26T03:52:18.000Z
2020-08-26T03:52:18.000Z
encode.py
deut-erium/BASEic-steganography
370291442423f866ba5c4976d5e8766ae2d249ba
[ "MIT" ]
null
null
null
encode.py
deut-erium/BASEic-steganography
370291442423f866ba5c4976d5e8766ae2d249ba
[ "MIT" ]
null
null
null
"""inter-base steganography producing base32 and base64 decodable strings""" from base64 import b64encode, b64decode import string from itertools import product from argparse import ArgumentParser CHARSET = string.printable.encode() B32_CHARSET = (string.ascii_uppercase + '234567').encode() B64_CHARSET = ( string....
33.747664
82
0.542924
from base64 import b64encode, b64decode import string from itertools import product from argparse import ArgumentParser CHARSET = string.printable.encode() B32_CHARSET = (string.ascii_uppercase + '234567').encode() B64_CHARSET = ( string.ascii_lowercase + string.ascii_uppercase + string.digits + '+/')....
true
true