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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f3459b23f33126c73c4b69fe300c1f2bcb8c3a0 | 1,011 | py | Python | 2019/day-02/2.py | Valokoodari/advent-of-code | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | 2 | 2021-12-27T18:59:11.000Z | 2022-01-10T02:31:36.000Z | 2019/day-02/2.py | Valokoodari/advent-of-code-2019 | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | null | null | null | 2019/day-02/2.py | Valokoodari/advent-of-code-2019 | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | 2 | 2021-12-23T17:29:10.000Z | 2021-12-24T03:21:49.000Z | inputFile = "2-input"
outputFile = "2-output"
def readFile():
file = open(inputFile, "r")
code = list(map(int, file.readline().split(",")))
file.close
return code
def writeFile(a, b):
file = open(outputFile, "w+")
file.write("Part 1: " + a + "\n")
file.write("Part 2: " + b)
file.close(... | 22.466667 | 63 | 0.503462 |
f71ea6b4496eae33b99557e0515c9fe2901709df | 244 | py | Python | problems/303_range_sum_query_immutable.py | wasi0013/leet_code | c589c10f06043fa0ac7643e09ae3903d77c2f8e9 | [
"MIT"
] | null | null | null | problems/303_range_sum_query_immutable.py | wasi0013/leet_code | c589c10f06043fa0ac7643e09ae3903d77c2f8e9 | [
"MIT"
] | null | null | null | problems/303_range_sum_query_immutable.py | wasi0013/leet_code | c589c10f06043fa0ac7643e09ae3903d77c2f8e9 | [
"MIT"
] | null | null | null | class NumArray:
def __init__(self, nums: List[int]):
self.n = list(accumulate(nums))
def sumRange(self, left: int, right: int) -> int:
return self.n[right]- (self.n[left-1] if left>0 else 0)
| 22.181818 | 63 | 0.545082 |
cda52b581e5eea401f84ad9a343d8bde4e1fe529 | 5,411 | py | Python | ipyannotator/bbox_annotator.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 19 | 2020-10-12T19:52:10.000Z | 2022-02-07T18:23:26.000Z | ipyannotator/bbox_annotator.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 6 | 2021-08-02T09:36:32.000Z | 2022-01-05T15:29:30.000Z | ipyannotator/bbox_annotator.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 1 | 2020-12-01T22:42:01.000Z | 2020-12-01T22:42:01.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/04_bbox_annotator.ipynb (unless otherwise specified).
__all__ = ['BBoxAnnotator']
# Internal Cell
import os
import json
from ipyevents import Event
from ipywidgets import (AppLayout, Button, IntSlider, IntProgress,
HBox, VBox, Output,
... | 36.315436 | 117 | 0.64258 |
588c39778a34dcb1d8cf1d67adb94ee69eabc529 | 103 | py | Python | geomstats/_backend/constants.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 743 | 2018-05-23T02:23:29.000Z | 2022-03-29T22:59:22.000Z | geomstats/_backend/constants.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 1,119 | 2018-05-15T05:29:38.000Z | 2022-03-31T18:27:02.000Z | geomstats/_backend/constants.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 159 | 2018-05-23T17:49:24.000Z | 2022-03-30T16:44:47.000Z | tf_atol = 1e-6
tf_rtol = 1e-5
pytorch_atol = 1e-6
pytorch_rtol = 1e-5
np_atol = 1e-12
np_rtol = 1e-6
| 11.444444 | 19 | 0.68932 |
40da53de9470f666dac92a7c61b0db930bcc11be | 3,772 | py | Python | test.py | spongezhang/pytorch-CycleGAN-and-pix2pix | 01875b21d537512c304f37fb0eb65fea7f57f4ba | [
"BSD-3-Clause"
] | 2 | 2021-04-10T10:51:24.000Z | 2021-09-27T07:13:35.000Z | test.py | spongezhang/pytorch-CycleGAN-and-pix2pix | 01875b21d537512c304f37fb0eb65fea7f57f4ba | [
"BSD-3-Clause"
] | null | null | null | test.py | spongezhang/pytorch-CycleGAN-and-pix2pix | 01875b21d537512c304f37fb0eb65fea7f57f4ba | [
"BSD-3-Clause"
] | null | null | null | """General-purpose test script for image-to-image translation.
Once you have trained your model with train.py, you can use this script to test the model.
It will load a saved model from --checkpoints_dir and save the results to --results_dir.
It first creates model and dataset given the option. It will hard-code some... | 58.030769 | 126 | 0.72508 |
16e90b700d678aae614d7dee970c7344d942868d | 6,290 | py | Python | gammagl/layers/conv/simplehgn_conv.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | gammagl/layers/conv/simplehgn_conv.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | gammagl/layers/conv/simplehgn_conv.py | BUPT-GAMMA/GammaGL | 2b9f32e1ac3533cb75a063243e8a2fa654466d18 | [
"Apache-2.0"
] | null | null | null | import tensorlayerx as tlx
from gammagl.layers.conv import MessagePassing
from gammagl.utils import segment_softmax
from gammagl.mpops import *
class SimpleHGNConv(MessagePassing):
r'''The SimpleHGN layer from the `"Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous graph neu... | 37.218935 | 166 | 0.61097 |
811fff18d4b2c95b7f379f7282b7a14bd74b88f7 | 600 | py | Python | tests/utils/helpers.py | hmajid2301/markdown-mermaid-to-images- | fb83e46552ecf2678f3bc96ae6150024f3306abd | [
"Apache-2.0"
] | 2 | 2020-11-18T00:39:57.000Z | 2021-12-15T00:03:37.000Z | tests/utils/helpers.py | hmajid2301/markdown-mermaid-to-images | fb83e46552ecf2678f3bc96ae6150024f3306abd | [
"Apache-2.0"
] | null | null | null | tests/utils/helpers.py | hmajid2301/markdown-mermaid-to-images | fb83e46552ecf2678f3bc96ae6150024f3306abd | [
"Apache-2.0"
] | null | null | null | import filecmp
import glob
import os
class Helpers:
@staticmethod
def remove_files_in_output():
files = glob.glob("tests/data/output/*")
for file_name in files:
if file_name != ".gitkeep":
os.remove(file_name)
@staticmethod
def compare_files():
file... | 28.571429 | 89 | 0.626667 |
a65805fb6444d2996853370ffdf0bfbd731e29d3 | 12,264 | py | Python | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/list_devices_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/list_devices_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/model/list_devices_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class ListDevicesRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value... | 30.058824 | 230 | 0.630463 |
9525dc348d7d3ab429dbd39f86e81954af99ff5b | 5,175 | py | Python | tests/test_ctu.py | cglewis/lim-cli | 8d87bf377afe35b5f2ba420fdb47ad3f4cc02a51 | [
"Apache-2.0"
] | null | null | null | tests/test_ctu.py | cglewis/lim-cli | 8d87bf377afe35b5f2ba420fdb47ad3f4cc02a51 | [
"Apache-2.0"
] | null | null | null | tests/test_ctu.py | cglewis/lim-cli | 8d87bf377afe35b5f2ba420fdb47ad3f4cc02a51 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ctu
--------
Tests for `lim.ctu` module.
"""
import os
import unittest
from lim.ctu import CTU_Dataset
TEST_VALID_GROUP = 'malware'
TEST_INVALID_GROUP = 'erawlam'
TEST_CACHE = 'tests/test-ctu-cache.json'
class Test_CTU_Dataset(unittest.TestCase):
def setU... | 36.188811 | 101 | 0.688889 |
43e88f6b4d38cbe970094ad09de74c5adcdd24f0 | 2,616 | py | Python | tests/bugs/core_0143_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_0143_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_0143_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_0143
# title: Using where params in SUM return incorrect results
# decription:
# 30.10.2019. NB: new datatype in FB 4.0 was introduces: numeric(38,0).
# It can lead to additional ident of values when we show them in form "SET LIST O... | 30.418605 | 102 | 0.582569 |
cee82efcb8841d1cf048637bc603d708c9c3237a | 68 | py | Python | rest_framework_json_schema/__init__.py | greenroxana/drf-json-schema | 7525a3f54d14ca0ac15efc6fad7a06cc6a05aced | [
"MIT"
] | 15 | 2017-01-31T22:58:59.000Z | 2021-07-02T14:19:38.000Z | rest_framework_json_schema/__init__.py | greenroxana/drf-json-schema | 7525a3f54d14ca0ac15efc6fad7a06cc6a05aced | [
"MIT"
] | 13 | 2017-04-05T17:53:10.000Z | 2021-06-02T22:21:55.000Z | rest_framework_json_schema/__init__.py | greenroxana/drf-json-schema | 7525a3f54d14ca0ac15efc6fad7a06cc6a05aced | [
"MIT"
] | 4 | 2021-04-17T18:46:23.000Z | 2021-05-18T08:35:15.000Z | """Top-level package for drf-json-schema."""
__version__ = "0.4.1"
| 17 | 44 | 0.661765 |
73bd8c5b5da0fc204e5a4c78c2cc7f6c46d33760 | 8,477 | py | Python | t5x/examples/decoder_only/network.py | dumpmemory/t5x | 463a23d577490a26498d9bbb2d7554be88afa316 | [
"Apache-2.0"
] | 2 | 2021-11-06T15:48:12.000Z | 2022-01-05T02:34:50.000Z | t5x/examples/decoder_only/network.py | dumpmemory/t5x | 463a23d577490a26498d9bbb2d7554be88afa316 | [
"Apache-2.0"
] | 14 | 2021-11-04T16:28:11.000Z | 2022-01-06T11:25:58.000Z | t5x/examples/decoder_only/network.py | dumpmemory/t5x | 463a23d577490a26498d9bbb2d7554be88afa316 | [
"Apache-2.0"
] | 2 | 2021-11-17T13:43:56.000Z | 2022-01-05T02:34:49.000Z | # Copyright 2021 The T5X Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 36.07234 | 80 | 0.659313 |
c8f71afb5594a3b32cde1a71900439227a7dd8ee | 2,289 | py | Python | scrape_twitter_v2.py | SKJNR/Crypto-currency-Price-Prediction-based-on-Sentiment | 89f8fd6b5f36a92a9cabeaa5bff6ad44dbef2bc7 | [
"Apache-2.0"
] | null | null | null | scrape_twitter_v2.py | SKJNR/Crypto-currency-Price-Prediction-based-on-Sentiment | 89f8fd6b5f36a92a9cabeaa5bff6ad44dbef2bc7 | [
"Apache-2.0"
] | null | null | null | scrape_twitter_v2.py | SKJNR/Crypto-currency-Price-Prediction-based-on-Sentiment | 89f8fd6b5f36a92a9cabeaa5bff6ad44dbef2bc7 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import requests
import json
import pandas as pd
import nltk
nltk.download("vader_lexicon", "nltk_data")
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
# Get datetime for now and 7 days ago, correctly formatted for Twitt... | 31.791667 | 183 | 0.697248 |
af33cb5c40dfe958d9e09886c192df5f6971ec7e | 723 | py | Python | dac_example.py | jeremyherbert/python-polyglot-turtle | 8172a4885c38c08b9410ca0f6aa18e4182e2539b | [
"MIT"
] | null | null | null | dac_example.py | jeremyherbert/python-polyglot-turtle | 8172a4885c38c08b9410ca0f6aa18e4182e2539b | [
"MIT"
] | null | null | null | dac_example.py | jeremyherbert/python-polyglot-turtle | 8172a4885c38c08b9410ca0f6aa18e4182e2539b | [
"MIT"
] | null | null | null | import time
from polyglot_turtle import PolyglotTurtleXiao, PinDirection
if __name__ == "__main__":
pt = PolyglotTurtleXiao()
maximum_dac_value, maximum_dac_voltage = pt.dac_get_info()
print("DAC will output", maximum_dac_voltage, "volts at the maximum level of", maximum_dac_value)
dac_gpio = 0
... | 36.15 | 118 | 0.731674 |
625b4092b448f172a1c08279a4fd9480c4f3f72c | 627 | py | Python | botlander/resources/image_resource.py | LEMSantos/botlander-backend | e38e78e935a784a0e7840477dd30048b54905045 | [
"MIT"
] | null | null | null | botlander/resources/image_resource.py | LEMSantos/botlander-backend | e38e78e935a784a0e7840477dd30048b54905045 | [
"MIT"
] | null | null | null | botlander/resources/image_resource.py | LEMSantos/botlander-backend | e38e78e935a784a0e7840477dd30048b54905045 | [
"MIT"
] | null | null | null | from flask_restful import Resource, abort
from botlander.database.models import Bot
from http import HTTPStatus
import bson
from flask import send_file
class BotImageResource(Resource):
def get(self, bot_id):
try:
bot = Bot.objects.get(
id=bson.objectid.ObjectId(bot_id)
... | 26.125 | 73 | 0.650718 |
b1c226a3fbe12940bc560af4d10f931a7673f01e | 2,636 | py | Python | main.py | filmszillacloud/GoFile-Bot | 6c3c2388c2f91163dfbe2d78b838a5d86dd24dff | [
"MIT"
] | null | null | null | main.py | filmszillacloud/GoFile-Bot | 6c3c2388c2f91163dfbe2d78b838a5d86dd24dff | [
"MIT"
] | null | null | null | main.py | filmszillacloud/GoFile-Bot | 6c3c2388c2f91163dfbe2d78b838a5d86dd24dff | [
"MIT"
] | null | null | null | # Made with python3
# (C) @FayasNoushad
# Copyright permission under MIT License
# All rights reserved by FayasNoushad
# License -> https://github.com/FayasNoushad/GoFile-Bot/blob/main/LICENSE
import os
import urldl
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardBut... | 29.954545 | 122 | 0.601669 |
dd158dae1bac01be5af1426bfc778fdf7ed4f53c | 630 | py | Python | Object detection and depth estimation/catkin_ws/build/f110-fall2018-skeletons/system/vesc/vesc_ackermann/catkin_generated/pkg.develspace.context.pc.py | UF-f1tenth/F1tenth-UFL | 93b0a822c67b2b425664642955342138e65974f4 | [
"Apache-2.0"
] | null | null | null | Object detection and depth estimation/catkin_ws/build/f110-fall2018-skeletons/system/vesc/vesc_ackermann/catkin_generated/pkg.develspace.context.pc.py | UF-f1tenth/F1tenth-UFL | 93b0a822c67b2b425664642955342138e65974f4 | [
"Apache-2.0"
] | null | null | null | Object detection and depth estimation/catkin_ws/build/f110-fall2018-skeletons/system/vesc/vesc_ackermann/catkin_generated/pkg.develspace.context.pc.py | UF-f1tenth/F1tenth-UFL | 93b0a822c67b2b425664642955342138e65974f4 | [
"Apache-2.0"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/f1tenth2/f110_ws/src/f110-fall2018-skeletons/system/vesc/vesc_ackermann/include".split(';') if "/home/f1tenth2/f110_ws/src/f110-fall2018-skeletons/system/vesc/vesc_ackermann/include" != "" else [... | 70 | 237 | 0.777778 |
e818cb794774bfdf39c619944575f0eab96b5f61 | 11,790 | py | Python | tfx/orchestration/launcher/kubernetes_component_launcher.py | alonsoir/tfx | 359dcc95e6104e183b685a683d502744305e5eba | [
"Apache-2.0"
] | 1 | 2021-10-04T21:53:34.000Z | 2021-10-04T21:53:34.000Z | tfx/orchestration/launcher/kubernetes_component_launcher.py | alonsoir/tfx | 359dcc95e6104e183b685a683d502744305e5eba | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/launcher/kubernetes_component_launcher.py | alonsoir/tfx | 359dcc95e6104e183b685a683d502744305e5eba | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 36.84375 | 100 | 0.67693 |
1bf7753a6a0b11f00a4ae908d861b427dfd07bff | 17,169 | py | Python | deployer/deploy_actions.py | 2i2c-org/similar-hubs | 59e72743a098f2e61a20529fce133e1ef9197ceb | [
"BSD-3-Clause"
] | null | null | null | deployer/deploy_actions.py | 2i2c-org/similar-hubs | 59e72743a098f2e61a20529fce133e1ef9197ceb | [
"BSD-3-Clause"
] | 13 | 2020-09-29T17:42:32.000Z | 2020-10-06T16:52:06.000Z | deployer/deploy_actions.py | 2i2c-org/low-touch-hubs | 35ce60e604e820f09dc877b3cc9daf75e43b5d2c | [
"BSD-3-Clause"
] | null | null | null | """
Actions available when deploying many JupyterHubs to many Kubernetes clusters
"""
import base64
import json
import os
import shutil
import subprocess
import sys
from contextlib import redirect_stderr, redirect_stdout
from pathlib import Path
import pytest
from auth import KeyProvider
from cluster import Cluster
fr... | 38.843891 | 150 | 0.676335 |
943e26e769fa8ea0cefd87ee786d42ec5e2350ba | 1,128 | py | Python | lists/minStack.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | lists/minStack.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | lists/minStack.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | from stack import *
class MinStack:
def __init__(self):
self.dataStk = ArrayStack()
self.minStk = ArrayStack()
def pop(self):
data = self.dataStk.pop()
if data == self.minStk.peek():
self.minStk.pop()
return data
def push(self, val):
if not sel... | 20.142857 | 69 | 0.531028 |
4685d1a27e24185f693e141e05079dd91b06b2a5 | 32,954 | py | Python | hata/backend/reqrep.py | ToxicKidz/hata | f834c3cee3920d3095254815582325c5232022d7 | [
"0BSD"
] | null | null | null | hata/backend/reqrep.py | ToxicKidz/hata | f834c3cee3920d3095254815582325c5232022d7 | [
"0BSD"
] | null | null | null | hata/backend/reqrep.py | ToxicKidz/hata | f834c3cee3920d3095254815582325c5232022d7 | [
"0BSD"
] | null | null | null | import json, re, codecs
from http.cookies import SimpleCookie, CookieError, Morsel
from hashlib import md5, sha1, sha256
try:
import ssl as module_ssl
except ImportError:
module_ssl = None
try:
import cchardet as chardet
except ImportError:
try:
import chardet
except ImportError as err:
... | 29.292444 | 119 | 0.549827 |
774db7717305eb9e0eb57238da718cda42eab4b9 | 2,143 | py | Python | pkg/suggestion/v1alpha1/NAS_Envelopenet/suggestion_param.py | zhenghuiwang/katib | de96a52dd9e9c8cf4165927b7fb17023cfd652fd | [
"Apache-2.0"
] | null | null | null | pkg/suggestion/v1alpha1/NAS_Envelopenet/suggestion_param.py | zhenghuiwang/katib | de96a52dd9e9c8cf4165927b7fb17023cfd652fd | [
"Apache-2.0"
] | 1 | 2019-06-14T21:22:35.000Z | 2019-06-14T21:22:35.000Z | pkg/suggestion/v1alpha1/NAS_Envelopenet/suggestion_param.py | zhenghuiwang/katib | de96a52dd9e9c8cf4165927b7fb17023cfd652fd | [
"Apache-2.0"
] | null | null | null | def parseSuggestionParam(params_raw):
param_standard = {
"gpus": ['categorical', list, []],
"gpu_usage": ['value', float, [1e-6, 1.0]],
"steps": ['value', int, [0, 'inf']],
"batch_size": ['value', int, [1, 'inf']],
"dataset": ['categorical', str, ["cifar10", "imagenet"]],
... | 36.948276 | 93 | 0.543164 |
24f4f344e9ab9658fe6a70acbdbc6d0a41a15488 | 361 | py | Python | configs/_base_/schedules/sgd_tsm_50e.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 1,870 | 2020-07-11T09:33:46.000Z | 2022-03-31T13:21:36.000Z | configs/_base_/schedules/sgd_tsm_50e.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 1,285 | 2020-07-11T11:18:57.000Z | 2022-03-31T08:41:17.000Z | configs/_base_/schedules/sgd_tsm_50e.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 557 | 2020-07-11T09:51:57.000Z | 2022-03-31T13:21:35.000Z | # optimizer
optimizer = dict(
type='SGD',
constructor='TSMOptimizerConstructor',
paramwise_cfg=dict(fc_lr5=True),
lr=0.01, # this lr is used for 8 gpus
momentum=0.9,
weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=20, norm_type=2))
# learning policy
lr_config = dict(policy=... | 27.769231 | 65 | 0.703601 |
98d402ba17d3081fac736a0afeb2f1c2c5786345 | 834 | py | Python | dosed/functions/__init__.py | BadrYoubiIdrissi/dosed | d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26 | [
"MIT"
] | 40 | 2019-04-12T16:18:40.000Z | 2022-03-02T07:03:58.000Z | dosed/functions/__init__.py | BadrYoubiIdrissi/dosed | d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26 | [
"MIT"
] | 5 | 2019-10-28T14:19:20.000Z | 2021-08-19T07:43:41.000Z | dosed/functions/__init__.py | BadrYoubiIdrissi/dosed | d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26 | [
"MIT"
] | 15 | 2019-04-13T22:14:42.000Z | 2022-02-27T14:57:38.000Z | from .simple_loss import DOSEDSimpleLoss
from .worst_negative_mining_loss import DOSEDWorstNegativeMiningLoss
from .random_negative_mining_loss import DOSEDRandomNegativeMiningLoss
from .focal_loss import DOSEDFocalLoss
from .detection import Detection
from .metrics import precision_function, recall_function, f1_functi... | 28.758621 | 70 | 0.794964 |
d50267047f986a5401f502f081e64446cd1783f4 | 3,638 | py | Python | PyMysqlPool/mysql/connector/django/schema.py | prezi/python-mysql-pool | 7a5054eeac89bf2ee05f4fd8deaa2e416d5ed9c1 | [
"MIT"
] | 90 | 2017-08-22T07:50:58.000Z | 2022-03-11T07:28:59.000Z | PyMysqlPool/mysql/connector/django/schema.py | prezi/python-mysql-pool | 7a5054eeac89bf2ee05f4fd8deaa2e416d5ed9c1 | [
"MIT"
] | 8 | 2017-09-22T03:55:31.000Z | 2022-02-20T11:06:56.000Z | PyMysqlPool/mysql/connector/django/schema.py | prezi/python-mysql-pool | 7a5054eeac89bf2ee05f4fd8deaa2e416d5ed9c1 | [
"MIT"
] | 26 | 2017-08-23T05:37:35.000Z | 2021-12-27T06:54:38.000Z | # MySQL Connector/Python - MySQL driver written in Python.
# New file added for Django 1.7
import django
if django.VERSION >= (1, 8):
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
else:
from django.db.backends.schema import BaseDatabaseSchemaEditor
from django.db.models import NOT_PROVI... | 41.816092 | 78 | 0.643485 |
4d85fe187bfb8c219ebee5337a4f4c548f12946f | 2,469 | py | Python | Validation/RecoTau/python/DQMMCValidation_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/RecoTau/python/DQMMCValidation_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/RecoTau/python/DQMMCValidation_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z |
from Validation.RecoTau.dataTypes.ValidateTausOnQCD_cff import *
from Validation.RecoTau.dataTypes.ValidateTausOnRealData_cff import *
from Validation.RecoTau.dataTypes.ValidateTausOnRealElectronsData_cff import *
from Validation.RecoTau.dataTypes.ValidateTausOnRealMuonsData_cff import *
from Validation.RecoTau.dataTy... | 34.774648 | 78 | 0.836371 |
624271c1c66c579f75be392905348ba2fc53eba6 | 4,279 | py | Python | dreamplace/ops/abacus_legalize/abacus_legalize.py | xiefei1026/DREAMPlace | d674cce42caaa5490795c3b577eda43f80350a84 | [
"BSD-3-Clause"
] | 323 | 2019-02-28T10:09:53.000Z | 2022-03-24T04:00:01.000Z | dreamplace/ops/abacus_legalize/abacus_legalize.py | xiefei1026/DREAMPlace | d674cce42caaa5490795c3b577eda43f80350a84 | [
"BSD-3-Clause"
] | 61 | 2019-06-10T08:47:09.000Z | 2022-03-31T13:38:18.000Z | dreamplace/ops/abacus_legalize/abacus_legalize.py | xiefei1026/DREAMPlace | d674cce42caaa5490795c3b577eda43f80350a84 | [
"BSD-3-Clause"
] | 109 | 2019-03-22T17:32:16.000Z | 2022-03-26T14:31:05.000Z | ##
# @file abacus_legalize.py
# @author Yibo Lin
# @date Jun 2018
#
import math
import torch
from torch import nn
from torch.autograd import Function
import dreamplace.ops.abacus_legalize.abacus_legalize_cpp as abacus_legalize_cpp
class AbacusLegalizeFunction(Function):
""" Legalize cells with abacus approa... | 30.784173 | 136 | 0.566955 |
1604c94c2d9b007be75e9c0769e75d68d221012d | 17,122 | py | Python | tests/unit/orchestrate/flow/flow-construct/test_flow.py | hantwain/jina | 55d900d42f17211f3d6c7792fd36b937e4f1ef44 | [
"Apache-2.0"
] | 1 | 2022-03-04T01:53:51.000Z | 2022-03-04T01:53:51.000Z | tests/unit/orchestrate/flow/flow-construct/test_flow.py | hantwain/jina | 55d900d42f17211f3d6c7792fd36b937e4f1ef44 | [
"Apache-2.0"
] | null | null | null | tests/unit/orchestrate/flow/flow-construct/test_flow.py | hantwain/jina | 55d900d42f17211f3d6c7792fd36b937e4f1ef44 | [
"Apache-2.0"
] | null | null | null | import datetime
import inspect
import json
import os
import numpy as np
import pytest
from jina import Flow, Document, DocumentArray, Executor, requests, __windows__
from jina.enums import FlowBuildLevel
from jina.excepts import RuntimeFailToStart
from jina.serve.executors import BaseExecutor
from jina.helper import ... | 27.571659 | 88 | 0.600689 |
49d2d83cdf2b4c68836dd98dadbdad03e62cbf59 | 3,297 | py | Python | Chapter05/Exercise5.03/business_site/business_site/settings.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | 2 | 2022-01-03T22:17:21.000Z | 2022-03-04T13:32:36.000Z | Chapter05/Exercise5.03/business_site/business_site/settings.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | null | null | null | Chapter05/Exercise5.03/business_site/business_site/settings.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | 1 | 2022-02-25T13:53:37.000Z | 2022-02-25T13:53:37.000Z | """
Django settings for business_site project.
Generated by 'django-admin startproject' using Django 4.0.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pat... | 25.96063 | 91 | 0.702153 |
9d6e379632fa215e6ab47cae340b9082a9af4c22 | 929 | py | Python | apps/beeswax/src/beeswax/settings.py | t3hi3x/hue | 36d71c1a8dd978b899ef2dc3eef8887b68fd99a8 | [
"Apache-2.0"
] | 11 | 2019-03-20T07:38:35.000Z | 2021-06-18T09:42:46.000Z | apps/beeswax/src/beeswax/settings.py | t3hi3x/hue | 36d71c1a8dd978b899ef2dc3eef8887b68fd99a8 | [
"Apache-2.0"
] | null | null | null | apps/beeswax/src/beeswax/settings.py | t3hi3x/hue | 36d71c1a8dd978b899ef2dc3eef8887b68fd99a8 | [
"Apache-2.0"
] | 5 | 2019-06-29T03:13:02.000Z | 2020-04-23T04:47:11.000Z | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | 40.391304 | 74 | 0.768568 |
7be0fc4be1716a56a72529b56d91ce3ad732338c | 4,205 | py | Python | research/syntaxnet/dragnn/python/evaluation_test.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 3,326 | 2018-01-26T22:42:25.000Z | 2022-02-16T13:16:39.000Z | research/syntaxnet/dragnn/python/evaluation_test.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | research/syntaxnet/dragnn/python/evaluation_test.py | zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | [
"Apache-2.0"
] | 1,474 | 2018-02-01T04:33:18.000Z | 2022-03-08T07:02:20.000Z | # Copyright 2017 Google 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 law or a... | 38.577982 | 80 | 0.613793 |
ebdcf61635a3bedc98c21a8e7c9bc38bbdc0665a | 3,499 | py | Python | frameworks/cassandra/tests/test_backup_and_restore.py | greggomann/dcos-commons | f8f87e3e112cd6d9c38e43ca6336b1cdef56d5d1 | [
"Apache-2.0"
] | 7 | 2017-11-02T05:26:40.000Z | 2020-01-27T19:33:52.000Z | frameworks/cassandra/tests/test_backup_and_restore.py | greggomann/dcos-commons | f8f87e3e112cd6d9c38e43ca6336b1cdef56d5d1 | [
"Apache-2.0"
] | 14 | 2017-09-20T22:47:48.000Z | 2020-09-11T19:54:25.000Z | frameworks/cassandra/tests/test_backup_and_restore.py | AlexRogalskiy/dcos-commons | 85711f05bc94172aabb6837f9ff529721437d20c | [
"Apache-2.0"
] | 9 | 2017-11-14T19:43:07.000Z | 2022-01-06T12:44:49.000Z | import os
import uuid
import pytest
import sdk_install
import sdk_jobs
from tests import config
no_strict_for_azure = pytest.mark.skipif(os.environ.get("SECURITY") == "strict",
reason="backup/restore doesn't work in strict as user needs to be root")
@pytest.fixture(scope='module', autouse=True)
def configur... | 37.623656 | 126 | 0.687339 |
b8a647392a1a5258203b1801c4678f339cd07bdf | 7,549 | py | Python | conda_build/cli/main_render.py | isuruf/conda-build | 9f163925f5d03a46e921162892bf4c6bc86b1072 | [
"BSD-3-Clause"
] | null | null | null | conda_build/cli/main_render.py | isuruf/conda-build | 9f163925f5d03a46e921162892bf4c6bc86b1072 | [
"BSD-3-Clause"
] | null | null | null | conda_build/cli/main_render.py | isuruf/conda-build | 9f163925f5d03a46e921162892bf4c6bc86b1072 | [
"BSD-3-Clause"
] | null | null | null | # (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
import argparse
import logging
import... | 34.47032 | 132 | 0.622069 |
4178b2168ab0b7616ecdb1a10d7aca6d6ae530d1 | 2,893 | py | Python | scripts/loading/allele/update_allele_type.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 5 | 2015-11-24T23:09:46.000Z | 2019-11-06T17:48:13.000Z | scripts/loading/allele/update_allele_type.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 188 | 2017-08-28T22:39:03.000Z | 2022-03-02T14:53:46.000Z | scripts/loading/allele/update_allele_type.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 7 | 2018-05-13T01:58:07.000Z | 2021-06-25T19:08:33.000Z | import logging
import os
from datetime import datetime
import sys
from src.models import Source, So, Dbentity, Alleledbentity, So
from scripts.loading.database_session import get_session
__author__ = 'sweng66'
logging.basicConfig(format='%(message)s')
log = logging.getLogger()
log.setLevel(logging.INFO)
generic_so_t... | 29.824742 | 141 | 0.618044 |
ddc760f26a27a028bf9f126a7e78e3bff18808ff | 20,461 | py | Python | snpdb/migrations/0008_populate_column_vcf_info.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | snpdb/migrations/0008_populate_column_vcf_info.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | snpdb/migrations/0008_populate_column_vcf_info.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.1 on 2020-11-23 03:31
from django.db import migrations
from django.db.models import F
from library.django_utils import bulk_insert_class_data
def add_tags_global(apps, schema_editor):
VariantGridColumn = apps.get_model("snpdb", "VariantGridColumn")
CustomColumn = apps.get_model("snpd... | 86.333333 | 482 | 0.641122 |
6546f11f96aa32d09707d618b3e12dc9fc830a50 | 13,440 | py | Python | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_estimates_first_fiscal_year_ratios_price_free_cash_flow.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_estimates_first_fiscal_year_ratios_price_free_cash_flow.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_estimates_first_fiscal_year_ratios_price_free_cash_flow.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Stocks API For Digital Portals
The stocks API features a screener to search for equity instruments based on stock-specific parameters. Parameters for up to three fiscal years might now be used in one request; data is available for the ten most recent completed fiscal years. Estimates are available for the... | 51.29771 | 1,585 | 0.622842 |
29d22f07bab56464c7b547b3d361a5c112debc06 | 1,316 | py | Python | Manager/UserManager.py | EnviableYapper0/SmartLibrary-Server | 2131d2a13277ebdab2356f0254c80b9f417621d2 | [
"MIT"
] | null | null | null | Manager/UserManager.py | EnviableYapper0/SmartLibrary-Server | 2131d2a13277ebdab2356f0254c80b9f417621d2 | [
"MIT"
] | null | null | null | Manager/UserManager.py | EnviableYapper0/SmartLibrary-Server | 2131d2a13277ebdab2356f0254c80b9f417621d2 | [
"MIT"
] | null | null | null | from Manager.DatabaseManager import DatabaseManager
from model import User
class UserManager(DatabaseManager):
def __init__(self):
DatabaseManager.__init__(self)
User.create_table()
def get_all_user(self):
return DatabaseManager.get_list(
User.select().where(User.is_active... | 32.9 | 89 | 0.665653 |
a0ab755df1c38e944574310fd483e0b48a3c0b88 | 822 | py | Python | manage.py | tob112/django_angular_project_2 | 4bd06f9a5c216ed1b6288fa64e0058a65f378991 | [
"MIT"
] | null | null | null | manage.py | tob112/django_angular_project_2 | 4bd06f9a5c216ed1b6288fa64e0058a65f378991 | [
"MIT"
] | null | null | null | manage.py | tob112/django_angular_project_2 | 4bd06f9a5c216ed1b6288fa64e0058a65f378991 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_angular_project_2.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason.... | 35.73913 | 88 | 0.649635 |
7eca72f6d971ad308eea02ceafde2e8b451e9410 | 771 | py | Python | Deployment/DispatchServer.py | w452144816/Savior | f91871b61d1dd8424af7c7e42c60c1d0b981f79e | [
"BSD-2-Clause"
] | 1 | 2021-03-19T06:13:15.000Z | 2021-03-19T06:13:15.000Z | Deployment/DispatchServer.py | w452144816/Savior | f91871b61d1dd8424af7c7e42c60c1d0b981f79e | [
"BSD-2-Clause"
] | null | null | null | Deployment/DispatchServer.py | w452144816/Savior | f91871b61d1dd8424af7c7e42c60c1d0b981f79e | [
"BSD-2-Clause"
] | null | null | null | import uvicorn
from fastapi import FastAPI
from Deployment.server_config import DEPLOY_VERSION, SERVER_NAME
from Deployment.DispatchInterfaces.DummyInterface import router as dummy_interface_router
from Deployment.DispatchInterfaces.OCRRelatedInterface import router as ocr_interface_router
app = FastAPI(title=SERVER_... | 35.045455 | 92 | 0.824903 |
a13fb062ca3c391715314aeee6004c8146ed7689 | 372 | py | Python | src/cmdtree/_compat.py | winkidney/cmdtree | 8558be856f4c3044cf13d2d07a86b69877bb6491 | [
"MIT"
] | 63 | 2016-07-29T10:55:20.000Z | 2021-06-28T09:11:48.000Z | src/cmdtree/_compat.py | winkidney/cmdtree | 8558be856f4c3044cf13d2d07a86b69877bb6491 | [
"MIT"
] | 3 | 2016-09-22T08:42:18.000Z | 2016-12-10T12:02:01.000Z | src/cmdtree/_compat.py | winkidney/cmdtree | 8558be856f4c3044cf13d2d07a86b69877bb6491 | [
"MIT"
] | 3 | 2016-07-30T23:53:29.000Z | 2016-08-30T11:03:39.000Z | import sys
WIN = sys.platform.startswith('win')
def get_filesystem_encoding():
return sys.getfilesystemencoding() or sys.getdefaultencoding()
if WIN:
def _get_argv_encoding():
import locale
return locale.getpreferredencoding()
else:
def _get_argv_encoding():
return getattr(sys.s... | 23.25 | 80 | 0.72043 |
7d6e65535abd477474def168f4edfa2cf10a9d37 | 346 | py | Python | Data Structure/Array Or Vector/Find Second Largest Number/SolutionByTanmay.py | rajethanm4/Programmers-Community | d16083eb0e84403159d999d4d1a8bbf652ca51f6 | [
"MIT"
] | 261 | 2019-09-30T19:47:29.000Z | 2022-03-29T18:20:07.000Z | Data Structure/Array Or Vector/Find Second Largest Number/SolutionByTanmay.py | rajethanm4/Programmers-Community | d16083eb0e84403159d999d4d1a8bbf652ca51f6 | [
"MIT"
] | 647 | 2019-10-01T16:51:29.000Z | 2021-12-16T20:39:44.000Z | Data Structure/Array Or Vector/Find Second Largest Number/SolutionByTanmay.py | rajethanm4/Programmers-Community | d16083eb0e84403159d999d4d1a8bbf652ca51f6 | [
"MIT"
] | 383 | 2019-09-30T19:32:07.000Z | 2022-03-24T16:18:26.000Z | # To Find Second Largest Number In An Array
n = int(input("Enter Size Of Array : "))
print("Enter The Elements : ")
c = [int(input()) for i in range(n)]
if len(c)==1:
print("No Second Largest Number")
else:
c=list(set(c))
num = c.pop(c.index(max(c)))
c.insert(0,num)
print("The Second Largest Number... | 24.714286 | 56 | 0.604046 |
9bc3bd2c63178bd3432adbffc18e76a376ddb5b9 | 664 | py | Python | shelved_cache/keys.py | mariushelf/shelved_cache | 50dd2ae1518a1961c61003a610fdb0d1992b22cd | [
"MIT"
] | 2 | 2021-06-02T11:40:59.000Z | 2021-06-03T12:46:41.000Z | shelved_cache/keys.py | mariushelf/shelved_cache | 50dd2ae1518a1961c61003a610fdb0d1992b22cd | [
"MIT"
] | null | null | null | shelved_cache/keys.py | mariushelf/shelved_cache | 50dd2ae1518a1961c61003a610fdb0d1992b22cd | [
"MIT"
] | null | null | null | import cachetools
def autotuple_hashkey(*args, **kwargs):
"""Convert lists in args or kwargs to tuple, then pass to `cachetools.keys.hashkey`.
Useful for function that accept lists at arguments. Converting them to a tuple makes
them cacheable and hence usable in `cachetools`.
This function is non-re... | 41.5 | 88 | 0.685241 |
9682a4444aa8fcaf96f78c10abc41d0b63519bba | 1,989 | py | Python | homeassistant/components/switch/switchbot.py | atanarro/home-assistant | e4de44703aa74f9d45f9b5c58dad5942b4eb55b2 | [
"Apache-2.0"
] | 2 | 2017-12-30T12:40:59.000Z | 2020-07-11T17:23:48.000Z | homeassistant/components/switch/switchbot.py | atanarro/home-assistant | e4de44703aa74f9d45f9b5c58dad5942b4eb55b2 | [
"Apache-2.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-30T06:26:27.000Z | homeassistant/components/switch/switchbot.py | atanarro/home-assistant | e4de44703aa74f9d45f9b5c58dad5942b4eb55b2 | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """
Support for Switchbot.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.switchbot
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.switch import SwitchDevice, PLATFO... | 26.878378 | 74 | 0.658622 |
285800e1b4987f404f7bf5186bd1e9363c5e8411 | 5,550 | py | Python | rewowr/rewowr_library/check_process/check_functions/check_worker_path.py | arturOnRails/ReWoWr | 45c2cef2e61ca5900082c11c325dd2be2ecca6fb | [
"MIT"
] | null | null | null | rewowr/rewowr_library/check_process/check_functions/check_worker_path.py | arturOnRails/ReWoWr | 45c2cef2e61ca5900082c11c325dd2be2ecca6fb | [
"MIT"
] | null | null | null | rewowr/rewowr_library/check_process/check_functions/check_worker_path.py | arturOnRails/ReWoWr | 45c2cef2e61ca5900082c11c325dd2be2ecca6fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""".. moduleauthor:: Artur Lissin"""
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Tuple, final
from rewowr.rewowr_library.check_process.errors.custom_errors import CheckWorkerPathError
from rewowr.rewowr_library.check_process.check_functions.check_worke... | 40.217391 | 94 | 0.683063 |
b8f748e85758c4c557fcaa4f1117e6082d6f8169 | 17,293 | py | Python | db.py | gpremel/cascada-master-server | ab1903025923149380ce9a8404305c94379dfd2a | [
"MIT"
] | null | null | null | db.py | gpremel/cascada-master-server | ab1903025923149380ce9a8404305c94379dfd2a | [
"MIT"
] | null | null | null | db.py | gpremel/cascada-master-server | ab1903025923149380ce9a8404305c94379dfd2a | [
"MIT"
] | null | null | null | """Defines the object used to communicate with the SQL server"""
import mysql.connector
import json
import logging
import math
from numbers import Number
from typing import Dict, Type, Tuple
import vartypes
class BDDException(Exception):
pass
class BDDExceptionTableNonValidee(BDDException):
"""The suppli... | 42.593596 | 122 | 0.523391 |
e902779aeb09ee32977c2ef9d6c086fa8d58200e | 5,149 | py | Python | lib/galaxy/tools/deps/docker_util.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/tools/deps/docker_util.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/tools/deps/docker_util.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | import os
DEFAULT_DOCKER_COMMAND = "docker"
DEFAULT_SUDO = True
DEFAULT_SUDO_COMMAND = "sudo"
DEFAULT_HOST = None
DEFAULT_VOLUME_MOUNT_TYPE = "rw"
DEFAULT_WORKING_DIRECTORY = None
DEFAULT_NET = None
DEFAULT_MEMORY = None
DEFAULT_VOLUMES_FROM = None
DEFAULT_AUTO_REMOVE = True
DEFAULT_SET_USER = "$UID"
class DockerVol... | 28.605556 | 126 | 0.662265 |
017bca609cc6686946337b0987273c9c017d9d00 | 7,816 | py | Python | mlflow/store/artifact_repo.py | kmr0877/mlflow | 04a5fee5df5ea3eaeeb4ce98b0a58425983c8bb0 | [
"Apache-2.0"
] | 1 | 2020-03-13T20:57:04.000Z | 2020-03-13T20:57:04.000Z | mlflow/store/artifact_repo.py | anabranch/mlflow | b58a420ec1ef935b45c4f9cb3bbe91b17b0f1628 | [
"Apache-2.0"
] | null | null | null | mlflow/store/artifact_repo.py | anabranch/mlflow | b58a420ec1ef935b45c4f9cb3bbe91b17b0f1628 | [
"Apache-2.0"
] | 1 | 2018-11-30T17:56:47.000Z | 2018-11-30T17:56:47.000Z | from abc import abstractmethod, ABCMeta
import shutil
from six.moves import urllib
from distutils import dir_util
import os
import boto3
from mlflow.utils.file_utils import (mkdir, exists, list_all, get_relative_path,
get_file_info, build_path, TempDir)
from mlflow.entities.file_i... | 41.136842 | 99 | 0.651868 |
2030c1ee741640e1002668ba150e627c636ef0a4 | 9,124 | py | Python | bh20seqanalyzer/main.py | uniqueg/bh20-seq-resource | ddabd9390d2b221786ef58a6d85200eecf82ca2f | [
"Apache-2.0"
] | null | null | null | bh20seqanalyzer/main.py | uniqueg/bh20-seq-resource | ddabd9390d2b221786ef58a6d85200eecf82ca2f | [
"Apache-2.0"
] | null | null | null | bh20seqanalyzer/main.py | uniqueg/bh20-seq-resource | ddabd9390d2b221786ef58a6d85200eecf82ca2f | [
"Apache-2.0"
] | null | null | null | import argparse
import arvados
import arvados.collection
import time
import subprocess
import tempfile
import json
import logging
import ruamel.yaml
from bh20sequploader.qc_metadata import qc_metadata
logging.basicConfig(format="[%(asctime)s] %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S",
... | 43.865385 | 119 | 0.589215 |
027fa847fb9c97192878f5c9dd03d6163d6cfd93 | 7,013 | py | Python | tests/qos/files/mellanox/qos_param_generator.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | null | null | null | tests/qos/files/mellanox/qos_param_generator.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | 1 | 2021-02-24T13:48:41.000Z | 2021-02-24T13:48:41.000Z | tests/qos/files/mellanox/qos_param_generator.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | null | null | null | import math
class QosParamMellanox(object):
def __init__(self, qos_params, asic_type, speed_cable_len, ingressLosslessProfile, ingressLossyProfile, egressLosslessProfile, egressLossyProfile):
asic_param_dic = {
'spc1': {
'cell_size': 96,
'headroom_overhead': 95
... | 45.245161 | 151 | 0.667902 |
c7757e9941f2139aed7efe182d9cfd910c395e84 | 11,578 | py | Python | alexia/api/v1/test/test_juliana.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 8 | 2015-06-29T20:01:22.000Z | 2020-10-19T13:49:38.000Z | alexia/api/v1/test/test_juliana.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 67 | 2015-10-05T16:57:14.000Z | 2022-03-28T19:57:36.000Z | alexia/api/v1/test/test_juliana.py | LaudateCorpus1/alexia-1 | 9c0d3c90c0ffe2237299a561b755b9c17905e354 | [
"BSD-3-Clause"
] | 6 | 2015-10-05T13:54:34.000Z | 2021-11-30T05:11:58.000Z | from __future__ import unicode_literals
import datetime
from django.test.testcases import SimpleTestCase
from django.utils import timezone
from alexia.api.exceptions import ForbiddenError, InvalidParamsError
from alexia.apps.billing.models import RfidCard
from alexia.test import APITestCase, TestCase
from ..common ... | 32.892045 | 106 | 0.594317 |
81e58b675347491115da987a25241a41e7a0c40b | 7,971 | py | Python | code/02_SNODAS.py | kashingtonDC/RS_GW | 1c88ac5175005c727edcf57a7ed53901f4f70e3f | [
"MIT",
"Unlicense"
] | null | null | null | code/02_SNODAS.py | kashingtonDC/RS_GW | 1c88ac5175005c727edcf57a7ed53901f4f70e3f | [
"MIT",
"Unlicense"
] | null | null | null | code/02_SNODAS.py | kashingtonDC/RS_GW | 1c88ac5175005c727edcf57a7ed53901f4f70e3f | [
"MIT",
"Unlicense"
] | null | null | null | import os
import time
import gzip
import shutil
import ftplib
import datetime
import subprocess
from tqdm import tqdm
# Helpers
def login_to_ftp(ftproot,data_dir):
'''
Use ftplib to login to the NSIDC ftp server, return ftp object cd'd into data dir
'''
f = ftplib.FTP(ftproot)
f.login()
f.cwd(data_dir)
ret... | 32.271255 | 201 | 0.682599 |
b0b814caf1c9af840e881e7a608e7900afab9775 | 4,194 | py | Python | web/src/p2k16/web/tool_blueprint.py | bitraf/p2k16 | 266143944d3c287b3b4ba37337336be80c146c26 | [
"MIT"
] | 5 | 2018-03-28T17:53:44.000Z | 2021-07-27T19:20:12.000Z | web/src/p2k16/web/tool_blueprint.py | bitraf/p2k16 | 266143944d3c287b3b4ba37337336be80c146c26 | [
"MIT"
] | 88 | 2017-04-20T11:05:36.000Z | 2022-03-12T01:01:28.000Z | web/src/p2k16/web/tool_blueprint.py | bitraf/p2k16 | 266143944d3c287b3b4ba37337336be80c146c26 | [
"MIT"
] | 8 | 2018-03-23T16:43:56.000Z | 2021-09-06T11:13:28.000Z | import logging
import flask
import flask_login
import p2k16.core.door
from flask import Blueprint, jsonify, request
from p2k16.core import P2k16UserException, event_management
from p2k16.core.door import DoorClient
from p2k16.core.models import db, ToolDescription, ToolCheckout, Circle
from p2k16.web.utils import vali... | 27.592105 | 89 | 0.687649 |
4b761fe5ec43ef212eba50591de969d78c85b98b | 966 | py | Python | ex084.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | ex084.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | ex084.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | dados = list()
lista = list()
totleve = list()
totpesado = list()
c = 0
while True:
lista.append(str(input('Digite o nome: ')))
lista.append((float(input('Digite o peso: '))))
dados.append(lista[:])
lista.clear()
c += 1
cont = str(input('Deseja continuar?[S/N]: ')).strip().upper()
while cont... | 28.411765 | 70 | 0.549689 |
e71ec0dce0eb74e1d0d07f8237455af544324d3f | 416 | py | Python | process.py | elecabfer/Bowtie | 0d6fc6d6da833deaf5a8eca1e5b33513a2009f4e | [
"MIT"
] | null | null | null | process.py | elecabfer/Bowtie | 0d6fc6d6da833deaf5a8eca1e5b33513a2009f4e | [
"MIT"
] | null | null | null | process.py | elecabfer/Bowtie | 0d6fc6d6da833deaf5a8eca1e5b33513a2009f4e | [
"MIT"
] | null | null | null | rm 1_*
rm 21_*
head *error.txt >> info_gg_unpaired.txt
source /mnt/common/epfl/etc/bbcf_bashrc ### para llamar a todos los programas de bbcf
module add UHTS/Analysis/samtools/1.2;
python -c "from bbcflib import mapseq"
for i in {2..48}
do
add_nh_flag "$i"_16S_gg.sam "$i"_SE_gg.bam
samtools sort "$i"_SE_gg.bam "$... | 32 | 85 | 0.709135 |
52a8d45e4d46bbbabbd068ec2bfa563b0b93df59 | 51 | py | Python | plugin/src/test/resources/joinLines/StringOneQuotePlainU-after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | null | null | null | plugin/src/test/resources/joinLines/StringOneQuotePlainU-after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | 11 | 2017-02-27T22:35:32.000Z | 2021-12-24T08:07:40.000Z | plugin/src/test/resources/joinLines/StringOneQuotePlainU-after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | null | null | null | a = (u"Ein Deutsche Text. "
"An English text")
| 17 | 27 | 0.588235 |
21a411f52c7ff6196ab314546d3b2a0f7c068235 | 17,655 | py | Python | lib/python2.7/site-packages/scipy/sparse/lil.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 18 | 2018-02-23T11:28:54.000Z | 2021-09-23T08:19:54.000Z | SLpackage/private/thirdparty/pythonpkgs/scipy/scipy_0.19.1/lib/python2.7/site-packages/scipy/sparse/lil.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 8 | 2020-09-26T00:55:16.000Z | 2022-03-12T00:23:07.000Z | SLpackage/private/thirdparty/pythonpkgs/scipy/scipy_0.19.1/lib/python2.7/site-packages/scipy/sparse/lil.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 5 | 2019-03-12T14:24:18.000Z | 2021-06-23T13:42:58.000Z | """LInked List sparse matrix class
"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['lil_matrix','isspmatrix_lil']
import numpy as np
from scipy._lib.six import xrange
from .base import spmatrix, isspmatrix
from .sputils import (getdtype, isshape... | 33.374291 | 83 | 0.54891 |
ce5bdfadd5bc8be0ace3634d8889e7584e40ad4b | 330 | py | Python | 01-Basics/13-json.py | michaelcw02/Python | fc5a589305d9961b92aa8730401570427a5c0069 | [
"MIT"
] | null | null | null | 01-Basics/13-json.py | michaelcw02/Python | fc5a589305d9961b92aa8730401570427a5c0069 | [
"MIT"
] | null | null | null | 01-Basics/13-json.py | michaelcw02/Python | fc5a589305d9961b92aa8730401570427a5c0069 | [
"MIT"
] | null | null | null | #SIMPLE EXAMPLE FOR RETRIEVING JSON FILES FROM WEB
import codecs
import json
import urllib.request
url = "https://api.github.com/users/michaelcw02/repos"
req = urllib.request.Request(url)
response = urllib.request.urlopen(req)
reader = codecs.getreader("utf-8")
data = json.load(reader(response))
for i in data:
... | 19.411765 | 54 | 0.751515 |
1c4465c58914ba00924c3db332f745c7350c02b5 | 5,321 | py | Python | sandbox/mixed_poisson_hypre_2d.py | MiroK/fenics_ii | 58c41f0e8dba720962830395851e081b057269cc | [
"MIT"
] | 10 | 2017-06-22T21:05:17.000Z | 2020-09-25T08:36:59.000Z | sandbox/mixed_poisson_hypre_2d.py | MiroK/fenics_ii | 58c41f0e8dba720962830395851e081b057269cc | [
"MIT"
] | 2 | 2018-04-14T08:43:59.000Z | 2018-09-19T14:51:46.000Z | sandbox/mixed_poisson_hypre_2d.py | MiroK/fenics_ii | 58c41f0e8dba720962830395851e081b057269cc | [
"MIT"
] | 6 | 2018-04-13T20:33:53.000Z | 2020-09-25T08:37:01.000Z | from dolfin import *
from petsc4py import PETSc
from mpi4py import MPI as pyMPI
from sympy.printing import ccode
import sympy as sp
import numpy as np
from block import block_assemble, block_mat
from block.iterative import MinRes
from block.algebraic.petsc import LU, LumpedInvDiag
from block.block_base import block_ba... | 28.454545 | 85 | 0.577147 |
636faec433c33f27ee805266a085becb9415d66e | 7,602 | py | Python | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/audio/mfcc_mel_calculators_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | 2 | 2021-08-11T15:50:12.000Z | 2021-09-03T17:53:47.000Z | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/audio/mfcc_mel_calculators_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | 1 | 2022-01-20T11:17:50.000Z | 2022-01-20T11:17:50.000Z | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/audio/mfcc_mel_calculators_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/calculators/audio/mfcc_mel_calculators.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import refl... | 48.420382 | 792 | 0.801631 |
dbd1c2ce389e70211d2d2ba0fe138607afa1bcc4 | 2,321 | py | Python | livemark/plugins/table/plugin.py | gabrielbdornas/livemark | 1c717e14e05e29f6feda4900d1e8e79025b8117d | [
"MIT"
] | 73 | 2021-06-07T13:28:36.000Z | 2022-03-26T05:37:59.000Z | livemark/plugins/table/plugin.py | gabrielbdornas/livemark | 1c717e14e05e29f6feda4900d1e8e79025b8117d | [
"MIT"
] | 120 | 2021-06-04T12:51:01.000Z | 2022-03-21T11:11:36.000Z | livemark/plugins/table/plugin.py | gabrielbdornas/livemark | 1c717e14e05e29f6feda4900d1e8e79025b8117d | [
"MIT"
] | 7 | 2021-09-22T11:38:26.000Z | 2022-03-26T05:35:58.000Z | import json
import yaml
from frictionless import Resource, Detector
from ...plugin import Plugin
class TablePlugin(Plugin):
identity = "table"
priority = 60
# Process
def process_document(self, document):
self.__count = 0
def process_snippet(self, snippet):
if self.document.form... | 36.84127 | 83 | 0.46187 |
0c94ed4d94110cbc15830139579838216e8fdb23 | 7,169 | py | Python | moderngl/vertex_array.py | vpoulailleau/moderngl | bff23bd538372821d9c42f4633ff6978929a0a92 | [
"MIT"
] | null | null | null | moderngl/vertex_array.py | vpoulailleau/moderngl | bff23bd538372821d9c42f4633ff6978929a0a92 | [
"MIT"
] | null | null | null | moderngl/vertex_array.py | vpoulailleau/moderngl | bff23bd538372821d9c42f4633ff6978929a0a92 | [
"MIT"
] | null | null | null | from typing import Tuple
__all__ = ['VertexArray',
'POINTS', 'LINES', 'LINE_LOOP', 'LINE_STRIP', 'TRIANGLES', 'TRIANGLE_STRIP', 'TRIANGLE_FAN',
'LINES_ADJACENCY', 'LINE_STRIP_ADJACENCY', 'TRIANGLES_ADJACENCY', 'TRIANGLE_STRIP_ADJACENCY', 'PATCHES']
POINTS = 0x0000
LINES = 0x0001
LINE_LOOP = 0x0... | 32.147982 | 115 | 0.590319 |
eccc966648f878995db09ecde157aed43e5f1437 | 1,589 | py | Python | nyud-fcn16s-color/solve.py | yeLer/fcn | 2e8a816814dfcb1e12d340f81d56ae41dbca843e | [
"BSD-2-Clause"
] | 1 | 2022-02-12T19:39:58.000Z | 2022-02-12T19:39:58.000Z | nyud-fcn16s-color/solve.py | yeLer/fcn | 2e8a816814dfcb1e12d340f81d56ae41dbca843e | [
"BSD-2-Clause"
] | 1 | 2019-06-14T08:54:22.000Z | 2019-06-14T08:54:22.000Z | nyud-fcn16s-color/solve.py | yeLer/fcn | 2e8a816814dfcb1e12d340f81d56ae41dbca843e | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
'''
@author: lele Ye
@contact: 1750112338@qq.com
@software: pycharm 2018.2
@file: solve.py
@time: 2019/1/2 17:21
@desc:nyud-fcn16s-color 网络结构的定义文件,目的是用于生成trainval.prototxt和test.prototxt文件
'''
CAFFE_ROOT = "/home/bxx-yll/caffe"
import sys
sys.path.insert(0, CAFFE_ROOT + '/python'... | 29.425926 | 92 | 0.754563 |
617f360ad3a47a60efa43e8757b9dcde63c328b3 | 96 | py | Python | venv/lib/python3.8/site-packages/pkginfo/installed.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/pkginfo/installed.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/pkginfo/installed.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/98/af/99/d8f3066ff66831f7838f689b6fcd3a942e55b62b011851aa430df6be6f | 96 | 96 | 0.895833 |
5c58aa5f5b3e5165e3bae078176cf3594f8cc089 | 1,078 | py | Python | tests/test_published_examples.py | Bezier89/conda-build | 95a118f8f06230120514fe0066a52a152ec2349b | [
"BSD-3-Clause"
] | null | null | null | tests/test_published_examples.py | Bezier89/conda-build | 95a118f8f06230120514fe0066a52a152ec2349b | [
"BSD-3-Clause"
] | null | null | null | tests/test_published_examples.py | Bezier89/conda-build | 95a118f8f06230120514fe0066a52a152ec2349b | [
"BSD-3-Clause"
] | null | null | null | import os
import pytest
from conda_build import api
from conda_build.utils import check_call_env
from .utils import metadata_dir, is_valid_dir
published_examples = os.path.join(os.path.dirname(metadata_dir), 'published_code')
@pytest.mark.serial
def test_skeleton_pypi(testing_workdir):
"""published in docs at ... | 33.6875 | 97 | 0.763451 |
041ba5400f5236b69c841bf5e801e3cea223db14 | 621 | py | Python | src/backend/ros_services/parameter_service.py | Hegl1/vu-robotik-project-bt5 | 7d7da6823693320d6deaa8c0f784760c6777d5b6 | [
"MIT"
] | null | null | null | src/backend/ros_services/parameter_service.py | Hegl1/vu-robotik-project-bt5 | 7d7da6823693320d6deaa8c0f784760c6777d5b6 | [
"MIT"
] | null | null | null | src/backend/ros_services/parameter_service.py | Hegl1/vu-robotik-project-bt5 | 7d7da6823693320d6deaa8c0f784760c6777d5b6 | [
"MIT"
] | null | null | null | #this file contains a service
#class that handles interaction with parameters from the parameterservice.
import rospy
from configuration import config
class Parameter_service:
def __init__(self, config):
self.config = config
def get_parameters(self):
'''
Method that receives all c... | 23.884615 | 76 | 0.640902 |
9cfcba315eae70fd8c3e050face5daddcb323d4d | 49 | py | Python | bert4keras/__init__.py | d294270681/bert4keras | 1a39f3e0c681d9ed51441d7f6a99c3d4c7731809 | [
"Apache-2.0"
] | null | null | null | bert4keras/__init__.py | d294270681/bert4keras | 1a39f3e0c681d9ed51441d7f6a99c3d4c7731809 | [
"Apache-2.0"
] | null | null | null | bert4keras/__init__.py | d294270681/bert4keras | 1a39f3e0c681d9ed51441d7f6a99c3d4c7731809 | [
"Apache-2.0"
] | null | null | null | #! -*- coding: utf-8 -*-
__version__ = '0.10.1'
| 12.25 | 24 | 0.510204 |
8c988f676eb9899dd50bb876069b9670efc5f443 | 357 | py | Python | data/urls.py | tblxdezhu/STP | db3db2183a70b39e155a0b3a061dc5d3e29e6c9f | [
"MIT"
] | null | null | null | data/urls.py | tblxdezhu/STP | db3db2183a70b39e155a0b3a061dc5d3e29e6c9f | [
"MIT"
] | null | null | null | data/urls.py | tblxdezhu/STP | db3db2183a70b39e155a0b3a061dc5d3e29e6c9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/10/18 1:13 PM
# @Author : Zhenxuan Xu
# @File : urls.py
# @Software: Pycharm professional
from django.conf.urls import include, url
from data import views
urlpatterns = [
url(r'^large$', views.large_data),
url(r'^mini$', views.mini_data),
... | 22.3125 | 41 | 0.641457 |
582116282d012c160a25ab2f92882249cd7891f2 | 1,664 | py | Python | my_web_scraper_app/views.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | null | null | null | my_web_scraper_app/views.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | 2 | 2020-06-07T01:38:32.000Z | 2021-06-04T22:27:50.000Z | my_web_scraper_app/views.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | null | null | null | import requests
from django.shortcuts import render
from requests.compat import quote_plus
from bs4 import BeautifulSoup
from .models import Search
BASE_CRAIGSLIST_URL = 'https://sfbay.craigslist.org/search/sfc/?query={}'
BASE_IMAGE_URL = 'https://images.craigslist.org/{}_300x300.jpg'
def home(request):
return ... | 30.254545 | 105 | 0.664663 |
b5b23bafedf5ff32cd86ae90e72ab722c1566c87 | 1,742 | py | Python | tests/utils/cartesian.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 70 | 2015-12-05T12:33:10.000Z | 2022-03-03T04:56:58.000Z | tests/utils/cartesian.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 711 | 2015-10-06T11:01:48.000Z | 2022-02-09T12:40:47.000Z | tests/utils/cartesian.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 37 | 2015-10-13T11:00:51.000Z | 2022-02-08T07:28:11.000Z | import itertools
class Cartesian(object):
def __init__(self):
super(Cartesian, self).__init__()
self.sets = {}
self._assigns = []
def assign_all(self, source_name, target_name):
"""
For every expected combination, assigns one key from the other
"""
sel... | 30.561404 | 149 | 0.614237 |
e52f04df98f3cfc855d2902bd79bf43942a4f2b3 | 7,902 | py | Python | backend/the_closer_33482/settings.py | crowdbotics-apps/the-closer-33482 | b0de1c392c7085f81b06761e3783ea54f79d6741 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/the_closer_33482/settings.py | crowdbotics-apps/the-closer-33482 | b0de1c392c7085f81b06761e3783ea54f79d6741 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/the_closer_33482/settings.py | crowdbotics-apps/the-closer-33482 | b0de1c392c7085f81b06761e3783ea54f79d6741 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for the_closer_33482 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
imp... | 30.392308 | 112 | 0.736902 |
7aec43916d3f7080d60706ec40c7da1c49800719 | 172,108 | py | Python | nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py | riddopic/nfv | e5ced4ade4916910646bcf8018dfabadef447fc2 | [
"Apache-2.0"
] | null | null | null | nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py | riddopic/nfv | e5ced4ade4916910646bcf8018dfabadef447fc2 | [
"Apache-2.0"
] | null | null | null | nfv/nfv-tests/nfv_unit_tests/tests/test_sw_patch_strategy.py | riddopic/nfv | e5ced4ade4916910646bcf8018dfabadef447fc2 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2016-2020 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import mock
import uuid
from nfv_common import strategy as common_strategy
from nfv_vim import nfvi
from nfv_vim.objects import HOST_PERSONALITY
from nfv_vim.objects import SW_UPDATE_ALARM_RESTRICTION
from nfv_vim.objects i... | 40.890473 | 110 | 0.454058 |
ce8450a86a80ddff5f355ce4bb349939b5ee8734 | 9,152 | py | Python | ppdet/modeling/backbones/cspresnet.py | Amanda-Barbara/PaddleDetection | 65ac13074eaaa2447c644a2df71969d8a3dd1fae | [
"Apache-2.0"
] | null | null | null | ppdet/modeling/backbones/cspresnet.py | Amanda-Barbara/PaddleDetection | 65ac13074eaaa2447c644a2df71969d8a3dd1fae | [
"Apache-2.0"
] | null | null | null | ppdet/modeling/backbones/cspresnet.py | Amanda-Barbara/PaddleDetection | 65ac13074eaaa2447c644a2df71969d8a3dd1fae | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 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... | 32.339223 | 102 | 0.535948 |
35b9ea1ac6a4a98c9f207338a03146ef649c0eb6 | 14,160 | py | Python | fairseq/optim/fp16_optimizer.py | Luccadoremi/Model-Compression---DAQ- | a1efb348921c7728a12ca5670302aca75306946a | [
"MIT"
] | 1 | 2021-04-17T16:57:11.000Z | 2021-04-17T16:57:11.000Z | fairseq/optim/fp16_optimizer.py | Luccadoremi/Model-Compression---DAQ- | a1efb348921c7728a12ca5670302aca75306946a | [
"MIT"
] | null | null | null | fairseq/optim/fp16_optimizer.py | Luccadoremi/Model-Compression---DAQ- | a1efb348921c7728a12ca5670302aca75306946a | [
"MIT"
] | 1 | 2021-07-12T09:45:43.000Z | 2021-07-12T09:45:43.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from itertools import chain
import torch
from fairseq import optim, utils
class DynamicLossScaler(object):
def __init__(
self... | 37.659574 | 97 | 0.634534 |
6dea260b841baef24c80a3714abe83383c367fa0 | 7,901 | py | Python | tests/utils_tests/test_encoding.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | tests/utils_tests/test_encoding.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | tests/utils_tests/test_encoding.py | jommerce/django | baf9604ed8fed3e6e7ddfaca2d83c377c81399ae | [
"BSD-3-Clause",
"0BSD"
] | 3 | 2019-08-20T13:29:34.000Z | 2020-01-30T22:05:10.000Z | import datetime
import sys
import unittest
from pathlib import Path
from unittest import mock
from urllib.parse import quote_plus
from django.test import SimpleTestCase
from django.utils.encoding import (
DjangoUnicodeDecodeError,
escape_uri_path,
filepath_to_uri,
force_bytes,
force_str,
get_sy... | 35.751131 | 86 | 0.555246 |
b8b46a9e7cfe9685d97d4886e26a3f32d016675b | 14,934 | py | Python | on-chain-privacy/eth_erc721_privacy.py | saanvijay/vmware-blockchain-samples | a4262b8556400697a56984e8e9aac06342d9a035 | [
"MIT"
] | null | null | null | on-chain-privacy/eth_erc721_privacy.py | saanvijay/vmware-blockchain-samples | a4262b8556400697a56984e8e9aac06342d9a035 | [
"MIT"
] | null | null | null | on-chain-privacy/eth_erc721_privacy.py | saanvijay/vmware-blockchain-samples | a4262b8556400697a56984e8e9aac06342d9a035 | [
"MIT"
] | null | null | null | import sys
import time
import urllib3
import logging
import json
from web3 import Web3
from web3.middleware import geth_poa_middleware
urllib3.disable_warnings()
ethrpcApiUrl = "http://localhost:8545"
w3 = None
chainid = 5000
contract_deploy = True
contract1_use = True
contract2_use = True
account_perm_test = False
co... | 38.589147 | 120 | 0.624816 |
0a5f6518e120e18d4f954e00587e42deb3c0e7a9 | 15,979 | py | Python | socks-relay.py | guillon/socks-relay | a2e7cebf6596e3767c0b4f3e3e7faca6ed08167e | [
"MIT"
] | 6 | 2019-07-10T09:28:12.000Z | 2022-02-22T14:57:11.000Z | socks-relay.py | guillon/socks-relay | a2e7cebf6596e3767c0b4f3e3e7faca6ed08167e | [
"MIT"
] | 1 | 2020-10-17T05:10:52.000Z | 2020-10-17T05:10:52.000Z | socks-relay.py | guillon/socks-relay | a2e7cebf6596e3767c0b4f3e3e7faca6ed08167e | [
"MIT"
] | 2 | 2021-07-02T23:59:59.000Z | 2022-01-11T16:45:00.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2019 Christophe Guillon
# Copyright (c) 2018 Artem Golubin
#
# 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 li... | 41.503896 | 160 | 0.635396 |
25c3762d813020f12097a5df2c5375ab50884bc6 | 60,527 | py | Python | Lib/test/test_urlparse.py | native-api/cpython | 63799136e6c0491bb5d6f4a234d5a775db3458db | [
"PSF-2.0"
] | 2 | 2018-05-23T05:18:49.000Z | 2021-08-01T08:43:23.000Z | Lib/test/test_urlparse.py | native-api/cpython | 63799136e6c0491bb5d6f4a234d5a775db3458db | [
"PSF-2.0"
] | null | null | null | Lib/test/test_urlparse.py | native-api/cpython | 63799136e6c0491bb5d6f4a234d5a775db3458db | [
"PSF-2.0"
] | null | null | null | import unittest
import urllib.parse
import warnings
RFC1808_BASE = "http://a/b/c/d;p?q#f"
RFC2396_BASE = "http://a/b/c/d;p?q"
RFC3986_BASE = 'http://a/b/c/d;p?q'
SIMPLE_BASE = 'http://a/b/c/d'
# Each parse_qsl testcase is a two-tuple that contains
# a string with the query and a list with the expected result.
parse... | 49.289088 | 98 | 0.558131 |
994c8458a90546958fe7bc5df72ab9f2da733d06 | 7,441 | py | Python | plugins/modules/oci_network_ip_sec_connection_tunnel_cpe_device_config.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_ip_sec_connection_tunnel_cpe_device_config.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_ip_sec_connection_tunnel_cpe_device_config.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 33.367713 | 149 | 0.654079 |
ff6c867159430d293d84ed1841199c03d480fe6c | 4,050 | py | Python | lispy.py | programble/lispy | d0a4075f1d74392904068a2800bcf2b9835c511d | [
"0BSD"
] | 6 | 2015-02-03T19:36:38.000Z | 2018-01-24T19:47:20.000Z | lispy.py | causal-agent/lispy | d0a4075f1d74392904068a2800bcf2b9835c511d | [
"0BSD"
] | 2 | 2018-01-25T00:03:06.000Z | 2018-02-06T21:01:00.000Z | lispy.py | causal-agent/lispy | d0a4075f1d74392904068a2800bcf2b9835c511d | [
"0BSD"
] | 1 | 2015-09-10T07:04:01.000Z | 2015-09-10T07:04:01.000Z | #!/usr/bin/env python
# Copyright 2010 Curtis McEnroe <programble@gmail.com>
# Licensed under the GNU GPLv3
import sys
import getopt
import traceback
try:
import readline
except ImportError:
pass
from reader import Reader
import core
def load_lisp_core(filename="core.lisp"):
# Load up and evaluate core.l... | 26.821192 | 113 | 0.515062 |
c1f3f086723e538938430730f6213d0bd9c88cfc | 25,025 | py | Python | fedlearner/trainer/trainer_master.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | fedlearner/trainer/trainer_master.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | fedlearner/trainer/trainer_master.py | duanbing/fedlearner | 5cce3c1fe09abe66879274a0ad3dc8e2f25a322d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The FedLearner 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 applica... | 38.618827 | 80 | 0.591608 |
b353306056576c6c6a208d3d5554fbbf3172ada5 | 15,714 | py | Python | integration-test/398-airport-iata-codes.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | integration-test/398-airport-iata-codes.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | integration-test/398-airport-iata-codes.py | roman-ianivskyy/vector-datasource | 3d59c0d9856d6bc2a78c4a9273b4e850c2e41d92 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import dsl
from shapely.wkt import loads as wkt_loads
from . import FixtureTest
class AirportIataCodes(FixtureTest):
def test_sfo(self):
# San Francisco International
self.generate_fixtures(dsl.way(23718192, wkt_loads('POLYGON ((-122.402782773269 37.63531941394439, -122.... | 604.384615 | 7,766 | 0.80826 |
a1907facc5a5c18ae0a1f933544a173587712a86 | 6,093 | py | Python | light_gbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | null | null | null | light_gbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | 15 | 2020-01-28T22:21:40.000Z | 2022-03-11T23:19:31.000Z | light_gbm.py | raph-m/safe_driver_prediction | a4963c59b0941e23fcc90f5db8e0dbf10bfcc3f4 | [
"MIT"
] | 1 | 2018-02-28T15:10:43.000Z | 2018-02-28T15:10:43.000Z | import json
import time
import lightgbm as lgb
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from util import gini_normalized
from feature_selection_1 import get_cached_features, continuous_values, categorical_features
feature_selection = "none"
number_of_features = 10
a... | 25.282158 | 95 | 0.645167 |
05fa93f2fd4b62a9501df98c1930e1070eefbd51 | 3,380 | py | Python | src/python/txtai/ann/faiss.py | neuml/txtai | b25173a8650a73dbcae43caa278f32020fef0236 | [
"Apache-2.0"
] | 1,893 | 2020-08-09T19:55:46.000Z | 2022-03-31T22:03:13.000Z | src/python/txtai/ann/faiss.py | neuml/txtai | b25173a8650a73dbcae43caa278f32020fef0236 | [
"Apache-2.0"
] | 243 | 2020-08-12T15:22:31.000Z | 2022-03-31T17:16:28.000Z | src/python/txtai/ann/faiss.py | neuml/txtai | b25173a8650a73dbcae43caa278f32020fef0236 | [
"Apache-2.0"
] | 189 | 2020-08-12T20:42:53.000Z | 2022-03-30T13:32:46.000Z | """
Faiss module
"""
import math
import numpy as np
from faiss import index_factory, METRIC_INNER_PRODUCT, read_index, write_index
from .base import ANN
class Faiss(ANN):
"""
Builds an ANN model using the Faiss library.
"""
def load(self, path):
# Load index
self.model = read_inde... | 27.258065 | 122 | 0.607101 |
feb3c10a729ae9cc605d2dd3588eae61375e5363 | 209,381 | py | Python | pandas/tests/test_groupby.py | Remiremi/pandas | 05a8badce4a786eed17d6a4fc1287c84023024da | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_groupby.py | Remiremi/pandas | 05a8badce4a786eed17d6a4fc1287c84023024da | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_groupby.py | Remiremi/pandas | 05a8badce4a786eed17d6a4fc1287c84023024da | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import nose
from numpy.testing.decorators import slow
from datetime import datetime
from numpy import nan
from pandas import date_range,bdate_range, Timestamp
from pandas.core.index import Index, MultiIndex, Int64Index, CategoricalIndex
from pandas.core.a... | 39.107396 | 172 | 0.532885 |
6d62c8e70bead6736ecf2acccb7d745472e64ab6 | 39 | py | Python | setup/brython/__init__.py | ennec-e/brython | 7b6b713d6d9638da096166ba099ec054230f853e | [
"BSD-3-Clause"
] | 1 | 2022-03-26T10:18:48.000Z | 2022-03-26T10:18:48.000Z | setup/brython/__init__.py | ennec-e/brython | 7b6b713d6d9638da096166ba099ec054230f853e | [
"BSD-3-Clause"
] | null | null | null | setup/brython/__init__.py | ennec-e/brython | 7b6b713d6d9638da096166ba099ec054230f853e | [
"BSD-3-Clause"
] | null | null | null | __version__ = implementation = "3.10.5" | 39 | 39 | 0.74359 |
81775ad34231138d7ad9bf5507677fd7835bd9de | 13,748 | py | Python | notebooks/P-value-exercise.py | ReproNim/stat-repronim-module | ccef0fa1d23d0023db4cbbfc1e3091037df77f3b | [
"CC-BY-4.0"
] | 3 | 2020-02-27T19:04:46.000Z | 2020-02-27T19:13:30.000Z | notebooks/P-value-exercise.py | ReproNim/stat-repronim-module | ccef0fa1d23d0023db4cbbfc1e3091037df77f3b | [
"CC-BY-4.0"
] | 6 | 2016-11-12T02:07:16.000Z | 2020-06-11T10:47:46.000Z | notebooks/P-value-exercise.py | ReproNim/stat-repronim-module | ccef0fa1d23d0023db4cbbfc1e3091037df77f3b | [
"CC-BY-4.0"
] | 12 | 2016-11-03T18:03:01.000Z | 2021-06-04T06:53:07.000Z | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# + [markdown] slideshow={"slide_type": "slide"}
# # Pl... | 36.857909 | 344 | 0.695665 |
16c23d72f1a0aa1bc5063aed081134ad2b0d86c3 | 475 | py | Python | Lib/site-packages/plotly/validators/scattergl/_uid.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scattergl/_uid.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2021-03-18T22:27:08.000Z | 2022-03-11T23:40:50.000Z | plotly/validators/scattergl/_uid.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class UidValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name='uid', parent_name='scattergl', **kwargs):
super(UidValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
anim=kw... | 31.666667 | 77 | 0.629474 |
18b53947c67541f078ba33cb2d3cd784ecd4a640 | 14,325 | py | Python | redcache/local.py | tomekwojcik/redcache | 3d353dd9e4a988ede9edc0e1222d4d3e816af05a | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2015-10-17T16:41:42.000Z | 2017-03-26T22:00:34.000Z | redcache/local.py | tomekwojcik/redcache | 3d353dd9e4a988ede9edc0e1222d4d3e816af05a | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | redcache/local.py | tomekwojcik/redcache | 3d353dd9e4a988ede9edc0e1222d4d3e816af05a | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright... | 35.19656 | 78 | 0.644817 |
511354e8f0f0b35eb487f8e15c32620c79295612 | 593 | py | Python | examples/ch06/fig06_02.py | edson-gomes/Intro-to-Python | 00a2f549916616b0f2036401573e35d66317f998 | [
"MIT"
] | null | null | null | examples/ch06/fig06_02.py | edson-gomes/Intro-to-Python | 00a2f549916616b0f2036401573e35d66317f998 | [
"MIT"
] | null | null | null | examples/ch06/fig06_02.py | edson-gomes/Intro-to-Python | 00a2f549916616b0f2036401573e35d66317f998 | [
"MIT"
] | null | null | null | # fig06_02.py
"""Tokenizing a string and counting unique words."""
text = ('this is sample text with several words '
'this is more sample text with some different words')
word_counts = {}
# count occurrences of each unique word
for word in text.split():
if word in word_counts:
word_counts[word]... | 26.954545 | 64 | 0.67285 |
e5eede49a04d8533c001b7a50b6c496c21b49d72 | 571 | py | Python | nuke_stubs/nuke/nuke_classes/ChannelMask_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | 1 | 2022-01-12T01:29:16.000Z | 2022-01-12T01:29:16.000Z | nuke_stubs/nuke/nuke_classes/ChannelMask_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | null | null | null | nuke_stubs/nuke/nuke_classes/ChannelMask_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | null | null | null | from numbers import Number
from typing import *
import nuke
from . import *
class ChannelMask_Knob(Channel_Knob):
"""
ChannelMask_Knob
"""
def __hash__(self, ):
"""
Return hash(self).
"""
return None
def __init__(self, *args, **kwargs):
"""
Initial... | 21.148148 | 79 | 0.562172 |
c3fc4a8a22d5f7aa5e6e069df7b4edb60f32a1ba | 23,661 | py | Python | Lib/pagebot/fonttoolbox/analyzers/apointcontext.py | bghryct/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 68 | 2018-10-22T22:42:58.000Z | 2022-03-19T11:07:31.000Z | Lib/pagebot/fonttoolbox/analyzers/apointcontext.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 97 | 2017-07-10T23:49:30.000Z | 2018-10-03T08:17:55.000Z | Lib/pagebot/fonttoolbox/analyzers/apointcontext.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 9 | 2017-07-11T09:59:00.000Z | 2018-09-12T11:59:30.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ... | 36.626935 | 129 | 0.569334 |
f4dee14da32fed961c2b1bf83b8a3af93bdc0314 | 1,013 | py | Python | pymtl3/passes/mamba/test/HeuTopoUnrollSim_test.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | 1 | 2022-01-03T06:22:11.000Z | 2022-01-03T06:22:11.000Z | pymtl3/passes/mamba/test/HeuTopoUnrollSim_test.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | null | null | null | pymtl3/passes/mamba/test/HeuTopoUnrollSim_test.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | null | null | null | from pymtl3.datatypes import Bits32
from pymtl3.dsl import *
from ..PassGroups import HeuTopoUnrollSim
def test_very_deep_dag():
class Inner(Component):
def construct( s ):
s.in_ = InPort(Bits32)
s.out = OutPort(Bits32)
@s.update
def up():
s.out = s.in_ + 1
def done( s ):... | 19.113208 | 53 | 0.52616 |
6595c4063fa8a395cf375c5516bca3f126cd5f05 | 3,314 | py | Python | generate_codecs.py | igutekunst/binary-codec | 83216f4bf452bf45eeb7deaec46a6c7bb15c1bcf | [
"MIT"
] | null | null | null | generate_codecs.py | igutekunst/binary-codec | 83216f4bf452bf45eeb7deaec46a6c7bb15c1bcf | [
"MIT"
] | null | null | null | generate_codecs.py | igutekunst/binary-codec | 83216f4bf452bf45eeb7deaec46a6c7bb15c1bcf | [
"MIT"
] | null | null | null | import argparse
import os
import string
import mako
from generate_headers import process_yaml
def fpath(f):
path = os.path.dirname(os.path.abspath(__file__))
return os.path.realpath(os.path.join(path, f))
def get_template(template_name):
return fpath(os.path.join('templates', template_name))
def subst... | 32.174757 | 91 | 0.588111 |
70ac6c9493422e112c4d55241f0be3a59d79c912 | 39,930 | py | Python | tensorflow_probability/python/distributions/vector_diffeomixture.py | ykkawana/probability | 65bfd91cf6e855674da8dd9976c067f79da46e90 | [
"Apache-2.0"
] | 1 | 2018-08-27T14:37:40.000Z | 2018-08-27T14:37:40.000Z | tensorflow_probability/python/distributions/vector_diffeomixture.py | ykkawana/probability | 65bfd91cf6e855674da8dd9976c067f79da46e90 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/vector_diffeomixture.py | ykkawana/probability | 65bfd91cf6e855674da8dd9976c067f79da46e90 | [
"Apache-2.0"
] | 1 | 2018-08-27T14:37:44.000Z | 2018-08-27T14:37:44.000Z | # 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... | 41.421162 | 109 | 0.653769 |
bd7c6393ad83930d862a61fc662a7c2f5d428c04 | 5,877 | py | Python | lib/BiochemistryAPI/utils.py | samseaver/BiochemistryAPI | 443b0e86c222f095f7d53dfaa0bbda2726413f8b | [
"MIT"
] | null | null | null | lib/BiochemistryAPI/utils.py | samseaver/BiochemistryAPI | 443b0e86c222f095f7d53dfaa0bbda2726413f8b | [
"MIT"
] | 3 | 2017-12-13T18:15:30.000Z | 2020-06-30T20:48:45.000Z | lib/BiochemistryAPI/utils.py | samseaver/BiochemistryAPI | 443b0e86c222f095f7d53dfaa0bbda2726413f8b | [
"MIT"
] | 4 | 2017-08-30T23:11:48.000Z | 2020-06-30T20:38:43.000Z | import csv
import logging
import os
import re
from collections import defaultdict, namedtuple, OrderedDict
from boltons.setutils import IndexedSet
from rdkit import RDLogger
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.DataStructs import FingerprintSimilarity
rdk_lg = RDLogger.log... | 35.403614 | 95 | 0.644376 |
bddfaba1861324984879a40e1853eae244eb5dc5 | 85 | py | Python | opac/admin/models/__init__.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | 1 | 2020-11-26T05:25:46.000Z | 2020-11-26T05:25:46.000Z | opac/admin/models/__init__.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | opac/admin/models/__init__.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | import opac.admin.models.masters
import opac.admin.models.transactions # noqa: F401
| 28.333333 | 51 | 0.811765 |
d5e15e0d4997ec2ee162cdecf851d3feead7cb6d | 9,207 | py | Python | salt/modules/splunk_search.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/salt/modules/splunk_search.py | smallyear/linuxLearn | 342e5020bf24b5fac732c4275a512087b47e578d | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/salt/modules/splunk_search.py | smallyear/linuxLearn | 342e5020bf24b5fac732c4275a512087b47e578d | [
"Apache-2.0"
] | 1 | 2018-04-19T16:57:27.000Z | 2018-04-19T16:57:27.000Z | # -*- coding: utf-8 -*-
'''
Module for interop with the Splunk API
.. versionadded:: 2015.5.0
:depends: - splunk-sdk python module
:configuration: Configure this module by specifying the name of a configuration
profile in the minion config, minion pillar, or master config. The module
will use the 'splunk' k... | 29.796117 | 133 | 0.631259 |
1b7ebe58c0e798b4be2daa0fec0f5a4fd71830d1 | 24,186 | py | Python | utm_simulator/layer_environment.py | colineRamee/UTM_simulator | fe0cb59b1a3a64f279fbc12f90c33455a2522d50 | [
"MIT"
] | null | null | null | utm_simulator/layer_environment.py | colineRamee/UTM_simulator | fe0cb59b1a3a64f279fbc12f90c33455a2522d50 | [
"MIT"
] | null | null | null | utm_simulator/layer_environment.py | colineRamee/UTM_simulator | fe0cb59b1a3a64f279fbc12f90c33455a2522d50 | [
"MIT"
] | 1 | 2022-02-01T15:57:05.000Z | 2022-02-01T15:57:05.000Z | import numpy as np
import random
import math
import json
from utm_simulator import agent
from utm_simulator.my_utils import MyLogger
from utm_simulator import layer
class LayerEnvironment:
def __init__(self, size_map, min_distance, agent_speed, sensing_radius, tolerance, utm_on, desired_number_of_agents=1, centra... | 51.350318 | 164 | 0.574713 |
846ad2eb92ec9c97485585d29eff7678aed4ec9f | 3,053 | py | Python | book/migrations/0001_initial.py | Bongkot-Kladklaen/Python-Django-Bookshop | 99ec92ea3aaac0bd8e41ba7825834ee159833697 | [
"MIT"
] | null | null | null | book/migrations/0001_initial.py | Bongkot-Kladklaen/Python-Django-Bookshop | 99ec92ea3aaac0bd8e41ba7825834ee159833697 | [
"MIT"
] | null | null | null | book/migrations/0001_initial.py | Bongkot-Kladklaen/Python-Django-Bookshop | 99ec92ea3aaac0bd8e41ba7825834ee159833697 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-11 05:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',
fields=[
... | 41.256757 | 143 | 0.542745 |
3cbce8ad4f2ce04348a1c796e9f89ffdb3b7e99b | 677 | py | Python | packages/python/yap_kernel/yap_ipython/config.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 90 | 2015-03-09T01:24:15.000Z | 2022-02-24T13:56:25.000Z | packages/python/yap_kernel/yap_ipython/config.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 52 | 2016-02-14T08:59:37.000Z | 2022-03-14T16:39:35.000Z | packages/python/yap_kernel/yap_ipython/config.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 27 | 2015-11-19T02:45:49.000Z | 2021-11-25T19:47:58.000Z | """
Shim to maintain backwards compatibility with old yap_ipython.config imports.
"""
# Copyright (c) yap_ipython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from warnings import warn
from yap_ipython.utils.shimmodule import ShimModule, ShimWarning
warn("The `yap_ipython.c... | 33.85 | 99 | 0.791728 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.