hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e145186692e406b8ba298d64061018c2f57cfa07 | 1,475 | py | Python | devvyn/cache/decorator.py | devvyn/knowledge-mapper | 441d34db04c8ca8892dade2a64983635e39b728c | [
"MIT"
] | 1 | 2019-11-21T17:48:52.000Z | 2019-11-21T17:48:52.000Z | devvyn/cache/decorator.py | devvyn/usask-scrape-course-prerequisites | 441d34db04c8ca8892dade2a64983635e39b728c | [
"MIT"
] | 8 | 2019-10-07T05:31:42.000Z | 2019-11-29T01:31:02.000Z | devvyn/cache/decorator.py | devvyn/knowledge-mapper | 441d34db04c8ca8892dade2a64983635e39b728c | [
"MIT"
] | null | null | null | """
File-based cache for text retrieved from URL-based resources.
"""
import typing
StringFunction = typing.Callable[[str], str]
| 25 | 77 | 0.633898 | """
File-based cache for text retrieved from URL-based resources.
"""
import typing
from typeguard import typechecked
from devvyn.cache.web_cache import WebCache
StringFunction = typing.Callable[[str], str]
@typechecked
def cached(function: StringFunction) -> StringFunction:
"""
Wrap the decorated function... | 0 | 1,241 | 0 | 0 | 0 | 0 | 0 | 34 | 69 |
d224ae3942d7fe2cf77b988495ef6e28a1bf48dc | 13,858 | py | Python | tools/pywebsocket/src/mod_pywebsocket/util.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 459 | 2016-09-29T00:51:38.000Z | 2022-03-07T14:37:46.000Z | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | # Copyright 2011, 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... | 33.232614 | 79 | 0.656011 | # Copyright 2011, 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... | 0 | 0 | 0 | 8,159 | 0 | 369 | 0 | -24 | 371 |
280095da5d26572a0bea29e5ab3e55b2c31501d8 | 714 | py | Python | interview/leet/22_Generate_Parentheses.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2020-10-12T13:33:29.000Z | 2020-10-12T13:33:29.000Z | interview/leet/22_Generate_Parentheses.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | null | null | null | interview/leet/22_Generate_Parentheses.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2016-11-09T07:28:45.000Z | 2016-11-09T07:28:45.000Z | #!/usr/bin/env python
sol = Solution()
print(sol.generateParenthesis(2))
print(sol.generateParenthesis(3))
ret = sol.generateParenthesis(4)
set1 = set(ret)
set2 = set(["(((())))","((()()))","((())())","((()))()","(()(()))","(()()())","(()())()","(())(())","(())()()","()((()))","()(()())","()(())()","()()(())","()()()(... | 31.043478 | 167 | 0.418768 | #!/usr/bin/env python
class Solution:
def generateParenthesis(self, n):
def gen(lp, rp):
if not lp:
return [rp]
ret = ['(' + s for s in gen(lp[1:], rp)]
if len(rp) > len(lp):
ret += [')' + s for s in gen(lp, rp[1:])]
return ret... | 0 | 0 | 0 | 309 | 0 | 0 | 0 | 0 | 23 |
360d9fbf49ff044a82696ba39ee373994cd089ed | 4,332 | py | Python | lib/surface/compute/instances/ops_agents/policies/describe.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/compute/instances/ops_agents/policies/describe.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instances/ops_agents/policies/describe.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 38.336283 | 135 | 0.752078 | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 0 | 2,704 | 0 | 0 | 0 | 0 | 0 | 591 | 244 |
d9c95a352cb49a867bdb60a894a9a28d459071ff | 9,677 | py | Python | salt/modules/win_network.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | 2 | 2015-08-04T21:54:38.000Z | 2019-04-25T21:47:08.000Z | salt/modules/win_network.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | salt/modules/win_network.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Module for gathering and managing network information
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
import hashlib
import datetime
import socket
import salt.utils.network
import salt.utils.validate.net
try:
import salt.utils.winapi
HAS_DEPENDENCIES... | 24.876607 | 91 | 0.563294 | # -*- coding: utf-8 -*-
'''
Module for gathering and managing network information
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
import hashlib
import datetime
import socket
import salt.utils.network
import salt.utils.validate.net
try:
import salt.utils.winapi
HAS_DEPENDENCIES... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dc3a195bef8ce5e31f2367bff5171d939b46de19 | 260 | py | Python | tools/plot_knn.py | houwenbo87/DBSCAN | 3452d32186f2b59f2f1e515cebdf0ce15cb3e2f7 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-09-18T22:40:39.000Z | 2020-09-18T22:40:39.000Z | tools/plot_knn.py | conanhung/DBSCAN | 0bf4e6a83d61b83858f270dc5fbf78cd05ca3153 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tools/plot_knn.py | conanhung/DBSCAN | 0bf4e6a83d61b83858f270dc5fbf78cd05ca3153 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-10-09T08:24:35.000Z | 2020-10-09T08:24:35.000Z |
if __name__ == '__main__':
main() | 20 | 74 | 0.665385 | import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def main():
df = pd.read_csv(sys.argv[1], sep=',', header=None, names=['id', 'dist'])
print df.shape
df.plot(x='id', y='dist')
plt.show()
if __name__ == '__main__':
main() | 0 | 0 | 0 | 0 | 0 | 120 | 0 | -6 | 111 |
f7411193c9e74da9972af45d8cd83b30e71b72c3 | 1,071 | py | Python | scripts/genSplitPDBlists.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | scripts/genSplitPDBlists.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | scripts/genSplitPDBlists.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 1 16:23:55 2020
@author: dmattox
"""
import os
import dill
import lec_gly as LecGly
from bSiteResiFeatures import plipFile
os.chdir(LecGly.homeDir)
##########################
outDir = './data/structures/bsites/batchLists/'
if not os.path.exists... | 24.340909 | 136 | 0.61718 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 1 16:23:55 2020
@author: dmattox
"""
import os
import dill
import lec_gly as LecGly
from bSiteResiFeatures import plipFile
os.chdir(LecGly.homeDir)
##########################
outDir = './data/structures/bsites/batchLists/'
if not os.path.exists... | 0 | 0 | 0 | 0 | 232 | 0 | 0 | 0 | 23 |
fad44c00159e65658ec515bf14d41b4a2585ac00 | 6,986 | py | Python | examples/generative/real_nvp.py | rickiepark/keras-io | 4100b155baf2934900a3262d67bb2a8b093a365b | [
"Apache-2.0"
] | 3 | 2021-03-23T13:12:25.000Z | 2022-02-25T17:25:43.000Z | examples/generative/real_nvp.py | rickiepark/keras-io | 4100b155baf2934900a3262d67bb2a8b093a365b | [
"Apache-2.0"
] | 1 | 2020-11-30T01:32:49.000Z | 2020-11-30T01:32:49.000Z | examples/generative/real_nvp.py | rickiepark/keras-io | 4100b155baf2934900a3262d67bb2a8b093a365b | [
"Apache-2.0"
] | 2 | 2020-11-19T17:52:50.000Z | 2020-11-19T17:52:57.000Z | """
Title: Density estimation using Real NVP
Authors: [Mandolini Giorgio Maria](https://www.linkedin.com/in/giorgio-maria-mandolini-a2a1b71b4/), [Sanna Daniele](https://www.linkedin.com/in/daniele-sanna-338629bb/), [Zannini Quirini Giorgio](https://www.linkedin.com/in/giorgio-zannini-quirini-16ab181a0/)
Date created: 2... | 31.1875 | 259 | 0.670484 | """
Title: Density estimation using Real NVP
Authors: [Mandolini Giorgio Maria](https://www.linkedin.com/in/giorgio-maria-mandolini-a2a1b71b4/), [Sanna Daniele](https://www.linkedin.com/in/daniele-sanna-338629bb/), [Zannini Quirini Giorgio](https://www.linkedin.com/in/giorgio-zannini-quirini-16ab181a0/)
Date created: 2... | 0 | 331 | 0 | 2,058 | 0 | 1,443 | 0 | 34 | 134 |
0d4dcf4b3740e9236059bdb760a1648b29e6d370 | 1,533 | py | Python | src/tools/lidar_integration/lidar_integration/get_open_port.py | ruvus/auto | 25ae62d6e575cae40212356eed43ec3e76e9a13e | [
"Apache-2.0"
] | 19 | 2021-05-28T06:14:21.000Z | 2022-03-10T10:03:08.000Z | src/tools/lidar_integration/lidar_integration/get_open_port.py | ruvus/auto | 25ae62d6e575cae40212356eed43ec3e76e9a13e | [
"Apache-2.0"
] | 222 | 2021-10-29T22:00:27.000Z | 2022-03-29T20:56:34.000Z | src/tools/lidar_integration/lidar_integration/get_open_port.py | ruvus/auto | 25ae62d6e575cae40212356eed43ec3e76e9a13e | [
"Apache-2.0"
] | 14 | 2021-05-29T14:59:17.000Z | 2022-03-10T10:03:09.000Z | # Copyright 2018 the Autoware Foundation
#
# 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... | 34.066667 | 93 | 0.69863 | # Copyright 2018 the Autoware Foundation
#
# 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 ... | 4 | 0 | 0 | 0 | 0 | 821 | 0 | -20 | 91 |
e2290dfd5b24cbc2440d18ed10b34011008f0531 | 4,049 | py | Python | biqukan.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | 31 | 2022-01-02T11:35:36.000Z | 2022-03-26T16:56:08.000Z | biqukan.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | null | null | null | biqukan.py | Adsryen/python-spiders | 005513c78e82eaa3671d584c58a35b009aa7fd01 | [
"MIT"
] | 12 | 2022-01-07T04:04:57.000Z | 2022-03-29T08:22:24.000Z | #!/usr/bin/env python
# encoding: utf-8
'''
#-------------------------------------------------------------------
# CONFIDENTIAL --- CUSTOM STUDIOS
#-------------------------------------------------------------------
#
# @Project Name :
#
# @File Name : biqukan.p... | 29.992593 | 150 | 0.592245 | #!/usr/bin/env python
# encoding: utf-8
'''
#-------------------------------------------------------------------
# CONFIDENTIAL --- CUSTOM STUDIOS
#-------------------------------------------------------------------
#
# @Project Name : 下载《笔趣看》网小说
#
# @File Name :... | 216 | 0 | 0 | 3,253 | 0 | 0 | 0 | 23 | 89 |
a430d9c6cd89854194892bdfcc0be76bfaba9d11 | 3,178 | py | Python | Professional/94/spaceInvaders.py | Matthew1906/100DaysOfPython | 94ffff8f5535ce5d574f49c0d7971d64a4575aad | [
"MIT"
] | 1 | 2021-12-25T02:19:18.000Z | 2021-12-25T02:19:18.000Z | Professional/94/spaceInvaders.py | Matthew1906/100DaysOfPython | 94ffff8f5535ce5d574f49c0d7971d64a4575aad | [
"MIT"
] | null | null | null | Professional/94/spaceInvaders.py | Matthew1906/100DaysOfPython | 94ffff8f5535ce5d574f49c0d7971d64a4575aad | [
"MIT"
] | 1 | 2021-11-25T10:31:47.000Z | 2021-11-25T10:31:47.000Z | # Turtle Objects
from turtle import Screen, Turtle
# Game Objects
# Utilities
from PIL import Image, ImageTk
# Initialize Screen
main_screen = Screen()
main_screen.title("Space Invaders")
main_screen.setup(width=800, height=550, startx= 250, starty=10)
# Setup Background
background_canvas = main_screen.getcanvas()
#... | 27.634783 | 88 | 0.678729 | # Turtle Objects
from turtle import Screen, Turtle
# Game Objects
from defender import Defender
from invaders import Invaders
from scoreboard import ScoreBoard
# Utilities
from time import sleep
from PIL import Image, ImageTk
# Initialize Screen
main_screen = Screen()
main_screen.title("Space Invaders")
main_screen.se... | 0 | 0 | 0 | 0 | 0 | 1,947 | 0 | 29 | 135 |
ce42292fe7c299a4af67a13cf9348d0399c5099c | 1,415 | py | Python | detect.py | milangeorge2000/face_attendance | 90a41412ef5d0fabaa21f6246ce7243ae36d59b4 | [
"Apache-2.0"
] | null | null | null | detect.py | milangeorge2000/face_attendance | 90a41412ef5d0fabaa21f6246ce7243ae36d59b4 | [
"Apache-2.0"
] | null | null | null | detect.py | milangeorge2000/face_attendance | 90a41412ef5d0fabaa21f6246ce7243ae36d59b4 | [
"Apache-2.0"
] | null | null | null | from facenet_pytorch import MTCNN, InceptionResnetV1
import torch
from torchvision import datasets
from torch.utils.data import DataLoader
mtcnn = MTCNN(image_size=240, margin=0, min_face_size=20) # initializing mtcnn for face detection
resnet = InceptionResnetV1(pretrained='vggface2').eval() # initializing ... | 42.878788 | 115 | 0.742756 | from facenet_pytorch import MTCNN, InceptionResnetV1
import torch
from torchvision import datasets
from torch.utils.data import DataLoader
from PIL import Image
mtcnn = MTCNN(image_size=240, margin=0, min_face_size=20) # initializing mtcnn for face detection
resnet = InceptionResnetV1(pretrained='vggface2')... | 0 | 0 | 0 | 0 | 0 | 14 | 0 | 0 | 48 |
491e78ac407bddd3554ce7a1b2051d55374e1d69 | 6,969 | py | Python | rss2kml_test.py | klokan/googlecrisismap | e31b68706f7a4921037b0e513703483f2ac3b830 | [
"Apache-2.0"
] | 40 | 2015-06-24T12:31:14.000Z | 2021-01-30T23:33:54.000Z | rss2kml_test.py | klokan/googlecrisismap | e31b68706f7a4921037b0e513703483f2ac3b830 | [
"Apache-2.0"
] | 16 | 2015-07-30T14:24:42.000Z | 2021-02-24T22:30:56.000Z | rss2kml_test.py | klokan/googlecrisismap | e31b68706f7a4921037b0e513703483f2ac3b830 | [
"Apache-2.0"
] | 27 | 2015-06-21T07:31:58.000Z | 2021-02-12T08:47:42.000Z | #!/usr/bin/python
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at: http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 34.5 | 95 | 0.633807 | #!/usr/bin/python
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at: http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 0 | 0 | 0 | 5,897 | 0 | 52 | 0 | 22 | 135 |
e8942f3a0705ae7acb5b7328d2889bc969c7f34c | 54 | py | Python | test/__init__.py | zachasme/pyresp | a363cef3435769ba86b86ac1d31576566ca3ddc9 | [
"MIT"
] | 3 | 2017-10-15T11:55:01.000Z | 2018-11-04T19:29:34.000Z | test/__init__.py | zachasme/pyresp | a363cef3435769ba86b86ac1d31576566ca3ddc9 | [
"MIT"
] | null | null | null | test/__init__.py | zachasme/pyresp | a363cef3435769ba86b86ac1d31576566ca3ddc9 | [
"MIT"
] | null | null | null | # run these tests with python -m pytest from src/ dir
| 27 | 53 | 0.740741 | # run these tests with python -m pytest from src/ dir
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8551184ce4138e96c09b351cde834933ae754688 | 257 | py | Python | Exercicios/desafio18_mathangulo.py | lbarrosandre/Resolucao-Desafios-Python | d30897d9d5cb179579fd67a70f3d74af7a3293a1 | [
"MIT"
] | null | null | null | Exercicios/desafio18_mathangulo.py | lbarrosandre/Resolucao-Desafios-Python | d30897d9d5cb179579fd67a70f3d74af7a3293a1 | [
"MIT"
] | null | null | null | Exercicios/desafio18_mathangulo.py | lbarrosandre/Resolucao-Desafios-Python | d30897d9d5cb179579fd67a70f3d74af7a3293a1 | [
"MIT"
] | null | null | null | import math
angulo = float(input('Digite um angulo: '))
sen = math.sin(math.radians(angulo))
cos = math.cos(math.radians(angulo))
tan = math.tan(math.radians(angulo))
print('O seno {:.2f}\nO Cosseno {:.2f}\ne a tangente {:.2f}'.format(sen, cos, tan))
| 36.714286 | 89 | 0.680934 | import math
angulo = float(input('Digite um angulo: '))
sen = math.sin(math.radians(angulo))
cos = math.cos(math.radians(angulo))
tan = math.tan(math.radians(angulo))
print('O seno é {:.2f}\nO Cosseno é {:.2f}\ne a tangente é {:.2f}'.format(sen, cos, tan))
| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
44eb49328209b2f289e9757814c4bdf802ad9c46 | 1,303 | py | Python | Content/Scripts/debugtest.py | neo-talen/UnrealEnginePython | 9a0878f7f3c1b34c0bc5c886ec14ad3356284b86 | [
"MIT"
] | 65 | 2017-02-23T12:18:02.000Z | 2021-12-23T14:23:52.000Z | Content/Scripts/debugtest.py | Artisan-H3/UnrealEnginePython | 9a0878f7f3c1b34c0bc5c886ec14ad3356284b86 | [
"MIT"
] | 8 | 2017-03-16T18:16:27.000Z | 2019-08-07T18:07:23.000Z | Content/Scripts/debugtest.py | Artisan-H3/UnrealEnginePython | 9a0878f7f3c1b34c0bc5c886ec14ad3356284b86 | [
"MIT"
] | 22 | 2017-05-04T20:53:23.000Z | 2022-03-09T15:49:54.000Z | #import debugtest
#import imp
#imp.reload(debugtest)
#Testing script for various writing setups
#import redirect_print
#imp.reload(redirect_print)
#the test function
#test simple fire and forget
#Test with callback
#progress callback example functions
#test basic progress bar | 18.352113 | 51 | 0.71604 | #import debugtest
#import imp
#imp.reload(debugtest)
#Testing script for various writing setups
#import redirect_print
import unreal_engine as ue
import time
import sys
import upythread as ut
from threading import Thread
#imp.reload(redirect_print)
def onfinished(args=""):
ue.log(args)
ue.log('finished with: <' +... | 0 | 0 | 0 | 0 | 0 | 668 | 0 | -8 | 358 |
acd2e4f7bd002b978aa773228676c457d4179f4c | 732 | py | Python | test_find.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | test_find.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | test_find.py | UO-CIS-322/scrabble-helper | f18569709e6def2684dd7eada9200ff41c4c6b23 | [
"MIT"
] | null | null | null | """
Test suite for 'find.py' (Fall 2015 version)
"""
| 26.142857 | 65 | 0.617486 | """
Test suite for 'find.py' (Fall 2015 version)
"""
from find15F import matches
def test_find_no_wildcards():
## Matches without wildcards
assert matches("abc", "abc", "abc")
assert matches("abc", "abc", "xxx") # Uses nothing from tray
assert not matches("abx", "abc", "abc") # x doesn't match c
... | 0 | 0 | 0 | 0 | 0 | 590 | 0 | 6 | 69 |
5804c660e67eedf09b0dec6e599d1cf644156a9d | 7,584 | py | Python | tensorflow/python/ops/clustering_ops_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/ops/clustering_ops_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/ops/clustering_ops_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 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 applic... | 35.605634 | 80 | 0.615506 | # Copyright 2016 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 applic... | 0 | 6,380 | 0 | 0 | 0 | 0 | 0 | 55 | 183 |
c5881e9f7e8558acbb4c5c037b8d5e7f5fff6508 | 5,667 | py | Python | stko/calculators/planarity_calculators/planarity_calculators.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | null | null | null | stko/calculators/planarity_calculators/planarity_calculators.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | null | null | null | stko/calculators/planarity_calculators/planarity_calculators.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | 2 | 2020-05-08T17:51:25.000Z | 2020-05-11T09:03:24.000Z | """
Planarity Calculators
=====================
#. :class:`.PlanarityCalculator`
Methods to calculate planarity measures of a molecule.
"""
import logging
logger = logging.getLogger(__name__)
| 27.643902 | 71 | 0.589201 | """
Planarity Calculators
=====================
#. :class:`.PlanarityCalculator`
Methods to calculate planarity measures of a molecule.
"""
import logging
import numpy as np
from ..calculators import Calculator
from ..results import PlanarityResults
logger = logging.getLogger(__name__)
class PlanarityCalculator... | 0 | 0 | 0 | 5,350 | 0 | 0 | 0 | 29 | 90 |
2787b6e45103c2fcd2cec3395806de8aa78ec903 | 1,557 | py | Python | tests/test_jsm_models.py | aroth85/joint-snv-mix | a83cda57912c6f859fd8c42f6646575c0f8a753e | [
"CNRI-Python"
] | null | null | null | tests/test_jsm_models.py | aroth85/joint-snv-mix | a83cda57912c6f859fd8c42f6646575c0f8a753e | [
"CNRI-Python"
] | null | null | null | tests/test_jsm_models.py | aroth85/joint-snv-mix | a83cda57912c6f859fd8c42f6646575c0f8a753e | [
"CNRI-Python"
] | null | null | null | '''
Created on 2012-01-19
@author: innovation
'''
import unittest
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()
| 27.315789 | 105 | 0.540784 | '''
Created on 2012-01-19
@author: innovation
'''
import unittest
import numpy as np
from tests.simualtors.joint_binomial import JointSnvMixSimulator
from joint_snv_mix.counter import JointBinaryCountData, JointBinaryQualityData
from joint_snv_mix.models.joint_snv_mix import JointSnvMixModel, JointSnvMixPriors, Join... | 0 | 0 | 0 | 1,098 | 0 | 0 | 0 | 181 | 113 |
8be6c4017638beded12311dae67279b0905c5cbb | 181 | py | Python | config/dev/settings.py | newsdev/nyt-screenshot-service | 9a53ae6b0f4c6830bf94f884a95980ecbe4710f6 | [
"Apache-2.0"
] | 2 | 2017-08-21T21:50:17.000Z | 2017-08-29T02:48:56.000Z | config/dev/settings.py | newsdev/nyt-screenshot-service | 9a53ae6b0f4c6830bf94f884a95980ecbe4710f6 | [
"Apache-2.0"
] | null | null | null | config/dev/settings.py | newsdev/nyt-screenshot-service | 9a53ae6b0f4c6830bf94f884a95980ecbe4710f6 | [
"Apache-2.0"
] | null | null | null | import os
DEBUG=True
TEMPLATE_PATH = '%s/templates/' % os.path.dirname(os.path.realpath(__file__))
STATIC_BUCKET = 'nytint-stg-newsapps'
REMOTE_STORAGE_PATH = 'apps/screenshotter' | 25.857143 | 77 | 0.779006 | import os
DEBUG=True
TEMPLATE_PATH = '%s/templates/' % os.path.dirname(os.path.realpath(__file__))
STATIC_BUCKET = 'nytint-stg-newsapps'
REMOTE_STORAGE_PATH = 'apps/screenshotter' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75ca243bffd5efef72e3ed85dcc899fe108be91f | 10,157 | py | Python | src/paukenator/nlp/annotations.py | nkrot/paukenator | d7d188dd4bc283208c544f2b29530046768df7ee | [
"MIT"
] | null | null | null | src/paukenator/nlp/annotations.py | nkrot/paukenator | d7d188dd4bc283208c544f2b29530046768df7ee | [
"MIT"
] | null | null | null | src/paukenator/nlp/annotations.py | nkrot/paukenator | d7d188dd4bc283208c544f2b29530046768df7ee | [
"MIT"
] | null | null | null |
# These are necessary in Text.load_from_file() and are imported here at
# the end of the file to fix circular dependencies.
| 31.940252 | 85 | 0.61081 | from typing import List, Tuple, Optional
from .symbols import *
from .errors import NLPError
class AnnotationError(NLPError):
'''Any error related to Annotation and subclasses'''
class TextData(object):
'''Container for text data.
All Annotations reference it and use it as a source of text data.
'''... | 0 | 1,828 | 0 | 7,806 | 0 | 0 | 0 | 71 | 317 |
1c814a15b7a4ce4f2ff67e9f1daec7b4d0ffdeac | 10,799 | py | Python | Projects/VirtualCanvas/VirtualCanvas.py | Balaji-Ganesh/Furnishing-OpenCV-Basics | 54cd8fa09cc6f1298861b12ffb190432f412bd1f | [
"MIT"
] | null | null | null | Projects/VirtualCanvas/VirtualCanvas.py | Balaji-Ganesh/Furnishing-OpenCV-Basics | 54cd8fa09cc6f1298861b12ffb190432f412bd1f | [
"MIT"
] | null | null | null | Projects/VirtualCanvas/VirtualCanvas.py | Balaji-Ganesh/Furnishing-OpenCV-Basics | 54cd8fa09cc6f1298861b12ffb190432f412bd1f | [
"MIT"
] | null | null | null | # Import the required libraries
import cv2
import Projects.VirtualCanvas.utils as utils
cv2.destroyAllWindows()
if __name__ == "__main__":
# mode = int(input("Debug mode -- 1 or Normal Run ---0: "))
drawOnCanvas(debug_mode=True)
"""
LOG:
Final HSV values as: HUE_min, SAT_min, VAL_min, ... | 49.086364 | 184 | 0.624965 | # Import the required libraries
import cv2
import numpy as np
import Projects.VirtualCanvas.utils as utils
class VirtualCanvas:
def __init__(self, num_markers=2, debug_mode=False):
# Mode in which the user would like to run the program..
self.debug_mode = debug_mode # False for normal_ru... | 0 | 0 | 0 | 6,941 | 0 | 870 | 0 | -3 | 73 |
e24171f9c3ab6010088a1c42f912952e42a5477f | 5,506 | py | Python | datasets/Part 6 - Reinforcement Learning/Section 32 - Upper Confidence Bound (UCB)/upper_confidence_bound.py | kevinLCG/machinelearning-az | 54e3090275a3fc419aad17caadc6a47a71dcd3d4 | [
"MIT"
] | null | null | null | datasets/Part 6 - Reinforcement Learning/Section 32 - Upper Confidence Bound (UCB)/upper_confidence_bound.py | kevinLCG/machinelearning-az | 54e3090275a3fc419aad17caadc6a47a71dcd3d4 | [
"MIT"
] | null | null | null | datasets/Part 6 - Reinforcement Learning/Section 32 - Upper Confidence Bound (UCB)/upper_confidence_bound.py | kevinLCG/machinelearning-az | 54e3090275a3fc419aad17caadc6a47a71dcd3d4 | [
"MIT"
] | null | null | null | #!/home/kevinml/anaconda3/bin/python3.7
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 7 12:41:01 2019
@author: juangabriel and kevin Meza
"""
# Upper Confidence Bound (UCB)
# =======================================================================================================
# PASOS
#
# NOTAS: Se considera que ... | 47.878261 | 144 | 0.628405 | #!/home/kevinml/anaconda3/bin/python3.7
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 7 12:41:01 2019
@author: juangabriel and kevin Meza
"""
# Upper Confidence Bound (UCB)
# =======================================================================================================
# PASOS
#
# NOTAS: Se considera que ... | 16 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
e4715ff122d45df33ee2821da9d2fb00569dea8c | 1,771 | py | Python | src/tensorflow_time_series_dataset/loaders/csv_data_loader.py | MArpogaus/tensorflow_timeseries_dataset | f5202d2845e2583b21b30d467e301517f5c5f5f1 | [
"Apache-2.0"
] | 1 | 2022-01-27T10:33:11.000Z | 2022-01-27T10:33:11.000Z | src/tensorflow_time_series_dataset/loaders/csv_data_loader.py | MArpogaus/tensorflow_timeseries_dataset | f5202d2845e2583b21b30d467e301517f5c5f5f1 | [
"Apache-2.0"
] | null | null | null | src/tensorflow_time_series_dataset/loaders/csv_data_loader.py | MArpogaus/tensorflow_timeseries_dataset | f5202d2845e2583b21b30d467e301517f5c5f5f1 | [
"Apache-2.0"
] | null | null | null | # -*- time-stamp-pattern: "changed[\s]+:[\s]+%%$"; -*-
# AUTHOR INFORMATION ##########################################################
# file : csv_data_loader.py
# author : Marcel Arpogaus <marcel dot arpogaus at gmail dot com>
#
# created : 2022-01-07 09:02:38 (Marcel Arpogaus)
# changed : 2022-01-07 09:02:38 (Ma... | 34.72549 | 79 | 0.586674 | # -*- time-stamp-pattern: "changed[\s]+:[\s]+%%$"; -*-
# AUTHOR INFORMATION ##########################################################
# file : csv_data_loader.py
# author : Marcel Arpogaus <marcel dot arpogaus at gmail dot com>
#
# created : 2022-01-07 09:02:38 (Marcel Arpogaus)
# changed : 2022-01-07 09:02:38 (Ma... | 0 | 0 | 0 | 186 | 0 | 361 | 0 | -2 | 68 |
1573d502e1f5d26892f590673950419a11805db3 | 10,388 | py | Python | live.py | fabiobhl/project-triton | 3ac3c1bad26014ebdc0141fd3a7afe60aa9c70f9 | [
"MIT"
] | null | null | null | live.py | fabiobhl/project-triton | 3ac3c1bad26014ebdc0141fd3a7afe60aa9c70f9 | [
"MIT"
] | null | null | null | live.py | fabiobhl/project-triton | 3ac3c1bad26014ebdc0141fd3a7afe60aa9c70f9 | [
"MIT"
] | null | null | null | #standard libraries
#external libraries
#dash imports
#file imports
from actor import NNActor
if __name__ == "__main__":
from pretrain import Network
#load in the actor
Actor = NNActor(neural_network=Network, load_path="./experiments/testeth2/Run1", epoch=0)
bot = Bot(symbol="ETHUSDT", run_path=".... | 31.865031 | 161 | 0.602137 | #standard libraries
import time
from datetime import datetime
import csv
import os
import json
from concurrent import futures
import threading
import multiprocessing
import math
#external libraries
import numpy as np
import pandas as pd
from discord import Webhook, RequestsWebhookAdapter
from binance.client import Cli... | 0 | 1,213 | 0 | 8,088 | 0 | 0 | 0 | 113 | 598 |
bbabccfb5306ecb8d981c84146bd40727b4c9c11 | 52,514 | py | Python | summary/summaryanalyze_old.py | PranavSudersan/Buggee | 5767d1c259d3570086d7c389440605fa0f681336 | [
"MIT"
] | 1 | 2020-12-18T13:05:41.000Z | 2020-12-18T13:05:41.000Z | summary/summaryanalyze_old.py | PranavSudersan/Buggee | 5767d1c259d3570086d7c389440605fa0f681336 | [
"MIT"
] | null | null | null | summary/summaryanalyze_old.py | PranavSudersan/Buggee | 5767d1c259d3570086d7c389440605fa0f681336 | [
"MIT"
] | null | null | null | import os
# import random
##a.combineSummary("Folder_Name")
##if a.list_filepath != "":
## a.showSummaryPlot()
##summary = SummaryAnal()
##summary.importSummary()
##summary.plotSummary(summary.speed_def_unique,
## summary.roi_label_unique,
## summary.df_... | 55.336143 | 144 | 0.47296 | import matplotlib.pyplot as plt
import time
from datetime import datetime
import os
import os.path
from tkinter import filedialog
import tkinter as tk
import ast
import openpyxl
import pandas as pd
from pandas.io.json import json_normalize
import numpy as np
# import random
class SummaryAnal:
def ... | 24 | 0 | 0 | 51,802 | 0 | 0 | 0 | 7 | 277 |
ac09199a3bcecf7860ff8739a1e4c5bd8c92d9f0 | 881 | py | Python | src/onegov/activity/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity.collections.activity import ActivityFilter
from onegov.activity.collections.activity import ActivityCollection
from onegov.activity.collections.attendee import AttendeeCollection
from onegov.activity.collections.booking import BookingCollection
from onegov.activity.collections.invoice import Invoic... | 38.304348 | 69 | 0.830874 | from onegov.activity.collections.activity import ActivityFilter
from onegov.activity.collections.activity import ActivityCollection
from onegov.activity.collections.attendee import AttendeeCollection
from onegov.activity.collections.booking import BookingCollection
from onegov.activity.collections.invoice import Invoic... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
7911c5cf157ef0156fb354e4487de90ddf5950f1 | 11,396 | py | Python | src/ase2sprkkr/sprkkr/sprkkr_atoms.py | ase2sprkkr/ase2sprkkr | 5e04f54365e4ab65d97bd11d573b078674548a59 | [
"MIT"
] | 1 | 2022-03-14T22:56:11.000Z | 2022-03-14T22:56:11.000Z | src/ase2sprkkr/sprkkr/sprkkr_atoms.py | ase2sprkkr/ase2sprkkr | 5e04f54365e4ab65d97bd11d573b078674548a59 | [
"MIT"
] | 1 | 2022-03-10T09:08:50.000Z | 2022-03-10T09:08:50.000Z | src/ase2sprkkr/sprkkr/sprkkr_atoms.py | ase2sprkkr/ase2sprkkr | 5e04f54365e4ab65d97bd11d573b078674548a59 | [
"MIT"
] | null | null | null | """ This file contains SPRKKRAtoms - an enhanced version of Atoms to be used
with SPRKKR """
#at the last - to avoid circular imports
| 39.161512 | 117 | 0.612496 | """ This file contains SPRKKRAtoms - an enhanced version of Atoms to be used
with SPRKKR """
from ase import Atoms
from ..common.unique_values import UniqueValuesMapping
import spglib
from ase.spacegroup import Spacegroup
import numpy as np
from ..sprkkr.sites import Site
from ..common.misc import numpy_index
class ... | 0 | 3,558 | 0 | 7,422 | 0 | 0 | 0 | 78 | 200 |
6efc4514b8bf5309e10d1c14a895324a8a7222a8 | 2,369 | py | Python | keywords.py | nickdrozd/ecio-lisp | 690637f28f81c2e708075c5247d1598756aaadb2 | [
"MIT"
] | null | null | null | keywords.py | nickdrozd/ecio-lisp | 690637f28f81c2e708075c5247d1598756aaadb2 | [
"MIT"
] | null | null | null | keywords.py | nickdrozd/ecio-lisp | 690637f28f81c2e708075c5247d1598756aaadb2 | [
"MIT"
] | null | null | null | '''
It would be nice if this module didn't need to import anything,
since it defines (part of) the syntax of the language, and that
and that seems like something that should be completely abstract.
But macros make it possible to alter the syntax at run-time,
meaning that keyword dispatch has to be c... | 23 | 73 | 0.662727 | '''
It would be nice if this module didn't need to import anything,
since it defines (part of) the syntax of the language, and that
and that seems like something that should be completely abstract.
But macros make it possible to alter the syntax at run-time,
meaning that keyword dispatch has to be c... | 2 | 654 | 0 | 0 | 0 | 367 | 0 | 14 | 207 |
b694cb291fbb8443812a8b09cce12006b98ee15d | 1,746 | py | Python | locations/spiders/completecash.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 297 | 2017-12-07T01:29:14.000Z | 2022-03-29T06:58:01.000Z | locations/spiders/completecash.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 2,770 | 2017-11-28T04:20:21.000Z | 2022-03-31T11:29:16.000Z | locations/spiders/completecash.py | davidchiles/alltheplaces | 6f35f6cd652e7462107ead0a77f322caff198653 | [
"MIT"
] | 111 | 2017-11-27T21:40:02.000Z | 2022-01-22T01:21:52.000Z | # -*- coding: utf-8 -*-
| 34.92 | 96 | 0.61512 | # -*- coding: utf-8 -*-
import scrapy
import json
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
class CompleteCashSpider(scrapy.Spider):
name = "completecash"
item_attributes = { 'brand': "Complete Cash" }
allowed_domains = ["locations.completecash.net"]
cc_url... | 0 | 0 | 0 | 1,585 | 0 | 0 | 0 | 24 | 112 |
6602886e8a75448ee673f2761014a87e1f48330d | 3,831 | py | Python | morse-stf/unittest/test_module_transform.py | alipay/Antchain-MPC | f6916465e1da5722ca7efadc4eeaca13ec229707 | [
"Apache-2.0"
] | 33 | 2021-11-23T09:04:03.000Z | 2022-03-14T07:56:31.000Z | morse-stf/unittest/test_module_transform.py | qizhi-zhang/Antchain-MPC | f551170f68b0baff328e6594484e9832230fe719 | [
"Apache-2.0"
] | null | null | null | morse-stf/unittest/test_module_transform.py | qizhi-zhang/Antchain-MPC | f551170f68b0baff328e6594484e9832230fe719 | [
"Apache-2.0"
] | 6 | 2021-11-25T12:38:41.000Z | 2022-02-23T03:29:51.000Z | import unittest
from stensorflow.engine.start_server import start_local_server
import os
start_local_server(os.path.join(os.environ.get("stf_home", ".."), "conf", "config.json"))
if __name__ == '__main__':
unittest.main()
| 34.513514 | 94 | 0.656487 | import unittest
from stensorflow.basic.protocol.module_transform import module_transform,\
module_transform_withPRF
import numpy as np
from stensorflow.basic.basic_class.base import SharedTensorBase, SharedPairBase
from stensorflow.global_var import StfConfig
import tensorflow as tf
from stensorflow.engine.start_se... | 0 | 0 | 0 | 3,299 | 0 | 0 | 0 | 162 | 133 |
6f1949c5cd4540ba7606c03aa6bf62c2b044d07c | 9,006 | py | Python | examples/tensorflow/nlp/transformer_lt/quantization/ptq/main.py | huggingface/neural-compressor | aaad4c357a86914ffa583753c9a26d949838a2a5 | [
"Apache-2.0"
] | 172 | 2021-09-14T18:34:17.000Z | 2022-03-30T06:49:53.000Z | examples/tensorflow/nlp/transformer_lt/quantization/ptq/main.py | intel/lp-opt-tool | 130eefa3586b38df6c0ff78cc8807ae273f6a63f | [
"Apache-2.0"
] | 40 | 2021-09-14T02:26:12.000Z | 2022-03-29T08:34:04.000Z | examples/tensorflow/nlp/transformer_lt/quantization/ptq/main.py | intel/neural-compressor | 16a4a12045fcb468da4d33769aff2c1a5e2ba6ba | [
"Apache-2.0"
] | 33 | 2021-09-15T07:27:25.000Z | 2022-03-25T08:30:57.000Z | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 36.314516 | 89 | 0.622252 | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 0 | 0 | 2,728 | 0 | 3,729 | 0 | -5 | 383 |
3c5e955fa472b2a174f33607d809afecce7166fb | 15,418 | py | Python | warmup4ie/warmup4ie.py | 8osman/warmup4IE | 4f36101c3273bac1d083104d4220902697b7cdf3 | [
"Apache-2.0"
] | 8 | 2019-02-23T09:52:00.000Z | 2020-04-24T10:51:55.000Z | warmup4ie/warmup4ie.py | 8osman/warmup4IE | 4f36101c3273bac1d083104d4220902697b7cdf3 | [
"Apache-2.0"
] | 7 | 2019-02-23T16:40:24.000Z | 2020-02-04T22:14:48.000Z | warmup4ie/warmup4ie.py | 8osman/warmup4IE | 4f36101c3273bac1d083104d4220902697b7cdf3 | [
"Apache-2.0"
] | 3 | 2019-11-08T12:06:13.000Z | 2020-02-19T04:32:56.000Z | """
platform that offers a connection to a warmup4ie device.
this platform is inspired by the following code:
https://github.com/alyc100/SmartThingsPublic/tree/master/devicetypes/alyc100/\
warmup-4ie.src
to setup this component, you need to register to warmup first.
see
https://my.warmup.com/login
Then add to your
c... | 38.545 | 176 | 0.55526 | """
platform that offers a connection to a warmup4ie device.
this platform is inspired by the following code:
https://github.com/alyc100/SmartThingsPublic/tree/master/devicetypes/alyc100/\
warmup-4ie.src
to setup this component, you need to register to warmup first.
see
https://my.warmup.com/login
Then add to your
c... | 4 | 0 | 0 | 14,602 | 0 | 0 | 0 | -6 | 45 |
3e3a6bd99c980ea91a4f3725fdd7bbf184965475 | 322 | py | Python | exercises/exercise71.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | exercises/exercise71.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | exercises/exercise71.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | number_list = [x for x in range(1, 21)]
print(number_list)
filtered_list = filter(lambda x: x%2==0, number_list)
filtered_list = list(filtered_list)
print(filtered_list)
square_list = map(lambda x: x**2, filtered_list)
square_list = list(square_list)
print(square_list)
# filter(func, iterable)
# map(func, iterable... | 21.466667 | 53 | 0.748447 | number_list = [x for x in range(1, 21)]
print(number_list)
filtered_list = filter(lambda x: x%2==0, number_list)
filtered_list = list(filtered_list)
print(filtered_list)
square_list = map(lambda x: x**2, filtered_list)
square_list = list(square_list)
print(square_list)
# filter(func, iterable)
# map(func, iterable... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
653927e36e6c722e124ad7cab7a4b86aab936ffd | 3,822 | py | Python | songmass/evaluate/utils.py | hongwen-sun/muzic | 50fb349e8ffe37212d9a3bfe6066f4c1e6657f3a | [
"MIT"
] | 1,903 | 2021-09-22T18:43:49.000Z | 2022-03-31T08:22:13.000Z | songmass/evaluate/utils.py | hongwen-sun/muzic | 50fb349e8ffe37212d9a3bfe6066f4c1e6657f3a | [
"MIT"
] | 33 | 2021-09-24T16:22:18.000Z | 2022-03-30T09:35:20.000Z | songmass/evaluate/utils.py | hongwen-sun/muzic | 50fb349e8ffe37212d9a3bfe6066f4c1e6657f3a | [
"MIT"
] | 124 | 2021-09-24T08:56:56.000Z | 2022-03-29T05:48:03.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#
| 30.094488 | 113 | 0.570644 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#
def get_pitch_duration_sequence(notes):
seq = []
i = 0
while i < len(notes):
if notes[i] > 128:
i += 1
else:
if i + 1 >= len(notes):
break
... | 0 | 0 | 0 | 0 | 0 | 3,602 | 0 | 0 | 115 |
0a726b63ad1860c147fe1887b629d9e01b8f5aa7 | 35,420 | py | Python | kivymd/uix/textfield.py | surbhicis/KivyMD-1 | 23378fea5427d8616ed96397d148cb34fbbda73f | [
"MIT"
] | 18 | 2020-03-14T18:26:45.000Z | 2022-02-26T13:36:26.000Z | kivymd/uix/textfield.py | surbhicis/KivyMD-1 | 23378fea5427d8616ed96397d148cb34fbbda73f | [
"MIT"
] | null | null | null | kivymd/uix/textfield.py | surbhicis/KivyMD-1 | 23378fea5427d8616ed96397d148cb34fbbda73f | [
"MIT"
] | 2 | 2020-03-15T13:09:58.000Z | 2020-03-16T20:13:49.000Z | """
Components/Text Field
=====================
.. seealso::
`Material Design spec, Text fields <https://material.io/components/text-fields>`_
.. rubric:: Text fields let users enter and edit text.
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/text-fields.png
:align: cent... | 32.3766 | 119 | 0.577414 | """
Components/Text Field
=====================
.. seealso::
`Material Design spec, Text fields <https://material.io/components/text-fields>`_
.. rubric:: Text fields let users enter and edit text.
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/text-fields.png
:align: cent... | 0 | 0 | 0 | 20,875 | 0 | 0 | 0 | 275 | 360 |
3e771a0b0c87d5dd39d6a6b61f4ccf622bf37c16 | 1,586 | py | Python | src/accounts/models.py | NamHDT/Django-HDT | 1d7803e522fe1962b55a5e68c6208e6ec8562a74 | [
"MIT"
] | null | null | null | src/accounts/models.py | NamHDT/Django-HDT | 1d7803e522fe1962b55a5e68c6208e6ec8562a74 | [
"MIT"
] | null | null | null | src/accounts/models.py | NamHDT/Django-HDT | 1d7803e522fe1962b55a5e68c6208e6ec8562a74 | [
"MIT"
] | null | null | null | # Create your models here.
| 44.055556 | 95 | 0.748424 | from django.db import models
from django.contrib.auth.models import AbstractUser, Group, User
# Create your models here.
class Team(models.Model):
title_team = models.CharField(max_length=255)
status = models.BooleanField(default=True)
def __str__(self):
return self.title_team
class Group(models.... | 0 | 0 | 0 | 1,396 | 0 | 0 | 0 | 50 | 113 |
0971afebbd42210eae9ea7c8dd40303586365e72 | 1,588 | py | Python | stko/calculators/extractors/orca_extractor.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | 8 | 2020-06-09T16:59:20.000Z | 2022-03-18T23:05:38.000Z | stko/calculators/extractors/orca_extractor.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | 60 | 2020-05-22T13:38:54.000Z | 2022-03-25T09:34:22.000Z | stko/calculators/extractors/orca_extractor.py | stevenbennett96/stko | ee340af4fc549d5a2c3e9cba8360661335efe0fd | [
"MIT"
] | 4 | 2020-12-02T10:39:54.000Z | 2021-03-01T18:34:07.000Z | """
Orca Extractor
=============
#. :class:`.OrcaExtractor`
Class to extract properties from Orca output.
"""
| 22.055556 | 67 | 0.563602 | """
Orca Extractor
=============
#. :class:`.OrcaExtractor`
Class to extract properties from Orca output.
"""
import re
from .extractor import Extractor
class OrcaExtractor(Extractor):
"""
Extracts properties from Orca 4.2 output files.
Limited to final single point energy for now.
Attributes
... | 0 | 0 | 0 | 1,407 | 0 | 0 | 0 | -1 | 68 |
f7d79c7d9ee2293a7ffb1d260d3e444f2d2708b4 | 4,017 | py | Python | test/test_npu/test_onnx/torch.onnx/export/export_onnx.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_onnx/torch.onnx/export/export_onnx.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_onnx/torch.onnx/export/export_onnx.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 44.142857 | 160 | 0.692806 | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 0 | 0 | 0 | 0 | 0 | 3,224 | 0 | -3 | 136 |
8b225a0424899dc60a87321c510aba958c66778c | 1,744 | py | Python | fabdeploy/uwsgi.py | vmihailenco/fabdeploy | de46f06a45a201b254c5fd745ff00c1b51320456 | [
"BSD-3-Clause"
] | 2 | 2016-04-28T17:10:01.000Z | 2016-05-05T04:31:19.000Z | fabdeploy/uwsgi.py | vmihailenco/fabdeploy | de46f06a45a201b254c5fd745ff00c1b51320456 | [
"BSD-3-Clause"
] | null | null | null | fabdeploy/uwsgi.py | vmihailenco/fabdeploy | de46f06a45a201b254c5fd745ff00c1b51320456 | [
"BSD-3-Clause"
] | null | null | null |
__all__ = [
'install_deps',
'install',
'push_config',
'disable_config',
'emperor',
]
install_deps = InstallDeps()
install = Install()
push_config = PushConfig()
disable_config = DisableConfig()
emperor = Emperor()
| 22.075949 | 79 | 0.644495 | from fabric.api import sudo, settings
from .task import Task
from .containers import conf
from .utils import upload_config_template
from . import system
from . import pip
__all__ = [
'install_deps',
'install',
'push_config',
'disable_config',
'emperor',
]
class InstallDeps(Task):
def do(sel... | 0 | 294 | 0 | 786 | 0 | 0 | 0 | 39 | 378 |
d8a4f0b7118eaacf0f9c5e2fe17dc78a9381ba01 | 7,017 | py | Python | qa/rpc-tests/blockdelay.py | stashpayio/stash | 963144989f74c39e7287021d917da0405e237ae7 | [
"MIT"
] | 1 | 2019-10-23T06:01:29.000Z | 2019-10-23T06:01:29.000Z | qa/rpc-tests/blockdelay.py | stashpayio/stash | 963144989f74c39e7287021d917da0405e237ae7 | [
"MIT"
] | 2 | 2019-04-29T19:26:56.000Z | 2020-02-02T17:41:57.000Z | qa/rpc-tests/blockdelay.py | stashpayio/stash | 963144989f74c39e7287021d917da0405e237ae7 | [
"MIT"
] | 24 | 2019-05-14T22:31:53.000Z | 2020-07-07T21:22:56.000Z | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2018 The Zencash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
if __name__ == '__main__':
blockdelay().main()
| 38.767956 | 112 | 0.64529 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2018 The Zencash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from... | 0 | 0 | 0 | 6,207 | 0 | 0 | 0 | 262 | 243 |
57e33efd6f7be223beeb7a6465536e61f6a9a3c4 | 145 | py | Python | Python/code case/code case 258.py | amazing-2020/pdf | 8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d | [
"Apache-2.0"
] | 3 | 2021-01-01T13:08:24.000Z | 2021-02-03T09:27:56.000Z | Python/code case/code case 258.py | amazing-2020/pdf | 8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d | [
"Apache-2.0"
] | null | null | null | Python/code case/code case 258.py | amazing-2020/pdf | 8cd3f5f510a1c1ed89b51b1354f4f8c000c5b24d | [
"Apache-2.0"
] | null | null | null | if __name__ == '__main__':
a = int(input("input a number: \n"))
b = a >> 4
c = ~(~0 << 4)
d = b & c
print("%o\t%o" % (a, d))
| 20.714286 | 40 | 0.406897 | if __name__ == '__main__':
a = int(input("input a number: \n"))
b = a >> 4
c = ~(~0 << 4)
d = b & c
print("%o\t%o" % (a, d))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76a9211d33d48baca8d3522bece6b4577e432edc | 2,004 | py | Python | temp.py | dtuit/twitter_scraper | 0b7527bb97ee5b30b6f634d9534223f949aea63f | [
"MIT"
] | 6 | 2016-09-20T13:47:57.000Z | 2019-03-31T15:02:31.000Z | temp.py | sahwar/twitter_scraper | 0b7527bb97ee5b30b6f634d9534223f949aea63f | [
"MIT"
] | null | null | null | temp.py | sahwar/twitter_scraper | 0b7527bb97ee5b30b6f634d9534223f949aea63f | [
"MIT"
] | 1 | 2019-03-07T01:46:19.000Z | 2019-03-07T01:46:19.000Z | from celery import Celery
app = Celery('tasks')
app.config_from_object('celeryconfig')
'''
'''
'''
'''
'''
input
query
start date
end date
For each day in date range
create a task (query,day)
page through each page in query
save each page to database
'''
| 22.266667 | 122 | 0.676148 | from celery import Celery, signals, Task
from datetime import datetime, timezone, timedelta, date
from math import floor
import requests
import pymssql
import json
import twitterWebsiteSearch.TwitterWebsiteSearch as twitSearch
app = Celery('tasks')
app.config_from_object('celeryconfig')
'''
'''
@signals.worker_pro... | 0 | 816 | 0 | 153 | 109 | 229 | 0 | 69 | 317 |
2173ac94612d7da3c2b3f618e4a1acf5842e7d92 | 25,022 | py | Python | brewtils/pika.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | null | null | null | brewtils/pika.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | null | null | null | brewtils/pika.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
| 37.235119 | 88 | 0.618496 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import ssl as pyssl
from functools import partial
from pika import (
BasicProperties,
BlockingConnection,
ConnectionParameters,
PlainCredentials,
SelectConnection,
SSLOptions,
URLParameters,
)
from pika.exception... | 0 | 514 | 0 | 23,868 | 0 | 0 | 0 | 304 | 270 |
90981bee8a0d229ba74215f51d1463d24174a322 | 2,790 | py | Python | norm/executable/schema/type.py | reasoned-ai/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | 8 | 2019-07-22T08:57:20.000Z | 2021-03-26T13:51:02.000Z | norm/executable/schema/type.py | xumiao/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | null | null | null | norm/executable/schema/type.py | xumiao/norm | 5e45d5917ce8745c9a757a0c6b5e689ea0cac19f | [
"Apache-2.0"
] | 1 | 2019-11-16T13:37:35.000Z | 2019-11-16T13:37:35.000Z |
import logging
logger = logging.getLogger(__name__)
| 31 | 116 | 0.574194 | from norm.executable import NormError, NormExecutable
from norm.models import ListLambda, Lambda, Variable, Status
import logging
logger = logging.getLogger(__name__)
class TypeName(NormExecutable):
def __init__(self, name, version=None):
"""
The type qualified name
:param name: name of ... | 0 | 0 | 0 | 2,573 | 0 | 0 | 0 | 71 | 90 |
743583c448133c940588bb31d74e31b932be2609 | 2,498 | py | Python | nutricionistas/users/forms.py | karinamg17/nutricionistas | d7cac627fd25692f9db88525d1b8da326f1dde5f | [
"MIT"
] | null | null | null | nutricionistas/users/forms.py | karinamg17/nutricionistas | d7cac627fd25692f9db88525d1b8da326f1dde5f | [
"MIT"
] | null | null | null | nutricionistas/users/forms.py | karinamg17/nutricionistas | d7cac627fd25692f9db88525d1b8da326f1dde5f | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
User = get_user_model()
| 35.685714 | 126 | 0.702162 | import re
from allauth.account.forms import SignupForm
from django import forms as form2
from django.contrib.auth import forms as admin_forms
from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
User = get_user_model()
class UserChangeForm(admin_forms.UserChangeForm)... | 14 | 0 | 0 | 2,101 | 0 | 0 | 0 | 87 | 226 |
3039299991f63413c05107a6c6337f3773775775 | 420 | py | Python | extensions/cencalvm/__init__.py | baagaard-usgs/cencalvm | c6cca356c722f150178416e5f98a1506dd733db6 | [
"CC0-1.0"
] | null | null | null | extensions/cencalvm/__init__.py | baagaard-usgs/cencalvm | c6cca356c722f150178416e5f98a1506dd733db6 | [
"CC0-1.0"
] | null | null | null | extensions/cencalvm/__init__.py | baagaard-usgs/cencalvm | c6cca356c722f150178416e5f98a1506dd733db6 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard
# U.S. Geological Survey
#
# <LicenseText>
#
# ----------------------------------------------------------------------
#
## @file cencalvm/__init__.py
##
... | 20 | 72 | 0.359524 | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard
# U.S. Geological Survey
#
# <LicenseText>
#
# ----------------------------------------------------------------------
#
## @file cencalvm/__init__.py
##
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
496a4b7bd3a7d0cde01a6dc3362ce52cf77f9222 | 560 | py | Python | config.py | bnguyen2/covid-hackathon | 016ce5f0239c8f182840420d4a946da3603775ee | [
"Apache-2.0"
] | 1 | 2020-04-16T05:41:07.000Z | 2020-04-16T05:41:07.000Z | config.py | bnguyen2/covid-hackathon | 016ce5f0239c8f182840420d4a946da3603775ee | [
"Apache-2.0"
] | 27 | 2020-03-31T02:21:33.000Z | 2020-04-12T23:13:43.000Z | config.py | bnguyen2/covid-hackathon | 016ce5f0239c8f182840420d4a946da3603775ee | [
"Apache-2.0"
] | 1 | 2020-04-12T16:37:31.000Z | 2020-04-12T16:37:31.000Z | """
A bunch of variables that are intended
to be shared across the Flask codebase
"""
from flask import Flask
import db
import logging
MAIN_APP = Flask(__name__)
LOGGER = MAIN_APP.logger
LOGGER.setLevel(logging.INFO)
MAIN_DB = db.Database(MAIN_APP).getDb()
POSSIBLE_NEEDS = [
'N95',
'N95s',
'Gloves',
... | 18.064516 | 39 | 0.669643 | """
A bunch of variables that are intended
to be shared across the Flask codebase
"""
from flask import Flask
import db
import logging
MAIN_APP = Flask(__name__)
LOGGER = MAIN_APP.logger
LOGGER.setLevel(logging.INFO)
MAIN_DB = db.Database(MAIN_APP).getDb()
POSSIBLE_NEEDS = [
'N95',
'N95s',
'Gloves',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
222fdbd75646eb56729f9caa7ba7cb3b9995f45c | 26,582 | py | Python | events/api_views.py | renzyndrome/lits-crm | 32daea8c76f91780b8cc8c3f107d04df606c0ec8 | [
"MIT"
] | 1 | 2021-03-01T12:07:10.000Z | 2021-03-01T12:07:10.000Z | events/api_views.py | renzyndrome/lits-crm | 32daea8c76f91780b8cc8c3f107d04df606c0ec8 | [
"MIT"
] | null | null | null | events/api_views.py | renzyndrome/lits-crm | 32daea8c76f91780b8cc8c3f107d04df606c0ec8 | [
"MIT"
] | null | null | null |
WEEKDAYS = (
("Monday", "Monday"),
("Tuesday", "Tuesday"),
("Wednesday", "Wednesday"),
("Thursday", "Thursday"),
("Friday", "Friday"),
("Saturday", "Saturday"),
("Sunday", "Sunday"),
)
| 41.212403 | 88 | 0.520615 | from django.db.models import Q
from contacts.models import Contact
from contacts.serializer import ContactSerializer
from common.models import User, Attachments, Comment
from common.custom_auth import JSONWebTokenAuthentication
from common.serializer import (
UserSerializer,
CommentSerializer,
AttachmentsS... | 0 | 17,831 | 0 | 7,502 | 0 | 0 | 0 | 497 | 534 |
eaeeb28af3bda10f0466a2aa6dc8fbf50e68d9c8 | 264 | py | Python | ecogvis/signal_processing/tests/test_linenoise_notch.py | jgmakin/ecogVIS | a3aeba07c5f967ad51455506820083548ecfa5d9 | [
"BSD-3-Clause"
] | 4 | 2019-10-12T00:17:03.000Z | 2020-05-08T03:05:05.000Z | ecogvis/signal_processing/tests/test_linenoise_notch.py | jgmakin/ecogVIS | a3aeba07c5f967ad51455506820083548ecfa5d9 | [
"BSD-3-Clause"
] | 7 | 2019-10-12T00:20:48.000Z | 2019-12-07T01:39:45.000Z | ecogvis/signal_processing/tests/test_linenoise_notch.py | jgmakin/ecogVIS | a3aeba07c5f967ad51455506820083548ecfa5d9 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T19:37:06.000Z | 2020-08-10T19:37:06.000Z | import numpy as np
from ecog.signal_processing import linenoise_notch
def test_linenoise_notch_return():
"""
Test the return shape.
"""
X = np.random.randn(32, 1000)
rate = 200
Xh = linenoise_notch(X, rate)
assert Xh.shape == X.shape
| 20.307692 | 50 | 0.670455 | import numpy as np
from ecog.signal_processing import linenoise_notch
def test_linenoise_notch_return():
"""
Test the return shape.
"""
X = np.random.randn(32, 1000)
rate = 200
Xh = linenoise_notch(X, rate)
assert Xh.shape == X.shape
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
480b5a5b150b0bf552bd882a4d4d83c6361fe676 | 3,049 | py | Python | data/getdataset.py | NikolaySokolov152/Unet_multiclass | d07f6809b422519097560b07f67d0f139e718381 | [
"MIT"
] | null | null | null | data/getdataset.py | NikolaySokolov152/Unet_multiclass | d07f6809b422519097560b07f67d0f139e718381 | [
"MIT"
] | null | null | null | data/getdataset.py | NikolaySokolov152/Unet_multiclass | d07f6809b422519097560b07f67d0f139e718381 | [
"MIT"
] | null | null | null | #Splitter
import cv2
import numpy.random as random
import numpy as np
import os
import skimage.io as io
#borders
#mitochondria
#mitochondria borders
#PSD
#vesicles
file_dir_arr = ["axon", "mitochondria", "PSD", "vesicles", "boundaries","mitochondrial boundaries"]
name_list = []
mask_list = []
out_dir = "cuttin... | 25.408333 | 151 | 0.656281 | #Splitter
import cv2
import numpy.random as random
import numpy as np
import os
import time
import skimage.io as io
from AGCWD import*
#borders
#mitochondria
#mitochondria borders
#PSD
#vesicles
def is_Img(name):
img_type = ('.png', '.jpg', '.jpeg')
if name.endswith((img_type)):
return True
else:
return Fa... | 36 | 0 | 0 | 0 | 0 | 101 | 0 | -13 | 67 |
603acea854d10a36c84d3110d4f9949345cb622c | 3,089 | py | Python | zappa_manage/manage.py | edx/zappa-manage | eb26f039a74a8cf9ade4a0905ac983a1c8e8cecc | [
"MIT"
] | null | null | null | zappa_manage/manage.py | edx/zappa-manage | eb26f039a74a8cf9ade4a0905ac983a1c8e8cecc | [
"MIT"
] | 1 | 2019-10-25T18:32:03.000Z | 2019-10-25T21:56:54.000Z | zappa_manage/manage.py | edx/zappa-manage | eb26f039a74a8cf9ade4a0905ac983a1c8e8cecc | [
"MIT"
] | null | null | null | #!/usr/bin/python
import boto3
from pybase64 import b64encode
from asym_crypto_yaml import (load, Encrypted, decrypt_value, load_private_key_from_file, load_private_key_from_string)
def perform_deploy_lambda_envs(config_file_path, private_key_content, private_key_path, kms_key_arn, lambda_name):
"""
Loads p... | 36.341176 | 114 | 0.679832 | #!/usr/bin/python
import boto3
import click
from pybase64 import b64encode
from asym_crypto_yaml import (
load, Encrypted, decrypt_value,
load_private_key_from_file,
load_private_key_from_string
)
def perform_deploy_lambda_envs(config_file_path, private_key_content, private_key_path, kms_key_arn, lambda... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
0faa476f54f9622d9910da74917eee9d1f62c54d | 9,842 | py | Python | python/util/data_processing_ipynb.py | debajyotidatta/multiNLI_mod | d94e30ddd628a2df65859424ebec7d212d3227b5 | [
"Apache-2.0"
] | null | null | null | python/util/data_processing_ipynb.py | debajyotidatta/multiNLI_mod | d94e30ddd628a2df65859424ebec7d212d3227b5 | [
"Apache-2.0"
] | null | null | null | python/util/data_processing_ipynb.py | debajyotidatta/multiNLI_mod | d94e30ddd628a2df65859424ebec7d212d3227b5 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
import json
import collections
import parameters as params
import nltk
# args = params.argparser("lstm petModel-0 --keep_rate 0.9 --seq_length 25 --emb_train")
# FIXED_PARAMETERS = params.load_parameters(args)
FIXED_PARAMETERS = params.load_parameters()
LABEL_MAP = {
"entailment... | 39.055556 | 164 | 0.602621 | import numpy as np
import re
import random
import json
import collections
import parameters as params
import pickle
import nltk
# args = params.argparser("lstm petModel-0 --keep_rate 0.9 --seq_length 25 --emb_train")
# FIXED_PARAMETERS = params.load_parameters(args)
FIXED_PARAMETERS = params.load_parameters()
LABEL... | 0 | 0 | 0 | 0 | 0 | 68 | 0 | -20 | 67 |
b8806e8e829267f46ee86a005b85487da3499661 | 5,697 | py | Python | conllu/parser.py | orenbaldinger/conllu | 2f650cb0403b6a73fcf89dbd222400fec57388d1 | [
"MIT"
] | null | null | null | conllu/parser.py | orenbaldinger/conllu | 2f650cb0403b6a73fcf89dbd222400fec57388d1 | [
"MIT"
] | null | null | null | conllu/parser.py | orenbaldinger/conllu | 2f650cb0403b6a73fcf89dbd222400fec57388d1 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import re
DEFAULT_FIELDS = ('id', 'form', 'lemma', 'upostag', 'xpostag', 'feats', 'head', 'deprel', 'deps', 'misc')
INTEGER = re.compile(r"^0|(\-?[1-9][0-9]*)$")
ID_SINGLE = re.compile(r"^[1-9][0-9]*$")
ID_RANGE = re.compile(r"^[1-9][0-9]*\-[1-9][0-9]*$")
ID_DOT_ID = re.com... | 27 | 105 | 0.585747 | from __future__ import unicode_literals
import re
from collections import OrderedDict, defaultdict
from conllu.compat import text
DEFAULT_FIELDS = ('id', 'form', 'lemma', 'upostag', 'xpostag', 'feats', 'head', 'deprel', 'deps', 'misc')
def parse_token_and_metadata(data, fields=None):
if not data:
raise ... | 0 | 0 | 0 | 20 | 0 | 4,826 | 0 | 36 | 321 |
20750d8c47027ee70e5de3454f252404ff25ec3b | 2,309 | py | Python | app/controllers/GithubController.py | DiegoSilva776/linkehub_insigth_api | 1909a9c1b28901ab6dc0be6815741aed848b4363 | [
"MIT"
] | 2 | 2018-06-25T03:07:28.000Z | 2018-06-26T13:52:23.000Z | app/controllers/GithubController.py | DiegoSilva776/linkehub_insigth_api | 1909a9c1b28901ab6dc0be6815741aed848b4363 | [
"MIT"
] | null | null | null | app/controllers/GithubController.py | DiegoSilva776/linkehub_insigth_api | 1909a9c1b28901ab6dc0be6815741aed848b4363 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
sys.path.append('../')
'''
The methods of this class manage requests that are related to the Github information stored in
the project database. The ScrapingController also has methods related to Github, however, they
are used only to get info from the actual Github AP... | 34.984848 | 138 | 0.647033 | # -*- coding: utf-8 -*-
import sys
import os
import json
import http.client
import urllib
sys.path.append('../')
from utils.NetworkingUtils import NetworkingUtils
from utils.ConstantUtils import ConstantUtils
'''
The methods of this class manage requests that are related to the Github information stored in
... | 0 | 0 | 0 | 1,761 | 0 | 0 | 0 | 19 | 155 |
1300a4bd098ab78414e9bcd1aec4356e26a1fd28 | 2,953 | py | Python | Exscript/interpreter/regex.py | ShurikMen/exscript | 29180fdf447b265ab17ab3c6cac827b19864b7be | [
"MIT"
] | 226 | 2015-01-20T19:59:06.000Z | 2022-01-02T11:13:01.000Z | Exscript/interpreter/regex.py | ShurikMen/exscript | 29180fdf447b265ab17ab3c6cac827b19864b7be | [
"MIT"
] | 155 | 2015-01-02T07:56:27.000Z | 2022-01-09T20:56:19.000Z | Exscript/interpreter/regex.py | ShurikMen/exscript | 29180fdf447b265ab17ab3c6cac827b19864b7be | [
"MIT"
] | 114 | 2015-01-03T11:48:17.000Z | 2022-01-26T02:50:43.000Z | #
# Copyright (C) 2010-2017 Samuel Abels
# The MIT License (MIT)
#
# 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,... | 36.45679 | 77 | 0.663732 | #
# Copyright (C) 2010-2017 Samuel Abels
# The MIT License (MIT)
#
# 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,... | 0 | 0 | 0 | 1,329 | 0 | 0 | 0 | 5 | 45 |
4ecde91c5e3066c0d64c7dcc93e20872e036d52f | 2,144 | py | Python | src/python/pants/backend/jvm/tasks/javadoc_gen.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/javadoc_gen.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/javadoc_gen.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
| 31.529412 | 97 | 0.661381 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.j... | 0 | 85 | 0 | 1,520 | 0 | 0 | 0 | 127 | 112 |
e15d08411554ef78bde9fcd517ba0faf62230bb5 | 131 | py | Python | ihela_client/__init__.py | UbuhingaVizion/ihela-pyhton-client | a5f808a0c138ef407416f0d8548e1ddf8957a12a | [
"MIT"
] | 2 | 2020-12-10T13:20:37.000Z | 2021-11-15T02:44:16.000Z | ihela_client/__init__.py | UbuhingaVizion/ihela-pyhton-client | a5f808a0c138ef407416f0d8548e1ddf8957a12a | [
"MIT"
] | 3 | 2020-09-19T20:05:23.000Z | 2021-06-02T00:46:53.000Z | ihela_client/__init__.py | UbuhingaVizion/ihela-pyhton-client | a5f808a0c138ef407416f0d8548e1ddf8957a12a | [
"MIT"
] | 4 | 2020-09-09T16:40:10.000Z | 2021-08-03T09:48:34.000Z |
__version__ = "0.0.5"
| 26.2 | 63 | 0.854962 | from .merchant_authorization import MerchantAuthorizationClient
from .merchant_client import MerchantClient
__version__ = "0.0.5"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 44 |
0ff642dfb890af95565c70ceb8c3c62a42535e1d | 8,958 | py | Python | airflow_spell/hooks/spell_client.py | healx/airflow-spell | ce1b028af24b7bf26ec973db01e885c4de62ec85 | [
"Apache-2.0"
] | 1 | 2020-07-17T15:57:17.000Z | 2020-07-17T15:57:17.000Z | airflow_spell/hooks/spell_client.py | healx/airflow-spell | ce1b028af24b7bf26ec973db01e885c4de62ec85 | [
"Apache-2.0"
] | 39 | 2020-07-03T12:39:54.000Z | 2022-03-29T08:55:56.000Z | airflow_spell/hooks/spell_client.py | healx/airflow-spell | ce1b028af24b7bf26ec973db01e885c4de62ec85 | [
"Apache-2.0"
] | null | null | null | from random import uniform
from time import sleep
from typing import Union
from spell.client.runs import RunsService as ExternalSpellRunsService
STILL_RUNNING = [
ExternalSpellRunsService.BUILDING,
ExternalSpellRunsService.PUSHING,
ExternalSpellRunsService.RUNNING,
ExternalSpellRunsService.SAVING,
]
... | 32.107527 | 88 | 0.638647 | from random import uniform
from time import sleep
from typing import List, Optional, Union
from airflow.exceptions import AirflowException
from airflow.hooks.base import BaseHook
from airflow.utils.log.logging_mixin import LoggingMixin
from spell.client import SpellClient as ExternalSpellClient
from spell.client.runs ... | 0 | 345 | 0 | 6,003 | 0 | 193 | 0 | 165 | 180 |
eca15d20b2987a3974b33182450d7fd48bd19f5f | 767 | py | Python | liveproxy/shared.py | frebib/liveproxy | 49483579eded7ee4e23cc4b9a9e75ed20a4d62e8 | [
"BSD-2-Clause"
] | 1 | 2019-09-08T05:56:14.000Z | 2019-09-08T05:56:14.000Z | liveproxy/shared.py | frebib/liveproxy | 49483579eded7ee4e23cc4b9a9e75ed20a4d62e8 | [
"BSD-2-Clause"
] | null | null | null | liveproxy/shared.py | frebib/liveproxy | 49483579eded7ee4e23cc4b9a9e75ed20a4d62e8 | [
"BSD-2-Clause"
] | 1 | 2021-03-28T11:50:34.000Z | 2021-03-28T11:50:34.000Z | # -*- coding: utf-8 -*-
'''
Python classes that are shared between
LiveProxy main.py and Kodi service.liveproxy
'''
import logging
import streamlink.logger as logger
log = logging.getLogger('streamlink.liveproxy-shared')
__all__ = [
'check_root',
'logger',
'setup_logging',
]
| 23.242424 | 102 | 0.601043 | # -*- coding: utf-8 -*-
'''
Python classes that are shared between
LiveProxy main.py and Kodi service.liveproxy
'''
import logging
import os
import sys
import streamlink.logger as logger
log = logging.getLogger('streamlink.liveproxy-shared')
def check_root():
if hasattr(os, 'getuid'):
if os.ge... | 0 | 0 | 0 | 0 | 0 | 396 | 0 | -23 | 90 |
d2b20976e78d5276aa017a04e295b70ecf2c45a1 | 3,469 | py | Python | fbpcs/input_data_validation/validation_runner.py | musebc/fbpcs | e502b708f24ad6403043df59a7517084c0bb5e22 | [
"MIT"
] | null | null | null | fbpcs/input_data_validation/validation_runner.py | musebc/fbpcs | e502b708f24ad6403043df59a7517084c0bb5e22 | [
"MIT"
] | null | null | null | fbpcs/input_data_validation/validation_runner.py | musebc/fbpcs | e502b708f24ad6403043df59a7517084c0bb5e22 | [
"MIT"
] | null | null | null | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
"""
This is the main class that runs all of the validations.
This class handles the overall logic to:
* Copy the file to lo... | 35.762887 | 88 | 0.671375 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
"""
This is the main class that runs all of the validations.
This class handles the overall logic to:
* Copy the file to lo... | 0 | 0 | 0 | 2,493 | 0 | 0 | 0 | 280 | 223 |
c82848c9cdb6634cd95c6d18fcb749abc104d87e | 1,226 | py | Python | mitm-websocket.py | ykmattur2005/Websocket_MITM | 4117a85da624a5df14738dea36df859ed5a197c2 | [
"MIT"
] | null | null | null | mitm-websocket.py | ykmattur2005/Websocket_MITM | 4117a85da624a5df14738dea36df859ed5a197c2 | [
"MIT"
] | null | null | null | mitm-websocket.py | ykmattur2005/Websocket_MITM | 4117a85da624a5df14738dea36df859ed5a197c2 | [
"MIT"
] | null | null | null | import argparse
from Secure_Server import secure_server_start
from Secure_Client import secure_client_start
from Server import unsecure_server_start
from Client import unsecure_client_start
from MITM import mitm_start
parser = argparse.ArgumentParser(description='Choose whether to run a client or a server, and whether... | 35.028571 | 130 | 0.731648 | import argparse
from Secure_Server import secure_server_start
from Secure_Client import secure_client_start
from Server import unsecure_server_start
from Client import unsecure_client_start
from MITM import mitm_start
parser = argparse.ArgumentParser(description='Choose whether to run a client or a server, and whether... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7d3d92fb69fb42d41aed0da3b166bafa75b36a85 | 625 | py | Python | run_rasa_test_with_ide.py | randywreed/financial-demo | 2667b0cb2082719b7cd47cf60396df7f036dea51 | [
"Apache-2.0"
] | 230 | 2020-02-28T05:53:25.000Z | 2022-03-21T07:49:20.000Z | run_rasa_test_with_ide.py | randywreed/financial-demo | 2667b0cb2082719b7cd47cf60396df7f036dea51 | [
"Apache-2.0"
] | 107 | 2020-03-09T14:44:22.000Z | 2022-02-14T07:44:02.000Z | run_rasa_test_with_ide.py | randywreed/financial-demo | 2667b0cb2082719b7cd47cf60396df7f036dea51 | [
"Apache-2.0"
] | 410 | 2020-02-28T05:53:29.000Z | 2022-03-20T23:49:32.000Z | """This script allows use of an IDE (Wing, Pycharm, ...) to run the rasa shell:
(-) Place this script in root of Rasa bot project
(-) Open & run it from within your IDE
(-) In Wing, use External Console for better experience.
"""
import os
import sys
# insert path of this script in syspath so custom modules will be... | 21.551724 | 79 | 0.6976 | """This script allows use of an IDE (Wing, Pycharm, ...) to run the rasa shell:
(-) Place this script in root of Rasa bot project
(-) Open & run it from within your IDE
(-) In Wing, use External Console for better experience.
"""
import os
import sys
# insert path of this script in syspath so custom modules will be... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27f35a97ee4f2a972b844159654ae5cb4b930adc | 1,078 | py | Python | app/__init__.py | samzhangjy/Future-Blog | 1bc6f9d80a591a1cc8e14bc778a0ede99ea13689 | [
"MIT"
] | 1 | 2020-02-09T03:37:42.000Z | 2020-02-09T03:37:42.000Z | app/__init__.py | PythonSamZhang/Future-Blog | 1bc6f9d80a591a1cc8e14bc778a0ede99ea13689 | [
"MIT"
] | 2 | 2020-03-24T18:11:43.000Z | 2020-03-31T11:00:18.000Z | app/__init__.py | samzhangjy/Future-Blog | 1bc6f9d80a591a1cc8e14bc778a0ede99ea13689 | [
"MIT"
] | null | null | null | #-*-coding:utf-8-*-
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_moment import Moment
from flask_login import LoginManager
from flask_pagedown import PageDown
from flask_uploads import UploadSet, IMAGES
bootstrap = Bootstrap()
db = SQLAlchemy()
moment = Moment()
login_manage... | 29.944444 | 83 | 0.769944 | #-*-coding:utf-8-*-
from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_moment import Moment
from flask_login import LoginManager
from flask_pagedown import PageDown
from config import config
import os
from f... | 0 | 0 | 0 | 0 | 0 | 471 | 0 | 63 | 111 |
80361f4bdc161bde187260e75772df7c070dff75 | 977 | py | Python | vim/util/__init__.py | GoNZooo/dragonfly-grammars | 22d639d8f86f4f5a7c44caa73e75c4938c0ce199 | [
"MIT"
] | 3 | 2020-09-06T10:40:19.000Z | 2020-09-29T20:39:52.000Z | vim/util/__init__.py | GoNZooo/dragonfly-grammars | 22d639d8f86f4f5a7c44caa73e75c4938c0ce199 | [
"MIT"
] | null | null | null | vim/util/__init__.py | GoNZooo/dragonfly-grammars | 22d639d8f86f4f5a7c44caa73e75c4938c0ce199 | [
"MIT"
] | null | null | null | from dragonfly import Grammar
pythonBootstrap = Grammar("python bootstrap")
pythonBootstrap.add_rule(PythonEnabler())
pythonBootstrap.load()
pythonGrammar = Grammar("python grammar")
pythonGrammar.load()
pythonGrammar.disable()
| 27.138889 | 85 | 0.726714 | from dragonfly import Grammar, CompoundRule
class PythonEnabler(CompoundRule):
spec = "Enable Python" # Spoken command to enable the Python grammar.
def _process_recognition(self, node, extras): # Callback when command is spoken.
pythonBootstrap.disable()
pythonGrammar.enable()
prin... | 0 | 0 | 0 | 565 | 0 | 95 | 0 | 14 | 69 |
cb0683f307b349e0c87f71c2ac334901c13f88c5 | 1,351 | py | Python | Projeto Base (Estudo)/Material/Projeto.py | lucashbdutra/ETL | 5455fe3164daa76b03afb33a86b7ec6e66643bf9 | [
"MIT"
] | null | null | null | Projeto Base (Estudo)/Material/Projeto.py | lucashbdutra/ETL | 5455fe3164daa76b03afb33a86b7ec6e66643bf9 | [
"MIT"
] | null | null | null | Projeto Base (Estudo)/Material/Projeto.py | lucashbdutra/ETL | 5455fe3164daa76b03afb33a86b7ec6e66643bf9 | [
"MIT"
] | null | null | null | import pandas as pd
import pandera as pa
df = pd.read_csv('ocorrencia.csv', parse_dates=['ocorrencia_dia'], dayfirst=True) #fazer a leitura da tablea, parse_data: faz a converso para data e dayfirst: faz com que o dia seja o primeiro nmero
df.head(10)
schema = pa.DataFrameSchema( #cria um esquema para o data frame pa... | 61.409091 | 200 | 0.72909 | import pandas as pd
import pandera as pa
df = pd.read_csv('ocorrencia.csv', parse_dates=['ocorrencia_dia'], dayfirst=True) #fazer a leitura da tablea, parse_data: faz a conversão para data e dayfirst: faz com que o dia seja o primeiro número
df.head(10)
schema = pa.DataFrameSchema( #cria um esquema para o data frame ... | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f9988e778b5c1c5798f5d46e5b5e0c7dccee459a | 4,932 | py | Python | python/desc/sims/GCRCatSimInterface/SQLSubCatalog.py | jchiang87/sims_GCRCatSimInterface | 320ddc07432bcaa05723944738a6e02b6841b69e | [
"BSD-3-Clause"
] | 1 | 2020-11-02T21:08:39.000Z | 2020-11-02T21:08:39.000Z | python/desc/sims/GCRCatSimInterface/SQLSubCatalog.py | jchiang87/sims_GCRCatSimInterface | 320ddc07432bcaa05723944738a6e02b6841b69e | [
"BSD-3-Clause"
] | 71 | 2018-01-12T17:12:50.000Z | 2021-02-26T23:54:37.000Z | python/desc/sims/GCRCatSimInterface/SQLSubCatalog.py | jchiang87/sims_GCRCatSimInterface | 320ddc07432bcaa05723944738a6e02b6841b69e | [
"BSD-3-Clause"
] | 5 | 2018-01-11T18:42:42.000Z | 2019-11-15T17:41:22.000Z |
__all__ = ["SQLSubCatalogMixin"]
| 34.978723 | 80 | 0.580089 | import numpy as np
import os
import sqlite3
from . import SubCatalogMixin
__all__ = ["SQLSubCatalogMixin"]
class SQLSubCatalogMixin(SubCatalogMixin):
"""
This is a SubCatalog mixin class that writes
its output to a sqlite database, rather than
a text file.
Note: subcatalogs in the same CompoundIn... | 0 | 0 | 0 | 4,801 | 0 | 0 | 0 | -14 | 111 |
ae39961414a92e04a0aee535a8093bc7fce5d2f8 | 3,163 | py | Python | sphinx_scality/directives/command.py | scality/sphinx_scality | 278b45aedc7ebbd0689cc792f0531cc6d1038ad3 | [
"Apache-2.0"
] | 1 | 2020-06-18T06:38:14.000Z | 2020-06-18T06:38:14.000Z | sphinx_scality/directives/command.py | scality/sphinx_scality | 278b45aedc7ebbd0689cc792f0531cc6d1038ad3 | [
"Apache-2.0"
] | 23 | 2019-07-26T15:59:07.000Z | 2021-12-10T14:59:47.000Z | sphinx_scality/directives/command.py | scality/sphinx_scality | 278b45aedc7ebbd0689cc792f0531cc6d1038ad3 | [
"Apache-2.0"
] | null | null | null | """Directives for building command blocks."""
| 34.380435 | 88 | 0.60607 | """Directives for building command blocks."""
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.util.docutils import SphinxDirective
class CommandBlockDirective(SphinxDirective):
"""Generate a container node with a command, its prompt and optional output."""
has_content = Tr... | 0 | 0 | 0 | 2,598 | 0 | 350 | 0 | 54 | 113 |
cff5557da721d77a6ce84cdbaea837fe06f00b51 | 2,727 | py | Python | src/backup_email.py | rajveer10092/kushs-utils-tool | 4aa8fa5535f90d6bbb2bf6ecbbb1b708d490c99c | [
"MIT"
] | 1 | 2021-10-01T04:09:57.000Z | 2021-10-01T04:09:57.000Z | src/backup_email.py | rajveer10092/kushs-utils-tool | 4aa8fa5535f90d6bbb2bf6ecbbb1b708d490c99c | [
"MIT"
] | null | null | null | src/backup_email.py | rajveer10092/kushs-utils-tool | 4aa8fa5535f90d6bbb2bf6ecbbb1b708d490c99c | [
"MIT"
] | null | null | null | '''
Config example:
{
"subject" : "Daily backup",
"body" : "This is a daily database backup",
"sender_email" : "sender@gmail.com",
"receiver_email" : "receiver@gmail.com",
"password" : "supersecretpassword",
"smtp_server" : "smtp.gmail.com",
"smtp_host" : 465,
"dbname" : "d... | 28.40625 | 94 | 0.694169 | '''
Config example:
{
"subject" : "Daily backup",
"body" : "This is a daily database backup",
"sender_email" : "sender@gmail.com",
"receiver_email" : "receiver@gmail.com",
"password" : "supersecretpassword",
"smtp_server" : "smtp.gmail.com",
"smtp_host" : 465,
"dbname" : "d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 |
94c757d0d32e122e74892e29195ffbc36204cd83 | 2,146 | py | Python | solutions/linked_list.py | edab/DSA_Quick_Reference | 827a7d3331d9224e8bb21feb9151a89fc637a649 | [
"MIT"
] | 3 | 2021-02-15T15:59:51.000Z | 2021-05-02T16:52:17.000Z | solutions/linked_list.py | edab/DSA_Quick_Reference | 827a7d3331d9224e8bb21feb9151a89fc637a649 | [
"MIT"
] | null | null | null | solutions/linked_list.py | edab/DSA_Quick_Reference | 827a7d3331d9224e8bb21feb9151a89fc637a649 | [
"MIT"
] | 1 | 2021-06-28T08:50:42.000Z | 2021-06-28T08:50:42.000Z |
# Test Case
linked_list = LinkedList([5, 7, -1, 0.9, 71])
print("Linked List tests:")
print (" Initialization: " + "Pass" if (linked_list.to_list() == [5, 7, -1, 0.9, 71]) else "Fail")
linked_list.delete(-1)
print (" Delete: " + "Pass" if (linked_list.to_list() == [5, 7, 0.9, 71]) else "Fail")
print (" ... | 25.547619 | 99 | 0.501864 | class Node:
def __init__(self, value):
self.value = value
self.next = None
class LinkedList:
def __init__(self, values = []):
self.head = None
for value in values:
self.append(value)
def append(self, value):
if self.head is None:
... | 0 | 0 | 0 | 1,433 | 0 | 0 | 0 | 0 | 45 |
a2dbadb5c4a33ec0249abadd5a724abedcbc2115 | 2,973 | py | Python | core/tests/test_utils/test_memoize.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_utils/test_memoize.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_utils/test_memoize.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 33.033333 | 74 | 0.644467 | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 0 | 282 | 0 | 1,970 | 0 | 0 | 0 | 47 | 69 |
0792080b49482a1ae7df25e8bab51bd1a5b856d0 | 3,284 | py | Python | tests/hazmat/primitives/test_hmac_vectors.py | glyph/cryptography | 43cf688e885668198bc966b1cf3a4a425a60f1a6 | [
"Apache-2.0"
] | null | null | null | tests/hazmat/primitives/test_hmac_vectors.py | glyph/cryptography | 43cf688e885668198bc966b1cf3a4a425a60f1a6 | [
"Apache-2.0"
] | 4 | 2021-03-22T02:00:19.000Z | 2021-04-07T07:40:19.000Z | tests/hazmat/primitives/test_hmac_vectors.py | majacQ/cryptography | add8bec357f09aba6609af16577111addec07ef7 | [
"Apache-2.0"
] | null | null | null | # 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... | 24.507463 | 71 | 0.661084 | # 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... | 0 | 2,361 | 0 | 0 | 0 | 0 | 0 | 53 | 252 |
bf04c9460b8d03db1ed049ee58129c4bd712daa5 | 1,723 | py | Python | Best_time_to_sale_stocks.py | minami2k/Leetcode-Hard-Problems_Hacktoberfest2021 | a2e07bb2c8ab665e74186085eeff95fe845ae102 | [
"MIT"
] | null | null | null | Best_time_to_sale_stocks.py | minami2k/Leetcode-Hard-Problems_Hacktoberfest2021 | a2e07bb2c8ab665e74186085eeff95fe845ae102 | [
"MIT"
] | 9 | 2021-10-01T14:53:32.000Z | 2021-10-19T16:24:58.000Z | Best_time_to_sale_stocks.py | minami2k/Leetcode-Hard-Problems_Hacktoberfest2021 | a2e07bb2c8ab665e74186085eeff95fe845ae102 | [
"MIT"
] | 3 | 2021-10-01T14:41:21.000Z | 2021-10-21T04:32:11.000Z | # https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
# 123. Best Time to Buy and Sell Stock III(Hard) Solution
# Say you have an array for which the ith element is the price of a given stock on day i.
# Design an algorithm to find the maximum profit. You may complete at most two transactions.
# Note: ... | 42.02439 | 156 | 0.59083 | # https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
# 123. Best Time to Buy and Sell Stock III(Hard) Solution
# Say you have an array for which the ith element is the price of a given stock on day i.
# Design an algorithm to find the maximum profit. You may complete at most two transactions.
# Note: ... | 0 | 0 | 0 | 1,154 | 0 | 0 | 0 | 0 | 23 |
a7a936b4a95c632e4145978a6ba86b5ca3ef790e | 2,372 | py | Python | unittests/pep8_tester.py | RoyVorster/pygccxml | f487b1e26e88d521d623e6a587510b322f7d3dc7 | [
"BSL-1.0"
] | null | null | null | unittests/pep8_tester.py | RoyVorster/pygccxml | f487b1e26e88d521d623e6a587510b322f7d3dc7 | [
"BSL-1.0"
] | null | null | null | unittests/pep8_tester.py | RoyVorster/pygccxml | f487b1e26e88d521d623e6a587510b322f7d3dc7 | [
"BSL-1.0"
] | null | null | null | # Copyright 2014-2017 Insight Software Consortium.
# Copyright 2004-2009 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
if __name__ == "__main__":
run_suite()
| 24.968421 | 67 | 0.618887 | # Copyright 2014-2017 Insight Software Consortium.
# Copyright 2004-2009 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
import os
import pycodestyle
import unittest
import fnmatch
class Test(unittest.TestCase):
def test_pep8_conformance_u... | 0 | 0 | 0 | 1,852 | 0 | 148 | 0 | -28 | 158 |
9f5bd35d209281a93fb7f14a5c6f9d3ca1e40ff6 | 8,650 | py | Python | pybind/dnszone.py | RhubarbSin/PyBIND | f7a79891c867296b988fa48f10eeab853bf76ea5 | [
"MIT"
] | 1 | 2017-10-19T21:14:47.000Z | 2017-10-19T21:14:47.000Z | pybind/dnszone.py | RhubarbSin/PyBIND | f7a79891c867296b988fa48f10eeab853bf76ea5 | [
"MIT"
] | null | null | null | pybind/dnszone.py | RhubarbSin/PyBIND | f7a79891c867296b988fa48f10eeab853bf76ea5 | [
"MIT"
] | null | null | null | """Classes for creating DNS zones and writing corresponding zone
files.
No validation is done here (e.g. requiring a SOA record) because this
module may be used to create fragments of zone files to be used via an
$INCLUDE directive. Users of this module are encouraged to employ an
external validation process like name... | 32.156134 | 78 | 0.591908 | """Classes for creating DNS zones and writing corresponding zone
files.
No validation is done here (e.g. requiring a SOA record) because this
module may be used to create fragments of zone files to be used via an
$INCLUDE directive. Users of this module are encouraged to employ an
external validation process like name... | 0 | 0 | 0 | 6,107 | 0 | 0 | 0 | 0 | 69 |
cecf44fdd12e84203872fbc2f54875dcae0381cb | 4,237 | py | Python | neutron/tests/post_mortem_debug.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 1,080 | 2015-01-04T08:35:00.000Z | 2022-03-27T09:15:52.000Z | neutron/tests/post_mortem_debug.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 24 | 2015-02-21T01:48:28.000Z | 2021-11-26T02:38:56.000Z | neutron/tests/post_mortem_debug.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 1,241 | 2015-01-02T10:47:10.000Z | 2022-03-27T09:42:23.000Z | # Copyright 2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 34.447154 | 77 | 0.700024 | # Copyright 2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 0 | 178 | 0 | 560 | 0 | 516 | 0 | -5 | 92 |
b4ba41b6af9e6568e2480af0e806191cf77a6ce4 | 8,931 | py | Python | Gan/model_train.py | caiyueliang/CarClassification | a8d8051085c4e66ed3ed67e56360a515c9762cd5 | [
"Apache-2.0"
] | null | null | null | Gan/model_train.py | caiyueliang/CarClassification | a8d8051085c4e66ed3ed67e56360a515c9762cd5 | [
"Apache-2.0"
] | null | null | null | Gan/model_train.py | caiyueliang/CarClassification | a8d8051085c4e66ed3ed67e56360a515c9762cd5 | [
"Apache-2.0"
] | null | null | null | # encoding:utf-8
import torch.optim as optim
| 39.517699 | 118 | 0.543836 | # encoding:utf-8
import os
import torch
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torchvision import transforms as T
from torchvision.datasets import ImageFolder
from torch.autograd import Variable
from torch.utils.data import DataLoader
from models.discriminator import Discrim... | 363 | 0 | 0 | 8,393 | 0 | 0 | 0 | 83 | 287 |
d57c78c5712e626d8da772be2f1481071b3a0059 | 1,572 | py | Python | Demo-PyQt5/LoginPage.py | siddarth-patil/Demo-PyQt5 | dafebb4ce7f58cf0d2d22452f829d633b4256649 | [
"Apache-2.0"
] | null | null | null | Demo-PyQt5/LoginPage.py | siddarth-patil/Demo-PyQt5 | dafebb4ce7f58cf0d2d22452f829d633b4256649 | [
"Apache-2.0"
] | null | null | null | Demo-PyQt5/LoginPage.py | siddarth-patil/Demo-PyQt5 | dafebb4ce7f58cf0d2d22452f829d633b4256649 | [
"Apache-2.0"
] | null | null | null | import sys
from PyQt5.QtWidgets import (QApplication)
if __name__ == '__main__':
app = QApplication(sys.argv)
form = LoginForm()
form.show()
sys.exit(app.exec_())
| 30.823529 | 109 | 0.638041 | import sys
from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton, QLabel, QLineEdit, QGridLayout, QMessageBox)
class LoginForm(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle('LoginForm')
self.resize(800, 600)
layout = QGridLayout()
label_na... | 0 | 0 | 0 | 1,298 | 0 | 0 | 0 | 67 | 23 |
f9692728e6609a0c475bcb9dbdfe6023b5335b83 | 1,077 | py | Python | src/tests/tests_util.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | 7 | 2020-06-12T21:52:18.000Z | 2022-03-24T14:28:01.000Z | src/tests/tests_util.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | null | null | null | src/tests/tests_util.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | 3 | 2018-01-01T09:46:18.000Z | 2021-06-16T07:09:26.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 24.477273 | 84 | 0.553389 | import unittest
import random
import math
from pynsga3 import utils
def _binomial(n, k):
if k > n:
return 0
prod = 1
for i in range(k + 1, n + 1):
prod *= i
return prod // math.factorial(n - k)
class TestStools(unittest.TestCase):
def test_random_clip(self):
value = 0.5... | 0 | 0 | 0 | 766 | 0 | 136 | 0 | -14 | 113 |
e9c4fb58a56f125b55d2485c0870f6d4d812e1ba | 331 | py | Python | IQDMPDF/_version.py | IQDM/IQDM-PDF | 8f4f04bfa93a76bca8d54706db24f2ab5c516f3e | [
"MIT"
] | 5 | 2020-11-23T18:53:01.000Z | 2022-03-29T11:09:25.000Z | IQDMPDF/_version.py | IQDM/IQDM-PDF | 8f4f04bfa93a76bca8d54706db24f2ab5c516f3e | [
"MIT"
] | 22 | 2020-11-23T18:47:57.000Z | 2021-03-15T02:51:32.000Z | IQDMPDF/_version.py | IQDM/IQDM-PDF | 8f4f04bfa93a76bca8d54706db24f2ab5c516f3e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# _version.py
"""Package initialization for IQDM-PDF."""
# Copyright (c) 2021 Dan Cutright
# This file is part of IQDM-PDF, released under a MIT license.
# See the file LICENSE included with this distribution
__author__ = "Dan Cutright"
__version__ = "0.3.0"
__release__... | 27.583333 | 62 | 0.700906 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# _version.py
"""Package initialization for IQDM-PDF."""
# Copyright (c) 2021 Dan Cutright
# This file is part of IQDM-PDF, released under a MIT license.
# See the file LICENSE included with this distribution
__author__ = "Dan Cutright"
__version__ = "0.3.0"
__release__... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e248c9ff1113bd0055fa732947d0d07c8f4c8fbe | 1,297 | py | Python | test_grad/test2_01_FullyConnectedLayer_grad.py | miemie2013/ppgan | 48008d85ec6c5fa2e1469acf8507b2614fa550cc | [
"Apache-2.0"
] | null | null | null | test_grad/test2_01_FullyConnectedLayer_grad.py | miemie2013/ppgan | 48008d85ec6c5fa2e1469acf8507b2614fa550cc | [
"Apache-2.0"
] | null | null | null | test_grad/test2_01_FullyConnectedLayer_grad.py | miemie2013/ppgan | 48008d85ec6c5fa2e1469acf8507b2614fa550cc | [
"Apache-2.0"
] | 1 | 2022-01-19T03:01:13.000Z | 2022-01-19T03:01:13.000Z |
import torch
import numpy as np
from training.networks import FullyConnectedLayer
batch_size = 2
in_channels = 512
w_dim = 512
lr = 0.1
# activation = 'linear'
# activation = 'lrelu'
# activation = 'relu'
# activation = 'tanh'
activation = 'sigmoid'
# activation = 'elu'
# activation = 'selu'
# activation = 'softplus... | 27.020833 | 116 | 0.701619 |
import torch
import numpy as np
from training.networks import FullyConnectedLayer
batch_size = 2
in_channels = 512
w_dim = 512
lr = 0.1
# activation = 'linear'
# activation = 'lrelu'
# activation = 'relu'
# activation = 'tanh'
activation = 'sigmoid'
# activation = 'elu'
# activation = 'selu'
# activation = 'softplus... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
52b29f44b7e7da2fd2487ff5347c8cb6b6b83c43 | 1,668 | py | Python | ui/home.py | Slavkata/Edge-Computing-Interpretation | aeb8d19c7a2337b92973dd4097c30d07606a3f4f | [
"MIT"
] | 1 | 2019-04-11T12:48:43.000Z | 2019-04-11T12:48:43.000Z | ui/home.py | Slavkata/Edge-Computing-Interpretation | aeb8d19c7a2337b92973dd4097c30d07606a3f4f | [
"MIT"
] | null | null | null | ui/home.py | Slavkata/Edge-Computing-Interpretation | aeb8d19c7a2337b92973dd4097c30d07606a3f4f | [
"MIT"
] | null | null | null | from appJar import gui
import paho.mqtt.client as mqtt
# sys.path.insert(0, '/home/nikolatz/Edge-Computing-Interpretation/mainNode')
# from main_node import runMain
app = gui()
app.setBg("DarkKhaki")
app.startPagedWindow("Welcome to projecto")
app.startPage()
app.addLabel("w1", "You have to choose two files")
app.st... | 25.661538 | 77 | 0.688249 | from appJar import gui
import paho.mqtt.client as mqtt
import sys
# sys.path.insert(0, '/home/nikolatz/Edge-Computing-Interpretation/mainNode')
# from main_node import runMain
def press(button) :
if button=="Send the work":
# result = 1 runMain(app.getEntry("f1"), app.getEntry("f2"))
client.publish(... | 0 | 0 | 0 | 0 | 0 | 526 | 0 | -11 | 90 |
e55669a6e325a0accc5ed6899f58c0c901c3f7f1 | 439 | py | Python | open/core/migrations/0017_supplement_is_taken_with_food.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 105 | 2019-06-01T08:34:47.000Z | 2022-03-15T11:48:36.000Z | open/core/migrations/0017_supplement_is_taken_with_food.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 111 | 2019-06-04T15:34:14.000Z | 2022-03-12T21:03:20.000Z | open/core/migrations/0017_supplement_is_taken_with_food.py | lawrendran/open | d136f694bafab647722c78be6f39ec79d589f774 | [
"MIT"
] | 26 | 2019-09-04T06:06:12.000Z | 2022-01-03T03:40:11.000Z | # Generated by Django 2.2.13 on 2020-08-02 01:23
| 23.105263 | 75 | 0.633257 | # Generated by Django 2.2.13 on 2020-08-02 01:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0016_null_duration_minutes_activity_log"),
]
operations = [
migrations.AddField(
model_name="supplement",
n... | 0 | 0 | 0 | 324 | 0 | 0 | 0 | 19 | 46 |
ae39fac9b810ad342923a39a7caff32041209efb | 1,004 | py | Python | classifier.py | riccardocadei/GraphML-Contest-2019-Oracle-PoliMI | d7d4ce1d91298e7e7f71138bc82836687c80c5b4 | [
"MIT"
] | 1 | 2019-04-06T00:27:55.000Z | 2019-04-06T00:27:55.000Z | classifier.py | RiccardoCadei/oracle-ml-contest | d7d4ce1d91298e7e7f71138bc82836687c80c5b4 | [
"MIT"
] | null | null | null | classifier.py | RiccardoCadei/oracle-ml-contest | d7d4ce1d91298e7e7f71138bc82836687c80c5b4 | [
"MIT"
] | 2 | 2021-04-30T06:08:06.000Z | 2022-01-13T07:29:22.000Z |
# CROSS-VALIDATION ACCURACY
# TRAINING ACCURACY AND PREDICTION
| 33.466667 | 99 | 0.747012 | import utils
import numpy as np
from sklearn.multiclass import OneVsRestClassifier
from sklearn.model_selection import KFold, cross_val_score
from sklearn.linear_model import SGDClassifier,LogisticRegression
# CROSS-VALIDATION ACCURACY
def validation_accuracy(X, labels):
kfolds = KFold(n_splits=10)
sgd = SGD... | 0 | 0 | 0 | 0 | 0 | 682 | 0 | 98 | 156 |
e1d1bd72a4aeaa39f3e1afbd64fac6a335a37791 | 4,108 | py | Python | NVIDIAFastPhotoStyle/photo_smooth.py | sleebapaul/AuriaKathi | d1705fc7e0919fd0a9e9f87a2593a9f7319886cf | [
"MIT"
] | 9 | 2019-12-31T15:53:33.000Z | 2021-05-06T06:36:22.000Z | NVIDIAFastPhotoStyle/photo_smooth.py | sleebapaul/AuriaKathi | d1705fc7e0919fd0a9e9f87a2593a9f7319886cf | [
"MIT"
] | null | null | null | NVIDIAFastPhotoStyle/photo_smooth.py | sleebapaul/AuriaKathi | d1705fc7e0919fd0a9e9f87a2593a9f7319886cf | [
"MIT"
] | 2 | 2020-01-01T05:03:24.000Z | 2020-01-03T13:07:26.000Z | """
Copyright (C) 2018 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
"""
from __future__ import division
import torch.nn as nn
import scipy.misc
import scipy.sparse
| 41.494949 | 126 | 0.564752 | """
Copyright (C) 2018 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
"""
from __future__ import division
import torch.nn as nn
import scipy.misc
import numpy as np
import scipy.sparse
import scipy.sparse.linalg
from ... | 0 | 0 | 0 | 3,701 | 0 | 0 | 0 | 27 | 111 |
1d58ad51679c5a42cb413e0300ea892304b4c1c0 | 7,912 | py | Python | drforest/dimension_reduction/save.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | 2 | 2021-09-22T12:15:43.000Z | 2022-01-04T12:59:50.000Z | drforest/dimension_reduction/save.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | null | null | null | drforest/dimension_reduction/save.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | null | null | null | import scipy.linalg as linalg
__all__ = ['SlicedAverageVarianceEstimation']
| 36.62963 | 79 | 0.630056 | import warnings
import numpy as np
import scipy.linalg as linalg
from scipy import sparse
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.preprocessing import normalize
from sklearn.utils import check_array, check_X_y
from sklearn.utils.validation import check_is_fitted
from .slices import slic... | 0 | 0 | 0 | 7,500 | 0 | 0 | 0 | 131 | 202 |
61fd127eb16632bfe4be2372eb543f29cdbd30ec | 1,811 | py | Python | main.py | nullpos/nicolive-reserve-calendar | 266bc9d4c05b9b6a140cdca84bf4418944736341 | [
"MIT"
] | null | null | null | main.py | nullpos/nicolive-reserve-calendar | 266bc9d4c05b9b6a140cdca84bf4418944736341 | [
"MIT"
] | 1 | 2016-02-28T11:48:48.000Z | 2016-02-28T11:48:48.000Z | main.py | nullpos/nicolive-reserve-calendar | 266bc9d4c05b9b6a140cdca84bf4418944736341 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
import re
import sys
import ConfigParser
from util.live import Live
from util.google import Google
CONFIG_PATH = os.path.dirname(os.path.abspath(__file__)) + '/config'
CONFIG_SAMPLE_FILE = CONFIG_PATH + '.sample'
LIVE_BASE_URL = 'http://live.nicovideo.jp/watch/'
if __name__ == '__main__':... | 25.871429 | 68 | 0.579238 | # coding: utf-8
import os
import re
import sys
import ConfigParser
from util.live import Live
from util.google import Google
CONFIG_PATH = os.path.dirname(os.path.abspath(__file__)) + '/config'
CONFIG_SAMPLE_FILE = CONFIG_PATH + '.sample'
LIVE_BASE_URL = 'http://live.nicovideo.jp/watch/'
class Main(object):
def ... | 0 | 0 | 0 | 1,222 | 0 | 0 | 0 | 0 | 23 |
3ad7e3174f8fb75f0e120b935beca591ccc8a40b | 114 | py | Python | etc/mayan/settings.py | KingJ/mayan-edms | cd7f530c8d17e3f11da51692b28b68f585d082b1 | [
"MIT"
] | null | null | null | etc/mayan/settings.py | KingJ/mayan-edms | cd7f530c8d17e3f11da51692b28b68f585d082b1 | [
"MIT"
] | null | null | null | etc/mayan/settings.py | KingJ/mayan-edms | cd7f530c8d17e3f11da51692b28b68f585d082b1 | [
"MIT"
] | null | null | null | ALLOWED_HOSTS = ['*']
BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
| 22.8 | 50 | 0.666667 | ALLOWED_HOSTS = ['*']
BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9178a63c7969278a4d756bab503a3bcb18c7f766 | 10,924 | py | Python | imgurtofolder/imgur_downloader.py | santosderek/Imgur-To-Folder | 5716cc81a9b003d1c0499388fc7561053f717aef | [
"Apache-2.0"
] | 77 | 2017-04-24T08:08:53.000Z | 2021-10-07T04:04:26.000Z | imgurtofolder/imgur_downloader.py | santosderek/Imgur-To-Folder | 5716cc81a9b003d1c0499388fc7561053f717aef | [
"Apache-2.0"
] | 12 | 2017-11-09T17:16:03.000Z | 2021-04-23T04:50:52.000Z | imgurtofolder/imgur_downloader.py | santosderek/Imgur-To-Folder | 5716cc81a9b003d1c0499388fc7561053f717aef | [
"Apache-2.0"
] | 12 | 2017-09-03T10:41:27.000Z | 2021-04-21T11:28:02.000Z | # Derek Santos
import logs
log = logs.Log('downloader')
| 41.067669 | 112 | 0.569114 | # Derek Santos
from imgur import Imgur
from pprint import pformat
from time import sleep
import json
import logs
import os
import re
import requests
import shutil
log = logs.Log('downloader')
class Imgur_Downloader(Imgur):
def __init__(self, configuration, max_favorites):
super().__init__(configuration)
... | 0 | 0 | 0 | 10,708 | 0 | 0 | 0 | -40 | 199 |
e27b17ff88d64bd474bb9a68dcd187a5f5e4661b | 383 | py | Python | essentials/pandas/pandas_5.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | essentials/pandas/pandas_5.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | essentials/pandas/pandas_5.py | iomegak12/intel-training-usecase-1 | 0d1ab6f6076f46f7fbb290ceb41d6b851da1af3a | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
data = {
'Id': [1, 2, 3, 4, 5],
'Name': ['Syed', 'Shah', 'Sunil', 'Sherif', 'Sugata'],
'Score': [100, 200, 250, 350, 275]
}
df = pd.DataFrame(
data, index=['Rank 1', 'Rank 2', 'Rank 3', 'Rank 4', 'Rank 5'])
df["Locations"] = np.array(
['Bangalore', 'New York'... | 22.529412 | 67 | 0.545692 | import pandas as pd
import numpy as np
data = {
'Id': [1, 2, 3, 4, 5],
'Name': ['Syed', 'Shah', 'Sunil', 'Sherif', 'Sugata'],
'Score': [100, 200, 250, 350, 275]
}
df = pd.DataFrame(
data, index=['Rank 1', 'Rank 2', 'Rank 3', 'Rank 4', 'Rank 5'])
df["Locations"] = np.array(
['Bangalore', 'New York'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9e9e9506c5db455cd9dc6e5c949669444b62df7b | 6,949 | py | Python | tests/testing_values.py | Gsvend20/P4-Grise_Projekt | 28e558139dd0368db2e29de3c8aa3842bad9edef | [
"MIT"
] | 2 | 2022-03-23T08:55:42.000Z | 2022-03-23T09:06:04.000Z | tests/testing_values.py | Gsvend20/P4-Grise_Projekt | 28e558139dd0368db2e29de3c8aa3842bad9edef | [
"MIT"
] | null | null | null | tests/testing_values.py | Gsvend20/P4-Grise_Projekt | 28e558139dd0368db2e29de3c8aa3842bad9edef | [
"MIT"
] | 1 | 2022-03-23T08:55:19.000Z | 2022-03-23T08:55:19.000Z | import cv2
import numpy as np
from Functions.Featurespace import find_annodir
from Functions import imgproc_func as imf
import glob
# TODO: FIX FS thresholding, GR detection
"""
ST DIN PATH TIL DIT ONE DRIVE HER -> DOWNLOAD ANNOTATIONS MAPPEN FRST
"""
# Path to folder containing the different classes
path = r'C:\User... | 46.019868 | 154 | 0.603972 | import cv2
import numpy as np
from Functions.Featurespace import find_annodir
from Functions import imgproc_func as imf
import glob
# TODO: FIX FS thresholding, GR detection
"""
SÆT DIN PATH TIL DIT ONE DRIVE HER -> DOWNLOAD ANNOTATIONS MAPPEN FØRST
"""
# Path to folder containing the different classes
path = r'C:\Us... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3feb4ca7030fb3e2f124726a01e7b2e2e0dc3064 | 5,568 | py | Python | survos2/frontend/plugins/plugins_components.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 4 | 2017-10-10T14:47:16.000Z | 2022-01-14T05:57:50.000Z | survos2/frontend/plugins/plugins_components.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 1 | 2022-01-11T21:11:12.000Z | 2022-01-12T08:22:34.000Z | survos2/frontend/plugins/plugins_components.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 2 | 2018-03-06T06:31:29.000Z | 2019-03-04T03:33:18.000Z |
_FeatureNotifier = PluginNotifier()
| 28.121212 | 86 | 0.616559 | import numpy as np
from loguru import logger
from scipy import ndimage
from skimage import img_as_ubyte, img_as_float
from skimage import io
from qtpy.QtWidgets import QRadioButton, QPushButton
from qtpy import QtWidgets, QtCore, QtGui
from survos2.frontend.components.base import *
from survos2.frontend.control impo... | 0 | 0 | 0 | 4,573 | 0 | 481 | 0 | 131 | 339 |
2308ebf34faedaeeb14af9f1f59d6581114c19a0 | 10,756 | py | Python | CryoMEM/run.py | SNU-HPCS/CryoModel | 07a3fbe3f3d44c7960b5aed562a90e204014eea0 | [
"MIT"
] | 2 | 2021-05-26T12:32:46.000Z | 2021-12-15T13:10:37.000Z | CryoMEM/run.py | SNU-HPCS/CryoModel | 07a3fbe3f3d44c7960b5aed562a90e204014eea0 | [
"MIT"
] | 1 | 2022-03-02T01:49:20.000Z | 2022-03-18T10:37:59.000Z | CryoMEM/run.py | SNU-HPCS/CryoModel | 07a3fbe3f3d44c7960b5aed562a90e204014eea0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.8
if __name__ == '__main__':
main()
| 72.187919 | 239 | 0.783098 | #!/usr/bin/env python3.8
from argparse import ArgumentParser
import os, pgen
from cacti import cacti
from cacti.cacti_interface_pb2 import CactiInput
def model_cache(cacti_config_file, capacity, pgen_output):
cacti_input = CactiInput ()
cacti_input.config_file = os.path.abspath(cacti_config_file)
cacti_in... | 0 | 0 | 0 | 0 | 0 | 10,474 | 0 | 37 | 181 |
ef0e72237c1885c96dcd7cbcfb8813e6f24399d7 | 219 | py | Python | algo/fizzbuzz.py | gsathya/dsalgo | 61c89ec597ced3e69bfbb438fd856c8fc5f20aba | [
"MIT"
] | 2 | 2017-02-25T04:05:29.000Z | 2018-05-10T16:54:31.000Z | algo/fizzbuzz.py | gsathya/dsalgo | 61c89ec597ced3e69bfbb438fd856c8fc5f20aba | [
"MIT"
] | null | null | null | algo/fizzbuzz.py | gsathya/dsalgo | 61c89ec597ced3e69bfbb438fd856c8fc5f20aba | [
"MIT"
] | null | null | null |
fizzbuzz()
| 16.846154 | 27 | 0.30137 | def fizzbuzz():
for i in range(1, 101):
s = ""
if i % 3 == 0:
s += "Fizz"
if i % 5 == 0:
s += "Buzz"
if s == "":
s = i
print s
fizzbuzz()
| 0 | 0 | 0 | 0 | 0 | 185 | 0 | 0 | 22 |
1e2311a60faaf10a98f1e9908e10657e12fcf455 | 2,261 | py | Python | main/run.py | EverLookNeverSee/MFEWGANs | 56e480432370bbb4fdc7723ee7c2306d4239c7fc | [
"MIT"
] | null | null | null | main/run.py | EverLookNeverSee/MFEWGANs | 56e480432370bbb4fdc7723ee7c2306d4239c7fc | [
"MIT"
] | null | null | null | main/run.py | EverLookNeverSee/MFEWGANs | 56e480432370bbb4fdc7723ee7c2306d4239c7fc | [
"MIT"
] | null | null | null | from torch import nn, optim, ones, randn, zeros, cat
from generator import Generator
from discriminator import Discriminator
from prep import train_loader, batch_size
import matplotlib.pyplot as plt
# Setting learning rate, number of epochs and loss function
lr = 0.001
n_epochs = 300
loss_function = nn.BCELoss()
# I... | 33.746269 | 81 | 0.709863 | import torch
from torch import nn, optim, ones, randn, zeros, cat
from generator import Generator
from discriminator import Discriminator
from prep import train_loader, batch_size
import matplotlib.pyplot as plt
# Setting learning rate, number of epochs and loss function
lr = 0.001
n_epochs = 300
loss_function = nn.B... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 22 |
18ee4dedc3c8017c3845ee9f1b64b07f56693f60 | 1,871 | py | Python | geolocation/entrypoint.py | summa-platform/summa-ui-stack | 5c7875efb15b5bf23bc0175da39a8e680cf55c89 | [
"MIT"
] | null | null | null | geolocation/entrypoint.py | summa-platform/summa-ui-stack | 5c7875efb15b5bf23bc0175da39a8e680cf55c89 | [
"MIT"
] | null | null | null | geolocation/entrypoint.py | summa-platform/summa-ui-stack | 5c7875efb15b5bf23bc0175da39a8e680cf55c89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os, traceback
import asyncio
from service import load_config, run as service
server_proc = None
server_cmd = os.path.join(os.path.dirname(__file__), 'server.sh')
server_name = 'twofishes'
service_name = 'Geolocation'
if __name__ == "__main__":
import argparse
parser = ... | 28.784615 | 153 | 0.719936 | #!/usr/bin/env python3
import os, sys, traceback
import signal
import asyncio
from asyncio.subprocess import create_subprocess_exec, PIPE
import aiohttp
from service import load_config, run as service
server_proc = None
server_cmd = os.path.join(os.path.dirname(__file__), 'server.sh')
server_name = 'twofishes'
s... | 0 | 0 | 633 | 0 | 0 | 48 | 0 | 28 | 113 |
74d2dbb5550d360a8187475b772c1c7a03264372 | 270 | py | Python | lcd/I2C_LCD1602/test.py | ianhom/mpy-lib | a3a103840e52251b54d31b3e4a1afc85b9976718 | [
"MIT"
] | 1 | 2019-03-19T13:40:47.000Z | 2019-03-19T13:40:47.000Z | lcd/I2C_LCD1602/test.py | ianhom/mpy-lib | a3a103840e52251b54d31b3e4a1afc85b9976718 | [
"MIT"
] | null | null | null | lcd/I2C_LCD1602/test.py | ianhom/mpy-lib | a3a103840e52251b54d31b3e4a1afc85b9976718 | [
"MIT"
] | 1 | 2020-07-04T09:01:08.000Z | 2020-07-04T09:01:08.000Z | '''
I2C LCD1602 demo
Author: shaoziyang
Date: 2018.2
http://www.micropython.org.cn
'''
from machine import I2C
import time
l = LCD1620(I2C(1))
l.puts("Hello microbit!")
n = 0
while 1:
l.puts(str(n), 0, 1)
n = n + 1
time.sleep_ms(1000)
| 12.857143 | 33 | 0.592593 | '''
I2C LCD1602 demo
Author: shaoziyang
Date: 2018.2
http://www.micropython.org.cn
'''
from machine import I2C
import time
l = LCD1620(I2C(1))
l.puts("Hello microbit!")
n = 0
while 1:
l.puts(str(n), 0, 1)
n = n + 1
time.sleep_ms(1000)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7bc905097f5ce9d25b6d011a2b1daedcbaa2eb6c | 800 | py | Python | src/cli.py | eycjur/python_project_template | a083f7c3eb1b400b92a0d0a63f15d89c5bcacfd5 | [
"MIT"
] | null | null | null | src/cli.py | eycjur/python_project_template | a083f7c3eb1b400b92a0d0a63f15d89c5bcacfd5 | [
"MIT"
] | 1 | 2022-02-14T17:05:17.000Z | 2022-02-18T21:57:23.000Z | src/cli.py | eycjur/python_project_template | a083f7c3eb1b400b92a0d0a63f15d89c5bcacfd5 | [
"MIT"
] | null | null | null | """pythonCLI
See Also:
- `typer`_
.. _typer: https://qiita.com/iisaka51/items/18bde4dada0827fbe81e
Example:
>>> `python cli.py --help`
>>> `python cli.py [command] --help`
Attention:
_-
"""
import typer
app = typer.Typer()
typer_click_object = typer.main.get_command(app)
| 15.384615 | 76 | 0.64125 | """各種pythonファイルをコマンドラインから利用するためのCLIツール
See Also:
- `typer`_
.. _typer: https://qiita.com/iisaka51/items/18bde4dada0827fbe81e
Example:
ヘルプ
>>> `python cli.py --help`
サブコマンドのヘルプ
>>> `python cli.py [command] --help`
Attention:
_は-で実行する
"""
from typing import Optional
import typer
from... | 177 | 235 | 0 | 0 | 0 | 23 | 0 | 22 | 145 |
7f4aa1aba6fb6250fd280920aef36bc8c844c35b | 881 | py | Python | src/steps/get_pig_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 2 | 2019-08-16T00:49:27.000Z | 2021-08-15T16:37:45.000Z | src/steps/get_pig_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 1 | 2020-02-19T10:17:56.000Z | 2020-07-26T09:42:49.000Z | src/steps/get_pig_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 1 | 2019-06-27T10:57:07.000Z | 2019-06-27T10:57:07.000Z | '''Defines a pipeline step which aquires data from the pig data source.
'''
| 24.472222 | 75 | 0.570942 | '''Defines a pipeline step which aquires data from the pig data source.
'''
import os
from src import datasets
from src.step import Step
class GetPigData(Step):
'''Defines a pipeline step which aquires data from the pig data source.
'''
def __init__(self):
'''Initializes a new instance of the ... | 0 | 0 | 0 | 718 | 0 | 0 | 0 | -5 | 91 |