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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f46b24b1fad22d6f5db57d3217da27c6a184bdb | 1,120 | py | Python | cwlab/web_app/main.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | cwlab/web_app/main.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | cwlab/web_app/main.py | krini-project/CWLab | 7e75cf9c4d00a9defb03802b358d40902f1ffd59 | [
"Apache-2.0"
] | null | null | null | import sys
import os
from flask import render_template, jsonify, redirect, flash, url_for, request
from flask_login import current_user
from werkzeug.urls import url_parse
from flask import current_app as app
from cwlab.users.manage import load_user
from json import dumps
from cwlab.log import handle_known_error, handl... | 33.939394 | 77 | 0.69375 |
418f8bdbb27ab3c7b68e89ad042008afe47432d3 | 2,929 | py | Python | python/tvm/micro/transport/wakeup.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 90 | 2019-01-26T00:38:49.000Z | 2022-03-11T23:12:34.000Z | python/tvm/micro/transport/wakeup.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 91 | 2019-02-27T00:17:01.000Z | 2022-02-21T18:08:21.000Z | python/tvm/micro/transport/wakeup.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 41 | 2019-01-28T14:37:03.000Z | 2022-03-31T03:58:57.000Z | # 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"); you may not u... | 36.6125 | 93 | 0.686241 |
9a0fe5a454948769e1a11d721d1c1fa1ed4a35cd | 2,920 | py | Python | django/utils/unittest/util.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | django/utils/unittest/util.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | django/utils/unittest/util.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | """Various utility functions."""
__unittest = True
_MAX_LENGTH = 80
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
return result
return result[:_MAX_LENGTH] + ' [t... | 29.2 | 77 | 0.496233 |
f2f1cf347e159cd360c025c1625f867002cddd7d | 3,323 | py | Python | model.py | xmeng17/Behavioral-Cloning | 713e9c539dacc8ea1512c2b1c43fd46b63c8c0b9 | [
"MIT"
] | null | null | null | model.py | xmeng17/Behavioral-Cloning | 713e9c539dacc8ea1512c2b1c43fd46b63c8c0b9 | [
"MIT"
] | null | null | null | model.py | xmeng17/Behavioral-Cloning | 713e9c539dacc8ea1512c2b1c43fd46b63c8c0b9 | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers import Dense, Flatten, Dropout, Lambda, Cropping2D, Convolution2D,MaxPooling2D
from keras.layers.advanced_activations import LeakyReLU
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
import cv2
import numpy as np
import csv
p... | 32.262136 | 105 | 0.66145 |
80dff869f781884a8f6cb78082605b4b8f9ba588 | 507 | py | Python | mmkitjournal/views.py | einsfr/mmkit2 | 68ff9b28faadf8b57c845601e1fdf01b961f6936 | [
"MIT"
] | null | null | null | mmkitjournal/views.py | einsfr/mmkit2 | 68ff9b28faadf8b57c845601e1fdf01b961f6936 | [
"MIT"
] | 7 | 2016-07-15T13:35:22.000Z | 2016-07-29T09:42:23.000Z | mmkitjournal/views.py | einsfr/mmkit2 | 68ff9b28faadf8b57c845601e1fdf01b961f6936 | [
"MIT"
] | null | null | null | from rest_framework import generics
from rest_framework.filters import DjangoFilterBackend
from mmkitjournal.models import ActivityRecord
from mmkitjournal import serializers
from . import filters
class ActivityRecordView(generics.ListAPIView):
queryset = ActivityRecord.objects.select_related('message_class', '... | 33.8 | 99 | 0.82643 |
4340002fcbcff9a0ce508542aeca89c861463454 | 2,469 | py | Python | osf_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | osf_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | osf_tests/conftest.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | import logging
import pytest
from faker import Factory
from framework.django.handlers import handlers as django_handlers
from framework.flask import rm_handlers
from website import settings
from website.app import init_app, patch_models
from website.project.signals import contributor_added
from website.project.views.... | 29.392857 | 107 | 0.737546 |
400e7f8e473cb6f9c598b19e62a6ecd0fb72978d | 18,651 | py | Python | SocialFish.py | Jena2000/SocialFish | c4ab72c1e12d0c00845620b4808d2145a7f98a87 | [
"BSD-3-Clause"
] | 198 | 2018-03-26T17:34:44.000Z | 2022-02-26T15:18:31.000Z | SocialFish.py | Jena2000/SocialFish | c4ab72c1e12d0c00845620b4808d2145a7f98a87 | [
"BSD-3-Clause"
] | 88 | 2018-03-30T16:42:58.000Z | 2018-10-28T04:42:02.000Z | SocialFish.py | Jena2000/SocialFish | c4ab72c1e12d0c00845620b4808d2145a7f98a87 | [
"BSD-3-Clause"
] | 115 | 2018-04-09T04:30:56.000Z | 2022-03-31T16:26:53.000Z | #!/usr/bin/python3
#-*- coding: utf-8 -*-
# SOCIALFISH v3.0
# by: An0nUD4Y
#
###########################
from time import sleep
from sys import stdout, exit, argv
from os import system, path
from distutils.dir_util import copy_tree
import multiprocessing
from urllib.request import urlopen, quote, unquote
from pla... | 48.318653 | 607 | 0.520884 |
23f3a61f0a328519760a1d240086978a11ac3bf2 | 3,721 | py | Python | src/lib/detectors/ctdet_NFS.py | StudentWong/CenterNet | d20640d40db522b14813e21febff187bd4d75738 | [
"MIT"
] | null | null | null | src/lib/detectors/ctdet_NFS.py | StudentWong/CenterNet | d20640d40db522b14813e21febff187bd4d75738 | [
"MIT"
] | null | null | null | src/lib/detectors/ctdet_NFS.py | StudentWong/CenterNet | d20640d40db522b14813e21febff187bd4d75738 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cv2
import numpy as np
from progress.bar import Bar
import time
import torch
try:
from external.nms import soft_nms
except:
print('NMS not imported! If you need it,'
' do \n cd $CenterNet_RO... | 37.969388 | 90 | 0.637463 |
c6b03130a2b33ca4ebb6173a4523fbca0a107826 | 386 | py | Python | cieloApi3/request/reactivateRecorrency.py | naripok/API-3.0-Python | 3bdd27d321a03f4c761876f7907588a0f4726c70 | [
"MIT"
] | 37 | 2017-01-19T12:25:14.000Z | 2022-02-22T12:43:39.000Z | cieloApi3/request/reactivateRecorrency.py | math-s/API-3.0-Python | 8b493963f6dcc23cbe54221434f2fcfde3bccfdc | [
"MIT"
] | 5 | 2020-05-18T22:50:12.000Z | 2022-02-26T23:48:48.000Z | cieloApi3/request/reactivateRecorrency.py | math-s/API-3.0-Python | 8b493963f6dcc23cbe54221434f2fcfde3bccfdc | [
"MIT"
] | 46 | 2017-02-07T16:35:54.000Z | 2022-02-03T19:06:06.000Z |
from .base import Base
class ReactivateRecorrency(Base):
def __init__(self, merchant, environment):
super(ReactivateRecorrency, self).__init__(merchant)
self.environment = environment
def execute(self, payment_id):
uri = '%s1/RecurrentPayment/%s/Reactivate' % (self.environment.api... | 22.705882 | 93 | 0.699482 |
79c0fb2b59f3f25d690dabc6bf0de4c036efad72 | 1,506 | py | Python | generate-markdown.py | rakina/security-questionnaire | 9a18d70885ef028144708a1367ef763ab85f287e | [
"W3C-20150513",
"CC0-1.0"
] | 26 | 2015-05-21T15:24:43.000Z | 2022-03-09T21:27:10.000Z | generate-markdown.py | MaxMood96/security-questionnaire | c54ad08c20a102869c384b46a367ff7a9026556c | [
"W3C-20150513",
"CC0-1.0"
] | 99 | 2015-05-06T16:41:09.000Z | 2022-03-23T21:39:26.000Z | generate-markdown.py | MaxMood96/security-questionnaire | c54ad08c20a102869c384b46a367ff7a9026556c | [
"W3C-20150513",
"CC0-1.0"
] | 26 | 2015-06-12T18:07:54.000Z | 2021-10-14T21:58:45.000Z | #!/usr/bin/env python3
import sys
class MarkdownGenerator:
def __init__(self):
self.in_question = False
self.first_line_in_question = False
self.prefix = ""
self.qnum = 0
def process_line(self, line, outfile):
if self.in_question:
if not line.startswith("</... | 38.615385 | 217 | 0.622842 |
2e24e96acf89797685335185d8ea61db1cc2798c | 4,590 | py | Python | src/rosdep2/platforms/debian.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | src/rosdep2/platforms/debian.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | src/rosdep2/platforms/debian.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# n... | 41.351351 | 79 | 0.725926 |
9b05a39fc34056208b77b81b09573c56b52738b7 | 3,184 | py | Python | mayan/apps/appearance/classes.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2021-06-17T18:24:25.000Z | 2021-06-17T18:24:25.000Z | mayan/apps/appearance/classes.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 7 | 2020-06-06T00:01:04.000Z | 2022-01-13T01:47:17.000Z | mayan/apps/appearance/classes.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.template.loader import get_template
class IconDriver(object):
_registry = {}
@classmethod
def get(cls, name):
return cls._registry[name]
@classmethod
def register(cls, driver_class):
cls._registry[driver_class.name] = driver_cl... | 28.684685 | 79 | 0.639133 |
7a682bcde0c7840d533e59365e7382cf6c41bfcb | 28,144 | py | Python | python/examples/core/harness.py | 00mjk/iree-llvm-sandbox | f076d9668d38ff8374c97650992a8027afa3f38e | [
"Apache-2.0"
] | 1 | 2022-03-11T20:12:50.000Z | 2022-03-11T20:12:50.000Z | python/examples/core/harness.py | 00mjk/iree-llvm-sandbox | f076d9668d38ff8374c97650992a8027afa3f38e | [
"Apache-2.0"
] | null | null | null | python/examples/core/harness.py | 00mjk/iree-llvm-sandbox | f076d9668d38ff8374c97650992a8027afa3f38e | [
"Apache-2.0"
] | 1 | 2022-03-11T20:12:51.000Z | 2022-03-11T20:12:51.000Z | # Make dict a generic (type-subscriptable) type for Python <3.9.
from __future__ import annotations
import argparse
import re
import sys
import os
import time
from collections import defaultdict
from typing import AbstractSet, Any, Callable, List, Mapping, Optional, Sequence, Union
import numpy
import pandas
from ml... | 39.920567 | 90 | 0.663267 |
a73da5149cabf96aace7a0cad57ae4f64e6425bb | 6,633 | py | Python | python/ray/serve/config.py | jenhaoyang/ray | b6f593b53e5b9f012261794fd9bff58c32e54f57 | [
"Apache-2.0"
] | 1 | 2021-09-14T15:14:05.000Z | 2021-09-14T15:14:05.000Z | python/ray/serve/config.py | jenhaoyang/ray | b6f593b53e5b9f012261794fd9bff58c32e54f57 | [
"Apache-2.0"
] | 66 | 2021-02-23T19:49:27.000Z | 2022-03-05T08:04:38.000Z | python/ray/serve/config.py | jenhaoyang/ray | b6f593b53e5b9f012261794fd9bff58c32e54f57 | [
"Apache-2.0"
] | 1 | 2020-01-16T20:52:25.000Z | 2020-01-16T20:52:25.000Z | import inspect
from enum import Enum
from typing import Any, List, Optional
import pydantic
from pydantic import BaseModel, PositiveInt, validator, NonNegativeFloat
from ray.serve.constants import DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT
class BackendConfig(BaseModel):
"""Configuration options for a backend, to be s... | 40.944444 | 79 | 0.630484 |
2d5603070f2aee059cf4cb6eb125961327384e72 | 4,842 | py | Python | tf2/tutorial/lab.0402.customization.layers.py | zooliet/tensorflow_exercises | a25fe6ec201c29dd45a959933876626b4c4d2be7 | [
"MIT"
] | null | null | null | tf2/tutorial/lab.0402.customization.layers.py | zooliet/tensorflow_exercises | a25fe6ec201c29dd45a959933876626b4c4d2be7 | [
"MIT"
] | null | null | null | tf2/tutorial/lab.0402.customization.layers.py | zooliet/tensorflow_exercises | a25fe6ec201c29dd45a959933876626b4c4d2be7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
sys.path.append('./')
sys.path.append('../../')
from lab_utils import (
tf, os, np, plt, logger, ap, BooleanAction,
debug, toc, auto_increment
)
ap.add_argument('--epochs', type=int, default=10, help='number of epochs: 10*')
ap.add_argument('--batch', type=int, default=64, he... | 30.840764 | 87 | 0.633622 |
cba4661b0b5213db3a22e576eb73cf6308f4ba03 | 5,262 | py | Python | core/domain/takeout_service.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 1 | 2021-12-17T15:21:23.000Z | 2021-12-17T15:21:23.000Z | core/domain/takeout_service.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | null | null | null | core/domain/takeout_service.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia 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 applicable ... | 38.130435 | 80 | 0.695553 |
aec7d7cfb8c57fe87b8eb85cb4a0ce98e4bddb01 | 11,884 | py | Python | cloudify_rest_client/executions.py | michailj/cloudify-common | dfc83adbd9ec6f07539445ca5d7008fa733bed03 | [
"Apache-2.0"
] | null | null | null | cloudify_rest_client/executions.py | michailj/cloudify-common | dfc83adbd9ec6f07539445ca5d7008fa733bed03 | [
"Apache-2.0"
] | null | null | null | cloudify_rest_client/executions.py | michailj/cloudify-common | dfc83adbd9ec6f07539445ca5d7008fa733bed03 | [
"Apache-2.0"
] | null | null | null | ########
# Copyright (c) 2014-2019 Cloudify Platform Ltd. 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 ... | 34.546512 | 102 | 0.601313 |
7a41e499308001fc20b42aeeaaec516d7f458cb7 | 2,468 | py | Python | test/functional/feature_logging.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | test/functional/feature_logging.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | test/functional/feature_logging.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Syndicate Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test debug logging."""
import os
from test_framework.test_framework import SyndicateTestFramework
class... | 41.133333 | 90 | 0.636548 |
20829b16795378ba0e9ebb47dd6ddc4cbb65bb11 | 779 | py | Python | atcoder/corp/codefes2017_q1_c.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | atcoder/corp/codefes2017_q1_c.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | atcoder/corp/codefes2017_q1_c.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | from collections import Counter
H, W = map(int, input().split())
cnt4, cnt2, cnt1 = 0, 0, 0
for v in Counter(''.join(input() for _ in range(H))).values():
if v % 4 == 0:
continue
elif v % 2 == 0:
cnt2 += 1
else:
cnt1 += 1
if (v - 1) % 4 != 0:
cnt2 += 1
odd = (H % ... | 22.911765 | 62 | 0.428755 |
83184529a978685665cadcadfb79fdd10e2d603a | 5,275 | py | Python | airflow/contrib/hooks/qyweixin_hook.py | zzmg/airflow-dingding-qyweixin-1.10.3 | 8ebb5f80362df94996e5aa297299e7ff46a6f540 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-21T07:30:14.000Z | 2019-08-21T07:30:14.000Z | airflow/contrib/hooks/qyweixin_hook.py | zzmg/airflow-dingding-qyweixin-1.10.3 | 8ebb5f80362df94996e5aa297299e7ff46a6f540 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2020-07-07T20:21:26.000Z | 2021-09-29T17:29:29.000Z | airflow/contrib/hooks/qyweixin_hook.py | langzi-zmg/airflow-dingding-qyweixin-1.10.3 | 8ebb5f80362df94996e5aa297299e7ff46a6f540 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 39.365672 | 94 | 0.627109 |
f11d1040ca03d38ad6cd97a93dd79acde2b3ab5d | 9,286 | py | Python | messages/compiler/cpp/test_cppgen.py | sync-bft/concord-clone | fcc5a454ca16446f04351676f330df2382699929 | [
"Apache-2.0"
] | null | null | null | messages/compiler/cpp/test_cppgen.py | sync-bft/concord-clone | fcc5a454ca16446f04351676f330df2382699929 | [
"Apache-2.0"
] | null | null | null | messages/compiler/cpp/test_cppgen.py | sync-bft/concord-clone | fcc5a454ca16446f04351676f330df2382699929 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import math
import os
import random
import sys
from pprint import pprint
sys.path.append("..")
import cppgen
import cmfc
from exceptions import CmfParseError
from visitor import Visitor
from walker import Walker
MAX_SIZE = 5
OUTPUT_DIR = 'TEST_OUTPUT'
def randint():
return str(random.ran... | 30.149351 | 124 | 0.63655 |
d8a74a5fdc1484aabbe5d6736c27c87b2464123a | 55,277 | py | Python | inventoryhandlers/storageinventory/storageinventory.py | alexandruavadanii/cm-plugins | 5c3f9f389f46f719579ac4cd4065490b1723ebff | [
"Apache-2.0"
] | null | null | null | inventoryhandlers/storageinventory/storageinventory.py | alexandruavadanii/cm-plugins | 5c3f9f389f46f719579ac4cd4065490b1723ebff | [
"Apache-2.0"
] | null | null | null | inventoryhandlers/storageinventory/storageinventory.py | alexandruavadanii/cm-plugins | 5c3f9f389f46f719579ac4cd4065490b1723ebff | [
"Apache-2.0"
] | 1 | 2021-04-24T16:48:17.000Z | 2021-04-24T16:48:17.000Z | # Copyright 2019 Nokia
#
# 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, softwar... | 38.954898 | 172 | 0.628109 |
f167192c1882033f95b84c2be7c34e0c680b7456 | 10,054 | py | Python | tests/ignite/contrib/handlers/test_polyaxon_logger.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:22:08.000Z | 2020-06-13T15:22:08.000Z | tests/ignite/contrib/handlers/test_polyaxon_logger.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | null | null | null | tests/ignite/contrib/handlers/test_polyaxon_logger.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:30:46.000Z | 2020-06-13T15:30:46.000Z | import os
import pytest
from unittest.mock import MagicMock, call
import torch
from ignite.engine import Engine, Events, State
from ignite.contrib.handlers.polyaxon_logger import *
os.environ["POLYAXON_NO_OP"] = "1"
def test_output_handler_with_wrong_logger_type():
wrapper = OutputHandler("tag", output_trans... | 33.291391 | 119 | 0.718321 |
c65a684360c87ee16131bcefe6b6f9474ef1d602 | 472 | py | Python | two_pointer/209_minimum_size_subarray_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | two_pointer/209_minimum_size_subarray_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | two_pointer/209_minimum_size_subarray_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class Solution(object):
def minSubArrayLen(self, s, nums):
"""
:type s: int
:type nums: List[int]
:rtype: int
"""
ans = float('inf')
cum = 0
i = 0
for j in range(len(nums)):
cum += nums[j]
while cum >= s:
... | 24.842105 | 41 | 0.379237 |
edb83aa98de4caded566f15d77faa2a4a6212da0 | 10,667 | py | Python | datalad/customremotes/tests/test_archives.py | jelmer/datalad | fedc04867d87e0191bd500991d0df97e97113457 | [
"MIT"
] | null | null | null | datalad/customremotes/tests/test_archives.py | jelmer/datalad | fedc04867d87e0191bd500991d0df97e97113457 | [
"MIT"
] | null | null | null | datalad/customremotes/tests/test_archives.py | jelmer/datalad | fedc04867d87e0191bd500991d0df97e97113457 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 41.996063 | 147 | 0.665979 |
d090539806149ed4a36670c4b5e0771912fb9384 | 19,303 | py | Python | engineio/asyncio_server.py | StoneMoe/python-engineio | 43f8fb5cd3fefe96768f8a8d91006787fa9c1c19 | [
"MIT"
] | null | null | null | engineio/asyncio_server.py | StoneMoe/python-engineio | 43f8fb5cd3fefe96768f8a8d91006787fa9c1c19 | [
"MIT"
] | null | null | null | engineio/asyncio_server.py | StoneMoe/python-engineio | 43f8fb5cd3fefe96768f8a8d91006787fa9c1c19 | [
"MIT"
] | null | null | null | import asyncio
import six
from six.moves import urllib
from . import exceptions
from . import packet
from . import server
from . import asyncio_socket
class AsyncServer(server.Server):
"""An Engine.IO server for asyncio.
This class implements a fully compliant Engine.IO web server with support
for webs... | 43.183445 | 98 | 0.552298 |
48c34a615dcf24b3bdd52bada31e016aa85968d7 | 10,046 | py | Python | release/scripts/addons/blenderkit/ratings.py | simileV/blenderStereo29 | 09b993449aaca671a9eb2a6a22327246936eb3db | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-07-20T15:41:58.000Z | 2020-07-20T15:41:58.000Z | release/scripts/addons/blenderkit/ratings.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/blenderkit/ratings.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 33.824916 | 115 | 0.652897 |
16520f666ec99a8f0593e1d72468bbe7c21119a9 | 190 | py | Python | run_alleles.py | yeastgenome/SGDAllianceData | 473efa14515d10f3aadf7f50d58edb42873176d0 | [
"MIT"
] | 1 | 2019-02-11T23:34:04.000Z | 2019-02-11T23:34:04.000Z | run_alleles.py | yeastgenome/SGDAllianceData | 473efa14515d10f3aadf7f50d58edb42873176d0 | [
"MIT"
] | 5 | 2021-01-26T19:53:32.000Z | 2022-03-21T22:23:12.000Z | run_alleles.py | yeastgenome/SGDAllianceData | 473efa14515d10f3aadf7f50d58edb42873176d0 | [
"MIT"
] | 1 | 2020-05-22T16:14:36.000Z | 2020-05-22T16:14:36.000Z | import os
from src.alleles.alleles import get_allele_information
THIS_FOLDER = os.path.dirname(os.path.abspath(__file__))
if __name__ == "__main__":
get_allele_information(THIS_FOLDER) | 27.142857 | 56 | 0.805263 |
f7ad3f1afa0487e696f02d356beaf28b21ad6377 | 7,303 | py | Python | tensorfuzz/fuzz_utils.py | dlshriver/tensorfuzz | a81df1b9b62f4d3176af35cf545bef16cf65a05f | [
"Apache-2.0"
] | null | null | null | tensorfuzz/fuzz_utils.py | dlshriver/tensorfuzz | a81df1b9b62f4d3176af35cf545bef16cf65a05f | [
"Apache-2.0"
] | null | null | null | tensorfuzz/fuzz_utils.py | dlshriver/tensorfuzz | a81df1b9b62f4d3176af35cf545bef16cf65a05f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | 36.515 | 81 | 0.702999 |
9cc69432736e896a09a76fb0bb6e8505094ac400 | 867 | py | Python | library/scrollphathd/__init__.py | mic2100/casper-script | 43841d832317ea6e3c65d52ccacfcf084210395a | [
"MIT"
] | null | null | null | library/scrollphathd/__init__.py | mic2100/casper-script | 43841d832317ea6e3c65d52ccacfcf084210395a | [
"MIT"
] | null | null | null | library/scrollphathd/__init__.py | mic2100/casper-script | 43841d832317ea6e3c65d52ccacfcf084210395a | [
"MIT"
] | null | null | null | from sys import version_info
from .api.http import start_background_thread, scrollphathd_blueprint
from . import is31fl3731
__version__ = '1.2.0'
display = is31fl3731.ScrollPhatHD(None, gamma_table=is31fl3731.LED_GAMMA)
DISPLAY_HEIGHT = display._height
DISPLAY_WIDTH = display._width
pixel = display.set_pixel
set_pi... | 26.272727 | 73 | 0.825836 |
6f33080a4f0194534a8e7e00b8c5b21d0a16f4c0 | 2,146 | py | Python | webapi/core/proxy_fetchers/freeproxylistsnet.py | shovradas/proxy-fellow | fdecc5d408496ba31aef70da4d17ee5869ed7dc5 | [
"MIT"
] | 1 | 2020-07-31T21:47:47.000Z | 2020-07-31T21:47:47.000Z | webapi/core/proxy_fetchers/freeproxylistsnet.py | shovradas/proxy-fellow | fdecc5d408496ba31aef70da4d17ee5869ed7dc5 | [
"MIT"
] | 13 | 2020-05-28T00:57:27.000Z | 2020-05-28T14:58:25.000Z | webapi/core/proxy_fetchers/freeproxylistsnet.py | shovradas/proxy-ally | fdecc5d408496ba31aef70da4d17ee5869ed7dc5 | [
"MIT"
] | null | null | null | import scrapy, os, json
from urllib.parse import unquote, urljoin
from urllib.request import pathname2url
import ast
from config import DEBUG
# DEBUG=False
# custom spider having the parse logic
class ProxyScrapSpider(scrapy.Spider):
name = 'freeproxylistsnet'
page_number=2
max_page=5
def start_reque... | 37 | 127 | 0.595993 |
64c20fe17b9099865ec8c5f91491b114c67a3852 | 32,993 | py | Python | xmlschema/validators/wildcards.py | jonringer/xmlschema | 9645bb52ae693b45f494af41af144a2a1f0e64d8 | [
"MIT"
] | null | null | null | xmlschema/validators/wildcards.py | jonringer/xmlschema | 9645bb52ae693b45f494af41af144a2a1f0e64d8 | [
"MIT"
] | null | null | null | xmlschema/validators/wildcards.py | jonringer/xmlschema | 9645bb52ae693b45f494af41af144a2a1f0e64d8 | [
"MIT"
] | null | null | null | #
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | 39.750602 | 100 | 0.584306 |
26f93630d42ef63602af907c558f741e42432d7d | 10,084 | py | Python | chalicelib/routes/formResponseNew.py | epicfaace/ccmt-cff-lambda | f9fce68aeb5da024a10990600f609e50254f3a73 | [
"Apache-2.0"
] | null | null | null | chalicelib/routes/formResponseNew.py | epicfaace/ccmt-cff-lambda | f9fce68aeb5da024a10990600f609e50254f3a73 | [
"Apache-2.0"
] | 1 | 2019-06-27T04:35:29.000Z | 2019-06-28T04:32:32.000Z | chalicelib/routes/formResponseNew.py | epicfaace/ccmt-cff-lambda | f9fce68aeb5da024a10990600f609e50254f3a73 | [
"Apache-2.0"
] | null | null | null | import uuid
from chalice import UnauthorizedError
import datetime
from pydash.objects import pick, get, unset
from ..util.formSubmit.util import calculate_price
from ..util.formSubmit.couponCodes import coupon_code_verify_max_and_record_as_used
from ..util.formSubmit.emailer import send_confirmation_email, fill_string_... | 54.804348 | 319 | 0.682765 |
46c4855f6df95fbbec5222eea3afbf50e3893fde | 3,037 | py | Python | api/announcements.py | vbessonov/circulation | 3f522130242298181ce3f5e8392da70a1328fb74 | [
"Apache-2.0"
] | null | null | null | api/announcements.py | vbessonov/circulation | 3f522130242298181ce3f5e8392da70a1328fb74 | [
"Apache-2.0"
] | null | null | null | api/announcements.py | vbessonov/circulation | 3f522130242298181ce3f5e8392da70a1328fb74 | [
"Apache-2.0"
] | null | null | null | import datetime
from core.util.problem_detail import ProblemDetail
from admin.announcement_list_validator import AnnouncementListValidator
class Announcements(object):
"""Data model class for a library's announcements.
This entire list is stored as a single
ConfigurationSetting, which is why this isn't ... | 36.590361 | 87 | 0.665459 |
ad556482ebe051369c9f101b2f13a4d7444b6604 | 1,192 | py | Python | test/reports/common-games/Terminal/test_previous_month_report_for_day.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | 1 | 2019-12-05T06:50:54.000Z | 2019-12-05T06:50:54.000Z | test/reports/common-games/Terminal/test_previous_month_report_for_day.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | null | null | null | test/reports/common-games/Terminal/test_previous_month_report_for_day.py | FearFactor1/SPA | a05aaa924c5bebb52cd508ebdf7fd3b81c49fac7 | [
"Apache-2.0"
] | null | null | null | # Отчёт за день + Кассовый отчёт + Обычные + Терминал + предыдущий месяц, к примеру будет 10 число
def test_previous_month(app):
app.report.open_page_report()
app.report.previous_month_date_10()
app.report.button_get_report()
app.report.parser_report_text()
assert "КАССОВЫЙ ОТЧЕТ ЗА ДЕНЬ" in app.... | 51.826087 | 98 | 0.764262 |
2947115166efaf7a74689eb2533a978b5afbb0c5 | 634 | py | Python | app/openmrs_viamo/migrations/0005_auto_20220508_2214.py | fxavier/siecho | c2f4dc6b1169b9db2349901a96adb190cf2e3f0a | [
"MIT"
] | null | null | null | app/openmrs_viamo/migrations/0005_auto_20220508_2214.py | fxavier/siecho | c2f4dc6b1169b9db2349901a96adb190cf2e3f0a | [
"MIT"
] | null | null | null | app/openmrs_viamo/migrations/0005_auto_20220508_2214.py | fxavier/siecho | c2f4dc6b1169b9db2349901a96adb190cf2e3f0a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.13 on 2022-05-08 22:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('openmrs_viamo', '0004_remove_missedappointment_tb'),
]
operations = [
migrations.AlterField(
model_name='missedappointment',
... | 26.416667 | 74 | 0.618297 |
ad8a36c3fe3ab51fdfc04c5a3b2c02cadddde168 | 6,674 | py | Python | supersetapiclient/base.py | opus-42/superset-api-client | df9ee80f7681ade8f4d2295c56967a23010f72ae | [
"Apache-2.0"
] | 11 | 2021-05-07T16:34:52.000Z | 2022-03-17T07:54:56.000Z | supersetapiclient/base.py | opus-42/superset-api-client | df9ee80f7681ade8f4d2295c56967a23010f72ae | [
"Apache-2.0"
] | 10 | 2021-10-08T20:03:59.000Z | 2022-03-18T18:28:09.000Z | supersetapiclient/base.py | opus-42/superset-api-client | df9ee80f7681ade8f4d2295c56967a23010f72ae | [
"Apache-2.0"
] | 6 | 2021-07-09T18:23:09.000Z | 2022-03-19T09:23:19.000Z | """Base classes."""
import logging
import dataclasses
import json
from requests import Response
from supersetapiclient.exceptions import NotFound
logger = logging.getLogger(__name__)
def json_field():
return dataclasses.field(default=None, repr=False)
def default_string():
return dataclasses.field(default... | 26.172549 | 83 | 0.51828 |
8c0d4dcc41640686d5ebba52cb6e1c7ea44b7e2d | 15,421 | py | Python | netdicom/DIMSEparameters.py | mklassen/pynetdicom | 5024d5f66f366d21d0fb1adc51f98d9c313692f7 | [
"MIT"
] | 30 | 2015-09-07T22:25:16.000Z | 2017-12-06T17:11:51.000Z | netdicom/DIMSEparameters.py | mklassen/pynetdicom | 5024d5f66f366d21d0fb1adc51f98d9c313692f7 | [
"MIT"
] | 38 | 2015-09-09T23:38:49.000Z | 2017-07-26T08:34:42.000Z | netdicom/DIMSEparameters.py | mklassen/pynetdicom | 5024d5f66f366d21d0fb1adc51f98d9c313692f7 | [
"MIT"
] | 30 | 2015-09-08T14:35:45.000Z | 2017-11-06T20:39:47.000Z | #
# Copyright (c) 2012 Patrice Munger
# This file is part of pynetdicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pynetdicom.googlecode.com
#
def classprinter(klass):
tmp = ''
for ii in klass.__dict__.keys():
tm... | 30.965863 | 79 | 0.620582 |
f644cfa7f50d8618319452d097808d17fc6e0707 | 1,864 | py | Python | tools/dahyeprinter/test_printer.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-07-20T10:15:49.000Z | 2018-07-20T10:16:54.000Z | tools/dahyeprinter/test_printer.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-06-26T09:12:44.000Z | 2019-12-18T00:09:14.000Z | tools/dahyeprinter/test_printer.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import unittest
from printer import pages_in_order, _pairing, _taking_odd, _taking_even, _flattening
class PrinterTest(unittest.TestCase):
def test_even_pages(self):
tot_pages, per_each_page = 4, 1
fp, sp = pages_in_order(tot_pages, per_each_page)
self.assertEqual(fp, [... | 31.066667 | 84 | 0.584764 |
2b1396873312c652fd10e8faa741fa1877361a08 | 17,060 | py | Python | server/tests-py/test_scheduled_triggers.py | eazyfin/graphql-engine | 72cc73826b37bfb05bde505fe21f8a60201855cb | [
"Apache-2.0",
"MIT"
] | 1 | 2019-10-31T19:50:02.000Z | 2019-10-31T19:50:02.000Z | server/tests-py/test_scheduled_triggers.py | eazyfin/graphql-engine | 72cc73826b37bfb05bde505fe21f8a60201855cb | [
"Apache-2.0",
"MIT"
] | null | null | null | server/tests-py/test_scheduled_triggers.py | eazyfin/graphql-engine | 72cc73826b37bfb05bde505fe21f8a60201855cb | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pytest
from datetime import datetime,timedelta
from croniter import croniter
from validate import validate_event_webhook,validate_event_headers
from queue import Empty
import json
import time
from utils import until_asserts_pass
# The create and delete tests should ideally go in setup an... | 37.995546 | 112 | 0.507855 |
7ffa2ae0239dcb4830bbe9bedafa299d3490a5f2 | 2,524 | py | Python | TextGraphics/Analysis/plotting.py | Jverma/TextGraphics | 6659c884c7814ec6a258941299fcfd400d7059cc | [
"MIT"
] | 15 | 2015-03-28T09:17:09.000Z | 2021-09-07T17:32:51.000Z | TextGraphics/Analysis/plotting.py | Jverma/TextGraphics | 6659c884c7814ec6a258941299fcfd400d7059cc | [
"MIT"
] | null | null | null | TextGraphics/Analysis/plotting.py | Jverma/TextGraphics | 6659c884c7814ec6a258941299fcfd400d7059cc | [
"MIT"
] | 8 | 2016-03-08T05:42:22.000Z | 2021-03-20T13:23:33.000Z | # -*- coding: utf-8 -*-
# Plots of the graph and its properties.
# This will be deprecated and replaced by better viusals
# based on R package ggplot2 or d3.js
from __future__ import division
import numpy as np
import networkx as nx
from matplotlib import pyplot as plt
#from TextGraphics.src.graph import TextGraph
... | 17.054054 | 106 | 0.661648 |
d57ede0b7dc49108b75a6b1b7598750034c2f823 | 1,056 | py | Python | main.py | MarshallBriggs/NeuralNetworkSnake-Python- | 120eb87c9955c842caebd91bc48f521ce70fb025 | [
"MIT"
] | null | null | null | main.py | MarshallBriggs/NeuralNetworkSnake-Python- | 120eb87c9955c842caebd91bc48f521ce70fb025 | [
"MIT"
] | null | null | null | main.py | MarshallBriggs/NeuralNetworkSnake-Python- | 120eb87c9955c842caebd91bc48f521ce70fb025 | [
"MIT"
] | null | null | null | from game import *
from training_data import generate_training_data
from keras.models import Sequential
from keras.layers import Dense
display_width = 500
display_height = 500
green = (0,255,0)
red = (255,0,0)
black = (0,0,0)
white = (255,255,255)
pygame.init()
display=pygame.display.set_mode((display_width,display_... | 27.076923 | 123 | 0.749053 |
079b1328608faad44c0e1e0cabc215207362628f | 1,503 | py | Python | src/huntsman/drp/tests/test_reduction.py | AstroHuntsman/huntsman-drp | 00f045ccccc1f7545da491457a2b17b9aabea89a | [
"MIT"
] | 1 | 2022-01-03T05:24:33.000Z | 2022-01-03T05:24:33.000Z | src/huntsman/drp/tests/test_reduction.py | fergusL/huntsman-drp | 7f370079e347e4ef5500678808ea9a7952c04e7e | [
"MIT"
] | 139 | 2020-10-02T01:49:29.000Z | 2021-09-07T04:58:51.000Z | src/huntsman/drp/tests/test_reduction.py | fergusL/huntsman-drp | 7f370079e347e4ef5500678808ea9a7952c04e7e | [
"MIT"
] | 3 | 2020-09-03T03:31:30.000Z | 2020-09-07T05:22:23.000Z | import os
import pytest
from huntsman.drp.reduction import create_from_file
@pytest.fixture()
def config_file_lsst(config):
rootdir = config["directories"]["root"]
return os.path.join(rootdir, "config", "reductions", "test-lsst.yaml")
@pytest.fixture()
def config_file_offsetsky(config):
rootdir = confi... | 34.159091 | 90 | 0.667332 |
b6efce12a99d6083127bcaaa60e3c2309ab6cea3 | 6,647 | py | Python | model/plugin_configuration.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | model/plugin_configuration.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | model/plugin_configuration.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | from configuration import ConfigurationSetting
from library import Library
from . import get_one
from sqlalchemy.sql.expression import bindparam
from sqlalchemy import and_, insert, update, delete
import logging
class PluginConfiguration(ConfigurationSetting):
""" Plugin is a ConfigurationSetting with specific b... | 36.521978 | 99 | 0.559801 |
41abf7fc1409d0ae00bd739cd4b8a3f489d83069 | 5,874 | py | Python | src/grasp_synergy/test/test_synergy.py | aprotyas/grasp-synergy | 23d0f7747a8a95b74017a7b9452155eec860f5db | [
"BSD-3-Clause"
] | null | null | null | src/grasp_synergy/test/test_synergy.py | aprotyas/grasp-synergy | 23d0f7747a8a95b74017a7b9452155eec860f5db | [
"BSD-3-Clause"
] | null | null | null | src/grasp_synergy/test/test_synergy.py | aprotyas/grasp-synergy | 23d0f7747a8a95b74017a7b9452155eec860f5db | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
import rosbag
import numpy as np
from grasp_synergy.grasp_synergy import GraspSynergy
"""
Author: Felix Duvallet <felixd@gmail.com>
"""
class TestCase(unittest.TestCase):
def setUp(self):
(_, self.messages, _) = zip(*self.data)
self.synergy = GraspSynergy()
pas... | 35.6 | 78 | 0.669901 |
942bf7150ae77713eedae8e0e8e5284beb197c4a | 528 | py | Python | setup.py | sanAkdam/chime | 1adbddbdddcdc2669086dee60d1bfb2f97535cff | [
"BSD-3-Clause"
] | 8 | 2015-02-05T22:12:41.000Z | 2015-05-15T16:15:14.000Z | setup.py | sanAkdam/chime | 1adbddbdddcdc2669086dee60d1bfb2f97535cff | [
"BSD-3-Clause"
] | 168 | 2015-02-02T23:02:52.000Z | 2015-05-15T21:54:07.000Z | setup.py | codeforamerica/bizarro-cms | 1adbddbdddcdc2669086dee60d1bfb2f97535cff | [
"BSD-3-Clause"
] | 5 | 2016-11-20T15:51:32.000Z | 2021-04-16T09:44:08.000Z | from setuptools import setup
setup(
name='Chime',
version='0.0.0',
url='https://github.com/chimecms/chime',
author='Code for America',
description='Hashing out some ideas about Git, Jekyll, language, and content management',
packages=['chime', 'chime.httpd', 'chime.publish', 'chime.instantiatio... | 29.333333 | 93 | 0.645833 |
0958ba3a5d2b81acba6617e4399b75a9aed8fed6 | 474 | py | Python | algorithm/Experience.py | YangJW73/PokerDQN | ff3a771f843d4b5ea6e073fd91138b2a744e97ea | [
"MIT"
] | 1 | 2018-03-02T00:49:31.000Z | 2018-03-02T00:49:31.000Z | algorithm/Experience.py | YangJW73/PokerDQN | ff3a771f843d4b5ea6e073fd91138b2a744e97ea | [
"MIT"
] | null | null | null | algorithm/Experience.py | YangJW73/PokerDQN | ff3a771f843d4b5ea6e073fd91138b2a744e97ea | [
"MIT"
] | null | null | null | #!/bin/python
class Experience:
def __init__(self, turn, info_feat, action_feat, reward, next_info_feat, next_available_action_feats):
self.turn = turn
self.info_feat = info_feat
self.action_feat = action_feat
self.reward ... | 47.4 | 106 | 0.582278 |
d48f9d84c1fa64fa58a492ca5892fb3761fb26c6 | 4,347 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py | wenfeifei/miniblink49 | 2ed562ff70130485148d94b0e5f4c343da0c2ba4 | [
"Apache-2.0"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 459 | 2016-09-29T00:51:38.000Z | 2022-03-07T14:37:46.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 42.617647 | 167 | 0.710835 |
10985db8b686f3114db6b5ac276bcd5310e07426 | 3,764 | py | Python | project_lifeline/settings.py | vix993/project-lifeline | 273bdad6e4d31178995654bbfced9d9e9e665c12 | [
"MIT"
] | 1 | 2021-04-13T14:58:37.000Z | 2021-04-13T14:58:37.000Z | project_lifeline/settings.py | vix993/project-lifeline | 273bdad6e4d31178995654bbfced9d9e9e665c12 | [
"MIT"
] | null | null | null | project_lifeline/settings.py | vix993/project-lifeline | 273bdad6e4d31178995654bbfced9d9e9e665c12 | [
"MIT"
] | null | null | null | """
Django settings for project_lifeline project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
impo... | 27.474453 | 91 | 0.714134 |
ed81547d1fca640de21e420e2ea160b65d13bc0e | 1,739 | py | Python | coremltools/__init__.py | Vijayrajsinh/Core-ML | b103f513cfd42cdf5b60f6261448d1ce667f590b | [
"BSD-3-Clause"
] | 1 | 2019-02-08T08:45:32.000Z | 2019-02-08T08:45:32.000Z | coremltools/__init__.py | Vijayrajsinh/Core-ML | b103f513cfd42cdf5b60f6261448d1ce667f590b | [
"BSD-3-Clause"
] | null | null | null | coremltools/__init__.py | Vijayrajsinh/Core-ML | b103f513cfd42cdf5b60f6261448d1ce667f590b | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
"""
Core ML is an Apple framework which allows developers to simply and easily integrate machine
learnin... | 42.414634 | 96 | 0.787809 |
bfa1ff92f29f99ed3e74dbc381230c001d89709c | 5,090 | py | Python | pythran/types/conversion.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | 1,647 | 2015-01-13T01:45:38.000Z | 2022-03-28T01:23:41.000Z | pythran/types/conversion.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | 1,116 | 2015-01-01T09:52:05.000Z | 2022-03-18T21:06:40.000Z | pythran/types/conversion.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | 180 | 2015-02-12T02:47:28.000Z | 2022-03-14T10:28:18.000Z | """ Module to convert Python type to Pythonic type. """
from numpy import int8, int16, int32, int64, intp, intc
from numpy import uint8, uint16, uint32, uint64, uintp, uintc
from numpy import float64, float32, complex64, complex128
import numpy
from pythran.typing import List, Dict, Set, Tuple, NDArray, Pointer, Fun
... | 36.357143 | 79 | 0.565619 |
1f06e5f5cd5e5322252fd001472a08e5acd9913f | 7,544 | py | Python | voltha/extensions/omci/omci_frame.py | jcsteven/voltha-b1.4.0-fixed | c4f56bc1a4e8e39248c89e8ed9000cfe6bd90f2c | [
"Apache-2.0"
] | null | null | null | voltha/extensions/omci/omci_frame.py | jcsteven/voltha-b1.4.0-fixed | c4f56bc1a4e8e39248c89e8ed9000cfe6bd90f2c | [
"Apache-2.0"
] | 2 | 2021-03-31T18:39:49.000Z | 2022-02-11T03:40:28.000Z | voltha/extensions/omci/omci_frame.py | jcsteven/voltha-b1.4.0-fixed | c4f56bc1a4e8e39248c89e8ed9000cfe6bd90f2c | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 the original author or 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 applicable law or... | 49.960265 | 84 | 0.680806 |
737718b168477bc0ce2b08974cea753ecabf960c | 13,853 | py | Python | examples/nlp/text_generation_fnet.py | IMvision12/keras-io | 44997b0610db078e1109d0dbca58db8319dbc744 | [
"Apache-2.0"
] | null | null | null | examples/nlp/text_generation_fnet.py | IMvision12/keras-io | 44997b0610db078e1109d0dbca58db8319dbc744 | [
"Apache-2.0"
] | null | null | null | examples/nlp/text_generation_fnet.py | IMvision12/keras-io | 44997b0610db078e1109d0dbca58db8319dbc744 | [
"Apache-2.0"
] | 1 | 2022-01-21T11:34:34.000Z | 2022-01-21T11:34:34.000Z | """
Title: Text Generation using FNet
Author: [Darshan Deshpande](https://twitter.com/getdarshan)
Date created: 2021/10/05
Last modified: 2021/10/05
Description: FNet transformer for text generation in Keras.
"""
"""
## Introduction
The original transformer implementation (Vaswani et al., 2017) was one of the major
br... | 35.795866 | 148 | 0.693279 |
66ae82dab4a607843bf070f7636cdf9c15b1603f | 173 | py | Python | summer-of-code/week-02/Nessa/moo.py | supersciencegrl/toolkitten | 59c661e58d23a55ff2651fee8ab7d9b2fe9aded6 | [
"MIT"
] | null | null | null | summer-of-code/week-02/Nessa/moo.py | supersciencegrl/toolkitten | 59c661e58d23a55ff2651fee8ab7d9b2fe9aded6 | [
"MIT"
] | null | null | null | summer-of-code/week-02/Nessa/moo.py | supersciencegrl/toolkitten | 59c661e58d23a55ff2651fee8ab7d9b2fe9aded6 | [
"MIT"
] | null | null | null | # ### MOO ###
# print("")
# print("### MOO ###")
# print("")
# n = int(input("How many cows do you have? "))
def moo(n):
print("moo " * n)
return("moo " * n)
# moo(n) | 13.307692 | 47 | 0.462428 |
533fb429fac086b7499c7b14eed67adf5b19db24 | 7,452 | py | Python | pystac/__init__.py | itcarroll/pystac | 6c00d2efbf2fece6ac10d9e5d6a712aee75057a2 | [
"Apache-2.0"
] | 60 | 2019-09-09T20:14:08.000Z | 2020-08-19T06:59:33.000Z | pystac/__init__.py | itcarroll/pystac | 6c00d2efbf2fece6ac10d9e5d6a712aee75057a2 | [
"Apache-2.0"
] | 87 | 2019-09-14T15:47:23.000Z | 2020-08-19T16:23:32.000Z | pystac/__init__.py | itcarroll/pystac | 6c00d2efbf2fece6ac10d9e5d6a712aee75057a2 | [
"Apache-2.0"
] | 24 | 2019-10-16T17:13:46.000Z | 2020-08-19T04:36:58.000Z | """
PySTAC is a library for working with SpatioTemporal Asset Catalogs (STACs)
"""
__all__ = [
"__version__",
"STACError",
"STACTypeError",
"DuplicateObjectKeyError",
"ExtensionAlreadyExistsError",
"ExtensionNotImplemented",
"ExtensionTypeError",
"RequiredPropertyMissing",
"STACValid... | 34.341014 | 86 | 0.711487 |
f3cfb77355d64f00cedd3455afd701bee6c43291 | 27,220 | py | Python | tornado/testing.py | codeb2cc/tornado | 1b6157dd03dbb393de5d1066a31f4810bf609686 | [
"Apache-2.0"
] | 2 | 2015-08-14T18:53:45.000Z | 2015-11-03T14:28:57.000Z | tornado/testing.py | yjkyz/tornado | d53f72fe6716e2c6956695ec1001930578e67407 | [
"Apache-2.0"
] | 1 | 2022-02-11T03:48:33.000Z | 2022-02-11T03:48:33.000Z | tornado/testing.py | yjkyz/tornado | d53f72fe6716e2c6956695ec1001930578e67407 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Support classes for automated testing.
* `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase
with additional support for testing asynchronous (`.IOLoop` based) code.
* `ExpectLog` and `LogTrapTestCase`: Make test logs less spammy.
* `main()`: A simple test runner (wra... | 37.493113 | 107 | 0.637472 |
7738156267e2fb9e5ec1654f36f4f55408e0e63b | 5,679 | py | Python | examples/truncsets.py | cicada-mpc/cicada-mpc | 3b4a1e6b950e90e43e56d9c0f7d11e639f462d81 | [
"Apache-2.0"
] | 5 | 2021-06-30T17:31:56.000Z | 2022-03-21T18:59:57.000Z | examples/truncsets.py | cicada-mpc/cicada-mpc | 3b4a1e6b950e90e43e56d9c0f7d11e639f462d81 | [
"Apache-2.0"
] | 36 | 2021-07-06T16:38:32.000Z | 2022-03-28T03:14:20.000Z | examples/truncsets.py | cicada-mpc/cicada-mpc | 3b4a1e6b950e90e43e56d9c0f7d11e639f462d81 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS,
# the U.S. Government retains certain rights in this software.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance ... | 41.452555 | 136 | 0.598345 |
7e814ae1065867a739b4253287534db4fd3629a7 | 11,801 | py | Python | tests/tx_test.py | GRS-Community/pycoin | 4a9b9722c91e2831519ddf9675fe8c70246432b7 | [
"MIT"
] | 5 | 2017-12-15T13:40:50.000Z | 2021-12-18T13:18:54.000Z | tests/tx_test.py | GRS-Community/pycoin | 4a9b9722c91e2831519ddf9675fe8c70246432b7 | [
"MIT"
] | 1 | 2018-08-06T03:48:14.000Z | 2018-09-03T03:01:03.000Z | tests/tx_test.py | GRS-Community/pycoin | 4a9b9722c91e2831519ddf9675fe8c70246432b7 | [
"MIT"
] | 6 | 2018-08-24T18:49:47.000Z | 2021-01-19T10:04:08.000Z | import binascii
import unittest
from pycoin.serialize import b2h, h2b_rev
from pycoin.tx.Tx import Tx
TX_E1A18B843FC420734DEEB68FF6DF041A2585E1A0D7DBF3B82AAB98291A6D9952_HEX = (
"0100000001a8f57056b016d7d243fc0fc2a73f9146e7e4c7766ec6033b5ac4cb89c64e"
"19d0000000008a4730440220251acb534ba1b8a269260ad3fa80e075cd... | 56.735577 | 108 | 0.708669 |
ac71b8ce4a1073f64368cfa634cda5c719421bc7 | 2,140 | py | Python | flask/signals.py | prasenjit/ffbird | 057873a500738383612ed21e93348dfb9ee19af2 | [
"Apache-2.0"
] | 1 | 2016-03-24T22:33:59.000Z | 2016-03-24T22:33:59.000Z | flask/signals.py | prasenjit/ffbird | 057873a500738383612ed21e93348dfb9ee19af2 | [
"Apache-2.0"
] | null | null | null | flask/signals.py | prasenjit/ffbird | 057873a500738383612ed21e93348dfb9ee19af2 | [
"Apache-2.0"
] | 1 | 2020-10-01T16:36:12.000Z | 2020-10-01T16:36:12.000Z | # -*- coding: utf-8 -*-
"""
flask.signals
~~~~~~~~~~~~~
Implements signals based on blinker if available, otherwise
falls silently back to a noop
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
signals_available = False
try:
from blinker import Name... | 38.214286 | 71 | 0.68271 |
64108fb64d66b63598ce58eddfb7c30935ee4c97 | 11,859 | py | Python | tests/legacy_unittest/database/test_db_db.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 52 | 2018-08-24T02:28:43.000Z | 2021-07-06T04:44:22.000Z | tests/legacy_unittest/database/test_db_db.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 62 | 2018-09-17T06:59:16.000Z | 2021-12-15T06:02:51.000Z | tests/legacy_unittest/database/test_db_db.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 35 | 2018-09-14T02:42:10.000Z | 2022-02-05T10:34:46.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.612613 | 107 | 0.656295 |
3607aa7d70a572b3800e8c0c5b62cd6f1936a230 | 818 | py | Python | client/tcp/config.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | client/tcp/config.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | client/tcp/config.py | maxschwe/PiCar | 81d83cd0f8a32d4c0faf8c36a13e09da732244d3 | [
"MIT"
] | null | null | null | import os
import logging
class Config:
# ==================================================================
# SERVER configuration
# ==================================================================
SERVER = "192.168.178.75" # SERVER = "127.0.0.1"
PORT = 4000, 10
DELAY_RECONNECTING = 3
... | 29.214286 | 72 | 0.419315 |
0e859be456255546e117081ec4f5e0440976f68a | 251 | py | Python | python/pycomposer/pycomposer/__init__.py | zarzen/split-annotations | 6a8fd56eb4a39c7603634e574dce26cbdd57e162 | [
"BSD-3-Clause"
] | 53 | 2019-08-13T00:59:29.000Z | 2022-03-21T21:40:05.000Z | python/pycomposer/pycomposer/__init__.py | zarzen/split-annotations | 6a8fd56eb4a39c7603634e574dce26cbdd57e162 | [
"BSD-3-Clause"
] | 2 | 2019-10-30T17:39:05.000Z | 2020-12-24T12:58:57.000Z | python/pycomposer/pycomposer/__init__.py | zarzen/split-annotations | 6a8fd56eb4a39c7603634e574dce26cbdd57e162 | [
"BSD-3-Clause"
] | 5 | 2019-08-13T17:33:32.000Z | 2022-03-02T20:17:21.000Z |
from .composer import sa, evaluate, mut
from .split_types import SplitType, Broadcast
from .vm.driver import STOP_ITERATION
# Import the generics.
from .split_types import A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
| 31.375 | 101 | 0.661355 |
0cc5a7bf38b26f4313ea4085e6da39c5cee00664 | 6,340 | py | Python | game/class_/stage.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | 1 | 2018-12-11T23:42:57.000Z | 2018-12-11T23:42:57.000Z | game/class_/stage.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | null | null | null | game/class_/stage.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | null | null | null | from threading import Thread
from pygame.locals import QUIT, MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION, KEYDOWN
import pygame as pg
import os
from . import screen
WHITE = (255, 255, 255) # unbeaten
GRAY = (211, 211, 211) # beaten
TEAL = (0, 128, 128) # peaceful
YELLOW = (128, 128, 0)
BLACK = (0, 0, 0)
STAGE_SI... | 29.21659 | 113 | 0.56183 |
87bd2161c3759441a2b11704d56252e7e934b39b | 177 | py | Python | mmaction/core/__init__.py | sjtuytc/mmaction2 | 7c2fba5a15ca08b81b4581e453ef6b381e4b0a52 | [
"Apache-2.0"
] | 3 | 2020-11-04T13:26:28.000Z | 2020-11-17T07:40:34.000Z | mmaction/core/__init__.py | sjtuytc/mmaction2 | 7c2fba5a15ca08b81b4581e453ef6b381e4b0a52 | [
"Apache-2.0"
] | null | null | null | mmaction/core/__init__.py | sjtuytc/mmaction2 | 7c2fba5a15ca08b81b4581e453ef6b381e4b0a52 | [
"Apache-2.0"
] | 1 | 2020-11-06T07:02:55.000Z | 2020-11-06T07:02:55.000Z | from .dist_utils import * # noqa: F401, F403
from .evaluation import * # noqa: F401, F403
from .fp16 import * # noqa: F401, F403
from .optimizer import * # noqa: F401, F403
| 35.4 | 45 | 0.683616 |
e5f6954c3b57cf5889ed3101a0fe308477b4fd85 | 3,514 | py | Python | src/exttr/core.py | altendky/exttr | 60aa5d6e9f04631b8e86552620f2d9cd2a0a3a04 | [
"MIT"
] | 1 | 2019-05-03T18:36:00.000Z | 2019-05-03T18:36:00.000Z | src/exttr/core.py | altendky/exttr | 60aa5d6e9f04631b8e86552620f2d9cd2a0a3a04 | [
"MIT"
] | 10 | 2019-02-27T19:38:04.000Z | 2019-09-01T15:59:09.000Z | src/exttr/core.py | altendky/exttr | 60aa5d6e9f04631b8e86552620f2d9cd2a0a3a04 | [
"MIT"
] | 2 | 2019-04-24T12:19:47.000Z | 2019-05-03T18:36:04.000Z | import collections
import functools
import itertools
import uuid
import attr
import exttr._utility
attr_ib_keywords = exttr._utility.get_parameter_names(attr.ib)
metadata_name = 'exttr'
class UnknownKeywordError(Exception):
pass
class KeywordCollisionError(Exception):
pass
class AttrsCollisionError(Ex... | 25.280576 | 73 | 0.549516 |
2ccaf3b1e614236ab4e765321b502eac766e36d8 | 3,101 | py | Python | fedot/core/dag/graph.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/dag/graph.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/dag/graph.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from copy import deepcopy
from typing import List, Optional, TYPE_CHECKING, Union
from uuid import uuid4
from fedot.core.dag.graph_operator import GraphOperator
from fedot.core.visualisation.graph_viz import GraphVisualiser
if TYPE_CHECKING:
from fedot.core.dag.graph_node import GraphNode
class Graph:
"""
... | 26.965217 | 86 | 0.617543 |
15c74afb25f6da3d8026b02388bee3eb3495881b | 11,796 | py | Python | tensorboard/plugins/custom_scalar/custom_scalars_plugin_test.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | 7 | 2020-04-04T16:25:42.000Z | 2021-10-02T18:26:56.000Z | tensorboard/plugins/custom_scalar/custom_scalars_plugin_test.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | 1 | 2021-09-02T14:57:13.000Z | 2021-09-02T14:57:13.000Z | tensorboard/plugins/custom_scalar/custom_scalars_plugin_test.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | 4 | 2020-08-08T18:08:44.000Z | 2021-05-13T05:22:40.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 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
#
# Un... | 39.32 | 84 | 0.501017 |
6ba2161b9bf2487a29b44ed5ff791e6ea3de952e | 4,557 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleMUD/Ui_PHoleMUD.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | 2 | 2020-08-28T14:54:55.000Z | 2021-03-13T19:34:45.000Z | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleMUD/Ui_PHoleMUD.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleMUD/Ui_PHoleMUD.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File generated according to PHoleMUD.ui
# WARNING! All changes made in this file will be lost!
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide2.QtCore import *
from P... | 37.975 | 88 | 0.692341 |
f5f5e6a6f7ec250d676e5fa65b38efd1b9393d1f | 14,309 | py | Python | benchmarks/ltl_timed_transition_system/dynamic_fischer/f3/dynamic_fischer_0026.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/ltl_timed_transition_system/dynamic_fischer/f3/dynamic_fischer_0026.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/ltl_timed_transition_system/dynamic_fischer/f3/dynamic_fischer_0026.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from collections import Iterable
from itertools import chain
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_make_or, ms... | 40.535411 | 79 | 0.566077 |
683b63fe56064ede009369a9af5296ad1f5f1798 | 13,331 | py | Python | controller/api/serializers.py | rochacon/deis | 6839b592a1ff9c468a8c91f5f2b6817aebd5ae86 | [
"Apache-2.0"
] | 1 | 2019-11-18T19:56:21.000Z | 2019-11-18T19:56:21.000Z | controller/api/serializers.py | rochacon/deis | 6839b592a1ff9c468a8c91f5f2b6817aebd5ae86 | [
"Apache-2.0"
] | null | null | null | controller/api/serializers.py | rochacon/deis | 6839b592a1ff9c468a8c91f5f2b6817aebd5ae86 | [
"Apache-2.0"
] | null | null | null | """
Classes to serialize the RESTful representation of Deis API models.
"""
from __future__ import unicode_literals
import json
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.utils import timezone
from rest_framework import serializers
from rest_framework.validator... | 39.557864 | 98 | 0.652164 |
a51f126876a2e5ae1c72e44b18ef75383b05b813 | 7,868 | py | Python | pyscf/pbc/df/df_ao2mo.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-05-02T19:55:30.000Z | 2018-05-02T19:55:30.000Z | pyscf/pbc/df/df_ao2mo.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | pyscf/pbc/df/df_ao2mo.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import numpy
from pyscf import lib
from pyscf import ao2mo
from pyscf.ao2mo import _ao2mo
from pyscf.ao2mo.incore import iden_coeffs, _conc_mos
from pyscf.pbc.df.df_jk import zdotNN, zdotCN, zdotNC
from pyscf.pbc.df.fft_ao2mo import _format_kpts
fro... | 38.568627 | 89 | 0.579944 |
b620c5e22ca4d96d36dfe289e863959f2ee7fcd0 | 32,517 | py | Python | cinder/backup/chunkeddriver.py | wzhou007/stx-cinder | bdc6cc8ae5466f218de5af835e9ec040d537c541 | [
"Apache-2.0"
] | null | null | null | cinder/backup/chunkeddriver.py | wzhou007/stx-cinder | bdc6cc8ae5466f218de5af835e9ec040d537c541 | [
"Apache-2.0"
] | null | null | null | cinder/backup/chunkeddriver.py | wzhou007/stx-cinder | bdc6cc8ae5466f218de5af835e9ec040d537c541 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2014 TrilioData, Inc
# Copyright (c) 2015 EMC Corporation
# Copyright (C) 2015 Kevin Fox <kevin@efox.cc>
# Copyright (C) 2015 Tom Barron <tpb@dyncloud.net>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "Li... | 43.64698 | 84 | 0.584371 |
147a6bf0bb56cdd6ac097cbced23164597f83d22 | 2,745 | py | Python | web.py | go-sari/sari-web | dbdaac15c05851aba19465b02b3240b807704bbb | [
"Apache-2.0"
] | null | null | null | web.py | go-sari/sari-web | dbdaac15c05851aba19465b02b3240b807704bbb | [
"Apache-2.0"
] | 1 | 2021-05-30T23:35:23.000Z | 2021-05-30T23:35:23.000Z | web.py | go-sari/sari-web | dbdaac15c05851aba19465b02b3240b807704bbb | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint, session, render_template, url_for, request
from saml2 import entity
from common import (
SariConfig,
get_boto3_session,
saml_client_for,
saml_disable_response_verify,
saml_enum_account_aliases,
saml_enum_aws_roles,
sts_assume_role_with_saml,
)
try:
# noinsp... | 35.649351 | 108 | 0.714026 |
6d58f7c5436191959abdd0432ef4fb2518633e07 | 1,196 | py | Python | Module_system 1.171/process_postfx.py | Sea-Monster/WarbandModuleSystem | 66c67147692707b85c457db10a112627118733a5 | [
"MIT"
] | 14 | 2018-09-20T23:01:27.000Z | 2021-05-25T11:05:09.000Z | Module_system 1.171/process_postfx.py | Sea-Monster/WarbandModuleSystem | 66c67147692707b85c457db10a112627118733a5 | [
"MIT"
] | 44 | 2018-09-15T03:05:50.000Z | 2022-03-22T02:46:24.000Z | Module_system 1.171/process_postfx.py | Sea-Monster/WarbandModuleSystem | 66c67147692707b85c457db10a112627118733a5 | [
"MIT"
] | 13 | 2018-10-02T11:45:24.000Z | 2021-08-22T18:41:44.000Z | from header_common import *
from module_info import *
from module_postfx import *
def write_python_header(postfx_params_list):
file = open("./ID_postfx_params.py","w")
for i_postfx_param in xrange(len(postfx_params_list)):
file.write("pfx_%s = %d\n"%(postfx_params_list[i_postfx_param][0],i_postfx_param))
fil... | 41.241379 | 103 | 0.724916 |
78400bf80e36b79368d93c3579f3bfff6961b30a | 18,464 | py | Python | src/models/find_hyperparameters_svi_methods.py | beamlab-hsph/coverage_quantification | 901b4177395b220f97ae073fe174d185aca7f8bc | [
"Apache-2.0"
] | 1 | 2021-12-16T07:04:42.000Z | 2021-12-16T07:04:42.000Z | src/models/find_hyperparameters_svi_methods.py | valeman/coverage_quantification | 901b4177395b220f97ae073fe174d185aca7f8bc | [
"Apache-2.0"
] | null | null | null | src/models/find_hyperparameters_svi_methods.py | valeman/coverage_quantification | 901b4177395b220f97ae073fe174d185aca7f8bc | [
"Apache-2.0"
] | 1 | 2021-12-16T07:04:07.000Z | 2021-12-16T07:04:07.000Z |
import tensorflow.compat.v2 as tf
import tensorflow_datasets as tfds
import tensorflow_probability as tfp
import numpy as np
import os
from sklearn.preprocessing import StandardScaler
import h5py
import kerastuner as kt
from datetime import datetime
import argparse
from data_utils import *
keras = tf.keras
tfd = tf... | 41.773756 | 180 | 0.676776 |
8b21c4ffc2dc6bd6647b070b7a3b015b6daa7ca8 | 819 | py | Python | devops-console/apps/designs/migrations/0004_auto_20190916_1544.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | 4 | 2019-12-06T06:19:33.000Z | 2021-12-23T13:05:06.000Z | devops-console/apps/designs/migrations/0004_auto_20190916_1544.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | 8 | 2020-03-15T03:40:38.000Z | 2022-03-12T00:50:27.000Z | devops-console/apps/designs/migrations/0004_auto_20190916_1544.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.5 on 2019-09-16 07:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('designs', '0003_auto_20190916_1130'),
]
operations = [
migrations.AlterField(
model_name='inter... | 32.76 | 177 | 0.67033 |
2cbe97e4fda922c539bb6ef2b3fa6ca4a191e4f1 | 1,235 | py | Python | src/contrib/permission.py | kcwu/katago-server | c38d70f53223f5b883d35184ecfac2379cb9d38e | [
"MIT"
] | 27 | 2020-05-03T11:01:27.000Z | 2022-03-17T05:33:10.000Z | src/contrib/permission.py | kcwu/katago-server | c38d70f53223f5b883d35184ecfac2379cb9d38e | [
"MIT"
] | 54 | 2020-05-09T01:18:41.000Z | 2022-01-22T10:31:15.000Z | src/contrib/permission.py | kcwu/katago-server | c38d70f53223f5b883d35184ecfac2379cb9d38e | [
"MIT"
] | 9 | 2020-09-29T11:31:32.000Z | 2022-03-09T01:37:50.000Z | from allauth.account.models import EmailAddress
from django.conf import settings
from rest_framework.permissions import SAFE_METHODS, BasePermission
class ReadOnly(BasePermission):
def has_permission(self, request, view):
return request.method in SAFE_METHODS
class ReadOrAuthCreateOnly(BasePermission):
... | 38.59375 | 111 | 0.727935 |
da062bc67e8acb564dd2337db4c98f25545875d2 | 29,638 | py | Python | core/translate.py | zeusintuivo/SublimeText3-GoogleT | 09a5dee056f9fbd789f199cf5b9d02fc674ed6c1 | [
"MIT"
] | null | null | null | core/translate.py | zeusintuivo/SublimeText3-GoogleT | 09a5dee056f9fbd789f199cf5b9d02fc674ed6c1 | [
"MIT"
] | null | null | null | core/translate.py | zeusintuivo/SublimeText3-GoogleT | 09a5dee056f9fbd789f199cf5b9d02fc674ed6c1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding:utf-8
# https://github.com/zeusintuivo/SublimeText3-GoogleT
__version__ = "1.0.0"
import sublime
try:
# Python 3 assumption
from urllib.request import urlopen, build_opener, Request
from urllib.parse import urlencode, quote, unquote
except ImportError:
# Python 2 assumption... | 45.526882 | 132 | 0.528072 |
2e79fe5f8a5d389300f6630bccfaa2d6262d5553 | 437 | py | Python | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,435 | 2015-01-07T05:32:51.000Z | 2022-03-25T19:39:34.000Z | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,158 | 2015-01-04T18:08:42.000Z | 2022-03-24T14:34:57.000Z | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 832 | 2015-01-05T09:20:21.000Z | 2022-03-24T19:22:19.000Z | import os
# pylint: disable=import-error
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_driver(Provider.IKOULA)
conn =... | 24.277778 | 69 | 0.803204 |
1a3dbd68066a72384589ac24579e0540b5484a6e | 45,883 | py | Python | python/paddle/vision/transforms/transforms.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/vision/transforms/transforms.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/vision/transforms/transforms.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 34.369288 | 114 | 0.587124 |
b2b669eef745e198b918a4a4229024633a13600a | 95 | py | Python | recyclebin/apps.py | XanderTerbl1/FileUp | ca6221a3d3b106dcbac99f4413e7a4845eac6842 | [
"MIT"
] | 2 | 2020-06-30T08:49:54.000Z | 2020-09-18T13:59:00.000Z | recyclebin/apps.py | XanderTerbl1/FileUp | ca6221a3d3b106dcbac99f4413e7a4845eac6842 | [
"MIT"
] | 11 | 2019-12-04T23:45:34.000Z | 2022-02-10T13:22:03.000Z | recyclebin/apps.py | XanderTerbl1/FileUp | ca6221a3d3b106dcbac99f4413e7a4845eac6842 | [
"MIT"
] | 2 | 2020-05-19T06:53:24.000Z | 2020-10-08T20:11:29.000Z | from django.apps import AppConfig
class RecyclebinConfig(AppConfig):
name = 'recyclebin'
| 15.833333 | 34 | 0.768421 |
2d03cd5805850cca3519ef75334047f291049240 | 1,172 | py | Python | bot/exts/backend/logging.py | hugovk/bot | 46d3f877b569a8a6db8a50fbd80ff49c90ba04cf | [
"MIT",
"BSD-3-Clause"
] | 1,003 | 2018-11-17T21:10:01.000Z | 2022-03-31T22:50:39.000Z | bot/exts/backend/logging.py | hugovk/bot | 46d3f877b569a8a6db8a50fbd80ff49c90ba04cf | [
"MIT",
"BSD-3-Clause"
] | 1,474 | 2018-11-17T10:18:14.000Z | 2022-03-31T18:01:39.000Z | bot/exts/backend/logging.py | hugovk/bot | 46d3f877b569a8a6db8a50fbd80ff49c90ba04cf | [
"MIT",
"BSD-3-Clause"
] | 771 | 2018-11-21T08:36:07.000Z | 2022-03-31T14:56:39.000Z | from discord import Embed
from discord.ext.commands import Cog
from bot.bot import Bot
from bot.constants import Channels, DEBUG_MODE
from bot.log import get_logger
from bot.utils import scheduling
log = get_logger(__name__)
class Logging(Cog):
"""Debug logging module."""
def __init__(self, bot: Bot):
... | 27.904762 | 86 | 0.647611 |
18e3264b81bd595d81335ddb577d7885a04fe956 | 13,678 | py | Python | svsim/tool/svsim_qasm.py | yukwangmin/SV-Sim | 1b6b71cb490e7a1eac3d6ebc24777590d48378de | [
"MIT"
] | null | null | null | svsim/tool/svsim_qasm.py | yukwangmin/SV-Sim | 1b6b71cb490e7a1eac3d6ebc24777590d48378de | [
"MIT"
] | null | null | null | svsim/tool/svsim_qasm.py | yukwangmin/SV-Sim | 1b6b71cb490e7a1eac3d6ebc24777590d48378de | [
"MIT"
] | null | null | null | # ---------------------------------------------------------------------------
# SV-Sim: Density-Matrix Quantum Circuit Simulation Environement
# ---------------------------------------------------------------------------
# Ang Li, Senior Computer Scientist
# Pacific Northwest National Laboratory(PNNL), U.S.
# Homepage:... | 37.473973 | 146 | 0.501608 |
7dedf5a52db7af2a6c5e4b1ee3f502aec7c345ae | 7,550 | py | Python | slugs/tests/integration/test_slugs.py | OpenKMIP/SLUGS | 807b653442d0c4ba2a00b6e7dee5c7b988001a67 | [
"Apache-2.0"
] | 3 | 2019-01-26T06:31:22.000Z | 2019-05-07T06:21:17.000Z | slugs/tests/integration/test_slugs.py | OpenKMIP/SLUGS | 807b653442d0c4ba2a00b6e7dee5c7b988001a67 | [
"Apache-2.0"
] | 14 | 2018-03-14T14:36:49.000Z | 2019-01-25T22:23:39.000Z | slugs/tests/integration/test_slugs.py | OpenKMIP/SLUGS | 807b653442d0c4ba2a00b6e7dee5c7b988001a67 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | 32.683983 | 79 | 0.636424 |
981ccb922d0b9e710a140b5259908c1e55c67ac4 | 2,430 | py | Python | python/oneflow/test/modules/test_argsort.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | 1 | 2021-09-13T02:34:53.000Z | 2021-09-13T02:34:53.000Z | python/oneflow/test/modules/test_argsort.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_argsort.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | 1 | 2021-01-17T03:34:39.000Z | 2021-01-17T03:34:39.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 35.735294 | 85 | 0.709053 |
d6788e3f4bc808414fadc8cd434abfb5b2b4000c | 3,901 | py | Python | optimizer/util/util.py | efuller-gov/dm3k | 6cd95d647d1dfe188d68601d06ae9c92d2e1acf4 | [
"CC-BY-4.0",
"Apache-2.0",
"CC0-1.0"
] | 2 | 2021-11-29T14:46:43.000Z | 2021-12-29T02:22:34.000Z | optimizer/util/util.py | efuller-gov/dm3k | 6cd95d647d1dfe188d68601d06ae9c92d2e1acf4 | [
"CC-BY-4.0",
"Apache-2.0",
"CC0-1.0"
] | null | null | null | optimizer/util/util.py | efuller-gov/dm3k | 6cd95d647d1dfe188d68601d06ae9c92d2e1acf4 | [
"CC-BY-4.0",
"Apache-2.0",
"CC0-1.0"
] | 1 | 2021-10-03T23:20:52.000Z | 2021-10-03T23:20:52.000Z | """
Contains utility functions used by all of optimizer
"""
import logging
import os
import time
from datetime import datetime
import psutil
log = logging.getLogger(__name__)
convertToMB = float(2 ** 20)
process = psutil.Process()
FULL_HOUSE_FULL_TRACE_KEYS = [
"allocated",
"activity",
"budget_used",
... | 29.11194 | 138 | 0.672648 |
42a8e3a7dc3d90d963a200048be3c8e39bf8b86f | 1,250 | py | Python | examples/pybullet/gym/pybullet_envs/deep_mimic/env/motion_capture_data.py | joonkyu4220/bullet3 | a5fb6c158f6cb744f476d7f1a5fbf6bf611cd9e1 | [
"Zlib"
] | null | null | null | examples/pybullet/gym/pybullet_envs/deep_mimic/env/motion_capture_data.py | joonkyu4220/bullet3 | a5fb6c158f6cb744f476d7f1a5fbf6bf611cd9e1 | [
"Zlib"
] | null | null | null | examples/pybullet/gym/pybullet_envs/deep_mimic/env/motion_capture_data.py | joonkyu4220/bullet3 | a5fb6c158f6cb744f476d7f1a5fbf6bf611cd9e1 | [
"Zlib"
] | null | null | null | import json
import math
class MotionCaptureData(object):
def __init__(self):
self.Reset()
def Reset(self):
self._motion_data = []
def Load(self, path):
with open(path, 'r') as f:
self._motion_data = json.load(f)
def NumFrames(self):
return len(self._motion_data['Frames'])
def KeyF... | 26.041667 | 73 | 0.6696 |
fbd838b9e47c80cc6171996f020cf0b334c7d92c | 565 | py | Python | homeassistant/components/daikin/const.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/daikin/const.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/daikin/const.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Constants for Daikin."""
DOMAIN = "daikin"
ATTR_TARGET_TEMPERATURE = "target_temperature"
ATTR_INSIDE_TEMPERATURE = "inside_temperature"
ATTR_OUTSIDE_TEMPERATURE = "outside_temperature"
ATTR_TOTAL_POWER = "total_power"
ATTR_COOL_ENERGY = "cool_energy"
ATTR_HEAT_ENERGY = "heat_energy"
ATTR_HUMIDITY = "humidity"
ATTR... | 23.541667 | 50 | 0.79646 |
aaeffd73800c8e3c6935b5b0dfe6b0a39d856647 | 27,592 | py | Python | src/transformers/models/bertweet/tokenization_bertweet.py | theainerd/transformers | f7328de46dbeda4992a093a0501932bf0fc7b76f | [
"Apache-2.0"
] | 34 | 2021-07-05T02:44:31.000Z | 2022-03-28T14:39:57.000Z | src/transformers/models/bertweet/tokenization_bertweet.py | theainerd/transformers | f7328de46dbeda4992a093a0501932bf0fc7b76f | [
"Apache-2.0"
] | 3 | 2021-07-22T15:49:44.000Z | 2022-03-19T08:46:27.000Z | src/transformers/models/bertweet/tokenization_bertweet.py | theainerd/transformers | f7328de46dbeda4992a093a0501932bf0fc7b76f | [
"Apache-2.0"
] | 6 | 2021-07-05T02:44:32.000Z | 2022-02-14T10:10:13.000Z | # coding=utf-8
# Copyright (c) 2020, VinAI Research and the HuggingFace Inc. team.
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# 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 th... | 36.020888 | 133 | 0.55951 |
d47f54754bc960b7211c6944cf55ad6c39a012a8 | 3,211 | py | Python | scripts/create_lmdb.py | sagarjoglekar/ExplainingUrbanEmotions | 3b725b175435309cde3685b5b4af4c68ad867964 | [
"MIT"
] | 2 | 2018-04-24T14:26:46.000Z | 2021-02-02T08:16:04.000Z | scripts/create_lmdb.py | sagarjoglekar/ExplainingUrbanEmotions | 3b725b175435309cde3685b5b4af4c68ad867964 | [
"MIT"
] | null | null | null | scripts/create_lmdb.py | sagarjoglekar/ExplainingUrbanEmotions | 3b725b175435309cde3685b5b4af4c68ad867964 | [
"MIT"
] | null | null | null | '''
Description :This script divides the training images into 2 sets and stores them in lmdb databases for training and
'''
import os
import glob
import random
import numpy as np
import cv2
import caffe
from caffe.proto import caffe_pb2
import lmdb
#Size of images
IMAGE_WIDTH = 227
IMAGE_HEIGHT = 227
def tran... | 30.580952 | 120 | 0.667393 |
30f9cb925f21c49e39502299b66fb2b9ef545f4f | 1,468 | py | Python | Python/design-tic-tac-toe.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2020-10-27T03:22:31.000Z | 2020-10-27T03:22:31.000Z | Python/design-tic-tac-toe.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | null | null | null | Python/design-tic-tac-toe.py | se77enn/LeetCode-Solution | d29ef5358cae592b63952c3d293897a176fb75e1 | [
"MIT"
] | 1 | 2021-03-22T18:58:23.000Z | 2021-03-22T18:58:23.000Z | # Time: O(1), per move.
# Space: O(n^2)
try:
xrange # Python 2
except NameError:
xrange = range # Python 3
class TicTacToe(object):
def __init__(self, n):
"""
Initialize your data structure here.
:type n: int
"""
self.__size = n
self.__rows = [[0... | 28.230769 | 61 | 0.498638 |
d5ae6c0c156638ad6b2f3199fcc2622053b3eaf3 | 8,033 | py | Python | homeassistant/components/mysensors/device.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 1 | 2021-03-12T20:46:40.000Z | 2021-03-12T20:46:40.000Z | homeassistant/components/mysensors/device.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 46 | 2020-12-18T07:15:15.000Z | 2022-03-31T06:04:00.000Z | homeassistant/components/mysensors/device.py | CantankerousBullMoose/core | 2178e27fb4c62271d4872e16838331defed82226 | [
"Apache-2.0"
] | 2 | 2021-03-22T21:42:48.000Z | 2021-04-12T12:26:39.000Z | """Handle MySensors devices."""
from functools import partial
import logging
from typing import Any, Dict, Optional
from mysensors import BaseAsyncGateway, Sensor
from mysensors.sensor import ChildSensor
from homeassistant.const import ATTR_BATTERY_LEVEL, STATE_OFF, STATE_ON
from homeassistant.core import callback
fr... | 33.610879 | 114 | 0.622806 |
e7d1e718c934af9c553471513451bb0b092f4de7 | 6,731 | py | Python | python/pyspark/daemon.py | boyizhang/spark-2.3.2 | 3be504eb086c9f5a9ab857ae41fc037dad36f38d | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 289 | 2018-06-03T15:22:04.000Z | 2021-12-08T14:17:38.000Z | python/pyspark/daemon.py | cfmcgrady/spark-adaptive | 6ad93e786856496c726f172ee409ac90f1dc6f2e | [
"Apache-2.0"
] | 95 | 2016-08-29T09:00:58.000Z | 2020-03-30T11:23:50.000Z | python/pyspark/daemon.py | cfmcgrady/spark-adaptive | 6ad93e786856496c726f172ee409ac90f1dc6f2e | [
"Apache-2.0"
] | 113 | 2018-06-01T01:50:00.000Z | 2021-08-24T15:40:27.000Z | #
# 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"); you may not us... | 34.341837 | 88 | 0.548507 |
f4f36ba0faebfdc15a4b09d0663970496949e0c7 | 8,070 | py | Python | config/settings/production.py | dhavalsavalia/university_dost | ef6c78239dd648542b68b610528e0b9a23a94295 | [
"MIT"
] | null | null | null | config/settings/production.py | dhavalsavalia/university_dost | ef6c78239dd648542b68b610528e0b9a23a94295 | [
"MIT"
] | null | null | null | config/settings/production.py | dhavalsavalia/university_dost | ef6c78239dd648542b68b610528e0b9a23a94295 | [
"MIT"
] | 1 | 2020-06-05T09:29:09.000Z | 2020-06-05T09:29:09.000Z | import logging
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
from .base import * # noqa
from .base import env
# GENERAL
# -------------------------------------... | 41.597938 | 91 | 0.627138 |
b3d230e85af6dae941f333ca20af640328777574 | 530 | py | Python | src/test/send_point.py | yinzixuan126/rviz | c228cf5e03ef44c7581f449a34845722fe10f9a3 | [
"MIT"
] | 9 | 2017-12-17T07:43:15.000Z | 2021-10-10T15:03:39.000Z | melodic/src/rviz/src/test/send_point.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | null | null | null | melodic/src/rviz/src/test/send_point.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | 6 | 2016-01-27T03:40:58.000Z | 2021-06-15T08:12:14.000Z | #!/usr/bin/env python
import roslib; roslib.load_manifest('rviz')
from geometry_msgs.msg import PointStamped
import math
import rospy
topic = 'test_point'
publisher = rospy.Publisher(topic, PointStamped)
rospy.init_node('send_point')
t = 0
while not rospy.is_shutdown():
p = PointStamped()
p.header.frame_id =... | 17.666667 | 48 | 0.660377 |
00e1af432db3abc6bde4a12139f65d7a1a7b22e0 | 11,635 | py | Python | src/spaceone/inventory/manager/collector_manager.py | jihyungSong/plugin-azure-vm-inven-collector | 9ce42c67ea10aedeffdc457657de7c13f1b31617 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/collector_manager.py | jihyungSong/plugin-azure-vm-inven-collector | 9ce42c67ea10aedeffdc457657de7c13f1b31617 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/collector_manager.py | jihyungSong/plugin-azure-vm-inven-collector | 9ce42c67ea10aedeffdc457657de7c13f1b31617 | [
"Apache-2.0"
] | null | null | null | __all__ = ['CollectorManager']
import logging
from spaceone.core.manager import BaseManager
from spaceone.inventory.connector import AzureVMConnector
from spaceone.inventory.manager.azure import AzureDiskManager, AzureLoadBalancerManager, \
AzureNetworkSecurityGroupManager, AzureNICManager, AzureResourceGroupManag... | 45.272374 | 265 | 0.657585 |
3a1cc2afac52ad9d8694062b605bdd286ef3411a | 20,725 | py | Python | lib/rucio/core/lock.py | maatthias/rucio-old | 8600cdc0838886a2f076f2f88850770877fc505f | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/lock.py | maatthias/rucio-old | 8600cdc0838886a2f076f2f88850770877fc505f | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/lock.py | maatthias/rucio-old | 8600cdc0838886a2f076f2f88850770877fc505f | [
"Apache-2.0"
] | null | null | null | # Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Martin Barisits, <m... | 46.88914 | 165 | 0.614234 |
1c6b071f4f198e20aa26962ed66a10164b33c860 | 4,220 | py | Python | simpleconsent/settings.py | rhoerbe/simpleconsent | 5c75bb3794d2722853aa8f5963a5c013e1149074 | [
"MIT"
] | 1 | 2019-08-19T17:56:57.000Z | 2019-08-19T17:56:57.000Z | simpleconsent/settings.py | rhoerbe/simpleconsent | 5c75bb3794d2722853aa8f5963a5c013e1149074 | [
"MIT"
] | null | null | null | simpleconsent/settings.py | rhoerbe/simpleconsent | 5c75bb3794d2722853aa8f5963a5c013e1149074 | [
"MIT"
] | 1 | 2019-08-19T17:57:14.000Z | 2019-08-19T17:57:14.000Z | # this file contains secret keys. Protect file or insert values from environment
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '6... | 33.76 | 112 | 0.7 |
a02bb2a26ba4f0182baa47c6ee53f5bd76088c06 | 1,663 | py | Python | socket_sender.py | mark-belbin/underwater-apriltags | f8f720f232621c274e26e2f22fedb38c0c1424ac | [
"MIT"
] | 1 | 2020-11-01T13:39:42.000Z | 2020-11-01T13:39:42.000Z | socket_sender.py | mark-belbin/underwater-apriltags | f8f720f232621c274e26e2f22fedb38c0c1424ac | [
"MIT"
] | null | null | null | socket_sender.py | mark-belbin/underwater-apriltags | f8f720f232621c274e26e2f22fedb38c0c1424ac | [
"MIT"
] | null | null | null | ## Socket to send extimated pos to srauv_main.py's internal socket
import socket
import time
import json
socket_connected = False
srauv_address = ("localhost", 7003)
last_tx_time_s = 0
socket_send_interval_s = 0.200
msg_num = -1
msg = {
"source" : "tag_detect",
"msg_num" : msg_num,
"msg_type" : "position",... | 31.377358 | 85 | 0.644017 |
cbe6188f62a1338f017af676bc91a4fc6789a55b | 1,439 | py | Python | krmining/utils/create_tree.py | SynitCool/keyar-mining | c41c6696eec5efb10755b874169c87f43117eb38 | [
"MIT"
] | 2 | 2021-12-04T21:02:50.000Z | 2021-12-24T01:23:39.000Z | krmining/utils/create_tree.py | SynitCool/keyar-mining | c41c6696eec5efb10755b874169c87f43117eb38 | [
"MIT"
] | null | null | null | krmining/utils/create_tree.py | SynitCool/keyar-mining | c41c6696eec5efb10755b874169c87f43117eb38 | [
"MIT"
] | null | null | null | from ..utils import tree
import itertools
def compressing_itemset_tree(root, endswith):
"""
compressing itemset with tree
Parameters
----------
root : tree.Node
tree that has been fulled by itemset.
for example :
apple
// \\
bana... | 19.712329 | 76 | 0.461432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.