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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f28f4794270e60e2d93c11f604270b06bd3f6e8a | 934 | py | Python | src/example/getData.py | tedmundtan/Unicorn11 | 70657f227031d9e6e94e3fb98e71573c7e4ee9a9 | [
"Apache-2.0"
] | null | null | null | src/example/getData.py | tedmundtan/Unicorn11 | 70657f227031d9e6e94e3fb98e71573c7e4ee9a9 | [
"Apache-2.0"
] | null | null | null | src/example/getData.py | tedmundtan/Unicorn11 | 70657f227031d9e6e94e3fb98e71573c7e4ee9a9 | [
"Apache-2.0"
] | 1 | 2019-03-31T04:11:26.000Z | 2019-03-31T04:11:26.000Z | import requests
import json
url = "http://api-gateway-dbs-techtrek.ap-southeast-1.elasticbeanstalk.com/transactions/10"
querystring = {"from":"01-01-2019","to":"01-31-2019"}
payload = ""
headers = {
'identity': "Group11",
'token': "bf38d9ac-fade-40ef-b7d2-eabdb183acce",
'cache-control': "no-cache",
'P... | 25.944444 | 91 | 0.67666 | import requests
import json
import datetime
url = "http://api-gateway-dbs-techtrek.ap-southeast-1.elasticbeanstalk.com/transactions/10"
querystring = {"from":"01-01-2019","to":"01-31-2019"}
payload = ""
headers = {
'identity': "Group11",
'token': "bf38d9ac-fade-40ef-b7d2-eabdb183acce",
'cache-control': "... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -6 | 23 |
808cfc412896d3017e6baf154486668b50e73754 | 160 | py | Python | GodwillOnyewuchi/Phase 1/Python Basic 2/day 3 task/task 2.py | nkem1010/python-challenge-solutions | 203cedc691094a83b110fc75764aac51dbbc1a03 | [
"MIT"
] | 1 | 2020-05-15T21:27:45.000Z | 2020-05-15T21:27:45.000Z | GodwillOnyewuchi/Phase 1/Python Basic 2/day 3 task/task 2.py | GREENFONTS/python-challenge-solutions | a9aad85a250892fe41961a7d5e77f67b8d14fc1b | [
"MIT"
] | null | null | null | GodwillOnyewuchi/Phase 1/Python Basic 2/day 3 task/task 2.py | GREENFONTS/python-challenge-solutions | a9aad85a250892fe41961a7d5e77f67b8d14fc1b | [
"MIT"
] | null | null | null | import calendar
month = int(input("Enter the month: "))
year = int(input("Enter the year: "))
Calendar = calendar.month(year, month)
print(Calendar) | 26.666667 | 43 | 0.66875 | import calendar
month = int(input("Enter the month: "))
year = int(input("Enter the year: "))
Calendar = calendar.month(year, month)
print(Calendar) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
662c2653232d2c1aaf5f7bb0e8e5194ff28b2deb | 2,739 | py | Python | pysimplegui/DemoPrograms/Demo_Script_Launcher.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | null | null | null | pysimplegui/DemoPrograms/Demo_Script_Launcher.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | 2 | 2020-06-06T00:30:56.000Z | 2021-06-10T22:30:37.000Z | pysimplegui/DemoPrograms/Demo_Script_Launcher.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
LOCATION_OF_YOUR_SCRIPTS = ''
# Execute the command. Will not see the output from the command until it completes.
# Executes command and immediately returns. Will not see anything the script outputs
if __name__ == '__main__':
Launcher2()
| 31.482759 | 97 | 0.581599 | #!/usr/bin/env python
import PySimpleGUI as sg
import glob
import ntpath
import subprocess
LOCATION_OF_YOUR_SCRIPTS = ''
# Execute the command. Will not see the output from the command until it completes.
def execute_command_blocking(command, *args):
expanded_args = []
for a in args:
expanded_args.... | 0 | 0 | 0 | 0 | 0 | 2,327 | 0 | -19 | 157 |
fe989b90d8372c6d7531553b906b561b05f3b23f | 4,239 | py | Python | library/src/webapp/editor/FCKeditor/editor/filemanager/connectors/py/connector.py | RyanAFinney/sakai | 872181852ddb27b503f1d614104d964bb56e7a6b | [
"ECL-2.0"
] | 7 | 2016-10-25T13:55:20.000Z | 2018-04-18T00:37:20.000Z | reference/library/src/webapp/editor/FCKeditor/editor/filemanager/connectors/py/connector.py | DukeLearningInnovation/sakai | b61a551fc9185366d790043770912c1c0874b8c4 | [
"ECL-2.0"
] | 216 | 2016-06-23T14:02:32.000Z | 2021-08-31T17:11:24.000Z | reference/library/src/webapp/editor/FCKeditor/editor/filemanager/connectors/py/connector.py | DukeLearningInnovation/sakai | b61a551fc9185366d790043770912c1c0874b8c4 | [
"ECL-2.0"
] | 4 | 2016-07-26T07:23:42.000Z | 2020-10-07T12:21:53.000Z | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | 34.745902 | 206 | 0.712904 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | 0 | 0 | 0 | 2,910 | 0 | 0 | 0 | 6 | 173 |
9f5d722c43a70179580f6807ce9858f073789755 | 1,923 | py | Python | LIM_scripts/stationTimings/examples/save_pulseByLoc.py | Bhare8972/LOFAR-LIM | 89f25be8c02cb8980c2e237da3eaac279d40a06a | [
"MIT"
] | 3 | 2019-04-21T13:13:02.000Z | 2020-10-15T12:44:23.000Z | LIM_scripts/stationTimings/examples/save_pulseByLoc.py | Bhare8972/LOFAR-LIM | 89f25be8c02cb8980c2e237da3eaac279d40a06a | [
"MIT"
] | null | null | null | LIM_scripts/stationTimings/examples/save_pulseByLoc.py | Bhare8972/LOFAR-LIM | 89f25be8c02cb8980c2e237da3eaac279d40a06a | [
"MIT"
] | 2 | 2018-11-06T18:34:33.000Z | 2019-04-04T14:16:57.000Z | #!/usr/bin/env python3
from LoLIM.stationTimings.autoCorrelator3_fromLOC import save_EventByLoc
## these lines are anachronistic and should be fixed at some point
from LoLIM import utilities
utilities.default_raw_data_loc = "/exp_app2/appexp1/public/raw_data"
utilities.default_processed_data_loc = "/home/brian/proces... | 33.736842 | 101 | 0.630265 | #!/usr/bin/env python3
from LoLIM.stationTimings.autoCorrelator3_fromLOC import save_EventByLoc
## these lines are anachronistic and should be fixed at some point
from LoLIM import utilities
utilities.default_raw_data_loc = "/exp_app2/appexp1/public/raw_data"
utilities.default_processed_data_loc = "/home/brian/proces... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
347674bb1190a28786f2bed1e3677dedc099061f | 3,571 | py | Python | tmslack/cache.py | arodioukov/tmslack | 65ffc864b6a872b732ae56e9be82ddba31c3fc12 | [
"Apache-2.0"
] | 1 | 2019-01-22T17:36:04.000Z | 2019-01-22T17:36:04.000Z | tmslack/cache.py | arodioukov/tmslack | 65ffc864b6a872b732ae56e9be82ddba31c3fc12 | [
"Apache-2.0"
] | null | null | null | tmslack/cache.py | arodioukov/tmslack | 65ffc864b6a872b732ae56e9be82ddba31c3fc12 | [
"Apache-2.0"
] | 3 | 2019-01-22T17:37:08.000Z | 2019-02-16T18:12:38.000Z | """Maintains a cache in a file.
In general, the idea is that cache acts as a map. However, any time a modification to the map
is made, it is immediately saved to disk. The format of caches is considered an implementation
detail.
"""
from pathlib import Path
import pickle
def _ensure_cache_file(path: Path):
""... | 29.03252 | 95 | 0.588071 | """Maintains a cache in a file.
In general, the idea is that cache acts as a map. However, any time a modification to the map
is made, it is immediately saved to disk. The format of caches is considered an implementation
detail.
"""
from pathlib import Path
import pickle
def _ensure_cache_file(path: Path):
""... | 0 | 106 | 0 | 2,691 | 0 | 0 | 0 | 0 | 23 |
5d4714075d0412bc271152262685208e34bc592e | 22,730 | py | Python | tests.py | edaleeta/yet-another-twitch-toolkit | 48d7107cf606842ae77c7afcb92ad68cc4b3827c | [
"MIT"
] | 3 | 2018-02-22T04:59:12.000Z | 2018-04-18T17:42:24.000Z | tests.py | edaleeta/yet-another-twitch-toolkit | 48d7107cf606842ae77c7afcb92ad68cc4b3827c | [
"MIT"
] | 1 | 2020-07-07T20:10:11.000Z | 2020-07-07T20:10:11.000Z | tests.py | edaleeta/yet-another-twitch-toolkit | 48d7107cf606842ae77c7afcb92ad68cc4b3827c | [
"MIT"
] | null | null | null | """Tests for Yet Another Twitch Toolkit."""
###############################################################################
# MODEL TESTS
###############################################################################
###############################################################################
# TEMPLATE HEL... | 34.077961 | 79 | 0.592213 | """Tests for Yet Another Twitch Toolkit."""
from unittest import TestCase, mock
from io import StringIO
import datetime
import sqlalchemy
import server as s
import model as m
from model import connect_to_db, db
from seed_testdb import sample_data
import template_helpers as temp_help
import twitch_helpers
############... | 0 | 302 | 0 | 21,549 | 0 | 0 | 0 | 42 | 358 |
fbe0ff65b523cbdcdbf96c28441823054fdb2b88 | 8,930 | py | Python | api/kme.py | JarryChou/etsi-qkd-api | 2b68a97707d081aec8fd488ddffb125f5ee2e7f2 | [
"MIT"
] | 1 | 2021-12-14T12:26:02.000Z | 2021-12-14T12:26:02.000Z | api/kme.py | JarryChou/etsi-qkd-api | 2b68a97707d081aec8fd488ddffb125f5ee2e7f2 | [
"MIT"
] | null | null | null | api/kme.py | JarryChou/etsi-qkd-api | 2b68a97707d081aec8fd488ddffb125f5ee2e7f2 | [
"MIT"
] | 2 | 2021-07-22T16:16:43.000Z | 2021-12-14T12:26:05.000Z | """Class implementing the Key Management Entity (KME).
"""
| 37.521008 | 127 | 0.651512 | """Class implementing the Key Management Entity (KME).
"""
import random
from api import helper
import configparser
from typing import List
from api import crawler
class KME:
"""
Class for the KME on each node. This class also defines the related methods for manipulating
the keys. Most of the configuratio... | 0 | 0 | 0 | 8,742 | 0 | 0 | 0 | -5 | 133 |
a7c225b1217691fec49ffe83855cde6220ecc275 | 3,176 | py | Python | api/src/opentrons/broker.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | 235 | 2017-10-27T20:37:27.000Z | 2022-03-30T14:09:49.000Z | api/src/opentrons/broker.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | 8,425 | 2017-10-26T15:25:43.000Z | 2022-03-31T23:54:26.000Z | api/src/opentrons/broker.py | knownmed/opentrons | d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c | [
"Apache-2.0"
] | 130 | 2017-11-09T21:02:37.000Z | 2022-03-15T18:01:24.000Z | from __future__ import annotations
import logging
from typing import (Any, Dict, TypeVar, TYPE_CHECKING)
if TYPE_CHECKING:
MODULE_LOG = logging.getLogger(__name__)
UntypedMessage = Dict[str, Any]
_HandledMessages = TypeVar("_HandledMessages")
| 24.620155 | 88 | 0.633186 | from __future__ import annotations
import asyncio
from asyncio import Queue
from contextlib import contextmanager
import logging
from typing import (
Any,
Callable,
Dict,
Sequence,
overload,
Generic,
TypeVar,
cast,
TYPE_CHECKING,
)
from typing_extensions import Literal
from opentron... | 0 | 1,030 | 105 | 1,356 | 0 | 0 | 0 | 224 | 209 |
b64d57a89c64ba0dd62ab0f32d57bb5c38b55ece | 1,054 | py | Python | utilityscripts/sqljson2commonnamelist.py | DanielBaird/climas-global | b5fa8079df2c7670b5bf36177e07991aeec13a84 | [
"Apache-2.0"
] | null | null | null | utilityscripts/sqljson2commonnamelist.py | DanielBaird/climas-global | b5fa8079df2c7670b5bf36177e07991aeec13a84 | [
"Apache-2.0"
] | null | null | null | utilityscripts/sqljson2commonnamelist.py | DanielBaird/climas-global | b5fa8079df2c7670b5bf36177e07991aeec13a84 | [
"Apache-2.0"
] | 1 | 2020-11-17T05:12:59.000Z | 2020-11-17T05:12:59.000Z | import json
import codecs
sqljson_file = './sqljson.json'
output_file = './commonnames.json'
# the sqljson.json file holds a giant array that
# looks like this:
# [
# { "spp": "Abrothrix_andinus",
# "commonNames": [
# "Andean Altiplano Mouse",
# "Andean Akodont"
# ]
# ... | 22.425532 | 80 | 0.620493 |
import os
import json
import codecs
sqljson_file = './sqljson.json'
output_file = './commonnames.json'
# the sqljson.json file holds a giant array that
# looks like this:
# [
# { "spp": "Abrothrix_andinus",
# "commonNames": [
# "Andean Altiplano Mouse",
# "Andean Akodont"
# ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 23 |
e1cbb96e9395ddd9a0ba42675cba4903ba1f35b4 | 16,783 | py | Python | build/lib/sfcsim/classes/node.py | 1547591994/SFCSim | a5851a15daa19d136c4b57496dbace5ded7e4556 | [
"Apache-2.0"
] | 7 | 2021-01-05T13:00:01.000Z | 2022-03-06T07:40:35.000Z | sfcsim/classes/node.py | SkyShiS/SFCSim | 37e437ed7548a746c6dd8bd07b63c0b4b4f417bb | [
"Apache-2.0"
] | null | null | null | sfcsim/classes/node.py | SkyShiS/SFCSim | 37e437ed7548a746c6dd8bd07b63c0b4b4f417bb | [
"Apache-2.0"
] | 3 | 2021-02-18T17:40:08.000Z | 2022-03-06T07:40:37.000Z | #### | 43.033333 | 204 | 0.489662 | import copy
from sfcsim.classes.vnf import *
class node():
'''
************************************************************************************************
node类,表示网络中的一个节点,包含接入节点和服务器节点两种类型,详情见network基础类设计文档
属性值:
id 节点id,节点唯一标识
atts 节点资源属性,可以有cpu、memory、... | 1,278 | 0 | 0 | 16,263 | 0 | 0 | 0 | 1 | 89 |
0961c70b85eb83657f891331e990497760219b35 | 497 | py | Python | api/schemas/search_team.py | WicklowCD/server | 4657f4f64efc27abf10524eb6a03e61b79d4077f | [
"MIT"
] | null | null | null | api/schemas/search_team.py | WicklowCD/server | 4657f4f64efc27abf10524eb6a03e61b79d4077f | [
"MIT"
] | 2 | 2019-11-03T15:06:35.000Z | 2020-04-23T12:52:02.000Z | api/schemas/search_team.py | railto/WWCD-Management-Server | 4657f4f64efc27abf10524eb6a03e61b79d4077f | [
"MIT"
] | null | null | null |
search_team_schema = SearchTeamSchema()
search_teams_schema = SearchTeamSchema(many=True)
| 23.666667 | 49 | 0.716298 | from api import ma
from api.models.SearchTeam import SearchTeam
class SearchTeamSchema(ma.SQLAlchemySchema):
class Meta:
model = SearchTeam
uuid = ma.auto_field()
search_id = ma.auto_field()
team_leader = ma.auto_field()
name = ma.auto_field()
medic = ma.auto_field()
responder_1 =... | 0 | 0 | 0 | 317 | 0 | 0 | 0 | 20 | 67 |
3d4c6489e2c76276e653a4c840a98735774ef577 | 193 | py | Python | diagrams/ibm/migration.py | joshisa/diagrams | 27491295ed1ab824ca3179e80119deed9c0a976b | [
"MIT"
] | null | null | null | diagrams/ibm/migration.py | joshisa/diagrams | 27491295ed1ab824ca3179e80119deed9c0a976b | [
"MIT"
] | null | null | null | diagrams/ibm/migration.py | joshisa/diagrams | 27491295ed1ab824ca3179e80119deed9c0a976b | [
"MIT"
] | null | null | null | # This module is automatically generated by autogen.sh. DO NOT EDIT.
# Aliases
| 16.083333 | 68 | 0.715026 | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _IBM
class _Migration(_IBM):
_type = "migration"
_icon_dir = "resources/ibm/migration"
# Aliases
| 0 | 0 | 0 | 68 | 0 | 0 | 0 | -3 | 46 |
27102fc4639237454169e43cd968f57494e9a34d | 5,269 | py | Python | dffx_shotgun_plugins/shotgun_TS_DSD.py | dffxPipeline/shotgunEvents | a70a4d3b9be521e5c6a0c08514b934ed376b0fd1 | [
"MIT"
] | null | null | null | dffx_shotgun_plugins/shotgun_TS_DSD.py | dffxPipeline/shotgunEvents | a70a4d3b9be521e5c6a0c08514b934ed376b0fd1 | [
"MIT"
] | null | null | null | dffx_shotgun_plugins/shotgun_TS_DSD.py | dffxPipeline/shotgunEvents | a70a4d3b9be521e5c6a0c08514b934ed376b0fd1 | [
"MIT"
] | null | null | null | """
For detailed information please see
http://shotgunsoftware.github.com/shotgunEvents/api.html
## shotgun_logArgs: Logs all events that occur and generates a logfile in the specified directory found in the shotgun_logging.conf file ##
"""
rootSoftwareDir = [r'\\intrepid\Server\Tools']
dffxModulesExists = ''
config... | 35.843537 | 139 | 0.626115 | """
For detailed information please see
http://shotgunsoftware.github.com/shotgunEvents/api.html
## shotgun_logArgs: Logs all events that occur and generates a logfile in the specified directory found in the shotgun_logging.conf file ##
"""
rootSoftwareDir = [r'\\intrepid\Server\Tools']
dffxModulesExists = ''
config... | 0 | 0 | 0 | 0 | 0 | 950 | 0 | 3 | 95 |
67c1557deb597fa68bb67903ad98ede65eca4e62 | 6,753 | py | Python | apps/utils/encrypt/rsa.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 31 | 2021-07-28T13:06:11.000Z | 2022-03-10T12:16:44.000Z | apps/utils/encrypt/rsa.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 483 | 2021-07-29T03:17:44.000Z | 2022-03-31T13:03:04.000Z | apps/utils/encrypt/rsa.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 29 | 2021-07-28T13:06:21.000Z | 2022-03-25T06:18:18.000Z | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making -(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the... | 34.106061 | 115 | 0.661928 | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance ... | 495 | 3,491 | 0 | 1,104 | 0 | 52 | 0 | 124 | 274 |
b2da9fbbc39f6b625ba2a04928e2ac48d20424cb | 684 | py | Python | ALPHABETS/CAPITAL_ALPHABETS/D.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | ALPHABETS/CAPITAL_ALPHABETS/D.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | ALPHABETS/CAPITAL_ALPHABETS/D.py | charansaim1819/Python_Patterns | 02e636855003346ec84c3d69f2be174dc9e9e3cb | [
"MIT"
] | null | null | null | #Shape of capital D:
def for_D():
"""printing capital 'D' using for loop"""
for row in range(5):
for col in range(5):
if col==1 or row in(0,4) and col!=4 or col==4 and row not in(0,4):
print("*",end=" ")
else:
print(" ",end=" ")
p... | 23.586207 | 81 | 0.393275 | #Shape of capital D:
def for_D():
"""printing capital 'D' using for loop"""
for row in range(5):
for col in range(5):
if col==1 or row in(0,4) and col!=4 or col==4 and row not in(0,4):
print("*",end=" ")
else:
print(" ",end=" ")
p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
586d1928acc339e5938b9f91765e0064da0bdbd3 | 119 | py | Python | s3Backups/apps.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | s3Backups/apps.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | s3Backups/apps.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 13.222222 | 33 | 0.680672 | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class S3BackupsConfig(AppConfig):
name = 's3Backups'
| 0 | 0 | 0 | 35 | 0 | 0 | 0 | 12 | 46 |
1251459b56ee4f8e949ccec601c42dfee0d8cafe | 3,391 | py | Python | scripts/test_random_hash_sha1.py | kokke/tiny-HMAC-c | 93bdfa8114a32cf25ba70cb1f0957d3bf0f180af | [
"Unlicense"
] | 17 | 2021-07-20T00:23:54.000Z | 2022-03-17T08:26:08.000Z | scripts/test_random_hash_sha1.py | kokke/tiny-HMAC-c | 93bdfa8114a32cf25ba70cb1f0957d3bf0f180af | [
"Unlicense"
] | null | null | null | scripts/test_random_hash_sha1.py | kokke/tiny-HMAC-c | 93bdfa8114a32cf25ba70cb1f0957d3bf0f180af | [
"Unlicense"
] | null | null | null | import os
import random
import subprocess
import sys
import threading
import Queue
BIN_PATH = "./build/test_random_sha1"
NTHREADS = 2
NTESTS = 10
NBYTES = 20
global still_making_input
still_making_input = True
tests = Queue.Queue()
failures = list()
#
# Helper functions
#
def random_string(len):
""" Returns a ... | 23.068027 | 115 | 0.673548 | import binascii
import hashlib
import os
import random
import string
import subprocess
import sys
import time
import threading
import Queue
BIN_PATH = "./build/test_random_sha1"
NTHREADS = 2
NTESTS = 10
NBYTES = 20
global still_making_input
still_making_input = True
tests = Queue.Queue()
failures = list()
#
# Help... | 0 | 0 | 0 | 0 | 0 | 747 | 0 | -31 | 157 |
17361d2be3fdadfc2574c1e2c256e34f34235efb | 4,120 | py | Python | codigoTresEnderecos.py | quionee/analiseLexicaSintaticaC-- | eb28deb869b65fde0d3c9e1df57a2b0389701469 | [
"MIT"
] | null | null | null | codigoTresEnderecos.py | quionee/analiseLexicaSintaticaC-- | eb28deb869b65fde0d3c9e1df57a2b0389701469 | [
"MIT"
] | null | null | null | codigoTresEnderecos.py | quionee/analiseLexicaSintaticaC-- | eb28deb869b65fde0d3c9e1df57a2b0389701469 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*- | 49.047619 | 133 | 0.459223 | # -*- coding: utf-8 -*-
class CodigoTresEnderecos:
def __init__(self, tokens, tabelaDeSimbolos):
self.listaComandos = [] # lista para armazenar todos os comandos de atribuição
self.tabelaCodigos = [] # tabela final com os códigos de três endereços
self.percorreTokens(tokens, tabelaDeSimbo... | 42 | 0 | 0 | 4,053 | 0 | 0 | 0 | 0 | 23 |
fd62dfa13c3df8f790ee458497103dd2faaaec03 | 287 | py | Python | zenbot/zencyclopedia.py | underyx/zenbot | e96d07f62e3fd327e67a6365f1b7d3206f1abec3 | [
"MIT"
] | 2 | 2016-08-11T05:44:32.000Z | 2016-08-11T07:51:19.000Z | zenbot/zencyclopedia.py | underyx/zenbot | e96d07f62e3fd327e67a6365f1b7d3206f1abec3 | [
"MIT"
] | 10 | 2016-08-11T09:01:40.000Z | 2022-03-28T21:08:34.000Z | zenbot/zencyclopedia.py | underyx/zenbot | e96d07f62e3fd327e67a6365f1b7d3206f1abec3 | [
"MIT"
] | null | null | null | from collections import defaultdict
import re
from this import d, s
_zen = ''.join(d.get(c, c) for c in s)
_zen_lines = _zen.splitlines()[2:]
index = defaultdict(set)
for line in _zen_lines:
for word in line.split():
index[re.search(r'\w*', word.lower()).group()].add(line)
| 26.090909 | 64 | 0.675958 | from collections import defaultdict
import re
from this import d, s
_zen = ''.join(d.get(c, c) for c in s)
_zen_lines = _zen.splitlines()[2:]
index = defaultdict(set)
for line in _zen_lines:
for word in line.split():
index[re.search(r'\w*', word.lower()).group()].add(line)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf8171db4aa14a2f217d5e0279b1e06202036d2a | 221 | py | Python | Ex_Files_Python_EssT/Exercise Files/Chap04/conditional.py | cinthiatengan/Basic-Python | 9dbc280af2e9af9b79421018be814d0f178d8097 | [
"MIT"
] | null | null | null | Ex_Files_Python_EssT/Exercise Files/Chap04/conditional.py | cinthiatengan/Basic-Python | 9dbc280af2e9af9b79421018be814d0f178d8097 | [
"MIT"
] | null | null | null | Ex_Files_Python_EssT/Exercise Files/Chap04/conditional.py | cinthiatengan/Basic-Python | 9dbc280af2e9af9b79421018be814d0f178d8097 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2009-2017 BHG http://bw.org/
x = 1
if x>= 5:
print('verdadeiro porque {} >= 5'.format(x))
elif x == 3:
print('{} == 3'.format(x))
else:
print('{} menor que 5'.format(x))
| 18.416667 | 48 | 0.565611 | #!/usr/bin/env python3
# Copyright 2009-2017 BHG http://bw.org/
x = 1
if x>= 5:
print('verdadeiro porque {} >= 5'.format(x))
elif x == 3:
print('{} == 3'.format(x))
else:
print('{} é menor que 5'.format(x))
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0d412a9f88a508d64dc3acac6a1d8b4fbe2468bc | 3,448 | py | Python | Code/detection.py | lkamols/chess | fd78ffee46e9a9ab7db0e5e08edfd6e481a23665 | [
"Apache-2.0"
] | null | null | null | Code/detection.py | lkamols/chess | fd78ffee46e9a9ab7db0e5e08edfd6e481a23665 | [
"Apache-2.0"
] | null | null | null | Code/detection.py | lkamols/chess | fd78ffee46e9a9ab7db0e5e08edfd6e481a23665 | [
"Apache-2.0"
] | null | null | null | import time
#decoder inputs
DEC_C = 17
DEC_B = 27
DEC_A = 22
#mux inputs
MUX_C = 23
MUX_B = 24
MUX_A = 25
#mux outputs
M1_OUT = 12 #output of multiplexer controlling columns 0-5
M2_OUT = 4 #output of multiplexer controlling columns 6-11
"""
generally set an output to a value, 0 for off, otherwise on
pin - a gpiozero... | 25.731343 | 73 | 0.603538 | from gpiozero import LED, Button
import time
#decoder inputs
DEC_C = 17
DEC_B = 27
DEC_A = 22
#mux inputs
MUX_C = 23
MUX_B = 24
MUX_A = 25
#mux outputs
M1_OUT = 12 #output of multiplexer controlling columns 0-5
M2_OUT = 4 #output of multiplexer controlling columns 6-11
"""
generally set an output to a value, 0 for o... | 0 | 0 | 0 | 2,280 | 0 | 262 | 0 | 11 | 111 |
84b0067d80cd4c2cef6d50a93094e5613e1b0d84 | 104 | py | Python | solutions/2018/prob_01.py | PolPtoAmo/HPCodeWarsBCN | 8a98b1feb6d8b7d2d5b8b4dace3e02af9e6bb4e8 | [
"MIT"
] | 1 | 2021-02-27T09:46:06.000Z | 2021-02-27T09:46:06.000Z | solutions/2018/prob_01.py | PolPtoAmo/HPCodeWarsBCN | 8a98b1feb6d8b7d2d5b8b4dace3e02af9e6bb4e8 | [
"MIT"
] | null | null | null | solutions/2018/prob_01.py | PolPtoAmo/HPCodeWarsBCN | 8a98b1feb6d8b7d2d5b8b4dace3e02af9e6bb4e8 | [
"MIT"
] | 1 | 2021-02-27T12:03:33.000Z | 2021-02-27T12:03:33.000Z | ida = int(input())
vuelta = int(input())
print('Ana tiene un total de {0} euros'.format((ida+vuelta)))
| 20.8 | 61 | 0.653846 | ida = int(input())
vuelta = int(input())
print('Ana tiene un total de {0} euros'.format((ida+vuelta)))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3efdc9c450cea291c16ad4d3f956ee76f79cfe70 | 3,636 | py | Python | accel/replay_buffers/prioritized_replay_buffer.py | waffoo/accel | 7aaa45af2d120f9ed49d10f8654ff5af03feb705 | [
"MIT"
] | 1 | 2020-05-09T15:32:40.000Z | 2020-05-09T15:32:40.000Z | accel/replay_buffers/prioritized_replay_buffer.py | waffoo/accel | 7aaa45af2d120f9ed49d10f8654ff5af03feb705 | [
"MIT"
] | 11 | 2020-09-21T20:49:12.000Z | 2021-06-17T09:38:45.000Z | accel/replay_buffers/prioritized_replay_buffer.py | waffoo/accel | 7aaa45af2d120f9ed49d10f8654ff5af03feb705 | [
"MIT"
] | 1 | 2020-09-29T06:59:56.000Z | 2020-09-29T06:59:56.000Z | from collections import namedtuple
Transition = namedtuple(
'Transition', ('state', 'action', 'next_state', 'reward', 'valid'))
| 29.803279 | 88 | 0.560781 | import random
from collections import deque, namedtuple
import numpy as np
from accel.replay_buffers.binary_tree import MinTree, SumTree
Transition = namedtuple(
'Transition', ('state', 'action', 'next_state', 'reward', 'valid'))
class PrioritizedReplayBuffer(object):
def __init__(self, capacity, alpha=0.6... | 0 | 0 | 0 | 3,375 | 0 | 0 | 0 | 36 | 91 |
ddefb222e1d39e5b5fb2b731252001085aa5fbb2 | 3,268 | py | Python | preprocess/align_images.py | yuhaoooo/FaceRecgnition | 3ce1e6a55dfe238bc2027fe954e70eae2048fa1f | [
"MIT"
] | null | null | null | preprocess/align_images.py | yuhaoooo/FaceRecgnition | 3ce1e6a55dfe238bc2027fe954e70eae2048fa1f | [
"MIT"
] | null | null | null | preprocess/align_images.py | yuhaoooo/FaceRecgnition | 3ce1e6a55dfe238bc2027fe954e70eae2048fa1f | [
"MIT"
] | 1 | 2021-12-30T08:56:25.000Z | 2021-12-30T08:56:25.000Z | import sys
def save_landmark(landmark, save_path):
"""Save Landmark to path
Arguments:
landmark {float} -- landmarks
save_path {str} -- Save path for extracted face image. (default: {None})
Returns:
None
"""
with open(save_path, 'w+') as f:
for (x, y) in landmark... | 33.690722 | 147 | 0.650857 | import os
import sys
import torch
import argparse
import numpy as np
from PIL import Image
from mtcnn.mtcnn import MTCNN
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
from mtcnn.utils.align_trans import get_reference_facial_points, warp_and_crop_face
def collate_pil(x):
out_... | 0 | 0 | 0 | 0 | 0 | 2,466 | 0 | 81 | 267 |
8dbd46d1ac00ab6d41e5be8b24f85f3d76541844 | 423 | py | Python | support/cross/aio/atexit.py | pmp-p/python-wasm-plus | ccd34cf46fc00924e256a0ad1d8cf5061b9520ac | [
"MIT"
] | 3 | 2022-03-11T22:02:39.000Z | 2022-03-16T08:04:33.000Z | support/cross/aio/atexit.py | pmp-p/python-wasm-plus | ccd34cf46fc00924e256a0ad1d8cf5061b9520ac | [
"MIT"
] | null | null | null | support/cross/aio/atexit.py | pmp-p/python-wasm-plus | ccd34cf46fc00924e256a0ad1d8cf5061b9520ac | [
"MIT"
] | null | null | null | plan = []
# replace stock one
import sys
sys.modules['atexit'] = sys.modules['aio.atexit']
| 16.92 | 50 | 0.593381 | plan = []
def register(func, *args, **kwargs):
global plan
plan.append( (func,arg,kwargs,) )
def unregister(func):
global plan
todel = []
for i,elem in enumerate(plan)
if elem[0] is func:
todel.append(i)
while len(todel):
plan.pop( todel.pop() )
def exiting():
... | 0 | 0 | 0 | 0 | 0 | 259 | 0 | 0 | 69 |
67e011cb3343579a643a7bcad30d2da2f256fe34 | 9,217 | py | Python | screener/util.py | icedevil2001/pri_stock_screener | b700fe0a114cf3e9eef6eaa26b1137b4f6d4955e | [
"MIT"
] | null | null | null | screener/util.py | icedevil2001/pri_stock_screener | b700fe0a114cf3e9eef6eaa26b1137b4f6d4955e | [
"MIT"
] | null | null | null | screener/util.py | icedevil2001/pri_stock_screener | b700fe0a114cf3e9eef6eaa26b1137b4f6d4955e | [
"MIT"
] | null | null | null | #stock_screener.py
# import yahoo_fin
#from pandas import ExcelWriter
# import requests
# def calc_relative_strength(df):
# ## relative gain and losses
# df['close_shift'] = df['adj_close'].shift(1)
# ## Gains (true) and Losses (False)
# df['gains'] = df.apply(lambda x: x['adj_close'] if x['adj_close'] >= x['c... | 30.826087 | 138 | 0.619507 | #stock_screener.py
from pandas_datareader import data as pdr
from yahoo_fin import stock_info as si
# import yahoo_fin
#from pandas import ExcelWriter
import yfinance as yf
import pandas as pd
# import requests
import datetime
import time
from pprint import pprint
from collections import OrderedDict
import base64
# ... | 0 | 0 | 0 | 1,321 | 0 | 0 | 0 | 29 | 247 |
29209584e2963603bfa38c2ae530df93b611ae7a | 1,329 | py | Python | zeus/api/resources/revision_file_coverage.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 221 | 2017-07-03T17:29:21.000Z | 2021-12-07T19:56:59.000Z | zeus/api/resources/revision_file_coverage.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 298 | 2017-07-04T18:08:14.000Z | 2022-03-03T22:24:51.000Z | zeus/api/resources/revision_file_coverage.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 24 | 2017-07-15T13:46:45.000Z | 2020-08-16T16:14:45.000Z | from ..schemas import FileCoverageSchema
filecoverage_schema = FileCoverageSchema(many=True)
| 31.642857 | 87 | 0.645598 | from flask import request
from operator import or_
from zeus.models import FileCoverage, Revision
from zeus.utils.builds import fetch_build_for_revision
from .base_revision import BaseRevisionResource
from ..schemas import FileCoverageSchema
filecoverage_schema = FileCoverageSchema(many=True)
class RevisionFileCov... | 0 | 0 | 0 | 1,008 | 0 | 0 | 0 | 91 | 135 |
c700bcd851b749493cd3a00f8f7079e4b9ce7a36 | 4,142 | py | Python | build/lib.macosx-10.9-x86_64-3.9/gators/feature_generation_str/string_length.py | Aditya-Kapadiya/gators | d7c9967e3a8e304a601b6a92ad834d03d3e36338 | [
"Apache-2.0"
] | 4 | 2021-10-29T18:20:52.000Z | 2022-03-31T22:53:03.000Z | build/lib.macosx-10.9-x86_64-3.9/gators/feature_generation_str/string_length.py | Aditya-Kapadiya/gators | d7c9967e3a8e304a601b6a92ad834d03d3e36338 | [
"Apache-2.0"
] | 1 | 2022-01-19T12:16:19.000Z | 2022-01-19T12:16:19.000Z | build/lib.macosx-10.9-x86_64-3.9/gators/feature_generation_str/string_length.py | Aditya-Kapadiya/gators | d7c9967e3a8e304a601b6a92ad834d03d3e36338 | [
"Apache-2.0"
] | 5 | 2021-11-17T20:16:54.000Z | 2022-02-21T18:21:02.000Z | # License: Apache-2.0
import pandas as pd
pd.options.mode.chained_assignment = None
| 29.585714 | 75 | 0.530662 | # License: Apache-2.0
from ..util import util
from feature_gen_str import string_length
from typing import List, Union
import numpy as np
import pandas as pd
import databricks.koalas as ks
from._base_string_feature import _BaseStringFeature
pd.options.mode.chained_assignment = None
class StringLength(_BaseStringFeatu... | 0 | 0 | 0 | 3,835 | 0 | 0 | 0 | 67 | 155 |
2e724b4717fc2722837c1db869c255989b72244a | 1,034 | py | Python | dataframe.py | UWSEDS/homework-3-4-testing-exceptions-and-coding-style-JM88888 | 7899b0de80b2d07e9f63293821fab3fbdbe8d309 | [
"MIT"
] | null | null | null | dataframe.py | UWSEDS/homework-3-4-testing-exceptions-and-coding-style-JM88888 | 7899b0de80b2d07e9f63293821fab3fbdbe8d309 | [
"MIT"
] | null | null | null | dataframe.py | UWSEDS/homework-3-4-testing-exceptions-and-coding-style-JM88888 | 7899b0de80b2d07e9f63293821fab3fbdbe8d309 | [
"MIT"
] | null | null | null | """This module gets a dataframe of seattle building permits checks column names"""
import pandas as pd
def get_permits(data_frame=pd.read_csv("https://data.seattle.gov/api/views/76t5-zqzr/rows.csv?accessType=DOWNLOAD",
usecols=["PermitClass", "PermitTypeDesc", "EstProjectCost"],... | 35.655172 | 121 | 0.661509 | """This module gets a dataframe of seattle building permits checks column names"""
import pandas as pd
import collections
def get_permits(data_frame=pd.read_csv("https://data.seattle.gov/api/views/76t5-zqzr/rows.csv?accessType=DOWNLOAD",
usecols=["PermitClass", "PermitTypeDesc",... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
ed0bc74eeee568779b4bc62448b3a5dd6edc7497 | 2,908 | py | Python | vc_assistance/indico_vc_assistance/forms.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | vc_assistance/indico_vc_assistance/forms.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | vc_assistance/indico_vc_assistance/forms.py | bpedersen2/indico-plugins-cern | c4f06d11d981c316fc8de2892758484deb58e2f5 | [
"MIT"
] | null | null | null | # This file is part of the CERN Indico plugins.
# Copyright (C) 2014 - 2022 CERN
#
# The CERN Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License; see
# the LICENSE file for more details.
| 46.15873 | 119 | 0.671939 | # This file is part of the CERN Indico plugins.
# Copyright (C) 2014 - 2022 CERN
#
# The CERN Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License; see
# the LICENSE file for more details.
from datetime import date, timedelta
from flask import request
fro... | 0 | 444 | 0 | 1,602 | 0 | 0 | 0 | 292 | 315 |
30494615504525876516bc1439538a1f558bd85b | 1,375 | py | Python | Part 04 - Clustering/Section 25 - Hierarchical Clustering/Hierarchical_Clustering/pythonHierarchicalClustering.py | Menosse/machineLearning_Study | e2f5490a9162427c274697be279bfb0c0a0bb305 | [
"MIT"
] | 1 | 2019-03-19T00:12:32.000Z | 2019-03-19T00:12:32.000Z | Part 04 - Clustering/Section 25 - Hierarchical Clustering/Hierarchical_Clustering/pythonHierarchicalClustering.py | Menosse/machineLearning | e2f5490a9162427c274697be279bfb0c0a0bb305 | [
"MIT"
] | null | null | null | Part 04 - Clustering/Section 25 - Hierarchical Clustering/Hierarchical_Clustering/pythonHierarchicalClustering.py | Menosse/machineLearning | e2f5490a9162427c274697be279bfb0c0a0bb305 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 27 08:17:57 2019
@author: ts-fernando.takada
"""
import pandas as pd
import matplotlib.pyplot as plt
consNumHc = 5
dataset = pd.read_csv("Mall_Customers.csv")
x = dataset.iloc[:,[3, 4]].values
# y = dataset.iloc[:,].values
# Using dendrongram to ... | 31.976744 | 86 | 0.668364 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 27 08:17:57 2019
@author: ts-fernando.takada
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
consNumHc = 5
dataset = pd.read_csv("Mall_Customers.csv")
x = dataset.iloc[:,[3, 4]].values
# y = dataset.iloc[:,].values
# U... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
190af4ae51777b6fc1491d239e62d70882342e77 | 545 | py | Python | bots/bot_txt.py | Lytigas/snake-ai-battle | 45a09ef92b477a84b73937d459fcc74ad6626067 | [
"Apache-2.0"
] | null | null | null | bots/bot_txt.py | Lytigas/snake-ai-battle | 45a09ef92b477a84b73937d459fcc74ad6626067 | [
"Apache-2.0"
] | null | null | null | bots/bot_txt.py | Lytigas/snake-ai-battle | 45a09ef92b477a84b73937d459fcc74ad6626067 | [
"Apache-2.0"
] | null | null | null | import time
import sys
# Meant to be used with client-adapter to enable communicating via stdin/stdout.
seq = ["u"] * 3 + ["r"] * 20 + ["d"] * 5 + ["l"] * 5
print("seq_bot_txt")
counter = 0
while True:
data = input()
if data in ["WIN", "LOSS", "TIE"]:
print(data)
break
my_pos, their_pos = ... | 27.25 | 80 | 0.592661 | import time
import sys
# Meant to be used with client-adapter to enable communicating via stdin/stdout.
seq = ["u"] * 3 + ["r"] * 20 + ["d"] * 5 + ["l"] * 5
print("seq_bot_txt")
counter = 0
while True:
data = input()
if data in ["WIN", "LOSS", "TIE"]:
print(data)
break
my_pos, their_pos = ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
534def22b60b3dc1580fce41ed1056b1b250741c | 50 | py | Python | profiles/__init__.py | Antony-me/Pixtagram | 65a64ffb1f054b4fe77a004bf67686cdcfddfded | [
"MIT"
] | 2 | 2020-12-03T11:16:51.000Z | 2021-02-16T13:51:44.000Z | profiles/__init__.py | Antony-me/Pixtagram | 65a64ffb1f054b4fe77a004bf67686cdcfddfded | [
"MIT"
] | null | null | null | profiles/__init__.py | Antony-me/Pixtagram | 65a64ffb1f054b4fe77a004bf67686cdcfddfded | [
"MIT"
] | null | null | null | default_app_config ='profiles.apps.ProfilesConfig' | 50 | 50 | 0.88 | default_app_config ='profiles.apps.ProfilesConfig' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f176cf73dd4b31917dec112f9f1309164b6c65cc | 60 | py | Python | conf.py | wrathwolf/docs | d7f0891b5886c5ce018957a9d1317f6944ba43cb | [
"CC-BY-4.0"
] | 14 | 2018-05-16T01:01:04.000Z | 2022-03-13T06:31:11.000Z | conf.py | wrathwolf/docs | d7f0891b5886c5ce018957a9d1317f6944ba43cb | [
"CC-BY-4.0"
] | 88 | 2018-09-06T18:07:28.000Z | 2021-07-05T10:07:21.000Z | conf.py | wrathwolf/docs | d7f0891b5886c5ce018957a9d1317f6944ba43cb | [
"CC-BY-4.0"
] | 22 | 2018-05-16T01:01:06.000Z | 2022-01-06T03:41:27.000Z |
#extensions = ['recommonmark'] | 20 | 30 | 0.75 | from docs_conf.conf import *
#extensions = ['recommonmark'] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 22 |
4448b062f21ec38aafb41286ce30fa7f7d57b60b | 1,095 | py | Python | fdk_client/application/ApplicationConfig.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/ApplicationConfig.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/ApplicationConfig.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Python code/sdk/application/ApplicationConfig.py."""
| 36.5 | 75 | 0.688584 | """Python code/sdk/application/ApplicationConfig.py."""
from typing import Dict
from ..common.constants import APPLICATION_MIN_TOKEN_LENGTH, DEFAULT_DOMAIN
from ..common.exceptions import FDKInvalidCredentialError
class ApplicationConfig:
def __init__(self, _conf: Dict, _opts: Dict = {}):
"""Defines app... | 0 | 0 | 0 | 855 | 0 | 0 | 0 | 92 | 91 |
ebd0cfc6cfc22d7cabfc860a3e892c2881b9ee1c | 341 | py | Python | CookieTTS/_3_generate_postnets/start_generate_postnets.py | AstraliteHeart/cookietts | c871f5f7b5790656d5b57bcd9e63946a2da52f0f | [
"BSD-3-Clause"
] | 25 | 2020-07-07T20:07:41.000Z | 2021-12-17T11:27:36.000Z | CookieTTS/_3_generate_postnets/start_generate_postnets.py | AstraliteHeart/cookietts | c871f5f7b5790656d5b57bcd9e63946a2da52f0f | [
"BSD-3-Clause"
] | 26 | 2020-07-04T00:06:25.000Z | 2022-02-10T03:28:35.000Z | CookieTTS/_3_generate_postnets/start_generate_postnets.py | AstraliteHeart/cookietts | c871f5f7b5790656d5b57bcd9e63946a2da52f0f | [
"BSD-3-Clause"
] | 11 | 2020-07-02T21:39:59.000Z | 2022-01-17T22:09:46.000Z |
# load TTM model and checkpoint of choice
# generate appropriate Ground-truth-aligned spectrograms from source dataset
# (maybe) use Dynamic-Time-Warping for cases where Teacher-Forcing cannot be used.
# write new "postnet_path|grapheme_transcript|phoneme_transcript|speaker_id|sample_rate|emotion_id|noise_level" oc... | 42.625 | 135 | 0.829912 |
# load TTM model and checkpoint of choice
# generate appropriate Ground-truth-aligned spectrograms from source dataset
# (maybe) use Dynamic-Time-Warping for cases where Teacher-Forcing cannot be used.
# write new "postnet_path|grapheme_transcript|phoneme_transcript|speaker_id|sample_rate|emotion_id|noise_level" oc... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b0cafd66e4e8bee0de568d24e38490b702cd69c4 | 670 | py | Python | gsuite_activityevent_rules/gsuite_login_type.py | panther-labs/panther-cli | 4e5c0a21570e1a02dada990fd91e324416afac96 | [
"MIT"
] | 4 | 2019-10-17T19:33:29.000Z | 2019-10-21T15:23:30.000Z | gsuite_activityevent_rules/gsuite_login_type.py | jacknagz/panther-analysis | fceab78ba5624136776596ee1b25fa0dc8a02a42 | [
"Apache-2.0"
] | null | null | null | gsuite_activityevent_rules/gsuite_login_type.py | jacknagz/panther-analysis | fceab78ba5624136776596ee1b25fa0dc8a02a42 | [
"Apache-2.0"
] | null | null | null |
# Remove any unapproved login methods
APPROVED_LOGIN_TYPES = {
"exchange",
"google_password",
"reauth",
"saml",
"unknown",
}
| 20.9375 | 83 | 0.604478 | from panther_base_helpers import deep_get
# Remove any unapproved login methods
APPROVED_LOGIN_TYPES = {
"exchange",
"google_password",
"reauth",
"saml",
"unknown",
}
def rule(event):
if event.get("type") != "login":
return False
if (
event.get("type") == "login"
... | 0 | 0 | 0 | 0 | 0 | 434 | 0 | 20 | 68 |
140f23ee4c79b3d1aa9e1857840ccd2239d21411 | 437 | py | Python | scripts/clean_fw.py | proddy/MyESP | 7619bd91bd72a64791fe52a077ce9b7bfd6ad34b | [
"MIT"
] | null | null | null | scripts/clean_fw.py | proddy/MyESP | 7619bd91bd72a64791fe52a077ce9b7bfd6ad34b | [
"MIT"
] | null | null | null | scripts/clean_fw.py | proddy/MyESP | 7619bd91bd72a64791fe52a077ce9b7bfd6ad34b | [
"MIT"
] | 3 | 2019-12-28T20:09:46.000Z | 2020-11-28T09:40:16.000Z | #!/usr/bin/env python
Import("env")
# built in targets: (buildprog, size, upload, program, buildfs, uploadfs, uploadfsota)
env.AddPreAction("buildprog", clean)
| 29.133333 | 92 | 0.647597 | #!/usr/bin/env python
from subprocess import call
import os
Import("env")
def clean(source, target, env):
print("\n** Starting clean...")
call(["pio", "run", "-t", "erase"])
call(["esptool.py", "-p COM6", "write_flash 0x00000", os.getcwd()+"../firmware/*.bin"])
print("\n** Finished clean.")
# built ... | 0 | 0 | 0 | 0 | 0 | 213 | 0 | -6 | 67 |
4469bb6b6cea5051bb568c03b2ab964880fc4923 | 4,983 | py | Python | client/commands/v2/tests/server_event_test.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | null | null | null | client/commands/v2/tests/server_event_test.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | null | null | null | client/commands/v2/tests/server_event_test.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | 1 | 2021-05-13T13:30:24.000Z | 2021-05-13T13:30:24.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
| 39.547619 | 88 | 0.633554 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import io
from pathlib import Path
import testslide
from ....tests import setup
from ..async_server_connection import create_memory_text_rea... | 0 | 1,950 | 0 | 2,528 | 0 | 0 | 0 | 169 | 158 |
484ac44e461885cf91d2a3c9469c926e4b4ec662 | 1,091 | py | Python | infra/services/git_cache_updater/__main__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | infra/services/git_cache_updater/__main__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | infra/services/git_cache_updater/__main__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Updates the Git cache zips for a project.
Example invocation:
./run.py infra.tools.git_cache_updater --project <googlesource.com url>
"""
# This file is u... | 26.609756 | 72 | 0.778185 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Updates the Git cache zips for a project.
Example invocation:
./run.py infra.tools.git_cache_updater --project <googlesource.com url>
"""
# This file is u... | 0 | 0 | 0 | 0 | 0 | 467 | 0 | 36 | 91 |
4f5344773278784536fef50175911f4b1cea9ac1 | 922 | py | Python | PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py | BrunoKM/station-b-libraries | ea3591837e4a33f0bef789d905467754c27913b3 | [
"MIT"
] | 6 | 2021-09-29T15:46:55.000Z | 2021-12-14T18:39:51.000Z | PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py | BrunoKM/station-b-libraries | ea3591837e4a33f0bef789d905467754c27913b3 | [
"MIT"
] | null | null | null | PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py | BrunoKM/station-b-libraries | ea3591837e4a33f0bef789d905467754c27913b3 | [
"MIT"
] | 3 | 2021-09-27T10:35:20.000Z | 2021-10-02T17:53:07.000Z | # -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# ----------------------------------------------------------------------... | 57.625 | 103 | 0.646421 | # -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# ----------------------------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 72 |
9d78e052189cb9c39a094671290bdc1094924515 | 295 | py | Python | netsim/simulator/core/sim_common.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | null | null | null | netsim/simulator/core/sim_common.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | 12 | 2021-11-20T22:50:46.000Z | 2022-01-07T02:00:38.000Z | netsim/simulator/core/sim_common.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | null | null | null | # defining useful type aliases
from typing import Tuple, Union
# defining useful type aliases
SimTime = Union[int, float]
EventPriority = int
EventID = int
ProcessID = int
ProcessName = str
ResourceID = int
ResourceName = str
ResourceCapacity = Union[int, float]
TimeInterval = Tuple[SimTime]
| 19.666667 | 36 | 0.776271 | # defining useful type aliases
from typing import Tuple, Union
# defining useful type aliases
SimTime = Union[int, float]
EventPriority = int
EventID = int
ProcessID = int
ProcessName = str
ResourceID = int
ResourceName = str
ResourceCapacity = Union[int, float]
TimeInterval = Tuple[SimTime]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c092f2f64de19f9c77a90c3dfc7908242b77f9fe | 1,867 | py | Python | test/unit/test_endpoint.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | 4 | 2015-12-21T00:59:22.000Z | 2021-02-08T02:33:52.000Z | test/unit/test_endpoint.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | null | null | null | test/unit/test_endpoint.py | sporsh/carnifex | 82dd3bd2bc134dfb69a78f43171e227f2127060b | [
"MIT"
] | 1 | 2017-03-24T09:12:45.000Z | 2017-03-24T09:12:45.000Z |
stdout, stderr = 1, 2
| 35.903846 | 79 | 0.634708 | from twisted.trial.unittest import TestCase
from twisted.internet.error import ConnectionDone
from twisted.internet import protocol, defer, reactor
from carnifex.endpoint import InductorEndpoint
from .mocks import MockProcessInductor
stdout, stderr = 1, 2
class InductorEndpointTest(TestCase):
"""Test connecting ... | 0 | 246 | 0 | 1,340 | 0 | 0 | 0 | 124 | 133 |
94c6887fad9b8a466dc81fdcb80d34145f4fb549 | 2,201 | py | Python | minicup_photo_classifier/detection/object_detector.py | litovel-minicup/photo-classifier | 5fd87a36981a39166b6132cf4a2ddf1ca77ccda9 | [
"MIT"
] | null | null | null | minicup_photo_classifier/detection/object_detector.py | litovel-minicup/photo-classifier | 5fd87a36981a39166b6132cf4a2ddf1ca77ccda9 | [
"MIT"
] | 1 | 2018-03-23T10:41:11.000Z | 2018-03-23T10:41:11.000Z | minicup_photo_classifier/detection/object_detector.py | litovel-minicup/photo-classifier | 5fd87a36981a39166b6132cf4a2ddf1ca77ccda9 | [
"MIT"
] | null | null | null | # coding=utf-8
__all__ = ['ObjectDetector']
| 34.936508 | 115 | 0.699682 | # coding=utf-8
from os.path import join, dirname
from typing import List
import numpy as np
from .config import load_config
from .pose_detection.detections import extract_detections
from .pose_detection.mscoco import MSCOCO
from .pose_detection.nnet.predict import setup_pose_prediction, extract_cnn_output
from .pose_... | 0 | 198 | 0 | 1,552 | 0 | 0 | 0 | 203 | 201 |
4f1f213a46b386e810fed13ab1b5b0c23dba7dc5 | 1,429 | py | Python | Other/server.py | radleap/dog-vision | 0862100b0d40592fdcc3430e498d40acc7014281 | [
"Unlicense",
"MIT"
] | 1 | 2020-02-10T20:43:31.000Z | 2020-02-10T20:43:31.000Z | Other/server.py | radleap/dog-vision | 0862100b0d40592fdcc3430e498d40acc7014281 | [
"Unlicense",
"MIT"
] | 16 | 2020-01-28T23:11:05.000Z | 2022-03-12T00:08:30.000Z | Other/server.py | radleap/dog-vision | 0862100b0d40592fdcc3430e498d40acc7014281 | [
"Unlicense",
"MIT"
] | null | null | null | import os
from flask import Flask
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
app = Flask(__name__)
app.config['SECRET_KEY'] = "supertopsecretprivatekey1234"
if __name__ == "__main__":
app.run('127.0.0.1')
| 31.065217 | 75 | 0.573828 | import os
from flask import Flask, flash, render_template, redirect, request, url_for
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
app = Flask(__name__)
app.config['SECRET_KEY'] = "supertopsecretprivatekey1234"
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'GET':
# sho... | 0 | 1,132 | 0 | 0 | 0 | 0 | 0 | 52 | 23 |
03a067f6f727f2e2f1c33d95cce8971095fc6332 | 14,214 | py | Python | setup.py | tylerjohnhaden/penguin-website-colors | f3c4585ebb333976d2e40e845bda22ec380b9aec | [
"MIT"
] | null | null | null | setup.py | tylerjohnhaden/penguin-website-colors | f3c4585ebb333976d2e40e845bda22ec380b9aec | [
"MIT"
] | 3 | 2017-03-29T00:43:14.000Z | 2017-03-29T00:50:19.000Z | setup.py | tylerjohnhaden/penguin-website-colors | f3c4585ebb333976d2e40e845bda22ec380b9aec | [
"MIT"
] | null | null | null | #! /usr/bin/python
# TODO: make chromedriver executable on linux systems
# TODO: finish this doc string:
"""The first script to be run in this project.
If this is the first time running in this directory,
it should look something like this:
penguin-website-colors/
examples/
...
.gitig... | 43.735385 | 120 | 0.6495 | #! /usr/bin/python
# TODO: make chromedriver executable on linux systems
# TODO: finish this doc string:
"""The first script to be run in this project.
If this is the first time running in this directory,
it should look something like this:
penguin-website-colors/
examples/
...
.gitig... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a9acd1cbdecf785c719dc37ed56d9eae9ad87503 | 5,732 | py | Python | adv_lib/attacks/voting_folded_gaussian.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 55 | 2020-11-25T10:47:48.000Z | 2022-03-21T12:11:31.000Z | adv_lib/attacks/voting_folded_gaussian.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 4 | 2021-03-10T19:25:31.000Z | 2021-08-06T00:10:49.000Z | adv_lib/attacks/voting_folded_gaussian.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 8 | 2020-11-26T08:42:04.000Z | 2022-01-13T02:55:47.000Z | from typing import Optional
import torch
from torch import nn, Tensor
from torch.autograd import grad
def vfga(model: nn.Module,
inputs: Tensor,
labels: Tensor,
targeted: bool,
max_iter: Optional[int] = None,
n_samples: int = 10,
large_memory: bool = False) -> Te... | 46.601626 | 117 | 0.657362 | from typing import Optional
import torch
from torch import nn, Tensor
from torch.autograd import grad
def vfga(model: nn.Module,
inputs: Tensor,
labels: Tensor,
targeted: bool,
max_iter: Optional[int] = None,
n_samples: int = 10,
large_memory: bool = False) -> Te... | 36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3b44f5fe548b9ce87b7127c539705da79fe13b26 | 2,451 | py | Python | python/src/problem019.py | arturh85/projecteuler | c3685e302ea7c323193b18c105a7e02da01fd6b5 | [
"MIT"
] | 3 | 2015-02-04T08:37:01.000Z | 2015-11-28T03:10:15.000Z | python/src/problem019.py | arturh85/projecteuler | c3685e302ea7c323193b18c105a7e02da01fd6b5 | [
"MIT"
] | null | null | null | python/src/problem019.py | arturh85/projecteuler | c3685e302ea7c323193b18c105a7e02da01fd6b5 | [
"MIT"
] | null | null | null | '''
Problem 19
14 June 2002
You are given the following information, but you may prefer to do some research for yourself.
- 1 Jan 1900 was a Monday.
- Thirty days has September,
April, June and November.
All the rest have thirty-one,
Saving February alone,
Which has twenty-eight, rain o... | 27.852273 | 110 | 0.540596 | '''
Problem 19
14 June 2002
You are given the following information, but you may prefer to do some research for yourself.
- 1 Jan 1900 was a Monday.
- Thirty days has September,
April, June and November.
All the rest have thirty-one,
Saving February alone,
Which has twenty-eight, rain o... | 0 | 0 | 0 | 517 | 0 | 695 | 0 | 0 | 133 |
6b03e3a80d97f1ab3fae5b956c2028270ee37766 | 7,069 | py | Python | tests/integ/test_trial_component.py | jmahlik/sagemaker-experiments | 9df55c0f0b919e3f2708a9098b87ea962ec882c9 | [
"Apache-2.0"
] | 88 | 2019-12-04T05:16:35.000Z | 2022-03-14T18:49:05.000Z | tests/integ/test_trial_component.py | jmahlik/sagemaker-experiments | 9df55c0f0b919e3f2708a9098b87ea962ec882c9 | [
"Apache-2.0"
] | 46 | 2020-01-13T23:20:10.000Z | 2022-03-27T19:36:33.000Z | tests/integ/test_trial_component.py | jmahlik/sagemaker-experiments | 9df55c0f0b919e3f2708a9098b87ea962ec882c9 | [
"Apache-2.0"
] | 21 | 2019-12-05T18:18:36.000Z | 2022-03-11T13:48:41.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | 42.584337 | 114 | 0.757816 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | 0 | 0 | 0 | 0 | 0 | 6,107 | 0 | 72 | 320 |
f330e74884f39e318ce58c74af6a7d488351704c | 431 | py | Python | test/constants.py | Crimack/lissandra | 7f43ca70040ce054f335ad3b134e3bd4ee52ff3e | [
"MIT"
] | null | null | null | test/constants.py | Crimack/lissandra | 7f43ca70040ce054f335ad3b134e3bd4ee52ff3e | [
"MIT"
] | null | null | null | test/constants.py | Crimack/lissandra | 7f43ca70040ce054f335ad3b134e3bd4ee52ff3e | [
"MIT"
] | null | null | null | """
This file defines constants which
are used in the various tests to
validate the API functions.
"""
# Summoner name to be used for Standard API calls, defaulting to EUW
SUMMONER_NAME = "Crimack"
# Unknown Summoner, used to validate that an error is thrown
UNKNOWN_SUMMONER_NAME = "abcaklsjdlakakdjlsakjdsdjlaksjdla... | 25.352941 | 68 | 0.793503 | """
This file defines constants which
are used in the various tests to
validate the API functions.
"""
# Summoner name to be used for Standard API calls, defaulting to EUW
SUMMONER_NAME = "Crimack"
# Unknown Summoner, used to validate that an error is thrown
UNKNOWN_SUMMONER_NAME = "abcaklsjdlakakdjlsakjdsdjlaksjdla... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f97bf2869138aad90bcfcda72d6b30224db6b45 | 112 | py | Python | Python_3/DEF/DEF/programa -- Print especial.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null | Python_3/DEF/DEF/programa -- Print especial.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null | Python_3/DEF/DEF/programa -- Print especial.py | NicolasGandolfi/Exercicios-Python | 935fe3577c149192f9e29568e9798e970a620131 | [
"MIT"
] | null | null | null |
linha('NICOLAS') | 16 | 21 | 0.517857 | def linha(txt):
tam=len(txt)+4
print('—'*tam)
print(f' {txt}')
print('—'*tam)
linha('NICOLAS') | 6 | 0 | 0 | 0 | 0 | 71 | 0 | 0 | 22 |
03c8dba9df1507c8ce6a990c4a32a8671e07b8bd | 230 | py | Python | server/main.py | lvillis/serverstatus | 234d239efc1bab1bc7290d2f233fa1608b943e22 | [
"MIT"
] | null | null | null | server/main.py | lvillis/serverstatus | 234d239efc1bab1bc7290d2f233fa1608b943e22 | [
"MIT"
] | 11 | 2021-05-18T04:46:37.000Z | 2022-03-14T20:09:33.000Z | server/main.py | lvillis/serverstatus | 234d239efc1bab1bc7290d2f233fa1608b943e22 | [
"MIT"
] | null | null | null | import uvicorn
from utils import check_config_json
if __name__ == '__main__':
if not check_config_json():
exit()
uvicorn.run('api:app', host=HOST, port=PORT, log_level='info', reload=False)
| 23 | 80 | 0.704348 | import uvicorn
from utils import check_config_json
from configs import *
if __name__ == '__main__':
if not check_config_json():
exit()
uvicorn.run('api:app', host=HOST, port=PORT, log_level='info', reload=False)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 |
afc3c75f2ba699a5137b325745f39c894b8c5125 | 855 | py | Python | winkie/_nbdev.py | kiview/winkie | f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26 | [
"Apache-2.0"
] | null | null | null | winkie/_nbdev.py | kiview/winkie | f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26 | [
"Apache-2.0"
] | null | null | null | winkie/_nbdev.py | kiview/winkie | f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"DLCImporter": "00_dlc_importer.ipynb",
"transform_to_relative": "00_dlc_importer.ipynb",
"add_middle_neck": "00_dlc_importer.ipynb",
"add_rotation": "00_dlc_importer.ipynb",
... | 34.2 | 61 | 0.666667 | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"DLCImporter": "00_dlc_importer.ipynb",
"transform_to_relative": "00_dlc_importer.ipynb",
"add_middle_neck": "00_dlc_importer.ipynb",
"add_rotation": "00_dlc_importer.ipynb",
... | 0 | 0 | 0 | 0 | 0 | 18 | 0 | 0 | 23 |
0427ea64bdeb2adb8dba08ff92c89677f6a2d1e7 | 1,917 | py | Python | models/reconstruction.py | JWHan717/CS492I-Project | 5da80bc41425ee90711a3de89c5501b5f7acd4b7 | [
"MIT"
] | 23 | 2020-02-14T02:19:07.000Z | 2022-01-05T05:56:39.000Z | models/reconstruction.py | JWHan717/CS492I-Project | 5da80bc41425ee90711a3de89c5501b5f7acd4b7 | [
"MIT"
] | 1 | 2020-12-25T03:28:15.000Z | 2020-12-25T03:28:15.000Z | models/reconstruction.py | JWHan717/CS492I-Project | 5da80bc41425ee90711a3de89c5501b5f7acd4b7 | [
"MIT"
] | 2 | 2020-08-11T13:46:37.000Z | 2021-11-21T17:22:37.000Z | import torch.nn as nn
import models.utils as utils
#class BaseCNN(nn.Module)
#CNN -> 3 layer CNN, linear transform to hidden, step through gru for new hidden
#return -> linear pass through critic, action_features, gru_hidden
#class Decoder(nn.Module)
#Encode state to hidden value (same as current CNN)
#Reconstruct ... | 30.428571 | 101 | 0.615545 | import torch
import torch.nn as nn
import torch.nn.functional as F
from functools import reduce
from operator import mul
import math
import models.utils as utils
import pdb
#class BaseCNN(nn.Module)
#CNN -> 3 layer CNN, linear transform to hidden, step through gru for new hidden
#return -> linear pass through criti... | 0 | 0 | 0 | 1,101 | 0 | 0 | 0 | -10 | 157 |
559d08b64484e8af7ffc4bd56cee7469461b9cbe | 28 | py | Python | python/events/lib/python3.4/stat.py | classmember/proof_of_concept | da284ca57806f7c05c1b39bebfe0d681db2260fc | [
"MIT"
] | null | null | null | python/events/lib/python3.4/stat.py | classmember/proof_of_concept | da284ca57806f7c05c1b39bebfe0d681db2260fc | [
"MIT"
] | 3 | 2020-06-05T23:21:54.000Z | 2021-06-10T22:02:26.000Z | python/events/lib/python3.4/stat.py | classmember/proof_of_concept | da284ca57806f7c05c1b39bebfe0d681db2260fc | [
"MIT"
] | null | null | null | /usr/lib64/python3.4/stat.py | 28 | 28 | 0.785714 | /usr/lib64/python3.4/stat.py | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
149133f641bf8fcb0f289d4dd1126fbb6e7f7437 | 2,746 | py | Python | ayb/net/http.py | msolo/ayb | 3bb804846033cc0b054f06c2e6298131d22d49f2 | [
"BSD-3-Clause"
] | null | null | null | ayb/net/http.py | msolo/ayb | 3bb804846033cc0b054f06c2e6298131d22d49f2 | [
"BSD-3-Clause"
] | null | null | null | ayb/net/http.py | msolo/ayb | 3bb804846033cc0b054f06c2e6298131d22d49f2 | [
"BSD-3-Clause"
] | null | null | null | import asynchat
import asyncore
import os
import socket
import string
import sys
import StringIO
import mimetools
ROOT = "."
PORT = 8000
if __name__ == '__main__':
s = HTTPServer(PORT)
print "serving at port", PORT
asyncore.loop()
| 25.425926 | 67 | 0.630736 | import asynchat
import asyncore
import os
import socket
import string
import sys
import StringIO
import mimetools
ROOT = "."
PORT = 8000
class HTTPChannel(asynchat.async_chat):
def __init__(self, server, sock, addr):
asynchat.async_chat.__init__(self, sock)
self.server = server
self.set_terminator("\r\n... | 0 | 0 | 0 | 2,435 | 0 | 0 | 0 | 0 | 69 |
463ee74f64e620cdfe37fec339f3b7b10bf7f572 | 79,029 | py | Python | src/opserver/alarmgen.py | Mirantis/contrail-controller | 6a8ce71bde9f30e14241027dc89fcd9ca6ac0673 | [
"Apache-2.0"
] | 3 | 2019-01-11T06:16:40.000Z | 2021-02-24T23:48:21.000Z | src/opserver/alarmgen.py | Mirantis/contrail-controller | 6a8ce71bde9f30e14241027dc89fcd9ca6ac0673 | [
"Apache-2.0"
] | null | null | null | src/opserver/alarmgen.py | Mirantis/contrail-controller | 6a8ce71bde9f30e14241027dc89fcd9ca6ac0673 | [
"Apache-2.0"
] | 2 | 2019-02-06T12:52:00.000Z | 2019-04-11T23:19:28.000Z | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# Opserver
#
# Operational State Server for VNC
#
from gevent import monkey
monkey.patch_all()
import logging
logging.getLogger('kafka').addHandler(logging.StreamHandler())
logging.getLogger('kafka').setLevel(logging.WARNING)
logging.getLogger('ka... | 42.126333 | 94 | 0.533513 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# Opserver
#
# Operational State Server for VNC
#
from gevent import monkey
monkey.patch_all()
import sys
import json
import socket
import time
import copy
import traceback
import signal
import logging
logging.getLogger('kafka').addHandler(logging... | 0 | 2,901 | 0 | 72,947 | 0 | 295 | 0 | 1,373 | 808 |
132ce39687d67b406da9092611bcd5bbfe58fde7 | 7,662 | py | Python | _doc/examples/plot_op_reducesumsquare.py | henrywu2019/mlprodict | 4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad | [
"MIT"
] | null | null | null | _doc/examples/plot_op_reducesumsquare.py | henrywu2019/mlprodict | 4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad | [
"MIT"
] | null | null | null | _doc/examples/plot_op_reducesumsquare.py | henrywu2019/mlprodict | 4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad | [
"MIT"
] | null | null | null | """
.. _l-b-reducesumsquare:
Compares implementations of ReduceSumSquare
===========================================
This example compares the *numpy* for the operator *ReduceSumSquare*
to :epkg:`onnxruntime` implementation.
If available, :epkg:`tensorflow` and :epkg:`pytorch` are included as well.
.. contents::
... | 30.284585 | 83 | 0.539285 | """
.. _l-b-reducesumsquare:
Compares implementations of ReduceSumSquare
===========================================
This example compares the *numpy* for the operator *ReduceSumSquare*
to :epkg:`onnxruntime` implementation.
If available, :epkg:`tensorflow` and :epkg:`pytorch` are included as well.
.. contents::
... | 0 | 0 | 0 | 0 | 0 | 3,864 | 0 | 163 | 253 |
b08159c094d7db5f5f213e5dd6f6f4838e966eb9 | 804 | py | Python | app.py | rap999a/flask-boiler-plate | b890af60451963fed9876e6bfbf181fb3411aa68 | [
"MIT"
] | null | null | null | app.py | rap999a/flask-boiler-plate | b890af60451963fed9876e6bfbf181fb3411aa68 | [
"MIT"
] | 1 | 2021-04-30T20:39:57.000Z | 2021-04-30T20:39:57.000Z | app.py | rohanpurekar/flask-boiler-plate | b890af60451963fed9876e6bfbf181fb3411aa68 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_restful import Api
from flask_jwt import JWT
from flask_admin import Admin
from resources.user import UserRegister
from authentication.security import authenticate, identity
import os
app = Flask(__name__)
app.config.from_object(os.environ['APP_SETTINGS'])
app.config['SQLALCHEMY_TRAC... | 24.363636 | 58 | 0.762438 | from flask import Flask
from flask_restful import Resource, Api
from flask_jwt import JWT
from flask_admin import Admin
from resources.user import UserRegister
from authentication.security import authenticate, identity
import os
app = Flask(__name__)
app.config.from_object(os.environ['APP_SETTINGS'])
app.config['SQLAL... | 0 | 53 | 0 | 0 | 0 | 0 | 0 | 10 | 23 |
5230fa08253b2d257a9ed7906735863e43e66ebc | 2,296 | py | Python | archive/EPSC_0.1.4_meantrace_test.py | ngglasgow/clamp_ephys | 60f1f490837939a0afcf9cf5bdd123fb51546269 | [
"MIT"
] | null | null | null | archive/EPSC_0.1.4_meantrace_test.py | ngglasgow/clamp_ephys | 60f1f490837939a0afcf9cf5bdd123fb51546269 | [
"MIT"
] | null | null | null | archive/EPSC_0.1.4_meantrace_test.py | ngglasgow/clamp_ephys | 60f1f490837939a0afcf9cf5bdd123fb51546269 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created 5 March 2019
epsc_peak_x.y.z.py
"""
# from __main__ import *
import pandas as pd
import numpy as np
import os
import platform
''' ################## Define file structure on server #################### '''
# home_dir will depend on the OS, but the rest will not
# query machine id... | 31.888889 | 89 | 0.716463 | # -*- coding: utf-8 -*-
"""
Created 5 March 2019
epsc_peak_x.y.z.py
"""
# from __main__ import *
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
from collections import OrderedDict
import math
import platform
''' ################## Define file structure on server ###################... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 66 |
bf00d403382e030cc46b58d47977163aa1d687ce | 1,407 | py | Python | InterviewBit/LinkedList/list_cycle.py | codervikash/online-courses | a60efad23af65080a98e7dd038fb2c750237b781 | [
"MIT"
] | null | null | null | InterviewBit/LinkedList/list_cycle.py | codervikash/online-courses | a60efad23af65080a98e7dd038fb2c750237b781 | [
"MIT"
] | null | null | null | InterviewBit/LinkedList/list_cycle.py | codervikash/online-courses | a60efad23af65080a98e7dd038fb2c750237b781 | [
"MIT"
] | null | null | null | """
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Try solving it using constant additional space.
Example :
Input :
______
| |
\/ |
1 -> 2 -> 3 -> 4
Return the node corresponding to node 3.
"""
# D... | 23.065574 | 95 | 0.464819 | """
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Try solving it using constant additional space.
Example :
Input :
______
| |
\/ |
1 -> 2 -> 3 -> 4
Return the node corresponding to node 3.
"""
# D... | 0 | 0 | 0 | 933 | 0 | 0 | 0 | 0 | 23 |
4ea0fcdd48cc727932565635a0f08f4f04e83935 | 7,941 | py | Python | telecom_churn.py | SeyVu/subscription_renewal | 9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac | [
"MIT"
] | null | null | null | telecom_churn.py | SeyVu/subscription_renewal | 9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac | [
"MIT"
] | null | null | null | telecom_churn.py | SeyVu/subscription_renewal | 9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac | [
"MIT"
] | null | null | null | #########################################################################################################
# Description: Main file for telecom_churn dataset. Key function is to transform dataset into needed
# input_features and output
###################################################################################... | 38.362319 | 119 | 0.607228 | #########################################################################################################
# Description: Main file for telecom_churn dataset. Key function is to transform dataset into needed
# input_features and output
###################################################################################... | 0 | 0 | 0 | 0 | 0 | 2,640 | 0 | 22 | 112 |
f2ac9bf80d74555d2b7ecabbf4ee7a55781a4aba | 58 | py | Python | src/z3c/autoinclude/__init__.py | datakurre/z3c.autoinclude | 5e42815357d97d2704bff61f3eb7ed2ddc891907 | [
"ZPL-2.1"
] | null | null | null | src/z3c/autoinclude/__init__.py | datakurre/z3c.autoinclude | 5e42815357d97d2704bff61f3eb7ed2ddc891907 | [
"ZPL-2.1"
] | null | null | null | src/z3c/autoinclude/__init__.py | datakurre/z3c.autoinclude | 5e42815357d97d2704bff61f3eb7ed2ddc891907 | [
"ZPL-2.1"
] | null | null | null | #
| 19.333333 | 55 | 0.862069 | #
from z3c.autoinclude.dependency import package_includes
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 22 |
4e3fca3bb397aea2e4bcb9c38fa2734dd6b246b8 | 1,713 | py | Python | test/test_relic_density.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 6 | 2019-07-30T18:14:43.000Z | 2020-10-25T04:58:44.000Z | test/test_relic_density.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 8 | 2017-12-19T08:06:59.000Z | 2021-04-22T02:15:26.000Z | test/test_relic_density.py | LoganAMorrison/Hazma | e9612729767ff48d5ce50633393f81ee021242d2 | [
"MIT"
] | 1 | 2020-04-01T11:08:49.000Z | 2020-04-01T11:08:49.000Z | import unittest
import warnings
warnings.filterwarnings("ignore")
| 30.052632 | 74 | 0.642148 | import unittest
from numpy.testing import assert_allclose
import warnings
from hazma.parameters import omega_h2_cdm
from hazma.relic_density import relic_density
import unittest
warnings.filterwarnings("ignore")
class ToyModel(object):
def __init__(self, mx, sigmav):
self.mx = mx
self.sigmav = si... | 0 | 0 | 0 | 1,452 | 0 | 0 | 0 | 58 | 134 |
f91f6d45c3926b76a73c012722f66b8a8ee35a6b | 1,608 | py | Python | ffmpeg_chainsaw/helpers.py | dedayoa/ffmpeg-chainsaw | 67a8d944ff7dde6c3a46a3ff4097d485361bfc54 | [
"MIT"
] | null | null | null | ffmpeg_chainsaw/helpers.py | dedayoa/ffmpeg-chainsaw | 67a8d944ff7dde6c3a46a3ff4097d485361bfc54 | [
"MIT"
] | null | null | null | ffmpeg_chainsaw/helpers.py | dedayoa/ffmpeg-chainsaw | 67a8d944ff7dde6c3a46a3ff4097d485361bfc54 | [
"MIT"
] | null | null | null | import logging
import requests
import datetime
from requests.models import HTTPBasicAuth
logger = logging.getLogger(__name__)
def thread_it(func):
"""A wrapper function to run func in a daemon thread.
Args:
func (function): The function to run in a thread
Returns:
function: the wrapped... | 29.236364 | 106 | 0.641791 | import functools
import threading
import logging
import requests
import datetime
from requests.models import HTTPBasicAuth
logger = logging.getLogger(__name__)
def thread_it(func):
"""A wrapper function to run func in a daemon thread.
Args:
func (function): The function to run in a thread
Retu... | 0 | 217 | 0 | 0 | 0 | 0 | 0 | -10 | 70 |
261f6d88c07b7fca09f051f1968bedd8b6dee939 | 699 | py | Python | crawler/spider.py | pugong/microblog | cb93214de99528370718877ea9f09f041f64a0a4 | [
"BSD-3-Clause"
] | null | null | null | crawler/spider.py | pugong/microblog | cb93214de99528370718877ea9f09f041f64a0a4 | [
"BSD-3-Clause"
] | null | null | null | crawler/spider.py | pugong/microblog | cb93214de99528370718877ea9f09f041f64a0a4 | [
"BSD-3-Clause"
] | null | null | null |
#samplefirst()
samplesecond() | 22.548387 | 62 | 0.613734 | from urllib2 import Request, urlopen, URLError, HTTPError
def samplefirst():
try:
response = urllib2.urlopen('http://www.alibaidu.com/')
html = response.read()
print html
except HTTPError, e:
print 'The server couldn\'t fulfill the request.'
print 'Error code: ', e.co... | 0 | 0 | 0 | 0 | 0 | 559 | 0 | 36 | 68 |
bb55972f93684b5b860de75bb6e972111c196aae | 11,799 | py | Python | deepfake_photo/MAC/detect_deepfake_photos.py | saraferreirascf/Deep-fake-detector | 423f7c985481c007226d7f1acd8d48d593b724bb | [
"MIT"
] | 2 | 2021-06-28T12:47:29.000Z | 2021-12-11T13:20:43.000Z | deepfake_photo/MAC/detect_deepfake_photos.py | saraferreirascf/Deep-fake-detector | 423f7c985481c007226d7f1acd8d48d593b724bb | [
"MIT"
] | null | null | null | deepfake_photo/MAC/detect_deepfake_photos.py | saraferreirascf/Deep-fake-detector | 423f7c985481c007226d7f1acd8d48d593b724bb | [
"MIT"
] | 1 | 2021-05-29T04:04:28.000Z | 2021-05-29T04:04:28.000Z | # Contact: sara.ferreira <at> fc [dot] up [dot] pt
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commerci... | 43.7 | 170 | 0.682092 | # Contact: sara.ferreira <at> fc [dot] up [dot] pt
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commerci... | 0 | 0 | 0 | 8,866 | 0 | 0 | 0 | 621 | 705 |
9f4fe0c4f3a5ac9ce68a404275e9cc1e94d8a418 | 19,124 | py | Python | tests/kind_test.py | globocom/globomap-loader-napi | a3621e1396c14730d131315ae50ce2d7c1228765 | [
"Apache-2.0"
] | 3 | 2017-08-31T13:35:49.000Z | 2019-07-11T11:37:21.000Z | tests/kind_test.py | globocom/globomap-loader-napi | a3621e1396c14730d131315ae50ce2d7c1228765 | [
"Apache-2.0"
] | 4 | 2017-09-06T22:34:49.000Z | 2019-07-11T12:33:12.000Z | tests/kind_test.py | globocom/globomap-loader-napi | a3621e1396c14730d131315ae50ce2d7c1228765 | [
"Apache-2.0"
] | 2 | 2017-09-06T20:46:33.000Z | 2019-07-11T12:12:38.000Z | """
Copyright 2018 Globo.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 32.304054 | 93 | 0.624294 | """
Copyright 2018 Globo.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 0 | 0 | 0 | 18,345 | 0 | 0 | 0 | 33 | 90 |
4895b70f956d363402340ee469b68b88d774cf31 | 2,972 | py | Python | openregistry/lots/loki/tests/lot.py | ivanka-jakimchuk/openregistry.lots.loki | e865e8833ffac67b1af14a34398f2ffdb1283799 | [
"Apache-2.0"
] | null | null | null | openregistry/lots/loki/tests/lot.py | ivanka-jakimchuk/openregistry.lots.loki | e865e8833ffac67b1af14a34398f2ffdb1283799 | [
"Apache-2.0"
] | null | null | null | openregistry/lots/loki/tests/lot.py | ivanka-jakimchuk/openregistry.lots.loki | e865e8833ffac67b1af14a34398f2ffdb1283799 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
if __name__ == '__main__':
unittest.main(defaultTest='suite')
| 35.807229 | 82 | 0.805182 | # -*- coding: utf-8 -*-
import os
import unittest
from openregistry.lots.core.tests.base import BaseWebTest, snitch
from openregistry.lots.core.tests.blanks.mixins import ResourceTestMixin
from openregistry.lots.loki.tests.base import (
BaseLotWebTest
)
from openregistry.lots.loki.tests.json_data import test_loki_... | 0 | 0 | 0 | 1,648 | 0 | 143 | 0 | 846 | 224 |
9e632f7417b5af07d180667e55b501d267892ba8 | 431 | py | Python | codes/Ex022.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | 3 | 2021-08-17T14:02:14.000Z | 2021-08-19T02:37:30.000Z | codes/Ex022.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | null | null | null | codes/Ex022.py | BelfortJoao/Curso-phyton01 | 79376233be228f39bf548f90b8d9bd5419ac067a | [
"MIT"
] | null | null | null | print('Bem vindo ao analisador de nomes')
print('--------------------------------')
Nom = input('Qual seu nome? ')
print('________________________________')
print('Seu nome em maiusculo ficaria {}'.format(Nom.upper()))
print('Seu nome em minusculo ficaria {}'.format(Nom.lower()))
Nomd = Nom.split()
print('Seu primeiro ... | 43.1 | 68 | 0.651972 | print('Bem vindo ao analisador de nomes')
print('--------------------------------')
Nom = input('Qual seu nome? ')
print('________________________________')
print('Seu nome em maiusculo ficaria {}'.format(Nom.upper()))
print('Seu nome em minusculo ficaria {}'.format(Nom.lower()))
Nomd = Nom.split()
print('Seu primeiro ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
edec5c7aed9bf59e6a891c037f5beb5dcbb7e264 | 67 | py | Python | colorizer/__init__.py | danbradham/colorizer | 0071f7fdfa3d88e024103e585c8c194877176c8f | [
"MIT"
] | 2 | 2020-03-26T14:37:42.000Z | 2020-06-20T23:04:52.000Z | colorizer/__init__.py | danbradham/colorizer | 0071f7fdfa3d88e024103e585c8c194877176c8f | [
"MIT"
] | null | null | null | colorizer/__init__.py | danbradham/colorizer | 0071f7fdfa3d88e024103e585c8c194877176c8f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 13.4 | 23 | 0.58209 | # -*- coding: utf-8 -*-
from .api import *
from . import ui, util
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 45 |
8b8731dafe7fb93abe62f798241d9618688c15b1 | 5,015 | py | Python | app/run.py | HectorMontes10/PropertiesPriceApp | 4a38061a914d508f9465959af6fe1cb62fa04e06 | [
"MIT"
] | null | null | null | app/run.py | HectorMontes10/PropertiesPriceApp | 4a38061a914d508f9465959af6fe1cb62fa04e06 | [
"MIT"
] | null | null | null | app/run.py | HectorMontes10/PropertiesPriceApp | 4a38061a914d508f9465959af6fe1cb62fa04e06 | [
"MIT"
] | null | null | null | import pandas as pd
from flask import Flask
from flask import request, jsonify
from sqlalchemy import create_engine
import folium
from folium.plugins import HeatMap
#Import custom class and functions:
import sys
sys.path.append("./customized_class")
#from load_map import load_source_map
# load data for missing repor... | 33.657718 | 119 | 0.673579 | import json
import plotly
import pandas as pd
from flask import Flask
from flask import render_template, request, jsonify
from plotly.graph_objs import Bar
from sqlalchemy import create_engine
import joblib
import plotly.graph_objs as go_
from flask import current_app, flash, jsonify, make_response, redirect, request, ... | 0 | 3,139 | 0 | 0 | 0 | 0 | 0 | 149 | 402 |
b5995dc82f79c55950a995af453f892c17f2e0d4 | 2,395 | py | Python | 35_Arac_Hizi_Hesaplama.py | omerkocadayi/Python_Goruntu_Isleme | 4a13d2b2343a51b3af292996d0c6884a102503a9 | [
"MIT"
] | 15 | 2019-08-02T12:56:40.000Z | 2022-03-17T13:00:25.000Z | 35_Arac_Hizi_Hesaplama.py | omerkocadayi/Python_Goruntu_Isleme | 4a13d2b2343a51b3af292996d0c6884a102503a9 | [
"MIT"
] | 3 | 2020-12-09T02:40:25.000Z | 2021-11-01T12:44:09.000Z | 35_Arac_Hizi_Hesaplama.py | omerkocadayi/Python_Goruntu_Isleme | 4a13d2b2343a51b3af292996d0c6884a102503a9 | [
"MIT"
] | 4 | 2021-02-27T11:41:06.000Z | 2021-12-21T18:03:00.000Z | """ -*- coding: utf-8 -*-
@author: omerkocadayi
https://github.com/omerkocadayi
https://www.linkedin.com/in/omerkocadayi/ """
import cv2
import time
vid = cv2.VideoCapture("cars.mp4")
carCascade = cv2.CascadeClassifier("haarcascade/car1.xml")
crd = [[620,220],[740,220],[580,500],[815,500]]
d... | 39.262295 | 146 | 0.455115 | """ -*- coding: utf-8 -*-
@author: omerkocadayi
https://github.com/omerkocadayi
https://www.linkedin.com/in/omerkocadayi/ """
import cv2
import time
vid = cv2.VideoCapture("cars.mp4")
carCascade = cv2.CascadeClassifier("haarcascade/car1.xml")
crd = [[620,220],[740,220],[580,500],[815,500]]
d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc7e76bb9454b1190e01d039822faddac1ed0b87 | 21,436 | py | Python | cumm/conv/main_real.py | FindDefinition/cumm | 3d58e85b660afa05c20514afe65b8aa3a4995953 | [
"Apache-2.0"
] | 20 | 2021-10-13T03:41:59.000Z | 2022-03-31T07:23:14.000Z | cumm/conv/main_real.py | FindDefinition/cumm | 3d58e85b660afa05c20514afe65b8aa3a4995953 | [
"Apache-2.0"
] | 3 | 2021-11-21T11:25:55.000Z | 2022-03-08T06:12:35.000Z | cumm/conv/main_real.py | FindDefinition/cumm | 3d58e85b660afa05c20514afe65b8aa3a4995953 | [
"Apache-2.0"
] | 4 | 2021-10-13T03:42:01.000Z | 2022-03-21T13:07:56.000Z | # Copyright 2021 Yan Yan
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | 41.542636 | 96 | 0.54903 | # Copyright 2021 Yan Yan
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | 0 | 0 | 0 | 0 | 0 | 20,052 | 0 | 208 | 400 |
5b9847c07ed4ebe23b84072699226c55aa07bb96 | 41 | py | Python | aroma/cli/__init__.py | oesteban/aroma | 3c077ecef03cd44fb2d50d7dbabb37d295afb459 | [
"Apache-2.0"
] | 5 | 2021-08-31T17:36:59.000Z | 2021-12-13T04:51:56.000Z | aroma/cli/__init__.py | oesteban/aroma | 3c077ecef03cd44fb2d50d7dbabb37d295afb459 | [
"Apache-2.0"
] | 44 | 2020-09-28T18:27:29.000Z | 2020-12-22T21:16:22.000Z | aroma/cli/__init__.py | oesteban/aroma | 3c077ecef03cd44fb2d50d7dbabb37d295afb459 | [
"Apache-2.0"
] | 6 | 2021-02-09T22:39:43.000Z | 2021-12-08T15:13:17.000Z | """Command-line interfaces for AROMA."""
| 20.5 | 40 | 0.707317 | """Command-line interfaces for AROMA."""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8a34dab3d2d6bcc227e7940bf689a8ad37755cea | 878 | py | Python | coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null | coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null | coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null |
"""
Given a number sequence, find the increasing subsequence with the highest sum.
Write a method that returns the highest sum.
Example 1:
Input: {4,1,2,6,10,1,12}
Output: 32
Explanation: The increaseing sequence is {4,6,10,12}.
Please note the difference, as the LIS is {1,2,6,10,12} which has a sum of '31'.
Exa... | 18.291667 | 80 | 0.604784 |
"""
Given a number sequence, find the increasing subsequence with the highest sum.
Write a method that returns the highest sum.
Example 1:
Input: {4,1,2,6,10,1,12}
Output: 32
Explanation: The increaseing sequence is {4,6,10,12}.
Please note the difference, as the LIS is {1,2,6,10,12} which has a sum of '31'.
Exa... | 0 | 0 | 0 | 0 | 0 | 360 | 0 | 0 | 45 |
fce55d5d083da6d0c2d6034db3f36f6dc764f0f9 | 2,790 | py | Python | brac/scripts/train_bc.py | Thibaud-Ardoin/d4rl_evaluations | 135b23d3aecc234aacaeaaa019fbc7101d9b87ec | [
"Apache-2.0"
] | 123 | 2020-07-02T02:42:06.000Z | 2022-03-31T11:44:30.000Z | brac/scripts/train_bc.py | junmokane/AI602_Project | 59c132ae04751f9fb6cf6ebb491042cbf4de003d | [
"Apache-2.0"
] | 24 | 2020-06-29T19:52:07.000Z | 2022-02-10T02:07:17.000Z | brac/scripts/train_bc.py | junmokane/AI602_Project | 59c132ae04751f9fb6cf6ebb491042cbf4de003d | [
"Apache-2.0"
] | 24 | 2020-07-03T12:28:49.000Z | 2022-03-24T04:44:49.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.659341 | 80 | 0.729749 | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 0 | 0 | 0 | 0 | 0 | 665 | 0 | 107 | 180 |
7ca75fb91f67e7bea901ef23cdc663dbf6cea978 | 826 | py | Python | apps/modules/message/apis/send_msg.py | Bension/osroom | 59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67 | [
"BSD-2-Clause"
] | 579 | 2017-11-29T15:34:14.000Z | 2022-03-28T13:23:53.000Z | apps/modules/message/apis/send_msg.py | Bension/osroom | 59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67 | [
"BSD-2-Clause"
] | 50 | 2017-07-26T16:44:01.000Z | 2022-01-13T00:42:09.000Z | apps/modules/message/apis/send_msg.py | Bension/osroom | 59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67 | [
"BSD-2-Clause"
] | 238 | 2018-05-19T17:31:19.000Z | 2022-01-09T08:19:04.000Z | #!/usr/bin/env python
# -*-coding:utf-8-*-
# @Time : 2017/11/1 ~ 2019/9/1
# @Author : Allen Woo
| 29.5 | 95 | 0.687651 | #!/usr/bin/env python
# -*-coding:utf-8-*-
# @Time : 2017/11/1 ~ 2019/9/1
# @Author : Allen Woo
from apps.core.flask.login_manager import osr_login_required
from apps.core.blueprint import api
from apps.core.flask.permission import permission_required
from apps.core.flask.response import response_format
from apps.modul... | 102 | 404 | 0 | 0 | 0 | 0 | 0 | 158 | 133 |
70a9f42953c68280009495c8a3970739bbc6452f | 12,653 | py | Python | library/nosecone/standard_nosecones.py | summerswallow/open-rocketry-tools | 981c3f0cd16aac142e8bc9e57fc86151ce864a7c | [
"MIT"
] | null | null | null | library/nosecone/standard_nosecones.py | summerswallow/open-rocketry-tools | 981c3f0cd16aac142e8bc9e57fc86151ce864a7c | [
"MIT"
] | null | null | null | library/nosecone/standard_nosecones.py | summerswallow/open-rocketry-tools | 981c3f0cd16aac142e8bc9e57fc86151ce864a7c | [
"MIT"
] | null | null | null | # ==================
#
# nosecone_threaded_bases.py
#
# License: https://github.com/summerswallow/open-rocketry/blob/master/LICENSE
# (c) 2018 Summer Swallow Consulting
#
# ==================
from misc import utils
MM2IN = 25.4
if __name__ == '__main__':
from bodytubes.semroc import bt5
array = u... | 44.868794 | 121 | 0.612345 | # ==================
#
# nosecone_threaded_bases.py
#
# License: https://github.com/summerswallow/open-rocketry/blob/master/LICENSE
# (c) 2018 Summer Swallow Consulting
#
# ==================
from math import sqrt, atan, acos, cos, sin, fabs, pi
import os
from solid import *
from solid.utils import up, down, left, ... | 0 | 0 | 0 | 10,094 | 0 | 0 | 0 | 88 | 414 |
ef1c0f5e5ef5bdd88efa0121392093e214d2623c | 43 | py | Python | Book/chap3/Supporting Materials/randnCode.py | lorenghoh/pyman | 9b4ddd52c5577fc85e2601ae3128f398f0eb673c | [
"CC0-1.0"
] | 3 | 2020-04-30T19:50:11.000Z | 2020-10-17T02:07:00.000Z | Book/chap3/Supporting Materials/randnCode.py | lorenghoh/pyman | 9b4ddd52c5577fc85e2601ae3128f398f0eb673c | [
"CC0-1.0"
] | 35 | 2020-04-21T04:25:31.000Z | 2021-11-06T22:49:44.000Z | Book/chap3/Supporting Materials/randnCode.py | lorenghoh/pyman | 9b4ddd52c5577fc85e2601ae3128f398f0eb673c | [
"CC0-1.0"
] | 11 | 2020-04-21T04:33:48.000Z | 2020-10-23T21:12:12.000Z | import numpy as np
x = np.random.randn(20) | 14.333333 | 23 | 0.72093 | import numpy as np
x = np.random.randn(20) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5600ac25a4ecf53939067e76e6b9cbab6e411eb7 | 73 | py | Python | apps/account/views.py | sssunda/flask-jwt-auth | 12c91ea5668926292e67a7dea722873851423ce6 | [
"MIT"
] | 1 | 2020-01-29T15:29:58.000Z | 2020-01-29T15:29:58.000Z | apps/account/views.py | sssunda/flask-jwt-auth | 12c91ea5668926292e67a7dea722873851423ce6 | [
"MIT"
] | null | null | null | apps/account/views.py | sssunda/flask-jwt-auth | 12c91ea5668926292e67a7dea722873851423ce6 | [
"MIT"
] | null | null | null | # Third Party Module Import
from flask_restplus import Api
api = Api()
| 12.166667 | 30 | 0.753425 | # Third Party Module Import
from flask_restplus import Api
api = Api()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
12d445805ddef917b30b4c1291d0d723b55f0e25 | 7,935 | py | Python | torch_datasets/datasets/convert.py | mingruimingrui/torch-datasets | 2640b8c4fa82156e68e617fc545a546b4e08dc4e | [
"MIT"
] | null | null | null | torch_datasets/datasets/convert.py | mingruimingrui/torch-datasets | 2640b8c4fa82156e68e617fc545a546b4e08dc4e | [
"MIT"
] | null | null | null | torch_datasets/datasets/convert.py | mingruimingrui/torch-datasets | 2640b8c4fa82156e68e617fc545a546b4e08dc4e | [
"MIT"
] | null | null | null | """ Collection of functions to transform popular datasets into torch_dataset Datasets """
import os
import tqdm
import json
from scipy.io import loadmat
from .detection_dataset import DetectionDataset
from .siamese_dataset import SiameseDataset
def convert_coco_to_detection_dataset(coco_ann_file, root_image_dir, no... | 36.736111 | 102 | 0.63201 | """ Collection of functions to transform popular datasets into torch_dataset Datasets """
import os
import tqdm
import json
from scipy.io import loadmat
from .detection_dataset import DetectionDataset
from .siamese_dataset import SiameseDataset
def convert_coco_to_detection_dataset(coco_ann_file, root_image_dir, no... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8304e3ad3f39daa11dc4f742e61518c19e8fd22 | 5,090 | py | Python | toy_problem.py | Janna112358/pta-nullstreams | 323403642f4f5c6b618782e422469a18c783b0e5 | [
"MIT"
] | null | null | null | toy_problem.py | Janna112358/pta-nullstreams | 323403642f4f5c6b618782e422469a18c783b0e5 | [
"MIT"
] | null | null | null | toy_problem.py | Janna112358/pta-nullstreams | 323403642f4f5c6b618782e422469a18c783b0e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 11 15:49:12 2019
@author: jgoldstein
inspace toy problem
"""
# using time units of days
YEAR = 365.25
# fig2 = plt.figure()
# ax = fig2.add_subplot(121)
# ax.plot(freqs, ft_true, 'b-', label='true signal')
# ax.plot(freqs, ft_gp_n... | 40.07874 | 98 | 0.664833 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 11 15:49:12 2019
@author: jgoldstein
inspace toy problem
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import periodogram
from inspace.interpolation import get_target_times, sinc_interpolation
from inspace.gp_george impo... | 0 | 0 | 0 | 0 | 0 | 3,298 | 0 | 106 | 180 |
d3bd58cf9d007264ac0f41fd3b302cca6c4891ce | 2,476 | py | Python | ga-es_dist/es_distributed/algos/algo.py | MUzzell/UoR-msc-project | fac83bb0ebbdd3839530c6df0493deff3475fff5 | [
"MIT"
] | null | null | null | ga-es_dist/es_distributed/algos/algo.py | MUzzell/UoR-msc-project | fac83bb0ebbdd3839530c6df0493deff3475fff5 | [
"MIT"
] | null | null | null | ga-es_dist/es_distributed/algos/algo.py | MUzzell/UoR-msc-project | fac83bb0ebbdd3839530c6df0493deff3475fff5 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
| 29.831325 | 102 | 0.664378 | import sys
import logging
import gym
import h5py
from es_distributed import tf_util
from es_distributed.policies import policies
from es_distributed.atari_wrappers import wrap_deepmind
from .common import RunningStat, SharedNoiseTable
log = logging.getLogger(__name__)
def build_env(env_id):
gym.undo_logger_setu... | 0 | 39 | 0 | 1,487 | 0 | 563 | 0 | 66 | 271 |
7f3ae5bbd070ed3d885337f64b0d5cb227a4a8ed | 3,530 | py | Python | lib/pytracking/ltr/models/bbreg/atom.py | ngunnar/tracking_reg | 71a1d22e53e277f36f961040f03e56efb163ded5 | [
"MIT"
] | 12 | 2021-07-27T07:18:24.000Z | 2022-03-09T13:52:20.000Z | ltr/models/bbreg/atom.py | tsingqguo/AttackTracker | 054268d5afa0044675c7acf1ac13e621f1c9549e | [
"Apache-2.0"
] | 2 | 2021-08-03T09:21:33.000Z | 2021-12-29T14:25:30.000Z | ltr/models/bbreg/atom.py | tsingqguo/AttackTracker | 054268d5afa0044675c7acf1ac13e621f1c9549e | [
"Apache-2.0"
] | 3 | 2021-11-18T14:46:40.000Z | 2022-01-03T15:47:23.000Z | import torch.nn as nn
| 41.046512 | 124 | 0.690368 | import torch.nn as nn
import ltr.models.backbone as backbones
import ltr.models.bbreg as bbmodels
from ltr import model_constructor
class ATOMnet(nn.Module):
""" ATOM network module"""
def __init__(self, feature_extractor, bb_regressor, bb_regressor_layer, extractor_grad=True):
"""
args:
... | 0 | 991 | 0 | 2,334 | 0 | 0 | 0 | 44 | 135 |
2505b1df72aead6dfc3642e99095a97e3c6f7e4a | 1,226 | py | Python | src/dm/run.py | must-11/ap_experiment | 50af0e239bfbd4e3b02c8a23fe1b110601715952 | [
"MIT"
] | null | null | null | src/dm/run.py | must-11/ap_experiment | 50af0e239bfbd4e3b02c8a23fe1b110601715952 | [
"MIT"
] | null | null | null | src/dm/run.py | must-11/ap_experiment | 50af0e239bfbd4e3b02c8a23fe1b110601715952 | [
"MIT"
] | null | null | null | import numpy as np
np.random.seed(100)
p = 0.98 #
n = 100 #
l = [0]*int(p*100) + [1]*int((1-p)*100)
if __name__ == "__main__":
main()
| 21.508772 | 66 | 0.484502 | import matplotlib.pyplot as plt
import numpy as np
np.random.seed(100)
p = 0.98 # スパース度
n = 100 # 行列のサイズ
l = [0]*int(p*100) + [1]*int((1-p)*100)
def main():
# 対象のグラフ
G = np.random.choice(l, n**2).reshape((n, -1)).astype(np.int8)
# 最大マッチングを求める
match = max_matching(G)
# 残余グラフから不要な枝を取り除く
Gm... | 237 | 0 | 0 | 0 | 0 | 944 | 0 | 10 | 45 |
c913f3600452f85390bb6a260fc273ffd4a7dfad | 11,882 | py | Python | baselines/launch.py | google/qhbm-library | e4e24ca0458bb475d60276207e871a312de86f65 | [
"Apache-2.0"
] | 19 | 2022-02-17T19:32:36.000Z | 2022-03-31T01:07:19.000Z | baselines/launch.py | google/qhbm-library | e4e24ca0458bb475d60276207e871a312de86f65 | [
"Apache-2.0"
] | 37 | 2022-02-17T17:26:01.000Z | 2022-03-31T21:32:16.000Z | baselines/launch.py | google/qhbm-library | e4e24ca0458bb475d60276207e871a312de86f65 | [
"Apache-2.0"
] | 8 | 2022-02-17T17:26:32.000Z | 2022-03-18T12:11:33.000Z | """XManager/XCloud launcher for both GPU and TPU jobs.
The launcher works with any Python binary with the following flags:
* `output_dir` is the directory for saving summaries and logs;
* `use_gpu` determines whether to run on GPU or otherwise TPU;
* `num_cores` is the number of TPU cores or GPUs;
* `tpu` is the TPU ... | 39.214521 | 136 | 0.698872 | """XManager/XCloud launcher for both GPU and TPU jobs.
The launcher works with any Python binary with the following flags:
* `output_dir` is the directory for saving summaries and logs;
* `use_gpu` determines whether to run on GPU or otherwise TPU;
* `num_cores` is the number of TPU cores or GPUs;
* `tpu` is the TPU ... | 0 | 0 | 0 | 0 | 0 | 497 | 0 | 29 | 45 |
354ab747db3a6fc22a1a104435220ccf26046785 | 420 | py | Python | prodapi/info.py | jmagnusson/prodapi | 7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf | [
"MIT"
] | 4 | 2021-04-11T22:50:13.000Z | 2021-04-12T13:50:25.000Z | prodapi/info.py | jmagnusson/prodapi | 7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf | [
"MIT"
] | null | null | null | prodapi/info.py | jmagnusson/prodapi | 7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf | [
"MIT"
] | null | null | null | import os
import platform
try:
from importlib.metadata import version as _version_func # type: ignore
except ImportError:
# Python 3.7 and lower
from importlib_metadata import version as _version_func # type: ignore
__all__ = ("name", "version", "node", "environment")
name = __package__
version = _vers... | 26.25 | 75 | 0.745238 | import os
import platform
try:
from importlib.metadata import version as _version_func # type: ignore
except ImportError:
# Python 3.7 and lower
from importlib_metadata import version as _version_func # type: ignore
__all__ = ("name", "version", "node", "environment")
name = __package__
version = _vers... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5aa266946f5076ba45dc98655ae286e0430d1126 | 764 | py | Python | mail/emailparser.py | isabella232/payloadmail | dbfacf5482d2ee49757fa49d7fc082b633de9537 | [
"MIT"
] | 1 | 2019-05-17T06:27:11.000Z | 2019-05-17T06:27:11.000Z | mail/emailparser.py | payloadmail/payloadmail | dbfacf5482d2ee49757fa49d7fc082b633de9537 | [
"MIT"
] | 1 | 2022-01-23T15:23:25.000Z | 2022-01-23T15:30:40.000Z | mail/emailparser.py | isabella232/payloadmail | dbfacf5482d2ee49757fa49d7fc082b633de9537 | [
"MIT"
] | 3 | 2019-05-16T19:20:27.000Z | 2022-01-23T15:17:31.000Z |
if __name__ == '__main__':
for mail in check_emails():
print(mail.getall())
| 24.645161 | 57 | 0.704188 | from . import parsed_email
import mailbox
from email.utils import parseaddr
def check_emails(useremail=None):
emails = []
mbox = mailbox.Maildir('/home/mailuser/Maildir')
for msg in mbox.values():
parsed_sender = parseaddr(msg['From'])[1].split('@')[0]
if parsed_sender == useremail:
emails.append(parsed_ema... | 0 | 0 | 0 | 0 | 0 | 560 | 0 | 10 | 112 |
5ea0d1d6c57ce68bc5cc6e01f55ab87e976337b1 | 5,213 | py | Python | pianoputer.py | MemoryAndDream/pianoputer | 2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa | [
"CC-BY-3.0"
] | 1 | 2021-07-12T14:19:49.000Z | 2021-07-12T14:19:49.000Z | pianoputer.py | MemoryAndDream/pianoputer | 2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa | [
"CC-BY-3.0"
] | null | null | null | pianoputer.py | MemoryAndDream/pianoputer | 2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf8
import numpy as np
import Queue
myQueue = Queue.Queue()
#music=[0,0,0,0,0,0]
#music=[1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1]
#music=[-2,1,3,5,1,0,3,5,5,6,7,8,6,6,5,5,3,2,1,1,1,3,2,1,1,1,2,3,2,1,-1,2,3,2]
music=[1,1,5,5,6,6,5,4,4,3,3,2,2,1,5,5,4,4,3,3,2,5,5,4,4,3,3,2,1,1,5,5,6,6,5,4,4,3,3,... | 32.179012 | 127 | 0.612315 | #!/usr/bin/env python
#coding=utf8
from scipy.io import wavfile
import argparse
import numpy as np
import pygame
import sys
import warnings
import Queue
myQueue = Queue.Queue()
#music=[0,0,0,0,0,0]
#music=[1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1]
#music=[-2,1,3,5,1,0,3,5,5,6,7,8,6,6,5,5,3,2,1,1,1,3,2,1,1,1,2,3,2,1,-1,2,3,2]
... | 1,035 | 0 | 0 | 0 | 0 | 2,561 | 0 | -24 | 156 |
97a2009462c6bbaa0498904780e07eff5f9607fb | 2,322 | py | Python | LobbyService/test/test_poll_lobby.py | Devin0xFFFFFF/singed-feathers | 747eef56fb3ba2a73cb7ba851462894efeddd00b | [
"BSD-3-Clause"
] | 1 | 2017-06-20T15:19:40.000Z | 2017-06-20T15:19:40.000Z | LobbyService/test/test_poll_lobby.py | Devin0xFFFFFF/singed-feathers | 747eef56fb3ba2a73cb7ba851462894efeddd00b | [
"BSD-3-Clause"
] | 3 | 2019-02-13T16:05:25.000Z | 2019-02-15T03:31:06.000Z | LobbyService/test/test_poll_lobby.py | Devin0xFFFFFF/singed-feathers | 747eef56fb3ba2a73cb7ba851462894efeddd00b | [
"BSD-3-Clause"
] | null | null | null |
valid_query_string_params = {
"queryStringParameters": {
"PlayerID": "Player2",
"LobbyID": "Lobby1"}
}
valid_get_lobby = {
"GameID": "0",
"Players": [
{"PlayerID": "Player1", "PlayerName": "Bob", "PlayerSideSelection": 0, "PlayerState": 0},
{"PlayerID": "Player2", "PlayerNa... | 30.552632 | 97 | 0.702412 | import pytest
from mock import Mock, patch
from service import poll_lobby
valid_query_string_params = {
"queryStringParameters": {
"PlayerID": "Player2",
"LobbyID": "Lobby1"}
}
valid_get_lobby = {
"GameID": "0",
"Players": [
{"PlayerID": "Player1", "PlayerName": "Bob", "PlayerSide... | 0 | 1,235 | 0 | 0 | 0 | 0 | 0 | 8 | 159 |
b33c85c9d0ba0eaeac3ddce07a45ed0495ad9176 | 32,402 | py | Python | SJTUsoso/blog/views.py | JianmingGuo/SJTUsousou | a7ffb3921c241d2074f2da5f74abfb9a03b0311d | [
"MIT"
] | 6 | 2020-04-28T13:36:56.000Z | 2020-06-21T14:21:29.000Z | SJTUsoso/blog/views.py | JianmingGuo/SJTUsousou | a7ffb3921c241d2074f2da5f74abfb9a03b0311d | [
"MIT"
] | 3 | 2020-05-27T18:34:05.000Z | 2020-06-17T11:18:49.000Z | SJTUsoso/blog/views.py | JianmingGuo/SJTUsousou | a7ffb3921c241d2074f2da5f74abfb9a03b0311d | [
"MIT"
] | 3 | 2020-04-28T13:40:24.000Z | 2020-06-21T15:57:50.000Z | from django.http import HttpResponse
# Create your views here.
# def reset(req):
# return render(req, 'reset.html')
| 39.805897 | 111 | 0.590087 | import json
import hashlib
import re
import os
import random
import math
from urllib.parse import urlencode
from functools import wraps
from django.db.models import Avg, Q, Count, F
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse, JsonResponse
from django.s... | 1,608 | 0 | 0 | 0 | 0 | 30,276 | 0 | 289 | 1,174 |
cab6e460543c0b300b53881e918dd09d92d3495c | 1,631 | py | Python | nmj/test/cleaners_test.py | ericcolleu/python-nmj | d61741efaa858a88bbd45844ec11ac193cce3cde | [
"MIT"
] | 1 | 2021-01-31T11:41:22.000Z | 2021-01-31T11:41:22.000Z | nmj/test/cleaners_test.py | ericcolleu/python-nmj | d61741efaa858a88bbd45844ec11ac193cce3cde | [
"MIT"
] | null | null | null | nmj/test/cleaners_test.py | ericcolleu/python-nmj | d61741efaa858a88bbd45844ec11ac193cce3cde | [
"MIT"
] | null | null | null | import unittest
if __name__ == "__main__":
unittest.main()
| 31.365385 | 141 | 0.762109 | import unittest
from nmj.cleaners import MovieCleaner, TVShowCleaner
class MovieCleanerTestCase(unittest.TestCase):
def setUp(self):
super(MovieCleanerTestCase, self).setUp()
self.cleaner = MovieCleaner()
def test_01a(self):
self.__test_cleaning("The A Team", "the a team")
def test_02a(self):
self.__tes... | 0 | 0 | 0 | 1,492 | 0 | 0 | 0 | 31 | 46 |
52f1b9e73d74a165d986a37027ba04698399ee7b | 1,466 | py | Python | cgi-bin/login.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | cgi-bin/login.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | cgi-bin/login.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | #!/usr/bin/python
# login.cgi
import cgi
if __name__ == '__main__':
try:
formData = cgi.FieldStorage()
message = formData.getvalue('message','')
htmlTop()
if message == "wrong_password":
htmlMid("No such account or the password is wrong, please try again.")
elif ... | 29.918367 | 84 | 0.557981 | #!/usr/bin/python
# login.cgi
import cgi
def htmlTop():
print("""Content-type:text/html\n\n
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'/>
<title>Login</title>
</head>
<body>""")
def htmlMid(message=''):
print... | 0 | 0 | 0 | 0 | 0 | 884 | 0 | 0 | 68 |
94eae5df7a0c6b6a989fc36fa087f9a4b52b36b0 | 20,602 | py | Python | sdk/python/pulumi_cloudflare/zone_lockdown.py | pulumi/pulumi-cloudflare | d444af2fab6101b388a15cf2e3933e45e9935cc6 | [
"ECL-2.0",
"Apache-2.0"
] | 35 | 2019-03-14T21:29:29.000Z | 2022-03-30T00:00:59.000Z | sdk/python/pulumi_cloudflare/zone_lockdown.py | pulumi/pulumi-cloudflare | d444af2fab6101b388a15cf2e3933e45e9935cc6 | [
"ECL-2.0",
"Apache-2.0"
] | 128 | 2019-03-08T23:45:58.000Z | 2022-03-31T21:05:22.000Z | sdk/python/pulumi_cloudflare/zone_lockdown.py | pulumi/pulumi-cloudflare | d444af2fab6101b388a15cf2e3933e45e9935cc6 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2019-05-10T12:52:56.000Z | 2020-03-24T15:02:14.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
__all__ = ['ZoneLockdownArgs', 'ZoneLockdown']
| 47.800464 | 320 | 0.663382 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 0 | 17,369 | 0 | 2,737 | 0 | 0 | 0 | 45 | 202 |
ccf0f67bdaf6c9f9aae70cc4c13f47e0c8b0fdd4 | 2,502 | py | Python | main.py | 3191110276/APIC-EM-Spark-Bot | 00ca2c9b8891cf33517d2e7604c89994fdadd189 | [
"MIT"
] | 1 | 2018-04-06T10:45:08.000Z | 2018-04-06T10:45:08.000Z | main.py | 3191110276/APIC-EM-Spark-Bot | 00ca2c9b8891cf33517d2e7604c89994fdadd189 | [
"MIT"
] | null | null | null | main.py | 3191110276/APIC-EM-Spark-Bot | 00ca2c9b8891cf33517d2e7604c89994fdadd189 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_basicauth import BasicAuth
# Configuration information for the application
app = Flask(__name__)
#app.debug = True
app.config['BASIC_AUTH_USERNAME'] = 'cisconlp'
app.config['BASIC_AUTH_PASSWORD'] = 'thisisanamazingpasswordfortheserverthatwehave52394023409u-,,-,-.-'
basic_auth = Bas... | 30.144578 | 105 | 0.643885 | from flask import Flask, request
from flask_basicauth import BasicAuth
from werkzeug.wrappers import Response
from intents import controller
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
import json
import os
# Configuration information for the application
app = Flask(__name__)
#app.... | 0 | 1,894 | 0 | 0 | 0 | 0 | 0 | 50 | 154 |
7f525f70141e1530ae8856b4f286479941c52932 | 1,098 | py | Python | python3/leetcodepy/largest_rectangle_in_histogram.py | qianbinbin/leetcode | 915cecab0c940cd13847683ec55b17b77eb0f39b | [
"MIT"
] | 4 | 2018-03-05T02:27:16.000Z | 2021-03-15T14:19:44.000Z | python3/leetcodepy/largest_rectangle_in_histogram.py | qianbinbin/leetcode | 915cecab0c940cd13847683ec55b17b77eb0f39b | [
"MIT"
] | null | null | null | python3/leetcodepy/largest_rectangle_in_histogram.py | qianbinbin/leetcode | 915cecab0c940cd13847683ec55b17b77eb0f39b | [
"MIT"
] | 2 | 2018-07-22T10:32:10.000Z | 2018-10-20T03:14:28.000Z | """
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
https://leetcode.com/static/images/problemset/histogram.png
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
https://leetcod... | 26.780488 | 156 | 0.578324 | """
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
https://leetcode.com/static/images/problemset/histogram.png
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
https://leetcod... | 0 | 0 | 0 | 578 | 0 | 0 | 0 | 0 | 23 |
6083790ebb35ed2a3f50d1a93fc03cac27502db1 | 4,208 | py | Python | app.py | testmorii/azure_flask_cv_keras | 1a9be3b4d42873178ed74a1a03805029918050c7 | [
"MIT"
] | null | null | null | app.py | testmorii/azure_flask_cv_keras | 1a9be3b4d42873178ed74a1a03805029918050c7 | [
"MIT"
] | null | null | null | app.py | testmorii/azure_flask_cv_keras | 1a9be3b4d42873178ed74a1a03805029918050c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from flask import Flask
# VGG16 (540MB)50
# /.keras
# /.keras/model/vgg16_weights_tf_dim_ordering_tf_kernels.h5
#from keras.applications.vgg16 import VGG16
#from keras.applications.vgg16 import preprocess_input, decode_predictions
#from tensorflow.keras.applications.resnet50 import Res... | 35.361345 | 98 | 0.679895 | # -*- coding: utf-8 -*-
import os
import numpy as np
import urllib.request
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, session
from werkzeug.utils import secure_filename
from PIL import Image
import cv2
import io
from keras import models
from keras.models import load_mode... | 885 | 2,659 | 0 | 0 | 0 | 96 | 0 | 163 | 314 |
b12f7a9c9a1e5ed2ab800720a7e14805ded4a355 | 9,276 | py | Python | lib/setup.py | NU-LL/lighttrack- | d870c9eac76003fe9e0c908e2e6d516b942d431c | [
"MIT"
] | 1 | 2021-03-04T04:52:09.000Z | 2021-03-04T04:52:09.000Z | lib/setup.py | NU-LL/lighttrack- | d870c9eac76003fe9e0c908e2e6d516b942d431c | [
"MIT"
] | null | null | null | lib/setup.py | NU-LL/lighttrack- | d870c9eac76003fe9e0c908e2e6d516b942d431c | [
"MIT"
] | 1 | 2021-01-21T10:03:36.000Z | 2021-01-21T10:03:36.000Z | # -*- coding: UTF-8 -*-
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
imp... | 38.016393 | 91 | 0.545925 | # -*- coding: UTF-8 -*-
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
imp... | 0 | 0 | 0 | 137 | 0 | 5,385 | 0 | 17 | 67 |