hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bc9831a2545b162924110599d27de9217476cd42 | 2,221 | py | Python | adminmgr/media/code/A2/python/task/BD_0012_0792_0948_1324.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/A2/python/task/BD_0012_0792_0948_1324.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/A2/python/task/BD_0012_0792_0948_1324.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z | from __future__ import print_function
import re
import sys
from operator import add
from pyspark.sql import SparkSession
def computeContribs(url, rank):
num_urls = len(url)
for i in url:
yield (i, rank / num_urls)
def parseNeighbors(url):
prts = re.split(r',', url)
avg = int(prts[2])/int(prts[3])
retu... | 26.129412 | 126 | 0.681225 |
259a39f4687f9ab98977b05605864d2624c92300 | 5,332 | py | Python | integration-tests/test/test_unbond.py | woky/rchain | 76ba93f4349fa525eb08d0b3f1751c23e0de74e2 | [
"Apache-2.0"
] | null | null | null | integration-tests/test/test_unbond.py | woky/rchain | 76ba93f4349fa525eb08d0b3f1751c23e0de74e2 | [
"Apache-2.0"
] | 7 | 2019-12-27T14:15:35.000Z | 2019-12-30T01:06:20.000Z | integration-tests/test/test_unbond.py | woky/rchain | 76ba93f4349fa525eb08d0b3f1751c23e0de74e2 | [
"Apache-2.0"
] | null | null | null | from random import Random
import pytest
from docker.client import DockerClient
from rchain.crypto import PrivateKey
from . import conftest
from .common import (
CommandLineOptions,
NotAnActiveValidatorError
)
from .rnode import (
bootstrap_connected_peer,
ready_bootstrap_with_network,
)
from .wait impo... | 46.77193 | 213 | 0.737622 |
7783a6e922740fe642a3b5b9dd3f0d4e5f2f6c48 | 121 | py | Python | zevon/__init__.py | muckamuck/zevon | c1315fe7d62d0474e59157a5c351e47d6b9056d7 | [
"MIT"
] | null | null | null | zevon/__init__.py | muckamuck/zevon | c1315fe7d62d0474e59157a5c351e47d6b9056d7 | [
"MIT"
] | null | null | null | zevon/__init__.py | muckamuck/zevon | c1315fe7d62d0474e59157a5c351e47d6b9056d7 | [
"MIT"
] | null | null | null | from zevon.flask_lambda import FlaskLambda # noqa
from zevon.welcome import welcome_html # noqa
version = '0.2.0'
| 24.2 | 50 | 0.743802 |
a1368c980d7e27c4eb85e10aa9ef0813ca504c48 | 1,292 | py | Python | Code/AISmartHome/SmartHome/urls.py | ykzzyk/SmartHomeRemoteControl_STM32 | 509417c94eac491182cd074039b773848c30421b | [
"MIT"
] | null | null | null | Code/AISmartHome/SmartHome/urls.py | ykzzyk/SmartHomeRemoteControl_STM32 | 509417c94eac491182cd074039b773848c30421b | [
"MIT"
] | null | null | null | Code/AISmartHome/SmartHome/urls.py | ykzzyk/SmartHomeRemoteControl_STM32 | 509417c94eac491182cd074039b773848c30421b | [
"MIT"
] | null | null | null | # """SmartHome URL Configuration
#
# The `urlpatterns` list routes URLs to views. For more information please see:
# https://docs.djangoproject.com/en/2.1/topics/http/urls/
# Examples:
# Function views
# 1. Add an import: from my_app import views
# 2. Add a URL to urlpatterns: path('', views.home, name='h... | 32.3 | 79 | 0.698142 |
aaf7880f1242b7357bacc047b53f3a8435bac171 | 29,745 | py | Python | test/test_transforms_tensor.py | shrutipulstya/vision | 85982ac695e78af80bf59cd9c855e1729b7376f5 | [
"BSD-3-Clause"
] | 1 | 2021-09-18T07:47:12.000Z | 2021-09-18T07:47:12.000Z | test/test_transforms_tensor.py | shrutipulstya/vision | 85982ac695e78af80bf59cd9c855e1729b7376f5 | [
"BSD-3-Clause"
] | 4 | 2021-11-06T09:11:19.000Z | 2021-11-22T09:21:26.000Z | test/test_transforms_tensor.py | shrutipulstya/vision | 85982ac695e78af80bf59cd9c855e1729b7376f5 | [
"BSD-3-Clause"
] | null | null | null | import os
import torch
from torchvision import transforms as T
from torchvision.transforms import functional as F
from torchvision.transforms import InterpolationMode
import numpy as np
import pytest
from typing import Sequence
from common_utils import (
get_tmp_dir,
int_dtypes,
float_dtypes,
_create... | 41.427577 | 110 | 0.690637 |
3361bd10369b5aa3cf8da7b19bd89acb30a1fe4c | 11,493 | py | Python | test/test_text.py | prmths128/pattern | e8870e117f94306d7bcbf3ea9dea808c4d94b037 | [
"BSD-3-Clause"
] | null | null | null | test/test_text.py | prmths128/pattern | e8870e117f94306d7bcbf3ea9dea808c4d94b037 | [
"BSD-3-Clause"
] | null | null | null | test/test_text.py | prmths128/pattern | e8870e117f94306d7bcbf3ea9dea808c4d94b037 | [
"BSD-3-Clause"
] | 1 | 2017-04-15T21:35:34.000Z | 2017-04-15T21:35:34.000Z | # -*- coding: utf-8 -*-
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import unittest
import StringIO
from pattern import text
#---------------------------------------------------------------------------------------------------
class TestLexicon(unittest.TestCase):
def se... | 42.724907 | 107 | 0.516314 |
8a68ebcade19cfd73d66e039b6407c878a9ab3ca | 2,852 | py | Python | ml/kubeflow-argo/components/dataflow/tft/preprocessing.py | dk-wei/GCP-code-snippets | c23ca7f2981b5df946448b20a54f823ce52bba05 | [
"Apache-2.0"
] | null | null | null | ml/kubeflow-argo/components/dataflow/tft/preprocessing.py | dk-wei/GCP-code-snippets | c23ca7f2981b5df946448b20a54f823ce52bba05 | [
"Apache-2.0"
] | null | null | null | ml/kubeflow-argo/components/dataflow/tft/preprocessing.py | dk-wei/GCP-code-snippets | c23ca7f2981b5df946448b20a54f823ce52bba05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 32.044944 | 81 | 0.745091 |
b174081190d9d4c7cfbbc684ab083f68f3838451 | 528 | py | Python | src/pytorch_metric_learning/regularizers/lp_regularizer.py | wconnell/pytorch-metric-learning | 1affee7c77bb5d6d4ee559bad62b910a21b39d48 | [
"MIT"
] | 1 | 2021-01-27T03:36:19.000Z | 2021-01-27T03:36:19.000Z | src/pytorch_metric_learning/regularizers/lp_regularizer.py | umitkacar/pytorch-metric-learning | bf2b7675b7b80e5762b75428d51e4ab0a861e710 | [
"MIT"
] | null | null | null | src/pytorch_metric_learning/regularizers/lp_regularizer.py | umitkacar/pytorch-metric-learning | bf2b7675b7b80e5762b75428d51e4ab0a861e710 | [
"MIT"
] | null | null | null | from .base_regularizer import BaseRegularizer
import torch
from ..utils import common_functions as c_f
class LpRegularizer(BaseRegularizer):
def __init__(self, p=2, **kwargs):
super().__init__(**kwargs)
self.p = p
self.add_to_recordable_attributes(list_of_names=["p"], is_stat=False)
de... | 40.615385 | 120 | 0.700758 |
4ce2599f67f7338f7e6e25df457344e53cfb1300 | 13,925 | py | Python | stumpy/aamp_ostinato.py | profintegra/stumpy | 66b3402d91820005b466e1da6fe353b61e6246c5 | [
"BSD-3-Clause"
] | 1 | 2021-07-27T11:14:01.000Z | 2021-07-27T11:14:01.000Z | stumpy/aamp_ostinato.py | profintegra/stumpy | 66b3402d91820005b466e1da6fe353b61e6246c5 | [
"BSD-3-Clause"
] | null | null | null | stumpy/aamp_ostinato.py | profintegra/stumpy | 66b3402d91820005b466e1da6fe353b61e6246c5 | [
"BSD-3-Clause"
] | null | null | null | # STUMPY
# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license.
# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.
import numpy as np
from . import core, aamp, aamped
def _aamp_across_series_nearest_neighbors(
Ts, Ts_idx, subseq_idx, m, Ts_squared, Ts_s... | 35.796915 | 88 | 0.668366 |
c14ef9ef02c8aa7dd860a77880c3ef8658cf1651 | 759 | py | Python | testenv.py | Luoyayu/Machine-Learning | 24cd81680cf901f3bf35d19f6cbae7df16b5e547 | [
"MIT"
] | null | null | null | testenv.py | Luoyayu/Machine-Learning | 24cd81680cf901f3bf35d19f6cbae7df16b5e547 | [
"MIT"
] | null | null | null | testenv.py | Luoyayu/Machine-Learning | 24cd81680cf901f3bf35d19f6cbae7df16b5e547 | [
"MIT"
] | null | null | null | import tensorflow, keras, torch, sklearn
import numpy, scipy, pandas
import matplotlib
import matplotlib.pylab as plt
import cv2, PIL
import IPython, jupyterlab
from termcolor import cprint
import os, sys
colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan']
def c(modules):
for i, module in enumerate(mod... | 28.111111 | 113 | 0.671937 |
dc2c96d4489b2d15ffe329c87549f31c307863d0 | 608 | py | Python | examples/get_token.py | apivideo/api.video-python | 7c5c70a9a638c2c1d3af18aabb09dda7b4db32a4 | [
"MIT"
] | 6 | 2021-05-20T08:51:27.000Z | 2021-10-07T16:04:32.000Z | examples/get_token.py | apivideo/python-api-client | 9de1127aee8ed36c42084357bfa3cda54110554a | [
"MIT"
] | 1 | 2022-03-21T17:15:29.000Z | 2022-03-22T09:10:10.000Z | examples/get_token.py | apivideo/python-api-client | 9de1127aee8ed36c42084357bfa3cda54110554a | [
"MIT"
] | 1 | 2022-03-01T08:58:02.000Z | 2022-03-01T08:58:02.000Z | # Get information about a single token using the token ID
import apivideo
from apivideo.apis import UploadTokensApi
from apivideo.exceptions import ApiAuthException
# Set variables
api_key = "your api key here"
token = "your token ID here"
# Set up the client
client = apivideo.AuthenticatedApiClient(api_key)
# If yo... | 27.636364 | 69 | 0.804276 |
4e8061359da269053ee90808b14e247f3d572db5 | 876 | py | Python | src/session/twitter/gui/__init__.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 21 | 2015-08-02T21:26:14.000Z | 2019-12-27T09:57:44.000Z | src/session/twitter/gui/__init__.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 34 | 2015-01-12T00:38:14.000Z | 2020-08-31T11:19:37.000Z | src/session/twitter/gui/__init__.py | Oire/TheQube | fcfd8a68b15948e0740642d635db24adef8cc314 | [
"MIT"
] | 15 | 2015-03-24T15:42:30.000Z | 2020-09-24T20:26:42.000Z | import configuration
import list_manager
from user_list import UserListDialog
from api_count import APICountDialog
from twitter_message import TwitterMessageDialog
from new_tweet import NewTweetDialog
from new_dm import NewDirectDialog
from new_reply import NewReplyDialog
from search import TwitterSearchDialog
... | 38.086957 | 57 | 0.876712 |
a288ae979ef7016fc1cb802c94ad9de5882033ca | 3,653 | py | Python | build.py | karellen/wheel-axle-runtime | 1e1937c9fb470214f546bb8ca5ad9fbce739bcfe | [
"Apache-2.0"
] | 1 | 2022-03-16T09:00:51.000Z | 2022-03-16T09:00:51.000Z | build.py | karellen/wheel-axle-runtime | 1e1937c9fb470214f546bb8ca5ad9fbce739bcfe | [
"Apache-2.0"
] | 4 | 2022-01-29T19:39:27.000Z | 2022-02-01T02:56:47.000Z | build.py | karellen/wheel-axle-runtime | 1e1937c9fb470214f546bb8ca5ad9fbce739bcfe | [
"Apache-2.0"
] | 1 | 2022-02-21T06:01:47.000Z | 2022-02-21T06:01:47.000Z | # -*- coding: utf-8 -*-
#
# (C) Copyright 2022 Karellen, Inc. (https://www.karellen.co/)
#
# 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
#
#... | 38.861702 | 90 | 0.701068 |
e564cb38713b30beeaa0301fdfbb0ee7465cf3a8 | 748 | py | Python | alipay/aop/api/response/AlipayFundTransEdumigrateMigrateserviceModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayFundTransEdumigrateMigrateserviceModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayFundTransEdumigrateMigrateserviceModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayFundTransEdumigrateMigrateserviceModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayFundTransEdumigrateMigrateserviceModifyResponse, self).__init__()
... | 28.769231 | 126 | 0.727273 |
792055328fb79226606fce106fdc0481bcae4925 | 1,421 | py | Python | implementation/dataloader.py | minus31/BlazeFace | bddfb3261868b1a888408898c3de9bf6e12a372d | [
"MIT"
] | 44 | 2019-08-31T03:08:10.000Z | 2022-03-25T09:10:05.000Z | implementation/dataloader.py | minus31/BlazeFace | bddfb3261868b1a888408898c3de9bf6e12a372d | [
"MIT"
] | 4 | 2019-09-10T07:25:00.000Z | 2022-01-08T17:40:18.000Z | implementation/dataloader.py | minus31/BlazeFace | bddfb3261868b1a888408898c3de9bf6e12a372d | [
"MIT"
] | 10 | 2019-09-04T12:16:48.000Z | 2021-09-03T07:02:44.000Z | import cv2
import pickle
import glob
import os
import numpy as np
IM_EXTENSIONS = ['png', 'jpg', 'bmp']
def read_img(img_path, img_shape=(128,128)):
"""
load image file and divide by 255.
"""
img = cv2.imread(img_path)
img = cv2.resize(img, img_shape)
img /= 255.
return img
def dat... | 22.919355 | 94 | 0.594652 |
d8bde17fee9517eb2241cecfe8cf3c5e3b9eccc3 | 2,203 | py | Python | hsds/util/attrUtil.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | 1 | 2020-03-12T12:26:26.000Z | 2020-03-12T12:26:26.000Z | hsds/util/attrUtil.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | null | null | null | hsds/util/attrUtil.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# Th... | 38.649123 | 85 | 0.533818 |
c5914ba3bb3716efabe834afd8a988be077a0f88 | 7,261 | py | Python | util/LoadDatabase.py | MaxZZG/ExprLib | c35e361ef6af365e7cd6afca6548595693bd149a | [
"MIT"
] | null | null | null | util/LoadDatabase.py | MaxZZG/ExprLib | c35e361ef6af365e7cd6afca6548595693bd149a | [
"MIT"
] | null | null | null | util/LoadDatabase.py | MaxZZG/ExprLib | c35e361ef6af365e7cd6afca6548595693bd149a | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------
import numpy
class FieldInfo:
'''Provides information about the field including its name, size, and ghosts'''
def __init__(self):
self.name = ''
self.npts = numpy.array( [0, 0, 0] )
self.nghost = 0
def __init_... | 36.487437 | 120 | 0.546757 |
c4b7678cf2c63df388c8eff22f694fb2a4ae464b | 435 | py | Python | src/226. Invert Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | 1 | 2019-12-16T08:18:25.000Z | 2019-12-16T08:18:25.000Z | src/226. Invert Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | null | null | null | src/226. Invert Binary Tree.py | rajshrivastava/LeetCode | dfe6342fe22b324429b0be3e5c0fef46c7e6b3b0 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
if not root: return
root.right, root.left ... | 31.071429 | 55 | 0.613793 |
f25be94f54fcc33e547b855ac4e0f939eb19bc14 | 64,398 | py | Python | yaetos/etl_utils.py | arthurprevot/yaetos | 5eba59538f8e53c3d7033b0af80a25828c24a43e | [
"Apache-2.0"
] | 8 | 2022-02-15T20:39:55.000Z | 2022-03-24T20:50:18.000Z | yaetos/etl_utils.py | arthurprevot/yaetos | 5eba59538f8e53c3d7033b0af80a25828c24a43e | [
"Apache-2.0"
] | 2 | 2021-11-01T20:42:32.000Z | 2021-12-09T23:13:47.000Z | yaetos/etl_utils.py | arthurprevot/yaetos | 5eba59538f8e53c3d7033b0af80a25828c24a43e | [
"Apache-2.0"
] | 2 | 2022-03-18T00:59:29.000Z | 2022-03-24T20:52:00.000Z | """
Helper functions. Setup to run locally and on cluster.
"""
# TODO:
# - add linter
# - finish _metadata.txt file content.
# - get inputs and output by commandline (with all related params used in yml, like 'type', 'incr'...).
# - better check that db copy is in sync with S3.
# - way to run all jobs from 1 cmd line.
... | 55.515517 | 336 | 0.63401 |
5bb666162181416e06b6984b17c3bf9515b89bb3 | 24,736 | py | Python | envs/car_racing/AttentionAgent/car_racing.py | amansinha/neural-bridge | 5955bcb59a9c3519834069186637472738606898 | [
"MIT"
] | 3 | 2021-02-23T06:14:40.000Z | 2022-02-06T09:42:01.000Z | envs/car_racing/AttentionAgent/car_racing.py | amansinha/neural-bridge | 5955bcb59a9c3519834069186637472738606898 | [
"MIT"
] | null | null | null | envs/car_racing/AttentionAgent/car_racing.py | amansinha/neural-bridge | 5955bcb59a9c3519834069186637472738606898 | [
"MIT"
] | 2 | 2021-04-15T12:09:21.000Z | 2021-12-11T16:55:14.000Z | """This file is based on the car_racing.py in OpenAI's gym.
Description
We provide 3 modified CarRacing environments here:
1. CarRacingColor-v0
Both the lane and the grass colors are perturbed at the env.reset().
2. CarRacingBar-v0
We add vertical bars on the left and right side of the scre... | 38.589704 | 120 | 0.552676 |
4ea53d53f8551b5cee2aa6cc4c687edf8f2fa83e | 904 | py | Python | sdk/python/pulumi_azure_native/relay/v20170401/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/relay/v20170401/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/relay/v20170401/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from ... import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .get_hybrid_connection import *
from .g... | 34.769231 | 80 | 0.800885 |
dc53577430a5bdda00c7728e4f0d77513fd666e5 | 2,122 | py | Python | mqttsqlite/mqttsqlite.py | gemasr/mqttSqlLite | aa6b5515bcd2bf47ae1207a241886a506a86ec0c | [
"MIT"
] | null | null | null | mqttsqlite/mqttsqlite.py | gemasr/mqttSqlLite | aa6b5515bcd2bf47ae1207a241886a506a86ec0c | [
"MIT"
] | null | null | null | mqttsqlite/mqttsqlite.py | gemasr/mqttSqlLite | aa6b5515bcd2bf47ae1207a241886a506a86ec0c | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
from .core.mqtt_controller import MqttController
from .orm.models import Setting, create_tables
import argparse
from .settings.private_settings import *
def on_connect(client, userdata, flags, rc):
print('connecting...')
mqtt_controller = MqttController()
mqtt_controller.on... | 35.366667 | 128 | 0.705467 |
a0c8633a024b672af1374e38374758af8f7e7725 | 685 | py | Python | venues/migrations/0024_auto_20190723_2130.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | venues/migrations/0024_auto_20190723_2130.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | venues/migrations/0024_auto_20190723_2130.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | # Generated by Django 2.2.3 on 2019-07-23 21:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("venues", "0023_auto_20190723_0226"),
]
operations = [
migrations.AddField(
model_name="venue",
name="latitude",
... | 24.464286 | 70 | 0.550365 |
54f6e399113ff38c9ed6834aca56c4b14e80e92c | 2,307 | py | Python | src/yawgmoth.py | Providenciyye/yawgmoth | 7f3b4bba26919ca29fdcfe58edc595f17c905a2b | [
"MIT"
] | null | null | null | src/yawgmoth.py | Providenciyye/yawgmoth | 7f3b4bba26919ca29fdcfe58edc595f17c905a2b | [
"MIT"
] | null | null | null | src/yawgmoth.py | Providenciyye/yawgmoth | 7f3b4bba26919ca29fdcfe58edc595f17c905a2b | [
"MIT"
] | null | null | null | # ---------------------------
# Imports
# ---------------------------
import discord
import sys
import commands
# ---------------------------
# Initialization
# ---------------------------
yawgmoth = discord.Client()
yawgmoth.login(sys.argv[1], sys.argv[2])
# ---------------------------
# Event: Ready
# -------------... | 34.954545 | 84 | 0.596879 |
8665aef169380074e912f71217b8fbe735936c81 | 6,542 | py | Python | dask/array/wrap.py | JimCircadian/dask | 212c1058c19fa543d60d9a294f8f9feda3e1c9dc | [
"BSD-3-Clause"
] | null | null | null | dask/array/wrap.py | JimCircadian/dask | 212c1058c19fa543d60d9a294f8f9feda3e1c9dc | [
"BSD-3-Clause"
] | null | null | null | dask/array/wrap.py | JimCircadian/dask | 212c1058c19fa543d60d9a294f8f9feda3e1c9dc | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from itertools import product
import numpy as np
from tlz import curry
from ..base import tokenize
from ..layers import BlockwiseCreateArray
from ..utils import funcname
from .core import Array, normalize_chunks
from .utils import (
empty_like_safe,
full_like_safe,
meta_from_... | 28.077253 | 87 | 0.64491 |
2a3cdcab4a9349beeb80478d7c2c283f13bf8d4d | 290 | py | Python | lcd-tester.py | stefan-krstikj/pi-weather-display | 0db0a3387ba4ab90135776faeafa42914cfcea9f | [
"MIT"
] | null | null | null | lcd-tester.py | stefan-krstikj/pi-weather-display | 0db0a3387ba4ab90135776faeafa42914cfcea9f | [
"MIT"
] | null | null | null | lcd-tester.py | stefan-krstikj/pi-weather-display | 0db0a3387ba4ab90135776faeafa42914cfcea9f | [
"MIT"
] | null | null | null | # import necessary libraries
from lcd import lcddriver
import time
import pyowm
# initialize the display
lcd = lcddriver.lcd()
lcd.lcd_display_string("test string 1", 1)
time.sleep(2)
lcd.centered = 1
lcd.lcd_clear()
time.sleep(2)
lcd.lcd_display_string("test string 2", 1)
time.sleep(1) | 18.125 | 42 | 0.765517 |
33c72717e7f84774d886b46612092f183e348704 | 943 | py | Python | CyberPi/Python with CyberPi 021.py | nothingszpt/PythonWithHardware | 95b580824f1bb11e36c0a27fdcbd4aec07548b59 | [
"MIT"
] | 2 | 2020-08-15T02:49:19.000Z | 2020-08-15T02:49:31.000Z | CyberPi/Python with CyberPi 021.py | nothingszpt/PythonWithHardware | 95b580824f1bb11e36c0a27fdcbd4aec07548b59 | [
"MIT"
] | null | null | null | CyberPi/Python with CyberPi 021.py | nothingszpt/PythonWithHardware | 95b580824f1bb11e36c0a27fdcbd4aec07548b59 | [
"MIT"
] | 1 | 2022-02-24T05:30:30.000Z | 2022-02-24T05:30:30.000Z | """"
名称:021 音效的终止
硬件:童芯派
功能介绍:通过条件语句和break关键字结束音效的播放。
难度:⭐⭐
支持的模式:在线 上传
使用功能解读:
1. cyberpi.audio.play_drum("bass-drum", 0.25)
童芯派.音效.架子鼓(“type”,beat)
tpye处填入音效类型,beat参数填入节拍,0.25拍约等于0.25秒
2.break
结束
一般与if语句一起使用,用于跳出当前所在的循环。
"""
# ---------程序分割线----------------程序分割线----------------程序分割线----------
import ... | 27.735294 | 77 | 0.518558 |
1b8a7abbc129e30921e2726d3c4e327b2ee8759c | 4,467 | py | Python | stats/basic_research/minimal_diff_between_sublineage.py | methylgrammarlab/proj_scwgbs | 287196898796eb617fef273bfaf9e978a57047dc | [
"MIT"
] | null | null | null | stats/basic_research/minimal_diff_between_sublineage.py | methylgrammarlab/proj_scwgbs | 287196898796eb617fef273bfaf9e978a57047dc | [
"MIT"
] | null | null | null | stats/basic_research/minimal_diff_between_sublineage.py | methylgrammarlab/proj_scwgbs | 287196898796eb617fef273bfaf9e978a57047dc | [
"MIT"
] | null | null | null | import argparse
import glob
import itertools
import os
import re
import sys
import numpy as np
import pandas as pd
from tqdm import tqdm
HIGH_T = 0.5
LOW_T = 0.25
MID = 0.5
sys.path.append(os.getcwd())
from format_files.format_cpg_context_map import NUMBER_OF_ORPH_PER_INDEX
from commons import consts
from format_fil... | 32.369565 | 108 | 0.680099 |
634f0c111d44660dddd56a07d5518f7f7a92e86b | 10,182 | py | Python | Xenios-Source/contrib/linearize/linearize-data.py | cspiliakos/xenioscoin | a80871d38fffc328b6dfd2d7cd919e373153a35b | [
"MIT"
] | 3 | 2020-12-19T11:26:09.000Z | 2022-02-14T22:51:03.000Z | Xenios-Source/contrib/linearize/linearize-data.py | cspiliakos/xenioscoin | a80871d38fffc328b6dfd2d7cd919e373153a35b | [
"MIT"
] | 1 | 2021-02-13T23:44:16.000Z | 2021-02-14T00:58:28.000Z | Xenios-Source/contrib/linearize/linearize-data.py | cspiliakos/xenioscoin | a80871d38fffc328b6dfd2d7cd919e373153a35b | [
"MIT"
] | 7 | 2021-02-13T09:35:43.000Z | 2022-02-14T22:51:05.000Z | #!/usr/bin/env python3
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print... | 31.233129 | 108 | 0.693184 |
3fb2498f5bb2cbbb17d6f6f559fafef97689bee8 | 4,326 | py | Python | LeetCode-All-Solution/Python3/LC-0088-Merge-Sorted-Array.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | LeetCode-All-Solution/Python3/LC-0088-Merge-Sorted-Array.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | LeetCode-All-Solution/Python3/LC-0088-Merge-Sorted-Array.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""=================================================================
@Project : Algorithm_YuweiYin/LeetCode-All-Solution/Python3
@File : LC-0088-Merge-Sorted-Array.py
@Author : [YuweiYin](https://github.com/YuweiYin)
@Date : 2022-02-26
================================... | 33.534884 | 118 | 0.579519 |
b9719d3980459b485d7e943cc669f1e86b6c962f | 3,268 | py | Python | python/GafferSceneUI/SeedsUI.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | 1 | 2019-08-02T16:49:59.000Z | 2019-08-02T16:49:59.000Z | python/GafferSceneUI/SeedsUI.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | 2 | 2017-08-23T21:35:45.000Z | 2018-01-29T08:59:33.000Z | python/GafferSceneUI/SeedsUI.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | 1 | 2020-12-21T12:33:49.000Z | 2020-12-21T12:33:49.000Z | ##########################################################################
#
# Copyright (c) 2015, Image Engine Design 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:
#
# * Redistrib... | 27.008264 | 77 | 0.666157 |
5e9d100ffdb20907c47774e37825ac06a237621f | 7,835 | py | Python | lib/nms/nms.py | eyecan-dev/HRNet-for-Fashion-Landmark-Estimation.PyTorch | 63dcb75836ebb8896307c9e5a62be8a475de8323 | [
"MIT"
] | 76 | 2020-04-29T09:20:46.000Z | 2022-02-23T11:54:45.000Z | lib/nms/nms.py | eyecan-dev/HRNet-for-Fashion-Landmark-Estimation.PyTorch | 63dcb75836ebb8896307c9e5a62be8a475de8323 | [
"MIT"
] | 10 | 2020-07-07T02:30:57.000Z | 2021-12-28T06:57:01.000Z | lib/nms/nms.py | eyecan-dev/HRNet-for-Fashion-Landmark-Estimation.PyTorch | 63dcb75836ebb8896307c9e5a62be8a475de8323 | [
"MIT"
] | 19 | 2020-04-29T09:20:47.000Z | 2022-02-26T22:31:49.000Z | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn)
# ------------------------------------------------------------------------------
from __future__ imp... | 35.292793 | 123 | 0.553542 |
e30cd8048d434f79b20b31fc753fe599a98a4b40 | 14,070 | py | Python | kivy/tests/test_lang_pre_process_and_post_process.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 13,889 | 2015-01-01T06:43:41.000Z | 2022-03-31T17:37:56.000Z | kivy/tests/test_lang_pre_process_and_post_process.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 4,570 | 2015-01-01T17:58:52.000Z | 2022-03-31T18:42:16.000Z | kivy/tests/test_lang_pre_process_and_post_process.py | Galland/kivy | 95a6bf279883d706f645e4629c16d5ee1038f0ec | [
"MIT"
] | 3,786 | 2015-01-01T09:20:45.000Z | 2022-03-30T21:15:05.000Z | import unittest
import textwrap
from collections import defaultdict
class TrackCallbacks(object):
kv_pre_events = []
'''Stores values added during the pre event dispatched callbacks.
'''
kv_applied_events = []
'''Stores values added during the applied event dispatched callbacks.
'''
kv_... | 35.620253 | 79 | 0.589055 |
27c92a2f9b87bd9b59602255de43786f4c456481 | 3,589 | py | Python | test/ontic_meta_test.py | neoinsanity/ontic | 2b313fb9fc45faf550791a797624c9997386c343 | [
"Apache-2.0"
] | 2 | 2017-11-06T12:01:20.000Z | 2021-03-01T23:52:41.000Z | test/ontic_meta_test.py | neoinsanity/ontic | 2b313fb9fc45faf550791a797624c9997386c343 | [
"Apache-2.0"
] | 1 | 2016-12-02T04:04:03.000Z | 2016-12-02T04:04:03.000Z | test/ontic_meta_test.py | neoinsanity/ontic | 2b313fb9fc45faf550791a797624c9997386c343 | [
"Apache-2.0"
] | 2 | 2015-06-26T22:24:57.000Z | 2016-12-01T02:15:36.000Z | """OnticMeta unit tests."""
from copy import copy, deepcopy
from test import utils
from ontic.meta import Meta
class SubType(Meta):
"""Sub-class of Meta for testing purposes."""
pass
class OnticMetaTest(utils.BaseTestCase):
"""Meta test cases."""
def test_ontic_meta_instantiation(self):
"... | 33.231481 | 67 | 0.580663 |
d72aa525f46a9af737f207a52a7c17772d907ae5 | 2,822 | py | Python | No_0040_Combination Sum II/combination_sum_ii_by_dfs_and_pruning.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | No_0040_Combination Sum II/combination_sum_ii_by_dfs_and_pruning.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | No_0040_Combination Sum II/combination_sum_ii_by_dfs_and_pruning.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
Each number in candidates may only be used once in the combination.
Note:
All numbers (including target) will be positive intege... | 24.754386 | 169 | 0.54713 |
6745526ccb572076077df7c7cbd55b62f7514c3d | 3,244 | py | Python | symmetricDistance/resources/manuscript/pyscripts/grid1_gt.py | CIDARLAB/stl_metrics | 1ec645b3b688356a8286d037b8c7447db043a3b6 | [
"BSD-3-Clause"
] | null | null | null | symmetricDistance/resources/manuscript/pyscripts/grid1_gt.py | CIDARLAB/stl_metrics | 1ec645b3b688356a8286d037b8c7447db043a3b6 | [
"BSD-3-Clause"
] | null | null | null | symmetricDistance/resources/manuscript/pyscripts/grid1_gt.py | CIDARLAB/stl_metrics | 1ec645b3b688356a8286d037b8c7447db043a3b6 | [
"BSD-3-Clause"
] | null | null | null |
from ana_STL import STL_computation
from ana_STL import directed_distance
F=STL_computation(2,105)
f_0 = F.add_predicate(1,"<",0.1)
f_1 = F.add_predicate(2,"<",0.6)
f_2 = F.Conj([f_0, f_1])
f_3 = F.add_predicate(2,">=",0.4)
f_4 = F.Conj([f_2, f_3])
f_5 = F.G(range(0, 10+1), f_4)
f_6 = F.add_predicate(1,">=",0.7)
f_7... | 30.317757 | 37 | 0.607275 |
9900002a9449fc8bdf4d2159f28f6aa7ce3210af | 2,639 | py | Python | bspump/declarative/expression/statement/whenexpr.py | LibertyAces/BitSwanPump | 02301bfd4e807836403ce6a22030ad47058541d6 | [
"BSD-3-Clause"
] | 17 | 2019-02-14T09:26:03.000Z | 2022-03-11T09:23:52.000Z | bspump/declarative/expression/statement/whenexpr.py | LibertyAces/BitSwanPump | 02301bfd4e807836403ce6a22030ad47058541d6 | [
"BSD-3-Clause"
] | 91 | 2019-05-06T18:59:02.000Z | 2022-01-11T06:22:32.000Z | bspump/declarative/expression/statement/whenexpr.py | LibertyAces/BitSwanPump | 02301bfd4e807836403ce6a22030ad47058541d6 | [
"BSD-3-Clause"
] | 10 | 2019-04-23T08:48:58.000Z | 2022-02-13T14:24:28.000Z | from ...abc import Expression
from ..value.valueexpr import VALUE
class WHEN(Expression):
"""
Checks "if" condition passes - it is an `if` on steroids ;-)
!WHEN
- is:
!EQ
- !ITEM EVENT eggs
- 2
then: eggs
- is:
!LT
- 9
- !ITEM EVENT potatoes
- 11
then: potatoes
- else:
Nah
"""
Attribut... | 22.947826 | 78 | 0.656309 |
757d1bceb9d8c5508c05ffb26137eaa3bef020b2 | 6,532 | py | Python | Support/_old/bin/flake8/mccabe.py | fish2000/__OST2__.tmbundle | a9b55c689e87ea94b373da99849512162c5071e6 | [
"MIT"
] | null | null | null | Support/_old/bin/flake8/mccabe.py | fish2000/__OST2__.tmbundle | a9b55c689e87ea94b373da99849512162c5071e6 | [
"MIT"
] | null | null | null | Support/_old/bin/flake8/mccabe.py | fish2000/__OST2__.tmbundle | a9b55c689e87ea94b373da99849512162c5071e6 | [
"MIT"
] | null | null | null | """ Meager code path measurement tool.
Ned Batchelder
http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html
MIT License.
"""
import compiler, optparse, sys
class PathNode:
def __init__(self, name, look="circle"):
self.name = name
self.look = look
def to_dot(s... | 28.902655 | 107 | 0.567361 |
5825c437fcef107d5589ede0bc47dc1cf9036e2e | 846 | py | Python | admit/bdp/Table_inherit_BDP.py | astroumd/admit | bbf3d79bb6e1a6f7523553ed8ede0d358d106f2c | [
"MIT"
] | 4 | 2017-03-01T17:26:28.000Z | 2022-03-03T19:23:06.000Z | admit/bdp/Table_inherit_BDP.py | teuben/admit | 1cae54d1937c9af3f719102838df716e7e6d655c | [
"MIT"
] | 48 | 2016-10-04T01:25:33.000Z | 2021-09-08T14:51:10.000Z | admit/bdp/Table_inherit_BDP.py | teuben/admit | 1cae54d1937c9af3f719102838df716e7e6d655c | [
"MIT"
] | 2 | 2016-11-10T14:10:22.000Z | 2017-03-30T18:58:05.000Z | """
An example of inheriting from Table_BDP
"""
from Table_BDP import Table_BDP
import admit.util.bdp_types as bt
class Table_inherit_BDP(Table_BDP):
def __init__(self,xmlFile=None):
Table_BDP.__init__(self,xmlFile)
self.item1 = ["a","b"]
self.item2 = 0.0
self._version= "0.... | 30.214286 | 66 | 0.553191 |
2f4a45f9c166bbe630be9739baf430c2cab4e3fb | 65,704 | py | Python | pypey/pype.py | JoseLlarena/pypey | d61843e3a5df6363c2e868f98058546688312d30 | [
"MIT"
] | 1 | 2021-06-30T16:05:21.000Z | 2021-06-30T16:05:21.000Z | pypey/pype.py | JoseLlarena/pypey | d61843e3a5df6363c2e868f98058546688312d30 | [
"MIT"
] | null | null | null | pypey/pype.py | JoseLlarena/pypey | d61843e3a5df6363c2e868f98058546688312d30 | [
"MIT"
] | null | null | null | """
Main class for building streaming pipelines
"""
from __future__ import annotations
import json
from collections import defaultdict, deque
from inspect import signature, Parameter
from logging import getLogger
from multiprocessing import Pool
from operator import eq
from os import PathLike
from pickle import Pickli... | 36.401108 | 120 | 0.557516 |
7a18f4926517edc8b7c5f1c7852d4fcb39876715 | 5,683 | py | Python | image_classification/RepMLP/config.py | no-name-xiaosheng/PaddleViT | 50226a3be5095b3727d3c62d2eab23ef1e9612ec | [
"Apache-2.0"
] | 2 | 2021-11-23T02:01:52.000Z | 2021-11-23T02:02:03.000Z | image_classification/RepMLP/config.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | null | null | null | image_classification/RepMLP/config.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PPViT 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... | 30.553763 | 97 | 0.716171 |
a4974215afb79a1aa6fefe2f7a177de04784369e | 173 | py | Python | configs/litehrnet/hyperseg_litehr18_512x1024_160k_cityscapes.py | evgeniya-egupova/mmsegmentation | 3857f19321ad6af41c8a6af364898ee050225f4c | [
"Apache-2.0"
] | 3 | 2021-12-21T07:25:13.000Z | 2022-02-07T01:59:19.000Z | configs/litehrnet/hyperseg_litehr18_512x1024_160k_cityscapes.py | evgeniya-egupova/mmsegmentation | 3857f19321ad6af41c8a6af364898ee050225f4c | [
"Apache-2.0"
] | 13 | 2021-12-10T15:08:56.000Z | 2022-03-23T08:58:03.000Z | configs/litehrnet/hyperseg_litehr18_512x1024_160k_cityscapes.py | evgeniya-egupova/mmsegmentation | 3857f19321ad6af41c8a6af364898ee050225f4c | [
"Apache-2.0"
] | 3 | 2021-11-11T23:16:51.000Z | 2021-12-08T23:49:29.000Z | _base_ = [
'../_base_/models/hyperseg_litehr18.py', '../_base_/datasets/cityscapes.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_cos_160k.py'
]
| 34.6 | 80 | 0.693642 |
0a055f58b8a9a22f7ca382c1a67ee7f7f71b515f | 6,602 | py | Python | terrainbento/boundary_handlers/capture_node_baselevel_handler.py | alexmitchell/terrainbento | b8f6dd7fd9c96d3a40e0d1f8cd41b1dfe8d0b5da | [
"MIT"
] | 18 | 2018-03-06T01:17:12.000Z | 2022-02-11T16:10:31.000Z | terrainbento/boundary_handlers/capture_node_baselevel_handler.py | alexmitchell/terrainbento | b8f6dd7fd9c96d3a40e0d1f8cd41b1dfe8d0b5da | [
"MIT"
] | 105 | 2018-03-05T23:36:05.000Z | 2021-03-22T01:31:06.000Z | terrainbento/boundary_handlers/capture_node_baselevel_handler.py | alexmitchell/terrainbento | b8f6dd7fd9c96d3a40e0d1f8cd41b1dfe8d0b5da | [
"MIT"
] | 7 | 2018-03-13T03:46:38.000Z | 2021-03-07T01:03:56.000Z | # coding: utf8
# !/usr/env/python
"""
**CaptureNodeBaselevelHandler** implements "external" stream capture.
"""
class CaptureNodeBaselevelHandler(object):
"""Turn a closed boundary node into an open, lowering, boundary node.
A **CaptureNodeBaselevelHandler** turns a given node into an open boundary... | 38.608187 | 82 | 0.522872 |
be1003415b8c7bd45a7842dc03d51c91f456d879 | 1,463 | py | Python | vsts/vsts/gallery/v4_0/models/review_summary.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/gallery/v4_0/models/review_summary.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/gallery/v4_0/models/review_summary.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 43.029412 | 104 | 0.570745 |
de05bd5286c801fd6bc56dd9cce961d8da2f363e | 3,980 | py | Python | bottleneck_dist/calculate_wasserstein_distance.py | duxiaodan/topological-autoencoders | e3c71719942bb50f8c646f7df65bb0f4ba38cb44 | [
"BSD-3-Clause"
] | 69 | 2020-07-14T15:07:19.000Z | 2022-03-27T09:33:54.000Z | bottleneck_dist/calculate_wasserstein_distance.py | duxiaodan/topological-autoencoders | e3c71719942bb50f8c646f7df65bb0f4ba38cb44 | [
"BSD-3-Clause"
] | 6 | 2021-02-02T16:07:49.000Z | 2022-01-18T08:50:57.000Z | bottleneck_dist/calculate_wasserstein_distance.py | duxiaodan/topological-autoencoders | e3c71719942bb50f8c646f7df65bb0f4ba38cb44 | [
"BSD-3-Clause"
] | 17 | 2020-07-14T18:40:35.000Z | 2022-03-17T00:19:48.000Z | #!/usr/bin/env python3
import collections
import glob
import os
import subprocess
import sys
import numpy as np
import pandas as pd
batch_size = int(sys.argv[1])
n_iterations = 3
if __name__ == '__main__':
for root, dirs, files in os.walk('./'):
data_sets = dirs
for data_set in data_sets:
... | 29.264706 | 70 | 0.41608 |
fadaa8662e4aca8df4a45ed8d280cc08136b732e | 4,390 | py | Python | parser/peass-parser.py | ParikhKadam/privilege-escalation-awesome-scripts-suite | 50cc5fc3d2250d55318ef74157acf4006bb86553 | [
"MIT"
] | null | null | null | parser/peass-parser.py | ParikhKadam/privilege-escalation-awesome-scripts-suite | 50cc5fc3d2250d55318ef74157acf4006bb86553 | [
"MIT"
] | null | null | null | parser/peass-parser.py | ParikhKadam/privilege-escalation-awesome-scripts-suite | 50cc5fc3d2250d55318ef74157acf4006bb86553 | [
"MIT"
] | 1 | 2021-10-03T16:37:54.000Z | 2021-10-03T16:37:54.000Z | #!/usr/bin/env python3
import sys
import re
import json
# Pattern to identify main section titles
TITLE1_PATTERN = r"════════════════════════════════════╣"
TITLE2_PATTERN = r"╔══════════╣"
TITLE3_PATTERN = r"══╣"
INFO_PATTERN = r"╚ "
TITLE_CHARS = ['═', '╔', '╣', '╚']
# Patterns for colors
## The order is important,... | 28.141026 | 147 | 0.592255 |
b4ce35e7a355a54a699e441bc348c3df53fe8305 | 574 | py | Python | model/group.py | lukasz-nieweglowski86/py_pol_23 | 0831def794a5c8f849a6538799bb6c3cfd961bd8 | [
"Apache-2.0"
] | null | null | null | model/group.py | lukasz-nieweglowski86/py_pol_23 | 0831def794a5c8f849a6538799bb6c3cfd961bd8 | [
"Apache-2.0"
] | null | null | null | model/group.py | lukasz-nieweglowski86/py_pol_23 | 0831def794a5c8f849a6538799bb6c3cfd961bd8 | [
"Apache-2.0"
] | null | null | null | from sys import maxsize
class Group:
def __init__(self, name=None, header=None, footer=None, id=None):
self.name = name
self.header = header
self.footer = footer
self.id = id
def __repr__(self):
return "%s: %s: %s: %s " % (self.id, self.name, self.header, self.footer)... | 24.956522 | 103 | 0.578397 |
b3feb04796b39c43eb95bbe4a450c1d97d1c4dfa | 11,538 | py | Python | grr/server/grr_response_server/sequential_collection_test.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/sequential_collection_test.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/sequential_collection_test.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | 1 | 2020-07-09T01:08:48.000Z | 2020-07-09T01:08:48.000Z | #!/usr/bin/env python
"""Tests for SequentialCollection and related subclasses."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import threading
import time
from absl import app
from future.builtins import range
from future.utils import iterkeys
from... | 37.219355 | 80 | 0.690414 |
5e316d35aa4cc9c98548b2d0808738baef58daa0 | 66,074 | py | Python | tensorflow/python/tpu/tpu_embedding_v2.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 1 | 2020-08-06T03:25:47.000Z | 2020-08-06T03:25:47.000Z | tensorflow/python/tpu/tpu_embedding_v2.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 5 | 2020-07-17T17:36:44.000Z | 2020-08-05T20:18:02.000Z | tensorflow/python/tpu/tpu_embedding_v2.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 3 | 2017-05-17T08:44:52.000Z | 2021-08-18T05:37:12.000Z | # Copyright 2020 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... | 43.469737 | 114 | 0.689681 |
a1f44f3ffc0411e3f190ae31f11985fe9762ccc6 | 5,450 | py | Python | tests/test_processing.py | semccomas/string-method-gmxapi | fb68dce792d35df739225b1048e0816a4a61d45e | [
"MIT"
] | 6 | 2020-10-15T16:43:19.000Z | 2022-01-21T09:09:13.000Z | tests/test_processing.py | semccomas/string-method-gmxapi | fb68dce792d35df739225b1048e0816a4a61d45e | [
"MIT"
] | 9 | 2020-07-01T08:36:49.000Z | 2021-06-23T07:15:53.000Z | tests/test_processing.py | semccomas/string-method-gmxapi | fb68dce792d35df739225b1048e0816a4a61d45e | [
"MIT"
] | 5 | 2020-07-15T06:08:00.000Z | 2021-07-02T14:24:59.000Z | import unittest
import numpy as np
from stringmethod.config import Config
from stringmethod.postprocessing import *
def create_constant_probability_distribution(n_grid_points, n_transitions=1):
prob = np.zeros((n_grid_points, n_grid_points))
prob += 1.0 / prob.size
minx, maxx = 0, n_grid_points - 1
... | 32.831325 | 101 | 0.514862 |
dfba26428ee60107dc165dbf764202d286d4263e | 3,043 | py | Python | .conan/build.py | hmich/Catch | 2a1b332732cd1721601226ca4e9ddfff9129ebf2 | [
"BSL-1.0"
] | 322 | 2019-04-03T15:31:46.000Z | 2022-03-21T13:32:06.000Z | .conan/build.py | hmich/Catch | 2a1b332732cd1721601226ca4e9ddfff9129ebf2 | [
"BSL-1.0"
] | 11 | 2019-04-03T15:32:09.000Z | 2021-12-19T13:14:58.000Z | .conan/build.py | hmich/Catch | 2a1b332732cd1721601226ca4e9ddfff9129ebf2 | [
"BSL-1.0"
] | 110 | 2019-04-03T15:54:58.000Z | 2022-03-25T09:26:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from cpt.packager import ConanMultiPackager
from cpt.ci_manager import CIManager
from cpt.printer import Printer
class BuilderSettings(object):
@property
def username(self):
""" Set catchorg as package's owner
"""
retur... | 32.031579 | 97 | 0.626684 |
086f924d9e98ae1eca06c1c8a03e06a0bc4a515a | 74,190 | py | Python | hl7apy/v2_4/messages.py | tmoat/hl7apy | e5ca5eef86c91e0e3f312b89e0a9a77651e21158 | [
"MIT"
] | null | null | null | hl7apy/v2_4/messages.py | tmoat/hl7apy | e5ca5eef86c91e0e3f312b89e0a9a77651e21158 | [
"MIT"
] | null | null | null | hl7apy/v2_4/messages.py | tmoat/hl7apy | e5ca5eef86c91e0e3f312b89e0a9a77651e21158 | [
"MIT"
] | null | null | null | from .groups import GROUPS
from .segments import SEGMENTS
MESSAGES = {
'ACK': ('sequence',
(('MSH', SEGMENTS['MSH'], (1, 1), 'SEG'),
('MSA', SEGMENTS['MSA'], (1, 1), 'SEG'),
('ERR', SEGMENTS['ERR'], (0, 1), 'SEG'),)),
'ACK_N02': ('sequence',
(('... | 57.825409 | 129 | 0.381103 |
1135f4583fb01a2da58d40c2eef033b615b26b04 | 19,853 | py | Python | testplan/common/utils/sockets/fix/server.py | ymn1k/testplan | b1bde8495c449d75a74a7fe4e7c6501b0476f833 | [
"Apache-2.0"
] | null | null | null | testplan/common/utils/sockets/fix/server.py | ymn1k/testplan | b1bde8495c449d75a74a7fe4e7c6501b0476f833 | [
"Apache-2.0"
] | null | null | null | testplan/common/utils/sockets/fix/server.py | ymn1k/testplan | b1bde8495c449d75a74a7fe4e7c6501b0476f833 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:13:18.000Z | 2019-09-11T09:13:18.000Z | """Fix TCP server module."""
import errno
import socket
import select
import threading
from six.moves import queue as Queue
from testplan.common.utils.timing import (TimeoutException,
TimeoutExceptionInfo,
wait)
from testpl... | 35.771171 | 81 | 0.57825 |
93271d07d72566f84da160de166d6ea6417c4a91 | 7,443 | py | Python | nova/context.py | bopopescu/nova-28 | add7f5625ba49c0575328294a796428c443cd988 | [
"Apache-2.0"
] | null | null | null | nova/context.py | bopopescu/nova-28 | add7f5625ba49c0575328294a796428c443cd988 | [
"Apache-2.0"
] | null | null | null | nova/context.py | bopopescu/nova-28 | add7f5625ba49c0575328294a796428c443cd988 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright 2011 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | 34.299539 | 78 | 0.641811 |
9b56ea53ea19099a0cabda141e878f9d9bbc6503 | 30,751 | py | Python | pywinauto/controls/uiawrapper.py | badari412/pywinauto | 9380de8ded10956573fb496af4722ccf526fe743 | [
"BSD-3-Clause"
] | 1 | 2018-12-02T07:17:21.000Z | 2018-12-02T07:17:21.000Z | pywinauto/controls/uiawrapper.py | rla006/pywinauto | dc855275cb27be796be55b51f37e5a4082a2cbcc | [
"BSD-3-Clause"
] | null | null | null | pywinauto/controls/uiawrapper.py | rla006/pywinauto | dc855275cb27be796be55b51f37e5a4082a2cbcc | [
"BSD-3-Clause"
] | null | null | null | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# ... | 39.073698 | 114 | 0.58242 |
a0125bed70a8a668a1659666b86e81b2a16e795b | 10,126 | py | Python | vendor/noiselabs/smarty-bundle/NoiseLabs/Bundle/SmartyBundle/Resources/doc/conf.py | rubberbullet/collab | 1c55f265466c8dfc6af851e63de45376e2dcd7ef | [
"MIT"
] | null | null | null | vendor/noiselabs/smarty-bundle/NoiseLabs/Bundle/SmartyBundle/Resources/doc/conf.py | rubberbullet/collab | 1c55f265466c8dfc6af851e63de45376e2dcd7ef | [
"MIT"
] | null | null | null | vendor/noiselabs/smarty-bundle/NoiseLabs/Bundle/SmartyBundle/Resources/doc/conf.py | rubberbullet/collab | 1c55f265466c8dfc6af851e63de45376e2dcd7ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# SmartyBundle documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 5 02:30:06 2012.
#
# 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
# autogenerated file.
#
... | 32.248408 | 144 | 0.716966 |
e8a31e3a9d0b4f6187148cc6762bce5a0398707a | 3,409 | py | Python | indextools/console/split.py | dnanexus/IndexTools | 0392b3be92ff50b401290b59e9ca6c7767fa5a96 | [
"MIT"
] | 15 | 2019-07-17T11:41:36.000Z | 2021-03-02T09:36:34.000Z | indextools/console/split.py | dnanexus/IndexTools | 0392b3be92ff50b401290b59e9ca6c7767fa5a96 | [
"MIT"
] | 22 | 2019-05-15T20:08:12.000Z | 2019-10-11T13:33:42.000Z | indextools/console/split.py | dnanexus/IndexTools | 0392b3be92ff50b401290b59e9ca6c7767fa5a96 | [
"MIT"
] | 3 | 2019-06-01T15:58:06.000Z | 2022-01-21T21:10:01.000Z | import enum
from functools import partial
import os
from typing import Optional, Tuple
import autoclick as ac
import pysam
from indextools.bed import BedInterval, iter_bed_interval_groups
from indextools.utils import References, split_path
class FeatureInclusion(enum.Enum):
"""
Enumeration of options for de... | 36.655914 | 87 | 0.629803 |
caf43fab7e4a4b6cdaccf3e6a206f8fc5a4f3264 | 222 | py | Python | mult.py | Carlos123b/X-Serv-Python-Multiplica | 3119f0794abb7dcbdfc1f56011c23bc44ff966c9 | [
"Apache-2.0"
] | null | null | null | mult.py | Carlos123b/X-Serv-Python-Multiplica | 3119f0794abb7dcbdfc1f56011c23bc44ff966c9 | [
"Apache-2.0"
] | null | null | null | mult.py | Carlos123b/X-Serv-Python-Multiplica | 3119f0794abb7dcbdfc1f56011c23bc44ff966c9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
for i in range(1,11):
print("Tabla del " + str(i) + ":")
print("---------------------------")
for j in range(1,11):
print(i,"por",j,"es",i*j)
print("\n")
| 22.2 | 40 | 0.418919 |
95221dff0d7c1eeb5778a42a262a2a2e69138570 | 6,955 | py | Python | codes/Model_Dataset.py | S-rz/THINE | cfd16b693adfcaf943e4566ab52b03197b65ba4d | [
"MIT"
] | 2 | 2021-09-20T11:48:43.000Z | 2022-03-20T12:06:39.000Z | codes/Model_Dataset.py | S-rz/THINE | cfd16b693adfcaf943e4566ab52b03197b65ba4d | [
"MIT"
] | null | null | null | codes/Model_Dataset.py | S-rz/THINE | cfd16b693adfcaf943e4566ab52b03197b65ba4d | [
"MIT"
] | 1 | 2021-11-21T14:03:36.000Z | 2021-11-21T14:03:36.000Z | from torch.utils.data import Dataset
import functools
import numpy as np
import sys
import random
class mtne_metapath_dataset(Dataset):
def __init__(self, args, metapath_data, train_edge):
self.args = args
self.metapath_data = metapath_data
self.train_edge = train_edge # [[nod... | 46.366667 | 146 | 0.56995 |
5490570a9bedbb9a0167165e1f9bacbda591f9aa | 5,569 | py | Python | mango/constants.py | liqprotocol/mango-explorer | c2eecdd80f3e57261e209109af39bc05d34cabe9 | [
"MIT"
] | null | null | null | mango/constants.py | liqprotocol/mango-explorer | c2eecdd80f3e57261e209109af39bc05d34cabe9 | [
"MIT"
] | null | null | null | mango/constants.py | liqprotocol/mango-explorer | c2eecdd80f3e57261e209109af39bc05d34cabe9 | [
"MIT"
] | null | null | null | # # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... | 34.165644 | 460 | 0.726522 |
38488d77669fb7d858e0b56b2c71327f4a2d015f | 2,277 | py | Python | tests/test_scripts/output/genpython/testtypes.py | hrshdhgd/linkml | 6a1138921b59b64ccd6cb80162ab7e074449e274 | [
"CC0-1.0"
] | null | null | null | tests/test_scripts/output/genpython/testtypes.py | hrshdhgd/linkml | 6a1138921b59b64ccd6cb80162ab7e074449e274 | [
"CC0-1.0"
] | null | null | null | tests/test_scripts/output/genpython/testtypes.py | hrshdhgd/linkml | 6a1138921b59b64ccd6cb80162ab7e074449e274 | [
"CC0-1.0"
] | null | null | null | # Auto generated from testtypes.yaml by pythongen.py version: 0.9.0
# Generation date: 2021-12-11T03:15:41
# Schema: types
#
# id: http://example.org/tests/types
# description:
# license:
import dataclasses
import sys
import re
from jsonasobj2 import JsonObj, as_dict
from typing import Optional, List, Union, Dict, Cla... | 28.4625 | 95 | 0.777339 |
75b006859572079aade2c855a67b2cbee5eed653 | 19,284 | py | Python | myqtpy/Unregister.py | alchenerd/hvhnonc | 8bd831cb1adadc3a92c274b5b38b6f26ed2ff253 | [
"MIT"
] | null | null | null | myqtpy/Unregister.py | alchenerd/hvhnonc | 8bd831cb1adadc3a92c274b5b38b6f26ed2ff253 | [
"MIT"
] | null | null | null | myqtpy/Unregister.py | alchenerd/hvhnonc | 8bd831cb1adadc3a92c274b5b38b6f26ed2ff253 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sqlite3
import sys
from PyQt5 import QtCore, QtWidgets
from _unregister_skeleton import Ui_Dialog as UnregisterDialog
from SearchBox import SearchBox
from Filter import Filter
from myconnect import connect
"""
@author: alchenerd (alchenerd@gmail.com)
"""
# These are mine
if __name__ ==... | 37.156069 | 78 | 0.567932 |
ce6b4b5bb906932a8cc9e5393ecafc79ed352104 | 3,978 | py | Python | google/ads/googleads/v7/services/services/ad_group_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v7/services/services/ad_group_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v7/services/services/ad_group_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34.894737 | 78 | 0.66365 |
32651ec8835b64ec7be984f54a353bb45be83eee | 829 | py | Python | tests/test_analysis.py | csala/Orion | 12e31541ad1be11f9559b5cab1435af72a096a08 | [
"MIT"
] | null | null | null | tests/test_analysis.py | csala/Orion | 12e31541ad1be11f9559b5cab1435af72a096a08 | [
"MIT"
] | null | null | null | tests/test_analysis.py | csala/Orion | 12e31541ad1be11f9559b5cab1435af72a096a08 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from orion import analysis
def test__build_events_df_empty():
events = np.array([], dtype=np.float64)
returned = analysis._build_events_df(events)
assert returned.empty
assert list(returned.columns) == ['start', 'end', 'score']
def test__build_events_df_even... | 26.741935 | 62 | 0.665862 |
9652ea1a9d27fd061424ec7a9c790c63b685ef47 | 4,574 | py | Python | reactorch/solution.py | erwanp/reactorch | 439cb2d45629f978476aff936ebe1f0a66f85fe9 | [
"MIT"
] | 25 | 2020-05-12T14:05:15.000Z | 2022-03-04T05:23:01.000Z | reactorch/solution.py | erwanp/reactorch | 439cb2d45629f978476aff936ebe1f0a66f85fe9 | [
"MIT"
] | 21 | 2020-05-06T21:32:33.000Z | 2021-06-23T14:02:27.000Z | reactorch/solution.py | erwanp/reactorch | 439cb2d45629f978476aff936ebe1f0a66f85fe9 | [
"MIT"
] | 19 | 2020-05-12T14:05:21.000Z | 2022-03-05T05:31:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Weiqi Ji"
__copyright__ = "Copyright 2020, DENG"
__version__ = "0.1"
__email__ = "weiqiji@mit.edu"
__status__ = "Development"
import cantera as ct
import torch
from ruamel.yaml import YAML
from torch import nn
torch.set_default_tensor_type("torch.DoubleTen... | 29.320513 | 93 | 0.631613 |
e99ec2d320cdf89c98bae6f69643e3f643a31b10 | 6,119 | py | Python | ax/utils/common/logger.py | Balandat/Ax | 6c7556165291a5329744b5075d5f95d2dec18938 | [
"MIT"
] | null | null | null | ax/utils/common/logger.py | Balandat/Ax | 6c7556165291a5329744b5075d5f95d2dec18938 | [
"MIT"
] | null | null | null | ax/utils/common/logger.py | Balandat/Ax | 6c7556165291a5329744b5075d5f95d2dec18938 | [
"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.
# pyre-strict
import logging
import os
from functools import wraps
from typing import Any, Callable, TypeVar, Iterable... | 33.255435 | 84 | 0.676745 |
ae4760e9532e26f603898cfaa734634cc1a84b3d | 1,721 | py | Python | test/test_ilf_comp.py | hertogp/jabs | ed419caa448075dcf327d2af561952a385115228 | [
"MIT"
] | 1 | 2021-05-14T03:17:48.000Z | 2021-05-14T03:17:48.000Z | test/test_ilf_comp.py | hertogp/jabs | ed419caa448075dcf327d2af561952a385115228 | [
"MIT"
] | null | null | null | test/test_ilf_comp.py | hertogp/jabs | ed419caa448075dcf327d2af561952a385115228 | [
"MIT"
] | 1 | 2017-10-31T02:04:52.000Z | 2017-10-31T02:04:52.000Z | '''
test ilf compiler
'''
import pytest
import sys
sys.path.insert(0, '..')
sys.path.insert(0, '.')
from jabs.ilf.comp import compile
# tmp
from jabs.ilf.core import Ival, pp2portstr, Ip4Filter
def test_bad_input():
pass
def test_good_input():
txt = """
dns 53/udp, 53/tcp, 10.10.10.10, 10.10.11.1... | 25.686567 | 69 | 0.566531 |
02b0a056c2c1f358fb9356b3398665a04be550ce | 4,221 | py | Python | Image2CAD/Core/Features/Cognition/DimensionalLinesFeature.py | David-Alfred/Image2CAD | 0c1399717b96904524d60576b6c6e313107c574f | [
"Apache-2.0"
] | null | null | null | Image2CAD/Core/Features/Cognition/DimensionalLinesFeature.py | David-Alfred/Image2CAD | 0c1399717b96904524d60576b6c6e313107c574f | [
"Apache-2.0"
] | null | null | null | Image2CAD/Core/Features/Cognition/DimensionalLinesFeature.py | David-Alfred/Image2CAD | 0c1399717b96904524d60576b6c6e313107c574f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Aditya Intwala
Copyright (C) 2016, Aditya Intwala.
Licensed under the Apache License 2.0. See LICENSE file in the project root for full license information.
"""
import cv2
from Core.Features.LineSegments.LineSegmentsFeature import LineSegmentsFeature
from xml.etree import Elem... | 44.431579 | 115 | 0.654347 |
e7f435098eeab6eccb76a9b9b7ac4308caa0bbe8 | 702 | py | Python | module1-introduction-to-sql/rpg_queries.py | keilayb/DS-Unit-3-Sprint-2-SQL-and-Databases | 3f053923d223b1bd081b07918a6d95fe60aefeb6 | [
"MIT"
] | null | null | null | module1-introduction-to-sql/rpg_queries.py | keilayb/DS-Unit-3-Sprint-2-SQL-and-Databases | 3f053923d223b1bd081b07918a6d95fe60aefeb6 | [
"MIT"
] | null | null | null | module1-introduction-to-sql/rpg_queries.py | keilayb/DS-Unit-3-Sprint-2-SQL-and-Databases | 3f053923d223b1bd081b07918a6d95fe60aefeb6 | [
"MIT"
] | null | null | null | import sqlite3
from queries import all_queries
import pandas as pd
conn = sqlite3.connect("rpg_db.sqlite3")
curs = conn.cursor()
result_dfs = []
for quer in all_queries:
curs.execute(quer)
result = curs.fetchall()
result_as_df = pd.DataFrame(result)
result_dfs.append(result_as_df)
print(result_dfs[0... | 21.9375 | 100 | 0.656695 |
d841a1024459527d57002a8126ed0b76bcc97996 | 12,357 | py | Python | controller/api/south_migrations/0010_auto__add_field_build_sha__add_field_build_procfile__add_field_build_d.py | yun-an/deis | de27c11475bb7ca24816f288aa115699a1c37e26 | [
"Apache-2.0"
] | 3,375 | 2015-01-01T04:03:45.000Z | 2022-02-08T14:53:45.000Z | controller/api/south_migrations/0010_auto__add_field_build_sha__add_field_build_procfile__add_field_build_d.py | yun-an/deis | de27c11475bb7ca24816f288aa115699a1c37e26 | [
"Apache-2.0"
] | 2,422 | 2015-01-01T02:40:01.000Z | 2021-11-30T07:50:32.000Z | controller/api/south_migrations/0010_auto__add_field_build_sha__add_field_build_procfile__add_field_build_d.py | yun-an/deis | de27c11475bb7ca24816f288aa115699a1c37e26 | [
"Apache-2.0"
] | 688 | 2015-01-01T00:36:48.000Z | 2022-01-22T00:32:07.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Build.sha'
db.add_column(u'api_build', 'sha',
... | 72.263158 | 195 | 0.547139 |
3a919cba2a9959cffd528a6bd65cc2f127c2adb2 | 6,453 | py | Python | tests/miscellaneous/test_table_handler.py | astro-projects/astro | 7fa0404fc690569ff85e379ecca54778f09a9333 | [
"Apache-2.0"
] | 71 | 2021-12-06T22:41:59.000Z | 2022-03-31T21:47:16.000Z | tests/miscellaneous/test_table_handler.py | astro-projects/astro | 7fa0404fc690569ff85e379ecca54778f09a9333 | [
"Apache-2.0"
] | 171 | 2021-12-14T07:34:57.000Z | 2022-03-31T21:04:15.000Z | tests/miscellaneous/test_table_handler.py | astro-projects/astro | 7fa0404fc690569ff85e379ecca54778f09a9333 | [
"Apache-2.0"
] | 11 | 2021-12-06T22:46:23.000Z | 2022-03-31T18:09:46.000Z | from astro.sql.table import Metadata, Table
from astro.utils.table_handler import TableHandler
def test__set_variables_from_first_table_with_same_db_tables_in_op_args():
"""Test _set_variables_from_first_table() when the tables passed are with same tables"""
def dummy_function(param_1: str, param_2: str): #... | 30.582938 | 111 | 0.618162 |
d516af84b565cd97a3c9c5afe33a49d3d5a03f64 | 4,677 | py | Python | catkin_ws/src/00-infrastructure/easy_regression/include/easy_regression/conditions/references.py | yxiao1996/dev | e2181233aaa3d16c472b792b58fc4863983825bd | [
"CC-BY-2.0"
] | 2 | 2018-06-25T02:51:25.000Z | 2018-06-25T02:51:27.000Z | catkin_ws/src/00-infrastructure/easy_regression/include/easy_regression/conditions/references.py | yxiao1996/dev | e2181233aaa3d16c472b792b58fc4863983825bd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src/00-infrastructure/easy_regression/include/easy_regression/conditions/references.py | yxiao1996/dev | e2181233aaa3d16c472b792b58fc4863983825bd | [
"CC-BY-2.0"
] | 2 | 2018-09-04T06:44:21.000Z | 2018-10-15T02:30:50.000Z | from contracts.utils import check_isinstance
import yaml
from duckietown_utils.exception_utils import raise_wrapped, check_is_in
from duckietown_utils.system_cmd_imp import contract
from duckietown_utils.text_utils import remove_prefix, string_split
from easy_regression.conditions.eval import Evaluable, EvaluationErro... | 32.479167 | 83 | 0.555698 |
e3986a524b4b18edbfcaaf2b77eddcf8dbcba21a | 55,619 | py | Python | tests/test_download_photos.py | horizon0514/icloud_photos_downloader | 7e9525bd169bc97f82b68c2461430c58f8e4d8e9 | [
"MIT"
] | null | null | null | tests/test_download_photos.py | horizon0514/icloud_photos_downloader | 7e9525bd169bc97f82b68c2461430c58f8e4d8e9 | [
"MIT"
] | null | null | null | tests/test_download_photos.py | horizon0514/icloud_photos_downloader | 7e9525bd169bc97f82b68c2461430c58f8e4d8e9 | [
"MIT"
] | null | null | null | from unittest import TestCase
from vcr import VCR
import os
import sys
import shutil
import pytest
import mock
import datetime
from mock import call, ANY
from click.testing import CliRunner
import piexif
from piexif._exceptions import InvalidImageDataError
from pyicloud_ipd.services.photos import PhotoAsset, PhotoAlbum... | 43.418423 | 197 | 0.457811 |
9e4c9b4dbed5a7288df8e47a527e52813ef1d58a | 912 | py | Python | src/utils/ccxt/cancel_orders.py | YasunoriMATSUOKA/crypto-asset-easy-management | 5c33fd8612b843ed39f0ec1fd84efa83f3967e42 | [
"MIT"
] | null | null | null | src/utils/ccxt/cancel_orders.py | YasunoriMATSUOKA/crypto-asset-easy-management | 5c33fd8612b843ed39f0ec1fd84efa83f3967e42 | [
"MIT"
] | 2 | 2020-12-05T09:31:01.000Z | 2020-12-05T12:28:33.000Z | src/utils/ccxt/cancel_orders.py | YasunoriMATSUOKA/crypto-asset-easy-management | 5c33fd8612b843ed39f0ec1fd84efa83f3967e42 | [
"MIT"
] | null | null | null | from logging import getLogger
import traceback
from .cancel_order import cancel_order
logger = getLogger("__main__").getChild(__name__)
def cancel_orders(exchange_name, orders):
logger.debug("start")
logger.debug(exchange_name)
logger.debug(orders)
results = []
for order in orders:
logger... | 27.636364 | 58 | 0.619518 |
afacadf63efa7e559b9a34330dbb29071c238a06 | 4,785 | py | Python | src/primaires/scripting/actions/remplir.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/scripting/actions/remplir.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/scripting/actions/remplir.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# lis... | 43.899083 | 79 | 0.667294 |
730c7a4f03221f3b889dea09c31ccc963dd460cf | 12,716 | py | Python | mlonmcu/session/session.py | PhilippvK/mlonmcu | 6b5ed9b2abe8d3caa18c20a604547513e8097b49 | [
"Apache-2.0"
] | null | null | null | mlonmcu/session/session.py | PhilippvK/mlonmcu | 6b5ed9b2abe8d3caa18c20a604547513e8097b49 | [
"Apache-2.0"
] | null | null | null | mlonmcu/session/session.py | PhilippvK/mlonmcu | 6b5ed9b2abe8d3caa18c20a604547513e8097b49 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2022 TUM Department of Electrical and Computer Engineering.
#
# This file is part of MLonMCU.
# See https://github.com/tum-ei-eda/mlonmcu.git for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | 37.510324 | 250 | 0.549387 |
54778344cae5839e3f67fcdc784bb33708ea2b48 | 9,018 | py | Python | src/app.py | wolfgangB33r/ai-text-model-studio | c8a1c067aa048652fe749c6843320409b19d5b20 | [
"Apache-2.0"
] | null | null | null | src/app.py | wolfgangB33r/ai-text-model-studio | c8a1c067aa048652fe749c6843320409b19d5b20 | [
"Apache-2.0"
] | null | null | null | src/app.py | wolfgangB33r/ai-text-model-studio | c8a1c067aa048652fe749c6843320409b19d5b20 | [
"Apache-2.0"
] | null | null | null | import streamlit as st
import streamlit.components.v1 as components
import numpy as np
import pandas as pd
import os
import pickle
import base64
#text libraries
import re
from time import time # To time our operations
from gensim.models import Word2Vec
# used for text scraping
from bs4 import BeautifulSoup
import re... | 51.827586 | 1,077 | 0.649811 |
dcca6db5e5dd65481af153579556109f8ab7bad5 | 92,543 | py | Python | build_system/flashFPGA2rsyocto.py | robseb/rsyocto | 21c554a91f5be364212498beb8b946f358ec84ea | [
"MIT"
] | 69 | 2020-01-16T18:29:00.000Z | 2022-02-23T07:19:17.000Z | build_system/flashFPGA2rsyocto.py | robseb/rsyocto | 21c554a91f5be364212498beb8b946f358ec84ea | [
"MIT"
] | 13 | 2019-12-20T20:14:50.000Z | 2022-01-25T17:21:19.000Z | build_system/flashFPGA2rsyocto.py | robseb/rsyocto | 21c554a91f5be364212498beb8b946f358ec84ea | [
"MIT"
] | 20 | 2020-01-20T13:04:42.000Z | 2022-02-18T01:41:55.000Z | #!/usr/bin/env python3.7
#
# ######## ###### ## ## ####### ###### ######## #######
# ## ## ## ## ## ## ## ## ## ## ## ## ##
# ## ## ## #### ## ## ## ## ## ##
# ... | 48.68122 | 238 | 0.524318 |
06ab79f3f11d7bde938a6ddb30aa47b82f0a6b1d | 7,194 | py | Python | src/python/pants/backend/python/goals/repl.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/goals/repl.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | 1 | 2022-02-22T18:15:03.000Z | 2022-02-22T18:15:03.000Z | src/python/pants/backend/python/goals/repl.py | ryanking/pants | e45b00d2eb467b599966bca262405a5d74d27bdd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os
from typing import Iterable
from pants.backend.python.subsystems.ipython import IPython
from pants.backend.python.subsystems.setup import Pyt... | 35.97 | 100 | 0.705449 |
a911fb3c7f52998d145b5ab3e5265a65106304ce | 6,289 | py | Python | core/ops/modules/ms_deform_attn.py | damien911224/RAFT | 39fc8fb4566444b0d7a5a9a196bfde073515aca1 | [
"BSD-3-Clause"
] | null | null | null | core/ops/modules/ms_deform_attn.py | damien911224/RAFT | 39fc8fb4566444b0d7a5a9a196bfde073515aca1 | [
"BSD-3-Clause"
] | null | null | null | core/ops/modules/ms_deform_attn.py | damien911224/RAFT | 39fc8fb4566444b0d7a5a9a196bfde073515aca1 | [
"BSD-3-Clause"
] | null | null | null | # ------------------------------------------------------------------------------------------------
# Deformable DETR
# Copyright (c) 2020 SenseTime. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# -------------------------------------------------------------------------... | 54.215517 | 153 | 0.611067 |
1f0a9e0e747458acfcc4c9e830a1e763a5e20770 | 11,834 | py | Python | src/m5_more_sequences.py | zouz-sean/12-MoreSequences | e34c38f531f0f6317e0bb986c497be7d10dc0dd6 | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | zouz-sean/12-MoreSequences | e34c38f531f0f6317e0bb986c497be7d10dc0dd6 | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | zouz-sean/12-MoreSequences | e34c38f531f0f6317e0bb986c497be7d10dc0dd6 | [
"MIT"
] | null | null | null | """
This module lets you practice various patterns
for ITERATING through SEQUENCES, including:
-- Beginning to end
-- Other ranges (e.g., backwards and every-3rd-item)
-- The COUNT/SUM/etc pattern
-- The FIND pattern (via LINEAR SEARCH)
Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder,
... | 37.213836 | 72 | 0.517999 |
f043065fc7940cc951735ff5fdebee0fe1ade86b | 2,221 | py | Python | getzipcodes/main.py | loganjhennessy/get-zip-codes | 9823ca937f32ba5044e6abc61e08a20f893e667d | [
"MIT"
] | null | null | null | getzipcodes/main.py | loganjhennessy/get-zip-codes | 9823ca937f32ba5044e6abc61e08a20f893e667d | [
"MIT"
] | 2 | 2021-04-30T20:34:06.000Z | 2021-06-01T21:43:17.000Z | getzipcodes/main.py | loganjhennessy/get-zip-codes | 9823ca937f32ba5044e6abc61e08a20f893e667d | [
"MIT"
] | null | null | null | import argparse
import json
from getzipcodes.log import get_configured_logger
from getzipcodes.zipcoderequest import ZipCodeRequest
from google.cloud import datastore
logger = get_configured_logger(__name__, "INFO")
def get_arguments():
parser = argparse.ArgumentParser(
prog="getzipcodes",
descr... | 30.847222 | 80 | 0.624043 |
ab6ced591b64d45574407aeba0e6d3b2753b8a1b | 35 | py | Python | evechem_api/security/exceptions.py | mylesgallagher/evechemapi | d096a2d13b84c3ac15fedf9795177c619f96a36d | [
"MIT"
] | null | null | null | evechem_api/security/exceptions.py | mylesgallagher/evechemapi | d096a2d13b84c3ac15fedf9795177c619f96a36d | [
"MIT"
] | null | null | null | evechem_api/security/exceptions.py | mylesgallagher/evechemapi | d096a2d13b84c3ac15fedf9795177c619f96a36d | [
"MIT"
] | null | null | null | class KeyNotFound(Exception):
pass | 17.5 | 29 | 0.828571 |
c2f8eba274865d18cbd6ab5560589760467482f7 | 445 | py | Python | ygo/duel_menu.py | Timtam/yugioh-game | a45e13872c52bb16dc91a92525f5e83e95e790b5 | [
"MIT"
] | 23 | 2017-09-23T13:29:17.000Z | 2022-03-02T19:03:11.000Z | ygo/duel_menu.py | Timtam/yugioh-game | a45e13872c52bb16dc91a92525f5e83e95e790b5 | [
"MIT"
] | 160 | 2017-09-15T13:24:30.000Z | 2022-02-11T15:10:34.000Z | ygo/duel_menu.py | Timtam/yugioh-game | a45e13872c52bb16dc91a92525f5e83e95e790b5 | [
"MIT"
] | 21 | 2017-09-15T13:17:29.000Z | 2022-01-31T09:28:06.000Z | from gsb.intercept import Menu
from .parsers.duel_parser import DuelParser
class DuelMenu(Menu):
def handle_line(self, con, line):
con.player.seen_waiting = False
for s, c in DuelParser.command_substitutions.items():
if line.startswith(s):
line = c+" "+line[1:]
break
cmd, args = self.spli... | 26.176471 | 56 | 0.689888 |
9de040f1f3dcf5251bdfc9524d292982fabdae4f | 255 | py | Python | 02-Dynamic-Urls/02-Hours-Ahead/mysite/polls/urls.py | wu-wenxiang/Training-Django-Public | 56072d750107ba3be7789ac7845badb830c96c83 | [
"Apache-2.0"
] | 1 | 2019-06-19T08:56:54.000Z | 2019-06-19T08:56:54.000Z | 04-Models/01-Migrate/mysite/polls/urls.py | wu-wenxiang/Training-Django-Public | 56072d750107ba3be7789ac7845badb830c96c83 | [
"Apache-2.0"
] | null | null | null | 04-Models/01-Migrate/mysite/polls/urls.py | wu-wenxiang/Training-Django-Public | 56072d750107ba3be7789ac7845badb830c96c83 | [
"Apache-2.0"
] | 3 | 2018-06-28T03:36:11.000Z | 2020-09-25T08:04:20.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^time/plus/(\d{1,2})', views.hours_ahead, name='hours_ahead'),
url(r'^time/', views.current_datetime, name='current_datetime'),
url(r'', views.index, name='index'),
] | 28.333333 | 72 | 0.670588 |
f4be29e841a78c721d5bf274a83b41b7f1b763a8 | 7,859 | py | Python | bindings/torch/tinycudann/modules.py | TE-KazukiYoshiyama/tiny-cuda-nn | e1ccb40deb23b60ac9869e808f945aaf830a3db7 | [
"BSD-3-Clause"
] | null | null | null | bindings/torch/tinycudann/modules.py | TE-KazukiYoshiyama/tiny-cuda-nn | e1ccb40deb23b60ac9869e808f945aaf830a3db7 | [
"BSD-3-Clause"
] | null | null | null | bindings/torch/tinycudann/modules.py | TE-KazukiYoshiyama/tiny-cuda-nn | e1ccb40deb23b60ac9869e808f945aaf830a3db7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and ... | 37.42381 | 171 | 0.768037 |
5eebed3c94fcf94cf6b410bb3a1f39ad483f2428 | 2,201 | py | Python | apps/amcm/migrations/0013_auto_20211028_1455.py | agsneutron/asociacion_mexicana_cuarto_milla | 4657e1f494eb572e9b40b2804e012cdfd6193c51 | [
"MIT"
] | null | null | null | apps/amcm/migrations/0013_auto_20211028_1455.py | agsneutron/asociacion_mexicana_cuarto_milla | 4657e1f494eb572e9b40b2804e012cdfd6193c51 | [
"MIT"
] | null | null | null | apps/amcm/migrations/0013_auto_20211028_1455.py | agsneutron/asociacion_mexicana_cuarto_milla | 4657e1f494eb572e9b40b2804e012cdfd6193c51 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-10-28 19:55
import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('amcm', '0012_ejemplares_estatus'),
]
operations = [
m... | 43.156863 | 162 | 0.598819 |
3dc450a2cd08567ed786fa1e94c6394424816655 | 5,800 | py | Python | dash/html/Legend.py | bkzhn/dash | 2975e001cf017919929b0ebad1f1d1e14fa32f93 | [
"MIT"
] | 1 | 2018-01-21T15:49:49.000Z | 2018-01-21T15:49:49.000Z | dash/html/Legend.py | sthagen/dash | b3918ff798a51462687ff36e9e56c079c9f463cb | [
"MIT"
] | null | null | null | dash/html/Legend.py | sthagen/dash | b3918ff798a51462687ff36e9e56c079c9f463cb | [
"MIT"
] | 1 | 2017-08-18T05:01:03.000Z | 2017-08-18T05:01:03.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Legend(Component):
"""A Legend component.
Legend is a wrapper for the <legend> HTML5 element.
For detailed attribute info see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/l... | 31.868132 | 84 | 0.594483 |
ed5c5bc9737d603a40bd70ed1095235ad9a7a2d7 | 4,005 | py | Python | mysql-dst/mysql-cluster/ndb/ndbapi-examples/third_party/googletest/googletest/test/googletest-env-var-test.py | SJTU-IPADS/dst | 897b929a692642cbf295c105d9d6e64090abb673 | [
"Apache-2.0"
] | 9 | 2020-12-17T01:59:13.000Z | 2022-03-30T16:25:08.000Z | mysql-dst/mysql-cluster/ex/third_party/googletest/googletest/test/googletest-env-var-test.py | SJTU-IPADS/dst | 897b929a692642cbf295c105d9d6e64090abb673 | [
"Apache-2.0"
] | 1 | 2021-07-30T12:06:33.000Z | 2021-07-31T10:16:09.000Z | mysql-dst/mysql-cluster/storage/ndb/ndbapi-examples/third_party/googletest/googletest/test/googletest-env-var-test.py | SJTU-IPADS/dst | 897b929a692642cbf295c105d9d6e64090abb673 | [
"Apache-2.0"
] | 1 | 2021-08-01T13:47:07.000Z | 2021-08-01T13:47:07.000Z | #!/usr/bin/env python
#
# Copyright 2008, 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... | 33.940678 | 79 | 0.7196 |
ec82b4a18b0d2a3be4108d78b9eb8050d6859f58 | 2,476 | py | Python | data_loader.py | arttorres0/simple-image-classifier | 9002608fadd0a4d2c3b92f4381fc443032a0516c | [
"MIT"
] | 1 | 2020-04-11T04:05:13.000Z | 2020-04-11T04:05:13.000Z | data_loader.py | arttorres0/simple-image-classifier | 9002608fadd0a4d2c3b92f4381fc443032a0516c | [
"MIT"
] | null | null | null | data_loader.py | arttorres0/simple-image-classifier | 9002608fadd0a4d2c3b92f4381fc443032a0516c | [
"MIT"
] | null | null | null | import torch
from torchvision import datasets, transforms, models
def get_datasets(data_directory):
'''
Reads a file path and returns datasets for Training, Validation and Testing data
'''
#ensures correct file path concatenation
if data_directory[-1] != "/":
data_directory = data_dire... | 48.54902 | 98 | 0.528271 |
9dcc4358a7ab5a9ac3ccaded43a0ef7d63c842d6 | 40,595 | py | Python | hjwebbrowser/browser.py | hayj/WebBrowser | ddfdbe3a0e1de48e18b15051ec3264062b16aa4f | [
"MIT"
] | 1 | 2020-02-19T22:08:56.000Z | 2020-02-19T22:08:56.000Z | hjwebbrowser/browser.py | hayj/WebBrowser | ddfdbe3a0e1de48e18b15051ec3264062b16aa4f | [
"MIT"
] | null | null | null | hjwebbrowser/browser.py | hayj/WebBrowser | ddfdbe3a0e1de48e18b15051ec3264062b16aa4f | [
"MIT"
] | null | null | null | # coding: utf-8
from datatools.jsonreader import *
from datatools.url import *
from machinelearning.bandit import *
from machinelearning.function import *
from datatools.csvreader import *
from systemtools.basics import *
from systemtools.duration import *
from systemtools.file import *
from systemtools.logger import ... | 39.222222 | 167 | 0.571302 |
04ce6afddd327e7b85c3b9e960d4c6bc2b1765d5 | 16,792 | py | Python | mpEngineProdCons.py | ekristen/appcompatprocessor | 6c847937c5a836e2ce2fe2b915f213c345a3c389 | [
"Apache-2.0"
] | 152 | 2017-04-02T18:13:19.000Z | 2022-03-19T18:46:12.000Z | mpEngineProdCons.py | ekristen/appcompatprocessor | 6c847937c5a836e2ce2fe2b915f213c345a3c389 | [
"Apache-2.0"
] | 19 | 2017-05-03T13:48:06.000Z | 2020-08-18T16:20:25.000Z | mpEngineProdCons.py | ekristen/appcompatprocessor | 6c847937c5a836e2ce2fe2b915f213c345a3c389 | [
"Apache-2.0"
] | 26 | 2017-04-19T16:00:51.000Z | 2021-06-12T10:07:46.000Z | import settings
import logging
import multiprocessing
import Queue
import time
from datetime import timedelta, datetime
from appAux import psutil_phymem_usage
import gc
logger = logging.getLogger(__name__)
dying_workers = []
# Auto-balancing Producer-Consumer class
def rate_limited(period, damping = 1.0):
'''
Pr... | 37.482143 | 150 | 0.632563 |
ce5860a9e378c6b7b32ad76416b1ded3dfc30fa1 | 6,605 | py | Python | Contents/Libraries/Shared/ftfy/bad_codecs/sloppy.py | jippo015/Sub-Zero.bundle | 734e0f7128c05c0f639e11e7dfc77daa1014064b | [
"MIT"
] | 1,553 | 2015-11-09T02:17:06.000Z | 2022-03-31T20:24:52.000Z | Contents/Libraries/Shared/ftfy/bad_codecs/sloppy.py | saiterlz/Sub-Zero.bundle | 1a0bb9c3e4be84be35d46672907783363fe5a87b | [
"MIT"
] | 691 | 2015-11-05T21:32:26.000Z | 2022-03-17T10:52:45.000Z | Contents/Libraries/Shared/ftfy/bad_codecs/sloppy.py | saiterlz/Sub-Zero.bundle | 1a0bb9c3e4be84be35d46672907783363fe5a87b | [
"MIT"
] | 162 | 2015-11-06T19:38:55.000Z | 2022-03-16T02:42:41.000Z | # coding: utf-8
r"""
Decodes single-byte encodings, filling their "holes" in the same messy way that
everyone else does.
A single-byte encoding maps each byte to a Unicode character, except that some
bytes are left unmapped. In the commonly-used Windows-1252 encoding, for
example, bytes 0x81 and 0x8D, among others, ha... | 40.030303 | 79 | 0.716276 |
a7e3ea2bca17911c58028f452a735367a801eccf | 3,400 | py | Python | po_pattern/Lib/site-packages/behave/reporter/summary.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | 1 | 2017-03-22T04:25:35.000Z | 2017-03-22T04:25:35.000Z | po_pattern/Lib/site-packages/behave/reporter/summary.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | null | null | null | po_pattern/Lib/site-packages/behave/reporter/summary.py | tomekwszelaki/page-object-pattern-python | eb0ff7a1329b88149d743f2bc4a827c984e72dc3 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
Provides a summary after each test run.
"""
from __future__ import absolute_import, division
from behave.model import ScenarioOutline
from behave.reporter.base import Reporter
from behave.formatter.base import StreamOpener
import sys
# -- DISABLED: optional_steps = ('untested', 'undefined... | 37.362637 | 79 | 0.605882 |
ab9e83de05901d2b7c7f71332439bbba98109903 | 2,242 | py | Python | tests/test_util.py | t-cas/JumpSSH | 9f8529690064d11c9ec965a0340f220669bd7663 | [
"MIT"
] | 82 | 2017-06-12T03:31:44.000Z | 2022-02-22T12:15:41.000Z | tests/test_util.py | t-cas/JumpSSH | 9f8529690064d11c9ec965a0340f220669bd7663 | [
"MIT"
] | 225 | 2017-05-24T18:11:25.000Z | 2022-03-26T17:00:40.000Z | tests/test_util.py | t-cas/JumpSSH | 9f8529690064d11c9ec965a0340f220669bd7663 | [
"MIT"
] | 27 | 2017-05-24T17:50:25.000Z | 2022-01-23T18:07:11.000Z | try:
import unittest.mock as mock
except ImportError:
import mock
import string
import pytest
from jumpssh import util
mock_input = '__builtin__.raw_input' if util.PY2 else 'builtins.input'
def test_id_generator():
# basic checks on size
assert int(util.id_generator(size=1, chars=string.digits)) <... | 35.587302 | 78 | 0.718109 |
4ab5ec12573748b8d4a63b78c2e7bc666b2ecd95 | 584 | py | Python | stdplugins/leave.py | dqanshi/PornHub | 162a7053ca7f2c0b3617b852559cfaf0502d94a7 | [
"Apache-2.0"
] | 55 | 2019-07-13T15:57:54.000Z | 2021-09-20T16:50:42.000Z | stdplugins/leave.py | dqanshi/PornHub | 162a7053ca7f2c0b3617b852559cfaf0502d94a7 | [
"Apache-2.0"
] | 3 | 2020-04-15T02:08:53.000Z | 2020-06-06T13:45:18.000Z | stdplugins/leave.py | dqanshi/PornHub | 162a7053ca7f2c0b3617b852559cfaf0502d94a7 | [
"Apache-2.0"
] | 450 | 2019-07-12T13:18:41.000Z | 2022-03-29T18:47:42.000Z | # For @UniBorg
"""fake leave
.fleave"""
from telethon import events
from datetime import datetime
from uniborg.util import admin_cmd
import importlib.util
import asyncio
import random
import importlib.util
@borg.on(events.NewMessage(outgoing=True, pattern='^\.(f?f)l '))
async def timer_blankx(e):
txt=... | 12.166667 | 88 | 0.664384 |
fa5a018cf1dae94c71c7661a29cd65a45af20b30 | 10,329 | py | Python | tests/extension/types_/ipxact_/slave_lite/test_types_ipxact_slave_lite.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/types_/ipxact_/slave_lite/test_types_ipxact_slave_lite.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/types_/ipxact_/slave_lite/test_types_ipxact_slave_lite.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import veriloggen
import types_ipxact_slave_lite
expected_verilog = """
module test;
reg CLK;
reg RST;
wire [32-1:0] LED;
reg [32-1:0] myaxi_awaddr;
reg [4-1:0] myaxi_awcache;
reg [3-1:0] myaxi_awprot;
reg myaxi_awvalid;
wire... | 22.953333 | 755 | 0.627069 |
5e1f67496b6de76601946fdaa2b7a83c14528251 | 3,924 | py | Python | hangman/model.py | bionikspoon/tdd_python_hangman | f4b990b585b0b270c78221826f3e7ee3390f4ee3 | [
"MIT"
] | 7 | 2015-12-18T08:32:06.000Z | 2019-04-23T17:50:50.000Z | hangman/model.py | bionikspoon/tdd_python_hangman | f4b990b585b0b270c78221826f3e7ee3390f4ee3 | [
"MIT"
] | 4 | 2015-12-18T07:22:58.000Z | 2020-10-28T01:34:50.000Z | hangman/model.py | bionikspoon/tdd_python_hangman | f4b990b585b0b270c78221826f3e7ee3390f4ee3 | [
"MIT"
] | 2 | 2021-08-25T04:58:51.000Z | 2021-10-04T22:08:36.000Z | # coding=utf-8
"""
hangman.model
~~~~~~~~~~~~~
"""
from __future__ import absolute_import
import re
from collections import namedtuple
from .utils import WordBank, GameLost, GameWon
class Hangman(object):
"""
The the logic for managing the status of the game and raising key game related events.
>>> fro... | 25.986755 | 90 | 0.534913 |
86e200123c1887ab9de400fc80f9d2cd5b332e5f | 11,535 | py | Python | utils/utils_tf.py | haibinzheng/NeuronFair | 5f6affd6fb378058bb0d2a0fd0ea413d2c8bd3cf | [
"Apache-2.0"
] | 1 | 2022-02-10T13:39:44.000Z | 2022-02-10T13:39:44.000Z | utils/utils_tf.py | haibinzheng/NeuronFair | 5f6affd6fb378058bb0d2a0fd0ea413d2c8bd3cf | [
"Apache-2.0"
] | null | null | null | utils/utils_tf.py | haibinzheng/NeuronFair | 5f6affd6fb378058bb0d2a0fd0ea413d2c8bd3cf | [
"Apache-2.0"
] | null | null | null | from distutils.version import LooseVersion
import numpy as np
import os
from six.moves import xrange
import tensorflow as tf
import time
import warnings
import math
import sys
sys.path.append('../')
from .utils import batch_indices, _ArgsWrapper
def model_loss(y, model, mean=True):
"""
Define loss of TF graph
... | 39.101695 | 79 | 0.627221 |
ce26a1cac48430f6638982601a4f3fb6ac4d0943 | 642 | py | Python | my_topics/src/message_publisher.py | DetectiveDawg/Final-Project | 745e0b92d8c941cd5daf7dbe25b6bd57383da2db | [
"Apache-2.0"
] | 1 | 2021-04-01T23:34:09.000Z | 2021-04-01T23:34:09.000Z | my_topics/src/message_publisher.py | DetectiveDawg/Final-Project | 745e0b92d8c941cd5daf7dbe25b6bd57383da2db | [
"Apache-2.0"
] | null | null | null | my_topics/src/message_publisher.py | DetectiveDawg/Final-Project | 745e0b92d8c941cd5daf7dbe25b6bd57383da2db | [
"Apache-2.0"
] | 26 | 2020-04-09T00:47:24.000Z | 2021-09-21T06:22:28.000Z | #!/usr/bin/env python
import rospy
from rico_topics.msg import Complex # custom message type
from random import random # for random numbers!
rospy.init_node('message_publisher') # initialize node
pub = rospy.Publisher( # register topic
'complex', # topic name
Complex, # custom messa... | 29.181818 | 57 | 0.64486 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.