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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fb379a5d54a44233082012b9017978ed60b5aae8 | 225 | py | Python | smurf.py | haelee/allbypythonself | 499b1c696df8cac20e863354e7c6b68e9d4bff07 | [
"MIT"
] | 3 | 2019-09-23T03:33:10.000Z | 2020-07-16T06:51:46.000Z | smurf.py | haelee/allbypythonself | 499b1c696df8cac20e863354e7c6b68e9d4bff07 | [
"MIT"
] | null | null | null | smurf.py | haelee/allbypythonself | 499b1c696df8cac20e863354e7c6b68e9d4bff07 | [
"MIT"
] | 4 | 2019-09-23T04:55:27.000Z | 2021-05-22T01:09:40.000Z | # All-by-Pythonself
# Snippet for the Smurf attacks
# by Hae Young Lee
# at Cheongju University
from scapy . all import *
p = Ether (dst = "ff:ff:ff:ff:ff:ff") / IP (dst = "10.0.2.255", src = "10.0.2.1") / ICMP ()
sendp (p)
| 25 | 91 | 0.631111 |
64807847b18a66195c0aa32c57ae22680c02cd64 | 2,339 | py | Python | CSCA48 - Introduction to CS 2/ex10.py | zaind6/University-CS-Exercises | 2c48a35f2b9e8b96cfc1384e225ced94ae00badc | [
"MIT"
] | 1 | 2020-11-03T01:35:35.000Z | 2020-11-03T01:35:35.000Z | CSCA48 - Introduction to CS 2/ex10.py | zain-zafar/University-CS-Exercises | 2c48a35f2b9e8b96cfc1384e225ced94ae00badc | [
"MIT"
] | null | null | null | CSCA48 - Introduction to CS 2/ex10.py | zain-zafar/University-CS-Exercises | 2c48a35f2b9e8b96cfc1384e225ced94ae00badc | [
"MIT"
] | null | null | null | def radix_sort(main_bin):
'''(list of int) -> list of int
REQ: list contains all positive integers or 0
>>> radix_sort([1,2,3,1,2,3,4,0,4])
[0,1,1,2,2,3,3,4,4]
Return a sorted list, using radix method
'''
# Initialize 10 bins
bin_0, bin_1, bin_2, bin_3, bin_4 = [], [], [], [], []
... | 29.2375 | 79 | 0.525438 |
9d615ddd13ef816a01f3d701702dd01ffc8337e0 | 8,670 | py | Python | macgraph/cell/messaging_cell.py | Octavian-ai/mac-graph | 3ef978e8a6f79f2dcc46783d34f01934aabf7f19 | [
"Unlicense"
] | 116 | 2018-07-11T13:19:56.000Z | 2021-07-26T17:22:44.000Z | macgraph/cell/messaging_cell.py | Octavian-ai/mac-graph | 3ef978e8a6f79f2dcc46783d34f01934aabf7f19 | [
"Unlicense"
] | 1 | 2019-02-11T02:25:02.000Z | 2019-02-11T17:05:19.000Z | macgraph/cell/messaging_cell.py | Octavian-ai/mac-graph | 3ef978e8a6f79f2dcc46783d34f01934aabf7f19 | [
"Unlicense"
] | 21 | 2018-10-11T23:03:22.000Z | 2021-07-14T22:42:08.000Z |
from typing import NamedTuple
import tensorflow as tf
from .types import *
from .query import *
from .messaging_cell_helpers import *
from ..args import ACTIVATION_FNS
from ..attention import *
from ..input import get_table_with_embedding
from ..const import EPSILON
from ..util import *
from ..layers import *
from .... | 31.758242 | 141 | 0.632641 |
0218062dd8a9e1268fc061e53a57cb713ec09290 | 156 | py | Python | funt.py | Prashant269/python | facf2683c20ace046e8c2adcd7fe96aad609331d | [
"bzip2-1.0.6"
] | null | null | null | funt.py | Prashant269/python | facf2683c20ace046e8c2adcd7fe96aad609331d | [
"bzip2-1.0.6"
] | null | null | null | funt.py | Prashant269/python | facf2683c20ace046e8c2adcd7fe96aad609331d | [
"bzip2-1.0.6"
] | null | null | null | def table(x):
i=1
for i in range(1,11):
print ('{}*{}={}'.format(x,i,x*i))
return ''
y=table(5)
print y
| 17.333333 | 50 | 0.378205 |
79ea19da8e13f62754545aa29a5ce706fcdb3cc2 | 7,769 | py | Python | alipay/aop/api/request/AlipayUserTradeSearchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayUserTradeSearchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayUserTradeSearchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserTradeSearchRequest(object):
def __init__(self, biz_model=None):
self._biz_model = biz_model
self._alipay_order_no = None
... | 31.710204 | 160 | 0.625048 |
c93e598ca6827fa3c26f0d965e1953857fda1679 | 5,483 | py | Python | 2015/python/2015-11.py | robjwells/adventofcode-solutions | 1c3aa376f1c779a69aa515ce70f0537e13f25eab | [
"MIT"
] | null | null | null | 2015/python/2015-11.py | robjwells/adventofcode-solutions | 1c3aa376f1c779a69aa515ce70f0537e13f25eab | [
"MIT"
] | null | null | null | 2015/python/2015-11.py | robjwells/adventofcode-solutions | 1c3aa376f1c779a69aa515ce70f0537e13f25eab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Advent of Code 2015, Day 11: Corporate Policy"""
import string
import aoc
import pytest
def validate_password(password):
"""Check password against the puzzle’s requirements
Passwords:
* must include one increasing straight of at least three
letters, like abc, bcd... | 31.511494 | 78 | 0.68375 |
cc71b8f23bce8453e198949e4a42c7aae0c6e16e | 3,708 | py | Python | contrib/macdeploy/custom_dsstore.py | ZIBIZ-PROJECT/ZIBIZCORE-WEB | 436e437f61d19fdf05e6069ae4ccd8e1895f6259 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | ZIBIZ-PROJECT/ZIBIZCORE-WEB | 436e437f61d19fdf05e6069ae4ccd8e1895f6259 | [
"MIT"
] | 2 | 2021-05-13T12:26:52.000Z | 2021-05-13T16:35:51.000Z | contrib/macdeploy/custom_dsstore.py | ZIBIZ-PROJECT/ZIBIZCORE-WEB | 436e437f61d19fdf05e6069ae4ccd8e1895f6259 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv... | 61.8 | 1,817 | 0.72411 |
9e8ce64af2d12c1dbb7c3f46438f87f53811971e | 2,068 | py | Python | run_tflite_convertor.py | jwkanggist/tflite-convertor-example | 5d54f1ca9214e1b3cdce7530838bac32b6b0c83d | [
"Apache-2.0"
] | 6 | 2018-11-13T16:45:52.000Z | 2020-04-28T01:27:27.000Z | run_tflite_convertor.py | neties/tflite-convertor-example | 5d54f1ca9214e1b3cdce7530838bac32b6b0c83d | [
"Apache-2.0"
] | 1 | 2018-06-14T16:58:15.000Z | 2018-06-14T17:04:39.000Z | run_tflite_convertor.py | neties/tflite-convertor-example | 5d54f1ca9214e1b3cdce7530838bac32b6b0c83d | [
"Apache-2.0"
] | 5 | 2018-09-01T14:40:21.000Z | 2019-09-22T15:13:37.000Z | #-*- coding: utf-8 -*-
#! /usr/bin/env python
'''
filename: run_tflte_convertor.py
description:
- To convert tensorflow frozen graph to tflite format
references:
- https://github.com/tensorflow/tensorflow/blob/master/tensorflow/docs_src/mobile/tflite/devguide.md#2-convert-the-model-form... | 33.901639 | 135 | 0.652805 |
8c352f8149fc351751382b10600f0e5a47441cc1 | 2,571 | py | Python | test/magicmind/op_test/test_stack.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | 20 | 2022-03-01T11:40:51.000Z | 2022-03-30T08:17:47.000Z | test/magicmind/op_test/test_stack.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | null | null | null | test/magicmind/op_test/test_stack.py | Cambricon/catch | 2625da389f25a67066d20fb6b0c38250ef98f8ab | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import torch
import torch.nn as nn
import torch_mlu
import torch_mlu.core.mlu_model as ct
from torch.nn import Parameter
import torch.nn.functional as F
import numpy as np
import sys
import os
import time
import unittest
cur_dir = os.path.dirname(os.path.abspath(__file__))
sys.pat... | 32.961538 | 94 | 0.614936 |
796ab7f38bd751e635a50dd2fe99e8e81c2840ab | 2,259 | py | Python | third_party/catapult/telemetry/telemetry/internal/forwarders/__init__.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 1 | 2020-09-15T08:43:34.000Z | 2020-09-15T08:43:34.000Z | third_party/catapult/telemetry/telemetry/internal/forwarders/__init__.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/catapult/telemetry/telemetry/internal/forwarders/__init__.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
PortPair = collections.namedtuple('PortPair', ['local_port', 'remote_port'])
PortSet = collections.namedtuple('PortSet', ['http', 'https... | 28.594937 | 79 | 0.695883 |
884cfdbc2720566163fea2f94b732403fe92e65e | 4,302 | py | Python | conans/test/unittests/tools/cmake/test_cmaketoolchain.py | blackliner/conan | 7848f7fcf1d0ce6e368f1dc05e4b20f40a9203c6 | [
"MIT"
] | null | null | null | conans/test/unittests/tools/cmake/test_cmaketoolchain.py | blackliner/conan | 7848f7fcf1d0ce6e368f1dc05e4b20f40a9203c6 | [
"MIT"
] | null | null | null | conans/test/unittests/tools/cmake/test_cmaketoolchain.py | blackliner/conan | 7848f7fcf1d0ce6e368f1dc05e4b20f40a9203c6 | [
"MIT"
] | null | null | null | import types
import pytest
from mock import Mock
from conan.tools.cmake import CMakeToolchain
from conan.tools.cmake.toolchain import Block, GenericSystemBlock
from conans import ConanFile, Settings
from conans.model.conf import Conf
from conans.model.env_info import EnvValues
@pytest.fixture
def conanfile():
c... | 30.083916 | 96 | 0.693631 |
a9c95062446adc178d47745e215af1c6ae6bf12a | 4,784 | py | Python | ROAR/perception_module/ground_plane_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 18 | 2020-10-16T00:38:55.000Z | 2022-03-03T06:01:49.000Z | ROAR/perception_module/ground_plane_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 20 | 2020-07-23T03:50:50.000Z | 2021-11-09T04:00:26.000Z | ROAR/perception_module/ground_plane_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 140 | 2019-11-20T22:46:02.000Z | 2022-03-29T13:26:17.000Z | from ROAR.agent_module.agent import Agent
from ROAR.perception_module.depth_to_pointcloud_detector import DepthToPointCloudDetector
import numpy as np
from typing import Optional, Any
import open3d as o3d
import time, cv2
class GroundPlaneDetector(DepthToPointCloudDetector):
def __init__(self, agent: Agent, knn: ... | 48.323232 | 106 | 0.549749 |
836a5abce814977f2c7eef91760399d9644f1bde | 2,469 | py | Python | sejong-oneline-festival/controller/sejong_auth.py | denhur62/sejong-online-festival | 69fbe16ff5ab4f97ff3cb298ce8d2a62d8f787fc | [
"MIT"
] | null | null | null | sejong-oneline-festival/controller/sejong_auth.py | denhur62/sejong-online-festival | 69fbe16ff5ab4f97ff3cb298ce8d2a62d8f787fc | [
"MIT"
] | null | null | null | sejong-oneline-festival/controller/sejong_auth.py | denhur62/sejong-online-festival | 69fbe16ff5ab4f97ff3cb298ce8d2a62d8f787fc | [
"MIT"
] | 4 | 2021-09-28T09:13:19.000Z | 2022-01-10T13:16:05.000Z | import requests
from bs4 import BeautifulSoup as bs
class SejongAuth:
def __init__(self):
self.TIMEOUT_SEC = 10
def do_sejong(self, id: str, pw: str):
header = {
"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5)\
AppleWebKit 537.36 (KHTML, like Gecko) Chrom... | 32.064935 | 105 | 0.476711 |
0e0649003276f3cdf628badddf2fb90624867f33 | 5,101 | py | Python | octavia-cli/octavia_cli/generate/definitions.py | kattos-aws/airbyte | cbcbab4a2399c08d8f66d1b693ac824c245ba3da | [
"MIT"
] | null | null | null | octavia-cli/octavia_cli/generate/definitions.py | kattos-aws/airbyte | cbcbab4a2399c08d8f66d1b693ac824c245ba3da | [
"MIT"
] | 1 | 2021-12-08T21:39:05.000Z | 2021-12-09T17:10:45.000Z | octavia-cli/octavia_cli/generate/definitions.py | kattos-aws/airbyte | cbcbab4a2399c08d8f66d1b693ac824c245ba3da | [
"MIT"
] | 1 | 2022-02-19T17:22:50.000Z | 2022-02-19T17:22:50.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import abc
from typing import Any, Callable, Union
import airbyte_api_client
import click
from airbyte_api_client.api import (
destination_definition_api,
destination_definition_specification_api,
source_definition_api,
source_definition_spe... | 33.123377 | 130 | 0.738483 |
d51b36eda668c5c1d18d56e2ea9a827d6304e79f | 2,686 | py | Python | noxfile.py | decalage2/Ciphey | ebe22af0a2ab5c21aaaa3913f8ff20e10149ca9e | [
"MIT"
] | 1 | 2020-10-28T18:37:23.000Z | 2020-10-28T18:37:23.000Z | noxfile.py | decalage2/Ciphey | ebe22af0a2ab5c21aaaa3913f8ff20e10149ca9e | [
"MIT"
] | null | null | null | noxfile.py | decalage2/Ciphey | ebe22af0a2ab5c21aaaa3913f8ff20e10149ca9e | [
"MIT"
] | 1 | 2021-09-18T13:21:00.000Z | 2021-09-18T13:21:00.000Z | """
The file for Nox
"""
import nox
from typing import Any
from nox.sessions import Session
import tempfile
locations = "ciphey/", "tests/", "docs/"
nox.options.sessions = "safety", "tests"
package = "ciphey"
def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None:
"""Install packages c... | 31.232558 | 86 | 0.638124 |
d8aa6226743afa65bd3766c6ad8d2fc0f139f441 | 8,023 | py | Python | prednet_custom.py | pallekc91/prednet | a7761a92c98c1652a2559a2b84c7f0a371f8e5c4 | [
"MIT"
] | null | null | null | prednet_custom.py | pallekc91/prednet | a7761a92c98c1652a2559a2b84c7f0a371f8e5c4 | [
"MIT"
] | null | null | null | prednet_custom.py | pallekc91/prednet | a7761a92c98c1652a2559a2b84c7f0a371f8e5c4 | [
"MIT"
] | null | null | null | from keras.layers import Recurrent
from keras.engine import InputSpec
from keras.layers import Conv2D, UpSampling2D, MaxPooling2D
from keras import backend
from keras import activations
class PredNetCustom(Recurrent):
def __init__(self, channels_a, channels_r, glob_filter_size, output_mode='error', data_format=b... | 48.624242 | 159 | 0.585691 |
86018c7988b0566b7790984ae898b9c5c0e1507f | 12,681 | py | Python | electrum_ltc/synchronizer.py | BITRY/vialectrum | 2ed2902ebc2af24b9c32d774fa4a32cbda60a9e5 | [
"MIT"
] | 11 | 2016-01-17T04:14:58.000Z | 2018-01-23T10:53:40.000Z | electrum_ltc/synchronizer.py | BITRY/vialectrum | 2ed2902ebc2af24b9c32d774fa4a32cbda60a9e5 | [
"MIT"
] | 17 | 2015-01-11T13:37:21.000Z | 2018-05-16T10:10:09.000Z | electrum_ltc/synchronizer.py | BITRY/vialectrum | 2ed2902ebc2af24b9c32d774fa4a32cbda60a9e5 | [
"MIT"
] | 13 | 2016-09-29T13:41:09.000Z | 2018-05-12T15:32:28.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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... | 41.851485 | 122 | 0.662014 |
ceb141dc000b61f76d9cd30af8be8234e3c5bbd0 | 1,125 | py | Python | sierpinski.py | sytong/turtle-graphics-fun | 3e5eb609c9ec93d41cc315ff5561e5f468959be3 | [
"MIT"
] | null | null | null | sierpinski.py | sytong/turtle-graphics-fun | 3e5eb609c9ec93d41cc315ff5561e5f468959be3 | [
"MIT"
] | null | null | null | sierpinski.py | sytong/turtle-graphics-fun | 3e5eb609c9ec93d41cc315ff5561e5f468959be3 | [
"MIT"
] | null | null | null | import turtle
import math
def teleport(koopa, pos):
koopa.hideturtle()
koopa.up()
koopa.setpos(pos)
koopa.down()
koopa.showturtle()
def draw_triangle(koopa, pos, length, angle, color):
teleport(koopa, pos)
koopa.setheading(0)
koopa.right(30)
koopa.fill(True)
koopa.fillcolor(color)
for i in rang... | 22.5 | 96 | 0.667556 |
fa0ee2977c1bb71a451897f957e916a09076aa2e | 822 | py | Python | docs/multiselect/simple.py | snehilvj/dmc-docs | f8e564dd93f005c8c2cdf84ad20f41c668041080 | [
"MIT"
] | 6 | 2022-01-28T17:12:58.000Z | 2022-03-16T01:29:18.000Z | docs/multiselect/simple.py | snehilvj/dmc-demo | 3ac16f017922f8cdb322c91c29ad3144fd0bb886 | [
"MIT"
] | 1 | 2022-01-07T21:21:07.000Z | 2022-01-22T12:07:28.000Z | docs/multiselect/simple.py | snehilvj/dmc-demo | 3ac16f017922f8cdb322c91c29ad3144fd0bb886 | [
"MIT"
] | 1 | 2022-02-05T18:00:36.000Z | 2022-02-05T18:00:36.000Z | import dash_mantine_components as dmc
from dash import Output, Input, html, callback
component = html.Div(
[
dmc.MultiSelect(
label="Select frameworks",
placeholder="Select all you like!",
id="framework-multi-select",
value=["ng", "vue"],
data=[
... | 28.344828 | 88 | 0.512165 |
7da2e9f192f21de6c4ed6b84c021299f87dce4cf | 1,826 | py | Python | classifier/svm_standard/inout.py | ecohealthalliance/eha_grit | cb95b759222ca7a416dd7d439571e7b610dd5e23 | [
"Apache-2.0"
] | null | null | null | classifier/svm_standard/inout.py | ecohealthalliance/eha_grit | cb95b759222ca7a416dd7d439571e7b610dd5e23 | [
"Apache-2.0"
] | null | null | null | classifier/svm_standard/inout.py | ecohealthalliance/eha_grit | cb95b759222ca7a416dd7d439571e7b610dd5e23 | [
"Apache-2.0"
] | null | null | null | import csv
import networkx as nx
from networkx.readwrite import json_graph
Y = 100
MINOR = 25
def read_table (path):
nodes = []
#buffer = open (path, 'r').read ()
#buffer = buffer.replace ('\r', '')
#rows = buffer.split ('\n')
rows = csv.reader (open (path, 'rU'))
contrib = []
for elem in... | 26.085714 | 75 | 0.456188 |
9c0858df2e6aa25f28e1c9c98a724f8d4d807357 | 364 | py | Python | config.dist.py | Ths2-9Y-LqJt6/Cattrotar | bc9acd8ab75563d746c5c1ff9a30f01b21019f9f | [
"MIT"
] | 1 | 2022-01-28T17:26:04.000Z | 2022-01-28T17:26:04.000Z | config.dist.py | mrjones-plip/Cattrotar | bc9acd8ab75563d746c5c1ff9a30f01b21019f9f | [
"MIT"
] | 3 | 2020-02-28T21:58:23.000Z | 2020-03-03T23:15:27.000Z | config.dist.py | mrjones-plip/Cattrotar | bc9acd8ab75563d746c5c1ff9a30f01b21019f9f | [
"MIT"
] | null | null | null |
# which chromecasts to use
chromecasts = ("This Room", "Another Room")
# use external display or not
use_display = False
# which GPIO pins your rotary encoder is useing
clk = 17
dt = 18
sw = 23
# how big for the font to be on the screen
font_size = 55
# set to 'raspberry' for raspberry pi or 'orange' or orange pi ... | 18.2 | 67 | 0.717033 |
2025a0d565211a049d60d5d62a1e721c320c06f8 | 5,606 | py | Python | tests/output/kml.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 1,253 | 2015-01-02T13:58:02.000Z | 2022-03-31T08:43:39.000Z | tests/output/kml.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 3,388 | 2015-01-02T11:17:58.000Z | 2022-03-30T10:21:45.000Z | tests/output/kml.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 376 | 2015-01-20T07:04:54.000Z | 2022-03-04T23:53:00.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the KML output module."""
import io
import os
import sys
import unittest
from dfvfs.lib import definitions as dfvfs_definitions
from dfvfs.path import factory as path_spec_factory
from plaso.lib import definitions
from plaso.output import kml
from tests.co... | 34.604938 | 78 | 0.648948 |
190dbb45fd15ff38fb94d45305b36b87c3bae174 | 1,854 | py | Python | setup.py | sommersoft/Adafruit_CircuitPython_TinyLoRa | 4a0cb9deb7590c35e32f6353dce0a3b08eb1c47a | [
"MIT"
] | null | null | null | setup.py | sommersoft/Adafruit_CircuitPython_TinyLoRa | 4a0cb9deb7590c35e32f6353dce0a3b08eb1c47a | [
"MIT"
] | null | null | null | setup.py | sommersoft/Adafruit_CircuitPython_TinyLoRa | 4a0cb9deb7590c35e32f6353dce0a3b08eb1c47a | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abs... | 34.981132 | 84 | 0.705502 |
ae2bf36be96e77526e9c6a745f2a1fab1af83e41 | 1,092 | py | Python | read_bases.py | mcgyver5/pftools | 49b58127375e5795aef2efca5fc65e6b826b7b97 | [
"MIT"
] | 1 | 2020-01-27T18:28:00.000Z | 2020-01-27T18:28:00.000Z | read_bases.py | mcgyver5/pftools | 49b58127375e5795aef2efca5fc65e6b826b7b97 | [
"MIT"
] | 1 | 2020-02-10T00:07:30.000Z | 2020-02-10T00:07:30.000Z | read_bases.py | mcgyver5/pftools | 49b58127375e5795aef2efca5fc65e6b826b7b97 | [
"MIT"
] | 1 | 2020-02-03T19:04:10.000Z | 2020-02-03T19:04:10.000Z | import sys
import binascii
if len(sys.argv) > 2:
answer = ""
cat = sys.argv[1]
if cat == "b":
for x in range(2,len(sys.argv)):
s = sys.argv[x]
i = int(s,2)
answer = answer + binascii.unhexlify('%x' % i)
if cat == "dec":
for x in range(2, len(sys.argv... | 29.513514 | 100 | 0.466117 |
aa36ca40ac628d2ab3aaed44bee41c39fbfc0f79 | 753 | py | Python | tests/modules/span_extractors/test_concat_span_extractor.py | altescy/xallennlp | 9c10ec8832d551e160f6cf63345dda206395a9dd | [
"MIT"
] | 7 | 2020-06-21T02:33:16.000Z | 2022-01-26T10:45:11.000Z | tests/modules/span_extractors/test_concat_span_extractor.py | altescy/xallennlp | 9c10ec8832d551e160f6cf63345dda206395a9dd | [
"MIT"
] | 7 | 2021-07-11T09:00:16.000Z | 2022-01-17T06:53:50.000Z | tests/modules/span_extractors/test_concat_span_extractor.py | altescy/xallennlp | 9c10ec8832d551e160f6cf63345dda206395a9dd | [
"MIT"
] | 3 | 2020-07-23T09:41:30.000Z | 2021-06-10T03:55:10.000Z | import torch
from allennlp.modules.span_extractors import EndpointSpanExtractor, SelfAttentiveSpanExtractor
from xallennlp.modules.span_extractors import ConcatSpanExtractor
def test_concat_span_extractor() -> None:
inputs = torch.rand((2, 4, 5))
spans = torch.LongTensor([[[0, 2], [1, 1]], [[1, 2], [2, 3]]])
... | 32.73913 | 94 | 0.679947 |
3b9c7f279c86077ba2443274ad1f330df7e97c24 | 18,989 | py | Python | learn_to_infer/gmm_models.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | learn_to_infer/gmm_models.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | learn_to_infer/gmm_models.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 41.825991 | 80 | 0.679288 |
3bc0974332193dde6d10907a94eb1aba6b5b81cb | 38,931 | py | Python | superset/security/manager.py | hikaya-io/incubator-superset | 3dac81c89613f04dc9e4424dda043821c7557323 | [
"Apache-2.0"
] | 1 | 2020-12-07T10:45:34.000Z | 2020-12-07T10:45:34.000Z | superset/security/manager.py | hikaya-io/incubator-superset | 3dac81c89613f04dc9e4424dda043821c7557323 | [
"Apache-2.0"
] | 26 | 2020-04-14T19:51:36.000Z | 2022-03-31T02:38:06.000Z | superset/security/manager.py | hikaya-io/incubator-superset | 3dac81c89613f04dc9e4424dda043821c7557323 | [
"Apache-2.0"
] | 1 | 2020-07-12T21:02:18.000Z | 2020-07-12T21:02:18.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 (the
# "License"); you may not u... | 35.815087 | 88 | 0.62115 |
210d95863df90ae0f76133e2c5e03e4246bcc914 | 291 | py | Python | postoptimizer/subreddits/apps.py | mjkaufer/PostOptimizer | 7f0c12d5832c10e5dce6c059bbd958b8737533e4 | [
"MIT"
] | null | null | null | postoptimizer/subreddits/apps.py | mjkaufer/PostOptimizer | 7f0c12d5832c10e5dce6c059bbd958b8737533e4 | [
"MIT"
] | null | null | null | postoptimizer/subreddits/apps.py | mjkaufer/PostOptimizer | 7f0c12d5832c10e5dce6c059bbd958b8737533e4 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.apps import AppConfig
class SubredditsConfig(AppConfig):
name = 'postoptimizer.subreddits'
verbose_name = 'subreddit stats stuff'
def ready(self):
# from .models import SubredditStats
pass
| 19.4 | 44 | 0.683849 |
a6ab15c2903f3b2f130c56a38afb23e92c3c2863 | 12,984 | py | Python | threedi_custom_stats/presets.py | threedi/beta-plugins | 530a5542deda73201626f7a429f87ce64cbac51a | [
"MIT"
] | 1 | 2022-02-14T10:31:51.000Z | 2022-02-14T10:31:51.000Z | threedi_custom_stats/presets.py | threedi/beta-plugins | 530a5542deda73201626f7a429f87ce64cbac51a | [
"MIT"
] | 11 | 2019-04-08T14:11:45.000Z | 2021-07-02T14:28:04.000Z | threedi_custom_stats/presets.py | threedi/beta-plugins | 530a5542deda73201626f7a429f87ce64cbac51a | [
"MIT"
] | null | null | null | from typing import List
try:
from .threedi_result_aggregation import *
# from .aggregation_classes import *
# from .constants import *
from .style import *
except ImportError:
from threedi_result_aggregation import *
# from constants import *
from style import *
class Preset:
def __in... | 64.277228 | 120 | 0.456716 |
1da3e643982e4946e8cf38ed087746bba26268d4 | 5,369 | py | Python | docs/conf.py | ynop/evalmate | 0274eb79528cee42405778c539ae8f576a48efb4 | [
"MIT"
] | 2 | 2019-08-16T14:49:20.000Z | 2020-11-15T18:33:33.000Z | docs/conf.py | ynop/evalmate | 0274eb79528cee42405778c539ae8f576a48efb4 | [
"MIT"
] | 3 | 2018-12-06T14:33:30.000Z | 2018-12-19T13:54:12.000Z | docs/conf.py | ynop/evalmate | 0274eb79528cee42405778c539ae8f576a48efb4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# evalmate documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 21 16:54:44 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | 30.856322 | 79 | 0.681505 |
98d6ad51c63441bd76d0ec91e7144d529b337d34 | 4,664 | py | Python | ros/src/tl_detector/light_classification/trafficLightClassifierClass_reduced.py | mriosrivas/CarND-Capstone | 798235066bdecc91f9b00e663a6bb6f697f6f302 | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/trafficLightClassifierClass_reduced.py | mriosrivas/CarND-Capstone | 798235066bdecc91f9b00e663a6bb6f697f6f302 | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/trafficLightClassifierClass_reduced.py | mriosrivas/CarND-Capstone | 798235066bdecc91f9b00e663a6bb6f697f6f302 | [
"MIT"
] | null | null | null | import numpy as np
import os
import sys
import tensorflow as tf
import time
from collections import defaultdict
from io import StringIO
from matplotlib import pyplot as plt
from PIL import Image
import cv2
#Loading label map
#label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
#categories = label_map_util.con... | 35.333333 | 195 | 0.777444 |
ce7f739158aae746fb1a8407f4cde1d7ded6d45c | 13,132 | py | Python | test/test_ferrybox_bad_data_times_to_status.py | Swiss-Polar-Institute/science-data-utils | 6a85570ee586fa1ba1644ba2b1c9dea3a5257eae | [
"MIT"
] | null | null | null | test/test_ferrybox_bad_data_times_to_status.py | Swiss-Polar-Institute/science-data-utils | 6a85570ee586fa1ba1644ba2b1c9dea3a5257eae | [
"MIT"
] | null | null | null | test/test_ferrybox_bad_data_times_to_status.py | Swiss-Polar-Institute/science-data-utils | 6a85570ee586fa1ba1644ba2b1c9dea3a5257eae | [
"MIT"
] | null | null | null | import unittest
import ferrybox_bad_data_times_to_status
import datetime
def text_to_dt(t):
"""Use the function to convert date time strings to python datetime format in the input and expected output data
in the tests below. """
return datetime.datetime.strptime(t, '%Y-%m-%d %H:%M:%S')
class TestFerryb... | 53.6 | 162 | 0.594274 |
515d7ec9e5043b431c7bd4701008f3958c9d8b74 | 1,214 | py | Python | PythonTest/ShowMeTheCode/find_links.py | qianhk/FeiPython | c87578d3c04b7345a99fef7390c8ea12c6f2c716 | [
"Apache-2.0"
] | null | null | null | PythonTest/ShowMeTheCode/find_links.py | qianhk/FeiPython | c87578d3c04b7345a99fef7390c8ea12c6f2c716 | [
"Apache-2.0"
] | 15 | 2019-11-18T06:09:50.000Z | 2022-03-02T02:55:54.000Z | PythonTest/ShowMeTheCode/find_links.py | qianhk/FeiPython | c87578d3c04b7345a99fef7390c8ea12c6f2c716 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import requests
import pyquery
#https://pythonhosted.org/pyquery/api.html
HttpUserAgent = r"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
def find_links(url):
list = []
html = get_html(url)
... | 27.590909 | 140 | 0.621911 |
680db62b98791017aacdb6c127b3c774a57e3464 | 1,996 | py | Python | question10.py | znalbert/alg_think_mod_3 | 6599109811d41d7ed4f6136367b850699d3c47c2 | [
"MIT"
] | null | null | null | question10.py | znalbert/alg_think_mod_3 | 6599109811d41d7ed4f6136367b850699d3c47c2 | [
"MIT"
] | null | null | null | question10.py | znalbert/alg_think_mod_3 | 6599109811d41d7ed4f6136367b850699d3c47c2 | [
"MIT"
] | null | null | null | """
Assignment 3 - Question 1
"""
import matplotlib.pyplot as plt
import alg_project3_viz as viz
import alg_project3_solution as sol
data_table = viz.load_data_table(viz.DATA_111_URL)
hier_cluster_list = sol.make_data_list(data_table)
kmeans_cluster_list = sol.make_data_list(data_table)
def compute_hier_distortions... | 29.791045 | 101 | 0.73998 |
7ca2110bb65843d30c5247317ffbb1f948e3acc9 | 3,636 | py | Python | lte/gateway/python/magma/mobilityd/uplink_gw.py | gurrapualt/magma | 13e05788fa6c40293a58b6e03cfb394bb79fa98f | [
"BSD-3-Clause"
] | null | null | null | lte/gateway/python/magma/mobilityd/uplink_gw.py | gurrapualt/magma | 13e05788fa6c40293a58b6e03cfb394bb79fa98f | [
"BSD-3-Clause"
] | 112 | 2020-09-03T06:41:43.000Z | 2022-03-31T12:07:08.000Z | lte/gateway/python/magma/mobilityd/uplink_gw.py | gurrapualt/magma | 13e05788fa6c40293a58b6e03cfb394bb79fa98f | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 34.628571 | 83 | 0.637789 |
769bdf5188fea123080dd0131178d12188cc60fb | 4,507 | py | Python | gameanalysis/script/rest.py | egtaonline/GameAnalysis | 32be1a6b9f616e794362639367ad64360f3e118f | [
"Apache-2.0"
] | 7 | 2017-05-17T10:40:45.000Z | 2021-10-30T12:20:24.000Z | gameanalysis/script/rest.py | egtaonline/GameAnalysis | 32be1a6b9f616e794362639367ad64360f3e118f | [
"Apache-2.0"
] | 1 | 2015-05-04T20:13:15.000Z | 2015-05-04T20:13:15.000Z | gameanalysis/script/rest.py | egtaonline/GameAnalysis | 32be1a6b9f616e794362639367ad64360f3e118f | [
"Apache-2.0"
] | 3 | 2015-05-04T19:58:32.000Z | 2016-05-17T14:08:28.000Z | """extract and find restrictions"""
import argparse
import json
import sys
import numpy as np
from gameanalysis import gamereader
from gameanalysis import restrict
from gameanalysis import utils
def add_parser(subparsers):
"""Add restriction parser"""
parser = subparsers.add_parser(
"restriction",
... | 32.65942 | 88 | 0.625693 |
48afc02ed363689d819554ee3836dca95238e9cf | 9,043 | py | Python | test/funcional/test_framework/authproxy.py | odavila466/Kron-Project | 8a915e6287ac6d21ac0a32ff69f6f04e260bd1f5 | [
"MIT"
] | 3 | 2021-05-18T05:11:56.000Z | 2021-12-05T11:25:38.000Z | test/funcional/test_framework/authproxy.py | BaymaxValero/Kron-Project | e56e596ee36e4b6949ebb75a01867c08481139e2 | [
"MIT"
] | 1 | 2021-05-13T19:01:05.000Z | 2021-05-13T19:01:57.000Z | test/funcional/test_framework/authproxy.py | BaymaxValero/Kron-Project | e56e596ee36e4b6949ebb75a01867c08481139e2 | [
"MIT"
] | 1 | 2021-05-18T05:11:58.000Z | 2021-05-18T05:11:58.000Z | # Copyright (c) 2011 Jeff Garzik
# Previous copyright, from python-jsonrpc/jsonrpc/proxy.py:
# Copyright (c) 2007 Jan-Klaas Kollhof
# Copyright (c) 2017-2020 The Kron Core developers
#
# This file is part of jsonrpc.
#
# jsonrpc is free software; you can redistribute it and/or modify
# it under the terms of the GNU Les... | 44.767327 | 183 | 0.637289 |
a50bfd6a90ca0e2db9ef3e6505647e87b8f1c989 | 382 | py | Python | hr/models.py | alissonperez/employee-manager | 3a131cd5010eb0295a74e1ab4cd52aa0fbb49690 | [
"MIT"
] | null | null | null | hr/models.py | alissonperez/employee-manager | 3a131cd5010eb0295a74e1ab4cd52aa0fbb49690 | [
"MIT"
] | null | null | null | hr/models.py | alissonperez/employee-manager | 3a131cd5010eb0295a74e1ab4cd52aa0fbb49690 | [
"MIT"
] | null | null | null | from django.db import models
class Department(models.Model):
name = models.CharField(max_length=30, unique=True)
def __str__(self):
return self.name
class Employee(models.Model):
name = models.CharField(max_length=50)
email = models.EmailField(unique=True)
department = models.ForeignKey... | 21.222222 | 55 | 0.704188 |
c03948594fc99f348d44aafb8c6792f38dba2164 | 12,375 | py | Python | vizic/control_widgets.py | ywx649999311/Vizic | c408a8d60afcf5ac193d9f8de1e52a9ad28b349d | [
"MIT"
] | 21 | 2017-01-06T10:59:16.000Z | 2020-10-30T22:28:30.000Z | vizic/control_widgets.py | ywx649999311/Vizic | c408a8d60afcf5ac193d9f8de1e52a9ad28b349d | [
"MIT"
] | 10 | 2016-12-08T03:15:37.000Z | 2017-07-10T09:17:31.000Z | vizic/control_widgets.py | ywx649999311/Vizic | c408a8d60afcf5ac193d9f8de1e52a9ad28b349d | [
"MIT"
] | 4 | 2017-01-06T08:53:39.000Z | 2020-10-30T22:28:33.000Z | from .astroleaflet import *
# class NotebookUrl(Widget):
# """Widget to get Jupyter server url.
#
# The actural url of the Jupyter server is assigned to class variable ``nb_url`` after the widget being rendered.
# """
# _view_name = Unicode('NotebookUrlView').tag(sync=True)
# _view_module = Unicod... | 32.651715 | 117 | 0.604364 |
0234674b0cea8862a0acc7a1ab3178b28def3347 | 1,269 | py | Python | algorithms/matrix/spiral_traversal.py | GuyHassan/algo | 26d58aef1d87c33b4390b6f7ddeb93c3c124db39 | [
"MIT"
] | null | null | null | algorithms/matrix/spiral_traversal.py | GuyHassan/algo | 26d58aef1d87c33b4390b6f7ddeb93c3c124db39 | [
"MIT"
] | null | null | null | algorithms/matrix/spiral_traversal.py | GuyHassan/algo | 26d58aef1d87c33b4390b6f7ddeb93c3c124db39 | [
"MIT"
] | null | null | null | """
Given a matrix of m x n elements (m rows, n columns),
return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
"""
def spiral_traversal(matrix):
res = []
if len(matrix) == 0:
re... | 24.403846 | 65 | 0.580772 |
2817fdfb6ec0d8831de8fc4a29632e1b12d996ae | 1,560 | py | Python | test/test_create_automatic_tokens_forwarding_response_item_token_data_bitcoin_omni_token.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_create_automatic_tokens_forwarding_response_item_token_data_bitcoin_omni_token.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_create_automatic_tokens_forwarding_response_item_token_data_bitcoin_omni_token.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | 1 | 2021-07-21T03:35:18.000Z | 2021-07-21T03:35:18.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... | 42.162162 | 484 | 0.802564 |
7f441f7e252f37c6925ba70b61898a4ccf62853e | 2,004 | py | Python | rss_feed_parser.py | nalindas9/rss-feed-parser | 9d39f6a8be682e925d7efb7e3fd126bfb1493db6 | [
"MIT"
] | null | null | null | rss_feed_parser.py | nalindas9/rss-feed-parser | 9d39f6a8be682e925d7efb7e3fd126bfb1493db6 | [
"MIT"
] | null | null | null | rss_feed_parser.py | nalindas9/rss-feed-parser | 9d39f6a8be682e925d7efb7e3fd126bfb1493db6 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import pandas as pd
class RSSFeedParser:
def __init__(self) -> None:
pass
def getResponse(self, url: str) -> requests.Response:
"""
Get the response from the url
"""
try:
resp = requests.get(url)
retu... | 31.3125 | 79 | 0.532435 |
4fff8c3aa947c0a4712a0d5a1d67d6e149af0595 | 3,109 | py | Python | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.106061 | 134 | 0.692827 |
28b4da5315329d7ff00f1bd1b18453a7482cdb46 | 10,037 | py | Python | src/zivid_manager.py | SeungBack/assembly_camera_calibrator | 294251b9abdf8c1547e446c3661943eb5df2aed3 | [
"MIT"
] | 2 | 2020-07-07T12:28:09.000Z | 2020-09-22T11:13:22.000Z | src/zivid_manager.py | SeungBack/assembly_camera_manager | 294251b9abdf8c1547e446c3661943eb5df2aed3 | [
"MIT"
] | null | null | null | src/zivid_manager.py | SeungBack/assembly_camera_manager | 294251b9abdf8c1547e446c3661943eb5df2aed3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import rosnode
from zivid_camera.srv import *
from std_msgs.msg import String
from sensor_msgs.msg import PointCloud2, Image
import numpy as np
from fiducial_msgs.msg import FiducialTransformArray
from assembly_camera_manager.srv import ExtrinsicCalibrate
import tf
from tf import tra... | 47.34434 | 148 | 0.663943 |
6a600bf65e6ce2dc67f4df370f5c3f8250e5021d | 6,576 | py | Python | train/create_parameter_space.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | train/create_parameter_space.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | train/create_parameter_space.py | neurosimata/seizy | 2e18851f90cdda21ad85af3b2224eff17b5689bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
### ------------------------- IMPORTS ------------------------ ###
import os
import numpy as np
import pandas as pd
from train.feature_settings import metrics
### ---------------------------------------------------------- ###
class CreateCatalogue:
"""
Create parameter catalogue from b... | 34.429319 | 120 | 0.558242 |
cb7c2e1f16e5834b0dc32a4e0c18ae24a15b9950 | 4,447 | py | Python | openstack_dashboard/contrib/developer/profiler/middleware.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/contrib/developer/profiler/middleware.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | 12 | 2022-03-22T07:28:29.000Z | 2022-03-22T07:29:55.000Z | openstack_dashboard/contrib/developer/profiler/middleware.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 36.154472 | 78 | 0.660895 |
e9366c132f964757d915262d9290e35ad84cbb21 | 1,017 | py | Python | examples/operation_layerSet.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | examples/operation_layerSet.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | examples/operation_layerSet.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | """A examples to show you how to operation layerSet."""
from photoshop import Session
with Session(action="new_document") as ps:
docRef = ps.active_document
# Add a new layerSet.
new_layer_set = docRef.layerSets.add()
# Print the layerSet count.
ps.echo(docRef.layerSets.length)
ps.echo(len(doc... | 29.911765 | 68 | 0.712881 |
a0e18eb16b60165b1082cba92b7b84da90f3d169 | 25,921 | py | Python | python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py | xingjing1/Paddle | af886995ac38bd26588de33205a19eb1e72fecbf | [
"Apache-2.0"
] | 3 | 2017-05-11T11:10:13.000Z | 2017-10-23T09:13:14.000Z | python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py | gongweibao/Paddle | c91b1e039f29a62fb3050f979afecd71eabd734f | [
"Apache-2.0"
] | null | null | null | python/paddle/distributed/fleet/meta_optimizers/sharding/utils.py | gongweibao/Paddle | c91b1e039f29a62fb3050f979afecd71eabd734f | [
"Apache-2.0"
] | 2 | 2021-02-19T06:42:29.000Z | 2021-02-26T12:16:05.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.152022 | 117 | 0.560164 |
4582afb04af443eb0c88aaee9ab2f20917b9d340 | 10,418 | py | Python | fabfile.py | yashpatel12/CPIMS-api-newtest | d5129eb3aa034f70414a2471a72c0a74ad95f6ca | [
"Apache-2.0"
] | null | null | null | fabfile.py | yashpatel12/CPIMS-api-newtest | d5129eb3aa034f70414a2471a72c0a74ad95f6ca | [
"Apache-2.0"
] | null | null | null | fabfile.py | yashpatel12/CPIMS-api-newtest | d5129eb3aa034f70414a2471a72c0a74ad95f6ca | [
"Apache-2.0"
] | null | null | null | from __future__ import with_statement
from fabric.api import settings, env, prefix
from fabric.contrib.console import confirm
from fabric.operations import sudo, run, local, put
from fabric.context_managers import cd
import os
env.hosts = [os.environ.get('CPIMS_APP_HOST')]
env.user = os.environ.get('CPIMS_APP_USER')
e... | 50.328502 | 176 | 0.691304 |
1e2d22d60c96fc1c321ea2bb429dc8ad347f470b | 3,721 | py | Python | vendor/jx_python/cubes/aggs.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | vendor/jx_python/cubes/aggs.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | vendor/jx_python/cubes/aggs.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http:# mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, divisio... | 33.223214 | 123 | 0.531846 |
3806b1539bef36ecbc1a381903bdfcb38a7c712d | 287 | py | Python | Training/Gradient Clipping/tf.clip_by_value.py | Asurada2015/TFAPI_translation | 1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf | [
"Apache-2.0"
] | 7 | 2017-10-19T13:59:24.000Z | 2019-11-26T03:40:08.000Z | Training/Gradient Clipping/tf.clip_by_value.py | Asurada2015/TFAPI_translation | 1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf | [
"Apache-2.0"
] | null | null | null | Training/Gradient Clipping/tf.clip_by_value.py | Asurada2015/TFAPI_translation | 1c8d9432b0b8a21c2bb5670b25456d095d0a1ecf | [
"Apache-2.0"
] | 5 | 2018-08-22T02:57:03.000Z | 2020-03-05T07:14:21.000Z | import tensorflow as tf
import numpy as np
# tf.clip_by_value(A, min, max):输入一个张量A,把A中的每一个元素的值都压缩在min和max之间。
# 小于min的让它等于min,大于max的元素的值等于max。
A = np.array([[1, 1, 2, 4], [3, 4, 8, 5]])
with tf.Session()as sess:
print(sess.run(tf.clip_by_value(A, 2, 5)))
#
# [[2 2 2 4]
# [3 4 5 5]] | 26.090909 | 65 | 0.658537 |
ce3931601ca45ae4012c5071986d3a1fa9a1e28c | 1,535 | py | Python | OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/common/targetLanguage/ev3dev/functionsBasic.py | RaghuvirShirodkar/openroberta-lab | ab73c72a593cdeb42925c9b279530110b17db136 | [
"Apache-2.0"
] | null | null | null | OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/common/targetLanguage/ev3dev/functionsBasic.py | RaghuvirShirodkar/openroberta-lab | ab73c72a593cdeb42925c9b279530110b17db136 | [
"Apache-2.0"
] | null | null | null | OpenRobertaServer/src/test/resources/crossCompilerTests/_expected/common/targetLanguage/ev3dev/functionsBasic.py | RaghuvirShirodkar/openroberta-lab | ab73c72a593cdeb42925c9b279530110b17db136 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import
from roberta.ev3 import Hal
from ev3dev import ev3 as ev3dev
import math
import os
import time
class BreakOutOfALoop(Exception): pass
class ContinueLoop(Exception): pass
_brickConfiguration = {
'wheel-diameter': 5.6,
'track-width': 18.0,
'actors': ... | 20.466667 | 60 | 0.624756 |
a55846ff3881906b2c805d9db3d1ad3f381b1bf0 | 1,905 | py | Python | anime_downloader/extractors/mp4upload.py | itachi1706/anime-downloader | 98a847b6af18c52ebf11c883965b562627057521 | [
"Unlicense"
] | 1 | 2019-09-26T02:38:31.000Z | 2019-09-26T02:38:31.000Z | anime_downloader/extractors/mp4upload.py | itachi1706/anime-downloader | 98a847b6af18c52ebf11c883965b562627057521 | [
"Unlicense"
] | null | null | null | anime_downloader/extractors/mp4upload.py | itachi1706/anime-downloader | 98a847b6af18c52ebf11c883965b562627057521 | [
"Unlicense"
] | null | null | null | import logging
import re
from bs4 import BeautifulSoup
from anime_downloader.extractors.base_extractor import BaseExtractor
from anime_downloader import session
session = session.get_session()
class MP4Upload(BaseExtractor):
'''Extracts video url from mp4upload embed pages, performs a request
back to the no... | 35.943396 | 80 | 0.6 |
2cfd3e3b8c13404d89233f2ba95ede79e03966e1 | 2,151 | py | Python | v1_backend/src/v1_awattprice/fastapi_conf/api.py | sp4c38/AwattarApp | b914e8042e5cdcb84485d6d45133a00244662bda | [
"BSD-3-Clause"
] | 2 | 2020-09-06T18:17:20.000Z | 2020-09-06T19:06:19.000Z | v1_backend/src/v1_awattprice/fastapi_conf/api.py | sp4c38/AwattarApp | b914e8042e5cdcb84485d6d45133a00244662bda | [
"BSD-3-Clause"
] | null | null | null | v1_backend/src/v1_awattprice/fastapi_conf/api.py | sp4c38/AwattarApp | b914e8042e5cdcb84485d6d45133a00244662bda | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
AWattPrice API module
Poll the Awattar API
"""
__author__ = "Frank Becker <fb@alien8.de>"
__copyright__ = "Frank Becker"
__license__ = "mit"
from fastapi import BackgroundTasks, FastAPI, Request, status
from fastapi.responses import JSONResponse
from v1_awattprice import apns
from v1_a... | 29.067568 | 97 | 0.734077 |
3b3f9181722b2e0892c9f98efeb764852f50dd26 | 3,571 | py | Python | 0_hcphotonics/usbcounter/arthurparse.py | zhengyang-c/photonLauncher | 76215f47ccd1178f1826834533f5702c4b8f2c35 | [
"Apache-2.0"
] | null | null | null | 0_hcphotonics/usbcounter/arthurparse.py | zhengyang-c/photonLauncher | 76215f47ccd1178f1826834533f5702c4b8f2c35 | [
"Apache-2.0"
] | null | null | null | 0_hcphotonics/usbcounter/arthurparse.py | zhengyang-c/photonLauncher | 76215f47ccd1178f1826834533f5702c4b8f2c35 | [
"Apache-2.0"
] | null | null | null | import Gnuplot
import time
import argparse
import os, sys
import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils
import json
import random
import numpy as np
def main():
parser = argparse.ArgumentParser(description = "Plots parsed json objects from usbcounter, arthur.py script. Plots a histogram of the counts by def... | 41.523256 | 159 | 0.565668 |
f940574abd08b0846e061d128115e9e9b4edfbc0 | 13,151 | py | Python | coresched_vs.py | dreibh/planetlab-lxc-nodemanager | e3b9608c2e4184851f1fd2be7e449e62153789cf | [
"BSD-3-Clause"
] | null | null | null | coresched_vs.py | dreibh/planetlab-lxc-nodemanager | e3b9608c2e4184851f1fd2be7e449e62153789cf | [
"BSD-3-Clause"
] | null | null | null | coresched_vs.py | dreibh/planetlab-lxc-nodemanager | e3b9608c2e4184851f1fd2be7e449e62153789cf | [
"BSD-3-Clause"
] | null | null | null | """Whole core scheduling
"""
import logger
import os
glo_coresched_simulate = False
class CoreSched:
""" Whole-core scheduler
The main entrypoint is adjustCores(self, slivers) which takes a
dictionary of sliver records. The cpu_cores field is pulled from the
effective rspec (rec["_rspec... | 34.426702 | 120 | 0.556384 |
63321b5c5a67c526be01fe3981c304c28e447ad5 | 104,718 | py | Python | dataLoader.py | LRussianStand/ljTransparent | e0bd31a1bf3c5ab6056157e8c5233689b1c41d53 | [
"MIT"
] | 3 | 2021-06-08T04:23:13.000Z | 2021-07-13T07:42:20.000Z | dataLoader.py | LRussianStand/ljTransparent | e0bd31a1bf3c5ab6056157e8c5233689b1c41d53 | [
"MIT"
] | null | null | null | dataLoader.py | LRussianStand/ljTransparent | e0bd31a1bf3c5ab6056157e8c5233689b1c41d53 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*- 可采用中文注释
import glob
import numpy as np
import os.path as osp
from PIL import Image
import random
import struct
from torch.utils.data import Dataset
import os
import scipy.ndimage as ndimage
import h5py
import cv2
import xml.etree.ElementTree as et
from skimage.transform import resize
from mesh_t... | 44.166175 | 135 | 0.52163 |
26dce4bd40b3a53d382d21e3a778d76eca390d22 | 361 | py | Python | leetcode/python/problems/reverseInt.py | tuvshinot/algorithm-sorting-DS | 784c2338fb92f9d2f4da6294f242563031a09c4c | [
"MIT"
] | null | null | null | leetcode/python/problems/reverseInt.py | tuvshinot/algorithm-sorting-DS | 784c2338fb92f9d2f4da6294f242563031a09c4c | [
"MIT"
] | null | null | null | leetcode/python/problems/reverseInt.py | tuvshinot/algorithm-sorting-DS | 784c2338fb92f9d2f4da6294f242563031a09c4c | [
"MIT"
] | null | null | null |
def int_reverser(x : int) -> int:
""" Reversing int using pop push
algorithm run time 12ms"""
rev = 0
minus = 1
if x < 0:
minus = -1
x = x * minus
while x != 0:
pop = x % 10
x = int(x / 10)
rev = rev * 10 + pop
if rev < -2**31 or rev > 2**31:
... | 21.235294 | 39 | 0.445983 |
bbfa524b8e1b4c3bcded363b5a912c15ea7e0ba4 | 1,719 | py | Python | fluent.syntax/tests/syntax/test_ast_json.py | shlomyb-di/python-fluent | 284507d5aed60a2d4bc9b4433ff7fef121529d6f | [
"Apache-2.0"
] | 155 | 2017-02-15T11:39:45.000Z | 2022-03-15T19:06:58.000Z | fluent.syntax/tests/syntax/test_ast_json.py | shlomyb-di/python-fluent | 284507d5aed60a2d4bc9b4433ff7fef121529d6f | [
"Apache-2.0"
] | 113 | 2017-03-14T16:47:57.000Z | 2022-02-03T20:53:07.000Z | fluent.syntax/tests/syntax/test_ast_json.py | shlomyb-di/python-fluent | 284507d5aed60a2d4bc9b4433ff7fef121529d6f | [
"Apache-2.0"
] | 18 | 2017-02-08T01:22:51.000Z | 2021-12-21T03:07:34.000Z | import unittest
from tests.syntax import dedent_ftl
from fluent.syntax.ast import from_json
from fluent.syntax.parser import FluentParser
class TestASTJSON(unittest.TestCase):
maxDiff = None
def setUp(self):
self.parser = FluentParser()
def test_simple_resource(self):
input = """\
... | 25.279412 | 70 | 0.52356 |
51d31db20ab142cb1529bba3a929437ff7d50029 | 6,247 | py | Python | src/protean/adapters/event_store/__init__.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | src/protean/adapters/event_store/__init__.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | src/protean/adapters/event_store/__init__.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | import importlib
import logging
from collections import defaultdict
from typing import List, Optional, Type
from protean import BaseEvent, BaseEventHandler
from protean.core.command import BaseCommand
from protean.core.command_handler import BaseCommandHandler
from protean.core.event_sourced_repository import (
B... | 34.899441 | 99 | 0.643669 |
bf998f130a7f99fb546a0792635172e74ed0de07 | 1,876 | py | Python | userbot/plugins/eval.py | sudo-akashi/SudoBot | 7e82b2db0475182705b14e30f635a14ad1d0f482 | [
"Apache-2.0"
] | 2 | 2020-07-26T02:48:25.000Z | 2020-07-27T02:22:01.000Z | userbot/plugins/eval.py | sudo-akashi/SudoBot | 7e82b2db0475182705b14e30f635a14ad1d0f482 | [
"Apache-2.0"
] | null | null | null | userbot/plugins/eval.py | sudo-akashi/SudoBot | 7e82b2db0475182705b14e30f635a14ad1d0f482 | [
"Apache-2.0"
] | 3 | 2020-07-25T18:16:43.000Z | 2020-08-15T10:42:41.000Z | from telethon import events, errors, functions, types
import inspect
import traceback
import asyncio
import sys
import io
from uniborg.util import admin_cmd
@borg.on(admin_cmd("eval", allow_sudo=True))
@borg.on(admin_cmd("eval"))
async def _(event):
if event.fwd_from:
return
await event.edit("Processi... | 26.422535 | 86 | 0.608742 |
a322c1f7004630d8ea582f9e23494de758ae980b | 196 | py | Python | oms_cms/backend/partners/apps.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | 18 | 2019-07-11T18:34:10.000Z | 2021-11-20T06:34:39.000Z | oms_cms/backend/partners/apps.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | 13 | 2019-07-24T11:27:58.000Z | 2022-03-28T01:07:31.000Z | oms_cms/backend/partners/apps.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | 18 | 2019-07-08T18:07:21.000Z | 2021-11-03T10:33:07.000Z | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class PartnersConfig(AppConfig):
name = 'oms_cms.backend.partners'
verbose_name = _('Партнеры')
| 24.5 | 55 | 0.77551 |
457c35de6823a9823cf350f8d0a31a354fc8da67 | 2,513 | py | Python | Scripts/settings.py | muntasirraihan/timestamed-ycsb | 56e3f23c0b5d6c19ba0c4ddfe228891f6cccec58 | [
"Apache-2.0"
] | 5 | 2015-10-07T13:37:56.000Z | 2019-11-26T10:01:27.000Z | Scripts/settings.py | muntasirraihan/PCAP | 56e3f23c0b5d6c19ba0c4ddfe228891f6cccec58 | [
"Apache-2.0"
] | null | null | null | Scripts/settings.py | muntasirraihan/PCAP | 56e3f23c0b5d6c19ba0c4ddfe228891f6cccec58 | [
"Apache-2.0"
] | null | null | null | import os
# clusters used for running cassandra, ycsb, and consistency computation
db_cluster = "cloud-test"
comp_cluster = "cluster-test"
# Objects used for determining host lists
all_hosts = range(0,0)
bad_hosts = []
hosts_prefix = "10.1.1."
# Directories
#home_dir = os.environ['HOME']
home_dir = "/proj/ISS"
base... | 25.383838 | 118 | 0.74811 |
4491f156e030ff926c789f92f485a3f86fb6c07e | 1,603 | py | Python | simple-backend/nlpviewer_backend/handlers/user.py | aerinzhang/stave | 5ffc8e3a914664f669f5f0d747f66fd2ed418da5 | [
"Apache-2.0"
] | null | null | null | simple-backend/nlpviewer_backend/handlers/user.py | aerinzhang/stave | 5ffc8e3a914664f669f5f0d747f66fd2ed418da5 | [
"Apache-2.0"
] | null | null | null | simple-backend/nlpviewer_backend/handlers/user.py | aerinzhang/stave | 5ffc8e3a914664f669f5f0d747f66fd2ed418da5 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.urls import include, path
from django.http import HttpResponse, JsonResponse
from django.forms import model_to_dict
import json
from ..models import User
from ..lib.require_login import require_login
@require_login
def listAll(request):
users = User.objects.all().value... | 23.573529 | 54 | 0.717405 |
5a946acac2baa71ad3c46f101859e7c2c497ccd1 | 32,157 | py | Python | disaggregator/build/pandas/pandas/tseries/tdi.py | pjkundert/wikienergy | ac3a13780bccb001c81d6f8ee27d3f5706cfa77e | [
"MIT"
] | 29 | 2015-01-08T19:20:37.000Z | 2021-04-20T08:25:56.000Z | disaggregator/build/pandas/pandas/tseries/tdi.py | afcarl/wikienergy | ac3a13780bccb001c81d6f8ee27d3f5706cfa77e | [
"MIT"
] | null | null | null | disaggregator/build/pandas/pandas/tseries/tdi.py | afcarl/wikienergy | ac3a13780bccb001c81d6f8ee27d3f5706cfa77e | [
"MIT"
] | 17 | 2015-02-01T18:12:04.000Z | 2020-06-15T14:13:04.000Z | """ implement the TimedeltaIndex """
import operator
import datetime
from datetime import timedelta
import numpy as np
from pandas.core.common import (ABCSeries, _TD_DTYPE, _INT64_DTYPE,
is_timedelta64_dtype, _maybe_box,
_values_from_object, isnull)
from... | 32.028884 | 106 | 0.574556 |
7782e529f7d9b33c44cd303006cef8b8198cde17 | 684 | py | Python | backend/core/blueprints/logs/__init__.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | 3 | 2022-01-28T18:30:56.000Z | 2022-03-30T17:39:05.000Z | backend/core/blueprints/logs/__init__.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | null | null | null | backend/core/blueprints/logs/__init__.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | 1 | 2022-02-21T12:49:01.000Z | 2022-02-21T12:49:01.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36 | 74 | 0.76462 |
27fac59625edab7c0d38542078303c8031e9dfb1 | 15,302 | py | Python | modules/coupling/fluid_flow0d.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | modules/coupling/fluid_flow0d.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | modules/coupling/fluid_flow0d.py | marchirschvogel/amb | af48b2a672cfcfb7a081020cda599fde85aa6b65 | [
"BSD-4-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019-2021, Dr.-Ing. Marc Hirschvogel
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import time, sys, math
import numpy as np
from dolfinx import fem
import ufl
from petsc4... | 52.765517 | 354 | 0.646582 |
84523088794badd63368a152bdb2b535d8a90380 | 8,438 | py | Python | tensr-flow-cat-dog.py | ypraveen07/Neural_Network1 | 69cbcd42e8941979ac6a10e76e4aea327ebbff96 | [
"Apache-2.0"
] | null | null | null | tensr-flow-cat-dog.py | ypraveen07/Neural_Network1 | 69cbcd42e8941979ac6a10e76e4aea327ebbff96 | [
"Apache-2.0"
] | null | null | null | tensr-flow-cat-dog.py | ypraveen07/Neural_Network1 | 69cbcd42e8941979ac6a10e76e4aea327ebbff96 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import matplotlib.pyplot as plt
import os
cwd = os.getcwd()
print(cwd)
a = tf.truncated_normal([16,128,128,3])
sess = tf.Session()
sess.run(tf.global_variables_initializer())
sess.run(tf.shape(a))
b=tf.reshape(a,[16,128*128*3])
sess.run(tf.shape(b))
print(a)
import os
os.... | 25.569697 | 126 | 0.651221 |
3e543d1c1a5cb06dc39364838f05f4310a58c14d | 780 | py | Python | Commands/OpenConfig.py | Libai2333/LitsQuestions | be98f74a7909325416848d97e16fe17028e19c98 | [
"MIT"
] | null | null | null | Commands/OpenConfig.py | Libai2333/LitsQuestions | be98f74a7909325416848d97e16fe17028e19c98 | [
"MIT"
] | null | null | null | Commands/OpenConfig.py | Libai2333/LitsQuestions | be98f74a7909325416848d97e16fe17028e19c98 | [
"MIT"
] | null | null | null | from Commands.Base import LitsQuestionsCommand
from PythonSheep.FileSheep.AutoOpen import AutoOpen
from WareHouse import wareHouse
class OpenConfig(LitsQuestionsCommand):
def run(self, userNowUsingLanguage:str, mainWareHouse:wareHouse):
AutoOpenControler = AutoOpen()
print(mainWareHouse.langua... | 41.052632 | 129 | 0.791026 |
0e4252c0c4a980bbc828c01bdb71892bee54e971 | 5,131 | py | Python | thonny/plugins/about.py | webduino-cn/thonny | 74da2278aa018eafec697c2b92e2355237669ecd | [
"MIT"
] | 1 | 2021-06-12T22:24:40.000Z | 2021-06-12T22:24:40.000Z | Thonny/Lib/site-packages/thonny/plugins/about.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 30 | 2019-01-04T10:14:56.000Z | 2020-10-12T14:00:31.000Z | Thonny/Lib/site-packages/thonny/plugins/about.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 3 | 2018-11-24T14:00:30.000Z | 2019-07-02T02:32:26.000Z | # -*- coding: utf-8 -*-
import datetime
import platform
import tkinter as tk
import tkinter.font
import webbrowser
from tkinter import ttk
import thonny
from thonny import get_workbench, ui_utils
from thonny.misc_utils import get_python_version_string
from thonny.ui_utils import CommonDialog
class AboutDialog(Commo... | 31.869565 | 98 | 0.565777 |
dc83787eba0b68c3ef84c7307e4a781395672900 | 8,448 | py | Python | examples/_attic/adapt_agent/adapt_agent.py | hiway/python-zentropi | 006f4a6de8b6691477fa1416476cd6cef665c918 | [
"Apache-2.0"
] | 5 | 2017-05-28T18:15:38.000Z | 2021-07-15T22:31:33.000Z | examples/_attic/adapt_agent/adapt_agent.py | hiway/python-zentropi | 006f4a6de8b6691477fa1416476cd6cef665c918 | [
"Apache-2.0"
] | null | null | null | examples/_attic/adapt_agent/adapt_agent.py | hiway/python-zentropi | 006f4a6de8b6691477fa1416476cd6cef665c918 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import datetime
from pprint import pprint
from string import punctuation
import os
import random
import re
import yaml
from adapt.intent import IntentBuilder
from adapt.engine import IntentDeterminationEngine
from chronyk import chronyk
from dateparser import parse
from zentropi import Agent, Frame, KIN... | 31.879245 | 121 | 0.611624 |
53bf3165dbbbba13f90a1d4facec243d2db22863 | 7,444 | py | Python | rabbitMQ/rbt.py | huynhp24/Project-Theia | cfc0eba342c27050905e0ec34267b37356bfa725 | [
"MIT"
] | null | null | null | rabbitMQ/rbt.py | huynhp24/Project-Theia | cfc0eba342c27050905e0ec34267b37356bfa725 | [
"MIT"
] | 3 | 2021-04-23T18:00:00.000Z | 2021-05-03T21:41:26.000Z | rabbitMQ/rbt.py | huynhp24/Project-Theia | cfc0eba342c27050905e0ec34267b37356bfa725 | [
"MIT"
] | null | null | null | import threading
import time
import pika, sys, os
import boto3
from PIL import Image
import urllib.parse
import re
from urllib.request import Request, urlopen
from io import BytesIO
import shutil
import requests
sys.path.insert(1,'/opt/theia/serverside')
import labels, textdetect, Nat_Lang_Gen, translate
# from servers... | 32.938053 | 157 | 0.602499 |
2627671d4a137c47e7f15063f5bd7f6726472c61 | 6,999 | py | Python | traj/src/traj/synchronize_joint_motion.py | jonbinney/trajectory_smoothing | 0e2b8d7d646c96c0c22eef1371bcd42d169121dc | [
"Apache-2.0"
] | 8 | 2020-03-04T07:49:44.000Z | 2021-09-08T08:32:40.000Z | traj/src/traj/synchronize_joint_motion.py | iron-ox/trajectory_smoothing | 4e9f45b3c31f254e8443936fd0cdb1940c022460 | [
"Apache-2.0"
] | 21 | 2019-05-07T22:32:14.000Z | 2020-12-30T23:26:07.000Z | traj/src/traj/synchronize_joint_motion.py | jonbinney/trajectory_smoothing | 0e2b8d7d646c96c0c22eef1371bcd42d169121dc | [
"Apache-2.0"
] | 8 | 2019-04-24T23:44:09.000Z | 2021-09-07T08:16:57.000Z | #!/usr/bin/env python
import math
import numpy as np
import traj
import rospy
def synchronize_joint_motion(t_syn, pos_diff, v_start, v_end, abs_max_pos, abs_max_vel, abs_max_acc, abs_max_jrk):
'''
this function selects a motion profile for a general trajectory segment considering the total motion time of the segme... | 43.74375 | 167 | 0.675096 |
9520d49478732e22c744b658635a91be123057eb | 2,718 | py | Python | domain/bitbucket.py | keshrisohit/devops_metrics | 47252869a9154763d86e170be792cdd804c52871 | [
"MIT"
] | 6 | 2020-02-12T04:44:09.000Z | 2021-09-09T17:02:21.000Z | domain/bitbucket.py | keshrisohit/devops_metrics | 47252869a9154763d86e170be792cdd804c52871 | [
"MIT"
] | 2 | 2019-12-30T08:44:09.000Z | 2021-06-02T00:50:15.000Z | domain/bitbucket.py | keshrisohit/devops_metrics | 47252869a9154763d86e170be792cdd804c52871 | [
"MIT"
] | 2 | 2019-12-30T14:35:51.000Z | 2021-04-05T07:45:01.000Z | import requests
from config import BITBUCKET_CLIENT_ID, BITBUCKET_SECRET_KEY
from domain.utils import get_access_token
client_id = BITBUCKET_CLIENT_ID
client_secret = BITBUCKET_SECRET_KEY
token_url = "https://bitbucket.org/site/oauth2/access_token"
class BitbucketClient(object):
def __init__(self, access_token=... | 28.3125 | 106 | 0.593819 |
c60638c594da2e29459e99c040c213553859bc04 | 700 | py | Python | sls/ec2_alarms_api/create_ec2_alarms/tests/bdd/steps/steps.py | aws-samples/amazon-ec2-cloudwatch-alarms-sls | 199d6500797ff32d9cbad966e24cdc40184ed56b | [
"MIT-0"
] | null | null | null | sls/ec2_alarms_api/create_ec2_alarms/tests/bdd/steps/steps.py | aws-samples/amazon-ec2-cloudwatch-alarms-sls | 199d6500797ff32d9cbad966e24cdc40184ed56b | [
"MIT-0"
] | null | null | null | sls/ec2_alarms_api/create_ec2_alarms/tests/bdd/steps/steps.py | aws-samples/amazon-ec2-cloudwatch-alarms-sls | 199d6500797ff32d9cbad966e24cdc40184ed56b | [
"MIT-0"
] | null | null | null | """
Contains behave step implementation
"""
# pylint: disable = import-error,no-name-in-module,C0413,missing-function-docstring,wrong-import-order
import os
from behave import when, given
from ec2_alarms_api.common_bdd import common_steps
from sls.ec2_alarms_api.create_ec2_alarms.index import handler
THISDIR = os.pa... | 29.166667 | 102 | 0.791429 |
7e7d491d8329f4b704c29271d9e8edaedb010c8a | 3,262 | py | Python | Addition/PythonPlotter/Valkyrie/plot_centroid.py | shbang91/PnC | 880cbbcf96a48a93a0ab646634781e4f112a71f6 | [
"MIT"
] | null | null | null | Addition/PythonPlotter/Valkyrie/plot_centroid.py | shbang91/PnC | 880cbbcf96a48a93a0ab646634781e4f112a71f6 | [
"MIT"
] | null | null | null | Addition/PythonPlotter/Valkyrie/plot_centroid.py | shbang91/PnC | 880cbbcf96a48a93a0ab646634781e4f112a71f6 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import os
figure_number = 0
col_index = 0
row_index = 0
file_path = os.getcwd() + "/../../../ExperimentDataCheck/"
## read files
data_com_pos = \
np.genfromtxt(file_path+'com_pos.txt', delimiter=None, dtype=(float))
data_com... | 30.773585 | 80 | 0.679951 |
5624f74ab0f575f9434587b84cb28d1d4ce51f9d | 44,375 | py | Python | train.py | bug0306/Sign-language-recognition-based-on-TensorFlow | 3467e03f28f037f64787e8c8712ed7c7a9ffabfc | [
"MIT"
] | null | null | null | train.py | bug0306/Sign-language-recognition-based-on-TensorFlow | 3467e03f28f037f64787e8c8712ed7c7a9ffabfc | [
"MIT"
] | null | null | null | train.py | bug0306/Sign-language-recognition-based-on-TensorFlow | 3467e03f28f037f64787e8c8712ed7c7a9ffabfc | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
#from datetime import datetime
import hashlib
import os.path
import random
import re
import struct
import sys
import tarfile
import numpy as np
from six.moves import urllib
import tensorflow as... | 43.848814 | 123 | 0.63707 |
19b3822e55c6f577f53eb97c1b40ba38566011df | 893 | py | Python | homeassistant/components/whois/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/whois/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/whois/diagnostics.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Diagnostics support for Whois."""
from __future__ import annotations
from typing import Any
from whois import Domain
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .const import DOMA... | 31.892857 | 82 | 0.753639 |
6fe18832819d5f17cc7866edfe0bb749be63d394 | 73,968 | py | Python | src/NZGBplugin/Resources.py | strk/gazetteer | 7c1a46827aaef47ffebe10f7d9dde1bbf477e6fe | [
"MIT"
] | null | null | null | src/NZGBplugin/Resources.py | strk/gazetteer | 7c1a46827aaef47ffebe10f7d9dde1bbf477e6fe | [
"MIT"
] | null | null | null | src/NZGBplugin/Resources.py | strk/gazetteer | 7c1a46827aaef47ffebe10f7d9dde1bbf477e6fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
#
# New Zealand Geographic Board gazetteer application,
# Crown copyright (c) 2020, Land Information New Zealand on behalf of
# the New Zealand Government.
#
# This file is released under the MIT licence. See th... | 61.486284 | 129 | 0.724732 |
b4adf53face319e88f2f538899fa89bd95dcb535 | 4,879 | py | Python | tests/kafkatest/tests/copycat_test.py | yobennett/kafka | e582447adb4708731aff74aa294e7ce2b30b0a41 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/copycat_test.py | yobennett/kafka | e582447adb4708731aff74aa294e7ce2b30b0a41 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/copycat_test.py | yobennett/kafka | e582447adb4708731aff74aa294e7ce2b30b0a41 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 51.357895 | 182 | 0.71613 |
a758c3c4ceeeb41e01cf1006cf4decae59ae3a11 | 397 | py | Python | data/dls/update_xyz.py | wjm41/soapgp | ef57cebb7413abb96b54983141e188dff5166d03 | [
"MIT"
] | 18 | 2020-05-02T19:50:31.000Z | 2022-02-11T16:07:52.000Z | data/dls/update_xyz.py | SuperXiang/soapgp | ef57cebb7413abb96b54983141e188dff5166d03 | [
"MIT"
] | 1 | 2020-11-09T20:47:43.000Z | 2020-11-16T21:01:35.000Z | data/dls/update_xyz.py | SuperXiang/soapgp | ef57cebb7413abb96b54983141e188dff5166d03 | [
"MIT"
] | 9 | 2020-11-22T17:23:29.000Z | 2022-02-16T05:47:06.000Z | import pandas as pd
import sys
smiles_name = sys.argv[1]+'.can'
xyz_name = sys.argv[1]+'.xyz'
SMILES_df = pd.read_csv(smiles_name, header=0, names=['smiles','name'])
i=0
xyz_file = open(xyz_name,'r')
for line in xyz_file:
if line=='\n':
myrow = SMILES_df.iloc[i]
line = 'smiles="'+myrow['smiles']... | 22.055556 | 77 | 0.607053 |
4ed7315ceb9c437589df2e86605242f991771a9a | 6,249 | py | Python | vismrc.py | lqhuang/SOD-xfel | 8d4fd0cd18bb9417eea682987eeea19542920620 | [
"Python-2.0",
"OLDAP-2.7",
"OLDAP-2.8"
] | 1 | 2017-01-18T14:55:40.000Z | 2017-01-18T14:55:40.000Z | vismrc.py | lqhuang/SOD-cryoem | 5246f1f37c961234c68a1155ac91485935c293a4 | [
"Python-2.0",
"OLDAP-2.7",
"OLDAP-2.8"
] | null | null | null | vismrc.py | lqhuang/SOD-cryoem | 5246f1f37c961234c68a1155ac91485935c293a4 | [
"Python-2.0",
"OLDAP-2.7",
"OLDAP-2.8"
] | null | null | null | #!/usr/bin/env python2
from __future__ import print_function, division
# First, and before importing any Enthought packages, set the ETS_TOOLKIT
# environment variable to qt4, to tell Traits that we will use Qt.
import sys
import os
os.environ['ETS_TOOLKIT'] = 'qt4'
# By default, the PySide binding will be used. If yo... | 34.910615 | 94 | 0.645703 |
06d1fb4885cdc6be18ffb6b255e1451edf04b0bd | 20 | py | Python | simplenmt/__init__.py | hannlp/SimpleNMT | c071df13cbdb2885a8d0080fa73d412c86f5226a | [
"MIT"
] | 21 | 2021-03-08T03:46:00.000Z | 2022-03-07T11:30:19.000Z | simplenmt/__init__.py | hannlp/SimpleNMT | c071df13cbdb2885a8d0080fa73d412c86f5226a | [
"MIT"
] | 2 | 2021-11-24T03:17:35.000Z | 2021-12-16T08:13:49.000Z | simplenmt/__init__.py | hannlp/SimpleNMT | c071df13cbdb2885a8d0080fa73d412c86f5226a | [
"MIT"
] | 2 | 2021-03-13T04:58:41.000Z | 2021-09-15T03:01:50.000Z |
__version__ = "0.2" | 10 | 19 | 0.65 |
dca708b3ec8fbc478564eaed57004202572b084a | 1,452 | py | Python | venv/lib/python3.6/site-packages/phonenumbers/data/region_UY.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/phonenumbers/data/region_UY.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/phonenumbers/data/region_UY.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | """Auto-generated file, do not edit by hand. UY metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_UY = PhoneMetadata(id='UY', country_code=598, international_prefix='0(?:0|1[3-9]\\d)',
general_desc=PhoneNumberDesc(national_number_pattern='(?:[249]\\d\\d|80)\\d{5}|9... | 85.411765 | 162 | 0.704545 |
105f50bd4c53fb384ea6a6c8dbd4e28b9b2b59f3 | 2,217 | py | Python | database.py | 3anga/brianbot | 3eb6192409beb2d6998a64a6b4d865293e751c95 | [
"Unlicense"
] | null | null | null | database.py | 3anga/brianbot | 3eb6192409beb2d6998a64a6b4d865293e751c95 | [
"Unlicense"
] | null | null | null | database.py | 3anga/brianbot | 3eb6192409beb2d6998a64a6b4d865293e751c95 | [
"Unlicense"
] | null | null | null | import sqlite3
class Database:
def __init__(self, **kw):
self.db = kw['db']
self.connection = sqlite3.connect(kw['db'],
isolation_level=None,
check_same_thread=False)
self.cursor = self.connection.cursor()
... | 36.344262 | 135 | 0.520523 |
00fcdf6699f093f7a1ccfb5b214012c386989813 | 6,346 | py | Python | kolab/tokibi/verb.py | roy029/kolab | 10a3054da5e7c96c575de1336056eee65368c087 | [
"MIT"
] | null | null | null | kolab/tokibi/verb.py | roy029/kolab | 10a3054da5e7c96c575de1336056eee65368c087 | [
"MIT"
] | 1 | 2021-11-14T05:38:27.000Z | 2021-11-14T05:38:27.000Z | kolab/tokibi/verb.py | roy029/kolab | 10a3054da5e7c96c575de1336056eee65368c087 | [
"MIT"
] | 7 | 2020-11-02T13:05:44.000Z | 2022-01-09T11:06:04.000Z | from sys import setrecursionlimit
from janome.tokenizer import Tokenizer
# Verb
class Verb(object):
base: str
vpos: str
mode: int
def _init__(self, base, mode, vpos=None):
self.base = base
self.mode = mode
self.vpos = vpos
# VPOS タイプ
VS = 'VS' # サ変
VZ = 'VZ' # サ変
VK = 'VK... | 25.796748 | 62 | 0.466436 |
95d836ac3c3c58f2dd3467844a574bfa0e2463ed | 2,275 | py | Python | src/unit_1_3.py | tommylees112/scientific-computing | 08a4173287699c7012fdd01de949d299e38aa30c | [
"MIT"
] | 5 | 2021-02-03T02:10:15.000Z | 2022-01-12T13:21:47.000Z | src/unit_1_3.py | tommylees112/scientific-computing | 08a4173287699c7012fdd01de949d299e38aa30c | [
"MIT"
] | 3 | 2021-02-01T16:00:30.000Z | 2021-02-02T17:09:17.000Z | src/unit_1_3.py | tommylees112/scientific-computing | 08a4173287699c7012fdd01de949d299e38aa30c | [
"MIT"
] | 5 | 2021-02-01T15:45:47.000Z | 2022-02-04T12:20:25.000Z | import numpy as np
import matplotlib.pylab as plt
import scipy
import scipy.linalg
import sys
def lu_decomposition(A):
m, n = A.shape
LU = np.copy(A)
pivots = np.empty(n, dtype=int)
# initialise the pivot row and column
h = 0
k = 0
while h < m and k < n:
# Find the k-th pivot:
... | 28.4375 | 87 | 0.578022 |
85fc7d1f6b9f49e847eb6faa80290a6ed316a7c4 | 108 | py | Python | baiduindex/__init__.py | zhyzhyzhy123/baiduindex | 04fd772c25ebce0c5c0a94a1caf046264c76592b | [
"MIT"
] | null | null | null | baiduindex/__init__.py | zhyzhyzhy123/baiduindex | 04fd772c25ebce0c5c0a94a1caf046264c76592b | [
"MIT"
] | null | null | null | baiduindex/__init__.py | zhyzhyzhy123/baiduindex | 04fd772c25ebce0c5c0a94a1caf046264c76592b | [
"MIT"
] | null | null | null | __version__ = '0.0.0'
__author__ = 'zhy'
__describtion__ = 'Spider of Baidu Index'
from .index import index | 21.6 | 41 | 0.740741 |
1f64a5a71ba8caf6c6e24069a04fdaaa925a3cc3 | 39,218 | py | Python | yolact_edge/data/config.py | michaelcukier/yolact_edge | 0453ad74b1e1ec7c197562025a730cc03c49c2c4 | [
"MIT"
] | null | null | null | yolact_edge/data/config.py | michaelcukier/yolact_edge | 0453ad74b1e1ec7c197562025a730cc03c49c2c4 | [
"MIT"
] | 1 | 2021-10-06T09:52:03.000Z | 2021-10-06T09:52:03.000Z | yolact_edge/data/config.py | michaelcukier/yolact_edge | 0453ad74b1e1ec7c197562025a730cc03c49c2c4 | [
"MIT"
] | 2 | 2021-10-06T09:50:17.000Z | 2021-11-05T10:57:09.000Z | from yolact_edge.backbone import ResNetBackbone, VGGBackbone, ResNetBackboneGN, DarkNetBackbone, MobileNetV2Backbone
from math import sqrt
import torch
# for making bounding boxes pretty
COLORS = ((244, 67, 54),
(233, 30, 99),
(156, 39, 176),
(103, 58, 183),
( 63, 81, 181... | 36.515829 | 222 | 0.629532 |
88003416b608fa4dc11e671a2e38ef72c5c157da | 4,262 | py | Python | sim/lib/settings/town_settings_sanfrancisco.py | cculha4/COVID19Incubator | 479b5c8d8f6c5069db2ff88578530ba6c84f8369 | [
"MIT"
] | null | null | null | sim/lib/settings/town_settings_sanfrancisco.py | cculha4/COVID19Incubator | 479b5c8d8f6c5069db2ff88578530ba6c84f8369 | [
"MIT"
] | null | null | null | sim/lib/settings/town_settings_sanfrancisco.py | cculha4/COVID19Incubator | 479b5c8d8f6c5069db2ff88578530ba6c84f8369 | [
"MIT"
] | null | null | null | import numpy as np
'''
Settings for town generation
'''
'''
TO DO:
Daily testing capacity vs daily number of tests?
'''
town_name = 'San_Francisco'
# Make sure to download country-specific population density data
# Source: Facebook's Data for Good program
# https://data.humdata.org/dataset/united-states-high-reso... | 34.096 | 150 | 0.623416 |
390d5bfed4121dba896d9cb60bb3e108176a2c88 | 4,245 | py | Python | Pi_Files/cap_10hz_30.py | Zach-Switzer/Capacitive-PPU | 3e781c5b4638d7638d78b17f5eee358d65d3ffe7 | [
"MIT"
] | null | null | null | Pi_Files/cap_10hz_30.py | Zach-Switzer/Capacitive-PPU | 3e781c5b4638d7638d78b17f5eee358d65d3ffe7 | [
"MIT"
] | null | null | null | Pi_Files/cap_10hz_30.py | Zach-Switzer/Capacitive-PPU | 3e781c5b4638d7638d78b17f5eee358d65d3ffe7 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------#
import timeit
import time # Use for time calls
from subprocess import call # Use for turning off the Pi
import sys, select # Use for timed user input
import os
start=timeit.default_timer()
# Creating the function generator
os.chdir("/home/pi/PiBits/ServoBl... | 29.894366 | 80 | 0.667373 |
d283c537aa9eebd0c0b9ff083e3fedefaedcf8da | 816 | py | Python | src/logger.py | dlotnyk/movieorg | 096fc2014b8877bba9930c26f79186797a0c7856 | [
"MIT"
] | null | null | null | src/logger.py | dlotnyk/movieorg | 096fc2014b8877bba9930c26f79186797a0c7856 | [
"MIT"
] | null | null | null | src/logger.py | dlotnyk/movieorg | 096fc2014b8877bba9930c26f79186797a0c7856 | [
"MIT"
] | null | null | null | import logging
from logging.handlers import RotatingFileHandler
def log_settings():
# Logger definitions
log_formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(funcName)s - line: %(lineno)d - %(message)s')
logFile = "app_calc.log"
my_handler = RotatingFileHandler(logFile, mode="a", maxByt... | 40.8 | 121 | 0.737745 |
805717c9740fc0957a803f4a70b2c656345830c4 | 13,863 | py | Python | tests/test_rsa_key.py | tomwei7/libtrust-py3 | b1d71eee57b95621b5111cebd3c44751442740c5 | [
"Apache-2.0"
] | 1 | 2020-03-26T13:17:10.000Z | 2020-03-26T13:17:10.000Z | tests/test_rsa_key.py | tomwei7/libtrust-py3 | b1d71eee57b95621b5111cebd3c44751442740c5 | [
"Apache-2.0"
] | null | null | null | tests/test_rsa_key.py | tomwei7/libtrust-py3 | b1d71eee57b95621b5111cebd3c44751442740c5 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
import json
import unittest
from libtrust import hash as hash_
from libtrust import rsa_key
from tests import fixtures_path
class RSAKeyTest(unittest.TestCase):
def setUp(sel... | 114.570248 | 3,258 | 0.661257 |
fd0fc9b821649cec6511074d95de91287a973a85 | 2,168 | py | Python | src/Lib/site-packages/pygame/Surface.py | litie/brython | 05cb92912a2c7fd2b393881c271471f39c01fec2 | [
"BSD-3-Clause"
] | 1 | 2019-12-18T04:58:34.000Z | 2019-12-18T04:58:34.000Z | src/Lib/site-packages/pygame/Surface.py | litie/brython | 05cb92912a2c7fd2b393881c271471f39c01fec2 | [
"BSD-3-Clause"
] | null | null | null | src/Lib/site-packages/pygame/Surface.py | litie/brython | 05cb92912a2c7fd2b393881c271471f39c01fec2 | [
"BSD-3-Clause"
] | null | null | null | from browser import document, html, window
from javascript import console
import pygame.Rect
class Surface:
def __init__(self, dim, depth=16):
self._width=dim[0]
self._height=dim[1]
self._depth=depth
self._canvas=html.CANVAS(width=self._width, height=self._height)
self._context=self._c... | 28.906667 | 79 | 0.654982 |
cfb9b474b9f3ddafffd994ebfbbca2a5fcb7bd1b | 12,753 | py | Python | src/ramstk/models/programdb/similar_item/record.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 26 | 2019-05-15T02:03:47.000Z | 2022-02-21T07:28:11.000Z | src/ramstk/models/programdb/similar_item/record.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 815 | 2019-05-10T12:31:52.000Z | 2022-03-31T12:56:26.000Z | src/ramstk/models/programdb/similar_item/record.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 9 | 2019-04-20T23:06:29.000Z | 2022-01-24T21:21:04.000Z | # pylint: disable=duplicate-code
# -*- coding: utf-8 -*-
#
# ramstk.models.similar_item.record.py is part of The RAMSTK Project
#
# All rights reserved.
# Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com
"""Similar Item Record Model."""
# Third Party Imports
# noinspection P... | 40.875 | 88 | 0.656159 |
14a6d4a1cf52f24f6204f7b12efdec6db1bd3161 | 4,278 | py | Python | ml/tf/ref.py | m-ahmadi/exref | 1f76ea029995d2f60f19443b29c04c7628125ce3 | [
"MIT"
] | 9 | 2019-08-28T16:06:21.000Z | 2022-01-31T10:36:08.000Z | ml/tf/ref.py | m-ahmadi/exref | 1f76ea029995d2f60f19443b29c04c7628125ce3 | [
"MIT"
] | 1 | 2022-02-23T05:50:57.000Z | 2022-02-25T16:56:02.000Z | ml/tf/ref.py | m-ahmadi/exref | 1f76ea029995d2f60f19443b29c04c7628125ce3 | [
"MIT"
] | 5 | 2019-08-28T16:06:23.000Z | 2022-02-19T20:24:41.000Z | import tensorflow as tf
model = tf.keras.Sequential(layers=None|[], name=None)
model.compile(optimizer='rmsprop', loss=None|fn|''|Loss, metrics=None, loss_weights=None, weighted_metrics=None, run_eagerly=None, steps_per_execution=None, **kwargs)
model.compile(optimizer='sgd', loss='mse')
model.fit(
x=None | arr<num... | 55.558442 | 175 | 0.800608 |
41523fb27aa5c11e11189d2a1361b39bb4aee5ba | 134 | py | Python | dnnv/verifiers/common/reductions/iopolytope/errors.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 5 | 2022-01-28T20:30:34.000Z | 2022-03-17T09:26:52.000Z | dnnv/verifiers/common/reductions/iopolytope/errors.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 9 | 2022-01-27T03:50:28.000Z | 2022-02-08T18:42:17.000Z | dnnv/verifiers/common/reductions/iopolytope/errors.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 2 | 2022-02-03T17:32:43.000Z | 2022-03-24T16:38:49.000Z | from ..base import ReductionError
class IOPolytopeReductionError(ReductionError):
pass
__all__ = ["IOPolytopeReductionError"]
| 14.888889 | 47 | 0.791045 |
b85db88727362309a261875f490fd25aa98c4e76 | 93 | py | Python | Basic Programming/Function and array/digitfrequency.py | therohitsingh/Top300DSACode | e96b2ff833677d73ad197afcb39146969010315a | [
"MIT"
] | null | null | null | Basic Programming/Function and array/digitfrequency.py | therohitsingh/Top300DSACode | e96b2ff833677d73ad197afcb39146969010315a | [
"MIT"
] | null | null | null | Basic Programming/Function and array/digitfrequency.py | therohitsingh/Top300DSACode | e96b2ff833677d73ad197afcb39146969010315a | [
"MIT"
] | null | null | null | n = input()
k = input()
count = 0
for i in n:
if k==i:
count+=1
print(count) | 13.285714 | 16 | 0.483871 |
386d6ed0a3833704c6dc8078535bc19f9d4ee78e | 9,945 | py | Python | tests/p2p/test_forkid.py | AndreMiras/trinity | 6c20e2b63a698d345c282db8ab0cd426f4329ff5 | [
"MIT"
] | null | null | null | tests/p2p/test_forkid.py | AndreMiras/trinity | 6c20e2b63a698d345c282db8ab0cd426f4329ff5 | [
"MIT"
] | null | null | null | tests/p2p/test_forkid.py | AndreMiras/trinity | 6c20e2b63a698d345c282db8ab0cd426f4329ff5 | [
"MIT"
] | null | null | null | import sys
import pytest
import rlp
from eth_utils import to_bytes
from eth.chains.mainnet import MAINNET_VM_CONFIGURATION
from eth.chains.ropsten import ROPSTEN_VM_CONFIGURATION
from p2p.exceptions import RemoteChainIsStale, LocalChainIncompatibleOrStale
from p2p.forkid import ForkID, make_forkid, validate_forkid... | 51.796875 | 100 | 0.698441 |
82e6f3a4a6f5e0a8f08f7aad0299819ddf983a3c | 2,162 | py | Python | tests/tasks/test_aws_athena_cleaner_task.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | null | null | null | tests/tasks/test_aws_athena_cleaner_task.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | 4 | 2021-05-06T12:36:46.000Z | 2022-02-11T09:47:57.000Z | tests/tasks/test_aws_athena_cleaner_task.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | 2 | 2021-04-21T04:48:47.000Z | 2022-01-14T04:29:17.000Z | from unittest import TestCase
from unittest.mock import Mock, call
from src.tasks.aws_athena_cleaner_task import AwsAthenaCleanerTask
from tests.test_types_generator import account, task_report
class TestAwsAthenaCleanerTask(TestCase):
database_mappings = {
"db_1": ["table_1", "table_2", "table_3"],
... | 39.309091 | 94 | 0.604533 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.