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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9a58d83a6ec4ea9586ecb0fde6f29b7549d5026f | 13,411 | py | Python | asreview/webapp/utils/project.py | asrodwin/asreview | 28f2a4f93eed5b5ab1759a461650032c9dd471c9 | [
"Apache-2.0"
] | null | null | null | asreview/webapp/utils/project.py | asrodwin/asreview | 28f2a4f93eed5b5ab1759a461650032c9dd471c9 | [
"Apache-2.0"
] | null | null | null | asreview/webapp/utils/project.py | asrodwin/asreview | 28f2a4f93eed5b5ab1759a461650032c9dd471c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 The ASReview 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 appl... | 29.474725 | 79 | 0.664455 |
17f536cd6dd34b3ed2823cd59d1d1785c80642da | 2,056 | py | Python | plain_json_logging/__init__.py | paclearner/plain-json-logging | 9dffc54942987a05016ce1150cdd03c1bf5bf5a4 | [
"Apache-2.0"
] | null | null | null | plain_json_logging/__init__.py | paclearner/plain-json-logging | 9dffc54942987a05016ce1150cdd03c1bf5bf5a4 | [
"Apache-2.0"
] | null | null | null | plain_json_logging/__init__.py | paclearner/plain-json-logging | 9dffc54942987a05016ce1150cdd03c1bf5bf5a4 | [
"Apache-2.0"
] | null | null | null | import collections
import datetime
import json
import pytz
import sys
class PlainJsonLogging:
def __init__(self,
file=sys.stderr,
strftime='%Y-%m-%dT%H:%M:%S.%f',
timezone=None,
timedelta=0,
timestampname='timestamp',
messagename='message',
levelname='level',
leveli... | 29.797101 | 80 | 0.571498 |
966db5cc27a3c232b2b69f2a8be897b118ebb946 | 8,924 | py | Python | NodeGraphQt/base/commands.py | mmohrhard/NodeGraphQt | b76bf3807824b1f6077c5dcbe97add532b14f5ec | [
"MIT"
] | 2 | 2020-12-01T03:35:24.000Z | 2021-03-06T01:50:00.000Z | NodeGraphQt/base/commands.py | mmohrhard/NodeGraphQt | b76bf3807824b1f6077c5dcbe97add532b14f5ec | [
"MIT"
] | null | null | null | NodeGraphQt/base/commands.py | mmohrhard/NodeGraphQt | b76bf3807824b1f6077c5dcbe97add532b14f5ec | [
"MIT"
] | 1 | 2020-03-25T06:30:19.000Z | 2020-03-25T06:30:19.000Z | #!/usr/bin/python
from NodeGraphQt import QtWidgets
from NodeGraphQt.constants import IN_PORT, OUT_PORT
class PropertyChangedCmd(QtWidgets.QUndoCommand):
"""
Node property changed command.
Args:
node (NodeGraphQt.NodeObject): node.
name (str): node property name.
value (object): ... | 30.878893 | 76 | 0.616876 |
1e8cb8f61c1dafd8dc1cffe2476f017c178a591d | 2,279 | py | Python | yamtbx/dataproc/xds/command_line/xscale_component_analysis.py | harumome/kamo | 060e6fbd9c5a30f86065cec7807ad3449027607e | [
"BSD-3-Clause"
] | null | null | null | yamtbx/dataproc/xds/command_line/xscale_component_analysis.py | harumome/kamo | 060e6fbd9c5a30f86065cec7807ad3449027607e | [
"BSD-3-Clause"
] | null | null | null | yamtbx/dataproc/xds/command_line/xscale_component_analysis.py | harumome/kamo | 060e6fbd9c5a30f86065cec7807ad3449027607e | [
"BSD-3-Clause"
] | null | null | null | """
(c) RIKEN 2015. All rights reserved.
Author: Keitaro Yamashita
This software is released under the new BSD License; see LICENSE.
"""
import os
from yamtbx.dataproc.xds import get_xdsinp_keyword
from yamtbx.dataproc.xds import xds_ascii
from yamtbx.dataproc.xds.command_line.eval_resolution_hkl_files import eval_re... | 32.098592 | 108 | 0.661694 |
6ae3abccde25d932fe9434fba9f8674d1ffe7a22 | 1,720 | py | Python | pipeline/save_image.py | tobias-fyi/detectron2-pipeline | b710bc8531d084e9d163856203b78c89c6228d26 | [
"MIT"
] | 3 | 2020-02-06T16:35:11.000Z | 2020-02-29T09:31:55.000Z | pipeline/save_image.py | tobias-fyi/detectron2-pipeline | b710bc8531d084e9d163856203b78c89c6228d26 | [
"MIT"
] | 82 | 2020-01-29T23:48:32.000Z | 2021-09-08T02:09:30.000Z | pipeline/save_image.py | tobias-fyi/detectron2-pipeline | b710bc8531d084e9d163856203b78c89c6228d26 | [
"MIT"
] | 10 | 2020-02-20T16:59:19.000Z | 2020-05-28T15:27:13.000Z | import os
import cv2
from pipeline.pipeline import Pipeline
class SaveImage(Pipeline):
"""Pipeline task to save images."""
def __init__(
self, src, path, image_ext="png", jpg_quality=None, png_compression=None
):
self.src = src
self.path = path
self.image_ext = image_ext
... | 30.175439 | 128 | 0.550581 |
c0f4fc4f411bf825c24f3afbc21296462d6427fc | 21,045 | py | Python | dql/models.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | dql/models.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | dql/models.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Data containers """
from decimal import Decimal
from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Union
from dynamo3 import DynamoKey, GlobalIndex, Table, Throughput
from dynamo3.constants import TableStatusType
from dynamo3.fields import BaseIndex
from dynamo3.t... | 33.246445 | 88 | 0.577762 |
9c0f01f158dd3c080de4fcae5809c2798e298868 | 19,645 | py | Python | src/python/infant_eeg/tobii_controller.py | jbonaiuto/infant_eeg | 6368e253f9990dbfd9717f2d862c0b0c46d64f3b | [
"MIT"
] | null | null | null | src/python/infant_eeg/tobii_controller.py | jbonaiuto/infant_eeg | 6368e253f9990dbfd9717f2d862c0b0c46d64f3b | [
"MIT"
] | null | null | null | src/python/infant_eeg/tobii_controller.py | jbonaiuto/infant_eeg | 6368e253f9990dbfd9717f2d862c0b0c46d64f3b | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Tobii controller for PsychoPy
# authors: Hiroyuki Sogo, Horea Christian
# - Tobii SDK 3.0 is required
#
import datetime
import os
from math import degrees, atan2
# from psychopy.tools.monitorunittools import pix2deg
from psychopy.misc import pix2deg
import tobii.sdk.mainloop
import tobii.sdk.tim... | 42.156652 | 146 | 0.541359 |
7445d1435c007692f4d6be8c3156428f478cbe30 | 19,987 | py | Python | source/textInfos/offsets.py | davidacm/nvda | 0a5c7678c8a1854345e1a1398a0c2f4601d814a2 | [
"bzip2-1.0.6"
] | null | null | null | source/textInfos/offsets.py | davidacm/nvda | 0a5c7678c8a1854345e1a1398a0c2f4601d814a2 | [
"bzip2-1.0.6"
] | null | null | null | source/textInfos/offsets.py | davidacm/nvda | 0a5c7678c8a1854345e1a1398a0c2f4601d814a2 | [
"bzip2-1.0.6"
] | null | null | null | #textInfos/offsets.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2006 Michael Curran <mick@kulgan.net>, James Teh <jamie@jantrid.net>
import re
import ctypes
import unicodedata
import NVDAHelper
im... | 37.998099 | 300 | 0.742082 |
3d671df403ae9698accb29e75567425a7410be98 | 180 | py | Python | galleria/admin.py | Awadh-Awadh/AGalleria | a0313497d6b090223af93cd309bc1cd2de92dd02 | [
"MIT"
] | null | null | null | galleria/admin.py | Awadh-Awadh/AGalleria | a0313497d6b090223af93cd309bc1cd2de92dd02 | [
"MIT"
] | null | null | null | galleria/admin.py | Awadh-Awadh/AGalleria | a0313497d6b090223af93cd309bc1cd2de92dd02 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Images, Cat,Location
# Registering models:
admin.site.register(Images)
admin.site.register(Cat)
admin.site.register(Location)
| 22.5 | 40 | 0.811111 |
3d04beba95e133b77468cde129098cd949a20ed8 | 3,347 | py | Python | src/buildstream/_scheduler/jobs/elementjob.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_scheduler/jobs/elementjob.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_scheduler/jobs/elementjob.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Codethink Limited
#
# 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... | 35.989247 | 97 | 0.689573 |
2ffa64ae20dc9f4aa56a00e9e34afd5742b32984 | 51,360 | py | Python | frozen/imagedata.py | ayoy/micropython-waveshare-epd | 58859f5d0158987c84fb20e3920af0962b37de61 | [
"MIT"
] | 45 | 2018-04-02T22:24:47.000Z | 2022-03-27T14:34:06.000Z | frozen_modules/fonts/imagedata.py | lemariva/uPyEINK | 8778239b9dfe32b0d4535db0045a7feb1c131d5c | [
"Apache-2.0"
] | 2 | 2018-09-19T09:39:20.000Z | 2019-05-23T09:56:29.000Z | frozen/imagedata.py | ayoy/micropython-waveshare-epd | 58859f5d0158987c84fb20e3920af0962b37de61 | [
"MIT"
] | 16 | 2018-04-08T21:34:28.000Z | 2022-03-18T16:00:38.000Z | IMAGE_BLACK = [
# 0X00,0X01,0XC8,0X00,0XC8,0X00,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XF... | 81.009464 | 81 | 0.78014 |
115ba37eeaf606f10b292827c05a8820a808f0ab | 42,474 | py | Python | src/tiden/tidenrunner.py | gridgain/tiden | 53a465a3b8b58fe8f26c36c8988b9ced0dbe83ec | [
"Apache-2.0"
] | 14 | 2020-06-05T09:30:42.000Z | 2022-01-19T00:26:48.000Z | src/tiden/tidenrunner.py | gridgain/tiden | 53a465a3b8b58fe8f26c36c8988b9ced0dbe83ec | [
"Apache-2.0"
] | 6 | 2020-06-09T14:05:21.000Z | 2021-03-18T13:55:15.000Z | src/tiden/tidenrunner.py | gridgain/tiden | 53a465a3b8b58fe8f26c36c8988b9ced0dbe83ec | [
"Apache-2.0"
] | 1 | 2020-06-09T13:53:15.000Z | 2020-06-09T13:53:15.000Z | #!/usr/bin/env python3
#
# Copyright 2017-2020 GridGain Systems.
#
# 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... | 44.197711 | 148 | 0.591868 |
23c9f4db5cf5a82dea8e8128fd5dcdda09a512f5 | 12,068 | py | Python | tensorflow/python/training/sync_replicas_optimizer_test.py | toptaldev92/tensorflow | 1fd1f65d1b0896149e44a1f105267c27994010d9 | [
"Apache-2.0"
] | 2 | 2017-10-14T09:13:27.000Z | 2017-10-26T18:34:28.000Z | tensorflow/python/training/sync_replicas_optimizer_test.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/sync_replicas_optimizer_test.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | 1 | 2021-04-22T09:17:52.000Z | 2021-04-22T09:17:52.000Z | # Copyright 2016 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... | 42.04878 | 80 | 0.672937 |
122270155c4aff36e298f45c05f1616d0c635c29 | 768 | py | Python | test/test_base.py | cogolabs/yodlee | 07b80e4c919dec6049adea3b19aaae86fbb2d12d | [
"Apache-2.0"
] | 14 | 2017-04-24T22:00:02.000Z | 2021-04-06T14:21:29.000Z | test/test_base.py | cogolabs/yodlee | 07b80e4c919dec6049adea3b19aaae86fbb2d12d | [
"Apache-2.0"
] | 1 | 2017-04-26T21:59:40.000Z | 2017-04-26T21:59:40.000Z | test/test_base.py | cogolabs/yodlee | 07b80e4c919dec6049adea3b19aaae86fbb2d12d | [
"Apache-2.0"
] | 4 | 2017-09-14T12:52:36.000Z | 2021-04-29T06:18:04.000Z | import responses
import unittest
class Base(unittest.TestCase):
credentials = {
'cobrand': 'cobrand',
'cobrand_id': 1,
'password': 'password',
'user_password': 'user_password',
'rest_wrapper': 'https://yodlee.com/services/srest/restserver/v1.0/',
'rest_url': 'https... | 27.428571 | 77 | 0.589844 |
1032ac07c1739668eeb146f0605349f033d29d30 | 13,923 | py | Python | nlp & deep learning/cnn_model.py | cloudhs7/team-project-team4 | c9f784209636b52c4373c38a121d10688d8a6cae | [
"MIT"
] | 4 | 2019-05-02T07:40:24.000Z | 2019-05-22T01:16:58.000Z | nlp & deep learning/cnn_model.py | cloudhs7/team-project-team4 | c9f784209636b52c4373c38a121d10688d8a6cae | [
"MIT"
] | 9 | 2019-05-29T12:35:09.000Z | 2019-06-22T07:30:08.000Z | nlp & deep learning/cnn_model.py | cloudhs7/team-project-team4 | c9f784209636b52c4373c38a121d10688d8a6cae | [
"MIT"
] | 7 | 2019-05-12T12:45:14.000Z | 2019-06-21T17:09:48.000Z | import os
import time
import datetime
from tensorflow import flags
import tensorflow as tf
import numpy as np
from konlpy.tag import Okt
import csv
import gensim
import sys
class TextCNN(object):
"""
A CNN for text classification.
Uses an embedding layer, followed by a convolutional, max-pooling and softma... | 41.561194 | 125 | 0.595633 |
272fb927551f3f3b9cba3b98cfb27828b4b55ebc | 10,556 | py | Python | robotframework-ls/src/robotframework_ls/impl/code_lens.py | mrdimfox/robotframework-lsp | b864e25447d7035b9b8a5d72419e30c5c4510fc6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | robotframework-ls/src/robotframework_ls/impl/code_lens.py | mrdimfox/robotframework-lsp | b864e25447d7035b9b8a5d72419e30c5c4510fc6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | robotframework-ls/src/robotframework_ls/impl/code_lens.py | mrdimfox/robotframework-lsp | b864e25447d7035b9b8a5d72419e30c5c4510fc6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import List
from robocorp_ls_core.lsp import CodeLensTypedDict, RangeTypedDict, PositionTypedDict
from robotframework_ls.impl.protocols import ICompletionContext, NodeInfo
from robocorp_ls_core.robotframework_log import get_logger
from robocorp_ls_core.protocols import ITestInfoTypedDict
from robocorp_ls_c... | 34.384365 | 86 | 0.590186 |
17a5b5381ae880ceee7d66bfe148aa82f3a69286 | 966 | py | Python | glearn/crf/ixx_glodon/template/test/init_data.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | glearn/crf/ixx_glodon/template/test/init_data.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | glearn/crf/ixx_glodon/template/test/init_data.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
u"""
Description: Test the main functions of template.
User: Jerry.Fang
Date: 13-12-30
"""
import os, sys
sys.path.append( os.path.join( os.path.abspath(os.path.dirname(__file__)) , '../..'))
import requests
import ujson
import unittest
from template.basic_template_generator import BasicTemplate
from t... | 33.310345 | 114 | 0.825052 |
79169e845ad4f7ce72c6a58095f7092c2abc54fc | 527 | py | Python | authors/apps/authentication/tests/test_create_user.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 3 | 2019-01-28T16:19:00.000Z | 2019-02-07T11:38:58.000Z | authors/apps/authentication/tests/test_create_user.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 20 | 2019-01-29T08:37:37.000Z | 2022-03-11T23:40:32.000Z | authors/apps/authentication/tests/test_create_user.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 6 | 2019-03-09T19:12:19.000Z | 2019-10-23T07:53:51.000Z | from django.test import TestCase
from authors.apps.authentication.models import User
class UserModelTest(TestCase):
"""
Test Suite for the User model class, User authentication.
"""
def test_create_user(self):
"""
Test User model can create a user successfully
"""
sel... | 27.736842 | 64 | 0.580645 |
d2d2038f275547b24f99e29a949d85e73283458e | 18,508 | py | Python | discord/ext/commands/context.py | Voxel-Fox-Ltd/Novus | 3e254115daf1c09455b26dc7819b73fbf5ee56e5 | [
"MIT"
] | 61 | 2021-08-30T05:30:31.000Z | 2022-03-24T11:24:38.000Z | discord/ext/commands/context.py | Voxel-Fox-Ltd/Novus | 3e254115daf1c09455b26dc7819b73fbf5ee56e5 | [
"MIT"
] | 30 | 2021-08-31T10:16:42.000Z | 2022-03-09T22:53:15.000Z | discord/ext/commands/context.py | Voxel-Fox-Ltd/Novus | 3e254115daf1c09455b26dc7819b73fbf5ee56e5 | [
"MIT"
] | 15 | 2021-09-02T09:40:58.000Z | 2022-02-25T12:19:02.000Z | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Kae Bartlett
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
... | 36.077973 | 121 | 0.638048 |
b08ac83842c7208079fb40034e56bd7bafe158df | 2,404 | py | Python | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/PutHybridMonitorMetricDataRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/PutHybridMonitorMetricDataRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/PutHybridMonitorMetricDataRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"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"); you may not u... | 48.08 | 158 | 0.715058 |
71e71fcf582e6ec563f7c1ebbb3f63c8757099c8 | 9,157 | py | Python | experiment_impact_tracker/data_info_and_router.py | ANarayan/experiment-impact-tracker | b4f49d5d66e4caee1044fe3365e7792381b750d0 | [
"MIT"
] | 202 | 2020-01-28T15:05:07.000Z | 2022-03-30T06:47:37.000Z | experiment_impact_tracker/data_info_and_router.py | adam7575a/experiment-impact-tracker | c1b0fcb4e75f04511805a1e57b2d8a97266d2977 | [
"MIT"
] | 56 | 2020-04-09T16:37:18.000Z | 2022-02-28T15:22:34.000Z | experiment_impact_tracker/data_info_and_router.py | adam7575a/experiment-impact-tracker | c1b0fcb4e75f04511805a1e57b2d8a97266d2977 | [
"MIT"
] | 20 | 2020-02-15T06:40:10.000Z | 2022-02-19T21:22:07.000Z | from datetime import datetime
import experiment_impact_tracker
from experiment_impact_tracker.cpu import rapl
from experiment_impact_tracker.cpu.common import (
get_cpu_count_adjusted_load_avg, get_cpu_freq, get_my_cpu_info,
is_cpu_freq_compatible)
from experiment_impact_tracker.cpu.intel import (get_intel_pow... | 50.038251 | 379 | 0.666921 |
52a9ba0d6b6a445e4c8c7db6417046b1970db052 | 26,918 | py | Python | groceries/groceries.py | tobiasli/groceries | 0455496b2e100b972f30b4b1e83284fa3f708e31 | [
"MIT"
] | null | null | null | groceries/groceries.py | tobiasli/groceries | 0455496b2e100b972f30b4b1e83284fa3f708e31 | [
"MIT"
] | 2 | 2019-11-19T22:30:36.000Z | 2019-11-25T20:24:27.000Z | groceries/groceries.py | tobiasli/groceries | 0455496b2e100b972f30b4b1e83284fa3f708e31 | [
"MIT"
] | 3 | 2020-12-09T07:56:56.000Z | 2021-05-22T18:30:48.000Z | '''
-------------------------------------------------------------------------------
Name: groceries
Purpose: Module containing classes for handling Units, Ingredients and
lists of Ingredients.
Author: Tobias Litherland
Created: 17.03.2015
Copyright: (c) Tobias Lit... | 43.0688 | 142 | 0.625084 |
64bc7e04850a671316678ce06c3733ead1fa7006 | 9,587 | py | Python | test/functional/test_framework/blocktools.py | sheffine/bitcoin | f5cdc290d5a41895d2bbaf474c3a951e5141b8a9 | [
"MIT"
] | 13 | 2015-08-06T10:27:34.000Z | 2021-11-10T14:37:05.000Z | test/functional/test_framework/blocktools.py | sheffine/bitcoin | f5cdc290d5a41895d2bbaf474c3a951e5141b8a9 | [
"MIT"
] | 7 | 2015-06-23T19:36:12.000Z | 2019-09-03T14:23:08.000Z | test/functional/test_framework/blocktools.py | sheffine/bitcoin | f5cdc290d5a41895d2bbaf474c3a951e5141b8a9 | [
"MIT"
] | 4 | 2016-01-27T21:50:48.000Z | 2022-01-05T02:52:11.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
from binascii import a2b_hex
import io
import s... | 37.158915 | 108 | 0.703348 |
72b9d515fc42c06b1d05d98083b013595ea0bd9f | 3,592 | py | Python | mozurestsdk/commerce/orders/shipment.py | Mozu/mozu-python-sdk | 9cc918aca7db3639264184e5266e8e508a08a7dd | [
"Apache-2.0"
] | 1 | 2021-03-22T12:38:42.000Z | 2021-03-22T12:38:42.000Z | mozurestsdk/commerce/orders/shipment.py | Mozu/mozu-python-sdk | 9cc918aca7db3639264184e5266e8e508a08a7dd | [
"Apache-2.0"
] | null | null | null | mozurestsdk/commerce/orders/shipment.py | Mozu/mozu-python-sdk | 9cc918aca7db3639264184e5266e8e508a08a7dd | [
"Apache-2.0"
] | 2 | 2015-09-30T19:49:00.000Z | 2015-09-30T19:51:03.000Z |
"""
This code was generated by Codezu.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
"""
from mozurestsdk.mozuclient import default as default_client
from mozurestsdk.mozuurl import MozuUrl;
from mozurestsdk.urllocation import UrlLocation
from mozure... | 32.071429 | 162 | 0.705735 |
4986158cdfa96573dfe6c3bb51b9e2fdd789f450 | 100 | py | Python | test/gpu_test.py | AerisG222/maw-face-recognition | 23d45a8b5843dba7e0181d41a355d0e4b80812e5 | [
"MIT"
] | null | null | null | test/gpu_test.py | AerisG222/maw-face-recognition | 23d45a8b5843dba7e0181d41a355d0e4b80812e5 | [
"MIT"
] | null | null | null | test/gpu_test.py | AerisG222/maw-face-recognition | 23d45a8b5843dba7e0181d41a355d0e4b80812e5 | [
"MIT"
] | null | null | null | import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
| 25 | 74 | 0.76 |
8fb770426e16e89e6eda463be4d3a5c34ceac548 | 1,316 | py | Python | tests/unit/config/test_manager.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 8 | 2017-11-28T11:05:52.000Z | 2021-11-16T13:52:45.000Z | tests/unit/config/test_manager.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 4 | 2018-12-23T14:52:11.000Z | 2019-08-09T21:01:44.000Z | tests/unit/config/test_manager.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 2 | 2017-11-28T14:38:24.000Z | 2017-11-29T09:03:20.000Z | import mock
from unittest import TestCase
from ncssl_api_client.config.manager import ConfigManager
class ConfigManagerTest(TestCase):
def setUp(self):
self.cfg_manager = ConfigManager()
@mock.patch('ncssl_api_client.config.manager.ApiSandboxClientConfig', return_value='TEST')
def test_ReturnsAp... | 43.866667 | 97 | 0.775076 |
eb8b10067f8fda24383c69556e8526eebb0a5d4a | 2,605 | py | Python | timpani/configmanager/configmanager.py | ollien/Timpani | 0d1aac467e0bcbe2d1dadb4e6c025315d6be45cb | [
"MIT"
] | 3 | 2015-10-16T11:26:53.000Z | 2016-08-28T19:28:52.000Z | timpani/configmanager/configmanager.py | ollien/timpani | 0d1aac467e0bcbe2d1dadb4e6c025315d6be45cb | [
"MIT"
] | 22 | 2015-09-14T23:00:07.000Z | 2016-07-22T08:39:39.000Z | timpani/configmanager/configmanager.py | ollien/timpani | 0d1aac467e0bcbe2d1dadb4e6c025315d6be45cb | [
"MIT"
] | null | null | null | import json
import os
import os.path
class ConfigManager():
_caches = {}
def __init__(self, configPath = "configs/", overrideCache = False):
if os.path.isdir(configPath):
self.configPath = configPath
elif os.path.isfile(configPath):
raise ValueError("configPath is a file... | 36.180556 | 95 | 0.577735 |
d64f88c25648c6a393182dee6e57af987ec5b0e7 | 872 | py | Python | tests/test_healthcheck.py | willnx/vlab_cee | 938138ac6621f762e908886ba17ae92fdd9f797f | [
"Apache-2.0"
] | 1 | 2019-04-10T16:17:16.000Z | 2019-04-10T16:17:16.000Z | tests/test_healthcheck.py | willnx/vlab_cee | 938138ac6621f762e908886ba17ae92fdd9f797f | [
"Apache-2.0"
] | null | null | null | tests/test_healthcheck.py | willnx/vlab_cee | 938138ac6621f762e908886ba17ae92fdd9f797f | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
A suite of unit tests for the VlanView object
"""
import unittest
from unittest.mock import patch, MagicMock
import ujson
from flask import Flask
from vlab_api_common import flask_common
from vlab_cee_api.lib.views import healthcheck
class TestHealthView(unittest.TestCase):
"""A suit... | 23.567568 | 68 | 0.673165 |
714d483815a3c53ab4867ee7421ce8d9d4642f3a | 7,218 | py | Python | stdplugins/ukinti.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 2 | 2019-10-23T12:30:32.000Z | 2019-10-23T20:33:26.000Z | stdplugins/ukinti.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 2 | 2020-05-22T14:59:05.000Z | 2020-05-28T12:04:02.000Z | stdplugins/ukinti.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 12 | 2019-10-25T18:48:16.000Z | 2020-04-26T11:31:21.000Z | """ @ukinti_bot
Available Commands:
.unbanall
.kick option
Available Options: d, y, m, w, o, q, r """
from telethon import events
from datetime import datetime, timedelta
from telethon.tl.types import UserStatusEmpty, UserStatusLastMonth, UserStatusLastWeek, UserStatusOffline, UserStatusOnline, UserStatusRecently, Chan... | 33.572093 | 188 | 0.486838 |
c296b014fc216a918274cbb3b34e17b3304811e5 | 2,571 | py | Python | app/common/http_methods.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | app/common/http_methods.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | app/common/http_methods.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import random
import re
import time
from HTMLParser import HTMLParser
from google.appengine.api.urlfetch_errors import InternalTransientError
from app.common.logger import logger
from app.common.session_manager import get_session, save_session_in_cache
from app.common.target_strings import LOG... | 32.961538 | 98 | 0.742902 |
55382c7b784f99c93fb52250f793fd286f639d41 | 7,905 | py | Python | gluoncv/data/mscoco/detection.py | JiangongWang/mean-teacher-cross-domain-detection | c52b8b2e22e8ff30ead1bef82409d41f52883ccd | [
"Apache-2.0"
] | null | null | null | gluoncv/data/mscoco/detection.py | JiangongWang/mean-teacher-cross-domain-detection | c52b8b2e22e8ff30ead1bef82409d41f52883ccd | [
"Apache-2.0"
] | null | null | null | gluoncv/data/mscoco/detection.py | JiangongWang/mean-teacher-cross-domain-detection | c52b8b2e22e8ff30ead1bef82409d41f52883ccd | [
"Apache-2.0"
] | null | null | null | """MS COCO object detection dataset."""
from __future__ import absolute_import
from __future__ import division
import os
import numpy as np
import mxnet as mx
from .utils import try_import_pycocotools
from ..base import VisionDataset
from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
__all__ = ['COCODetection... | 44.410112 | 112 | 0.592916 |
ec34cdfb19571916816b3fd6c1f744fb6fc9c319 | 4,730 | py | Python | src/oscar/core/application.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/core/application.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/core/application.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django import VERSION as DJANGO_VERSION
from django.core.urlresolvers import RegexURLPattern, reverse_lazy
from oscar.core.loading import feature_hidden
from oscar.views.decorators import permissions_required
class Application(object):
"""
Base application class.
This is subclassed by ea... | 35.298507 | 80 | 0.607188 |
096bd2b7627f65faf6e04a411da30e1057b0c3be | 4,563 | py | Python | importCollections.py | viapek/tweet_analysis_project | c7969240f812360218536b142a749457d64a340d | [
"MIT"
] | null | null | null | importCollections.py | viapek/tweet_analysis_project | c7969240f812360218536b142a749457d64a340d | [
"MIT"
] | null | null | null | importCollections.py | viapek/tweet_analysis_project | c7969240f812360218536b142a749457d64a340d | [
"MIT"
] | null | null | null | import config
import glob
import subprocess
import time
import os
from pymongo import MongoClient
##initiate counters at 0
i_ImportCounter = 0
i_TotalDataSize = 0
i_TotalCollectionDataSize = 0
i_UnzipCounter = 0
i_ReZipCounter = 0
def getUserInput():
while True:
d_StartDate = raw_input("Please enter the START ... | 29.43871 | 126 | 0.654394 |
2ca0c24f75e2e4efea5cad50b9cfc65d37015530 | 663 | py | Python | server/books/migrations/0001_initial.py | zubeir68/my-library | a24b8daa12b7a0bc682460709606c732dc35d1aa | [
"MIT"
] | null | null | null | server/books/migrations/0001_initial.py | zubeir68/my-library | a24b8daa12b7a0bc682460709606c732dc35d1aa | [
"MIT"
] | null | null | null | server/books/migrations/0001_initial.py | zubeir68/my-library | a24b8daa12b7a0bc682460709606c732dc35d1aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-12-06 23:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Book',
... | 25.5 | 114 | 0.579186 |
d8065ac3b09819017c1efee558687c27c495f9ac | 2,890 | py | Python | Config.py | punk0x29a/pytiler | aef824a4965f6533ad3d89a6157986e3295f5b90 | [
"MIT"
] | 1 | 2019-01-31T05:48:50.000Z | 2019-01-31T05:48:50.000Z | Config.py | punk0x29a/pytiler | aef824a4965f6533ad3d89a6157986e3295f5b90 | [
"MIT"
] | null | null | null | Config.py | punk0x29a/pytiler | aef824a4965f6533ad3d89a6157986e3295f5b90 | [
"MIT"
] | null | null | null | from utils.Keycodes import keycodes, modifiers
import utils.pytweening as pytweening
class Keys():
# Modifier key
modifier = modifiers["Mod1"] # AltLeft as default modifier
# Commands: mod + command
mode = keycodes["Space"] # Toggle mode: Master on the left, master on the top, master on the righ... | 36.125 | 147 | 0.619377 |
9641c9bd783ec418190da7c80780081308a9c918 | 159 | py | Python | reversible/__init__.py | abhinav/reversible | 7e28aaf0390f7d4b889c6ac14d7b340f8f314e89 | [
"MIT"
] | 1 | 2015-07-12T01:26:27.000Z | 2015-07-12T01:26:27.000Z | reversible/__init__.py | abhinav/reversible | 7e28aaf0390f7d4b889c6ac14d7b340f8f314e89 | [
"MIT"
] | null | null | null | reversible/__init__.py | abhinav/reversible | 7e28aaf0390f7d4b889c6ac14d7b340f8f314e89 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .core import action, execute
from .generator import gen, Return
__all__ = ['action', 'execute', 'gen', 'Return']
| 22.714286 | 48 | 0.748428 |
3c3e4835519935541579fb93e78cdc6ee3d6a41a | 77 | py | Python | qb/version.py | QBMonetary/qbmonetary | b064b49c4e5667211f9e3f687fdd15da03be9f7e | [
"MIT"
] | 26 | 2015-03-15T17:05:49.000Z | 2020-05-06T06:42:54.000Z | qb/version.py | QBMonetary/qbmonetary | b064b49c4e5667211f9e3f687fdd15da03be9f7e | [
"MIT"
] | 19 | 2015-06-18T10:29:59.000Z | 2022-02-10T02:46:15.000Z | qb/version.py | QBMonetary/qbmonetary | b064b49c4e5667211f9e3f687fdd15da03be9f7e | [
"MIT"
] | 20 | 2015-10-31T16:32:54.000Z | 2022-02-05T14:10:32.000Z | import pkg_resources
__VERSION__ = pkg_resources.require('omise')[0].version
| 25.666667 | 55 | 0.818182 |
6218fe3c12922da14c297535b96d469c72b7a9e8 | 497 | py | Python | docker/storperf-master/tests/utilities_tests/__init__.py | hashnfv/hashnfv-storperf | 9eebe429ae9ec58a593611063da5b541634f8932 | [
"Apache-2.0"
] | null | null | null | docker/storperf-master/tests/utilities_tests/__init__.py | hashnfv/hashnfv-storperf | 9eebe429ae9ec58a593611063da5b541634f8932 | [
"Apache-2.0"
] | null | null | null | docker/storperf-master/tests/utilities_tests/__init__.py | hashnfv/hashnfv-storperf | 9eebe429ae9ec58a593611063da5b541634f8932 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2016 EMC and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# ht... | 41.416667 | 78 | 0.535211 |
1554fa3103b269afae67b634f3c158f1d1027864 | 58,576 | py | Python | src/transformers/models/xlm/modeling_tf_xlm.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | 2 | 2022-02-19T07:02:52.000Z | 2022-02-19T07:02:55.000Z | src/transformers/models/xlm/modeling_tf_xlm.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | 2 | 2022-03-14T10:13:16.000Z | 2022-03-14T11:50:27.000Z | src/transformers/models/xlm/modeling_tf_xlm.py | bhavika/transformers | 65cf33e7e53cd46313f3655f274b3f6ca0fd679d | [
"Apache-2.0"
] | 2 | 2022-03-21T04:32:39.000Z | 2022-03-22T01:02:49.000Z | # coding=utf-8
# Copyright 2019-present, Facebook, Inc 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 the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 40.933613 | 151 | 0.638794 |
a2875491c643b64f8497d99ce05f29b215dc5de1 | 1,191 | py | Python | lowestCommonAncestor.py | the-artemis/ads | 2f93616e52f113befceaed29d8ad9892d44ce290 | [
"MIT"
] | null | null | null | lowestCommonAncestor.py | the-artemis/ads | 2f93616e52f113befceaed29d8ad9892d44ce290 | [
"MIT"
] | null | null | null | lowestCommonAncestor.py | the-artemis/ads | 2f93616e52f113befceaed29d8ad9892d44ce290 | [
"MIT"
] | 2 | 2021-10-06T13:34:01.000Z | 2021-10-06T13:45:40.000Z | class Solution:
def lowestCommonAncestor(self, root, p, q):
"""
:type root: TreeNode
:type p: TreeNode
:type q: TreeNode
:rtype: TreeNode
"""
# Stack for tree traversal
stack = [root]
# Dictionary for parent pointers
pa... | 28.357143 | 74 | 0.511335 |
60b1dc8d2c41d8e6314ed283b435edb5b537725a | 36,443 | py | Python | python/ccxt/liquid.py | jc-emx/ccxt | 5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646 | [
"MIT"
] | 1 | 2020-08-25T23:07:18.000Z | 2020-08-25T23:07:18.000Z | python/ccxt/liquid.py | jc-emx/ccxt | 5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646 | [
"MIT"
] | 2 | 2020-05-12T12:53:48.000Z | 2020-07-05T12:59:52.000Z | python/ccxt/liquid.py | jc-emx/ccxt | 5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646 | [
"MIT"
] | 3 | 2020-04-01T05:56:19.000Z | 2020-06-24T10:17:13.000Z | # -*- 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
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationE... | 39.355292 | 126 | 0.47529 |
c0a39757fb01ed81180145f15bd2ec67557003b2 | 5,006 | py | Python | mod/config.py | phatjmo/vmdrop | 9d1b9d2347cd39e9e1837443e6fef59376b31899 | [
"MIT"
] | 1 | 2019-08-30T09:26:13.000Z | 2019-08-30T09:26:13.000Z | mod/config.py | phatjmo/vmdrop | 9d1b9d2347cd39e9e1837443e6fef59376b31899 | [
"MIT"
] | null | null | null | mod/config.py | phatjmo/vmdrop | 9d1b9d2347cd39e9e1837443e6fef59376b31899 | [
"MIT"
] | 1 | 2019-11-25T23:12:57.000Z | 2019-11-25T23:12:57.000Z |
from os import path
import json
"""
Manage configuration files for the main application and campaigns.
"""
__author__ = 'Justin Zimmer'
def load_main():
"""Load the main configuration for this instance."""
config_file = "main_config.json"
if path.exists(config_file):
try:
return load... | 43.912281 | 130 | 0.64962 |
2218672935015881795a22129e94eebd24b0eafa | 9,934 | py | Python | my_vim_files/python27/Lib/test/test_urllib2net.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | my_vim_files/python27/Lib/test/test_urllib2net.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | my_vim_files/python27/Lib/test/test_urllib2net.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
from test import test_support
from test.test_urllib2 import sanepathname2url
import socket
import urllib2
import os
import sys
TIMEOUT = 60 # seconds
def _retry_thrice(func, exc, *args, **kwargs):
for i in range(3):
try:
return func(*a... | 36.123636 | 85 | 0.57419 |
a2fad6003d4af210559ed7ddc0c0659f893acbd2 | 2,093 | py | Python | remo/events/migrations/0002_auto_20160407_1156.py | Mozilla-GitHub-Standards/6f6b18ac63685c6bf60fff95a3bbcc598378c77ceb14c7404172c570dd1e971d | 23ca8d46496b491fbdb2b8a72c91e75372932f23 | [
"BSD-3-Clause"
] | 27 | 2015-01-02T18:47:56.000Z | 2021-08-14T11:48:24.000Z | remo/events/migrations/0002_auto_20160407_1156.py | Mozilla-GitHub-Standards/6f6b18ac63685c6bf60fff95a3bbcc598378c77ceb14c7404172c570dd1e971d | 23ca8d46496b491fbdb2b8a72c91e75372932f23 | [
"BSD-3-Clause"
] | 450 | 2015-01-02T12:29:50.000Z | 2020-10-27T21:41:38.000Z | remo/events/migrations/0002_auto_20160407_1156.py | Mozilla-GitHub-Standards/6f6b18ac63685c6bf60fff95a3bbcc598378c77ceb14c7404172c570dd1e971d | 23ca8d46496b491fbdb2b8a72c91e75372932f23 | [
"BSD-3-Clause"
] | 81 | 2015-01-10T23:59:32.000Z | 2021-08-19T17:08:56.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('reports', '0001_initial'),
('events', '0001_initial'),
migr... | 34.311475 | 161 | 0.601051 |
d6e71e3ffdfd172f0cfcffd543681b1c7880e796 | 4,692 | py | Python | app/migrations/0001_initial.py | BuildForSDG/TEAM-100 | 654348b2a6a3edd585881180c0f7de5041bdf947 | [
"MIT"
] | null | null | null | app/migrations/0001_initial.py | BuildForSDG/TEAM-100 | 654348b2a6a3edd585881180c0f7de5041bdf947 | [
"MIT"
] | 34 | 2020-05-10T16:46:05.000Z | 2022-03-12T00:35:50.000Z | app/migrations/0001_initial.py | BuildForSDG/TEAM-100 | 654348b2a6a3edd585881180c0f7de5041bdf947 | [
"MIT"
] | 2 | 2020-05-02T21:21:04.000Z | 2020-05-11T22:40:37.000Z | # Generated by Django 3.0.6 on 2020-05-20 19:35
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('aut... | 56.53012 | 329 | 0.615942 |
eeb1e9b4481ca6a8a97b43807fe2189abd4a0634 | 8,055 | py | Python | idb/common/tar.py | mwakizaka/idb | 40ec4e8069b86f654bf6a7aa5fb9aa97f100d974 | [
"MIT"
] | 4 | 2020-12-02T08:40:21.000Z | 2022-02-20T11:54:22.000Z | idb/common/tar.py | mwakizaka/idb | 40ec4e8069b86f654bf6a7aa5fb9aa97f100d974 | [
"MIT"
] | 3 | 2021-08-21T07:50:23.000Z | 2022-02-26T02:19:05.000Z | idb/common/tar.py | mwakizaka/idb | 40ec4e8069b86f654bf6a7aa5fb9aa97f100d974 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import asyncio
import os
import sys
import tempfile
import uuid
from abc import abstractmethod
from typing import Async... | 31.100386 | 99 | 0.637989 |
0b0978cc7ee494cf05f2d0a5d87d8343d8121516 | 1,536 | py | Python | tests/test_vollib_vs_ref_python_values/black/test_implied_volatility.py | amirmalekicom/py_vollib | e02dd3344b8e728681e7979535dbb29aeb7d0620 | [
"MIT"
] | 145 | 2017-06-09T12:33:17.000Z | 2022-03-24T07:50:21.000Z | tests/test_vollib_vs_ref_python_values/black/test_implied_volatility.py | amirmalekicom/py_vollib | e02dd3344b8e728681e7979535dbb29aeb7d0620 | [
"MIT"
] | 16 | 2017-05-14T02:54:44.000Z | 2021-12-28T07:13:16.000Z | tests/test_vollib_vs_ref_python_values/black/test_implied_volatility.py | amirmalekicom/py_vollib | e02dd3344b8e728681e7979535dbb29aeb7d0620 | [
"MIT"
] | 36 | 2017-05-05T23:50:47.000Z | 2022-03-24T07:51:33.000Z | # -----------------------------------------------------------------------------
# IMPORTS
# Standard library imports
import unittest
# Related third party imports
# Local application/library specific imports
from py_vollib.black import black as c_black
from py_vollib.black.implied_volatility import implied_volatilit... | 29.538462 | 116 | 0.627604 |
e8fb28241f9c19a969f025389b0dae793d1865db | 1,184 | py | Python | exercicios-turtle/.history/firstinterface_20210627214220.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | 1 | 2021-11-28T18:49:21.000Z | 2021-11-28T18:49:21.000Z | exercicios-turtle/.history/firstinterface_20210627214220.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | exercicios-turtle/.history/firstinterface_20210627214220.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | import tkinter
#função
def addComment():
coment = inputComment.get()
commentsList.insert(0, coment)
inputComment.delete(0, tkinter.END)
def delcoment():
commentsList.dele
#main frame
root = tkinter.Tk()
root.geometry('400x400+3200+100')
root.wm_title('Anotações')
#list box #frame
commentsF... | 25.73913 | 81 | 0.766047 |
a19402707fbf658ba5ca3efb812c63d9baf85b73 | 780 | py | Python | Source/algorithms.py | SamanKhamesian/Kmeans-based-on-ECT-distances | d7fc63cc2c042c9756dd4c9454cc56dc46a41823 | [
"Apache-2.0"
] | 1 | 2020-04-16T06:29:00.000Z | 2020-04-16T06:29:00.000Z | Source/algorithms.py | SamanKhamesian/Kmeans-Based-on-ECT-Distances | d7fc63cc2c042c9756dd4c9454cc56dc46a41823 | [
"Apache-2.0"
] | null | null | null | Source/algorithms.py | SamanKhamesian/Kmeans-Based-on-ECT-Distances | d7fc63cc2c042c9756dd4c9454cc56dc46a41823 | [
"Apache-2.0"
] | null | null | null | from sklearn.cluster import KMeans, AgglomerativeClustering
from sklearn.metrics.cluster import normalized_mutual_info_score as nmi
from Source import ectkmeans
def run_ectkmeans(data, labels):
predicts = ectkmeans.fit(data)
_nmi = nmi(labels, predicts, average_method='geometric')
print('ECT-KMeans Algor... | 27.857143 | 71 | 0.746154 |
514ffbb03ad40cd74b9a49df42d26b08e1c576b1 | 2,416 | py | Python | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2021-02-05T13:19:58.000Z | 2021-02-05T13:19:58.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2018-04-15T22:59:15.000Z | 2018-04-15T22:59:15.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | null | null | null | from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc, isspmatrix_csr
from ._tools import csgraph_to_dense, csgraph_from_dense,\
csgraph_masked_from_dense, csgraph_from_masked
DTYPE = np.float64
def validate_graph(csgra... | 41.655172 | 79 | 0.605546 |
018cd44bc16a1c990ea8134a6a23dc5c83f22459 | 2,564 | py | Python | ch15-model_as_a_service/src/online_arc/initialize.py | ahitboyZBW/book-ml-sem | 73208e7e492c9cbe82c4aaa6459a41e3ac1317be | [
"MIT"
] | 137 | 2020-10-26T11:11:46.000Z | 2022-03-29T01:21:22.000Z | ch15-model_as_a_service/src/online_arc/initialize.py | zengzhongjie/book-ml-sem | 5d452a427db5ee65538d968ba5b938af013bb87c | [
"MIT"
] | 4 | 2021-01-18T08:57:04.000Z | 2021-07-29T02:39:00.000Z | ch15-model_as_a_service/src/online_arc/initialize.py | zengzhongjie/book-ml-sem | 5d452a427db5ee65538d968ba5b938af013bb87c | [
"MIT"
] | 46 | 2020-10-26T11:11:57.000Z | 2022-03-08T00:15:32.000Z | # -*- coding: utf-8 -*-
# Chanson
import yaml
import os
import re
from utils import get_model,get_conf_dict,exit_with_mess
# key与conf文件匹配
_m11 = 'server_conf'
_m12 = 'sub_models'
_m13 = 'other_define'
_m14 = 'data_process'
_m11_m = 'model_name'
_m11_log = 'key'
_m12_m = 'model_file'
# 这两个特殊-内外部都可以有
_... | 30.164706 | 108 | 0.583463 |
afb26b8deea729420096cd26c018c1d6cbff54ed | 2,882 | py | Python | mapper.py | Madis0/mc-language-porter | 202746b9f536d12f504040e81ce2b7d01e9430af | [
"MIT"
] | 3 | 2021-11-24T15:29:38.000Z | 2022-02-27T21:36:33.000Z | mapper.py | Madis0/mc-language-porter | 202746b9f536d12f504040e81ce2b7d01e9430af | [
"MIT"
] | 5 | 2021-03-08T17:44:52.000Z | 2021-10-06T16:56:14.000Z | mapper.py | Madis0/mc-language-porter | 202746b9f536d12f504040e81ce2b7d01e9430af | [
"MIT"
] | null | null | null | import difflib
import json
# Whether to include strings from main and Realms in mappings (don't disable both, though)
includeJe = True
includeRealms = True
# File names and -paths
jePath = "en_us.json"
bePath = "en_US.lang"
realmsPath = "realms-" + jePath
outputPath = "mappings.csv"
# Arrays to store data in (tempor... | 27.980583 | 111 | 0.657183 |
32c0dd893058eafe9663c466b44fba5a8fa73520 | 1,768 | py | Python | applications/FSIapplication/python_scripts/ExplicitCoupling.py | jiaqiwang969/Kratos-test | ed082abc163e7b627f110a1ae1da465f52f48348 | [
"BSD-4-Clause"
] | null | null | null | applications/FSIapplication/python_scripts/ExplicitCoupling.py | jiaqiwang969/Kratos-test | ed082abc163e7b627f110a1ae1da465f52f48348 | [
"BSD-4-Clause"
] | null | null | null | applications/FSIapplication/python_scripts/ExplicitCoupling.py | jiaqiwang969/Kratos-test | ed082abc163e7b627f110a1ae1da465f52f48348 | [
"BSD-4-Clause"
] | null | null | null | #importing the Kratos Library
from Kratos import *
class ExplicitCoupling:
def __init__(self,fluid_model_part,structure_model_part,structural_solver,fluid_solver,mesh_solver,mapper,domain_size):
self.fluid_solver = fluid_solver
self.structural_solver = structural_solver
self.mesh_solve... | 33.358491 | 123 | 0.677036 |
fcdd3899c68a48d201a11a39442749c73c0c0cb9 | 3,583 | py | Python | game_system/systems/town.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | game_system/systems/town.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | game_system/systems/town.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | from typing import List, Tuple, Optional
import random
from . import battle
class Town(battle.Battle):
"""街"""
def __init__(self, dungeon_type, dungeon_num):
super().__init__(dungeon_type, dungeon_num)
def main(self):
while True:
print("メニュー")
print("1:ステータスチェック... | 38.117021 | 338 | 0.550098 |
2bc44befaaf09f5be4d157d1d7efc8c9a59e670c | 4,092 | py | Python | isi_sdk_7_2/isi_sdk_7_2/models/auth_privileges.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_7_2/isi_sdk_7_2/models/auth_privileges.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_7_2/isi_sdk_7_2/models/auth_privileges.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 2
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_7_2.models.auth_priv... | 28.615385 | 170 | 0.58651 |
783e4d553154909c164e1c509fd2d949507ae890 | 199 | py | Python | movies/urls.py | constantindjonkam/vidly-django | ce02a7b80c6a01bcac47c4bc546321f35dbd6613 | [
"MIT"
] | 1 | 2021-09-02T01:16:05.000Z | 2021-09-02T01:16:05.000Z | movies/urls.py | constantindjonkam/vidly-django | ce02a7b80c6a01bcac47c4bc546321f35dbd6613 | [
"MIT"
] | null | null | null | movies/urls.py | constantindjonkam/vidly-django | ce02a7b80c6a01bcac47c4bc546321f35dbd6613 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "movies"
urlpatterns = [
path('', views.index, name="index"),
path('<int:movie_id>', views.details, name="details")
]
| 18.090909 | 58 | 0.628141 |
c06784473eb7c40d8a528dc4c4290b94d7d07064 | 364 | py | Python | thyme/server.py | cacahootie/thyme | 67eb5be166249677cfa43290825c0fbb425bff0e | [
"MIT"
] | null | null | null | thyme/server.py | cacahootie/thyme | 67eb5be166249677cfa43290825c0fbb425bff0e | [
"MIT"
] | null | null | null | thyme/server.py | cacahootie/thyme | 67eb5be166249677cfa43290825c0fbb425bff0e | [
"MIT"
] | null | null | null | import os
from flask import Flask, request, jsonify
basedir = os.path.dirname(os.path.abspath(__file__))
def get_instance(dbname=None, username=None, password=None, static_folder=None):
app = Flask('thyme', static_folder=os.path.join(basedir,'static'))
@app.route("/")
def index():
return app.sen... | 24.266667 | 80 | 0.706044 |
1f924280f594d88fe9209abc57f57e85f0c4a02b | 2,171 | py | Python | src/Controller.py | AtishaRibeiro/PyRKG | f4ba5075da335f2698e1d2d438eea518b432c85a | [
"MIT"
] | 1 | 2022-03-04T15:44:57.000Z | 2022-03-04T15:44:57.000Z | src/Controller.py | AtishaRibeiro/PyRKG | f4ba5075da335f2698e1d2d438eea518b432c85a | [
"MIT"
] | null | null | null | src/Controller.py | AtishaRibeiro/PyRKG | f4ba5075da335f2698e1d2d438eea518b432c85a | [
"MIT"
] | 1 | 2022-01-01T15:20:14.000Z | 2022-01-01T15:20:14.000Z | import json
import importlib
import os
from .Component import *
from .Canvas import Canvas
class Controller:
def __init__(self):
self.size = (100, 100)
self.bg_colour = (255, 255, 255)
def read_json(self, layout_name):
self.components = []
# parse the json file to a dict
... | 35.016129 | 111 | 0.587287 |
52d05999d0b34078224f21c6bd2d232e0350c819 | 19,072 | py | Python | src/build/fuchsia/binary_sizes.py | kvmb/naiveproxy | 8bbb7526b927cbaa82870a4c81a08ccf5e8e9c1d | [
"BSD-3-Clause"
] | 2,219 | 2018-03-26T02:57:34.000Z | 2022-03-31T00:27:59.000Z | src/build/fuchsia/binary_sizes.py | LImboing/naiveproxy | 8bbb7526b927cbaa82870a4c81a08ccf5e8e9c1d | [
"BSD-3-Clause"
] | 250 | 2018-02-02T23:16:57.000Z | 2022-03-21T06:09:53.000Z | src/build/fuchsia/binary_sizes.py | LImboing/naiveproxy | 8bbb7526b927cbaa82870a4c81a08ccf5e8e9c1d | [
"BSD-3-Clause"
] | 473 | 2019-03-24T16:34:23.000Z | 2022-03-31T02:01:05.000Z | #!/usr/bin/env python2
#
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Implements Chrome-Fuchsia package binary size checks.'''
from __future__ import division
from __future__ import print_function
i... | 34.240575 | 96 | 0.698354 |
005aecbf2a19e3e1c9da6809fbe0193d4e6edf79 | 2,942 | py | Python | tests/test_converter.py | ZacheryGuan/python-pinyin | c16f4bc72ebbb4deabb31f867ec6db913a8a6327 | [
"MIT"
] | 3,853 | 2015-01-04T10:50:38.000Z | 2022-03-31T09:57:53.000Z | tests/test_converter.py | ZacheryGuan/python-pinyin | c16f4bc72ebbb4deabb31f867ec6db913a8a6327 | [
"MIT"
] | 258 | 2015-01-27T03:46:11.000Z | 2022-03-29T01:30:46.000Z | tests/test_converter.py | ZacheryGuan/python-pinyin | c16f4bc72ebbb4deabb31f867ec6db913a8a6327 | [
"MIT"
] | 579 | 2015-01-04T04:01:34.000Z | 2022-03-27T07:46:54.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pypinyin.constants import Style
from pypinyin.converter import DefaultConverter
def test_pre_convert_style_return_value():
class A(DefaultConverter):
def pre_convert_style(self, han, orig_pinyin, style, strict, **kwargs):
re... | 33.05618 | 79 | 0.562542 |
dca7d97fe48446048398ba309d9ac83943ea8ac9 | 239,683 | py | Python | lib/SeparateDriver/CiscoDriver5501.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | null | null | null | lib/SeparateDriver/CiscoDriver5501.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | null | null | null | lib/SeparateDriver/CiscoDriver5501.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | 1 | 2020-04-02T01:17:43.000Z | 2020-04-02T01:17:43.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright(c) 2019 Nippon Telegraph and Telephone Corporation
# Filename: CiscoDriver5501.py
'''
Individual section on deriver (Cisco5501's driver)
'''
import json
from lxml import etree
from EmSeparateDriver import EmSeparateDriver
from EmCommonLog import decor... | 43.468081 | 90 | 0.442656 |
438a19afec0206b216093d076de8e51c69039328 | 11,114 | py | Python | Lib/site-packages/django_pandas/managers.py | ncaminh/H2C_forgot_how_to_use_git | 3948b74d23d467a6184ea39cc3257f486a5b31d9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/django_pandas/managers.py | ncaminh/H2C_forgot_how_to_use_git | 3948b74d23d467a6184ea39cc3257f486a5b31d9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/django_pandas/managers.py | ncaminh/H2C_forgot_how_to_use_git | 3948b74d23d467a6184ea39cc3257f486a5b31d9 | [
"bzip2-1.0.6"
] | null | null | null | from django.db.models.query import QuerySet
from .io import read_frame
import django
from django.db import models
class PassThroughManagerMixin(object):
"""
A mixin that enables you to call custom QuerySet methods from your manager.
"""
_deny_methods = ['__getstate__', '__setstate__', '__getinitargs__... | 40.268116 | 82 | 0.580619 |
2dc149e39a78d526b7f3a3acdb5da50790de3364 | 1,707 | py | Python | src/krait/lib/plugins/vcs.py | taliamax/kra | e413cde23dead9062ce693b294f8296aeb57e63c | [
"Apache-2.0"
] | 7 | 2020-12-08T01:35:47.000Z | 2021-02-26T19:35:03.000Z | src/krait/lib/plugins/vcs.py | taliamax/kra | e413cde23dead9062ce693b294f8296aeb57e63c | [
"Apache-2.0"
] | 9 | 2020-12-09T20:36:55.000Z | 2022-03-15T20:05:10.000Z | src/krait/lib/plugins/vcs.py | taliamax/kra | e413cde23dead9062ce693b294f8296aeb57e63c | [
"Apache-2.0"
] | 2 | 2020-12-15T21:50:16.000Z | 2020-12-23T21:55:46.000Z | # -*- coding: utf-8 -*-
import krait.lib.abc as abc
import krait.lib.files as kf
from git import Repo # type: ignore
from pathlib import Path
from typing import Any
from krait.utils.templates import get_env
class BaseVCSPlugin(abc.AbstractVCS):
name: str
ignore_file: kf.File
def __init__(
self... | 29.431034 | 94 | 0.686585 |
a83a4f90cec012734386ca05a608a2e2a6dd6440 | 13,514 | py | Python | features/src/autogluon/features/generators/bulk.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 4,462 | 2019-12-09T17:41:07.000Z | 2022-03-31T22:00:41.000Z | features/src/autogluon/features/generators/bulk.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 1,408 | 2019-12-09T17:48:59.000Z | 2022-03-31T20:24:12.000Z | features/src/autogluon/features/generators/bulk.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 623 | 2019-12-10T02:04:18.000Z | 2022-03-20T17:11:01.000Z | import logging
from typing import List
import pandas as pd
from pandas import DataFrame
from autogluon.core.features.feature_metadata import FeatureMetadata
from .abstract import AbstractFeatureGenerator
logger = logging.getLogger(__name__)
# TODO: Add parameter to add prefix to each generator to guarantee no nam... | 61.149321 | 251 | 0.699497 |
60a4d1389fa296dd59e5d1cffe8c58f0b119dc24 | 1,655 | py | Python | src/age/stream_test.py | jojonas/pyage | d6b910db03b9f963efd40945a47df36a400b8f98 | [
"MIT"
] | 24 | 2019-10-07T12:53:15.000Z | 2021-12-10T21:22:04.000Z | src/age/stream_test.py | jojonas/pyage | d6b910db03b9f963efd40945a47df36a400b8f98 | [
"MIT"
] | 1 | 2020-06-30T10:52:34.000Z | 2020-06-30T10:52:34.000Z | src/age/stream_test.py | jojonas/pyage | d6b910db03b9f963efd40945a47df36a400b8f98 | [
"MIT"
] | null | null | null | import os
from pytest import raises
from .stream import _chunk, _pack_nonce, stream_decrypt, stream_encrypt
def test_chunk():
data = b"123456789"
expected_chunks_2 = [b"12", b"34", b"56", b"78", b"9"]
for i, chunk_ in enumerate(_chunk(data, 2)):
assert chunk_ == expected_chunks_2[i]
expect... | 31.226415 | 99 | 0.667674 |
c025da2a5987981391a2ef3e7837983c299f2e68 | 7,853 | py | Python | pyro/infer/traceenum_elbo.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | null | null | null | pyro/infer/traceenum_elbo.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | null | null | null | pyro/infer/traceenum_elbo.py | mashrikt/pyro | 144771db63d5f72e2fec6f5a6d866f1f153e7b80 | [
"MIT"
] | 1 | 2018-10-02T18:50:33.000Z | 2018-10-02T18:50:33.000Z | from __future__ import absolute_import, division, print_function
import warnings
import weakref
from six.moves import queue
import torch
from torch.distributions.utils import broadcast_all
import pyro
import pyro.ops.jit
import pyro.poutine as poutine
from pyro.distributions.util import is_identically_zero
from pyro... | 39.069652 | 102 | 0.628295 |
d20b50753e3719f0e68e9f773c7d490124d5e09c | 933 | py | Python | Source/lang/bone.py | django-datama/Paper-Plane-Projekt | ca473a00321d9db5f995c1545b7ce166e0b355d0 | [
"MIT"
] | 6 | 2015-01-08T14:18:10.000Z | 2015-02-07T13:14:55.000Z | Source/lang/bone.py | django-datama/Paper-Plane-Projekt | ca473a00321d9db5f995c1545b7ce166e0b355d0 | [
"MIT"
] | 2 | 2015-01-15T19:17:14.000Z | 2015-02-14T22:36:01.000Z | Source/lang/bone.py | django-datama/Paper-Plane-Projekt | ca473a00321d9db5f995c1545b7ce166e0b355d0 | [
"MIT"
] | 1 | 2020-11-11T13:37:38.000Z | 2020-11-11T13:37:38.000Z | # -*- coding: utf-8 -*-
TITLE = "SUUUUPPPEEERRR Paper Plane v01"
HOME_OPTION_PLAY = ""
HOME_OPTION_PLAY_LVL = ""
HOME_OPTION_OPTIONS = ""
HOME_OPTION_OPTIONS_COLOR = ""
HOME_OPTION_OPTIONS_COLOR_BLUE = ""
HOME_OPTION_OPTIONS_COLOR_BLACK = ""
HOME_OPTION_OPTIONS_COLOR_BROWN = ""
HOME_... | 26.657143 | 48 | 0.710611 |
d5dddc7ecfb2b24b0fdefccd52c7f278631c83bd | 696 | py | Python | manimlib/__main__.py | ishandutta2007/manim | 55674f64a5b4b3bf1ab05243410e81a94eca1e26 | [
"MIT"
] | null | null | null | manimlib/__main__.py | ishandutta2007/manim | 55674f64a5b4b3bf1ab05243410e81a94eca1e26 | [
"MIT"
] | null | null | null | manimlib/__main__.py | ishandutta2007/manim | 55674f64a5b4b3bf1ab05243410e81a94eca1e26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from manimlib import __version__
import manimlib.config
import manimlib.extract_scene
import manimlib.logger
import manimlib.utils.init_config
def main():
print(f"ManimGL \033[32mv{__version__}\033[0m")
args = manimlib.config.parse_cli()
if args.version and args.file is None:
... | 23.2 | 56 | 0.692529 |
88459b44f1263ab6334103b4bb96367ea30487ac | 17,181 | py | Python | scripts/crispor/bin/fusiDoench/analysis/load_data.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | 11 | 2018-09-21T16:49:19.000Z | 2022-03-03T19:29:16.000Z | scripts/crispor/bin/fusiDoench/analysis/load_data.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | 26 | 2018-03-01T04:58:17.000Z | 2018-08-30T20:49:30.000Z | scripts/crispor/bin/fusiDoench/analysis/load_data.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | 1 | 2020-01-28T20:06:02.000Z | 2020-01-28T20:06:02.000Z | import pandas
import util_new as util
import scipy as sp
import scipy.stats
import numpy as np
def from_custom_file(data_file, learn_options):
# use semantics of when we load V2 data
print "Loading inputs to predict from %s" % data_file
data = pandas.read_csv(data_file)
... | 46.942623 | 169 | 0.644375 |
13fed4593ae4daa3da6e6d30829e003b6a77508d | 47,309 | py | Python | salt/pillar/__init__.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | salt/pillar/__init__.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | salt/pillar/__init__.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
'''
Render the pillar data
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
import copy
import fnmatch
import os
import collections
import logging
import tornado.gen
import sys
import traceback
import inspect
# Import salt libs
import salt.loade... | 41.645246 | 123 | 0.497051 |
e7d24cceff91ea08fff03ea9c894b34cb72fea2b | 349 | py | Python | pyopenproject/business/services/command/previewing/previewing_command.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 5 | 2021-02-25T15:54:28.000Z | 2021-04-22T15:43:36.000Z | pyopenproject/business/services/command/previewing/previewing_command.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 7 | 2021-03-15T16:26:23.000Z | 2022-03-16T13:45:18.000Z | pyopenproject/business/services/command/previewing/previewing_command.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 6 | 2021-06-18T18:59:11.000Z | 2022-03-27T04:58:52.000Z | from abc import abstractmethod, ABCMeta
from pyopenproject.business.services.command.command import Command
class PreviewingCommand(Command):
__metaclass__ = ABCMeta
CONTEXT = "/api/v3/render"
def __init__(self, connection):
self.connection = connection
@abstractmethod
def execute(self... | 21.8125 | 67 | 0.750716 |
39ea429bcd66a50ec7515a146d54ee16e433cb9e | 3,492 | py | Python | bindings/python/ensmallen/datasets/string/sphingomonasspleaf343.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-09-10T18:31:58.000Z | 2022-03-24T04:28:04.000Z | bindings/python/ensmallen/datasets/string/sphingomonasspleaf343.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/sphingomonasspleaf343.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Sphingomonas sp. Leaf343.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prote... | 33.257143 | 223 | 0.677835 |
3acb468fe60f765542ad0285de0151651b5815a9 | 1,650 | py | Python | server/apps/user/managers.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | null | null | null | server/apps/user/managers.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | 3 | 2020-02-11T23:45:37.000Z | 2021-06-10T21:13:14.000Z | server/apps/user/managers.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | null | null | null | from django.contrib.auth.base_user import BaseUserManager
# Reference: https://docs.djangoproject.com/en/2.1/topics/auth/customizing/
class UserManager(BaseUserManager):
"""
Custom user manager for two types of users creation process - application's target users and admin.
"""
use_in_migrations = True
... | 41.25 | 103 | 0.679394 |
46d3633046362dbed7e55c830f64eb58d3f9283a | 12,074 | py | Python | torchmoji/word_generator.py | cclauss/torchMoji | e7d4bd45ef7c8e60a19c95f84eb0c9914a8f7900 | [
"MIT"
] | null | null | null | torchmoji/word_generator.py | cclauss/torchMoji | e7d4bd45ef7c8e60a19c95f84eb0c9914a8f7900 | [
"MIT"
] | null | null | null | torchmoji/word_generator.py | cclauss/torchMoji | e7d4bd45ef7c8e60a19c95f84eb0c9914a8f7900 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
''' Extracts lists of words from a given input to be used for later vocabulary
generation or for creating tokenized datasets.
Supports functionality for handling different file types and
filtering/processing of this input.
'''
from __future__ import division, print_function, unicode... | 38.698718 | 79 | 0.600133 |
c1fd258dbef08625a7ecd842a541801a0adf93e1 | 3,560 | py | Python | tests/common/gcp_type/instance_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | 1 | 2018-03-26T08:15:21.000Z | 2018-03-26T08:15:21.000Z | tests/common/gcp_type/instance_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | tests/common/gcp_type/instance_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 47.466667 | 80 | 0.650843 |
fdf1811cc702c0f7d1e1407ef00a1934de72cbb2 | 1,659 | py | Python | kedro/extras/datasets/biosequence/__init__.py | louisdecharson/kedro | 5816b6c0bcbb663b25cf9e40a237ebe812a91ef5 | [
"Apache-2.0"
] | 4,923 | 2019-05-16T17:29:23.000Z | 2022-01-10T06:01:02.000Z | kedro/extras/datasets/biosequence/__init__.py | ManishS6/kedro | 65e1c10050ba1b3c45227db8e28a275172ea1ea8 | [
"Apache-2.0"
] | 841 | 2019-05-20T16:58:11.000Z | 2022-01-09T09:36:26.000Z | kedro/extras/datasets/biosequence/__init__.py | ManishS6/kedro | 65e1c10050ba1b3c45227db8e28a275172ea1ea8 | [
"Apache-2.0"
] | 653 | 2019-05-19T10:05:22.000Z | 2022-01-06T13:48:23.000Z | # Copyright 2021 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... | 44.837838 | 79 | 0.779385 |
3507c3984d6788fbd88e44a8bfc47e13ced183a6 | 6,653 | py | Python | tests/k8s/test_k8s.py | thephenix4/jina | 34b433aa6f5f6781117568d422e8c2e9fe8ad6ec | [
"Apache-2.0"
] | 5 | 2021-10-30T06:07:58.000Z | 2022-02-20T20:43:02.000Z | tests/k8s/test_k8s.py | thephenix4/jina | 34b433aa6f5f6781117568d422e8c2e9fe8ad6ec | [
"Apache-2.0"
] | 1 | 2020-07-15T08:17:47.000Z | 2020-07-15T08:17:47.000Z | tests/k8s/test_k8s.py | thephenix4/jina | 34b433aa6f5f6781117568d422e8c2e9fe8ad6ec | [
"Apache-2.0"
] | null | null | null | import time
from http import HTTPStatus
from pytest_kind import cluster
# kind version has to be bumped to v0.11.1 since pytest-kind is just using v0.10.0 which does not work on ubuntu in ci
# TODO don't use pytest-kind anymore
cluster.KIND_VERSION = 'v0.11.1'
import pytest
import requests
from jina import Flow
@p... | 28.676724 | 118 | 0.64873 |
32c933ad661ca346e16b5244d83ad45b682db7fe | 44,563 | py | Python | datamodel_code_generator/parser/jsonschema.py | shnups/datamodel-code-generator | b6be55ff3a3a468cde7f900e9af04b5a23919c50 | [
"MIT"
] | null | null | null | datamodel_code_generator/parser/jsonschema.py | shnups/datamodel-code-generator | b6be55ff3a3a468cde7f900e9af04b5a23919c50 | [
"MIT"
] | null | null | null | datamodel_code_generator/parser/jsonschema.py | shnups/datamodel-code-generator | b6be55ff3a3a468cde7f900e9af04b5a23919c50 | [
"MIT"
] | null | null | null | import enum as _enum
from collections import defaultdict
from contextlib import contextmanager
from pathlib import Path
from typing import (
Any,
Callable,
DefaultDict,
Dict,
Generator,
Iterable,
List,
Mapping,
Optional,
Sequence,
Set,
Tuple,
Type,
Union,
)
from u... | 38.549308 | 119 | 0.582972 |
31bfcc2bea655c13eceaa86c3b2e919096c61d24 | 5,799 | py | Python | universal_landmark_detection/model/networks/u2net.py | ICT-MIRACLE-lab/YOLO_Universal_Anatomical_Landmark_Detection | 465a3d6afcdb23fdec609efe336beebdc9ed61f4 | [
"MIT"
] | 14 | 2021-07-06T01:54:41.000Z | 2021-12-07T01:31:01.000Z | universal_landmark_detection/model/networks/u2net.py | xtyawesome/YOLO_Universal_Anatomical_Landmark_Detection | 465a3d6afcdb23fdec609efe336beebdc9ed61f4 | [
"MIT"
] | 3 | 2022-01-01T08:41:29.000Z | 2022-03-29T18:23:40.000Z | universal_landmark_detection/model/networks/u2net.py | xtyawesome/YOLO_Universal_Anatomical_Landmark_Detection | 465a3d6afcdb23fdec609efe336beebdc9ed61f4 | [
"MIT"
] | 5 | 2021-09-07T12:15:06.000Z | 2021-11-30T12:36:37.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class dwise(nn.Module):
def __init__(self, inChans, kernel_size=3, stride=1, padding=1):
super(dwise, self).__init__()
self.conv1 = nn.Conv2d(inChans, inChans, kernel_size=kernel_size,
stride=stride, ... | 38.919463 | 122 | 0.607863 |
a1fe65e2e3749cae32e6662417a7300c7e67bd71 | 3,771 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_syslog_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_syslog_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_syslog_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ Cisco_IOS_XR_syslog_act
This module contains a collection of YANG definitions
for Cisco IOS\-XR action package configuration.
This module contains definitions
for the following management objects\:
syslog\: Global Syslog messaging data
Copyright (c) 2016 by Cisco Systems, Inc.
All rights reserved.
"""
import s... | 29.007692 | 126 | 0.606736 |
5eeca75735f8ea99ed23dcfd4b3230762264de31 | 43,610 | py | Python | uji.py | whot/uji | 74c11ec4b4b173131b4a3a031e752978fff1cece | [
"MIT"
] | 2 | 2020-01-22T21:28:15.000Z | 2020-01-23T07:13:28.000Z | uji.py | whot/uji | 74c11ec4b4b173131b4a3a031e752978fff1cece | [
"MIT"
] | 2 | 2019-12-09T11:12:11.000Z | 2019-12-24T05:29:47.000Z | uji.py | whot/uji | 74c11ec4b4b173131b4a3a031e752978fff1cece | [
"MIT"
] | null | null | null | #!/bin/env python3
# vim: set expandtab shiftwidth=4:
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Red Hat, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "... | 33.623747 | 130 | 0.553038 |
833d172843aeef027e5cf1947bf76d55d2bf0dcc | 12,607 | py | Python | tests/system/action/base.py | ostcar/openslides-backend | e6ceac497c37a1e3e7f408c6cfb29cf21d985b4c | [
"MIT"
] | null | null | null | tests/system/action/base.py | ostcar/openslides-backend | e6ceac497c37a1e3e7f408c6cfb29cf21d985b4c | [
"MIT"
] | 19 | 2021-11-22T16:25:54.000Z | 2021-11-25T13:38:13.000Z | tests/system/action/base.py | ostcar/openslides-backend | e6ceac497c37a1e3e7f408c6cfb29cf21d985b4c | [
"MIT"
] | null | null | null | from collections import defaultdict
from copy import deepcopy
from typing import Any, Dict, List, Optional, Union, cast
from unittest.mock import MagicMock
from openslides_backend.action.relations.relation_manager import RelationManager
from openslides_backend.action.util.actions_map import actions_map
from openslides... | 39.152174 | 89 | 0.561275 |
6b5c32163282c3198c6e5d6cbb7feba60fadcfcc | 5,534 | py | Python | docs/conf.py | DanielLevy0705/algosec-ansible-role | d3734c81b402b67fff88add6143ead686105340b | [
"MIT"
] | 13 | 2018-01-30T04:54:03.000Z | 2022-01-27T03:58:42.000Z | docs/conf.py | DanielLevy0705/algosec-ansible-role | d3734c81b402b67fff88add6143ead686105340b | [
"MIT"
] | 8 | 2018-02-08T06:54:47.000Z | 2021-09-21T14:50:30.000Z | docs/conf.py | DanielLevy0705/algosec-ansible-role | d3734c81b402b67fff88add6143ead686105340b | [
"MIT"
] | 8 | 2018-02-08T05:55:25.000Z | 2021-09-25T13:15:16.000Z | # -*- coding: utf-8 -*-
#
# flake8: noqa
#
# AlgoSec Ansible documentation build configuration file, created by
# sphinx-quickstart on Mon May 8 12:32:52 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | 31.988439 | 79 | 0.68811 |
a41c90059c4f0ad66bd495edbd211c4566d6b57e | 62,917 | py | Python | src/dicesapi/__init__.py | SFinkmann/dices-client | 61c0f73a076da21bce1e66d6e1cbf6579b9fd2ee | [
"MIT"
] | null | null | null | src/dicesapi/__init__.py | SFinkmann/dices-client | 61c0f73a076da21bce1e66d6e1cbf6579b9fd2ee | [
"MIT"
] | null | null | null | src/dicesapi/__init__.py | SFinkmann/dices-client | 61c0f73a076da21bce1e66d6e1cbf6579b9fd2ee | [
"MIT"
] | null | null | null | import requests
from MyCapytain.resolvers.cts.api import HttpCtsResolver
from MyCapytain.retrievers.cts5 import HttpCtsRetriever
import logging
class FilterParams(object):
CHARACTER_GENDER_FEMALE="female"
CHARACTER_GENDER_MALE="male"
CHARACTER_GENDER_NON_BINARY="non-binary"
CHARACTER_NUMBER_INDIVIDUA... | 38.317296 | 216 | 0.594132 |
e48b06fbcf9490ab910cbf7184d7ec58cfddeba5 | 2,517 | py | Python | HyperAPI/hdp_api/routes/simpleLift.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/simpleLift.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/hdp_api/routes/simpleLift.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | from HyperAPI.hdp_api.base.resource import Resource
from HyperAPI.hdp_api.base.route import Route
class SimpleLift(Resource):
name = "Simple Lift"
available_since = "1.0"
removed_since = None
class _NewSimpleLift(Route):
name = "New Simple Lift"
httpMethod = Route.POST
path = ... | 34.013514 | 104 | 0.620977 |
d199e5dd26c5e4e410f1c488381f1aab885b237d | 6,142 | py | Python | octavia/controller/worker/tasks/lifecycle_tasks.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | null | null | null | octavia/controller/worker/tasks/lifecycle_tasks.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | null | null | null | octavia/controller/worker/tasks/lifecycle_tasks.py | zjchao/octavia | e07031fa78604568c6e2112cb4cb147661bc57d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Rackspace
#
# 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 agree... | 35.709302 | 78 | 0.728102 |
5042aca53c69446e2a52e01f713b0243cc6dca84 | 7,519 | py | Python | fastapi_admin/routes/rest.py | demyan1805/fastapi-admin | 6ffe0e306d78a574fa0ba330c7560f5d921dfb24 | [
"Apache-2.0"
] | 1 | 2021-02-14T12:08:32.000Z | 2021-02-14T12:08:32.000Z | fastapi_admin/routes/rest.py | ealog/fastapi-admin | 30de191735929a32561ee3f36a77d1d3c8f59bba | [
"Apache-2.0"
] | null | null | null | fastapi_admin/routes/rest.py | ealog/fastapi-admin | 30de191735929a32561ee3f36a77d1d3c8f59bba | [
"Apache-2.0"
] | 1 | 2021-12-29T08:09:57.000Z | 2021-12-29T08:09:57.000Z | import io
from typing import Type
import xlsxwriter
from fastapi import APIRouter, Depends
from fastapi.responses import JSONResponse
from starlette.requests import Request
from starlette.responses import StreamingResponse
from starlette.status import HTTP_409_CONFLICT
from tortoise import Model
from tortoise.contrib.... | 36.678049 | 98 | 0.699295 |
cdda0f2fa97dccafe6c273a8b6a36b1b23ba60a2 | 683 | py | Python | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2019-11/sergeykurbatov-origin_infra | 4e434734da388ad3c79432eae110d3531c4efbfd | [
"MIT"
] | null | null | null | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2019-11/sergeykurbatov-origin_infra | 4e434734da388ad3c79432eae110d3531c4efbfd | [
"MIT"
] | 2 | 2019-12-22T20:50:27.000Z | 2019-12-24T07:39:47.000Z | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2019-11/sergeykurbatov-origin_infra | 4e434734da388ad3c79432eae110d3531c4efbfd | [
"MIT"
] | 2 | 2020-02-04T12:42:33.000Z | 2020-06-25T07:22:49.000Z | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
# check if MongoDB is enabled and running
def test_mongo_running_and_enabled(host):
mongo = host.service("mongod")
assert mongo.is_runn... | 27.32 | 63 | 0.761347 |
46636bbc89b3e070c775c62c1ee3c3775b93d498 | 2,118 | py | Python | setup.py | LaudateCorpus1/chaostoolkit-oci | 36da01a47dd1b0881ec21cb70775fde5011b38ed | [
"Apache-2.0"
] | 15 | 2018-11-20T15:36:52.000Z | 2021-12-16T21:46:56.000Z | setup.py | LaudateCorpus1/chaostoolkit-oci | 36da01a47dd1b0881ec21cb70775fde5011b38ed | [
"Apache-2.0"
] | 21 | 2018-11-26T19:11:52.000Z | 2021-12-15T19:38:37.000Z | setup.py | LaudateCorpus1/chaostoolkit-oci | 36da01a47dd1b0881ec21cb70775fde5011b38ed | [
"Apache-2.0"
] | 8 | 2018-11-20T15:37:09.000Z | 2021-07-28T20:27:19.000Z | #!/usr/bin/env python
# Copyright 2020, Oracle Corporation and/or its affiliates.
"""chaostoolkit OCI builder and installer"""
from chaosoci import __version__
import sys
import io
import setuptools
sys.path.insert(0, ".")
sys.path.remove(".")
name = 'chaostoolkit-oci'
desc = 'Chaos Toolkit Extension for OCI'
wi... | 25.829268 | 78 | 0.689802 |
5c444f92f71cd7ad1b2c920f5c614e81e003a263 | 1,230 | py | Python | main.py | adilshiekh00/userbot | fa756759e736800af4bd43d66ccd66e3afc8ad19 | [
"Apache-2.0"
] | null | null | null | main.py | adilshiekh00/userbot | fa756759e736800af4bd43d66ccd66e3afc8ad19 | [
"Apache-2.0"
] | null | null | null | main.py | adilshiekh00/userbot | fa756759e736800af4bd43d66ccd66e3afc8ad19 | [
"Apache-2.0"
] | 2 | 2021-08-31T02:17:02.000Z | 2021-09-17T06:31:00.000Z | from telethon.sessions import StringSession
from telethon.sync import TelegramClient
print("")
print("""Welcome To CrushBot String Session\nGenerator By @adilshiekh00\n\n""")
print("""Enter Your Valid Details To Continue!\n\n """)
API_KEY = input("API_ID: ")
API_HASH = input("API_HASH: ")
while True:
try:
... | 34.166667 | 171 | 0.600813 |
0a00618b20d673669d7dcd8ce8f6137c692df692 | 7,522 | py | Python | examples/trials/network_morphism/cifar10/cifar10_pytorch.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | examples/trials/network_morphism/cifar10/cifar10_pytorch.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | examples/trials/network_morphism/cifar10/cifar10_pytorch.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 30.453441 | 128 | 0.652619 |
5d6d610518770ba7c72c00eea7652c7e64f4666d | 514 | py | Python | server/characters/migrations/0005_spellknown_location.py | Etskh/pathfinder-app | c33dc0d2645d11ff5be3d29fe3167bdc12c61a79 | [
"MIT"
] | null | null | null | server/characters/migrations/0005_spellknown_location.py | Etskh/pathfinder-app | c33dc0d2645d11ff5be3d29fe3167bdc12c61a79 | [
"MIT"
] | 5 | 2017-09-26T21:25:31.000Z | 2017-09-26T21:41:09.000Z | server/characters/migrations/0005_spellknown_location.py | Etskh/pathfinder-app | c33dc0d2645d11ff5be3d29fe3167bdc12c61a79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-13 05:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('characters', '0004_spell_spellknown'),
]
operations = [
migrations.AddField... | 24.47619 | 108 | 0.608949 |
4d2e94afa10a9d6288620992b4edce8e5c893f75 | 38,742 | py | Python | main.py | TorbenTreffeisen/FaultGeomPy_v2 | 924fd4f7eb1744335d91ef89549e2c02752567ab | [
"CC0-1.0"
] | null | null | null | main.py | TorbenTreffeisen/FaultGeomPy_v2 | 924fd4f7eb1744335d91ef89549e2c02752567ab | [
"CC0-1.0"
] | null | null | null | main.py | TorbenTreffeisen/FaultGeomPy_v2 | 924fd4f7eb1744335d91ef89549e2c02752567ab | [
"CC0-1.0"
] | null | null | null | from qtpy import QtWidgets
from flt_geom_ui_v2.mainwindow import Ui_MainWindow
from matplotlib.pyplot import *
from ansys_trans import *
from functions import *
from outwrite import *
app = QtWidgets.QApplication(sys.argv)
class MainWindow(QtWidgets.QMainWindow):
def __init__(self, parent=None):
... | 45.74026 | 174 | 0.623922 |
7d0fb88a6d7259f5c367f169440a0fa0c3715765 | 125 | py | Python | peppercompiler/test.py | DNA-and-Natural-Algorithms-Group/peppercompiler | effbcdedfb17534300fb3504a552e46c1ead41e4 | [
"MIT"
] | 3 | 2019-06-10T18:44:03.000Z | 2021-11-17T10:57:09.000Z | peppercompiler/test.py | boospooky/peppercompiler | 0fc343009a1739133d73d85ae0857452f1e94871 | [
"MIT"
] | 2 | 2017-12-15T01:09:49.000Z | 2021-03-25T20:42:23.000Z | peppercompiler/test.py | boospooky/peppercompiler | 0fc343009a1739133d73d85ae0857452f1e94871 | [
"MIT"
] | 4 | 2017-08-21T03:32:51.000Z | 2019-10-18T04:09:38.000Z | import unittest
from . import utils
utils.DEBUG = True
from .tests import *
if __name__ == '__main__':
unittest.main()
| 11.363636 | 26 | 0.704 |
bf4264f89654a735ce3fb476ae27c1a0926bd33b | 922 | py | Python | tx_manager/tx_module.py | unfoldingWord-dev/old-tx-manager | aa6ba4e9e87c53d1ff8bf964d8a3239199470cb4 | [
"MIT"
] | null | null | null | tx_manager/tx_module.py | unfoldingWord-dev/old-tx-manager | aa6ba4e9e87c53d1ff8bf964d8a3239199470cb4 | [
"MIT"
] | 1 | 2017-02-03T21:12:31.000Z | 2017-02-03T21:12:31.000Z | tx_manager/tx_module.py | unfoldingWord-dev/old-tx-manager | aa6ba4e9e87c53d1ff8bf964d8a3239199470cb4 | [
"MIT"
] | null | null | null | # TxModule class
from __future__ import print_function
from six import string_types
from six import iteritems
from tx_object import TxObject
class TxModule(TxObject):
db_fields = [
'name',
'input_format',
'options',
'output_format',
'private_links',
'public_links'... | 22.487805 | 45 | 0.575922 |
48b4db2ca670387ecbe5acaccb25bf9b5bdb42c8 | 1,088 | py | Python | example/myshop/models/i18n_polymorphic/commodity.py | haitwang-cloud/django-shop | 8ac767a42022d66d226c0bb342f16ac3df3ca30b | [
"BSD-3-Clause"
] | 39 | 2015-02-21T00:45:02.000Z | 2020-05-18T14:46:09.000Z | example/myshop/models/i18n_polymorphic/commodity.py | haitwang-cloud/django-shop | 8ac767a42022d66d226c0bb342f16ac3df3ca30b | [
"BSD-3-Clause"
] | 46 | 2015-02-03T19:51:37.000Z | 2017-03-24T23:40:14.000Z | example/myshop/models/i18n_polymorphic/commodity.py | haitwang-cloud/django-shop | 8ac767a42022d66d226c0bb342f16ac3df3ca30b | [
"BSD-3-Clause"
] | 23 | 2015-04-12T09:03:41.000Z | 2020-04-14T16:38:35.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models.fields import PlaceholderField
from parler.managers import TranslatableManager
from shop.money.fields import MoneyField
from .product import Product
cla... | 27.2 | 94 | 0.699449 |
f7b42a13f2b5019382b39ea795b3bb151b6ce7f3 | 9,659 | py | Python | pyadlml/dataset/plot/act_and_devs.py | tcsvn/pyadlml | 9b87d223ba0ef9814ba830263dd35fc6432fae87 | [
"MIT"
] | 4 | 2020-11-11T17:29:10.000Z | 2021-01-08T20:55:47.000Z | pyadlml/dataset/plot/act_and_devs.py | tcsvn/pyadlml | 9b87d223ba0ef9814ba830263dd35fc6432fae87 | [
"MIT"
] | null | null | null | pyadlml/dataset/plot/act_and_devs.py | tcsvn/pyadlml | 9b87d223ba0ef9814ba830263dd35fc6432fae87 | [
"MIT"
] | 5 | 2020-10-05T03:23:31.000Z | 2022-01-25T19:15:34.000Z | import matplotlib.pyplot as plt
import matplotlib
import numpy as np
from mpl_toolkits.axes_grid1 import make_axes_locatable
from pyadlml.dataset.stats import contingency_duration, contingency_triggers,\
contingency_triggers_01
from pyadlml.dataset.plot.util import func_formatter_seconds2time, \
heatmap_square... | 39.913223 | 104 | 0.662802 |
7418c7703c30f166c5c3ae10934d5054c0045299 | 2,175 | py | Python | examples/simple/salpeter.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 131 | 2015-06-04T09:06:57.000Z | 2022-02-01T12:11:29.000Z | examples/simple/salpeter.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 690 | 2015-10-17T12:18:08.000Z | 2022-03-31T16:15:58.000Z | examples/simple/salpeter.py | rieder/amuse | 3ac3b6b8f922643657279ddee5c8ab3fc0440d5e | [
"Apache-2.0"
] | 102 | 2015-01-22T10:00:29.000Z | 2022-02-09T13:29:43.000Z | # -*- coding: ascii -*-
"""
Generates a cluster using a plummer model with a salpeter Initial Mass
Function.
Compares the generated IMF against the expected line.
"""
from __future__ import print_function
import numpy
from matplotlib import pyplot
from amuse.units import units
from amuse.units import nbody_system
from ... | 27.531646 | 78 | 0.684138 |
be9ef8ad61658cdbede5a7e2ba5ddcb202c28c88 | 463 | py | Python | scriptsForPreprocessing/change_json.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | scriptsForPreprocessing/change_json.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | scriptsForPreprocessing/change_json.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import os, json
path_to_annotations = os.path.join(r'resources/fishial/train', 'via_region_data.json')
json_tmp = json.load(open(path_to_annotations))
result_dictionary = {}
for idx, name_record in enumerate(json_tmp):
dict = json_tmp[name_record]
dict.update({"verified": False})
dict.update({"correct": Fal... | 38.583333 | 86 | 0.732181 |
7ce005cf3efe02e11ec66498fb045dfcc1e13a82 | 4,743 | py | Python | datasets/sepedi_ner/sepedi_ner.py | PierreColombo/datasets | c22ec7e64edb6596a6ff5894712dea4dc5441de8 | [
"Apache-2.0"
] | 1 | 2021-07-29T06:28:28.000Z | 2021-07-29T06:28:28.000Z | datasets/sepedi_ner/sepedi_ner.py | norabelrose/datasets | b0511c65b32d1103d34cb5ac9ffb50e9cf387843 | [
"Apache-2.0"
] | null | null | null | datasets/sepedi_ner/sepedi_ner.py | norabelrose/datasets | b0511c65b32d1103d34cb5ac9ffb50e9cf387843 | [
"Apache-2.0"
] | 1 | 2021-05-04T16:54:23.000Z | 2021-05-04T16:54:23.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | 34.620438 | 200 | 0.540375 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.