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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
037dec22b9e6ec23180fcd373039d43a5b32b717 | 394 | py | Python | src/genie/libs/parser/iosxe/tests/ShowStackwiseVirtualDualActiveDetection/cli/equal/golden_output1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowStackwiseVirtualDualActiveDetection/cli/equal/golden_output1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowStackwiseVirtualDualActiveDetection/cli/equal/golden_output1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"dad_port": {
"switches": {
1: {
"FortyGigabitEthernet1/0/3": {"status": "up"},
"FortyGigabitEthernet1/0/4": {"status": "up"},
},
2: {
"FortyGigabitEthernet2/0/3": {"status": "up"},
"Forty... | 26.266667 | 62 | 0.398477 |
db21eda3ae94556ad5db243da919e478a5b07a90 | 684 | py | Python | deleteUser.py | cmkhoury/CS-506 | a78b9931c25f7bfddf0bfe9e12f742bc7858228c | [
"MIT"
] | 1 | 2018-04-24T03:14:16.000Z | 2018-04-24T03:14:16.000Z | deleteUser.py | cmkhoury/CS-506 | a78b9931c25f7bfddf0bfe9e12f742bc7858228c | [
"MIT"
] | null | null | null | deleteUser.py | cmkhoury/CS-506 | a78b9931c25f7bfddf0bfe9e12f742bc7858228c | [
"MIT"
] | null | null | null | import requests
import sqlite3 as sql
import sys
def main():
try:
with sql.connect("data/test.db") as con:
curs = con.cursor()
# inserted = con.execute("SELECT * FROM User WHERE Username = (?)", (users[i][0],))
# for row in inserted:
# if row[1] == users... | 25.333333 | 95 | 0.520468 |
ab336c654d4b016da27a2f40b8fe11baa9d093f9 | 21,003 | py | Python | google-images-download.py | riemannzetagambit/google-images-download | ccabe46402d8f045e5ad03534cf99285a103eaf8 | [
"MIT"
] | null | null | null | google-images-download.py | riemannzetagambit/google-images-download | ccabe46402d8f045e5ad03534cf99285a103eaf8 | [
"MIT"
] | null | null | null | google-images-download.py | riemannzetagambit/google-images-download | ccabe46402d8f045e5ad03534cf99285a103eaf8 | [
"MIT"
] | 3 | 2021-01-08T06:34:56.000Z | 2021-11-09T08:37:25.000Z | # In[ ]:
# coding: utf-8
###### Searching and Downloading Google Images to the local disk ######
# Import Libraries
import sys
version = (3, 0)
cur_version = sys.version_info
if cur_version >= version: # If the Current Version of Python is 3.0 or above
import urllib.request
from urllib.request import Reques... | 48.958042 | 426 | 0.562015 |
427158341546337a75c6f71a435872a6c135673e | 13,650 | py | Python | vspk/v5_0/nukeyservermonitor.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | 19 | 2016-03-07T12:34:22.000Z | 2020-06-11T11:09:02.000Z | vspk/v5_0/nukeyservermonitor.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | 40 | 2016-06-13T15:36:54.000Z | 2020-11-10T18:14:43.000Z | vspk/v5_0/nukeyservermonitor.py | axxyhtrx/vspk-python | 4495882c6bcbb1ef51b14b9f4dc7efe46476ff50 | [
"BSD-3-Clause"
] | 15 | 2016-06-10T22:06:01.000Z | 2020-12-15T18:37:42.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | 34.125 | 188 | 0.652161 |
bb8296a5a342c98ec1381f301d89397bdf4a07c3 | 14,395 | py | Python | src/azure-cli/azure/cli/command_modules/batch/_validators.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 7 | 2020-04-26T09:54:05.000Z | 2021-07-22T16:54:41.000Z | src/azure-cli/azure/cli/command_modules/batch/_validators.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 120 | 2018-03-27T19:14:40.000Z | 2020-12-10T23:53:35.000Z | src/azure-cli/azure/cli/command_modules/batch/_validators.py | xaliciayang/azure-cli | 38c80c875e8a79d08d06a2f42ec82fd54934343e | [
"MIT"
] | 13 | 2020-06-30T16:23:36.000Z | 2022-03-29T17:12:05.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 42.715134 | 101 | 0.665787 |
17a9c60721a6b7809001c8e1b1f277759754a8e1 | 803 | py | Python | config/server_config.py | andrearosasco/SynthSegmentation | 9083531f853757533fa69d9fca931f81c3a3ac2d | [
"MIT"
] | 1 | 2022-01-27T09:11:39.000Z | 2022-01-27T09:11:39.000Z | config/server_config.py | andrearosasco/SynthSegmentation | 9083531f853757533fa69d9fca931f81c3a3ac2d | [
"MIT"
] | null | null | null | config/server_config.py | andrearosasco/SynthSegmentation | 9083531f853757533fa69d9fca931f81c3a3ac2d | [
"MIT"
] | null | null | null |
class Config:
class General:
device = 'cuda'
class Train:
lr = 0.01
momentum = 0.9
weight_decay = 0.0001
log_every = 10
epoch = 100
class Eval:
wandb = True
class Data:
class Eval:
mb_size = 64
paths = None
... | 19.119048 | 57 | 0.440847 |
1a6ff2d1c213f7a4dae6065da43b661255c0594e | 5,239 | py | Python | emulator/id.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | 4 | 2020-07-13T03:12:19.000Z | 2021-08-03T02:09:28.000Z | emulator/id.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | null | null | null | emulator/id.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | null | null | null | from myhdl import *
@block
def id(ins,alu_signal,mem_read,mem_write,register_write,rd_r0_mux,rd_r1_mux
,ds1_rx,ds2_rx,rd_mux0,rd_mux1,
cr_write,selector,imm,branch_offset,bra,ret,apc,jmp):
'''
ins in 16
alu_signal out 4
mem_read out 1
mem_write out 1
register_write out 8
r... | 30.817647 | 115 | 0.525673 |
7ae4cab312da5d5d9ec589b3b739a2dbec06136c | 169 | py | Python | relational/student_projects/2019_guth/models/MMI_Genetic/Genetic_MMI_Singlechoice.py | monthie/cogmods | 62af4b8bf2effb77f26a8877d6a89949164d83f0 | [
"MIT"
] | null | null | null | relational/student_projects/2019_guth/models/MMI_Genetic/Genetic_MMI_Singlechoice.py | monthie/cogmods | 62af4b8bf2effb77f26a8877d6a89949164d83f0 | [
"MIT"
] | 11 | 2020-05-04T09:05:29.000Z | 2021-04-08T13:22:34.000Z | relational/student_projects/2019_guth/models/MMI_Genetic/Genetic_MMI_Singlechoice.py | monthie/cogmods | 62af4b8bf2effb77f26a8877d6a89949164d83f0 | [
"MIT"
] | 12 | 2020-05-02T09:36:14.000Z | 2021-06-22T08:10:45.000Z | import Genetic_MMI
class ModelApproachExp1(Genetic_MMI.ModelApproach):
def __init__(self):
Genetic_MMI.ModelApproach.__init__(self, 1, "MMI_singlechoice")
| 24.142857 | 71 | 0.775148 |
4ec8be9878cffb37324a0f3b1c5c78b7ea316d62 | 900 | py | Python | hyperv/neutron/constants.py | bclau/python-neutron-plugin-hyperv | 4e5c9f14483f7fe026f8f54f8a9be27f21d98cef | [
"Apache-2.0"
] | null | null | null | hyperv/neutron/constants.py | bclau/python-neutron-plugin-hyperv | 4e5c9f14483f7fe026f8f54f8a9be27f21d98cef | [
"Apache-2.0"
] | null | null | null | hyperv/neutron/constants.py | bclau/python-neutron-plugin-hyperv | 4e5c9f14483f7fe026f8f54f8a9be27f21d98cef | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Cloudbase Solutions SRL
# 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 r... | 34.615385 | 78 | 0.745556 |
0042cfaa876957de33f59236313a8b5b1fc6a028 | 4,928 | py | Python | samples/reg_export.py | timgates42/python-registry | c028c7fca99aaed835490ada8d43dfea42811d3c | [
"Apache-2.0"
] | 326 | 2015-01-10T20:48:33.000Z | 2022-03-14T07:59:58.000Z | samples/reg_export.py | timgates42/python-registry | c028c7fca99aaed835490ada8d43dfea42811d3c | [
"Apache-2.0"
] | 70 | 2015-01-02T19:29:31.000Z | 2021-06-17T16:32:03.000Z | samples/reg_export.py | timgates42/python-registry | c028c7fca99aaed835490ada8d43dfea42811d3c | [
"Apache-2.0"
] | 108 | 2015-01-07T18:20:45.000Z | 2022-03-05T15:26:06.000Z | #!/usr/bin/python
# This file is part of python-registry.
#
# Copyright 2015 Willi Ballenthin <william.ballenthin@mandiant.com>
# while at Mandiant <http://www.mandiant.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance ... | 30.233129 | 118 | 0.609375 |
4547912251eb904f9eee6f8cf2dddfe540c1a61e | 9,040 | py | Python | qBittorrentPostProcess.py | rmangaha/sickbeard_mp4_automator | 669b9041df7a21afc554f125fefb29e5188cf656 | [
"MIT"
] | null | null | null | qBittorrentPostProcess.py | rmangaha/sickbeard_mp4_automator | 669b9041df7a21afc554f125fefb29e5188cf656 | [
"MIT"
] | null | null | null | qBittorrentPostProcess.py | rmangaha/sickbeard_mp4_automator | 669b9041df7a21afc554f125fefb29e5188cf656 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import re
import sys
import shutil
from autoprocess import autoProcessTV, autoProcessMovie, autoProcessTVSR, sonarr, radarr
from resources.log import getLogger
from resources.readsettings import ReadSettings
from resources.mediaprocessor import MediaProcessor
def getHost(host='localh... | 43.671498 | 197 | 0.609181 |
d1ce33a807058d1d7092bbec31d8c3d7ac7897ac | 2,308 | py | Python | intensity_normalization/util/io.py | radmodel/intensity-normalization | b7b39fc6ac74450bf5e19d32b4657dcfe96a9559 | [
"Apache-2.0"
] | 223 | 2018-08-03T03:41:45.000Z | 2022-03-24T13:55:02.000Z | intensity_normalization/util/io.py | radmodel/intensity-normalization | b7b39fc6ac74450bf5e19d32b4657dcfe96a9559 | [
"Apache-2.0"
] | 52 | 2018-09-10T15:38:57.000Z | 2022-03-17T19:04:37.000Z | intensity_normalization/util/io.py | radmodel/intensity-normalization | b7b39fc6ac74450bf5e19d32b4657dcfe96a9559 | [
"Apache-2.0"
] | 50 | 2018-12-04T06:51:55.000Z | 2022-03-26T16:06:11.000Z | # -*- coding: utf-8 -*-
"""
intensity_normalization.util.io
assortment of input/output utilities for the project
Author: Jacob Reinhold (jacob.reinhold@jhu.edu)
Created on: Jun 1, 2021
"""
__all__ = [
"gather_images",
"gather_images_and_masks",
"glob_ext",
"split_filename",
]
from pathlib import Pa... | 25.644444 | 70 | 0.647314 |
6e566974c1fe7a31273d13aaa0bf136617cb022a | 2,166 | py | Python | tests/test_images.py | tongjianjun/reportlab | c5544d7d05dc9f74c388f534d1a271c85abb751b | [
"BSD-3-Clause"
] | 4 | 2019-08-13T09:54:55.000Z | 2021-11-10T02:15:49.000Z | tests/test_images.py | cnauroth/reportlab | 377d4ff58491dc6de48551e730c3d7f72db783e5 | [
"BSD-3-Clause"
] | 1 | 2019-09-17T11:16:51.000Z | 2019-09-19T11:13:53.000Z | tests/test_images.py | cnauroth/reportlab | 377d4ff58491dc6de48551e730c3d7f72db783e5 | [
"BSD-3-Clause"
] | null | null | null | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
__version__='3.3.0'
__doc__="""Tests to do with image handling.
Most of them make use of test\\pythonpowereed.gif."""
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, printLocation
setOutDir(__name__)
im... | 41.653846 | 374 | 0.724377 |
fcfb7f6f54703d320b409bfe9ee5ca463a80e61f | 7,780 | py | Python | ansibeautifier.py | BoughtData92730/ansibeautifier | a428fe8c924b345d9ec92c1f754922a70a6d1fd9 | [
"MIT"
] | 1 | 2021-05-16T16:50:54.000Z | 2021-05-16T16:50:54.000Z | ansibeautifier/__init__.py | BoughtData92730/ansibeautifier | a428fe8c924b345d9ec92c1f754922a70a6d1fd9 | [
"MIT"
] | 2 | 2021-02-18T05:25:55.000Z | 2021-02-20T06:52:58.000Z | ansibeautifier/__init__.py | BoughtData92730/ansibeautifier | a428fe8c924b345d9ec92c1f754922a70a6d1fd9 | [
"MIT"
] | null | null | null | class Beautifier:
@staticmethod
def reset():
return "\u001b[0m"
@staticmethod
def red(text="", bright=False):
if not bright:
return u"\u001b[31m" + text + "\u001b[0m"
else:
return u"\u001b[31;1m" + text + "\u001b[0m"
@staticmethod
... | 25.592105 | 58 | 0.505398 |
cf1aeaf3fc5ef9165b0ecda50bee189f923e352c | 2,920 | py | Python | src/ghutil/cli/pr/read.py | jwodder/ghutil | f0b903a76177cd49f5d48ac9890609f4da9071d9 | [
"MIT"
] | 6 | 2017-05-29T19:29:44.000Z | 2020-04-05T00:01:02.000Z | src/ghutil/cli/pr/read.py | jwodder/ghutil | f0b903a76177cd49f5d48ac9890609f4da9071d9 | [
"MIT"
] | 2 | 2017-06-29T09:39:32.000Z | 2020-01-07T22:48:02.000Z | src/ghutil/cli/pr/read.py | jwodder/ghutil | f0b903a76177cd49f5d48ac9890609f4da9071d9 | [
"MIT"
] | 1 | 2017-06-11T16:43:47.000Z | 2017-06-11T16:43:47.000Z | from datetime import datetime
from textwrap import indent
import click
from dateutil.tz import tzlocal, tzutc
from ghutil.types import Issue
EMOJI = {
'+1': '\U0001F44D',
'-1': '\U0001F44E',
'laugh': '\U0001F604',
'confused': '\U0001F615',
'heart': '\u2764',
'hooray': '\U0001F3... | 35.180723 | 81 | 0.530822 |
65825578874fb488c61a7f377e57b59564f9d15e | 18,003 | py | Python | evcouplings/utils/app.py | berkalpay/EVcouplings | 9ab590ab2e59fb893b3b7a3993c4e1d13ec87d1e | [
"MIT"
] | null | null | null | evcouplings/utils/app.py | berkalpay/EVcouplings | 9ab590ab2e59fb893b3b7a3993c4e1d13ec87d1e | [
"MIT"
] | null | null | null | evcouplings/utils/app.py | berkalpay/EVcouplings | 9ab590ab2e59fb893b3b7a3993c4e1d13ec87d1e | [
"MIT"
] | null | null | null | """
evcouplings command-line app
Authors:
Thomas A. Hopf
.. todo::
Once there are different pipelines to run, there should
be individual commands for these, so will need to define additional
entry points for applications (e.g. evcomplex in addition to evcouplings).
"""
import re
from copy import deepc... | 33.713483 | 113 | 0.628784 |
1cabbfd28085d366c9381a93bb1bfc4d2403779d | 48,020 | py | Python | nemo/collections/nlp/data/machine_translation/preproc_mt_data.py | agemagician/NeMo | 5839aee402f314aa413b28e9042b1e1cac10a114 | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/data/machine_translation/preproc_mt_data.py | agemagician/NeMo | 5839aee402f314aa413b28e9042b1e1cac10a114 | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/data/machine_translation/preproc_mt_data.py | agemagician/NeMo | 5839aee402f314aa413b28e9042b1e1cac10a114 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 47.450593 | 143 | 0.574552 |
37aff32533bdfdbb64fd39dd27fa56ba20da00b5 | 642 | py | Python | 13_ResidualPlots/importFP.py | xavierbellagamba/4_RuptureRecognition | 18e41f6a5a677862bb6d7d0c9adf27271c7b59fe | [
"MIT"
] | null | null | null | 13_ResidualPlots/importFP.py | xavierbellagamba/4_RuptureRecognition | 18e41f6a5a677862bb6d7d0c9adf27271c7b59fe | [
"MIT"
] | null | null | null | 13_ResidualPlots/importFP.py | xavierbellagamba/4_RuptureRecognition | 18e41f6a5a677862bb6d7d0c9adf27271c7b59fe | [
"MIT"
] | null | null | null | import csv
data_path = './faultPlanes/Akatore.cnrs'
##################################################################
#isNumber: check if a string is a number
##################################################################
def isNumber(s):
try:
float(s)
return True
except ValueError:
return False
data =... | 24.692308 | 66 | 0.485981 |
11a6b682a4249fd6ed1a47930648c0b9c04cc996 | 3,897 | py | Python | var/spack/repos/builtin/packages/xsdk-examples/package.py | dialvarezs/spack | 14d4203722daf3abd56a2b6c880214a1338e289f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/xsdk-examples/package.py | dialvarezs/spack | 14d4203722daf3abd56a2b6c880214a1338e289f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/xsdk-examples/package.py | dialvarezs/spack | 14d4203722daf3abd56a2b6c880214a1338e289f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class XsdkExamples(CMakePackage, CudaPackage):
"""xSDK Examples show usage of libraries in the ... | 41.021053 | 95 | 0.574545 |
7789a43721c711b041484e779fa9b1fbc894027f | 1,708 | py | Python | tests.py | tpyo/pipsy | 2b9abaa5e53f12421f6e890380552551f582b5dc | [
"MIT"
] | null | null | null | tests.py | tpyo/pipsy | 2b9abaa5e53f12421f6e890380552551f582b5dc | [
"MIT"
] | null | null | null | tests.py | tpyo/pipsy | 2b9abaa5e53f12421f6e890380552551f582b5dc | [
"MIT"
] | 1 | 2019-12-12T15:26:31.000Z | 2019-12-12T15:26:31.000Z | import pytest
import pip
import subprocess
import sys
import json
from mock import patch, Mock
from pip._vendor.pkg_resources import Distribution
from pipsy import *
class TestPackaging:
mock_installed = [Distribution(project_name='pipsy-test', version='0.1')]
mock_pkg_json = json.dumps({ "info": { "version": ... | 34.857143 | 160 | 0.672131 |
8b67a9c2b837836d4072d7bbb3a3e3183bb5cc11 | 7,170 | py | Python | clusterman/common/sfx.py | akshaysharma096/clusterman | 27f4bd217fe201a4c0b9bf460c5a9e155ee88041 | [
"Apache-2.0"
] | 281 | 2019-11-15T03:12:43.000Z | 2022-01-07T06:36:58.000Z | clusterman/common/sfx.py | akshaysharma096/clusterman | 27f4bd217fe201a4c0b9bf460c5a9e155ee88041 | [
"Apache-2.0"
] | 38 | 2019-11-18T20:15:47.000Z | 2022-03-28T11:28:45.000Z | clusterman/common/sfx.py | akshaysharma096/clusterman | 27f4bd217fe201a4c0b9bf460c5a9e155ee88041 | [
"Apache-2.0"
] | 21 | 2019-11-16T07:49:40.000Z | 2022-02-09T18:13:48.000Z | # Copyright 2019 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 39.833333 | 119 | 0.666527 |
a0c8ac1028b87920e32d494bd4eeac6c87a5e22b | 8,426 | py | Python | setup.py | farisachugthai/sphinx | 315bffeedf12e6592ed473a9314d896bfee85145 | [
"BSD-2-Clause"
] | null | null | null | setup.py | farisachugthai/sphinx | 315bffeedf12e6592ed473a9314d896bfee85145 | [
"BSD-2-Clause"
] | null | null | null | setup.py | farisachugthai/sphinx | 315bffeedf12e6592ed473a9314d896bfee85145 | [
"BSD-2-Clause"
] | null | null | null | import os
import sys
from distutils import log
from io import StringIO
from setuptools import find_packages, setup
import sphinx
with open('README.rst') as f:
long_desc = f.read()
if sys.version_info < (3, 6):
print('ERROR: Sphinx requires at least Python 3.6 to run.')
sys.exit(1)
install_requires = [
... | 33.839357 | 80 | 0.522312 |
86bb186060a7220978a0e2b32745a85ceb2c50a6 | 23,989 | py | Python | main.py | Xilinx/SOM-Dashboard | 7620e9d4ac9e22bdb96fd130aca7a5004ff05a66 | [
"Apache-2.0"
] | 1 | 2021-09-22T12:52:12.000Z | 2021-09-22T12:52:12.000Z | main.py | Xilinx/SOM-Dashboard | 7620e9d4ac9e22bdb96fd130aca7a5004ff05a66 | [
"Apache-2.0"
] | null | null | null | main.py | Xilinx/SOM-Dashboard | 7620e9d4ac9e22bdb96fd130aca7a5004ff05a66 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.718553 | 129 | 0.640502 |
4530bfcf9f3e2c1b4f368752d7a94f8b54246fbc | 96 | py | Python | server/api_modules/apps.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | 1 | 2021-07-13T23:01:56.000Z | 2021-07-13T23:01:56.000Z | server/api_modules/apps.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | null | null | null | server/api_modules/apps.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ApiModulesConfig(AppConfig):
name = 'api_modules'
| 16 | 34 | 0.770833 |
f5547fb16dc023570f333aabfc5d0a60fae75a6c | 1,231 | py | Python | release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasSelectionHitResult.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasSelectionHitResult.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasSelectionHitResult.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class InkCanvasSelectionHitResult(Enum,IComparable,IFormattable,IConvertible):
"""
Identifies the various parts of a selection adorner on an System.Windows.Controls.InkCanvas.
enum InkCanvasSelectionHitResult,values: Bottom (6),BottomLeft (7),BottomRight (5),Left (8),None (0),Right (4),Selection (9),Top (2... | 27.977273 | 215 | 0.68156 |
33d297f3ca80b9b0e80af23ac92b8bb2a1d79d89 | 87,833 | py | Python | sdk/python/feast/feature_store.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/feature_store.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/feature_store.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 41.062646 | 126 | 0.633999 |
a15908086a6f14f7b81f60915f21d1a400325c4b | 3,917 | py | Python | py/vtproto/vtworkerdata_pb2.py | msolo/vitess | 04736af822e2143f7b60e993d5bfe6b37343ac0b | [
"Apache-2.0"
] | 1 | 2017-06-29T04:57:43.000Z | 2017-06-29T04:57:43.000Z | py/vtproto/vtworkerdata_pb2.py | msolo/vitess | 04736af822e2143f7b60e993d5bfe6b37343ac0b | [
"Apache-2.0"
] | 2 | 2017-09-25T08:35:22.000Z | 2018-03-29T15:21:54.000Z | py/vtproto/vtworkerdata_pb2.py | msolo/vitess | 04736af822e2143f7b60e993d5bfe6b37343ac0b | [
"Apache-2.0"
] | 3 | 2017-04-19T22:29:59.000Z | 2018-03-29T14:28:09.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vtworkerdata.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... | 33.478632 | 278 | 0.792188 |
4f3b94490fb65ed90c1c3598fa8c33629568bb39 | 4,880 | py | Python | torchslim/quantizing/qat.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | 1 | 2021-11-22T19:32:51.000Z | 2021-11-22T19:32:51.000Z | torchslim/quantizing/qat.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | null | null | null | torchslim/quantizing/qat.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | null | null | null | import sys
import torch
import copy
import torchslim
import torchslim.slim_solver as slim_solver
import torch.nn as nn
import numpy as np
import torchpruner as pruner
import torchpruner.model_tools as model_tools
import onnx
from . import qat_tools
def optimizer_generator(params, config):
return torch.optim.S... | 32.751678 | 84 | 0.590574 |
23daecd50f756f2b2d2f76fefd71cc84a004e4fd | 3,917 | py | Python | blockchain-workbench/rest-api-samples/python/swagger_client/models/user_list.py | chaosmail/blockchain | c78799d548c0d5deb86e03d16bf919df508d09fd | [
"MIT"
] | 738 | 2018-05-07T15:37:38.000Z | 2022-03-30T08:16:04.000Z | blockchain-workbench/rest-api-samples/python/swagger_client/models/user_list.py | chaosmail/blockchain | c78799d548c0d5deb86e03d16bf919df508d09fd | [
"MIT"
] | 156 | 2018-05-08T14:01:25.000Z | 2022-01-31T22:03:32.000Z | blockchain-workbench/rest-api-samples/python/swagger_client/models/user_list.py | cocoytech/blockchain | 4a64a41275cf149c0ad66b7fd9864498ec6a7ed9 | [
"MIT"
] | 682 | 2018-05-07T16:45:10.000Z | 2022-03-31T16:50:13.000Z | # coding: utf-8
"""
Azure Blockchain Workbench REST API
The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and plat... | 27.780142 | 380 | 0.577993 |
e8ae18d0ce0952a3a9974405ead8fc00eeeeaf8e | 3,386 | py | Python | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 4 | 2017-12-27T13:09:43.000Z | 2021-07-20T09:45:58.000Z | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 17 | 2015-06-08T03:43:00.000Z | 2022-03-09T13:12:16.000Z | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 11 | 2015-07-06T18:25:27.000Z | 2020-10-08T13:14:16.000Z | from gpyfft import GpyFFT
G = GpyFFT()
IMAGINARY = 3
REAL = 5
def builder(context, shape, direction_forward=True):
pass
class RFFTn:
def __init__(self, context, shape):
# The maximum number of elements of the transform is 2^24
# in clFFT (single precision)
elements = 1
for i in... | 29.189655 | 123 | 0.55759 |
52f85fd7de4ef6f33882e790320fb6db1d47fbb8 | 13,793 | py | Python | FPL/Transfers/views.py | kamrul-s/FPL | b05176d0178bec3684e19709e265faba8375c29d | [
"MIT"
] | null | null | null | FPL/Transfers/views.py | kamrul-s/FPL | b05176d0178bec3684e19709e265faba8375c29d | [
"MIT"
] | null | null | null | FPL/Transfers/views.py | kamrul-s/FPL | b05176d0178bec3684e19709e265faba8375c29d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.db import connection
from django.http import HttpResponse
from django.contrib import messages
def transfers(request):
if 'user' not in request.session:
return render(request,'index.html')
id = request.session['user']
cursor = connection.cursor()
... | 36.879679 | 191 | 0.570434 |
3f9307a5116d2a931202a2a6a786fe1832e86dd7 | 10,043 | py | Python | stable_baselines/run_exp.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | 3 | 2021-04-08T12:49:16.000Z | 2022-03-11T00:53:47.000Z | stable_baselines/run_exp.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | null | null | null | stable_baselines/run_exp.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# noinspection PyUnresolvedReferences
# from mpi4py import MPI
import stable_baselines.common.tf_util as tf_util
from stable_baselines.common.vec_env.vec_normalize import VecNormalize
from stable_baselines.common.vec_env import DummyVecEnv, SubprocVecEnv
from stable_baselines.common.mujoco_wrapp... | 46.068807 | 125 | 0.574629 |
62a5f3b9fd24a1c03101cc43184b1db945254c73 | 9,752 | py | Python | nertivia/http.py | FluxedScript/Nertivia.py | b54470951d47269906f7162ef7d5e828cfaf3030 | [
"MIT"
] | 2 | 2021-07-03T13:38:45.000Z | 2021-07-03T13:45:00.000Z | nertivia/http.py | FluxedScript/Nertivia.py | b54470951d47269906f7162ef7d5e828cfaf3030 | [
"MIT"
] | 1 | 2021-05-31T17:13:28.000Z | 2021-05-31T18:25:06.000Z | nertivia/http.py | FluxedScript/Nertivia.py | b54470951d47269906f7162ef7d5e828cfaf3030 | [
"MIT"
] | 2 | 2021-05-31T17:14:56.000Z | 2021-07-12T08:23:42.000Z | import asyncio
import gc
import json
from nertivia import cache_nertivia_data
import aiohttp
import nest_asyncio
import requests
import nertivia.message
nest_asyncio.apply()
# Set API endpoints
MAIN_URL = "https://nertivia.net/"
URL = "https://nertivia.net/api/channels/"
URL_MSG = "https://nertivia.net/api/messages/... | 35.079137 | 119 | 0.616489 |
713d0f5ae67e37579c15e10069991deede478c19 | 12,018 | py | Python | tests/components/tasmota/test_discovery.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | tests/components/tasmota/test_discovery.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/tasmota/test_discovery.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """The tests for the MQTT discovery."""
import copy
import json
from unittest.mock import patch
from homeassistant.components.tasmota.const import DEFAULT_PREFIX
from homeassistant.components.tasmota.discovery import ALREADY_DISCOVERED
from homeassistant.helpers import device_registry as dr
from .conftest import setu... | 30.736573 | 87 | 0.687968 |
e50679fe2bbc7fcb5d22c7b27e6ade62025ae4ff | 10,376 | py | Python | tests/bugs/core_4889_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/bugs/core_4889_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/bugs/core_4889_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: bugs.core_4889
# title: FBSVCMGR with `action_trace_start` prevents in 3.0 SuperServer from connecting using local protocol
# decription:
# Confirmed failing to create embedded attach on build 31948.
# Confirmed successful work on build 32268, a... | 34.818792 | 115 | 0.550405 |
32b5c9371710fac50598384758a8ddc5c01a84ae | 5,570 | py | Python | venv/Lib/site-packages/gym/spaces/box.py | RealBrandonChen/AirSim | c43b1e821454668e5c9f7181acd8f9334b83f7c0 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/gym/spaces/box.py | RealBrandonChen/AirSim | c43b1e821454668e5c9f7181acd8f9334b83f7c0 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/gym/spaces/box.py | RealBrandonChen/AirSim | c43b1e821454668e5c9f7181acd8f9334b83f7c0 | [
"MIT"
] | null | null | null | import numpy as np
from .space import Space
from gym import logger
class Box(Space):
"""
A (possibly unbounded) box in R^n. Specifically, a Box represents the
Cartesian product of n closed intervals. Each interval has the form of one
of [a, b], (-oo, b], [a, oo), or (-oo, oo).
There are two comm... | 34.171779 | 88 | 0.582226 |
6fdbcd2770503231411f87bc6492ab78443b3c0a | 12,828 | py | Python | src/kraken/krakenclient.py | pacanada/crypto-trading-agent | 8f46c9d9e87d05af2624cc7db59250f0a3a37f15 | [
"MIT"
] | 1 | 2021-11-18T12:58:34.000Z | 2021-11-18T12:58:34.000Z | src/kraken/krakenclient.py | pacanada/crypto-trading-agent | 8f46c9d9e87d05af2624cc7db59250f0a3a37f15 | [
"MIT"
] | null | null | null | src/kraken/krakenclient.py | pacanada/crypto-trading-agent | 8f46c9d9e87d05af2624cc7db59250f0a3a37f15 | [
"MIT"
] | null | null | null | import requests
import pandas as pd
import json
import time
import sys
import platform
import time
import base64
import hashlib
import hmac
from src.base.platformclient import PlatformClient
# TODO: Remove assert, only Exceptions
class KrakenClient(PlatformClient):
def __init__(self, api_private_key=None, api_pu... | 41.514563 | 283 | 0.57203 |
0ecd3e81b96ab05cf75cb01972153372a59f3806 | 7,638 | py | Python | Lapchat.py | Kalebu/Desktop-chatitng-GUI-app-with-python | e149d956674ef04a9955e836842a293dca645b1c | [
"MIT"
] | 3 | 2020-04-22T12:25:35.000Z | 2021-09-27T22:46:33.000Z | Lapchat.py | Alfaxad/Desktop-chatitng-GUI-app-with-python | e149d956674ef04a9955e836842a293dca645b1c | [
"MIT"
] | null | null | null | Lapchat.py | Alfaxad/Desktop-chatitng-GUI-app-with-python | e149d956674ef04a9955e836842a293dca645b1c | [
"MIT"
] | 3 | 2020-05-26T11:16:30.000Z | 2022-02-23T08:25:59.000Z | from tkinter import Tk, Label, Button, StringVar, Text, Scrollbar, PhotoImage,Entry
from tkinter import Frame, filedialog, messagebox
import socket
import threading
import os
class Lapchat:
def __init__(self, master):
master.title("Lapchat")
master.resizable(False, False)
master.g... | 37.441176 | 123 | 0.564153 |
89236aa87f6fd469c533f9616ab6c8426107a57d | 3,656 | py | Python | datacity_ckan_dgp/operators/db_fetcher.py | hasadna/datacity-ckan-dgp | 4a61be492e5c72e56d3aa9caadee5315cd48f90b | [
"MIT"
] | null | null | null | datacity_ckan_dgp/operators/db_fetcher.py | hasadna/datacity-ckan-dgp | 4a61be492e5c72e56d3aa9caadee5315cd48f90b | [
"MIT"
] | null | null | null | datacity_ckan_dgp/operators/db_fetcher.py | hasadna/datacity-ckan-dgp | 4a61be492e5c72e56d3aa9caadee5315cd48f90b | [
"MIT"
] | null | null | null | import os
import tempfile
from decimal import Decimal
import dataflows as DF
from datacity_ckan_dgp import ckan
def update_package(instance_name, org_id, package_name, title, resources):
print("Creating/updating package {}@{} {}".format(package_name, org_id, title))
package = ckan.package_show(instance_name... | 41.545455 | 106 | 0.584792 |
ac8e15a8e5b28222088b7dc4bbee5cca04480e3b | 460 | py | Python | deploy/urls.py | chenbin743/OpsSystem | 7427627aef8c3886b7d5bd8f2d8fc9215c0a1a19 | [
"MIT"
] | 1 | 2018-11-14T08:33:57.000Z | 2018-11-14T08:33:57.000Z | deploy/urls.py | chenbin743/OpsSystem | 7427627aef8c3886b7d5bd8f2d8fc9215c0a1a19 | [
"MIT"
] | null | null | null | deploy/urls.py | chenbin743/OpsSystem | 7427627aef8c3886b7d5bd8f2d8fc9215c0a1a19 | [
"MIT"
] | 1 | 2018-11-30T09:06:34.000Z | 2018-11-30T09:06:34.000Z | from django.conf.urls import url
from views import *
urlpatterns=[
url(r'^add_svn_repo/$',add_svn_repo,name='add_svn_repo'),
url(r'^add_git_repo/$',add_git_repo,name='add_git_repo'),
url(r'^list_repo_info/$',list_repo_info,name='list_repo_info'),
url(r'^list_deploy_info/$',list_deploy_info,name='list_deploy_info')... | 41.818182 | 70 | 0.767391 |
755b6629775cf2d24f8f33581f8eaaf43d76149c | 5,984 | py | Python | 2017/16_PermutationPromenade/aoc_16.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | 1 | 2021-01-03T23:09:28.000Z | 2021-01-03T23:09:28.000Z | 2017/16_PermutationPromenade/aoc_16.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | 6 | 2020-12-26T21:02:42.000Z | 2020-12-26T21:02:52.000Z | 2017/16_PermutationPromenade/aoc_16.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | null | null | null | # ======================================================================
# Permutation Promenade
# Advent of Code 2017 Day 16 -- Eric Wastl -- https://adventofcode.com
#
# Computer simulation by Dr. Dean Earl Wright III
# ======================================================================
# ======================... | 35.832335 | 91 | 0.38135 |
351a036a3cf78143cbe43f8d9629ba99242c650e | 8,061 | py | Python | release/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2019-03-20T13:10:46.000Z | 2019-05-15T20:00:31.000Z | engine/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | # Copyright 2018 The glTF-Blender-IO authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 40.104478 | 119 | 0.612579 |
e8a5bdd762b935e7d42106231722730cbb3e7399 | 1,263 | py | Python | report/bazel.py | agasparovic-sabre/bazel-coverage-report | 7ca9e5775a69cc0115caf58974c2a7bc55bcf17b | [
"Apache-2.0"
] | 19 | 2018-08-01T07:54:32.000Z | 2021-11-17T23:06:10.000Z | report/bazel.py | Marcus-Rosti/bazel-coverage-report | c6098ee67130670ab950156777d795627d61481c | [
"Apache-2.0"
] | 3 | 2018-10-22T17:14:54.000Z | 2020-03-05T08:09:25.000Z | report/bazel.py | Marcus-Rosti/bazel-coverage-report | c6098ee67130670ab950156777d795627d61481c | [
"Apache-2.0"
] | 34 | 2018-10-22T20:48:45.000Z | 2022-02-14T16:17:35.000Z | # Copyright 2018 The Bazel Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 30.804878 | 75 | 0.704671 |
400d9940e7e8f264daa0b9ad04e2c9eb24130f24 | 3,496 | py | Python | data/dataset/dataset.py | AUT-Data-Group/NeurIPS2021-traffic4cast | 2575ce1b98cebeadba645d3826ac962f4d0f3721 | [
"Apache-2.0"
] | 19 | 2021-06-20T21:35:49.000Z | 2022-03-01T14:49:19.000Z | data/dataset/dataset.py | ejhill24/NeurIPS2021-traffic4cast | 5421223d1f43f43a6bf5bcc8659847b1335492f3 | [
"Apache-2.0"
] | 3 | 2021-06-15T19:57:39.000Z | 2021-09-09T15:52:56.000Z | data/dataset/dataset.py | ejhill24/NeurIPS2021-traffic4cast | 5421223d1f43f43a6bf5bcc8659847b1335492f3 | [
"Apache-2.0"
] | 9 | 2021-06-20T21:37:19.000Z | 2021-12-15T15:30:05.000Z | # Copyright 2021 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH.
# IARAI licenses this file to You 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/li... | 34.96 | 143 | 0.662185 |
2d4bfb700d11fdc010f40ad5030ad709b81e0f23 | 3,360 | py | Python | script.module.nanscrapers/lib/nanscrapers/scraperplugins/twoddl.py | TheWardoctor/BadWolf | a86184a0bd21ffbd255ae264e3f682eff58d2eef | [
"Apache-2.0"
] | 1 | 2019-03-05T09:38:10.000Z | 2019-03-05T09:38:10.000Z | script.module.nanscrapers/lib/nanscrapers/scraperplugins/twoddl.py | TheWardoctor/BadWolf | a86184a0bd21ffbd255ae264e3f682eff58d2eef | [
"Apache-2.0"
] | null | null | null | script.module.nanscrapers/lib/nanscrapers/scraperplugins/twoddl.py | TheWardoctor/BadWolf | a86184a0bd21ffbd255ae264e3f682eff58d2eef | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | import re,xbmc,urllib,urlparse
from ..scraper import Scraper
import requests
from ..common import clean_title,clean_search, filter_host, get_rd_domains
User_Agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
# kept movies off
class twoddl(Scraper):
... | 40.481928 | 148 | 0.482143 |
38ae84bc920c343b27497d0aa03bb3ebf29f085b | 216 | py | Python | src/aspire/image/__init__.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 7 | 2018-11-07T16:45:35.000Z | 2020-01-10T16:54:26.000Z | src/aspire/image/__init__.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 1 | 2019-04-05T18:41:39.000Z | 2019-04-05T18:41:39.000Z | src/aspire/image/__init__.py | PrincetonUniversity/ASPIRE-Python | 1bff8d3884183203bd77695a76bccb1efc909fd3 | [
"MIT"
] | 2 | 2019-06-04T17:01:53.000Z | 2019-07-08T19:01:40.000Z | from .image import (
BasisImage,
BispecImage,
CartesianImage,
FBBasisImage,
Image,
PolarImage,
_im_translate2,
normalize_bg,
)
from .preprocess import crop_pad, downsample, fuzzy_mask
| 18 | 56 | 0.699074 |
fe20f9a28012b6a5cfbbfbb95c9fab52911638bd | 296 | py | Python | pacos2/discr_impulse.py | jadnohra/PaCoS | 0b97cf566d89d99f85c55581beb9ad701395d4fe | [
"MIT"
] | null | null | null | pacos2/discr_impulse.py | jadnohra/PaCoS | 0b97cf566d89d99f85c55581beb9ad701395d4fe | [
"MIT"
] | null | null | null | pacos2/discr_impulse.py | jadnohra/PaCoS | 0b97cf566d89d99f85c55581beb9ad701395d4fe | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from .interfaces import TimeInterval, IClock
from .discr_evt_engine import DiscreteEventEngine
class IDiscreteImpulse(ABC):
@abstractmethod
def generate(self, engine: DiscreteEventEngine, clock: IClock
) -> TimeInterval:
pass | 29.6 | 65 | 0.736486 |
ec2835854183a388605513a174d1d60252ab466f | 34,088 | py | Python | obswebsocket/events.py | a1rwulf/obs-websocket-py | 76cdd5b69d1eda312bce8887cfe386fc2350985c | [
"MIT"
] | null | null | null | obswebsocket/events.py | a1rwulf/obs-websocket-py | 76cdd5b69d1eda312bce8887cfe386fc2350985c | [
"MIT"
] | null | null | null | obswebsocket/events.py | a1rwulf/obs-websocket-py | 76cdd5b69d1eda312bce8887cfe386fc2350985c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# THIS FILE WAS GENERATED BY generate_classes.py - DO NOT EDIT #
# (Generated on 2020-05-16 15:31:50.833979) #
from .base_classes import Baseevents
class SourceCreated(Baseevents):
"""A source has been created. A source can be an input, a scene or a transition.
... | 25.120118 | 157 | 0.594608 |
a9b3a0f06d3eee3f5ce121fffa7018e60cbb1f97 | 25,277 | py | Python | openquake/hmtk/tests/seismicity/max_magnitude/test_maximum_magnitude.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 1 | 2019-08-01T00:28:24.000Z | 2019-08-01T00:28:24.000Z | openquake/hmtk/tests/seismicity/max_magnitude/test_maximum_magnitude.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 4 | 2018-08-31T14:14:35.000Z | 2021-10-11T12:53:13.000Z | openquake/hmtk/tests/seismicity/max_magnitude/test_maximum_magnitude.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 3 | 2018-08-31T14:11:00.000Z | 2019-07-17T10:06:02.000Z | #!/usr/bin/env python
# LICENSE
#
# Copyright (C) 2010-2018 GEM Foundation, G. Weatherill, M. Pagani, D. Monelli
#
# The Hazard Modeller's Toolkit (openquake.hmtk) is free software: you can redistribute
# it and/or modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Fo... | 41.988372 | 91 | 0.622977 |
7b75a22579d40e745850341adafd905b87855811 | 611 | py | Python | deform/tests/test_api.py | krysros/deform | 5ba96e43234521d9deecfe85a45accd08565c4d8 | [
"CC-BY-3.0"
] | 266 | 2015-01-12T23:51:50.000Z | 2022-03-30T02:49:53.000Z | deform/tests/test_api.py | krysros/deform | 5ba96e43234521d9deecfe85a45accd08565c4d8 | [
"CC-BY-3.0"
] | 234 | 2015-01-01T20:21:09.000Z | 2021-12-19T06:51:19.000Z | deform/tests/test_api.py | krysros/deform | 5ba96e43234521d9deecfe85a45accd08565c4d8 | [
"CC-BY-3.0"
] | 100 | 2015-01-01T20:08:50.000Z | 2021-10-02T12:14:37.000Z | """API tests."""
# Standard Library
import unittest
class TestAPI(unittest.TestCase):
def test_it(self):
"""
none of these imports should fail
"""
# Deform
from deform import Button # noQA
from deform import Field # noQA
from deform import FileData # noQA... | 29.095238 | 53 | 0.631751 |
2867913e4d5aebf9db4540c52a787e384f0fd314 | 1,040 | py | Python | cleff/messaging/migrations/0004_auto_20150801_2121.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | null | null | null | cleff/messaging/migrations/0004_auto_20150801_2121.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | null | null | null | cleff/messaging/migrations/0004_auto_20150801_2121.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | 1 | 2015-08-12T20:51:04.000Z | 2015-08-12T20:51:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('messaging', '0003_musicianmusicianconversation_initializer'),
]
operations = [
migrations.AlterModelOptions(
nam... | 30.588235 | 88 | 0.619231 |
d802710486b7a2c4c2b659b24fb0dce7b460973d | 16,547 | py | Python | Old MRI segmentation code/Hist-seg-WES_010.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | Old MRI segmentation code/Hist-seg-WES_010.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | Old MRI segmentation code/Hist-seg-WES_010.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
#import modules
import SimpleITK as sitk
from platipy.imaging.visualisation.tools import ImageVisualiser
from platipy.imaging.utils.tools import get_com
import matplotlib.pyplot as plt
import numpy as np
get_ipython().run_line_magic('matplotlib', 'notebook')
# In[4]... | 26.949511 | 180 | 0.794223 |
d41df2117deb9f7bf02e0430fc2af1dd29a16904 | 2,098 | py | Python | service/song_service.py | janvillarosa/jammer-song-selector | aa93c5b1f18b1c8ae82de3bb611db1cf3c3e09fc | [
"MIT"
] | null | null | null | service/song_service.py | janvillarosa/jammer-song-selector | aa93c5b1f18b1c8ae82de3bb611db1cf3c3e09fc | [
"MIT"
] | null | null | null | service/song_service.py | janvillarosa/jammer-song-selector | aa93c5b1f18b1c8ae82de3bb611db1cf3c3e09fc | [
"MIT"
] | null | null | null | import os
import spotipy
import random
from spotipy.oauth2 import SpotifyClientCredentials
from service.playlist_seed import PLAYLIST_SEED
CLIENT_ID = "2cc3f44677c74b45a0813be25575c494"
CLIENT_SECRET = os.environ["SPOTIFY_SECRET"]
SP = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id=CLIENT_ID,
... | 36.807018 | 134 | 0.677788 |
f2fb3ea34ff9cb3cd67b572a3658f84a8a40c3da | 1,132 | py | Python | core/utils.py | hulingfeng211/weixin | e3b869ffa2bf54366d561535c84e118db0e9827e | [
"Apache-2.0"
] | null | null | null | core/utils.py | hulingfeng211/weixin | e3b869ffa2bf54366d561535c84e118db0e9827e | [
"Apache-2.0"
] | null | null | null | core/utils.py | hulingfeng211/weixin | e3b869ffa2bf54366d561535c84e118db0e9827e | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
"""
功能描述:实用工具类包括 httputil
"""
import hashlib
from tornado.gen import coroutine, Return
from tornado.httpclient import HTTPRequest, AsyncHTTPClient
import constant
from core import settings
__author__ = 'george'
@coroutine
def send_request(url, method="GET", data=None, headers=None, **kwargs):
... | 27.609756 | 92 | 0.723498 |
9d7411dc7ccce761b5d1303bd7844c42380288e6 | 3,556 | py | Python | py_algo/graphs_2/competition/monk_and_hops.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | 1 | 2021-07-05T15:39:04.000Z | 2021-07-05T15:39:04.000Z | py_algo/graphs_2/competition/monk_and_hops.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | null | null | null | py_algo/graphs_2/competition/monk_and_hops.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | 1 | 2021-09-02T21:31:34.000Z | 2021-09-02T21:31:34.000Z | """
Codemonk link: https://www.hackerearth.com/problem/algorithm/monk-and-hops-357a2ca6/
Monk has a connected graph with N nodes and M weighted undirected edges.He gave a task to you on the same. You need to
travel from node 1 to node N using a path with the minimum cost. If many such paths with minimum cost exists yo... | 37.431579 | 120 | 0.667323 |
73b4076c4e5697c596df2652a9b4bbd06cab8cde | 3,147 | py | Python | setup.py | shaklev/Pyrez | a9cc5bc0c62fbd56235c06b39683f697fd77e8a8 | [
"MIT"
] | null | null | null | setup.py | shaklev/Pyrez | a9cc5bc0c62fbd56235c06b39683f697fd77e8a8 | [
"MIT"
] | null | null | null | setup.py | shaklev/Pyrez | a9cc5bc0c62fbd56235c06b39683f697fd77e8a8 | [
"MIT"
] | null | null | null | import re as Regex
import os
from setuptools import find_packages, setup
import sys
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) # allow setup.py to be run from any path
if sys.version_info [:2] < (3, 4):
raise RuntimeError("Unsupported Python version")
def readFile(filename):
... | 40.346154 | 175 | 0.656816 |
152de7135840076066a497f2c41d5110ab39b5df | 773 | py | Python | setup.py | alading241/python-wechaty | 514c83529b028a3262595b52125406cdce83c80a | [
"Apache-2.0"
] | 1 | 2020-03-03T07:46:09.000Z | 2020-03-03T07:46:09.000Z | setup.py | alading241/python-wechaty | 514c83529b028a3262595b52125406cdce83c80a | [
"Apache-2.0"
] | null | null | null | setup.py | alading241/python-wechaty | 514c83529b028a3262595b52125406cdce83c80a | [
"Apache-2.0"
] | null | null | null | ''' setup '''
import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
version = '0.0.0'
with open('VERSION', 'r') as fh:
version = fh.readline()
setuptools.setup(
name='wechaty',
version=version,
author='Huan LI (李卓桓)',
author_email='zixia@zixia.net',
descriptio... | 26.655172 | 67 | 0.650712 |
6844ad1f37cae99528cbc63c9a014d2e44f64753 | 1,419 | py | Python | ui/combobox.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | 4 | 2021-09-12T12:07:01.000Z | 2021-09-29T17:38:34.000Z | ui/combobox.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | null | null | null | ui/combobox.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | 5 | 2020-10-24T16:02:31.000Z | 2021-09-28T20:57:46.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 11 09:44:29 2016
@author: lindemann
"""
import sys
from PyQt5.QtWidgets import *
class MyWindow(QWidget):
"""Huvudklass för vårt fönster"""
def __init__(self):
"""Klass constructor"""
super().__init__()
self.init_gui()
def init_gu... | 22.52381 | 98 | 0.627907 |
ccf84d47fcf9437a5a04bb716ccd69852a7ca849 | 3,092 | py | Python | Advance/jwitter/jwitter/jwitter/settings.py | AMZEnterprise/Python_Course_Jadi | 4c1b3512ae0292f897d3ae2aa6449be6a5adb514 | [
"MIT"
] | null | null | null | Advance/jwitter/jwitter/jwitter/settings.py | AMZEnterprise/Python_Course_Jadi | 4c1b3512ae0292f897d3ae2aa6449be6a5adb514 | [
"MIT"
] | null | null | null | Advance/jwitter/jwitter/jwitter/settings.py | AMZEnterprise/Python_Course_Jadi | 4c1b3512ae0292f897d3ae2aa6449be6a5adb514 | [
"MIT"
] | null | null | null | """
Django settings for jwitter project.
Generated by 'django-admin startproject' using Django 3.0.14.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
... | 25.553719 | 91 | 0.696636 |
f634814519811e866bdaf62718e29797392b9a96 | 733 | py | Python | gram/forms.py | gumato/instagram | 2f96d0d66e5a621823a3e23aa20ba8cc8d09b26c | [
"Unlicense",
"MIT"
] | null | null | null | gram/forms.py | gumato/instagram | 2f96d0d66e5a621823a3e23aa20ba8cc8d09b26c | [
"Unlicense",
"MIT"
] | null | null | null | gram/forms.py | gumato/instagram | 2f96d0d66e5a621823a3e23aa20ba8cc8d09b26c | [
"Unlicense",
"MIT"
] | null | null | null | from django import forms
from .models import Image,Profile, Comments
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class ImageForm(forms.ModelForm):
class Meta:
model = Image
exclude = ['likes','profile','posted_time','profile']
class Com... | 29.32 | 66 | 0.671214 |
b41e2e723c36703cb5ab1ca47738f2060af82ceb | 2,605 | py | Python | sciunit/unit_test/base_tests.py | lakesare/sciunit | 7e8635e40d3155a8f8118be6494c67c6c6370899 | [
"MIT"
] | null | null | null | sciunit/unit_test/base_tests.py | lakesare/sciunit | 7e8635e40d3155a8f8118be6494c67c6c6370899 | [
"MIT"
] | null | null | null | sciunit/unit_test/base_tests.py | lakesare/sciunit | 7e8635e40d3155a8f8118be6494c67c6c6370899 | [
"MIT"
] | null | null | null | import unittest
from pathlib import Path
tmp_folder_path = Path(__file__).parent / "delete_after_tests"
class BaseCase(unittest.TestCase):
"""Unit tests for config files"""
@classmethod
def setUpClass(cls):
Path(tmp_folder_path).mkdir(parents=True, exist_ok=True)
@classmethod
def tearDo... | 34.733333 | 79 | 0.649136 |
53fa0cec55822e260f0ab264bade1a4b9130c92e | 1,101 | py | Python | ask/qa/models.py | takzhanov/stepic-web-tech | 248b45e61a053e1ef9cb246da0c509fbf0cac182 | [
"MIT"
] | null | null | null | ask/qa/models.py | takzhanov/stepic-web-tech | 248b45e61a053e1ef9cb246da0c509fbf0cac182 | [
"MIT"
] | null | null | null | ask/qa/models.py | takzhanov/stepic-web-tech | 248b45e61a053e1ef9cb246da0c509fbf0cac182 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.db import models
from django.db.models import Model, Count
from django.utils import timezone
class QuestionManager(models.Manager):
def new(self):
return (self.order_by('-added_at'))
def popular(self):
return (self.annotate(num_likes=Cou... | 30.583333 | 78 | 0.698456 |
a2e283089641adead43c505697afc7ff6d076c09 | 448 | py | Python | chpass/dal/models/base.py | bengabay11/chromesy | 03328f7330c4e119e7f6a5bc2b75575eb47e4e61 | [
"MIT"
] | null | null | null | chpass/dal/models/base.py | bengabay11/chromesy | 03328f7330c4e119e7f6a5bc2b75575eb47e4e61 | [
"MIT"
] | 23 | 2021-08-05T17:38:02.000Z | 2022-02-14T08:28:15.000Z | chpass/dal/models/base.py | bengabay11/chromesy | 03328f7330c4e119e7f6a5bc2b75575eb47e4e61 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from sqlalchemy.ext.declarative import as_declarative, declared_attr
@dataclass
@as_declarative()
class Base(object):
@declared_attr
def __tablename__(cls) -> str:
return cls.__name__.lower()
def json(self) -> dict:
dict_base = self.__dict__.copy()
... | 23.578947 | 68 | 0.654018 |
60bb5dac384352c9fc9ce9d6baf907b60bc6fb09 | 8,032 | py | Python | release/scripts/addons/io_mesh_uv_layout/__init__.py | vic3t3chn0/Bforartists | 7c54a60dd7aa568e20ae7e3778dfef993b61b7b5 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-01-18T22:13:24.000Z | 2020-01-18T22:13:24.000Z | release/scripts/addons/io_mesh_uv_layout/__init__.py | vic3t3chn0/Bforartists | 7c54a60dd7aa568e20ae7e3778dfef993b61b7b5 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/io_mesh_uv_layout/__init__.py | vic3t3chn0/Bforartists | 7c54a60dd7aa568e20ae7e3778dfef993b61b7b5 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 32.518219 | 98 | 0.623506 |
3ee1f46c666a1cb9a317a6f2687ecbcc1bb7ab92 | 18,605 | py | Python | test/test_tokenizer_tok.py | vthorsteinsson/Tokenizer | 19ade7dc63c131e1942fba31159bc8fc771aec3e | [
"MIT"
] | 10 | 2018-01-17T19:17:17.000Z | 2019-02-19T02:25:36.000Z | test/test_tokenizer_tok.py | vthorsteinsson/Tokenizer | 19ade7dc63c131e1942fba31159bc8fc771aec3e | [
"MIT"
] | 4 | 2018-04-20T08:45:39.000Z | 2018-11-28T18:13:15.000Z | test/test_tokenizer_tok.py | vthorsteinsson/Tokenizer | 19ade7dc63c131e1942fba31159bc8fc771aec3e | [
"MIT"
] | 3 | 2018-04-20T08:36:12.000Z | 2018-11-20T16:31:55.000Z | # type: ignore
"""
Tests for Tokenizer module
Copyright (C) 2022 by Miðeind ehf.
This software is licensed under the MIT License:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to ... | 31.587436 | 94 | 0.532599 |
70cae66f086460608bebb6ff5372734787d5cd56 | 56,125 | py | Python | tests/tape/test_qnode_old.py | QDaria/pennylane | 5a28983fc7bd950cde8a4014e54261fef4b54293 | [
"Apache-2.0"
] | null | null | null | tests/tape/test_qnode_old.py | QDaria/pennylane | 5a28983fc7bd950cde8a4014e54261fef4b54293 | [
"Apache-2.0"
] | null | null | null | tests/tape/test_qnode_old.py | QDaria/pennylane | 5a28983fc7bd950cde8a4014e54261fef4b54293 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicabl... | 36.13973 | 116 | 0.588151 |
729d1cab5eac412fe0b2bd93731d6cd65e16b952 | 2,116 | py | Python | books/migrations/0001_initial.py | vis7/librery_management | 704e69e8c78fb79bc567464df02213c59bc6051b | [
"MIT"
] | null | null | null | books/migrations/0001_initial.py | vis7/librery_management | 704e69e8c78fb79bc567464df02213c59bc6051b | [
"MIT"
] | 2 | 2021-10-31T12:14:29.000Z | 2021-10-31T12:16:54.000Z | books/migrations/0001_initial.py | vis7/librery_management | 704e69e8c78fb79bc567464df02213c59bc6051b | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-06-07 09:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',
fields=[
... | 37.122807 | 114 | 0.551985 |
38aec332d5eaee70a2ebf97dbd1cbca6156ddce1 | 2,873 | py | Python | src/backend/common/queries/tests/team_events_query_test.py | bovlb/the-blue-alliance | 29389649d96fe060688f218d463e642dcebfd6cc | [
"MIT"
] | 266 | 2015-01-04T00:10:48.000Z | 2022-03-28T18:42:05.000Z | src/backend/common/queries/tests/team_events_query_test.py | bovlb/the-blue-alliance | 29389649d96fe060688f218d463e642dcebfd6cc | [
"MIT"
] | 2,673 | 2015-01-01T20:14:33.000Z | 2022-03-31T18:17:16.000Z | src/backend/common/queries/tests/team_events_query_test.py | ZachOrr/the-blue-alliance | b9a2e6e07374fb12c70f8fae1948bfe90e34adfe | [
"MIT"
] | 230 | 2015-01-04T00:10:48.000Z | 2022-03-26T18:12:04.000Z | from typing import List, Optional
from google.appengine.ext import ndb
from backend.common.consts.event_type import EventType
from backend.common.models.event import Event
from backend.common.models.event_team import EventTeam
from backend.common.models.keys import EventKey, TeamKey, Year
from backend.common.models.t... | 28.166667 | 79 | 0.649147 |
d4f39da5226d1b0d7f3d255b844dd64c18ecb3cb | 5,013 | py | Python | new.py | truongcntn2017/FingerHandDetector | ed6d79ae140a6650ff1f20c72967e9d549acf69f | [
"MIT"
] | null | null | null | new.py | truongcntn2017/FingerHandDetector | ed6d79ae140a6650ff1f20c72967e9d549acf69f | [
"MIT"
] | null | null | null | new.py | truongcntn2017/FingerHandDetector | ed6d79ae140a6650ff1f20c72967e9d549acf69f | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import copy
import math
#from appscript import app
# Environment:
# OS : Mac OS EL Capitan
# python: 3.5
# opencv: 2.4.13
# parameters
cap_region_x_begin=0.5 # start point/total width
cap_region_y_end=0.8 # start point/total width
threshold = 60 # BINARY threshold
blurValue = 41 ... | 35.807143 | 95 | 0.579094 |
e63544db49c0ced6a81d3bbec65ebeb398a58e11 | 11,001 | py | Python | frontend/amundsen_application/api/utils/metadata_utils.py | ohayak/amundsen | 32a196c611c8ca623129984d8d0252f00202b73c | [
"Apache-2.0"
] | null | null | null | frontend/amundsen_application/api/utils/metadata_utils.py | ohayak/amundsen | 32a196c611c8ca623129984d8d0252f00202b73c | [
"Apache-2.0"
] | null | null | null | frontend/amundsen_application/api/utils/metadata_utils.py | ohayak/amundsen | 32a196c611c8ca623129984d8d0252f00202b73c | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import logging
from dataclasses import dataclass
from marshmallow import EXCLUDE
from typing import Any, Dict, List
from amundsen_common.models.dashboard import DashboardSummary, DashboardSummarySchema
from amundsen_common.models... | 39.289286 | 113 | 0.696937 |
6a52ad7779d03cca1d204aa73f76095e510c424a | 721 | py | Python | dashboard/dashboard/__init__.py | vbessonov/quicksight-embedding-test | 2f61cfba3a526e3a012ef4e81cb464347117dd27 | [
"MIT"
] | null | null | null | dashboard/dashboard/__init__.py | vbessonov/quicksight-embedding-test | 2f61cfba3a526e3a012ef4e81cb464347117dd27 | [
"MIT"
] | null | null | null | dashboard/dashboard/__init__.py | vbessonov/quicksight-embedding-test | 2f61cfba3a526e3a012ef4e81cb464347117dd27 | [
"MIT"
] | null | null | null | import logging
import os
from flask import Flask
from dashboard.blueprints import home, api
def create_app():
app = Flask(__name__, instance_relative_config=True)
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
application_settings_file = os.getenv('APPLICATION_SETTINGS_... | 24.033333 | 73 | 0.746186 |
680bf3fd8ac522455f7c2fa82db8abb480212f8a | 2,728 | py | Python | bot.py | blazecus/BlazesBot | 0d197101dcdc28ef1bc7566c6355d75939baae0e | [
"MIT"
] | null | null | null | bot.py | blazecus/BlazesBot | 0d197101dcdc28ef1bc7566c6355d75939baae0e | [
"MIT"
] | null | null | null | bot.py | blazecus/BlazesBot | 0d197101dcdc28ef1bc7566c6355d75939baae0e | [
"MIT"
] | null | null | null | import os
import re
import discord
import dotsandboxes
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
client = discord.Client()
client.state_per_server = dict()
client.game_per_server = dict()
for i in client.guilds:
client.state_per_server[i] = "NO GAME"
client.game_per_... | 43.301587 | 159 | 0.576246 |
52ffdf37252cc9cd888baee7f368b73dcbcd1115 | 1,437 | py | Python | alignment/urls.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 21 | 2016-01-20T09:33:14.000Z | 2021-12-20T19:19:45.000Z | alignment/urls.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 75 | 2016-02-26T16:29:58.000Z | 2022-03-21T12:35:13.000Z | alignment/urls.py | pszgaspar/protwis | 4989a67175ef3c95047d795c843cf6b9cf4141fa | [
"Apache-2.0"
] | 77 | 2016-01-22T08:44:26.000Z | 2022-02-01T15:54:56.000Z | from django.conf.urls import url
from django.views.generic import TemplateView
from django.views.decorators.cache import cache_page
from alignment import views
urlpatterns = [
url(r'^targetselection', (views.TargetSelection.as_view()), name='targetselection'),
url(r'^gproteinselection', (views.TargetSelect... | 57.48 | 113 | 0.75087 |
806fe167ae8223f4bcc7bf8c0003345081c7539f | 2,339 | py | Python | test/test_condica.py | hugorichard/augfmri | 1c69929261931e8e852407aa0dc09923d569b5e4 | [
"BSD-3-Clause"
] | null | null | null | test/test_condica.py | hugorichard/augfmri | 1c69929261931e8e852407aa0dc09923d569b5e4 | [
"BSD-3-Clause"
] | 2 | 2021-09-01T01:40:25.000Z | 2021-10-13T06:28:51.000Z | test/test_condica.py | hugorichard/augfmri | 1c69929261931e8e852407aa0dc09923d569b5e4 | [
"BSD-3-Clause"
] | 2 | 2021-09-01T08:23:13.000Z | 2022-02-09T16:17:55.000Z | # Authors: Hugo Richard, Badr Tajini
# License: BSD 3 clause
from condica.main import condica
from picard import picard
from sklearn.preprocessing import QuantileTransformer
import numpy as np
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.model_selection import ShuffleSplit
from skl... | 32.041096 | 76 | 0.645147 |
1538ebe9867ef5afcff924a15755685130b2f9d4 | 6,076 | py | Python | prediction.py | baraschi/Twitter_Sentiment_Analysis | 5bfc21fd712dc158505063c9810b46d4b5a26e85 | [
"MIT"
] | null | null | null | prediction.py | baraschi/Twitter_Sentiment_Analysis | 5bfc21fd712dc158505063c9810b46d4b5a26e85 | [
"MIT"
] | null | null | null | prediction.py | baraschi/Twitter_Sentiment_Analysis | 5bfc21fd712dc158505063c9810b46d4b5a26e85 | [
"MIT"
] | null | null | null | import csv, os, collections
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, clas... | 46.030303 | 133 | 0.714944 |
bf30dedfda96b907fed5932e2e2fb2918ad8654d | 692 | py | Python | pymore/__init__.py | dabacon/pymore | 2a7bea5669d50d814ae89de3919c5544f9c7fd29 | [
"Apache-2.0"
] | 3 | 2021-02-13T22:58:06.000Z | 2021-11-17T10:52:42.000Z | pymore/__init__.py | dabacon/pymore | 2a7bea5669d50d814ae89de3919c5544f9c7fd29 | [
"Apache-2.0"
] | null | null | null | pymore/__init__.py | dabacon/pymore | 2a7bea5669d50d814ae89de3919c5544f9c7fd29 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The pymore Developers
#
# 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 i... | 34.6 | 74 | 0.771676 |
dc364558e6475efa0f2ece550acd996b7cd117c9 | 3,112 | py | Python | pypy/module/_stackless/test/test_coroutine.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/module/_stackless/test/test_coroutine.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | null | null | null | pypy/module/_stackless/test/test_coroutine.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | from pypy.conftest import gettestobjspace
from py.test import skip
class AppTest_Coroutine:
def setup_class(cls):
space = gettestobjspace(usemodules=('_stackless',))
cls.space = space
def test_pickle_coroutine_empty(self):
# this test is limited to basic pickling.
# real stac... | 26.372881 | 72 | 0.523458 |
6c87191eb385b51d9cff11faac371fd22ddec7ca | 588 | py | Python | examples/03-remote-system/diff.py | chadell/diffsync | b59a362f75144661897762dc47486f2bc0680bdd | [
"Apache-2.0"
] | 67 | 2020-10-26T14:57:53.000Z | 2022-03-28T20:38:03.000Z | examples/03-remote-system/diff.py | chadell/diffsync | b59a362f75144661897762dc47486f2bc0680bdd | [
"Apache-2.0"
] | 47 | 2020-10-26T14:49:37.000Z | 2022-03-04T11:32:10.000Z | examples/03-remote-system/diff.py | chadell/diffsync | b59a362f75144661897762dc47486f2bc0680bdd | [
"Apache-2.0"
] | 13 | 2020-12-06T02:32:34.000Z | 2022-03-28T16:10:02.000Z | """Custom Diff class for DiffSync to influence the behavior of the core Engine."""
from diffsync.diff import Diff
class AlphabeticalOrderDiff(Diff):
"""Simple diff to return all children country in alphabetical order."""
@classmethod
def order_children_default(cls, children):
"""Simple diff to re... | 34.588235 | 82 | 0.685374 |
7bd33b2ae126b761756bac709635fe06952d34d8 | 191 | py | Python | EventFilter/EcalTBRawToDigi/python/ecalTBunpack_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | EventFilter/EcalTBRawToDigi/python/ecalTBunpack_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | EventFilter/EcalTBRawToDigi/python/ecalTBunpack_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
ecalTBunpack = cms.EDProducer("EcalDCCTBUnpackingModule",
fedRawDataCollectionTag = cms.InputTag('rawDataCollector')
)
| 31.833333 | 88 | 0.701571 |
acd1c0f7d3969b86d2c400548546baf9a80fc78e | 37 | py | Python | Prac/p5.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | 1 | 2021-05-29T03:09:24.000Z | 2021-05-29T03:09:24.000Z | Prac/p5.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | null | null | null | Prac/p5.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | null | null | null | lst = [3,4,6,1,8,9]
print(6 in lst)
| 9.25 | 19 | 0.540541 |
2e91db1c4257e090f5f6abfa0d10e16735517b2c | 729 | py | Python | setup.py | SergioLaRosa/pydevrant | 5582e1407efd1704c50b50c5ed96c0aaa876d429 | [
"MIT"
] | 8 | 2018-04-06T21:47:18.000Z | 2019-05-09T19:22:04.000Z | setup.py | SergioLaRosa/pydevrant | 5582e1407efd1704c50b50c5ed96c0aaa876d429 | [
"MIT"
] | 3 | 2018-04-06T23:16:36.000Z | 2018-12-01T15:54:12.000Z | setup.py | SergioLaRosa/pydevrant | 5582e1407efd1704c50b50c5ed96c0aaa876d429 | [
"MIT"
] | 2 | 2018-04-06T21:47:22.000Z | 2018-04-06T22:28:09.000Z | # Written by Sergio La Rosa (sergio.larosa89@gmail.com)
# and John Leonardo (hey@jdleo.me)
# Part of "pydevrant" package
# https://github.com/SergioLaRosa/pydevrant
from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long... | 28.038462 | 71 | 0.711934 |
123fae63fa459cf77393abeda0f80c6ae2a57b42 | 570 | py | Python | Most Asked DSA By Companies/Meta/41-15.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | Most Asked DSA By Companies/Meta/41-15.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | Most Asked DSA By Companies/Meta/41-15.py | neelaadityakumar/leetcode | e78e0b8dc0113bdc1721bf7d025a463bea04847f | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/3sum/
# 15. 3Sum
# Medium
# 16643
# 1597
# Add to List
# Share
# Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
# Notice that the solution set must not contain duplicate tri... | 16.285714 | 158 | 0.580702 |
01bf92f52537b8b80ebd50a7c4b39a7a7545dcd3 | 8,873 | py | Python | project5/data/make_shuffling_integrations_wma.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null | project5/data/make_shuffling_integrations_wma.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null | project5/data/make_shuffling_integrations_wma.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
import os.path
from rebin import rebin
import glob
from random import shuffle
from joblib import Parallel, delayed
# import time
import h5py
from itertools import islice
from copy import deepcopy
def window(seq, n=2):
"Returns a sliding window (of width n) over... | 33.483019 | 121 | 0.589654 |
584160335ab5521087d80809ad08be9cbf489217 | 497 | py | Python | wunderlist/migrations/0006_connection_list_title.py | passuf/WunderHabit | 97c16bf491a1eb5fa9eb3a41a59e149a1b0f1a9b | [
"MIT"
] | 43 | 2016-01-04T10:24:42.000Z | 2021-03-10T22:55:21.000Z | wunderlist/migrations/0006_connection_list_title.py | passuf/WunderHabit | 97c16bf491a1eb5fa9eb3a41a59e149a1b0f1a9b | [
"MIT"
] | 27 | 2016-01-07T01:59:12.000Z | 2019-05-23T09:06:44.000Z | wunderlist/migrations/0006_connection_list_title.py | passuf/WunderHabit | 97c16bf491a1eb5fa9eb3a41a59e149a1b0f1a9b | [
"MIT"
] | 9 | 2016-01-07T14:26:19.000Z | 2020-01-10T20:20:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-26 18:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wunderlist', '0005_auto_20151226_1750'),
]
operations = [
migrations.AddField(... | 23.666667 | 90 | 0.635815 |
b05b677348572ae4e676469ed72946c42ad86f41 | 130 | py | Python | tests/utils.py | sturmianseq/django-hug | 778b16f568ce9fdb01f360b7bff89c9d8b6c2ef7 | [
"MIT"
] | 3 | 2019-03-11T16:40:37.000Z | 2020-08-06T18:27:48.000Z | tests/utils.py | sturmianseq/django-hug | 778b16f568ce9fdb01f360b7bff89c9d8b6c2ef7 | [
"MIT"
] | null | null | null | tests/utils.py | sturmianseq/django-hug | 778b16f568ce9fdb01f360b7bff89c9d8b6c2ef7 | [
"MIT"
] | 1 | 2021-08-18T12:54:51.000Z | 2021-08-18T12:54:51.000Z | from django.http import JsonResponse
def json_response(locals):
locals.pop("request", None)
return JsonResponse(locals)
| 18.571429 | 36 | 0.753846 |
99cd89db7889ecd20617b1ac5060b60f8b313c45 | 9,934 | py | Python | heat/tests/openstack/zaqar/test_queue.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | 1 | 2015-12-18T21:46:55.000Z | 2015-12-18T21:46:55.000Z | heat/tests/openstack/zaqar/test_queue.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | heat/tests/openstack/zaqar/test_queue.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 36.388278 | 78 | 0.63338 |
9e3616a7868f983a191758cc02111f780c1a68b8 | 10,494 | py | Python | slim-inceptionV3-visual-finetune.py | Alex-Fun/distracted_driver_detection | aaec8316934acbbccd9eae66adaa1970adea4fed | [
"Apache-2.0"
] | null | null | null | slim-inceptionV3-visual-finetune.py | Alex-Fun/distracted_driver_detection | aaec8316934acbbccd9eae66adaa1970adea4fed | [
"Apache-2.0"
] | null | null | null | slim-inceptionV3-visual-finetune.py | Alex-Fun/distracted_driver_detection | aaec8316934acbbccd9eae66adaa1970adea4fed | [
"Apache-2.0"
] | null | null | null | import os
import tensorflow as tf
import tensorflow.contrib.slim as slim
import logging
import time
import utils
import vgg_preprocessing
import inception_preprocessing
import model
def main(a):
# config param
# base_dir = r'E:\tmp\data\state-farm-distracted-driver-detection'
# out_put_dir = r'E:\tmp\data... | 43.725 | 211 | 0.65628 |
1c4b17155ce1c194a7b8f5676a046ae0ba85cb53 | 2,036 | py | Python | spark-1.3.0/python/build/py4j/tests/java_array_test.py | iflink/spark | 3b6b0c2cbdc1f939fb60ef5717ffbe232ebceee5 | [
"Apache-2.0"
] | null | null | null | spark-1.3.0/python/build/py4j/tests/java_array_test.py | iflink/spark | 3b6b0c2cbdc1f939fb60ef5717ffbe232ebceee5 | [
"Apache-2.0"
] | null | null | null | spark-1.3.0/python/build/py4j/tests/java_array_test.py | iflink/spark | 3b6b0c2cbdc1f939fb60ef5717ffbe232ebceee5 | [
"Apache-2.0"
] | 1 | 2020-07-23T22:14:41.000Z | 2020-07-23T22:14:41.000Z | '''
Created on Mar 24, 2010
@author: Barthelemy Dagenais
'''
from __future__ import unicode_literals, absolute_import
from multiprocessing import Process
import subprocess
import time
import unittest
from py4j.java_gateway import JavaGateway
from py4j.tests.java_gateway_test import PY4J_JAVA_PATH
def start_example... | 27.513514 | 72 | 0.664047 |
d7447fe47428e682889270d28cf612a92d2c7ec2 | 1,117 | py | Python | bce/logic/balancer/merger.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | 12 | 2017-12-18T10:37:52.000Z | 2021-11-28T07:08:46.000Z | bce/logic/balancer/merger.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | null | null | null | bce/logic/balancer/merger.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | 4 | 2018-04-29T10:32:26.000Z | 2021-07-13T08:17:36.000Z | #!/usr/bin/env python
#
# Copyright 2014 - 2018 The BCE Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the license.txt file.
#
def merge_coefficients_with_cexp_object(cexp_object, coefficients):
"""Merge balanced coefficients with a chemical eq... | 34.90625 | 83 | 0.722471 |
a59d6b573d55f7569db2bab07a33d2e954f570b6 | 260 | py | Python | PasswordGenerator.py | gabe-martins/PythonCodes | 1ec11636559f61890f3ec52a60f13695337999a1 | [
"MIT"
] | null | null | null | PasswordGenerator.py | gabe-martins/PythonCodes | 1ec11636559f61890f3ec52a60f13695337999a1 | [
"MIT"
] | null | null | null | PasswordGenerator.py | gabe-martins/PythonCodes | 1ec11636559f61890f3ec52a60f13695337999a1 | [
"MIT"
] | null | null | null | import random
import string
length = 16
lower = string.ascii_lowercase
upper = string.ascii_uppercase
number = string.digits
special = string.punctuation
all = lower + upper + number + special
passoword = "".join(random.sample(all,length))
print(passoword) | 18.571429 | 46 | 0.769231 |
ed667ae6cbe4ea8220de358d0001ee33ad9e0910 | 7,319 | py | Python | fmcapi/api_objects/device_services/devicerecords.py | dadelowo367/fmcapi | cd6ac6d118383a06063ead563ca98c7994238715 | [
"BSD-3-Clause"
] | 57 | 2017-06-13T17:06:20.000Z | 2021-07-27T08:53:25.000Z | fmcapi/api_objects/device_services/devicerecords.py | dadelowo367/fmcapi | cd6ac6d118383a06063ead563ca98c7994238715 | [
"BSD-3-Clause"
] | 66 | 2017-11-09T16:02:45.000Z | 2021-08-04T20:52:41.000Z | fmcapi/api_objects/device_services/devicerecords.py | dadelowo367/fmcapi | cd6ac6d118383a06063ead563ca98c7994238715 | [
"BSD-3-Clause"
] | 56 | 2017-06-08T07:53:12.000Z | 2021-07-30T13:26:47.000Z | """Device Records Classes."""
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate
from fmcapi.api_objects.policy_services.accesspolicies import AccessPolicies
from fmcapi.api_objects.status_services import TaskStatuses
import time
import logging
class DeviceRecords(APIClassTemplate):
"""The DeviceRe... | 36.232673 | 117 | 0.547343 |
8c95cb443bcd582ed955e61c1effb0de8cac48a1 | 726 | py | Python | credit_calculator/choice.py | blanketastronomer/credit_calculator | 195cb56934f354543c8d71787577695986bc9340 | [
"MIT"
] | null | null | null | credit_calculator/choice.py | blanketastronomer/credit_calculator | 195cb56934f354543c8d71787577695986bc9340 | [
"MIT"
] | null | null | null | credit_calculator/choice.py | blanketastronomer/credit_calculator | 195cb56934f354543c8d71787577695986bc9340 | [
"MIT"
] | null | null | null | class Choice:
def __init__(self, choice: str, description: str, default: bool = False):
"""
A menu choice to add to a prompt in interactive mode.
:param choice: Letter to respond to
:param description: Description of the choice
:param default: If true, this will be the defau... | 27.923077 | 89 | 0.575758 |
f28d14dacc349043edf42ebc7ae300069a6aad46 | 983 | py | Python | notifiers/pushbullet_notifier.py | cfsmp3/kimsufi-crawler | acefd900694579f85b3478275e27e93a54ed9079 | [
"MIT"
] | null | null | null | notifiers/pushbullet_notifier.py | cfsmp3/kimsufi-crawler | acefd900694579f85b3478275e27e93a54ed9079 | [
"MIT"
] | null | null | null | notifiers/pushbullet_notifier.py | cfsmp3/kimsufi-crawler | acefd900694579f85b3478275e27e93a54ed9079 | [
"MIT"
] | null | null | null | """Notifier that sends messages through Pushbullet"""
import logging
from pushbullet import Pushbullet
from notifiers.base_notifier import Notifier
_logger = logging.getLogger(__name__)
class PushbulletNotifier(Notifier):
"""Notifier class to work with Pushbullet"""
def __init__(self, config):
"""O... | 31.709677 | 78 | 0.668362 |
6eac28978ceb7382f7586ac4290d3e25e2459120 | 3,797 | py | Python | doajtest/UI/pages/metadata_form.py | gaybro8777/doaj | 27d9d98ce4f496ae52acbaba6ee8e42c84cf1a58 | [
"Apache-2.0"
] | 47 | 2015-04-24T13:13:39.000Z | 2022-03-06T03:22:42.000Z | doajtest/UI/pages/metadata_form.py | gaybro8777/doaj | 27d9d98ce4f496ae52acbaba6ee8e42c84cf1a58 | [
"Apache-2.0"
] | 1,215 | 2015-01-02T14:29:38.000Z | 2022-03-28T14:19:13.000Z | doajtest/UI/pages/metadata_form.py | gaybro8777/doaj | 27d9d98ce4f496ae52acbaba6ee8e42c84cf1a58 | [
"Apache-2.0"
] | 14 | 2015-11-27T13:01:23.000Z | 2021-05-21T07:57:23.000Z | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
class PublisherMetadataForm:
URL = 'localhost:5004/publisher/metadata'
SEARCH_ADD_ARTICLE_BUTTON = (By.XPATH, "//button[@type='submit' and contains(., 'Add Article')]")
SEARCH_ERRORS ... | 42.188889 | 153 | 0.683171 |
7e7cade4d330763d078f23b26262c1a4447f59f3 | 4,951 | py | Python | mmtbx/regression/tst_clashes.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/regression/tst_clashes.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/regression/tst_clashes.py | mphancock/cctbx_project | ec8a239c5bcee9c9b2d1c6c95dc3fff2580bbb85 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import mmtbx.clashes
from libtbx.utils import null_out
pdb_good = """
CRYST1 23.341 28.568 19.164 90.00 90.00 90.00 P 1
ATOM 1 N ARG A 58 9.158 17.337 8.990 1.00 7.73 N
ATOM 2 CA ARG A 58 10.275 17.092... | 46.707547 | 78 | 0.533226 |
a77aa728e307eb7279c3bc8712995ee28f87c099 | 1,381 | py | Python | cogs/modules/aes_angou.py | thiqxis/bottest | a874ed3fc08f0271ad0f8957d422775ba2b07359 | [
"MIT"
] | 7 | 2021-11-03T00:53:40.000Z | 2022-03-17T23:50:08.000Z | cogs/modules/aes_angou.py | p-yon-kity/discord-reminderbot | aae56d3606c6a61da6447de3c81f818e6b787e7c | [
"MIT"
] | 27 | 2021-03-21T14:35:27.000Z | 2022-03-23T12:21:00.000Z | cogs/modules/aes_angou.py | p-yon-kity/discord-reminderbot | aae56d3606c6a61da6447de3c81f818e6b787e7c | [
"MIT"
] | 7 | 2021-07-31T21:43:56.000Z | 2022-03-18T00:15:03.000Z | # https://pycryptodome.readthedocs.io/en/latest/src/examples.html
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from os.path import join, dirname
import hashlib, os
class Aes_angou:
ENC_FILE = 'encrypted.bin'
DEC_FILE = 'reminder.db'
ENC_FILE_PATH = join(dirname(__file__), 'file... | 37.324324 | 78 | 0.650253 |
16cf26a4151458a83edd1058747d79f80994759b | 5,065 | py | Python | petastorm/weighted_sampling_reader.py | rizalgowandy/petastorm | f7aad8cf5ef6878231b335911e3e95541b388d40 | [
"Apache-2.0"
] | 1,393 | 2018-08-17T19:01:12.000Z | 2022-03-31T22:33:45.000Z | petastorm/weighted_sampling_reader.py | rizalgowandy/petastorm | f7aad8cf5ef6878231b335911e3e95541b388d40 | [
"Apache-2.0"
] | 554 | 2018-08-17T19:59:42.000Z | 2022-03-31T23:15:07.000Z | petastorm/weighted_sampling_reader.py | rizalgowandy/petastorm | f7aad8cf5ef6878231b335911e3e95541b388d40 | [
"Apache-2.0"
] | 241 | 2018-08-17T20:03:10.000Z | 2022-03-22T11:18:47.000Z | # Copyright (c) 2017-2018 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 43.663793 | 120 | 0.684501 |
c4c2cbcc641234e4b1afe42aca1f160c1028302f | 8,544 | py | Python | releasenotes/source/conf.py | openstack/puppet-glance | 16d60d2f12e136ece361bb7e56c4fc17475ca696 | [
"Apache-2.0"
] | 26 | 2015-06-23T08:06:41.000Z | 2020-06-01T06:23:06.000Z | releasenotes/source/conf.py | openstack/puppet-glance | 16d60d2f12e136ece361bb7e56c4fc17475ca696 | [
"Apache-2.0"
] | null | null | null | releasenotes/source/conf.py | openstack/puppet-glance | 16d60d2f12e136ece361bb7e56c4fc17475ca696 | [
"Apache-2.0"
] | 29 | 2015-06-22T13:20:41.000Z | 2020-02-03T06:07:55.000Z | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 33.245136 | 105 | 0.724368 |
f7704efa3c66d5373f3d0e73beecd42d9a15ead6 | 221 | py | Python | gluoncv/utils/metrics/__init__.py | islinwh/gluon-cv | 669b1ac169ad26c6df06ab26592de2baf109fe44 | [
"Apache-2.0"
] | 36 | 2019-12-25T04:59:49.000Z | 2022-03-17T07:24:49.000Z | gluoncv/utils/metrics/__init__.py | islinwh/gluon-cv | 669b1ac169ad26c6df06ab26592de2baf109fe44 | [
"Apache-2.0"
] | 1 | 2019-01-18T06:42:59.000Z | 2019-01-18T12:26:11.000Z | gluoncv/utils/metrics/__init__.py | islinwh/gluon-cv | 669b1ac169ad26c6df06ab26592de2baf109fe44 | [
"Apache-2.0"
] | 9 | 2019-12-25T05:00:33.000Z | 2021-10-01T14:23:51.000Z | """Custom evaluation metrics"""
from __future__ import absolute_import
from .coco_detection import COCODetectionMetric
from .voc_detection import VOCMApMetric, VOC07MApMetric
from .segmentation import SegmentationMetric
| 31.571429 | 55 | 0.859729 |
996b553956a3726b75ea893b8ae187ed984846cb | 611 | py | Python | Python3/0514-Freedom-Trail/soln-1.py | wyaadarsh/LeetCode-Solutions | 3719f5cb059eefd66b83eb8ae990652f4b7fd124 | [
"MIT"
] | 5 | 2020-07-24T17:48:59.000Z | 2020-12-21T05:56:00.000Z | Python3/0514-Freedom-Trail/soln-1.py | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | null | null | null | Python3/0514-Freedom-Trail/soln-1.py | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | 2 | 2020-07-24T17:49:01.000Z | 2020-08-31T19:57:35.000Z | class Solution:
def findRotateSteps(self, ring: str, key: str) -> int:
idxes = collections.defaultdict(list)
for i, ch in enumerate(ring):
idxes[ch].append(i)
n = len(ring)
dp = [0] * n
for i in idxes[key[0]]:
dp[i] = min(i, n - i) + 1
pre = ke... | 35.941176 | 121 | 0.454992 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.