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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a1e0965849d574fe42bfa2715312122b0a5be353 | 1,156 | py | Python | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | 2 | 2022-02-11T17:47:38.000Z | 2022-02-11T21:13:36.000Z | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | null | null | null | nightcappackages/nightcappackages/classes/helpers/tmp_files.py | abaker2010/NightCAP | c58365a0e2ff1896ce0f8fbf2977b3e83feee1e2 | [
"MIT"
] | null | null | null | # Copyright 2020 by Aaron Baker.
# All rights reserved.
# This file is part of the Nightcap Project,
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
# region Imports
# endregion | 27.52381 | 75 | 0.649654 | # Copyright 2020 by Aaron Baker.
# All rights reserved.
# This file is part of the Nightcap Project,
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
# region Imports
import tempfile
import shutil
from nightcapcore import Printer
... | 0 | 0 | 0 | 771 | 0 | 0 | 0 | 6 | 111 |
89bbc81542526f853c976415f525c8b7b73f6e69 | 8,515 | py | Python | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null | Client/FTP-Client.py | Junaid-D/FTP-py | 2b9ff7abb5e390fc91be370889a43eec9c2eb08c | [
"MIT"
] | null | null | null |
ServerIP='127.0.0.1'
port = 4500
thisClient=FTPClient()
thisClient.run() | 32.011278 | 90 | 0.535878 | import socket
from tkinter import *
ServerIP='127.0.0.1'
port = 4500
class FTPClient():
def __init__(self):
self.conSoc=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
self.loggedIn=False
self.open=True
self.dataSoc=None
self.passiveIP=None
self.passivePort=None
... | 0 | 0 | 0 | 8,375 | 0 | 0 | 0 | -8 | 67 |
6a44978c2724514cf08af55c609ff36d4c533ac1 | 4,057 | py | Python | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 4,283 | 2015-01-02T03:56:10.000Z | 2022-03-29T23:07:45.000Z | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 14,014 | 2015-01-01T04:29:38.000Z | 2022-03-31T21:47:55.000Z | extensions/python/src/main/resources/jet_to_python_pb2.py | software-is-art/hazelcast | 7f785606f1093aa6f420147ca46dd0befe11c4b8 | [
"ECL-2.0",
"Apache-2.0"
] | 1,608 | 2015-01-04T09:57:08.000Z | 2022-03-31T12:05:26.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jet-to-python.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 30.051852 | 407 | 0.761647 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jet-to-python.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cabd551c543209c2d843f34d3e05a150bfc258e9 | 159 | py | Python | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | setup.py | plang85/hackathon2017-11 | 717d93cbf6c0d0e71e6a2f427b2e22760eeebf5c | [
"Unlicense"
] | null | null | null | from setuptools import setup
setup(name='hackathon',
install_requires=['pandas'],
extras_require={'test': ['pytest'],},
packages=['hackathon'])
| 19.875 | 43 | 0.666667 | from setuptools import setup
setup(name='hackathon',
install_requires=['pandas'],
extras_require={'test': ['pytest'],},
packages=['hackathon'])
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcf128319027f0a57916c9329dcf3057b808a2af | 2,033 | py | Python | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | rectround.py | pgalatic/zeitgeist | 9c74ead7fd3870f3f6d9fbafd96946ce131c8bd8 | [
"MIT"
] | null | null | null | #
# author: Paul Galatic
#
# This program is JUST for drawing a rounded rectangle.
#
def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)):
'''
Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawing-rounded-rectangle-with-gradient
'''
upper_left_point = xy[... | 29.897059 | 151 | 0.616331 | #
# author: Paul Galatic
#
# This program is JUST for drawing a rounded rectangle.
#
import pdb
from PIL import Image, ImageDraw
from extern import *
def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)):
'''
Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawin... | 0 | 0 | 0 | 0 | 0 | 409 | 0 | -1 | 92 |
86a6dbe707d06b0e60c73117110adb209c2be7ac | 7,823 | py | Python | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | 25 | 2019-07-17T10:25:22.000Z | 2022-03-30T15:37:59.000Z | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | null | null | null | data/myutils.py | vkazei/deeplogs | 4f6f853ce608a59e9d4b1a3160eb6b0035f333c0 | [
"MIT"
] | 16 | 2019-07-17T08:44:09.000Z | 2022-03-08T06:32:28.000Z | #%%
# utilities
import subprocess
import matplotlib.pyplot as plt
import numpy as np
import m8r as sf
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.interpolation import map_coordinates
from tensorflow.python.ops.image_ops_impl import _random_flip
const = _const()
#%%
def tf_random_flip_channels... | 33.865801 | 122 | 0.613959 | #%%
# utilities
import subprocess
import os
import matplotlib
import matplotlib.pyplot as plt
import time
import numpy as np
from numpy import linalg
import m8r as sf
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage.interpolation import map_coordinates
from tensorflow.python.ops.image_ops_impl impor... | 0 | 0 | 0 | 778 | 0 | 1,541 | 0 | -8 | 317 |
157703ab428c8c027e5a117c3b1641d7f72605b0 | 2,024 | py | Python | analog/tests/test_main.py | sitedata/analog | 29d3d5f41e7a4479d99296032b278f526f0c748d | [
"MIT"
] | 11 | 2015-02-27T16:04:50.000Z | 2021-08-27T23:51:11.000Z | analog/tests/test_main.py | fabianbuechler/analog | 4ee7a045717d7e2051ebe92d06cee89701291bff | [
"MIT"
] | 1 | 2020-12-29T16:10:55.000Z | 2021-01-01T17:37:25.000Z | analog/tests/test_main.py | sitedata/analog | 29d3d5f41e7a4479d99296032b278f526f0c748d | [
"MIT"
] | 2 | 2016-05-22T02:54:32.000Z | 2020-06-09T21:38:38.000Z | """Test the analog.main module and CLI."""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
try:
from unittest import mock
except ImportError:
import pytest
import analog
def test_help(capsys):
"""analog --help prints help and describes arguments.... | 29.333333 | 73 | 0.617589 | """Test the analog.main module and CLI."""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
try:
from unittest import mock
except ImportError:
import mock
import pytest
import analog
@pytest.fixture
def tmp_logfile(tmpdir):
"""Fixture creating ... | 0 | 866 | 0 | 0 | 0 | 0 | 0 | -10 | 72 |
a8ee691e6c4c3958a199f2a0524a8fb707e64970 | 9,917 | py | Python | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/util/util.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | '''Global Helpers'''
# pylint: disable=invalid-name,superfluous-parens,missing-docstring,wildcard-import,unused-wildcard-import
import os
import sys
import re
from shutil import copytree, rmtree
from configparser import ConfigParser
from PySide2 import QtGui
from src.globals import data
from src.gui.file_dialog impor... | 31.48254 | 106 | 0.609761 | '''Global Helpers'''
# pylint: disable=invalid-name,superfluous-parens,missing-docstring,wildcard-import,unused-wildcard-import
from sys import platform
import os
import sys
import re
import traceback
import webbrowser
import subprocess
from shutil import copytree, rmtree
from platform import python_version
from confi... | 0 | 0 | 0 | 0 | 0 | 5,965 | 0 | 172 | 668 |
eb3202558a1754995d72168519173bed7895d23a | 421 | py | Python | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 1,139 | 2019-03-24T09:09:05.000Z | 2022-03-27T14:54:38.000Z | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 78 | 2019-03-24T16:56:06.000Z | 2022-02-27T21:31:38.000Z | beagle/nodes/__init__.py | limkokhian/beagle | 791e83db94e5a8ab1965b155bb79d32bb259d2b3 | [
"MIT"
] | 149 | 2019-03-24T16:44:45.000Z | 2022-03-11T12:20:51.000Z | from __future__ import absolute_import
from .alert import Alert
from .domain import URI, Domain
from .file import File, FileOf
from .ip_address import IPAddress
from .node import Node
from .process import Process, SysMonProc
from .registry import RegistryKey
__all__ = [
"Node",
"URI",
"Domain",
"File... | 17.541667 | 40 | 0.679335 | from __future__ import absolute_import
from .alert import Alert
from .domain import URI, Domain
from .file import File, FileOf
from .ip_address import IPAddress
from .node import Node
from .process import Process, SysMonProc
from .registry import RegistryKey
__all__ = [
"Node",
"URI",
"Domain",
"File... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6239dc1e86fe07389cf63df6392bc8d72a0e1825 | 111 | py | Python | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 25 | 2020-05-14T13:25:42.000Z | 2021-11-09T10:09:27.000Z | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 19 | 2020-05-05T19:47:41.000Z | 2021-02-05T17:06:53.000Z | hmt/build/update_mode.py | dfioravanti/hmt | df79404076ec7acea0cfb12b636d58e3ffc83bc5 | [
"MIT"
] | 6 | 2020-05-16T10:02:48.000Z | 2021-10-04T08:03:49.000Z |
__all__ = ["UpdateMode"]
| 10.090909 | 28 | 0.603604 | import enum
class UpdateMode(enum.Enum):
GEN = 0
REPLAY = 1
MIXED = 2
__all__ = ["UpdateMode"]
| 0 | 0 | 0 | 48 | 0 | 0 | 0 | -10 | 45 |
23e6a1ec99527cce378215a514ba7467ba480ba4 | 720 | py | Python | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 3 | 2021-02-02T12:11:27.000Z | 2021-12-28T03:58:05.000Z | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 7 | 2020-12-11T00:44:52.000Z | 2022-03-01T18:00:00.000Z | py_convert/convertOfficeOsage.py | sven-oly/LanguageTools | 8c1e0bbae274232064e9796aa401c906797af452 | [
"Apache-2.0"
] | 3 | 2019-06-08T17:46:47.000Z | 2021-09-16T02:03:56.000Z | # -*- coding: utf-8 -*-
#
# Convert list of Office files (.docx, .xslx, .pptx) files from
# old text encoding to Unicode.
import sys
if __name__ == "__main__":
main(sys.argv)
| 20 | 69 | 0.661111 | # -*- coding: utf-8 -*-
#
# Convert list of Office files (.docx, .xslx, .pptx) files from
# old text encoding to Unicode.
import os
import re
import sys
import convertOffice
import osageConversion
import convertUtil
def main(argv):
args = convertUtil.parseArgs()
newUnicodeFont = "NotoSans-Regular"
print '*... | 0 | 0 | 0 | 0 | 0 | 431 | 0 | -27 | 136 |
963d158b9ada3a6c66832e3fa7f7b6169041484c | 822 | py | Python | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | 1 | 2021-04-20T13:22:17.000Z | 2021-04-20T13:22:17.000Z | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | null | null | null | Cankaoxiaoxi/article_spider.py | StevenChaoo/WebCrawler | 74711ac15b934b2e5a0eb663a0a2b6dd35050428 | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
import time
from bs4 import BeautifulSoup
from user_agents import agents
import requests
import random
import re
def get_article(url):
'''
:param url:
:return content: url
'''
agent = random.choice(agents)
header = {'User-Agent': agent}
res = requests.get(url, header... | 28.344828 | 56 | 0.618005 | #-*- coding:utf-8 -*-
import time
from bs4 import BeautifulSoup
from user_agents import agents
import requests
import random
import re
def get_article(url):
'''
:param url: 指定日期的链接
:return content: 指定url的正文内容
'''
agent = random.choice(agents)
header = {'User-Agent': agent}
res = requests.g... | 42 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
985b36fc0c9644840ca80d083631e6ddadc4631c | 331 | py | Python | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | aplicacion/migrations/0009_remove_producto_ruta.py | jffc-dev/Python-Django-Tecshop | c26ab6da20eca0483b900d253eacc37d2e8b1f26 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-13 17:40
| 18.388889 | 50 | 0.595166 | # Generated by Django 3.1.4 on 2021-01-13 17:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('aplicacion', '0008_auto_20210113_1701'),
]
operations = [
migrations.RemoveField(
model_name='producto',
name='ruta',
... | 0 | 0 | 0 | 225 | 0 | 0 | 0 | 11 | 46 |
bf9b5afa26e7111b3c8082256ea21298de72cc49 | 679 | py | Python | houdini/scripts/123.py | sashaouellet/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 7 | 2017-11-27T20:51:11.000Z | 2020-07-18T22:51:46.000Z | houdini/scripts/123.py | tws0002/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 7 | 2017-12-03T21:25:19.000Z | 2018-02-12T08:03:29.000Z | houdini/scripts/123.py | tws0002/SDMTools | edb529398b07a577a5492887fe840c6cfd891551 | [
"MIT"
] | 3 | 2018-04-27T02:45:28.000Z | 2020-02-15T14:12:45.000Z | import hdefereval
from sdm.houdini.shelves import addShelf
from sdm.houdini.node import applyDefaultShapesAndColors
hdefereval.executeDeferred(checkUpdates)
hdefereval.executeDeferred(addShelf)
hdefereval.executeDeferred(applyDefaultShapesAndColors)
| 26.115385 | 66 | 0.799705 | import os, json
import hdefereval
import sdm.houdini
from sdm.houdini.dialog import checkForUpdates
from sdm.houdini.shelves import addShelf
from sdm.houdini.node import applyDefaultShapesAndColors
def checkUpdates():
settingsPath = os.path.join(sdm.houdini.folder, 'settings.json')
if os.path.exists(settingsPath):... | 0 | 0 | 0 | 0 | 0 | 322 | 0 | 16 | 90 |
1412e20f7e6942a0802707fbdf32833a07c7b7bc | 477 | py | Python | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | 29 | 2020-04-15T09:24:56.000Z | 2021-09-18T04:04:55.000Z | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | null | null | null | main/main.py | WonderSeven/DSDA | 88266ea5dd53d918ba3cd74c7d6bbf431a134e95 | [
"MIT"
] | 5 | 2020-04-14T05:49:16.000Z | 2021-05-16T05:04:12.000Z | '''
@ Author: Tiexin
@ email: tiexinqin@163.com
@Data: 2019-8-14
'''
from engine.configs.parser import BaseOptions
# import engine.fsl_trainer as trainer
import engine.ssl_trainer as trainer
import sys
sys.dont_write_bytecode = True
try:
except ImportError: # will be 3.x series
pass
if __name__ == '__main__':
... | 17.666667 | 45 | 0.719078 | '''
@ Author: Tiexin
@ email: tiexinqin@163.com
@Data: 2019-8-14
'''
from engine.configs.parser import BaseOptions
# import engine.fsl_trainer as trainer
import engine.ssl_trainer as trainer
import sys
sys.dont_write_bytecode = True
try:
from itertools import izip as zip
except ImportError: # will be 3.x series... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 26 |
86ccc60f32ffaaf7bbedc36cb5aaff8ddc66686a | 284 | py | Python | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | q057.py | sjf/project_euler | 8514710e2018136ba8a087ae58cba35370700f6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import lib
n=1
d=1
i=0
N=1000
count = 0
while i < N+1:
#print(i,str(n)+'/'+str(d),n/d)
if (lib.num_digits(n) >lib.num_digits(d)):
count += 1
#term' = 1 + 1/(1+term)
n+= d #1 + term
n,d=d,n #1/(1+term)
n+= d #1+1/(1+term)
i+=1
print(count)
| 14.2 | 44 | 0.53169 | #!/usr/bin/env python3
import lib
n=1
d=1
i=0
N=1000
count = 0
while i < N+1:
#print(i,str(n)+'/'+str(d),n/d)
if (lib.num_digits(n) >lib.num_digits(d)):
count += 1
#term' = 1 + 1/(1+term)
n+= d #1 + term
n,d=d,n #1/(1+term)
n+= d #1+1/(1+term)
i+=1
print(count)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9e9d7ae49fb0318befe83eb1b65309eb9166fad | 7,052 | py | Python | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 4 | 2019-03-04T21:32:06.000Z | 2020-05-23T16:43:55.000Z | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 1 | 2019-03-04T21:34:52.000Z | 2019-04-19T14:58:45.000Z | Final.py | art-hack/Udemy_Coupon_Scraper | 19e5c1f3b1580524d7eef1d14fc0dfeb34a6bcb5 | [
"MIT"
] | 2 | 2019-04-20T10:39:34.000Z | 2020-11-24T19:45:32.000Z |
# function to scrape smartybro
# Code to scrape Anycouponcode.com
# function to scrape BuzzUdemy.com
# function to scrape Comidoc.com
# function to scrape coupontry.com
# function to scrape udemycoupon.learnviral
# function to scrape Udemycoupon.club
# function that sorts the function to be used
# Mai... | 32.953271 | 115 | 0.595576 | import csv
from bs4 import BeautifulSoup
import requests
# function to scrape smartybro
def smartybro(string):
page_response = requests.get(string, timeout=15)
if page_response.status_code == 200:
page_content = BeautifulSoup(page_response.content, "html.parser")
header = page_content.find_all... | 0 | 0 | 0 | 0 | 0 | 6,302 | 0 | -9 | 242 |
2e2ca5beb340b335f03d2f5021040e4b210ee236 | 1,068 | py | Python | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | radar_class/network.py | dishierweidu/LCR_1.0_Reappear | 329d4c80291c58d05fe3d6dab6dd09f41967ad08 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
default network class
'''
| 28.864865 | 131 | 0.650749 | # -*- coding: utf-8 -*-
'''
default network class
给神经网络类的接口格式定义,神经网络具体需要自行添加
'''
import pickle as pkl
class Predictor(object):
def __init__(self,weights = ""):
'''
对于示例类,不会提供神经网络预测功能,但对于我们提供的demo,可以加载pkl来获得实际的预测结果
:param weights:pkl文件的存放地址
'''
self._weights = weights
... | 717 | 0 | 0 | 729 | 0 | 0 | 0 | -1 | 45 |
070d03a595640cd657ae34d4b8d5115573a0f490 | 1,156 | py | Python | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | 12 | 2017-11-18T19:08:29.000Z | 2022-01-30T12:42:43.000Z | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | null | null | null | Chapter03/process_data.py | PacktPublishing/Practical-Data-Wrangling | a24caa61a2d5513947d79d78154699901ea75c3a | [
"MIT"
] | 10 | 2018-01-10T09:33:39.000Z | 2022-03-01T23:30:33.000Z | import json
######### OPEN AND READ THE DATA FILE ###########
inFile = open("data/scf_data.json","r")
scf_data = json.load(inFile)
# print(scf_data)
inFile.close()
############ DATA EXPLORATION #############
# dataType = str(type(scf_data))
# print("type of data: " + dataType)
# print("dictionary keys: " + str(scf_da... | 30.421053 | 81 | 0.657439 | import json
import pprint
######### OPEN AND READ THE DATA FILE ###########
inFile = open("data/scf_data.json","r")
scf_data = json.load(inFile)
# print(scf_data)
inFile.close()
############ DATA EXPLORATION #############
# dataType = str(type(scf_data))
# print("type of data: " + dataType)
# print("dictionary keys: ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8 | 22 |
07fe7f1caba5fdc28bcf5bfffb6d3bfc5316ec2e | 535 | py | Python | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | 1 | 2018-11-13T06:03:27.000Z | 2018-11-13T06:03:27.000Z | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | 10 | 2018-11-21T14:37:17.000Z | 2021-02-02T09:19:59.000Z | resources/migrations/0031_can_approve_reservation_permission.py | suutari-ai/respa | a944b1c13f855eaf5f883687b5fd025ece7c8176 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-24 11:51
from __future__ import unicode_literals
| 26.75 | 151 | 0.650467 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-24 11:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('resources', '0030_add_reservation_extra_fields'),
]
operations = [
migration... | 0 | 0 | 0 | 357 | 0 | 0 | 0 | 19 | 46 |
0a97ce568723f7a1e0016b1d3dbd189335dcdffa | 1,535 | py | Python | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | null | null | null | plgx-esp-ui/polylogyx/wrappers/v1/host_wrappers.py | eclecticiq/eiq-er-ce | ebb12d5c4e0ee144f8166576924b8ce8dc5dfc94 | [
"MIT"
] | 2 | 2021-11-12T10:25:02.000Z | 2022-03-30T06:33:52.000Z | from flask_restplus import fields
from polylogyx.blueprints.v1.external_api import api
# Node Wrappers
node_info_wrapper = api.model('node_info_wrapper', {
'computer_name': fields.String(),
'hardware_model': fields.String(),
'hardware_serial': fields.String(),
'hardware_vendor': fields.String(),
'p... | 34.111111 | 64 | 0.684039 | from flask_restplus import fields
from polylogyx.blueprints.v1.external_api import api
# Node Wrappers
node_info_wrapper = api.model('node_info_wrapper', {
'computer_name': fields.String(),
'hardware_model': fields.String(),
'hardware_serial': fields.String(),
'hardware_vendor': fields.String(),
'p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bfae2fc9aaa5732f8611fcd1cb8855def7a2b193 | 317 | py | Python | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | null | null | null | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | null | null | null | Taller_control_repeticion/Ejercicio_07.py | willingtonino/Algoritmos_programacion_C4G2 | 2a2c94678ae981974539a8019f17108775521e23 | [
"MIT"
] | 1 | 2021-10-31T22:54:45.000Z | 2021-10-31T22:54:45.000Z | """
Entradas
(X,M)-->int-->valores
Salida
Nueva experiencia Monster-->int-->E
"""
#Caja negra
while True:
#Entrada
valores=input("")
(X,M)=valores.split(" ")
X=int(X)
M=int(M)
#Caja negra
if (X==0) and M==0:
break
else:
E=X*M
#Salida
print(E) | 15.85 | 36 | 0.492114 | """
Entradas
(X,M)-->int-->valores
Salida
Nueva experiencia Monster-->int-->E
"""
#Caja negra
while True:
#Entrada
valores=input("")
(X,M)=valores.split(" ")
X=int(X)
M=int(M)
#Caja negra
if (X==0) and M==0:
break
else:
E=X*M
#Salida
print(E) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
abbe5fe994b9cb79caff3d7066a3820c28428e35 | 1,388 | py | Python | print_nodes.py | halfak/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | 5 | 2019-12-09T21:46:27.000Z | 2020-06-11T20:37:26.000Z | print_nodes.py | halfak/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | 1 | 2019-12-12T21:59:15.000Z | 2019-12-12T21:59:15.000Z | print_nodes.py | wikimedia/wikitax | acb084dc4f991d95dc08fdead19b50987ba968f4 | [
"MIT"
] | null | null | null | """
Print out the nodes of a taxonomy
Usage:
print_nodes (-h | help)
print_nodes <taxon>... [--debug]
Options:
-h --help Prints this documentation
<taxon> A yaml file containing partial or whole taxonomy. Multiple
files will be merged.
-d --debug Print log information... | 24.785714 | 77 | 0.643372 | """
Print out the nodes of a taxonomy
Usage:
print_nodes (-h | help)
print_nodes <taxon>... [--debug]
Options:
-h --help Prints this documentation
<taxon> A yaml file containing partial or whole taxonomy. Multiple
files will be merged.
-d --debug Print log information... | 0 | 0 | 0 | 0 | 262 | 529 | 0 | -14 | 114 |
223707c4094d91f8896a9078b5135ec648a3dfab | 7,166 | py | Python | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | django_project/app/machine_learning/main.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | #! -*- coding: utf-8 -*-
'''DeepLearning
DeepLearning
:
* env:
* fifo: FIFO
* result_dir:
* dataset:
* dataset_name: (Preset: MNIST, CIFAR-10)
* dataset_dir:
* norm: (max, max-min, z-score)
* data_augmentation: DataAugmentation
* rotation_range: [deg]
* width_shift_range: ... | 33.643192 | 106 | 0.695646 | #! -*- coding: utf-8 -*-
'''DeepLearning学習処理の実装サンプル
引数に指定する設定ファイルで指定されたパラメータに従い,DeepLearningモデルの学習を実行する実装サンプル.
設定ファイルで指定するパラメータ:
* env: 環境設定
* fifo: 学習制御用のFIFOパス
* result_dir: 結果を格納するディレクトリ
* dataset: データセット関連の設定
* dataset_name: データセット名(Preset: MNIST, CIFAR-10)
* dataset_dir: データセットを格納したディレクトリ
... | 1,185 | 0 | 0 | 0 | 0 | 5,162 | 0 | 128 | 268 |
1765ce72907a6de52506d4d106fa42031b5e1b1b | 11,580 | py | Python | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null | MLApplication.py | sakthianand7/Visualise-ML-Algorithms-results | 6a2123c1387db0bf86bc2c9a715283383d47a6bc | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 40.208333 | 123 | 0.69905 | import streamlit as slt
from sklearn.svm import SVC,SVR
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.ens... | 0 | 875 | 0 | 0 | 0 | 9,942 | 0 | 344 | 376 |
6d5562898a29341be645852f4693e6ca922f6165 | 6,234 | py | Python | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | 1 | 2015-02-28T21:25:54.000Z | 2015-02-28T21:25:54.000Z | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | null | null | null | pyaccords/pysrc/amazonEc2Act.py | MarouenMechtri/accords-platform-1 | 4f950fffd9fbbf911840cc5ad0fe5b5a331edf42 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#copyright 2012, Hamid MEDJAHED (hmedjahed@prologue.fr) Prologue #
#Licensed under the Apache License, Version 2.0 (the "License"); #
#you may not use this file except in compliance with the License. #
#You... | 89.057143 | 602 | 0.691209 | ##############################################################################
#copyright 2012, Hamid MEDJAHED (hmedjahed@prologue.fr) Prologue #
#Licensed under the Apache License, Version 2.0 (the "License"); #
#you may not use this file except in compliance with the License. #
#You... | 0 | 0 | 0 | 0 | 0 | 4,798 | 0 | 12 | 159 |
bc82892d2888cd197b6a33ea660137008f599f15 | 37,920 | py | Python | bot_ls.py | NikitaMikhailov/bot_herobot | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | null | null | null | bot_ls.py | NikitaMikhailov/bot_herobot | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | 6 | 2020-03-24T17:23:25.000Z | 2021-12-13T20:04:34.000Z | bot_ls.py | NikitaMikhailov/bot_herobot_ls | 4e462f622dd0ba67854b5e778efc86abab303bec | [
"MIT"
] | null | null | null | #!/usr/bin/env bash
#!/bin/bash
#!/bin/sh
#!/bin/sh -
from vk_api import VkUpload
from vk_api.bot_longpoll import VkBotLongPoll
from vk_api.keyboard import VkKeyboard, VkKeyboardColor
import requests, vk_api
dict = [".", ",", "!", "?", ")", "(", ":", ";", "'", ']', '[', '"']
dictan = [")", "(", ":", ";", "'", ']', '[... | 52.303448 | 231 | 0.390454 | #!/usr/bin/env bash
#!/bin/bash
#!/bin/sh
#!/bin/sh -
from vk_api.utils import get_random_id
from vk_api import VkUpload
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
from vk_api.keyboard import VkKeyboard, VkKeyboardColor
import random, requests, vk_api, os, bs4
from google_images_download import goog... | 5,036 | 0 | 0 | 0 | 0 | 32,592 | 0 | 84 | 180 |
9753e5f361d1334a73026196cb9f93a820bbcd37 | 183 | py | Python | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 4 | 2022-02-16T10:19:11.000Z | 2022-03-17T03:34:26.000Z | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 1 | 2022-02-17T14:02:31.000Z | 2022-03-31T03:56:42.000Z | passenger_wsgi.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 3 | 2022-02-17T06:13:52.000Z | 2022-03-23T21:37:21.000Z | import heckguide.wsgi
from whitenoise import WhiteNoise
application = heckguide.wsgi.application
application = WhiteNoise(application, root='/home/heckkciy/dev.heckguide.com/static') | 36.6 | 85 | 0.836066 | import heckguide.wsgi
from whitenoise import WhiteNoise
application = heckguide.wsgi.application
application = WhiteNoise(application, root='/home/heckkciy/dev.heckguide.com/static') | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2443e0ae12a68ea13caba68dcda33ae496994aee | 6,619 | py | Python | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | 1 | 2021-03-12T18:32:06.000Z | 2021-03-12T18:32:06.000Z | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | stanford/sms-tools/software/transformations_interface/hpsTransformations_function.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | # function call to the transformation functions of relevance for the hpsModel
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import get_window
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
sys.path.append(os.path.join(os.path.dirname(os.pa... | 35.586022 | 147 | 0.706149 | # function call to the transformation functions of relevance for the hpsModel
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import get_window
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
sys.path.append(os.path.join(os.path.dirname(os.pa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1680e18896f6f4ae0a5b62b3d8827f6c5f5db509 | 153 | py | Python | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 13 | 2017-08-22T12:26:07.000Z | 2021-07-29T16:13:50.000Z | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 1 | 2021-02-08T10:24:33.000Z | 2021-02-08T10:24:33.000Z | files/seeking.py | janbodnar/Python-Course | 51705ab5a2adef52bcdb99a800e94c0d67144a38 | [
"BSD-2-Clause"
] | 17 | 2018-08-13T11:10:33.000Z | 2021-07-29T16:14:02.000Z | #!/usr/bin/python
with open('works.txt', 'r') as f:
data1 = f.read(22)
print(data1)
f.seek(0, 0)
data2 = f.read(22)
print(data2)
| 12.75 | 33 | 0.542484 | #!/usr/bin/python
with open('works.txt', 'r') as f:
data1 = f.read(22)
print(data1)
f.seek(0, 0)
data2 = f.read(22)
print(data2)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
caabfd38ff62ea17041d4c129f3b961d4bd1e247 | 37 | py | Python | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | analysis/hello_world.py | goinvo/MAHealthIssues | d1f7e4cfeb1b48aa03f4cc2a8fa758afe3f6b8a5 | [
"MIT"
] | null | null | null | teststring ="hello"
print(teststring) | 18.5 | 19 | 0.810811 | teststring ="hello"
print(teststring) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
356e1b5e5b3c4424b8872304ce6c3695e3403f0f | 2,961 | py | Python | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | 1 | 2018-03-26T12:59:24.000Z | 2018-03-26T12:59:24.000Z | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | null | null | null | insights/parsers/tests/test_nfs_exports.py | sagaraivale/insights-core | 852a9669c998acf995e316bd407aeb4dbc6c485e | [
"Apache-2.0"
] | null | null | null |
EXPORTS = """
/home/utcs/shared/ro @rhtttttttttttt(ro,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash)
/home/insights/shared/rw @rhtttttttttttt(rw,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(ro,sync,no_root_squash)
/home/insights/shared/special/all/mail ... | 41.125 | 142 | 0.65282 | from insights.parsers.nfs_exports import NFSExports, NFSExportsD
from insights.tests import context_wrap
EXPORTS = """
/home/utcs/shared/ro @rhtttttttttttt(ro,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash)
/home/insights/shared/rw @rhtttttttttttt(rw,sync) ins1.example.com(r... | 0 | 0 | 0 | 0 | 0 | 1,953 | 0 | 61 | 182 |
52d1d36ea29df25496029ae68d491bcbcc3e65fb | 1,596 | py | Python | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 3 | 2016-11-11T06:11:03.000Z | 2021-09-12T22:13:51.000Z | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | null | null | null | DistributionTools/PEATDB/Linux/freeze.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 2 | 2016-02-15T16:10:36.000Z | 2018-02-27T10:33:21.000Z | #!/usr/bin/env python
#bbfreeze setup file for PEAT_DB distribution on Windows
#Damien Farrell, #October 2009
"""
This script can be used to create a standalone executable for
either windows or linux. It must be run on the target platform.
You will need to install bbfreeze, see http://pypi.python.org/pypi/bbf... | 29.555556 | 77 | 0.657268 | #!/usr/bin/env python
#bbfreeze setup file for PEAT_DB distribution on Windows
#Damien Farrell, #October 2009
"""
This script can be used to create a standalone executable for
either windows or linux. It must be run on the target platform.
You will need to install bbfreeze, see http://pypi.python.org/pypi/bbf... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 |
33bcfb0072c2489f5ef8239ee411e6decf69324d | 17,393 | py | Python | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | code/tutorials/exp_somb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | """
Pre-processing for mb_graph_batch.py of oriented membranes from TomoSegMemTV output
Input: - STAR file with 3 columns:
+ _rlnMicrographName: tomogram original
+ _rlnImageName: TomoSegMemTV density map output
+ _psSegLabel: (optional) label for membrane segm... | 44.943152 | 126 | 0.605933 | """
Pre-processing for mb_graph_batch.py of oriented membranes from TomoSegMemTV output
Input: - STAR file with 3 columns:
+ _rlnMicrographName: tomogram original
+ _rlnImageName: TomoSegMemTV density map output
+ _psSegLabel: (optional) label for membrane segm... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
3f641e924d35cf45792a5ad1e2f2a00da473b0f4 | 4,841 | py | Python | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null | LIBRAY_MANAGEMENT/Search.py | ShriyasnhAgarwl/Hacktoberfest | 5e8adf77a833f7b99dbddff92716e05641dac857 | [
"MIT"
] | null | null | null |
Sea().mainloop() | 50.957895 | 139 | 0.54121 | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import sqlite3
from sqlite3 import Error
class Sea(Tk):
def __init__(self):
super().__init__()
f = StringVar()
g = StringVar()
self.title("Search Book")
self.maxsize(800,500)
... | 0 | 0 | 0 | 4,673 | 0 | 0 | 0 | 8 | 140 |
138d2ee0e84e4a165e40f633daacadbbb9845045 | 8,958 | py | Python | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | smartsheet/types.py | abhijitmamarde/smartsheet-python-sdk | d0120f13e8681a39b1012df6088999a64d3d0dda | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C0111,R0902,R0913
# Smartsheet Python SDK.
#
# Copyright 2016 Smartsheet.com, 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/LICE... | 28.081505 | 102 | 0.59098 | # pylint: disable=C0111,R0902,R0913
# Smartsheet Python SDK.
#
# Copyright 2016 Smartsheet.com, 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/LICE... | 0 | 2,244 | 0 | 5,597 | 0 | 0 | 0 | 6 | 388 |
568a5b7446a765ab1575aff69cc8f331e6747a0a | 256 | py | Python | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 91 | 2020-05-26T05:54:51.000Z | 2022-03-09T07:33:44.000Z | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 12 | 2020-10-03T10:09:11.000Z | 2021-03-06T23:12:21.000Z | kora/install/orca.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 16 | 2020-07-07T18:39:29.000Z | 2021-03-06T03:46:49.000Z | import os
from urllib.request import urlretrieve
url = "https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage"
orca = '/usr/local/bin/orca'
urlretrieve(url, orca)
os.chmod(orca, 0o755)
os.system("apt install xvfb libgconf-2-4") | 36.571429 | 90 | 0.761719 | import os
from urllib.request import urlretrieve
url = "https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage"
orca = '/usr/local/bin/orca'
urlretrieve(url, orca)
os.chmod(orca, 0o755)
os.system("apt install xvfb libgconf-2-4") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a2ec11c81c067688541d020aa744bc48be5df2a | 242 | py | Python | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null | Graphs/topological ordering/testando.py | lucasEngdComp/graphs | da71f249c3ea0496f2a6a3695c66adeb4f3db43c | [
"MIT"
] | null | null | null |
g = Grafo([],[])
for i in ['9','8','7','2','11','5','3', '10']:
g.adiciona_vertice(i)
for i in ['7-11', '5-8', '3-11', '7-8', '8-9','11-10','11-2', '5-10']:
g.adiciona_aresta(i)
print(g)
print(g.dfs('7'))
| 17.285714 | 70 | 0.495868 | from grafo_adj import *
g = Grafo([],[])
for i in ['9','8','7','2','11','5','3', '10']:
g.adiciona_vertice(i)
for i in ['7-11', '5-8', '3-11', '7-8', '8-9','11-10','11-2', '5-10']:
g.adiciona_aresta(i)
print(g)
print(g.dfs('7'))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 22 |
826936876403864987eac829cc9201052b5fcae4 | 2,736 | py | Python | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | 2 | 2017-03-12T06:46:03.000Z | 2017-03-12T06:46:06.000Z | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | null | null | null | wordcount.py | conkytw/text-mining-wordcount | a10563bff9850eb5138c8c0d795ecb1ea3f846b9 | [
"MIT"
] | null | null | null | from collections import Counter
import nltk
from nltk.corpus import stopwords
stopwords = set(stopwords.words('english'))
# read sentence
lines = []
for line in open('building_global_community.txt'):
# delete the blank and line feed at the begining and end
line = line.strip()
# add processed line text in... | 30.4 | 102 | 0.684576 | from collections import Counter
import nltk
from nltk.corpus import stopwords
stopwords = set(stopwords.words('english'))
# read sentence
lines = []
for line in open('building_global_community.txt'):
# delete the blank and line feed at the begining and end
line = line.strip()
# add processed line text in... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
130b8dfa2bd0eeb1dd43758715ab9f4b20c54970 | 4,897 | py | Python | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_TFL/Recordifier.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2016 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | 32.430464 | 79 | 0.506228 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2016 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | 14 | 0 | 0 | 3,481 | 0 | 174 | 0 | 27 | 159 |
cddf6a78be18c0a440d59e0141c19012bfa11448 | 9,965 | py | Python | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | 2 | 2021-06-17T12:48:48.000Z | 2022-03-13T17:39:39.000Z | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | null | null | null | df2onehot/utils.py | erdogant/df2onehot | 0595f4f96b478d498876885fc53473f1195458a2 | [
"MIT"
] | null | null | null | """Various helper functions to set the dtypes."""
# ----------------------------------------------------
# Name : df2onehot.py
# Author : E.Taskesen
# Contact : erdogant@gmail.com
# github : https://github.com/erdogant/df2onehot
# Licence : MIT
# ------------------------------------------------... | 39.701195 | 199 | 0.560863 | """Various helper functions to set the dtypes."""
# ----------------------------------------------------
# Name : df2onehot.py
# Author : E.Taskesen
# Contact : erdogant@gmail.com
# github : https://github.com/erdogant/df2onehot
# Licence : MIT
# ------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 5,491 | 0 | 0 | 88 |
6faaed9836f82883490ceb00ff9ecdba6a7b7435 | 4,121 | py | Python | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | src/prototype/server.py | Ultra-Seven/newStream | 6ae7c152d33c0a0d02b44b13a45f72b20ba8ef16 | [
"MIT"
] | null | null | null | import flask
from sqlalchemy import create_engine
from flask import Flask
app = Flask(__name__)
#
# Global variables
#
flask.DEBUG = False
flask.val = 0
flask.dist = []
flask.dist_update_time = None
flask.queries = {}
flask.db = create_engine("postgresql://localhost/test")
flask.manager = Manager()
if __name__... | 26.248408 | 98 | 0.680175 | import random
import struct
import json
import flask
import time
import numpy as np
from collections import defaultdict
from threading import Thread
from Queue import Queue
from StringIO import StringIO
from sqlalchemy import create_engine
from flask import Flask, render_template, Response, request, stream_with_context... | 0 | 3,057 | 0 | 0 | 0 | 0 | 0 | 50 | 381 |
b0a76137ebb58a7a46f4264eb9d1190c8162f333 | 1,110 | py | Python | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | 3 | 2019-12-12T03:46:41.000Z | 2021-01-16T06:29:45.000Z | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | null | null | null | scripts/azAttrVisalizer.py | ejekt/rigging-system | dedf09cc832f56b310587b818deadfd4f8ca7b3b | [
"MIT"
] | null | null | null |
createVisualizerNodes()
| 34.6875 | 97 | 0.679279 | import maya.cmds as mc
def getAttrToGraph():
# returns attribute path if one is selected in the channelbox
selAttr = mc.channelBox('mainChannelBox', q=1, selectedMainAttributes=1)
if selAttr and len(selAttr) == 1:
selObj = mc.ls(sl=1)[-1]
attrPath = '{}.{}'.format(selObj, selAttr[0])
... | 0 | 0 | 0 | 0 | 0 | 1,013 | 0 | 1 | 68 |
ab546a4162bb56f06ce55dba8449286793acaa45 | 10,530 | py | Python | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null | main.py | jeremysuh/Wikipedia-Article-Comparator | c37d289d5063761f713d42d3db0c8c2073252170 | [
"MIT"
] | null | null | null |
from kivy.app import App
import matplotlib
matplotlib.rcParams.update({'font.size': 8})
app = WikipediaComparatorApp()
app.run() | 30.345821 | 129 | 0.596771 | import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, StringProperty
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image, AsyncImage
from kivy.uix.textinput import TextInput
from kivy.conf... | 0 | 0 | 0 | 9,685 | 0 | 0 | 0 | 287 | 422 |
7f14c7b9add693eca4ea3f8926c5b41bca78b3f7 | 22,022 | py | Python | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | tests/test_internals.py | ccaruceru/slack-multireact | 08b9018c25802d440876516d3469ddd3ad42e260 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for internals.py"""
# pylint: disable=attribute-defined-outside-init
| 45.219713 | 120 | 0.563164 | # -*- coding: utf-8 -*-
"""Tests for internals.py"""
from asyncio.tasks import Task
import os
import json
import sys
import unittest
import asyncio
import logging
from io import StringIO
from importlib import reload
from unittest.mock import AsyncMock, Mock, call, patch
from aiohttp.client_exceptions import ClientCon... | 0 | 10,618 | 3,487 | 6,939 | 0 | 0 | 0 | 357 | 513 |
2c7b34da71ec90cd5fdbc145e15b19d24623d2c5 | 812 | py | Python | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | api/api.py | idrissneumann/imalive | a5c4c9f34c9d2e2b24095a6558bcaca022297f26 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask_restful import Api
from multiprocessing import Process
from heartbit import heartbit
from api_health import HealthEndPoint
from api_manifest import ManifestEndPoint
from api_metrics import MetricsEndPoint
app = Flask(__name__)
api = Api(app)
async_process = Process(
target=hea... | 28 | 94 | 0.742611 | from flask import Flask
from flask_restful import Api
from multiprocessing import Process
from heartbit import heartbit
from api_health import HealthEndPoint
from api_manifest import ManifestEndPoint
from api_metrics import MetricsEndPoint
app = Flask(__name__)
api = Api(app)
async_process = Process(
target=hea... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a5ca672ff6b58ca59e41f14bb06794c17d777769 | 1,531 | py | Python | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | null | null | null | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | 2 | 2018-08-20T09:15:49.000Z | 2018-08-20T09:18:26.000Z | Field_D_main.py | McJones/Text2SATB | adfefb05daacf5ecde2be39890dfcdca9f034c15 | [
"MIT"
] | 1 | 2018-12-11T23:53:50.000Z | 2018-12-11T23:53:50.000Z |
ProgramID = "DF Word Score Sonifier v1.0"
WorkTitle = "Untitled Sonification"
Lyricist = ""
Input = DF_TextInput()
WorkTitle = Input.provideTitle()
Lyricist = Input.provideLyricist()
verses = Input.provideVerses()
positions = Input.providePositions()
scores = Input.provideScrabbleScores()
Planner = DF_Song... | 34.022222 | 68 | 0.793599 | from Field_D_SupportingClasses import *
ProgramID = "DF Word Score Sonifier v1.0"
WorkTitle = "Untitled Sonification"
Lyricist = ""
Input = DF_TextInput()
WorkTitle = Input.provideTitle()
Lyricist = Input.provideLyricist()
verses = Input.provideVerses()
positions = Input.providePositions()
scores = Input.p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 23 |
6320d6eba1e101f8a2417333f0da0649a54cd36f | 7,055 | py | Python | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 7 | 2018-02-10T22:57:28.000Z | 2020-11-20T14:46:18.000Z | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 5 | 2020-10-30T18:43:27.000Z | 2021-02-04T12:39:30.000Z | broker/libs/git.py | ebloc/eBlocBroker | 52d507835a0fe3c930df2e2c816724d26a3484a7 | [
"MIT"
] | 5 | 2017-07-06T14:14:13.000Z | 2019-02-22T14:40:16.000Z | #!/usr/bin/env python3
import os
import time
import git
from broker.config import env, logging
from broker.libs.ipfs import decrypt_using_gpg
from broker.utils import cd, is_gzip_file_empty, log, path_leaf, run
# from subprocess import CalledProcessError
def initialize_check(path):
""".git/ folder should exist... | 32.662037 | 105 | 0.591212 | #!/usr/bin/env python3
import gzip
import io
import os
import time
import git
from broker.config import env, logging
from broker.libs.ipfs import decrypt_using_gpg
from broker.utils import cd, is_gzip_file_empty, log, path_leaf, run
# from subprocess import CalledProcessError
def initialize_check(path):
""".g... | 0 | 0 | 0 | 0 | 0 | 3,198 | 0 | -22 | 206 |
fa106b624dcaed91c2eb981434a403060cd1c1fc | 1,763 | py | Python | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | cognite/v05/tagmatching.py | boyeah/cognite-sdk-python | 39abf5c98d758c59609cb33f5f3e2c009712005d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tag Matching Module
This module mirrors the Tag Matching API. It allows the user to search for tag id matches.
https://doc.cognitedata.com/0.5/#Cognite-API-Tag-Matching
"""
import cognite._utils as _utils
import cognite.config as config
from cognite.v05.dto import TagMatchingResponse
def ... | 41.97619 | 123 | 0.688032 | # -*- coding: utf-8 -*-
"""Tag Matching Module
This module mirrors the Tag Matching API. It allows the user to search for tag id matches.
https://doc.cognitedata.com/0.5/#Cognite-API-Tag-Matching
"""
import cognite._utils as _utils
import cognite.config as config
from cognite.v05.dto import TagMatchingResponse
def ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
96e189f608858537ed90f75689036cf2feaa0c16 | 5,464 | py | Python | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null | main.py | rmccaffr/IrishRailBot | bd346d157a41680d0fb13dd78f280bb8df34aa9a | [
"Apache-2.0"
] | null | null | null |
# for sending images
# standard app engine imports
import webapp2
TOKEN = '119152358:AAFvnvYU_5sxfTInk0LNQ55a_U5FMY3pyUo'
BASE_URL = 'https://api.telegram.org/bot' + TOKEN + '/'
# ================================
# ================================
# ================================
... | 32.52381 | 157 | 0.600842 | import StringIO
import json
import logging
import random
import urllib
import urllib2
from xml.dom import minidom
# for sending images
from PIL import Image
import multipart
# standard app engine imports
from google.appengine.api import urlfetch
from google.appengine.ext import ndb
import webapp2
TOKEN = '119152358:... | 0 | 0 | 0 | 4,373 | 0 | 195 | 0 | -10 | 403 |
579e371e955563dc8f4d6412367c0fd0a22213bb | 167 | py | Python | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | Exercicios Python/exlista01.py | oswaldo-spadari/Python-Exec | 3c3a237ed7c30af43f23a3619f6c6b92f6fcb12e | [
"MIT"
] | null | null | null | #Faa um Programa que leia um vetor de 5 nmeros inteiros e mostre-os.
lista=[]
for i in range(1, 6):
lista.append(int(input('Digite um nmero: ')))
print(lista)
| 23.857143 | 70 | 0.694611 | #Faça um Programa que leia um vetor de 5 números inteiros e mostre-os.
lista=[]
for i in range(1, 6):
lista.append(int(input('Digite um número: ')))
print(lista)
| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11667cf487b0c5ac83e5590cc9e8485871c9addb | 6,026 | py | Python | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null | ingestion/datasources/coinmarketcap.py | JesseCorrington/CryptoHypeTrader | 33f79251f5327d459818ab6d07f104b89596d3b3 | [
"MIT"
] | null | null | null |
# Provides access to coinmarketcap.com data, using the API when available,
# or web scraping when there is no public API
| 33.853933 | 124 | 0.559409 | import re
import datetime
from ingestion import datasource as ds
# Provides access to coinmarketcap.com data, using the API when available,
# or web scraping when there is no public API
class CoinList(ds.DataSource):
"""Used to get a list of all the coins on coinmarketcap"""
def __init__(self):
# l... | 0 | 0 | 0 | 5,742 | 0 | 0 | 0 | -1 | 158 |
2e11e28c5f1185cc9d68c8d87fd77f68ee0d1717 | 199 | py | Python | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 4 | 2018-11-01T14:24:06.000Z | 2021-02-16T18:25:16.000Z | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 1 | 2019-05-30T20:29:30.000Z | 2019-05-30T20:29:30.000Z | SCRIPTS/script14.py | oasys-kit/ShadowOui-Tutorial | 50e9416efdd57ffad11cb3c866aa143a9254bd33 | [
"MIT"
] | 5 | 2019-06-13T03:42:28.000Z | 2021-12-04T17:04:32.000Z | #create file myaperture.dat needed for source optimization
f = open("myaperture.dat",'w')
f.write(" 50.0 -0.002 0.002 -0.002 0.002")
f.close()
print("File written to disk: myaperture.dat")
| 33.166667 | 58 | 0.678392 | #create file myaperture.dat needed for source optimization
f = open("myaperture.dat",'w')
f.write(" 50.0 -0.002 0.002 -0.002 0.002")
f.close()
print("File written to disk: myaperture.dat")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f94d644e8fe326f1ac3d7e60411ecb5a9f795961 | 2,435 | py | Python | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 3 | 2021-04-02T14:35:17.000Z | 2022-03-04T14:40:26.000Z | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 1 | 2021-09-20T09:23:57.000Z | 2021-09-20T09:25:40.000Z | sql_app/schemas/schemas_invitation.py | l-vincent-l/fastapi-boilerplate | d9530e7f1d7fe4d79e11c08e0b86da6e62592f32 | [
"MIT"
] | 1 | 2022-01-21T16:27:14.000Z | 2022-01-21T16:27:14.000Z | print(">>>>>> import schemas_invitation.py > Invitation ...")
# from uuid import UUID
# print("=== SCH-schemas_invitation > InvitationBase : ", InvitationBase)
# class InvitationList(Invitation):
# pass
| 22.971698 | 92 | 0.765092 | print(">>>>>> import schemas_invitation.py > Invitation ...")
from typing import List, Optional, Any
import datetime
from pydantic import BaseModel, EmailStr
# from uuid import UUID
from .schemas_choices import ItemType, InvitationStatus, InviteeType, InvitationStatusAction
from .schemas_auths import AuthsInfosBasic... | 0 | 0 | 0 | 1,656 | 0 | 0 | 0 | 151 | 411 |
1c456142bbc95af7e87173cb0cb84afd5f28b013 | 929 | py | Python | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | interprete/src/models/gpt/example.py | serjtroshin/PLBART | 58e5de3041a2fc8b98e54648c6489fb3c23db9cb | [
"MIT"
] | null | null | null | # from transformers import pipeline
# generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
# generator("EleutherAI has", do_sample=True, min_length=50)
# [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
from transformers... | 42.227273 | 128 | 0.779333 | # from transformers import pipeline
# generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
# generator("EleutherAI has", do_sample=True, min_length=50)
# [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
from transformers... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f06f432978e16d74cb920eb585b1eabcd866ddb6 | 946 | py | Python | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | sheet.py | albertuscrs/atlink | 5ee1482871d5337214fa37ffc168766caaf01dba | [
"MIT"
] | null | null | null | import gspread
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime
import pytz
import locale
import sys
import process
sys.path.insert(0,'./process.py')
#set locale
locale.setlocale(locale.LC_TIME, 'id_ID.UTF-8')
#Set up credentials
scope = ["https://spreadsheets.google.co... | 30.516129 | 181 | 0.77907 | import gspread
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime
from pprint import pprint
import pytz
import locale
import sys
import process
sys.path.insert(0,'./process.py')
#set locale
locale.setlocale(locale.LC_TIME, 'id_ID.UTF-8')
#Set up credentials
scope = ["http... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 22 |
a255e4ef851b5ce35cf88229286c05b98240f3b3 | 4,433 | py | Python | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | tests/halfvec_cudatest.py | fthaler/dace | ba2b703f142c6b6d37c7ca3f20c268bc50c6c7a8 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
""" Tests for half-precision syntax quirks. """
import dace
import math
import numpy as np
from dace.transformation.dataflow import Vectorization
from dace.transformation.optimizer import Optimizer
N = dace.symbol('N')
def _test_half(veclen... | 30.572414 | 80 | 0.600947 | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
""" Tests for half-precision syntax quirks. """
import dace
import math
import numpy as np
from dace.transformation.dataflow import MapFusion, Vectorization
from dace.transformation.optimizer import Optimizer
N = dace.symbol('N')
def _test_... | 0 | 1,224 | 0 | 0 | 0 | 0 | 0 | 11 | 131 |
b558f4729be0aa98c2ad900457f20593df16d0f5 | 17,012 | py | Python | openerp/addons/mail/mail_mail.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | openerp/addons/mail/mail_mail.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | openerp/addons/mail/mail_mail.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | 51.087087 | 133 | 0.6081 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | 0 | 0 | 0 | 15,694 | 0 | 0 | 0 | 56 | 223 |
27acaab673252d4b7266cdbbc2d11f4abab7293b | 3,043 | py | Python | iconsdk/libs/in_memory_zip.py | geometry-labs/icon-sdk-python | e530df02eb16b394c3022d2d7d0383bd972e129a | [
"Apache-2.0"
] | 51 | 2018-08-29T04:15:36.000Z | 2022-03-14T10:02:08.000Z | iconsdk/libs/in_memory_zip.py | geometry-labs/icon-sdk-python | e530df02eb16b394c3022d2d7d0383bd972e129a | [
"Apache-2.0"
] | 24 | 2018-09-03T03:16:19.000Z | 2022-01-17T08:28:04.000Z | iconsdk/libs/in_memory_zip.py | geometry-labs/icon-sdk-python | e530df02eb16b394c3022d2d7d0383bd972e129a | [
"Apache-2.0"
] | 44 | 2018-09-06T22:36:16.000Z | 2022-03-15T06:46:05.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 34.191011 | 95 | 0.562603 | # -*- coding: utf-8 -*-
# Copyright 2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 0 | 154 | 0 | 1,647 | 0 | 0 | 0 | 27 | 68 |
c21fb14af02a04b30a0dc5a0c0615136eac0e954 | 381 | py | Python | CH01_Algorithm_ADS/1.11.Naming_a_slice.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | CH01_Algorithm_ADS/1.11.Naming_a_slice.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | CH01_Algorithm_ADS/1.11.Naming_a_slice.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | a = list(range(10))
slice1 = slice(0, 3)
slice2 = slice(4, 8)
print(a[slice1])
print(a[slice2])
a[slice2] = ["@", "#", "$", "%"]
print(a)
del a[slice1]
print(a)
print(f"slice start: {slice1.start}")
print(f"slice stop: {slice1.stop}")
print(f"slice step: {slice1.step}")
c = slice(0, 100, 3)
s = "0as0ef0df0vd0ef0d"
... | 17.318182 | 37 | 0.603675 | a = list(range(10))
slice1 = slice(0, 3)
slice2 = slice(4, 8)
print(a[slice1])
print(a[slice2])
a[slice2] = ["@", "#", "$", "%"]
print(a)
del a[slice1]
print(a)
print(f"slice start: {slice1.start}")
print(f"slice stop: {slice1.stop}")
print(f"slice step: {slice1.step}")
c = slice(0, 100, 3)
s = "0as0ef0df0vd0ef0d"
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d713f5b3fe1e13db25afe646381d31f344f05f8d | 2,293 | py | Python | provision/08-create-keystone-stuff.py | norcams/himlar-connect | 8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4 | [
"Apache-2.0"
] | null | null | null | provision/08-create-keystone-stuff.py | norcams/himlar-connect | 8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4 | [
"Apache-2.0"
] | 5 | 2015-12-10T07:48:20.000Z | 2016-03-16T09:44:42.000Z | provision/08-create-keystone-stuff.py | norcams/himlar-connect | 8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import ConfigParser
import requests
import json
cp = ConfigParser.SafeConfigParser()
cp.read('/etc/keystone/keystone.conf')
token = cp.get('DEFAULT', 'admin_token')
baseurl = 'http://localhost:35357/v3/OS-FEDERATION'
headers = {
'X-Auth-Token': token,
'Content-Type': 'application/json',... | 35.276923 | 92 | 0.63672 | #!/usr/bin/env python
import ConfigParser
import requests
import json
cp = ConfigParser.SafeConfigParser()
cp.read('/etc/keystone/keystone.conf')
token = cp.get('DEFAULT', 'admin_token')
baseurl = 'http://localhost:35357/v3/OS-FEDERATION'
headers = {
'X-Auth-Token': token,
'Content-Type': 'application/json',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
405a8cd18663f1cbb1ec07cd8a60a7e43de9624e | 650 | py | Python | model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py | monroid/openvino | 8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6 | [
"Apache-2.0"
] | 2,406 | 2020-04-22T15:47:54.000Z | 2022-03-31T10:27:37.000Z | model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 4,948 | 2020-04-22T15:12:39.000Z | 2022-03-31T18:45:42.000Z | model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 991 | 2020-04-23T18:21:09.000Z | 2022-03-31T18:40:57.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
| 29.545455 | 70 | 0.589231 | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from extensions.front.tf.concat_ext import ConcatFrontExtractor
from unit_tests.utils.extractors import PB, BaseExtractorsTestingClass
class ConcatExtractorTest(BaseExtractorsTestingClass):
def test_concat(self):
node = PB(... | 0 | 0 | 0 | 408 | 0 | 0 | 0 | 91 | 68 |
de2ba11bf8bbd61c7fd9256c51e91542ed514075 | 4,034 | bzl | Python | tools/project/build_defs.bzl | TokTok/toktok-stack | fe60e13d42d2b45e13ea4a9448a49925bc6a6d89 | [
"CNRI-Python",
"AML",
"Xnet",
"Linux-OpenIB",
"X11"
] | 12 | 2016-10-16T09:36:50.000Z | 2021-12-02T03:59:24.000Z | tools/project/build_defs.bzl | TokTok/toktok-stack | fe60e13d42d2b45e13ea4a9448a49925bc6a6d89 | [
"CNRI-Python",
"AML",
"Xnet",
"Linux-OpenIB",
"X11"
] | 218 | 2016-12-31T23:35:51.000Z | 2022-03-30T15:55:07.000Z | tools/project/build_defs.bzl | TokTok/toktok-stack | fe60e13d42d2b45e13ea4a9448a49925bc6a6d89 | [
"CNRI-Python",
"AML",
"Xnet",
"Linux-OpenIB",
"X11"
] | 6 | 2016-09-20T12:43:36.000Z | 2021-08-06T17:39:52.000Z | """Defines a project macro used in every TokTok sub-project.
It checks constraints such as the use of the correct license and the presence
and correctness of the license text.
"""
_haskell_travis = rule(
attrs = {
"package": attr.string(mandatory = True),
"_template": attr.label(
defau... | 27.256757 | 99 | 0.515865 | """Defines a project macro used in every TokTok sub-project.
It checks constraints such as the use of the correct license and the presence
and correctness of the license text.
"""
def _haskell_travis_impl(ctx):
ctx.actions.expand_template(
template = ctx.file._template,
output = ctx.outputs.source... | 0 | 0 | 0 | 0 | 0 | 2,133 | 0 | 0 | 69 |
242e324ff0c40c3ccd9b5370c481cb686b1eb1e8 | 7,658 | py | Python | daydayup_submit/model.py | daydayupPro/KDDCup2020_AutoGraph | 9ce2e6ecec50c4a6f99d832cd5f8370fe985a519 | [
"MIT"
] | 1 | 2020-06-16T00:03:50.000Z | 2020-06-16T00:03:50.000Z | daydayup_submit/model.py | daydayupPro/KDDCup2020_AutoGraph | 9ce2e6ecec50c4a6f99d832cd5f8370fe985a519 | [
"MIT"
] | 2 | 2020-06-16T00:05:46.000Z | 2020-11-10T11:17:17.000Z | daydayup_submit/model.py | daydayupPro/KDDCup2020_AutoGraph | 9ce2e6ecec50c4a6f99d832cd5f8370fe985a519 | [
"MIT"
] | 4 | 2020-06-11T07:17:11.000Z | 2020-06-16T00:05:50.000Z | """the simple baseline for autograph"""
import warnings
warnings.filterwarnings("ignore")
fix_seed(1234)
| 36.122642 | 217 | 0.57391 | """the simple baseline for autograph"""
import numpy as np
import pandas as pd
import torch
import torch.nn.functional as F
from torch.nn import Linear
from torch_geometric.nn import GCNConv, JumpingKnowledge
from torch_geometric.data import Data
from torch_geometric.nn import Node2Vec
from torch.utils.dat... | 0 | 0 | 0 | 6,653 | 0 | 161 | 0 | 224 | 499 |
58c5d7e9701ddb6a19212520e727f15050de1fcc | 4,412 | py | Python | E2E/utility/utility_np.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 26 | 2020-04-10T13:25:12.000Z | 2022-03-20T12:27:02.000Z | E2E/utility/utility_np.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 10 | 2020-04-05T10:42:47.000Z | 2022-03-12T00:12:23.000Z | E2E/utility/utility_np.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 5 | 2020-04-05T10:44:36.000Z | 2022-03-29T06:41:03.000Z | # -*- coding: utf-8 -*-
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA').
# All rights reserved.
# This work should only be used for nonprofit purposes.
#
# By downloading and/or u... | 36.46281 | 212 | 0.546464 | # -*- coding: utf-8 -*-
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA').
# All rights reserved.
# This work should only be used for nonprofit purposes.
#
# By downloading and/or u... | 0 | 0 | 0 | 0 | 0 | 3,550 | 0 | 66 | 190 |
685146d94e80465728e0ac16651b1e598592e6af | 46,188 | py | Python | sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 1 | 2020-10-05T08:53:57.000Z | 2020-10-05T08:53:57.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 17 | 2019-11-14T08:41:37.000Z | 2020-05-27T09:23:51.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=W0201
from Jumpscale import j
JSBASE = j.baseclasses.object
functions = {}
func = Functions()
functions[1] = func
func.guid = 1
func.name = "GeneralModuleStatus"
func.description = "General status of a module"
func.read = 1
func.write = 0
func.valDef = Value()
func.valDef.type = "TYPE_UNSIGNED_N... | 21.442897 | 257 | 0.720165 | # pylint: disable=W0201
from Jumpscale import j
JSBASE = j.baseclasses.object
class Value(j.baseclasses.object):
def __init__(self, initStr=None, **kwargs):
JSBASE.__init__(self)
# Initialize everything with None
self.fields = ("type", "size", "length", "unit", "version", "scale", "min", ... | 0 | 0 | 0 | 1,114 | 0 | 0 | 0 | 0 | 46 |
132be6fea7c50a7a170c4f9aa91f51ac86857654 | 576 | py | Python | Python/pyworkout/strings/ex7.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | Python/pyworkout/strings/ex7.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | 3 | 2020-03-24T16:26:35.000Z | 2020-04-15T19:40:41.000Z | Python/pyworkout/strings/ex7.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 20.571429 | 57 | 0.600694 | def ubbi_dubbi(
word: str
) -> str:
if len(word) == 0:
return word
vowels = {'a', 'e', 'i', 'o', 'u'}
translated_word_letters = []
for letter in word:
if letter.lower() in vowels:
prefix_to_add = 'ub'
translated_word_letters.append(prefix_to_add)
tra... | 0 | 0 | 0 | 0 | 0 | 490 | 0 | 0 | 45 |
6fd23260949277ea92d89c10373634f8d0942f55 | 228 | py | Python | app_backend/databases/bearing.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 1 | 2020-06-21T04:08:26.000Z | 2020-06-21T04:08:26.000Z | app_backend/databases/bearing.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 13 | 2019-10-18T17:19:32.000Z | 2022-01-13T00:44:43.000Z | app_backend/databases/bearing.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 5 | 2019-02-07T03:15:16.000Z | 2021-09-04T14:06:28.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: bearing.py
@time: 2020-02-29 23:23
"""
from flask_sqlalchemy import SQLAlchemy
from app_backend import app
db_bearing = SQLAlchemy(app)
| 13.411765 | 39 | 0.732456 | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: bearing.py
@time: 2020-02-29 23:23
"""
from flask_sqlalchemy import SQLAlchemy
from app_backend import app
db_bearing = SQLAlchemy(app)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
627df465bd86b19b5a94d072b880cccd05eaaae8 | 15,404 | py | Python | jukio/autoplay.py | tomow1/jukio | 5e3e8b06c1350d76c7d1a2e4cca7d9387687256e | [
"MIT"
] | null | null | null | jukio/autoplay.py | tomow1/jukio | 5e3e8b06c1350d76c7d1a2e4cca7d9387687256e | [
"MIT"
] | null | null | null | jukio/autoplay.py | tomow1/jukio | 5e3e8b06c1350d76c7d1a2e4cca7d9387687256e | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
'''
Keeps your MPD playlist filled with music you like
Dependencies : python-mpd
pysqlite
'''
import os
import mpd
import random
import sqlite3
import time
import io
import sys
import socket
## Config
playtime = 70 # Percentage of a song that must be pla... | 28.57885 | 91 | 0.573358 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
'''
Keeps your MPD playlist filled with music you like
Dependencies : python-mpd
pysqlite
'''
import os
import mpd
import random
import sqlite3
import time
import io
import sys
import socket
## Config
playtime = 70 # Percentage of a song that must be pla... | 2 | 0 | 0 | 0 | 0 | 11,555 | 0 | 0 | 344 |
dc4f791b106666858e2a4f2913316894e07b0ff6 | 2,528 | py | Python | igata/handlers/aws/output/sqs.py | kiconiaworks/igata | 1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a | [
"BSD-2-Clause"
] | 1 | 2021-12-31T14:29:44.000Z | 2021-12-31T14:29:44.000Z | igata/handlers/aws/output/sqs.py | kiconiaworks/igata | 1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a | [
"BSD-2-Clause"
] | 6 | 2019-11-25T04:20:26.000Z | 2021-12-13T05:23:16.000Z | igata/handlers/aws/output/sqs.py | kiconiaworks/igata | 1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a | [
"BSD-2-Clause"
] | null | null | null | import logging
import boto3
from .... import settings
logger = logging.getLogger("cliexecutor")
SQS = boto3.client("sqs", endpoint_url=settings.SQS_ENDPOINT, region_name="ap-northeast-1")
| 37.731343 | 142 | 0.676424 | import json
import logging
from collections import Counter
from typing import Union
import boto3
from .... import settings
from . import OutputCtxManagerBase
logger = logging.getLogger("cliexecutor")
SQS = boto3.client("sqs", endpoint_url=settings.SQS_ENDPOINT, region_name="ap-northeast-1")
class SQSRecordOutputCt... | 0 | 372 | 0 | 1,837 | 0 | 0 | 0 | 16 | 111 |
e9e1e37dad186954ae5ac1b1729fca8e3c617b7a | 1,768 | py | Python | capsule/net.py | VIVelev/capsnets | dca4bfcd4007977a6bc3534a4676880326fcf94a | [
"MIT"
] | null | null | null | capsule/net.py | VIVelev/capsnets | dca4bfcd4007977a6bc3534a4676880326fcf94a | [
"MIT"
] | null | null | null | capsule/net.py | VIVelev/capsnets | dca4bfcd4007977a6bc3534a4676880326fcf94a | [
"MIT"
] | 1 | 2019-11-03T09:39:49.000Z | 2019-11-03T09:39:49.000Z | import torch.nn as nn
__all__ = [
'CapsNet',
]
| 34 | 124 | 0.662896 | import torch
import torch.nn as nn
import torch.nn.functional as F
from .layers import ConvLayer, Decoder, DigitCaps, PrimaryCaps
__all__ = [
'CapsNet',
]
class CapsNet(nn.Module):
'''Capsule Network'''
def __init__(self, num_capsules=10, in_channels=1, num_inputs_per_capsule=32*6*6, out_dim=28*28,... | 0 | 695 | 0 | 888 | 0 | 0 | 0 | 42 | 90 |
b5c3cdefd2b6a2c429eb27b4ed87e962300b20ff | 17,030 | py | Python | codes/PrepareDataset.py | yanda-wang/ARMGA | f2dcade00b1271e5814dacaa2b6f9de63ea7077a | [
"BSD-3-Clause"
] | 4 | 2021-03-23T23:37:03.000Z | 2022-01-13T01:13:28.000Z | codes/PrepareDataset.py | yanda-wang/ARMGA | f2dcade00b1271e5814dacaa2b6f9de63ea7077a | [
"BSD-3-Clause"
] | null | null | null | codes/PrepareDataset.py | yanda-wang/ARMGA | f2dcade00b1271e5814dacaa2b6f9de63ea7077a | [
"BSD-3-Clause"
] | null | null | null |
med_file = 'data/PRESCRIPTIONS.csv'
diag_file = 'data/DIAGNOSES_ICD.csv'
procedure_file = 'data/PROCEDURES_ICD.csv'
ndc2atc_file = 'data/ndc2atc_level4.csv'
cid_atc = 'data/drug-atc.csv'
ndc2rxnorm_file = 'data/ndc2rxnorm_mapping.txt'
drug_ddi_file = 'data/drug-DDI.csv'
drug_stitch2atc_file = 'data/drug_stitch2atc.cs... | 41.740196 | 150 | 0.661362 | import csv
import dill
import itertools
import math
import pandas as pd
import numpy as np
from itertools import combinations
from sklearn.model_selection import train_test_split
from tqdm import tqdm
med_file = 'data/PRESCRIPTIONS.csv'
diag_file = 'data/DIAGNOSES_ICD.csv'
procedure_file = 'data/PROCEDURES_ICD.csv'
... | 39 | 0 | 0 | 549 | 0 | 14,746 | 0 | 3 | 522 |
77628e4e80f121e07de23f836240620bb990306b | 3,783 | py | Python | htmlfilter/__init__.py | samueladam/htmlfilter | 32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f | [
"BSD-3-Clause"
] | null | null | null | htmlfilter/__init__.py | samueladam/htmlfilter | 32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f | [
"BSD-3-Clause"
] | 1 | 2021-04-29T14:29:39.000Z | 2021-04-29T14:29:39.000Z | htmlfilter/__init__.py | samueladam/htmlfilter | 32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f | [
"BSD-3-Clause"
] | null | null | null | import re
attrs_re = re.compile(r"""\s*(\w+)\s*=\s*(["'])(.*?)(?<!\\)\2""", re.DOTALL)
| 32.059322 | 84 | 0.486651 | import re
from collections import defaultdict
import rules
attrs_re = re.compile(r"""\s*(\w+)\s*=\s*(["'])(.*?)(?<!\\)\2""", re.DOTALL)
class HTMLFilter:
"""Simple HTML white list filter.
Usage:
hf = HTMLFilter()
filtered_html = hf.filter(html)
The filter parses the code for < and > ch... | 0 | 0 | 0 | 3,621 | 0 | 0 | 0 | 5 | 68 |
c07709071c9f9eaa1f7eed96069e6eb047c7e7ba | 1,280 | py | Python | tools/funcutils.py | dineshjoshi/cassandra-dtest-1 | 18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c | [
"Apache-2.0"
] | 52 | 2015-02-13T15:49:03.000Z | 2020-11-15T10:59:20.000Z | tools/funcutils.py | dineshjoshi/cassandra-dtest-1 | 18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c | [
"Apache-2.0"
] | 1,232 | 2015-01-05T19:31:26.000Z | 2020-06-07T02:59:43.000Z | tools/funcutils.py | dineshjoshi/cassandra-dtest-1 | 18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c | [
"Apache-2.0"
] | 105 | 2017-07-13T14:28:14.000Z | 2022-03-23T04:22:46.000Z |
def merge_dicts(*dict_args):
"""
Given any number of dicts, shallow copy and merge into a new dict,
precedence goes to key value pairs in latter dicts.
"""
result = {}
for dictionary in dict_args:
result.update(dictionary)
return result
| 31.219512 | 90 | 0.645313 | import time
class get_rate_limited_function(object):
"""
Close over a function and a time limit in seconds. The resulting object can
be called like the function, but will not delegate to the function if that
function was called through the object in the time limit.
Clients can ignore the time lim... | 0 | 0 | 0 | 969 | 0 | 0 | 0 | -10 | 45 |
2ad4743e108cbde934ef319c28fa3ec378322843 | 780 | py | Python | jinja2_ospath/extensions.py | Midnighter/jinja2-ospath | 624aee8f552dd38d1eea97289e3ab194b105d843 | [
"BSD-3-Clause"
] | 6 | 2017-04-05T02:41:52.000Z | 2020-10-25T19:42:24.000Z | jinja2_ospath/extensions.py | Midnighter/jinja2-ospath | 624aee8f552dd38d1eea97289e3ab194b105d843 | [
"BSD-3-Clause"
] | null | null | null | jinja2_ospath/extensions.py | Midnighter/jinja2-ospath | 624aee8f552dd38d1eea97289e3ab194b105d843 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Extensions that introduce `basename` and `dirname` as Jinja2 filters.
Examples
--------
my_path = "/some/absolute/path/with/file.txt"
{{ my_path | basename }}
Will fill in `file.txt`.
"""
from __future__ import absolute_import
__all__ = ("OSPathExtension",)
| 22.941176 | 74 | 0.675641 | # -*- coding: utf-8 -*-
"""
Extensions that introduce `basename` and `dirname` as Jinja2 filters.
Examples
--------
my_path = "/some/absolute/path/with/file.txt"
{{ my_path | basename }}
Will fill in `file.txt`.
"""
from __future__ import absolute_import
import os.path
from jinja2.ext import Extension
_... | 0 | 0 | 0 | 406 | 0 | 0 | 0 | 4 | 69 |
3f7a9a00e6eb0b0cea9311cfb15837a64aaa0513 | 4,190 | py | Python | pytest_pdb.py | fschulze/pytest-pdb | 88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86 | [
"MIT"
] | 9 | 2016-07-09T12:22:57.000Z | 2019-11-11T17:50:38.000Z | pytest_pdb.py | fschulze/pytest-pdb | 88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86 | [
"MIT"
] | 9 | 2016-08-23T18:38:28.000Z | 2019-10-21T07:14:27.000Z | pytest_pdb.py | fschulze/pytest-pdb | 88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86 | [
"MIT"
] | 1 | 2017-01-16T17:55:52.000Z | 2017-01-16T17:55:52.000Z | from __future__ import print_function
| 28.120805 | 74 | 0.583055 | from __future__ import print_function
import pdb
import pytest
import sys
def find_test_by_frame(currentframe):
frame = currentframe
prev = frame
while frame:
for value in frame.f_locals.values():
if isinstance(value, pytest.Item):
return (value, prev)
prev = fr... | 0 | 0 | 0 | 1,387 | 0 | 2,537 | 0 | -30 | 250 |
90202dc319205aa9dfe44731814dba7ab2969a14 | 517 | py | Python | pct_python_default_test/pct_python_default_test.py | bitranox/pct_python_default_test | 1220b36c2fbc345fcabc43f0b9934db8415f682c | [
"MIT"
] | null | null | null | pct_python_default_test/pct_python_default_test.py | bitranox/pct_python_default_test | 1220b36c2fbc345fcabc43f0b9934db8415f682c | [
"MIT"
] | 1 | 2020-07-16T21:52:39.000Z | 2020-07-16T21:52:39.000Z | pct_python_default_test/pct_python_default_test.py | bitranox/pct_python_default_test | 1220b36c2fbc345fcabc43f0b9934db8415f682c | [
"MIT"
] | null | null | null | # STDLIB
import sys
# main{{{
def main() -> None:
"""
the main method, prints hello world
Parameter
----------
none
none
Result
----------
none
Exceptions
----------
none
Examples
----------
>>> main()
Hello World - by PizzaCutter
"""
... | 12.609756 | 111 | 0.524178 | # STDLIB
import sys
# main{{{
def main() -> None:
"""
the main method, prints hello world
Parameter
----------
none
none
Result
----------
none
Exceptions
----------
none
Examples
----------
>>> main()
Hello World - by PizzaCutter
"""
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b9598b4ab45217317e00c390d5206308d71afa14 | 18,121 | py | Python | _build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py | gcpeixoto/FMECD | 9bca72574c6630d1594396fffef31cfb8d58dec2 | [
"CC0-1.0"
] | null | null | null | _build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py | gcpeixoto/FMECD | 9bca72574c6630d1594396fffef31cfb8d58dec2 | [
"CC0-1.0"
] | null | null | null | _build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py | gcpeixoto/FMECD | 9bca72574c6630d1594396fffef31cfb8d58dec2 | [
"CC0-1.0"
] | null | null | null | # Plotagem bsica com _matplotlib_
## Visualizao de dados
A visualizao de dados um campo do conhecimento bastante antigo que foi trazido mostra muito recentemente com a expanso do "Big Data". Seu principal objetivo representar dados e informaes graficamente por meio de elementos visuais como tabelas, grficos, mapa... | 41.372146 | 825 | 0.698306 | # Plotagem básica com _matplotlib_
## Visualização de dados
A visualização de dados é um campo do conhecimento bastante antigo que foi trazido à mostra muito recentemente com a expansão do "Big Data". Seu principal objetivo é representar dados e informações graficamente por meio de elementos visuais como tabelas, gr... | 637 | 0 | 0 | 0 | 0 | 186 | 0 | 0 | 22 |
dbe37567374d909bfebaafcf8a547d45b740d7e5 | 10,249 | py | Python | character_tracker/character.py | mwalla/motw | b6e4eaaba46a4f7908db661c20498188f75a558c | [
"MIT"
] | null | null | null | character_tracker/character.py | mwalla/motw | b6e4eaaba46a4f7908db661c20498188f75a558c | [
"MIT"
] | null | null | null | character_tracker/character.py | mwalla/motw | b6e4eaaba46a4f7908db661c20498188f75a558c | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
pass
| 32.128527 | 99 | 0.54737 | from pprint import pprint as pp
from character_tracker.basic_moves import basic_moves
from character_tracker.roller import Roller
from character_tracker.utils import get_int_input, get_str_input
class Character(object):
"""A Monster of the Week game character.
"""
def __init__(self):
self.name =... | 0 | 2,712 | 0 | 7,280 | 0 | 0 | 0 | 107 | 111 |
6a08aded68a0728240f0327c01b6231d1050cb75 | 545 | py | Python | squalaetp/migrations/0013_auto_20191004_2034.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | squalaetp/migrations/0013_auto_20191004_2034.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | squalaetp/migrations/0013_auto_20191004_2034.py | Nels885/csd_dashboard | aa5a3b970c50a2a93af722f962bd87c3728f233c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-10-04 18:34
| 24.772727 | 89 | 0.588991 | # Generated by Django 2.2.5 on 2019-10-04 18:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('squalaetp', '0012_auto_20190829_1605'),
]
operations = [
migrations.AlterModelOptions(
name='corvet',
options={'ordering': [... | 2 | 0 | 0 | 438 | 0 | 0 | 0 | 11 | 46 |
fef2daf4a0ac0128aa8faa54a5ca0dfef20ab933 | 5,078 | py | Python | 2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py | Subaru-PFS/dev_pfsmodel | d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05 | [
"MIT"
] | null | null | null | 2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py | Subaru-PFS/dev_pfsmodel | d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05 | [
"MIT"
] | null | null | null | 2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py | Subaru-PFS/dev_pfsmodel | d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05 | [
"MIT"
] | null | null | null |
import numpy as np
def provide_PSF_2D(x=None,y=None,PSF_version=None):
""" Provides 2D PSF at any position in the detector plane
This a version which takes a finite nubmer of pregenerated PSF and \
creates the interpolated version at required position
(Future: version which takes interpola... | 52.350515 | 124 | 0.713864 |
import numpy as np
def provide_PSF_2D(x=None,y=None,PSF_version=None):
""" Provides 2D PSF at any position in the detector plane
This a version which takes a finite nubmer of pregenerated PSF and \
creates the interpolated version at required position
(Future: version which takes interpola... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
13933321fe38bfd9e54faf2a5d94361825a6d9ce | 155 | py | Python | Python/PieceOfCake/src/Main.py | Wabri/AKattisProblem | 3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf | [
"MIT"
] | 1 | 2019-03-06T09:24:37.000Z | 2019-03-06T09:24:37.000Z | Python/PieceOfCake/src/Main.py | Wabri/AKattisProblem | 3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf | [
"MIT"
] | null | null | null | Python/PieceOfCake/src/Main.py | Wabri/AKattisProblem | 3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf | [
"MIT"
] | 2 | 2021-05-05T12:01:05.000Z | 2021-09-10T18:35:09.000Z | import sys
for i in sys.stdin:
ab = i.split()
n = int(ab[0])
h = int(ab[1])
v = int(ab[2])
print(max(h, n - h) * max(v, n - v) * 4)
| 14.090909 | 44 | 0.451613 | import sys
for i in sys.stdin:
ab = i.split()
n = int(ab[0])
h = int(ab[1])
v = int(ab[2])
print(max(h, n - h) * max(v, n - v) * 4)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
315ff162a06104a8e332e3d340242a7318f868a6 | 21,635 | py | Python | eval.py | StolasIn/Lafite | a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371 | [
"MIT"
] | null | null | null | eval.py | StolasIn/Lafite | a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371 | [
"MIT"
] | null | null | null | eval.py | StolasIn/Lafite | a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371 | [
"MIT"
] | null | null | null | import numpy as np
import os
import warnings
import argparse
# ignore errors
warnings.filterwarnings('ignore')
# gen_model is used to get proper clip model for image genetate
gen_model_name = 'ViT-B/16'
# dis_model is used to grading an image and an text simularity
dis_model_name = 'ViT-L/14@336px'
# for verbose to... | 32.387725 | 121 | 0.611232 | import torch
import numpy as np
import pickle
import os
from PIL import Image
from pathlib import Path
from tqdm import tqdm
import dnnlib, legacy
import clip
import torch.nn.functional as F
import torchvision.transforms as T
import scipy
import warnings
import torchvision.models
from pymoo.core.problem import Problem
... | 0 | 0 | 0 | 3,024 | 0 | 14,260 | 0 | 229 | 1,182 |
efc216ee5e2342ef95305d4f352d31660f7facd5 | 726 | py | Python | ABC145/ABC145c.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC145/ABC145c.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC145/ABC145c.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | # ABC145c
if __name__ == '__main__':
main()
| 21.352941 | 77 | 0.53168 | # ABC145c
def main():
import sys
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
# map(int,input().split())
n = int(input())
town = [tuple(map(int, input().split())) for _ in range(n)]
ans = 0
def kyori(pos1, pos2):
return math.sqr... | 0 | 0 | 0 | 0 | 0 | 652 | 0 | 0 | 23 |
4fa93a39bffc9c6d90b2d240bb9e747e50e4cc00 | 4,269 | py | Python | blackjack.py | Alfredooe/twoplayerblackjack | 738858edd68b7de1834e53f86487e560bb9ed038 | [
"Unlicense"
] | null | null | null | blackjack.py | Alfredooe/twoplayerblackjack | 738858edd68b7de1834e53f86487e560bb9ed038 | [
"Unlicense"
] | null | null | null | blackjack.py | Alfredooe/twoplayerblackjack | 738858edd68b7de1834e53f86487e560bb9ed038 | [
"Unlicense"
] | null | null | null | #'random' library import
#rank list & suit dictionary
cardranks = ["Clubs", "Diamonds", "Hearts", "Spades"]
cardsuits = {"Ace":11, "One":1, "Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen":10, "King":10}
#player class w/ public attributes
#deck class genera... | 33.351563 | 156 | 0.585383 | #'random' library import
import random
#rank list & suit dictionary
cardranks = ["Clubs", "Diamonds", "Hearts", "Spades"]
cardsuits = {"Ace":11, "One":1, "Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen":10, "King":10}
#player class w/ public attributes
class... | 0 | 0 | 0 | 1,471 | 0 | 1,599 | 0 | -8 | 167 |
4c41018a3dbac3faca5ec4517af07bfca312b2a0 | 3,685 | py | Python | elementpath/regex/codepoints.py | sissaschool/elementpath | a74ce89c04622d8ae98ab739886c3e46f87b024e | [
"MIT"
] | 21 | 2019-10-02T18:36:16.000Z | 2022-03-14T15:46:00.000Z | elementpath/regex/codepoints.py | sissaschool/elementpath | a74ce89c04622d8ae98ab739886c3e46f87b024e | [
"MIT"
] | 32 | 2019-08-28T13:04:16.000Z | 2021-12-16T17:05:49.000Z | elementpath/regex/codepoints.py | sissaschool/elementpath | a74ce89c04622d8ae98ab739886c3e46f87b024e | [
"MIT"
] | 9 | 2019-08-28T11:24:49.000Z | 2022-01-12T23:53:28.000Z | #
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | 29.717742 | 93 | 0.609227 | #
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | 0 | 0 | 0 | 0 | 1,273 | 0 | 0 | 20 | 23 |
136655a1d66ff352e8605dae58e21ef5325cc3a5 | 2,834 | py | Python | deep_audio_features/bin/deep_retrieval_build_db.py | nikosmichas/deep_audio_features | ad45cd5681e1550481fdd10064ad2371b39ac05f | [
"MIT"
] | 40 | 2020-07-24T17:09:44.000Z | 2022-02-26T10:22:12.000Z | deep_audio_features/bin/deep_retrieval_build_db.py | nikosmichas/deep_audio_features | ad45cd5681e1550481fdd10064ad2371b39ac05f | [
"MIT"
] | 40 | 2020-07-20T17:21:20.000Z | 2022-01-28T23:02:07.000Z | deep_audio_features/bin/deep_retrieval_build_db.py | nikosmichas/deep_audio_features | ad45cd5681e1550481fdd10064ad2371b39ac05f | [
"MIT"
] | 5 | 2020-08-20T09:19:00.000Z | 2022-01-05T18:29:37.000Z | import argparse
import sys, os
sys.path.insert(0, os.path.join(
os.path.dirname(os.path.realpath(__file__)), "../../"))
import os
if __name__ == '__main__':
# Read arguments
parser = argparse.ArgumentParser()
parser.add_argument('-m', '--model_dir', required=True,
type=str, ... | 32.574713 | 84 | 0.659492 | import argparse
import torch
from torch.utils.data import DataLoader
import sys, os
sys.path.insert(0, os.path.join(
os.path.dirname(os.path.realpath(__file__)), "../../"))
from deep_audio_features.dataloading.dataloading import FeatureExtractorDataset
from deep_audio_features.lib.training import test
from deep_aud... | 0 | 0 | 0 | 0 | 0 | 1,778 | 0 | 168 | 289 |
cf3c76ac1491fa84c6c4aef6043115fded9327c2 | 15,383 | py | Python | v0.1/optim/optim.py | Chaowu88/etfba | bfba63685ca217937e32038cc55f530a4d980ad8 | [
"BSD-3-Clause"
] | null | null | null | v0.1/optim/optim.py | Chaowu88/etfba | bfba63685ca217937e32038cc55f530a4d980ad8 | [
"BSD-3-Clause"
] | null | null | null | v0.1/optim/optim.py | Chaowu88/etfba | bfba63685ca217937e32038cc55f530a4d980ad8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__ = 'Chao Wu'
R = 8.315e-3 # gas constant in kJ/mol/K
T = 298.15 # absolute temperature in K, or 25 C
K = 10000 # big enough constant
defaultMW = 40 # default enzyme molecular weight in kDa
defaultKcat = 200 # default reaction catalytic rate constant in ... | 30.222004 | 159 | 0.726581 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__ = 'Chao Wu'
R = 8.315e-3 # gas constant in kJ/mol/K
T = 298.15 # absolute temperature in K, or 25 C
K = 10000 # big enough constant
defaultMW = 40 # default enzyme molecular weight in kDa
defaultKcat = 200 # default reaction catalytic rate constant in ... | 0 | 78 | 0 | 14,556 | 0 | 0 | 0 | 168 | 159 |
c5d6bf89e462376e078860e14efcafac35041ceb | 7,921 | py | Python | dynamicgem/utils/ts_utils.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null | dynamicgem/utils/ts_utils.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null | dynamicgem/utils/ts_utils.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null |
# convert an array of values into a dataset matrix
| 38.451456 | 89 | 0.562681 | import numpy as np
from keras import backend as K
from keras.models import Sequential
from keras.layers import Dense, Bidirectional, LSTM, GRU
from keras.optimizers import Adam
from keras.callbacks import EarlyStopping
from keras.layers import Conv1D, MaxPooling1D
from time import time
import pandas as pd
def construc... | 0 | 0 | 0 | 0 | 0 | 7,493 | 0 | 109 | 266 |
44e4fc582229cc7f1dc265d8119e7fa52c25f0cd | 8,199 | py | Python | pytests/test_kn3_batching_topk.py | gauenk/faiss | f2b5891fb3dacb3caae862824bf72fa42ce77dca | [
"MIT"
] | null | null | null | pytests/test_kn3_batching_topk.py | gauenk/faiss | f2b5891fb3dacb3caae862824bf72fa42ce77dca | [
"MIT"
] | null | null | null | pytests/test_kn3_batching_topk.py | gauenk/faiss | f2b5891fb3dacb3caae862824bf72fa42ce77dca | [
"MIT"
] | null | null | null |
# -- python --
import numpy as np
from pathlib import Path
# -- vision --
# -- linalg --
# -- package helper imports --
# -- check if reordered --
SAVE_DIR = Path("./output/tests/")
#
#
# -- Primary Testing Class --
#
#
PYTEST_OUTPUT = Path("./pytests/output/")
| 30.479554 | 92 | 0.56702 |
# -- python --
import cv2,tqdm,copy
import numpy as np
import unittest
import tempfile
import sys
from einops import rearrange
import shutil
from pathlib import Path
from easydict import EasyDict as edict
# -- vision --
from PIL import Image
# -- linalg --
import torch as th
import numpy as np
# -- package helper i... | 0 | 0 | 0 | 6,631 | 0 | 910 | 0 | 11 | 378 |
052cd3f78110394dd7657e73f8d3f7bab57102d4 | 1,878 | py | Python | resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py | spatialthoughts/qgis-tutorials | dc1c6027de72e4875d8d5428fbc1f453b51e0468 | [
"CC-BY-4.0"
] | 34 | 2015-05-11T14:54:47.000Z | 2022-02-11T06:16:48.000Z | resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py | Santhosh-M31/qgis-tutorials | d22c534219689cff663b9b91b7d6e0e658f83b0d | [
"CC-BY-4.0"
] | 16 | 2016-04-20T10:52:10.000Z | 2022-01-08T13:57:11.000Z | resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py | Santhosh-M31/qgis-tutorials | d22c534219689cff663b9b91b7d6e0e658f83b0d | [
"CC-BY-4.0"
] | 34 | 2015-07-23T11:13:22.000Z | 2021-12-19T05:50:11.000Z | from PyQt4 import QtGui
zip_uri = '/vsizip/C:/Users/Ujaval/Downloads/tl_2013_06_tract.zip/tl_2013_06_tract.shp'
shp = QgsVectorLayer(zip_uri, 'tl_2013_06_tract', 'ogr')
QgsMapLayerRegistry.instance().addMapLayer(shp)
csv_uri = "file:///C:/Users/Ujaval/Downloads/ca_tracts_pop.csv?delimiter=,"
csv = QgsVectorLayer(csv_... | 28.029851 | 87 | 0.764643 | from PyQt4 import QtGui
zip_uri = '/vsizip/C:/Users/Ujaval/Downloads/tl_2013_06_tract.zip/tl_2013_06_tract.shp'
shp = QgsVectorLayer(zip_uri, 'tl_2013_06_tract', 'ogr')
QgsMapLayerRegistry.instance().addMapLayer(shp)
csv_uri = "file:///C:/Users/Ujaval/Downloads/ca_tracts_pop.csv?delimiter=,"
csv = QgsVectorLayer(csv_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9ca77146ed2bffe1b60cd117932ccb63e35a1f2 | 1,719 | py | Python | tests/utils/mindspore/nn/cell.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 216 | 2020-03-28T02:11:56.000Z | 2022-03-31T06:20:09.000Z | tests/utils/mindspore/nn/cell.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 13 | 2020-03-31T03:00:12.000Z | 2021-01-03T13:01:06.000Z | tests/utils/mindspore/nn/cell.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 21 | 2020-03-28T02:41:06.000Z | 2021-11-24T12:20:25.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 31.254545 | 78 | 0.658522 | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 | 161 | 0 | 729 | 0 | 0 | 0 | 14 | 91 |
dd72cf24d5f1b4236d53dfa74ea8753ce33e368d | 1,605 | py | Python | rosettautil/rosetta/weights.py | decarboxy/py_protein_utils | 4cbb5d6d3cf32d4240e0dc9b17e4330775663de0 | [
"MIT"
] | 10 | 2015-10-07T08:43:56.000Z | 2020-11-11T16:53:06.000Z | rosettautil/rosetta/weights.py | decarboxy/py_protein_utils | 4cbb5d6d3cf32d4240e0dc9b17e4330775663de0 | [
"MIT"
] | null | null | null | rosettautil/rosetta/weights.py | decarboxy/py_protein_utils | 4cbb5d6d3cf32d4240e0dc9b17e4330775663de0 | [
"MIT"
] | 3 | 2017-02-06T17:55:14.000Z | 2020-09-01T02:00:35.000Z | aa_codes_in_order = ["ALA","CYS","ASP","GLU","PHE","GLY","HIS","ILE","LYS","LEU","MET","ASN","PRO","GLN","ARG","SER","THR","VAL","TRP","TYR"]
| 33.4375 | 141 | 0.568224 | from rosettautil.util import fileutil
aa_codes_in_order = ["ALA","CYS","ASP","GLU","PHE","GLY","HIS","ILE","LYS","LEU","MET","ASN","PRO","GLN","ARG","SER","THR","VAL","TRP","TYR"]
class WeightFile:
def __init__(self):
self.ref_energies = {}
self.weights = {}
def read_file(self,filename):
... | 0 | 0 | 0 | 1,402 | 0 | 0 | 0 | 16 | 45 |
9d0df4002773c9b26be27fbcbcc0c6e20aec5740 | 9,347 | py | Python | bot/starpruuuft/agents/builder.py | PruuuGames/StarPruuuft | 865bc7f897ccb97d1ca4334ea7a1621a38285a35 | [
"MIT"
] | 1 | 2018-07-07T08:09:44.000Z | 2018-07-07T08:09:44.000Z | bot/starpruuuft/agents/builder.py | PruuuGames/StarPruuuft | 865bc7f897ccb97d1ca4334ea7a1621a38285a35 | [
"MIT"
] | null | null | null | bot/starpruuuft/agents/builder.py | PruuuGames/StarPruuuft | 865bc7f897ccb97d1ca4334ea7a1621a38285a35 | [
"MIT"
] | 2 | 2018-07-07T20:32:14.000Z | 2018-07-08T22:09:37.000Z | from .. import utilities
| 40.995614 | 119 | 0.650476 | from sc2.constants import *
from sc2.position import Point2
from bot.starpruuuft.agent_message import AgentMessage
from .agent import Agent
from .. import utilities
class BuilderAgent(Agent):
def __init__(self, bot):
super().__init__(bot)
self.add_message_handler(AgentMessage.ENEMIES... | 30 | 0 | 6,976 | 2,157 | 0 | 0 | 0 | 52 | 119 |
3d754a59567807b87116dad0f01ccd707b41b83e | 1,234 | py | Python | Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py | fakecoinbase/sweetpandslashAlgorithms | 9641e31320f17c6393b7746312c4b030a7faf015 | [
"MIT"
] | 3 | 2021-04-21T07:11:33.000Z | 2022-01-09T00:05:55.000Z | Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py | sweetpand/Algorithms | 2e4dcf2d42de25531fae5b4ec0d96ce100043117 | [
"MIT"
] | null | null | null | Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py | sweetpand/Algorithms | 2e4dcf2d42de25531fae5b4ec0d96ce100043117 | [
"MIT"
] | null | null | null | #Question: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.
#Solution: Traverse reverse in order, keep count of sums and adjust each node as needed
#Difficulty: Easy
#Note: Due... | 41.133333 | 203 | 0.669368 | from _DATATYPES import TreeNode
#Question: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.
#Solution: Traverse reverse in order, keep count of sums and adjust each node as nee... | 0 | 0 | 0 | 615 | 0 | 110 | 0 | 10 | 72 |
8ed9d98f22c3a8ee19702f3bce74fcc5516af642 | 1,326 | py | Python | tests/test_reslice_coarse.py | shuohan/improc3d | 178b91a73a8bb2fabf73ea2a6e9562c39a8299ca | [
"MIT"
] | null | null | null | tests/test_reslice_coarse.py | shuohan/improc3d | 178b91a73a8bb2fabf73ea2a6e9562c39a8299ca | [
"MIT"
] | null | null | null | tests/test_reslice_coarse.py | shuohan/improc3d | 178b91a73a8bb2fabf73ea2a6e9562c39a8299ca | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
from improc3d.reslice import reslice3d
from improc3d.reslice import transform_to_axial
from improc3d.reslice import transform_to_coronal
from improc3d.reslice import transform_to_sagittal
obj = nib.load('image1.nii.gz')
i... | 34 | 74 | 0.718703 | #!/usr/bin/env python
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
from improc3d.reslice import reslice3d, reslice3d_coarse
from improc3d.reslice import transform_to_axial
from improc3d.reslice import transform_to_coronal
from improc3d.reslice import transform_to_sagittal
obj = nib.load(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0 |
36cdd3c7289e7770798e8bfc35319a23737ceb61 | 135 | py | Python | atcoder_abc_abc124_d_400_handstand/src/gdbrc.py | miyagaw61/procon | fc00fb9f86dc24df97897a132382243525822500 | [
"MIT"
] | null | null | null | atcoder_abc_abc124_d_400_handstand/src/gdbrc.py | miyagaw61/procon | fc00fb9f86dc24df97897a132382243525822500 | [
"MIT"
] | null | null | null | atcoder_abc_abc124_d_400_handstand/src/gdbrc.py | miyagaw61/procon | fc00fb9f86dc24df97897a132382243525822500 | [
"MIT"
] | null | null | null | e = Exgdb()
c = ExgdbCmd()
#c.b('atcoder_abc_abc124_d_handstand::main')
c.b('main.rs:82')
gdb.execute('run')
gdb.execute('layout src')
| 19.285714 | 44 | 0.688889 | e = Exgdb()
c = ExgdbCmd()
#c.b('atcoder_abc_abc124_d_handstand::main')
c.b('main.rs:82')
gdb.execute('run')
gdb.execute('layout src')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5b1b776111a0fefa74b895cad563314d46989830 | 472 | py | Python | profileqc/routines/dependencies.py | sharksmhi/profileqc | dfc96445231ce1974be11536cf839299e908d231 | [
"MIT"
] | null | null | null | profileqc/routines/dependencies.py | sharksmhi/profileqc | dfc96445231ce1974be11536cf839299e908d231 | [
"MIT"
] | 1 | 2022-03-30T09:10:12.000Z | 2022-03-30T09:10:12.000Z | profileqc/routines/dependencies.py | sharksmhi/profileqc | dfc96445231ce1974be11536cf839299e908d231 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute.
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
"""
Created on 2020-07-08 13:19
@author: a002028
"""
| 23.6 | 79 | 0.639831 | #!/usr/bin/env python
# Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute.
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
"""
Created on 2020-07-08 13:19
@author: a002028
"""
class Dependencies:
"""Doc."""
def __init__(self, **kwargs):
"""Ini... | 2 | 0 | 0 | 213 | 0 | 0 | 0 | 0 | 23 |
77ff4f6c72e6b02b94290f2cb8fba003ddf0c962 | 1,727 | py | Python | arte/utils/multiton.py | ArcetriAdaptiveOptics/arte | 3d21ae59ba6490be3f52c7957f259097bb42f511 | [
"MIT"
] | 1 | 2021-01-11T20:01:29.000Z | 2021-01-11T20:01:29.000Z | arte/utils/multiton.py | ArcetriAdaptiveOptics/arte | 3d21ae59ba6490be3f52c7957f259097bb42f511 | [
"MIT"
] | 22 | 2020-04-15T15:48:14.000Z | 2021-07-09T07:57:37.000Z | arte/utils/multiton.py | ArcetriAdaptiveOptics/arte | 3d21ae59ba6490be3f52c7957f259097bb42f511 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#########################################################
#
# who when what
# -------- ---------- ---------------------------------
# apuglisi 2019-09-28 Created
#
#########################################################
def multiton(cls):
'''
Multiton decorator
... | 29.271186 | 65 | 0.583671 | # -*- coding: utf-8 -*-
#########################################################
#
# who when what
# -------- ---------- ---------------------------------
# apuglisi 2019-09-28 Created
#
#########################################################
def multiton(cls):
'''
Multiton decorator
... | 0 | 0 | 0 | 0 | 0 | 330 | 0 | 0 | 54 |
e23c6a492715258836584b050d10ded1372f53ed | 17,270 | py | Python | auv_simple_motion_planner/scripts/wp_depth_action_planner.py | Jollerprutt/smarc_missions | dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8 | [
"BSD-3-Clause"
] | null | null | null | auv_simple_motion_planner/scripts/wp_depth_action_planner.py | Jollerprutt/smarc_missions | dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8 | [
"BSD-3-Clause"
] | null | null | null | auv_simple_motion_planner/scripts/wp_depth_action_planner.py | Jollerprutt/smarc_missions | dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright 2018 Nils Bore, Sriharsha Bhat (nbore@kth.se, svbhat@kth.se)
#
# 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, thi... | 45.809019 | 757 | 0.666589 | #!/usr/bin/python
# Copyright 2018 Nils Bore, Sriharsha Bhat (nbore@kth.se, svbhat@kth.se)
#
# 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, thi... | 0 | 0 | 0 | 15,033 | 0 | 0 | 0 | 206 | 310 |