hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f731c9a631559d95706fad6adef4295840c8b049
5,926
py
Python
src/third_party/wiredtiger/test/suite/test_config02.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
src/third_party/wiredtiger/test/suite/test_config02.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
src/third_party/wiredtiger/test/suite/test_config02.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Public Domain 2014-present MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a com...
34.254335
86
0.643773
import os import wiredtiger, wttest class test_config02(wttest.WiredTigerTestCase): table_name1 = 'test_config02' nentries = 100 def setUpConnectionOpen(self, dir): return None def setUpSessionOpen(self, conn): return None def populate...
true
true
f731ca4684b44d80d310ce6e1649c542bdaf125d
1,926
py
Python
samples/vsphere/vcenter/certificatemanagement/trusted_root_chains_delete.py
mariolenz/vsphere-automation-sdk-python
22d8a834f08216d36c8bfdbff98a132b38b8ef82
[ "MIT" ]
null
null
null
samples/vsphere/vcenter/certificatemanagement/trusted_root_chains_delete.py
mariolenz/vsphere-automation-sdk-python
22d8a834f08216d36c8bfdbff98a132b38b8ef82
[ "MIT" ]
null
null
null
samples/vsphere/vcenter/certificatemanagement/trusted_root_chains_delete.py
mariolenz/vsphere-automation-sdk-python
22d8a834f08216d36c8bfdbff98a132b38b8ef82
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ * ******************************************************* * Copyright (c) VMware, Inc. 2020. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS...
35.018182
100
0.692627
__author__ = 'VMware, Inc.' __vcenter_version__ = '7.0+' import argparse from vmware.vapi.vsphere.client import create_vsphere_client import requests from com.vmware.vcenter.certificate_management.vcenter_client import TrustedRootChains from samples.vsphere.common import (sample_cli, sample_util) parser = sample...
true
true
f731ca59ce1647a04a57816eab1d646df4920770
744
py
Python
setup.py
nthparty/fe25519
4badb675c7118f8e116f20d21c055e7872df0593
[ "MIT" ]
null
null
null
setup.py
nthparty/fe25519
4badb675c7118f8e116f20d21c055e7872df0593
[ "MIT" ]
null
null
null
setup.py
nthparty/fe25519
4badb675c7118f8e116f20d21c055e7872df0593
[ "MIT" ]
1
2020-05-20T21:56:51.000Z
2020-05-20T21:56:51.000Z
from setuptools import setup with open("README.rst", "r") as fh: long_description = fh.read().replace(".. include:: toc.rst\n\n", "") # The lines below are parsed by `docs/conf.py`. name = "fe25519" version = "1.2.0" setup( name=name, version=version, packages=[name,], install_requires=[ ...
26.571429
72
0.633065
from setuptools import setup with open("README.rst", "r") as fh: long_description = fh.read().replace(".. include:: toc.rst\n\n", "") name = "fe25519" version = "1.2.0" setup( name=name, version=version, packages=[name,], install_requires=[ "parts~=1.3", "bitlist~=0.7", "...
true
true
f731caeaa20126dfbac6f2f856ed43cf1d1b4fd9
3,511
py
Python
utest/api/test_exposed_api.py
rdagum/robotframework
b7069d505374e9f09a140ed5a9727d2a40716446
[ "ECL-2.0", "Apache-2.0" ]
7,073
2015-01-01T17:19:16.000Z
2022-03-31T22:01:29.000Z
utest/api/test_exposed_api.py
imust6226/robotframework
08c56fef2ebc64d682c7f99acd77c480d8d0e028
[ "ECL-2.0", "Apache-2.0" ]
2,412
2015-01-02T09:29:05.000Z
2022-03-31T13:10:46.000Z
utest/api/test_exposed_api.py
rticau/robotframework
33ee46dfacd5173c0a38d89c1a60abf6a747c8c0
[ "ECL-2.0", "Apache-2.0" ]
2,298
2015-01-03T02:47:15.000Z
2022-03-31T02:00:16.000Z
import unittest from os.path import join from robot import api, model, parsing, reporting, result, running from robot.api import parsing as api_parsing from robot.utils.asserts import assert_equal, assert_true class TestExposedApi(unittest.TestCase): def test_execution_result(self): assert_equal(api.E...
37.351064
86
0.720308
import unittest from os.path import join from robot import api, model, parsing, reporting, result, running from robot.api import parsing as api_parsing from robot.utils.asserts import assert_equal, assert_true class TestExposedApi(unittest.TestCase): def test_execution_result(self): assert_equal(api.E...
true
true
f731caf89a847b286acea5dd16d4a275ed119bd1
764
py
Python
app/db/database.py
Huangkai1008/market-admin
c149f425b640827526b65343b4bceecd528418bf
[ "MIT" ]
6
2020-01-30T10:45:22.000Z
2021-05-26T02:51:43.000Z
app/db/database.py
Huangkai1008/market-admin
c149f425b640827526b65343b4bceecd528418bf
[ "MIT" ]
null
null
null
app/db/database.py
Huangkai1008/market-admin
c149f425b640827526b65343b4bceecd528418bf
[ "MIT" ]
null
null
null
from tortoise import Tortoise from loguru import logger from app.core.config import DB_TYPE, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DATABASE DB_URL = f'{DB_TYPE}://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DATABASE}' async def init(): """初始化连接""" logger.info(f'Connecting to database') await Tortois...
22.470588
87
0.660995
from tortoise import Tortoise from loguru import logger from app.core.config import DB_TYPE, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DATABASE DB_URL = f'{DB_TYPE}://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DATABASE}' async def init(): logger.info(f'Connecting to database') await Tortoise.init( ...
true
true
f731cb10fc8ac86aeacc7f0d065059f3fcf77ebf
8,623
py
Python
test/geometry/test_homography.py
shaunster0/kornia
71acf455ee36f2050b7be5ea993b6db773f502eb
[ "ECL-2.0", "Apache-2.0" ]
51
2019-10-11T18:47:30.000Z
2021-05-03T06:42:37.000Z
test/geometry/test_homography.py
shaunster0/kornia
71acf455ee36f2050b7be5ea993b6db773f502eb
[ "ECL-2.0", "Apache-2.0" ]
9
2022-01-25T00:28:05.000Z
2022-03-20T09:14:39.000Z
test/geometry/test_homography.py
shaunster0/kornia
71acf455ee36f2050b7be5ea993b6db773f502eb
[ "ECL-2.0", "Apache-2.0" ]
7
2019-10-11T19:59:05.000Z
2020-07-10T02:28:52.000Z
import random import pytest import torch from torch.autograd import gradcheck import kornia from kornia.geometry.homography import find_homography_dlt, find_homography_dlt_iterated from kornia.testing import assert_close class TestFindHomographyDLT: def test_smoke(self, device, dtype): points1 = torch.r...
41.859223
118
0.605938
import random import pytest import torch from torch.autograd import gradcheck import kornia from kornia.geometry.homography import find_homography_dlt, find_homography_dlt_iterated from kornia.testing import assert_close class TestFindHomographyDLT: def test_smoke(self, device, dtype): points1 = torch.r...
true
true
f731cba9a9650e31323b7b28e22fc1895735634d
9,219
py
Python
code/combine_sectors.py
jradavenport/helloTESS
1bd4680640e7b92ae3b2eeba19cc63e8b834eead
[ "MIT" ]
null
null
null
code/combine_sectors.py
jradavenport/helloTESS
1bd4680640e7b92ae3b2eeba19cc63e8b834eead
[ "MIT" ]
null
null
null
code/combine_sectors.py
jradavenport/helloTESS
1bd4680640e7b92ae3b2eeba19cc63e8b834eead
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib import os from glob import glob from matplotlib.colors import LogNorm from scipy.optimize import curve_fit from astropy.table import Table import astropy.io.fits as fits from astropy.stats import LombSc...
38.735294
126
0.574574
import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib import os from glob import glob from matplotlib.colors import LogNorm from scipy.optimize import curve_fit from astropy.table import Table import astropy.io.fits as fits from astropy.stats import LombSc...
true
true
f731cbc6feb59399bb774f79ba1a3cf4105984b2
1,268
py
Python
python/pw_multiScriptEditor/widgets/findWidget.py
ZBYVFX/NukeToolSet
a077aa9d8ac941f534d33dfebd27994fc9cefba7
[ "MIT" ]
1
2021-01-05T12:28:35.000Z
2021-01-05T12:28:35.000Z
python/pw_multiScriptEditor/widgets/findWidget.py
ensii75/NukeToolSet
0c47efc3bc7ca513f902e00a3e2b71404636aae9
[ "MIT" ]
null
null
null
python/pw_multiScriptEditor/widgets/findWidget.py
ensii75/NukeToolSet
0c47efc3bc7ca513f902e00a3e2b71404636aae9
[ "MIT" ]
null
null
null
from Qt.QtCore import * from Qt.QtGui import * from Qt.QtWidgets import * import findWidget_UIs as ui class findWidgetClass(QWidget, ui.Ui_findReplace): searchSignal = Signal(str) replaceSignal = Signal(list) replaceAllSignal = Signal(list) def __init__(self, parent): super(findWidgetClass, sel...
34.27027
72
0.670347
from Qt.QtCore import * from Qt.QtGui import * from Qt.QtWidgets import * import findWidget_UIs as ui class findWidgetClass(QWidget, ui.Ui_findReplace): searchSignal = Signal(str) replaceSignal = Signal(list) replaceAllSignal = Signal(list) def __init__(self, parent): super(findWidgetClass, sel...
true
true
f731cd74c0ad4505283364c86d8ef5503e3e88c9
2,763
py
Python
dmutils/user.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
dmutils/user.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
dmutils/user.py
robot2051/dto-digitalmarketplace-utils
e581be6396c12473697398b0ec9d253c564a324b
[ "MIT" ]
null
null
null
import hashlib import base64 def hash_email(email): m = hashlib.sha256() m.update(email.encode('utf-8')) return base64.urlsafe_b64encode(m.digest()) def user_logging_string(user): if user.is_anonymous: return 'User(anonymous)' return 'User(id={}, role={}, hashed_email={})'.format(user.i...
26.825243
109
0.591386
import hashlib import base64 def hash_email(email): m = hashlib.sha256() m.update(email.encode('utf-8')) return base64.urlsafe_b64encode(m.digest()) def user_logging_string(user): if user.is_anonymous: return 'User(anonymous)' return 'User(id={}, role={}, hashed_email={})'.format(user.i...
true
true
f731cede9482145859d440ea399c33fb16b5b9b9
291
py
Python
Python/Numpy/Shape and Reshape.py
pavstar619/HackerRank
697ee46b6e621ad884a064047461d7707b1413cd
[ "MIT" ]
61
2017-04-27T13:45:12.000Z
2022-01-27T11:40:15.000Z
Python/Numpy/Shape and Reshape.py
fahad0193/HackerRank
eb6c95e16688c02921c1df6b6ea613667a251457
[ "MIT" ]
1
2017-06-24T14:16:06.000Z
2017-06-24T14:16:28.000Z
Python/Numpy/Shape and Reshape.py
fahad0193/HackerRank
eb6c95e16688c02921c1df6b6ea613667a251457
[ "MIT" ]
78
2017-07-05T11:48:20.000Z
2022-02-08T08:04:22.000Z
import numpy as np class Main: def __init__(self): self.li = list(map(int, input().split())) self.np_li = np.array(self.li) def output(self): print(np.reshape(self.np_li, (3,3))) if __name__ == '__main__': obj = Main() obj.output()
20.785714
49
0.546392
import numpy as np class Main: def __init__(self): self.li = list(map(int, input().split())) self.np_li = np.array(self.li) def output(self): print(np.reshape(self.np_li, (3,3))) if __name__ == '__main__': obj = Main() obj.output()
true
true
f731cf1d9fcb728621d15653a869ac0796be8492
127,303
py
Python
pylearn2/models/dbm/layer.py
kundajelab/pylearn2
17ebf0c37b35637e337b3ae884806d2c99beb31c
[ "BSD-3-Clause" ]
null
null
null
pylearn2/models/dbm/layer.py
kundajelab/pylearn2
17ebf0c37b35637e337b3ae884806d2c99beb31c
[ "BSD-3-Clause" ]
null
null
null
pylearn2/models/dbm/layer.py
kundajelab/pylearn2
17ebf0c37b35637e337b3ae884806d2c99beb31c
[ "BSD-3-Clause" ]
null
null
null
""" Common DBM Layer classes """ from __future__ import print_function __authors__ = ["Ian Goodfellow", "Vincent Dumoulin"] __copyright__ = "Copyright 2012-2013, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" import functools import logging import num...
30.601683
315
0.55708
from __future__ import print_function __authors__ = ["Ian Goodfellow", "Vincent Dumoulin"] __copyright__ = "Copyright 2012-2013, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" import functools import logging import numpy as np import operator from the...
true
true
f731cf8514305b867ae3294d7fcffca29ab4ef7a
8,011
py
Python
stdplugins/update.py
birhan-15/PepeBot
e76f80eab21ce396a785aff271bcbae9cce6d2ba
[ "Apache-2.0" ]
1
2020-08-09T11:43:20.000Z
2020-08-09T11:43:20.000Z
stdplugins/update.py
mikisol95/UniDragon
55d8aa0659c8406fe1681e977fab27e902dd44f6
[ "Apache-2.0" ]
null
null
null
stdplugins/update.py
mikisol95/UniDragon
55d8aa0659c8406fe1681e977fab27e902dd44f6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # Credits goes to @AvinashReddy3108 for creating this plugin # edited to work on Uniborg by @Mayur_Karaniya # """ This...
35.135965
107
0.615653
from os import environ, execle, path, remove import asyncio import sys from git import Repo from git.exc import GitCommandError, InvalidGitRepositoryError, NoSuchPathError from os import remove import sys from git import Repo from git.exc import GitCommandError from git.exc import InvalidGitRepositoryError fr...
true
true
f731cf92be64b50cb66f64fd5686247ba4b5e5d3
518
py
Python
params.py
Jensbeltman/ai2ludo
b4acbdb319e044cc3db07e5dc8c8eba7955aa9f7
[ "MIT" ]
null
null
null
params.py
Jensbeltman/ai2ludo
b4acbdb319e044cc3db07e5dc8c8eba7955aa9f7
[ "MIT" ]
null
null
null
params.py
Jensbeltman/ai2ludo
b4acbdb319e044cc3db07e5dc8c8eba7955aa9f7
[ "MIT" ]
null
null
null
##Local indexes homeI = 0 startI = 1 # Goal area goalI = 57 # local goal index goalAreaStartI = 52 # local index where goal are starts #Stars starI = [6,12,19,25,32,38,45,51] # start indexes starAtGoalI = 51 # star infront of goal area #Globes globeAtStartI = [1] globeEnemy = [14,27,40] globeSafeI = [1,9,22,35,48] gl...
17.862069
55
0.706564
rtI = 1 goalI = 57 goalAreaStartI = 52 starI = [6,12,19,25,32,38,45,51] starAtGoalI = 51 globeAtStartI = [1] globeEnemy = [14,27,40] globeSafeI = [1,9,22,35,48] globeI = [1,9,14,22,27,35,40,48] n_players = 4 n_pieces = 4 n_pieceParams = 10 globeDie = 3 starDie = 5 sentHomePlayer = 1 sentHomeEnemy = 2
true
true
f731d08063ca1f99f82b11fcdb5162109f2bc026
448
py
Python
applications/signals.py
mattorgill/registration
96effc1a826e81365f5f01ac0435e80419313b07
[ "MIT" ]
5
2020-07-22T19:18:09.000Z
2021-02-05T21:30:42.000Z
applications/signals.py
mattorgill/registration
96effc1a826e81365f5f01ac0435e80419313b07
[ "MIT" ]
9
2021-01-27T21:42:51.000Z
2022-03-12T00:20:25.000Z
applications/signals.py
mattorgill/registration
96effc1a826e81365f5f01ac0435e80419313b07
[ "MIT" ]
1
2018-02-25T02:05:30.000Z
2018-02-25T02:05:30.000Z
from django.db.models.signals import post_save from django.dispatch import receiver from applications import models # Delete DraftApplication when application submitted @receiver(post_save, sender=models.Application) def clean_draft_application(sender, instance, created, *args, **kwargs): if not created: ...
32
72
0.785714
from django.db.models.signals import post_save from django.dispatch import receiver from applications import models @receiver(post_save, sender=models.Application) def clean_draft_application(sender, instance, created, *args, **kwargs): if not created: return None models.DraftApplication.object...
true
true
f731d0a14032c4b2950bf53f828df39fd8c4fedd
12,274
py
Python
nn_dataflow/core/layer.py
joeshow79/nn_dataflow
279440452148ebf327992bd178a37cd5fd5330c5
[ "BSD-3-Clause" ]
null
null
null
nn_dataflow/core/layer.py
joeshow79/nn_dataflow
279440452148ebf327992bd178a37cd5fd5330c5
[ "BSD-3-Clause" ]
null
null
null
nn_dataflow/core/layer.py
joeshow79/nn_dataflow
279440452148ebf327992bd178a37cd5fd5330c5
[ "BSD-3-Clause" ]
null
null
null
""" $lic$ Copyright (C) 2016-2019 by The Board of Trustees of Stanford University This program is free software: you can redistribute it and/or modify it under the terms of the Modified BSD-3 License as published by the Open Source Initiative. This program is distributed in the hope that it will be useful, but WITHOU...
31.715762
79
0.554913
from . import data_category_enum as de from . import loop_enum as le from .. import util from .data_dim_loops import DataDimLoops class Layer(util.ContentHashClass): def __init__(self, nofm, sofm, strd=1): if isinstance(sofm, int): hofm = sofm wofm = sofm elif len(sofm) ==...
true
true
f731d0bb38308f507a437ba37cd55c59966a1f08
3,594
py
Python
Ui_DDSMonitor.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
Ui_DDSMonitor.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
Ui_DDSMonitor.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Z:\Users\Yintai Zhang\Research\ExperimentManger_Test_2\DDSMonitor.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_DDS...
53.641791
201
0.698664
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_DDSMonitor(object): def setupUi(self, DDSMonitor): DDSMonitor.setObjectName("DDSMonitor") DDSMonitor.resize(1179, 846) self.Monitor_TextBrowser = QtWidgets.QTextBrowser(DDSMonitor) self.Monitor_TextBrowser.setGeome...
true
true
f731d291e80cc193af3a536212a228f8cb28fbe4
13,723
py
Python
selfdrive/monitoring/driver_monitor.py
flyingforyou/openpilot
4667084dcfd9d5f01b39b3858fb8d5328840d5df
[ "MIT" ]
null
null
null
selfdrive/monitoring/driver_monitor.py
flyingforyou/openpilot
4667084dcfd9d5f01b39b3858fb8d5328840d5df
[ "MIT" ]
null
null
null
selfdrive/monitoring/driver_monitor.py
flyingforyou/openpilot
4667084dcfd9d5f01b39b3858fb8d5328840d5df
[ "MIT" ]
null
null
null
from math import atan2, sqrt from cereal import car from common.numpy_fast import interp from common.realtime import DT_DMON from selfdrive.hardware import TICI from common.filter_simple import FirstOrderFilter from common.stat_live import RunningStatFilter EventName = car.CarEvent.EventName # **********************...
49.010714
194
0.722218
from math import atan2, sqrt from cereal import car from common.numpy_fast import interp from common.realtime import DT_DMON from selfdrive.hardware import TICI from common.filter_simple import FirstOrderFilter from common.stat_live import RunningStatFilter EventName = car.CarEvent.EventName class DRIVER_MONIT...
true
true
f731d2d82ea0d55223333c1605aa04d4f407f8b3
2,426
py
Python
vivid/endpoint.py
haikuginger/vivid
1ddfe293f0b5a95f3d52f5e737e85d98be1eaab8
[ "MIT" ]
4
2017-11-19T03:22:46.000Z
2019-02-28T08:32:43.000Z
vivid/endpoint.py
haikuginger/vivid
1ddfe293f0b5a95f3d52f5e737e85d98be1eaab8
[ "MIT" ]
null
null
null
vivid/endpoint.py
haikuginger/vivid
1ddfe293f0b5a95f3d52f5e737e85d98be1eaab8
[ "MIT" ]
null
null
null
from vivid.common import ParametersMixin class Endpoint(ParametersMixin, object): """ Descriptor that describes an attribute which acts as a function making an HTTP request. Return a bound endpoint attached to this and the base API. """ def __init__(self, method, path, *parameters): ...
31.102564
68
0.622012
from vivid.common import ParametersMixin class Endpoint(ParametersMixin, object): def __init__(self, method, path, *parameters): self.method = method self.path = path self.parameters = parameters super(Endpoint, self).__init__() def __get__(self, instance, _owner): retu...
true
true
f731d330a352677e2aec29c1fc65fdf8568da45c
1,747
py
Python
neuralmonkey/processors/alignment.py
Simon-Will/neuralmonkey
b686a9d302cb10eda5fca991e1d7ee6b9e84b75a
[ "BSD-3-Clause" ]
5
2017-04-24T21:10:03.000Z
2019-05-22T13:19:35.000Z
neuralmonkey/processors/alignment.py
Simon-Will/neuralmonkey
b686a9d302cb10eda5fca991e1d7ee6b9e84b75a
[ "BSD-3-Clause" ]
null
null
null
neuralmonkey/processors/alignment.py
Simon-Will/neuralmonkey
b686a9d302cb10eda5fca991e1d7ee6b9e84b75a
[ "BSD-3-Clause" ]
5
2017-04-25T01:36:44.000Z
2019-12-13T15:04:03.000Z
import re from typing import List import numpy as np # pylint: disable=too-few-public-methods ID_SEP = re.compile(r"[-:]") class WordAlignmentPreprocessor(object): """A preprocessor for word alignments in a text format. One of the following formats is expected: s1-t1 s2-t2 ... s1:1/w1 s2...
30.12069
78
0.613051
import re from typing import List import numpy as np ID_SEP = re.compile(r"[-:]") class WordAlignmentPreprocessor(object): def __init__(self, source_len, target_len, dtype=np.float32, normalize=True, zero_based=True): self._source_len = source_len self._target_len = target_le...
true
true
f731d397e48ee7a09bfdd1a865be4a4cff1b7f89
5,899
py
Python
archive/script_check_quote.py
THS-on/keylime
bb904fc98d9674832e630542d211e71102873b4d
[ "Apache-2.0" ]
192
2019-05-08T14:43:50.000Z
2022-03-28T20:21:28.000Z
archive/script_check_quote.py
THS-on/keylime
bb904fc98d9674832e630542d211e71102873b4d
[ "Apache-2.0" ]
694
2019-04-18T14:08:36.000Z
2022-03-31T13:55:37.000Z
archive/script_check_quote.py
THS-on/keylime
bb904fc98d9674832e630542d211e71102873b4d
[ "Apache-2.0" ]
97
2019-04-17T19:04:00.000Z
2022-03-20T18:19:28.000Z
#!/usr/bin/env python ''' DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited. This material is based upon work supported by the Assistant Secretary of Defense for Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclu...
33.902299
193
0.689778
import keylime.config keylime.config.USE_CLIME=True from keylime.tpm_quote import check_deep_quote, check_quote from timeit import timeit from timeit import default_timer as timer import logging import sys import os import tempfile import subprocess import base64 logging.basicConfig(stream=sys.stdout, level=loggin...
true
true
f731d3eb4aae5e78db2bfaf2ea2d5f1e9832f7d4
9,108
py
Python
repos/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
import errno import functools import grp import json import logging import os import pwd import re from six.moves import configparser import six from leapp.libraries.stdlib import CalledProcessError, api, run from leapp.models import SysctlVariablesFacts, SysctlVariable, ActiveKernelModulesFacts, ActiveKernelModule, ...
33.485294
117
0.60639
import errno import functools import grp import json import logging import os import pwd import re from six.moves import configparser import six from leapp.libraries.stdlib import CalledProcessError, api, run from leapp.models import SysctlVariablesFacts, SysctlVariable, ActiveKernelModulesFacts, ActiveKernelModule, ...
true
true
f731d41dd8efc8ab1fafc24f2e3c8da6336f6369
2,557
py
Python
rusty/src/odom_pub.py
siddarth09/Rusty
8d4c818869843ddd4d37f4e82f1203cd5566f8b7
[ "MIT" ]
3
2022-01-09T08:45:31.000Z
2022-02-03T04:22:55.000Z
rusty/src/odom_pub.py
siddarth09/Rusty
8d4c818869843ddd4d37f4e82f1203cd5566f8b7
[ "MIT" ]
2
2022-01-19T07:23:59.000Z
2022-02-21T10:17:39.000Z
rusty/src/odom_pub.py
siddarth09/Rusty
8d4c818869843ddd4d37f4e82f1203cd5566f8b7
[ "MIT" ]
null
null
null
#!/usr/bin/python # This scripts takes the odom from TF published by Cartographer and publishes it as an individual topic. Only required when used with real robot. import rospy from nav_msgs.msg import Odometry from geometry_msgs.msg import Pose, Twist import tf #Node to handle calculating and publishing odometry cl...
30.440476
145
0.70043
import rospy from nav_msgs.msg import Odometry from geometry_msgs.msg import Pose, Twist import tf class odometry_publisher(): def __init__(self): rospy.init_node('odom_publisher') self.listener = tf.TransformListener() self.odom_publisher = rospy.Publisher('odom',Odometry,queue_size=1) se...
true
true
f731d4c0ca2482c5e81b997cb3a82b35636c343b
18,733
py
Python
google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py
freelancing-solutions/python-datastore
160f7751db6a2a27cdf2a5232eadc538de8a8268
[ "Apache-2.0" ]
null
null
null
google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py
freelancing-solutions/python-datastore
160f7751db6a2a27cdf2a5232eadc538de8a8268
[ "Apache-2.0" ]
1
2020-04-01T09:22:47.000Z
2020-04-01T12:02:43.000Z
google/cloud/datastore_admin_v1/services/datastore_admin/transports/grpc_asyncio.py
freelancing-solutions/python-datastore
160f7751db6a2a27cdf2a5232eadc538de8a8268
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
42.286682
87
0.644745
import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple from google.api_core import gapic_v1 from google.api_core import grpc_helpers_async from google.api_core import operations_v1 from google import auth from google.auth import credentials from google.auth.t...
true
true
f731d7163a949e08b78c987d882201df17fa56fc
6,194
py
Python
keras/feature_column/dense_features_v2.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/feature_column/dense_features_v2.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/feature_column/dense_features_v2.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.539394
80
0.674524
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf from keras.feature_column import base_feature_layer as kfc from keras.feature_column import dense_features from keras.utils import tf_contextlib from tensorfl...
true
true
f731d83cb3bd2b8583121ddf5531aba8604bc008
14,005
py
Python
main_old.py
umidjon-userbot/tgvcv
78f461bf2e68902d6a9ab4b5d06aca6840c1844f
[ "MIT" ]
null
null
null
main_old.py
umidjon-userbot/tgvcv
78f461bf2e68902d6a9ab4b5d06aca6840c1844f
[ "MIT" ]
null
null
null
main_old.py
umidjon-userbot/tgvcv
78f461bf2e68902d6a9ab4b5d06aca6840c1844f
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import os import asyncio import subprocess import youtube_dl from Python_ARQ import ARQ from pytgcalls import GroupCall from sys import version as pyver from pyrogram import Client, filters from misc import HELP_TEXT, START_TEXT, REPO_TEXT from functions import ( t...
30.645514
97
0.565084
from __future__ import unicode_literals import os import asyncio import subprocess import youtube_dl from Python_ARQ import ARQ from pytgcalls import GroupCall from sys import version as pyver from pyrogram import Client, filters from misc import HELP_TEXT, START_TEXT, REPO_TEXT from functions import ( t...
true
true
f731d84f286ed80e65155cc5debd5fca99760dfb
186
py
Python
2_line_notify/src/config_sample.py
tenpa1105/m5camera_mpy_samples
a47d6eca951fc6298794226f51c20408d7c2d64c
[ "MIT" ]
null
null
null
2_line_notify/src/config_sample.py
tenpa1105/m5camera_mpy_samples
a47d6eca951fc6298794226f51c20408d7c2d64c
[ "MIT" ]
null
null
null
2_line_notify/src/config_sample.py
tenpa1105/m5camera_mpy_samples
a47d6eca951fc6298794226f51c20408d7c2d64c
[ "MIT" ]
null
null
null
WIFI_SSID = "please enter your wifi ssid" WIFI_PASS = "please enter your wifi password" LINE_TOKEN= "please enter your line notify token" MOVING_DET_DIFF = 10 MOVING_DET_LIGHT_MAX = 200
37.2
50
0.795699
WIFI_SSID = "please enter your wifi ssid" WIFI_PASS = "please enter your wifi password" LINE_TOKEN= "please enter your line notify token" MOVING_DET_DIFF = 10 MOVING_DET_LIGHT_MAX = 200
true
true
f731d88c245e18608de7478443566fc03ff583a3
23,559
py
Python
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.690283
161
0.651259
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f731d8ca027353b729bc9ed640d9ad7a07e8266f
1,587
py
Python
CIM16/IEC61970/Dynamics/SynchronousMachineDynamics.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/IEC61970/Dynamics/SynchronousMachineDynamics.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/IEC61970/Dynamics/SynchronousMachineDynamics.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
1
2021-04-02T18:04:49.000Z
2021-04-02T18:04:49.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
39.675
83
0.750473
from CIM16.IEC61970.Dynamics.RotatingMachineDynamics import RotatingMachineDynamics class SynchronousMachineDynamics(RotatingMachineDynamics): def __init__(self, *args, **kw_args): super(SynchronousMachineDynamics, self).__init__(*args, **kw_args) _attrs = [] _attr...
true
true
f731d8f40c75040a81052514bb8660d957209d22
9,955
py
Python
conans/test/functional/layout/test_in_cache.py
thorbenk/conan
916cb10b99ed92d319cd0719462708ee0501ecd4
[ "MIT" ]
null
null
null
conans/test/functional/layout/test_in_cache.py
thorbenk/conan
916cb10b99ed92d319cd0719462708ee0501ecd4
[ "MIT" ]
1
2019-06-07T03:02:02.000Z
2019-06-07T03:02:02.000Z
conans/test/functional/layout/test_in_cache.py
thorbenk/conan
916cb10b99ed92d319cd0719462708ee0501ecd4
[ "MIT" ]
1
2021-08-20T19:47:51.000Z
2021-08-20T19:47:51.000Z
import os import re import textwrap import pytest from conans import load from conans.model.ref import ConanFileReference, PackageReference from conans.test.assets.genconanfile import GenConanfile from conans.test.utils.tools import TestClient @pytest.fixture def conanfile(): conan_file = str(GenConanfile().wit...
36.465201
101
0.631241
import os import re import textwrap import pytest from conans import load from conans.model.ref import ConanFileReference, PackageReference from conans.test.assets.genconanfile import GenConanfile from conans.test.utils.tools import TestClient @pytest.fixture def conanfile(): conan_file = str(GenConanfile().wit...
true
true
f731d92f11113ea1707e78d82712af11992ee782
1,834
py
Python
plugins/digitalocean/komand_digitalocean/actions/shutdown_droplet/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/digitalocean/komand_digitalocean/actions/shutdown_droplet/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/digitalocean/komand_digitalocean/actions/shutdown_droplet/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
import komand import json import requests from .schema import ShutdownDropletInput, ShutdownDropletOutput class ShutdownDroplet(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="shutdown_droplet", description="Shuts down the droplet from a specified im...
35.960784
115
0.602508
import komand import json import requests from .schema import ShutdownDropletInput, ShutdownDropletOutput class ShutdownDroplet(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="shutdown_droplet", description="Shuts down the droplet from a specified im...
true
true
f731d9abc87872b2a6859052c5d9bddd62dc2bbf
7,144
py
Python
statsmodels/regression/feasible_gls.py
haribharadwaj/statsmodels
8675b890607fe6f116b1186dcba4c387c5e3778a
[ "BSD-3-Clause" ]
15
2015-03-03T09:47:42.000Z
2022-01-05T18:28:31.000Z
statsmodels/regression/feasible_gls.py
haribharadwaj/statsmodels
8675b890607fe6f116b1186dcba4c387c5e3778a
[ "BSD-3-Clause" ]
7
2015-11-20T08:33:04.000Z
2020-07-24T19:34:39.000Z
statsmodels/regression/feasible_gls.py
haribharadwaj/statsmodels
8675b890607fe6f116b1186dcba4c387c5e3778a
[ "BSD-3-Clause" ]
14
2015-01-06T22:08:34.000Z
2021-01-01T16:33:23.000Z
# -*- coding: utf-8 -*- """ Created on Tue Dec 20 20:24:20 2011 Author: Josef Perktold License: BSD-3 """ from statsmodels.compat.python import range import numpy as np import statsmodels.base.model as base from statsmodels.regression.linear_model import OLS, GLS, WLS, RegressionResults def atleast_2dcols(x): ...
34.181818
85
0.663074
from statsmodels.compat.python import range import numpy as np import statsmodels.base.model as base from statsmodels.regression.linear_model import OLS, GLS, WLS, RegressionResults def atleast_2dcols(x): x = np.asarray(x) if x.ndim == 1: x = x[:,None] return x class GLSHet2(GLS): def __...
true
true
f731da5a81c641e31e53c884e6c9639b29b76505
9,408
py
Python
openmixup/models/heads/mim_head.py
Westlake-AI/openmixup
ea81250819e740dd823e30cb7ce382d14a3c1b91
[ "Apache-2.0" ]
10
2021-12-30T10:22:27.000Z
2022-03-30T02:31:38.000Z
openmixup/models/heads/mim_head.py
Westlake-AI/openmixup
ea81250819e740dd823e30cb7ce382d14a3c1b91
[ "Apache-2.0" ]
3
2022-01-20T21:02:48.000Z
2022-03-19T13:49:45.000Z
openmixup/models/heads/mim_head.py
Westlake-AI/openmixup
ea81250819e740dd823e30cb7ce382d14a3c1b91
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from mmcv.runner import BaseModule from torch.nn import functional as F from mmcv.cnn.utils.weight_init import trunc_normal_init from ..builder import build_loss from ..registry import HEADS from .cls_head import ClsHead from openmixup.utils import print_log @HEADS.register_module ...
37.333333
95
0.573236
import torch import torch.nn as nn from mmcv.runner import BaseModule from torch.nn import functional as F from mmcv.cnn.utils.weight_init import trunc_normal_init from ..builder import build_loss from ..registry import HEADS from .cls_head import ClsHead from openmixup.utils import print_log @HEADS.register_module ...
true
true
f731dac69125b54c276e48cad62937bf921dd204
4,008
py
Python
tests/packets_ipv4_dns.py
mattjhayes/nmeta
55cc27e81defc42775ff563bfbef31800e089b14
[ "Apache-2.0" ]
18
2015-02-18T22:53:32.000Z
2021-11-16T11:36:50.000Z
tests/packets_ipv4_dns.py
mattjhayes/nmeta
55cc27e81defc42775ff563bfbef31800e089b14
[ "Apache-2.0" ]
67
2015-01-05T07:27:22.000Z
2017-07-21T11:38:14.000Z
tests/packets_ipv4_dns.py
mattjhayes/nmeta
55cc27e81defc42775ff563bfbef31800e089b14
[ "Apache-2.0" ]
8
2015-05-01T18:35:03.000Z
2019-10-02T13:54:53.000Z
# 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, software # distributed under the...
30.830769
276
0.755739
import binascii RAW = [] LEN = [] ETH_SRC = [] ETH_DST = [] ETH_TYPE = [] IP_SRC = [] IP_DST = [] PROTO = [] TP_SRC = [] TP_DST = [] TP_SEQ_SRC = [] TP_SEQ_DST = [] TCP_SYN = [] TCP_FIN = [] TCP_RST = [] TCP_PSH = [] TCP_ACK = [] PAYLOAD = [] DIRECTION = [] DNS_NAME = [] DNS_CNAME = [] DNS_IP ...
true
true
f731db288f3af2b9725dd5bcb99c2c03c2bd44fa
399
py
Python
clubChinois/asgi.py
LonelVino/club-chinois-home
3e2ecc6728f0b7349adfe10e515e3f5908d09c9d
[ "MIT" ]
null
null
null
clubChinois/asgi.py
LonelVino/club-chinois-home
3e2ecc6728f0b7349adfe10e515e3f5908d09c9d
[ "MIT" ]
null
null
null
clubChinois/asgi.py
LonelVino/club-chinois-home
3e2ecc6728f0b7349adfe10e515e3f5908d09c9d
[ "MIT" ]
null
null
null
""" ASGI config for clubChinois project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_S...
23.470588
78
0.789474
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'clubChinois.settings') application = get_asgi_application()
true
true
f731db2b22f21eabf1ae55d4e5b092cecb7772ad
3,106
py
Python
hooks/webkitpy/common/thread/messagepump_unittest.py
nizovn/luna-sysmgr
48b7e2546e81d6ad1604353f2e5ab797a7d1667c
[ "Apache-2.0" ]
15
2015-05-25T19:28:05.000Z
2021-05-03T09:21:22.000Z
WebKit/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
JavaScriptTesting/LJS
9818dbdb421036569fff93124ac2385d45d01c3a
[ "Apache-2.0" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
WebKit/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
JavaScriptTesting/LJS
9818dbdb421036569fff93124ac2385d45d01c3a
[ "Apache-2.0" ]
7
2019-01-30T08:56:04.000Z
2021-11-19T16:14:54.000Z
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
36.97619
79
0.691887
import unittest from webkitpy.common.thread.messagepump import MessagePump, MessagePumpDelegate from webkitpy.common.thread.threadedmessagequeue import ThreadedMessageQueue class TestDelegate(MessagePumpDelegate): def __init__(self): self.log = [] def schedule(self, inter...
true
true
f731dcea61a92d9d646629353eb1706f5a38b82e
8,251
py
Python
pwndbg/commands/nearpc.py
jmc1283/pwndbg
df165f0788948b9b12e6a80fa91d647c13e6eb0a
[ "MIT" ]
21
2018-01-01T13:28:56.000Z
2019-11-06T15:30:56.000Z
pwndbg/commands/nearpc.py
jmc1283/pwndbg
df165f0788948b9b12e6a80fa91d647c13e6eb0a
[ "MIT" ]
null
null
null
pwndbg/commands/nearpc.py
jmc1283/pwndbg
df165f0788948b9b12e6a80fa91d647c13e6eb0a
[ "MIT" ]
5
2018-01-02T01:30:41.000Z
2020-01-04T05:55:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import codecs import gdb from capstone import * import pwndbg.arguments import pwndbg.color import pwndbg....
39.290476
159
0.688038
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import codecs import gdb from capstone import * import pwndbg.arguments import pwndbg.color import pwndbg.color.context as C import pwndbg.color.disas...
true
true
f731df9decd333bae50c1e2a514b5c83b2a8f9b3
5,684
py
Python
scripts/fig3_locking_across_frequencies.py
fabiansinz/locker
9ca397d0a9aa747552bc43188b07056b87c6e9f0
[ "MIT" ]
null
null
null
scripts/fig3_locking_across_frequencies.py
fabiansinz/locker
9ca397d0a9aa747552bc43188b07056b87c6e9f0
[ "MIT" ]
null
null
null
scripts/fig3_locking_across_frequencies.py
fabiansinz/locker
9ca397d0a9aa747552bc43188b07056b87c6e9f0
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') from matplotlib.collections import PolyCollection from numpy.fft import fft, fftfreq, fftshift from locker import mkdir from locker.analysis import * from locker.data import * from scripts.config import params as plot_params, FormatedFigure def generate_filename(cell, contrast)...
43.389313
116
0.508797
import matplotlib matplotlib.use('Agg') from matplotlib.collections import PolyCollection from numpy.fft import fft, fftfreq, fftshift from locker import mkdir from locker.analysis import * from locker.data import * from scripts.config import params as plot_params, FormatedFigure def generate_filename(cell, contrast)...
true
true
f731e03ae1b3564391dc273fed1062bf7757db8f
3,023
py
Python
src/caravaggio_rest_api/users/admin.py
intellstartup/django-caravaggio-rest-api
98a530f7c0c38860561fac2f57476cf40f03e3d7
[ "MIT" ]
null
null
null
src/caravaggio_rest_api/users/admin.py
intellstartup/django-caravaggio-rest-api
98a530f7c0c38860561fac2f57476cf40f03e3d7
[ "MIT" ]
null
null
null
src/caravaggio_rest_api/users/admin.py
intellstartup/django-caravaggio-rest-api
98a530f7c0c38860561fac2f57476cf40f03e3d7
[ "MIT" ]
1
2020-03-03T22:48:51.000Z
2020-03-03T22:48:51.000Z
# -*- coding: utf-8 -* # Copyright (c) 2019 BuildGroup Data Services, Inc. # All rights reserved. # This software is proprietary and confidential and may not under # any circumstances be used, copied, or distributed. from django.contrib import admin from django.contrib.auth.admin import UserAdmin from caravaggio_rest...
38.75641
113
0.629176
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from caravaggio_rest_api.users.models import CaravaggioOrganization, CaravaggioClient, CaravaggioUser from caravaggio_rest_api.users.forms import CaravaggioUserCreationForm, CaravaggioUserChangeForm from django.utils.translation imp...
true
true
f731e044c42d70929ca1dde381c15c75b32e29b6
4,826
py
Python
packages/fetchai/skills/thermometer/strategy.py
cyenyxe/agents-aea
c2aec9127028ae13def3f69fbc80d35400de1565
[ "Apache-2.0" ]
null
null
null
packages/fetchai/skills/thermometer/strategy.py
cyenyxe/agents-aea
c2aec9127028ae13def3f69fbc80d35400de1565
[ "Apache-2.0" ]
1
2020-02-21T14:28:13.000Z
2020-03-05T14:53:53.000Z
packages/fetchai/skills/thermometer/strategy.py
cyenyxe/agents-aea
c2aec9127028ae13def3f69fbc80d35400de1565
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
32.829932
92
0.61666
import logging from random import randrange from typing import Any, Dict, Tuple from temper import Temper from aea.helpers.search.models import Description, Query from aea.mail.base import Address from aea.skills.base import Model from packages.fetchai.skills.thermometer.thermometer_data_model imp...
true
true
f731e2cb91bc067b57e8218188dc62edb4b4ad1a
3,754
py
Python
utils/text_fallback.py
laura-ham/INTEX
07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9
[ "MIT" ]
null
null
null
utils/text_fallback.py
laura-ham/INTEX
07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9
[ "MIT" ]
null
null
null
utils/text_fallback.py
laura-ham/INTEX
07bcf26ca17092ecf4fc41b85ea9d764a0caa8c9
[ "MIT" ]
null
null
null
import nltk import pandas as pd try: import libvoikko except ModuleNotFoundError: from voikko import libvoikko import logging from nltk.corpus import stopwords logger = logging.getLogger(__name__) nltk.download('stopwords') EMAIL_REGEX = ( r"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]...
33.81982
88
0.600693
import nltk import pandas as pd try: import libvoikko except ModuleNotFoundError: from voikko import libvoikko import logging from nltk.corpus import stopwords logger = logging.getLogger(__name__) nltk.download('stopwords') EMAIL_REGEX = ( r"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]...
true
true
f731e3087e60474a011882b5a3c220186114ae19
979
py
Python
tests/tests_helpers.py
thsis/NIS18
1f2a7be1ab209fa7c0a25cb8eace744336b07c1f
[ "MIT" ]
null
null
null
tests/tests_helpers.py
thsis/NIS18
1f2a7be1ab209fa7c0a25cb8eace744336b07c1f
[ "MIT" ]
null
null
null
tests/tests_helpers.py
thsis/NIS18
1f2a7be1ab209fa7c0a25cb8eace744336b07c1f
[ "MIT" ]
null
null
null
import numpy as np from algorithms import helpers def test_QR(Ntests): passed = 0 critical = 0 for _ in range(Ntests): try: n = np.random.randint(2, 11) X = np.random.uniform(low=0.0, high=100.0, size=(n, n...
26.459459
60
0.514811
import numpy as np from algorithms import helpers def test_QR(Ntests): passed = 0 critical = 0 for _ in range(Ntests): try: n = np.random.randint(2, 11) X = np.random.uniform(low=0.0, high=100.0, size=(n, n...
true
true
f731e5102507b94eeb51094b340932c5317bf095
46
py
Python
tf1.6/hello_world.py
sgeos/tensorflow_playground
c4c10b74b1eebb63f0bf8de7a9a976c11f025618
[ "CC0-1.0" ]
null
null
null
tf1.6/hello_world.py
sgeos/tensorflow_playground
c4c10b74b1eebb63f0bf8de7a9a976c11f025618
[ "CC0-1.0" ]
null
null
null
tf1.6/hello_world.py
sgeos/tensorflow_playground
c4c10b74b1eebb63f0bf8de7a9a976c11f025618
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python print("Hello World!")
9.2
21
0.652174
print("Hello World!")
true
true
f731e51078bcba5985a20831c62f2df1e230b71b
9,066
py
Python
Layers/LSTM.py
starasteh/DeepLearning_from_scratch
6ed4685e4da57ad5ea51edf84010f2cc9725a2ba
[ "MIT" ]
6
2020-09-13T17:03:26.000Z
2021-05-16T14:03:59.000Z
Layers/LSTM.py
starasteh/DeepLearning_from_scratch
6ed4685e4da57ad5ea51edf84010f2cc9725a2ba
[ "MIT" ]
null
null
null
Layers/LSTM.py
starasteh/DeepLearning_from_scratch
6ed4685e4da57ad5ea51edf84010f2cc9725a2ba
[ "MIT" ]
2
2021-03-17T02:20:42.000Z
2021-04-24T16:28:45.000Z
''' Created on January 2020. @author: Soroosh Tayebi Arasteh <soroosh.arasteh@fau.de> https://github.com/tayebiarasteh/ ''' from Layers.Base import * import numpy as np import pdb from Layers import Sigmoid, FullyConnected, TanH import copy class LSTM(base_layer): def __init__(self, input_size, hidden_size, out...
37.155738
124
0.64604
from Layers.Base import * import numpy as np import pdb from Layers import Sigmoid, FullyConnected, TanH import copy class LSTM(base_layer): def __init__(self, input_size, hidden_size, output_size): super().__init__() self.input_size = input_size self.hidden_size = hidden_size sel...
true
true
f731e59f967dc833ca0efbb9f27ea0cceff52d86
285
py
Python
tp_epi/tp_epi/doctype/epi_catalog_listing/test_epi_catalog_listing.py
mntechnique/tp_epi
078a2590b50c759555880f143841ef74071b83bc
[ "MIT" ]
null
null
null
tp_epi/tp_epi/doctype/epi_catalog_listing/test_epi_catalog_listing.py
mntechnique/tp_epi
078a2590b50c759555880f143841ef74071b83bc
[ "MIT" ]
null
null
null
tp_epi/tp_epi/doctype/epi_catalog_listing/test_epi_catalog_listing.py
mntechnique/tp_epi
078a2590b50c759555880f143841ef74071b83bc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, MN Technique and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('EPI Catalog Listing') class TestEPICatalogListing(unittest.TestCase): pass
21.923077
63
0.778947
from __future__ import unicode_literals import frappe import unittest class TestEPICatalogListing(unittest.TestCase): pass
true
true
f731e5a5be517d62ed376f4bef3cd377ea2b9167
438
py
Python
nodux_stock_one/config/desktop.py
tatiqm25/nodux_stock_one
78bcfd33b8ec89e2f7399dff55bb597cc52be2c0
[ "MIT" ]
null
null
null
nodux_stock_one/config/desktop.py
tatiqm25/nodux_stock_one
78bcfd33b8ec89e2f7399dff55bb597cc52be2c0
[ "MIT" ]
null
null
null
nodux_stock_one/config/desktop.py
tatiqm25/nodux_stock_one
78bcfd33b8ec89e2f7399dff55bb597cc52be2c0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Nodux Stock One", "color": "darkgrey", "icon": "octicon octicon-file-directory", "type": "module", "hidden": 1 }, { "module_name": "Stock", "_doctype": "Stock One...
18.25
44
0.586758
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Nodux Stock One", "color": "darkgrey", "icon": "octicon octicon-file-directory", "type": "module", "hidden": 1 }, { "module_name": "Stock", "_doctype": "Stock One", "color": "#f39c12...
true
true
f731e64c211030f3004ca41b06d5ae447a8e7b28
3,626
py
Python
configs/fcos/fcos_r50_caffe_fpn_gn_1x_4gpu.py
wangxu19920419/mmdetection
b7890e243babd7d916086ce288f12350d816bd15
[ "Apache-2.0" ]
null
null
null
configs/fcos/fcos_r50_caffe_fpn_gn_1x_4gpu.py
wangxu19920419/mmdetection
b7890e243babd7d916086ce288f12350d816bd15
[ "Apache-2.0" ]
null
null
null
configs/fcos/fcos_r50_caffe_fpn_gn_1x_4gpu.py
wangxu19920419/mmdetection
b7890e243babd7d916086ce288f12350d816bd15
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='FCOS', pretrained='open-mmlab://resnet50_caffe', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), style='caffe'), ne...
27.892308
113
0.620243
model = dict( type='FCOS', pretrained='open-mmlab://resnet50_caffe', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), style='caffe'), neck=dict( ...
true
true
f731e6dbf70d7c3cf15954de216636afb6bd4249
3,337
py
Python
main.py
LarsChrWiik/Comparing-Machine-Learning-Models
050b1bdb40c1d2e9c15f927e9eb257b4b7aaacbe
[ "MIT" ]
null
null
null
main.py
LarsChrWiik/Comparing-Machine-Learning-Models
050b1bdb40c1d2e9c15f927e9eb257b4b7aaacbe
[ "MIT" ]
null
null
null
main.py
LarsChrWiik/Comparing-Machine-Learning-Models
050b1bdb40c1d2e9c15f927e9eb257b4b7aaacbe
[ "MIT" ]
null
null
null
from scipy.io import arff from sklearn.pipeline import Pipeline from sklearn.utils import shuffle from ModelScorer import ModelScorer import pandas as pd from Plotter import * import warnings #warnings.simplefilter(action='ignore', category=FutureWarning) warnings.filterwarnings("ignore") pd.set_option('disp...
33.707071
94
0.709919
from scipy.io import arff from sklearn.pipeline import Pipeline from sklearn.utils import shuffle from ModelScorer import ModelScorer import pandas as pd from Plotter import * import warnings warnings.filterwarnings("ignore") pd.set_option('display.expand_frame_repr', False) from sklearn.dummy import D...
true
true
f731e81692857af543cde6e9c07ecfe8dccf96ac
841
py
Python
test_seq_features.py
daviortega/protfeature
76f0141f72d0c34a29704598cde5c15e68c6b818
[ "MIT" ]
null
null
null
test_seq_features.py
daviortega/protfeature
76f0141f72d0c34a29704598cde5c15e68c6b818
[ "MIT" ]
null
null
null
test_seq_features.py
daviortega/protfeature
76f0141f72d0c34a29704598cde5c15e68c6b818
[ "MIT" ]
null
null
null
import pytest from seq_features import * def test_n_neg_for_single_E_or_D(): """Perform unit tests on n_neg.""" assert n_neg('E') == 1 assert n_neg('D') == 1 def test_n_neg_for_empty_sequence(): assert n_neg('') == 0 def test_n_neg_for_longer_sequences(): assert n_neg('ACKLWTTAE') == 1 ...
25.484848
48
0.681332
import pytest from seq_features import * def test_n_neg_for_single_E_or_D(): assert n_neg('E') == 1 assert n_neg('D') == 1 def test_n_neg_for_empty_sequence(): assert n_neg('') == 0 def test_n_neg_for_longer_sequences(): assert n_neg('ACKLWTTAE') == 1 assert n_neg('DDDDEEEE') == 8 def test...
true
true
f731e81f7cb78dfca687516d372c3f03d4e3eccb
56
py
Python
inclearn/convnet/__init__.py
romilbhardwaj/incremental_learning.pytorch
77097ef4dd4fc6b6c35d13ef66856d6f8a15598d
[ "MIT" ]
3
2019-07-01T14:43:05.000Z
2019-12-27T13:26:52.000Z
inclearn/convnet/__init__.py
rahulvigneswaran/incremental_learning.pytorch
786ecda7dbce5977894737d61cd5e3a30f61aac6
[ "MIT" ]
null
null
null
inclearn/convnet/__init__.py
rahulvigneswaran/incremental_learning.pytorch
786ecda7dbce5977894737d61cd5e3a30f61aac6
[ "MIT" ]
null
null
null
from . import cifar_resnet, densenet, my_resnet, resnet
28
55
0.803571
from . import cifar_resnet, densenet, my_resnet, resnet
true
true
f731e8d74b347c0259534af53c389d1a5bf2b3bc
13,125
py
Python
devel/lib/python2.7/dist-packages/hector_uav_msgs/msg/_LandingActionGoal.py
pplankton/MRSLAM
0a16489a2cbd0c2d1511b506c540446cc670bde8
[ "MIT" ]
1
2021-05-17T11:13:01.000Z
2021-05-17T11:13:01.000Z
devel/lib/python2.7/dist-packages/hector_uav_msgs/msg/_LandingActionGoal.py
pplankton/MRSLAM
0a16489a2cbd0c2d1511b506c540446cc670bde8
[ "MIT" ]
null
null
null
devel/lib/python2.7/dist-packages/hector_uav_msgs/msg/_LandingActionGoal.py
pplankton/MRSLAM
0a16489a2cbd0c2d1511b506c540446cc670bde8
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from hector_uav_msgs/LandingActionGoal.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg import hector_uav_msgs.msg import genpy import actionlib_ms...
38.265306
327
0.643962
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg import hector_uav_msgs.msg import genpy import actionlib_msgs.msg import std_msgs.msg class LandingActionGoal(genpy.Message): _md5sum = "f5e95feb07d8f5f21d989eb34d7c3243" _type = "hector_uav_ms...
true
true
f731e9a98528dc5e011f119e55fcaa7ffca1650c
1,917
py
Python
keanu-python/keanu/infer_type.py
rs992214/keanu
f7f9b877aaaf9c9f732604f17da238e15dfdad13
[ "MIT" ]
153
2018-04-06T13:30:31.000Z
2022-01-31T10:05:27.000Z
keanu-python/keanu/infer_type.py
shinnlok/keanu
c75b2a00571a0da93c6b1d5e9f0cbe09aebdde4d
[ "MIT" ]
168
2018-04-06T16:37:33.000Z
2021-09-27T21:43:54.000Z
keanu-python/keanu/infer_type.py
shinnlok/keanu
c75b2a00571a0da93c6b1d5e9f0cbe09aebdde4d
[ "MIT" ]
46
2018-04-10T10:46:01.000Z
2022-02-24T02:53:50.000Z
from typing import Callable, Dict, Any, Union import numpy as np from keanu.vartypes import (numpy_types, tensor_arg_types, runtime_numpy_types, runtime_pandas_types, runtime_primitive_types, runtime_bool_types, runtime_int_types, runtime_float_types, primitive_...
38.34
118
0.709442
from typing import Callable, Dict, Any, Union import numpy as np from keanu.vartypes import (numpy_types, tensor_arg_types, runtime_numpy_types, runtime_pandas_types, runtime_primitive_types, runtime_bool_types, runtime_int_types, runtime_float_types, primitive_...
true
true
f731e9dc46d9a42f547e7b29cb89e2dde3ec8755
15,925
py
Python
tests/unit/api/resources/systems.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
5
2020-06-04T10:20:33.000Z
2020-10-26T15:09:19.000Z
tests/unit/api/resources/systems.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
tests/unit/api/resources/systems.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
# Copyright 2016, 2017 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 agreed to in writin...
35.467706
79
0.589827
from tessia.server.api.resources.systems import SystemResource from tessia.server.api.resources.systems import MSG_BAD_COMBO from tessia.server.db import models from tests.unit.api.resources.secure_resource import TestSecureResource import json class TestSystems(TestSecureResource): ...
true
true
f731e9f673edb980d0ac68138a8573de0e682d5d
1,411
py
Python
python/ledger/ledger.py
fruit-in/exercism-solution
942f824e2dacd23ee9fd12f5b3e8abed0aeb9581
[ "MIT" ]
9
2020-12-12T03:29:33.000Z
2021-08-11T13:08:06.000Z
python/ledger/ledger.py
fruit-in/exercism-solution
942f824e2dacd23ee9fd12f5b3e8abed0aeb9581
[ "MIT" ]
null
null
null
python/ledger/ledger.py
fruit-in/exercism-solution
942f824e2dacd23ee9fd12f5b3e8abed0aeb9581
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def create_entry(date, description, change): return (list(map(int, date.split("-"))), description, change) def format_entries(currency, locale, entries): if currency == "USD": symbol = "$" elif currency == "EUR": symbol = u"€" if locale == "en_US": he...
32.068182
78
0.530829
def create_entry(date, description, change): return (list(map(int, date.split("-"))), description, change) def format_entries(currency, locale, entries): if currency == "USD": symbol = "$" elif currency == "EUR": symbol = u"€" if locale == "en_US": header = ("Date", "Descri...
true
true
f731ea57e184ee823c29cfdd9e927eb1b20e4e3c
9,625
py
Python
portality/api/v1/data_objects/article.py
glauberm/doaj
dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7
[ "Apache-2.0" ]
null
null
null
portality/api/v1/data_objects/article.py
glauberm/doaj
dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7
[ "Apache-2.0" ]
null
null
null
portality/api/v1/data_objects/article.py
glauberm/doaj
dc24dfcbf4a9f02ce5c9b09b611a5766ea5742f7
[ "Apache-2.0" ]
null
null
null
from portality.lib import dataobj, swagger from portality import models from portality.util import normalise_issn from copy import deepcopy BASE_ARTICLE_STRUCT = { "fields": { "id": {"coerce": "unicode"}, # Note that we'll leave these in for ease of use by the "created_date": {"coerc...
40.611814
213
0.511896
from portality.lib import dataobj, swagger from portality import models from portality.util import normalise_issn from copy import deepcopy BASE_ARTICLE_STRUCT = { "fields": { "id": {"coerce": "unicode"}, "created_date": {"coerce": "utcdatetime"}, # caller, but we'll need to ignore...
true
true
f731eaedc7007e19c5df89d50ff508da3dfd5341
1,892
py
Python
test/benchmark/time_examples.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
null
null
null
test/benchmark/time_examples.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
3
2018-07-26T17:56:30.000Z
2018-07-27T20:23:27.000Z
test/benchmark/time_examples.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
3
2018-07-25T22:53:31.000Z
2018-09-16T06:14:43.000Z
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys if sys.version_info[0] == 3: xrange = range import warnings class TimeSuite: sample_time = 0.1 ...
18.732673
67
0.598309
from __future__ import (absolute_import, division, print_function, unicode_literals) import sys if sys.version_info[0] == 3: xrange = range import warnings class TimeSuite: sample_time = 0.1 def setup(self): self.n = 100 def time_example_benchmark_1(self): ...
true
true
f731eba05d25ea0e31730128b001cfb74e109186
2,039
py
Python
env/bin/thresholder.py
tarasen1/Django-Agregator-Site
6d873fa3e845776242bca150330754fc98f82f24
[ "Apache-2.0" ]
null
null
null
env/bin/thresholder.py
tarasen1/Django-Agregator-Site
6d873fa3e845776242bca150330754fc98f82f24
[ "Apache-2.0" ]
null
null
null
env/bin/thresholder.py
tarasen1/Django-Agregator-Site
6d873fa3e845776242bca150330754fc98f82f24
[ "Apache-2.0" ]
null
null
null
#!/home/tarasen/Studying/3kurs/kursova/Django-Agregator-Site/env/bin/python3 # # The Python Imaging Library # $Id$ # # this demo script illustrates how a 1-bit BitmapImage can be used # as a dynamically updated overlay # import sys if sys.version_info[0] > 2: import tkinter else: import Tkinter as tkinter fr...
25.17284
79
0.59539
import sys if sys.version_info[0] > 2: import tkinter else: import Tkinter as tkinter from PIL import Image, ImageTk class UI(tkinter.Frame): def __init__(self, master, im, value=128): tkinter.Frame.__init__(self, master) self.image = im self.value = value s...
true
true
f731ebd92d3e6a4eb9b1d1ad5a0b1c60aa2b84c8
235
py
Python
main.py
gesa23/ds1hw1
fe69bcfd311467611a9534bbeaa7705ed95fafdb
[ "MIT" ]
null
null
null
main.py
gesa23/ds1hw1
fe69bcfd311467611a9534bbeaa7705ed95fafdb
[ "MIT" ]
null
null
null
main.py
gesa23/ds1hw1
fe69bcfd311467611a9534bbeaa7705ed95fafdb
[ "MIT" ]
null
null
null
from sklearn.datasets import load_iris import pandas as pd ds = load_iris() df = pd.DataFrame(data= ds["data"], columns=ds["feature_names"]) target_names = [ds.target_names[x] for x in ds.target] df['species'] = target_names print(df)
29.375
64
0.744681
from sklearn.datasets import load_iris import pandas as pd ds = load_iris() df = pd.DataFrame(data= ds["data"], columns=ds["feature_names"]) target_names = [ds.target_names[x] for x in ds.target] df['species'] = target_names print(df)
true
true
f731ebf69d1b3147077df832bd6fc49c83be8a50
5,683
py
Python
core/target_assigner.py
jacke121/MBMD
2daf5edb4fb40ee652baead4f9332ca00fa111a5
[ "MIT" ]
220
2018-09-17T15:42:54.000Z
2021-09-13T13:14:22.000Z
core/target_assigner.py
jacke121/MBMD
2daf5edb4fb40ee652baead4f9332ca00fa111a5
[ "MIT" ]
12
2018-09-19T09:30:42.000Z
2019-07-01T04:03:51.000Z
core/target_assigner.py
jacke121/MBMD
2daf5edb4fb40ee652baead4f9332ca00fa111a5
[ "MIT" ]
60
2018-09-18T00:29:50.000Z
2021-02-22T03:55:19.000Z
from object_detection.core.target_assigner import TargetAssigner import tensorflow as tf from object_detection.core import box_list class TargetAssignerExtend(TargetAssigner): def assign(self, anchors, groundtruth_boxes, groundtruth_labels=None, **params): """Assign classification and regres...
52.137615
96
0.656343
from object_detection.core.target_assigner import TargetAssigner import tensorflow as tf from object_detection.core import box_list class TargetAssignerExtend(TargetAssigner): def assign(self, anchors, groundtruth_boxes, groundtruth_labels=None, **params): if not isinstance(anchors, box_list...
true
true
f731ed69223b08af30aa39ddf1f3fcb69b74e15d
7,374
py
Python
bindings/bindingtester/tests/test_util.py
timansky/foundationdb
97dd83d94060145687395fe1fa440b88aaa078a8
[ "Apache-2.0" ]
1
2019-10-10T03:50:16.000Z
2019-10-10T03:50:16.000Z
bindings/bindingtester/tests/test_util.py
timansky/foundationdb
97dd83d94060145687395fe1fa440b88aaa078a8
[ "Apache-2.0" ]
2
2019-03-15T22:23:06.000Z
2019-03-17T18:45:04.000Z
bindings/bindingtester/tests/test_util.py
timansky/foundationdb
97dd83d94060145687395fe1fa440b88aaa078a8
[ "Apache-2.0" ]
1
2019-01-22T08:06:14.000Z
2019-01-22T08:06:14.000Z
# # test_util.py # # This source file is part of the FoundationDB open source project # # Copyright 2013-2018 Apple Inc. and the FoundationDB project authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
35.970732
130
0.586113
import random import uuid import unicodedata import ctypes import math import fdb import fdb.tuple from bindingtester import util from bindingtester import FDB_API_VERSION from bindingtester.known_testers import COMMON_TYPES class RandomGenerator(object): def __init__(self, max_int_bits=64, ...
false
true
f731efb7559b666c4a6065e41852c7907e2377e0
1,575
py
Python
tuframework/training/network_training/nnUNet_variants/loss_function/nnUNetTrainerV2_Loss_TopK10.py
Magnety/tuFramework
b31cb34d476ef306b52da955021f93c91c14ddf4
[ "Apache-2.0" ]
null
null
null
tuframework/training/network_training/nnUNet_variants/loss_function/nnUNetTrainerV2_Loss_TopK10.py
Magnety/tuFramework
b31cb34d476ef306b52da955021f93c91c14ddf4
[ "Apache-2.0" ]
null
null
null
tuframework/training/network_training/nnUNet_variants/loss_function/nnUNetTrainerV2_Loss_TopK10.py
Magnety/tuFramework
b31cb34d476ef306b52da955021f93c91c14ddf4
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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...
47.727273
114
0.780952
from tuframework.training.network_training.tuTrainerV2 import tuframeworkTrainerV2 from tuframework.training.loss_functions.TopK_loss import TopKLoss class tuframeworkTrainerV2_Loss_TopK10(tuframeworkTrainerV2): def __init__(self, plans_file, fold, output_folder=None, dataset_directory=None, batch_...
true
true
f731f193fe6801caeef3fb2dbd500edd4a60f9c2
966
py
Python
projects/controllers/experiments/runs/metrics.py
dnlcesilva/projects
8e367d502aa0ffe3ed29f767d6ab039e6bee282f
[ "Apache-2.0" ]
1
2021-06-26T19:13:49.000Z
2021-06-26T19:13:49.000Z
projects/controllers/experiments/runs/metrics.py
ndarvishev/projects
6a9855c5f8af8fad2799ef7a203e126b834c5056
[ "Apache-2.0" ]
null
null
null
projects/controllers/experiments/runs/metrics.py
ndarvishev/projects
6a9855c5f8af8fad2799ef7a203e126b834c5056
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Experiments Metrics controller.""" import platiagro from projects.exceptions import NotFound class MetricController: def __init__(self, session): self.session = session def list_metrics(self, project_id: str, experiment_id: str, run_id: str, operator_id: str): """ ...
27.6
95
0.55176
import platiagro from projects.exceptions import NotFound class MetricController: def __init__(self, session): self.session = session def list_metrics(self, project_id: str, experiment_id: str, run_id: str, operator_id: str): try: return platiagro.list_metrics(experiment_id=expe...
true
true
f731f1cac8881b492f15feffbb5c895e2bfc8902
13,143
py
Python
diffusion_logic.py
marklr/vqgan-clip-app
23edb7ae6234ab177a91865c02be160151fcf566
[ "MIT" ]
null
null
null
diffusion_logic.py
marklr/vqgan-clip-app
23edb7ae6234ab177a91865c02be160151fcf566
[ "MIT" ]
null
null
null
diffusion_logic.py
marklr/vqgan-clip-app
23edb7ae6234ab177a91865c02be160151fcf566
[ "MIT" ]
null
null
null
import clip import sys import torch from torchvision import transforms from torchvision.transforms import functional as TF from kornia import augmentation, filters from torch import nn from torch.nn import functional as F import math import lpips from PIL import Image sys.path.append("./guided-diffusion") from guided...
37.338068
104
0.575668
import clip import sys import torch from torchvision import transforms from torchvision.transforms import functional as TF from kornia import augmentation, filters from torch import nn from torch.nn import functional as F import math import lpips from PIL import Image sys.path.append("./guided-diffusion") from guided...
true
true
f731f4063b2323508a137e94df93708a25ff3792
11,583
py
Python
evap/contributor/views.py
JannisBerndt/EvaP
a3ca8bcf091e811421084c4db14ae9666cf2a27f
[ "MIT" ]
26
2015-01-18T18:01:57.000Z
2018-10-12T14:37:15.000Z
evap/contributor/views.py
JannisBerndt/EvaP
a3ca8bcf091e811421084c4db14ae9666cf2a27f
[ "MIT" ]
737
2015-01-02T17:43:25.000Z
2018-12-10T20:45:10.000Z
evap/contributor/views.py
JannisBerndt/EvaP
a3ca8bcf091e811421084c4db14ae9666cf2a27f
[ "MIT" ]
83
2015-01-14T12:39:41.000Z
2018-10-29T16:36:43.000Z
from django.contrib import messages from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.db import IntegrityError, transaction from django.db.models import Exists, Max, OuterRef, Q from django.forms.models import inlineformset_factory from django.shortcuts import get_object_or_404, redir...
39
131
0.723388
from django.contrib import messages from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.db import IntegrityError, transaction from django.db.models import Exists, Max, OuterRef, Q from django.forms.models import inlineformset_factory from django.shortcuts import get_object_or_404, redir...
true
true
f731f40f8cf167eb9de4c3331309f87f3f6d2a1d
882
py
Python
tests/test_deep/test_agents/test_a2c.py
Zeus3101/genrl
03e7f693ede98b2afbcb3fc8505f8a2bc4eedffc
[ "MIT" ]
1
2020-06-13T15:21:57.000Z
2020-06-13T15:21:57.000Z
tests/test_deep/test_agents/test_a2c.py
Zeus3101/genrl
03e7f693ede98b2afbcb3fc8505f8a2bc4eedffc
[ "MIT" ]
null
null
null
tests/test_deep/test_agents/test_a2c.py
Zeus3101/genrl
03e7f693ede98b2afbcb3fc8505f8a2bc4eedffc
[ "MIT" ]
2
2020-06-13T15:29:06.000Z
2021-08-20T15:48:53.000Z
import shutil from genrl.agents import A2C from genrl.environments import VectorEnv from genrl.trainers import OnPolicyTrainer def test_a2c(): env = VectorEnv("CartPole-v0", 1) algo = A2C("mlp", env, rollout_size=128) trainer = OnPolicyTrainer(algo, env, log_mode=["csv"], logdir="./logs", epochs=1) t...
29.4
85
0.666667
import shutil from genrl.agents import A2C from genrl.environments import VectorEnv from genrl.trainers import OnPolicyTrainer def test_a2c(): env = VectorEnv("CartPole-v0", 1) algo = A2C("mlp", env, rollout_size=128) trainer = OnPolicyTrainer(algo, env, log_mode=["csv"], logdir="./logs", epochs=1) t...
true
true
f731f473beaac8baa64a2a5996f9d8e18231c089
12,612
py
Python
tests/cic_test.py
jurreht/cic
95a5e32eeb26da8d18642add2259f164426e1a25
[ "MIT" ]
null
null
null
tests/cic_test.py
jurreht/cic
95a5e32eeb26da8d18642add2259f164426e1a25
[ "MIT" ]
null
null
null
tests/cic_test.py
jurreht/cic
95a5e32eeb26da8d18642add2259f164426e1a25
[ "MIT" ]
null
null
null
import os import numpy as np from numpy.testing import assert_allclose import pytest import scipy.io import scipy.stats import cic def cases(): """ Loads all filenames of the pre-calculated test cases. """ case_dir = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'cases' ...
37.20354
85
0.530526
import os import numpy as np from numpy.testing import assert_allclose import pytest import scipy.io import scipy.stats import cic def cases(): case_dir = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'cases' ) cases = [] for dir_path, _, files in os.walk(case_dir): ...
true
true
f731f50ee094446322139452ad53777186ce7f20
15,626
py
Python
Servidor/ServidorMusa.py
TheSgtPepper23/Musa
ed670b9052bbd37b3ed229b7e9d8307b89cb8ac2
[ "MIT" ]
null
null
null
Servidor/ServidorMusa.py
TheSgtPepper23/Musa
ed670b9052bbd37b3ed229b7e9d8307b89cb8ac2
[ "MIT" ]
null
null
null
Servidor/ServidorMusa.py
TheSgtPepper23/Musa
ed670b9052bbd37b3ed229b7e9d8307b89cb8ac2
[ "MIT" ]
null
null
null
from flask import * from peewee import * import sys from playhouse.shortcuts import model_to_dict, dict_to_model from base64 import b64encode app = Flask(__name__) musa_db = MySQLDatabase( "musa", host="localhost", port=3306, user="euterpe", passwd="An6248322") class MySQLModel(Model): """Database model""" ...
33.822511
148
0.651222
from flask import * from peewee import * import sys from playhouse.shortcuts import model_to_dict, dict_to_model from base64 import b64encode app = Flask(__name__) musa_db = MySQLDatabase( "musa", host="localhost", port=3306, user="euterpe", passwd="An6248322") class MySQLModel(Model): class Meta: da...
true
true
f731f62c057be653547c98aaf27b9d20dd30444f
8,308
py
Python
alipay/aop/api/domain/HealthServiceFamilyDoctorDrugDTO.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/HealthServiceFamilyDoctorDrugDTO.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/HealthServiceFamilyDoctorDrugDTO.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class HealthServiceFamilyDoctorDrugDTO(object): def __init__(self): self._catalogue_listed = None self._dosage_forms = None self._drug_classification = None self._genera...
35.20339
103
0.630958
import json from alipay.aop.api.constant.ParamConstants import * class HealthServiceFamilyDoctorDrugDTO(object): def __init__(self): self._catalogue_listed = None self._dosage_forms = None self._drug_classification = None self._general_name = None self._inventory = None...
true
true
f731f6480135c9b24ffbeee3ad28a14744c53924
35,263
py
Python
shap/explainers/_deep/deep_tf.py
hannesdm/shap
ae96bef7879f47978c8a436ebf19c2f2747cd887
[ "MIT" ]
null
null
null
shap/explainers/_deep/deep_tf.py
hannesdm/shap
ae96bef7879f47978c8a436ebf19c2f2747cd887
[ "MIT" ]
null
null
null
shap/explainers/_deep/deep_tf.py
hannesdm/shap
ae96bef7879f47978c8a436ebf19c2f2747cd887
[ "MIT" ]
null
null
null
import numpy as np import warnings from .._explainer import Explainer from packaging import version from ..tf_utils import _get_session, _get_graph, _get_model_inputs, _get_model_output keras = None tf = None tf_ops = None tf_backprop = None tf_execute = None tf_gradients_impl = None def custom_record_gradient(op_name...
45.208974
198
0.636588
import numpy as np import warnings from .._explainer import Explainer from packaging import version from ..tf_utils import _get_session, _get_graph, _get_model_inputs, _get_model_output keras = None tf = None tf_ops = None tf_backprop = None tf_execute = None tf_gradients_impl = None def custom_record_gradient(op_name...
true
true
f731f68560aa545d23d46048a4fc173d215dc10a
4,303
py
Python
Univ_individual_files/133_uni_tech_sydney.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
null
null
null
Univ_individual_files/133_uni_tech_sydney.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
null
null
null
Univ_individual_files/133_uni_tech_sydney.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
2
2021-05-18T07:50:15.000Z
2021-05-18T11:16:04.000Z
import requests import urllib.request import time import urllib import re import csv import sys from bs4 import BeautifulSoup def uni_tech_sydney(): url = "https://www.uts.edu.au/about/faculty-engineering-and-information-technology/computer-science/school-computer-science-staff" headers = {'User-Age...
34.424
214
0.550314
import requests import urllib.request import time import urllib import re import csv import sys from bs4 import BeautifulSoup def uni_tech_sydney(): url = "https://www.uts.edu.au/about/faculty-engineering-and-information-technology/computer-science/school-computer-science-staff" headers = {'User-Age...
true
true
f731f71d1eeb1bef0d1a1cfd91093af40b01de85
7,291
py
Python
train.py
HustQBW/Single-Object-Localization
3a6bd87cd75543f55eb3eed12b6d09475f05b8fd
[ "MIT" ]
1
2021-12-21T16:14:21.000Z
2021-12-21T16:14:21.000Z
train.py
HustQBW/Single-Object-Localization
3a6bd87cd75543f55eb3eed12b6d09475f05b8fd
[ "MIT" ]
null
null
null
train.py
HustQBW/Single-Object-Localization
3a6bd87cd75543f55eb3eed12b6d09475f05b8fd
[ "MIT" ]
null
null
null
from dataset import tiny_dataset from bbox_codec import bbox_encode from resnet50_base import Localization_net2 from torch.utils.data import DataLoader,random_split import torch as t import tqdm from torch.utils.tensorboard import SummaryWriter import torch.nn as nn import torch.optim as optim import argparse from loss...
38.57672
108
0.603758
from dataset import tiny_dataset from bbox_codec import bbox_encode from resnet50_base import Localization_net2 from torch.utils.data import DataLoader,random_split import torch as t import tqdm from torch.utils.tensorboard import SummaryWriter import torch.nn as nn import torch.optim as optim import argparse from loss...
true
true
f731f79225b7db086a4396618b46b21004ef1931
7,642
py
Python
armi/physics/neutronics/isotopicDepletion/isotopicDepletionInterface.py
albeanth/armi
3755ffd2fcd1f7b6c557ef3e3f36126706a84c70
[ "Apache-2.0" ]
null
null
null
armi/physics/neutronics/isotopicDepletion/isotopicDepletionInterface.py
albeanth/armi
3755ffd2fcd1f7b6c557ef3e3f36126706a84c70
[ "Apache-2.0" ]
null
null
null
armi/physics/neutronics/isotopicDepletion/isotopicDepletionInterface.py
albeanth/armi
3755ffd2fcd1f7b6c557ef3e3f36126706a84c70
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
33.964444
110
0.691965
import collections from armi import interfaces from armi.nucDirectory import nuclideBases from armi.nuclearDataIO import xsLibraries from armi.physics.neutronics.isotopicDepletion.crossSectionTable import ( CrossSectionTable, ) from armi.reactor import composites from armi.reactor.flags import Flags ...
true
true
f731f79d2b20fb9001ff30e91ee5ab29fa4434c9
3,269
py
Python
building_boundary/footprint.py
Geodan/building-boundary
d0eb88d99743af917568131e8609f481b10e4520
[ "MIT" ]
13
2018-12-14T05:34:48.000Z
2021-12-23T13:32:51.000Z
building_boundary/footprint.py
Geodan/building-boundary
d0eb88d99743af917568131e8609f481b10e4520
[ "MIT" ]
20
2018-10-18T13:42:09.000Z
2022-03-22T08:46:13.000Z
building_boundary/footprint.py
Geodan/building-boundary
d0eb88d99743af917568131e8609f481b10e4520
[ "MIT" ]
10
2018-09-28T20:01:30.000Z
2020-11-30T17:40:19.000Z
# -*- coding: utf-8 -*- """ @author: Chris Lucas """ import math import numpy as np from shapely.geometry import ( Polygon, MultiPolygon, LineString, MultiLineString, LinearRing ) from shapely import wkt from building_boundary import utils def line_orientations(lines): """ Computes the orientations of...
29.718182
76
0.624962
import math import numpy as np from shapely.geometry import ( Polygon, MultiPolygon, LineString, MultiLineString, LinearRing ) from shapely import wkt from building_boundary import utils def line_orientations(lines): orientations = [] for l in lines: dx, dy = l[0] - l[1] orientation = ...
true
true
f731f8ab78e6bbb755d1d9fa2047d3239f82a839
14,131
py
Python
brokenray/florescu.py
shersonb/brokenray
8f1301670130f9d34c4045a214925b69a9e4fcaa
[ "MIT" ]
null
null
null
brokenray/florescu.py
shersonb/brokenray
8f1301670130f9d34c4045a214925b69a9e4fcaa
[ "MIT" ]
null
null
null
brokenray/florescu.py
shersonb/brokenray
8f1301670130f9d34c4045a214925b69a9e4fcaa
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from numpy import array, zeros, linspace, meshgrid, ndarray from numpy import float64, float128, complex128, complex256 from numpy import exp, sin, cos, tan, arcsin, arctan from numpy import floor, ceil from numpy.fft import fft, ifft from numpy import pi from numpy import c...
37.986559
159
0.546812
from numpy import array, zeros, linspace, meshgrid, ndarray from numpy import float64, float128, complex128, complex256 from numpy import exp, sin, cos, tan, arcsin, arctan from numpy import floor, ceil from numpy.fft import fft, ifft from numpy import pi from numpy import concatenate as concat from scipy.signal i...
false
true
f731f9a8d0502796635be32c92304f9df4b62384
25,546
py
Python
nnunet/training/network_training/network_trainer.py
mangoyuan/Unifed-Seg3d
74c82464dbe901cf18e38afb0e1b74cc159a8850
[ "Apache-2.0" ]
null
null
null
nnunet/training/network_training/network_trainer.py
mangoyuan/Unifed-Seg3d
74c82464dbe901cf18e38afb0e1b74cc159a8850
[ "Apache-2.0" ]
null
null
null
nnunet/training/network_training/network_trainer.py
mangoyuan/Unifed-Seg3d
74c82464dbe901cf18e38afb0e1b74cc159a8850
[ "Apache-2.0" ]
null
null
null
from _warnings import warn import matplotlib from batchgenerators.utilities.file_and_folder_operations import * from sklearn.model_selection import KFold matplotlib.use("agg") from time import time, sleep import torch import numpy as np from torch.optim import lr_scheduler import matplotlib.pyplot as plt import sys fro...
41.605863
149
0.607257
from _warnings import warn import matplotlib from batchgenerators.utilities.file_and_folder_operations import * from sklearn.model_selection import KFold matplotlib.use("agg") from time import time, sleep import torch import numpy as np from torch.optim import lr_scheduler import matplotlib.pyplot as plt import sys fro...
true
true
f731fa3b1b137c89eee62971f1b7005782a10a8c
4,079
py
Python
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/list_postgresql_db_user_paginated_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/list_postgresql_db_user_paginated_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/list_postgresql_db_user_paginated_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListPostgresqlDbUserPaginatedResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
28.725352
90
0.592792
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListPostgresqlDbUserPaginatedResponse(SdkResponse): sensitive_list = [] openapi_types = { 'users': 'list[PostgresqlUserForList]', ...
true
true
f731fa7e3673025c258022c3f2774631787e4331
3,643
py
Python
partpipeline/parser.py
CIDARLAB/3DuF-server
312da5e4dc3b6212db634ce6b0c0235d9779d27b
[ "BSD-3-Clause" ]
null
null
null
partpipeline/parser.py
CIDARLAB/3DuF-server
312da5e4dc3b6212db634ce6b0c0235d9779d27b
[ "BSD-3-Clause" ]
null
null
null
partpipeline/parser.py
CIDARLAB/3DuF-server
312da5e4dc3b6212db634ce6b0c0235d9779d27b
[ "BSD-3-Clause" ]
3
2021-01-25T20:12:21.000Z
2021-06-18T21:41:18.000Z
import json import sys from parchmint import Device sys.path.append("/usr/lib/freecad-python3/lib") import Draft import FreeCAD import Mesh import Part from threedprinting.components.box import Box from threedprinting.components.connection import createConnection from threedprinting.components.droplet import DropletG...
30.358333
78
0.6437
import json import sys from parchmint import Device sys.path.append("/usr/lib/freecad-python3/lib") import Draft import FreeCAD import Mesh import Part from threedprinting.components.box import Box from threedprinting.components.connection import createConnection from threedprinting.components.droplet import DropletG...
true
true
f731fb049cc31abc6393352c8ef73b9b55622cf5
1,941
py
Python
realtor/forms/staffCreation.py
franklin18ru/Indigo
ca559945de4724ea8d64af45a87d14b67740a146
[ "MIT" ]
null
null
null
realtor/forms/staffCreation.py
franklin18ru/Indigo
ca559945de4724ea8d64af45a87d14b67740a146
[ "MIT" ]
null
null
null
realtor/forms/staffCreation.py
franklin18ru/Indigo
ca559945de4724ea8d64af45a87d14b67740a146
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from realtor.models import Realtors, Positions class Realtor(forms.ModelForm): name = forms.CharField(required=True, widget=forms.TextInput(attrs={'class': 'form-control validate'})) ema...
32.898305
113
0.623905
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from realtor.models import Realtors, Positions class Realtor(forms.ModelForm): name = forms.CharField(required=True, widget=forms.TextInput(attrs={'class': 'form-control validate'})) ema...
true
true
f731fb11331a48d87e7ec2442b5be6c0a5ed4a52
34,160
py
Python
azure-mgmt-web/azure/mgmt/web/operations/global_model_operations.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-web/azure/mgmt/web/operations/global_model_operations.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-web/azure/mgmt/web/operations/global_model_operations.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. 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 ...
42.860728
140
0.666598
from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError import uuid from .. import models class GlobalModelOperations(object): def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = ser...
true
true
f731fb3d75d9b93685c1d1a5612a918a4923c2b5
3,402
py
Python
cogs/Member_Log.py
yutarou12/keibot-python
4a7e869bf3fc43d5cc3eddd442a3318e7cb98a7f
[ "MIT" ]
1
2021-06-12T23:21:52.000Z
2021-06-12T23:21:52.000Z
cogs/Member_Log.py
yutarou12/keibot-python
4a7e869bf3fc43d5cc3eddd442a3318e7cb98a7f
[ "MIT" ]
null
null
null
cogs/Member_Log.py
yutarou12/keibot-python
4a7e869bf3fc43d5cc3eddd442a3318e7cb98a7f
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta import sqlite3 from discord import Embed, AllowedMentions from discord.ext import commands from pytz import timezone class Member_Log(commands.Cog): """メンバー用のログ機能関連のコマンドがあります。""" def __init__(self, bot): self.bot = bot self.welcome_notice = [] ...
45.972973
103
0.61699
from datetime import datetime, timedelta import sqlite3 from discord import Embed, AllowedMentions from discord.ext import commands from pytz import timezone class Member_Log(commands.Cog): def __init__(self, bot): self.bot = bot self.welcome_notice = [] self.bot.loop.create_task(self.set...
true
true
f731fb8e98454206f951ad629d427c908be3673f
20,599
py
Python
dnsuptools/dnsuptools.py
TheTesla/dnsupdate
1be992718c5e678a750b4f69bf94706583408365
[ "MIT" ]
1
2019-06-04T18:46:00.000Z
2019-06-04T18:46:00.000Z
dnsuptools/dnsuptools.py
TheTesla/dnsupdate
1be992718c5e678a750b4f69bf94706583408365
[ "MIT" ]
null
null
null
dnsuptools/dnsuptools.py
TheTesla/dnsupdate
1be992718c5e678a750b4f69bf94706583408365
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: UTF8 -*- from dnsuptools.dnsupdate import defaultDictList, MatchUpperLabels, DNSUpdate from dnsuptools.tlsarecgen import tlsaRecordsFromCertFile, tlsaFromFile from dnsuptools.dkimrecgen import dkimFromFile from simpleloggerplus import simpleloggerplus as log import re import pyc...
34.047934
223
0.572455
from dnsuptools.dnsupdate import defaultDictList, MatchUpperLabels, DNSUpdate from dnsuptools.tlsarecgen import tlsaRecordsFromCertFile, tlsaFromFile from dnsuptools.dkimrecgen import dkimFromFile from simpleloggerplus import simpleloggerplus as log import re import pycurl from io import BytesIO import socket impo...
true
true
f731fb916b3a3a9052f6cc548e01758b391e942f
1,647
py
Python
curriculum/03_functions_02_numbers/03_02_02_number_cruncher.py
google/teknowledge
aa55aa59c287f5fe3052e89d539f44252eee41a8
[ "Apache-2.0" ]
31
2017-11-11T09:10:57.000Z
2021-10-13T22:53:57.000Z
curriculum/03_functions_02_numbers/03_02_02_number_cruncher.py
google/teknowledge
aa55aa59c287f5fe3052e89d539f44252eee41a8
[ "Apache-2.0" ]
null
null
null
curriculum/03_functions_02_numbers/03_02_02_number_cruncher.py
google/teknowledge
aa55aa59c287f5fe3052e89d539f44252eee41a8
[ "Apache-2.0" ]
14
2017-11-10T02:19:42.000Z
2021-10-13T22:53:47.000Z
def add(x, y): return x + y def crunchNumbers(): print("How do you want me to crunch two numbers? ") crunchFunction = input("Type add or something else: ") num1 = input('First number: ') num2 = input('Second number: ') if crunchFunction == "add": answer = add(num1, num2) ...
35.042553
80
0.621736
def add(x, y): return x + y def crunchNumbers(): print("How do you want me to crunch two numbers? ") crunchFunction = input("Type add or something else: ") num1 = input('First number: ') num2 = input('Second number: ') if crunchFunction == "add": answer = add(num1, num2) ...
true
true
f731fb9fe546857a3efba23ec45fc75883cfbe59
2,382
py
Python
jogoteca/jogoteca.py
SkiereszDiego/Cursos_Alura
8cebcfa317c47871a698e4328a3851c404d2267b
[ "MIT" ]
null
null
null
jogoteca/jogoteca.py
SkiereszDiego/Cursos_Alura
8cebcfa317c47871a698e4328a3851c404d2267b
[ "MIT" ]
null
null
null
jogoteca/jogoteca.py
SkiereszDiego/Cursos_Alura
8cebcfa317c47871a698e4328a3851c404d2267b
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, redirect, session, flash, url_for app = Flask(__name__) app.secret_key = 'alura' class Jogo: def __init__(self, nome, categoria, console): self.nome = nome self.categoria = categoria self.console = console class Usuario: ...
29.775
85
0.612091
from flask import Flask, render_template, request, redirect, session, flash, url_for app = Flask(__name__) app.secret_key = 'alura' class Jogo: def __init__(self, nome, categoria, console): self.nome = nome self.categoria = categoria self.console = console class Usuario: ...
true
true
f731fc41c567abb5f04fc347849d441eeca55453
11,732
py
Python
deepmap_cli/cli.py
yim-deepmap/cli
bf5fd3afe4d94c70f0b37111be2f749572b53ec7
[ "Apache-2.0" ]
null
null
null
deepmap_cli/cli.py
yim-deepmap/cli
bf5fd3afe4d94c70f0b37111be2f749572b53ec7
[ "Apache-2.0" ]
null
null
null
deepmap_cli/cli.py
yim-deepmap/cli
bf5fd3afe4d94c70f0b37111be2f749572b53ec7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ A command line interface for the Deepmap API. """ import argparse import sys import os from deepmap_cli.constants import USER_CONFIG_PATH from deepmap_cli.cli_requests import make_request def init_cli(): """ Initializes the CLI. """ parser = argparse.ArgumentParser( prog='...
36.434783
96
0.670389
import argparse import sys import os from deepmap_cli.constants import USER_CONFIG_PATH from deepmap_cli.cli_requests import make_request def init_cli(): parser = argparse.ArgumentParser( prog='deepmap', formatter_class=argparse.RawDescriptionHelpFormatter, description="Possible command...
true
true
f731fcf55c0b961d14a2de8a323e7d7f817e7911
657
py
Python
from_python_community/get_century.py
ZaytsevNS/python_practice
109e14923a2ddeacc5360fd72947275afd2159e3
[ "MIT" ]
null
null
null
from_python_community/get_century.py
ZaytsevNS/python_practice
109e14923a2ddeacc5360fd72947275afd2159e3
[ "MIT" ]
null
null
null
from_python_community/get_century.py
ZaytsevNS/python_practice
109e14923a2ddeacc5360fd72947275afd2159e3
[ "MIT" ]
null
null
null
# Условие: # Написать простую функцию, которая будет возвращать век, на основе года. # Пример: # get_century(2021) -> 21 # get_century(1999) -> 20 # get_century(2000) -> 20 # get_century(101) -> 2 import unittest def get_century(n: int) -> int: a, b = divmod(n, 100) return a + 1 if b > 0 else a class Tes...
22.655172
73
0.649924
import unittest def get_century(n: int) -> int: a, b = divmod(n, 100) return a + 1 if b > 0 else a class TestGetCentury(unittest.TestCase): def test_one(self): self.assertEqual(21, get_century(2021)) self.assertEqual(20, get_century(1999)) self.assertEqual(20, get_centu...
true
true
f731fd34f092ca223cd4a25049d95e738b6cb6ad
6,338
py
Python
DARTS/train.py
nick11roberts/XD
020addb8b467a9b3cdfb41e27fcb32bfd37d271f
[ "Apache-2.0" ]
6
2021-04-06T01:28:44.000Z
2022-02-14T08:35:08.000Z
DARTS/train.py
nick11roberts/XD
020addb8b467a9b3cdfb41e27fcb32bfd37d271f
[ "Apache-2.0" ]
1
2021-05-11T14:03:50.000Z
2021-05-22T16:07:35.000Z
DARTS/train.py
nick11roberts/XD
020addb8b467a9b3cdfb41e27fcb32bfd37d271f
[ "Apache-2.0" ]
2
2022-02-23T19:41:12.000Z
2022-03-10T08:47:47.000Z
import os import sys import time import glob import numpy as np import torch import utils import logging import argparse import torch.nn as nn import genotypes import torch.utils import torchvision.datasets as dset import torch.backends.cudnn as cudnn from torch.autograd import Variable from model import NetworkCIFAR ...
36.635838
100
0.71379
import os import sys import time import glob import numpy as np import torch import utils import logging import argparse import torch.nn as nn import genotypes import torch.utils import torchvision.datasets as dset import torch.backends.cudnn as cudnn from torch.autograd import Variable from model import NetworkCIFAR ...
false
true
f731fe0518ecc272120697d6ea77fda740bb2ada
2,565
py
Python
tests/test_app.py
mogul/github-issue-lifecycle
c31a753b904799c57a7468bf590a280e8be3bb6f
[ "CC0-1.0" ]
1
2017-06-08T11:37:21.000Z
2017-06-08T11:37:21.000Z
tests/test_app.py
mogul/github-issue-lifecycle
c31a753b904799c57a7468bf590a280e8be3bb6f
[ "CC0-1.0" ]
2
2016-10-20T20:39:17.000Z
2016-10-20T20:45:50.000Z
tests/test_app.py
mogul/github-issue-lifecycle
c31a753b904799c57a7468bf590a280e8be3bb6f
[ "CC0-1.0" ]
3
2016-10-20T20:32:06.000Z
2021-02-15T10:00:02.000Z
import unittest from unittest import mock import requests from flask.ext.testing import TestCase from app import db, models from app.app import app from config import config from .mock_github import requests_get_stub app.config.from_object(config['testing']) class AppTestCase(TestCase): def create_app(self): ...
31.666667
79
0.62768
import unittest from unittest import mock import requests from flask.ext.testing import TestCase from app import db, models from app.app import app from config import config from .mock_github import requests_get_stub app.config.from_object(config['testing']) class AppTestCase(TestCase): def create_app(self): ...
true
true
f731ff23a6b491175ed0b509bddbf9dfdcfb99b4
12,069
py
Python
yolov3_tiny_deer_detection/evaluate_mAP.py
Pradeep-Gopal/yolo_deer_people_final_project
2337e8cbb88f467a6d19ab9cdb14abbf2ba04bc2
[ "MIT" ]
null
null
null
yolov3_tiny_deer_detection/evaluate_mAP.py
Pradeep-Gopal/yolo_deer_people_final_project
2337e8cbb88f467a6d19ab9cdb14abbf2ba04bc2
[ "MIT" ]
null
null
null
yolov3_tiny_deer_detection/evaluate_mAP.py
Pradeep-Gopal/yolo_deer_people_final_project
2337e8cbb88f467a6d19ab9cdb14abbf2ba04bc2
[ "MIT" ]
null
null
null
import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' import cv2 import numpy as np import tensorflow as tf from tensorflow.python.saved_model import tag_constants from yolov3.dataset import Dataset from yolov3.yolov4 import Create_Yolo from yolov3.utils import load_yolo_weights, detect_image, image_preprocess, postproce...
41.761246
128
0.567653
import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' import cv2 import numpy as np import tensorflow as tf from tensorflow.python.saved_model import tag_constants from yolov3.dataset import Dataset from yolov3.yolov4 import Create_Yolo from yolov3.utils import load_yolo_weights, detect_image, image_preprocess, postproce...
true
true
f731ff9471a2cbbe6e265123faf63ee9b93f92f6
33,241
py
Python
frappe/database/database.py
rizkiheryandi/frappe
1767d87dfd90be4f8b62e85af53f1ebc74dec370
[ "MIT" ]
1
2021-04-02T15:23:12.000Z
2021-04-02T15:23:12.000Z
frappe/database/database.py
rizkiheryandi/frappe
1767d87dfd90be4f8b62e85af53f1ebc74dec370
[ "MIT" ]
null
null
null
frappe/database/database.py
rizkiheryandi/frappe
1767d87dfd90be4f8b62e85af53f1ebc74dec370
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Database Module # -------------------- from __future__ import unicode_literals import re import time import frappe import datetime import frappe.defaults import frappe.model.meta from frappe import _ from time impo...
31.182927
122
0.686682
from __future__ import unicode_literals import re import time import frappe import datetime import frappe.defaults import frappe.model.meta from frappe import _ from time import time from frappe.utils import now, getdate, cast_fieldtype, get_datetime from frappe.model.utils.link_count import flush_local_link_co...
true
true
f731ffc418c409ea5c8ec121e5505721921146e2
164
py
Python
natwork/chats/admin.py
Potisin/Natwork
a42b89f18fdd8f8ac69e56cb7184696d6883a9f7
[ "BSD-3-Clause" ]
null
null
null
natwork/chats/admin.py
Potisin/Natwork
a42b89f18fdd8f8ac69e56cb7184696d6883a9f7
[ "BSD-3-Clause" ]
null
null
null
natwork/chats/admin.py
Potisin/Natwork
a42b89f18fdd8f8ac69e56cb7184696d6883a9f7
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from .models import Chat class ChatAdmin(admin.ModelAdmin): list_display = ("pk",) admin.site.register(Chat, ChatAdmin)
12.615385
36
0.737805
from django.contrib import admin from .models import Chat class ChatAdmin(admin.ModelAdmin): list_display = ("pk",) admin.site.register(Chat, ChatAdmin)
true
true
f73201674c64269afedc778a05e242056dcf0449
2,282
py
Python
tests/models/symbol/ioc_dump_retrieve_start_details_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/ioc_dump_retrieve_start_details_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/ioc_dump_retrieve_start_details_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
60.052632
845
0.783523
import unittest from netapp.santricity.models.symbol.ioc_dump_retrieve_start_details import IOCDumpRetrieveStartDetails class IOCDumpRetrieveStartDetailsTest(unittest.TestCase): def test_ioc_dump_retrieve_start_details(self): ioc_dump_retrieve_start_details_obj = IOCDumpRetrieveSt...
true
true
f73201bccc5b600843b87458b521f0313fadcc75
355
py
Python
tests/mssql_test.py
technetbytes/ModelService
5268d53b4bedb400d8ba4a326297fa7f6b8bc666
[ "Apache-2.0" ]
2
2020-04-06T07:59:02.000Z
2020-04-06T07:59:04.000Z
tests/mssql_test.py
technetbytes/ModelService
5268d53b4bedb400d8ba4a326297fa7f6b8bc666
[ "Apache-2.0" ]
2
2020-04-06T12:13:34.000Z
2020-04-06T13:49:29.000Z
tests/mssql_test.py
technetbytes/Pythonic-Template
78b565359d640b208ed6189ebefc5760751c16d7
[ "Apache-2.0" ]
null
null
null
import unittest from db import mssql def connect_mssql(): obj_sql = mssql.MsSqlDb(None) conn = obj_sql.get_connection if conn is None: return False else: return True class MyTest(unittest.TestCase): def test(self): self.assertTrue(connect_mssql(), True) if __name__...
20.882353
46
0.650704
import unittest from db import mssql def connect_mssql(): obj_sql = mssql.MsSqlDb(None) conn = obj_sql.get_connection if conn is None: return False else: return True class MyTest(unittest.TestCase): def test(self): self.assertTrue(connect_mssql(), True) if __name__...
true
true
f732029a686f8b8f4cf7e9bb74a3d607318b643a
1,396
py
Python
client/main.py
naoki-sawada/m5stack-ble
57b464cfbbf60bf232ac3a8480499890a07a2d8e
[ "MIT" ]
37
2018-08-08T11:10:45.000Z
2022-02-21T12:19:13.000Z
client/main.py
naoki-sawada/m5stack-ble
57b464cfbbf60bf232ac3a8480499890a07a2d8e
[ "MIT" ]
2
2020-08-30T02:44:16.000Z
2021-11-29T10:12:57.000Z
client/main.py
naoki-sawada/m5stack-ble
57b464cfbbf60bf232ac3a8480499890a07a2d8e
[ "MIT" ]
7
2019-08-17T15:37:30.000Z
2021-03-14T15:43:22.000Z
#!/usr/bin/env python3 import asyncio import logging import uuid from bleak import BleakScanner, BleakClient # Enable debug output # logging.basicConfig(level=logging.DEBUG) DEVICE_NAME = "m5-stack" SERVICE_UUID = uuid.UUID("4fafc201-1fb5-459e-8fcc-c5c9c331914b") CHAR_UUID = uuid.UUID("beb5483e-36e1-4688-b7f5-ea0736...
29.702128
75
0.68553
import asyncio import logging import uuid from bleak import BleakScanner, BleakClient DEVICE_NAME = "m5-stack" SERVICE_UUID = uuid.UUID("4fafc201-1fb5-459e-8fcc-c5c9c331914b") CHAR_UUID = uuid.UUID("beb5483e-36e1-4688-b7f5-ea07361b26a8") async def run(loop): print("Searching devices...") devices = await...
true
true
f732040accb451226761ed261b82111127e933b2
1,220
py
Python
4. Data Warehousing with AWS Redshift/redshift_cluster_teardown.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
4. Data Warehousing with AWS Redshift/redshift_cluster_teardown.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
4. Data Warehousing with AWS Redshift/redshift_cluster_teardown.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
import boto3 import configparser def main(): """ Description: - Sets up a Redshift cluster on AWS Returns: None """ KEY = config.get('AWS','KEY') SECRET = config.get('AWS','SECRET') DWH_CLUSTER_IDENTIFIER = config.get("DWH","DWH_CLUSTE...
32.972973
86
0.568852
import boto3 import configparser def main(): KEY = config.get('AWS','KEY') SECRET = config.get('AWS','SECRET') DWH_CLUSTER_IDENTIFIER = config.get("DWH","DWH_CLUSTER_IDENTIFIER") DWH_IAM_ROLE_NAME = config.get("DWH", "DWH_IAM_ROLE_NAME") redshift = boto3.cli...
true
true
f7320490c051b51caf2f1913b631c004f6196e85
5,301
py
Python
create_json.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
2
2021-05-28T01:37:04.000Z
2021-09-20T14:51:42.000Z
create_json.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
3
2021-05-12T18:15:54.000Z
2022-03-12T00:58:06.000Z
create_json.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
2
2021-05-12T18:41:02.000Z
2021-12-08T22:13:11.000Z
import pickle import sys import ast import re import json from word2number import w2n import os, sys try: location=sys.argv[1] except Exception as e: location='roma' try: type_=sys.argv[2] except Exception as e: type_='needs' with open('OUTPUT/'+location+'_'+type_+'.p','rb') as handle: need_dict=pickle.load(h...
23.7713
179
0.660253
import pickle import sys import ast import re import json from word2number import w2n import os, sys try: location=sys.argv[1] except Exception as e: location='roma' try: type_=sys.argv[2] except Exception as e: type_='needs' with open('OUTPUT/'+location+'_'+type_+'.p','rb') as handle: need_dict=pickle.load(h...
true
true
f73207fe8f7010c1550988d7636a3f322d128758
20,293
py
Python
svca_limix/limix/core/mean/mean.py
DenisSch/svca
bd029c120ca8310f43311253e4d7ce19bc08350c
[ "Apache-2.0" ]
65
2015-01-20T20:46:26.000Z
2021-06-27T14:40:35.000Z
svca_limix/limix/core/mean/mean.py
DenisSch/svca
bd029c120ca8310f43311253e4d7ce19bc08350c
[ "Apache-2.0" ]
29
2015-02-01T22:35:17.000Z
2017-08-07T08:18:23.000Z
svca_limix/limix/core/mean/mean.py
DenisSch/svca
bd029c120ca8310f43311253e4d7ce19bc08350c
[ "Apache-2.0" ]
35
2015-02-01T17:26:50.000Z
2019-09-13T07:06:16.000Z
import sys from limix.core.old.cobj import * from limix.utils.preprocess import regressOut import numpy as np import scipy.linalg as LA import copy def compute_X1KX2(Y, D, X1, X2, A1=None, A2=None): R,C = Y.shape if A1 is None: nW_A1 = Y.shape[1] #A1 = np.eye(Y.shape[1]) #for now this creates...
33.158497
184
0.525206
import sys from limix.core.old.cobj import * from limix.utils.preprocess import regressOut import numpy as np import scipy.linalg as LA import copy def compute_X1KX2(Y, D, X1, X2, A1=None, A2=None): R,C = Y.shape if A1 is None: nW_A1 = Y.shape[1] hape[0] if A2 is None: nW_A2 = Y....
true
true
f73208d87a7c1b01380a02572131d5fffaf76eab
3,888
py
Python
app/capture.py
karanveersingh5623/EdgeRealtimeVideoAnalytics
0765ff9145c2163f9e361495fbb0bda147e536cc
[ "Apache-2.0" ]
22
2020-10-31T05:13:37.000Z
2021-11-17T23:18:29.000Z
app/capture.py
karanveersingh5623/EdgeRealtimeVideoAnalytics
0765ff9145c2163f9e361495fbb0bda147e536cc
[ "Apache-2.0" ]
null
null
null
app/capture.py
karanveersingh5623/EdgeRealtimeVideoAnalytics
0765ff9145c2163f9e361495fbb0bda147e536cc
[ "Apache-2.0" ]
4
2021-02-06T11:14:29.000Z
2021-07-21T23:40:06.000Z
# RedisEdge realtime video analytics video capture script import argparse import cv2 import redis import time from urllib.parse import urlparse class SimpleMovingAverage(object): ''' Simple moving average ''' def __init__(self, value=0.0, count=7): self.count = int(count) self.current = float(v...
36
115
0.608282
import argparse import cv2 import redis import time from urllib.parse import urlparse class SimpleMovingAverage(object): def __init__(self, value=0.0, count=7): self.count = int(count) self.current = float(value) self.samples = [self.current] * self.count def __str__(self): re...
true
true
f7320a0309d437c0bb2ee152a0442a5a71c318f3
13,419
py
Python
eppy/client.py
infonetworks-global/eppy
d16d796a532455f8aca21c09ff0d0aef3293d806
[ "MIT" ]
null
null
null
eppy/client.py
infonetworks-global/eppy
d16d796a532455f8aca21c09ff0d0aef3293d806
[ "MIT" ]
null
null
null
eppy/client.py
infonetworks-global/eppy
d16d796a532455f8aca21c09ff0d0aef3293d806
[ "MIT" ]
null
null
null
""" Module that implements the EppClient class """ try: # use gevent if available import gevent.socket as socket import gevent.ssl as ssl except ImportError: import socket import ssl import struct from collections import deque import logging from six import PY2, PY3 from past.builtins import xrang...
36.865385
95
0.577539
try: import gevent.socket as socket import gevent.ssl as ssl except ImportError: import socket import ssl import struct from collections import deque import logging from six import PY2, PY3 from past.builtins import xrange from .exceptions import EppLoginError, EppConnectionError from .doc impor...
true
true
f7320a3608ba6d9708669c62e3c8029585363f25
604
py
Python
Twitter Streaming/spark_app.py
simranjeet97/PySpark_Practice
7dfb77a5c3e1b632007a32b47ff921972e9ecf87
[ "Apache-2.0" ]
null
null
null
Twitter Streaming/spark_app.py
simranjeet97/PySpark_Practice
7dfb77a5c3e1b632007a32b47ff921972e9ecf87
[ "Apache-2.0" ]
null
null
null
Twitter Streaming/spark_app.py
simranjeet97/PySpark_Practice
7dfb77a5c3e1b632007a32b47ff921972e9ecf87
[ "Apache-2.0" ]
null
null
null
import findspark findspark.init() from pyspark import SparkContext from pyspark.streaming import StreamingContext sc = SparkContext(appName="tweetStream") # Create a local StreamingContext with batch interval of 1 second ssc = StreamingContext(sc, 1) # Create a DStream that conencts to hostname:port lines = ssc.socketT...
27.454545
65
0.764901
import findspark findspark.init() from pyspark import SparkContext from pyspark.streaming import StreamingContext sc = SparkContext(appName="tweetStream") ssc = StreamingContext(sc, 1) lines = ssc.socketTextStream("127.0.0.1", 9009) words = lines.flatMap(lambda s: s.lower().split("__end")) print(type(words)) word...
true
true
f7320b011accc73b2cbaaaa931708ad6886faa27
263,215
py
Python
ptracer/ptrace/_gen_defs_linux_64.py
fakeNetflix/pinterest-repo-ptracer
9f9d11403ec50f5e26ed2e8c5633fbb54813415a
[ "Apache-2.0" ]
147
2017-10-24T19:48:49.000Z
2022-02-12T21:02:07.000Z
ptracer/ptrace/_gen_defs_linux_64.py
sthagen/ptracer
b5019bc977c7c16b0b2713242d017b0ae72b4948
[ "Apache-2.0" ]
4
2021-02-03T14:23:58.000Z
2022-02-24T18:19:20.000Z
ptracer/ptrace/_gen_defs_linux_64.py
sthagen/ptracer
b5019bc977c7c16b0b2713242d017b0ae72b4948
[ "Apache-2.0" ]
20
2017-10-24T19:48:35.000Z
2022-03-17T01:04:24.000Z
# Automatically generated from system headers. # DO NOT EDIT. import ctypes from .syscalldef import CType, SysCallSig, SysCallParamSig PTRACE_TRACEME = 0 PTRACE_PEEKTEXT = 1 PTRACE_PEEKDATA = 2 PTRACE_PEEKUSER = 3 PTRACE_POKETEXT = 4 PTRACE_POKEDATA = 5 PTRACE_POKEUSER = 6 PTRACE_CONT = 7 PTRACE_KILL = 8 PTRACE_SIN...
24.733603
61
0.283909
import ctypes from .syscalldef import CType, SysCallSig, SysCallParamSig PTRACE_TRACEME = 0 PTRACE_PEEKTEXT = 1 PTRACE_PEEKDATA = 2 PTRACE_PEEKUSER = 3 PTRACE_POKETEXT = 4 PTRACE_POKEDATA = 5 PTRACE_POKEUSER = 6 PTRACE_CONT = 7 PTRACE_KILL = 8 PTRACE_SINGLESTEP = 9 PTRACE_GETREGS = 12 PTRACE_SETREGS = 13 PTRACE_G...
true
true
f7320d9878bc5a4f10abe988b97f5db2d9d49e64
6,985
py
Python
test/drivers/gaussiand/test_driver_gaussian_log.py
renier/qiskit-nature
a06f378a219d650d96e16db96d763ea4aec9cfc2
[ "Apache-2.0" ]
null
null
null
test/drivers/gaussiand/test_driver_gaussian_log.py
renier/qiskit-nature
a06f378a219d650d96e16db96d763ea4aec9cfc2
[ "Apache-2.0" ]
null
null
null
test/drivers/gaussiand/test_driver_gaussian_log.py
renier/qiskit-nature
a06f378a219d650d96e16db96d763ea4aec9cfc2
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
39.6875
95
0.534001
import unittest from test import QiskitNatureTestCase from qiskit_nature.drivers import GaussianLogDriver, GaussianLogResult from qiskit_nature import QiskitNatureError class TestDriverGaussianLog(QiskitNatureTestCase): def setUp(self): super().setUp() self.logfile = self.get_resou...
true
true