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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3833e4fa0c3e890f3ab73f783a055d69ff2006a6 | 9,060 | py | Python | detectron2/modeling/box_regression.py | YoongiKim/detectron2 | 10825b909e9797f0f069664f69699d3e3f2ab18f | [
"Apache-2.0"
] | 23 | 2020-02-06T15:17:08.000Z | 2022-02-28T00:14:06.000Z | detectron2/modeling/box_regression.py | YoongiKim/detectron2 | 10825b909e9797f0f069664f69699d3e3f2ab18f | [
"Apache-2.0"
] | 82 | 2020-01-29T23:48:32.000Z | 2021-09-08T02:09:30.000Z | detectron2/modeling/box_regression.py | YoongiKim/detectron2 | 10825b909e9797f0f069664f69699d3e3f2ab18f | [
"Apache-2.0"
] | 10 | 2020-02-20T16:59:19.000Z | 2020-05-28T15:27:13.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import math
import torch
# Value for clamping large dw and dh predictions. The heuristic is that we clamp
# such that dw and dh are no larger than what would transform a 16px box into a
# 1000px box (based on a small anchor, 16px, and a typical ima... | 42.139535 | 99 | 0.602539 |
521ffff6812c70110f2bc92fffb7f427b88ad828 | 1,346 | py | Python | tests/integration/models/test_user_employment.py | nethad/moco-wrapper | 012f9aab6e9fa60e3ccdf7254f0366b108651899 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | tests/integration/models/test_user_employment.py | nethad/moco-wrapper | 012f9aab6e9fa60e3ccdf7254f0366b108651899 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | tests/integration/models/test_user_employment.py | nethad/moco-wrapper | 012f9aab6e9fa60e3ccdf7254f0366b108651899 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | from moco_wrapper.util.response import ListingResponse, JsonResponse
from datetime import date
from .. import IntegrationTest
class TestUserEmployment(IntegrationTest):
def get_user(self):
with self.recorder.use_cassette("TestUserEmployment.get_user"):
user = self.moco.User.getlist().items[0]
... | 32.829268 | 75 | 0.632244 |
c0c73ae83fbdbd522d6baf400ff8281e76162923 | 744 | py | Python | tests/datatypes/test-NCName.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | tests/datatypes/test-NCName.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | tests/datatypes/test-NCName.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | from pyxb.exceptions_ import *
import unittest
import pyxb.binding.datatypes as xsd
class Test_NCName (unittest.TestCase):
def testValid (self):
valid = [ 'schema', '_Underscore', '_With.Dot', 'With-Hyphen' ]
for f in valid:
self.assertEqual(f, xsd.NCName(f))
self.assertEqual('L... | 35.428571 | 76 | 0.633065 |
513dfa533235eec3c4b567a41ad95f0ddd415b1f | 2,581 | py | Python | examples/pitch_plots/plot_lines_cmap.py | ElJdP/mplsoccer | 8a4558c4950bd9e88785ec59e5148af40ab90acf | [
"MIT"
] | null | null | null | examples/pitch_plots/plot_lines_cmap.py | ElJdP/mplsoccer | 8a4558c4950bd9e88785ec59e5148af40ab90acf | [
"MIT"
] | null | null | null | examples/pitch_plots/plot_lines_cmap.py | ElJdP/mplsoccer | 8a4558c4950bd9e88785ec59e5148af40ab90acf | [
"MIT"
] | null | null | null | """
==============================
Pass plot using lines and cmap
==============================
This example shows how to plot all passes leading to shots from a team using a colormap (cmap).
"""
from mplsoccer import VerticalPitch
from mplsoccer.statsbomb import read_event, EVENT_SLUG
from matplotlib import rcParam... | 36.871429 | 97 | 0.598993 |
27c9d93f5a4c995804ee63380a2db614bf309ab1 | 15,066 | py | Python | tests/unit/test_data_transformer.py | CironisLukas/CTGAN | c0795d5468bdb4aafa723cb350ea2c3c47b2783a | [
"MIT"
] | 565 | 2020-01-08T18:23:31.000Z | 2022-03-31T17:01:46.000Z | tests/unit/test_data_transformer.py | CironisLukas/CTGAN | c0795d5468bdb4aafa723cb350ea2c3c47b2783a | [
"MIT"
] | 148 | 2020-01-08T14:19:42.000Z | 2022-02-17T20:52:02.000Z | tests/unit/test_data_transformer.py | CironisLukas/CTGAN | c0795d5468bdb4aafa723cb350ea2c3c47b2783a | [
"MIT"
] | 170 | 2020-01-17T07:22:54.000Z | 2022-03-15T17:28:15.000Z | from unittest import TestCase
from unittest.mock import Mock, patch
import numpy as np
import pandas as pd
from ctgan.data_transformer import ColumnTransformInfo, DataTransformer, SpanInfo
class TestDataTransformer(TestCase):
@patch('ctgan.data_transformer.BayesianGaussianMixture')
def test___fit_continuou... | 39.132468 | 97 | 0.608523 |
554f8de4a392b7d199aa24d631a31a89dacca85e | 5,672 | py | Python | models/Deep-learning/dataset/cnn_loo_guide_mfe_guide_f24_filtered_1genef_9fold_top20gene_mfe_flanks_dg_linfo_contra_val_threepos_flags_floats_dataset.py | jingyi7777/CasRx_guide_efficiency | c9e900e4c4a73215f09852bd621b30e8dcb039e8 | [
"MIT"
] | null | null | null | models/Deep-learning/dataset/cnn_loo_guide_mfe_guide_f24_filtered_1genef_9fold_top20gene_mfe_flanks_dg_linfo_contra_val_threepos_flags_floats_dataset.py | jingyi7777/CasRx_guide_efficiency | c9e900e4c4a73215f09852bd621b30e8dcb039e8 | [
"MIT"
] | null | null | null | models/Deep-learning/dataset/cnn_loo_guide_mfe_guide_f24_filtered_1genef_9fold_top20gene_mfe_flanks_dg_linfo_contra_val_threepos_flags_floats_dataset.py | jingyi7777/CasRx_guide_efficiency | c9e900e4c4a73215f09852bd621b30e8dcb039e8 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import tensorflow as tf
from sklearn.model_selection import train_test_split
import random
#from dataset.dataset_filtered_utils import *
from dataset.dataset_utils import *
#from dataset.dataset_utils import normalize
def cnn_loo_guide_mfe_guide_f24_filtered_1genef_9fold_top20g... | 48.478632 | 176 | 0.708039 |
5cac38511a972ecdb2d7f48b129acc8aca8bd81c | 2,560 | py | Python | bitten/util/tests/xmlio.py | SpamExperts/bitten | 924ae157c876eeff7957074b0c51ed4685d4f304 | [
"BSD-3-Clause"
] | null | null | null | bitten/util/tests/xmlio.py | SpamExperts/bitten | 924ae157c876eeff7957074b0c51ed4685d4f304 | [
"BSD-3-Clause"
] | 1 | 2020-09-24T05:28:44.000Z | 2020-09-28T05:34:19.000Z | bitten/util/tests/xmlio.py | SpamExperts/bitten | 924ae157c876eeff7957074b0c51ed4685d4f304 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2007-2010 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://... | 32.820513 | 79 | 0.592969 |
0537f84ca55b3ebd42cc29971c9601ca8348f088 | 11,291 | py | Python | src/tello_driver_node.py | wsblues/tello_driver | 137344cf63a30daa00ea18f470d11ee3d472d73a | [
"Apache-2.0"
] | 67 | 2018-09-21T21:16:35.000Z | 2022-03-02T02:13:12.000Z | src/tello_driver_node.py | wsblues/tello_driver | 137344cf63a30daa00ea18f470d11ee3d472d73a | [
"Apache-2.0"
] | 17 | 2018-10-22T11:40:22.000Z | 2022-03-09T14:48:10.000Z | src/tello_driver_node.py | wsblues/tello_driver | 137344cf63a30daa00ea18f470d11ee3d472d73a | [
"Apache-2.0"
] | 37 | 2018-10-12T05:37:46.000Z | 2022-03-23T08:10:44.000Z | #!/usr/bin/env python2
import rospy
from std_msgs.msg import Empty, UInt8, Bool
from std_msgs.msg import UInt8MultiArray
from sensor_msgs.msg import Image
from geometry_msgs.msg import Twist
from nav_msgs.msg import Odometry
from dynamic_reconfigure.server import Server
from h264_image_transport.msg import H264Packet
f... | 36.778502 | 91 | 0.632008 |
82aeac97a783e33dd0d310819e46419f33594a8d | 796 | py | Python | search.py | Fendrel-/td-project-4 | d9f309fb860ddce9f13a4689ddb0c9d02ed3adb6 | [
"BSD-3-Clause"
] | null | null | null | search.py | Fendrel-/td-project-4 | d9f309fb860ddce9f13a4689ddb0c9d02ed3adb6 | [
"BSD-3-Clause"
] | null | null | null | search.py | Fendrel-/td-project-4 | d9f309fb860ddce9f13a4689ddb0c9d02ed3adb6 | [
"BSD-3-Clause"
] | null | null | null | from entry import Entry
class ByEmployee():
def __init__(self):
names = []
for count, entry in enumerate(Entry.select()):
if entry.employee_name not in names:
names.append(entry.employee_name)
self.names = names
class ByDate():
def __init__(self):
... | 21.513514 | 57 | 0.552764 |
37b049c073766bfd5ba7518965a9aaf070fe4b99 | 7,865 | py | Python | Repeat/GraphPPIS/train.py | jcchan23/SAIL | 878c59e9f1b4e6df3e2424c8213c1df25459e950 | [
"MIT"
] | 7 | 2022-01-11T14:09:31.000Z | 2022-03-22T05:39:14.000Z | Repeat/GraphPPIS/train.py | jcchan23/SAIL | 878c59e9f1b4e6df3e2424c8213c1df25459e950 | [
"MIT"
] | 2 | 2022-03-01T08:32:56.000Z | 2022-03-09T02:58:01.000Z | Repeat/GraphPPIS/train.py | jcchan23/SAIL | 878c59e9f1b4e6df3e2424c8213c1df25459e950 | [
"MIT"
] | 1 | 2022-03-09T19:07:45.000Z | 2022-03-09T19:07:45.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : train.py
@Time : 2022/01/18 14:07:31
@Author : Jianwen Chen
@Version : 1.0
@Contact : chenjw48@mail2.sysu.edu.cn
@License : (C)Copyright 2021-2022, SAIL-Lab
'''
######################################## import area ###########################... | 43.214286 | 139 | 0.569994 |
d7e4467e91b69cc74f0329ed8b901ff714da9a33 | 4,903 | py | Python | tools/memory/partition_allocator/objects_per_size.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/memory/partition_allocator/objects_per_size.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | tools/memory/partition_allocator/objects_per_size.py | chromium/chromium | df46e572c3449a4b108d6e02fbe4f6d24cf98381 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python3
# Copyright 2021 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.
"""Shows all objects sharing the same PartitionAlloc bucket."""
import argparse
import collections
import logging
import json
import o... | 29.359281 | 79 | 0.694065 |
31c09394c8eb7fcf503c6a53545c903ed90b33e4 | 2,965 | py | Python | tests/test_dataset/test_meta.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | tests/test_dataset/test_meta.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | tests/test_dataset/test_meta.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
# ======================================================================================================================
# Copyright (©) 2015-2021 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. =
# CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful... | 23.531746 | 120 | 0.533221 |
d15a84d51c66d7f21df46f19f1148564bb1cbccf | 1,238 | py | Python | test/test_color.py | ttesileanu/pydove | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | 6 | 2021-03-28T21:13:21.000Z | 2022-03-25T15:42:22.000Z | test/test_color.py | ttesileanu/pygrutils | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | 1 | 2021-03-30T22:24:51.000Z | 2021-04-01T19:20:23.000Z | test/test_color.py | ttesileanu/pygrutils | 35fd2cd36c55d949d7d76add8ce026851e8c7dd1 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: pydove
# language: python
# name: pydove
# ---
# %% [markdown]
# # Test... | 19.34375 | 81 | 0.594507 |
e331355a2199d210fe1c842911a9436db2181320 | 1,641 | py | Python | SVR_1D.py | tbh111/ML-RF-Harvesting | 7dbb577f9ff704b1e9800572f9eea4a71c614923 | [
"MIT"
] | null | null | null | SVR_1D.py | tbh111/ML-RF-Harvesting | 7dbb577f9ff704b1e9800572f9eea4a71c614923 | [
"MIT"
] | null | null | null | SVR_1D.py | tbh111/ML-RF-Harvesting | 7dbb577f9ff704b1e9800572f9eea4a71c614923 | [
"MIT"
] | null | null | null | # Python script for Efficiency prediction with SVR method, given input power(1D)
# Look into: https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR
import numpy as np
from sklearn.svm import SVR
from scipy import io
from sklearn.model_selection import train_test_split, GridSearchCV
impo... | 34.1875 | 99 | 0.730043 |
334ab6e5d4f39b7f87e9b07c6327f872b200133e | 3,034 | py | Python | sdk/python/tests/test_entity.py | Mwad22/feast | 6a09d49e2e7bc105c86f1789c765d89e452af0b0 | [
"Apache-2.0"
] | 3 | 2021-05-07T06:03:44.000Z | 2022-02-20T10:43:59.000Z | sdk/python/tests/test_entity.py | Mwad22/feast | 6a09d49e2e7bc105c86f1789c765d89e452af0b0 | [
"Apache-2.0"
] | 15 | 2020-11-13T19:01:34.000Z | 2022-02-22T15:47:29.000Z | sdk/python/tests/test_entity.py | Mwad22/feast | 6a09d49e2e7bc105c86f1789c765d89e452af0b0 | [
"Apache-2.0"
] | 2 | 2020-03-21T10:14:01.000Z | 2021-03-25T02:25:16.000Z | # Copyright 2020 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 31.604167 | 86 | 0.705339 |
181a755ad94ee51511bdf97262ab348471fddd67 | 652 | py | Python | src/gaesynkit/__init__.py | rodaebel/gaesynkit | a52a2f1a6f976e11f61ab40d13e3a04535d57ed2 | [
"Apache-2.0"
] | 1 | 2017-03-08T17:42:06.000Z | 2017-03-08T17:42:06.000Z | src/gaesynkit/__init__.py | rodaebel/gaesynkit | a52a2f1a6f976e11f61ab40d13e3a04535d57ed2 | [
"Apache-2.0"
] | null | null | null | src/gaesynkit/__init__.py | rodaebel/gaesynkit | a52a2f1a6f976e11f61ab40d13e3a04535d57ed2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2011 Tobias Rodäbel
#
# 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 ... | 34.315789 | 74 | 0.73773 |
d320f1af55ef83d4ab9d4d2e8a67a360eabcbfab | 39,655 | py | Python | onadata/libs/utils/export_tools.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/export_tools.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/export_tools.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | null | null | null | import csv
from datetime import datetime, date
import json
import os
import re
import six
import tempfile
from urlparse import urlparse
from zipfile import ZipFile
from bson import json_util
from django.conf import settings
from django.core.files.base import File
from django.core.files.temp import NamedTemporaryFile
f... | 37.659069 | 100 | 0.577355 |
4ab1634c98d4865e719044f1f39cd528ef65bec4 | 383 | py | Python | tests/test_basic.py | Red1210/repair_system | a16b10e844b9abe8089d5042e500bc0ddef62099 | [
"MIT"
] | null | null | null | tests/test_basic.py | Red1210/repair_system | a16b10e844b9abe8089d5042e500bc0ddef62099 | [
"MIT"
] | null | null | null | tests/test_basic.py | Red1210/repair_system | a16b10e844b9abe8089d5042e500bc0ddef62099 | [
"MIT"
] | null | null | null | import unittest
from flask import url_for
from app import create_app
class BasicTest(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.client = self.app.test_client()
def tearDown(self):
pass
def test_alive(self):
r = self.client.get(url_for("ma... | 20.157895 | 55 | 0.660574 |
99d1f5a58ba8096d32061bea68ed3bace93b86af | 13,202 | py | Python | coherence/backends/elisa_renderer.py | wd8rde/Coherence | 792ee3ddf28e4748c116056915a2bb7155137e7f | [
"MIT"
] | 21 | 2015-05-23T09:34:40.000Z | 2021-08-09T04:42:44.000Z | coherence/backends/elisa_renderer.py | wd8rde/Coherence | 792ee3ddf28e4748c116056915a2bb7155137e7f | [
"MIT"
] | 7 | 2015-05-24T12:19:49.000Z | 2020-05-21T09:27:43.000Z | coherence/backends/elisa_renderer.py | wd8rde/Coherence | 792ee3ddf28e4748c116056915a2bb7155137e7f | [
"MIT"
] | 4 | 2015-05-23T09:34:29.000Z | 2019-08-02T09:21:12.000Z | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2006, Frank Scholz <coherence@beebits.net>
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from twisted.internet.defer import Deferred
from twisted.python import failure
from twisted.sprea... | 38.943953 | 133 | 0.601879 |
56c3969678599ef0583eafe9615907bd597a93ff | 2,836 | py | Python | src/InfoGAN/module/model.py | jimmy-academia/GAN_studies | b3198e0290ac3b78a2b3e949a89aea43e532e558 | [
"MIT"
] | 1 | 2019-02-06T07:53:14.000Z | 2019-02-06T07:53:14.000Z | src/InfoGAN/module/model.py | jimmy-academia/GAN_studies | b3198e0290ac3b78a2b3e949a89aea43e532e558 | [
"MIT"
] | null | null | null | src/InfoGAN/module/model.py | jimmy-academia/GAN_studies | b3198e0290ac3b78a2b3e949a89aea43e532e558 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
InfoGAN model
__author__ = '{Jimmy Yeh}'
__email__ = '{marrch30@gmail.com}'
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
class GAN(nn.Module):
def __init__(self, args):
super(GAN, self).__init__()
self.G = Generator(args)
self.G.app... | 29.541667 | 72 | 0.549013 |
a51ca5940feb65f6da66848ae839325172de8d2b | 74,859 | py | Python | cinder/volume/drivers/nimble.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/nimble.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/nimble.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | # Nimble Storage, Inc. (c) 2013-2014
# 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 requi... | 44.269072 | 79 | 0.547242 |
680fdcf603065584926924410d1cf502886cd4cc | 1,079 | py | Python | users/views.py | samarth-singh-thakur/finanza | b518d800341ba3ccd2d9e45dd3b309ecfb181289 | [
"MIT"
] | null | null | null | users/views.py | samarth-singh-thakur/finanza | b518d800341ba3ccd2d9e45dd3b309ecfb181289 | [
"MIT"
] | 5 | 2021-03-30T14:08:55.000Z | 2021-09-22T19:31:37.000Z | users/views.py | samarth-singh-thakur/finanza | b518d800341ba3ccd2d9e45dd3b309ecfb181289 | [
"MIT"
] | null | null | null | from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm, UserChangeForm, PasswordChangeForm
from django.shortcuts import render, redirect
from django.http import HttpResponse
from .forms import UserRegisterForm
from .models import Profile
from django.contrib.auth.model... | 37.206897 | 90 | 0.731233 |
7dd5ecb9bfaf4459ba00942bf9b9cd63502def69 | 3,858 | py | Python | tools/perf/page_sets/tough_canvas_cases.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2019-11-28T10:46:52.000Z | 2019-11-28T10:46:52.000Z | tools/perf/page_sets/tough_canvas_cases.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/perf/page_sets/tough_canvas_cases.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-03-27T11:15:39.000Z | 2016-08-17T14:19:56.000Z | # Copyright 2014 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughCanvasCasesPage(page_module.Page):
def _... | 43.840909 | 111 | 0.732763 |
377db3801eb8c7af8e0b5e5c037967c901d66ceb | 1,362 | py | Python | src/intro_line.py | 0ED/UnitX | f3c8c564cb7822cebb24ebc000ca454f3222fbf2 | [
"MIT"
] | 2 | 2016-03-13T08:35:58.000Z | 2016-03-13T19:20:07.000Z | unitx/intro_line.py | 0ED/UnitX | f3c8c564cb7822cebb24ebc000ca454f3222fbf2 | [
"MIT"
] | 1 | 2016-11-04T23:34:21.000Z | 2016-11-04T23:34:21.000Z | unitx/intro_line.py | supertask/UnitX | f3c8c564cb7822cebb24ebc000ca454f3222fbf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
def get_line():
"""Gets a string of logo for intaractive run.
Returns:
A string of logo.
Advice:
Use a command for generating LOGO.
$ figlet -kw 120 -f slant UnitX
$ jp2a -i --width=30 --chars=" XY" --output=sample.txt unit_... | 23.894737 | 76 | 0.371512 |
c5427f0f9d7871436973fab2624402ca49c8bbc8 | 5,789 | py | Python | PythonBaseDemo/GraphicInterfaceProgrammin/11.6/messagebox_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.6/messagebox_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.6/messagebox_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#########################################################################
# 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> #
# author yeeku.H.lee kongyeeku@163.com #
# #
# version 1.0 ... | 45.226563 | 73 | 0.512006 |
2b4b5b7d3f38ff18caebbf4bf69cfe51dbf3f803 | 5,439 | py | Python | utils.py | rakib313/Bangla-End2End-Speech-Recognition | 67e776841bf2bb3f108e94d0567dc707497605ff | [
"MIT"
] | null | null | null | utils.py | rakib313/Bangla-End2End-Speech-Recognition | 67e776841bf2bb3f108e94d0567dc707497605ff | [
"MIT"
] | null | null | null | utils.py | rakib313/Bangla-End2End-Speech-Recognition | 67e776841bf2bb3f108e94d0567dc707497605ff | [
"MIT"
] | null | null | null | """
Defines various functions for processing the data.
"""
import numpy as np
import soundfile
from numpy.lib.stride_tricks import as_strided
from char_map import char_map, index_map
def calc_feat_dim(window, max_freq):
return int(0.001 * window * max_freq) + 1
def conv_output_length(input_length, filter_size... | 35.090323 | 78 | 0.621805 |
3a8d13af702d06ed0ee19a603d4f1f6b6a09d2a6 | 10,737 | py | Python | spark_fhir_schemas/r4/complex_types/location_hoursofoperation.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | 2 | 2020-10-31T23:25:01.000Z | 2021-06-09T14:12:42.000Z | spark_fhir_schemas/r4/complex_types/location_hoursofoperation.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | spark_fhir_schemas/r4/complex_types/location_hoursofoperation.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | from typing import Union, List, Optional
from pyspark.sql.types import (
StructType,
StructField,
StringType,
ArrayType,
BooleanType,
DataType,
)
# This file is auto-generated by generate_schema so do not edit it manually
# noinspection PyPep8Naming
class Location_HoursOfOperationSchema:
... | 47.092105 | 104 | 0.570271 |
454a50e232f9bba6d0b2f1e195a9ce371754c1dd | 13,823 | py | Python | isalt/scripts.py | mirceaulinic/isalt | 56cfa461ff2b344e4bf83b3474984ef1b61cdf86 | [
"Apache-2.0"
] | 54 | 2019-10-19T21:30:32.000Z | 2020-08-20T17:40:20.000Z | isalt/scripts.py | mirceaulinic/isalt | 56cfa461ff2b344e4bf83b3474984ef1b61cdf86 | [
"Apache-2.0"
] | 1 | 2019-10-22T10:27:42.000Z | 2019-10-29T11:28:22.000Z | isalt/scripts.py | mirceaulinic/ISalt | 56cfa461ff2b344e4bf83b3474984ef1b61cdf86 | [
"Apache-2.0"
] | 2 | 2021-02-15T15:41:39.000Z | 2021-02-19T11:38:53.000Z | # -*- coding: utf-8 -*-
# Copyright 2019-2020 Mircea Ulinic. All rights reserved.
#
# The contents of this file are 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/licen... | 35.44359 | 94 | 0.558924 |
6985154fff9c61d8afd6b8a6fd93a9496f84b066 | 1,250 | py | Python | resumao/summary/migrations/0001_initial.py | pablorodriguesk/summary | 367379a25fde7bd5c94113c6e923d6c153c64d0d | [
"bzip2-1.0.6"
] | null | null | null | resumao/summary/migrations/0001_initial.py | pablorodriguesk/summary | 367379a25fde7bd5c94113c6e923d6c153c64d0d | [
"bzip2-1.0.6"
] | null | null | null | resumao/summary/migrations/0001_initial.py | pablorodriguesk/summary | 367379a25fde7bd5c94113c6e923d6c153c64d0d | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.2 on 2019-06-16 18:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(aut... | 37.878788 | 122 | 0.5664 |
172f11258694309326194178c7f95cafd4308d4b | 9,474 | py | Python | src/pytezos/michelson/types/base.py | miracle2k/pytezos | e6b99f00f342d9a05b0c36a9883040961fd6d58e | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | src/pytezos/michelson/types/base.py | miracle2k/pytezos | e6b99f00f342d9a05b0c36a9883040961fd6d58e | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | src/pytezos/michelson/types/base.py | miracle2k/pytezos | e6b99f00f342d9a05b0c36a9883040961fd6d58e | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from copy import copy, deepcopy
from typing import Any, List, Optional, Tuple, Type, Union, cast
from pytezos.context.abstract import AbstractContext # type: ignore
from pytezos.michelson.forge import forge_micheline, unforge_micheline
from pytezos.michelson.micheline import Micheline
type_mappings = {
'nat': 'i... | 39.974684 | 118 | 0.617479 |
adf81b731e49bbdc08bc22c14df55f31996562b3 | 3,586 | py | Python | tests/test_emoji.py | graphext/spacymoji | d2cc8b5834772b46a4fef930f3c2fd46b2723b2c | [
"MIT"
] | null | null | null | tests/test_emoji.py | graphext/spacymoji | d2cc8b5834772b46a4fef930f3c2fd46b2723b2c | [
"MIT"
] | null | null | null | tests/test_emoji.py | graphext/spacymoji | d2cc8b5834772b46a4fef930f3c2fd46b2723b2c | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from spacy.lang.en import English
import pytest
from spacymoji import Emoji
@pytest.fixture(scope="function")
def nlp():
return English()
def test_integration(nlp):
nlp.add_pipe("emoji")
assert nlp.pipe_names[-1] == "emoji"
@pytest.mark.paramet... | 29.393443 | 91 | 0.661461 |
2cc1ffac59c6904de59250a11b47ae65f7a60397 | 10,183 | py | Python | PyObjCTest/test_cfcalendar.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_cfcalendar.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_cfcalendar.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | import datetime
import objc
import CoreFoundation
from PyObjCTools.TestSupport import TestCase, min_os_level
class TestCFCalendarVariadic(TestCase):
def testTypes(self):
cls = None
try:
cls = objc.lookUpClass("NSCFCalendar")
except objc.error:
cls = objc.lookUpClas... | 39.933333 | 87 | 0.666994 |
6266a4b934fd45672d50e949e0bd99a52e3265c0 | 7,897 | py | Python | tests/test_trainer.py | stonebegin/Promise12-3DUNet | d48d95ae7f2da98d068f84391dc547abd968981d | [
"MIT"
] | 2 | 2020-12-20T12:35:24.000Z | 2021-01-04T03:21:37.000Z | tests/test_trainer.py | stonebegin/Promise12-3DUNet | d48d95ae7f2da98d068f84391dc547abd968981d | [
"MIT"
] | 1 | 2020-12-27T05:08:02.000Z | 2020-12-27T08:08:50.000Z | tests/test_trainer.py | stonebegin/Promise12-3DUNet | d48d95ae7f2da98d068f84391dc547abd968981d | [
"MIT"
] | null | null | null | import copy
import logging
import os
from tempfile import NamedTemporaryFile
import h5py
import numpy as np
import torch
from datasets.hdf5 import get_train_loaders
from train import _create_optimizer, _create_lr_scheduler
from unet3d.losses import get_loss_criterion
from unet3d.metrics import get_evaluat... | 39.883838 | 112 | 0.578068 |
defd17948fbf8b14630c82fbf909be2778ad1ee2 | 965 | py | Python | migrate.py | anthonylv/pyD2W | f5b8d67601a35f6f087447758eb8e0484f66b085 | [
"MIT"
] | 20 | 2015-08-16T05:02:06.000Z | 2020-09-28T12:11:09.000Z | migrate.py | anthonylv/pyD2W | f5b8d67601a35f6f087447758eb8e0484f66b085 | [
"MIT"
] | 5 | 2015-08-26T09:01:13.000Z | 2019-06-11T21:27:55.000Z | migrate.py | anthonylv/pyD2W | f5b8d67601a35f6f087447758eb8e0484f66b085 | [
"MIT"
] | 9 | 2016-02-25T00:16:27.000Z | 2021-07-08T20:59:40.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Migrate database.
This module contains the logic to run the migration.
"""
import os, subprocess
import display_cli as cli
def run_migration(settings, dbconn, database=None):
"""Migrate drupal
Args:
database: An open connection to the Drupal database.
... | 24.74359 | 72 | 0.545078 |
11156bc972857610e3a9d1f5c5859c7db1ef9a42 | 6,434 | py | Python | pandas/util/_doctools.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | pandas/util/_doctools.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 16 | 2021-03-19T09:44:52.000Z | 2022-03-12T00:22:14.000Z | pandas/util/_doctools.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 9 | 2020-02-05T10:24:12.000Z | 2020-02-10T13:08:50.000Z | import numpy as np
import pandas as pd
class TablePlotter:
"""
Layout some DataFrames in vertical/horizontal layout for explanation.
Used in merging.rst
"""
def __init__(self, cell_width=0.37, cell_height=0.25, font_size=7.5):
self.cell_width = cell_width
self.cell_height = cell_... | 34.406417 | 88 | 0.54958 |
c2064395ca22f6e549aa18a6f0279312dc6ba5ac | 1,304 | py | Python | kryptobot/db/timescale.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 24 | 2018-05-29T13:44:36.000Z | 2022-03-12T20:41:45.000Z | kryptobot/db/timescale.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 23 | 2018-07-08T02:31:18.000Z | 2020-06-02T04:07:49.000Z | kryptobot/db/timescale.py | eristoddle/Kryptobot | d0c3050a1c924125810946530670c19b2de72d3f | [
"Apache-2.0"
] | 14 | 2018-08-10T15:44:27.000Z | 2021-06-14T07:14:52.000Z | import re
def ccxt_to_series_interval(interval):
match = re.match(r"([0-9]+)([a-z]+)", interval, re.I)
if match:
items = match.groups()
if items[1] == 'm':
return items[0] + ' minutes'
if items[1] == 'h':
return items[0] + ' hours'
def get_candle_gaps(session,... | 26.08 | 77 | 0.544479 |
f3795cf64bbccdbe4597eb259e2ebde6fe7fe95f | 2,035 | py | Python | olimpiada/ejercicios/olimpiada II/cesar.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | null | null | null | olimpiada/ejercicios/olimpiada II/cesar.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | null | null | null | olimpiada/ejercicios/olimpiada II/cesar.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | 1 | 2020-08-19T17:25:22.000Z | 2020-08-19T17:25:22.000Z | modo = raw_input("Cifrar(c) o descifrar(d)?: ")
cesar = input("Numero cesar: ")
cad = raw_input("Introduce cadena:")
def accion(modo, cadena, cesar):
"""Realiza el cifrado o descifrado de la cadena segun la eleccion del usuario"""
cifrado = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",... | 56.527778 | 180 | 0.682064 |
bb235a762718c91f2fcc49ae1e61eaf7d5075331 | 2,818 | py | Python | tests/test_node_organizer.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 4 | 2015-03-15T22:32:35.000Z | 2019-12-23T12:13:13.000Z | tests/test_node_organizer.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 3 | 2017-08-17T09:36:42.000Z | 2021-12-13T19:43:28.000Z | tests/test_node_organizer.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding:utf-8
# Purpose: test node organizer
# Created: 31.01.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT
from __future__ import unicode_literals, print_function, division
__author__ = "mozman <mozman@gmx.at>"
import unittest
# test helpers
from mytesttools import Simple... | 34.790123 | 83 | 0.710788 |
e676bb5aedd69b989e62b607a8b07ea905dcd39e | 34,033 | py | Python | systemvm/debian/opt/cloud/bin/cs/CsAddress.py | elShiaLabeouf/cloudstack | 3c5580632425ded5a468c3cd82cd141e7410ef39 | [
"Apache-2.0"
] | null | null | null | systemvm/debian/opt/cloud/bin/cs/CsAddress.py | elShiaLabeouf/cloudstack | 3c5580632425ded5a468c3cd82cd141e7410ef39 | [
"Apache-2.0"
] | null | null | null | systemvm/debian/opt/cloud/bin/cs/CsAddress.py | elShiaLabeouf/cloudstack | 3c5580632425ded5a468c3cd82cd141e7410ef39 | [
"Apache-2.0"
] | null | null | null | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | 41.453106 | 150 | 0.538683 |
55aa7c7911c175df4445118d2b623f41deb002f9 | 595 | py | Python | app/manage.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | 2 | 2017-12-02T13:58:30.000Z | 2018-08-02T17:07:59.000Z | app/manage.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | app/manage.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, os.pardir))
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(os.path.dirname(__file__)), ".... | 35 | 152 | 0.729412 |
03a00db44ce2db8c23fac59e19bba0a059770684 | 2,317 | py | Python | utils/utils.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | utils/utils.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | utils/utils.py | elitonfilho/segsr | 74ee5a4794f0894cffbb08f696f601b7d914513c | [
"MIT"
] | null | null | null | from pathlib import Path
from shutil import copy
import torch
import pandas as pd
from datetime import datetime
def create_pretrain_folder(args, cfg):
if cfg.TRAIN.model_save_path:
path_save_model = Path(cfg.TRAIN.model_save_path).resolve()
if path_save_model.exists():
time = datetime.... | 36.203125 | 92 | 0.584376 |
50b45a76b0d5ec675edce4c93b5465b2dba04332 | 5,050 | py | Python | salt-2016.3.3/salt/modules/data.py | stephane-martin/salt-debian-packaging | 4ec73750ba67bfe35a5bc0faa110f2bdec5c6a66 | [
"Apache-2.0"
] | null | null | null | salt-2016.3.3/salt/modules/data.py | stephane-martin/salt-debian-packaging | 4ec73750ba67bfe35a5bc0faa110f2bdec5c6a66 | [
"Apache-2.0"
] | null | null | null | salt-2016.3.3/salt/modules/data.py | stephane-martin/salt-debian-packaging | 4ec73750ba67bfe35a5bc0faa110f2bdec5c6a66 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Manage a local persistent data structure that can hold any arbitrary data
specific to the minion
'''
from __future__ import absolute_import
# Import python libs
import os
import ast
import logging
# Import salt libs
import salt.utils
import salt.payload
# Import 3rd-party lib
import salt.... | 18.566176 | 77 | 0.580594 |
5c553e94381f9f493b2597aaa2c73d119091cfab | 140 | py | Python | tests/watch_tests/basic.py | FiloSottile/PyScribe | 94574f10b42f2c35ffce40980aedd52bd4aa8148 | [
"MIT"
] | null | null | null | tests/watch_tests/basic.py | FiloSottile/PyScribe | 94574f10b42f2c35ffce40980aedd52bd4aa8148 | [
"MIT"
] | null | null | null | tests/watch_tests/basic.py | FiloSottile/PyScribe | 94574f10b42f2c35ffce40980aedd52bd4aa8148 | [
"MIT"
] | 1 | 2019-11-10T01:20:47.000Z | 2019-11-10T01:20:47.000Z | def main():
ps = pyscriber.Scriber()
x = 5
ps.watch(x)
x = 3
y = "world"
x = 7
if __name__=="__main__":
main()
| 12.727273 | 28 | 0.478571 |
2fdf51f0e98d71e9fa37896a1cef4ebbc251242b | 3,841 | py | Python | jnt/matching/crowd.py | alexanderpanchenko/vec2synset | ea99ea80d258127a0cd6c7688d6b277eed22104d | [
"Apache-2.0"
] | 10 | 2016-04-03T19:07:11.000Z | 2021-05-03T11:00:52.000Z | jnt/matching/crowd.py | alexanderpanchenko/vec2synset | ea99ea80d258127a0cd6c7688d6b277eed22104d | [
"Apache-2.0"
] | null | null | null | jnt/matching/crowd.py | alexanderpanchenko/vec2synset | ea99ea80d258127a0cd6c7688d6b277eed22104d | [
"Apache-2.0"
] | 2 | 2017-03-06T07:24:45.000Z | 2019-11-13T12:51:23.000Z | from pprint import pprint
from jnt.patterns import re_whitespaces
import codecs
import xml.etree.ElementTree as et
from glob import glob
from os.path import join
from collections import defaultdict
from jnt.matching.crowdsourcing_words import load_crowd_clusters
from math import ceil
import re
WORDS_PER_PAGE = 5
def... | 41.301075 | 113 | 0.556626 |
e664b676b3f0402b05dbd5e7e740905e989580c6 | 7,077 | py | Python | modules/RPIO-master/source/RPIO/PWM/__init__.py | daniego/rover-engine | 9254e28b3548f24448a078813ab0b0268abcf17a | [
"Apache-2.0"
] | null | null | null | modules/RPIO-master/source/RPIO/PWM/__init__.py | daniego/rover-engine | 9254e28b3548f24448a078813ab0b0268abcf17a | [
"Apache-2.0"
] | null | null | null | modules/RPIO-master/source/RPIO/PWM/__init__.py | daniego/rover-engine | 9254e28b3548f24448a078813ab0b0268abcf17a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of RPIO.
#
# Copyright
#
# Copyright (C) 2013 Chris Hager <chris@linuxuser.at>
#
# License
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Softw... | 32.022624 | 79 | 0.678395 |
646388b9a4f8f21892e95be4fb85b5bd8b4c8efe | 330 | py | Python | demos/urls.py | Thuhaa/goalspatial | 349c3a8e96d6553dedba6791f0102f2d02ee9c00 | [
"MIT"
] | null | null | null | demos/urls.py | Thuhaa/goalspatial | 349c3a8e96d6553dedba6791f0102f2d02ee9c00 | [
"MIT"
] | null | null | null | demos/urls.py | Thuhaa/goalspatial | 349c3a8e96d6553dedba6791f0102f2d02ee9c00 | [
"MIT"
] | null | null | null | from django.urls import path
from .import views
urlpatterns = [
path('leaflet/getting-started-with-leaflet', views.leaflet_getting_started, name='leaflet-getting-started'),
path('geography-game', views.geography_game, name='geography-game'),
path('leaflet/major-towns-population', views.population_view, name='pop... | 47.142857 | 109 | 0.778788 |
a8c305534977e523d815324a91dcc159881ba374 | 1,500 | py | Python | EMCCD/EMCCD/example_opacquire.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | EMCCD/EMCCD/example_opacquire.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | EMCCD/EMCCD/example_opacquire.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | import time
import matplotlib.pyplot as plt
from EMCCD_backend import EMCCD, OpAcquire
opacquire = OpAcquire(VERBOSE=True)
FLAG, message, n_modes = opacquire.OA_Initialize()
FLAG, message, n_modes = opacquire.OA_GetNumberOfPreSetModes()
print("Number of OpAcquire modes is ", n_modes)
FLAG, message, modes = opacqui... | 29.411765 | 118 | 0.754 |
ac3cfb54ae75f5464985e0ff5b29ce78ff398095 | 1,573 | py | Python | create_preprocessed_dataset.py | abhyudaynj/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 191 | 2016-08-19T08:20:59.000Z | 2021-09-07T09:42:00.000Z | create_preprocessed_dataset.py | gabrielStanovsky/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 3 | 2017-02-17T06:01:19.000Z | 2020-05-05T13:33:02.000Z | create_preprocessed_dataset.py | gabrielStanovsky/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 69 | 2016-09-28T10:10:22.000Z | 2021-05-18T09:37:51.000Z | # Code for creating a preprocessed dataset
import sys,os,json,pickle
full_path = os.path.realpath(__file__)
sys.path.insert(0,full_path)
###### code above this line is used to treat bioNLP as a local python package. #####
import logging
logging.basicConfig(level=logging.INFO)
logger=logging.getLogger(__name__)
impo... | 39.325 | 109 | 0.834075 |
1a4d9680c1e0c1d96d3a7eff77637af4d4db0c20 | 3,135 | py | Python | homeassistant/components/deconz/binary_sensor.py | m2hofi94/home-assistant | 288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | homeassistant/components/deconz/binary_sensor.py | m2hofi94/home-assistant | 288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064 | [
"Apache-2.0"
] | 3 | 2021-02-08T20:54:46.000Z | 2021-09-08T02:30:04.000Z | homeassistant/components/deconz/binary_sensor.py | m2hofi94/home-assistant | 288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """Support for deCONZ binary sensors."""
from pydeconz.sensor import Presence, Vibration
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.const import ATTR_TEMPERATURE
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
... | 32.319588 | 86 | 0.697289 |
c3dcdf67376491fd32c727dbc48fcfccd690ebb7 | 4,139 | py | Python | benchmark/startCirq1913.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1913.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1913.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=55
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 39.04717 | 77 | 0.65209 |
3772643dcebbd0d82ff8dd51ecb723631c33f535 | 698 | py | Python | 0124 Binary Tree Maximum Path Sum.py | MdAbedin/leetcode | e835f2e716ea5fe87f30b84801ede9bc023749e7 | [
"MIT"
] | 4 | 2020-09-11T02:36:11.000Z | 2021-09-29T20:47:11.000Z | 0124 Binary Tree Maximum Path Sum.py | MdAbedin/leetcode | e835f2e716ea5fe87f30b84801ede9bc023749e7 | [
"MIT"
] | 3 | 2020-09-10T03:51:42.000Z | 2021-09-25T01:41:57.000Z | 0124 Binary Tree Maximum Path Sum.py | MdAbedin/leetcode | e835f2e716ea5fe87f30b84801ede9bc023749e7 | [
"MIT"
] | 6 | 2020-09-10T03:46:15.000Z | 2021-09-25T01:24:48.000Z | # 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 helper(self, node):
if node is None:
return 0
left_max = self.helpe... | 29.083333 | 76 | 0.571633 |
b518528a8a0187071ca3654d093637ebd3a081fb | 556 | py | Python | docs/examples/parallel/helloworld.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 1 | 2016-05-26T10:57:18.000Z | 2016-05-26T10:57:18.000Z | docs/examples/parallel/helloworld.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 3 | 2015-04-01T13:14:57.000Z | 2015-05-26T16:01:37.000Z | docs/examples/parallel/helloworld.py | dchichkov/ipython | 8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4 | [
"BSD-3-Clause-Clear"
] | 1 | 2015-05-17T14:14:26.000Z | 2015-05-17T14:14:26.000Z | # <nbformat>2</nbformat>
# <markdowncell>
# # Distributed hello world
#
# Originally by Ken Kinder (ken at kenkinder dom com)
# <codecell>
from IPython.parallel import Client
# <codecell>
rc = Client()
view = rc.load_balanced_view()
# <codecell>
def sleep_and_echo(t, msg):
import time
time.sleep(t)
... | 15.885714 | 54 | 0.697842 |
073e6ae358b4d9f4d21af65f564c91a45ab3fa3c | 25,542 | py | Python | server/utils/arx_utils.py | hexagoncode/arxcode | bfdace3c28cc870ad5334d182ad2b47b681f3e4b | [
"MIT"
] | null | null | null | server/utils/arx_utils.py | hexagoncode/arxcode | bfdace3c28cc870ad5334d182ad2b47b681f3e4b | [
"MIT"
] | null | null | null | server/utils/arx_utils.py | hexagoncode/arxcode | bfdace3c28cc870ad5334d182ad2b47b681f3e4b | [
"MIT"
] | null | null | null | """
General helper functions that don't fit neatly under any given category.
They provide some useful string and conversion methods that might
be of use when designing your own game.
"""
import re
from datetime import datetime
from django.conf import settings
def validate_name(name, formatting=True, not_player=Tru... | 35.279006 | 120 | 0.633741 |
63c65de905d0197e714470da11968ec37e83edf2 | 544 | py | Python | iaso/migrations/0019_auto_20191127_1602.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 29 | 2020-12-26T07:22:19.000Z | 2022-03-07T13:40:09.000Z | iaso/migrations/0019_auto_20191127_1602.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 150 | 2020-11-09T15:03:27.000Z | 2022-03-07T15:36:07.000Z | iaso/migrations/0019_auto_20191127_1602.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 4 | 2020-11-09T10:38:13.000Z | 2021-10-04T09:42:47.000Z | # Generated by Django 2.1.11 on 2019-11-27 16:02
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("iaso", "0018_profile")]
operations = [
migrations.AlterField(
model_name="... | 25.904762 | 117 | 0.647059 |
00d3b304ce80df2db40b5acbc3a32fcb3ad9a8de | 3,258 | py | Python | nearest_gene_model_testing.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | nearest_gene_model_testing.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | nearest_gene_model_testing.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | # TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout
# Helper libraries
import numpy as np
import pandas as pd
import pickle
import random
import subprocess
#reshuffle sampling of 8 cell only stage dhs sites
subproces... | 29.889908 | 119 | 0.724064 |
a50769c093b98d7f87d62baeefa663b83a90c15d | 6,013 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/eos.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/eos.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/eos.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | 44.873134 | 138 | 0.651755 |
6efb4fee5ecaaabd5bbc7b509cc03a381b15c89a | 15,365 | py | Python | lib/python3.5/site-packages/bsddb3/tests/test_dbtables.py | quentinlautischer/291MiniProject2 | 90b57cf5f9fda8ba3d263efbfd8afdd0a12e6cbe | [
"Apache-2.0"
] | 1 | 2020-03-21T15:17:22.000Z | 2020-03-21T15:17:22.000Z | Lib3/bsddb/test/test_dbtables.py | shoemakerdr/bsddb3 | 61bffcd65474ede4d4317dd28789056e83eff541 | [
"BSD-3-Clause"
] | 1 | 2022-02-22T22:23:55.000Z | 2022-02-22T22:23:55.000Z | bsddb3/bsddb3-6.2.6/build/lib.freebsd-12.1-RELEASE-amd64-3.7/bsddb3/tests/test_dbtables.py | mpwillson/spambayes3 | b51d7bb9016066234ce88dad65faabed85f63d78 | [
"PSF-2.0"
] | null | null | null | #!/usr/bin/env python
#
#-----------------------------------------------------------------------
# A test suite for the table interface built on bsddb.db
#-----------------------------------------------------------------------
#
# Copyright (C) 2000, 2001 by Autonomous Zone Industries
# Copyright (C) 2002 Gregory P. Sm... | 37.567237 | 98 | 0.488968 |
273ab121bb52d1c07f1f73ead46e64b50a483226 | 6,558 | py | Python | classla/utils/datasets/process_best.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 12 | 2019-11-25T14:51:21.000Z | 2021-02-21T16:59:38.000Z | classla/utils/datasets/process_best.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 23 | 2021-03-12T13:17:17.000Z | 2022-02-14T08:56:53.000Z | classla/utils/datasets/process_best.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 7 | 2021-04-04T15:04:27.000Z | 2022-02-20T17:33:39.000Z | """Parses the BEST Thai dataset.
That is to say, the dataset named BEST. We have not yet figured out
which segmentation standard we prefer.
Note that the version of BEST we used actually had some strange
sentence splits according to a native Thai speaker. Not sure how to
fix that. Options include doing it automati... | 37.474286 | 117 | 0.557944 |
f8932536d992bdb2a9cf645a6c717f3501195bc6 | 1,911 | py | Python | wispy/percolator.py | wfondrie/wefpy | 00691d453048203e1e3b1daea53879067ee4a395 | [
"Apache-2.0"
] | null | null | null | wispy/percolator.py | wfondrie/wefpy | 00691d453048203e1e3b1daea53879067ee4a395 | [
"Apache-2.0"
] | null | null | null | wispy/percolator.py | wfondrie/wefpy | 00691d453048203e1e3b1daea53879067ee4a395 | [
"Apache-2.0"
] | null | null | null | """
This module contains functions that are useful for interacting with
Percolator input and output files in Python.
"""
import tqdm
import pandas as pd
def read(txt_file: str) -> pd.DataFrame:
"""
Read a Percolator tab-delimited file to a pandas DataFrame.
This works for either the Percolator INput forma... | 30.333333 | 77 | 0.620094 |
8d00aa1e9189918ae5f7a85565d750e896603d83 | 2,253 | py | Python | wazimap_np/demographics.py | pratimakandel/nepalmap_federal | 555e7d6400bdafb1df1b78de2d48842ed4723d60 | [
"MIT"
] | 14 | 2018-06-10T02:44:28.000Z | 2020-06-17T23:54:32.000Z | wazimap_np/demographics.py | pratimakandel/nepalmap_federal | 555e7d6400bdafb1df1b78de2d48842ed4723d60 | [
"MIT"
] | 89 | 2018-06-25T02:10:27.000Z | 2020-07-05T19:07:33.000Z | wazimap_np/demographics.py | pratimakandel/nepalmap_federal | 555e7d6400bdafb1df1b78de2d48842ed4723d60 | [
"MIT"
] | 24 | 2018-07-13T02:10:12.000Z | 2020-07-05T19:28:02.000Z | from collections import OrderedDict
from wazimap.data.utils import get_stat_data
# Demographic recodes
DISABILITY_RECODES = OrderedDict([
('Physical', 'Physical'),
('Blind/low vision', 'Blind/Low Vision'),
('Deaf/hard of hearing', 'Deaf'),
('Speech problem', 'Speech'),
('Multiple disable', 'Multip... | 33.132353 | 93 | 0.647137 |
5cc6f4080d18f3099d6700981d7ef13cceaee144 | 1,067 | py | Python | manabi/apps/jdic/views.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 14 | 2015-10-03T07:34:28.000Z | 2021-09-20T07:10:29.000Z | manabi/apps/jdic/views.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 23 | 2019-10-25T08:47:23.000Z | 2022-01-30T02:00:45.000Z | manabi/apps/jdic/views.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 7 | 2016-10-04T08:10:36.000Z | 2021-09-20T07:10:33.000Z | import http.client
from django.conf import settings
from django.views.decorators.http import require_POST
from manabi.apps.flashcards.views.decorators import flashcard_api as api
from manabi.apps.flashcards.views.decorators import ApiException
@api
#@require_POST
def audio_file_exists(request):
'''
Returns ... | 26.02439 | 75 | 0.674789 |
2c66f39b346ad9ae0987649844e4d5cad19caccc | 1,816 | py | Python | install/app_store/tk-multi-about/v0.2.7/python/tk_multi_about/app_browser.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | install/app_store/tk-multi-about/v0.2.7/python/tk_multi_about/app_browser.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | install/app_store/tk-multi-about/v0.2.7/python/tk_multi_about/app_browser.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | 1 | 2020-02-15T10:42:56.000Z | 2020-02-15T10:42:56.000Z | # Copyright (c) 2013 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to t... | 34.264151 | 88 | 0.61674 |
3b659f8c89ec4b499199a5477202aa5d072fb0ae | 6,924 | py | Python | backend/dark_base_29565/settings.py | crowdbotics-apps/dark-base-29565 | 0f8bb36513d26750dfdedb4c58065def7515f3a1 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/dark_base_29565/settings.py | crowdbotics-apps/dark-base-29565 | 0f8bb36513d26750dfdedb4c58065def7515f3a1 | [
"FTL",
"AML",
"RSA-MD"
] | 58 | 2021-08-06T15:01:58.000Z | 2021-10-31T15:32:53.000Z | backend/dark_base_29565/settings.py | crowdbotics-apps/dark-base-29565 | 0f8bb36513d26750dfdedb4c58065def7515f3a1 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for dark_base_29565 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impo... | 29.589744 | 112 | 0.730791 |
9d6402d03739a7724174d191d02234a978b841a9 | 2,169 | py | Python | core/leetCode.py | ericjwei/elevator | 2122ad583f11f4726c05797e71d0dd25b62b61f6 | [
"MIT"
] | null | null | null | core/leetCode.py | ericjwei/elevator | 2122ad583f11f4726c05797e71d0dd25b62b61f6 | [
"MIT"
] | 4 | 2020-10-27T22:29:26.000Z | 2021-06-02T01:30:45.000Z | core/leetCode.py | ericjwei/elevator | 2122ad583f11f4726c05797e71d0dd25b62b61f6 | [
"MIT"
] | null | null | null | from listNode import ListNode
class Solution:
# Given an array of integers, return indices of the two numbers such that they add up to a specific target.
# You may assume that each input would have exactly one solution, and you may not use the same element twice.
def twoSum(self, nums: [int], target: int) -> [int]:... | 34.983871 | 109 | 0.613647 |
d6d87ac119b9382ab4218b34af8888e0b4894862 | 2,170 | py | Python | share/qt/extract_strings_qt.py | studscoin/STUDS | 04edce15153c47f81b00d00dad44493043161205 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | studscoin/STUDS | 04edce15153c47f81b00d00dad44493043161205 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | studscoin/STUDS | 04edce15153c47f81b00d00dad44493043161205 | [
"MIT"
] | 1 | 2021-06-16T07:59:10.000Z | 2021-06-16T07:59:10.000Z | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt stringdefs so that
they can be picked up by Qt linguist.
'''
from __future__ import division,print_function,unicode_literals
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/studscoinstrings.... | 25.833333 | 105 | 0.620737 |
9b13687463316972c1bd5252bc521eef6ef023c0 | 14,907 | py | Python | qiskit_ionq/ionq_job.py | RodMech/qiskit-ionq | d3656dc1ecaf64b903965af3503f51abf0930e02 | [
"Apache-2.0"
] | null | null | null | qiskit_ionq/ionq_job.py | RodMech/qiskit-ionq | d3656dc1ecaf64b903965af3503f51abf0930e02 | [
"Apache-2.0"
] | null | null | null | qiskit_ionq/ionq_job.py | RodMech/qiskit-ionq | d3656dc1ecaf64b903965af3503f51abf0930e02 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 39.228947 | 100 | 0.641175 |
8b634b41a0e0a780fdba00132fe43bbe7905cf4a | 979 | py | Python | product/migrations/0002_auto_20200512_1933.py | dasundev/django-ecommerce-project | e6187e3f70f0e1f7b4cc0003b03696b4088534f8 | [
"Apache-2.0"
] | null | null | null | product/migrations/0002_auto_20200512_1933.py | dasundev/django-ecommerce-project | e6187e3f70f0e1f7b4cc0003b03696b4088534f8 | [
"Apache-2.0"
] | null | null | null | product/migrations/0002_auto_20200512_1933.py | dasundev/django-ecommerce-project | e6187e3f70f0e1f7b4cc0003b03696b4088534f8 | [
"Apache-2.0"
] | 1 | 2021-10-03T05:45:55.000Z | 2021-10-03T05:45:55.000Z | # Generated by Django 2.2.12 on 2020-05-12 14:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='discount',
... | 27.971429 | 131 | 0.581205 |
2d89d91c073783bd9f37570dfc547800a59bd3a9 | 806 | py | Python | library/flotilla/joystick.py | sonntagsgesicht/flotilla-python | 3b2535d9ff41c99b3104e2b67f3cd46639e3be0b | [
"MIT"
] | 22 | 2016-01-26T14:08:25.000Z | 2022-01-17T01:43:26.000Z | library/flotilla/joystick.py | sonntagsgesicht/flotilla-python | 3b2535d9ff41c99b3104e2b67f3cd46639e3be0b | [
"MIT"
] | 19 | 2016-01-09T19:53:30.000Z | 2022-02-10T17:19:46.000Z | library/flotilla/joystick.py | sonntagsgesicht/flotilla-python | 3b2535d9ff41c99b3104e2b67f3cd46639e3be0b | [
"MIT"
] | 18 | 2015-12-16T18:13:36.000Z | 2021-11-14T15:26:44.000Z | from .module import Module
class Joystick(Module):
name = 'joystick'
def __init__(self, channel, client):
Module.__init__(self, channel, client)
self.xstart = 1023
self.ystart = 1023
def rotation(self, r=0):
if r == 0:
self.xstart = 1023
self.ystart... | 22.388889 | 55 | 0.516129 |
e0f43bae8b08f10e590dea196f0afda3fc61aa6b | 2,302 | py | Python | certbot-dns-cloudflare/setup.py | weitanx/certbot | 5c111d0bd1206d864d7cb93754e101f6073bc669 | [
"Apache-2.0"
] | null | null | null | certbot-dns-cloudflare/setup.py | weitanx/certbot | 5c111d0bd1206d864d7cb93754e101f6073bc669 | [
"Apache-2.0"
] | null | null | null | certbot-dns-cloudflare/setup.py | weitanx/certbot | 5c111d0bd1206d864d7cb93754e101f6073bc669 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from setuptools import find_packages
from setuptools import setup
version = '1.28.0.dev0'
install_requires = [
'cloudflare>=1.5.1',
'setuptools>=41.6.0',
]
if not os.environ.get('SNAP_BUILD'):
install_requires.extend([
# We specify the minimum acme and certbot version as the... | 31.108108 | 93 | 0.629453 |
f78ab068a965b37360516188b00f232087eee2fa | 6,067 | py | Python | wagtail/contrib/forms/tests/utils.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | 1 | 2022-02-09T05:25:30.000Z | 2022-02-09T05:25:30.000Z | wagtail/contrib/forms/tests/utils.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | null | null | null | wagtail/contrib/forms/tests/utils.py | stevedya/wagtail | 52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from wagtail.models import Page
from wagtail.test.testapp.models import (
FormField,
FormFieldWithCustomSubmission,
FormPage,
FormPageWithCustomSubmission,
FormPageWithRedirect,
RedirectFormField,
)
def make_form_page(**kwargs):
kwargs.setdefault("title", "Contact u... | 26.845133 | 84 | 0.617933 |
a5c76dbd701afddd034efefbb6c96cbd9197f7eb | 1,190 | py | Python | improviser-client/improviser_client/api/exercises/post_exercise_resource_list.py | acidjunk/improviser-api-client | f4c9ad69f2cbb0ac677cf49115f0f541035160da | [
"MIT"
] | null | null | null | improviser-client/improviser_client/api/exercises/post_exercise_resource_list.py | acidjunk/improviser-api-client | f4c9ad69f2cbb0ac677cf49115f0f541035160da | [
"MIT"
] | null | null | null | improviser-client/improviser_client/api/exercises/post_exercise_resource_list.py | acidjunk/improviser-api-client | f4c9ad69f2cbb0ac677cf49115f0f541035160da | [
"MIT"
] | null | null | null | from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/v1/exercises/".format(client.base_url)
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cook... | 19.193548 | 67 | 0.619328 |
1d7db9289768ce56b1f1b24288cb35eb7ada371a | 305 | py | Python | Download/exercicio096.py | Leonei1006/Python-curso-em-video | 17e90fa17b8d20a9f9de397354ed9c57ea871758 | [
"MIT"
] | 2 | 2021-12-01T12:50:15.000Z | 2022-01-21T19:19:52.000Z | Download/exercicio096.py | Leonei1006/Python-curso-em-video | 17e90fa17b8d20a9f9de397354ed9c57ea871758 | [
"MIT"
] | null | null | null | Download/exercicio096.py | Leonei1006/Python-curso-em-video | 17e90fa17b8d20a9f9de397354ed9c57ea871758 | [
"MIT"
] | null | null | null | #calculando a área de um terreno com funções
def área(larg, comp):
a = larg * comp
print(f'A área de um terreno {l} x {c} é de {a}m² ')
#programa principal
print(' CONTROLE DE TERRENOS ')
print('-=' * 20)
l = float(input('Largura (m): '))
c = float(input('Comprimeto (m): '))
área(l, c)
| 17.941176 | 56 | 0.606557 |
dfeeaa1bf301374b38e8000a811b8c0142a4ceb9 | 656 | py | Python | PyTransformer/test.py | jiangwx/DFQ | cb21588d529f6e7f9b7981c5b44e61a2b04788e7 | [
"MIT"
] | 10 | 2020-03-06T08:20:56.000Z | 2021-07-21T07:09:50.000Z | utils/PyTransformer/test.py | RunpeiDong/DGMS | 1f6a7ca9f39a2bc31cfade1e45967b006ea6532d | [
"Apache-2.0"
] | 1 | 2020-07-28T02:10:21.000Z | 2020-07-28T02:10:21.000Z | PyTransformer/test.py | jiangwx/DFQ | cb21588d529f6e7f9b7981c5b44e61a2b04788e7 | [
"MIT"
] | 2 | 2020-06-26T03:38:27.000Z | 2021-05-25T07:44:52.000Z | import torch
import torch.nn as nn
import torchvision
import torchvision.models as models
import copy
from transformers.torchTransformer import TorchTransformer
from transformers.quantize import QConv2d
model = models.__dict__["resnet18"]()
model.cuda()
model = model.eval()
transofrmer = TorchTransformer()
transofrmer... | 29.818182 | 98 | 0.797256 |
b8953f0d6a73b52ff162d7265dbf674a2124b7fb | 10,438 | py | Python | tests/test_ast.py | joegasewicz/amber | 376e7fee3394cb96595745bf4655c4061a2fe2c2 | [
"MIT"
] | 2 | 2021-08-13T14:54:13.000Z | 2021-08-30T15:31:32.000Z | tests/test_ast.py | joegasewicz/amber | 376e7fee3394cb96595745bf4655c4061a2fe2c2 | [
"MIT"
] | 2 | 2021-08-31T22:34:15.000Z | 2021-09-11T16:08:26.000Z | tests/test_ast.py | joegasewicz/mandarin | 376e7fee3394cb96595745bf4655c4061a2fe2c2 | [
"MIT"
] | null | null | null | from mandarin.core import Core
from mandarin.ast import AST, Node, NodeLine
from mandarin.elements import ELEMENTS
class TestAST:
def test_build_tree(self):
core = Core(elements=ELEMENTS, template_path="templates")
core.get_template("index.mandarin")
template = core.template_list
... | 42.430894 | 157 | 0.61736 |
910e85b3974b4077194b4f31035a9180b0130b99 | 3,315 | py | Python | src/gerrit/api/api.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 265 | 2018-04-20T21:09:06.000Z | 2022-02-20T19:58:02.000Z | src/gerrit/api/api.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 295 | 2018-04-23T08:53:18.000Z | 2022-03-25T07:05:11.000Z | src/gerrit/api/api.py | agu3rra/InfraBox | a814e83bfc4d31292b578b2a54b27d70eafc787f | [
"Apache-2.0"
] | 75 | 2018-05-14T07:56:35.000Z | 2022-03-26T09:37:29.000Z | import os
import json
import paramiko
from flask import Flask, request, Response, jsonify
app = Flask(__name__)
def get_env(name):
if name not in os.environ:
raise Exception("%s not set" % name)
return os.environ[name]
def execute_ssh_cmd(client, cmd):
_, stdout, stderr = client.exec_command(cmd... | 28.333333 | 80 | 0.621418 |
16812136da027c3fc236da4b896999716e11b949 | 1,442 | py | Python | test/completion/pep0484_overload.py | davidhalter/jed | 8f15f38949d1018ab2e14e6a61aae174555432f2 | [
"MIT"
] | 4,213 | 2015-01-02T15:43:22.000Z | 2022-03-31T16:15:01.000Z | test/completion/pep0484_overload.py | davidhalter/jed | 8f15f38949d1018ab2e14e6a61aae174555432f2 | [
"MIT"
] | 1,392 | 2015-01-02T18:43:39.000Z | 2022-03-27T18:43:59.000Z | test/completion/pep0484_overload.py | davidhalter/jed | 8f15f38949d1018ab2e14e6a61aae174555432f2 | [
"MIT"
] | 525 | 2015-01-02T19:07:31.000Z | 2022-03-13T02:03:20.000Z | from typing import List, Dict, overload, Tuple, TypeVar
lst: list
list_alias: List
list_str: List[str]
list_int: List[int]
# -------------------------
# With base classes
# -------------------------
@overload
def overload_f2(value: List) -> str: ...
@overload
def overload_f2(value: Dict) -> int: ...
#? str()
overlo... | 16.202247 | 61 | 0.576976 |
e969c64aa12b04f2ad213cc97f762fa59bfaeaf0 | 22,386 | py | Python | solutions/smart_speaker_demo/tools/record_server/SimpleWebSocketServer/SimpleWebSocketServer.py | 1847123212/YoC-open | f4e20c67256472d863ea6d118e3ecbaa1e879d4a | [
"Apache-2.0"
] | 9 | 2020-05-12T03:01:55.000Z | 2021-08-12T10:22:31.000Z | solutions/smart_speaker_demo/tools/record_server/SimpleWebSocketServer/SimpleWebSocketServer.py | 1847123212/YoC-open | f4e20c67256472d863ea6d118e3ecbaa1e879d4a | [
"Apache-2.0"
] | null | null | null | solutions/smart_speaker_demo/tools/record_server/SimpleWebSocketServer/SimpleWebSocketServer.py | 1847123212/YoC-open | f4e20c67256472d863ea6d118e3ecbaa1e879d4a | [
"Apache-2.0"
] | 12 | 2020-04-15T11:37:33.000Z | 2021-09-13T13:19:04.000Z | '''
The MIT License (MIT)
Copyright (c) 2013 Dave P.
'''
import sys
VER = sys.version_info[0]
if VER >= 3:
import socketserver
from http.server import BaseHTTPRequestHandler
from io import StringIO, BytesIO
else:
import SocketServer
from BaseHTTPServer import BaseHTTPRequestHandler
... | 30.623803 | 112 | 0.53118 |
cfa6ceb3d86720f9174c33b8fbc213a8a899ce5e | 14,317 | py | Python | test/functional/rpc_blockchain.py | RSerhii/verium | 478577cc00bbd5c61d6df2b91b4ca6441abc280e | [
"MIT"
] | 61 | 2016-11-07T13:58:45.000Z | 2021-05-07T08:59:20.000Z | test/functional/rpc_blockchain.py | RSerhii/verium | 478577cc00bbd5c61d6df2b91b4ca6441abc280e | [
"MIT"
] | 47 | 2017-10-18T19:48:22.000Z | 2021-05-07T08:58:52.000Z | test/functional/rpc_blockchain.py | RSerhii/verium | 478577cc00bbd5c61d6df2b91b4ca6441abc280e | [
"MIT"
] | 52 | 2016-10-04T11:31:37.000Z | 2021-02-26T21:20:47.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-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.
"""Test RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- gettxouts... | 42.357988 | 257 | 0.653559 |
d6bfcbf5f8c91b6f14053aa3950c3946a950cfeb | 4,210 | py | Python | xmodaler/modeling/meta_arch/transformer_enc_dec.py | cclauss/xmodaler | 1368fba6c550e97008628edbf01b59a0a6c8fde5 | [
"Apache-2.0"
] | 830 | 2021-06-26T07:16:33.000Z | 2022-03-25T10:31:32.000Z | xmodaler/modeling/meta_arch/transformer_enc_dec.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 28 | 2021-08-19T12:39:02.000Z | 2022-03-14T13:04:19.000Z | xmodaler/modeling/meta_arch/transformer_enc_dec.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 85 | 2021-08-15T06:58:29.000Z | 2022-02-19T07:30:56.000Z | # Copyright 2021 JD.com, Inc., JD AI
"""
@author: Yehao Li
@contact: yehaoli.sysu@gmail.com
"""
import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
from xmodaler.config import configurable
from xmodaler.config import kfg
from xmodaler.functional import pad_... | 33.412698 | 124 | 0.617102 |
4c44cd194e7e4b46cf19990fff51846efeb6997c | 621 | py | Python | geoplanar/__init__.py | WawNun/geoplanar | 34a46d6ec5f88021148039717446833e5eee21e7 | [
"BSD-3-Clause"
] | 9 | 2021-07-06T16:38:32.000Z | 2021-08-19T05:42:24.000Z | geoplanar/__init__.py | WawNun/geoplanar | 34a46d6ec5f88021148039717446833e5eee21e7 | [
"BSD-3-Clause"
] | 14 | 2021-07-03T14:52:59.000Z | 2022-01-18T00:23:12.000Z | geoplanar/__init__.py | WawNun/geoplanar | 34a46d6ec5f88021148039717446833e5eee21e7 | [
"BSD-3-Clause"
] | 4 | 2021-07-07T11:36:59.000Z | 2021-10-18T20:28:38.000Z | """
GeoPlanar
A module for handling planar enforcement for polygon geoseries.
"""
from geoplanar.overlap import trim_overlaps, is_overlapping, overlaps
from geoplanar.gap import (gaps, fill_gaps)
from geoplanar.hole import (add_interiors, missing_interiors)
from geoplanar.planar import (planar_enforce, is_planar_enfo... | 34.5 | 69 | 0.711755 |
32925274b942a410fa5343e04d0594d5671b3de3 | 1,473 | py | Python | day10.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null | day10.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null | day10.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null |
example = '''[({(<(())[]>[[{[]{<()<>>
[(()[<>])]({[<{<<[]>>(
{([(<{}[<>[]}>{[]{[(<()>
(((({<>}<{<{<>}{[]{[]{}
[[<[([]))<([[{}[[()]]]
[{[{({}]{}}([{[{{{}}([]
{<[[]]>}<{[{[{[]{()[[[]
[<(<(<(<{}))><([]([]()
<{([([[(<>()){}]>(<<{{
<{([{{}}[<[[[<>{}]]]>[]]'''
def corrupt_score(data):
opens = '<[({'
closes = '>])}... | 22.661538 | 53 | 0.307536 |
541b3cdbb201612a5c059612e6bc17b396c5ae2c | 5,762 | py | Python | functions/slider.py | dimaba/svotree | 4858935faeb7c41998348076a2e1c3d42e55edfb | [
"MIT"
] | 5 | 2017-01-17T09:57:27.000Z | 2020-10-01T17:54:59.000Z | functions/slider.py | dimaba/svotree | 4858935faeb7c41998348076a2e1c3d42e55edfb | [
"MIT"
] | null | null | null | functions/slider.py | dimaba/svotree | 4858935faeb7c41998348076a2e1c3d42e55edfb | [
"MIT"
] | 1 | 2019-01-30T09:46:04.000Z | 2019-01-30T09:46:04.000Z | """"
Functions to evaluate input from the slider measure and calculate the resulting SVO values.
"""
import math
items = {
'item1': {'self_left': 85, 'self_right': 85, 'other_left': 85, 'other_right': 15},
'item2': {'self_left': 85, 'self_right': 100, 'other_left': 15, 'other_right': 50},
'item3': {'self_... | 36.935897 | 140 | 0.718501 |
421b6a0a1f08440591c3733c6145b2dd07d89039 | 24,565 | py | Python | magnum/tests/unit/conductor/handlers/test_k8s_bay_conductor.py | MatMaul/magnum | 4d5fd80d89e38e98aff24f01b967a57d0adcd191 | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/conductor/handlers/test_k8s_bay_conductor.py | MatMaul/magnum | 4d5fd80d89e38e98aff24f01b967a57d0adcd191 | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/conductor/handlers/test_k8s_bay_conductor.py | MatMaul/magnum | 4d5fd80d89e38e98aff24f01b967a57d0adcd191 | [
"Apache-2.0"
] | 1 | 2020-09-09T14:35:08.000Z | 2020-09-09T14:35:08.000Z | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... | 42.5 | 79 | 0.607083 |
00ec71aabeae4d83f57e325e1a2579699f7f78fa | 7,090 | py | Python | tests/unit/testTokenClientCredentialsGrant.py | Abestanis/TwistedOAuth2 | fc1d9401009610084189afe48bd8df4db933c825 | [
"MIT"
] | 3 | 2017-12-07T18:06:42.000Z | 2018-11-09T10:31:45.000Z | tests/unit/testTokenClientCredentialsGrant.py | Abestanis/TwistedOAuth2 | fc1d9401009610084189afe48bd8df4db933c825 | [
"MIT"
] | 1 | 2018-10-15T23:55:15.000Z | 2018-10-16T03:37:10.000Z | tests/unit/testTokenClientCredentialsGrant.py | Abestanis/TwistedOAuth2 | fc1d9401009610084189afe48bd8df4db933c825 | [
"MIT"
] | 1 | 2017-12-11T16:20:39.000Z | 2017-12-11T16:20:39.000Z | """ Tests for the client credentials grant flow. """
from txoauth2.clients import PublicClient
from txoauth2.token import TokenResource
from txoauth2.errors import UnauthorizedClientError, MissingParameterError, \
MultipleParameterError, InvalidScopeError
from tests import getTestPasswordClient
from tests.unit.te... | 50.642857 | 100 | 0.675599 |
04183f9f8718b95283807f72d9429d8b9de9d6d5 | 28,485 | py | Python | tests/utils_test.py | codeorbio/docker-py | c698674602efc351046ad5a94bd4519efe38f654 | [
"Apache-2.0"
] | 1 | 2021-01-08T15:54:01.000Z | 2021-01-08T15:54:01.000Z | tests/utils_test.py | codeorbio/docker-py | c698674602efc351046ad5a94bd4519efe38f654 | [
"Apache-2.0"
] | null | null | null | tests/utils_test.py | codeorbio/docker-py | c698674602efc351046ad5a94bd4519efe38f654 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import base64
import json
import os
import os.path
import shutil
import tempfile
import pytest
import six
from docker.client import Client
from docker.constants import DEFAULT_DOCKER_API_VERSION
from docker.errors import DockerException
from docker.utils import (
parse_repository_tag, par... | 35.920555 | 79 | 0.587818 |
9196af5493227f152dcd17382b476876f2453cfc | 1,334 | py | Python | setup.py | tybruno/descriptify | 842d6ada506a5535cefd677d02bec318cfb09102 | [
"MIT"
] | null | null | null | setup.py | tybruno/descriptify | 842d6ada506a5535cefd677d02bec318cfb09102 | [
"MIT"
] | 2 | 2021-08-09T17:38:33.000Z | 2021-08-09T17:42:19.000Z | setup.py | tybruno/descriptify | 842d6ada506a5535cefd677d02bec318cfb09102 | [
"MIT"
] | null | null | null | import setuptools
__version__ = "0.0.1"
__author__ = "Tyler Bruno"
with open("README.md", "r", encoding="utf-8") as file:
README = file.read()
with open("requirements.txt", "r") as file:
INSTALL_REQUIRES = file.read().splitlines()
setuptools.setup(
name="descriptify",
version=__version__,
autho... | 33.35 | 122 | 0.649925 |
234f5fc7960b084f54b3a8c96c7ce2dd81d84200 | 310 | py | Python | Python/problem_solving/1/1.py | MahmoudMekki/Sprints-DevOps-W1 | 0cb221fef6e6b7c59697fb908ff8aa28b55949d4 | [
"MIT"
] | null | null | null | Python/problem_solving/1/1.py | MahmoudMekki/Sprints-DevOps-W1 | 0cb221fef6e6b7c59697fb908ff8aa28b55949d4 | [
"MIT"
] | null | null | null | Python/problem_solving/1/1.py | MahmoudMekki/Sprints-DevOps-W1 | 0cb221fef6e6b7c59697fb908ff8aa28b55949d4 | [
"MIT"
] | null | null | null | import math
def distance(x1, x2, y1, y2):
return math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2))
x1,x2 = input("Enter your first point like : x1 x2 ").split()
y1,y2 = input("Enter your second point like : y1 y2 ").split()
result = distance(int(x1),int( x2),int(y1), int(y2))
print(format(result,".2f")) | 25.833333 | 62 | 0.609677 |
823856d24a030553659b9aad5cc8823eb90ade2d | 2,613 | py | Python | src/config/common/cfgm_common/tests/unit/test_utils.py | EWERK-DIGITAL/tf-controller | 311ea863b03d425a67d04d27c1f1b9cf1e20c926 | [
"Apache-2.0"
] | 37 | 2020-09-21T10:42:26.000Z | 2022-01-09T10:16:40.000Z | src/config/common/cfgm_common/tests/unit/test_utils.py | EWERK-DIGITAL/tf-controller | 311ea863b03d425a67d04d27c1f1b9cf1e20c926 | [
"Apache-2.0"
] | null | null | null | src/config/common/cfgm_common/tests/unit/test_utils.py | EWERK-DIGITAL/tf-controller | 311ea863b03d425a67d04d27c1f1b9cf1e20c926 | [
"Apache-2.0"
] | 21 | 2020-08-25T12:48:42.000Z | 2022-03-22T04:32:18.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from cfgm_common.utils import CacheContainer
from cfgm_common.utils import decode_string
from cfgm_common.utils import encode_string
class TestCacheContainer(unittest.TestCase):
def test_cache_container_trimming(self):
c = C... | 36.802817 | 79 | 0.550325 |
8305fd93dad770461d846d8bf9c0d47dd3a2a377 | 116 | py | Python | test_kivy/test_kvv/Ba/tela.py | robertoweller/python | b01939810f7eb388f4b79bfad00abc5fb293d8dd | [
"MIT"
] | 2 | 2020-02-08T01:28:00.000Z | 2020-02-08T01:28:03.000Z | Data_Conversion/tela.py | robertoweller/GUI-Chess-Implementation-in-Python | f6ea3a93971a0177066c725233d3a2ed39023296 | [
"MIT"
] | null | null | null | Data_Conversion/tela.py | robertoweller/GUI-Chess-Implementation-in-Python | f6ea3a93971a0177066c725233d3a2ed39023296 | [
"MIT"
] | null | null | null | def tam():
'''Futuramente facilitar o mudo de como mundar o tamanho das peças.'''
tel = 1.25
return tel
| 23.2 | 74 | 0.637931 |
d1bb87b1ea3f1c3ed3f35b729e05dd1350980684 | 2,076 | py | Python | sensehat_multisensor.py | ProfessorCristiano/Aulas | c8775c83873dda245fff195b49e30a6783a60a45 | [
"CC0-1.0"
] | null | null | null | sensehat_multisensor.py | ProfessorCristiano/Aulas | c8775c83873dda245fff195b49e30a6783a60a45 | [
"CC0-1.0"
] | null | null | null | sensehat_multisensor.py | ProfessorCristiano/Aulas | c8775c83873dda245fff195b49e30a6783a60a45 | [
"CC0-1.0"
] | null | null | null | # sensehat_multisensor.py
# Na aplicação use sense_hat no emulador use sense_emu https://sense-emu.readthedocs.io/en/v1.0/install.html
# from sense_hat import SenseHat
from sense_emu import SenseHat
import time
"""
Sense HAT Sensors Display
Select Temperature, Pressure, or Humidity with the Joystick
to visualiz... | 22.085106 | 108 | 0.653179 |
ca4e8c6db44d2fef94a8d4e873411cbbadab4140 | 8,072 | py | Python | manabi/apps/flashcards/models/review_availabilities.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 14 | 2015-10-03T07:34:28.000Z | 2021-09-20T07:10:29.000Z | manabi/apps/flashcards/models/review_availabilities.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 23 | 2019-10-25T08:47:23.000Z | 2022-01-30T02:00:45.000Z | manabi/apps/flashcards/models/review_availabilities.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 7 | 2016-10-04T08:10:36.000Z | 2021-09-20T07:10:33.000Z | # -*- coding: utf-8 -*-
from datetime import datetime
from django.utils.lru_cache import lru_cache
from manabi.apps.flashcards.models.constants import (
NEW_CARDS_PER_DAY_LIMIT_OVERRIDE_INCREMENT,
TRIAL_DAILY_REVIEW_CAP,
)
from manabi.apps.flashcards.models.new_cards_limit import (
NewCardsLimit,
)
from ... | 29.567766 | 78 | 0.631814 |
111a87e583f90b63262799303d410bb8fce4e9c7 | 16,960 | py | Python | test/functional/blockdelay.py | bixbdeveloper/BIXBcoin-core | 192c4054bfc949440cc49be6245b2b51c05b065f | [
"MIT"
] | 13 | 2021-04-15T09:47:07.000Z | 2021-12-26T17:44:23.000Z | test/functional/blockdelay.py | bixbdeveloper/BIXBcoin-core | 192c4054bfc949440cc49be6245b2b51c05b065f | [
"MIT"
] | 1 | 2021-07-01T01:13:00.000Z | 2021-08-04T07:11:49.000Z | test/functional/blockdelay.py | bixbdeveloper/BIXBcoin-core | 192c4054bfc949440cc49be6245b2b51c05b065f | [
"MIT"
] | 5 | 2021-06-24T04:58:02.000Z | 2022-03-25T12:50:57.000Z | #!/usr/bin/env python3
# Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2018 The Zencash developers
# Copyright (c) 2021 The Bixbcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.te... | 37.030568 | 112 | 0.498939 |
d3e1bdb83a5071e513a7635c9da6bc12346da9ce | 752 | py | Python | ex2/gradientFunction.py | cyberbaker/CSML | c2adad5e796fa12b5afcfafd5fd1b51f642ce730 | [
"MIT"
] | null | null | null | ex2/gradientFunction.py | cyberbaker/CSML | c2adad5e796fa12b5afcfafd5fd1b51f642ce730 | [
"MIT"
] | null | null | null | ex2/gradientFunction.py | cyberbaker/CSML | c2adad5e796fa12b5afcfafd5fd1b51f642ce730 | [
"MIT"
] | null | null | null | from sigmoid import sigmoid
from numpy import squeeze, asarray
def gradientFunction(theta, X, y):
"""
Compute cost and gradient for logistic regression with regularization
computes the cost of using theta as the parameter for regularized logistic regression and the
gradient of the cost w.r.t. to the ... | 31.333333 | 97 | 0.603723 |
d47a79e5610ca97ad9f12172ac810f2eeaf0da9d | 5,298 | py | Python | oy/contrib/form/admin.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 5 | 2019-02-12T08:54:46.000Z | 2021-03-15T09:22:44.000Z | oy/contrib/form/admin.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 2 | 2020-04-30T01:27:08.000Z | 2020-07-16T18:04:16.000Z | oy/contrib/form/admin.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 3 | 2019-10-16T05:53:31.000Z | 2021-10-11T09:37:16.000Z | # -*- coding: utf-8 -*-
"""
oy.contrib.form.admin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides the admin interface for editing oy forms.
:copyright: (c) 2018 by Musharraf Omer.
:license: MIT, see LICENSE for more details.
"""
import csv
from flask import current_app, request, Response, stream... | 30.624277 | 86 | 0.571159 |
44f49db19bfd9f30c902ad3dc1f41fae9198643d | 2,821 | py | Python | qiskit/extensions/standard/ccx.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 1 | 2019-10-14T00:59:19.000Z | 2019-10-14T00:59:19.000Z | qiskit/extensions/standard/ccx.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | null | null | null | qiskit/extensions/standard/ccx.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 1 | 2019-06-13T08:07:26.000Z | 2019-06-13T08:07:26.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 31 | 77 | 0.488834 |
f68957b81e6913d17214f008ae0b401b72516721 | 10,114 | py | Python | networkx/algorithms/tests/test_cluster.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | 1 | 2020-08-08T21:52:34.000Z | 2020-08-08T21:52:34.000Z | networkx/algorithms/tests/test_cluster.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | 2 | 2019-11-13T03:48:53.000Z | 2021-02-15T16:52:09.000Z | networkx/algorithms/tests/test_cluster.py | jmmcd/networkx | 207ff7d1e9bfaff013ac77c8d6bb79619892c994 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import networkx as nx
class TestTriangles:
def test_empty(self):
G = nx.Graph()
assert list(nx.triangles(G).values()) == []
def test_path(self):
G = nx.path_graph(10)
assert (list(nx.triangles(G).values()) ==
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | 36.912409 | 92 | 0.51137 |
1e354b40f31bc2bf9c78a8461ad5c3d8483e10af | 40,561 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_public_ip_addresses_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_public_ip_addresses_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_public_ip_addresses_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.604326 | 395 | 0.675107 |
621503300e2abf41fc30d6c18c2b6aad8725eb43 | 921 | py | Python | neuroscience/scidb/load_files.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 3 | 2017-08-08T09:07:27.000Z | 2018-09-12T14:54:56.000Z | neuroscience/scidb/load_files.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 1 | 2020-10-13T04:13:10.000Z | 2020-10-13T04:13:10.000Z | neuroscience/scidb/load_files.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 2 | 2018-02-26T18:03:23.000Z | 2018-03-20T08:29:00.000Z | #
# Multi-node SciDB implementation of MRI
#
# dzhao@uw.edu, 2016
#
import warnings
warnings.filterwarnings("ignore")
import time
import numpy as np
import nibabel as nib
from scidbpy import connect
from scidbpy import save
sdb = connect('http://localhost:8080')
#sdb.query("remove(mri_4_0)")
#sdb.query("remove(mri_... | 26.314286 | 106 | 0.715527 |
94ed6656079cde45997da475b67442abeadaecde | 1,020 | py | Python | flask-celery-example/app/celery/flaskcelery.py | hk-badbuta/buta-exercise-celery | d5329c9bbeffb7454e28effeac50e727f15afb31 | [
"Apache-2.0"
] | null | null | null | flask-celery-example/app/celery/flaskcelery.py | hk-badbuta/buta-exercise-celery | d5329c9bbeffb7454e28effeac50e727f15afb31 | [
"Apache-2.0"
] | null | null | null | flask-celery-example/app/celery/flaskcelery.py | hk-badbuta/buta-exercise-celery | d5329c9bbeffb7454e28effeac50e727f15afb31 | [
"Apache-2.0"
] | 1 | 2019-05-16T02:25:57.000Z | 2019-05-16T02:25:57.000Z | from celery import Celery
from .tasks import *
#See: https://codeday.me/bug/20180311/142546.html
class FlaskCelery(Celery):
def __init__(self, *args, **kwargs):
super(FlaskCelery, self).__init__(*args, **kwargs)
self.patch_task()
if 'app' in kwargs:
self.init_app(kwargs['app... | 25.5 | 71 | 0.539216 |
c39b5f3aa0baa2206716992d04fd7807caaf4efe | 3,173 | py | Python | workmail-salesforce-python/src/email_utils.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 31 | 2019-02-20T04:52:45.000Z | 2022-03-28T14:55:27.000Z | workmail-salesforce-python/src/email_utils.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 4 | 2021-06-29T16:21:16.000Z | 2021-09-17T22:58:52.000Z | workmail-salesforce-python/src/email_utils.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 16 | 2019-02-21T13:27:10.000Z | 2021-12-25T18:49:13.000Z | import logging
import boto3
import email
import uuid
import re
from email import policy
import os
workmail_message_flow = boto3.client('workmailmessageflow')
s3 = boto3.client('s3')
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def extract_element(parsed_email, element):
if parsed_email.is_multipart(... | 36.056818 | 160 | 0.666877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.