hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42b290f28379044f7898e5789570088ba9add498 | 5,974 | py | Python | pybricks/workspace.py | emthomas/pybricks | adc212cd8d8e9b257be3139aa99116ba2505ead6 | [
"MIT"
] | 2 | 2019-09-21T02:53:09.000Z | 2020-01-03T03:15:39.000Z | pybricks/workspace.py | emthomas/pybricks | adc212cd8d8e9b257be3139aa99116ba2505ead6 | [
"MIT"
] | null | null | null | pybricks/workspace.py | emthomas/pybricks | adc212cd8d8e9b257be3139aa99116ba2505ead6 | [
"MIT"
] | null | null | null | import json
import os
import requests
class WorkspaceApi(object):
"""The Workspace API"""
def __init__(self, hostname, token):
self.hostname = "%s/api/" % hostname
self.__headers = {'authorization': "Bearer %s" % token, "content-type": "application/scim+json",
"acce... | 48.569106 | 333 | 0.647975 |
e0ec1944639ff07a6b0cbfc57042fad21e7d7ad5 | 19,452 | py | Python | seaborn/tests/test_linearmodels.py | darothen/seaborn | 0f43f2f9c84a6c677b7938a3e6edb66bbe9f8f88 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2020-05-16T20:43:18.000Z | 2020-05-16T20:43:18.000Z | seaborn/tests/test_linearmodels.py | darothen/seaborn | 0f43f2f9c84a6c677b7938a3e6edb66bbe9f8f88 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | seaborn/tests/test_linearmodels.py | darothen/seaborn | 0f43f2f9c84a6c677b7938a3e6edb66bbe9f8f88 | [
"MIT",
"BSD-3-Clause"
] | 3 | 2019-05-23T14:55:56.000Z | 2021-08-18T19:44:46.000Z | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import nose.tools as nt
import numpy.testing as npt
import pandas.util.testing as pdt
from numpy.testing.decorators import skipif
from nose import SkipTest
try:
import statsmodels.regression.linear_model as smlm
_n... | 33.770833 | 79 | 0.587189 |
27fc3f84ea8938d34c14f1510abcffd71d007b60 | 19,214 | py | Python | glide/load.py | LemontechSA/glide | a84ec1b9c8a982430308e8b0a04f84f26200765c | [
"MIT"
] | 19 | 2019-09-09T18:51:26.000Z | 2021-11-23T21:15:37.000Z | glide/load.py | LemontechSA/glide | a84ec1b9c8a982430308e8b0a04f84f26200765c | [
"MIT"
] | null | null | null | glide/load.py | LemontechSA/glide | a84ec1b9c8a982430308e8b0a04f84f26200765c | [
"MIT"
] | 4 | 2019-12-01T22:40:04.000Z | 2022-03-23T18:06:52.000Z | """A home for common data load nodes"""
from copy import deepcopy
import csv
from email.message import EmailMessage
import shutil
import sqlite3
import tempfile
import requests
from tlbx import st, pp, create_email, send_email, sqlformat, repr, format_msg
from glide.core import Node
from glide.flow import SkipFalseN... | 30.5469 | 104 | 0.536224 |
a8eaa7dcef5a2c10d313aec9db484d33a2e124c7 | 385 | py | Python | crawlib2/tests/dummy_site_crawler/site/s2_music/entity_base.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | crawlib2/tests/dummy_site_crawler/site/s2_music/entity_base.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | crawlib2/tests/dummy_site_crawler/site/s2_music/entity_base.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
from crawlib2.entity.mongodb.entity import MongodbEntitySingleStatus
class MusicWebsiteEntity(MongodbEntitySingleStatus):
meta = {
"abstract": True,
}
def build_request(self, url, **kwargs):
request = url
return request
def send_reques... | 21.388889 | 68 | 0.67013 |
57e6b58d0ab6d8517b7fa682a35f030008d15625 | 13,365 | py | Python | cryptoapis/model/broadcast_locally_signed_transaction_rb_data_item.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/broadcast_locally_signed_transaction_rb_data_item.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/broadcast_locally_signed_transaction_rb_data_item.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 49.317343 | 484 | 0.606584 |
982892aeec70ac327f51ea785780d9e3b379ddf4 | 1,068 | py | Python | moviepy/audio/fx/multiply_stereo_volume.py | andriyor/moviepy | 8eaf3f02c5cf812e89f03e925cb2fa5e05b8d29a | [
"MIT"
] | 8,558 | 2015-01-03T05:14:12.000Z | 2022-03-31T21:45:38.000Z | moviepy/audio/fx/multiply_stereo_volume.py | andriyor/moviepy | 8eaf3f02c5cf812e89f03e925cb2fa5e05b8d29a | [
"MIT"
] | 1,592 | 2015-01-02T22:12:54.000Z | 2022-03-30T13:10:40.000Z | moviepy/audio/fx/multiply_stereo_volume.py | andriyor/moviepy | 8eaf3f02c5cf812e89f03e925cb2fa5e05b8d29a | [
"MIT"
] | 1,332 | 2015-01-02T18:01:53.000Z | 2022-03-31T22:47:28.000Z | from moviepy.decorators import audio_video_fx
@audio_video_fx
def multiply_stereo_volume(clip, left=1, right=1):
"""For a stereo audioclip, this function enables to change the volume
of the left and right channel separately (with the factors `left`
and `right`). Makes a stereo audio clip in which the volu... | 35.6 | 86 | 0.647004 |
bdf46a23ef6b4fc59e2a5c6a2c6ec7fa14f9965e | 141 | py | Python | Python/tuples.py | HarshitRuwali/HackerRank-Solutions | 29c3ebd87723e1237866a551783bf62cf470d919 | [
"MIT"
] | 8 | 2020-07-16T12:17:16.000Z | 2022-01-11T04:24:03.000Z | Python/tuples.py | HarshitRuwali/HackerRank-Solutions | 29c3ebd87723e1237866a551783bf62cf470d919 | [
"MIT"
] | null | null | null | Python/tuples.py | HarshitRuwali/HackerRank-Solutions | 29c3ebd87723e1237866a551783bf62cf470d919 | [
"MIT"
] | 5 | 2020-11-30T17:40:15.000Z | 2022-02-28T11:26:59.000Z | if __name__ == '__main__':
n = int(input())
integer_list = map(int, input().split())
t = tuple(integer_list)
print(hash(t))
| 20.142857 | 44 | 0.588652 |
ddc5d2ee2a30bcb6f13ae918986ab688e68b7b18 | 4,259 | py | Python | Computer Graphics/OpenGL 2D/Transformations/3.CircleTranslation.py | henriquesqs/Codes | 59e5bb683f3de2ee1b13621569954be1e4f37396 | [
"MIT"
] | null | null | null | Computer Graphics/OpenGL 2D/Transformations/3.CircleTranslation.py | henriquesqs/Codes | 59e5bb683f3de2ee1b13621569954be1e4f37396 | [
"MIT"
] | 1 | 2021-09-21T03:26:14.000Z | 2021-09-21T03:26:14.000Z | Computer Graphics/OpenGL 2D/Transformations/3.CircleTranslation.py | henriquesqs/Codes | 59e5bb683f3de2ee1b13621569954be1e4f37396 | [
"MIT"
] | 1 | 2020-03-31T01:49:23.000Z | 2020-03-31T01:49:23.000Z | import glfw
from OpenGL.GL import *
import OpenGL.GL.shaders
import numpy as np
import math
def translation():
return np.array([1.0, 0.0, 0.0, t_x,
0.0, 1.0, 0.0, t_y,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0], np.float32)
def key_event(window, key, sca... | 23.401099 | 77 | 0.638413 |
1b489f0516c6b11ca57ae9aa41fbede86fed092a | 35,415 | py | Python | mint/farmer/farmer.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | mint/farmer/farmer.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | mint/farmer/farmer.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | import asyncio
import json
import logging
import time
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Tuple
import traceback
import aiohttp
from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey
import mint.server.ws_connection as ws # lgtm [py/import-and-import-from]
from ... | 49.462291 | 120 | 0.603388 |
16f34d8cbe946d52c2c85424b2394d290c268d03 | 350 | py | Python | pass3/exceptions.py | akesterson/pass3 | b2b125ca5b548665de60ace549ed34f692d541b2 | [
"MIT"
] | 1 | 2016-01-07T00:17:47.000Z | 2016-01-07T00:17:47.000Z | pass3/exceptions.py | akesterson/pass3 | b2b125ca5b548665de60ace549ed34f692d541b2 | [
"MIT"
] | null | null | null | pass3/exceptions.py | akesterson/pass3 | b2b125ca5b548665de60ace549ed34f692d541b2 | [
"MIT"
] | null | null | null | class DecryptionError(Exception):
"""
An error occurred while trying to decrypt a message
"""
pass
class EncryptionError(Exception):
"""
An error occurred while trying to encrypt a message
"""
pass
class PasswordException(Exception):
"""
An error occurred while checking the use... | 19.444444 | 56 | 0.66 |
cf0de7931452353e32f8a72f2240f5253cdcffa8 | 756 | py | Python | .history/List of Capstone Projects/next_prime_number_20200517103139.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | 1 | 2020-05-18T17:50:00.000Z | 2020-05-18T17:50:00.000Z | .history/List of Capstone Projects/next_prime_number_20200517103139.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | .history/List of Capstone Projects/next_prime_number_20200517103139.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | '''
Next Prime Number - Have the program find prime numbers until the user chooses to stop asking for the next one.
'''
import HeaderOfFiles
my_list = []
number = 1
while True:
x = input("Give me next prime number or type 's' to stop programm: ")
if x == 's':
break
else:
i = 2
num... | 24.387097 | 111 | 0.435185 |
7dd6bcb7d123f2574742e3a89e2b8c6771d98339 | 3,120 | py | Python | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/CustomBaseUri/fixtures/acceptancetestscustombaseuri/auto_rest_parameterized_host_test_client.py | ljhljh235/AutoRest | b9ab4000e9b93d16925db84d08bafc225b098f8e | [
"MIT"
] | 1 | 2017-08-27T07:40:09.000Z | 2017-08-27T07:40:09.000Z | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/CustomBaseUri/fixtures/acceptancetestscustombaseuri/auto_rest_parameterized_host_test_client.py | ljhljh235/AutoRest | b9ab4000e9b93d16925db84d08bafc225b098f8e | [
"MIT"
] | null | null | null | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/CustomBaseUri/fixtures/acceptancetestscustombaseuri/auto_rest_parameterized_host_test_client.py | ljhljh235/AutoRest | b9ab4000e9b93d16925db84d08bafc225b098f8e | [
"MIT"
] | 1 | 2019-07-20T12:20:03.000Z | 2019-07-20T12:20:03.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 ... | 37.590361 | 89 | 0.689423 |
36c95b740494d3cd27df386e12dbbdb0f563d570 | 631 | py | Python | submit_jobs.py | christiangil/Optimization-Tutorial | 22091fd5784978b6ac27406ecfa78c8c717400f0 | [
"MIT"
] | 2 | 2020-03-16T16:39:07.000Z | 2020-03-16T20:34:08.000Z | submit_jobs.py | christiangil/Optimization-Tutorial | 22091fd5784978b6ac27406ecfa78c8c717400f0 | [
"MIT"
] | null | null | null | submit_jobs.py | christiangil/Optimization-Tutorial | 22091fd5784978b6ac27406ecfa78c8c717400f0 | [
"MIT"
] | null | null | null | #This script submits jobs to ICS-ACI
import os
import os.path
import glob
import numpy as np
def submit_job(path, job_name):
os.system('mv %s %s'%(path, job_name))
os.system('qsub %s'%job_name)
os.system('mv %s %s'%(job_name,path))
###############################
Njobs_counter = 0
script_dir = os.path.... | 22.535714 | 56 | 0.66878 |
ee0d65254f690b3291152fecbfee5df7339b6aed | 5,640 | py | Python | Allura/allura/lib/widgets/user_profile.py | apache/allura | 6184203235ac6f83c943fae7fd3fef54678f9ed7 | [
"Apache-2.0"
] | 113 | 2015-03-25T10:33:37.000Z | 2022-02-16T20:55:06.000Z | Allura/allura/lib/widgets/user_profile.py | apache/allura | 6184203235ac6f83c943fae7fd3fef54678f9ed7 | [
"Apache-2.0"
] | 4 | 2017-08-04T16:19:07.000Z | 2020-06-08T19:01:33.000Z | Allura/allura/lib/widgets/user_profile.py | apache/allura | 6184203235ac6f83c943fae7fd3fef54678f9ed7 | [
"Apache-2.0"
] | 36 | 2015-08-14T16:27:39.000Z | 2022-02-16T20:54:35.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 33.176471 | 113 | 0.608333 |
f651d89b03c83d884b638967d7e8017bfa8be1d0 | 108,828 | py | Python | TPSdownloader.py | mmokrejs/TPSdownloader | 08498feb8125ebd7ffeed159403a1f3eb5866cee | [
"MIT"
] | null | null | null | TPSdownloader.py | mmokrejs/TPSdownloader | 08498feb8125ebd7ffeed159403a1f3eb5866cee | [
"MIT"
] | null | null | null | TPSdownloader.py | mmokrejs/TPSdownloader | 08498feb8125ebd7ffeed159403a1f3eb5866cee | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import sys
import os
import datetime
import numpy as np
import pandas as pd
from shlex import split as shlex_split
from subprocess import Popen, PIPE, call #, STDOUT
from optparse import OptionParser
import xml.etree.ElementTree as ET
import time
import re
# from re import compile, findall, findite... | 60.026475 | 1,044 | 0.654381 |
8543a1c1569809cead52e5a861f1e32f17b9bff8 | 5,885 | py | Python | torch/distributed/shard/api.py | jiajianglong/pytorch | 815532d40c25e81d8c09b3c36403016bea394aee | [
"Intel"
] | 1 | 2022-01-31T14:15:35.000Z | 2022-01-31T14:15:35.000Z | torch/distributed/shard/api.py | SurajPratap10/pytorch | 63bc76798477f2e3af7d5f92abf1d78eb7bd2a54 | [
"Intel"
] | null | null | null | torch/distributed/shard/api.py | SurajPratap10/pytorch | 63bc76798477f2e3af7d5f92abf1d78eb7bd2a54 | [
"Intel"
] | null | null | null | import copy
import torch
import torch.distributed as dist
from torch.distributed import distributed_c10d
from .sharding_spec import (
ChunkShardingSpec,
ShardingSpec,
)
from torch.distributed.shard.sharding_spec._internals import (
get_chunked_dim_size,
get_split_size,
)
from torch.distributed.shard.sha... | 40.308219 | 124 | 0.68904 |
93571401e2e7a9f8a753f6613b3c591fd880759f | 89,127 | py | Python | salt/grains/core.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | null | null | null | salt/grains/core.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | salt/grains/core.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2020-09-30T16:09:48.000Z | 2020-09-30T16:09:48.000Z | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... | 37.653992 | 118 | 0.533778 |
f2a372f307018a3377c73eec9ffb49a9d91f5b12 | 63 | py | Python | tests/basics/set_add.py | bygreencn/micropython | 3f759b71c63f5e01df18a6e204c50f78d1b6a20b | [
"MIT"
] | 1 | 2019-05-07T15:01:19.000Z | 2019-05-07T15:01:19.000Z | tests/basics/set_add.py | bygreencn/micropython | 3f759b71c63f5e01df18a6e204c50f78d1b6a20b | [
"MIT"
] | null | null | null | tests/basics/set_add.py | bygreencn/micropython | 3f759b71c63f5e01df18a6e204c50f78d1b6a20b | [
"MIT"
] | null | null | null | s = {1, 2, 3, 4}
print(s.add(5))
l = list(s)
l.sort()
print(l)
| 10.5 | 16 | 0.507937 |
3aa1eed2c29b7732383f5dafc5657f122aec68f8 | 1,196 | py | Python | boilerplate/app/controllers/user.py | davideasaf/effortless_rest_flask | ee96069614aa670837152db36616b847f1cb5f73 | [
"MIT"
] | null | null | null | boilerplate/app/controllers/user.py | davideasaf/effortless_rest_flask | ee96069614aa670837152db36616b847f1cb5f73 | [
"MIT"
] | null | null | null | boilerplate/app/controllers/user.py | davideasaf/effortless_rest_flask | ee96069614aa670837152db36616b847f1cb5f73 | [
"MIT"
] | 1 | 2021-06-30T19:53:57.000Z | 2021-06-30T19:53:57.000Z | "User Controller"
from flask import abort, jsonify, request
from flask_accepts import responds, accepts
from flask_praetorian import roles_required
from flask_restx import Namespace, Resource
from app import api, guard
from app.models import User
from app.schemas import UserSchema, UserLoginSchema
# Create a namespac... | 26 | 82 | 0.726589 |
8c9cbe4a8083edbe6b890fe0e8ff6307cacf0c18 | 1,644 | py | Python | tests/test_hooks/conan-center/test_global_cppstd.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | 24 | 2019-01-07T11:55:32.000Z | 2022-03-23T18:11:34.000Z | tests/test_hooks/conan-center/test_global_cppstd.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | 308 | 2018-11-20T19:11:16.000Z | 2022-03-30T05:35:31.000Z | tests/test_hooks/conan-center/test_global_cppstd.py | Minimonium/hooks | 92a4ade551dab17c497244f42dc51328cc7fee2e | [
"MIT"
] | 31 | 2018-12-11T16:41:37.000Z | 2021-12-03T15:44:44.000Z | import os
import textwrap
from conans import tools
from tests.utils.test_cases.conan_client import ConanClientTestCase
class TestGlobalCPPSTD(ConanClientTestCase):
conanfile = textwrap.dedent("""\
from conans import ConanFile
class AConan(ConanFile):
settings = "cppstd"
""")... | 41.1 | 104 | 0.63017 |
b08652b4a038535d44fa59b8b1eb9bcbda79081b | 502 | py | Python | web/dotfiles/http_lib.py | umi0451/dotfiles | c618811be788d995fe01f6a16b355828d7efdd36 | [
"MIT"
] | null | null | null | web/dotfiles/http_lib.py | umi0451/dotfiles | c618811be788d995fe01f6a16b355828d7efdd36 | [
"MIT"
] | null | null | null | web/dotfiles/http_lib.py | umi0451/dotfiles | c618811be788d995fe01f6a16b355828d7efdd36 | [
"MIT"
] | null | null | null | import bottle
from pathlib import Path
from clckwrkbdgr import xdg
ROOTDIR = Path(__file__).parent
@bottle.route('/lib/<javascript_module>.js')
def host_dotfiles_js_library(javascript_module):
bottle.response.content_type = 'application/javascript'
return (xdg.save_config_path('lib')/'{0}.js'.format(javascript_modu... | 31.375 | 84 | 0.788845 |
8902b377abce9e95f359ec8084b381df4d0810ad | 14,182 | py | Python | nova/api/openstack/compute/legacy_v2/contrib/hosts.py | patanric/nova-fairness | 559f121190f3d71f7e3067e688b50d3d6d16e383 | [
"Apache-2.0"
] | 1 | 2015-02-26T03:23:49.000Z | 2015-02-26T03:23:49.000Z | nova/api/openstack/compute/legacy_v2/contrib/hosts.py | patanric/nova-fairness | 559f121190f3d71f7e3067e688b50d3d6d16e383 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/legacy_v2/contrib/hosts.py | patanric/nova-fairness | 559f121190f3d71f7e3067e688b50d3d6d16e383 | [
"Apache-2.0"
] | 2 | 2015-06-17T13:24:55.000Z | 2015-10-27T05:28:38.000Z | # Copyright (c) 2011 OpenStack Foundation
# 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 ... | 42.208333 | 79 | 0.577563 |
14015077d508b7e219a8273c1bf7783b221f6ff3 | 1,485 | py | Python | src/triangulum/utils/cl.py | PolarNick239/Triangulum3D | 85c6a44f5c8f620bdc58164bd50ff89e1897f59d | [
"MIT"
] | 10 | 2016-09-18T01:38:46.000Z | 2021-11-18T17:30:28.000Z | src/triangulum/utils/cl.py | PolarNick239/Triangulum3D | 85c6a44f5c8f620bdc58164bd50ff89e1897f59d | [
"MIT"
] | 1 | 2018-06-20T05:48:19.000Z | 2018-06-20T09:19:56.000Z | src/triangulum/utils/cl.py | PolarNick239/Triangulum3D | 85c6a44f5c8f620bdc58164bd50ff89e1897f59d | [
"MIT"
] | 12 | 2015-11-29T03:22:37.000Z | 2020-07-14T03:08:52.000Z | #
# Copyright (c) 2015, Transas
# All rights reserved.
#
import logging
import pyopencl as cl
logger = logging.getLogger(__name__)
def create_context():
platforms = cl.get_platforms()
logger.debug('OpenCL platforms: {}'.format(['{}: {}.'.format(platform.get_info(cl.platform_info.VENDOR),
... | 46.40625 | 129 | 0.525253 |
2913e5e3997cf60678f210784ad76ac271fbea7d | 10,303 | py | Python | reviewboard/hostingsvcs/beanstalk.py | mnoorenberghe/reviewboard | b8ba9d662c250cb5ec704a50f619adbf3be8cbf0 | [
"MIT"
] | null | null | null | reviewboard/hostingsvcs/beanstalk.py | mnoorenberghe/reviewboard | b8ba9d662c250cb5ec704a50f619adbf3be8cbf0 | [
"MIT"
] | null | null | null | reviewboard/hostingsvcs/beanstalk.py | mnoorenberghe/reviewboard | b8ba9d662c250cb5ec704a50f619adbf3be8cbf0 | [
"MIT"
] | 1 | 2021-11-23T15:25:44.000Z | 2021-11-23T15:25:44.000Z | from __future__ import unicode_literals
import json
import logging
import os
from collections import defaultdict
from django import forms
from django.conf.urls import patterns, url
from django.http import HttpResponse
from django.utils import six
from django.utils.six.moves.urllib.error import HTTPError, URLError
fro... | 36.40636 | 79 | 0.635543 |
54adafbe1bcc7918e0b858de5b810dc2c1ee2d0b | 56 | py | Python | haystack/modeling/evaluation/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | 1 | 2022-03-06T02:13:15.000Z | 2022-03-06T02:13:15.000Z | haystack/modeling/evaluation/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | null | null | null | haystack/modeling/evaluation/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | 1 | 2022-03-23T18:17:02.000Z | 2022-03-23T18:17:02.000Z | from haystack.modeling.evaluation.eval import Evaluator
| 28 | 55 | 0.875 |
ecaaebfca9f5b032cc0bae3ebaf7362524992f49 | 3,276 | py | Python | examples/ngrokwebhook.py | UniversalSuperBox/ciscosparkapi | 86ddb6a31d6dd5550bba05919ab2bdf924e0a81a | [
"MIT"
] | 2 | 2016-09-30T08:35:05.000Z | 2016-09-30T13:52:49.000Z | examples/ngrokwebhook.py | fadante/ciscosparkapi | 86ddb6a31d6dd5550bba05919ab2bdf924e0a81a | [
"MIT"
] | 1 | 2021-06-01T21:52:12.000Z | 2021-06-01T21:52:12.000Z | ciscosparkapi/examples/ngrokwebhook.py | Futuramistic/Bot | e22672e9d627faf3d9393feb04d214cb62dec98d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Sample script to read local ngrok info and create a corresponding webhook.
Sample script that reads ngrok info from the local ngrok client api and creates
a Cisco Spark Webhook pointint to the ngrok tunnel's public HTTP URL.
Typically ngrok is called run with ... | 30.055046 | 80 | 0.677656 |
321d6c264d4289cc108340026665de3d2fed115e | 7,295 | py | Python | Code/3_wrongly_spelled_correctly_spelled_pair.py | kdpsingh/cornea-nlp | 8db0a2a4a9b4526d332efc096b94030b6158c9d1 | [
"MIT"
] | null | null | null | Code/3_wrongly_spelled_correctly_spelled_pair.py | kdpsingh/cornea-nlp | 8db0a2a4a9b4526d332efc096b94030b6158c9d1 | [
"MIT"
] | null | null | null | Code/3_wrongly_spelled_correctly_spelled_pair.py | kdpsingh/cornea-nlp | 8db0a2a4a9b4526d332efc096b94030b6158c9d1 | [
"MIT"
] | 1 | 2019-05-30T03:49:05.000Z | 2019-05-30T03:49:05.000Z | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
import numpy as np
import string
from io import StringIO
import time
from functools import reduce
import itertools
import operator
import pyspark
from pyspark.sql.types import *
from pyspark.sql import *
from pyspark import SparkConf, SparkContext
from pyspa... | 29.534413 | 280 | 0.715422 |
5d17c317b2eb800883ba2b9752d8090050015037 | 10,228 | py | Python | md_utils/align_on_col.py | cmayes/md_utils | c74cab20f46b0adb98bdc9d2a19b3d21ff9d7516 | [
"BSD-3-Clause"
] | 1 | 2020-07-01T01:05:35.000Z | 2020-07-01T01:05:35.000Z | md_utils/align_on_col.py | cmayes/md_utils | c74cab20f46b0adb98bdc9d2a19b3d21ff9d7516 | [
"BSD-3-Clause"
] | 1 | 2017-12-01T21:58:38.000Z | 2017-12-01T21:58:38.000Z | md_utils/align_on_col.py | cmayes/md_utils | c74cab20f46b0adb98bdc9d2a19b3d21ff9d7516 | [
"BSD-3-Clause"
] | 4 | 2017-02-26T19:17:08.000Z | 2020-04-07T09:43:22.000Z | #!/usr/bin/env python
"""
For combining data from multiple files based on a common timestep. All other data will be ignored or, if in logging
mode, printed to a log file.
"""
from __future__ import print_function
from collections import defaultdict
import argparse
import os
import six
import sys
from md_utils.md_comm... | 45.457778 | 120 | 0.582812 |
700e9f5df1f7c929fc43faf1d9967c0d2a7e8de7 | 12,621 | py | Python | umongo/frameworks/txmongo.py | voglster/umongo | 8434288c49762ab1bf6289c8499ad5c419647b05 | [
"MIT"
] | null | null | null | umongo/frameworks/txmongo.py | voglster/umongo | 8434288c49762ab1bf6289c8499ad5c419647b05 | [
"MIT"
] | null | null | null | umongo/frameworks/txmongo.py | voglster/umongo | 8434288c49762ab1bf6289c8499ad5c419647b05 | [
"MIT"
] | null | null | null | from twisted.internet.defer import (
inlineCallbacks, Deferred, DeferredList, returnValue, maybeDeferred)
from txmongo import filter as qf
from txmongo.database import Database
from pymongo.errors import DuplicateKeyError
import marshmallow as ma
from ..builder import BaseBuilder
from ..instance import Instance
fr... | 35.855114 | 94 | 0.621742 |
88bafff1e0a32fd7cbaef256c6f2c1b43243e73c | 1,212 | py | Python | 2015/day-17/solution.py | bertptrs/adventofcode | 09b590e9276cb9bdb17d47ad73d1df24fa0093dc | [
"MIT"
] | 11 | 2017-12-19T09:54:43.000Z | 2022-01-27T22:31:11.000Z | 2015/day-17/solution.py | bertptrs/adventofcode | 09b590e9276cb9bdb17d47ad73d1df24fa0093dc | [
"MIT"
] | null | null | null | 2015/day-17/solution.py | bertptrs/adventofcode | 09b590e9276cb9bdb17d47ad73d1df24fa0093dc | [
"MIT"
] | 1 | 2020-12-02T09:23:46.000Z | 2020-12-02T09:23:46.000Z | from __future__ import print_function, division
import fileinput
from collections import defaultdict
import bisect
def value(buckets, choice):
total = 0
for value in buckets:
if choice % 2 == 1:
total += value
choice //= 2
return total
def ones(x):
n = 0
while x > 0:
... | 19.238095 | 77 | 0.626238 |
0ef16605213908aae3b64d6fef5fc82ba0dd7d70 | 261 | py | Python | docs/CS161/Star.py | DavidJLu/CCUT | 755cdeaa36f4eac817d09efe29550843fa5a4fdc | [
"MIT"
] | 5 | 2018-06-04T16:11:56.000Z | 2021-02-25T21:59:58.000Z | docs/CS161/Star.py | DavidJLu/CCUT | 755cdeaa36f4eac817d09efe29550843fa5a4fdc | [
"MIT"
] | null | null | null | docs/CS161/Star.py | DavidJLu/CCUT | 755cdeaa36f4eac817d09efe29550843fa5a4fdc | [
"MIT"
] | 1 | 2019-02-21T21:22:55.000Z | 2019-02-21T21:22:55.000Z | #Star.py
#David Lu
import turtle
t = turtle.Turtle()
turtle.bgcolor('white')
t.color('green')
t.width(5)
for i in range(50):
t.forward(150)
t.right(144) # What kind of shape is drawn if we turn right 144 degrees?
turtle.exitonclick()
| 17.4 | 78 | 0.64751 |
603827f16ea000708af6b33ab0dddb552c3131cb | 7,238 | py | Python | api_connector.py | DevopediaOrg/wikipedia-reader | c90eb5431b36449afe493df650284fc18a526616 | [
"MIT"
] | null | null | null | api_connector.py | DevopediaOrg/wikipedia-reader | c90eb5431b36449afe493df650284fc18a526616 | [
"MIT"
] | 1 | 2021-03-31T19:48:39.000Z | 2021-03-31T19:48:39.000Z | api_connector.py | DevopediaOrg/wikipedia-reader | c90eb5431b36449afe493df650284fc18a526616 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import json
import re
import sys
import mwclient
class ApiConnector:
''' Call an API to request an article.
'''
def __init__(self, **kwargs):
self.config = kwargs
if 'endpoint' not in self.config or not self.config['endpoint']:
sys.exit... | 39.551913 | 111 | 0.520171 |
f3e59bd1574f8eb9faa01ee678f803ddd8ac381f | 1,717 | py | Python | kokki/cookbooks/mysql/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | 11 | 2015-01-14T00:43:26.000Z | 2020-12-29T06:12:51.000Z | kokki/cookbooks/mysql/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | null | null | null | kokki/cookbooks/mysql/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | 3 | 2015-01-14T01:05:56.000Z | 2019-01-26T05:09:37.000Z |
__config__ = {
"mysql.server_root_password": dict(
default = "changeme",
),
"mysql.server_repl_password": dict(
default = None,
),
"mysql.server_debian_password": dict(
default = "changeme",
),
"mysql.grants": dict(
default = [
# dict(user, host, ... | 24.884058 | 77 | 0.550961 |
1fac4d16b543da618295ee419de36d9e53d115ba | 1,779 | py | Python | Examples/Basic/eNames.py | iconservo/labjack-ljm | f22a47a80c628dcb133b74e6317e1e5617709b19 | [
"MIT"
] | null | null | null | Examples/Basic/eNames.py | iconservo/labjack-ljm | f22a47a80c628dcb133b74e6317e1e5617709b19 | [
"MIT"
] | null | null | null | Examples/Basic/eNames.py | iconservo/labjack-ljm | f22a47a80c628dcb133b74e6317e1e5617709b19 | [
"MIT"
] | 1 | 2019-04-11T06:46:14.000Z | 2019-04-11T06:46:14.000Z | """
Demonstrates how to use the labjack.ljm.eNames (LJM_eNames) function.
"""
from labjack import ljm
# Open first found LabJack
handle = ljm.openS("ANY", "ANY", "ANY") # Any device, Any connection, Any identifier
#handle = ljm.openS("T7", "ANY", "ANY") # T7 device, Any connection, Any identifier
#handle... | 34.882353 | 114 | 0.661608 |
0bdcf274c0874db6db3c6773d205c3f1659f74c8 | 4,041 | py | Python | homeassistant/components/alarm_control_panel/concord232.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/alarm_control_panel/concord232.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/alarm_control_panel/concord232.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Support for Concord232 alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.concord232/
"""
import datetime
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_pa... | 30.383459 | 77 | 0.657511 |
df3eec66d080f455241dcee22f5366f6e569a9b8 | 18,477 | py | Python | tests/integration/cli_test.py | btaitelb/compose | 43369cda9ce5f0fe4860c7160cfa6550d31e2417 | [
"Apache-2.0"
] | null | null | null | tests/integration/cli_test.py | btaitelb/compose | 43369cda9ce5f0fe4860c7160cfa6550d31e2417 | [
"Apache-2.0"
] | 1 | 2021-03-26T00:41:22.000Z | 2021-03-26T00:41:22.000Z | tests/integration/cli_test.py | btaitelb/compose | 43369cda9ce5f0fe4860c7160cfa6550d31e2417 | [
"Apache-2.0"
] | 1 | 2020-04-13T17:43:26.000Z | 2020-04-13T17:43:26.000Z | from __future__ import absolute_import
import sys
import os
from six import StringIO
from mock import patch
from .testcases import DockerClientTestCase
from compose.cli.main import TopLevelCommand
class CLITestCase(DockerClientTestCase):
def setUp(self):
super(CLITestCase, self).setUp()
self.old... | 40.431072 | 89 | 0.642853 |
4c1f6dee7985283c9f33e58bdad5f5da63dda60c | 111 | py | Python | tools/Polygraphy/polygraphy/backend/base/__init__.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | 4 | 2021-04-16T13:49:38.000Z | 2022-01-16T08:58:07.000Z | tools/Polygraphy/polygraphy/backend/base/__init__.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | null | null | null | tools/Polygraphy/polygraphy/backend/base/__init__.py | martellz/TensorRT | f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4 | [
"Apache-2.0"
] | 2 | 2021-02-04T14:46:10.000Z | 2021-02-04T14:56:08.000Z | from polygraphy.backend.base.loader import BaseLoadModel
from polygraphy.backend.base.runner import BaseRunner
| 37 | 56 | 0.873874 |
eb093ca0353c2f7c2aa942dfbc51dbfc8746228c | 215 | py | Python | PyATS/ex5_vlans/job1.py | dmmar/netascode | 1d15e717b600d38bd33a65fa110e1c129d72e5df | [
"MIT"
] | 36 | 2019-07-17T17:00:32.000Z | 2022-03-26T09:34:40.000Z | PyATS/ex5_vlans/job1.py | dmmar/netascode | 1d15e717b600d38bd33a65fa110e1c129d72e5df | [
"MIT"
] | 4 | 2021-03-31T19:16:53.000Z | 2021-12-13T20:01:57.000Z | PyATS/ex5_vlans/job1.py | dmmar/netascode | 1d15e717b600d38bd33a65fa110e1c129d72e5df | [
"MIT"
] | 10 | 2019-07-31T07:58:03.000Z | 2021-10-13T04:45:45.000Z | # Example: job1.py
# -------------------
#
# a simple job file for the script above
from pyats.easypy import run
def main():
# run api launches a testscript as an individual task.
run('vlans_check.py')
| 17.916667 | 58 | 0.623256 |
b32b9395a0d1e5ddcfefcf27115d6895dd742dde | 2,120 | py | Python | do.py | JackLuSun/Financial-services-calculation | 92ba3c6fd7ced7df1e80b34083eef7f7d95a0a6d | [
"MIT"
] | null | null | null | do.py | JackLuSun/Financial-services-calculation | 92ba3c6fd7ced7df1e80b34083eef7f7d95a0a6d | [
"MIT"
] | null | null | null | do.py | JackLuSun/Financial-services-calculation | 92ba3c6fd7ced7df1e80b34083eef7f7d95a0a6d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 2 23:50:01 2019
@author: jackl
GOAL: 开发一个简陋的python在线运行网站,借助 python 后端框架flask 快速实现后端的简要开发
"""
from flask import Flask, request
import graphviz
import subprocess
app = Flask(__name__)
@app.route('/',methods=['GET'])# tell flask realation between URL and function who deal... | 30.285714 | 101 | 0.574057 |
855d2767d9e57c56c6c31757e857f9c334aa5e40 | 3,421 | py | Python | openslides/utils/projector.py | rolandgeider/OpenSlides | 331141c17cb23da26e377d4285efdb4a50753a59 | [
"MIT"
] | null | null | null | openslides/utils/projector.py | rolandgeider/OpenSlides | 331141c17cb23da26e377d4285efdb4a50753a59 | [
"MIT"
] | null | null | null | openslides/utils/projector.py | rolandgeider/OpenSlides | 331141c17cb23da26e377d4285efdb4a50753a59 | [
"MIT"
] | null | null | null | from django.dispatch import Signal
from .dispatch import SignalConnectMetaClass
class ProjectorElement(object, metaclass=SignalConnectMetaClass):
"""
Base class for an element on the projector.
Every app which wants to add projector elements has to create classes
subclassing from this base class wit... | 32.894231 | 92 | 0.635779 |
9ecf35fbe2b3c3e16fd6b1a23057f74f226a15b2 | 2,713 | py | Python | tests/test_user_groups.py | drewclauson/axis | be4be74a0242e499cd10a8a9b96c9ec76fa04f88 | [
"MIT"
] | 16 | 2018-05-29T20:07:04.000Z | 2022-01-27T14:15:16.000Z | tests/test_user_groups.py | Kane610/axis | 240c42f7cbad2358f0463d5234a82678532f9549 | [
"MIT"
] | 27 | 2017-11-05T12:14:17.000Z | 2022-02-07T08:07:48.000Z | tests/test_user_groups.py | drewclauson/axis | be4be74a0242e499cd10a8a9b96c9ec76fa04f88 | [
"MIT"
] | 6 | 2019-10-03T07:59:49.000Z | 2021-07-18T16:57:28.000Z | """Test Axis user groups API.
pytest --cov-report term-missing --cov=axis.user_groups tests/test_user_groups.py
"""
import pytest
import respx
from axis.user_groups import URL, UserGroups
from .conftest import HOST
@pytest.fixture
def user_groups(axis_device) -> UserGroups:
"""Returns the user_groups mock ob... | 25.838095 | 81 | 0.7007 |
eb5923aaf391d0a6b666a746de79e2411d43d7ad | 56,426 | py | Python | src/irclib.py | ProgVal/Limnoria-test | 05179cec2f2548f1d48a8e9049e88634f7a68fbd | [
"BSD-3-Clause"
] | null | null | null | src/irclib.py | ProgVal/Limnoria-test | 05179cec2f2548f1d48a8e9049e88634f7a68fbd | [
"BSD-3-Clause"
] | null | null | null | src/irclib.py | ProgVal/Limnoria-test | 05179cec2f2548f1d48a8e9049e88634f7a68fbd | [
"BSD-3-Clause"
] | null | null | null | ###
# Copyright (c) 2002-2005 Jeremiah Fincher
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of con... | 38.595075 | 89 | 0.569791 |
e28f5752220298bd5700ddb11e2e0387bfcef44f | 1,055 | py | Python | neutron_fwaas/_i18n.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | 1 | 2019-03-18T08:55:55.000Z | 2019-03-18T08:55:55.000Z | neutron_fwaas/_i18n.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/_i18n.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.969697 | 78 | 0.758294 |
20a3a4a6159570926de6c0b986c4973c77ca93f9 | 28,800 | py | Python | tests/test_client.py | miniflux/python-client | 5eef3e5d86b94c19b3fb52b1ec1190cf6f12c719 | [
"MIT"
] | 25 | 2019-08-15T19:08:57.000Z | 2022-03-17T13:21:07.000Z | tests/test_client.py | miniflux/python-client | 5eef3e5d86b94c19b3fb52b1ec1190cf6f12c719 | [
"MIT"
] | null | null | null | tests/test_client.py | miniflux/python-client | 5eef3e5d86b94c19b3fb52b1ec1190cf6f12c719 | [
"MIT"
] | 2 | 2020-07-15T00:06:26.000Z | 2021-11-11T13:29:14.000Z | # The MIT License (MIT)
#
# Copyright (c) 2018-2020 Frederic Guillot
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, c... | 38.657718 | 111 | 0.556597 |
949d5b3625477a080ea7c34ee2d46c24c2910746 | 147 | py | Python | examples/asn_lookup.py | ipfinder/ip-finder-python | 48ba093801d244c12a4583c138d62c94355baf28 | [
"Apache-2.0"
] | 8 | 2019-07-12T22:20:49.000Z | 2022-03-01T09:03:58.000Z | examples/asn_lookup.py | ipfinder/ip-finder-python | 48ba093801d244c12a4583c138d62c94355baf28 | [
"Apache-2.0"
] | 2 | 2019-08-29T23:24:57.000Z | 2021-02-01T15:15:16.000Z | examples/asn_lookup.py | ipfinder/ip-finder-python | 48ba093801d244c12a4583c138d62c94355baf28 | [
"Apache-2.0"
] | 5 | 2019-07-12T23:01:03.000Z | 2021-07-07T11:11:44.000Z | import ipfinder
con = ipfinder.config('f67f788f8a02a188ec84502e0dff066ed4413a85') # YOUR_TOKEN_GOES_HERE
asn = con.getAsn('as1')
print(asn.all)
| 18.375 | 88 | 0.795918 |
1e4b3540f29d86b723c6ed70db2f21a7e003c1cc | 1,067 | py | Python | temp.py | khanmbjob/python | 8f45db9f0b1e44c12a5ce308b87217d50b57578d | [
"BSD-2-Clause"
] | null | null | null | temp.py | khanmbjob/python | 8f45db9f0b1e44c12a5ce308b87217d50b57578d | [
"BSD-2-Clause"
] | null | null | null | temp.py | khanmbjob/python | 8f45db9f0b1e44c12a5ce308b87217d50b57578d | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import math
print("Hello World")
var1 = [1, 2, 3, 4]
var2 = True
# Create lists first and second
first = [11.25, 18.0, 20.0,9.50,9.50]
second = [10.75, 9.50]
# Paste together first and second: full
full = first +... | 17.783333 | 53 | 0.639175 |
cc12bac78eeeed068333b537ca5cd06dd194cb3a | 3,194 | py | Python | Tests/testCogs.py | Inkapa/discord-quiz-bot | c7e459b62f15bce649d0828c8b5d1e0a17610cc1 | [
"MIT"
] | null | null | null | Tests/testCogs.py | Inkapa/discord-quiz-bot | c7e459b62f15bce649d0828c8b5d1e0a17610cc1 | [
"MIT"
] | null | null | null | Tests/testCogs.py | Inkapa/discord-quiz-bot | c7e459b62f15bce649d0828c8b5d1e0a17610cc1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Jun 5 11:59:04 2021
@author: Liam
"""
from discord.ext import commands
import aiosqlite
import sqlite3
from database import Utilisateur, Quiz
class TestUtilisateur(commands.Cog):
def __init__(self, client, sourceDb):
self.client = client
self.source = so... | 33.621053 | 100 | 0.584847 |
c7ce5d3a2c86f696b67e93fc681015640a5d6b59 | 2,105 | py | Python | docs/build/docutils/test/test_io.py | mjtamlyn/django-braces | 8adc9bc4f5139e3d032d4e38657bf86413388b78 | [
"BSD-3-Clause"
] | 1 | 2015-03-22T16:49:07.000Z | 2015-03-22T16:49:07.000Z | docs/build/docutils/test/test_io.py | mjtamlyn/django-braces | 8adc9bc4f5139e3d032d4e38657bf86413388b78 | [
"BSD-3-Clause"
] | null | null | null | docs/build/docutils/test/test_io.py | mjtamlyn/django-braces | 8adc9bc4f5139e3d032d4e38657bf86413388b78 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# $Id: test_io.py 7037 2011-05-19 08:56:27Z milde $
# Author: Lea Wiemann <LeWiemann@gmail.com>
# Copyright: This module has been placed in the public domain.
"""
Test module for io.py.
"""
import unittest, sys
import DocutilsTestSupport # must be imported before docutils
from doc... | 30.955882 | 77 | 0.633729 |
2e4fffcd486575a2b329c7c6afd78aef330f2295 | 29,550 | py | Python | mindspore/ops/operations/other_ops.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | mindspore/ops/operations/other_ops.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/other_ops.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 36.9375 | 118 | 0.607885 |
0533fa5e6db86490f97a871cdb346354e18376ef | 99 | py | Python | check_se/HDF5_test/copy_H5groups.py | NuGrid/SE-library | fdbeaa10aca93c3183eda9d7a1b7be6028e24f7e | [
"BSD-3-Clause"
] | 1 | 2020-05-01T04:19:05.000Z | 2020-05-01T04:19:05.000Z | check_se/HDF5_test/copy_H5groups.py | NuGrid/SE-library | fdbeaa10aca93c3183eda9d7a1b7be6028e24f7e | [
"BSD-3-Clause"
] | 2 | 2017-11-22T18:56:26.000Z | 2017-11-22T19:08:31.000Z | check_se/HDF5_test/copy_H5groups.py | NuGrid/SE-library | fdbeaa10aca93c3183eda9d7a1b7be6028e24f7e | [
"BSD-3-Clause"
] | null | null | null | import h5py
f = h5py.File('M3.00Z0.020.0079001.se.h5')
f.copy('cycle0000079999','cycle0000080000')
| 24.75 | 43 | 0.747475 |
b0625f8b4d4a383791130b994b0a80ebfcbd2fc0 | 21,087 | py | Python | sdk/python/pulumi_alicloud/eipanycast/anycast_eip_address.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 42 | 2019-03-18T06:34:37.000Z | 2022-03-24T07:08:57.000Z | sdk/python/pulumi_alicloud/eipanycast/anycast_eip_address.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 152 | 2019-04-15T21:03:44.000Z | 2022-03-29T18:00:57.000Z | sdk/python/pulumi_alicloud/eipanycast/anycast_eip_address.py | pulumi/pulumi-alicloud | 9c34d84b4588a7c885c6bec1f03b5016e5a41683 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2020-08-26T17:30:07.000Z | 2021-07-05T01:37:45.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 46.041485 | 202 | 0.668706 |
523412ab9a8fc66f5f353881c3de3c84ba2486b5 | 901 | py | Python | lego/settings/rest_framework.py | HoboKristian/lego | 2729dcef770ad1105f53e087c07ece3f9e9dbc67 | [
"MIT"
] | null | null | null | lego/settings/rest_framework.py | HoboKristian/lego | 2729dcef770ad1105f53e087c07ece3f9e9dbc67 | [
"MIT"
] | 2 | 2021-02-02T23:09:32.000Z | 2021-06-10T23:43:39.000Z | lego/settings/rest_framework.py | HoboKristian/lego | 2729dcef770ad1105f53e087c07ece3f9e9dbc67 | [
"MIT"
] | null | null | null | REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
"lego.apps.oauth.authentication.Authentication",
"rest_framework.authentication.SessionAuthentication",
"lego.apps.jwt.authentication.Authentication",
],
"DEFAULT_RENDERER_CLASSES": ["lego.utils.renderers.JSONRenderer"],
"DEF... | 39.173913 | 73 | 0.722531 |
9d013f5963723fe4e5bd547e456a880495fee69f | 1,489 | py | Python | keys_ps.py | Dikzamen/isaac_multiplayer | 17e32e26a205c2ec9692fa09be3afbf1bfcb74df | [
"MIT"
] | null | null | null | keys_ps.py | Dikzamen/isaac_multiplayer | 17e32e26a205c2ec9692fa09be3afbf1bfcb74df | [
"MIT"
] | null | null | null | keys_ps.py | Dikzamen/isaac_multiplayer | 17e32e26a205c2ec9692fa09be3afbf1bfcb74df | [
"MIT"
] | null | null | null | import vgamepad as vg
bt = vg.DS4_BUTTONS
special_bt = vg.DS4_SPECIAL_BUTTONS
keys_dict = {'Key.esc': bt.DS4_BUTTON_SHARE, # Join game
'Key.up': bt.DS4_BUTTON_TRIANGLE, # Shoot up
'Key.down': bt.DS4_BUTTON_CROSS, # Shoot down
'Key.left': bt.DS4_BUTTON_SQUARE, # Shoot left
... | 30.387755 | 68 | 0.571525 |
629c5648013cac0153717750244a4413ec638dc9 | 1,736 | py | Python | first_look_at_the_data_structure.py | stephenmm/wot_vehicle_explorer | de581ca8fa6d2edbf80efaea56258cc8d8a986a8 | [
"MIT"
] | 1 | 2017-01-30T14:59:25.000Z | 2017-01-30T14:59:25.000Z | first_look_at_the_data_structure.py | stephenmm/wot_vehicle_explorer | de581ca8fa6d2edbf80efaea56258cc8d8a986a8 | [
"MIT"
] | null | null | null | first_look_at_the_data_structure.py | stephenmm/wot_vehicle_explorer | de581ca8fa6d2edbf80efaea56258cc8d8a986a8 | [
"MIT"
] | null | null | null | #!/tools/common/linux/python/3.5.0/bin/python3
# originially run with python 2.6.6
# Using the API from https://developers.wargaming.net/reference/
# Acquired the original data set like this:
# curl 'https://api.worldoftanks.com/wot/encyclopedia/vehicles/?application_id=demo' | python -m json.tool > wot_api_vehicles.... | 45.684211 | 182 | 0.738479 |
8f468cf4e464e56fbc081b39c9457e0d8ece03cd | 1,861 | py | Python | end_to_end_tests/golden-record/my_test_api_client/models/__init__.py | christhekeele/openapi-python-client | b7193165815419b9a0b4f05032a2a091bfc5ebfe | [
"MIT"
] | null | null | null | end_to_end_tests/golden-record/my_test_api_client/models/__init__.py | christhekeele/openapi-python-client | b7193165815419b9a0b4f05032a2a091bfc5ebfe | [
"MIT"
] | 19 | 2021-05-10T10:33:46.000Z | 2022-02-14T03:14:59.000Z | end_to_end_tests/golden-record/my_test_api_client/models/__init__.py | christhekeele/openapi-python-client | b7193165815419b9a0b4f05032a2a091bfc5ebfe | [
"MIT"
] | null | null | null | """ Contains all the data models used in inputs/outputs """
from .a_model import AModel
from .all_of_sub_model import AllOfSubModel
from .an_enum import AnEnum
from .an_int_enum import AnIntEnum
from .another_all_of_sub_model import AnotherAllOfSubModel
from .body_upload_file_tests_upload_post import BodyUploadFileTes... | 60.032258 | 119 | 0.915637 |
7920fb038e6b7bdc4255b762c822d701baed5a5e | 24,455 | py | Python | pysnmp-with-texts/ENTERASYS-RADIUS-ACCT-CLIENT-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/ENTERASYS-RADIUS-ACCT-CLIENT-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/ENTERASYS-RADIUS-ACCT-CLIENT-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ENTERASYS-RADIUS-ACCT-CLIENT-EXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-RADIUS-ACCT-CLIENT-EXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:04:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# U... | 226.435185 | 2,097 | 0.819832 |
e5f7b1b8b277e98e6e63a0747f18ce032b133346 | 15,370 | py | Python | beet/harvester/harvester_api.py | beetseeds/beet-blockchain-1 | e5d93f1f9041c48dd0c38416d845c8675bf22738 | [
"Apache-2.0"
] | 7 | 2021-08-29T15:12:25.000Z | 2022-02-09T04:28:38.000Z | beet/harvester/harvester_api.py | beetseeds/beet-blockchain-1 | e5d93f1f9041c48dd0c38416d845c8675bf22738 | [
"Apache-2.0"
] | null | null | null | beet/harvester/harvester_api.py | beetseeds/beet-blockchain-1 | e5d93f1f9041c48dd0c38416d845c8675bf22738 | [
"Apache-2.0"
] | 3 | 2021-09-04T10:32:00.000Z | 2022-03-15T08:44:25.000Z | import asyncio
import time
from pathlib import Path
from typing import Callable, List, Tuple
from blspy import AugSchemeMPL, G2Element, G1Element
from beet.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters
from beet.harvester.harvester import Harvester
from beet.plotting.plot_t... | 49.105431 | 117 | 0.590046 |
a4be31e0900da710467865b5b3ef869c46f96125 | 1,063 | py | Python | JumpscaleLib/clients/itsyouonline/generated/client/AddIncludeSubOrgsOfReqBody.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | null | null | null | JumpscaleLib/clients/itsyouonline/generated/client/AddIncludeSubOrgsOfReqBody.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | 220 | 2018-07-29T08:37:17.000Z | 2019-08-05T15:01:27.000Z | JumpscaleLib/clients/itsyouonline/generated/client/AddIncludeSubOrgsOfReqBody.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | 1 | 2018-08-20T09:16:08.000Z | 2018-08-20T09:16:08.000Z | """
Auto-generated class for AddIncludeSubOrgsOfReqBody
"""
from six import string_types
from jumpscale import j
from . import client_support
class AddIncludeSubOrgsOfReqBody():
"""
auto-generated. don't touch.
"""
@staticmethod
def create(**kwargs):
"""
:type globalid: str
... | 24.72093 | 117 | 0.650047 |
87581d07e4a5f55bb5cd744d1c0307c91f81198d | 530 | py | Python | docs/examples/expose_multiple_functions_as_commands/main.py | attilammagyar/argparse_action | f4dcaaa503560cea205b4baecd4c9a861cd7249e | [
"Apache-2.0"
] | 4 | 2021-03-01T12:05:45.000Z | 2022-01-22T10:03:29.000Z | docs/examples/expose_multiple_functions_as_commands/main.py | attilammagyar/argparse_action | f4dcaaa503560cea205b4baecd4c9a861cd7249e | [
"Apache-2.0"
] | 10 | 2020-12-20T14:58:29.000Z | 2022-01-23T20:09:29.000Z | docs/examples/expose_multiple_functions_as_commands/main.py | attilammagyar/argparse_action | f4dcaaa503560cea205b4baecd4c9a861cd7249e | [
"Apache-2.0"
] | 1 | 2022-01-21T22:18:05.000Z | 2022-01-21T22:18:05.000Z | "Expose multiple functions as commands"
import sys
import argparse
import argparse_action
def main():
namespace = parser.parse_args()
namespace.action(namespace)
parser = argparse.ArgumentParser(description=__doc__)
action = argparse_action.Action(parser)
@action.add()
def echo(parameter):
"echo the cli ... | 19.62963 | 53 | 0.715094 |
ba6e4377364366c5d29fc1b86775893cf9ca1bc4 | 5,640 | py | Python | opentamp/src/core/util_classes/hsr_prob_gen.py | Algorithmic-Alignment-Lab/openTAMP-legacy | 3b7c3be164cc968ad77a928286d6460cd70a670e | [
"MIT"
] | 2 | 2022-03-09T19:48:20.000Z | 2022-03-26T17:31:07.000Z | opentamp/src/core/util_classes/hsr_prob_gen.py | Algorithmic-Alignment-Lab/OpenTAMP | eecb950bd273da8cbed4394487630e8453f2c242 | [
"MIT"
] | null | null | null | opentamp/src/core/util_classes/hsr_prob_gen.py | Algorithmic-Alignment-Lab/OpenTAMP | eecb950bd273da8cbed4394487630e8453f2c242 | [
"MIT"
] | null | null | null | from IPython import embed as shell
import itertools
import numpy as np
import random
import core.util_classes.hsr_constants as const
# SEED = 1234
NUM_PROBS = 1
NUM_OBJS = 1
NUM_SYMBOLS = NUM_OBJS
# filename = "hsr_probs/hsr.prob"
GOAL = "(HSRRobotAt hsr robot_end_pose)"
HSR_INIT_POSE = [0, 0, 0]
HSR_INIT_ARM = [0,... | 37.350993 | 171 | 0.589184 |
ab0d66b457cbe33a8ad8d40d96a6c03fbdd9f1ae | 469 | py | Python | tutorials/python/essential-libraries/requests/2-handle-reqs.py | Fe-Nick-S/experiments | 9be65b9c97243aac6e50b95e5059667c423a47d8 | [
"MIT"
] | 2 | 2018-10-06T08:29:05.000Z | 2018-10-06T08:29:08.000Z | tutorials/python/essential-libraries/requests/2-handle-reqs.py | Fe-Nick-S/experiments | 9be65b9c97243aac6e50b95e5059667c423a47d8 | [
"MIT"
] | 2 | 2020-01-28T23:02:15.000Z | 2020-07-07T20:22:02.000Z | tutorials/python/essential-libraries/requests/2-handle-reqs.py | Fe-Nick-S/experiments | 9be65b9c97243aac6e50b95e5059667c423a47d8 | [
"MIT"
] | null | null | null |
import requests
# handle with status codes
resp = requests.get("https://httpbin.org/status/200")
print(resp.status_code)
resp = requests.get("https://httpbin.org/status/404")
print(resp.status_code)
#resp.raise_for_status()
# examine response encoding
resp = requests.get("https://httpbin.org/html")
print(resp.encod... | 21.318182 | 53 | 0.752665 |
65ce1cc22835116484e9e8d1fd3dab4f48c48f62 | 558 | py | Python | client.py | rvitorgomes/rpc18 | 10f2276fee2dd95e8cae4dc145bafd8fd520877c | [
"MIT"
] | null | null | null | client.py | rvitorgomes/rpc18 | 10f2276fee2dd95e8cae4dc145bafd8fd520877c | [
"MIT"
] | null | null | null | client.py | rvitorgomes/rpc18 | 10f2276fee2dd95e8cae4dc145bafd8fd520877c | [
"MIT"
] | null | null | null | import grpc
import time
# import the generated classes
import calculator_pb2
import calculator_pb2_grpc
# open a gRPC channel
channel = grpc.insecure_channel('localhost:50051')
# create a stub (client)
stub = calculator_pb2_grpc.CalculatorStub(channel)
# create a valid request message
number = calculator_pb2.Number... | 22.32 | 52 | 0.767025 |
896894868645dc633762b3c4ca9c6a092b96ce2c | 5,345 | py | Python | unicorn-hat/h5yr.py | CarlSargunar/FTC2021---Umbraco-Docker-Pi | 695e2cf9cb6b7ca7cf4e510313e5c931120af95a | [
"MIT"
] | null | null | null | unicorn-hat/h5yr.py | CarlSargunar/FTC2021---Umbraco-Docker-Pi | 695e2cf9cb6b7ca7cf4e510313e5c931120af95a | [
"MIT"
] | null | null | null | unicorn-hat/h5yr.py | CarlSargunar/FTC2021---Umbraco-Docker-Pi | 695e2cf9cb6b7ca7cf4e510313e5c931120af95a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pika, sys, os
import unicornhathd
import colorsys
import time
from sys import exit
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError:
exit('This script requires the pillow module\nInstall with: sudo pip install pillow')
def showText(text):
# ========== Ch... | 39.592593 | 117 | 0.62638 |
7f911b33404643ef23fa5f87a9b0afd47531d1bc | 597 | py | Python | src/pyphotonics/examples/autorouting2.py | rohanku/optics_lib | 54308416209bb797470d6a60eed7a39162598af5 | [
"BSD-3-Clause"
] | null | null | null | src/pyphotonics/examples/autorouting2.py | rohanku/optics_lib | 54308416209bb797470d6a60eed7a39162598af5 | [
"BSD-3-Clause"
] | null | null | null | src/pyphotonics/examples/autorouting2.py | rohanku/optics_lib | 54308416209bb797470d6a60eed7a39162598af5 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from pyphotonics.layout.routing import (
user_route,
write_paths_to_gds,
Port,
WaveguideGeometry,
)
from pyphotonics.config import PATH
inputs = [Port(-11545.453, 2182.5 - 127 * i, 0) for i in range(3)]
outputs = [Port(-9435.453, 2055.5, np.pi), Port(-10695.453, 2055.5, 0)] + [
P... | 24.875 | 75 | 0.671692 |
57e1f840cbee2df9deaaeb1789230f830495a4d3 | 975 | py | Python | PyHive/TOPMed/MarkDuplicates.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 3 | 2018-04-20T15:04:34.000Z | 2022-03-30T06:36:02.000Z | PyHive/TOPMed/MarkDuplicates.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 7 | 2019-06-06T09:22:20.000Z | 2021-11-23T17:41:52.000Z | PyHive/TOPMed/MarkDuplicates.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 5 | 2017-11-02T11:17:35.000Z | 2021-12-11T19:34:09.000Z | """
Created on 21 March 2019
@author: galdam
"""
from typing import Dict
from Utils.RunSingularity import Singularity
class MarkDuplicates(Singularity):
"""
Runs the Mark Duplicates task in the broadinstitute/gtex_rnaseq singularity image.
"""
PIPELINE = 'markdups'
CMD_ARGS = ['bam_file', 'memory... | 26.351351 | 106 | 0.64 |
5a73e08db63567e6676347de2cbcd532fc93164c | 27,289 | py | Python | src/panoptes/pocs/observatory.py | JAAlvarado-Montes/POCS | f475e1a75069bde9f72a631a99f432705d46b67b | [
"MIT"
] | null | null | null | src/panoptes/pocs/observatory.py | JAAlvarado-Montes/POCS | f475e1a75069bde9f72a631a99f432705d46b67b | [
"MIT"
] | null | null | null | src/panoptes/pocs/observatory.py | JAAlvarado-Montes/POCS | f475e1a75069bde9f72a631a99f432705d46b67b | [
"MIT"
] | null | null | null | import os
import subprocess
from collections import OrderedDict
from datetime import datetime
from astropy import units as u
from astropy.coordinates import get_moon
from astropy.coordinates import get_sun
from panoptes.pocs.base import PanBase
from panoptes.pocs.camera import AbstractCamera
from panoptes.pocs.dome i... | 38.489422 | 115 | 0.589835 |
9762874865c463e8b14fad474b7764e771e56200 | 24,015 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/isisspbsimrouter_4d8d2b3596c2f006afcd75a76b6934ff.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/isisspbsimrouter_4d8d2b3596c2f006afcd75a76b6934ff.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/isisspbsimrouter_4d8d2b3596c2f006afcd75a76b6934ff.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 46.904297 | 318 | 0.651968 |
daf1724ec3c56fe12e919c981a3459334cbebce4 | 1,568 | py | Python | LABORATORIO 7/ejercicio 8 lab 7.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | LABORATORIO 7/ejercicio 8 lab 7.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | LABORATORIO 7/ejercicio 8 lab 7.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | import random
class carta:
def __init__ (self, palo,valor):
self.palo=palo
self.valor=valor
def __repr__ (self):
return "Carta: "+str(self.valor)+ " de " + self.palo
#definimos la carta
#FALTA HACER QUE ELIMINE LAS CARTAS QUE VAN SALIENDO DEL MAZO
def def_mazo(): #genera un maz... | 20.102564 | 72 | 0.610332 |
3a9ca24e00eca92e48fd9d9d6c34e8e57760ad99 | 3,988 | py | Python | env/Lib/site-packages/mcdm/scoring/mtopsis.py | IzzatHalabi/newpix_prototype | 5d617ef20df59af57c26ca0f7fc8521afd4203f7 | [
"MIT"
] | null | null | null | env/Lib/site-packages/mcdm/scoring/mtopsis.py | IzzatHalabi/newpix_prototype | 5d617ef20df59af57c26ca0f7fc8521afd4203f7 | [
"MIT"
] | 4 | 2020-07-28T17:43:16.000Z | 2022-02-27T09:40:50.000Z | env/Lib/site-packages/mcdm/scoring/mtopsis.py | IzzatHalabi/newpix_prototype | 5d617ef20df59af57c26ca0f7fc8521afd4203f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Dimitrios-Georgios Akestoridis
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merg... | 46.372093 | 77 | 0.660732 |
72864a966e4065c83e2afedd5bb2fded561104df | 4,395 | py | Python | thrift/test/py/UnionTests.py | dgrnbrg-meta/fbthrift | 1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed | [
"Apache-2.0"
] | null | null | null | thrift/test/py/UnionTests.py | dgrnbrg-meta/fbthrift | 1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed | [
"Apache-2.0"
] | null | null | null | thrift/test/py/UnionTests.py | dgrnbrg-meta/fbthrift | 1d5f0799ef53feeb83425b6c9c79f86aeac7d9ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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... | 31.847826 | 78 | 0.638453 |
87d7c5c8ba99e34e0399392ef8c1aca3b5d09146 | 9,909 | py | Python | BPt/default/options/models.py | sahahn/ABCD_ML | a8b1c48c33f3fdc046c8922964f1c456273238da | [
"MIT"
] | 1 | 2019-09-25T23:23:49.000Z | 2019-09-25T23:23:49.000Z | BPt/default/options/models.py | sahahn/ABCD_ML | a8b1c48c33f3fdc046c8922964f1c456273238da | [
"MIT"
] | 1 | 2020-04-20T20:53:27.000Z | 2020-04-20T20:53:27.000Z | BPt/default/options/models.py | sahahn/ABCD_ML | a8b1c48c33f3fdc046c8922964f1c456273238da | [
"MIT"
] | 1 | 2019-06-21T14:44:40.000Z | 2019-06-21T14:44:40.000Z | from ...extensions.mlp import MLPRegressor_Wrapper, MLPClassifier_Wrapper
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.naive_bayes import GaussianNB
from sklearn.gaussian_process import (GaussianProcessClassif... | 45.040909 | 81 | 0.497729 |
d2fab4618e57e94265d61357e0e27bb8dd71bad1 | 459 | py | Python | example_d/market/get_liquidation_orders.py | BestResources/Binance_Futures_python | 3d08810d4b1cdb7f88d25fdf41a4207bfb8b6f94 | [
"MIT"
] | 640 | 2020-01-16T05:00:13.000Z | 2022-03-30T08:40:26.000Z | example_d/market/get_liquidation_orders.py | BestResources/Binance_Futures_python | 3d08810d4b1cdb7f88d25fdf41a4207bfb8b6f94 | [
"MIT"
] | 140 | 2020-01-19T20:27:35.000Z | 2022-03-28T08:28:43.000Z | example_d/market/get_liquidation_orders.py | BestResources/Binance_Futures_python | 3d08810d4b1cdb7f88d25fdf41a4207bfb8b6f94 | [
"MIT"
] | 391 | 2020-01-15T07:12:26.000Z | 2022-03-31T14:24:19.000Z | from binance_d import RequestClient
from binance_d.constant.test import *
from binance_d.base.printobject import *
request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key)
# result = request_client.get_liquidation_orders()
result = request_client.get_liquidation_orders(symbol="btcusd_200925")... | 35.307692 | 75 | 0.701525 |
a84b4a5c71500fb98e8c27668be3a1674d9f89b7 | 1,428 | py | Python | src/python/grpcio_tests/tests_aio/unit/init_test.py | gluk-w/grpc | 9fac907f806c3a9b9b775b15d8e3cb387c4d7048 | [
"Apache-2.0"
] | 1 | 2021-09-04T19:49:25.000Z | 2021-09-04T19:49:25.000Z | src/python/grpcio_tests/tests_aio/unit/init_test.py | gluk-w/grpc | 9fac907f806c3a9b9b775b15d8e3cb387c4d7048 | [
"Apache-2.0"
] | null | null | null | src/python/grpcio_tests/tests_aio/unit/init_test.py | gluk-w/grpc | 9fac907f806c3a9b9b775b15d8e3cb387c4d7048 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The gRPC 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 wri... | 34.829268 | 74 | 0.734594 |
0365e6d6aba8e755fdbbf1f737a8a1a1e4f38092 | 1,539 | py | Python | Chapters/07.ShortestPathProblems/parcour_tools.py | ntienvu/SelectedTopicsOptimization | 069659ca9754cc7fd884b654a06157cc7da6f963 | [
"MIT"
] | 1 | 2021-01-01T13:01:38.000Z | 2021-01-01T13:01:38.000Z | Chapters/07.ShortestPathProblems/parcour_tools.py | ntienvu/SelectedTopicsOptimization | 069659ca9754cc7fd884b654a06157cc7da6f963 | [
"MIT"
] | null | null | null | Chapters/07.ShortestPathProblems/parcour_tools.py | ntienvu/SelectedTopicsOptimization | 069659ca9754cc7fd884b654a06157cc7da6f963 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed 6 Apr 2016
Last update on Thu 7 Apr 2016
@author: michielstock
Some routines to work with the parcours and mazes
for shortest path algorithms
"""
import numpy as np
from random import choice, randint
from shortestpaths import red
def links_to_graph(links):
"""
Chan... | 24.822581 | 61 | 0.554906 |
dcc39ebe01ee528abd60c4718d115ec197ae4830 | 1,549 | py | Python | test/testers/winforms/splitter_vertical/__init__.py | ABEMBARKA/monoUI | 5fda266ad2db8f89580a40b525973d86cd8de939 | [
"MIT"
] | 1 | 2019-08-13T15:22:12.000Z | 2019-08-13T15:22:12.000Z | test/testers/winforms/splitter_vertical/__init__.py | ABEMBARKA/monoUI | 5fda266ad2db8f89580a40b525973d86cd8de939 | [
"MIT"
] | null | null | null | test/testers/winforms/splitter_vertical/__init__.py | ABEMBARKA/monoUI | 5fda266ad2db8f89580a40b525973d86cd8de939 | [
"MIT"
] | 1 | 2019-08-13T15:22:17.000Z | 2019-08-13T15:22:17.000Z | ##############################################################################
# Written by: Brian G. Merrell <bgmerrell@novell.com>
# Date: 01/26/2009
# Application wrapper for splitter.py
# Used by the splitter-*.py tests
##############################################################... | 31.612245 | 132 | 0.601033 |
4930903f737a09c0bcae95d6fef31c981b2905db | 12,150 | py | Python | keystone/contrib/endpoint_filter/controllers.py | TampereTC/tre-smartcity-keystone | e2d0adc25165eef102c87d7991fb1a595680fda6 | [
"Apache-2.0"
] | null | null | null | keystone/contrib/endpoint_filter/controllers.py | TampereTC/tre-smartcity-keystone | e2d0adc25165eef102c87d7991fb1a595680fda6 | [
"Apache-2.0"
] | null | null | null | keystone/contrib/endpoint_filter/controllers.py | TampereTC/tre-smartcity-keystone | e2d0adc25165eef102c87d7991fb1a595680fda6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.343066 | 79 | 0.663621 |
0beaf59351d959dba0e445eaf87e7ecc7e0ddd4d | 479 | py | Python | python-for-beginners/06 - Dates/date_functions.py | vijayraavi/c9-python-getting-started | 345c81fb210601836d3618ff7bd491256ae62fa9 | [
"MIT"
] | 8,041 | 2019-09-17T17:25:51.000Z | 2022-03-31T11:38:07.000Z | python-for-beginners/06 - Dates/date_functions.py | magicsolmyr/c9-python-getting-started | a74d0ea8451a9709dcebbb29ae931a9cb82fc695 | [
"MIT"
] | 43 | 2019-09-20T15:47:26.000Z | 2022-01-23T20:33:28.000Z | python-for-beginners/06 - Dates/date_functions.py | magicsolmyr/c9-python-getting-started | a74d0ea8451a9709dcebbb29ae931a9cb82fc695 | [
"MIT"
] | 2,377 | 2019-09-17T18:16:53.000Z | 2022-03-30T15:38:07.000Z | #To get current date and time we need to use the datetime library
from datetime import datetime, timedelta
# The now function returns current date and time
today = datetime.now()
print('Today is: ' + str(today))
#You can use timedelta to add or remove days, or weeks to a date
one_day = timedelta(days=1)
yesterday = to... | 29.9375 | 65 | 0.741127 |
a96fbc40b29ee1cde0855c7fcb2fbe1e020858f7 | 5,632 | py | Python | tests/functional/dashboard/test_review.py | DGathagu/django-oscar | ccb14ce719359cfebe24e9383afcbd54a8ca6371 | [
"BSD-3-Clause"
] | 1 | 2020-09-23T10:40:22.000Z | 2020-09-23T10:40:22.000Z | tests/functional/dashboard/test_review.py | igithub2019/django-oscar | 2429ad9e88e9a432dfa60aaca703d99860f85389 | [
"BSD-3-Clause"
] | 9 | 2020-08-11T15:19:55.000Z | 2022-03-12T00:11:12.000Z | tests/functional/dashboard/test_review.py | igithub2019/django-oscar | 2429ad9e88e9a432dfa60aaca703d99860f85389 | [
"BSD-3-Clause"
] | null | null | null | from datetime import timedelta
from django.urls import reverse
from django.utils import timezone
from oscar.core.compat import get_user_model
from oscar.core.loading import get_model
from oscar.test.factories import ProductReviewFactory, UserFactory
from oscar.test.testcases import WebTestCase
ProductReview = get_mo... | 38.054054 | 76 | 0.643821 |
199e67012fc223fd222fb63cb605aa37bf38ed7a | 1,887 | py | Python | SunRSunS.py | PARVASHWANI/Weather-Sunrise-Sunset-Forcaster | 1b7954c72c94cd3e51fc990decbcd1ba557a0c85 | [
"MIT"
] | null | null | null | SunRSunS.py | PARVASHWANI/Weather-Sunrise-Sunset-Forcaster | 1b7954c72c94cd3e51fc990decbcd1ba557a0c85 | [
"MIT"
] | null | null | null | SunRSunS.py | PARVASHWANI/Weather-Sunrise-Sunset-Forcaster | 1b7954c72c94cd3e51fc990decbcd1ba557a0c85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[33]:
import requests, json
#OPEN WEATHER MAP API
api_keyW = "Enter Your Own API From"
base_urlW = "http://api.openweathermap.org/data/2.5/weather?units=metric&cnt=7&lang=en&"
city_name = input("Enter City Name: ")
complete_urlw = base_urlW+ "appid=" + api_keyW + "&q=" + cit... | 17.154545 | 88 | 0.63487 |
40fc7f28594c34e6d6432a51c5b9165268bd7b37 | 2,557 | py | Python | entry.py | pythonhacker/pyscanlogd | 64d6ad38127243e5c422be7f899ecfa802e1ad21 | [
"BSD-3-Clause"
] | 1 | 2021-04-03T22:15:06.000Z | 2021-04-03T22:15:06.000Z | entry.py | pythonhacker/pyscanlogd | 64d6ad38127243e5c422be7f899ecfa802e1ad21 | [
"BSD-3-Clause"
] | null | null | null | entry.py | pythonhacker/pyscanlogd | 64d6ad38127243e5c422be7f899ecfa802e1ad21 | [
"BSD-3-Clause"
] | 2 | 2020-12-18T20:06:21.000Z | 2021-04-08T02:47:40.000Z | # -- coding: utf-8
class ScanEntry(object):
""" Port scan entry """
def __init__(self, hash):
self.src = 0
self.dst = 0
self.zombie = 0
self.timestamp = 0
self.timediffs = []
# Average of time-stamps
self.time_avg = 0.0
# Standar... | 29.732558 | 81 | 0.541259 |
53b3b931c2ef5c69e9c3b0d698c46d504330cf25 | 1,411 | py | Python | ElexonDataPortal/rebuild.py | r4ch45/ElexonDataPortal | d44ed4da33278c0135ff95fb126a10d9384af22f | [
"MIT"
] | 22 | 2021-01-12T12:34:43.000Z | 2022-03-30T06:18:40.000Z | ElexonDataPortal/rebuild.py | r4ch45/ElexonDataPortal | d44ed4da33278c0135ff95fb126a10d9384af22f | [
"MIT"
] | 12 | 2021-02-26T16:17:58.000Z | 2022-03-29T19:32:29.000Z | ElexonDataPortal/rebuild.py | r4ch45/ElexonDataPortal | d44ed4da33278c0135ff95fb126a10d9384af22f | [
"MIT"
] | 6 | 2021-06-07T11:58:35.000Z | 2022-03-30T06:18:42.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/07-cli-rebuild.ipynb (unless otherwise specified).
__all__ = ['app', 'rebuild_library']
# Cell
import typer
import shutil
import pandas as pd
from fastcore.foundation import Config
from .dev import nbdev, specgen, rawgen, clientgen
# Cell
app = typer.Typer()
# Cell
@... | 26.12963 | 109 | 0.696669 |
4a4ae5f2fb5ae97276348505e4c71cb27e6c5f39 | 1,211 | py | Python | dist/vengeance-1.0.3.tar/dist/vengeance-1.0.3/vengeance/excel_com/excel_constants.py | michael-ross-ven/vengeance | 53c6eefba0573936d22a55ba5900744ac701f4b9 | [
"MIT"
] | 1 | 2020-01-18T18:23:26.000Z | 2020-01-18T18:23:26.000Z | dist/vengeance-1.0.3.tar/dist/vengeance-1.0.3/vengeance/excel_com/excel_constants.py | michael-ross-ven/vengeance | 53c6eefba0573936d22a55ba5900744ac701f4b9 | [
"MIT"
] | null | null | null | dist/vengeance-1.0.3.tar/dist/vengeance-1.0.3/vengeance/excel_com/excel_constants.py | michael-ross-ven/vengeance | 53c6eefba0573936d22a55ba5900744ac701f4b9 | [
"MIT"
] | null | null | null |
# excel-specific constants
# (explicitly encoded as ascii instead of utf to avoid issues w/ C++ safearray strings)
xl_class_name = 'XLMAIN'.encode('ascii')
xl_desk_class = 'XLDESK'.encode('ascii')
xl_excel7_class = 'EXCEL7'.encode('ascii')
# HKEY_CLASSES_ROOT\Excel.Application: excel's clsid
xl_clsid = '{00020400... | 24.714286 | 87 | 0.64327 |
17324f2d45e4f3fca2f949bcb117ee2780cb3cfc | 208 | py | Python | example/sample6.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | 1 | 2021-09-24T10:25:40.000Z | 2021-09-24T10:25:40.000Z | example/sample6.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | null | null | null | example/sample6.py | sano-jin/go-in-ocaml | b5e5fca33e194776477a0db389f6e52bdc0a66fe | [
"MIT"
] | null | null | null | y = 0
def hoge (y):
def hige ():
print(y)
y = 1
def fuga ():
nonlocal y
y = y + 2
print(y)
return hige
return fuga
h = hoge(3)
h()
h()()
h()()
print(y)
| 12.235294 | 19 | 0.408654 |
6206d9993053bd1057addb1ced2a2a2ed9efcf40 | 2,235 | py | Python | actions/latest_release.py | kingsleyadam/stackstorm-github | 611c318cd294a58a7e8b1f20161c5404e41efaf0 | [
"Apache-2.0"
] | 164 | 2015-01-17T16:08:33.000Z | 2021-08-03T02:34:07.000Z | actions/latest_release.py | kingsleyadam/stackstorm-github | 611c318cd294a58a7e8b1f20161c5404e41efaf0 | [
"Apache-2.0"
] | 442 | 2015-01-01T11:19:01.000Z | 2017-09-06T23:26:17.000Z | actions/latest_release.py | kingsleyadam/stackstorm-github | 611c318cd294a58a7e8b1f20161c5404e41efaf0 | [
"Apache-2.0"
] | 202 | 2015-01-13T00:37:40.000Z | 2020-11-07T11:30:10.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 40.636364 | 79 | 0.599553 |
74e84f0d80fc8aa1aa0dba8d39bc3a0a187c3289 | 1,784 | py | Python | tests/simple_server.py | omerlh/tuf | f496c83e78b05c2f50a0bd5dde197782a839177b | [
"Apache-2.0",
"MIT"
] | 1,324 | 2015-01-08T23:18:59.000Z | 2021-09-02T07:51:27.000Z | tests/simple_server.py | omerlh/tuf | f496c83e78b05c2f50a0bd5dde197782a839177b | [
"Apache-2.0",
"MIT"
] | 988 | 2015-01-02T14:21:06.000Z | 2021-09-02T08:55:29.000Z | tests/simple_server.py | menendezjaume/tuf | 41f7e809fef4cfe578cd2bd96f497da74b1bce15 | [
"Apache-2.0",
"MIT"
] | 221 | 2015-01-02T13:30:29.000Z | 2021-08-29T14:26:17.000Z | #!/usr/bin/env python
# Copyright 2012 - 2017, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
<Program>
simple_server.py
<Author>
Konstantin Andrianov.
<Started>
February 15, 2012.
<Copyright>
See LICENSE-MIT or LICENSE for licensing information.
<Purpose>
... | 27.446154 | 80 | 0.767937 |
58cb32adcb2e2f51ff00fd7f0e8e579272f6325f | 566,397 | py | Python | pypwio/qes.py | zooks97/pypwio | 936542e214c2792d850c725f393c47f22aa98845 | [
"MIT"
] | null | null | null | pypwio/qes.py | zooks97/pypwio | 936542e214c2792d850c725f393c47f22aa98845 | [
"MIT"
] | null | null | null | pypwio/qes.py | zooks97/pypwio | 936542e214c2792d850c725f393c47f22aa98845 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Tue Aug 28 11:14:42 2018 by generateDS.py version 2.29.24.
# Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51) [GCC 7.2.0]
#
# Command line options:
# ('-f', '')
# ('-o', 'qes-1.0.py')
#
# Command line arguments:
# qes-1.0.xsd
#
# Command ... | 48.526131 | 436 | 0.634352 |
ff59b98ccd11d8990bcfc98c836d616f99646737 | 809 | py | Python | tomolab/Tests/test_all.py | TomographyLab/TomoLab | 86b9a5894ef1660d7f4de39f560f1f92024b40f8 | [
"Apache-2.0"
] | 5 | 2019-06-01T13:16:00.000Z | 2022-03-02T10:21:59.000Z | tomolab/Tests/test_all.py | TomographyLab/TomoLab | 86b9a5894ef1660d7f4de39f560f1f92024b40f8 | [
"Apache-2.0"
] | null | null | null | tomolab/Tests/test_all.py | TomographyLab/TomoLab | 86b9a5894ef1660d7f4de39f560f1f92024b40f8 | [
"Apache-2.0"
] | 1 | 2019-06-01T13:19:18.000Z | 2019-06-01T13:19:18.000Z | # -*- coding: utf-8 -*-
# occiput
# Harvard University, Martinos Center for Biomedical Imaging
# Aalto University, Department of Computer Science
from .. import occiput
import unittest
class Test_Reconstruction_PET(unittest.TestCase):
"""Sequence of tests for tomographic reconstruction - Positron Emission Tomogr... | 27.896552 | 90 | 0.640297 |
ee9e9872b84d1db23a951009afe2f34b8d7ed213 | 2,021 | py | Python | core_api/core_api/cli_entrypoint.py | ldss-hse/ldss-core-api | c0d9b1c8802a82acc8892bd397961b8d651d4c25 | [
"MIT"
] | null | null | null | core_api/core_api/cli_entrypoint.py | ldss-hse/ldss-core-api | c0d9b1c8802a82acc8892bd397961b8d651d4c25 | [
"MIT"
] | null | null | null | core_api/core_api/cli_entrypoint.py | ldss-hse/ldss-core-api | c0d9b1c8802a82acc8892bd397961b8d651d4c25 | [
"MIT"
] | null | null | null | import argparse
import os
import shlex
import subprocess
from threading import Timer
def run(cmd, timeout_sec):
proc = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
timer = Timer(timeout_sec, proc.kill)
try:
timer.start()
stdout, stderr = proc.communica... | 31.578125 | 127 | 0.515092 |
db5667b9812f82997105def14aca88b0e476dfc1 | 39 | py | Python | src/petronia/boot/util/__init__.py | groboclown/petronia | 486338023d19cee989e92f0c5692680f1a37811f | [
"MIT"
] | 19 | 2017-06-21T10:28:24.000Z | 2021-12-31T11:49:28.000Z | src/petronia/boot/util/__init__.py | groboclown/petronia | 486338023d19cee989e92f0c5692680f1a37811f | [
"MIT"
] | 10 | 2016-11-11T18:57:57.000Z | 2021-02-01T15:33:43.000Z | src/petronia/boot/util/__init__.py | groboclown/petronia | 486338023d19cee989e92f0c5692680f1a37811f | [
"MIT"
] | 3 | 2017-09-17T03:29:35.000Z | 2019-06-03T10:43:08.000Z |
"""
Utilities for the root stuff.
"""
| 7.8 | 29 | 0.615385 |
4dcfa7bb89b92c1a077cd0c8c51dd8412f2a6806 | 573 | py | Python | pug-bot/commands/addwin.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 17 | 2018-06-27T03:49:03.000Z | 2021-04-13T07:32:43.000Z | pug-bot/commands/addwin.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 3 | 2020-03-26T06:49:10.000Z | 2020-04-23T07:20:41.000Z | pug-bot/commands/addwin.py | stevenktruong/pug-bot | 315c21363eebb51d67d5b5c9fa9326cd8bcb2b54 | [
"MIT"
] | 14 | 2018-06-27T03:49:06.000Z | 2021-10-07T23:28:44.000Z | from .checks import *
from ..config import *
from ..pug import Pug
from ..utils import *
@check(have_no_pug, invalid_number)
async def addwin(message, pugs, user_input, client):
owned_pug = find_in_list(lambda pug: pug.owner == message.author, pugs)
team_num = int(user_input["arguments"])
# If the nu... | 31.833333 | 75 | 0.706806 |
9e4d51943c1085f0e22b2dd11d2882dafb09854d | 2,303 | py | Python | app.py | rkoshel/10-SQLAlchemy-Challenge_RK | fffd725e7a20978977146d421fe486420696a396 | [
"ADSL"
] | null | null | null | app.py | rkoshel/10-SQLAlchemy-Challenge_RK | fffd725e7a20978977146d421fe486420696a396 | [
"ADSL"
] | null | null | null | app.py | rkoshel/10-SQLAlchemy-Challenge_RK | fffd725e7a20978977146d421fe486420696a396 | [
"ADSL"
] | null | null | null | import numpy as np
import datetime as dt
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
Base = automap_base()
Base.prepare(en... | 23.262626 | 69 | 0.657838 |
195e4f0d3a6ac01d68b0de7a4f340dbe40ae3dbb | 4,415 | py | Python | merge_bn.py | ZombieCait/MobileNet_SSD | bd209344296f40c3fdd2bbddc996a2e0bcd38efb | [
"MIT"
] | null | null | null | merge_bn.py | ZombieCait/MobileNet_SSD | bd209344296f40c3fdd2bbddc996a2e0bcd38efb | [
"MIT"
] | null | null | null | merge_bn.py | ZombieCait/MobileNet_SSD | bd209344296f40c3fdd2bbddc996a2e0bcd38efb | [
"MIT"
] | null | null | null | import os
import sys
import argparse
import logging
import numpy as np
try:
caffe_root = '/workspace/caffe/'
sys.path.insert(0, caffe_root + 'python')
import caffe
except ImportError:
logging.fatal("Cannot find caffe!")
from caffe.proto import caffe_pb2
from google.protobuf import text_format
def make... | 34.224806 | 100 | 0.526387 |
35d0a516cc0127e96dc9ee9cc43b234c522bdadd | 7,605 | py | Python | workspace_tools/build_travis.py | kaizen8501/mbed4ECO | 525c1f203539fef4144d5281d70f526f7a12af09 | [
"Apache-2.0"
] | 1 | 2018-11-01T03:46:39.000Z | 2018-11-01T03:46:39.000Z | workspace_tools/build_travis.py | hjjeon0608/mbed_for_W7500P | 08da4a338d32293d01a605bbcf350af98e058ca2 | [
"Apache-2.0"
] | null | null | null | workspace_tools/build_travis.py | hjjeon0608/mbed_for_W7500P | 08da4a338d32293d01a605bbcf350af98e058ca2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
"""
Travis-CI build script
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unle... | 51.385135 | 161 | 0.534385 |
d2f6453a53cec90313b36dd97d78be6cd2724fe7 | 2,619 | py | Python | frappe/config/integrations.py | AWDGroup/frappe | 9687384328012bf82a2784ab950c4f74a69b4ebe | [
"MIT"
] | 1 | 2019-05-21T04:55:01.000Z | 2019-05-21T04:55:01.000Z | frappe/config/integrations.py | AWDGroup/frappe | 9687384328012bf82a2784ab950c4f74a69b4ebe | [
"MIT"
] | 89 | 2017-09-19T15:17:44.000Z | 2022-03-31T00:52:42.000Z | frappe/config/integrations.py | AWDGroup/frappe | 9687384328012bf82a2784ab950c4f74a69b4ebe | [
"MIT"
] | 1 | 2018-02-08T01:14:48.000Z | 2018-02-08T01:14:48.000Z | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Payments"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Braintree Settings",
"description": _("Braintree payment gateway settings"),
},
{
"type": "doctype",... | 22.194915 | 82 | 0.534937 |
d99c6716bc0c544ea895e51025ed511dc28e31b5 | 4,905 | py | Python | detectron/lib/utils/c2.py | Tangshitao/Omni-supervised-Focal-Distillation | 3244dfa1a4d03e7311244687c1287b5ec26bd9ca | [
"MIT"
] | 58 | 2019-01-03T02:20:41.000Z | 2022-02-25T14:24:13.000Z | detectron/lib/utils/c2.py | Tangshitao/Omni-supervised-Focal-Distillation | 3244dfa1a4d03e7311244687c1287b5ec26bd9ca | [
"MIT"
] | 6 | 2019-02-12T03:52:08.000Z | 2020-12-17T02:40:37.000Z | detectron/lib/utils/c2.py | Tangshitao/Omni-supervised-Focal-Distillation | 3244dfa1a4d03e7311244687c1287b5ec26bd9ca | [
"MIT"
] | 5 | 2019-01-03T06:46:04.000Z | 2019-10-29T07:40:11.000Z | # Copyright (c) 2017-present, Facebook, 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... | 31.645161 | 80 | 0.699898 |
3af9ba29e7e85207d849078f76e2828b0508b19d | 243 | py | Python | testmile-setu/setu/dispatcher/guiauto/driver/impl/melement.py | test-mile/setu | b273a11e7f9462e64a370bda16f1952ecdbfb5a5 | [
"Apache-2.0"
] | 9 | 2018-11-15T10:09:17.000Z | 2021-01-12T05:59:19.000Z | testmile-setu/setu/dispatcher/guiauto/driver/impl/melement.py | test-mile/setu | b273a11e7f9462e64a370bda16f1952ecdbfb5a5 | [
"Apache-2.0"
] | 2 | 2019-07-01T15:33:46.000Z | 2019-07-12T13:04:08.000Z | testmile-setu/setu/dispatcher/guiauto/driver/impl/melement.py | test-mile/setu | b273a11e7f9462e64a370bda16f1952ecdbfb5a5 | [
"Apache-2.0"
] | 4 | 2018-12-02T15:14:04.000Z | 2020-05-28T12:57:24.000Z |
class MultiElement:
def __init__(self, elements):
self.__elements = elements
def get_instance_count(self):
return len(self.__elements)
def get_element_at_index(self, index):
return self.__elements[index] | 22.090909 | 42 | 0.687243 |
d094758bef48cde069cc95bd39d43aa1e492ad78 | 363 | py | Python | pyluos/services/gate.py | BHAY-3DiTex/Pyluos | c3285e5378860679236cb6b97981d66a24aeefa8 | [
"MIT"
] | 16 | 2020-03-22T11:21:17.000Z | 2022-01-04T08:45:20.000Z | pyluos/services/gate.py | BHAY-3DiTex/Pyluos | c3285e5378860679236cb6b97981d66a24aeefa8 | [
"MIT"
] | 32 | 2020-03-20T17:06:55.000Z | 2022-02-28T12:59:42.000Z | pyluos/services/gate.py | Luos-io/pyluos | ff90e129159ae0569c0b82a49ee5c0de9914441f | [
"MIT"
] | 9 | 2020-06-07T09:52:13.000Z | 2021-12-07T00:41:29.000Z | from .service import Service
class Gate(Service):
def __init__(self, id, alias, device):
Service.__init__(self, 'Gate', id, alias, device)
def _update(self, new_state):
Service._update(self, new_state)
def control(self):
def delay(delay):
self._value = delay
... | 21.352941 | 57 | 0.619835 |
91cca7cc5ad731c27f326210514d0e230b06af71 | 1,019 | py | Python | webscraping_basic/11_daum_movies.py | tunealog/python-web-scraping | 0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17 | [
"MIT"
] | null | null | null | webscraping_basic/11_daum_movies.py | tunealog/python-web-scraping | 0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17 | [
"MIT"
] | null | null | null | webscraping_basic/11_daum_movies.py | tunealog/python-web-scraping | 0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17 | [
"MIT"
] | null | null | null | # Python Web Scraping
# Title : Image Scraping
# Date : 2020-08-24
# Creator : tunealog
import requests
from bs4 import BeautifulSoup
headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15"}
for year in range(2015, 2020)... | 28.305556 | 140 | 0.627085 |
24c7ba529dc86db71bae6d272afe936e985f55ff | 2,184 | py | Python | magenta/pipelines/pipelines_common_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 16 | 2016-09-02T04:59:30.000Z | 2022-01-11T10:38:29.000Z | magenta/pipelines/pipelines_common_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 2 | 2016-09-25T16:39:59.000Z | 2016-11-18T17:43:41.000Z | magenta/pipelines/pipelines_common_test.py | fanzhiyan/magenta | 622c47c19bb84c6f57b286ed03b738516b2f27d6 | [
"Apache-2.0"
] | 10 | 2016-09-02T04:59:32.000Z | 2021-09-29T06:57:24.000Z | # Copyright 2019 The Magenta 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 ... | 39 | 118 | 0.704212 |
950ede04e5607bce05d09ef576fdb31ce4087962 | 2,067 | py | Python | Python_Implementation/Test_Codes/ArpSpoofing.py | ishtiaqniloy/CSE_406_TCP_Reset_Attack_Video_Streaming | 849e3595a75cedaa8142a025eb22e1bb8871be36 | [
"MIT"
] | 2 | 2020-07-02T00:31:43.000Z | 2021-06-06T03:27:18.000Z | Python_Implementation/Test_Codes/ArpSpoofing.py | ishtiaqniloy/CSE_406_TCP_Reset_Attack_Video_Streaming | 849e3595a75cedaa8142a025eb22e1bb8871be36 | [
"MIT"
] | null | null | null | Python_Implementation/Test_Codes/ArpSpoofing.py | ishtiaqniloy/CSE_406_TCP_Reset_Attack_Video_Streaming | 849e3595a75cedaa8142a025eb22e1bb8871be36 | [
"MIT"
] | 1 | 2021-05-25T09:58:46.000Z | 2021-05-25T09:58:46.000Z | #!/usr/bin/python3
#running command: python ArpSpoofing.py victimIP
import sys #for command line argument
import time
import os
import shutil
import tempfile
from random import randint
from scapy.all import *
from scapy.layers.inet import *
import scapy
import socket
import uuid
def get_ip():
s = socket.socket... | 23.758621 | 119 | 0.582487 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.