hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f9b8b2c39935cb613faefcac6d668663e155e303 | 2,089 | py | Python | transform/color_op.py | Lyken17/Colorize.PyTorch | 9d352c52dc879988e2eb518261bc45e8216ffed6 | [
"MIT"
] | 2 | 2018-05-23T20:29:07.000Z | 2018-11-29T04:20:02.000Z | transform/color_op.py | Lyken17/Colorize.PyTorch | 9d352c52dc879988e2eb518261bc45e8216ffed6 | [
"MIT"
] | null | null | null | transform/color_op.py | Lyken17/Colorize.PyTorch | 9d352c52dc879988e2eb518261bc45e8216ffed6 | [
"MIT"
] | null | null | null | import math
import numpy as np
import torch
import torch.nn as nn
from torch import autograd
from torch.autograd import Variable
import torch.nn.functional as F
class RGB2GRAY(object):
def __init__(self):
pass
def __call__(self, tensor):
assert tensor.size(0) == 3
import cv2, numpy ... | 24.290698 | 92 | 0.582097 |
993a666ee970fbb26f6059d717990b56c017a7a5 | 8,993 | py | Python | a10_octavia/common/data_models.py | sana-a10/a10-octavia | 28dc85544b06840a43f3b10b205abb78aa24a795 | [
"Apache-2.0"
] | null | null | null | a10_octavia/common/data_models.py | sana-a10/a10-octavia | 28dc85544b06840a43f3b10b205abb78aa24a795 | [
"Apache-2.0"
] | null | null | null | a10_octavia/common/data_models.py | sana-a10/a10-octavia | 28dc85544b06840a43f3b10b205abb78aa24a795 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, A10 Networks
#
# 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 a... | 37.161157 | 93 | 0.597909 |
d415301ff727199547cd2261eba6339678b11441 | 20,616 | py | Python | qiskit/pulse/transforms.py | renier/qiskit-terra | 1f5e4c8f6768dfac5d68f39e9d38fdd783ba1346 | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/transforms.py | renier/qiskit-terra | 1f5e4c8f6768dfac5d68f39e9d38fdd783ba1346 | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/transforms.py | renier/qiskit-terra | 1f5e4c8f6768dfac5d68f39e9d38fdd783ba1346 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 38.534579 | 99 | 0.64057 |
69396c8ac5a886ec2bd896dbb32dbf29ed300351 | 1,761 | py | Python | trax/tf_numpy/examples/mnist/train_test.py | dedsec-9/trax | c394f9df7ee9dfe918cd67f4af2217d361f0f733 | [
"Apache-2.0"
] | 7,220 | 2019-10-07T23:46:53.000Z | 2022-03-31T16:28:05.000Z | trax/tf_numpy/examples/mnist/train_test.py | dedsec-9/trax | c394f9df7ee9dfe918cd67f4af2217d361f0f733 | [
"Apache-2.0"
] | 301 | 2019-10-08T06:42:04.000Z | 2022-03-12T07:03:46.000Z | trax/tf_numpy/examples/mnist/train_test.py | dedsec-9/trax | c394f9df7ee9dfe918cd67f4af2217d361f0f733 | [
"Apache-2.0"
] | 783 | 2019-10-08T06:36:36.000Z | 2022-03-25T02:00:29.000Z | # coding=utf-8
# Copyright 2021 The Trax 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 a... | 28.868852 | 74 | 0.691652 |
721d479f60ca17e1623e43aab35027cafc8c71c9 | 2,094 | py | Python | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceFileRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceFileRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceFileRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 33.774194 | 75 | 0.760267 |
bfa579575529aad2e823e71f2f0f4e6524b79b9a | 1,302 | py | Python | scrapers/scrape_fr.py | maekke/covid_19 | d287a2937f7f528b4ebd8fa1d1ff27b3dc1ad1ec | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_fr.py | maekke/covid_19 | d287a2937f7f528b4ebd8fa1d1ff27b3dc1ad1ec | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_fr.py | maekke/covid_19 | d287a2937f7f528b4ebd8fa1d1ff27b3dc1ad1ec | [
"CC-BY-4.0"
] | 1 | 2020-08-25T06:45:56.000Z | 2020-08-25T06:45:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import datetime
import sys
from bs4 import BeautifulSoup
import scrape_common as sc
d = sc.download('https://www.fr.ch/sante/covid-19/coronavirus-statistiques-evolution-de-la-situation-dans-le-canton', silent=True)
soup = BeautifulSoup(d, 'html.parser')
xls_ur... | 31.756098 | 130 | 0.668971 |
08b54ce3ee8e1cbf8dba40f6cabf29a64b71fe06 | 11,185 | py | Python | app/lib/ops/tiles.py | matthewzimmer/trajectory-contact-networks | b70e12052447899cea2e21c1dda85aea2f62a469 | [
"MIT"
] | null | null | null | app/lib/ops/tiles.py | matthewzimmer/trajectory-contact-networks | b70e12052447899cea2e21c1dda85aea2f62a469 | [
"MIT"
] | 1 | 2019-03-08T02:47:25.000Z | 2019-03-08T02:47:25.000Z | app/lib/ops/tiles.py | matthewzimmer/trajectory-contact-networks | b70e12052447899cea2e21c1dda85aea2f62a469 | [
"MIT"
] | null | null | null | from math import radians, cos, sin, asin, pi, sqrt
import itertools
import networkx as nx
import numpy as np
from app.lib.datasets import GeolifeData
from app.lib.pipeline_ops import PipelineOp
from app.lib.points import TrajectoryPoint
class GenerateTilesOp(PipelineOp):
EARTH_CIRCUMFERENCE_AT_EQUATOR_METERS = ... | 42.528517 | 155 | 0.622709 |
29c588ee15469bb8e40e69a0648e06606bed8a52 | 671 | py | Python | simulator/urls.py | i13-msrg/cidds | bc212404b1d342ddac4bee220afdb440594f7faa | [
"Apache-2.0"
] | 8 | 2018-10-27T19:56:38.000Z | 2021-09-23T11:47:52.000Z | simulator/urls.py | i13-msrg/cidds | bc212404b1d342ddac4bee220afdb440594f7faa | [
"Apache-2.0"
] | 7 | 2020-02-01T13:48:41.000Z | 2022-03-11T23:35:07.000Z | simulator/urls.py | i13-msrg/cidds | bc212404b1d342ddac4bee220afdb440594f7faa | [
"Apache-2.0"
] | 1 | 2019-04-05T08:00:12.000Z | 2019-04-05T08:00:12.000Z | from django.urls import path, include
from django.views.generic import TemplateView
from simulator.views import StartSim, SimulationHistory, Comparison, Details
urlpatterns = [
path('initialize/', StartSim.as_view(), name='initialize'),
path('history/', SimulationHistory.as_view(), name='history'),
path(... | 41.9375 | 101 | 0.701937 |
ea64e092b0377a68569a58b2d31713b062791f28 | 20,407 | py | Python | configs/common/Options.py | code-lamem/lamem | c28f72c13a81fbb105c7c83d1b2720a720f3a47f | [
"BSD-3-Clause"
] | null | null | null | configs/common/Options.py | code-lamem/lamem | c28f72c13a81fbb105c7c83d1b2720a720f3a47f | [
"BSD-3-Clause"
] | null | null | null | configs/common/Options.py | code-lamem/lamem | c28f72c13a81fbb105c7c83d1b2720a720f3a47f | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | 53.56168 | 131 | 0.621796 |
305d6d0d48355bcf49bb2023cf4f462d8b108968 | 8,283 | py | Python | pytorch/caffe2/contrib/nccl/nccl_ops_test.py | raghavnauhria/whatmt | c20483a437c82936cb0fb8080925e37b9c4bba87 | [
"MIT"
] | 15 | 2019-08-10T02:36:38.000Z | 2021-07-14T13:45:32.000Z | caffe2/contrib/nccl/nccl_ops_test.py | wxwoods/mctorch | 7cd6eb51fdd01fa75ed9245039a4f145ba342de2 | [
"BSD-3-Clause"
] | 7 | 2019-10-21T03:08:51.000Z | 2022-03-11T23:54:28.000Z | pytorch/caffe2/contrib/nccl/nccl_ops_test.py | raghavnauhria/whatmt | c20483a437c82936cb0fb8080925e37b9c4bba87 | [
"MIT"
] | 5 | 2019-09-27T02:41:40.000Z | 2021-11-05T20:40:49.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import hypothesis.strategies as st
from hypothesis import given, assume
import numpy as np
import time
import os
from caffe2.proto import caffe2_pb2
from ... | 42.917098 | 79 | 0.602801 |
29beb8039763bb6b297904924ed5c2e46ee21d91 | 42,193 | py | Python | MiTiSegmentor.py | AIEMMU/MiTSegmentor | 190dccff3ebc9167c8bd1ea75786626f1e0efcb8 | [
"MIT"
] | null | null | null | MiTiSegmentor.py | AIEMMU/MiTSegmentor | 190dccff3ebc9167c8bd1ea75786626f1e0efcb8 | [
"MIT"
] | null | null | null | MiTiSegmentor.py | AIEMMU/MiTSegmentor | 190dccff3ebc9167c8bd1ea75786626f1e0efcb8 | [
"MIT"
] | null | null | null | from tkinter import filedialog
from tkinter import *
from PIL import Image, ImageTk
from tkinter.messagebox import showinfo
from skimage import measure, morphology
import math
import numpy as np
import cv2 as cv
import os
import open3d as o3d
import pandas as pd
import shutil
import time
# our files
from PopUp... | 50.110451 | 242 | 0.56981 |
09351ba17a423bc5408a207e2dde27d57b6edbd9 | 104 | py | Python | enthought/mayavi/components/custom_grid_plane.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/mayavi/components/custom_grid_plane.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/mayavi/components/custom_grid_plane.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from mayavi.components.custom_grid_plane import *
| 26 | 49 | 0.855769 |
8d64f6682732e42b076484abf103dfb02262c359 | 10,542 | py | Python | txweb2/test/test_metafd.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 462 | 2016-08-14T17:43:24.000Z | 2022-03-17T07:38:16.000Z | txweb2/test/test_metafd.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 72 | 2016-09-01T23:19:35.000Z | 2020-02-05T02:09:26.000Z | txweb2/test/test_metafd.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 171 | 2016-08-16T03:50:30.000Z | 2022-03-26T11:49:55.000Z | ##
# Copyright (c) 2011-2017 Apple 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 applicable l... | 33.466667 | 83 | 0.648928 |
80b8425866ebca833c4632d39045331f62817786 | 649 | py | Python | run.py | sujianqingfeng/scrapy_xiuren | a05d8fe05777aca26667c5b40573ef0431bcff06 | [
"Apache-2.0"
] | 49 | 2018-04-18T03:48:48.000Z | 2021-12-21T03:14:07.000Z | run.py | sujianqingfeng/xiuren | a05d8fe05777aca26667c5b40573ef0431bcff06 | [
"Apache-2.0"
] | null | null | null | run.py | sujianqingfeng/xiuren | a05d8fe05777aca26667c5b40573ef0431bcff06 | [
"Apache-2.0"
] | 21 | 2018-05-10T03:35:20.000Z | 2021-08-15T18:19:54.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: su jian
@contact: 121116111@qq.com
@file: run.py
@time: 2017/8/16 17:58
"""
from scrapy.cmdline import execute
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
# execute(['scrapy', 'crawl', 'xiuren_spider'])
# execute(['scrapy', 'cra... | 20.935484 | 65 | 0.659476 |
ac0fbe4f28ab43ea782ea12890e00700d24c9c01 | 3,761 | py | Python | paper/experiments/01_uci_benchmark/01_uci_benchmark_lightgbm.py | ii-research-yu/pgbm | d050a5f71f1a458d8269c4f5201744c0d7c4d487 | [
"Apache-2.0"
] | 79 | 2021-06-02T06:59:08.000Z | 2022-03-10T20:27:02.000Z | paper/experiments/01_uci_benchmark/01_uci_benchmark_lightgbm.py | ii-research-yu/pgbm | d050a5f71f1a458d8269c4f5201744c0d7c4d487 | [
"Apache-2.0"
] | 11 | 2021-06-07T17:39:34.000Z | 2022-01-10T14:00:21.000Z | paper/experiments/01_uci_benchmark/01_uci_benchmark_lightgbm.py | ii-research-yu/pgbm | d050a5f71f1a458d8269c4f5201744c0d7c4d487 | [
"Apache-2.0"
] | 10 | 2021-06-08T01:04:03.000Z | 2022-03-31T23:41:23.000Z | """
Copyright (c) 2021 Olivier Sprangers as part of Airlab Amsterdam
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 require... | 39.589474 | 276 | 0.668439 |
5867b077be35c9ed8cbdcdb26456b1959feda021 | 2,155 | py | Python | etc/users/users.py | shakhyar/social_engineering | d075b6bda0d9da62e8db7358f43819878a5fef21 | [
"MIT"
] | null | null | null | etc/users/users.py | shakhyar/social_engineering | d075b6bda0d9da62e8db7358f43819878a5fef21 | [
"MIT"
] | null | null | null | etc/users/users.py | shakhyar/social_engineering | d075b6bda0d9da62e8db7358f43819878a5fef21 | [
"MIT"
] | null | null | null | import sqlite3
uconn = sqlite3.connect("etc/users/users.db", check_same_thread=False)
uc = uconn.cursor()
class Users:
"""
#? Table name = user
#* Columns: email, password, username, website
"""
def __init__(self):
self.create_table(True)
self.column1 = []
de... | 31.231884 | 153 | 0.535499 |
3ca9b8f16271cf464fa2cf8805a5646797510cb1 | 155 | py | Python | apps/site_admin/apps.py | aspic2/rendermaps | 517905c5f970bbb8bba87e9599be874fc0fd250d | [
"MIT"
] | null | null | null | apps/site_admin/apps.py | aspic2/rendermaps | 517905c5f970bbb8bba87e9599be874fc0fd250d | [
"MIT"
] | 24 | 2018-02-21T22:51:24.000Z | 2022-03-11T23:12:25.000Z | apps/site_admin/apps.py | aspic2/jobs-by-neighborhood | 517905c5f970bbb8bba87e9599be874fc0fd250d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class AdminConfig(AppConfig):
name = 'site_admin'
| 17.222222 | 39 | 0.735484 |
dc1379d7643328d2a0251cd831289813a91a5730 | 17,532 | py | Python | requirements/docutils-0.18/test/test_transforms/test_footnotes.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | requirements/docutils-0.18/test/test_transforms/test_footnotes.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | requirements/docutils-0.18/test/test_transforms/test_footnotes.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | 1 | 2022-02-03T08:03:30.000Z | 2022-02-03T08:03:30.000Z | #! /usr/bin/env python
# $Id: test_footnotes.py 8771 2021-06-18 18:55:08Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Tests for docutils.transforms.references.Footnotes.
"""
from __future__ import absolute_import
if __name__ == '__main__':
... | 32.051188 | 119 | 0.585672 |
16f61d94a057c0e3360fdbd022c87a9939f3e6dc | 1,011 | py | Python | modules/platforms/python/tests/test_generic_object.py | FedorUporov/gridgain | 883125f943743fa8198d88be98dfe61bde86ad96 | [
"CC0-1.0"
] | null | null | null | modules/platforms/python/tests/test_generic_object.py | FedorUporov/gridgain | 883125f943743fa8198d88be98dfe61bde86ad96 | [
"CC0-1.0"
] | null | null | null | modules/platforms/python/tests/test_generic_object.py | FedorUporov/gridgain | 883125f943743fa8198d88be98dfe61bde86ad96 | [
"CC0-1.0"
] | null | null | null | #
# Copyright 2019 GridGain Systems, Inc. and Contributors.
#
# Licensed under the GridGain Community Edition License (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.gridgain.com/products/software/community-edition/gridgai... | 29.735294 | 101 | 0.714144 |
17ca294d5d018ce4c05139101443ac92c250c02d | 2,463 | py | Python | tests/marltoolbox/algos/amTFT/test_amTFTRolloutsTorchPolicy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | tests/marltoolbox/algos/amTFT/test_amTFTRolloutsTorchPolicy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | tests/marltoolbox/algos/amTFT/test_amTFTRolloutsTorchPolicy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | from marltoolbox.algos import amTFT
from marltoolbox.algos.amTFT import base_policy
from test_base_policy import init_amTFT, generate_fake_discrete_actions
def test_compute_actions_overwrite():
am_tft_policy, env = init_amTFT(policy_class=amTFT.amTFTRolloutsTorchPolicy)
fake_actions = generate_fake_discrete_... | 48.294118 | 103 | 0.794153 |
52424e97ab94e59b33b6176705c01c645b397684 | 4,236 | py | Python | list_scheduler.py | AdiNar/MGR | e626e333dfbc2f920b507ccae000809d9d479e36 | [
"Apache-2.0"
] | null | null | null | list_scheduler.py | AdiNar/MGR | e626e333dfbc2f920b507ccae000809d9d479e36 | [
"Apache-2.0"
] | null | null | null | list_scheduler.py | AdiNar/MGR | e626e333dfbc2f920b507ccae000809d9d479e36 | [
"Apache-2.0"
] | null | null | null | import heapq
import random
from decimal import Decimal
from typing import List
from simulator import Job, Scheduler
class ListScheduler(Scheduler):
def _list_scheduler_run(self, m: int, jobs: List[Job], start_at=0):
schedule = self.schedule
action_points = [(start_at, 0, 0)] # (time, machine, re... | 38.509091 | 117 | 0.552644 |
aac60aac253b8fe9c2dfcc26b48a8c667b5db072 | 10,269 | py | Python | env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from collections import namedtuple
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo, TableInfo,
)
from django.utils.encoding import force_text
FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',))
class ... | 45.039474 | 113 | 0.557114 |
b08d29a5f920704f166374f6b3cf387611a728e2 | 841 | py | Python | examples/simple_example_1.py | tnarg999/CS238FinalProject | 0ecbb66678f60d6cc525936e737d310361f171ad | [
"MIT"
] | 1 | 2019-11-27T20:06:27.000Z | 2019-11-27T20:06:27.000Z | examples/simple_example_1.py | tnarg999/CS238FinalProject | 0ecbb66678f60d6cc525936e737d310361f171ad | [
"MIT"
] | null | null | null | examples/simple_example_1.py | tnarg999/CS238FinalProject | 0ecbb66678f60d6cc525936e737d310361f171ad | [
"MIT"
] | 1 | 2019-12-05T03:16:46.000Z | 2019-12-05T03:16:46.000Z | from flatland.envs.rail_env import RailEnv
from flatland.envs.rail_generators import rail_from_manual_specifications_generator
from flatland.utils.rendertools import RenderTool
# Example generate a rail given a manual specification,
# a map of tuples (cell_type, rotation)
specs = [[(0, 0), (0, 0), (0, 0), (0, 0), (0, ... | 38.227273 | 117 | 0.65874 |
99e266a9a7e099b2b49741f3e20f3ad5d087c4a4 | 832 | py | Python | Tests/interop/com/compat/hw_client.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 1,872 | 2015-01-02T18:56:47.000Z | 2022-03-31T07:34:39.000Z | Tests/interop/com/compat/hw_client.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 675 | 2015-02-27T09:01:01.000Z | 2022-03-31T14:03:25.000Z | Tests/interop/com/compat/hw_client.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 278 | 2015-01-02T03:48:20.000Z | 2022-03-29T20:40:44.000Z | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
'''
For the time being this is a minimal sanity check designed to ensure IP can access
COM servers implemented i... | 29.714286 | 82 | 0.760817 |
7a622807d9cb870fbf9ac357aeae47e24a0c797a | 2,201 | py | Python | euca2ools/commands/iam/listroles.py | sjones4/euca2ools | 03b0e421eeebd8f402422a0ad6994bd6ee4e4127 | [
"BSD-2-Clause"
] | null | null | null | euca2ools/commands/iam/listroles.py | sjones4/euca2ools | 03b0e421eeebd8f402422a0ad6994bd6ee4e4127 | [
"BSD-2-Clause"
] | null | null | null | euca2ools/commands/iam/listroles.py | sjones4/euca2ools | 03b0e421eeebd8f402422a0ad6994bd6ee4e4127 | [
"BSD-2-Clause"
] | 2 | 2016-06-24T20:19:40.000Z | 2020-02-05T10:50:19.000Z | # Copyright 2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 conditions and t... | 41.528302 | 75 | 0.729668 |
90ca1523c40f73a27695c958d954f701d7fd9e9a | 8,806 | py | Python | pages/preprocess.py | raniabrn/Streamlit-Application | 1abf667a9ef7c4462864b7e4991799cd63b9f0cb | [
"MIT"
] | 1 | 2022-03-26T17:57:38.000Z | 2022-03-26T17:57:38.000Z | pages/preprocess.py | raniabrn/Streamlit-Application | 1abf667a9ef7c4462864b7e4991799cd63b9f0cb | [
"MIT"
] | 1 | 2022-03-28T17:12:03.000Z | 2022-03-28T17:12:03.000Z | pages/preprocess.py | RacimRgh/generic-dataset-analysis | abbb3ff10ab8b16af471a363defd567c8f3ebd2f | [
"MIT"
] | null | null | null | import streamlit as st
import os
import pandas as pd
from pandas.api.types import is_numeric_dtype
import numpy as np
import time
from sklearn.preprocessing import LabelEncoder as le
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import MinMaxScaler
def standardise_column(df, df_last):
... | 37.47234 | 94 | 0.545764 |
dc0424b068661ba954f18e1693c7bd4868a2aae2 | 10,391 | py | Python | fuel_agent/fuel_agent/tests/test_partition.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | fuel_agent/fuel_agent/tests/test_partition.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | fuel_agent/fuel_agent/tests/test_partition.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 41.398406 | 78 | 0.649889 |
5a16b4af295628020448294ff4b390766d576997 | 2,423 | py | Python | Data_loader/Data_loader_facenet_notmask.py | ZouJiu1/Mask_face_recognitionZ | bac006718627d869b8ffaaa2c0605a300efd35e8 | [
"MIT"
] | 17 | 2020-12-29T06:00:35.000Z | 2022-02-24T13:38:41.000Z | Data_loader/Data_loader_facenet_notmask.py | LY-Road/Mask-Face-Recognition | f256a38084073718628b99a09622f5c830a232e7 | [
"MIT"
] | 2 | 2021-01-02T13:12:51.000Z | 2021-07-03T04:37:18.000Z | Data_loader/Data_loader_facenet_notmask.py | LY-Road/Mask-Face-Recognition | f256a38084073718628b99a09622f5c830a232e7 | [
"MIT"
] | 12 | 2021-01-06T08:38:04.000Z | 2022-01-27T15:44:21.000Z | # 路径置顶
import sys
import os
sys.path.append(os.getcwd())
# 导入包
import torchvision.transforms as transforms
import torch
# 导入文件
from Data_loader.Data_loader_test_notmask import TestDataset
from Data_loader.Data_loader_train_notmask import TrainDataset
from config_notmask import config
from Data_loader.Data_loadertest_ma... | 30.2875 | 79 | 0.70161 |
733f18477779ec9d7c71f76f8ec10dcb3070304c | 1,234 | py | Python | airflow/kubernetes/pod.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 27 | 2019-02-25T14:20:36.000Z | 2022-03-22T09:35:13.000Z | airflow/kubernetes/pod.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 200 | 2019-01-09T15:33:06.000Z | 2022-01-12T09:13:42.000Z | airflow/kubernetes/pod.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 14 | 2019-06-25T17:08:29.000Z | 2022-03-29T13:25:53.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... | 36.294118 | 107 | 0.769854 |
0df4965d7e95ee8803932ddebcedcc8bd36fdac9 | 2,004 | py | Python | download_images_from_web.py | TonkWorks/download_images_from_a_website | 41e893b3c81258eb572d5fcac517b847faf97446 | [
"MIT"
] | null | null | null | download_images_from_web.py | TonkWorks/download_images_from_a_website | 41e893b3c81258eb572d5fcac517b847faf97446 | [
"MIT"
] | null | null | null | download_images_from_web.py | TonkWorks/download_images_from_a_website | 41e893b3c81258eb572d5fcac517b847faf97446 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import traceback
import argparse
import os
import shutil
import re
#Function Info goes here.
__info__ = {
'title': "Download all images from a web page",
'description': "Downloadall images from a web page",
'url': "http://github.com/TonkWorks/download_images_from_a_website/archive/mast... | 28.225352 | 132 | 0.566367 |
bc989ba45cca9b4e47c41015ce66d13cf298aa03 | 1,702 | py | Python | Matrix-Layer-Rotation.py | akshatminocha/Demo | 25513be11925aceaa69da96a1fa6ed0b546cdc70 | [
"MIT"
] | 1 | 2019-02-23T15:58:11.000Z | 2019-02-23T15:58:11.000Z | Matrix-Layer-Rotation.py | akshatminocha/Demo | 25513be11925aceaa69da96a1fa6ed0b546cdc70 | [
"MIT"
] | 1 | 2019-01-25T06:16:29.000Z | 2019-01-25T06:17:07.000Z | Matrix-Layer-Rotation.py | akshatminocha/Demo | 25513be11925aceaa69da96a1fa6ed0b546cdc70 | [
"MIT"
] | null | null | null | import math
import os
import random
import re
import sys
import copy
# Complete the matrixRotation function below.
def matrixRotation(matrix, r):
for k in range(0,r):
a=copy.deepcopy(matrix)
b=0
while(b<int(min(m,n)/2)):
for i in range(0,m):
for j in range(0,n):
... | 28.366667 | 74 | 0.331962 |
c994d04084133177a83b641e8213248d46f896d5 | 5,084 | py | Python | src/openprocurement/tender/pricequotation/validation.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 10 | 2020-02-18T01:56:21.000Z | 2022-03-28T00:32:57.000Z | src/openprocurement/tender/pricequotation/validation.py | quintagroup/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 26 | 2018-07-16T09:30:44.000Z | 2021-02-02T17:51:30.000Z | src/openprocurement/tender/pricequotation/validation.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 15 | 2019-08-08T10:50:47.000Z | 2022-02-05T14:13:36.000Z | from schematics.exceptions import ValidationError
from openprocurement.api.utils import raise_operation_error, get_first_revision_date
from openprocurement.api.constants import PQ_CRITERIA_RESPONSES_ALL_FROM
from openprocurement.api.validation import validate_data, OPERATIONS, validate_json_data
from openprocurement.te... | 40.349206 | 111 | 0.651652 |
4553939929ce9a33295f1c2f00578133e869b8dc | 271 | py | Python | diskfree2.py | slavong/python-parallel | d59855d40c1d6399fef5c2ac6173cebfda47f503 | [
"MIT"
] | null | null | null | diskfree2.py | slavong/python-parallel | d59855d40c1d6399fef5c2ac6173cebfda47f503 | [
"MIT"
] | null | null | null | diskfree2.py | slavong/python-parallel | d59855d40c1d6399fef5c2ac6173cebfda47f503 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
import subprocess
# Call the command
output = subprocess.run(["df", "-h", "/home"], stdout=subprocess.PIPE)
# Read the return code and the output data
print ("Return code: %i" % output.returncode)
print ("Output data: %s" % output.stdout)
| 24.636364 | 70 | 0.686347 |
4bba4a3f21ac576ce569c53d0ebb5ce7d3d617c6 | 2,941 | py | Python | blog/files/21/dns_server.py | HowcanoeWang/SigmaMeow | 89c7bcd6b505e565875cab66354b67ed0bbb1ee9 | [
"MIT"
] | null | null | null | blog/files/21/dns_server.py | HowcanoeWang/SigmaMeow | 89c7bcd6b505e565875cab66354b67ed0bbb1ee9 | [
"MIT"
] | 24 | 2019-08-20T14:04:34.000Z | 2022-01-27T01:24:46.000Z | blog/files/21/dns_server.py | HowcanoeWang/HowcanoeWang.github.io | 14a958253ccb6acd47f9d97a66f9b1eed1d7dad6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import re
import sys
import socket
import traceback
from os.path import isfile
HOSTS_FILE = "hosts.txt"
SERVER_HOST = "0.0.0.0"
SERVER_PORT = 53
#ipv4_exp = re.compile(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
class DNSQuery:
def __init__(self, data):
self.data = data
self.domai... | 37.227848 | 151 | 0.530772 |
c98052dff5245256100b9f74b9399cb28e704135 | 1,873 | py | Python | scipy/constants/tests/test_codata.py | maxi-marufo/my-scipy | be6c2597fcee86419592ac512319301c7ddfc118 | [
"BSD-3-Clause"
] | 1 | 2020-05-14T13:09:58.000Z | 2020-05-14T13:09:58.000Z | scipy/constants/tests/test_codata.py | maxi-marufo/my-scipy | be6c2597fcee86419592ac512319301c7ddfc118 | [
"BSD-3-Clause"
] | null | null | null | scipy/constants/tests/test_codata.py | maxi-marufo/my-scipy | be6c2597fcee86419592ac512319301c7ddfc118 | [
"BSD-3-Clause"
] | null | null | null | from scipy.constants import constants, codata, find, value
from numpy.testing import (assert_equal, assert_,
assert_almost_equal)
def test_find():
keys = find('weak mixing', disp=False)
assert_equal(keys, ['weak mixing angle'])
keys = find('qwertyuiop', disp=False)
assert_e... | 33.446429 | 79 | 0.567005 |
93cb81eb77bb680ad07e61612f8d2b284278db0a | 1,826 | py | Python | src/multisig.py | valerio-vaccaro/krux | a3718a4e12ef6f92ada98e02d0d286a971a56434 | [
"MIT"
] | null | null | null | src/multisig.py | valerio-vaccaro/krux | a3718a4e12ef6f92ada98e02d0d286a971a56434 | [
"MIT"
] | null | null | null | src/multisig.py | valerio-vaccaro/krux | a3718a4e12ef6f92ada98e02d0d286a971a56434 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# 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, ... | 48.052632 | 107 | 0.766156 |
89460777595a74f0070ddcf2e42ac2f7e2a2b299 | 1,691 | py | Python | tests/test_index.py | dkreuer/emrichen | ef2b2ad5cd828a9dfed6d7924cee207e13598b0f | [
"MIT"
] | 62 | 2019-01-17T18:47:45.000Z | 2022-03-23T10:00:09.000Z | tests/test_index.py | dkreuer/emrichen | ef2b2ad5cd828a9dfed6d7924cee207e13598b0f | [
"MIT"
] | 24 | 2019-01-18T10:05:36.000Z | 2022-02-20T17:46:36.000Z | tests/test_index.py | dkreuer/emrichen | ef2b2ad5cd828a9dfed6d7924cee207e13598b0f | [
"MIT"
] | 10 | 2019-02-12T23:58:29.000Z | 2022-02-18T09:42:35.000Z | import pytest
from emrichen import Template
def test_index():
assert (
Template.parse(
'''
!Index
over:
- name: manifold
score: 7.8
- name: John
score: 9.9
- name: John
score: 9.8
as: flavour
by: !Lookup flavour.name
duplicates: ignore
template: !Lookup... | 18.380435 | 101 | 0.52809 |
184eddeb97201b81a89002298685bc2db249cef3 | 15,527 | py | Python | tensorflow_probability/python/mcmc/metropolis_hastings_test.py | NeelGhoshal/probability | 45ed841e3cff6cdc7cd1b2d96dd874d9070318f7 | [
"Apache-2.0"
] | 2 | 2019-10-30T04:45:07.000Z | 2019-10-30T04:45:08.000Z | tensorflow_probability/python/mcmc/metropolis_hastings_test.py | gregorystrubel/probability | df96f3d56eff92c6b06fbac68dc58e095e28fed6 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/mcmc/metropolis_hastings_test.py | gregorystrubel/probability | df96f3d56eff92c6b06fbac68dc58e095e28fed6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 38.624378 | 80 | 0.668642 |
717846d77a73cf304d2b94867f893dcc1d9f33d0 | 864 | py | Python | Python/multiplication/multiply.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | 1 | 2018-10-31T10:36:34.000Z | 2018-10-31T10:36:34.000Z | Python/multiplication/multiply.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | null | null | null | Python/multiplication/multiply.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | 2 | 2021-05-06T11:18:25.000Z | 2021-12-04T07:56:29.000Z | def main():
x = 3141592653589793238462643383279502884197169399375105820974944592
y = 2718281828459045235360287471352662497757247093699959574966967627
out = 8539734222673567065463550869546574495034888535765114961879601127067743044893204848617875072216249073013374895871952806582723184
print(multiply(x,y))... | 24 | 137 | 0.640046 |
4edefd44048497ff7ec6efc87509d05fd544ee60 | 19,238 | py | Python | dpmModule/character/characterTemplate.py | OniOniOn-/maplestory_dpm_calc | fbe824f01ab8e8210b174dd9db8295da80c267cd | [
"MIT"
] | null | null | null | dpmModule/character/characterTemplate.py | OniOniOn-/maplestory_dpm_calc | fbe824f01ab8e8210b174dd9db8295da80c267cd | [
"MIT"
] | null | null | null | dpmModule/character/characterTemplate.py | OniOniOn-/maplestory_dpm_calc | fbe824f01ab8e8210b174dd9db8295da80c267cd | [
"MIT"
] | null | null | null | import yaml
import os
from copy import copy, deepcopy
from typing import List, Optional, Tuple, Union
from ..character.characterKernel import GearedCharacter, JobGenerator
from ..gear import Gear, GearBuilder, GearType, GearPropType, Scroll, eval_set_item_effect
from ..jobs import job_branch_list
from ..kernel.core.mo... | 44.948598 | 118 | 0.58478 |
c4826366922e9e388c78ffab1f2c206d845740f9 | 6,229 | py | Python | contrib/btorcheckmodel.py | zyedidia/boolector | f1abe139025ca2bda442d094237af66aa6eb7cee | [
"MIT"
] | 209 | 2018-05-22T06:52:46.000Z | 2022-03-19T11:13:22.000Z | contrib/btorcheckmodel.py | zyedidia/boolector | f1abe139025ca2bda442d094237af66aa6eb7cee | [
"MIT"
] | 166 | 2018-05-24T06:39:07.000Z | 2022-03-14T22:56:03.000Z | contrib/btorcheckmodel.py | zyedidia/boolector | f1abe139025ca2bda442d094237af66aa6eb7cee | [
"MIT"
] | 48 | 2018-05-23T10:01:31.000Z | 2022-01-25T09:56:37.000Z | #!/usr/bin/env python
# Boolector: Satisfiablity Modulo Theories (SMT) solver.
#
# Copyright (C) 2007-2021 by the authors listed in the AUTHORS file.
#
# This file is part of Boolector.
# See COPYING for more information on using this software.
#
import sys, os, random, signal
def dec2bin(dec, len):
binary = bin(de... | 28.18552 | 90 | 0.533794 |
3017db53ac8910ac687743788813f6d14d181a87 | 6,695 | py | Python | ui/command_line.py | hkkwok/MachOTool | 469c0fd06199356fcc6d68809c7ba15a12eac1fd | [
"Apache-2.0"
] | 12 | 2016-01-08T22:35:14.000Z | 2019-07-29T11:50:41.000Z | ui/command_line.py | uvbs/MachOTool | 469c0fd06199356fcc6d68809c7ba15a12eac1fd | [
"Apache-2.0"
] | 2 | 2015-12-10T21:28:04.000Z | 2019-10-15T10:05:19.000Z | ui/command_line.py | uvbs/MachOTool | 469c0fd06199356fcc6d68809c7ba15a12eac1fd | [
"Apache-2.0"
] | 6 | 2016-10-10T05:29:41.000Z | 2019-10-15T09:59:17.000Z | from utils.header import Header
from mach_o.headers.mach_header import MachHeader, MachHeader64
from mach_o.headers.load_command import LoadCommandHeader
from mach_o.non_headers.cstring import Cstring
from mach_o.headers.dylib_command import DylibCommand
class Command(object):
def __init__(self, command, action, ... | 38.477011 | 111 | 0.603286 |
dc24a4813fc2346431758022af1f79d4bfd0d09c | 651 | py | Python | scieio/biotechnology/serializers.py | arnelimperial/scieio | 279a25766f20d074a3df824c0fbc8b2d8e35f272 | [
"MIT"
] | null | null | null | scieio/biotechnology/serializers.py | arnelimperial/scieio | 279a25766f20d074a3df824c0fbc8b2d8e35f272 | [
"MIT"
] | 8 | 2021-03-19T01:56:44.000Z | 2022-03-12T00:24:21.000Z | scieio/biotechnology/serializers.py | arnelimperial/scieio | 279a25766f20d074a3df824c0fbc8b2d8e35f272 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from scieio.biotechnology import models
class BioTechSerializer(serializers.ModelSerializer):
class Meta:
model = models.BioTech
fields = (
'id',
'life_science',
'name',
'slug',
'description',
... | 21.7 | 53 | 0.44086 |
789fcec2cefb69de6f17e9747c2df7d7414a6871 | 48,487 | py | Python | seaborn/tests/test_matrix.py | bdice/seaborn | 29f5807efdf0544b16c088beac7c1c5eda174084 | [
"BSD-3-Clause"
] | null | null | null | seaborn/tests/test_matrix.py | bdice/seaborn | 29f5807efdf0544b16c088beac7c1c5eda174084 | [
"BSD-3-Clause"
] | null | null | null | seaborn/tests/test_matrix.py | bdice/seaborn | 29f5807efdf0544b16c088beac7c1c5eda174084 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import tempfile
import copy
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
from scipy.spatial import distance
from scipy.cluster import hierarchy
import nose.tools as nt
import numpy.testing as npt
try:
import pandas.testing as pdt
except ImportErr... | 37.097934 | 79 | 0.599088 |
ee8d2a05b16c9767bcd4ad068524fff899eb34a4 | 1,110 | py | Python | training/odsToTsv.py | raoofnaushad/resume_parser_nlp | 50519b9b258b8b6a6739e3fd30a70709c1ffd29d | [
"Apache-2.0"
] | 2 | 2020-11-02T16:33:35.000Z | 2020-11-02T16:42:13.000Z | training/odsToTsv.py | raoofnaushad/resume_parser_nlp | 50519b9b258b8b6a6739e3fd30a70709c1ffd29d | [
"Apache-2.0"
] | null | null | null | training/odsToTsv.py | raoofnaushad/resume_parser_nlp | 50519b9b258b8b6a6739e3fd30a70709c1ffd29d | [
"Apache-2.0"
] | null | null | null |
import pandas as pd
import math
import string
import training.utils as utils
import training.config as config
def convertODStoTSV(fromODS, toTSV):
data = utils.read_ods(fromODS)
df = pd.DataFrame(data)
print(len(df))
words_list = []
tags_list = []
for ind in df.index:
if df[... | 24.130435 | 105 | 0.568468 |
d7d046dd98a9ccaf7c6962ce4c9469da97f23fcc | 1,496 | py | Python | paradocx/image.py | jaraco/paradocx | 123405b97fc82f60f4bd47cae465802f8063024b | [
"MIT"
] | 3 | 2021-02-13T20:07:18.000Z | 2022-03-17T05:26:18.000Z | paradocx/image.py | jaraco/paradocx | 123405b97fc82f60f4bd47cae465802f8063024b | [
"MIT"
] | 4 | 2018-03-03T17:45:17.000Z | 2021-07-06T02:51:30.000Z | paradocx/image.py | jaraco/paradocx | 123405b97fc82f60f4bd47cae465802f8063024b | [
"MIT"
] | 2 | 2021-02-13T17:21:24.000Z | 2022-03-26T07:43:00.000Z | from openpack.basepack import DefaultNamed, Part
import mimetypes
import warnings
class ImagePart(DefaultNamed, Part):
rel_type = (
'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'
)
default_name = '/word/media/image.jpeg'
"""
ECMA-376 3nd Edition Part 1 Page 17... | 35.619048 | 83 | 0.652406 |
2ff3651403ab10ae4e81527556f605af63e9d493 | 26,038 | py | Python | ivy/stateful/module.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | 2 | 2022-02-13T20:55:02.000Z | 2022-02-26T18:44:19.000Z | ivy/stateful/module.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | 1 | 2022-03-08T13:29:20.000Z | 2022-03-08T13:29:20.000Z | ivy/stateful/module.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | null | null | null | """
Base class for deriving trainable modules
"""
# global
import os
import abc
import logging
import ivy.functional.backends.numpy
import termcolor
import numpy as np
# local
import ivy
from ivy.container import Container
# Base #
# -----#
class Module(abc.ABC):
def __init__(self, dev=None, v=None, build_mod... | 41.330159 | 120 | 0.603695 |
b8b78c684217767e724d04aeb02d2238eb98f722 | 1,223 | py | Python | docs/tutorial/grade/tests/q2.py | nalderto/otter-grader | a4714bf48df07b7eb8b3c41530ce7a778fd42c98 | [
"BSD-3-Clause"
] | null | null | null | docs/tutorial/grade/tests/q2.py | nalderto/otter-grader | a4714bf48df07b7eb8b3c41530ce7a778fd42c98 | [
"BSD-3-Clause"
] | null | null | null | docs/tutorial/grade/tests/q2.py | nalderto/otter-grader | a4714bf48df07b7eb8b3c41530ce7a778fd42c98 | [
"BSD-3-Clause"
] | null | null | null | test = { 'name': 'q2',
'points': 1,
'suites': [ { 'cases': [ {'code': '>>> f = fiberator();\n>>> assert next(f) == 0;\n>>> assert next(f) == 1\n', 'hidden': False, 'locked': False},
{ 'code': '>>> f = fiberator();\n'
'>>... | 61.15 | 155 | 0.228945 |
3c5dc49b7e0b6ab6aedd74323e978dc9dd33e854 | 15 | py | Python | num_thai/__init__.py | lanuxos/num-thai | 26e78537fc2789733c2541c3f31cadc76e25844d | [
"MIT"
] | null | null | null | num_thai/__init__.py | lanuxos/num-thai | 26e78537fc2789733c2541c3f31cadc76e25844d | [
"MIT"
] | null | null | null | num_thai/__init__.py | lanuxos/num-thai | 26e78537fc2789733c2541c3f31cadc76e25844d | [
"MIT"
] | 2 | 2020-03-24T10:03:43.000Z | 2021-06-05T03:32:45.000Z | name="num_thai" | 15 | 15 | 0.8 |
dfa3a40ebcb9f5d194ef50f4c271b35aecd82147 | 324 | py | Python | osmaxx/excerptexport/templatetags/whitespace_cleanup.py | tyrasd/osmaxx | da4454083d17b2ef8b0623cad62e39992b6bd52a | [
"MIT"
] | 27 | 2015-03-30T14:17:26.000Z | 2022-02-19T17:30:44.000Z | osmaxx/excerptexport/templatetags/whitespace_cleanup.py | tyrasd/osmaxx | da4454083d17b2ef8b0623cad62e39992b6bd52a | [
"MIT"
] | 483 | 2015-03-09T16:58:03.000Z | 2022-03-14T09:29:06.000Z | osmaxx/excerptexport/templatetags/whitespace_cleanup.py | tyrasd/osmaxx | da4454083d17b2ef8b0623cad62e39992b6bd52a | [
"MIT"
] | 6 | 2015-04-07T07:38:30.000Z | 2020-04-01T12:45:53.000Z | from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
@stringfilter
def remove_all_whitespace(value):
return ''.join(value.split())
@register.filter
@stringfilter
def strip(value, *args, **kwargs):
return value.strip(*args, **kwar... | 19.058824 | 55 | 0.762346 |
facee01a8e1d802cd4f2e581588bb9457cf22b1f | 419 | py | Python | backend/merp_by_cabosys_29948/wsgi.py | crowdbotics-apps/merp-by-cabosys-29948 | 770e1c2c74eae77160be81ed5b41b9b5ea934fa4 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/merp_by_cabosys_29948/wsgi.py | crowdbotics-apps/merp-by-cabosys-29948 | 770e1c2c74eae77160be81ed5b41b9b5ea934fa4 | [
"FTL",
"AML",
"RSA-MD"
] | 14 | 2021-08-23T05:43:02.000Z | 2021-10-05T12:42:46.000Z | backend/merp_by_cabosys_29948/wsgi.py | crowdbotics-apps/merp-by-cabosys-29948 | 770e1c2c74eae77160be81ed5b41b9b5ea934fa4 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for merp_by_cabosys_29948 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault... | 24.647059 | 81 | 0.799523 |
b8d980af378041bb250f31dba8093d4d00cd289f | 1,121 | py | Python | src/query_executor/abstract_executor.py | imvinod/Eva | 0ed9814ae89db7dce1fb734dc99d5dac69cb3c82 | [
"Apache-2.0"
] | 1 | 2019-11-06T03:30:08.000Z | 2019-11-06T03:30:08.000Z | src/query_executor/abstract_executor.py | imvinod/Eva | 0ed9814ae89db7dce1fb734dc99d5dac69cb3c82 | [
"Apache-2.0"
] | 1 | 2019-11-18T03:09:56.000Z | 2019-11-18T03:09:56.000Z | src/query_executor/abstract_executor.py | asrayousuf/Eva | f652e5d398556055490c146f37e7a2d7a9d091f3 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import List
from src.models import FrameBatch
from src.query_planner.abstract_plan import AbstractPlan
class AbstractExecutor(ABC):
"""
An abstract class for the executor engine
Arguments:
node (AbstractPlan): Plan node corresponding to this executo... | 25.477273 | 69 | 0.636039 |
b4c5dd4ba5438d9cfba50375253a097c27d4c031 | 2,248 | py | Python | trick_sims/SIM_sun/RUN_Winter/input.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | null | null | null | trick_sims/SIM_sun/RUN_Winter/input.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | null | null | null | trick_sims/SIM_sun/RUN_Winter/input.py | gilbertguoze/trick | f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21 | [
"NASA-1.3"
] | 3 | 2021-06-22T11:02:39.000Z | 2021-10-21T00:58:00.000Z | trick_sys.sched.set_enable_freeze(True)
""" Sim Control Panel """
simControlPanel = trick.SimControlPanel()
trick.add_external_application(simControlPanel)
RECORD_DATA = True
if RECORD_DATA:
execfile("Modified_data/helios.dr")
REALTIME = False
if REALTIME:
execfile("Modified_data/realtime.py")
JAPANESE = Fa... | 31.222222 | 86 | 0.610765 |
c305d6a2c74f0f831854743c50f77a294c879fd1 | 1,472 | py | Python | youtuatools/extractor/restudy.py | Pagasis/YouTua | edb44b2065a7224f8b26aaf76166bf7287901567 | [
"MIT"
] | 47 | 2021-01-02T07:44:50.000Z | 2022-02-28T22:02:13.000Z | nextdl/extractor/restudy.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 4 | 2021-02-07T03:35:13.000Z | 2021-10-31T19:23:53.000Z | nextdl/extractor/restudy.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 8 | 2021-01-03T05:44:39.000Z | 2021-11-01T05:46:32.000Z | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class RestudyIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:(?:www|portal)\.)?restudy\.dk/video/[^/]+/id/(?P<id>[0-9]+)"
)
_TESTS = [
{
"url": "https://www.restudy.dk/video/play/id/1637"... | 28.307692 | 100 | 0.521739 |
932f5afba6a61d9d9ef413707433f887a4d5eeb6 | 1,806 | py | Python | venv/lib/python3.6/site-packages/smartfields/processors/video.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/smartfields/processors/video.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | 4 | 2020-06-05T23:21:40.000Z | 2021-06-10T21:57:32.000Z | virtual/lib/python3.6/site-packages/smartfields/processors/video.py | Eccie-K/neighbour-hood | f874f9468160aa34dee294d685374e4c5e2eec4d | [
"MIT"
] | null | null | null | import re
from django.utils import six
from smartfields.processors.base import ExternalFileProcessor
from smartfields.utils import ProcessingError
__all__ = [
'FFMPEGProcessor'
]
class FFMPEGProcessor(ExternalFileProcessor):
duration_re = re.compile(r'Duration: (?P<hours>\d+):(?P<minutes>\d+):(?P<seconds>\d+... | 40.133333 | 91 | 0.601883 |
2e812e3a18aa46e7e0ceb489457e4727057e2d53 | 23,700 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 49.170124 | 206 | 0.651941 |
35e9849010e5db79126f1d8c4fb6851966622acd | 22,160 | py | Python | mqtt_bme280.py | grodansparadis/vscp-python-sensor-bme280 | 8984dd509b7eb2bfb99958c2eb6be44a2281d0c6 | [
"MIT"
] | 1 | 2022-01-24T20:17:55.000Z | 2022-01-24T20:17:55.000Z | mqtt_bme280.py | grodansparadis/vscp-python-sensor-bme280 | 8984dd509b7eb2bfb99958c2eb6be44a2281d0c6 | [
"MIT"
] | null | null | null | mqtt_bme280.py | grodansparadis/vscp-python-sensor-bme280 | 8984dd509b7eb2bfb99958c2eb6be44a2281d0c6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# --------------------------------------
# ___ ___ _ ____
# / _ \/ _ \(_) __/__ __ __
# / , _/ ___/ /\ \/ _ \/ // /
# /_/|_/_/ /_/___/ .__/\_, /
# /_/ /___/
#
# bme280.py
# Read data from a digital pressure sensor.
#
# Official datasheet available from :
# http... | 29.196311 | 124 | 0.606273 |
5914ea7871b3f3ee65c3748efb01f5e3c999bb7a | 2,661 | py | Python | src/patent_client/uspto/fulltext/patent/settings.py | parkerhancock/python-ip | 046c1ebbe31e9058a0e421659a3300e8a578fd41 | [
"Apache-2.0"
] | 15 | 2018-10-23T01:15:29.000Z | 2022-02-01T19:53:44.000Z | src/patent_client/uspto/fulltext/patent/settings.py | grimmer0125/patent_client | 8943ca970d174ecf8aad10669a95ceddd75f5e13 | [
"Apache-2.0"
] | 33 | 2018-10-26T03:48:51.000Z | 2022-01-17T09:16:07.000Z | src/patent_client/uspto/fulltext/patent/settings.py | grimmer0125/patent_client | 8943ca970d174ecf8aad10669a95ceddd75f5e13 | [
"Apache-2.0"
] | 7 | 2019-02-14T20:25:20.000Z | 2021-05-24T07:49:34.000Z | SEARCH_PARAMS = {
"Sect1": "PTO2",
"Sect2": "HITOFF",
"u": "/netahtml/PTO/search-adv.htm",
"r": "0",
"p": "1",
"f": "S",
"l": "50",
"Query": "",
"d": "PTXT",
}
SEARCH_FIELDS = {
"patent_number": "PN",
"issue_date": "ISD",
"title": "TTL",
"abstract": "ABST",
"clai... | 29.241758 | 81 | 0.622322 |
1773c5f2cbf43155b4c4ebf00ad4a7af706ef8e0 | 5,282 | py | Python | src_files/loss_functions/losses.py | kprokofi/ML_Decoder | c01c50e0165e607afbebd8d615708ef9c084dd5b | [
"MIT"
] | null | null | null | src_files/loss_functions/losses.py | kprokofi/ML_Decoder | c01c50e0165e607afbebd8d615708ef9c084dd5b | [
"MIT"
] | null | null | null | src_files/loss_functions/losses.py | kprokofi/ML_Decoder | c01c50e0165e607afbebd8d615708ef9c084dd5b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class AsymmetricLoss(nn.Module):
def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-8, disable_torch_grad_focal_loss=True):
super(AsymmetricLoss, self).__init__()
self.gamma_neg = gamma_neg
self.gamma_pos = gamma_pos
self.clip = clip
... | 34.980132 | 109 | 0.604127 |
4f5fcf6cbc29bac6b0739c46abf3694340912518 | 5,061 | py | Python | pybank/bank.py | Nat1405/pychain | a8b01afcf0df3ce24ec30d6f887d16ed3aa28d63 | [
"MIT"
] | null | null | null | pybank/bank.py | Nat1405/pychain | a8b01afcf0df3ce24ec30d6f887d16ed3aa28d63 | [
"MIT"
] | null | null | null | pybank/bank.py | Nat1405/pychain | a8b01afcf0df3ce24ec30d6f887d16ed3aa28d63 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Basic implementation of a banking application in Python
# Copyright Nat Comeau 2017
# STDLIB
# LOCAL
class Bank(object):
"""A bank has customers that want to do things with their money
This is a simple bank that holds people's money and transfers it to each other.
Parameters
... | 22.900452 | 85 | 0.550879 |
4894f0328ee1d21c0f7504ea539c07e66d4009a7 | 303 | py | Python | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/toolbox/views/commonview.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 6 | 2018-11-26T08:42:52.000Z | 2020-06-01T08:33:48.000Z | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/toolbox/views/commonview.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | null | null | null | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/toolbox/views/commonview.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 1 | 2019-01-22T06:45:36.000Z | 2019-01-22T06:45:36.000Z | #coding=utf-8
# coding=utf-8
'''
Created on 2014-3-18
@author: ETHAN
'''
from django.shortcuts import render_to_response
def loadleftnavigater(request):
''' load left navigater'''
print("#####################################")
return render_to_response("common/toolboxleftnavigater.html") | 21.642857 | 65 | 0.636964 |
305648a78e35a485d26b857f860223b0bbebbc15 | 1,345 | py | Python | plugins/modules/ytthumb.py | bughunter0/Helper-Bot | f03370623160dceec7a790f5836536aefffbdf7b | [
"MIT"
] | null | null | null | plugins/modules/ytthumb.py | bughunter0/Helper-Bot | f03370623160dceec7a790f5836536aefffbdf7b | [
"MIT"
] | null | null | null | plugins/modules/ytthumb.py | bughunter0/Helper-Bot | f03370623160dceec7a790f5836536aefffbdf7b | [
"MIT"
] | 2 | 2021-09-19T17:32:17.000Z | 2021-11-21T09:49:09.000Z | import ytthumb
from pyrogram import Client, filters
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
@Client.on_message(
filters.command(["ytthumb", "thumbnail"]),
group=1
)
async def youtube_thumbnail(update: Message):
reply_markup = InlineKeyboardMarkup(
[[InlineKey... | 32.02381 | 96 | 0.581413 |
8e3d4838c58bd05cb7777f9e823275daa2e27454 | 22,887 | py | Python | Lib/test/test_trace.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 3 | 2015-09-22T14:04:54.000Z | 2021-07-15T07:07:11.000Z | Lib/test/test_trace.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 1 | 2020-09-07T15:33:56.000Z | 2020-09-07T15:33:56.000Z | Lib/test/test_trace.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 2 | 2015-09-22T14:05:27.000Z | 2015-11-08T20:15:42.000Z | # Testing the line trace facility.
from test import test_support
import unittest
import sys
import difflib
import gc
# A very basic example. If this fails, we're in deep trouble.
def basic():
return 1
basic.events = [(0, 'call'),
(1, 'line'),
(1, 'return')]
# Many of the tests b... | 29.762029 | 76 | 0.546773 |
970bf22dd34ba9137616d25879b43de3b962c6e0 | 2,333 | py | Python | flask/lib/python2.7/site-packages/sqlparse/__init__.py | navodissa/python-flask | 76589828a4eba01ccbf019d9336f359f04f37067 | [
"BSD-3-Clause"
] | null | null | null | flask/lib/python2.7/site-packages/sqlparse/__init__.py | navodissa/python-flask | 76589828a4eba01ccbf019d9336f359f04f37067 | [
"BSD-3-Clause"
] | null | null | null | flask/lib/python2.7/site-packages/sqlparse/__init__.py | navodissa/python-flask | 76589828a4eba01ccbf019d9336f359f04f37067 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
"""Parse SQL statements."""
__version__ = '0.1.13'
# Setup namespace
from sqlparse import engine
from sqlparse import f... | 29.531646 | 72 | 0.71796 |
d1b39a88deb09497ae687341263900f5b5464bbf | 2,761 | py | Python | monitor/format.py | madbuda/chia-monitor | 88ba28bba0ce54b0b06d4a10b3ed05c886a29d1f | [
"Apache-2.0"
] | null | null | null | monitor/format.py | madbuda/chia-monitor | 88ba28bba0ce54b0b06d4a10b3ed05c886a29d1f | [
"Apache-2.0"
] | null | null | null | monitor/format.py | madbuda/chia-monitor | 88ba28bba0ce54b0b06d4a10b3ed05c886a29d1f | [
"Apache-2.0"
] | null | null | null | from chia.util.misc import format_bytes, format_minutes
def format_og_plot_count(plot_count: int) -> str:
return f"🌾 OG Plot Count: {plot_count}"
def format_og_plot_size(plot_size: int) -> str:
return f"🧺 OG Plot Size: {format_bytes(plot_size)}"
def format_portable_plot_count(plot_count: int) -> str:
... | 28.463918 | 95 | 0.716407 |
eea7c362d774ff8b826b9c421c8c16ffc1736bce | 2,561 | py | Python | src/nibeuplink/__init__.py | lipoja/nibeuplink | f8da14cc0d31342cb44026d9eded2bf82b52460b | [
"MIT"
] | 20 | 2018-10-16T11:01:00.000Z | 2022-01-04T13:19:42.000Z | src/nibeuplink/__init__.py | lipoja/nibeuplink | f8da14cc0d31342cb44026d9eded2bf82b52460b | [
"MIT"
] | 4 | 2018-05-14T13:05:16.000Z | 2022-01-17T05:42:52.000Z | src/nibeuplink/__init__.py | lipoja/nibeuplink | f8da14cc0d31342cb44026d9eded2bf82b52460b | [
"MIT"
] | 8 | 2018-10-16T11:34:51.000Z | 2021-08-08T09:45:11.000Z | import asyncio
import logging
from typing import Dict
from .const import (
MAX_REQUEST_PARAMETERS,
PARAM_HOTWATER_SYSTEMS,
PARAM_CLIMATE_SYSTEMS,
PARAM_COMPRESSOR_FREQUENCY,
PARAM_PUMP_SPEED_HEATING_MEDIUM,
PARAM_STATUS_COOLING,
PARAM_VENTILATION_SYSTEMS,
SMARTHOME_MODES,
)
from .typing... | 26.402062 | 86 | 0.673565 |
583be644a39ee9a19e6a60a41e8d13fd37ed3b58 | 381 | py | Python | examples/tla202x_simpletest.py | jposada202020/Adafruit_CircuitPython_TLA202x | ab2449aadd4256ec68efd773ef264b1d6e86a3cd | [
"Unlicense",
"MIT-0",
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | examples/tla202x_simpletest.py | jposada202020/Adafruit_CircuitPython_TLA202x | ab2449aadd4256ec68efd773ef264b1d6e86a3cd | [
"Unlicense",
"MIT-0",
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | examples/tla202x_simpletest.py | jposada202020/Adafruit_CircuitPython_TLA202x | ab2449aadd4256ec68efd773ef264b1d6e86a3cd | [
"Unlicense",
"MIT-0",
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
# pylint:disable=no-member
import board
import busio
from adafruit_tla202x import TLA2024
i2c = busio.I2C(board.SCL, board.SDA)
tla = TLA2024(i2c)
for i in range(4):
channel = i
tla.input_chann... | 23.8125 | 77 | 0.742782 |
dbec6d5e2c5866c22bca8a9ed415125efd9a0de6 | 29,762 | py | Python | vistrails/packages/vtk/tf_widget.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/packages/vtk/tf_widget.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/packages/vtk/tf_widget.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | 38.254499 | 104 | 0.586486 |
275385256995154c07ed305d1e5f2ebd25c41c28 | 1,574 | py | Python | wsgi_entry_test.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | wsgi_entry_test.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | wsgi_entry_test.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Au Yeong Wing Yau
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 35.772727 | 129 | 0.730623 |
73a0a41caf69c903d5638add82d4704d6dacfdbc | 1,022 | py | Python | switchcalendar/urls.py | marcosorive/switchcalendar | a8771929b93e6b69a75d80a72299116e0175e961 | [
"MIT"
] | null | null | null | switchcalendar/urls.py | marcosorive/switchcalendar | a8771929b93e6b69a75d80a72299116e0175e961 | [
"MIT"
] | 1 | 2019-12-26T07:57:24.000Z | 2020-01-02T08:21:20.000Z | switchcalendar/urls.py | marcosorive/switchcalendar | a8771929b93e6b69a75d80a72299116e0175e961 | [
"MIT"
] | null | null | null | """switchcalendar URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | 35.241379 | 77 | 0.721135 |
8f8c483ab12efa4a47f5f74fba0fc177c1543442 | 892 | py | Python | test/test_campfire_callback.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/test_campfire_callback.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/test_campfire_callback.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | 1 | 2020-11-07T11:27:13.000Z | 2020-11-07T11:27:13.000Z | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import opsgenie_swagger
from opsgenie_swagger.models.camp... | 21.756098 | 92 | 0.710762 |
851f01b02b72aed187e197bb723e94fa414176aa | 1,412 | py | Python | locations/spiders/stater_bros.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/stater_bros.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/stater_bros.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import json
from locations.items import GeojsonPointItem
class StaterBrosSpider(scrapy.Spider):
name = "stater-bros"
item_attributes = {"brand": "Stater Bros"}
allowed_domains = ["www.staterbros.com"]
def start_requests(self):
urls = [
"http:/... | 35.3 | 78 | 0.50779 |
327c5809b7bbc3d6fdade2feb4313d4a7615d431 | 758 | py | Python | lib/mpl_toolkits/axisartist/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 35 | 2015-10-23T08:15:36.000Z | 2022-02-03T10:17:15.000Z | lib/mpl_toolkits/axisartist/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2015-09-17T16:27:45.000Z | 2018-07-31T05:59:33.000Z | lib/mpl_toolkits/axisartist/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 25 | 2016-01-18T12:19:11.000Z | 2021-12-11T15:45:17.000Z | from axislines import Axes, Subplot, AxesZero, SubplotZero, GridHelperRectlinear, \
AxisArtistHelperRectlinear, AxisArtistHelper, GridHelperBase, AxisArtist
from axis_artist import AxisArtist, GridlinesCollection
from grid_helper_curvelinear import GridHelperCurveLinear
from floating_axes import FloatingAxes, Fl... | 32.956522 | 84 | 0.853562 |
55cfd0c7eb226c3fd304b50e219a05863a15743d | 13,944 | py | Python | zerver/tornado/socket.py | Supermanu/zulip | 26f6d708c2e30cfe50d9d61031edb759e8117596 | [
"Apache-2.0"
] | null | null | null | zerver/tornado/socket.py | Supermanu/zulip | 26f6d708c2e30cfe50d9d61031edb759e8117596 | [
"Apache-2.0"
] | 15 | 2020-06-05T18:44:15.000Z | 2022-03-11T23:26:03.000Z | zerver/tornado/socket.py | Supermanu/zulip | 26f6d708c2e30cfe50d9d61031edb759e8117596 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from typing import Any, Dict, Mapping, Optional, Text, Union
from django.conf import settings
from django.utils.timezone import now as timezone_now
from django.utils.translation import ugettext as _
from django.contrib.sessions.models import Session as djSession
try:
from dj... | 44.126582 | 115 | 0.606067 |
d75f79543c37ba1e97e60dd64342f0b326973fe8 | 1,621 | py | Python | progress.py | rockie-yang/japanese-learning | d85e99a54b166c996f33f166be06e19f2bec8d49 | [
"MIT"
] | null | null | null | progress.py | rockie-yang/japanese-learning | d85e99a54b166c996f33f166be06e19f2bec8d49 | [
"MIT"
] | null | null | null | progress.py | rockie-yang/japanese-learning | d85e99a54b166c996f33f166be06e19f2bec8d49 | [
"MIT"
] | null | null | null | __author__ = 'Rockie Yang'
import os
import codecs
class Progress():
def __init__(self, words, progress_file = "progress.data"):
self.progress_file = progress_file
# self.practise_dict = practise_dict
self.progress_data = {}
self.words = words
def init_progress(self):
... | 30.584906 | 101 | 0.590993 |
a07e2f972c5e31aedbbea133630ec4dc194e1650 | 703 | py | Python | server/djangoapp/admin.py | tquatrep/agfzb-CloudAppDevelopment_Capstone | 52042821a17ff83ed3ecf292081755f40c67d6b9 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | tquatrep/agfzb-CloudAppDevelopment_Capstone | 52042821a17ff83ed3ecf292081755f40c67d6b9 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | tquatrep/agfzb-CloudAppDevelopment_Capstone | 52042821a17ff83ed3ecf292081755f40c67d6b9 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import CarMake, CarModel
# Register your models here.
# CarModelInline class
class CarModelInline(admin.StackedInline):
model = CarModel
extra = 1
# CarModelAdmin class
class CarModelAdmin(admin.ModelAdmin):
fields = ['car_make', 'name', 'dealer_id', 'car_ty... | 24.241379 | 66 | 0.74111 |
9466aa9488029a4bca4b3cac8c8fd1ba42dd6d7c | 261 | py | Python | samples/modules/module_use_2.py | nakednamor/naked-python | 6580afe41c867888a08c5394d32c2bb4c60fa6d0 | [
"MIT"
] | null | null | null | samples/modules/module_use_2.py | nakednamor/naked-python | 6580afe41c867888a08c5394d32c2bb4c60fa6d0 | [
"MIT"
] | null | null | null | samples/modules/module_use_2.py | nakednamor/naked-python | 6580afe41c867888a08c5394d32c2bb4c60fa6d0 | [
"MIT"
] | null | null | null | # you can import only specific methods from a module
from module_definition import method_a, method_b
# if you import like this, you don't need to use the module_name when
# calling the method - instead you can simply use the method-name
method_a()
method_b()
| 32.625 | 69 | 0.785441 |
241626f46719391987ad5f3f50fe4392cb8253af | 416 | py | Python | engines.py | haydenshively/AME-261 | 1cf686835e4eead3a5d23cae65dd7644515fe665 | [
"MIT"
] | 1 | 2022-03-29T23:59:23.000Z | 2022-03-29T23:59:23.000Z | engines.py | haydenshively/AME-261 | 1cf686835e4eead3a5d23cae65dd7644515fe665 | [
"MIT"
] | null | null | null | engines.py | haydenshively/AME-261 | 1cf686835e4eead3a5d23cae65dd7644515fe665 | [
"MIT"
] | null | null | null | import csv
engine_db = {}
with open('engines.csv', newline='') as f:
csv_reader = csv.reader(f, delimiter=',')
line = 0
for row in csv_reader:
if line != 0 and row[0] != '':
engine_db[row[0]] = {
'thrust': float(row[1]),
'weight': float(row[2]),
... | 27.733333 | 45 | 0.4375 |
bd0be94bfdb327a1431e21eae2c1b221653e13fa | 1,191 | py | Python | lyftbutton/api/dashbutton.py | jairtrejo/lyftbutton-api | 4c7d6b8b1ad6b613a23fa30e5e080b78d515762b | [
"MIT"
] | null | null | null | lyftbutton/api/dashbutton.py | jairtrejo/lyftbutton-api | 4c7d6b8b1ad6b613a23fa30e5e080b78d515762b | [
"MIT"
] | null | null | null | lyftbutton/api/dashbutton.py | jairtrejo/lyftbutton-api | 4c7d6b8b1ad6b613a23fa30e5e080b78d515762b | [
"MIT"
] | null | null | null | import attr
from lyftbutton.dashbutton import DashButton
from lyftbutton.repository import LyftButton
from lyftbutton.utils.lambdafn import Response, api_handler
@api_handler
def get_dash_button(auth_context=None):
if not auth_context:
return Response(status_code=403)
return LyftButton.find(lyft_id=... | 25.340426 | 74 | 0.729639 |
3bbeed5ee1fcf057fc8bbe7c092ddc283a76d309 | 3,161 | py | Python | migrations/versions/a37f76ceca7a_initial_migration.py | Muriithijoe/Pitch | 94fdc9dcd0880528873c8b5d96589f66f744f60d | [
"Unlicense"
] | null | null | null | migrations/versions/a37f76ceca7a_initial_migration.py | Muriithijoe/Pitch | 94fdc9dcd0880528873c8b5d96589f66f744f60d | [
"Unlicense"
] | null | null | null | migrations/versions/a37f76ceca7a_initial_migration.py | Muriithijoe/Pitch | 94fdc9dcd0880528873c8b5d96589f66f744f60d | [
"Unlicense"
] | null | null | null | """Initial Migration
Revision ID: a37f76ceca7a
Revises: 1050f7f8b2b3
Create Date: 2018-10-17 11:54:15.778282
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a37f76ceca7a'
down_revision = '1050f7f8b2b3'
branch_labels = None
depends_on = None
def upgrade():
... | 50.174603 | 117 | 0.708004 |
c506bcd0294a28d2b751323de1851dd66b9a3006 | 4,975 | py | Python | Python/bokeh_practice/GridPlot_app.py | freestone-lab/irm | bacc43d159a750c8ad3c6e5c5d34962f15eed822 | [
"BSD-3-Clause"
] | null | null | null | Python/bokeh_practice/GridPlot_app.py | freestone-lab/irm | bacc43d159a750c8ad3c6e5c5d34962f15eed822 | [
"BSD-3-Clause"
] | null | null | null | Python/bokeh_practice/GridPlot_app.py | freestone-lab/irm | bacc43d159a750c8ad3c6e5c5d34962f15eed822 | [
"BSD-3-Clause"
] | null | null | null |
import logging
logging.basicConfig(level=logging.DEBUG)
import numpy as np
# For now, hack adding it to the path...
import sys
sys.path.append('../')
import correlation_coefficient as cc
rpdf = cc.rpdf
from bokeh.plotting import figure
from bokeh.models import Plot, ColumnDataSource, GridPlot
from bokeh.properties ... | 31.891026 | 85 | 0.549347 |
fe47fddb915387fcacdbd576767eb3e381826c79 | 3,058 | py | Python | src/loss.py | kw01sg/style-transfer-flask | 3f1d888b5041612bb8be6958ca3be7c3271c9b56 | [
"MIT"
] | 11 | 2019-06-30T06:15:31.000Z | 2022-01-25T03:32:14.000Z | src/loss.py | kw01sg/style-transfer-flask | 3f1d888b5041612bb8be6958ca3be7c3271c9b56 | [
"MIT"
] | 7 | 2020-11-13T18:36:55.000Z | 2022-02-10T00:32:41.000Z | src/loss.py | kw01sg/style-transfer-flask | 3f1d888b5041612bb8be6958ca3be7c3271c9b56 | [
"MIT"
] | null | null | null | import tensorflow as tf
from src.utils import normalize_weights
def gram_matrix(input_tensor):
"""Expect input_tensor to have shape of n_batch * n_activation_height * n_activation_width * n_channel"""
return tf.einsum('abcd,abce->ade', input_tensor, input_tensor)
def style_content_loss(generated_outputs,
... | 41.890411 | 126 | 0.688031 |
1f5cc8fd29fd92cf2b6a48e6ca9f06347f3755d7 | 5,526 | py | Python | WANNRelease/prettyNeatWann/domain/config.py | adafok/brain-tokyo-workshop | df581f33d1420076e54aa4243d96b4bdfd7fe49c | [
"Apache-2.0"
] | 1,097 | 2019-07-15T20:43:30.000Z | 2022-03-31T15:04:39.000Z | WANNRelease/prettyNeatWann/domain/config.py | icefire-luo/brain-tokyo-workshop | 2d50504c14625312a0cd3d569f08d20d51e87bd9 | [
"Apache-2.0"
] | 37 | 2019-08-14T13:47:03.000Z | 2022-03-17T01:04:21.000Z | WANNRelease/prettyNeatWann/domain/config.py | icefire-luo/brain-tokyo-workshop | 2d50504c14625312a0cd3d569f08d20d51e87bd9 | [
"Apache-2.0"
] | 335 | 2019-08-06T04:37:37.000Z | 2022-03-26T19:02:12.000Z | from collections import namedtuple
import numpy as np
Game = namedtuple('Game', ['env_name', 'time_factor', 'actionSelect',
'input_size', 'output_size', 'layers', 'i_act', 'h_act',
'o_act', 'weightCap','noise_bias','output_noise','max_episode_length','in_out_labels'])
games = {}
# -- Car Racing ---------------... | 31.942197 | 89 | 0.631198 |
995081937c53582bfe4f31a5b943ae3a7698ff18 | 35,539 | py | Python | Lib/site-packages/debugpy/_vendored/pydevd/pydevd_file_utils.py | KarmaScripter/PiggyPy | 25ba1d0c8933a0cb655f09db6c228f74f4d52894 | [
"MIT"
] | null | null | null | Lib/site-packages/debugpy/_vendored/pydevd/pydevd_file_utils.py | KarmaScripter/PiggyPy | 25ba1d0c8933a0cb655f09db6c228f74f4d52894 | [
"MIT"
] | null | null | null | Lib/site-packages/debugpy/_vendored/pydevd/pydevd_file_utils.py | KarmaScripter/PiggyPy | 25ba1d0c8933a0cb655f09db6c228f74f4d52894 | [
"MIT"
] | null | null | null | r'''
This module provides utilities to get the absolute filenames so that we can be sure that:
- The case of a file will match the actual file in the filesystem (otherwise breakpoints won't be hit).
- Providing means for the user to make path conversions when doing a remote debugging session in
... | 38.92552 | 136 | 0.659107 |
21875050d32f9dd018c443839e96c15189587144 | 7,494 | py | Python | ros/src/twist_controller/twist_controller_mod.py | edufford/CarND-Capstone | dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8 | [
"MIT"
] | 9 | 2018-03-07T01:38:31.000Z | 2020-05-14T14:22:52.000Z | ros/src/twist_controller/twist_controller_mod.py | edufford/CarND-Capstone | dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8 | [
"MIT"
] | 95 | 2018-02-27T11:37:30.000Z | 2019-02-09T20:37:03.000Z | ros/src/twist_controller/twist_controller_mod.py | edufford/CarND-Capstone | dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8 | [
"MIT"
] | 4 | 2018-02-26T21:20:17.000Z | 2019-08-09T15:50:53.000Z | import time
import rospy
from lowpass import LowPassFilter
from pid import PID
from yaw_controller import YawController
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
class Controller(object):
def __init__(self, default_update_interval, wheel_base, steer_ratio, min_speed, max_lat_accel, max_steer_angle, max_decelerati... | 47.732484 | 313 | 0.682146 |
e2c35e3a01fa119523e3f9b1e4c578643515aa92 | 7,718 | py | Python | contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py | lahosken/pants | 1b0340987c9b2eab9411416803c75b80736716e4 | [
"Apache-2.0"
] | null | null | null | contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py | lahosken/pants | 1b0340987c9b2eab9411416803c75b80736716e4 | [
"Apache-2.0"
] | null | null | null | contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py | lahosken/pants | 1b0340987c9b2eab9411416803c75b80736716e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import sub... | 45.4 | 100 | 0.680228 |
d906806bd6c9b301631f68150d3e607d3168058d | 21,974 | py | Python | jstc/test_compiler.py | canaryhealth/jstc | d4be1f213e041b80708e8a7e40edfe2ae308b637 | [
"MIT"
] | null | null | null | jstc/test_compiler.py | canaryhealth/jstc | d4be1f213e041b80708e8a7e40edfe2ae308b637 | [
"MIT"
] | null | null | null | jstc/test_compiler.py | canaryhealth/jstc | d4be1f213e041b80708e8a7e40edfe2ae308b637 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <phil@canary.md>
# date: 2016/09/15
# copy: (C) Copyright 2016-EOT Canary Health, Inc., All Rights Reserved.
#--------------------------------------------------------------------... | 34.990446 | 276 | 0.51388 |
789364317fca14b8a5c905f2ae517530c7309670 | 27,267 | py | Python | bert4keras/snippets.py | Atakey/bert4keras | af6811b182abdd32b2a143a8f303a7a7cbaf76b0 | [
"Apache-2.0"
] | 1 | 2021-08-29T16:21:41.000Z | 2021-08-29T16:21:41.000Z | bert4keras/snippets.py | Atakey/bert4keras | af6811b182abdd32b2a143a8f303a7a7cbaf76b0 | [
"Apache-2.0"
] | null | null | null | bert4keras/snippets.py | Atakey/bert4keras | af6811b182abdd32b2a143a8f303a7a7cbaf76b0 | [
"Apache-2.0"
] | null | null | null | #! -*- coding: utf-8 -*-
# 代码合集
import os, sys, six, re, json
import logging
import numpy as np
from collections import defaultdict
from bert4keras.backend import K, keras, tf
_open_ = open
is_py2 = six.PY2
if not is_py2:
basestring = str
def to_array(*args):
"""批量转numpy的array
"""
results = [np.arr... | 31.09122 | 80 | 0.523233 |
e21b4ed8dd7e78acf1562b401de08ecabc573262 | 3,097 | py | Python | Connect-four/main.py | MehnoushFaghani/Ripples--PCP | e5e14f1c333f7b4b4935d71caf6c48089870b0f7 | [
"MIT"
] | null | null | null | Connect-four/main.py | MehnoushFaghani/Ripples--PCP | e5e14f1c333f7b4b4935d71caf6c48089870b0f7 | [
"MIT"
] | null | null | null | Connect-four/main.py | MehnoushFaghani/Ripples--PCP | e5e14f1c333f7b4b4935d71caf6c48089870b0f7 | [
"MIT"
] | null | null | null | # "By getting help of Konstantine Tsafatinos"
import numpy as np
from typing import Optional, Callable
from agents.common import PlayerAction, BoardPiece, SavedState, GenMove
import timeit
# from agents.agent_minimax.minimax import generate_move_minimax
# from agents.agent_random.random import generate_move_random
fro... | 38.234568 | 109 | 0.589603 |
2d323c9357993ceb4e5ff8af8789220beff166c7 | 3,327 | py | Python | command_history_wordcloud/command_history_wordcloud.py | hatappo/command_history_wordcloud | b888aa990ecf66e44260efb622ba6b4e67b2879f | [
"MIT"
] | 3 | 2017-03-30T08:46:03.000Z | 2020-06-09T15:34:52.000Z | command_history_wordcloud/command_history_wordcloud.py | hatappo/command_history_wordcloud | b888aa990ecf66e44260efb622ba6b4e67b2879f | [
"MIT"
] | 5 | 2019-06-04T07:59:51.000Z | 2022-03-11T23:18:28.000Z | command_history_wordcloud/command_history_wordcloud.py | hatappo/command_history_wordcloud | b888aa990ecf66e44260efb622ba6b4e67b2879f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re, codecs, argparse
from pprint import pformat
from os import path
from subprocess import Popen, PIPE, STDOUT
from logging import getLogger, StreamHandler, Formatter, DEBUG
from wordcloud import WordCloud
####################
# Initialization
####################... | 32.300971 | 160 | 0.662158 |
34db83f3867a1a73267441fe711d649a4fdb8259 | 2,239 | py | Python | tools/giws/datatypes/IntBufferDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | tools/giws/datatypes/IntBufferDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | tools/giws/datatypes/IntBufferDataGiws.py | sguazt/dcsxx-testbed | e7210f0c7f54256d5bf0c90297e0c4f9eaf82da0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python -u
# Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU
#
# Sylvestre LEDRU - <sylvestre.ledru@scilab.org> <sylvestre@ledru.info>
#
# This software is a computer program whose purpose is to generate C++ wrapper
# for Java objects/methods.
#
# This software is governed by the CeCILL license under Fr... | 37.316667 | 79 | 0.769093 |
7d5f8a23d8cd9daffc8406367dbf8e0e85e4aca9 | 3,380 | py | Python | test_block.py | mjoniak/adder | c84cb4927b91e6cd7801677ed683795a2026b2a6 | [
"MIT"
] | null | null | null | test_block.py | mjoniak/adder | c84cb4927b91e6cd7801677ed683795a2026b2a6 | [
"MIT"
] | 5 | 2018-02-07T10:24:51.000Z | 2018-02-07T10:25:54.000Z | test_block.py | mjoniak/adder | c84cb4927b91e6cd7801677ed683795a2026b2a6 | [
"MIT"
] | null | null | null | from collections import namedtuple
from unittest import TestCase
from block import Block, source, negation, alternative, conjunction, nand, nor, xor
Point = namedtuple('Point', ['x', 'y'])
class ConnectorTest(TestCase):
def test_inside_connector_no_connectors(self):
block = Block(0, 0, input_connectors_... | 36.73913 | 83 | 0.676036 |
53c6f49e002caa6233ee8f981d8c685cdef9cc6c | 14,189 | py | Python | lib/membase/api/esrest_client.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | lib/membase/api/esrest_client.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | lib/membase/api/esrest_client.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | from membase.api.rest_client import RestConnection, Bucket, BucketStats, OtpNode, Node
from remote.remote_util import RemoteMachineShellConnection
from TestInput import TestInputSingleton
from pyes import ES, managers, query
import logger
import time
import requests
log = logger.Logger.get_logger()
# EsRestConnectio... | 32.10181 | 152 | 0.597717 |
688d84a74f969b1c00ebf03eca6f3c6c8a4d6970 | 8,785 | py | Python | localstack/utils/aws/aws_models.py | OwnZones/localstack | 490408953e2a32d8402a997ea7eb36568c983b7a | [
"Apache-2.0"
] | null | null | null | localstack/utils/aws/aws_models.py | OwnZones/localstack | 490408953e2a32d8402a997ea7eb36568c983b7a | [
"Apache-2.0"
] | 1 | 2019-07-01T12:08:26.000Z | 2019-07-01T12:08:26.000Z | localstack/utils/aws/aws_models.py | OwnZones/localstack | 490408953e2a32d8402a997ea7eb36568c983b7a | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import time
import json
import six
if six.PY3:
long = int
class Component(object):
def __init__(self, id, env=None):
self.id = id
self.env = env
self.created_at = None
def name(self):
return self.id
def __repr__(self):
r... | 29.479866 | 100 | 0.576551 |
da65495e06fb50dfa719b3a8af0478428d5e9dc6 | 11,583 | py | Python | tools/attack/util/dist_utils.py | rajk97/Adversial-Attacks-on-densely-fused-point-clouds-for-6D-Pose-Estimation | e296e70c3a1286b7491995215369d9f39cfcba17 | [
"MIT"
] | 36 | 2020-10-07T05:52:15.000Z | 2022-03-11T03:05:32.000Z | tools/attack/util/dist_utils.py | rajk97/Adversial-Attacks-on-densely-fused-point-clouds-for-6D-Pose-Estimation | e296e70c3a1286b7491995215369d9f39cfcba17 | [
"MIT"
] | 9 | 2021-01-04T02:11:36.000Z | 2021-11-23T16:21:59.000Z | tools/attack/util/dist_utils.py | rajk97/Adversial-Attacks-on-densely-fused-point-clouds-for-6D-Pose-Estimation | e296e70c3a1286b7491995215369d9f39cfcba17 | [
"MIT"
] | 6 | 2020-11-29T02:13:55.000Z | 2021-12-06T08:19:16.000Z | import numpy as np
import torch
import torch.nn as nn
from util.set_distance import chamfer, hausdorff
class L2Dist(nn.Module):
def __init__(self):
"""Compute global L2 distance between two point clouds.
"""
super(L2Dist, self).__init__()
def forward(self, adv_pc, ori_pc,
... | 36.084112 | 86 | 0.563498 |
e1905291393fcadda73f9d66339e62379ac46428 | 363 | py | Python | scraper/scraper/urls.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | 1 | 2017-03-04T06:41:03.000Z | 2017-03-04T06:41:03.000Z | scraper/scraper/urls.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | null | null | null | scraper/scraper/urls.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.conf.urls import url, include
# from django.contrib import admin
urlpatterns = [
# url(r'^admin/', admin.site.urls),
url(r'^api/', include('api.urls', namespace='api')),
url(r'^lifecycle/', include('lifecycle.urls', namespace='lifecycle')),
url(r'^pin... | 30.25 | 74 | 0.677686 |
f3a829884bc26558acf612399ec0cd8b634837d5 | 15,611 | py | Python | tasks/test.py | karim7262/datadog-agent | a48b9b58fb9f13e53782a936783da2cc4b7b0c7c | [
"Apache-2.0"
] | 1 | 2021-09-13T03:01:39.000Z | 2021-09-13T03:01:39.000Z | tasks/test.py | karim7262/datadog-agent | a48b9b58fb9f13e53782a936783da2cc4b7b0c7c | [
"Apache-2.0"
] | null | null | null | tasks/test.py | karim7262/datadog-agent | a48b9b58fb9f13e53782a936783da2cc4b7b0c7c | [
"Apache-2.0"
] | null | null | null | """
High level testing tasks
"""
from __future__ import print_function
import os
import fnmatch
import re
import operator
import sys
import yaml
import invoke
from invoke import task
from invoke.exceptions import Exit
from .utils import get_build_flags, get_version
from .go import fmt, lint, vet, misspell, ineffassi... | 35.887356 | 232 | 0.613542 |
81c5c0423742f7f9787eb2a396c275deb1a118ae | 2,686 | py | Python | airbyte-integrations/connectors/destination-scaffold-destination-python/destination_scaffold_destination_python/destination.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 22 | 2020-08-27T00:47:20.000Z | 2020-09-17T15:39:39.000Z | airbyte-integrations/connectors/destination-scaffold-destination-python/destination_scaffold_destination_python/destination.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 116 | 2020-08-27T01:11:27.000Z | 2020-09-19T02:47:52.000Z | airbyte-integrations/connectors/destination-scaffold-destination-python/destination_scaffold_destination_python/destination.py | onaio/airbyte | 38302e82a25f1b66742c3febfbff0668556920f2 | [
"MIT"
] | 1 | 2020-09-15T06:10:01.000Z | 2020-09-15T06:10:01.000Z | #
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
from typing import Any, Iterable, Mapping
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.destinations import Destination
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, Status
class DestinationSca... | 49.740741 | 144 | 0.726359 |
c6a7e5a0791c50c5fd0534cb5335a8e93aa00e5f | 64,150 | bzl | Python | tools/build_variables.bzl | gml16/pytorch | fad60484572c490384c107cf625d484e34dc9bcf | [
"Intel"
] | 2 | 2022-02-14T13:56:03.000Z | 2022-02-14T13:56:05.000Z | tools/build_variables.bzl | gml16/pytorch | fad60484572c490384c107cf625d484e34dc9bcf | [
"Intel"
] | null | null | null | tools/build_variables.bzl | gml16/pytorch | fad60484572c490384c107cf625d484e34dc9bcf | [
"Intel"
] | null | null | null | # In both open-source and fbcode builds, these are generated into
# torch/csrc/{autgrad,jit}/generated.i
GENERATED_CPP = [
"autograd/generated/Functions.cpp",
"autograd/generated/VariableType_0.cpp",
"autograd/generated/VariableType_1.cpp",
"autograd/generated/VariableType_2.cpp",
"autograd/generate... | 46.961933 | 134 | 0.738628 |
d8f80edeedf5a75235661a6e2fa4008b26a23ea3 | 4,141 | py | Python | thing/tasks/planetarycolonies.py | Gillingham/evething | e00b722cf00a6a3a25e1fff3014ed3365c7ef3e4 | [
"BSD-2-Clause"
] | 33 | 2015-02-18T00:07:57.000Z | 2020-06-09T15:19:05.000Z | thing/tasks/planetarycolonies.py | Gillingham/evething | e00b722cf00a6a3a25e1fff3014ed3365c7ef3e4 | [
"BSD-2-Clause"
] | 19 | 2015-03-09T19:51:43.000Z | 2019-10-19T12:04:23.000Z | thing/tasks/planetarycolonies.py | Gillingham/evething | e00b722cf00a6a3a25e1fff3014ed3365c7ef3e4 | [
"BSD-2-Clause"
] | 20 | 2015-02-20T17:53:17.000Z | 2022-02-11T06:29:11.000Z | # ------------------------------------------------------------------------------
# Copyright (c) 2010-2014, EVEthing team
# 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... | 41 | 88 | 0.616518 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.