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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
262886adcc01af84daeb1c3914ef518c55764645 | 4,306 | py | Python | experiments/genuary2022/g22_18_three_colors.py | brendanhowell/cursor | 81ac2e1e80f0a3ca56208b9498026fca147e7e0b | [
"MIT"
] | 3 | 2021-12-02T08:30:02.000Z | 2022-03-06T18:25:15.000Z | experiments/genuary2022/g22_18_three_colors.py | brendanhowell/cursor | 81ac2e1e80f0a3ca56208b9498026fca147e7e0b | [
"MIT"
] | 41 | 2020-03-22T13:15:04.000Z | 2022-03-17T11:29:47.000Z | experiments/genuary2022/g22_18_three_colors.py | brendanhowell/cursor | 81ac2e1e80f0a3ca56208b9498026fca147e7e0b | [
"MIT"
] | 2 | 2020-01-09T16:35:14.000Z | 2022-02-28T15:21:08.000Z | from cursor import device
from cursor import path
from cursor import filter
import json
import random
if __name__ == "__main__":
# recordings = data.DataDirHandler().recordings()
# _loader = loader.Loader(directory=recordings, limit_files=1)
# pc = _loader.all_paths()
categories = ["broccoli"]
... | 26.9125 | 75 | 0.535067 | from cursor import device
from cursor import path
from cursor import filter
import json
import random
from alive_progress import alive_bar
def file_to_paths(pc, file, pen):
# pc = path.PathCollection()
counter = 0
contours = len(file)
with alive_bar(contours) as bar:
for d in file:
... | 12 | 0 | 0 | 0 | 0 | 1,440 | 0 | 15 | 91 |
a8b8f5f77a13be50cbe08a59910194e0f91218c2 | 10,402 | py | Python | bridge/reports/api.py | kirillyat/klever | 259cc1345df91a47bc028f813613f063a8465429 | [
"Apache-2.0"
] | 16 | 2018-07-14T15:37:02.000Z | 2020-07-11T14:26:59.000Z | bridge/reports/api.py | kirillyat/klever | 259cc1345df91a47bc028f813613f063a8465429 | [
"Apache-2.0"
] | 2 | 2019-10-28T22:32:31.000Z | 2020-04-24T09:24:20.000Z | bridge/reports/api.py | kirillyat/klever | 259cc1345df91a47bc028f813613f063a8465429 | [
"Apache-2.0"
] | 10 | 2018-11-09T12:54:15.000Z | 2021-10-31T17:01:39.000Z | #
# Copyright (c) 2019 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# h... | 41.7751 | 118 | 0.720631 | #
# Copyright (c) 2019 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# h... | 0 | 0 | 0 | 8,150 | 0 | 0 | 0 | 770 | 788 |
a16a7194509c82a7338ecbe47074922218592c9f | 7,290 | py | Python | test/system/spor/TEST_SETUP_IBOFOS.py | mjlee34/poseidonos | 8eff75c5ba7af8090d3ff4ac51d7507b37571f9b | [
"BSD-3-Clause"
] | null | null | null | test/system/spor/TEST_SETUP_IBOFOS.py | mjlee34/poseidonos | 8eff75c5ba7af8090d3ff4ac51d7507b37571f9b | [
"BSD-3-Clause"
] | null | null | null | test/system/spor/TEST_SETUP_IBOFOS.py | mjlee34/poseidonos | 8eff75c5ba7af8090d3ff4ac51d7507b37571f9b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append("../lib/")
sys.path.append("../io_path/")
######################################################################################
isIbofExecuted = False
###################################################################################### | 28.928571 | 94 | 0.636763 | #!/usr/bin/env python3
import sys
import os
sys.path.append("../lib/")
sys.path.append("../io_path/")
from datetime import datetime
import subprocess
import psutil
import signal
import ibofos
import ibofos_constant
import cli
import json_parser
import spdk_rpc
import TEST
import TEST_LOG
import TEST_DEBUGGING
##... | 0 | 0 | 0 | 0 | 0 | 6,312 | 0 | -67 | 754 |
a9dab8cb0f57b955e3c25b848195b52dae370afa | 9,813 | py | Python | packages/weevely/core/sessions.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/weevely/core/sessions.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/weevely/core/sessions.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null |
print_filters = (
'debug',
'channel',
'proxy'
)
set_filters = (
'debug',
'channel',
'proxy'
)
| 34.797872 | 113 | 0.577194 | from core import messages
from core.weexceptions import FatalException
from mako import template
from core.config import sessions_path, sessions_ext
from core.loggers import log, dlog, stream_handler
from core.module import Status
import os
import yaml
import glob
import logging
import urllib.parse
import atexit
import... | 0 | 0 | 0 | 9,282 | 0 | 0 | 0 | 31 | 377 |
fa002bfe13556a00e4ff52f32db39103163dee80 | 2,804 | py | Python | django/apps/stories/tasks.py | Haakenlid/tassen | 911a2541c77eca522ba5a723f175786f4f9eb481 | [
"Apache-2.0"
] | 16 | 2017-03-21T03:53:37.000Z | 2021-08-14T06:28:02.000Z | django/apps/stories/tasks.py | universitas/universitas.no | 911a2541c77eca522ba5a723f175786f4f9eb481 | [
"Apache-2.0"
] | 104 | 2017-03-25T00:12:46.000Z | 2021-03-09T22:40:58.000Z | django/apps/stories/tasks.py | Haakenlid/tassen | 911a2541c77eca522ba5a723f175786f4f9eb481 | [
"Apache-2.0"
] | 6 | 2017-03-21T03:53:40.000Z | 2020-06-07T14:15:38.000Z | """Celery tasks for stories"""
from datetime import timedelta
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
# cron timing
UPDATE_SEARCH = timedelta(hours=1)
DEVALUE_HOTNESS = timedelta(hours=1)
PERSIST_STORY_VISITS = timedelta(minutes=10)
| 31.863636 | 77 | 0.71933 | """Celery tasks for stories"""
from datetime import timedelta
from pathlib import Path
import re
from celery import shared_task
from celery.schedules import crontab
from celery.task import periodic_task
from celery.utils.log import get_task_logger
from django.core.cache import cache
from django.db.models import F, Q
... | 0 | 2,033 | 0 | 0 | 0 | 0 | 0 | 130 | 360 |
4254991f0d4b86f2f9481ccbdf116a54aa194a6e | 8,497 | py | Python | editor.py | tamamu/book-diy-programmer | 633b2f7fb2a7e3b93f3e6189632265aac8f41e46 | [
"MIT"
] | null | null | null | editor.py | tamamu/book-diy-programmer | 633b2f7fb2a7e3b93f3e6189632265aac8f41e46 | [
"MIT"
] | null | null | null | editor.py | tamamu/book-diy-programmer | 633b2f7fb2a7e3b93f3e6189632265aac8f41e46 | [
"MIT"
] | null | null | null | import sys
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GtkSource', '3.0')
MENU_XML = """
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="menubar">
<submenu>
<attribute name="label" translatable="yes"></attribute>
<section>
<item>
<attribute name="act... | 35.11157 | 81 | 0.520772 | import os
import sys
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GtkSource', '3.0')
from gi.repository import Gtk, GtkSource, GLib, Gio
MENU_XML = """
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="menubar">
<submenu>
<attribute name="label" translatable="yes">ファイル</attrib... | 144 | 0 | 0 | 7,074 | 0 | 0 | 0 | 18 | 90 |
f1c0d202de7130442038d6457092588a7e69a17a | 67,568 | py | Python | build/lib/dinuq/sdu.py | AliYoussef96/dinuq | 3bef82cf36f40c9e6f3a65722a592dde7e78de0c | [
"MIT"
] | 11 | 2020-07-07T12:37:06.000Z | 2022-03-24T15:49:06.000Z | build/lib/dinuq/sdu.py | AliYoussef96/dinuq | 3bef82cf36f40c9e6f3a65722a592dde7e78de0c | [
"MIT"
] | 4 | 2020-03-18T19:34:51.000Z | 2020-10-30T11:32:07.000Z | build/lib/dinuq/sdu.py | AliYoussef96/dinuq | 3bef82cf36f40c9e6f3a65722a592dde7e78de0c | [
"MIT"
] | 2 | 2020-03-27T10:11:32.000Z | 2022-03-23T13:11:50.000Z |
###########################################################
################### SDU ###################
###########################################################
###########################################################
################### RSDU ##################
#################... | 55.383607 | 1,978 | 0.451323 | from Bio import SeqIO
from Bio.Seq import Seq
import random
import math
###########################################################
################### SDU ###################
###########################################################
###########################################################
#####... | 0 | 0 | 0 | 0 | 0 | 40,379 | 0 | -16 | 162 |
4bd03d594203db010ddd17f572d8dc060ebf8619 | 637 | py | Python | useful scripts/cleanLyrics.py | ogasule/Reggae-Lyric-Composer | e148b6d9f2c99e31aaf91c606c29b716451a6a47 | [
"MIT"
] | 1 | 2020-10-11T14:30:48.000Z | 2020-10-11T14:30:48.000Z | useful scripts/cleanLyrics.py | ogasule/Reggae-Lyric-Composer | e148b6d9f2c99e31aaf91c606c29b716451a6a47 | [
"MIT"
] | null | null | null | useful scripts/cleanLyrics.py | ogasule/Reggae-Lyric-Composer | e148b6d9f2c99e31aaf91c606c29b716451a6a47 | [
"MIT"
] | null | null | null | import string
# convert text in lyrics to lower case and removes all punctuations
# e.g !"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~
with open("lyricsData.txt","x",encoding="UTF-8") as new:
with open("lyrics.txt","r") as lines:
for line in lines:
line = line.lower() # convert words to lower case
... | 39.8125 | 84 | 0.566719 | import string
# convert text in lyrics to lower case and removes all punctuations
# e.g !"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~
with open("lyricsData.txt","x",encoding="UTF-8") as new:
with open("lyrics.txt","r") as lines:
for line in lines:
line = line.lower() # convert words to lower case
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b64fb89b4f062c417260bec468caff74b7730da | 54,001 | py | Python | kuryr_kubernetes/tests/unit/controller/drivers/test_vif_pool.py | BoringWenn/kuryr-kubernetes | 625ddb0a39ab5e8752b83565e6b9689c2ab1775f | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/tests/unit/controller/drivers/test_vif_pool.py | BoringWenn/kuryr-kubernetes | 625ddb0a39ab5e8752b83565e6b9689c2ab1775f | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/tests/unit/controller/drivers/test_vif_pool.py | BoringWenn/kuryr-kubernetes | 625ddb0a39ab5e8752b83565e6b9689c2ab1775f | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.971132 | 79 | 0.614378 | # Copyright 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 0 | 50,188 | 0 | 0 | 0 | 2,414 | 0 | 324 | 494 |
d0625e4f209a7c0d728ae8df1b5626dd9b8ce0bc | 6,822 | py | Python | ev3sim/file_helper.py | LEGO-Robotics/EV3Sim | 3a194bc5de05d80ed867a4d2bb282b7a864462d5 | [
"BSD-3-Clause"
] | 11 | 2020-08-15T18:28:02.000Z | 2022-03-10T05:07:08.000Z | ev3sim/file_helper.py | LEGO-Robotics/EV3Sim | 3a194bc5de05d80ed867a4d2bb282b7a864462d5 | [
"BSD-3-Clause"
] | 153 | 2020-08-15T14:54:04.000Z | 2021-12-04T23:15:17.000Z | ev3sim/file_helper.py | LEGO-Robotics/EV3Sim | 3a194bc5de05d80ed867a4d2bb282b7a864462d5 | [
"BSD-3-Clause"
] | 13 | 2020-08-15T14:09:16.000Z | 2021-12-03T05:54:41.000Z | import os
import platform
from pathlib import Path
ROOT = os.path.abspath(os.path.dirname(__file__))
def find_platform_location(dir_type):
"""
Attempt to find and create operating system data folders
"""
if platform.system() == "Linux":
home_dir = os.path.expanduser("~")
if dir_type ... | 37.9 | 181 | 0.591029 | import os
import platform
from pathlib import Path
ROOT = os.path.abspath(os.path.dirname(__file__))
class WorkspaceError(Exception):
pass
def find_platform_location(dir_type):
"""
Attempt to find and create operating system data folders
"""
if platform.system() == "Linux":
home_dir = o... | 0 | 0 | 0 | 20 | 0 | 2,992 | 0 | 21 | 183 |
e1913f6075cfa114ad9853d9b493db7f61abd356 | 9,573 | py | Python | tests/estimators/object_detection/test_tensorflow_faster_rcnn.py | meghana-sesetti/adversarial-robustness-toolbox | 6a5ce9e4142734ad9004e5c093ef8fa754ea6b39 | [
"MIT"
] | 1 | 2021-09-09T13:19:34.000Z | 2021-09-09T13:19:34.000Z | tests/estimators/object_detection/test_tensorflow_faster_rcnn.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 33 | 2021-01-18T08:30:34.000Z | 2022-03-11T07:05:13.000Z | tests/estimators/object_detection/test_tensorflow_faster_rcnn.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 1 | 2021-09-09T13:19:35.000Z | 2021-09-09T13:19:35.000Z | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# 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
# r... | 38.292 | 120 | 0.576517 | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# 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
# r... | 0 | 7,975 | 0 | 0 | 0 | 0 | 0 | 23 | 91 |
f300933e4801c77a89a0efdc8bc0e1689d943f7a | 1,588 | py | Python | app/http/controllers/IceController.py | mlaude1/Ice-backend | cfda7c9c1994ba4c9b90dc23b954d172b0eb19f3 | [
"MIT"
] | null | null | null | app/http/controllers/IceController.py | mlaude1/Ice-backend | cfda7c9c1994ba4c9b90dc23b954d172b0eb19f3 | [
"MIT"
] | null | null | null | app/http/controllers/IceController.py | mlaude1/Ice-backend | cfda7c9c1994ba4c9b90dc23b954d172b0eb19f3 | [
"MIT"
] | null | null | null | """ A IceController Module """
| 29.407407 | 55 | 0.56927 | """ A IceController Module """
from masonite.controllers import Controller
from masonite.request import Request
from app.Ice import Ice
class IceController(Controller):
def __init__(self, request: Request):
self.request = request
def show(self):
id = self.request.param("id")
return I... | 0 | 0 | 0 | 1,428 | 0 | 0 | 0 | 39 | 90 |
169fac018b9f82b6c36fe3b963aac6cd38d506d7 | 2,134 | py | Python | azure-batch/azure/batch/models/task_information.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-batch/azure/batch/models/task_information.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-batch/azure/batch/models/task_information.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 38.8 | 115 | 0.618557 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 0 | 0 | 0 | 1,597 | 0 | 0 | 0 | 17 | 46 |
8c26951c0ef5a5f2c713c23c17b7b5d930c66cec | 943 | py | Python | 2018/day5.py | RutgerMoons/AdventOfCode | 89fc0a75199bcaa8d814ead823d22f76774c2e4a | [
"MIT"
] | null | null | null | 2018/day5.py | RutgerMoons/AdventOfCode | 89fc0a75199bcaa8d814ead823d22f76774c2e4a | [
"MIT"
] | null | null | null | 2018/day5.py | RutgerMoons/AdventOfCode | 89fc0a75199bcaa8d814ead823d22f76774c2e4a | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
with open('input/day5') as input:
polymer = list(map(lambda x: x.strip(), input.readlines()))[0]
x = polymer
x = react(x)
print("Part 1: %d" % len(x))
shortest = len(polymer)
begin = ord('a')
for i in range(26):
x = polymer
lower, upper = chr(begin + i), chr(begin + i).upper()
removed ... | 21.431818 | 63 | 0.617179 | #! /usr/bin/env python3
import re
with open('input/day5') as input:
polymer = list(map(lambda x: x.strip(), input.readlines()))[0]
def react(polymer):
found = True
while found:
found = False
for i in range(len(polymer) - 1):
c1, c2 = polymer[i], polymer[i + 1]
if c1.upper() == c2.upper() and \
(c... | 0 | 0 | 0 | 0 | 0 | 360 | 0 | -12 | 45 |
184e117a45b3435f1ecadc1182bb4f3654b585f6 | 1,273 | py | Python | utils/read_list_file.py | liaojh1998/RNW | 412764400a4a555fb8245ab51047019429d1141f | [
"MIT"
] | null | null | null | utils/read_list_file.py | liaojh1998/RNW | 412764400a4a555fb8245ab51047019429d1141f | [
"MIT"
] | null | null | null | utils/read_list_file.py | liaojh1998/RNW | 412764400a4a555fb8245ab51047019429d1141f | [
"MIT"
] | null | null | null | import os
# comment char
_COMMENT_CHAR = '#'
def read_list_from_file(fn: str, items_per_line=None, separator=None, comment_char=_COMMENT_CHAR):
"""
Read a list from given file
Note: list file is organized by lines, comments are started with _COMMENT_CHAR
:param fn: file name
:param items_per_lin... | 29.604651 | 98 | 0.620581 | import os
# comment char
_COMMENT_CHAR = '#'
def read_list_from_file(fn: str, items_per_line=None, separator=None, comment_char=_COMMENT_CHAR):
"""
Read a list from given file
Note: list file is organized by lines, comments are started with _COMMENT_CHAR
:param fn: file name
:param items_per_lin... | 0 | 0 | 0 | 0 | 0 | 237 | 0 | 0 | 26 |
24bf8df59097787799d06f011aea2cabb79e9c1c | 333 | py | Python | datapackage_pipelines_measure/pipeline_steps/__init__.py | pombredanne/measure | 17bdca2fd579f3090ba3b191a58af28b8fc395e4 | [
"MIT"
] | 16 | 2017-04-04T05:01:53.000Z | 2021-10-18T09:44:48.000Z | datapackage_pipelines_measure/pipeline_steps/__init__.py | pombredanne/measure | 17bdca2fd579f3090ba3b191a58af28b8fc395e4 | [
"MIT"
] | 44 | 2017-04-04T05:07:03.000Z | 2020-03-10T05:06:15.000Z | datapackage_pipelines_measure/pipeline_steps/__init__.py | pombredanne/measure | 17bdca2fd579f3090ba3b191a58af28b8fc395e4 | [
"MIT"
] | 5 | 2017-04-08T00:23:39.000Z | 2018-07-04T00:57:52.000Z | from . import (social_media, code_hosting, code_packaging, website_analytics, outputs, email, forums, forum_categories, example)
__all__ = ['social_media', 'code_hosting', 'code_packaging',
'website_analytics', 'outputs', 'email', 'forums',
'forum_categories', 'example']
| 20.8125 | 61 | 0.627628 | from . import (
social_media,
code_hosting,
code_packaging,
website_analytics,
outputs,
email,
forums,
forum_categories,
example
)
__all__ = ['social_media', 'code_hosting', 'code_packaging',
'website_analytics', 'outputs', 'email', 'forums',
'forum_categories'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0 |
e817d5230f56a6941c866c9b126be0149defb489 | 5,835 | py | Python | qubiter/CodaSEO_writer.py | yourball/qubiter | 5ef0ea064fa8c9f125f7951a01fbb88504a054a5 | [
"Apache-2.0"
] | 3 | 2019-10-03T04:27:36.000Z | 2021-02-13T17:49:34.000Z | qubiter/CodaSEO_writer.py | yourball/qubiter | 5ef0ea064fa8c9f125f7951a01fbb88504a054a5 | [
"Apache-2.0"
] | null | null | null | qubiter/CodaSEO_writer.py | yourball/qubiter | 5ef0ea064fa8c9f125f7951a01fbb88504a054a5 | [
"Apache-2.0"
] | 2 | 2020-10-07T15:22:19.000Z | 2021-06-07T04:59:58.000Z |
if __name__ == "__main__":
main()
| 35.363636 | 76 | 0.594173 | from qubiter.SEO_writer import *
import qubiter.utilities_gen as utg
from shutil import copyfile
class CodaSEO_writer(SEO_writer):
"""
This class is a child of class `SEO_writer`. The constructor of this
class accepts as input the paths to a pair of well-formed initial
English and Picture files. The c... | 0 | 0 | 0 | 5,296 | 0 | 353 | 0 | 31 | 115 |
e13636707b7f63b6d5b78e96c2c0f6fdaafb7994 | 2,700 | py | Python | cgbOpCodes.py | WimbledonLabs/opcode-decoder-generator | 82565dba4effb4ffa4f659a7b526ecc805388ba9 | [
"MIT"
] | 1 | 2021-04-02T19:55:32.000Z | 2021-04-02T19:55:32.000Z | cgbOpCodes.py | WimbledonLabs/opcode-decoder-generator | 82565dba4effb4ffa4f659a7b526ecc805388ba9 | [
"MIT"
] | null | null | null | cgbOpCodes.py | WimbledonLabs/opcode-decoder-generator | 82565dba4effb4ffa4f659a7b526ecc805388ba9 | [
"MIT"
] | null | null | null | from pprint import pprint
from string import Template
from decoderGenerator import getDecodeTree, getSwitch
opCodes = {
"00 000000": ("", "NOP", []),
"00 001000": ("", "LD ${N}, SP", []),
"00 RR 0001": ("", "LD ${R}, ${N}", []),
"00 RR 1001": ("", "ADD HL, ${R}", []),
"00 0r 0 010": ("", "LD ${R}, ... | 30 | 89 | 0.368148 | from pprint import pprint
from string import Template
from decoderGenerator import getDecodeTree, getSwitch
opCodes = {
"00 000000": ("", "NOP", []),
"00 001000": ("", "LD ${N}, SP", []),
"00 RR 0001": ("", "LD ${R}, ${N}", []),
"00 RR 1001": ("", "ADD HL, ${R}", []),
"00 0r 0 010": ("", "LD ${R}, ... | 0 | 0 | 0 | 0 | 0 | 263 | 0 | 0 | 23 |
36082ec2b8f15b4dd468175d45050aee4a1370b0 | 3,788 | py | Python | example/test/L1_maze_ide.py | Michael8968/skulpt | 15956a60398fac92ee1dab25bf661ffc003b2eaf | [
"MIT"
] | 2 | 2021-12-18T06:34:26.000Z | 2022-01-05T05:08:47.000Z | example/test/L1_maze_ide.py | Michael8968/skulpt | 15956a60398fac92ee1dab25bf661ffc003b2eaf | [
"MIT"
] | null | null | null | example/test/L1_maze_ide.py | Michael8968/skulpt | 15956a60398fac92ee1dab25bf661ffc003b2eaf | [
"MIT"
] | null | null | null | import pygame
CAPTION = "Rescue Xiaomeng"
SCREEN_SIZE = (800, 600)
pygame.init()
pygame.display.set_caption(CAPTION)
screen = pygame.display.set_mode(SCREEN_SIZE)
xm = People()
xm.show()
run()
| 30.796748 | 75 | 0.555966 | import os
import sys
import pygame
import time
from pygame.locals import *
CAPTION = "Rescue Xiaomeng"
SCREEN_SIZE = (800, 600)
pygame.init()
pygame.display.set_caption(CAPTION)
screen = pygame.display.set_mode(SCREEN_SIZE)
def loo():
while True:
time.sleep(0.01)
for event in pygame.event.get():
... | 0 | 0 | 0 | 3,178 | 0 | 283 | 0 | -27 | 157 |
9d6cee1e63469f5bd5b6cd4fd51541713e1e90ee | 1,052 | py | Python | Genbank/cgenbank_to_fasta.py | charleshefer/cbiotools | a29e93bf1661effe01b8427e42308afdfcdd8592 | [
"MIT"
] | 1 | 2015-03-20T19:58:50.000Z | 2015-03-20T19:58:50.000Z | Genbank/cgenbank_to_fasta.py | charleshefer/cbiotools | a29e93bf1661effe01b8427e42308afdfcdd8592 | [
"MIT"
] | null | null | null | Genbank/cgenbank_to_fasta.py | charleshefer/cbiotools | a29e93bf1661effe01b8427e42308afdfcdd8592 | [
"MIT"
] | null | null | null | ###############################################################################
#Convert genbank to fasta format
#
#@requires Biopython
#@author:charles.hefer@gmail.com
#@version:0.1
###############################################################################
import optparse
from Bio import SeqIO
def __ma... | 30.057143 | 80 | 0.562738 | ###############################################################################
#Convert genbank to fasta format
#
#@requires Biopython
#@author:charles.hefer@gmail.com
#@version:0.1
###############################################################################
import optparse
from Bio import SeqIO
def __ma... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
94ccd55e4ce870fe8d71424e6cba2320449a40ba | 1,932 | py | Python | suplemon/lexer.py | johnmbaughman/suplemon | fdde20f2181c280236d40f89b89b9bbe5843440e | [
"MIT"
] | 912 | 2015-01-04T22:08:48.000Z | 2022-03-29T00:52:24.000Z | suplemon/lexer.py | johnmbaughman/suplemon | fdde20f2181c280236d40f89b89b9bbe5843440e | [
"MIT"
] | 222 | 2015-01-26T13:25:37.000Z | 2022-01-22T08:10:20.000Z | suplemon/lexer.py | johnmbaughman/suplemon | fdde20f2181c280236d40f89b89b9bbe5843440e | [
"MIT"
] | 76 | 2015-03-31T18:11:15.000Z | 2021-05-19T12:31:10.000Z | # -*- encoding: utf-8
import pygments
import pygments.token
| 33.310345 | 74 | 0.577122 | # -*- encoding: utf-8
import pygments
import pygments.token
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
self.token_map = {
pygments.token.Comment: "comment",
pygments.token.Comment.Single: "comment",
pygments.token.Operator: "key... | 0 | 0 | 0 | 1,824 | 0 | 0 | 0 | 1 | 45 |
b0a9a92e9649c836b182b422967230b8763c4ac3 | 9,195 | py | Python | scripts/stats.py | TeamBrot/client | c86d3910497cf411dbf57b16b62b78d3d1732cc3 | [
"Apache-2.0"
] | 1 | 2021-04-08T14:14:48.000Z | 2021-04-08T14:14:48.000Z | scripts/stats.py | TeamBrot/client | c86d3910497cf411dbf57b16b62b78d3d1732cc3 | [
"Apache-2.0"
] | 1 | 2021-04-23T14:45:09.000Z | 2021-05-14T13:56:16.000Z | scripts/stats.py | TeamBrot/client | c86d3910497cf411dbf57b16b62b78d3d1732cc3 | [
"Apache-2.0"
] | 1 | 2021-04-20T09:34:24.000Z | 2021-04-20T09:34:24.000Z | #!/usr/bin/python3
"""
result: {
startTime: "2021-01-01..."
client: 'combi',
players: 2,
width: 15,
height: 15,
deadline: 2,
offset: 4,
occupiedRatio: 0.1241
myStartProbability: 1.2
minimaxActivationValue: 0.01
filterValue: 1
place: 1
numPlayers: 5
enemyNames... | 34.182156 | 174 | 0.615008 | #!/usr/bin/python3
import os
import sys
import json
from common import place
from collections import defaultdict
import argparse
"""
result: {
startTime: "2021-01-01..."
client: 'combi',
players: 2,
width: 15,
height: 15,
deadline: 2,
offset: 4,
occupiedRatio: 0.1241
myStartProbab... | 0 | 0 | 0 | 0 | 0 | 6,153 | 0 | -22 | 385 |
98326be411e9d82c3e5846639be149b472131ee9 | 1,465 | py | Python | nurses_2/widgets/widget_data_structures.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 171 | 2021-06-23T15:29:15.000Z | 2022-03-25T18:53:10.000Z | nurses_2/widgets/widget_data_structures.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 1 | 2022-01-07T05:08:35.000Z | 2022-01-10T04:53:57.000Z | nurses_2/widgets/widget_data_structures.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 3 | 2021-10-01T09:12:15.000Z | 2022-01-14T21:31:11.000Z |
__all__ = "SizeHint", "PosHint", "Anchor", "Easing"
| 24.016393 | 51 | 0.659386 | from enum import Enum
from typing import NamedTuple
__all__ = "SizeHint", "PosHint", "Anchor", "Easing"
class SizeHint(NamedTuple):
height: float | None
width: float | None
class PosHint(NamedTuple):
y: float | None
x: float | None
class Anchor(str, Enum):
CENTER = "center"
LEFT_CENTER = ... | 0 | 0 | 0 | 1,264 | 0 | 0 | 0 | 8 | 136 |
1f650a8377c11dcc461c4085f3e5d88d2ee5c184 | 4,390 | py | Python | yo/db/notifications.py | dpays/dsocial-notifications | 32b1cdcd58d622407fd50206053c5b9735a56ba9 | [
"MIT"
] | 10 | 2017-10-22T20:07:40.000Z | 2018-08-01T21:48:49.000Z | yo/db/notifications.py | dpays/dsocial-notifications | 32b1cdcd58d622407fd50206053c5b9735a56ba9 | [
"MIT"
] | 81 | 2017-08-19T15:38:32.000Z | 2020-05-12T09:56:14.000Z | yo/db/notifications.py | dpays/dsocial-notifications | 32b1cdcd58d622407fd50206053c5b9735a56ba9 | [
"MIT"
] | 9 | 2017-09-19T07:12:20.000Z | 2021-05-25T17:09:27.000Z | # -*- coding: utf-8 -*-
import sqlalchemy as sa
import structlog
from ..schema import Priority
logger = structlog.getLogger(__name__, source='YoDB')
from yo.db import metadata
notifications_table = sa.Table(
'notifications',
metadata,
sa.Column('nid', sa.BigInteger(), primary_key=True),
sa.Column('... | 31.811594 | 133 | 0.617084 | # -*- coding: utf-8 -*-
import sqlalchemy as sa
import structlog
from ..schema import NotificationType
from ..schema import TransportType
from ..schema import Priority
from .users import get_user_transports_for_notification
logger = structlog.getLogger(__name__, source='YoDB')
from yo.db import metadata
from .que... | 0 | 0 | 2,467 | 36 | 0 | 0 | 0 | 69 | 158 |
5e450af54e6532bac164c741f9cca9f2f1faac2a | 1,881 | py | Python | openmdao/components/test/test_linear_system.py | colinxs/OpenMDAO | a9a52be29281a23a102c64b577066ee5fc70f4b4 | [
"Apache-2.0"
] | null | null | null | openmdao/components/test/test_linear_system.py | colinxs/OpenMDAO | a9a52be29281a23a102c64b577066ee5fc70f4b4 | [
"Apache-2.0"
] | null | null | null | openmdao/components/test/test_linear_system.py | colinxs/OpenMDAO | a9a52be29281a23a102c64b577066ee5fc70f4b4 | [
"Apache-2.0"
] | null | null | null | # Test the LinearSystem component.
import unittest
if __name__ == "__main__":
unittest.main()
| 33.589286 | 93 | 0.578947 | # Test the LinearSystem component.
import unittest
import numpy as np
from openmdao.api import Group, Problem, LinearSystem, IndepVarComp, ScipyGMRES
from openmdao.test.util import assert_rel_error
class TestLinearSystem(unittest.TestCase):
def test_linear_system(self):
root = Group()
lingrp =... | 0 | 0 | 0 | 1,608 | 0 | 0 | 0 | 81 | 90 |
2327914d9f8ae6aac29cae7accfc5c5a264cd9aa | 1,391 | py | Python | pyvideo/urls.py | coagulant/pyvideo.ru | 7a340c66ce1c07e64711ea01f79d9cf8e237f8d5 | [
"BSD-3-Clause"
] | 9 | 2015-03-03T19:15:37.000Z | 2018-01-04T11:56:36.000Z | pyvideo/urls.py | coagulant/pyvideo.ru | 7a340c66ce1c07e64711ea01f79d9cf8e237f8d5 | [
"BSD-3-Clause"
] | 23 | 2015-02-03T07:12:43.000Z | 2017-05-19T09:21:59.000Z | pyvideo/urls.py | coagulant/pyvideo.ru | 7a340c66ce1c07e64711ea01f79d9cf8e237f8d5 | [
"BSD-3-Clause"
] | 10 | 2015-06-26T08:31:08.000Z | 2015-10-13T04:55:35.000Z | from django.conf.urls import patterns, url, include
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from richard.videos.sitemaps import CategorySitemap, SpeakerSitemap, VideoSitemap
from sergey.views import SpeakerList
admin.autodiscover()
sitemaps = {
... | 38.638889 | 128 | 0.70381 | from django.conf.urls import patterns, url, include
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from richard.videos.sitemaps import CategorySitemap, SpeakerSitemap, VideoSitemap
from sergey.views import SpeakerList
admin.autodiscover()
sitemaps = {
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2504c90e8d355a09380dd007eed6ce66a52b690c | 33,052 | py | Python | tests/test_corgy.py | jayanthkoushik/corgy | 370a954afe062c51e54818b2f7169caca6c0fe08 | [
"MIT"
] | 6 | 2021-08-30T16:13:06.000Z | 2022-02-15T22:21:49.000Z | tests/test_corgy.py | jayanthkoushik/corgi | 370a954afe062c51e54818b2f7169caca6c0fe08 | [
"MIT"
] | null | null | null | tests/test_corgy.py | jayanthkoushik/corgi | 370a954afe062c51e54818b2f7169caca6c0fe08 | [
"MIT"
] | 1 | 2021-09-21T01:41:55.000Z | 2021-09-21T01:41:55.000Z | import sys
from typing import Sequence
SequenceType = Sequence
if sys.version_info >= (3, 9):
from collections.abc import Sequence # pylint: disable=reimported
from typing import Annotated, Literal
else:
if sys.version_info >= (3, 8):
from typing import Literal
else:
| 32.563547 | 88 | 0.592763 | import argparse
import sys
import unittest
from typing import Optional, Sequence
from unittest import skipIf
from unittest.mock import MagicMock, patch
SequenceType = Sequence
if sys.version_info >= (3, 9):
from collections.abc import Sequence # pylint: disable=reimported
from typing import Annotated, Litera... | 0 | 3,788 | 0 | 28,551 | 0 | 0 | 0 | 110 | 303 |
bd2aaefc7530392c844621d429aa071fca612986 | 261 | py | Python | vmanage/cli/export/__init__.py | tlofreso/python-viptela | 5a11fc3167a2a38c7958a25df49ef6191cc9ddbd | [
"BSD-Source-Code"
] | 1 | 2020-01-07T15:34:29.000Z | 2020-01-07T15:34:29.000Z | vmanage/cli/export/__init__.py | tlofreso/python-viptela | 5a11fc3167a2a38c7958a25df49ef6191cc9ddbd | [
"BSD-Source-Code"
] | null | null | null | vmanage/cli/export/__init__.py | tlofreso/python-viptela | 5a11fc3167a2a38c7958a25df49ef6191cc9ddbd | [
"BSD-Source-Code"
] | null | null | null | from vmanage.cli.export.templates import templates
from vmanage.cli.export.policies import policies
export.add_command(templates)
export.add_command(policies) | 20.076923 | 50 | 0.770115 | import click
from vmanage.cli.export.templates import templates
from vmanage.cli.export.policies import policies
@click.group()
@click.pass_context
def export(ctx):
"""
Export commands
"""
export.add_command(templates)
export.add_command(policies) | 0 | 66 | 0 | 0 | 0 | 0 | 0 | -9 | 45 |
07faa7dc6f0c61331410a62c816b4b69b206fdb9 | 820 | py | Python | setup.py | fdddf/flask-themer | 73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978 | [
"MIT"
] | null | null | null | setup.py | fdddf/flask-themer | 73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978 | [
"MIT"
] | null | null | null | setup.py | fdddf/flask-themer | 73a83e8b2aa876a6fb38f1d49f966b0c4b3e7978 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='flask-themer',
version='1.4.1',
description='Simple theme mechanism for Flask',
author='Tyler Kennedy',
author_email='tk@tkte.ch',
url='https://github.com/tktech/flask-themer',
lon... | 23.428571 | 51 | 0.595122 | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='flask-themer',
version='1.4.1',
description='Simple theme mechanism for Flask',
author='Tyler Kennedy',
author_email='tk@tkte.ch',
url='https://github.com/tktech/flask-themer',
lon... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a3c8aef4e5f938610033e3c79f5745768f7bfb56 | 2,635 | py | Python | gui/guiserver.py | Clayno/xsshunter | a633b3c4694767c7ad0c6f76465ca88c85527441 | [
"MIT"
] | null | null | null | gui/guiserver.py | Clayno/xsshunter | a633b3c4694767c7ad0c6f76465ca88c85527441 | [
"MIT"
] | null | null | null | gui/guiserver.py | Clayno/xsshunter | a633b3c4694767c7ad0c6f76465ca88c85527441 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import tornado.ioloop
import tornado.web
import tornado.template
import dns.resolver
import yaml
try:
with open( '../config.yaml', 'r' ) as f:
settings = yaml.safe_load( f )
except IOError:
print "Error reading config.yaml, have you created one? (Hint: Try running ./generate_confi... | 37.642857 | 273 | 0.659962 | #!/usr/bin/env python
import tornado.ioloop
import tornado.web
import tornado.template
import dns.resolver
import yaml
try:
with open( '../config.yaml', 'r' ) as f:
settings = yaml.safe_load( f )
except IOError:
print "Error reading config.yaml, have you created one? (Hint: Try running ./generate_confi... | 0 | 0 | 0 | 1,677 | 0 | 247 | 0 | 0 | 184 |
e5b8eb367413b579f17fa845a76ea0221b45d59f | 9,633 | py | Python | ParlAI/parlai/tasks/clinical_trials/xml_parser.py | Qdata4Capstone/MedTrialConnect | fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0 | [
"MIT"
] | 1 | 2019-11-08T18:38:42.000Z | 2019-11-08T18:38:42.000Z | ParlAI/parlai/tasks/clinical_trials/xml_parser.py | Qdata4Capstone/MedTrialConnect | fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0 | [
"MIT"
] | 3 | 2021-05-08T09:44:24.000Z | 2021-07-21T14:03:28.000Z | ParlAI/parlai/tasks/clinical_trials/xml_parser.py | Qdata4Capstone/MedTrialConnect | fe0ec0d35d6c720fcf0a35b477d2d303fd3d42b0 | [
"MIT"
] | null | null | null | #### Globals/Imports ####
#### Custom Exceptions ####
#### ProcessedClinicalTrial Class Definition #### | 35.677778 | 92 | 0.71089 | #### Globals/Imports ####
import json
import xml
import xmltodict
import xml.etree.ElementTree as ET
import os
import collections
from timeit import default_timer as timer
import datetime
import traceback
import sys
import re
#### Custom Exceptions ####
class ClinicalTrialParseException(Exception):
pass
#### Proce... | 0 | 0 | 0 | 9,281 | 0 | 0 | 0 | -42 | 289 |
d38162b3e82a4c5dd20033fdd2b912a08aa4fc60 | 4,842 | py | Python | calibration.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | calibration.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | calibration.py | rudyn2/visual-odometry | 1ee37ac6669e1429461f23ccc02d5ae9a349409c | [
"MIT"
] | null | null | null | import glob
import os
import pickle
import cv2 as cv
if __name__ == '__main__':
img_dir = 'data/2011_09_26/2011_09_26_drive_0119_extract/image_00/data'
calibration_path = 'data/2011_09_26/2011_09_26_image_00_chessboards.json'
output_path = 'calibration_results.pkl'
criteria = (cv.TERM_CRITERIA_EP... | 38.736 | 120 | 0.614622 | import glob
import json
import os
import pickle
import cv2 as cv
import numpy as np
from tqdm import tqdm
def calibrate_chessboards(chessboards: list, visualize: bool = False):
finder_criteria = cv.CALIB_CB_ADAPTIVE_THRESH + cv.CALIB_CB_NORMALIZE_IMAGE
total_obj_points, total_image_points = [], []
total_... | 0 | 0 | 0 | 0 | 0 | 2,350 | 0 | -13 | 112 |
d9e8d24db10f3c7f7029dc56c3c9822f8d3cf63a | 13,601 | py | Python | EBI_data_generate.py | datamaskinprosjekt/FPGA-MadNES | 8307c4a1d66909c7637efc27e6248a7e8b332bfd | [
"MIT"
] | null | null | null | EBI_data_generate.py | datamaskinprosjekt/FPGA-MadNES | 8307c4a1d66909c7637efc27e6248a7e8b332bfd | [
"MIT"
] | null | null | null | EBI_data_generate.py | datamaskinprosjekt/FPGA-MadNES | 8307c4a1d66909c7637efc27e6248a7e8b332bfd | [
"MIT"
] | null | null | null | #OAM: 2 16-bit addresses
# 8 bit spriteref
# 10 bit x pos
# 10 bit y pos
# 1 bit x-flip
# 1 bit y-flip
# 1 bit priority
# 1 bit enable
OAM = [
{
"spriteref":1,
"x_pos":13,
"y_pos":2,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},... | 27.700611 | 194 | 0.419969 | #OAM: 2 16-bit addresses
# 8 bit spriteref
# 10 bit x pos
# 10 bit y pos
# 1 bit x-flip
# 1 bit y-flip
# 1 bit priority
# 1 bit enable
OAM = [
{
"spriteref":1,
"x_pos":13,
"y_pos":2,
"x_flip":0,
"y_flip":0,
"priority":0,
"enable":1
},... | 0 | 0 | 0 | 0 | 0 | 87 | 0 | 0 | 23 |
c1d4424d620aca89a5a78a96597648831c9342f8 | 2,553 | py | Python | news_training/databroker/news_databroker.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 8 | 2020-04-21T13:29:04.000Z | 2021-12-13T08:59:09.000Z | news_training/databroker/news_databroker.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 3 | 2021-04-27T11:03:04.000Z | 2021-05-24T18:22:57.000Z | news_training/databroker/news_databroker.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 6 | 2020-07-06T08:23:25.000Z | 2021-11-24T10:39:34.000Z | import grpc
from concurrent import futures
import time
import news_databroker_pb2_grpc
port = 8061
news = [
'In Hong Kong, where newspapers have alleged Japan has been selling below-cost semiconductors, some electronics manufacturers share that view.',
'The Ministry of International Trade and Industry (MITI) ... | 51.06 | 208 | 0.751665 | import grpc
from concurrent import futures
import time
import news_databroker_pb2_grpc
import news_databroker_pb2
port = 8061
news = [
'In Hong Kong, where newspapers have alleged Japan has been selling below-cost semiconductors, some electronics manufacturers share that view.',
'The Ministry of International... | 0 | 0 | 0 | 482 | 0 | 0 | 0 | 5 | 45 |
ad67d66388f0984d00adcc7945f036f683b5cc41 | 1,497 | py | Python | tests/functional/test_tagged_unions_unknown.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 1,063 | 2015-01-13T13:35:09.000Z | 2022-03-31T09:29:32.000Z | tests/functional/test_tagged_unions_unknown.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 2,064 | 2015-01-03T15:53:33.000Z | 2022-03-31T23:12:08.000Z | tests/functional/test_tagged_unions_unknown.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 1,065 | 2015-01-16T15:58:42.000Z | 2022-03-31T22:18:56.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 49.9 | 82 | 0.734135 | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 0 | 0 | 0 | 848 | 0 | 0 | 0 | 20 | 67 |
2000c38b14076a5521c1055e36c1577410d4c50b | 5,658 | py | Python | pyhail/mesh.py | zssherman/PyHail | 3a2b079b298ab7a25288b86cbb7a254e5b2c49cb | [
"MIT"
] | 1 | 2020-06-26T11:14:01.000Z | 2020-06-26T11:14:01.000Z | pyhail/mesh.py | zssherman/PyHail | 3a2b079b298ab7a25288b86cbb7a254e5b2c49cb | [
"MIT"
] | null | null | null | pyhail/mesh.py | zssherman/PyHail | 3a2b079b298ab7a25288b86cbb7a254e5b2c49cb | [
"MIT"
] | null | null | null | """
MESH sub-module of pyhail
Contains the single pol MESH retrieval for gridded radar data.
Required reflectivity and temperature data
Joshua Soderholm - 15 June 2018
"""
import pyart
from pyhail import common
import netCDF4
import numpy as np
def _get_latlon(radgrid, ref_name):
"""
Generates lattitude and... | 34.925926 | 111 | 0.634677 | """
MESH sub-module of pyhail
Contains the single pol MESH retrieval for gridded radar data.
Required reflectivity and temperature data
Joshua Soderholm - 15 June 2018
"""
import pyart
from pyhail import common
import netCDF4
import numpy as np
def _get_latlon(radgrid, ref_name):
"""
Generates lattitude an... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
781b50d537cf5f4dc102a417e1d572cd40701c9b | 980 | py | Python | src/tests/services/test_documentation.py | uescher/byro | e43d646dc8e833591c82b2ea1711c70b9ce7e0b2 | [
"Apache-2.0"
] | null | null | null | src/tests/services/test_documentation.py | uescher/byro | e43d646dc8e833591c82b2ea1711c70b9ce7e0b2 | [
"Apache-2.0"
] | null | null | null | src/tests/services/test_documentation.py | uescher/byro | e43d646dc8e833591c82b2ea1711c70b9ce7e0b2 | [
"Apache-2.0"
] | null | null | null | import os
here = os.path.dirname(__file__)
doc_dir = os.path.join(here, "../../../docs")
base_dir = os.path.join(here, "../../byro")
with open(os.path.join(doc_dir, "developer/plugins/general.rst"), "r") as doc_file:
plugin_docs = doc_file.read()
| 30.625 | 83 | 0.62551 | import importlib
import os
from contextlib import suppress
import pytest
from django.conf import settings
from django.dispatch import Signal
here = os.path.dirname(__file__)
doc_dir = os.path.join(here, "../../../docs")
base_dir = os.path.join(here, "../../byro")
with open(os.path.join(doc_dir, "developer/plugins/ge... | 0 | 571 | 0 | 0 | 0 | 0 | 0 | 21 | 134 |
ea2184307f361df015230e899a9b538d16a1ef35 | 6,413 | py | Python | vaccination projection.py | willcallender/Vaccination-Projection | 7752a8146ccafaaf0d354f8286db2511dde9bc97 | [
"CC-BY-4.0"
] | null | null | null | vaccination projection.py | willcallender/Vaccination-Projection | 7752a8146ccafaaf0d354f8286db2511dde9bc97 | [
"CC-BY-4.0"
] | null | null | null | vaccination projection.py | willcallender/Vaccination-Projection | 7752a8146ccafaaf0d354f8286db2511dde9bc97 | [
"CC-BY-4.0"
] | null | null | null | """
Created on Wed Feb 17 13:27:55 2021
@author: William Callender
This program downloads data about the current progress of COVID-19 vaccinations
in the United States to project the total number of vaccinations going forward.
It does this by getting data about the number of vaccinations per day since
vaccines first ... | 41.642857 | 331 | 0.70669 | """
Created on Wed Feb 17 13:27:55 2021
@author: William Callender
This program downloads data about the current progress of COVID-19 vaccinations
in the United States to project the total number of vaccinations going forward.
It does this by getting data about the number of vaccinations per day since
vaccines first ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35a6f75b986dc2c971967580805c5a807cf4d74a | 2,180 | py | Python | cli/src/rnpfind/picklify.py | mnahinkhan/rnpfind | 5aa956ddd528ab9ebd9588be845f78c449915b78 | [
"MIT"
] | 3 | 2021-06-08T03:55:03.000Z | 2021-06-15T07:33:08.000Z | cli/src/rnpfind/picklify.py | mnahinkhan/RNPFind | 8b561e087f943421c847dcb708ee386ee6439fa5 | [
"MIT"
] | 1 | 2022-02-24T15:34:24.000Z | 2022-03-04T09:59:10.000Z | cli/src/rnpfind/picklify.py | mnahinkhan/RNPFind | 8b561e087f943421c847dcb708ee386ee6439fa5 | [
"MIT"
] | 1 | 2021-07-22T04:13:34.000Z | 2021-07-22T04:13:34.000Z | """
Picklify is a function that works similar to memoization; it is meant for
functions that return a dictionary. Often, such functions will parse a file to
generate a dictionary that maps certain keys to values. To save on such
overhead costs, we "picklify" them the first time they are called (save the
dictionary in a... | 38.928571 | 78 | 0.692661 | """
Picklify is a function that works similar to memoization; it is meant for
functions that return a dictionary. Often, such functions will parse a file to
generate a dictionary that maps certain keys to values. To save on such
overhead costs, we "picklify" them the first time they are called (save the
dictionary in a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8346e6da5338cd7111749123e1ae4fa60487b7eb | 13,628 | py | Python | api/graphql/schema.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | api/graphql/schema.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | api/graphql/schema.py | SuviVappula/tilavarauspalvelu-core | ad7dec36e392a7b2927e2f825c3b0eb29b700793 | [
"MIT"
] | null | null | null | import graphene
schema = graphene.Schema(query=Query, mutation=Mutation)
| 33.566502 | 88 | 0.762181 | import django_filters
import graphene
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db.models import Q
from graphene import Field, relay
from graphene_permissions.mixins import AuthFilter
from graphene_permissions.permissions import AllowAny, AllowAuthenticated
from rest_fr... | 0 | 2,320 | 0 | 7,154 | 0 | 0 | 0 | 2,912 | 1,145 |
307b2050918b8197e66e38d1a1696bcc37f9f393 | 4,996 | py | Python | __init__.py | whitwhittle/homeseer | 6d99748d4f118150e51d128686526f4af0b517a4 | [
"MIT"
] | null | null | null | __init__.py | whitwhittle/homeseer | 6d99748d4f118150e51d128686526f4af0b517a4 | [
"MIT"
] | null | null | null | __init__.py | whitwhittle/homeseer | 6d99748d4f118150e51d128686526f4af0b517a4 | [
"MIT"
] | null | null | null | """
Component for interacting with a HomeSeer HomeTroller or HS3 software installation.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/homeseer/
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from home... | 33.986395 | 111 | 0.703963 | """
Component for interacting with a HomeSeer HomeTroller or HS3 software installation.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/homeseer/
"""
import asyncio
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation ... | 0 | 147 | 1,602 | 1,564 | 0 | 0 | 0 | 73 | 135 |
7e4115dd75b1419979c8ed2ef3db93bfb83a6a89 | 15,481 | py | Python | gui.py | p513817/Dust_Detection_Prototype | 9ac90f9e035a640b4fcb1c5879c949601df5bc03 | [
"MIT"
] | 1 | 2022-01-04T03:44:38.000Z | 2022-01-04T03:44:38.000Z | gui.py | p513817/Dust_Detection_Prototype | 9ac90f9e035a640b4fcb1c5879c949601df5bc03 | [
"MIT"
] | null | null | null | gui.py | p513817/Dust_Detection_Prototype | 9ac90f9e035a640b4fcb1c5879c949601df5bc03 | [
"MIT"
] | null | null | null | #%%
import os, time
# from lobe import modify_lobe
### AI Stream
camera_idx = 0 #
model_path = 'model_tm' #
label_idx = {0:'clean', 1:'dust', 2:'other'} #
label_2tk = {'dust':'', 'clean':'', 'othe... | 33.508658 | 195 | 0.540986 | #%%
import cv2
import tkinter as tk
import os, time
import PIL
from PIL import Image, ImageTk
import threading
import time
import platform as plt
# from lobe import modify_lobe
from tm2_tflite import modify_tm
from cv_dust import find_dust
from custom_io import c_io
### 影像與AI相關的參數 這些參數幾乎都在 Stream 中使用
... | 1,449 | 0 | 0 | 13,847 | 0 | 0 | 0 | -4 | 307 |
a12088d8dd98b39ccba018fb539b2e9067a4f63e | 26,847 | py | Python | utils/others/JointemptyMdoel.py | guopeiming/JointCPNER | 1978665a8e2559fbb4d418105f5bca47cf90addb | [
"Apache-2.0"
] | 1 | 2021-02-23T13:59:28.000Z | 2021-02-23T13:59:28.000Z | utils/others/JointemptyMdoel.py | guopeiming/JointCPNER | 1978665a8e2559fbb4d418105f5bca47cf90addb | [
"Apache-2.0"
] | null | null | null | utils/others/JointemptyMdoel.py | guopeiming/JointCPNER | 1978665a8e2559fbb4d418105f5bca47cf90addb | [
"Apache-2.0"
] | null | null | null | # @Author : guopeiming
# @Contact : guopeiming.gpm@{qq, gmail}.com
import torch.nn as nn
| 51.234733 | 131 | 0.617276 | # @Author : guopeiming
# @Contact : guopeiming.gpm@{qq, gmail}.com
import torch
from queue import Queue
import numpy as np
import torch.nn as nn
from utils import chart_helper
from utils import trees
from utils.vocabulary import Vocabulary
from utils.transliterate import TRANSLITERATIONS, BERT_TOKEN_MAPPING
from typing... | 0 | 0 | 0 | 26,068 | 0 | 0 | 0 | 332 | 355 |
3ab88658f6fb6d20af6694f200dd99b88c8e0b0b | 7,789 | py | Python | gallery/management/commands/scanphotos.py | aaugustin/myks-gallery | ff2952885c80dcfff614e87e9ec43e39f02a7632 | [
"BSD-3-Clause"
] | 32 | 2016-01-11T05:34:53.000Z | 2022-03-19T08:52:20.000Z | gallery/management/commands/scanphotos.py | aaugustin/myks-gallery | ff2952885c80dcfff614e87e9ec43e39f02a7632 | [
"BSD-3-Clause"
] | 6 | 2016-12-26T06:34:30.000Z | 2021-09-05T15:08:20.000Z | gallery/management/commands/scanphotos.py | aaugustin/myks-gallery | ff2952885c80dcfff614e87e9ec43e39f02a7632 | [
"BSD-3-Clause"
] | 15 | 2015-06-01T18:41:21.000Z | 2021-03-25T07:47:07.000Z | import collections
import datetime
import os
import re
from django.conf import settings
from django.utils import timezone
from ...models import Album, Photo
ignores = [re.compile(i) for i in getattr(settings, 'GALLERY_IGNORES', ())]
patterns = [(cat, re.compile(pat)) for cat, pat in getattr(settings, 'GALLERY_P... | 32.589958 | 93 | 0.619078 | import collections
import datetime
import os
import re
import time
import unicodedata
from django.conf import settings
from django.core.management import base
from django.db import transaction
from django.utils import timezone
from ...models import Album, Photo
from ...storages import get_storage
class Command(base... | 0 | 607 | 0 | 784 | 1,300 | 191 | 0 | 31 | 225 |
412a4f1f6882842cebb112e99d795e33cc6c862c | 316 | py | Python | app.py | ztang4/tzqhexapod | 3c4bab58388d5562657c997359a6dd9d910b0efd | [
"MIT"
] | 671 | 2020-02-15T16:53:57.000Z | 2022-03-29T12:57:31.000Z | app.py | neofufu/hexapod-robot-simulator | dc7e04fc60a9c89b35d7cdff6dec0d969c352244 | [
"MIT"
] | 85 | 2020-02-17T16:22:51.000Z | 2021-07-03T11:46:41.000Z | app.py | neofufu/hexapod-robot-simulator | dc7e04fc60a9c89b35d7cdff6dec0d969c352244 | [
"MIT"
] | 102 | 2020-02-15T13:47:48.000Z | 2022-03-28T18:40:16.000Z | import os
import dash
from texts import APP_TITLE
from style_settings import EXTERNAL_STYLESHEETS
app = dash.Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEETS)
app.title = APP_TITLE
server = app.server
server.secret_key = os.environ.get("secret_key", "secret")
app.config.suppress_callback_exceptions = True
| 28.727273 | 68 | 0.829114 | import os
import dash
from texts import APP_TITLE
from style_settings import EXTERNAL_STYLESHEETS
app = dash.Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEETS)
app.title = APP_TITLE
server = app.server
server.secret_key = os.environ.get("secret_key", "secret")
app.config.suppress_callback_exceptions = True
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3466a3be48969205f91e2d6dff4716214b53fcc9 | 46 | py | Python | tests/components/google_domains/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/google_domains/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/google_domains/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Tests for the google_domains component."""
| 23 | 45 | 0.73913 | """Tests for the google_domains component."""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3e9d48e7a59b0bfdb54e253b8a6e908f7ff62bbf | 5,293 | py | Python | tools/drawSkeleton.py | larocs/SoccerKicks | 12945404da13a30e160d5e19585af3ef6ff8c74b | [
"CC0-1.0"
] | null | null | null | tools/drawSkeleton.py | larocs/SoccerKicks | 12945404da13a30e160d5e19585af3ef6ff8c74b | [
"CC0-1.0"
] | null | null | null | tools/drawSkeleton.py | larocs/SoccerKicks | 12945404da13a30e160d5e19585af3ef6ff8c74b | [
"CC0-1.0"
] | 1 | 2021-05-17T23:12:22.000Z | 2021-05-17T23:12:22.000Z | import subprocess
import ipdb
HEAD = 13
NECK = 12
LEFT_SHOULDER = 9
RIGHT_SHOULDER = 8
LEFT_ELBOW = 10
RIGHT_ELBOW = 7
LEFT_WRIST = 11
RIGHT_WRIST = 6
LEFT_HIP = 3
RIGHT_HIP = 2
LEFT_KNEE = 4
RIGHT_KNEE = 1
LEFT_HEEL = 5
RIGHT_HEEL = 0
LEFT_BTOE = 19
RIGHT_BTOE = 20
LEFT_STOE = 21
RIGHT_STOE = 22
LEFT_ANKLE = 23... | 29.082418 | 217 | 0.592103 | from math import inf
import os
import subprocess
import pickle
import ipdb
from matplotlib import pyplot as plt
from matplotlib import animation
from mpl_toolkits.mplot3d import Axes3D
HEAD = 13
NECK = 12
LEFT_SHOULDER = 9
RIGHT_SHOULDER = 8
LEFT_ELBOW = 10
RIGHT_ELBOW = 7
LEFT_WRIST = 11
RIGHT_WRIST = 6
LEFT_HIP = ... | 0 | 0 | 0 | 0 | 0 | 2,639 | 0 | 23 | 247 |
84fcd64b9c6ccf0bba58a14bc105a5789083ef80 | 662 | py | Python | Robomak - Sphero/Final Solution/agolMegu3Tocki.py | dimitrov9/my-projects | dfd6b38b24a1faf179517e74e8b466962fe342c7 | [
"MIT"
] | null | null | null | Robomak - Sphero/Final Solution/agolMegu3Tocki.py | dimitrov9/my-projects | dfd6b38b24a1faf179517e74e8b466962fe342c7 | [
"MIT"
] | null | null | null | Robomak - Sphero/Final Solution/agolMegu3Tocki.py | dimitrov9/my-projects | dfd6b38b24a1faf179517e74e8b466962fe342c7 | [
"MIT"
] | null | null | null |
a = [0, 0]
b = [2, 4]
c = [6, 6]
print(findAngle(a, b, c))
| 20.6875 | 80 | 0.567976 | import numpy as np
from math import degrees
import math
def findAngle(a, b, c):
a = np.array(a)
b = np.array(b)
c = np.array(c)
ba = a - b
bc = c - b
first = np.arctan2(b[0] - a[0],b[1]-a[1])
second = np.arctan2(c[0] - b[0],c[1]-b[1])
return abs((first - second)) > 0
"""cosine_... | 0 | 0 | 0 | 0 | 0 | 521 | 0 | -10 | 89 |
e647f58ae4d373e807b2e05538dbe3ef92fe1e99 | 232 | py | Python | activations/tanh.py | EdwardYGLi/neural_nets_with_numpy | 7b2a72d847c67af4a9854db649853751d330ab5a | [
"MIT"
] | null | null | null | activations/tanh.py | EdwardYGLi/neural_nets_with_numpy | 7b2a72d847c67af4a9854db649853751d330ab5a | [
"MIT"
] | null | null | null | activations/tanh.py | EdwardYGLi/neural_nets_with_numpy | 7b2a72d847c67af4a9854db649853751d330ab5a | [
"MIT"
] | null | null | null | """
Created by Edward Li at 8/23/20
"""
| 17.846154 | 39 | 0.642241 | """
Created by Edward Li at 8/23/20
"""
import numpy as np
def Tanh(Activation):
def activation_fn(self, inputs):
return np.tanh(inputs)
def activation_prime(self, inputs):
return 1 - np.tanh(inputs) ** 2
| 0 | 0 | 0 | 0 | 0 | 149 | 0 | -3 | 45 |
4b3bc8570eb1f4767003b5995fc75ca5a55e3018 | 343 | py | Python | book_spider/use_xpath.py | Longxr/python-data-process | f5f8c2c89b449b76dde31d13c6cabb6b97b0023f | [
"MIT"
] | null | null | null | book_spider/use_xpath.py | Longxr/python-data-process | f5f8c2c89b449b76dde31d13c6cabb6b97b0023f | [
"MIT"
] | null | null | null | book_spider/use_xpath.py | Longxr/python-data-process | f5f8c2c89b449b76dde31d13c6cabb6b97b0023f | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
parse_html() | 20.176471 | 58 | 0.591837 | from lxml import html
def parse_html():
f = open('./static/index.html', 'r', encoding='utf-8')
s= f.read()
selector = html.fromstring(s)
h2 = selector.xpath('/html/body/h2/text()')
print(h2[0])
img = selector.xpath('/html/body/img/@src')
print(img[0])
f.close()
if __name__ == '__ma... | 0 | 0 | 0 | 0 | 0 | 253 | 0 | 1 | 45 |
e50a8edf7061a0537f9450934bccae675c2c91e5 | 150 | py | Python | hello.py | SerryJohns/cloud9 | 96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0 | [
"Apache-2.0"
] | null | null | null | hello.py | SerryJohns/cloud9 | 96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0 | [
"Apache-2.0"
] | null | null | null | hello.py | SerryJohns/cloud9 | 96d7d0c4c2de8786be25a04d6d6e4c832a5cccd0 | [
"Apache-2.0"
] | null | null | null | """Demonstrate docstrings and does nothing really."""
def myfunc():
"""Simple function to demonstrate circleci."""
return 1
print(myfunc())
| 18.75 | 53 | 0.686667 | """Demonstrate docstrings and does nothing really."""
def myfunc():
"""Simple function to demonstrate circleci."""
return 1
print(myfunc())
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4c13fbcbc123793376e9995c59cde7bb0901c004 | 1,432 | py | Python | ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | null | null | null | ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | null | null | null | ansible-devel/test/integration/targets/dict_transformations/library/convert_snake_case.py | satishcarya/ansible | ed091e174c26316f621ac16344a95c99f56bdc43 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: convert_snake_case
short_description: test converting data to s... | 25.571429 | 96 | 0.694832 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: convert_snake_case
short_description: test converting data to s... | 0 | 0 | 0 | 0 | 0 | 412 | 0 | 95 | 68 |
f45e22d75bd20c78a295d6be04634657bacb83bc | 285 | py | Python | src/python/baekjoon/5543.py | Hyeon9mak/Baekjoon | 1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd | [
"MIT"
] | null | null | null | src/python/baekjoon/5543.py | Hyeon9mak/Baekjoon | 1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd | [
"MIT"
] | null | null | null | src/python/baekjoon/5543.py | Hyeon9mak/Baekjoon | 1595eeb260eaf41cc191bd4bbda5a9a2a817f1bd | [
"MIT"
] | null | null | null | buger = juice = 2001
for i in range(0, 5) :
if(i < 3) :
new_buger = int(input())
if new_buger < buger :
buger = new_buger
else :
new_juice = int(input())
if new_juice < juice :
juice = new_juice
print(buger + juice - 50) | 23.75 | 32 | 0.512281 | buger = juice = 2001
for i in range(0, 5) :
if(i < 3) :
new_buger = int(input())
if new_buger < buger :
buger = new_buger
else :
new_juice = int(input())
if new_juice < juice :
juice = new_juice
print(buger + juice - 50) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1e4112a79bb746b6e3f4263e0e92d0ad2674d2f1 | 13,840 | py | Python | genalog/degradation/effect.py | jingjie181/genalog | 5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525 | [
"MIT"
] | 185 | 2021-07-20T18:59:22.000Z | 2022-03-16T10:06:13.000Z | genalog/degradation/effect.py | jingjie181/genalog | 5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525 | [
"MIT"
] | 11 | 2021-07-27T21:20:44.000Z | 2022-01-11T02:28:29.000Z | genalog/degradation/effect.py | jingjie181/genalog | 5d9c3c53a1f90c9938e16f9f7e5c2cb44bc49525 | [
"MIT"
] | 18 | 2021-07-30T13:46:41.000Z | 2021-12-12T01:36:54.000Z | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# ---------------------------------------------------------
from math import floor
import cv2
import numpy as np
def blur(src, radius=5):
"""Wrapper function ... | 37.005348 | 112 | 0.603974 | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# ---------------------------------------------------------
from math import floor
import cv2
import numpy as np
def blur(src, radius=5):
"""Wrapper function ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e603ac416e46ee6215dbad96ff7e759418056e41 | 1,763 | py | Python | scripts/fwd_sp.py | ezygeo-ai/machine-learning-and-geophysical-inversion | a77fde655f4050a115a226e672668af3c7b68e29 | [
"MIT"
] | 19 | 2019-10-07T03:34:38.000Z | 2022-02-23T11:10:03.000Z | scripts/fwd_sp.py | ezygeo-ai/machine-learning-and-geophysical-inversion | a77fde655f4050a115a226e672668af3c7b68e29 | [
"MIT"
] | 1 | 2020-08-19T09:12:32.000Z | 2020-08-19T09:12:32.000Z | scripts/fwd_sp.py | ezygeo-ai/machine-learning-and-geophysical-inversion | a77fde655f4050a115a226e672668af3c7b68e29 | [
"MIT"
] | 9 | 2020-07-24T08:03:53.000Z | 2022-03-31T14:55:01.000Z | # Code was created by M. Heriyanto, 2020/01/13
# https://github.com/ezygeo-ai/machine-learning-and-geophysical-inversion/blob/master/scripts/fwd_sp.py
import numpy as np
import matplotlib.pyplot as plt
import pickle
# SP forward function
# === TEST FORWARD MODELING
x0 = 77.07 # m
alpha = 309.37 * (np.p... | 28.901639 | 106 | 0.643789 | # Code was created by M. Heriyanto, 2020/01/13
# https://github.com/ezygeo-ai/machine-learning-and-geophysical-inversion/blob/master/scripts/fwd_sp.py
import numpy as np
import matplotlib.pyplot as plt
import pickle
# SP forward function
def SPfunc(x_inp, par):
var_x0 = par[0]
var_alpha = par[1]
... | 0 | 0 | 0 | 0 | 0 | 614 | 0 | 0 | 23 |
cc02a8527173e03bf4e058d8371c5a6d67adb2d0 | 2,837 | py | Python | memory.py | yzheng51/rl-dino-run | 89083f3ef8fc7211c3145eb949776a155bb675a1 | [
"MIT"
] | 6 | 2019-10-10T16:23:47.000Z | 2021-12-20T07:59:10.000Z | memory.py | yzheng51/rl-dino-run | 89083f3ef8fc7211c3145eb949776a155bb675a1 | [
"MIT"
] | 4 | 2020-02-15T13:20:26.000Z | 2022-03-11T23:58:05.000Z | memory.py | yzheng51/rl-dino-run | 89083f3ef8fc7211c3145eb949776a155bb675a1 | [
"MIT"
] | 3 | 2020-03-30T05:45:33.000Z | 2021-07-21T02:28:45.000Z | """
This is a script includes two type of experience replay pool
"""
from collections import namedtuple
Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward'))
| 30.836957 | 82 | 0.617201 | """
This is a script includes two type of experience replay pool
"""
import random
from collections import namedtuple
from sum_tree import SumSegmentTree, MinSegmentTree
Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward'))
class ReplayMemory:
"""Experience replay pool"""
def ... | 0 | 0 | 0 | 2,533 | 0 | 0 | 0 | 22 | 90 |
183530fd79525964bed751e417cd14e332c60ff9 | 3,623 | py | Python | test/travis_test_script.py | UltraMachine/python-sc2 | 41355f9ba3f33327b7a410c599cba3637a17c5b1 | [
"MIT"
] | null | null | null | test/travis_test_script.py | UltraMachine/python-sc2 | 41355f9ba3f33327b7a410c599cba3637a17c5b1 | [
"MIT"
] | null | null | null | test/travis_test_script.py | UltraMachine/python-sc2 | 41355f9ba3f33327b7a410c599cba3637a17c5b1 | [
"MIT"
] | null | null | null | import sys, subprocess, time
"""
This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they can't find the last enemy structure or the game is ending in a draw)
Ideally this script should be done with a bot that terminates on its own after certain things have been achieved, e.g. testing i... | 41.170455 | 212 | 0.65857 | import sys, subprocess, time
"""
This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they can't find the last enemy structure or the game is ending in a draw)
Ideally this script should be done with a bot that terminates on its own after certain things have been achieved, e.g. testing i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
996dabbdde3eedc53cebf5a3d33c1ba5d462346a | 11,686 | py | Python | RG_modules.py | cchandre/RG | 234cf2dd9976b4120634d9af914cca500227581c | [
"BSD-2-Clause"
] | null | null | null | RG_modules.py | cchandre/RG | 234cf2dd9976b4120634d9af914cca500227581c | [
"BSD-2-Clause"
] | null | null | null | RG_modules.py | cchandre/RG | 234cf2dd9976b4120634d9af914cca500227581c | [
"BSD-2-Clause"
] | null | null | null | #
# BSD 2-Clause License
#
# Copyright (c) 2021, Cristel Chandre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
... | 45.119691 | 222 | 0.615266 | #
# BSD 2-Clause License
#
# Copyright (c) 2021, Cristel Chandre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
... | 0 | 0 | 0 | 0 | 0 | 9,591 | 0 | -10 | 453 |
fb91e569c4e4dc8487c50ee847984fdfd635063c | 1,684 | py | Python | zillipy/zilliqa/node.py | starling-foundries/pyzil | fadd59937cea4144c900adf2f33cd8498a7b7b7e | [
"MIT"
] | null | null | null | zillipy/zilliqa/node.py | starling-foundries/pyzil | fadd59937cea4144c900adf2f33cd8498a7b7b7e | [
"MIT"
] | null | null | null | zillipy/zilliqa/node.py | starling-foundries/pyzil | fadd59937cea4144c900adf2f33cd8498a7b7b7e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Zilliqa Python Library
# Copyright (C) 2019 Gully Chen
# MIT License
"""
zillipy
.zilliqa.node
~~~~~~~~~~~~
Zilliqa Node API.
:copyright: (c) 2019 by Gully Chen.
:license: MIT License, see LICENSE for more details.
"""
LocalNode = Node("127.0.0.1", 4201)
if "__main__" == __name__:
... | 25.907692 | 70 | 0.623515 | # -*- coding: utf-8 -*-
# Zilliqa Python Library
# Copyright (C) 2019 Gully Chen
# MIT License
"""
zillipy
.zilliqa.node
~~~~~~~~~~~~
Zilliqa Node API.
:copyright: (c) 2019 by Gully Chen.
:license: MIT License, see LICENSE for more details.
"""
import socket
from jsonrpcclient.clients.socket_client import SocketCli... | 0 | 0 | 0 | 1,030 | 0 | 0 | 0 | 31 | 68 |
c1a7ac54b28b7ddaad4fca0a321797492658e82a | 27,346 | py | Python | image_text_model/im_text_rnn_model.py | deepsentiment/deepsentiment | 620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8 | [
"Apache-2.0"
] | null | null | null | image_text_model/im_text_rnn_model.py | deepsentiment/deepsentiment | 620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8 | [
"Apache-2.0"
] | null | null | null | image_text_model/im_text_rnn_model.py | deepsentiment/deepsentiment | 620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8 | [
"Apache-2.0"
] | 1 | 2019-01-09T16:30:53.000Z | 2019-01-09T16:30:53.000Z | import os
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.contrib import slim
from tensorflow.python.training import monitored_session
from tensorflow.python.training import saver as tf_saver
from slim.preprocessing import inception_preprocessing
from image_model import inception_v1
fr... | 46.037037 | 134 | 0.651722 | import os
import sys
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.contrib import slim
from tensorflow.contrib.slim.python.slim.learning import train_step
from tensorflow.python.training import monitored_session
from tensorflow.python.training import saver as tf_saver
from scipy.ndima... | 0 | 0 | 0 | 3,454 | 0 | 1,836 | 0 | 166 | 284 |
6217e1ea15d1af913dd2c7b1dcd67563b0cbca35 | 5,254 | py | Python | tests/test_pipingsystemundergroundpipecircuit.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 19 | 2015-12-08T23:33:51.000Z | 2022-01-31T04:41:10.000Z | tests/test_pipingsystemundergroundpipecircuit.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 2 | 2019-10-04T10:57:00.000Z | 2021-10-01T06:46:17.000Z | tests/test_pipingsystemundergroundpipecircuit.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 7 | 2015-11-04T02:25:01.000Z | 2021-12-08T03:14:28.000Z | import logging
log = logging.getLogger(__name__) | 54.164948 | 200 | 0.784164 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.node import PipingSystemUndergroundPipeCircuit
log = logging.getLogger(__name__)
class TestPipingSystemUndergroundPipeCircuit(unittest.TestCase):
def setUp(self):
s... | 0 | 0 | 0 | 5,009 | 0 | 0 | 0 | 19 | 177 |
10b62b1d15fcadb39d79d2f1602124a09caf9545 | 2,085 | py | Python | toga/_doctest.py | JPLMLIA/TOGA | 81ab7264fb9df9c4ea539b77424f52af166712a6 | [
"Apache-2.0"
] | null | null | null | toga/_doctest.py | JPLMLIA/TOGA | 81ab7264fb9df9c4ea539b77424f52af166712a6 | [
"Apache-2.0"
] | null | null | null | toga/_doctest.py | JPLMLIA/TOGA | 81ab7264fb9df9c4ea539b77424f52af166712a6 | [
"Apache-2.0"
] | null | null | null | """
Author: Lukas Mandrake, Shawn Anderson
Date : 12/4/19
Brief :
Notes :
Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
"""
import importlib
import os
def repo_path():
"""
little function to help resolve location of doctest_files back in r... | 25.120482 | 89 | 0.679137 | """
Author: Lukas Mandrake, Shawn Anderson
Date : 12/4/19
Brief :
Notes :
Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
"""
import importlib
import os
def repo_path():
"""
little function to help resolve location of doctest_files back in r... | 0 | 0 | 0 | 0 | 0 | 52 | 0 | 0 | 23 |
bde05fb807fbab733c48d05cc942c6788305d242 | 2,973 | py | Python | FinalProject/plot.py | elvinlife/Prism | 416e05364435771fe3a0408361112426da697a55 | [
"MIT"
] | null | null | null | FinalProject/plot.py | elvinlife/Prism | 416e05364435771fe3a0408361112426da697a55 | [
"MIT"
] | null | null | null | FinalProject/plot.py | elvinlife/Prism | 416e05364435771fe3a0408361112426da697a55 | [
"MIT"
] | null | null | null | #!python3
# the difficulty is [0, 1, 0, ..., 0], [0, 8, 0, ..., 0], [0, 64, 0, ..., 0]
import matplotlib.pyplot as plt
topo_2_allblocks = {
'line': [69, 491, 1452],
'reg2': [99, 505, 920],
'reg3': [123, 579, 679],
'reg4': [122, 492, 624]
}
topo_2_validblocks = {
'line': [65, 361, 383],
'... | 34.172414 | 144 | 0.603767 | #!python3
# the difficulty is [0, 1, 0, ..., 0], [0, 8, 0, ..., 0], [0, 64, 0, ..., 0]
import matplotlib.pyplot as plt
topo_2_allblocks = {
'line': [69, 491, 1452],
'reg2': [99, 505, 920],
'reg3': [123, 579, 679],
'reg4': [122, 492, 624]
}
topo_2_validblocks = {
'line': [65, 361, 383],
'... | 0 | 0 | 0 | 0 | 0 | 1,783 | 0 | 3 | 113 |
cd26e78e07512c5b788f96413cc10a5ecf2013de | 1,853 | py | Python | train.py | ka-th-y/Flower_Image_Classifier_Udacity | 567d79526d97440b9471b435ef929159c46c682d | [
"MIT"
] | null | null | null | train.py | ka-th-y/Flower_Image_Classifier_Udacity | 567d79526d97440b9471b435ef929159c46c682d | [
"MIT"
] | null | null | null | train.py | ka-th-y/Flower_Image_Classifier_Udacity | 567d79526d97440b9471b435ef929159c46c682d | [
"MIT"
] | null | null | null | # Imports from here
import argparse
import functions_train
import os
parser = argparse.ArgumentParser()
parser.add_argument('--arch', type = str, default = 'vgg19', help = 'which CNN Model should be used for pretraining, choose between vgg13, vgg16, vgg19, densenet121, densenet161, alexnet | (default = vgg19)')
pars... | 43.093023 | 208 | 0.750675 | # Imports from here
import argparse
import functions_train
import os
parser = argparse.ArgumentParser()
parser.add_argument('--arch', type = str, default = 'vgg19', help = 'which CNN Model should be used for pretraining, choose between vgg13, vgg16, vgg19, densenet121, densenet161, alexnet | (default = vgg19)')
pars... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7c9821674b5282eac57bb1479a70b6b2ab706d5 | 7,411 | py | Python | amgut/lib/data_access/env_management.py | ElDeveloper/american-gut-web | 5ef11eadad21b6e60bbd073b50bfb5ba4522017a | [
"BSD-3-Clause"
] | null | null | null | amgut/lib/data_access/env_management.py | ElDeveloper/american-gut-web | 5ef11eadad21b6e60bbd073b50bfb5ba4522017a | [
"BSD-3-Clause"
] | null | null | null | amgut/lib/data_access/env_management.py | ElDeveloper/american-gut-web | 5ef11eadad21b6e60bbd073b50bfb5ba4522017a | [
"BSD-3-Clause"
] | null | null | null | from os.path import abspath, dirname, join, split
from glob import glob
from functools import partial
from click import echo
from psycopg2 import (connect)
from natsort import natsorted
from amgut.lib.config_manager import AMGUT_CONFIG
from amgut.lib.data_access.sql_connection import SQLConnectionHandler
get_db_fil... | 33.233184 | 79 | 0.653488 | from os.path import abspath, dirname, join, split
from glob import glob
from functools import partial
from subprocess import Popen, PIPE
import gzip
from click import echo
from psycopg2 import (connect, OperationalError)
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from natsort import natsorted
from amg... | 0 | 0 | 0 | 0 | 0 | 3,711 | 0 | 58 | 181 |
e81ff8fb99be003f2ac3322d7f91100142267d38 | 5,104 | py | Python | testkitbackend/totestkit.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | testkitbackend/totestkit.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | testkitbackend/totestkit.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [https://neo4j.com]
#
# This file is part of Neo4j.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2... | 29.165714 | 79 | 0.501176 | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [https://neo4j.com]
#
# This file is part of Neo4j.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2... | 0 | 0 | 0 | 0 | 0 | 4,193 | 0 | 131 | 136 |
7dc95282b6dd44d36c1e66b25b641315cdf6f11f | 16,736 | py | Python | geojson_modelica_translator/modelica/input_parser.py | Helarga/geojson-modelica-translator | 0ad5dc9826dae7fac81edcaafedd3b1725fe33fc | [
"BSD-3-Clause"
] | null | null | null | geojson_modelica_translator/modelica/input_parser.py | Helarga/geojson-modelica-translator | 0ad5dc9826dae7fac81edcaafedd3b1725fe33fc | [
"BSD-3-Clause"
] | null | null | null | geojson_modelica_translator/modelica/input_parser.py | Helarga/geojson-modelica-translator | 0ad5dc9826dae7fac81edcaafedd3b1725fe33fc | [
"BSD-3-Clause"
] | null | null | null | """
****************************************************************************************************
:copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
... | 38.036364 | 116 | 0.569849 | """
****************************************************************************************************
:copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
... | 0 | 1,244 | 0 | 13,561 | 0 | 0 | 0 | 66 | 114 |
1bc43c44bc60d413d2d2a920215744d8000616fe | 1,256 | py | Python | Codechef/Fair Elections.py | anuveshkothari/BugFreeCodes | 37f9391cdb53319d9cf14accab4a92ea9c38f287 | [
"MIT"
] | null | null | null | Codechef/Fair Elections.py | anuveshkothari/BugFreeCodes | 37f9391cdb53319d9cf14accab4a92ea9c38f287 | [
"MIT"
] | null | null | null | Codechef/Fair Elections.py | anuveshkothari/BugFreeCodes | 37f9391cdb53319d9cf14accab4a92ea9c38f287 | [
"MIT"
] | null | null | null |
test_cases = int(input())
for test in range(test_cases):
john_packs, jack_packs = map(int, list(input().split()))
john_pack_list = list(input().split())
jack_pack_list = list(input().split())
john_pack_list = [int(x) for x in john_pack_list]
jack_pack_list = [int(x) for x in jack_pack_list... | 39.25 | 127 | 0.644904 |
test_cases = int(input())
for test in range(test_cases):
john_packs, jack_packs = map(int, list(input().split()))
john_pack_list = list(input().split())
jack_pack_list = list(input().split())
john_pack_list = [int(x) for x in john_pack_list]
jack_pack_list = [int(x) for x in jack_pack_list... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8692793983348e4becbe6935e7e185057db04a74 | 7,319 | py | Python | bio_embeddings/embed/embedder_interfaces.py | HannesStark/bio_embeddings | 8c2e2b4a17903495fcced99fccb7f7287daacc49 | [
"MIT"
] | null | null | null | bio_embeddings/embed/embedder_interfaces.py | HannesStark/bio_embeddings | 8c2e2b4a17903495fcced99fccb7f7287daacc49 | [
"MIT"
] | 1 | 2021-01-31T20:06:52.000Z | 2021-01-31T20:06:52.000Z | bio_embeddings/embed/embedder_interfaces.py | konstin/bio_embeddings | a7de49fd8e152f8e735283818e6f2e2de7b824c8 | [
"MIT"
] | 1 | 2021-12-26T22:20:48.000Z | 2021-12-26T22:20:48.000Z | """
Abstract interface for Embedder.
Authors:
Christian Dallago
"""
import logging
logger = logging.getLogger(__name__)
| 37.152284 | 118 | 0.598852 | """
Abstract interface for Embedder.
Authors:
Christian Dallago
"""
import abc
import logging
import tempfile
from typing import List, Generator, Optional, Iterable, ClassVar, Any, Dict, Union
import torch
from numpy import ndarray
from bio_embeddings.utilities import (
get_model_file,
get_model_directori... | 0 | 832 | 0 | 6,050 | 0 | 0 | 0 | 130 | 181 |
b7126f3e6010319a56c74ee674534b6b01254775 | 4,007 | py | Python | train_icw_fmri_gan.py | BlissChapman/SyntheticStatistics | 4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6 | [
"MIT"
] | 3 | 2018-04-28T14:14:30.000Z | 2018-08-06T23:49:26.000Z | train_icw_fmri_gan.py | BlissChapman/SyntheticStatistics | 4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6 | [
"MIT"
] | null | null | null | train_icw_fmri_gan.py | BlissChapman/SyntheticStatistics | 4c85d89f926a1d7944d675d4f4c3d3fe77fc45c6 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import argparse
import models.ICW_FMRI_GAN
import numpy as np
import os
import shutil
import torch
from brainpedia.brainpedia import Brainpedia
from torch.autograd import Variable
from utils.sampling import noise
parser = argparse.ArgumentParser(description="Train ICW_FMRI_GA... | 40.887755 | 120 | 0.70277 | import matplotlib
matplotlib.use('Agg')
import argparse
import datetime
import models.ICW_FMRI_GAN
import nibabel
import numpy as np
import os
import shutil
import timeit
import torch
from brainpedia.brainpedia import Brainpedia
from brainpedia.fmri_processing import invert_preprocessor_scaling
from torch.autograd im... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 110 |
1ce727b5e229f5ee8cbab9a9582ec9dc0634c458 | 672 | py | Python | setup.py | audunsh/bubblebox | 61b11c8b0f1c44da81eba4b36a9e786554ac9e0c | [
"MIT"
] | null | null | null | setup.py | audunsh/bubblebox | 61b11c8b0f1c44da81eba4b36a9e786554ac9e0c | [
"MIT"
] | null | null | null | setup.py | audunsh/bubblebox | 61b11c8b0f1c44da81eba4b36a9e786554ac9e0c | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='BubbleBox',
version='0.1.4',
author="Audun Skau Hansen",
author_email="a.s.hansen@kjemi.uio.no",
description="A molecular dynamics educational tool for Jupyter Notebooks",
lon... | 29.217391 | 79 | 0.659226 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='BubbleBox',
version='0.1.4',
author="Audun Skau Hansen",
author_email="a.s.hansen@kjemi.uio.no",
description="A molecular dynamics educational tool for Jupyter Notebooks",
lon... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11516205c11a0ad59412222ece5bc949c1492a45 | 440 | py | Python | tests/test_device.py | spiffyguy/total-connect-client | 2b30801306d18b0065a1d92b46cc78d0bbb73971 | [
"MIT"
] | null | null | null | tests/test_device.py | spiffyguy/total-connect-client | 2b30801306d18b0065a1d92b46cc78d0bbb73971 | [
"MIT"
] | null | null | null | tests/test_device.py | spiffyguy/total-connect-client | 2b30801306d18b0065a1d92b46cc78d0bbb73971 | [
"MIT"
] | null | null | null | """Test TotalConnectDevice."""
from device import TotalConnectDevice
from const import DEVICE_INFO_BASIC_1
def tests_init():
"""Test __init__()."""
test_device = TotalConnectDevice(DEVICE_INFO_BASIC_1)
assert test_device.id == DEVICE_INFO_BASIC_1["DeviceID"]
# test with missing flags
del DEVICE_... | 29.333333 | 60 | 0.754545 | """Test TotalConnectDevice."""
from device import TotalConnectDevice
from const import DEVICE_INFO_BASIC_1
def tests_init():
"""Test __init__()."""
test_device = TotalConnectDevice(DEVICE_INFO_BASIC_1)
assert test_device.id == DEVICE_INFO_BASIC_1["DeviceID"]
# test with missing flags
del DEVICE_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
17f4bfa6689338efca93e45b8db72a85480e0b97 | 10,813 | py | Python | earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 2,661 | 2017-03-20T22:12:50.000Z | 2022-03-30T09:43:19.000Z | earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 1,531 | 2017-03-24T17:20:32.000Z | 2022-03-16T18:11:14.000Z | earth_enterprise/src/fusion/portableglobe/servers/linux/fileunpacker.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 990 | 2017-03-24T11:54:28.000Z | 2022-03-22T11:51:47.000Z | #!/usr/bin/env python2.7
#
# Copyright 2017 Google 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 l... | 49.374429 | 127 | 0.779802 | #!/usr/bin/env python2.7
#
# Copyright 2017 Google 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 l... | 0 | 0 | 0 | 6,918 | 0 | 951 | 0 | 0 | 254 |
7089d1783d9fe1848e77df1fdcc236ccf593a689 | 7,104 | py | Python | submissions/Kinley/mygames.py | WhittKinley/Legos | 861a2651f481d0463003007694c895d3df3b0fee | [
"MIT"
] | null | null | null | submissions/Kinley/mygames.py | WhittKinley/Legos | 861a2651f481d0463003007694c895d3df3b0fee | [
"MIT"
] | null | null | null | submissions/Kinley/mygames.py | WhittKinley/Legos | 861a2651f481d0463003007694c895d3df3b0fee | [
"MIT"
] | null | null | null |
myGame = FlagrantCopy()
won = GameState(
to_move = 'O',
board = {(5,1): 'O', (5,2): 'O', (5,3): 'O',
(2,1): 'X', (2,2): 'X',
},
label = 'won'
)
winin1 = GameState(
to_move = 'X',
board = {(1,1): 'X', (1,2): 'X', (1,3): 'X',
(2,1): 'O', (2,2): 'O', (2,3): 'O'... | 29.848739 | 77 | 0.480434 |
from collections import namedtuple
from games import (Game)
class GameState:
def __init__(self, to_move, board, label=None, depth=5):
self.to_move = to_move
self.board = board
self.label = label
self.maxDepth = depth
# self.validSpaces = ()
def __str__(self):
if... | 0 | 0 | 0 | 5,792 | 0 | 0 | 0 | 16 | 91 |
54c447a7b525549f9f92fb3b1066507bda34fc64 | 4,209 | py | Python | utils/kaiser_filter.py | skovacevic96/deepsignal | 3b19e3283d9a79e31f0e2af150b394c423f602bc | [
"MIT"
] | null | null | null | utils/kaiser_filter.py | skovacevic96/deepsignal | 3b19e3283d9a79e31f0e2af150b394c423f602bc | [
"MIT"
] | null | null | null | utils/kaiser_filter.py | skovacevic96/deepsignal | 3b19e3283d9a79e31f0e2af150b394c423f602bc | [
"MIT"
] | null | null | null | import numpy as np
_i0A = [
-4.41534164647933937950E-18,
3.33079451882223809783E-17,
-2.43127984654795469359E-16,
1.71539128555513303061E-15,
-1.16853328779934516808E-14,
7.67618549860493561688E-14,
-4.85644678311192946090E-13,
2.95505266312963983461E-12,
-1.72682629144155570723E-11... | 26.471698 | 212 | 0.660727 | import numpy as np
_i0A = [
-4.41534164647933937950E-18,
3.33079451882223809783E-17,
-2.43127984654795469359E-16,
1.71539128555513303061E-15,
-1.16853328779934516808E-14,
7.67618549860493561688E-14,
-4.85644678311192946090E-13,
2.95505266312963983461E-12,
-1.72682629144155570723E-11... | 0 | 0 | 0 | 0 | 0 | 584 | 0 | 0 | 94 |
010401143f5604e3c0f243a6dd30dcdd000ec198 | 1,815 | py | Python | modules/additional.py | flaczq/chip-eight-emulator | 4962d2f996f691ba3b07a12cf4716f2c5fd06eec | [
"MIT"
] | null | null | null | modules/additional.py | flaczq/chip-eight-emulator | 4962d2f996f691ba3b07a12cf4716f2c5fd06eec | [
"MIT"
] | null | null | null | modules/additional.py | flaczq/chip-eight-emulator | 4962d2f996f691ba3b07a12cf4716f2c5fd06eec | [
"MIT"
] | null | null | null | import pygame
# ENGINE
TIMER = pygame.USEREVENT + 1
DELAY = 17
# GRAPHICS
CAPTION = 'CHIP-EIGHT EMULATOR'
WIDTH = 64
HEIGHT = 32
SCALE = 10
COLOR_OFF = pygame.Color(0, 0, 0, 255)
COLOR_ON = pygame.Color(255, 255, 255, 255)
| 25.56338 | 82 | 0.568595 | import sys
import pygame
# ENGINE
TIMER = pygame.USEREVENT + 1
DELAY = 17
# GRAPHICS
CAPTION = 'CHIP-EIGHT EMULATOR'
WIDTH = 64
HEIGHT = 32
SCALE = 10
COLOR_OFF = pygame.Color(0, 0, 0, 255)
COLOR_ON = pygame.Color(255, 255, 255, 255)
class Engine:
def __init__(self):
print('Engine initiation')
p... | 0 | 0 | 0 | 1,507 | 0 | 0 | 0 | -11 | 91 |
12c2f36b06e37627eeb767eb9dfb38e4a4dfb20d | 5,858 | py | Python | pyweidentity/weidentityClient.py | SUIBE-Blockchain/Weidentity-Python-SDK | d2c7b503490e18c384934d228fc054873a3cfcef | [
"Apache-2.0"
] | 1 | 2021-06-29T07:17:16.000Z | 2021-06-29T07:17:16.000Z | pyweidentity/weidentityClient.py | SUIBE-Blockchain/Weidentity-Python-SDK | d2c7b503490e18c384934d228fc054873a3cfcef | [
"Apache-2.0"
] | 2 | 2021-11-09T07:20:58.000Z | 2021-11-15T02:44:55.000Z | pyweidentity/weidentityClient.py | SUIBE-Blockchain/Weidentity-Python-SDK | d2c7b503490e18c384934d228fc054873a3cfcef | [
"Apache-2.0"
] | 1 | 2021-06-25T18:48:16.000Z | 2021-06-25T18:48:16.000Z | import logging
LOG = logging.getLogger(__name__) | 35.289157 | 136 | 0.562137 | import logging
from .Base import Base
import time
LOG = logging.getLogger(__name__)
class weidentityClient(Base):
def __init__(self, host, port=None, version="1.0.0"):
super(weidentityClient, self).__init__(host, port, version)
def create_weidentity_did_first(self, publicKey, nonce):
# 创建WeId... | 42 | 0 | 0 | 5,737 | 0 | 0 | 0 | -9 | 67 |
541d9ba8b0a97da86d2695025bcd0617c83d15a1 | 993 | py | Python | data/coco/make_annotation.py | fcdl94/WILSON | 41c7d5b21b627722311d559ad5f6d835917f95d1 | [
"MIT"
] | 4 | 2022-03-30T02:58:17.000Z | 2022-03-30T18:11:29.000Z | data/coco/make_annotation.py | fcdl94/WILSON | 41c7d5b21b627722311d559ad5f6d835917f95d1 | [
"MIT"
] | null | null | null | data/coco/make_annotation.py | fcdl94/WILSON | 41c7d5b21b627722311d559ad5f6d835917f95d1 | [
"MIT"
] | null | null | null | from PIL import Image
import numpy as np
import os
import os.path as osp
from tqdm import tqdm
orig_path = '.' # insert here the source path where original COCO annotations are
dest_path = '.' # the destination folder, which should be this one'
for split in ["train2017", "val2017"]:
annotations = f"{orig_path}/... | 32.032258 | 86 | 0.666667 | from PIL import Image
import numpy as np
import os
import os.path as osp
from tqdm import tqdm
orig_path = '.' # insert here the source path where original COCO annotations are
dest_path = '.' # the destination folder, which should be this one'
for split in ["train2017", "val2017"]:
annotations = f"{orig_path}/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f10398c94f4184fdadfcf4dae561650786e86f8b | 2,945 | py | Python | UI/simpleFontWindow.py | typemytype/RoboFontExamples | cc5668de3d27ce996cff5eadb32d0b905c2aff65 | [
"MIT"
] | 12 | 2015-01-03T12:34:18.000Z | 2022-01-24T13:11:35.000Z | UI/simpleFontWindow.py | typemytype/RoboFontExamples | cc5668de3d27ce996cff5eadb32d0b905c2aff65 | [
"MIT"
] | null | null | null | UI/simpleFontWindow.py | typemytype/RoboFontExamples | cc5668de3d27ce996cff5eadb32d0b905c2aff65 | [
"MIT"
] | 3 | 2015-01-02T13:38:09.000Z | 2016-05-06T21:36:01.000Z |
fonts = OpenFont(showUI=False)
if not isinstance(fonts, list):
fonts = [fonts]
for font in fonts:
## small bug if the font has no units per em set (already fixed in the dev version)
if font.info.unitsPerEm is None:
font.info.unitsPerEm = 1000
SimpleFontWindow(font) | 33.465909 | 88 | 0.609168 | from AppKit import NSURL, NSDocumentController
from vanilla import *
from defconAppKit.windows.baseWindow import BaseWindowController
from lib.doodleDocument import DoodleDocument
from mojo.UI import OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet
class SimpleFontWindow(BaseWindowController):
def __init... | 0 | 0 | 0 | 2,367 | 0 | 0 | 0 | 142 | 134 |
767ef4f9569676ced530e3d4bd30452ff1be7ad5 | 1,975 | py | Python | server/handlers/create.py | dwadeflash/niuniu-bill | 6cd5744727985ce8e1ed7b584cdff0c41710801a | [
"MIT"
] | null | null | null | server/handlers/create.py | dwadeflash/niuniu-bill | 6cd5744727985ce8e1ed7b584cdff0c41710801a | [
"MIT"
] | null | null | null | server/handlers/create.py | dwadeflash/niuniu-bill | 6cd5744727985ce8e1ed7b584cdff0c41710801a | [
"MIT"
] | null | null | null | # coding:utf-8
import logging
logger = logging.getLogger('boilerplate.' + __name__) | 40.306122 | 217 | 0.648101 | # coding:utf-8
from handlers.base import BaseHandler
from models.Approve import Approve
from models.ApproveRequest import ApproveRequest
from models.ApproveRelation import ApproveRelation
from dao.base import session
import logging
logger = logging.getLogger('boilerplate.' + __name__)
import requests
import json
fro... | 42 | 1,509 | 0 | 12 | 0 | 0 | 0 | 85 | 271 |
c2f14a90af9c770b76403737ec72da1287340e4f | 2,101 | py | Python | authentication/models.py | Sammy-Barasa/work-record-manager | 62652d7961d16f12ebb76a23f2078f1c4aa87df5 | [
"MIT"
] | null | null | null | authentication/models.py | Sammy-Barasa/work-record-manager | 62652d7961d16f12ebb76a23f2078f1c4aa87df5 | [
"MIT"
] | 9 | 2021-03-19T12:56:42.000Z | 2022-02-07T01:46:14.000Z | authentication/models.py | Sammy-Barasa/work-record-manager | 62652d7961d16f12ebb76a23f2078f1c4aa87df5 | [
"MIT"
] | null | null | null |
# Create your models here.
# Custom User model for verify user emails and sending verification links
| 34.442623 | 86 | 0.697763 | from django.db import models
from django.contrib.auth.models import AbstractUser, BaseUserManager, PermissionsMixin
from rest_framework_simplejwt.tokens import RefreshToken
from phone_field import PhoneField
# Create your models here.
# Custom User model for verify user emails and sending verification links
class U... | 0 | 0 | 0 | 1,736 | 0 | 0 | 0 | 120 | 134 |
c544a282cf8d2441a7c962ee2926219e6e40f570 | 7,517 | py | Python | GamepadDriveV1.py | RocketCityDynamics/PS3GamePadV1 | 7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14 | [
"CC0-1.0"
] | null | null | null | GamepadDriveV1.py | RocketCityDynamics/PS3GamePadV1 | 7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14 | [
"CC0-1.0"
] | 1 | 2021-03-07T17:11:57.000Z | 2021-03-07T17:11:57.000Z | GamepadDriveV1.py | RocketCityDynamics/PS3GamePadV1 | 7e6ce0e020fa7d6f98cf7fe4bc46ab18c2db7d14 | [
"CC0-1.0"
] | null | null | null | #Description
#This Python3 script combines Afterglow PS3 USB button-press data with 2 motor activation.
#testbed information
#This was developed as a deliberately low powered and lightweight combination. It is also affordable at near $200 USD current pricing for all the parts. The Pi3 is used for it's common use,... | 36.139423 | 418 | 0.646135 | #Description
#This Python3 script combines Afterglow PS3 USB button-press data with 2 motor activation.
#testbed information
#This was developed as a deliberately low powered and lightweight combination. It is also affordable at near $200 USD current pricing for all the parts. The Pi3 is used for it's common use,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 44 |
5c02ad1c076fcf7ff7b5e14aa5cbaa7cc33c61a4 | 1,701 | py | Python | src/tests/transaction_between_wallets_test.py | trantorberk/basicblockchain | 2f822a710075fe8f7daa724094a48316538f0f3e | [
"MIT"
] | 1 | 2021-05-15T13:55:46.000Z | 2021-05-15T13:55:46.000Z | tests/Transaction_between_wallets_test.py | trantorberk/basicblockchain | 8bdead61dbf77362ec9179eb90aaea2ba8f0ad16 | [
"MIT"
] | null | null | null | tests/Transaction_between_wallets_test.py | trantorberk/basicblockchain | 8bdead61dbf77362ec9179eb90aaea2ba8f0ad16 | [
"MIT"
] | null | null | null | from Blockchain import Blockchain
from Wallet import Wallet
from Transaction import Transaction
# Blockchain initialization
# Mining Difficulty and reward
blockchain = Blockchain(2, 10)
# Creating two new wallets:
# Each wallet has a user name. createNewWallet function
# generates cryptographic key pair for the wal... | 26.578125 | 73 | 0.78836 | from Blockchain import Blockchain
from Wallet import Wallet
from Transaction import Transaction
from DataConverter import BlockDataIO
import pytest
# Blockchain initialization
# Mining Difficulty and reward
blockchain = Blockchain(2, 10)
# Creating two new wallets:
# Each wallet has a user name. createNewWallet fun... | 0 | 0 | 0 | 0 | 0 | 90 | 0 | 8 | 67 |
2cee11cd8a8f16409727b0214e45ba7038bea576 | 4,821 | py | Python | ImageAnalyses/MakeSuppTables.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 30 | 2019-07-17T22:27:02.000Z | 2021-12-21T11:38:12.000Z | ImageAnalyses/MakeSuppTables.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 21 | 2019-07-18T14:26:14.000Z | 2020-01-20T17:59:19.000Z | ImageAnalyses/MakeSuppTables.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 12 | 2019-07-20T06:14:21.000Z | 2021-09-25T00:35:29.000Z | #!/usr/bin/env python
# coding: utf-8
"""
Make latex file for supplementary figures
"""
import os
import argparse
from narps import Narps
preamble = '''\\documentclass[10pt]{article}
\\usepackage[margin=0.5in]{geometry}
\\geometry{letterpaper}
\\usepackage{graphicx}
\\usepackage{amssymb}
\\usepackage{epstopdf}
\\use... | 32.355705 | 79 | 0.497407 | #!/usr/bin/env python
# coding: utf-8
"""
Make latex file for supplementary figures
"""
import os
import argparse
import pandas
import numpy
from narps import Narps
preamble = '''\\documentclass[10pt]{article}
\\usepackage[margin=0.5in]{geometry}
\\geometry{letterpaper}
\\usepackage{graphicx}
\\usepackage{amssymb}
\... | 0 | 0 | 0 | 0 | 0 | 3,441 | 0 | -17 | 67 |
7292bd617479c0d12a40665475cacfd179be4175 | 7,301 | py | Python | tests/integration/test_ifnotexists.py | reddit/cqlmapper | c5cfce4bc1fcda1562780133b4ff9407e071b0f8 | [
"Apache-2.0"
] | 11 | 2017-09-02T07:37:25.000Z | 2021-04-19T03:30:59.000Z | tests/integration/test_ifnotexists.py | Seanpm2001-reddit/cqlmapper | c5cfce4bc1fcda1562780133b4ff9407e071b0f8 | [
"Apache-2.0"
] | 5 | 2018-02-15T06:40:16.000Z | 2021-12-13T20:05:16.000Z | tests/integration/test_ifnotexists.py | Seanpm2001-reddit/cqlmapper | c5cfce4bc1fcda1562780133b4ff9407e071b0f8 | [
"Apache-2.0"
] | 15 | 2017-05-10T20:51:27.000Z | 2021-04-19T03:31:10.000Z | # Modifications Copyright 2016-2017 Reddit, Inc.
#
# Copyright 2013-2016 DataStax, 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
#
# Unle... | 35.789216 | 97 | 0.681824 | # Modifications Copyright 2016-2017 Reddit, Inc.
#
# Copyright 2013-2016 DataStax, 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
#
# Unle... | 0 | 2,898 | 0 | 2,910 | 0 | 0 | 0 | 197 | 600 |
4adea96a834e7de177fe5efd865ed445322d88c1 | 4,531 | py | Python | src/fluctmatch/commands/cmd_thermo.py | nixnmtm/python-fluctmatch | 1e9fd20cebef03f554077db093b9cad6ac0a9ada | [
"BSD-3-Clause"
] | 2 | 2017-11-11T10:13:53.000Z | 2020-04-06T07:39:05.000Z | src/fluctmatch/commands/cmd_thermo.py | nixnmtm/python-fluctmatch | 1e9fd20cebef03f554077db093b9cad6ac0a9ada | [
"BSD-3-Clause"
] | 2 | 2019-05-09T09:15:31.000Z | 2019-11-25T13:03:32.000Z | src/fluctmatch/commands/cmd_thermo.py | nixnmtm/python-fluctmatch | 1e9fd20cebef03f554077db093b9cad6ac0a9ada | [
"BSD-3-Clause"
] | 3 | 2017-11-11T10:21:09.000Z | 2020-08-31T15:57:57.000Z | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# fluctmatch --- https://github.com/tclick/python-fluctmatch
# Copyright (c) 2013-2017 The fluctmatch Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... | 26.190751 | 78 | 0.589274 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# fluctmatch --- https://github.com/tclick/python-fluctmatch
# Copyright (c) 2013-2017 The fluctmatch Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... | 0 | 3,611 | 0 | 0 | 0 | 0 | 0 | 18 | 156 |
e2c83a440240d2cd836c70002abb349f6a7c8424 | 593 | py | Python | simple_request.py | Nicola115/online-RNN-model-to-predict-TNe | 42086ba10b92d200fb9fb42b0f7dee7762067015 | [
"MIT"
] | null | null | null | simple_request.py | Nicola115/online-RNN-model-to-predict-TNe | 42086ba10b92d200fb9fb42b0f7dee7762067015 | [
"MIT"
] | null | null | null | simple_request.py | Nicola115/online-RNN-model-to-predict-TNe | 42086ba10b92d200fb9fb42b0f7dee7762067015 | [
"MIT"
] | null | null | null | # USAGE
# python simple_request.py
# import the necessary packages
import requests
# initialize the Keras REST API endpoint URL along with the input
# image path
KERAS_REST_API_URL = "http://47.100.63.158/predict"
DATA_PATH = "test.txt"
# load the input image and construct the payload for the request
data = open(DAT... | 20.448276 | 65 | 0.735245 | # USAGE
# python simple_request.py
# import the necessary packages
import requests
# initialize the Keras REST API endpoint URL along with the input
# image path
KERAS_REST_API_URL = "http://47.100.63.158/predict"
DATA_PATH = "test.txt"
# load the input image and construct the payload for the request
data = open(DAT... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fd5447857ae6eaf9a6085ea3415264f4572fb96 | 9,854 | py | Python | faculdade2.0/aula 5/a.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | faculdade2.0/aula 5/a.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | faculdade2.0/aula 5/a.py | zmixtv1/cev-Python | edce04f86d943d9af070bf3c5e89575ff796ec9e | [
"MIT"
] | null | null | null | """ CEUB - Bacharelado em Cincia da Computao (BCC) - Prof. Barbosa
Teclas de atalho: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha.
Monitoria (planto de dvidas): https://monitoriaceub.github.io/Monitoria/index.html
- Com base nos conceitos de POO, implemente a entidade pessoa com e... | 63.987013 | 99 | 0.598234 | """ CEUB - Bacharelado em Ciência da Computação (BCC) - Prof. Barbosa
Teclas de atalho: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha.
Monitoria (plantão de dúvidas): https://monitoriaceub.github.io/Monitoria/index.html
- Com base nos conceitos de POO, implemente a entidade pessoa ... | 138 | 0 | 0 | 4,489 | 0 | 0 | 0 | 0 | 22 |
85ac389835d447e98bc73c29001a4edcceac45d0 | 3,824 | py | Python | Taxi/TaxiDataFormatter/dataformatter_v2.py | sachinumrao/Kaggle | 5a576d9db71197c95a601909abcbf4e91c10e4cb | [
"MIT"
] | null | null | null | Taxi/TaxiDataFormatter/dataformatter_v2.py | sachinumrao/Kaggle | 5a576d9db71197c95a601909abcbf4e91c10e4cb | [
"MIT"
] | null | null | null | Taxi/TaxiDataFormatter/dataformatter_v2.py | sachinumrao/Kaggle | 5a576d9db71197c95a601909abcbf4e91c10e4cb | [
"MIT"
] | null | null | null | from math import radians, cos, sin, asin, sqrt
def weekday(x):
"""
Figures out the day of the week. Outputs 1 for monday,2 for tuesday and so on.
"""
return (x.weekday()+1)
def is_weekend(x):
"""
Figures out if it was weekend. Outputs 0 or 1 for weekday or weekend.
"""
z = x.weekday()... | 30.83871 | 106 | 0.645921 | import pandas as pd
import numpy as np
from datetime import datetime
from math import radians, cos, sin, asin, sqrt
def __init__():
print("Using DataFormatter Class")
def weekday(x):
"""
Figures out the day of the week. Outputs 1 for monday,2 for tuesday and so on.
"""
return (x.weekday()+1)
def... | 0 | 0 | 0 | 0 | 0 | 2,451 | 0 | 3 | 112 |
39bb7a9dd4b2d29f8232d6c318d335dd5348357b | 982 | py | Python | ctf/migrations/0005_auto_20171220_1312.py | scnerd/pythonathon_v3 | 61548db58e3e3da501d9ea8b14240b5ff9deaea1 | [
"MIT"
] | null | null | null | ctf/migrations/0005_auto_20171220_1312.py | scnerd/pythonathon_v3 | 61548db58e3e3da501d9ea8b14240b5ff9deaea1 | [
"MIT"
] | 1 | 2018-04-27T21:53:32.000Z | 2018-04-27T21:53:32.000Z | ctf/migrations/0005_auto_20171220_1312.py | scnerd/pythonathon_v3 | 61548db58e3e3da501d9ea8b14240b5ff9deaea1 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2017-12-20 18:12
| 33.862069 | 145 | 0.642566 | # Generated by Django 2.0 on 2017-12-20 18:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('ctf', '0004_auto_20171220_... | 0 | 0 | 0 | 804 | 0 | 0 | 0 | 41 | 90 |
37c418fa3088177224da58f969f412828da3395f | 390 | py | Python | colatz.py | mbaykara/python_playground | f5bfd0b4ea8da73ba986b8984623d68036695677 | [
"MIT"
] | null | null | null | colatz.py | mbaykara/python_playground | f5bfd0b4ea8da73ba986b8984623d68036695677 | [
"MIT"
] | null | null | null | colatz.py | mbaykara/python_playground | f5bfd0b4ea8da73ba986b8984623d68036695677 | [
"MIT"
] | null | null | null | #task in automate boring stuff
print("Enter a number:")
try:
n = int(input())
cyclic(n)
except ValueError:
print("Unvalied value")
| 18.571429 | 32 | 0.502564 | #task in automate boring stuff
def cyclic(number):
if number % 2 == 0:
if number // 2 == 1:
print(1)
else:
print(number//2)
cyclic(number // 2)
else:
print((number * 3) + 1)
cyclic((number * 3) + 1)
print("Enter a number:")
try:
n = int(... | 0 | 0 | 0 | 0 | 0 | 222 | 0 | 0 | 23 |
4449a2e986cfd6ae011357bced8d18ba86ab207f | 956 | py | Python | get_data_users_github.py | Limarceu/get_data_users_github | 3da6936160fac7e57f67251c1f91c77c0f399350 | [
"MIT"
] | null | null | null | get_data_users_github.py | Limarceu/get_data_users_github | 3da6936160fac7e57f67251c1f91c77c0f399350 | [
"MIT"
] | null | null | null | get_data_users_github.py | Limarceu/get_data_users_github | 3da6936160fac7e57f67251c1f91c77c0f399350 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from PIL import Image
'''Some app that get requests from api.github.com/users'''
if __name__ == '__main__':
usuario = input('nome de usuario do github: ')
geral = get_usuario(usuario)
info = subs(usuario)
sz_info_subs = list(range(len(info)))
#Screen some main ... | 28.969697 | 167 | 0.676778 | import requests
from urllib.request import urlopen
from PIL import Image
'''Some app that get requests from api.github.com/users'''
def get_usuario(username):
return requests.get(f'https://api.github.com/users/{username}').json()
def subs(username):
return requests.get(get_usuario(username)['subscriptions_ur... | 4 | 0 | 0 | 0 | 0 | 153 | 0 | -6 | 68 |
a3dc817b69c50cbb1bb494a62a329e9559709259 | 13,534 | py | Python | doc/conf.py | Linus-Albertus/spyder-docs | ec623b6ecf71a19a342b07706cecb21f04538752 | [
"MIT"
] | 1 | 2021-06-20T14:52:38.000Z | 2021-06-20T14:52:38.000Z | doc/conf.py | juanis2112/spyder-docs | a3a579ce6e7e42c9d9bbd88ac4e76650b7093e5c | [
"MIT"
] | null | null | null | doc/conf.py | juanis2112/spyder-docs | a3a579ce6e7e42c9d9bbd88ac4e76650b7093e5c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Spyder documentation build configuration file, created by
# sphinx-quickstart on Fri Jul 10 16:32:25 2009.
#
# This file is execfile()d with the current directory set to its parent dir.
#
# This file does only contain a selection of the most common options. For a
# full list see the document... | 31.184332 | 79 | 0.663366 | # -*- coding: utf-8 -*-
#
# Spyder documentation build configuration file, created by
# sphinx-quickstart on Fri Jul 10 16:32:25 2009.
#
# This file is execfile()d with the current directory set to its parent dir.
#
# This file does only contain a selection of the most common options. For a
# full list see the document... | 0 | 0 | 0 | 1,330 | 0 | 89 | 0 | 16 | 92 |
c1a728a8a0bac12a1fc785907e6851187fb94874 | 7,560 | py | Python | src/forest3D/ground_removal.py | MarcFletcher-HQP/forest_3d_app | dc15c5d633b0f6e83620e2ed70e51e4c391c44ef | [
"MIT"
] | 30 | 2021-09-13T17:53:18.000Z | 2022-02-22T02:09:01.000Z | src/forest3D/ground_removal.py | MarcFletcher-HQP/forest_3d_app | dc15c5d633b0f6e83620e2ed70e51e4c391c44ef | [
"MIT"
] | null | null | null | src/forest3D/ground_removal.py | MarcFletcher-HQP/forest_3d_app | dc15c5d633b0f6e83620e2ed70e51e4c391c44ef | [
"MIT"
] | 10 | 2021-09-13T17:53:30.000Z | 2021-12-30T08:01:10.000Z | '''
Authors: Dr. Lloyd Windrim and Dr. Mitch Bryson
Required packages: numpy, scipy, scikit-learn
The primary purpose of this module is to remove and load the ground. The function removeGround() uses the TreePointCloud()
class to remove the ground from the input pointcloud, and save the ground as a mes... | 41.311475 | 126 | 0.578968 | '''
Authors: Dr. Lloyd Windrim and Dr. Mitch Bryson
Required packages: numpy, scipy, scikit-learn
The primary purpose of this module is to remove and load the ground. The function removeGround() uses the TreePointCloud()
class to remove the ground from the input pointcloud, and save the ground as a mes... | 0 | 0 | 0 | 4,808 | 0 | 1,947 | 0 | 27 | 178 |
783ef41a089477667a2ab5042f93601f4264255f | 3,260 | py | Python | opportunity/tests.py | imnotberg/crm | 03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef | [
"MIT"
] | 1 | 2019-06-12T19:40:20.000Z | 2019-06-12T19:40:20.000Z | opportunity/tests.py | teeso/Django-CRM | 03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef | [
"MIT"
] | null | null | null | opportunity/tests.py | teeso/Django-CRM | 03f3e82c9794b6a0f8aacceea7a644fdc8ff05ef | [
"MIT"
] | null | null | null |
# Create your tests here.
| 38.352941 | 79 | 0.647239 | from django.test import TestCase
from opportunity.models import Opportunity
from common.models import Address
from accounts.models import Account
from contacts.models import Contact
from common.models import User
from django.utils import timezone
# Create your tests here.
class OpportunityModel(object):
def set... | 0 | 0 | 0 | 2,889 | 0 | 0 | 0 | 93 | 246 |
0b2392f3f464330398bf29984118d858df60d10c | 12,730 | py | Python | editarticle.py | mgedigian/wikibots | 3e8fd8df17a3b5e45b29cb857881269027ca0a49 | [
"Unlicense"
] | 1 | 2016-05-09T03:32:08.000Z | 2016-05-09T03:32:08.000Z | editarticle.py | mgedigian/wikibots | 3e8fd8df17a3b5e45b29cb857881269027ca0a49 | [
"Unlicense"
] | null | null | null | editarticle.py | mgedigian/wikibots | 3e8fd8df17a3b5e45b29cb857881269027ca0a49 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
##
## modified to use mwclient
##
##
# Edit a Wikipedia article with your favourite editor.
#
# (C) Gerrit Holl 2004
# Distributed under the terms of the MIT license.
# Version 0.4.
#
# TODO: - non existing pages
# - edit conflicts
# - minor edits
# - watc... | 36.164773 | 116 | 0.584996 | #!/usr/bin/python
# -*- coding: utf-8 -*-
##
## modified to use mwclient
##
##
# Edit a Wikipedia article with your favourite editor.
#
# (C) Gerrit Holl 2004
# Distributed under the terms of the MIT license.
# Version 0.4.
#
# TODO: - non existing pages
# - edit conflicts
# - minor edits
# - watc... | 62 | 0 | 0 | 6,832 | 0 | 32 | 0 | 0 | 114 |
937fe607fffd5be85e64eeef02d2376219247c2f | 13,889 | py | Python | utils/tk/WeightedAggregatorOptionsDialog.py | jakub-tomczak/ror-gui | a4b6c8dd081fd845e255063d4bafe086e738e63f | [
"MIT"
] | null | null | null | utils/tk/WeightedAggregatorOptionsDialog.py | jakub-tomczak/ror-gui | a4b6c8dd081fd845e255063d4bafe086e738e63f | [
"MIT"
] | null | null | null | utils/tk/WeightedAggregatorOptionsDialog.py | jakub-tomczak/ror-gui | a4b6c8dd081fd845e255063d4bafe086e738e63f | [
"MIT"
] | null | null | null | from typing import List, Tuple
from collections import namedtuple
from utils.AlphaValueWithWeight import AlphaValueWithWeight
Coordinates = namedtuple('Coordinates', ['x', 'y'])
WeightedAggregatorOptionsDialogResult = Tuple[List[AlphaValueWithWeight], str]
| 49.427046 | 126 | 0.670315 | from functools import partial
import tkinter as tk
from tkinter import IntVar, StringVar, Variable, ttk
from typing import Callable, List, Tuple
from collections import namedtuple
from ror.ror_solver import TIE_RESOLVERS
from ror.WeightedResultAggregator import WeightedResultAggregator
from utils.AlphaValueWithWeight ... | 0 | 0 | 0 | 12,932 | 0 | 0 | 0 | 319 | 377 |
bba5ec5ee218ef30daab10fe172b51c78e3cf3a4 | 4,040 | py | Python | auto_encoder.py | kredy/Keras-Projects | 44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430 | [
"MIT"
] | 1 | 2021-06-30T13:25:35.000Z | 2021-06-30T13:25:35.000Z | auto_encoder.py | kredy/Keras-Projects | 44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430 | [
"MIT"
] | null | null | null | auto_encoder.py | kredy/Keras-Projects | 44c9a7b27f31a8d3eaa7b3bc7a0396d2eb0bf430 | [
"MIT"
] | 2 | 2020-08-04T01:52:55.000Z | 2021-03-16T19:12:20.000Z | '''
Convolutional autoencoder on MNIST dataset using Keras functional API
'''
from keras.callbacks import TensorBoard
# Parameters
batch_size = 128
epochs = 3
Tboard = TensorBoard(log_dir='./autoencoder_graph')
# Load the MNIST data
# Autoencoder
if __name__ == '__main__':
main()
| 35.438596 | 118 | 0.693069 | '''
Convolutional autoencoder on MNIST dataset using Keras functional API
'''
from keras.datasets import mnist
from keras.models import Model
from keras.layers import Activation, Input, BatchNormalization
from keras.layers import Conv2D, Conv2DTranspose
from keras.callbacks import TensorBoard
from keras.optimizers ... | 0 | 0 | 0 | 0 | 0 | 3,346 | 0 | 135 | 266 |
0cd1a75c0316d6f0f32d34938e3d344fa77e0ab9 | 2,838 | py | Python | tornado_layer/base_handler.py | sherry0429/TornadoLayer | c58f3bbd9f409fd8506f30d3002499b294ff7303 | [
"Apache-2.0"
] | null | null | null | tornado_layer/base_handler.py | sherry0429/TornadoLayer | c58f3bbd9f409fd8506f30d3002499b294ff7303 | [
"Apache-2.0"
] | null | null | null | tornado_layer/base_handler.py | sherry0429/TornadoLayer | c58f3bbd9f409fd8506f30d3002499b294ff7303 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython>
"""
| 28.959184 | 112 | 0.564482 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython>
"""
import logging
import tornado.web
import json
class MirrorBaseHttpHandler(tornado.web.RequestHandler):
"""
这个类是服务的底层抽象。
它将http的Get,Put,Post,Delete请求分别于四个服务函数关联。
业务逻辑不需要于此类打交道。
"""
logger = logging.getLo... | 519 | 0 | 0 | 2,503 | 0 | 0 | 0 | -20 | 89 |
368ac274bbbc027fc3d176461e7c1b9f34994217 | 406 | py | Python | nationalCSIRTs/csv2json.py | certat/contacts.cert.at | a14f855f1e51f650c19590a2784dfbb446e4064a | [
"BSD-3-Clause"
] | null | null | null | nationalCSIRTs/csv2json.py | certat/contacts.cert.at | a14f855f1e51f650c19590a2784dfbb446e4064a | [
"BSD-3-Clause"
] | 1 | 2019-08-08T11:06:03.000Z | 2019-08-08T13:42:45.000Z | nationalCSIRTs/csv2json.py | certat/contacts.cert.at | a14f855f1e51f650c19590a2784dfbb446e4064a | [
"BSD-3-Clause"
] | 1 | 2020-11-16T16:10:45.000Z | 2020-11-16T16:10:45.000Z | #!/usr/bin/env python
import csv
import sys
import json
print('[')
delim=';'
quotechar='"'
with sys.stdin as csvfile:
r = csv.DictReader(csvfile, delimiter=delim, quotechar=quotechar)
for row in r:
json.dump(row, sys.stdout)
sys.stdout.write(',\n')
print('{ "_meta": { "comment": "export of n... | 22.555556 | 128 | 0.662562 | #!/usr/bin/env python
import csv
import sys
import json
print('[')
delim=';'
quotechar='"'
with sys.stdin as csvfile:
r = csv.DictReader(csvfile, delimiter=delim, quotechar=quotechar)
for row in r:
json.dump(row, sys.stdout)
sys.stdout.write(',\n')
print('{ "_meta": { "comment": "export of n... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |