hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7cf6a5111b2b89adbb9a05cd1e297b6cc0c6423c | 11,658 | py | Python | standup.py | drgerstl/standupTracker | d9b2d5b2da702ffd724aba8659e0044b0275c79f | [
"MIT",
"Unlicense"
] | null | null | null | standup.py | drgerstl/standupTracker | d9b2d5b2da702ffd724aba8659e0044b0275c79f | [
"MIT",
"Unlicense"
] | null | null | null | standup.py | drgerstl/standupTracker | d9b2d5b2da702ffd724aba8659e0044b0275c79f | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/env python
"""
A simple GUI program used to display and track who is attending stand up
meetings as well as who has presented already.
"""
from tkinter import *
import tkinter as tk
import tkinter.font as tkFont
from tkinter.messagebox import showinfo
from typing import Tuple
import constants as ... | 32.932203 | 101 | 0.621376 |
9d5a6286742228a0cb2f27f8763fb1a0fd791fac | 4,035 | py | Python | fault/tester/symbolic_tester.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 31 | 2018-07-16T15:03:14.000Z | 2022-03-10T08:36:09.000Z | fault/tester/symbolic_tester.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 216 | 2018-07-18T20:00:34.000Z | 2021-10-05T17:40:47.000Z | fault/tester/symbolic_tester.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T00:56:58.000Z | 2021-11-05T13:31:37.000Z | import fault
from .staged_tester import Tester
from fault.wrapper import Wrapper, PortWrapper, InstanceWrapper
try:
from fault.pono_target import PonoTarget
except ImportError:
# Optional dependency
pass
import fault.actions as actions
from fault.random import ConstrainedRandomGenerator
class SymbolicWrap... | 34.784483 | 79 | 0.626518 |
09a1c7b8c6315c9b750b57864a41a55a9f4cb1ac | 2,255 | py | Python | models/property.py | esacosta/u-mooc | 8d9a1427c988121e12dd6e2f7c8835f0e561c507 | [
"Apache-2.0"
] | 1 | 2015-10-06T14:01:44.000Z | 2015-10-06T14:01:44.000Z | models/property.py | esacosta/u-mooc | 8d9a1427c988121e12dd6e2f7c8835f0e561c507 | [
"Apache-2.0"
] | null | null | null | models/property.py | esacosta/u-mooc | 8d9a1427c988121e12dd6e2f7c8835f0e561c507 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 31.760563 | 77 | 0.682483 |
5081d2094d2b7952cf64120f6d82d6b5b55f5c84 | 1,991 | py | Python | peer/migrations/0004_lg_query.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | peer/migrations/0004_lg_query.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | peer/migrations/0004_lg_query.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# lg query
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Third-party modules... | 34.929825 | 97 | 0.473129 |
3bef7faa910a0ea457ffa47174d8ca754e96fcd5 | 1,363 | py | Python | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/migration_table_metadata_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2019-05-10T19:58:09.000Z | 2019-05-10T19:58:09.000Z | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/migration_table_metadata_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/migration_table_metadata_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 33.243902 | 76 | 0.615554 |
e5d108e1d240e1920b34afadca4c8e0f3570c9b2 | 2,233 | py | Python | lowess/version.py | a5o/lowess | 416a83a87b0ada1fe95d973eaf64fc32a6266c40 | [
"MIT"
] | 30 | 2015-04-27T18:07:56.000Z | 2022-03-30T06:04:32.000Z | lowess/version.py | a5o/lowess | 416a83a87b0ada1fe95d973eaf64fc32a6266c40 | [
"MIT"
] | 3 | 2020-03-14T04:21:47.000Z | 2020-12-06T17:48:31.000Z | lowess/version.py | a5o/lowess | 416a83a87b0ada1fe95d973eaf64fc32a6266c40 | [
"MIT"
] | 13 | 2016-10-04T22:15:07.000Z | 2021-09-22T18:39:29.000Z | # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
_version_major = 0
_version_minor = 1
_version_micro = '' # use '' for first of series, number for 1 and above
_version_extra = 'dev'
#_version_extra = '' # Uncomment this for full releases
# Construct full version string from these.
_ver =... | 30.589041 | 77 | 0.717868 |
c587735915469139dbf0944a2be35cef88ee4597 | 319 | py | Python | tests/test_examples.py | bureau14/qdb-api-python | 2a010df3252d39bc4d529f545547c5cefb9fe86e | [
"BSD-3-Clause"
] | 9 | 2015-09-02T20:13:13.000Z | 2020-07-16T14:17:36.000Z | tests/test_examples.py | bureau14/qdb-api-python | 2a010df3252d39bc4d529f545547c5cefb9fe86e | [
"BSD-3-Clause"
] | 5 | 2018-02-20T10:47:02.000Z | 2020-05-20T10:05:49.000Z | tests/test_examples.py | bureau14/qdb-api-python | 2a010df3252d39bc4d529f545547c5cefb9fe86e | [
"BSD-3-Clause"
] | 1 | 2018-04-01T11:12:56.000Z | 2018-04-01T11:12:56.000Z | # pylint: disable=C0103,C0111,C0302,W0212
import datetime
import pytest
import quasardb
import sys
import os
sys.path.append(os.path.join(os.path.split(__file__)[0], '..', 'examples/'))
def test_tutorial_python():
import tutorial.python
def test_tutorial_pandas_tutorial():
import tutorial.pandas_tutorial
| 18.764706 | 76 | 0.768025 |
92c68ff0b736daab69fcfee955d674ca044a2c9d | 102,570 | py | Python | Python36_x86_Template/Lib/email/_header_value_parser.py | iveskim/cloudbase-init-installer | bc7630a7fb7dd527618dac3938147e2d9439c285 | [
"Apache-2.0"
] | null | null | null | Python36_x86_Template/Lib/email/_header_value_parser.py | iveskim/cloudbase-init-installer | bc7630a7fb7dd527618dac3938147e2d9439c285 | [
"Apache-2.0"
] | null | null | null | Python36_x86_Template/Lib/email/_header_value_parser.py | iveskim/cloudbase-init-installer | bc7630a7fb7dd527618dac3938147e2d9439c285 | [
"Apache-2.0"
] | 4 | 2019-12-11T18:50:22.000Z | 2020-08-10T19:25:11.000Z | """Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 enco... | 36.398155 | 85 | 0.592561 |
38c4d1c3cf9ded007c564944f77fb4d620c383d9 | 33,054 | py | Python | python/ccxt/lbank.py | sandutsar/ccxt | f27c187fa1626a6c261c6fa5caaae89cb657461d | [
"MIT"
] | null | null | null | python/ccxt/lbank.py | sandutsar/ccxt | f27c187fa1626a6c261c6fa5caaae89cb657461d | [
"MIT"
] | null | null | null | python/ccxt/lbank.py | sandutsar/ccxt | f27c187fa1626a6c261c6fa5caaae89cb657461d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 40.309756 | 155 | 0.516034 |
ede7ee218fb69349de1db96e1964e4f2501d3707 | 3,032 | py | Python | tests/unit/states/test_pyrax_queues.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | tests/unit/states/test_pyrax_queues.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/unit/states/test_pyrax_queues.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from tes... | 34.850575 | 79 | 0.569921 |
0c9dc45100793bda3971bd88c0faf7329d000152 | 1,436 | py | Python | examples/ultimate/ultimate.py | river8822/instabot | 5d3289cdda724a4b5df5cd0eaa72da5e664e5cc5 | [
"Apache-2.0"
] | 4 | 2017-04-25T10:56:27.000Z | 2021-03-19T06:47:58.000Z | examples/ultimate/ultimate.py | river8822/instabot | 5d3289cdda724a4b5df5cd0eaa72da5e664e5cc5 | [
"Apache-2.0"
] | null | null | null | examples/ultimate/ultimate.py | river8822/instabot | 5d3289cdda724a4b5df5cd0eaa72da5e664e5cc5 | [
"Apache-2.0"
] | 1 | 2020-12-01T20:24:32.000Z | 2020-12-01T20:24:32.000Z | """
ULTIMATE SCRIPT
It uses data written in files:
* follow_followers.txt
* follow_following.txt
* like_hashtags.txt
* like_users.txt
and do the job. This bot can be run 24/7.
"""
import os
import sys
import time
from random import shuffle
sys.path.append(os.path.join(sys.... | 31.217391 | 82 | 0.736072 |
08694a8e2241e58dc476222e5c00940f8bfb9e68 | 14,365 | py | Python | substance/substance_raffle_sql.py | Liu-0726/bili2.0 | 5320964b1f4fbb75ea9bccd4bb6fd3d15dfed0e0 | [
"MIT"
] | 1,081 | 2018-07-10T11:20:22.000Z | 2022-03-25T09:26:25.000Z | substance/substance_raffle_sql.py | Liu-0726/bili2.0 | 5320964b1f4fbb75ea9bccd4bb6fd3d15dfed0e0 | [
"MIT"
] | 440 | 2018-07-12T08:50:31.000Z | 2021-12-22T11:56:54.000Z | substance/substance_raffle_sql.py | Liu-0726/bili2.0 | 5320964b1f4fbb75ea9bccd4bb6fd3d15dfed0e0 | [
"MIT"
] | 280 | 2018-07-11T14:35:20.000Z | 2022-03-28T11:09:14.000Z | import sqlite3 # sqlite是个很灵活的东西,会自动转换,但是如果错误type且无法转换那么也不报错,传说中的沙雕feature https://www.sqlite.org/faq.html#q3
from os import path
from .bili_data_types import \
SubstanceRaffleStatus, SubstanceRaffleJoined, SubstanceRaffleResults, SubstanceRaffleLuckydog
# 设计理由是execute script from another directory时,保证仍然可以正... | 39.68232 | 142 | 0.651584 |
6af20796563b8156cd73ae768a550be0e89b4f82 | 71 | py | Python | area_intersect/config/prod.py | gfw-api/area-intersect | 72f0bd7ebabfa77aec60052bfcc32c7eee80a98b | [
"MIT"
] | 5 | 2017-11-01T21:13:19.000Z | 2022-03-03T09:26:19.000Z | area_intersect/config/prod.py | gfw-api/area-intersect | 72f0bd7ebabfa77aec60052bfcc32c7eee80a98b | [
"MIT"
] | 11 | 2018-01-22T09:05:23.000Z | 2019-09-20T11:55:57.000Z | proconfig/config/prod.py | gfw-api/gs-pro-config | cf43fb977189a025a0b5b6e1fe38616845021b03 | [
"MIT"
] | 4 | 2017-07-20T15:32:59.000Z | 2018-04-03T15:51:33.000Z | """-"""
SETTINGS = {
'logging': {
'level': 'INFO'
}
}
| 8.875 | 23 | 0.338028 |
1e31d3764f7baeeeee80bfa5905b20c88dd1b2e2 | 38 | py | Python | tests/__init__.py | agateriver/django-make-app | 1c390b78284ee727c645e560c323b53f05629fd4 | [
"MIT"
] | 6 | 2021-12-29T08:04:09.000Z | 2022-03-19T02:41:20.000Z | tests/__init__.py | agateriver/django-make-app | 1c390b78284ee727c645e560c323b53f05629fd4 | [
"MIT"
] | 105 | 2015-04-15T23:19:18.000Z | 2019-02-11T19:41:55.000Z | {{cookiecutter.project_slug}}/src/web/tests.py | illagrenan/django-cookiecutter-template | d237c01bbb4b61aa4d777c6abb5461e1dadfa8d0 | [
"MIT"
] | 5 | 2018-07-31T15:49:17.000Z | 2022-02-27T16:37:50.000Z | # -*- encoding: utf-8 -*-
# ! python3
| 12.666667 | 25 | 0.5 |
7e067cb32130b0eae8c24dc34c648d013a1b41ad | 4,739 | py | Python | python/ray/tests/test_memory_scheduling.py | vermashresth/ray | 9aaaa508cacb90a5be714478970b2191aaa43170 | [
"Apache-2.0"
] | 4 | 2019-10-18T17:44:58.000Z | 2021-04-14T14:37:21.000Z | python/ray/tests/test_memory_scheduling.py | vermashresth/ray | 9aaaa508cacb90a5be714478970b2191aaa43170 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:46:35.000Z | 2022-03-12T00:35:21.000Z | python/ray/tests/test_memory_scheduling.py | vermashresth/ray | 9aaaa508cacb90a5be714478970b2191aaa43170 | [
"Apache-2.0"
] | 2 | 2017-10-31T23:20:07.000Z | 2019-11-13T20:16:03.000Z | import numpy as np
import unittest
import ray
from ray import tune
from ray.rllib import _register_all
MB = 1024 * 1024
@ray.remote(memory=100 * MB)
class Actor:
def __init__(self):
pass
def ping(self):
return "ok"
@ray.remote(object_store_memory=100 * MB)
class Actor2:
def __init__(s... | 29.993671 | 79 | 0.49061 |
38e129538b64636454aa405e8f4440f4cb72f876 | 63,369 | py | Python | plotly/graph_objs/surface/_colorbar.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 1 | 2018-07-16T01:51:47.000Z | 2018-07-16T01:51:47.000Z | plotly/graph_objs/surface/_colorbar.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/graph_objs/surface/_colorbar.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType
import copy
class ColorBar(BaseTraceHierarchyType):
# bgcolor
# -------
@property
def bgcolor(self):
"""
Sets the color of padded area.
The 'bgcolor' property is a color and may be specified as:
- A hex str... | 36.50288 | 93 | 0.568764 |
17a46e5785fea2d0dc78b910c72d39820072f002 | 1,668 | py | Python | bdd100k/common/typing.py | Anthuang/bdd100k | b7e1781317784317e4e715ab325515ade73978a9 | [
"BSD-3-Clause"
] | 193 | 2020-09-22T09:48:17.000Z | 2022-03-31T20:49:24.000Z | bdd100k/common/typing.py | Anthuang/bdd100k | b7e1781317784317e4e715ab325515ade73978a9 | [
"BSD-3-Clause"
] | 60 | 2020-09-28T15:44:40.000Z | 2022-03-31T07:58:58.000Z | bdd100k/common/typing.py | Anthuang/bdd100k | b7e1781317784317e4e715ab325515ade73978a9 | [
"BSD-3-Clause"
] | 41 | 2020-09-27T02:52:20.000Z | 2022-02-21T03:33:39.000Z | """Common type definitions.
The annotation files in BDD100K format has additional annotations
('other person', 'other vehicle' and 'trail') besides the considered
categories ('car', 'pedestrian', 'truck', etc.) to indicate the uncertain
regions. Given the different handlings of these additional classes, we
provide thr... | 31.471698 | 75 | 0.751199 |
63c8ca3f8ec4d8ad1a6b685879f713834207d64f | 1,894 | py | Python | tests/gold_tests/timeout/timeout.test.py | zds05/trafficserver | 258c69b7628f5a4b90488e147c244a582222b5c8 | [
"Apache-2.0"
] | null | null | null | tests/gold_tests/timeout/timeout.test.py | zds05/trafficserver | 258c69b7628f5a4b90488e147c244a582222b5c8 | [
"Apache-2.0"
] | null | null | null | tests/gold_tests/timeout/timeout.test.py | zds05/trafficserver | 258c69b7628f5a4b90488e147c244a582222b5c8 | [
"Apache-2.0"
] | null | null | null | '''
'''
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License");... | 44.046512 | 139 | 0.729673 |
eba4b4459dc532ee4c8b3f12893b43bce03f8f5d | 464 | py | Python | apps/data/migrations/0029_auto_20200318_1146.py | moogoo78/portal20 | 085d598af0448ad34e22aa55981f7e82a042a893 | [
"MIT"
] | 7 | 2020-12-31T13:57:58.000Z | 2022-02-07T08:05:15.000Z | apps/data/migrations/0029_auto_20200318_1146.py | moogoo78/portal20 | 085d598af0448ad34e22aa55981f7e82a042a893 | [
"MIT"
] | 75 | 2020-03-16T07:18:28.000Z | 2022-03-31T09:55:15.000Z | apps/data/migrations/0029_auto_20200318_1146.py | moogoo78/portal20 | 085d598af0448ad34e22aa55981f7e82a042a893 | [
"MIT"
] | 9 | 2020-01-06T14:08:51.000Z | 2022-01-03T05:19:54.000Z | # Generated by Django 3.0.4 on 2020-03-18 03:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0028_merge_20200318_1145'),
]
operations = [
migrations.AlterField(
model_name='dataset',
name='status',
... | 24.421053 | 129 | 0.605603 |
a08c9cf31e42ae73fa22b93ffd937f188f9a1f81 | 417 | py | Python | scripts/component_graph/test/server/util/test_logging.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/test/server/util/test_logging.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/test/server/util/test_logging.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from server.util.logging import *
class TestLogging(unittest.TestCase):
def test_logger_not_none(self):
... | 23.166667 | 72 | 0.743405 |
c5fa2a6a10ecb522ba506bebdcfacedf23f3c559 | 393 | py | Python | 1019 - Conversao de Tempo.py | le16bits/URI---Python | 9d22ae74f008104bc9c3c0e2d5f8cd59303bc1db | [
"Apache-2.0"
] | null | null | null | 1019 - Conversao de Tempo.py | le16bits/URI---Python | 9d22ae74f008104bc9c3c0e2d5f8cd59303bc1db | [
"Apache-2.0"
] | null | null | null | 1019 - Conversao de Tempo.py | le16bits/URI---Python | 9d22ae74f008104bc9c3c0e2d5f8cd59303bc1db | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''Autor: Alessandra Souza
Data: 06/05/2017
Objetivo: Leia um valor inteiro e informe-o expresso no formato hora:minuto:segundo.
ID Urionlinejudge: 1019'''
N=int(input())
if N<3600:
h=0
m=N/60
s=N%60
else:
h=N/60**2
if h>0:
m=(N%60**2)/60
s= N%60
... | 17.086957 | 84 | 0.519084 |
cf97788225c7cf0a3663cc57ab055b384ad6c1ef | 571 | py | Python | projects/migrations/0020_auto_20200711_1356.py | peppasd/LIT | 80e256e7678be3cf3ad72d152005cdb7778545d5 | [
"MIT"
] | 2 | 2020-06-05T14:49:11.000Z | 2021-07-19T17:50:05.000Z | projects/migrations/0020_auto_20200711_1356.py | peppasd/LIT | 80e256e7678be3cf3ad72d152005cdb7778545d5 | [
"MIT"
] | 50 | 2020-05-29T11:15:33.000Z | 2020-07-29T15:30:53.000Z | projects/migrations/0020_auto_20200711_1356.py | peppasd/LIT | 80e256e7678be3cf3ad72d152005cdb7778545d5 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-11 11:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0019_remove_project_labeled_photos'),
]
operations = [
migrations.AlterField(
model_name='photo',
name='... | 23.791667 | 63 | 0.579685 |
85c56299f145204f99d2d3ae39ddeaba01b737f0 | 3,045 | py | Python | senseye_cameras/input/camera_usb.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-20T17:07:35.000Z | 2022-01-25T23:48:52.000Z | senseye_cameras/input/camera_usb.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-05T20:55:06.000Z | 2022-03-24T22:41:56.000Z | senseye_cameras/input/camera_usb.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | null | null | null | import cv2
import time
import logging
from . input import Input
log = logging.getLogger(__name__)
class CameraUsb(Input):
'''
Opens a usb camera or video using OpenCV.
Args:
id (int OR str): id of the camera, or path to a video file.
config (dict): Configuration dictionary. Accepted key... | 31.71875 | 127 | 0.58555 |
d5fdb200d1cfbe99b3c54ff271cc7ed2a3ba7588 | 555 | py | Python | servicios_profesionales/manage.py | acs-um/ServiciosProfesionales | b29d67cda42f3d975a8abaf58203d92c9d1a3f57 | [
"MIT"
] | 1 | 2018-05-24T23:33:02.000Z | 2018-05-24T23:33:02.000Z | servicios_profesionales/manage.py | acs-um/ServiciosProfesionales | b29d67cda42f3d975a8abaf58203d92c9d1a3f57 | [
"MIT"
] | 22 | 2018-05-07T20:46:27.000Z | 2018-06-10T23:59:49.000Z | servicios_profesionales/manage.py | acs-um/ServiciosProfesionales | b29d67cda42f3d975a8abaf58203d92c9d1a3f57 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "servicios_profesionales.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't imp... | 34.6875 | 87 | 0.695495 |
5edc1c9824570d8d7f267678df70dc479291422e | 366 | py | Python | dukaan/apps/udaan_app/routers.py | deepdik/udaan | 0315212072d98d9a5d487b2e212ecb77e34740b7 | [
"BSD-2-Clause"
] | null | null | null | dukaan/apps/udaan_app/routers.py | deepdik/udaan | 0315212072d98d9a5d487b2e212ecb77e34740b7 | [
"BSD-2-Clause"
] | null | null | null | dukaan/apps/udaan_app/routers.py | deepdik/udaan | 0315212072d98d9a5d487b2e212ecb77e34740b7 | [
"BSD-2-Clause"
] | null | null | null | """
"""
from django.urls import path, include
from rest_framework.routers import SimpleRouter
from dukaan.apps.udaan_app.views import (QuizViewSet,
QuestionViewSet)
router = SimpleRouter()
router.register(r'quiz', QuizViewSet, basename='quiz')
router.register(r'question', QuestionViewSet, basename='question')
ur... | 17.428571 | 66 | 0.765027 |
3d238b28d22aa4aa30cdb0fdaa1619eea3a44f3f | 7,587 | py | Python | python/classifier.py | guilhermeleobas/recastd | 385795df308fdea2f1dc02863dce7c7547167efc | [
"MIT"
] | null | null | null | python/classifier.py | guilhermeleobas/recastd | 385795df308fdea2f1dc02863dce7c7547167efc | [
"MIT"
] | null | null | null | python/classifier.py | guilhermeleobas/recastd | 385795df308fdea2f1dc02863dce7c7547167efc | [
"MIT"
] | null | null | null | import os
from random import shuffle
from collections import deque
import networkx as nx
import numpy as np
import graph_methods as gm
global random
global social
global friends
global acquaintance
global bridges
random = 0
social = 1
friends = 2
acquaintance = 3
bridges = 4
# random = 0 # random defined above
d... | 24.713355 | 132 | 0.550811 |
f98b530cc2c8a75f55155f49ece37e5ff087050a | 1,303 | py | Python | app/core/tests/test_admin.py | wamauri/recipe-app-api | 953e62cf71c80b4a6615c93f894110c6f9922a48 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | wamauri/recipe-app-api | 953e62cf71c80b4a6615c93f894110c6f9922a48 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | wamauri/recipe-app-api | 953e62cf71c80b4a6615c93f894110c6f9922a48 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@meuq.com.br',
... | 32.575 | 68 | 0.647736 |
89fd50bee85d252ba62d968767949eb1058af0bf | 2,568 | py | Python | image_cluster/pipeline/reader.py | kowaalczyk/image-cluster | 2d034dd154491da8b22ee6662c9dcf9500283186 | [
"BSD-2-Clause"
] | 1 | 2019-05-09T10:30:23.000Z | 2019-05-09T10:30:23.000Z | image_cluster/pipeline/reader.py | kowaalczyk/image-cluster | 2d034dd154491da8b22ee6662c9dcf9500283186 | [
"BSD-2-Clause"
] | null | null | null | image_cluster/pipeline/reader.py | kowaalczyk/image-cluster | 2d034dd154491da8b22ee6662c9dcf9500283186 | [
"BSD-2-Clause"
] | null | null | null | from typing import Union, Iterable
from pathlib import Path
from sklearn.base import BaseEstimator, TransformerMixin
import cv2 as cv
import numpy as np
from image_cluster.pipeline.utils import NoFitMixin, VerboseMixin
from image_cluster.types import ImageData
class MetadataReader(BaseEstimator, TransformerMixin, N... | 27.319149 | 66 | 0.614875 |
b0e0e72cb37c5fc6bf10ae98e596b4da1e354268 | 1,055 | py | Python | opencypher/ast/function.py | globality-corp/opencypher | b60bf526fb6d5ea6c731aab867f714f3e10f629b | [
"Apache-2.0"
] | 6 | 2019-01-31T18:55:46.000Z | 2020-12-02T14:53:45.000Z | opencypher/ast/function.py | globality-corp/opencypher | b60bf526fb6d5ea6c731aab867f714f3e10f629b | [
"Apache-2.0"
] | 1 | 2020-12-04T00:18:20.000Z | 2020-12-04T00:18:20.000Z | opencypher/ast/function.py | globality-corp/opencypher | b60bf526fb6d5ea6c731aab867f714f3e10f629b | [
"Apache-2.0"
] | 1 | 2019-03-17T03:46:26.000Z | 2019-03-17T03:46:26.000Z | from dataclasses import dataclass
from typing import Iterable
from opencypher.ast.expression import Expression
from opencypher.ast.parameter import Parameter, Parameterized
from opencypher.ast.collection import NonEmptySequence
from opencypher.ast.formatting import str_join
from opencypher.ast.naming import FunctionNa... | 34.032258 | 155 | 0.686256 |
88b8a430146fd652d05d34e12a31e39afc5faaa1 | 1,866 | py | Python | onnxruntime_extensions/pnp/_base.py | TruscaPetre/onnxruntime-extensions | d0ff193eec0d9b5bc07c961ebc451c34d0228741 | [
"MIT"
] | null | null | null | onnxruntime_extensions/pnp/_base.py | TruscaPetre/onnxruntime-extensions | d0ff193eec0d9b5bc07c961ebc451c34d0228741 | [
"MIT"
] | null | null | null | onnxruntime_extensions/pnp/_base.py | TruscaPetre/onnxruntime-extensions | d0ff193eec0d9b5bc07c961ebc451c34d0228741 | [
"MIT"
] | null | null | null | import io
import onnx
import torch
from typing import Any
from onnx.onnx_pb import TensorProto
class ProcessingModule(torch.nn.Module):
@staticmethod
def _argsort(g, x, dim, descending):
return g.op('ai.onnx.contrib::ArgSort', x, dim)
@classmethod
def register_customops(cls):
if hasat... | 27.043478 | 79 | 0.594855 |
20dc99a9763ac7f7eaaf35c4943ad06e7a923d91 | 1,832 | py | Python | data/p2DJ/New/program/cirq/startCirq153.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/cirq/startCirq153.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/cirq/startCirq153.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=2
# total number=11
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 28.625 | 77 | 0.694869 |
2c2549cb783f7ce8e6fbbda4f0b6c43980de256c | 40,822 | py | Python | mailpile/plugins/setup_magic.py | jmvrbanac/Mailpile | 9a74950c1b6b1e7da8c1f8dc396f9d1ce330d9e8 | [
"Apache-2.0"
] | null | null | null | mailpile/plugins/setup_magic.py | jmvrbanac/Mailpile | 9a74950c1b6b1e7da8c1f8dc396f9d1ce330d9e8 | [
"Apache-2.0"
] | null | null | null | mailpile/plugins/setup_magic.py | jmvrbanac/Mailpile | 9a74950c1b6b1e7da8c1f8dc396f9d1ce330d9e8 | [
"Apache-2.0"
] | 1 | 2020-04-13T17:46:12.000Z | 2020-04-13T17:46:12.000Z | import os
import random
import sys
import datetime
from urllib import urlencode
import mailpile.auth
from mailpile.defaults import CONFIG_RULES
from mailpile.i18n import ListTranslations, ActivateTranslation, gettext
from mailpile.i18n import gettext as _
from mailpile.i18n import ngettext as _n
from mailpile.plugins ... | 38.915157 | 83 | 0.519303 |
082ae7f80e885af2872489a5d575515ce52eed68 | 38,807 | py | Python | datalogger/DataLogger.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | datalogger/DataLogger.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | datalogger/DataLogger.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# pylint: disable=line-too-long
"""
Module to handle global DataLogger things, like reading from raw data,
dumping cache files, and so on
"""
import os
import glob
import json
import logging
import datetime
import calendar
import time
import gzip
import base64
import pwd
# own modules
from TimeseriesA... | 41.638412 | 197 | 0.601721 |
d93e5cff539e46d714ced9bde8adbbad5043eda7 | 4,368 | py | Python | streamlit/page_tec.py | kartikkumar7/News-Big-Data-Analysis | 3f9a306284a5dca28c033bfec16c69ce4fdd30df | [
"MIT"
] | null | null | null | streamlit/page_tec.py | kartikkumar7/News-Big-Data-Analysis | 3f9a306284a5dca28c033bfec16c69ce4fdd30df | [
"MIT"
] | null | null | null | streamlit/page_tec.py | kartikkumar7/News-Big-Data-Analysis | 3f9a306284a5dca28c033bfec16c69ce4fdd30df | [
"MIT"
] | 1 | 2021-12-11T22:57:49.000Z | 2021-12-11T22:57:49.000Z | import streamlit as st
import pandas as pd
import spacy_streamlit
import spacy
from spacy import displacy
import requests
from requests.structures import CaseInsensitiveDict
nlp = spacy.load('en_core_web_sm')
def main():
pages = {
"Article Selection": page_second,
"Dashboard": page_third
}
... | 34.125 | 107 | 0.641026 |
24ba8be15d787abea1aa0ca787ceb1cd378f5cf2 | 120 | py | Python | code/chapter-2/exercise2_3.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | code/chapter-2/exercise2_3.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | code/chapter-2/exercise2_3.py | Kevin-Oudai/python-solutions | d67f6b14723b000fec0011c3e8156b805eb288f7 | [
"MIT"
] | null | null | null | feet = eval(input("Enter a value for feet: "))
meters = feet * 0.305
print("{} feet is {} meters".format(feet, meters))
| 30 | 50 | 0.65 |
6459b5dd917b9ad35653860e6a9307091e61b1d3 | 741 | py | Python | tpcdsDataGenerator/dataParser/warehouse.py | bomeng/smartbench | 349f202cedacc96bb66c2306bb22beb8ab7112b5 | [
"Apache-2.0"
] | null | null | null | tpcdsDataGenerator/dataParser/warehouse.py | bomeng/smartbench | 349f202cedacc96bb66c2306bb22beb8ab7112b5 | [
"Apache-2.0"
] | null | null | null | tpcdsDataGenerator/dataParser/warehouse.py | bomeng/smartbench | 349f202cedacc96bb66c2306bb22beb8ab7112b5 | [
"Apache-2.0"
] | null | null | null | from pyspark.sql import Row
from pyspark import SparkConf, SparkContext
from pyspark.sql import SparkSession
from pyspark.sql import HiveContext
import os
conf = SparkConf()
sc = SparkContext(conf=conf)
spark = HiveContext(sc)
textDataRDD = sc.textFile(os.environ["DATA_HDFS"] + "warehouse.dat")
textDataDF = textDataR... | 52.928571 | 358 | 0.74359 |
5c6faf11c9060fa540180387172212f505fb7407 | 23,972 | py | Python | tensorboardX/summary.py | n0whereRuoxi/rl-starter-files | b2ae68d544f4665a62b3d782c44008ef050e9b62 | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | tensorboardX/summary.py | n0whereRuoxi/rl-starter-files | b2ae68d544f4665a62b3d782c44008ef050e9b62 | [
"MIT"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | tensorboardX/summary.py | n0whereRuoxi/rl-starter-files | b2ae68d544f4665a62b3d782c44008ef050e9b62 | [
"MIT"
] | 2 | 2021-12-09T07:23:21.000Z | 2022-03-31T06:13:10.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import numpy as np
import os
import re as _re
# pylint: disable=unused-import
from six.moves import range
from .proto.summary_pb2 import Summary
from .proto.summary_pb2 import HistogramProto
fr... | 41.618056 | 162 | 0.643793 |
0e6bb685e45102d9bb9c633320ae0aeb4cb480e9 | 8,981 | py | Python | tests/extras/datasets/pandas/test_feather_dataset.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 2,047 | 2022-01-10T15:22:12.000Z | 2022-03-31T13:38:56.000Z | tests/extras/datasets/pandas/test_feather_dataset.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 170 | 2022-01-10T12:44:31.000Z | 2022-03-31T17:01:24.000Z | tests/extras/datasets/pandas/test_feather_dataset.py | daniel-falk/kedro | 19187199339ddc4a757aaaa328f319ec4c1e452a | [
"Apache-2.0"
] | 112 | 2022-01-10T19:15:24.000Z | 2022-03-30T11:20:52.000Z | from pathlib import Path, PurePosixPath
import pandas as pd
import pytest
from fsspec.implementations.http import HTTPFileSystem
from fsspec.implementations.local import LocalFileSystem
from gcsfs import GCSFileSystem
from pandas.testing import assert_frame_equal
from s3fs.core import S3FileSystem
from kedro.extras.d... | 40.638009 | 88 | 0.675649 |
7ba36b240bf2093ac4ee7d24a01accfa8ea0620b | 1,165 | py | Python | src/tournament_poller/polls/migrations/0001_initial.py | jorses/tfg | 8cf15997378d782a2f2bdcff929830af9b3d9840 | [
"MIT"
] | null | null | null | src/tournament_poller/polls/migrations/0001_initial.py | jorses/tfg | 8cf15997378d782a2f2bdcff929830af9b3d9840 | [
"MIT"
] | null | null | null | src/tournament_poller/polls/migrations/0001_initial.py | jorses/tfg | 8cf15997378d782a2f2bdcff929830af9b3d9840 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-20 21:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Choice',
fields=[
... | 31.486486 | 114 | 0.577682 |
f5e5ae09f5eaf30e134d44e6c0ca4f0bb76a10c1 | 2,818 | py | Python | modules/s3db/tr.py | sungkomp/sambro | 4618d785d03424d122206d88d9ebfb6971486e2c | [
"MIT"
] | 1 | 2017-10-06T23:18:01.000Z | 2017-10-06T23:18:01.000Z | modules/s3db/tr.py | sungkomp/sambro | 4618d785d03424d122206d88d9ebfb6971486e2c | [
"MIT"
] | null | null | null | modules/s3db/tr.py | sungkomp/sambro | 4618d785d03424d122206d88d9ebfb6971486e2c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Turkey-specific Tables
@copyright: 2015-2016 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
... | 38.081081 | 83 | 0.481192 |
b170485e34a29f215d5b9e2be85f509fe1ae2367 | 4,103 | py | Python | policy_eval/dual_dice.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | policy_eval/dual_dice.py | davidfitzek/google-research | eb2b142f26e39aac1dcbb768417465ae9d4e5af6 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | policy_eval/dual_dice.py | davidfitzek/google-research | eb2b142f26e39aac1dcbb768417465ae9d4e5af6 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 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... | 35.068376 | 80 | 0.694857 |
5eeb13d562dd5935ed0ea16ef5600441d328f67b | 9,778 | py | Python | grasping/annotation/utils.py | wangyan-hlab/wrs | 8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c | [
"MIT"
] | null | null | null | grasping/annotation/utils.py | wangyan-hlab/wrs | 8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c | [
"MIT"
] | null | null | null | grasping/annotation/utils.py | wangyan-hlab/wrs | 8f81cdd33a419d5b4ffe18d13cd4cbf9f258bc7c | [
"MIT"
] | null | null | null | import math
import pickle
import numpy as np
import basis.robot_math as rm
def define_grasp(hnd_s,
objcm,
gl_jaw_center_pos,
gl_jaw_center_z,
gl_jaw_center_y,
jaw_width,
toggle_flip=True,
toggle_debu... | 40.404959 | 117 | 0.6126 |
67d205d1d91d0b893686b0fddb40425f02464428 | 1,285 | py | Python | apps/reports/migrations/0001_initial.py | sonnhfit/supermarket | 9b455c1354007cccb6cec40c04008c72bd4d7316 | [
"MIT"
] | null | null | null | apps/reports/migrations/0001_initial.py | sonnhfit/supermarket | 9b455c1354007cccb6cec40c04008c72bd4d7316 | [
"MIT"
] | null | null | null | apps/reports/migrations/0001_initial.py | sonnhfit/supermarket | 9b455c1354007cccb6cec40c04008c72bd4d7316 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-02-18 10:46
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 38.939394 | 152 | 0.624125 |
e85b4bbc58f6029805438a97be15f5f6b6c0b954 | 6,311 | py | Python | tests/test_validate.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | 1 | 2018-11-05T02:02:14.000Z | 2018-11-05T02:02:14.000Z | tests/test_validate.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | null | null | null | tests/test_validate.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | null | null | null | from vergeml import VergeMLError
from vergeml.validate import ValidateDevice, ValidateData, apply_config, yaml_find_definition, _display_err, _normalize
from vergeml.plugins import _DictPluginManager
from vergeml.sources.image import ImageSource
from vergeml.operations.augment import AugmentOperation
import pytest
def... | 28.048889 | 119 | 0.522263 |
890ae78197f63a96033d28375f585dd41eebfab1 | 119 | py | Python | flaskHelloWorld.py | rowrodney/Automation | b6aa8bc802fa369a974868764c941c80f9edd2d2 | [
"MIT"
] | null | null | null | flaskHelloWorld.py | rowrodney/Automation | b6aa8bc802fa369a974868764c941c80f9edd2d2 | [
"MIT"
] | null | null | null | flaskHelloWorld.py | rowrodney/Automation | b6aa8bc802fa369a974868764c941c80f9edd2d2 | [
"MIT"
] | null | null | null |
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return "hello World!"
app.run(port=5000) | 17 | 25 | 0.680672 |
157d5db804b4037a4b8fddc253715eff0b72497f | 1,625 | py | Python | _includes/output_saving/activities/output_saving_jython.py | NEUBIAS/training-resources | 7a26674f328953ef83f9e731fc5ae69086169ec8 | [
"CC-BY-4.0"
] | 14 | 2020-04-29T14:18:57.000Z | 2022-03-27T22:06:28.000Z | _includes/output_saving/activities/output_saving_jython.py | NEUBIAS/training-resources | 7a26674f328953ef83f9e731fc5ae69086169ec8 | [
"CC-BY-4.0"
] | 299 | 2020-04-23T13:45:25.000Z | 2022-03-27T08:40:33.000Z | _includes/output_saving/activities/output_saving_jython.py | NEUBIAS/training-resources | 7a26674f328953ef83f9e731fc5ae69086169ec8 | [
"CC-BY-4.0"
] | 9 | 2020-05-16T13:28:48.000Z | 2022-03-15T08:47:09.000Z | # import classes
from ij import IJ, ImagePlus, WindowManager
from ij.io import FileSaver
from ij.plugin.filter import ParticleAnalyzer
from ij.plugin.frame import RoiManager
from ij.measure import ResultsTable, Measurements
from ij.process import ImageProcessor
import os
#@String outputdir
# specify settings
min_size... | 37.790698 | 246 | 0.782154 |
81467f6373e153d3bdb98a827d22aecf0994b64b | 200 | py | Python | start_on_PAW.py | Robert565/pxollypy | 4874ca9625feed7d3b318a6aa3c0c8c5d4e895ea | [
"MIT"
] | 6 | 2021-11-05T17:34:28.000Z | 2022-01-28T12:33:11.000Z | start_on_PAW.py | RobertMeow/pxollypy | a1d47eee514cee2b0cb475cd9777c17ba9378f59 | [
"MIT"
] | null | null | null | start_on_PAW.py | RobertMeow/pxollypy | a1d47eee514cee2b0cb475cd9777c17ba9378f59 | [
"MIT"
] | 2 | 2021-11-05T17:33:46.000Z | 2021-11-06T08:34:53.000Z | from Application.webhook import main, app
import os
import sys
for module in ['flask']:
if module not in sys.modules:
os.system('python3 -m pip install {} --user'.format(module))
main()
| 20 | 68 | 0.685 |
6d0b0d1a923a9a5b3954065de970ef957709b33f | 1,625 | py | Python | src/oneNeuron/Perceptron.py | umangtank/oneNeuron_pypi | c975170f4ce5814e6cf6e44519da288a7edecef9 | [
"MIT"
] | null | null | null | src/oneNeuron/Perceptron.py | umangtank/oneNeuron_pypi | c975170f4ce5814e6cf6e44519da288a7edecef9 | [
"MIT"
] | null | null | null | src/oneNeuron/Perceptron.py | umangtank/oneNeuron_pypi | c975170f4ce5814e6cf6e44519da288a7edecef9 | [
"MIT"
] | null | null | null | import numpy as np
import logging
from tqdm import tqdm
class Perceptron:
def __init__(self, eta, epochs):
np.random.seed(2)
self.weights = np.random.randn(3) * 1e-4
logging.info(f"initial weights before training: {self.weights}")
self.eta = eta
self.epochs = epochs
de... | 34.574468 | 97 | 0.579077 |
71804327bc60d47763d9235db76627a38c0bc2e5 | 692 | py | Python | src/dc/core/miners/qryptonight7/CNv1PoWValidator.py | dc-blockchain/dc-core | fc6af8ce04d7b52f94c069f6ec05b0e419e07d70 | [
"MIT"
] | 1 | 2021-03-05T14:24:32.000Z | 2021-03-05T14:24:32.000Z | src/dc/core/miners/qryptonight7/CNv1PoWValidator.py | dc-blockchain/dc-core | fc6af8ce04d7b52f94c069f6ec05b0e419e07d70 | [
"MIT"
] | null | null | null | src/dc/core/miners/qryptonight7/CNv1PoWValidator.py | dc-blockchain/dc-core | fc6af8ce04d7b52f94c069f6ec05b0e419e07d70 | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import functools
import threading
from pyqryptonight.pyqryptonight import PoWHelper
from dc.core.Singleton import Singleton
class CNv1PoWValidator(object, metaclass... | 30.086957 | 69 | 0.75578 |
99147b19f9fd7f5aacbb0fb6c66861f85dad07e5 | 529 | py | Python | Logger/LoggerSetup.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | Logger/LoggerSetup.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | Logger/LoggerSetup.py | actuatech/fuel-tourism | 60e6953cdcccf164e5cd03916a1c3b3c2b071a85 | [
"MIT"
] | null | null | null | import logging
def setup_logger(logger_name, log_file, level=logging.INFO, stream: bool = True):
logger = logging.getLogger(logger_name)
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
fileHandler = logging.FileHandler(log_file, mode='w')
fileHandler.setFormatter(formatter)
... | 35.266667 | 81 | 0.722117 |
1e7d7675d7ea3ef9689e568f80fb395fdc7d9a95 | 3,088 | py | Python | examples/extensions/three_sat.py | NunoEdgarGFlowHub/cvxpy | 43270fcc8af8fc4742f1b3519800b0074f2e6693 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/extensions/three_sat.py | NunoEdgarGFlowHub/cvxpy | 43270fcc8af8fc4742f1b3519800b0074f2e6693 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/extensions/three_sat.py | NunoEdgarGFlowHub/cvxpy | 43270fcc8af8fc4742f1b3519800b0074f2e6693 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2013 Steven Diamond
This file is part of CVXPY.
CVXPY is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CVXPY is distributed i... | 29.409524 | 68 | 0.676813 |
0a2da4802433fef7b6b619c69887595ff87cdf2f | 4,570 | py | Python | yarn/tests/test_yarn.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2020-08-08T02:01:01.000Z | 2020-08-08T02:01:01.000Z | yarn/tests/test_yarn.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | yarn/tests/test_yarn.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from requests.exceptions import SSLError
from datadog_checks.yarn import YarnCheck
from datadog_checks.yarn.yarn import (
SERVICE_CHECK_NAME, YARN_QUEUE_METRICS, YARN_APP_METRICS
)
from .common import (
... | 33.602941 | 111 | 0.717943 |
7ad248b88d640fce6d650de73dfe568e7a204cc1 | 4,004 | py | Python | homeassistant/components/gogogate2/sensor.py | DoctorU/core | 5b218d7e1c4164e32d41473977459cbaf23adf42 | [
"Apache-2.0"
] | 5 | 2020-10-08T12:59:44.000Z | 2021-12-28T06:46:25.000Z | homeassistant/components/gogogate2/sensor.py | DoctorU/core | 5b218d7e1c4164e32d41473977459cbaf23adf42 | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/gogogate2/sensor.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Support for Gogogate2 garage Doors."""
from __future__ import annotations
from itertools import chain
from ismartgate.common import AbstractDoor, get_configured_doors
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
... | 30.8 | 80 | 0.682817 |
112e79939ab7b123b6d3a710fa0db4240e78933c | 1,206 | py | Python | research/cv/PDarts/src/my_utils.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/PDarts/src/my_utils.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/PDarts/src/my_utils.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to i... | 34.457143 | 78 | 0.664179 |
0c2505f9a0eab29c759845da289564ca21a4c3ef | 9,057 | py | Python | IG02_Scripts/neglect_mvpa/nperlabel_equal/redos_ROIperms/submit_MVPA_ROI_perm_redo_LinN_c2.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | IG02_Scripts/neglect_mvpa/nperlabel_equal/redos_ROIperms/submit_MVPA_ROI_perm_redo_LinN_c2.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | IG02_Scripts/neglect_mvpa/nperlabel_equal/redos_ROIperms/submit_MVPA_ROI_perm_redo_LinN_c2.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys,os,time,re,datetime,smtplib
#########user section#########################
#user specific constants
username = "smith" #your cluster login name (use what shows up in qstatall)
useremail = "smith@biac.duke.edu" #email to send job notices to
template_f = file("MVPA_ROI_... | 36.373494 | 190 | 0.670531 |
ef99970570788e0007bed73e38f2b860290645b7 | 3,156 | py | Python | libs/gui/testlist.py | albertoccelli/vortex | 54bf15d2f74967d3dfeddec670b32868fbb2c51b | [
"MIT"
] | null | null | null | libs/gui/testlist.py | albertoccelli/vortex | 54bf15d2f74967d3dfeddec670b32868fbb2c51b | [
"MIT"
] | null | null | null | libs/gui/testlist.py | albertoccelli/vortex | 54bf15d2f74967d3dfeddec670b32868fbb2c51b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'testlist.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtG... | 46.411765 | 115 | 0.734791 |
9b96dca698c8caebbfd00e55cb89755d94fb55ce | 126 | py | Python | Lab4/lab4_2_Boiko.py | Nickas47/python_savka | 31101bba6a7e75bc398136d01e5e0cb9d68df097 | [
"Apache-2.0"
] | null | null | null | Lab4/lab4_2_Boiko.py | Nickas47/python_savka | 31101bba6a7e75bc398136d01e5e0cb9d68df097 | [
"Apache-2.0"
] | null | null | null | Lab4/lab4_2_Boiko.py | Nickas47/python_savka | 31101bba6a7e75bc398136d01e5e0cb9d68df097 | [
"Apache-2.0"
] | null | null | null | while(1 == 1):
s = str(input())
k=0
for x in s:
if(x in '1234567890'):
k = k + 1
print(k)
| 15.75 | 30 | 0.388889 |
4a1045bf2cfebffff6d30bc1fdbbacdfa74f3d17 | 5,493 | py | Python | offb_posctl/scripts/GPM_test.py | SensenLiu/aggrecup | 0c381ee259b388684205c1fa5fc41265a7e849b3 | [
"MIT"
] | null | null | null | offb_posctl/scripts/GPM_test.py | SensenLiu/aggrecup | 0c381ee259b388684205c1fa5fc41265a7e849b3 | [
"MIT"
] | null | null | null | offb_posctl/scripts/GPM_test.py | SensenLiu/aggrecup | 0c381ee259b388684205c1fa5fc41265a7e849b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# coding=utf-8
import socket
from scipy.optimize import minimize
import numpy as np
import time
from numba import jit, float64
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import datetime
# global variable start >>>
n = 7
t0 = 0
tf = 2
discret... | 30.687151 | 121 | 0.532132 |
78ac3ce5bb7c365b752e76fb8b9a54167062c140 | 524 | py | Python | stream.py | HaydenPWoods/radio-stream-to-spotify | 748f4a8a08210edf916fafcad620dfa2e64fa940 | [
"MIT"
] | null | null | null | stream.py | HaydenPWoods/radio-stream-to-spotify | 748f4a8a08210edf916fafcad620dfa2e64fa940 | [
"MIT"
] | 4 | 2020-09-26T13:45:00.000Z | 2021-03-20T18:31:02.000Z | stream.py | HaydenPWoods/radio-stream-to-spotify | 748f4a8a08210edf916fafcad620dfa2e64fa940 | [
"MIT"
] | null | null | null | class Stream:
def __init__(self, name, url, encoding, regex, separator, order, playlist_id, include_remixes):
self.name = name
self.url = url
self.encoding = encoding
self.regex = regex
self.separator = separator
self.order = order
self.playlist_id = playlist_... | 32.75 | 99 | 0.610687 |
47a98d0b292136b1f757d222525ed3fc373b6662 | 2,335 | py | Python | test/test_integralequations.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | 1 | 2020-08-03T16:24:06.000Z | 2020-08-03T16:24:06.000Z | test/test_integralequations.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | test/test_integralequations.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | import logging
import logconfig
logconfig.logconfig(filename=None)
logconfig.loglevel(logging.INFO)
from integralequations import *
def test_integralequations(theoryname = "A1A2", R = 0.4, oper = True):
steps = 256
tolerance = 1e-11
def report(xar):
"""Print a few quantities derived from given xa... | 54.302326 | 177 | 0.500642 |
32eee3dbf1825f0cf3a62ddb1dcd99d401a35cca | 25,160 | py | Python | bgx/validator-bgx/sawtooth_validator/execution/context_manager.py | sparsov/DGT-Kawartha-demo | edfbc18f2c70e813805ec23c28fbc35bf7866ffc | [
"Apache-2.0"
] | null | null | null | bgx/validator-bgx/sawtooth_validator/execution/context_manager.py | sparsov/DGT-Kawartha-demo | edfbc18f2c70e813805ec23c28fbc35bf7866ffc | [
"Apache-2.0"
] | 10 | 2020-05-12T06:58:15.000Z | 2022-02-26T23:59:35.000Z | bgx/validator-bgx/sawtooth_validator/execution/context_manager.py | DGT-Network/DGT-Mississauga | 52b5f1f4015db2aa7196e727a25b399de5fbf3c3 | [
"Apache-2.0"
] | 1 | 2021-03-09T03:36:36.000Z | 2021-03-09T03:36:36.000Z | # Copyright NTRLab 2019
#
# 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, softw... | 39.068323 | 184 | 0.607313 |
1858bb59f33697a44cc76ca5fc34da62a33abb95 | 128 | py | Python | terraform_projects/ecs_django_template/project/util.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | terraform_projects/ecs_django_template/project/util.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | terraform_projects/ecs_django_template/project/util.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:d81f425793ed3587346b8bbe9bbfce56ab89626cc5c8ecf92dcf262aed2d26d8
size 560
| 32 | 75 | 0.882813 |
df54f550d2609e4c3fb30a586b6e703a19de6b76 | 615 | py | Python | tests/test_linalg.py | roytu/ml-dft-hubbard | 86d703720a0c6513d69de2ad1135602eaadaf0e6 | [
"MIT"
] | null | null | null | tests/test_linalg.py | roytu/ml-dft-hubbard | 86d703720a0c6513d69de2ad1135602eaadaf0e6 | [
"MIT"
] | null | null | null | tests/test_linalg.py | roytu/ml-dft-hubbard | 86d703720a0c6513d69de2ad1135602eaadaf0e6 | [
"MIT"
] | null | null | null |
import numpy as np
from numpy import linalg as LA
from mldfthubbard.hubbard import HubbardInstance
def test_linalg():
""" Testing LA.eigh against results from wolfram alpha
"""
# Test 1
M = np.array([
[0, 1, 2],
[1, 0, 3],
[2, 3, 0]
])
w, v = LA.eigh(M)
w_true = ... | 16.621622 | 58 | 0.508943 |
bce33ebee24f9957221ff3a929dd03664bbbc82d | 922 | py | Python | cryptoportfolio/interfaces/miningpools/f2pool.py | a1fred/cryptoportfolio | e49436324ccaa7325c3daa74e02fcc1b6b9aeae1 | [
"MIT"
] | 7 | 2018-02-26T13:37:09.000Z | 2022-02-09T03:44:26.000Z | cryptoportfolio/interfaces/miningpools/f2pool.py | a1fred/cryptoportfolio | e49436324ccaa7325c3daa74e02fcc1b6b9aeae1 | [
"MIT"
] | null | null | null | cryptoportfolio/interfaces/miningpools/f2pool.py | a1fred/cryptoportfolio | e49436324ccaa7325c3daa74e02fcc1b6b9aeae1 | [
"MIT"
] | null | null | null | from decimal import Decimal
import requests
from cryptoportfolio.interfaces.base import Address
class F2PoolWallet(Address):
decimal_places = 18
symbol = None
f2pool_currecnices_mapping = {
'bitcoin': "BTC",
'litecoin': "LTC",
'etc': "ETC",
'eth': "ETH",
'zec': "... | 26.342857 | 96 | 0.600868 |
dbfd23c37de189cbd2c656db4819eed0f163acd6 | 550 | py | Python | test/data/fair-crcc-send-data/workflow/scripts/gen_rename_index.py | crs4/snakemake-crate | d10167eee64b5fd9f7c09b50093a4b630b48db54 | [
"Apache-2.0"
] | null | null | null | test/data/fair-crcc-send-data/workflow/scripts/gen_rename_index.py | crs4/snakemake-crate | d10167eee64b5fd9f7c09b50093a4b630b48db54 | [
"Apache-2.0"
] | null | null | null | test/data/fair-crcc-send-data/workflow/scripts/gen_rename_index.py | crs4/snakemake-crate | d10167eee64b5fd9f7c09b50093a4b630b48db54 | [
"Apache-2.0"
] | null | null | null |
from typing import List, TextIO
from uuid import uuid4
def write_index_file(f: TextIO, mapping: dict) -> None:
for new_fname in sorted(mapping):
original_name = mapping[new_fname]
f.write(f"{new_fname}\t{original_name}\n")
def gen_rename_index(source_items: List[str], output_path: str):
map... | 28.947368 | 87 | 0.721818 |
2279b89acabf2f8fa4aa51eb5f011498a1f36e79 | 48,569 | py | Python | src/sage/combinat/skew_tableau.py | felix-salfelder/sage | 5d8b2ff4794c44c7fa7a9d86ec567ecfa337e566 | [
"BSL-1.0"
] | 2 | 2021-08-20T00:30:35.000Z | 2021-11-17T10:54:00.000Z | src/sage/combinat/skew_tableau.py | felix-salfelder/sage | 5d8b2ff4794c44c7fa7a9d86ec567ecfa337e566 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/skew_tableau.py | felix-salfelder/sage | 5d8b2ff4794c44c7fa7a9d86ec567ecfa337e566 | [
"BSL-1.0"
] | null | null | null | r"""
Skew Tableaux
"""
#*****************************************************************************
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ... | 32.379333 | 195 | 0.527641 |
49e85201ca3defbbe323879bd603ac5b593bc71d | 294 | py | Python | 01_WordTokenize.py | pemagrg1/SPACY-for-Beginners | b4647a5b7b1a784cfe86d594cb045337bef198fc | [
"MIT"
] | 4 | 2019-03-16T04:16:27.000Z | 2020-02-15T13:46:26.000Z | 01_WordTokenize.py | pemagrg1/Natural-Language-Processing-NLP-using-Spacy | b4647a5b7b1a784cfe86d594cb045337bef198fc | [
"MIT"
] | null | null | null | 01_WordTokenize.py | pemagrg1/Natural-Language-Processing-NLP-using-Spacy | b4647a5b7b1a784cfe86d594cb045337bef198fc | [
"MIT"
] | 1 | 2019-10-17T14:55:41.000Z | 2019-10-17T14:55:41.000Z | import spacy
nlp = spacy.load("en")
text = """Most of the outlay will be at home. No surprise there, either. While Samsung has expanded overseas, South Korea is still host to most of its factories and research engineers. """
doc = nlp(text)
words = [token.text for token in doc]
print (words) | 36.75 | 188 | 0.734694 |
180cd6e2be29877fdf4552aac8ea4b2218a6a411 | 2,500 | py | Python | cli.py | banditsbeware/wikitools | 1c08b47bf111007c674a9a73c9968a7b57fdf83b | [
"MIT"
] | 1 | 2020-11-26T03:39:50.000Z | 2020-11-26T03:39:50.000Z | cli.py | banditsbeware/wikitools | 1c08b47bf111007c674a9a73c9968a7b57fdf83b | [
"MIT"
] | null | null | null | cli.py | banditsbeware/wikitools | 1c08b47bf111007c674a9a73c9968a7b57fdf83b | [
"MIT"
] | null | null | null | '''
WikiTools -- cli.py
author: david rademacher
'''
from wikitools import *
from random import sample
comm = dict()
comm['c'] = 'list page categories'
comm['l'] = 'view table of contents'
comm['r'] = 'find related pages'
comm['a'] = 'list directly linked pages'
comm['n'] = 'get a new page'
comm['j'] = 'take a journe... | 25.252525 | 71 | 0.5416 |
39f387bd3857597d07f53089c06ed7673ccf0f2c | 3,663 | py | Python | results/migrations/0001_initial.py | dreardon/megamillions-group | 7c9fcd4c6fe0a151a9f2f48113406154bedd0a2f | [
"MIT"
] | null | null | null | results/migrations/0001_initial.py | dreardon/megamillions-group | 7c9fcd4c6fe0a151a9f2f48113406154bedd0a2f | [
"MIT"
] | 5 | 2021-04-08T18:28:50.000Z | 2022-03-05T21:38:41.000Z | results/migrations/0001_initial.py | dreardon/megamillions-group | 7c9fcd4c6fe0a151a9f2f48113406154bedd0a2f | [
"MIT"
] | 1 | 2019-09-05T22:35:34.000Z | 2019-09-05T22:35:34.000Z | # Generated by Django 2.0.4 on 2018-04-11 22:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='AgreementPeriod',
fields=[... | 41.157303 | 201 | 0.567568 |
d6957c24e81a185f1ef6db4207a6b2b903475d8d | 2,491 | py | Python | tests/test_forms.py | Egregors/django-rest-framework-filters | a56327618676db698f162b2c38f69a4e5d6f3a00 | [
"Unlicense"
] | null | null | null | tests/test_forms.py | Egregors/django-rest-framework-filters | a56327618676db698f162b2c38f69a4e5d6f3a00 | [
"Unlicense"
] | null | null | null | tests/test_forms.py | Egregors/django-rest-framework-filters | a56327618676db698f162b2c38f69a4e5d6f3a00 | [
"Unlicense"
] | null | null | null | from django import forms
from django.test import TestCase
from rest_framework_filters import FilterSet, filters
from .testapp.filters import PostFilter
from .testapp.models import Post, User
class FilterSetFormTests(TestCase):
def test_form_inheritance(self):
class MyForm(forms.Form):
pass
... | 29.654762 | 100 | 0.556002 |
9dcdf50e77ec4a6acca3ae6fa0a30dba1d208c10 | 2,127 | py | Python | wedge/robot.py | TeamIllusion/RapidReact | 638b0b8c0192b7e71ed5cb608586eca12f1e8f00 | [
"BSD-3-Clause"
] | null | null | null | wedge/robot.py | TeamIllusion/RapidReact | 638b0b8c0192b7e71ed5cb608586eca12f1e8f00 | [
"BSD-3-Clause"
] | 1 | 2022-01-29T16:42:23.000Z | 2022-01-29T16:42:23.000Z | wedge/robot.py | TeamIllusion/RapidReact | 638b0b8c0192b7e71ed5cb608586eca12f1e8f00 | [
"BSD-3-Clause"
] | 4 | 2022-01-28T20:05:26.000Z | 2022-01-31T21:05:40.000Z | #!/usr/bin/env python3
"""
This is a demo program showing how to use Mecanum control with the
MecanumDrive class.
Since the team has decided to build a wedge, this code is going to
have to be modified to use only three motors.
The theory for such a design can be found at
https... | 31.746269 | 109 | 0.67654 |
6f173477abc503cdfe1596163403900ea50db311 | 2,442 | py | Python | ros2doctor/test/test_cli.py | craigh92/ros2cli | 6c1af39c728145942346b40e998b8a3984f1b6c1 | [
"Apache-2.0"
] | 90 | 2017-06-06T22:16:23.000Z | 2022-03-08T20:16:05.000Z | ros2doctor/test/test_cli.py | craigh92/ros2cli | 6c1af39c728145942346b40e998b8a3984f1b6c1 | [
"Apache-2.0"
] | 586 | 2017-06-12T18:00:16.000Z | 2022-03-29T21:17:13.000Z | ros2doctor/test/test_cli.py | craigh92/ros2cli | 6c1af39c728145942346b40e998b8a3984f1b6c1 | [
"Apache-2.0"
] | 108 | 2017-07-11T16:20:12.000Z | 2022-03-27T21:30:22.000Z | # Copyright 2020 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 33.452055 | 80 | 0.707617 |
c57dd653d59ec79af2b65737f3b839661b746109 | 1,551 | py | Python | fn_kafka/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_kafka/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_kafka/setup.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='fn_kafka',
version='1.0.0',
license='MIT',
author='Mark Scherfling',
author_email='Resilient Labs',
url='https://github.com/ibmresilient/resilient-community-apps',
description="Resilient ... | 38.775 | 107 | 0.698904 |
e082e8b381f72c80d52788ae169bfc14b15d03fb | 1,930 | py | Python | marathoner/commands/multi_test.py | Mimino666/tc-marathoner | ab388f8706d671f6bdd8667c9e863c37a2cb21ae | [
"MIT"
] | 14 | 2015-04-21T14:04:37.000Z | 2021-12-23T01:40:02.000Z | marathoner/commands/multi_test.py | Mimino666/tc-marathoner | ab388f8706d671f6bdd8667c9e863c37a2cb21ae | [
"MIT"
] | 3 | 2015-04-23T13:33:28.000Z | 2015-09-17T14:54:53.000Z | marathoner/commands/multi_test.py | Mimino666/tc-marathoner | ab388f8706d671f6bdd8667c9e863c37a2cb21ae | [
"MIT"
] | 1 | 2021-12-23T01:40:09.000Z | 2021-12-23T01:40:09.000Z | import re
from six import print_
from six.moves import xrange
from marathoner.commands.base import BaseCommand
class Command(BaseCommand):
syntax = '<seed1> <seed2> [<vis params>]'
help = 'run batch of tests from interval [seed1, seed2]'
cmd_re = re.compile(r'^\s*(\d+)\s+(\d+)(?:\s+([^\d\s].*))?\s*$', ... | 35.740741 | 106 | 0.599482 |
9aa5d84ec6f6c069d11eddee09e6b05374cd5877 | 1,034 | py | Python | tests/extmod/uctypes_sizeof_native.py | TG-Techie/circuitpython | 390295dd218fb705fe652de77132dea472adf1ed | [
"MIT",
"BSD-3-Clause",
"MIT-0",
"Unlicense"
] | 3 | 2020-01-09T21:50:22.000Z | 2020-01-15T08:27:48.000Z | tests/extmod/uctypes_sizeof_native.py | TG-Techie/circuitpython | 390295dd218fb705fe652de77132dea472adf1ed | [
"MIT",
"BSD-3-Clause",
"MIT-0",
"Unlicense"
] | null | null | null | tests/extmod/uctypes_sizeof_native.py | TG-Techie/circuitpython | 390295dd218fb705fe652de77132dea472adf1ed | [
"MIT",
"BSD-3-Clause",
"MIT-0",
"Unlicense"
] | 1 | 2020-01-11T12:42:41.000Z | 2020-01-11T12:42:41.000Z | try:
import uctypes
except ImportError:
print("SKIP")
raise SystemExit
S1 = {}
assert uctypes.sizeof(S1) == 0
S2 = {"a": uctypes.UINT8 | 0}
assert uctypes.sizeof(S2) == 1
S3 = {"a": uctypes.UINT8 | 0, "b": uctypes.UINT8 | 1}
assert uctypes.sizeof(S3) == 2
S4 = {"a": uctypes.UINT8 | 0, "b": uctypes.UINT3... | 24.619048 | 87 | 0.609284 |
5ae79a10452200d27b2e174fc9ea163e8646f30f | 1,757 | py | Python | beanbot/parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 4 | 2019-09-30T10:04:45.000Z | 2021-09-18T05:39:08.000Z | beanbot/parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 2 | 2021-07-30T02:13:56.000Z | 2021-07-30T02:14:02.000Z | beanbot/parser.py | kevinzg/beanbot | 4558804f539720895f9fea2bb46bcdbfe886b034 | [
"MIT"
] | 1 | 2021-03-23T10:40:37.000Z | 2021-03-23T10:40:37.000Z | from decimal import Decimal, InvalidOperation
from .errors import UserError
from .models import Action, Event
# Parser
def parse_message(message: str) -> Event:
"""Transform a user message into an event that can be handled by the database."""
message = message.strip()
def inner_parse():
try:
... | 27.453125 | 85 | 0.587934 |
06465814b17d5c9db050b362fc8305b4da7a3650 | 1,223 | py | Python | app/recipe/serializers.py | mossj77/recipe-app-api | 62cc41bdc258185491dabadba6e99588f455558c | [
"MIT"
] | null | null | null | app/recipe/serializers.py | mossj77/recipe-app-api | 62cc41bdc258185491dabadba6e99588f455558c | [
"MIT"
] | null | null | null | app/recipe/serializers.py | mossj77/recipe-app-api | 62cc41bdc258185491dabadba6e99588f455558c | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
class Meta:
model = Tag
fields = ('id', 'name')
read_only_fields = ('id', )
class IngredientSerializer(serializers.ModelSerializer):
class Meta:
... | 23.519231 | 74 | 0.634505 |
f297ac64e19011a31a3090cd2a4d6ca0a3a1763d | 3,238 | py | Python | experiment_scripts/train_poisson_grad_img.py | zongzi13545329/siren | 6b6f4b047bc5cb92c88374eb53299880f0ccdd56 | [
"MIT"
] | 1,245 | 2020-06-24T22:01:02.000Z | 2022-03-31T04:30:01.000Z | experiment_scripts/train_poisson_grad_img.py | zongzi13545329/siren | 6b6f4b047bc5cb92c88374eb53299880f0ccdd56 | [
"MIT"
] | 50 | 2020-06-25T09:16:45.000Z | 2022-02-15T14:49:07.000Z | experiment_scripts/train_poisson_grad_img.py | zongzi13545329/siren | 6b6f4b047bc5cb92c88374eb53299880f0ccdd56 | [
"MIT"
] | 203 | 2020-06-24T23:43:02.000Z | 2022-03-29T05:44:58.000Z | '''Reproduces Paper Sec. 4.1, Supplement Sec. 3, reconstruction from gradient.
'''
# Enable import from parent package
import sys
import os
sys.path.append( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ) ) )
import dataio, meta_modules, utils, training, loss_functions, modules
from torch.utils.data im... | 46.927536 | 116 | 0.722359 |
2985ee754f28f4194058129fed33139057a48e40 | 11,794 | py | Python | autodc/components/transfer_learning/tlbo/models/abstract_model.py | dingdian110/AutoDC | f5ccca6bea993bcff3e804fb859e8b25ae020b5c | [
"MIT"
] | 27 | 2021-07-19T09:03:34.000Z | 2022-03-31T06:19:23.000Z | autodc/components/transfer_learning/tlbo/models/abstract_model.py | dingdian110/AutoDC | f5ccca6bea993bcff3e804fb859e8b25ae020b5c | [
"MIT"
] | 4 | 2021-07-15T12:17:10.000Z | 2022-01-26T17:16:58.000Z | autodc/components/transfer_learning/tlbo/models/abstract_model.py | dingdian110/AutoDC | f5ccca6bea993bcff3e804fb859e8b25ae020b5c | [
"MIT"
] | 17 | 2020-05-12T20:24:50.000Z | 2021-07-11T03:31:38.000Z | import typing
import numpy as np
from typing import List, Optional, Tuple, Union
from sklearn.decomposition import PCA
from sklearn.preprocessing import MinMaxScaler
from sklearn.exceptions import NotFittedError
from ..config_space import ConfigurationSpace
from ..utils.constants import VERY_SMALL_NUMBER
from ..utils... | 35.739394 | 119 | 0.573427 |
390e8272d9e4887ffbe08743f191d22b9fbba26a | 106 | py | Python | exercicios-turtle/.history/2_equation_20210624122516.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | 1 | 2021-11-28T18:49:21.000Z | 2021-11-28T18:49:21.000Z | exercicios-turtle/.history/2_equation_20210624122516.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | exercicios-turtle/.history/2_equation_20210624122516.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | print('A seguir digite os valores referentes a Ax² + Bx + c = 0')
A=float(input('Digite o valor de A: ')) | 35.333333 | 65 | 0.669811 |
ae14a8345c37caed683ac71316b3588f14adfb72 | 3,590 | py | Python | wheat/consensus/default_constants.py | grayfallstown/wheat-blockchain | f391cdd30a0cbcdb2adf4439a25581fd28b42c1f | [
"Apache-2.0"
] | null | null | null | wheat/consensus/default_constants.py | grayfallstown/wheat-blockchain | f391cdd30a0cbcdb2adf4439a25581fd28b42c1f | [
"Apache-2.0"
] | null | null | null | wheat/consensus/default_constants.py | grayfallstown/wheat-blockchain | f391cdd30a0cbcdb2adf4439a25581fd28b42c1f | [
"Apache-2.0"
] | null | null | null | from wheat.util.ints import uint64
from .constants import ConsensusConstants
testnet_kwargs = {
"SLOT_BLOCKS_TARGET": 32,
"MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, # Must be less than half of SLOT_BLOCKS_TARGET
"MAX_SUB_SLOT_BLOCKS": 128, # Must be less than half of SUB_EPOCH_BLOCKS
"NUM_SPS_SUB_SLOT": ... | 57.903226 | 119 | 0.741504 |
373eff4f4128c09db6deaaa8361a8219f4c2682b | 11,372 | py | Python | src/softfab/render.py | boxingbeetle/softfab | 0ecf899f66a1fb046ee869cbfa3b5374b3f8aa14 | [
"BSD-3-Clause"
] | 20 | 2019-02-07T17:03:04.000Z | 2020-03-16T20:45:19.000Z | src/softfab/render.py | boxingbeetle/softfab | 0ecf899f66a1fb046ee869cbfa3b5374b3f8aa14 | [
"BSD-3-Clause"
] | 36 | 2019-02-11T08:57:16.000Z | 2020-09-29T05:32:08.000Z | src/softfab/render.py | boxingbeetle/softfab | 0ecf899f66a1fb046ee869cbfa3b5374b3f8aa14 | [
"BSD-3-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-3-Clause
'''
Module to render the page
'''
from typing import ClassVar, Optional, Type, cast
import logging
from twisted.cred.error import LoginFailed, Unauthorized
from twisted.internet.defer import ensureDeferred
from twisted.internet.error import ConnectionClosed
from twisted.python... | 34.776758 | 78 | 0.623373 |
4b2d37754ae48228e4e8d649224d0d7ce072bd1f | 4,360 | py | Python | eoxserver/resources/coverages/management/commands/eoxs_collection_purge.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | eoxserver/resources/coverages/management/commands/eoxs_collection_purge.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | eoxserver/resources/coverages/management/commands/eoxs_collection_purge.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | #-------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2016 EOX IT Services GmbH
#
# Permission... | 37.586207 | 80 | 0.629587 |
d5108e610cda0269dfadaac70cf164cfe5e1092c | 7,693 | py | Python | astrorapid/get_training_data.py | kschamplin/astrorapid | acfd2cf953efe9ed89834a3347cf34f79693bf2f | [
"MIT"
] | 12 | 2019-01-15T19:40:11.000Z | 2020-12-17T11:36:18.000Z | astrorapid/get_training_data.py | kschamplin/astrorapid | acfd2cf953efe9ed89834a3347cf34f79693bf2f | [
"MIT"
] | 9 | 2019-07-19T15:29:19.000Z | 2022-03-12T00:59:37.000Z | astrorapid/get_training_data.py | kschamplin/astrorapid | acfd2cf953efe9ed89834a3347cf34f79693bf2f | [
"MIT"
] | 11 | 2019-02-19T20:35:08.000Z | 2021-07-16T05:56:28.000Z | import os
import pickle
import numpy as np
from astrorapid.read_snana_fits import read_light_curves_from_snana_fits_files
from astrorapid.helpers import delete_indexes
from astrorapid.process_light_curves import InputLightCurve
def get_data(get_data_func, class_num, data_dir, save_dir, passbands, known_redshift=True... | 48.689873 | 160 | 0.55856 |
ad80e463d1bb13e5227621b11f8926f1e3f4de29 | 1,341 | py | Python | var/spack/repos/builtin/packages/commons-lang/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/commons-lang/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/commons-lang/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class CommonsLang(Package):
"""The standard Java libraries fail to provide enough method... | 41.90625 | 98 | 0.751678 |
604ae340d4bce02eada005d14e01320049188d03 | 5,568 | py | Python | translate.py | GregoryZeng/nlu-cw2 | 6e92126f918b4f82a7f7a0afa6c4023ffd25706d | [
"MIT"
] | null | null | null | translate.py | GregoryZeng/nlu-cw2 | 6e92126f918b4f82a7f7a0afa6c4023ffd25706d | [
"MIT"
] | null | null | null | translate.py | GregoryZeng/nlu-cw2 | 6e92126f918b4f82a7f7a0afa6c4023ffd25706d | [
"MIT"
] | null | null | null | import os
import logging
import argparse
import numpy as np
from tqdm import tqdm
import torch
from torch.serialization import default_restore_location
from seq2seq import models, utils
from seq2seq.data.dictionary import Dictionary
from seq2seq.data.dataset import Seq2SeqDataset, BatchSampler
def get_args():
"... | 42.830769 | 117 | 0.636135 |
fa660e6159278f49001d05669dba6c4ceafd2774 | 6,661 | py | Python | tests/test_dual_ga.py | RAufschlaeger/tfga | 1607381fdcb3b479fc90b3fbb3af44b739ca720a | [
"MIT"
] | 30 | 2020-05-24T13:14:15.000Z | 2021-12-21T21:10:57.000Z | tests/test_dual_ga.py | RAufschlaeger/tfga | 1607381fdcb3b479fc90b3fbb3af44b739ca720a | [
"MIT"
] | 11 | 2020-06-06T13:16:14.000Z | 2021-12-27T08:05:48.000Z | tests/test_dual_ga.py | RAufschlaeger/tfga | 1607381fdcb3b479fc90b3fbb3af44b739ca720a | [
"MIT"
] | 7 | 2020-05-30T12:20:26.000Z | 2022-01-20T08:12:36.000Z | import unittest as ut
import tensorflow as tf
from tfga import GeometricAlgebra
# Make tensorflow not take over the entire GPU memory
for gpu in tf.config.experimental.list_physical_devices('GPU'):
tf.config.experimental.set_memory_growth(gpu, True)
dual_metric = [0]
dual_bases = ["0"]
dual_blades = ["", "0"]
dua... | 39.64881 | 81 | 0.63474 |
1a6d6c40ed0fdd98f7f6df63154320225f51bc13 | 40,726 | py | Python | test/with_dummyserver/test_https.py | verhovsky/urllib3 | 86d7193783a5e5cf8c1eb07e34244910bbfe77d1 | [
"MIT"
] | null | null | null | test/with_dummyserver/test_https.py | verhovsky/urllib3 | 86d7193783a5e5cf8c1eb07e34244910bbfe77d1 | [
"MIT"
] | null | null | null | test/with_dummyserver/test_https.py | verhovsky/urllib3 | 86d7193783a5e5cf8c1eb07e34244910bbfe77d1 | [
"MIT"
] | null | null | null | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | 37.057325 | 91 | 0.598807 |
6fc40710af7f570cc480ed80d1ed294d3275015a | 2,304 | py | Python | scripts/sanitize_resources.py | DavidLegg/StockSim | b5da697dc5fa0c4126baf79d9a3285762937a2d4 | [
"MIT"
] | 1 | 2020-07-13T09:03:36.000Z | 2020-07-13T09:03:36.000Z | scripts/sanitize_resources.py | DavidLegg/StockSim | b5da697dc5fa0c4126baf79d9a3285762937a2d4 | [
"MIT"
] | null | null | null | scripts/sanitize_resources.py | DavidLegg/StockSim | b5da697dc5fa0c4126baf79d9a3285762937a2d4 | [
"MIT"
] | null | null | null | from glob import glob
import os, sys, re
USAGE="""sanitize_resources [PATTERN]...
Processes files matching PATTERN(s), scrubbing timestamps to be ints, and prices to be floats.
"""
# Unix Timestamp,Date,Symbol,Open,High,Low,Close,Volume
INT_COL_NAMES = ['Unix Timestamp']
FLOAT_COL_NAMES = ['Open', 'High', 'Low'... | 33.882353 | 98 | 0.515191 |
bc447937bbff8d62a97087071c7ff8bd624adb01 | 1,145 | py | Python | src/python/pants/core/goals/style_request.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | src/python/pants/core/goals/style_request.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | src/python/pants/core/goals/style_request.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from abc import ABCMeta
from dataclasses import dataclass
from typing import ClassVar, Generic, Iterable, Optional, Type, TypeVar
from pants.engine.collection import Collection
from pants... | 32.714286 | 94 | 0.762445 |
4673e8d603ddaf8ae66fa1c73718d10927d11f27 | 14,958 | py | Python | test/functional/interface_rest.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | test/functional/interface_rest.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | test/functional/interface_rest.py | tachacoin/tachacoin | a40df0f17ac1c201d3e339944c8c74e668c61a1b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the REST API."""
import binascii
from decimal import Decimal
from enum import Enum
from io import... | 44.918919 | 153 | 0.665731 |
dfed13a266993f7ed87183dcac1ecce1e05e4f99 | 30,341 | py | Python | tensorflow/python/eager/def_function_xla_jit_test.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 3 | 2020-12-27T23:28:09.000Z | 2022-03-26T02:10:18.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 3 | 2021-08-25T15:06:34.000Z | 2022-02-10T02:50:24.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 2 | 2017-10-10T02:34:56.000Z | 2019-04-29T15:13:56.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.862723 | 80 | 0.62727 |
dea18888240dd83f462a4e5c60d7ec0dfd7093de | 2,373 | py | Python | aws_marketplace/using_algorithms/autogluon/src/algorithm_arns.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 5 | 2019-01-19T23:53:35.000Z | 2022-01-29T14:04:31.000Z | aws_marketplace/using_algorithms/autogluon/src/algorithm_arns.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 2 | 2021-08-25T16:15:24.000Z | 2022-02-10T02:49:50.000Z | aws_marketplace/using_algorithms/autogluon/src/algorithm_arns.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 7 | 2020-03-04T22:23:51.000Z | 2021-07-13T14:05:46.000Z | class AlgorithmArnProvider:
@staticmethod
def get_algorithm_arn(current_region):
mapping = {
"ap-northeast-1" : "arn:aws:sagemaker:ap-northeast-1:977537786026:algorithm/autogluon-tabular-v3-3-3b713280f53340e66804815d6707dbc9",
"ap-northeast-2" : "arn:aws:sagemaker:ap... | 103.173913 | 143 | 0.748841 |
d882617a2750f600393bd53539ed8a04e06f8413 | 3,207 | py | Python | jupytext/languages.py | hwasiti/jupytext | b531be1e1933531ac6ffef488232285766f05cea | [
"MIT"
] | null | null | null | jupytext/languages.py | hwasiti/jupytext | b531be1e1933531ac6ffef488232285766f05cea | [
"MIT"
] | null | null | null | jupytext/languages.py | hwasiti/jupytext | b531be1e1933531ac6ffef488232285766f05cea | [
"MIT"
] | null | null | null | """Determine notebook or cell language"""
import re
_JUPYTER_LANGUAGES = ['R', 'bash', 'sh', 'python', 'python2', 'python3', 'javascript', 'js', 'perl']
_JUPYTER_LANGUAGES_RE = [re.compile(r"^%%{}\s*".format(lang)) for lang in _JUPYTER_LANGUAGES]
_SCRIPT_EXTENSIONS = {'.py': {'language': 'python', 'comment': '#'},
... | 41.115385 | 100 | 0.57125 |
a2def25547a2155ad851fe7988932a060076ace7 | 3,171 | py | Python | frangiclave/compendium/slot_specification.py | DeSevilla/frangiclave-compendium | 2389fb0c5492e76b2de06227c31ff19e247d8376 | [
"CC0-1.0"
] | 6 | 2018-07-09T13:01:12.000Z | 2020-04-18T15:10:43.000Z | frangiclave/compendium/slot_specification.py | DeSevilla/frangiclave-compendium | 2389fb0c5492e76b2de06227c31ff19e247d8376 | [
"CC0-1.0"
] | 1 | 2018-07-20T00:00:05.000Z | 2018-09-24T10:54:35.000Z | frangiclave/compendium/slot_specification.py | Lyrositor/frangiclave | 5aae57fc3161e47a7bc5fe84712aa06ec87d6b78 | [
"CC0-1.0"
] | null | null | null | from typing import TYPE_CHECKING, Any, Dict, List
from sqlalchemy import Column, String, Boolean, ForeignKey, Integer, Table
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship
from frangiclave.compendium.base import Base
from frangiclave.compendium.game_content import GameCon... | 31.71 | 76 | 0.619994 |
8dc94760ae7fb3ce64fafd58eb24271514ad1688 | 4,724 | py | Python | 2021/05-day/modules.py | smv7/Advent_Of_Code | ee22bc08ab663b5aa1f42deb50774b493a4cf7ba | [
"MIT"
] | null | null | null | 2021/05-day/modules.py | smv7/Advent_Of_Code | ee22bc08ab663b5aa1f42deb50774b493a4cf7ba | [
"MIT"
] | null | null | null | 2021/05-day/modules.py | smv7/Advent_Of_Code | ee22bc08ab663b5aa1f42deb50774b493a4cf7ba | [
"MIT"
] | null | null | null | '''Functions to Advent Code 2021, day 5'''
def create_dots_map(x:int, y:int) -> list:
'''Return a 2D array of "y" arrays and each array filled with "x" dots (".").'''
dots_map = []
# Appending the rows filled with dots to the map.
# The function recieves coordinates (0-9) to construct the dots map an... | 38.721311 | 113 | 0.565411 |
087547aca64f868848f4ad6fa815668c51002dcb | 593 | py | Python | Elevator.py | Idbruh/Elevator | a895cd0ac1bdd79eeec281be90e4a85dea84f0de | [
"MIT"
] | null | null | null | Elevator.py | Idbruh/Elevator | a895cd0ac1bdd79eeec281be90e4a85dea84f0de | [
"MIT"
] | null | null | null | Elevator.py | Idbruh/Elevator | a895cd0ac1bdd79eeec281be90e4a85dea84f0de | [
"MIT"
] | null | null | null | from random import choice
class Elevator:
def __init__(self):
self.__left_elevator = [0,1,2]
self.__right_elevator = [0,1,2]
self.__call_elevator = [0,1,2]
def get_random_left_elevator_floor(self) -> int:
left_elevator = self.__left_elevator
return choice(left_elevator... | 26.954545 | 53 | 0.684654 |
c89048b2ef5c768434002868bdd22ab8f9e36189 | 1,423 | py | Python | lambda/main.py | Invicton-Labs/terraform-aws-lambda-shell | ac21d5e733e7e63726f01f32fe71d88fcd008585 | [
"CC-BY-4.0"
] | null | null | null | lambda/main.py | Invicton-Labs/terraform-aws-lambda-shell | ac21d5e733e7e63726f01f32fe71d88fcd008585 | [
"CC-BY-4.0"
] | null | null | null | lambda/main.py | Invicton-Labs/terraform-aws-lambda-shell | ac21d5e733e7e63726f01f32fe71d88fcd008585 | [
"CC-BY-4.0"
] | null | null | null | import subprocess
import uuid
import os
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
def lambda_handler(event, context):
logger.debug("Input event: {}".format(event))
# If a special flag is set, skip the execution
if '__IL_TF_LS_SKIP_RUN' in event:
r... | 29.645833 | 131 | 0.619115 |
e9812a61daa3bf5fc894e00be066d8238fc7d04c | 276 | py | Python | app/talk/views.py | Deteriorator/Alog | bdb7b3199d13c28030987275fe020955e3bf7b74 | [
"MIT"
] | null | null | null | app/talk/views.py | Deteriorator/Alog | bdb7b3199d13c28030987275fe020955e3bf7b74 | [
"MIT"
] | null | null | null | app/talk/views.py | Deteriorator/Alog | bdb7b3199d13c28030987275fe020955e3bf7b74 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("Here is the about page. www.liangz.org")
def about(request):
return HttpResponse("Here is the about page. www.liangz.org")
| 21.230769 | 65 | 0.753623 |
9caa7695b3227fc4da4a1fd4aaacbb37988be800 | 6,349 | py | Python | mri/operators/proximity/ordered_weighted_l1_norm.py | mathrip/pysap-mri | d6acae5330c684b66a99d0fbf13e44b0b66046cf | [
"CECILL-B"
] | null | null | null | mri/operators/proximity/ordered_weighted_l1_norm.py | mathrip/pysap-mri | d6acae5330c684b66a99d0fbf13e44b0b66046cf | [
"CECILL-B"
] | null | null | null | mri/operators/proximity/ordered_weighted_l1_norm.py | mathrip/pysap-mri | d6acae5330c684b66a99d0fbf13e44b0b66046cf | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
##########################################################################
# pySAP - Copyright (C) CEA, 2017 - 2018
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-e... | 37.347059 | 78 | 0.554576 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.