hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 | qsc_code_num_words_quality_signal int64 | qsc_code_num_chars_quality_signal float64 | qsc_code_mean_word_length_quality_signal float64 | qsc_code_frac_words_unique_quality_signal float64 | qsc_code_frac_chars_top_2grams_quality_signal float64 | qsc_code_frac_chars_top_3grams_quality_signal float64 | qsc_code_frac_chars_top_4grams_quality_signal float64 | qsc_code_frac_chars_dupe_5grams_quality_signal float64 | qsc_code_frac_chars_dupe_6grams_quality_signal float64 | qsc_code_frac_chars_dupe_7grams_quality_signal float64 | qsc_code_frac_chars_dupe_8grams_quality_signal float64 | qsc_code_frac_chars_dupe_9grams_quality_signal float64 | qsc_code_frac_chars_dupe_10grams_quality_signal float64 | qsc_code_frac_chars_replacement_symbols_quality_signal float64 | qsc_code_frac_chars_digital_quality_signal float64 | qsc_code_frac_chars_whitespace_quality_signal float64 | qsc_code_size_file_byte_quality_signal float64 | qsc_code_num_lines_quality_signal float64 | qsc_code_num_chars_line_max_quality_signal float64 | qsc_code_num_chars_line_mean_quality_signal float64 | qsc_code_frac_chars_alphabet_quality_signal float64 | qsc_code_frac_chars_comments_quality_signal float64 | qsc_code_cate_xml_start_quality_signal float64 | qsc_code_frac_lines_dupe_lines_quality_signal float64 | qsc_code_cate_autogen_quality_signal float64 | qsc_code_frac_lines_long_string_quality_signal float64 | qsc_code_frac_chars_string_length_quality_signal float64 | qsc_code_frac_chars_long_word_length_quality_signal float64 | qsc_code_frac_lines_string_concat_quality_signal float64 | qsc_code_cate_encoded_data_quality_signal float64 | qsc_code_frac_chars_hex_words_quality_signal float64 | qsc_code_frac_lines_prompt_comments_quality_signal float64 | qsc_code_frac_lines_assert_quality_signal float64 | qsc_codepython_cate_ast_quality_signal float64 | qsc_codepython_frac_lines_func_ratio_quality_signal float64 | qsc_codepython_cate_var_zero_quality_signal bool | qsc_codepython_frac_lines_pass_quality_signal float64 | qsc_codepython_frac_lines_import_quality_signal float64 | qsc_codepython_frac_lines_simplefunc_quality_signal float64 | qsc_codepython_score_lines_no_logic_quality_signal float64 | qsc_codepython_frac_lines_print_quality_signal float64 | qsc_code_num_words int64 | qsc_code_num_chars int64 | qsc_code_mean_word_length int64 | qsc_code_frac_words_unique null | qsc_code_frac_chars_top_2grams int64 | qsc_code_frac_chars_top_3grams int64 | qsc_code_frac_chars_top_4grams int64 | qsc_code_frac_chars_dupe_5grams int64 | qsc_code_frac_chars_dupe_6grams int64 | qsc_code_frac_chars_dupe_7grams int64 | qsc_code_frac_chars_dupe_8grams int64 | qsc_code_frac_chars_dupe_9grams int64 | qsc_code_frac_chars_dupe_10grams int64 | qsc_code_frac_chars_replacement_symbols int64 | qsc_code_frac_chars_digital int64 | qsc_code_frac_chars_whitespace int64 | qsc_code_size_file_byte int64 | qsc_code_num_lines int64 | qsc_code_num_chars_line_max int64 | qsc_code_num_chars_line_mean int64 | qsc_code_frac_chars_alphabet int64 | qsc_code_frac_chars_comments int64 | qsc_code_cate_xml_start int64 | qsc_code_frac_lines_dupe_lines int64 | qsc_code_cate_autogen int64 | qsc_code_frac_lines_long_string int64 | qsc_code_frac_chars_string_length int64 | qsc_code_frac_chars_long_word_length int64 | qsc_code_frac_lines_string_concat null | qsc_code_cate_encoded_data int64 | qsc_code_frac_chars_hex_words int64 | qsc_code_frac_lines_prompt_comments int64 | qsc_code_frac_lines_assert int64 | qsc_codepython_cate_ast int64 | qsc_codepython_frac_lines_func_ratio int64 | qsc_codepython_cate_var_zero int64 | qsc_codepython_frac_lines_pass int64 | qsc_codepython_frac_lines_import int64 | qsc_codepython_frac_lines_simplefunc int64 | qsc_codepython_score_lines_no_logic int64 | qsc_codepython_frac_lines_print int64 | effective string | hits int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a6b2e5b7cf0173afb424be4c44105af0dae9900 | 7,577 | py | Python | scripts/utils/import_languages.py | mozilla-releng/staging-mozilla-vpn-client | f31d3762a607ccf2d7c6a016f7b800305fbf0113 | [
"Apache-2.0"
] | null | null | null | scripts/utils/import_languages.py | mozilla-releng/staging-mozilla-vpn-client | f31d3762a607ccf2d7c6a016f7b800305fbf0113 | [
"Apache-2.0"
] | null | null | null | scripts/utils/import_languages.py | mozilla-releng/staging-mozilla-vpn-client | f31d3762a607ccf2d7c6a016f7b800305fbf0113 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
import xml.etree.ElementTree as ET
import os
import sys
import shutil
import ate... | 35.57277 | 121 | 0.665171 | 1,057 | 7,577 | 4.705771 | 0.305582 | 0.021713 | 0.028146 | 0.026538 | 0.205468 | 0.145959 | 0.090269 | 0.060314 | 0.060314 | 0.020105 | 0 | 0.025207 | 0.17276 | 7,577 | 212 | 122 | 35.740566 | 0.768347 | 0.112973 | 0 | 0.18239 | 0 | 0.018868 | 0.440794 | 0.121696 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018868 | false | 0.006289 | 0.056604 | 0 | 0.08805 | 0.062893 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a6e93c38ff63c100497bb656432f8f40340791b | 1,026 | py | Python | cogs/filter.py | Velgaster/Discord-User-Vote | 4aacc0bf01a11b948fa5355a3775ef8c7ae9751e | [
"MIT"
] | null | null | null | cogs/filter.py | Velgaster/Discord-User-Vote | 4aacc0bf01a11b948fa5355a3775ef8c7ae9751e | [
"MIT"
] | null | null | null | cogs/filter.py | Velgaster/Discord-User-Vote | 4aacc0bf01a11b948fa5355a3775ef8c7ae9751e | [
"MIT"
] | null | null | null | from discord.ext import commands
import discord
def setup(client):
client.add_cog(KeyWordFilter(client))
class KeyWordFilter(commands.Cog):
def __init__(self, client):
self.client = client
self.log_ch = self.client.get_channel(int(self.client.SETTINGS.LOG_CHANNEL))
@commands.Cog.listene... | 35.37931 | 84 | 0.665692 | 141 | 1,026 | 4.730496 | 0.404255 | 0.089955 | 0.058471 | 0.076462 | 0.08096 | 0.08096 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 1,026 | 28 | 85 | 36.642857 | 0.823457 | 0 | 0 | 0 | 0 | 0 | 0.061404 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.090909 | 0 | 0.227273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a6fe4cb292136ed5cb190cbef1dbace08d2c9c3 | 1,975 | py | Python | api/app.py | sai-krishna-msk/KickAssist | 7fb256e3ef4beff231332f6491ebb975f3fe4b43 | [
"MIT"
] | null | null | null | api/app.py | sai-krishna-msk/KickAssist | 7fb256e3ef4beff231332f6491ebb975f3fe4b43 | [
"MIT"
] | 7 | 2021-06-08T21:18:49.000Z | 2022-03-12T00:24:33.000Z | api/app.py | sai-krishna-msk/KickAssist | 7fb256e3ef4beff231332f6491ebb975f3fe4b43 | [
"MIT"
] | null | null | null | from ml_model.model import KickModel
import numpy as np
import pandas as pd
import eli5
import joblib
import flask
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
model_oh = joblib.load('ml_model/estimators/model_oh.sav')
model_hel = joblib.load('ml_model/estimators/model_hel.sav')
e... | 33.474576 | 132 | 0.716456 | 261 | 1,975 | 5.141762 | 0.302682 | 0.031297 | 0.044709 | 0.063338 | 0.395678 | 0.395678 | 0.264531 | 0.264531 | 0.264531 | 0.264531 | 0 | 0.003005 | 0.157468 | 1,975 | 59 | 133 | 33.474576 | 0.803486 | 0 | 0 | 0 | 0 | 0.020833 | 0.243927 | 0.144737 | 0 | 0 | 0 | 0 | 0 | 1 | 0.041667 | false | 0 | 0.145833 | 0 | 0.229167 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a70669d9d055da240cf688e557bf0a87257569e | 2,810 | py | Python | snowddl/resolver/primary_key.py | littleK0i/SnowDDL | b24cb3676e41fec8876d61a101ba242e7272a18f | [
"Apache-2.0"
] | 21 | 2022-02-10T16:52:03.000Z | 2022-03-18T15:27:18.000Z | snowddl/resolver/primary_key.py | littleK0i/SnowDDL | b24cb3676e41fec8876d61a101ba242e7272a18f | [
"Apache-2.0"
] | null | null | null | snowddl/resolver/primary_key.py | littleK0i/SnowDDL | b24cb3676e41fec8876d61a101ba242e7272a18f | [
"Apache-2.0"
] | 1 | 2022-03-05T11:02:42.000Z | 2022-03-05T11:02:42.000Z | from snowddl.blueprint import PrimaryKeyBlueprint
from snowddl.resolver.abc_schema_object_resolver import AbstractSchemaObjectResolver, ResolveResult, ObjectType
class PrimaryKeyResolver(AbstractSchemaObjectResolver):
def get_object_type(self) -> ObjectType:
return ObjectType.PRIMARY_KEY
def get_exis... | 36.973684 | 111 | 0.5879 | 307 | 2,810 | 5.175896 | 0.218241 | 0.056639 | 0.053493 | 0.052863 | 0.293266 | 0.28068 | 0.24292 | 0.221523 | 0.178729 | 0.178729 | 0 | 0 | 0.279359 | 2,810 | 75 | 112 | 37.466667 | 0.784691 | 0 | 0 | 0.206897 | 0 | 0 | 0.238434 | 0.044128 | 0 | 0 | 0 | 0 | 0 | 1 | 0.103448 | false | 0 | 0.034483 | 0.034483 | 0.275862 | 0.086207 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a713700e9c156f74125bcaeca0299290201d914 | 675 | py | Python | modules/module0/02_datastructures_and_geometry/datastructures_2b.py | tetov/ITA19 | 1af68a8885caf83acd98f4136d0286539ccbe63b | [
"MIT"
] | 7 | 2019-11-13T20:29:54.000Z | 2020-02-26T14:30:54.000Z | modules/module0/02_datastructures_and_geometry/datastructures_2b.py | GeneKao/ITA19 | c4b10dc183599eed4ed60d922b6ef5922d173bdb | [
"MIT"
] | 4 | 2019-11-07T20:57:51.000Z | 2020-03-04T11:43:18.000Z | modules/module0/02_datastructures_and_geometry/datastructures_2b.py | GeneKao/ITA19 | c4b10dc183599eed4ed60d922b6ef5922d173bdb | [
"MIT"
] | 6 | 2019-10-30T13:25:54.000Z | 2020-02-14T14:06:09.000Z | import os
import compas
from compas.datastructures import Mesh
from compas_rhino.artists import MeshArtist
HERE = os.path.dirname(__file__)
DATA = os.path.join(HERE, 'data')
FILE = os.path.join(DATA, 'faces.obj')
mesh = Mesh.from_obj(FILE)
artist = MeshArtist(mesh, layer="Mesh")
artist.draw_vertices(
color={ke... | 25 | 94 | 0.722963 | 107 | 675 | 4.392523 | 0.392523 | 0.085106 | 0.051064 | 0.076596 | 0.085106 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032534 | 0.134815 | 675 | 26 | 95 | 25.961538 | 0.77226 | 0 | 0 | 0 | 0 | 0 | 0.025185 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.222222 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a73c0e8a1979c239e091749b325602ad4a40468 | 5,620 | py | Python | setup.py | IntuitionEngineeringTeam/RedBlackPy | 99630408153bea7494415c402eb2d9881f3168ee | [
"Apache-2.0"
] | 12 | 2018-08-24T20:46:38.000Z | 2022-01-20T16:25:23.000Z | setup.py | IntuitionEngineeringTeam/RedBlackPy | 99630408153bea7494415c402eb2d9881f3168ee | [
"Apache-2.0"
] | 1 | 2019-04-02T04:19:58.000Z | 2019-04-02T04:19:58.000Z | setup.py | IntuitionEngineeringTeam/RedBlackPy | 99630408153bea7494415c402eb2d9881f3168ee | [
"Apache-2.0"
] | 3 | 2018-07-05T22:47:27.000Z | 2019-05-25T06:40:40.000Z | #
# Created by Soldoskikh Kirill.
# Copyright 2018 Intuition. All rights reserved.
#
import os
import platform
from setuptools import setup
from setuptools.command.build_ext import build_ext
from distutils.extension import Extension
from Cython.Build import cythonize
from rbp_setup_tools.code_generation import gener... | 44.251969 | 108 | 0.57242 | 604 | 5,620 | 5.10596 | 0.31457 | 0.032101 | 0.057069 | 0.034047 | 0.357977 | 0.289559 | 0.259079 | 0.182555 | 0.182555 | 0.182555 | 0 | 0.014856 | 0.269395 | 5,620 | 126 | 109 | 44.603175 | 0.73624 | 0.070996 | 0 | 0.29 | 0 | 0 | 0.287085 | 0.179428 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.08 | 0 | 0.08 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a7405fc354c53785ef8307b7ce20355175f5c8f | 7,320 | py | Python | conversationkg/kgs/writers.py | INDElab/conversationkg | 8bfe09b0afb4954f633a9287f723c61dcd21ce46 | [
"Apache-2.0"
] | 3 | 2021-01-18T10:07:44.000Z | 2021-05-27T07:39:35.000Z | conversationkg/kgs/writers.py | INDElab/conversationkg | 8bfe09b0afb4954f633a9287f723c61dcd21ce46 | [
"Apache-2.0"
] | 3 | 2020-12-09T23:20:27.000Z | 2021-03-06T11:08:24.000Z | conversationkg/kgs/writers.py | INDElab/conversationkg | 8bfe09b0afb4954f633a9287f723c61dcd21ce46 | [
"Apache-2.0"
] | 1 | 2021-02-19T12:10:11.000Z | 2021-02-19T12:10:11.000Z | from ..conversations.corpus import Conversation
from ..conversations.emails import Email
from collections import Counter
import matplotlib
import pandas as pd
import json
class JSONWriter:
def __init__(self, kg):
self.kg = kg
self.entities = kg.entities()
self.triples = kg.triples
... | 30.247934 | 124 | 0.454645 | 747 | 7,320 | 4.287818 | 0.228916 | 0.019981 | 0.022479 | 0.024352 | 0.280674 | 0.234468 | 0.191383 | 0.114268 | 0.114268 | 0.114268 | 0 | 0.009716 | 0.451639 | 7,320 | 242 | 125 | 30.247934 | 0.788241 | 0.008197 | 0 | 0.150943 | 0 | 0 | 0.070572 | 0.025086 | 0 | 0 | 0 | 0 | 0 | 1 | 0.081761 | false | 0.012579 | 0.044025 | 0 | 0.18239 | 0.012579 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a74f67398645a5ea142cd4ebc8cc51cbdd14233 | 590 | py | Python | model-test.py | shikew/Handwriting-calculator | 5e0da9f8ceac6dcc815139c6855dfc6fb5af909f | [
"Apache-2.0"
] | null | null | null | model-test.py | shikew/Handwriting-calculator | 5e0da9f8ceac6dcc815139c6855dfc6fb5af909f | [
"Apache-2.0"
] | null | null | null | model-test.py | shikew/Handwriting-calculator | 5e0da9f8ceac6dcc815139c6855dfc6fb5af909f | [
"Apache-2.0"
] | 1 | 2019-09-11T11:48:47.000Z | 2019-09-11T11:48:47.000Z | import numpy as np
from PIL import Image
from keras.models import load_model
img_gray = Image.open('1002.png')
number = np.array(img_gray)
print(number.shape)
print('准备的图片的shape:',number.flatten().shape)
print('原number:',number)
number = number.astype('float32')
number = number/255 #归一化
number = number.flatten()
pri... | 28.095238 | 48 | 0.749153 | 86 | 590 | 5.034884 | 0.534884 | 0.110855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027933 | 0.089831 | 590 | 21 | 49 | 28.095238 | 0.778399 | 0.240678 | 0 | 0 | 0 | 0 | 0.146396 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.214286 | 0 | 0.214286 | 0.357143 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a75b7b70277fd3cd807924be5321a95f06ea318 | 72,121 | py | Python | iblviewer/volume.py | nantille/iblviewer | a5dad67e8f4b99a535297ba0803caf07b1107ca1 | [
"MIT"
] | null | null | null | iblviewer/volume.py | nantille/iblviewer | a5dad67e8f4b99a535297ba0803caf07b1107ca1 | [
"MIT"
] | null | null | null | iblviewer/volume.py | nantille/iblviewer | a5dad67e8f4b99a535297ba0803caf07b1107ca1 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import Mapping, List, Any
from datetime import datetime
import logging
import pandas as pd
import glob
import numpy as np
import logging
import os
from collections import OrderedDict
import nrrd
import vtk
import vedo
from vtk.util.numpy_support import numpy_to_vtk
... | 39.867883 | 119 | 0.609892 | 8,950 | 72,121 | 4.792626 | 0.118994 | 0.018044 | 0.007134 | 0.001958 | 0.232643 | 0.179023 | 0.152049 | 0.123257 | 0.109619 | 0.093346 | 0 | 0.008817 | 0.309605 | 72,121 | 1,809 | 120 | 39.867883 | 0.852607 | 0.282484 | 0 | 0.244094 | 0 | 0 | 0.014437 | 0.002358 | 0 | 0 | 0 | 0.002764 | 0 | 1 | 0.07185 | false | 0.003937 | 0.021654 | 0 | 0.207677 | 0.003937 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a76ff4e7600c0692264f843891e33f896e8b3a4 | 12,670 | py | Python | modeling/dataset.py | LaudateCorpus1/ml-cread | b5d5aa87faa0ddad0b41b6b0672395a8bf6147ae | [
"AML"
] | 18 | 2021-05-25T17:06:46.000Z | 2021-11-08T09:47:48.000Z | modeling/dataset.py | LaudateCorpus1/ml-cread | b5d5aa87faa0ddad0b41b6b0672395a8bf6147ae | [
"AML"
] | null | null | null | modeling/dataset.py | LaudateCorpus1/ml-cread | b5d5aa87faa0ddad0b41b6b0672395a8bf6147ae | [
"AML"
] | 6 | 2021-06-03T21:29:34.000Z | 2022-03-26T11:38:37.000Z | #
# For licensing see accompanying LICENSE file.
# Copyright (C) 2021 Apple Inc. All Rights Reserved.
#
'''
Dataset file
'''
import sys
import time
import json
import copy
from itertools import chain
from tqdm import tqdm, trange
import torch
from torch.utils.data import DataLoader, RandomSampler
SPECIAL_TOKENS = {... | 38.510638 | 139 | 0.728808 | 1,791 | 12,670 | 4.839754 | 0.125628 | 0.035994 | 0.024919 | 0.035302 | 0.332833 | 0.278034 | 0.23731 | 0.203392 | 0.176857 | 0.165321 | 0 | 0.009073 | 0.156196 | 12,670 | 328 | 140 | 38.628049 | 0.801702 | 0.126598 | 0 | 0.134199 | 0 | 0 | 0.110381 | 0.002281 | 0 | 0 | 0 | 0.003049 | 0.04329 | 1 | 0.051948 | false | 0.004329 | 0.034632 | 0.008658 | 0.125541 | 0.004329 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a770f589bb75a8f2ce9da24f74f5b68103d69bf | 2,431 | py | Python | hy/lex/lexer.py | schuster-rainer/hy | d969ed63d67c4a9070fd41a8fbff35da845e0619 | [
"MIT"
] | 12 | 2015-01-01T21:21:31.000Z | 2021-06-14T19:51:59.000Z | hy/lex/lexer.py | schuster-rainer/hy | d969ed63d67c4a9070fd41a8fbff35da845e0619 | [
"MIT"
] | null | null | null | hy/lex/lexer.py | schuster-rainer/hy | d969ed63d67c4a9070fd41a8fbff35da845e0619 | [
"MIT"
] | 2 | 2016-01-17T21:59:29.000Z | 2016-09-06T20:56:41.000Z | # Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.org>
#
# 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,... | 34.239437 | 76 | 0.667626 | 369 | 2,431 | 4.373984 | 0.471545 | 0.049566 | 0.026022 | 0.024783 | 0.045849 | 0.037175 | 0 | 0 | 0 | 0 | 0 | 0.006477 | 0.174414 | 2,431 | 70 | 77 | 34.728571 | 0.797708 | 0.534348 | 0 | 0 | 0 | 0 | 0.527978 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.030303 | 0 | 0.030303 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a77208eebfdf92ef53ffabde97b664e8625e12d | 1,319 | py | Python | week6/shuffle.py | solideveloper/afs-210 | 2ba0bb7c7617cd3169907458f657696a6987689d | [
"Apache-2.0"
] | 1 | 2022-01-06T01:22:17.000Z | 2022-01-06T01:22:17.000Z | week6/shuffle.py | solideveloper/afs-210 | 2ba0bb7c7617cd3169907458f657696a6987689d | [
"Apache-2.0"
] | null | null | null | week6/shuffle.py | solideveloper/afs-210 | 2ba0bb7c7617cd3169907458f657696a6987689d | [
"Apache-2.0"
] | null | null | null | # Python provides a built-in method called random.shuffle that will shuffle the list data type. Do not use this.
# For this assignment, you are to create your own shuffle algorithm that will take as input a sorted list and randomly shuffle the items before returning the list. Try to make your algorithm as efficient a... | 54.958333 | 217 | 0.749052 | 222 | 1,319 | 4.45045 | 0.513514 | 0.035425 | 0.126518 | 0.121457 | 0.121457 | 0.121457 | 0.121457 | 0.121457 | 0.121457 | 0.121457 | 0 | 0.021257 | 0.179682 | 1,319 | 24 | 218 | 54.958333 | 0.891867 | 0.683093 | 0 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.076923 | 0 | 0.230769 | 0.384615 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a79466df9295fa5ad7c3a62c359310229ec684a | 5,647 | py | Python | tadataka/dataset/new_tsukuba.py | IshitaTakeshi/Tadataka | 852c7afb904503005e51884408e1492ef0be836f | [
"Apache-2.0"
] | 54 | 2019-11-15T16:30:34.000Z | 2022-01-13T15:18:54.000Z | tadataka/dataset/new_tsukuba.py | IshitaTakeshi/Tadataka | 852c7afb904503005e51884408e1492ef0be836f | [
"Apache-2.0"
] | 11 | 2019-02-28T08:28:24.000Z | 2020-04-07T04:47:12.000Z | tadataka/dataset/new_tsukuba.py | IshitaTakeshi/Tadataka | 852c7afb904503005e51884408e1492ef0be836f | [
"Apache-2.0"
] | 1 | 2020-02-26T13:59:40.000Z | 2020-02-26T13:59:40.000Z | import csv
import os
from pathlib import Path
from xml.etree import ElementTree as ET
from tqdm import tqdm
from scipy.spatial.transform import Rotation
from skimage.io import imread
import numpy as np
from tadataka.camera import CameraModel, CameraParameters, FOV
from tadataka.dataset.frame import Frame
from tadatak... | 34.644172 | 81 | 0.673278 | 777 | 5,647 | 4.646075 | 0.239382 | 0.037673 | 0.015235 | 0.016621 | 0.20554 | 0.100831 | 0.018837 | 0 | 0 | 0 | 0 | 0.009914 | 0.214096 | 5,647 | 162 | 82 | 34.858025 | 0.803515 | 0.098282 | 0 | 0 | 0 | 0 | 0.04234 | 0 | 0 | 0 | 0 | 0.006173 | 0.018868 | 1 | 0.113208 | false | 0 | 0.113208 | 0.018868 | 0.301887 | 0.028302 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a798e4f49354ed1b300d7ffad5bbb4e1e929e1a | 2,015 | py | Python | krogon/maybe.py | enamrik/krogon | a41a10ed346b7198509929ed9ba1e9fcf778dc78 | [
"MIT"
] | 1 | 2020-03-02T14:17:02.000Z | 2020-03-02T14:17:02.000Z | krogon/maybe.py | enamrik/krogon | a41a10ed346b7198509929ed9ba1e9fcf778dc78 | [
"MIT"
] | null | null | null | krogon/maybe.py | enamrik/krogon | a41a10ed346b7198509929ed9ba1e9fcf778dc78 | [
"MIT"
] | null | null | null | from typing import Callable, TypeVar, Union, Tuple
from krogon.infix import Infix
A = TypeVar('A')
B = TypeVar('B')
E = TypeVar('E')
Maybe = Union[Tuple['just', A], Tuple['nothing']]
def just(value=None):
return "just", value
def nothing():
return "nothing", None
def from_value(value) -> Maybe[B]:
r... | 24.573171 | 93 | 0.629777 | 291 | 2,015 | 4.19244 | 0.168385 | 0.039344 | 0.054098 | 0.041803 | 0.27377 | 0.188525 | 0.169672 | 0.169672 | 0.140984 | 0.140984 | 0 | 0.007653 | 0.221836 | 2,015 | 81 | 94 | 24.876543 | 0.770408 | 0 | 0 | 0.214286 | 0 | 0 | 0.058561 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.178571 | false | 0 | 0.035714 | 0.089286 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a7c6e1277408f69b722e24dda7d218cc70dda0f | 1,192 | py | Python | migrations/versions/576712576c48_added_model_for_photo_comments.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | null | null | null | migrations/versions/576712576c48_added_model_for_photo_comments.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | 93 | 2017-09-01T22:24:10.000Z | 2021-12-22T14:07:06.000Z | migrations/versions/576712576c48_added_model_for_photo_comments.py | Torniojaws/vortech-backend | f775a97eeae089fa720088d86fe92d40bc5d65bc | [
"MIT"
] | null | null | null | """Added model for photo comments
Revision ID: 576712576c48
Revises: 75bb906df167
Create Date: 2018-03-30 02:06:22.877079
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '576712576c48'
down_revision = '75bb906df167'
branch_labels = None
depends_o... | 30.564103 | 81 | 0.672819 | 134 | 1,192 | 5.947761 | 0.492537 | 0.060226 | 0.075282 | 0.105395 | 0.283563 | 0.223338 | 0.110414 | 0.110414 | 0 | 0 | 0 | 0.058645 | 0.170302 | 1,192 | 38 | 82 | 31.368421 | 0.747219 | 0.261745 | 0 | 0 | 0 | 0 | 0.191697 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.1 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a7f99985562db134bffd977ed750d635522a7a2 | 12,364 | py | Python | usaspending_api/etl/helpers.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | usaspending_api/etl/helpers.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | 3 | 2020-02-12T01:16:46.000Z | 2021-06-10T20:36:57.000Z | usaspending_api/etl/helpers.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | from datetime import datetime
import warnings
import logging
from django.db.models import Q, Case, Value, When
from django.core.cache import caches, CacheKeyWarning
import django.apps
from usaspending_api.references.models import Agency, Location, RefCountryCode
from usaspending_api.references.helpers import canonica... | 38.397516 | 119 | 0.63604 | 1,612 | 12,364 | 4.656328 | 0.230769 | 0.031974 | 0.021316 | 0.015321 | 0.111111 | 0.061151 | 0.021583 | 0.021583 | 0.021583 | 0.021583 | 0 | 0.006403 | 0.280006 | 12,364 | 321 | 120 | 38.517134 | 0.836778 | 0.260514 | 0 | 0.105263 | 0 | 0 | 0.088818 | 0.014158 | 0 | 0 | 0 | 0 | 0 | 1 | 0.063158 | false | 0 | 0.052632 | 0 | 0.210526 | 0.005263 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a80119456047b966a3757d7fd0f105dc0f5c4f6 | 9,193 | py | Python | code/mapplot.py | young-astronomer/vlpy | 7fd434d307a7cc3593f84a7c6c2f4a4a86865afe | [
"Apache-2.0"
] | null | null | null | code/mapplot.py | young-astronomer/vlpy | 7fd434d307a7cc3593f84a7c6c2f4a4a86865afe | [
"Apache-2.0"
] | null | null | null | code/mapplot.py | young-astronomer/vlpy | 7fd434d307a7cc3593f84a7c6c2f4a4a86865afe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 21 11:11:56 2020
This program is use to plot polarization map from vlbi fits image.
You should specify the input fits images by -i or --infile,
output file by -o or --output,
contour levs by -l or --levs
contour base by -c or --cmul
polarization... | 30.042484 | 101 | 0.617753 | 1,524 | 9,193 | 3.694226 | 0.22769 | 0.019893 | 0.020782 | 0.019183 | 0.286856 | 0.187034 | 0.171226 | 0.126465 | 0.117052 | 0.117052 | 0 | 0.051597 | 0.175677 | 9,193 | 306 | 102 | 30.042484 | 0.691343 | 0.186011 | 0 | 0.087866 | 0 | 0.012552 | 0.103694 | 0.003034 | 0 | 0 | 0 | 0 | 0 | 1 | 0.050209 | false | 0 | 0.033473 | 0 | 0.104603 | 0.008368 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a81890c9e9eec4855a38a91238cf619244d9278 | 2,174 | py | Python | umbrella/api/v1/router.py | pizhi/umbrella | 95027e6e11a6c8df2ab5f7c202b0c1d2183f839a | [
"Apache-2.0"
] | 1 | 2018-01-13T11:45:24.000Z | 2018-01-13T11:45:24.000Z | umbrella/api/v1/router.py | pizhi/umbrella | 95027e6e11a6c8df2ab5f7c202b0c1d2183f839a | [
"Apache-2.0"
] | null | null | null | umbrella/api/v1/router.py | pizhi/umbrella | 95027e6e11a6c8df2ab5f7c202b0c1d2183f839a | [
"Apache-2.0"
] | 2 | 2018-01-01T11:39:49.000Z | 2018-08-07T07:16:45.000Z | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 36.233333 | 78 | 0.559798 | 224 | 2,174 | 5.303571 | 0.450893 | 0.074074 | 0.123737 | 0.159091 | 0.356061 | 0.277778 | 0.247475 | 0 | 0 | 0 | 0 | 0.006949 | 0.338086 | 2,174 | 59 | 79 | 36.847458 | 0.818624 | 0.297608 | 0 | 0.363636 | 0 | 0 | 0.129973 | 0.013926 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030303 | false | 0 | 0.060606 | 0 | 0.121212 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8279873b5f73ab9eb14c009ec624c039c590a5 | 943 | py | Python | exemples/test_thomson_simu.py | butala/TomograPy | a1da41f1e0b7406a1b770e56428789c54175de20 | [
"CECILL-B"
] | 7 | 2016-07-05T08:31:42.000Z | 2022-03-31T20:24:13.000Z | exemples/test_thomson_simu.py | esoubrie/TomograPy | a1da41f1e0b7406a1b770e56428789c54175de20 | [
"CECILL-B"
] | null | null | null | exemples/test_thomson_simu.py | esoubrie/TomograPy | a1da41f1e0b7406a1b770e56428789c54175de20 | [
"CECILL-B"
] | 4 | 2018-08-14T01:54:21.000Z | 2022-03-10T19:44:43.000Z | #!/usr/bin/env python
import time
import numpy as np
import tomograpy
import lo
# object
obj = tomograpy.centered_cubic_map(10, 64)
obj[:] = tomograpy.phantom.shepp_logan(obj.shape)
# data
radius = 200
a = tomograpy.fov(obj, radius)
data = tomograpy.centered_stack(a, 128, n_images=60, radius=radius, max_lon=np.pi)
# m... | 30.419355 | 82 | 0.680806 | 155 | 943 | 4.077419 | 0.451613 | 0.075949 | 0.042722 | 0.071203 | 0.075949 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032967 | 0.131495 | 943 | 30 | 83 | 31.433333 | 0.738706 | 0.112407 | 0 | 0.136364 | 0 | 0 | 0.094089 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.181818 | 0 | 0.181818 | 0.136364 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a845cfff802e634071ade849b849c82adc47ef1 | 395 | py | Python | interactive_grabcut/repo/drag2draw.py | hiankun/py_sandbox | 6623edd0c8ab17641e1ce09fba7da34c4865fc4f | [
"MIT"
] | null | null | null | interactive_grabcut/repo/drag2draw.py | hiankun/py_sandbox | 6623edd0c8ab17641e1ce09fba7da34c4865fc4f | [
"MIT"
] | null | null | null | interactive_grabcut/repo/drag2draw.py | hiankun/py_sandbox | 6623edd0c8ab17641e1ce09fba7da34c4865fc4f | [
"MIT"
] | null | null | null | # source: https://www.youtube.com/watch?v=U0sVp1xLiyo
from tkinter import *
def paint(event):
color = 'red'
x1, y1 = (event.x-1), (event.y-1)
x2, y2 = (event.x+1), (event.y+1)
c.create_oval(x1,y1,x2,y2,fill=color,outline=color)
master = Tk()
c = Canvas(master, width=600, height=400, bg='white')
c.pa... | 21.944444 | 55 | 0.648101 | 67 | 395 | 3.80597 | 0.671642 | 0.031373 | 0.054902 | 0.094118 | 0.109804 | 0.109804 | 0 | 0 | 0 | 0 | 0 | 0.062315 | 0.146835 | 395 | 17 | 56 | 23.235294 | 0.694362 | 0.129114 | 0 | 0 | 0 | 0 | 0.055556 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.090909 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a861f0810192c03917c1a4cb2de99fa5681f49e | 14,913 | py | Python | neutronclient/osc/v2/vpnaas/ipsec_site_connection.py | slawqo/python-neutronclient | ee08644c5f2424a40c70010dcf0fa2ad84809bfc | [
"Apache-2.0"
] | 120 | 2015-01-07T00:38:58.000Z | 2021-12-26T13:05:53.000Z | neutronclient/osc/v2/vpnaas/ipsec_site_connection.py | slawqo/python-neutronclient | ee08644c5f2424a40c70010dcf0fa2ad84809bfc | [
"Apache-2.0"
] | 1 | 2021-08-11T18:42:30.000Z | 2021-08-11T22:25:21.000Z | neutronclient/osc/v2/vpnaas/ipsec_site_connection.py | slawqo/python-neutronclient | ee08644c5f2424a40c70010dcf0fa2ad84809bfc | [
"Apache-2.0"
] | 153 | 2015-01-05T16:50:50.000Z | 2021-09-13T12:01:23.000Z | # Copyright 2017 FUJITSU LIMITED
# 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... | 39.768 | 79 | 0.632468 | 1,720 | 14,913 | 5.191279 | 0.153488 | 0.068317 | 0.078732 | 0.030239 | 0.465562 | 0.381454 | 0.329376 | 0.321425 | 0.287266 | 0.279875 | 0 | 0.002105 | 0.267284 | 14,913 | 374 | 80 | 39.874332 | 0.815045 | 0.040502 | 0 | 0.339506 | 0 | 0 | 0.229181 | 0.03331 | 0 | 0 | 0 | 0 | 0 | 1 | 0.040123 | false | 0 | 0.030864 | 0.003086 | 0.135802 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a893fcf944a3942d0a9e7e6cc93c141d9894e31 | 13,620 | py | Python | sushichef.py | RechercheTech/sushi-chef-arvind-gupta-toys | 2b381d8942c16ed16b4a44d8fc020fe0a81a18c0 | [
"MIT"
] | 1 | 2020-05-10T06:16:48.000Z | 2020-05-10T06:16:48.000Z | sushichef.py | RechercheTech/sushi-chef-arvind-gupta-toys | 2b381d8942c16ed16b4a44d8fc020fe0a81a18c0 | [
"MIT"
] | 5 | 2019-10-04T11:35:21.000Z | 2020-05-25T14:19:41.000Z | sushichef.py | RechercheTech/sushi-chef-arvind-gupta-toys | 2b381d8942c16ed16b4a44d8fc020fe0a81a18c0 | [
"MIT"
] | 3 | 2019-09-24T00:15:00.000Z | 2020-02-06T16:25:36.000Z | #!/usr/bin/env python
import os
import requests
import re
import shutil
from arvind import ArvindVideo, ArvindLanguage, YOUTUBE_CACHE_DIR
from bs4 import BeautifulSoup
from bs4.element import NavigableString
from ricecooker.chefs import SushiChef
from ricecooker.classes.files import YouTubeVideoFile
from ricecooker... | 37.01087 | 113 | 0.606608 | 1,583 | 13,620 | 4.933039 | 0.217309 | 0.026892 | 0.014086 | 0.011525 | 0.257011 | 0.189141 | 0.134076 | 0.101165 | 0.054296 | 0.034575 | 0 | 0.004099 | 0.301395 | 13,620 | 367 | 114 | 37.111717 | 0.816605 | 0.093906 | 0 | 0.174242 | 0 | 0 | 0.125216 | 0.010208 | 0 | 0 | 0 | 0 | 0 | 1 | 0.041667 | false | 0.015152 | 0.041667 | 0 | 0.121212 | 0.056818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a89890f028ab800ae7dcb96dcff01c0b7e8d98a | 1,184 | py | Python | 90-subsets-ii.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | 90-subsets-ii.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | 90-subsets-ii.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3.7
# -*- coding: utf-8 -*-
from typing import List
class Solution:
def subsetsWithDup(self, nums: List[int]) -> List[List[int]]:
"""
题解:https://leetcode-cn.com/problems/subsets/solution/c-zong-jie-liao-hui-su-wen-ti-lei-xing-dai-ni-gao-/
"""
def backtrack(sta... | 19.733333 | 112 | 0.516047 | 147 | 1,184 | 4.102041 | 0.585034 | 0.016584 | 0.014925 | 0.059701 | 0.109453 | 0.109453 | 0 | 0 | 0 | 0 | 0 | 0.028501 | 0.318412 | 1,184 | 59 | 113 | 20.067797 | 0.718711 | 0.15625 | 0 | 0 | 0 | 0 | 0.011111 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.047619 | 0 | 0.285714 | 0.047619 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8a19db97a47f9f1fc1395728868b9d716366fe | 450 | py | Python | tools/output_tool.py | climberwb/bert-pli | 0e6eda7a23b7502c86eab4c0d889fad1bbb57155 | [
"MIT"
] | 5 | 2020-12-24T01:46:40.000Z | 2022-03-18T19:15:10.000Z | tools/output_tool.py | climberwb/bert-pli | 0e6eda7a23b7502c86eab4c0d889fad1bbb57155 | [
"MIT"
] | 1 | 2021-04-05T14:27:24.000Z | 2021-04-05T14:27:24.000Z | tools/output_tool.py | climberwb/bert-pli | 0e6eda7a23b7502c86eab4c0d889fad1bbb57155 | [
"MIT"
] | 4 | 2020-12-28T09:20:13.000Z | 2021-12-10T13:33:21.000Z | import json
from .accuracy_tool import gen_micro_macro_result
def null_output_function(data, config, *args, **params):
return ""
def basic_output_function(data, config, *args, **params):
which = config.get("output", "output_value").replace(" ", "").split(",")
temp = gen_micro_macro_result(da... | 25 | 77 | 0.653333 | 57 | 450 | 4.929825 | 0.561404 | 0.05694 | 0.092527 | 0.135231 | 0.241993 | 0.241993 | 0 | 0 | 0 | 0 | 0 | 0 | 0.211111 | 450 | 17 | 78 | 26.470588 | 0.791549 | 0 | 0 | 0 | 0 | 0 | 0.046189 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.181818 | 0.090909 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8ae0336fc8e8f4551cb0d621a28672bac709c0 | 27,100 | py | Python | python/drydock_provisioner/ingester/plugins/deckhand.py | Vjrx/airship-drydock | 315fb9864e6d55a66d5266f76c160be55d22c98b | [
"Apache-2.0"
] | 14 | 2018-05-19T11:58:22.000Z | 2019-05-10T12:31:36.000Z | python/drydock_provisioner/ingester/plugins/deckhand.py | Vjrx/airship-drydock | 315fb9864e6d55a66d5266f76c160be55d22c98b | [
"Apache-2.0"
] | 10 | 2019-11-12T17:21:16.000Z | 2021-11-10T18:16:06.000Z | python/drydock_provisioner/ingester/plugins/deckhand.py | Vjrx/airship-drydock | 315fb9864e6d55a66d5266f76c160be55d22c98b | [
"Apache-2.0"
] | 11 | 2018-06-05T16:21:18.000Z | 2019-04-03T11:44:34.000Z | # Copyright 2017 AT&T Intellectual Property. All other 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... | 37.225275 | 108 | 0.573579 | 3,009 | 27,100 | 5.01429 | 0.168827 | 0.020414 | 0.016901 | 0.017895 | 0.258218 | 0.213746 | 0.178685 | 0.156482 | 0.139515 | 0.124934 | 0 | 0.003407 | 0.328561 | 27,100 | 727 | 109 | 37.276479 | 0.825786 | 0.146384 | 0 | 0.178344 | 0 | 0 | 0.104372 | 0.002126 | 0 | 0 | 0 | 0 | 0 | 1 | 0.046709 | false | 0 | 0.027601 | 0.006369 | 0.121019 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8ca4ac28e4f99e7596ac67b54b694b5e38191d | 5,517 | py | Python | porting_tools/package_xml_porter.py | nreplogle/ros2-migration-tools | 8e422731dea52df19da6de780319a17516f60f7c | [
"Apache-2.0"
] | 92 | 2018-10-17T22:18:01.000Z | 2022-03-19T22:03:16.000Z | porting_tools/package_xml_porter.py | nreplogle/ros2-migration-tools | 8e422731dea52df19da6de780319a17516f60f7c | [
"Apache-2.0"
] | 12 | 2019-02-21T22:29:15.000Z | 2021-06-28T22:33:31.000Z | porting_tools/package_xml_porter.py | nreplogle/ros2-migration-tools | 8e422731dea52df19da6de780319a17516f60f7c | [
"Apache-2.0"
] | 19 | 2018-10-18T11:47:07.000Z | 2022-02-04T18:41:03.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "licens... | 39.12766 | 104 | 0.649085 | 700 | 5,517 | 4.922857 | 0.278571 | 0.092571 | 0.037725 | 0.040627 | 0.219385 | 0.189495 | 0.172084 | 0.163088 | 0.130006 | 0.088799 | 0 | 0.00498 | 0.235635 | 5,517 | 140 | 105 | 39.407143 | 0.812189 | 0.236542 | 0 | 0.1625 | 0 | 0 | 0.103672 | 0.017987 | 0.0125 | 0 | 0 | 0 | 0 | 1 | 0.1375 | false | 0 | 0.0375 | 0 | 0.225 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8eaddf7ae51bc116bee8d180b8c5c1f2cfecaf | 4,739 | py | Python | endpoints/api/permission_models_interface.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 2,027 | 2019-11-12T18:05:48.000Z | 2022-03-31T22:25:04.000Z | endpoints/api/permission_models_interface.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 496 | 2019-11-12T18:13:37.000Z | 2022-03-31T10:43:45.000Z | endpoints/api/permission_models_interface.py | giuseppe/quay | a1b7e4b51974edfe86f66788621011eef2667e6a | [
"Apache-2.0"
] | 249 | 2019-11-12T18:02:27.000Z | 2022-03-22T12:19:19.000Z | import sys
from abc import ABCMeta, abstractmethod
from collections import namedtuple
from six import add_metaclass
class SaveException(Exception):
def __init__(self, other):
self.traceback = sys.exc_info()
super(SaveException, self).__init__(str(other))
class DeleteException(Exception):
de... | 21.15625 | 99 | 0.556447 | 432 | 4,739 | 5.791667 | 0.162037 | 0.08793 | 0.082734 | 0.097122 | 0.640687 | 0.605516 | 0.559952 | 0.533573 | 0.498401 | 0.439249 | 0 | 0 | 0.358303 | 4,739 | 223 | 100 | 21.251121 | 0.822756 | 0.226208 | 0 | 0.5 | 0 | 0 | 0.083361 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.159574 | false | 0 | 0.042553 | 0.031915 | 0.319149 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8f1c2b21e9f7321bc8056b973b7bad4e6c12de | 754 | py | Python | configs/mot/tracktor/tracktor_faster-rcnn_r50_fpn_4e_mot17-public.py | sht47/mmtracking | 5a25e418e9c598d1b576bce8702f5e156cbbefe7 | [
"Apache-2.0"
] | 12 | 2021-09-05T20:47:16.000Z | 2022-03-23T07:00:35.000Z | configs/mot/tracktor/tracktor_faster-rcnn_r50_fpn_4e_mot17-public.py | hellock/mmtracking | a22a36b2055d80cf4a7a5ef3913849abb56defcb | [
"Apache-2.0"
] | 2 | 2021-09-06T13:20:09.000Z | 2022-01-13T05:36:14.000Z | configs/mot/tracktor/tracktor_faster-rcnn_r50_fpn_4e_mot17-public.py | hellock/mmtracking | a22a36b2055d80cf4a7a5ef3913849abb56defcb | [
"Apache-2.0"
] | 1 | 2021-07-15T00:26:35.000Z | 2021-07-15T00:26:35.000Z | _base_ = ['./tracktor_faster-rcnn_r50_fpn_4e_mot17-public-half.py']
model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth' # noqa: E501
))
data_root = 'data/MOT17/'
test_set = 'test'
data = dict... | 41.888889 | 123 | 0.708223 | 101 | 754 | 4.950495 | 0.425743 | 0.112 | 0.12 | 0.09 | 0.482 | 0.412 | 0.32 | 0.196 | 0.196 | 0 | 0 | 0.033281 | 0.16313 | 754 | 17 | 124 | 44.352941 | 0.759113 | 0.027851 | 0 | 0 | 0 | 0.058824 | 0.467123 | 0.310959 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a8f5a90f2c6e24db504d3e023a88b1bddaccca9 | 2,277 | py | Python | browserstack/first_sample_build.py | Shaimyst/scrive_test | 38e3ea0192885d1776d24afdbea110d73adc4e8b | [
"MIT"
] | null | null | null | browserstack/first_sample_build.py | Shaimyst/scrive_test | 38e3ea0192885d1776d24afdbea110d73adc4e8b | [
"MIT"
] | null | null | null | browserstack/first_sample_build.py | Shaimyst/scrive_test | 38e3ea0192885d1776d24afdbea110d73adc4e8b | [
"MIT"
] | null | null | null | from threading import Thread
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWai... | 42.166667 | 149 | 0.700044 | 277 | 2,277 | 5.66065 | 0.465704 | 0.045918 | 0.053571 | 0.044005 | 0.131378 | 0.131378 | 0.131378 | 0.131378 | 0.096939 | 0 | 0 | 0.011111 | 0.16996 | 2,277 | 54 | 150 | 42.166667 | 0.818519 | 0.158103 | 0 | 0.137255 | 0 | 0.039216 | 0.358264 | 0.023013 | 0 | 0 | 0 | 0 | 0 | 1 | 0.019608 | false | 0.019608 | 0.156863 | 0 | 0.176471 | 0.019608 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a914cd003bec02fcf0ace8e2f7e5de8208c8146 | 11,024 | py | Python | ISM_catalog_profile/scripts/ISM/ISM.py | rhmdnd/compliance-trestle-demos | 1d92c91cca1d23cf707f82f035b2d58ec67c953a | [
"Apache-2.0"
] | 10 | 2021-09-03T05:07:19.000Z | 2022-03-26T13:24:51.000Z | ISM_catalog_profile/scripts/ISM/ISM.py | rhmdnd/compliance-trestle-demos | 1d92c91cca1d23cf707f82f035b2d58ec67c953a | [
"Apache-2.0"
] | null | null | null | ISM_catalog_profile/scripts/ISM/ISM.py | rhmdnd/compliance-trestle-demos | 1d92c91cca1d23cf707f82f035b2d58ec67c953a | [
"Apache-2.0"
] | 4 | 2021-12-14T22:15:06.000Z | 2022-03-29T16:16:19.000Z | #!/usr/bin/env python3
# # -*- mode:python; coding:utf-8 -*-
# Copyright (c) 2020 IBM Corp. 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
#
# https://www.apache.org... | 42.4 | 119 | 0.642144 | 1,375 | 11,024 | 4.947636 | 0.267636 | 0.017492 | 0.01029 | 0.022931 | 0.108923 | 0.062766 | 0.054388 | 0.030869 | 0 | 0 | 0 | 0.007886 | 0.263788 | 11,024 | 259 | 120 | 42.563707 | 0.830335 | 0.24873 | 0 | 0.081761 | 0 | 0.006289 | 0.119175 | 0.003604 | 0 | 0 | 0 | 0.007722 | 0.006289 | 1 | 0.075472 | false | 0 | 0.106918 | 0 | 0.232704 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a9405edbd8cfdcda2cba6e2d4bef4fc6c17c93b | 806 | py | Python | setup.py | cyberjunky/python-garminconnect-aio | fb913a15107edee5c5530f3bded7c553ec57923b | [
"MIT"
] | 11 | 2021-06-08T14:55:33.000Z | 2022-02-03T03:12:14.000Z | setup.py | cyberjunky/python-garminconnect-aio | fb913a15107edee5c5530f3bded7c553ec57923b | [
"MIT"
] | 1 | 2021-08-07T09:24:35.000Z | 2021-08-07T17:30:40.000Z | setup.py | cyberjunky/python-garminconnect-aio | fb913a15107edee5c5530f3bded7c553ec57923b | [
"MIT"
] | 2 | 2021-06-04T15:34:22.000Z | 2021-10-02T19:48:13.000Z | #!/usr/bin/env python
from setuptools import setup
with open("README.md") as readme_file:
readme = readme_file.read()
setup(
author="Ron Klinkien",
author_email="ron@cyberjunky.nl",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
... | 29.851852 | 67 | 0.666253 | 92 | 806 | 5.728261 | 0.695652 | 0.091082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010654 | 0.184864 | 806 | 26 | 68 | 31 | 0.791476 | 0.024814 | 0 | 0 | 0 | 0 | 0.457325 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.045455 | 0 | 0.045455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a940fa45e0ab9b5f708abce624a09bc0ed42b1a | 9,513 | py | Python | nova/tests/unit/virt/libvirt/fake_imagebackend.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | 1 | 2016-07-18T22:05:01.000Z | 2016-07-18T22:05:01.000Z | nova/tests/unit/virt/libvirt/fake_imagebackend.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/libvirt/fake_imagebackend.py | ChameleonCloud/nova | 4bb9421b02b71f2b218278aa6f97abace871b111 | [
"Apache-2.0"
] | 1 | 2021-11-12T03:55:41.000Z | 2021-11-12T03:55:41.000Z | # Copyright 2012 Grid Dynamics
# 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... | 41.723684 | 79 | 0.654157 | 1,222 | 9,513 | 4.930442 | 0.252864 | 0.014606 | 0.022407 | 0.027386 | 0.159502 | 0.098091 | 0.06639 | 0.045145 | 0.045145 | 0.045145 | 0 | 0.001602 | 0.278146 | 9,513 | 227 | 80 | 41.907489 | 0.875783 | 0.44087 | 0 | 0.119565 | 0 | 0 | 0.065813 | 0.054811 | 0 | 0 | 0 | 0 | 0 | 1 | 0.119565 | false | 0 | 0.173913 | 0.021739 | 0.380435 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a95eafd7882de8499fc568c3c76a78f53505995 | 6,671 | py | Python | ershoufang/crawler_v2.py | zlikun/python-crawler-lianjia | 7e7bf0cbd333486ee62ac015e72b96d6003c8713 | [
"Apache-2.0"
] | 2 | 2018-10-25T05:52:33.000Z | 2021-12-22T06:39:30.000Z | ershoufang/crawler_v2.py | zlikun/python-crawler-lianjia | 7e7bf0cbd333486ee62ac015e72b96d6003c8713 | [
"Apache-2.0"
] | null | null | null | ershoufang/crawler_v2.py | zlikun/python-crawler-lianjia | 7e7bf0cbd333486ee62ac015e72b96d6003c8713 | [
"Apache-2.0"
] | 2 | 2019-02-02T14:38:26.000Z | 2020-07-21T01:57:17.000Z | """
第二版:多进程二手房信息爬虫
1. 将爬虫分解为下载任务和解析任务(可以继续分解,但在本案中意义不大)两部分,两部分各使用一个子进程,相互通过数据管道通信
2. 下载任务内部不使用队列,使用任务管道实现(在多进程:主进程、子进程、子进程内部进程池等场景下,队列并不好用)任务管理和通信
3. 解析任务从与下载任务间的管道中获取数据,解析并保存
问题:当目标被爬完后,怎样让爬虫停止?
"""
import csv
import datetime
import logging
import multiprocessing as mp
import re
import time
from collections import O... | 28.75431 | 115 | 0.582072 | 787 | 6,671 | 4.799238 | 0.349428 | 0.021181 | 0.022505 | 0.015886 | 0.186391 | 0.085782 | 0.041303 | 0.041303 | 0.041303 | 0.041303 | 0 | 0.005758 | 0.271024 | 6,671 | 231 | 116 | 28.878788 | 0.770923 | 0.180033 | 0 | 0.172727 | 0 | 0 | 0.183037 | 0.004978 | 0 | 0 | 0 | 0 | 0 | 1 | 0.072727 | false | 0 | 0.090909 | 0 | 0.227273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a960357ff5666b9fe043faf558321c7ac02d8e5 | 8,415 | py | Python | desktop/core/ext-py/pyu2f-0.1.4/pyu2f/convenience/customauthenticator.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/pyu2f-0.1.4/pyu2f/convenience/customauthenticator.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | desktop/core/ext-py/pyu2f-0.1.4/pyu2f/convenience/customauthenticator.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # Copyright 2016 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 ag... | 34.487705 | 80 | 0.684848 | 1,007 | 8,415 | 5.506455 | 0.278054 | 0.028855 | 0.032462 | 0.025248 | 0.224707 | 0.118305 | 0.07899 | 0.065284 | 0.039315 | 0.039315 | 0 | 0.017181 | 0.225312 | 8,415 | 243 | 81 | 34.62963 | 0.83341 | 0.319786 | 0 | 0.048 | 0 | 0 | 0.117035 | 0 | 0 | 0 | 0.002154 | 0 | 0 | 1 | 0.064 | false | 0 | 0.08 | 0 | 0.208 | 0.016 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a9667d37782748097516470365e83980101a92e | 1,681 | py | Python | kive/portal/management/commands/graph_kive.py | dmacmillan/Kive | 76bc8f289f66fb133f78cb6d5689568b7d015915 | [
"BSD-3-Clause"
] | 1 | 2021-12-22T06:10:01.000Z | 2021-12-22T06:10:01.000Z | kive/portal/management/commands/graph_kive.py | dmacmillan/Kive | 76bc8f289f66fb133f78cb6d5689568b7d015915 | [
"BSD-3-Clause"
] | null | null | null | kive/portal/management/commands/graph_kive.py | dmacmillan/Kive | 76bc8f289f66fb133f78cb6d5689568b7d015915 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import os
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Generates class diagrams.'
def handle(self, *args, **options):
if 'django_extensions' not in settings.IN... | 38.204545 | 86 | 0.543129 | 185 | 1,681 | 4.816216 | 0.421622 | 0.026936 | 0.03367 | 0.053872 | 0.040404 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000898 | 0.337299 | 1,681 | 43 | 87 | 39.093023 | 0.798923 | 0 | 0 | 0.054054 | 0 | 0 | 0.149911 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027027 | false | 0 | 0.135135 | 0 | 0.216216 | 0.027027 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a971f56d894bd93c1e6642fd2fd7e799cec7a1d | 8,543 | py | Python | summary.py | rpls/openlane_summary | 5057fab80a4acaf08e6503ced7abb932684145a5 | [
"Apache-2.0"
] | null | null | null | summary.py | rpls/openlane_summary | 5057fab80a4acaf08e6503ced7abb932684145a5 | [
"Apache-2.0"
] | null | null | null | summary.py | rpls/openlane_summary | 5057fab80a4acaf08e6503ced7abb932684145a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import glob
import csv
import sys
import re
from shutil import which
import datetime
def is_tool(name):
return which(name) is not None
def check_path(path):
paths = glob.glob(path)
if len(paths) == 0:
exit("file not found: %s" % path)
if len(pa... | 40.29717 | 164 | 0.628 | 1,209 | 8,543 | 4.303557 | 0.205128 | 0.029983 | 0.034595 | 0.05247 | 0.365751 | 0.317701 | 0.302518 | 0.302518 | 0.262156 | 0.192773 | 0 | 0.009484 | 0.234812 | 8,543 | 211 | 165 | 40.488152 | 0.786446 | 0.078661 | 0 | 0.166667 | 0 | 0 | 0.242582 | 0.006112 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.051282 | 0.00641 | 0.115385 | 0.076923 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a9a27b8be786f9438239fbfe717a4e94dce8571 | 992 | py | Python | var/spack/repos/builtin/packages/py-cupy/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-cupy/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-cupy/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyCupy(PythonPackage):
"""CuPy is an open-source array library accelerated with
NVIDIA... | 35.428571 | 95 | 0.704637 | 134 | 992 | 5.164179 | 0.656716 | 0.09104 | 0.052023 | 0.08237 | 0.096821 | 0.066474 | 0 | 0 | 0 | 0 | 0 | 0.07443 | 0.160282 | 992 | 27 | 96 | 36.740741 | 0.756303 | 0.455645 | 0 | 0 | 0 | 0 | 0.398058 | 0.16699 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a9acf16b780b19cf351bb2d89e76f1956c1db38 | 1,742 | py | Python | simple_rest_client/decorators.py | cfytrok/python-simple-rest-client | 4896e8226ffe194625c63773ea6f49531293b308 | [
"MIT"
] | null | null | null | simple_rest_client/decorators.py | cfytrok/python-simple-rest-client | 4896e8226ffe194625c63773ea6f49531293b308 | [
"MIT"
] | null | null | null | simple_rest_client/decorators.py | cfytrok/python-simple-rest-client | 4896e8226ffe194625c63773ea6f49531293b308 | [
"MIT"
] | null | null | null | import logging
from functools import wraps
import status
from httpx import exceptions
from .exceptions import AuthError, ClientConnectionError, ClientError, NotFoundError, ServerError
logger = logging.getLogger(__name__)
def validate_response(response):
error_suffix = " response={!r}".format(response)
if r... | 29.033333 | 97 | 0.675086 | 184 | 1,742 | 6.190217 | 0.315217 | 0.048288 | 0.083407 | 0.084284 | 0.468832 | 0.358209 | 0.247586 | 0.187884 | 0.187884 | 0.187884 | 0 | 0.006803 | 0.240528 | 1,742 | 59 | 98 | 29.525424 | 0.854119 | 0 | 0 | 0.409091 | 0 | 0 | 0.061424 | 0.053387 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.113636 | 0 | 0.295455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4a9cba0b5388d429f06edbee8329e6af7d50f140 | 674 | py | Python | tests/test_vendcrawler.py | josetaas/vendcrawler | 5cb497d0741f6dbd29a6e41fa9f1cb3374e8f062 | [
"MIT"
] | null | null | null | tests/test_vendcrawler.py | josetaas/vendcrawler | 5cb497d0741f6dbd29a6e41fa9f1cb3374e8f062 | [
"MIT"
] | null | null | null | tests/test_vendcrawler.py | josetaas/vendcrawler | 5cb497d0741f6dbd29a6e41fa9f1cb3374e8f062 | [
"MIT"
] | null | null | null | import unittest
from vendcrawler.scripts.vendcrawler import VendCrawler
class TestVendCrawlerMethods(unittest.TestCase):
def test_get_links(self):
links = VendCrawler('a', 'b', 'c').get_links(2)
self.assertEqual(links,
['https://sarahserver.net/?module=vendor&p=1',
... | 32.095238 | 73 | 0.615727 | 81 | 674 | 4.888889 | 0.506173 | 0.090909 | 0.050505 | 0.070707 | 0.247475 | 0.161616 | 0 | 0 | 0 | 0 | 0 | 0.009747 | 0.238872 | 674 | 20 | 74 | 33.7 | 0.762183 | 0 | 0 | 0 | 0 | 0 | 0.178042 | 0.031157 | 0 | 0 | 0 | 0 | 0.133333 | 1 | 0.133333 | false | 0 | 0.133333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa366c3a95eb19c5533d5c2db8cc7a7e0760866 | 1,331 | py | Python | tests/Python/test_all_configs_output.py | lopippo/IsoSpec | dfc6d7dac213f174fb9c61a5ee018d3f6174febc | [
"BSD-2-Clause"
] | 27 | 2016-05-10T21:27:35.000Z | 2022-03-30T08:11:36.000Z | tests/Python/test_all_configs_output.py | lopippo/IsoSpec | dfc6d7dac213f174fb9c61a5ee018d3f6174febc | [
"BSD-2-Clause"
] | 30 | 2017-08-08T14:24:56.000Z | 2022-03-30T12:44:11.000Z | tests/Python/test_all_configs_output.py | lopippo/IsoSpec | dfc6d7dac213f174fb9c61a5ee018d3f6174febc | [
"BSD-2-Clause"
] | 10 | 2017-06-26T12:14:00.000Z | 2020-11-01T13:45:14.000Z | def binom(n, k):
"""Quickly adapted from https://stackoverflow.com/questions/26560726/python-binomial-coefficient"""
if k < 0 or k > n:
return 0
if k == 0 or k == n:
return 1
total_ways = 1
for i in range(min(k, n - k)):
total_ways = total_ways * (n - i) // (i + 1)
return... | 28.319149 | 103 | 0.602554 | 177 | 1,331 | 4.338983 | 0.412429 | 0.052083 | 0.071615 | 0.015625 | 0.096354 | 0.036458 | 0.036458 | 0 | 0 | 0 | 0 | 0.061053 | 0.286251 | 1,331 | 46 | 104 | 28.934783 | 0.747368 | 0.164538 | 0 | 0.057143 | 0 | 0 | 0.052007 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 1 | 0.114286 | false | 0 | 0.057143 | 0 | 0.314286 | 0.028571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa38327240010c87a37f52f085b58c65fe79f76 | 5,090 | py | Python | tractseg/models/UNet_Pytorch_Regression.py | soichih/TractSeg | f78d0c6dc998905e593cbf4346745467e30d1979 | [
"Apache-2.0"
] | null | null | null | tractseg/models/UNet_Pytorch_Regression.py | soichih/TractSeg | f78d0c6dc998905e593cbf4346745467e30d1979 | [
"Apache-2.0"
] | null | null | null | tractseg/models/UNet_Pytorch_Regression.py | soichih/TractSeg | f78d0c6dc998905e593cbf4346745467e30d1979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
#
# 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
#... | 40.07874 | 167 | 0.678978 | 876 | 5,090 | 3.638128 | 0.184932 | 0.076875 | 0.062127 | 0.033888 | 0.285849 | 0.220897 | 0.151867 | 0.075306 | 0.026985 | 0 | 0 | 0.079717 | 0.221218 | 5,090 | 126 | 168 | 40.396825 | 0.724268 | 0.180943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.024096 | false | 0 | 0.192771 | 0 | 0.240964 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa4605e775071451ff4f02953c5854fc600fb27 | 1,619 | py | Python | platform/core/polyaxon/sidecar/sidecar/__main__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/sidecar/sidecar/__main__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/sidecar/sidecar/__main__.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | import argparse
import time
from kubernetes.client.rest import ApiException
from polyaxon_client.client import PolyaxonClient
from polyaxon_k8s.manager import K8SManager
from sidecar import settings
from sidecar.monitor import is_pod_running
if __name__ == '__main__':
parser = argparse.ArgumentParser()
pars... | 27.440678 | 79 | 0.6084 | 173 | 1,619 | 5.404624 | 0.398844 | 0.069519 | 0.072727 | 0.034225 | 0.051337 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 0.313774 | 1,619 | 58 | 80 | 27.913793 | 0.831683 | 0.017912 | 0 | 0.196078 | 0 | 0 | 0.06927 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.137255 | 0 | 0.137255 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa4e20dc8b2673c6655b3fbcb68df91576905a0 | 615 | py | Python | simple_robot_tests/src/test_odometry.py | plusangel/simple_robot | d9ad5ed8cd592f4aee14df13465435279b4d60d7 | [
"MIT"
] | 1 | 2022-03-02T14:55:27.000Z | 2022-03-02T14:55:27.000Z | simple_robot_tests/src/test_odometry.py | plusangel/simple_robot | d9ad5ed8cd592f4aee14df13465435279b4d60d7 | [
"MIT"
] | null | null | null | simple_robot_tests/src/test_odometry.py | plusangel/simple_robot | d9ad5ed8cd592f4aee14df13465435279b4d60d7 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
class OdomTopicReader(object):
def __init__(self, topic_name = '/odom'):
self._topic_name = topic_name
self._sub = rospy.Subscriber(self._topic_name, Odometry, self.topic_callback)
self._odomdata = Odometry()
def to... | 26.73913 | 85 | 0.681301 | 76 | 615 | 5.105263 | 0.473684 | 0.092784 | 0.100515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004124 | 0.211382 | 615 | 22 | 86 | 27.954545 | 0.795876 | 0.034146 | 0 | 0 | 0 | 0 | 0.057336 | 0.035413 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0 | 0.3125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa9aadd40d912fb75115061e304f8eab10a0530 | 15,044 | py | Python | docs/generate_example_images.py | KhaledSharif/kornia | 9bae28e032b092b065658117723a82816d09dbac | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/generate_example_images.py | KhaledSharif/kornia | 9bae28e032b092b065658117723a82816d09dbac | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/generate_example_images.py | KhaledSharif/kornia | 9bae28e032b092b065658117723a82816d09dbac | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import importlib
import math
import os
from pathlib import Path
from typing import Optional, Tuple
import cv2
import numpy as np
import requests
import torch
import kornia as K
def read_img_from_url(url: str, resize_to: Optional[Tuple[int, int]] = None) -> torch.Tensor:
# perform request
response = requests... | 42.982857 | 120 | 0.545865 | 2,137 | 15,044 | 3.688348 | 0.160037 | 0.028165 | 0.00609 | 0.005075 | 0.5 | 0.466125 | 0.401294 | 0.383025 | 0.345724 | 0.335321 | 0 | 0.065241 | 0.266419 | 15,044 | 349 | 121 | 43.106017 | 0.648967 | 0.085283 | 0 | 0.272727 | 0 | 0.006993 | 0.183005 | 0.006492 | 0 | 0 | 0 | 0.002865 | 0 | 1 | 0.01049 | false | 0 | 0.059441 | 0 | 0.076923 | 0.027972 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aa9bb3cf3909a79588350f79db082251d5ab096 | 3,318 | py | Python | forte/processors/data_augment/algorithms/embedding_similarity_replacement_op.py | Pushkar-Bhuse/forte | b7402330cf0b2b26fe56234f0ae43c89b31c0082 | [
"Apache-2.0"
] | null | null | null | forte/processors/data_augment/algorithms/embedding_similarity_replacement_op.py | Pushkar-Bhuse/forte | b7402330cf0b2b26fe56234f0ae43c89b31c0082 | [
"Apache-2.0"
] | null | null | null | forte/processors/data_augment/algorithms/embedding_similarity_replacement_op.py | Pushkar-Bhuse/forte | b7402330cf0b2b26fe56234f0ae43c89b31c0082 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Forte 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 applicable ... | 36.065217 | 77 | 0.676311 | 436 | 3,318 | 5.004587 | 0.417431 | 0.027498 | 0.019248 | 0.021998 | 0.070119 | 0.055454 | 0.055454 | 0.023831 | 0 | 0 | 0 | 0.005223 | 0.249849 | 3,318 | 91 | 78 | 36.461538 | 0.871434 | 0.465943 | 0 | 0 | 0 | 0 | 0.040198 | 0.01979 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04878 | false | 0 | 0.170732 | 0 | 0.292683 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aaa0768bd968c91cbf077505e1dc0e7ee6365c8 | 34,840 | py | Python | ion_functions/qc/qc_functions.py | steinermg/ion-functions | cea532ad9af51e86768572c8deb48547d99567c5 | [
"Apache-2.0"
] | 10 | 2015-04-03T15:32:21.000Z | 2018-11-21T11:57:26.000Z | ion_functions/qc/qc_functions.py | steinermg/ion-functions | cea532ad9af51e86768572c8deb48547d99567c5 | [
"Apache-2.0"
] | 8 | 2015-01-07T15:19:22.000Z | 2015-12-08T18:14:04.000Z | ion_functions/qc/qc_functions.py | steinermg/ion-functions | cea532ad9af51e86768572c8deb48547d99567c5 | [
"Apache-2.0"
] | 17 | 2015-01-14T16:23:00.000Z | 2021-07-19T08:26:52.000Z | #!/usr/bin/env python
"""
@package ion_functions.qc_functions
@file ion_functions/qc_functions.py
@author Christopher Mueller
@brief Module containing QC functions ported from matlab samples in DPS documents
"""
from ion_functions.qc.qc_extensions import stuckvalues, spikevalues, gradientvalues, ntp_to_month
import ... | 37.746479 | 215 | 0.632319 | 4,920 | 34,840 | 4.411179 | 0.16687 | 0.028752 | 0.012441 | 0.010137 | 0.403032 | 0.352624 | 0.307331 | 0.265079 | 0.234253 | 0.22232 | 0 | 0.048972 | 0.27147 | 34,840 | 922 | 216 | 37.787419 | 0.806083 | 0.503502 | 0 | 0.270588 | 0 | 0 | 0.07296 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052941 | false | 0 | 0.029412 | 0.005882 | 0.164706 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aaa32daecbc845e7f79a56464fde4fa9e4bd81d | 10,702 | py | Python | datatest/__past__/api08.py | avshalomt2/datatest | f622b0e990b53c73f56730a9009b39af7653df20 | [
"Apache-2.0"
] | null | null | null | datatest/__past__/api08.py | avshalomt2/datatest | f622b0e990b53c73f56730a9009b39af7653df20 | [
"Apache-2.0"
] | null | null | null | datatest/__past__/api08.py | avshalomt2/datatest | f622b0e990b53c73f56730a9009b39af7653df20 | [
"Apache-2.0"
] | null | null | null | """Backward compatibility for version 0.8 API."""
from __future__ import absolute_import
import inspect
import datatest
from datatest._compatibility import itertools
from datatest._compatibility.collections.abc import Sequence
from datatest._load.get_reader import get_reader
from datatest._load.load_csv import load_cs... | 36.03367 | 86 | 0.652775 | 1,262 | 10,702 | 5.306656 | 0.183043 | 0.018814 | 0.014335 | 0.014932 | 0.289682 | 0.217112 | 0.197999 | 0.189637 | 0.189637 | 0.168135 | 0 | 0.004884 | 0.253784 | 10,702 | 296 | 87 | 36.155405 | 0.833709 | 0.122127 | 0 | 0.199095 | 0 | 0 | 0.058418 | 0 | 0.004525 | 0 | 0 | 0 | 0.004525 | 1 | 0.095023 | false | 0 | 0.085973 | 0.004525 | 0.312217 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aabc93bad87b0dbf891bc8cb36cc3c5cdca1038 | 5,975 | py | Python | python/scripts/compare_events.py | tvogels01/arthur-redshift-etl | 477f822d16cd3a86b3bf95cfa28915cb7470a6e4 | [
"MIT"
] | null | null | null | python/scripts/compare_events.py | tvogels01/arthur-redshift-etl | 477f822d16cd3a86b3bf95cfa28915cb7470a6e4 | [
"MIT"
] | 44 | 2021-11-22T02:18:41.000Z | 2022-03-28T02:13:32.000Z | python/scripts/compare_events.py | tvogels01/arthur-redshift-etl | 477f822d16cd3a86b3bf95cfa28915cb7470a6e4 | [
"MIT"
] | null | null | null | """
This script compares events from two ETLs to highlight differences in elapsed times or row counts.
* Pre-requisites
You need to have a list of events for each ETL. Arthur can provide this using the
"query_events" command.
For example:
```
arthur.py query_events -p development 37ACEC7440AB4620 -q > 37ACEC7440AB46... | 33.948864 | 101 | 0.654226 | 813 | 5,975 | 4.672817 | 0.302583 | 0.047907 | 0.042116 | 0.052645 | 0.146618 | 0.136878 | 0.093446 | 0.071335 | 0.063175 | 0.038431 | 0 | 0.031347 | 0.247197 | 5,975 | 175 | 102 | 34.142857 | 0.81325 | 0.31046 | 0 | 0.049505 | 0 | 0 | 0.053771 | 0 | 0 | 0 | 0 | 0 | 0.009901 | 1 | 0.069307 | false | 0 | 0.059406 | 0 | 0.257426 | 0.089109 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aacfc97b162e67687e0053e093dc275ef1915a8 | 4,163 | py | Python | harness/drifter.py | cmu-sei/augur-code | d8c1e29ce3276037b26b65ea316d251752529449 | [
"BSD-3-Clause"
] | null | null | null | harness/drifter.py | cmu-sei/augur-code | d8c1e29ce3276037b26b65ea316d251752529449 | [
"BSD-3-Clause"
] | null | null | null | harness/drifter.py | cmu-sei/augur-code | d8c1e29ce3276037b26b65ea316d251752529449 | [
"BSD-3-Clause"
] | null | null | null | # Augur: A Step Towards Realistic Drift Detection in Production MLSystems - Code
# Copyright 2022 Carnegie Mellon University.
#
# NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITH... | 54.064935 | 513 | 0.764833 | 571 | 4,163 | 5.432574 | 0.367776 | 0.034816 | 0.031593 | 0.017408 | 0.048678 | 0.019987 | 0 | 0 | 0 | 0 | 0 | 0.012669 | 0.146769 | 4,163 | 76 | 514 | 54.776316 | 0.86036 | 0.544319 | 0 | 0 | 0 | 0 | 0.119395 | 0.023231 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057143 | false | 0 | 0.171429 | 0 | 0.257143 | 0.028571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4aae62b164701dc61724cb01ba008cf15083826f | 8,528 | py | Python | network/baselines_archive/resnet_3d101.py | xuyu0010/ARID_v1 | b03d0975f41547e8aa78929b8e26a62248f8e18f | [
"CC-BY-4.0"
] | 5 | 2020-06-24T07:33:36.000Z | 2021-11-30T17:52:08.000Z | network/baselines_archive/resnet_3d101.py | xuyu0010/ARID_v1 | b03d0975f41547e8aa78929b8e26a62248f8e18f | [
"CC-BY-4.0"
] | 1 | 2022-03-29T05:23:24.000Z | 2022-03-29T06:19:57.000Z | network/baselines_archive/resnet_3d101.py | xuyu0010/ARID_v1 | b03d0975f41547e8aa78929b8e26a62248f8e18f | [
"CC-BY-4.0"
] | 3 | 2021-02-06T10:56:30.000Z | 2022-01-18T18:50:12.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import math
from functools import partial
import logging
import os
try:
from . import initializer
from .utils import load_state
except:
import initializer
from utils import load_state
__all__ = ['Re... | 31.238095 | 124 | 0.533654 | 960 | 8,528 | 4.569792 | 0.208333 | 0.031001 | 0.027354 | 0.028721 | 0.338728 | 0.278778 | 0.193526 | 0.164349 | 0.148393 | 0.129701 | 0 | 0.034629 | 0.363391 | 8,528 | 272 | 125 | 31.352941 | 0.773439 | 0.010671 | 0 | 0.293839 | 0 | 0 | 0.02871 | 0.004034 | 0 | 0 | 0 | 0 | 0.004739 | 1 | 0.056872 | false | 0 | 0.061611 | 0.009479 | 0.189573 | 0.004739 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab01eaed0874fd5f366410cee4ae62597dd8de5 | 4,167 | py | Python | tests/ninety_nine_problems/test_miscellaneous_problems.py | gecBurton/inference_logic | 2531d8f8fb0154b3bd42ac86eccc44d7038f6ef6 | [
"MIT"
] | 3 | 2020-10-19T20:35:24.000Z | 2020-10-21T07:13:02.000Z | tests/ninety_nine_problems/test_miscellaneous_problems.py | gecBurton/inference_logic | 2531d8f8fb0154b3bd42ac86eccc44d7038f6ef6 | [
"MIT"
] | 2 | 2020-11-10T16:54:13.000Z | 2020-11-10T18:51:31.000Z | tests/ninety_nine_problems/test_miscellaneous_problems.py | gecBurton/inference_logic | 2531d8f8fb0154b3bd42ac86eccc44d7038f6ef6 | [
"MIT"
] | 1 | 2020-10-21T07:13:14.000Z | 2020-10-21T07:13:14.000Z | import pytest
from inference_logic import Rule, Variable, search
from inference_logic.data_structures import Assert, Assign
@pytest.mark.xfail
def test_90():
r"""
P90 (**) Eight queens problem
This is a classical problem in computer science. The objective is to
place eight queens on a chessboard so ... | 35.313559 | 88 | 0.538037 | 718 | 4,167 | 3.083565 | 0.213092 | 0.009937 | 0.007227 | 0.023487 | 0.165312 | 0.148148 | 0.116531 | 0.081301 | 0.081301 | 0.055104 | 0 | 0.018905 | 0.276458 | 4,167 | 117 | 89 | 35.615385 | 0.715423 | 0.545956 | 0 | 0.173913 | 0 | 0 | 0.024289 | 0 | 0 | 0 | 0 | 0 | 0.108696 | 1 | 0.021739 | false | 0 | 0.065217 | 0 | 0.086957 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab03ce1ed84ecb90d03ef035bc80050cf57b143 | 4,856 | py | Python | airbus_cobot_gui/src/airbus_cobot_gui/diagnostics/diagnostics.py | ipa320/airbus_coop | 974564807ba5d24096e237a9991311608a390da1 | [
"Apache-2.0"
] | 4 | 2017-10-15T23:32:24.000Z | 2019-12-26T12:31:53.000Z | airbus_cobot_gui/src/airbus_cobot_gui/diagnostics/diagnostics.py | ipa320/airbus_coop | 974564807ba5d24096e237a9991311608a390da1 | [
"Apache-2.0"
] | 6 | 2017-09-05T13:52:00.000Z | 2017-12-01T14:18:27.000Z | airbus_cobot_gui/src/airbus_cobot_gui/diagnostics/diagnostics.py | ipa320/airbus_coop | 974564807ba5d24096e237a9991311608a390da1 | [
"Apache-2.0"
] | 4 | 2017-09-04T08:14:36.000Z | 2017-09-18T07:22:21.000Z | #!/usr/bin/env python
#
# Copyright 2015 Airbus
# Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
#
# 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
#
# ... | 35.97037 | 150 | 0.691928 | 595 | 4,856 | 5.438655 | 0.356303 | 0.02225 | 0.012361 | 0.017614 | 0.061805 | 0.046354 | 0.025958 | 0.025958 | 0 | 0 | 0 | 0.00709 | 0.215815 | 4,856 | 134 | 151 | 36.238806 | 0.8427 | 0.225494 | 0 | 0.071429 | 0 | 0 | 0.079925 | 0.021529 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.166667 | 0 | 0.309524 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab14530560ea0c6ff68422c45af6c1228280da2 | 758 | py | Python | graphgallery/functional/dense/onehot.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 1 | 2020-07-29T08:00:32.000Z | 2020-07-29T08:00:32.000Z | graphgallery/functional/dense/onehot.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | graphgallery/functional/dense/onehot.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | import numpy as np
from ..transform import DenseTransform
from ..decorators import multiple
from ..transform import Transform
__all__ = ['onehot', 'Onehot']
@Transform.register()
class Onehot(DenseTransform):
def __init__(self, depth=None):
super().__init__()
self.collect(locals()... | 25.266667 | 84 | 0.634565 | 99 | 758 | 4.69697 | 0.535354 | 0.055914 | 0.08172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008651 | 0.237467 | 758 | 29 | 85 | 26.137931 | 0.795848 | 0.047493 | 0 | 0 | 0 | 0 | 0.09607 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.15 | false | 0 | 0.2 | 0.05 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab3a002c74475748d23b9510c6318a19949f281 | 752 | py | Python | lesson06/liqi/test.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson06/liqi/test.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson06/liqi/test.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | import configparser
'''
config = configparser.ConfigParser()
config.read('db.ini')
print(config.sections())
print(dict(config['mysqld'])['symbolic-links'])
'''
def ReadConfig(filename, section, key=None):
print(filename)
config = configparser.ConfigParser()
config.read(filename)
print(config.section... | 22.117647 | 53 | 0.640957 | 86 | 752 | 5.511628 | 0.383721 | 0.118143 | 0.126582 | 0.151899 | 0.2827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.204787 | 752 | 34 | 54 | 22.117647 | 0.792642 | 0 | 0 | 0.1 | 0 | 0 | 0.104746 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.05 | 0 | 0.3 | 0.2 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab3ac9ae685aecfb387f1a734cc96132d725108 | 1,947 | py | Python | core/forms.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | core/forms.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | core/forms.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Forms wrapper
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ------------------------------------------------------------------... | 32.45 | 83 | 0.558295 | 207 | 1,947 | 5.101449 | 0.396135 | 0.042614 | 0.039773 | 0.028409 | 0.090909 | 0.049242 | 0 | 0 | 0 | 0 | 0 | 0.005976 | 0.226502 | 1,947 | 59 | 84 | 33 | 0.695219 | 0.214689 | 0 | 0.058824 | 0 | 0 | 0.04829 | 0.026828 | 0 | 0 | 0 | 0 | 0 | 1 | 0.147059 | false | 0 | 0.117647 | 0 | 0.382353 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab43c897df779b46c4155028b30eff4d2ad17d1 | 1,990 | py | Python | ersteops/unit/views.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | null | null | null | ersteops/unit/views.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | 33 | 2017-11-24T19:44:57.000Z | 2022-02-12T07:02:53.000Z | ersteops/unit/views.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | 1 | 2017-12-11T09:15:04.000Z | 2017-12-11T09:15:04.000Z | import json
from django.shortcuts import get_object_or_404
from django.core import serializers
from django.http import HttpResponse
from .models import Unit
from .utils import UNIT_LIST_FIELD
BAD_REQUEST = HttpResponse(json.dumps({'error': 'Bad Request'}), status=400, content_type='application/json')
def unit_json_li... | 39.019608 | 123 | 0.665327 | 248 | 1,990 | 5.133065 | 0.262097 | 0.032993 | 0.08641 | 0.102121 | 0.456402 | 0.42498 | 0.42498 | 0.42498 | 0.371563 | 0.371563 | 0 | 0.012755 | 0.21206 | 1,990 | 50 | 124 | 39.8 | 0.799107 | 0.061307 | 0 | 0.4 | 0 | 0 | 0.114116 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.075 | false | 0 | 0.15 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab74d6454f4022c0cd33cf7aa9d2924c227290a | 2,394 | py | Python | src/action/tests/test_logic.py | uts-cic/ontask_b | b313e2352c77b40655f41dd5acba3a7635e6f3b3 | [
"MIT"
] | 3 | 2018-08-24T10:48:40.000Z | 2020-05-29T06:33:23.000Z | src/action/tests/test_logic.py | Lukahm/ontask | f16bdaa06ea450ee56d4581340e611b1076bed16 | [
"MIT"
] | null | null | null | src/action/tests/test_logic.py | Lukahm/ontask | f16bdaa06ea450ee56d4581340e611b1076bed16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import os
from django.conf import settings
from django.shortcuts import reverse
from django.core.management import call_command
import test
from dataops import pandas_db
from workflow.models import Workflow
class EmailActionTracking(te... | 38.612903 | 202 | 0.704678 | 229 | 2,394 | 7.227074 | 0.528384 | 0.019335 | 0.022961 | 0.030211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057589 | 0.223893 | 2,394 | 61 | 203 | 39.245902 | 0.833154 | 0.105681 | 0 | 0 | 0 | 0 | 0.342081 | 0.280694 | 0 | 0 | 0 | 0 | 0.023256 | 1 | 0.069767 | false | 0 | 0.186047 | 0 | 0.418605 | 0.023256 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ab90259acfbeda3412addc434ad2001de65b77a | 5,371 | py | Python | obniz/parts/Moving/StepperMotor/__init__.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 11 | 2019-03-22T12:02:11.000Z | 2021-01-21T04:57:18.000Z | obniz/parts/Moving/StepperMotor/__init__.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 5 | 2019-03-02T08:28:25.000Z | 2021-02-02T22:06:37.000Z | obniz/parts/Moving/StepperMotor/__init__.py | izm51/obniz-python-sdk | 40a738b5fe2c0a415cdc09f46d28c143982bfb07 | [
"MIT"
] | 3 | 2019-07-20T06:55:09.000Z | 2019-12-04T05:05:00.000Z | from attrdict import AttrDefault
import asyncio
class StepperMotor:
def __init__(self):
self.keys = ['a', 'b', 'aa', 'bb', 'common']
self.required_keys = ['a', 'b', 'aa', 'bb']
self._step_instructions = AttrDefault(bool,
{
'1': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1... | 37.559441 | 135 | 0.571216 | 677 | 5,371 | 4.333826 | 0.149188 | 0.018405 | 0.014315 | 0.014997 | 0.470688 | 0.388548 | 0.339809 | 0.339809 | 0.282549 | 0.200409 | 0 | 0.038289 | 0.294917 | 5,371 | 143 | 136 | 37.559441 | 0.736467 | 0 | 0 | 0.209677 | 0 | 0 | 0.021035 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.080645 | false | 0 | 0.016129 | 0.032258 | 0.153226 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4abb8389f46537b21c77c0aa5024c68649d338e4 | 2,241 | py | Python | opennem/utils/scrapyd.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 22 | 2020-06-30T05:27:21.000Z | 2022-02-21T12:13:51.000Z | opennem/utils/scrapyd.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 71 | 2020-08-07T13:06:30.000Z | 2022-03-15T06:44:49.000Z | opennem/utils/scrapyd.py | paulculmsee/opennem | 9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1 | [
"MIT"
] | 13 | 2020-06-30T03:28:32.000Z | 2021-12-30T08:17:16.000Z | #!/usr/bin/env python
"""
Srapyd control methods
"""
import logging
from typing import Any, Dict, List
from urllib.parse import urljoin
from opennem.settings import settings
from opennem.utils.http import http
from opennem.utils.scrapy import get_spiders
logger = logging.getLogger("scrapyd.client")
def get_jobs() ... | 23.103093 | 87 | 0.635431 | 291 | 2,241 | 4.762887 | 0.292096 | 0.018038 | 0.046176 | 0.054113 | 0.239538 | 0.196248 | 0.11544 | 0.11544 | 0.11544 | 0.11544 | 0 | 0 | 0.227577 | 2,241 | 96 | 88 | 23.34375 | 0.800693 | 0.019188 | 0 | 0.237288 | 0 | 0 | 0.135678 | 0.010964 | 0 | 0 | 0 | 0 | 0 | 1 | 0.084746 | false | 0 | 0.101695 | 0 | 0.355932 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4abf6af83131868287dda032df11a21439ed9d49 | 1,164 | py | Python | tutorials/W2D2_LinearSystems/solutions/W2D2_Tutorial1_Solution_437c0b24.py | liuxiaomiao123/NeuroMathAcademy | 16a7969604a300bf9fbb86f8a5b26050ebd14c65 | [
"CC-BY-4.0"
] | 2 | 2020-07-03T04:39:09.000Z | 2020-07-12T02:08:31.000Z | tutorials/W2D2_LinearSystems/solutions/W2D2_Tutorial1_Solution_437c0b24.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2020-06-22T22:57:03.000Z | 2020-06-22T22:57:03.000Z | tutorials/W2D2_LinearSystems/solutions/W2D2_Tutorial1_Solution_437c0b24.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2021-03-29T21:08:26.000Z | 2021-03-29T21:08:26.000Z | def integrate_exponential(a, x0, dt, T):
"""Compute solution of the differential equation xdot=a*x with
initial condition x0 for a duration T. Use time step dt for numerical
solution.
Args:
a (scalar): parameter of xdot (xdot=a*x)
x0 (scalar): initial condition (x at time 0)
dt (scalar): timeste... | 27.714286 | 80 | 0.640893 | 199 | 1,164 | 3.733668 | 0.39196 | 0.026918 | 0.032301 | 0.061911 | 0.069987 | 0.069987 | 0 | 0 | 0 | 0 | 0 | 0.02718 | 0.241409 | 1,164 | 42 | 81 | 27.714286 | 0.81427 | 0.579897 | 0 | 0 | 0 | 0 | 0.019868 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0 | 0 | 0.111111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4abf7b9f84deaebd77faef58a9ebbc8bcdd69360 | 1,199 | py | Python | PyTemp/gis/shapefile_to_geojson.py | SwaggerKhan/PatrolGis | 89b1a398ffd6171ac35ea9d023bce98a0fc7e930 | [
"MIT"
] | null | null | null | PyTemp/gis/shapefile_to_geojson.py | SwaggerKhan/PatrolGis | 89b1a398ffd6171ac35ea9d023bce98a0fc7e930 | [
"MIT"
] | null | null | null | PyTemp/gis/shapefile_to_geojson.py | SwaggerKhan/PatrolGis | 89b1a398ffd6171ac35ea9d023bce98a0fc7e930 | [
"MIT"
] | null | null | null | import json
import geojson
import geopandas as gpd
class SaveToGeoJSON:
__name_counter = 0
def file_name(self):
if self.__name_counter == 0:
self.__name_counter = 1
return "./out"+str(self.__name_counter)+".json"
elif self.__name_counter == 1:
self.__name_co... | 31.552632 | 95 | 0.605505 | 149 | 1,199 | 4.496644 | 0.375839 | 0.131343 | 0.156716 | 0.047761 | 0.092537 | 0.092537 | 0.092537 | 0 | 0 | 0 | 0 | 0.012761 | 0.281068 | 1,199 | 38 | 96 | 31.552632 | 0.764501 | 0 | 0 | 0.064516 | 0 | 0 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.096774 | false | 0 | 0.096774 | 0 | 0.451613 | 0.032258 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ac2c549f6e7bc96012e6af6cdb10885c9451aa4 | 543 | py | Python | torch_geometric/read/ply.py | DL-85/pytorch_geometric | eb12a94a667e881c4a6bff26b0453428bcb72393 | [
"MIT"
] | 2 | 2019-10-10T07:01:07.000Z | 2020-11-04T06:26:42.000Z | torch_geometric/read/ply.py | cloudyyyyy/pytorch_geometric | 61d389b5f8ee700dda4d18cadca72f24c978fce1 | [
"MIT"
] | null | null | null | torch_geometric/read/ply.py | cloudyyyyy/pytorch_geometric | 61d389b5f8ee700dda4d18cadca72f24c978fce1 | [
"MIT"
] | 1 | 2019-10-31T01:15:03.000Z | 2019-10-31T01:15:03.000Z | import torch
from plyfile import PlyData
from torch_geometric.data import Data
def read_ply(path):
with open(path, 'rb') as f:
data = PlyData.read(f)
pos = ([torch.tensor(data['vertex'][axis]) for axis in ['x', 'y', 'z']])
pos = torch.stack(pos, dim=-1)
face = None
if 'face' in data:
... | 23.608696 | 76 | 0.607735 | 81 | 543 | 4.037037 | 0.444444 | 0.04893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004878 | 0.244936 | 543 | 22 | 77 | 24.681818 | 0.792683 | 0 | 0 | 0 | 0 | 0 | 0.060773 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.1875 | 0 | 0.3125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ac4732c076aba6b6bc386af069168643221a2c1 | 2,679 | py | Python | ml-agents/mlagents/trainers/brain_conversion_utils.py | ranguera/ml-agents | 68779b407b32fce2ea14b16ef1bc26dea7d5e5a8 | [
"Apache-2.0"
] | 2 | 2019-12-13T22:00:11.000Z | 2019-12-14T00:47:32.000Z | ml-agents/mlagents/trainers/brain_conversion_utils.py | almartson/ml-agents | ee748705b777ddd365c55065366e83596c615811 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/brain_conversion_utils.py | almartson/ml-agents | ee748705b777ddd365c55065366e83596c615811 | [
"Apache-2.0"
] | null | null | null | from mlagents.trainers.brain import BrainInfo, BrainParameters, CameraResolution
from mlagents.envs.base_env import BatchedStepResult, AgentGroupSpec
from mlagents.envs.exception import UnityEnvironmentException
import numpy as np
from typing import List
def step_result_to_brain_info(
step_result: BatchedStepResu... | 37.732394 | 87 | 0.670773 | 373 | 2,679 | 4.538874 | 0.273458 | 0.076787 | 0.030715 | 0.037212 | 0.222682 | 0.161843 | 0.114589 | 0.090963 | 0.090963 | 0.054341 | 0 | 0.010244 | 0.234789 | 2,679 | 70 | 88 | 38.271429 | 0.81561 | 0 | 0 | 0.090909 | 0 | 0 | 0.050765 | 0.009705 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030303 | false | 0 | 0.075758 | 0 | 0.136364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4ac65a293f32905c196e86dcfb72e76e3b1b85d2 | 853 | py | Python | mrdc_ws/src/mrdc_serial/setup.py | SoonerRobotics/MRDC22 | 00c1360138e468bf313eefc93fbde11f289ece82 | [
"MIT"
] | null | null | null | mrdc_ws/src/mrdc_serial/setup.py | SoonerRobotics/MRDC22 | 00c1360138e468bf313eefc93fbde11f289ece82 | [
"MIT"
] | 1 | 2021-12-01T01:21:22.000Z | 2021-12-01T01:21:22.000Z | mrdc_ws/src/mrdc_serial/setup.py | SoonerRobotics/MRDC22 | 00c1360138e468bf313eefc93fbde11f289ece82 | [
"MIT"
] | 1 | 2021-09-28T23:43:07.000Z | 2021-09-28T23:43:07.000Z | from setuptools import find_packages, setup
from glob import glob
import os
package_name = 'mrdc_serial'
setup(
name=package_name,
version='1.0.0',
packages=find_packages(),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + p... | 28.433333 | 85 | 0.630715 | 96 | 853 | 5.427083 | 0.5 | 0.105566 | 0.06142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004545 | 0.22626 | 853 | 29 | 86 | 29.413793 | 0.784848 | 0 | 0 | 0.074074 | 0 | 0 | 0.357562 | 0.127784 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43493e4caf41318515d94514d68ea22bde6fccc6 | 5,219 | py | Python | PytorchRouting/Examples/run_experiments.py | oleksost/RoutingNetworks | 7e3e9219b7389d5af2a832a4882bc9fda0e7fd21 | [
"Apache-2.0"
] | 63 | 2018-07-19T20:12:55.000Z | 2022-03-31T14:59:37.000Z | PytorchRouting/Examples/run_experiments.py | oleksost/RoutingNetworks | 7e3e9219b7389d5af2a832a4882bc9fda0e7fd21 | [
"Apache-2.0"
] | 2 | 2019-08-08T18:28:13.000Z | 2019-09-24T16:46:22.000Z | PytorchRouting/Examples/run_experiments.py | oleksost/RoutingNetworks | 7e3e9219b7389d5af2a832a4882bc9fda0e7fd21 | [
"Apache-2.0"
] | 16 | 2018-07-25T05:56:51.000Z | 2021-01-09T02:47:05.000Z | """
This file defines some simple experiments to illustrate how Pytorch-Routing functions.
"""
import numpy as np
import tqdm
import torch
from PytorchRouting.DecisionLayers import REINFORCE, QLearning, SARSA, ActorCritic, GumbelSoftmax, PerTaskAssignment, \
WPL, AAC, AdvantageLearning, RELAX, EGreedyREINFORCE, EGr... | 46.185841 | 119 | 0.650699 | 628 | 5,219 | 5.19586 | 0.286624 | 0.055164 | 0.082746 | 0.06068 | 0.415569 | 0.378486 | 0.30616 | 0.267545 | 0.267545 | 0.267545 | 0 | 0.030038 | 0.234528 | 5,219 | 112 | 120 | 46.598214 | 0.786733 | 0.147729 | 0 | 0.158537 | 0 | 0 | 0.078151 | 0.013581 | 0 | 0 | 0 | 0 | 0 | 1 | 0.036585 | false | 0 | 0.073171 | 0 | 0.134146 | 0.02439 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434b79d3907786ef5e26df8cc123133e8b35acdc | 6,670 | py | Python | code/image-manipulation.py | rgeirhos/object-recognition | 4679f7c60665bd9fb274c6c4372fc0fa34b51485 | [
"CC-BY-4.0"
] | 33 | 2017-06-22T21:51:25.000Z | 2021-09-03T01:59:58.000Z | code/image-manipulation.py | rgeirhos/object-recognition | 4679f7c60665bd9fb274c6c4372fc0fa34b51485 | [
"CC-BY-4.0"
] | null | null | null | code/image-manipulation.py | rgeirhos/object-recognition | 4679f7c60665bd9fb274c6c4372fc0fa34b51485 | [
"CC-BY-4.0"
] | 20 | 2017-06-24T01:48:19.000Z | 2021-05-12T08:41:23.000Z | #!/usr/bin/env python
from skimage.color import rgb2gray
from skimage.io import imread, imsave
from scipy.misc import toimage
import numpy as np
import wrapper as wr
###########################################################
# IMAGE IO
###########################################################
def imload_rgb(pa... | 31.913876 | 75 | 0.556822 | 777 | 6,670 | 4.651223 | 0.24453 | 0.07554 | 0.021583 | 0.024903 | 0.247371 | 0.180133 | 0.164638 | 0.164638 | 0.128113 | 0.128113 | 0 | 0.01496 | 0.228336 | 6,670 | 208 | 76 | 32.067308 | 0.687196 | 0.367916 | 0 | 0.060606 | 0 | 0 | 0.090938 | 0.007417 | 0 | 0 | 0 | 0 | 0.045455 | 1 | 0.136364 | false | 0 | 0.075758 | 0 | 0.348485 | 0.015152 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434cb653784b20b7295c5b100050122451d7d139 | 4,855 | py | Python | emmet-core/emmet/core/vasp/calc_types.py | espottesmith/emmet | bd28b91d240da9f0c996a2b2efb7e67da9176a09 | [
"BSD-3-Clause-LBNL"
] | null | null | null | emmet-core/emmet/core/vasp/calc_types.py | espottesmith/emmet | bd28b91d240da9f0c996a2b2efb7e67da9176a09 | [
"BSD-3-Clause-LBNL"
] | 78 | 2020-11-16T06:46:43.000Z | 2022-03-28T03:02:51.000Z | emmet-core/emmet/core/vasp/calc_types.py | utf/emmet | 27a51a7ad4c300e280de5ba9b59a311dd77cffdd | [
"BSD-3-Clause-LBNL"
] | null | null | null | """ Module to define various calculation types as Enums for VASP """
import datetime
from itertools import groupby, product
from pathlib import Path
from typing import Dict, Iterator, List
import bson
import numpy as np
from monty.json import MSONable
from monty.serialization import loadfn
from pydantic import BaseMod... | 28.391813 | 98 | 0.618332 | 600 | 4,855 | 4.836667 | 0.296667 | 0.038594 | 0.048243 | 0.022398 | 0.230875 | 0.215713 | 0.206065 | 0.206065 | 0.171606 | 0.091661 | 0 | 0.007198 | 0.256025 | 4,855 | 170 | 99 | 28.558824 | 0.796235 | 0.132441 | 0 | 0.077586 | 0 | 0.008621 | 0.173086 | 0.021453 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034483 | false | 0 | 0.12069 | 0 | 0.206897 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434df89c1b80cf68699882387250cf1a06bd4617 | 4,165 | py | Python | models/train_classifier.py | YiWang-Evonne/disaster_response | 824f646920ac85a01419101e17e92f592a505782 | [
"MIT"
] | null | null | null | models/train_classifier.py | YiWang-Evonne/disaster_response | 824f646920ac85a01419101e17e92f592a505782 | [
"MIT"
] | null | null | null | models/train_classifier.py | YiWang-Evonne/disaster_response | 824f646920ac85a01419101e17e92f592a505782 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
from sqlalchemy import create_engine
import nltk
nltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])
import re
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.metrics import classification_report
from sklearn.metrics import confus... | 30.181159 | 96 | 0.657143 | 511 | 4,165 | 5.162427 | 0.34638 | 0.033359 | 0.006823 | 0.018196 | 0.058378 | 0.017437 | 0 | 0 | 0 | 0 | 0 | 0.006213 | 0.227131 | 4,165 | 138 | 97 | 30.181159 | 0.813296 | 0.12605 | 0 | 0 | 0 | 0.0125 | 0.175208 | 0.037504 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0875 | false | 0 | 0.2 | 0 | 0.3375 | 0.1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434e8c387b837394ff0f03da5e59c67d77ad7f7c | 7,456 | py | Python | experimental/attentive_uncertainty/toy_regression/datasets.py | miksu/edward2 | 973acdb23701f320ebaee8a56fc44d4414acfa4e | [
"Apache-2.0"
] | null | null | null | experimental/attentive_uncertainty/toy_regression/datasets.py | miksu/edward2 | 973acdb23701f320ebaee8a56fc44d4414acfa4e | [
"Apache-2.0"
] | null | null | null | experimental/attentive_uncertainty/toy_regression/datasets.py | miksu/edward2 | 973acdb23701f320ebaee8a56fc44d4414acfa4e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Edward2 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... | 37.467337 | 80 | 0.666309 | 1,062 | 7,456 | 4.428437 | 0.245763 | 0.039124 | 0.068467 | 0.034446 | 0.233893 | 0.143525 | 0.088454 | 0.073783 | 0.065703 | 0.015735 | 0 | 0.016679 | 0.244099 | 7,456 | 198 | 81 | 37.656566 | 0.817779 | 0.450644 | 0 | 0.056818 | 0 | 0 | 0.01463 | 0.005903 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034091 | false | 0 | 0.068182 | 0 | 0.136364 | 0.011364 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434ee97c218201d658ac3ee9f3df8bd8d8383c79 | 1,287 | py | Python | critiquebrainz/frontend/views/index.py | shagun6/critiquebrainz | b7ae41fb09ff4dd4e34847b294fbee4ccc76bad5 | [
"Apache-2.0"
] | null | null | null | critiquebrainz/frontend/views/index.py | shagun6/critiquebrainz | b7ae41fb09ff4dd4e34847b294fbee4ccc76bad5 | [
"Apache-2.0"
] | null | null | null | critiquebrainz/frontend/views/index.py | shagun6/critiquebrainz | b7ae41fb09ff4dd4e34847b294fbee4ccc76bad5 | [
"Apache-2.0"
] | 1 | 2019-10-20T05:48:53.000Z | 2019-10-20T05:48:53.000Z | from flask import Blueprint, render_template
from flask_babel import format_number
import critiquebrainz.db.users as db_users
import critiquebrainz.db.review as db_review
from bs4 import BeautifulSoup
from markdown import markdown
DEFAULT_CACHE_EXPIRATION = 10 * 60 # seconds
frontend_bp = Blueprint('frontend', __nam... | 31.390244 | 110 | 0.740482 | 163 | 1,287 | 5.576687 | 0.380368 | 0.044004 | 0.049505 | 0.082508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006446 | 0.156177 | 1,287 | 40 | 111 | 32.175 | 0.830571 | 0.059052 | 0 | 0 | 0 | 0 | 0.094606 | 0.017427 | 0 | 0 | 0 | 0 | 0 | 1 | 0.12 | false | 0 | 0.24 | 0.08 | 0.48 | 0.08 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434fad48264cdf3b340402e86c40cd6b6db05bc8 | 2,406 | py | Python | Enigma/Enigma-master/GBS/gbsHelper.py | Q-Alpha/Hackathon2020 | c0ed45b4c1cc4f475f83786e641b859dad94f863 | [
"MIT"
] | 12 | 2020-07-23T17:11:22.000Z | 2022-02-03T12:44:56.000Z | Enigma/Enigma-master/GBS/gbsHelper.py | Q-Alpha/Hackathon2020 | c0ed45b4c1cc4f475f83786e641b859dad94f863 | [
"MIT"
] | 1 | 2020-07-28T13:35:51.000Z | 2020-07-28T13:35:51.000Z | Enigma/Enigma-master/GBS/gbsHelper.py | Q-Alpha/Hackathon2020 | c0ed45b4c1cc4f475f83786e641b859dad94f863 | [
"MIT"
] | 25 | 2020-07-22T14:32:17.000Z | 2021-09-08T11:43:55.000Z | import strawberryfields as sf
from strawberryfields import ops
from strawberryfields.utils import random_interferometer
from strawberryfields.apps import data, sample, subgraph, plot
import plotly
import networkx as nx
import numpy as np
class GBS:
def __init__(self, samples =[], min_pho = 16, max_pho = 30, subgra... | 34.869565 | 101 | 0.554032 | 365 | 2,406 | 3.528767 | 0.29863 | 0.02795 | 0.016304 | 0.025621 | 0.13354 | 0.052795 | 0.052795 | 0 | 0 | 0 | 0 | 0.05622 | 0.305071 | 2,406 | 68 | 102 | 35.382353 | 0.714115 | 0.082294 | 0 | 0 | 0 | 0 | 0.004543 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.134615 | 0 | 0.288462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434fcaaddceb714a13ca57fae4621f94efbd1d3d | 10,781 | py | Python | happy/HappyNodeJoin.py | jenniexie/happy | 6ba01586e20bb3e4f92e180fd8dce3752519f7c9 | [
"Apache-2.0"
] | null | null | null | happy/HappyNodeJoin.py | jenniexie/happy | 6ba01586e20bb3e4f92e180fd8dce3752519f7c9 | [
"Apache-2.0"
] | null | null | null | happy/HappyNodeJoin.py | jenniexie/happy | 6ba01586e20bb3e4f92e180fd8dce3752519f7c9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015-2017 Nest Labs, 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/licen... | 35.463816 | 102 | 0.626472 | 1,384 | 10,781 | 4.666185 | 0.195087 | 0.04088 | 0.037163 | 0.022143 | 0.324094 | 0.227005 | 0.177454 | 0.111799 | 0.078043 | 0.065655 | 0 | 0.014068 | 0.274743 | 10,781 | 303 | 103 | 35.580858 | 0.811869 | 0.228457 | 0 | 0.180233 | 0 | 0 | 0.096893 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.093023 | false | 0 | 0.063953 | 0.011628 | 0.186047 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
434feac939e1b8979a11ce2e5fb237601f1fd855 | 46,866 | py | Python | __init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | __init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | __init__.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Modules to support data reduction in Python.
The main purpose of the base module ``Data_Reduction`` is to provide a
suplerclass with a good set of attributes and methods to cover all common needs.
The base module is also able to read data from a text file as a ``numpy``
structured array. ... | 35.370566 | 91 | 0.615307 | 6,185 | 46,866 | 4.582215 | 0.147615 | 0.021453 | 0.015349 | 0.006986 | 0.167672 | 0.118239 | 0.09181 | 0.077661 | 0.047281 | 0.035073 | 0 | 0.016119 | 0.275914 | 46,866 | 1,324 | 92 | 35.397281 | 0.819036 | 0.431912 | 0 | 0.195688 | 0 | 0 | 0.118994 | 0.011487 | 0 | 0 | 0 | 0 | 0 | 1 | 0.056385 | false | 0.019901 | 0.031509 | 0 | 0.139303 | 0.018242 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435242d1a3384ab078fa9b2a0a84286b9581b8f8 | 8,483 | py | Python | Context_Guided_RelRep/train.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | 1 | 2019-10-06T03:54:53.000Z | 2019-10-06T03:54:53.000Z | Context_Guided_RelRep/train.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | null | null | null | Context_Guided_RelRep/train.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from wordreps import WordReps
from algebra import cosine, normalize
import tensorflow as tf
import random
from dataset import DataSet
import CGRE_Model
from Eval import eval_SemEval
import sklearn.preprocessing
# ============ End Imports ============
class Training():
def __init__(self):
# Compo... | 37.870536 | 150 | 0.707651 | 1,352 | 8,483 | 4.190828 | 0.191568 | 0.057183 | 0.039005 | 0.039534 | 0.283975 | 0.249735 | 0.240205 | 0.195376 | 0.129721 | 0.104659 | 0 | 0.021547 | 0.11918 | 8,483 | 223 | 151 | 38.040359 | 0.736751 | 0.196393 | 0 | 0.012422 | 0 | 0.006211 | 0.099388 | 0.027011 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043478 | false | 0 | 0.055901 | 0 | 0.124224 | 0.049689 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43525bbf3ff2f6151c746e2a0599b8ee3f2bbfcc | 1,071 | py | Python | synch_integrate.py | HerculesJack/grtrans | bc005307d81dac1bdb9520e776e7627126dd690a | [
"MIT"
] | 25 | 2016-02-11T01:52:14.000Z | 2021-06-16T02:15:42.000Z | synch_integrate.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-11-10T15:25:20.000Z | 2018-01-18T15:15:57.000Z | synch_integrate.py | RAnantua/grtrans | a0353a8516335412b27fe4866eabafcfc0fe498f | [
"MIT"
] | 6 | 2016-02-11T14:13:01.000Z | 2022-03-10T01:56:02.000Z | from radtrans_integrate import radtrans_integrate
from polsynchemis import polsynchemis
import numpy as np
import scipy.integrate
# calculate synchrotron emissivity for given coefficients
def synch_jarho(nu,n,B,T,theta):
if ((np.isscalar(nu)==False) & (np.isscalar(n)==True)):
n = n + np.zeros(len(nu))
... | 36.931034 | 109 | 0.659197 | 171 | 1,071 | 4.040936 | 0.391813 | 0.196816 | 0.057887 | 0.069465 | 0.028944 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033822 | 0.171802 | 1,071 | 28 | 110 | 38.25 | 0.745209 | 0.051354 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.08 | false | 0 | 0.16 | 0 | 0.32 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435728a0cb21ad40d2d8c25c033f2746e09d0952 | 4,239 | py | Python | apps/dash-port-analytics/app/ui/tab_map_controls.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 2,332 | 2019-05-10T18:24:20.000Z | 2022-03-30T21:46:29.000Z | apps/dash-port-analytics/app/ui/tab_map_controls.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 384 | 2019-05-09T19:19:56.000Z | 2022-03-12T00:58:24.000Z | apps/dash-port-analytics/app/ui/tab_map_controls.py | JeroenvdSande/dash-sample-apps | 106fa24693cfdaf47c06466a0aed78e642344f91 | [
"MIT"
] | 3,127 | 2019-05-16T17:20:45.000Z | 2022-03-31T17:59:07.000Z | import dash_core_components as dcc
import dash_html_components as html
from config import strings
def make_tab_port_map_controls(
port_arr: list,
port_val: str,
vessel_types_arr: list,
vessel_type_val: str,
year_arr: list,
year_val: int,
month_arr: list,
month_val: int,
) -> html.Div:
... | 38.889908 | 88 | 0.420854 | 359 | 4,239 | 4.844011 | 0.18663 | 0.056354 | 0.057504 | 0.098332 | 0.46406 | 0.46406 | 0.384704 | 0.384704 | 0.384704 | 0.317999 | 0 | 0 | 0.493041 | 4,239 | 108 | 89 | 39.25 | 0.809214 | 0.105685 | 0 | 0.55914 | 0 | 0 | 0.15325 | 0.113132 | 0 | 0 | 0 | 0 | 0 | 1 | 0.010753 | false | 0 | 0.032258 | 0 | 0.053763 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435a70dd7b6f4dda69b0f2a7703c3f754714213d | 22,429 | py | Python | graphql_compiler/compiler/workarounds/orientdb_query_execution.py | 0xflotus/graphql-compiler | 0c892f5254d0cf3d03a68012080d0b736bc49913 | [
"Apache-2.0"
] | null | null | null | graphql_compiler/compiler/workarounds/orientdb_query_execution.py | 0xflotus/graphql-compiler | 0c892f5254d0cf3d03a68012080d0b736bc49913 | [
"Apache-2.0"
] | 1 | 2019-04-18T18:23:16.000Z | 2019-04-18T18:23:16.000Z | graphql_compiler/compiler/workarounds/orientdb_query_execution.py | 0xflotus/graphql-compiler | 0c892f5254d0cf3d03a68012080d0b736bc49913 | [
"Apache-2.0"
] | 1 | 2019-11-21T02:38:27.000Z | 2019-11-21T02:38:27.000Z | # Copyright 2018-present Kensho Technologies, LLC.
"""Workarounds for OrientDB scheduler issue that causes poor query planning for certain queries.
For purposes of query planning, the OrientDB query planner ignores "where:" clauses
that hit indexes but do not use the "=" operator. For example, "CONTAINS" can be used t... | 58.257143 | 100 | 0.664452 | 2,854 | 22,429 | 5.033987 | 0.160827 | 0.035707 | 0.037029 | 0.013782 | 0.361453 | 0.316002 | 0.262616 | 0.214311 | 0.171574 | 0.162595 | 0 | 0.001066 | 0.289045 | 22,429 | 384 | 101 | 58.408854 | 0.899912 | 0.456418 | 0 | 0.36612 | 0 | 0 | 0.05754 | 0 | 0 | 0 | 0 | 0.005208 | 0.060109 | 1 | 0.043716 | false | 0.016393 | 0.021858 | 0 | 0.10929 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435b03494c0e0f08adce48e2055f1eb32e5446ba | 3,763 | py | Python | traffic_light/core.py | ofalk/cleware-traffic-light | be319fec8e190811463ade8aabc37ca2b4f17e57 | [
"MIT"
] | null | null | null | traffic_light/core.py | ofalk/cleware-traffic-light | be319fec8e190811463ade8aabc37ca2b4f17e57 | [
"MIT"
] | null | null | null | traffic_light/core.py | ofalk/cleware-traffic-light | be319fec8e190811463ade8aabc37ca2b4f17e57 | [
"MIT"
] | null | null | null | from enum import IntEnum
import functools
import usb.core
import usb.util
from traffic_light.error import TrafficLightError, MultipleTrafficLightsError
BM_REQUEST_TYPE = 0x21
B_REQUEST = 0x09
W_VALUE = 0x200
W_INDEX = 0x00
ID_VENDOR = 0x0d50
ID_PRODUCT = 0x0008
INTERFACE = 0
class Color(IntEnum):
RED = 0x10
... | 32.439655 | 122 | 0.60962 | 435 | 3,763 | 5.147126 | 0.358621 | 0.03573 | 0.014739 | 0.033497 | 0.103618 | 0.084859 | 0.032157 | 0 | 0 | 0 | 0 | 0.017557 | 0.303747 | 3,763 | 115 | 123 | 32.721739 | 0.837023 | 0.155195 | 0 | 0.154762 | 0 | 0 | 0.09041 | 0 | 0 | 0 | 0.016468 | 0 | 0 | 1 | 0.107143 | false | 0 | 0.059524 | 0 | 0.321429 | 0.035714 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435b7f5d139890173dc2cf9019b51215cc554d6e | 3,646 | py | Python | sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""
FILE: sample_analyze_orchestration_app_luis_response_async.py
DESCRIPTION:
This sample demonstrates how to analyze user query using an orchestra... | 39.630435 | 106 | 0.637685 | 372 | 3,646 | 6 | 0.36828 | 0.048387 | 0.061828 | 0.072581 | 0.228943 | 0.167563 | 0.084229 | 0.043011 | 0 | 0 | 0 | 0.002911 | 0.246297 | 3,646 | 92 | 107 | 39.630435 | 0.809316 | 0.328305 | 0 | 0 | 0 | 0 | 0.259564 | 0.055944 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.078431 | 0 | 0.078431 | 0.176471 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
435f04515eafc16cb9b3781591916aadd65a8bd3 | 2,499 | py | Python | intro/deploy.py | terziev-viktor/SolidityCourse | 6f10852e94eec69438c5e577795d317694227337 | [
"MIT"
] | null | null | null | intro/deploy.py | terziev-viktor/SolidityCourse | 6f10852e94eec69438c5e577795d317694227337 | [
"MIT"
] | null | null | null | intro/deploy.py | terziev-viktor/SolidityCourse | 6f10852e94eec69438c5e577795d317694227337 | [
"MIT"
] | null | null | null | import json
from web3 import Web3
from solcx import compile_standard, install_solc
with open("./SimpleStorage.sol", "r") as file:
simple_storage_src = file.read()
# install solcx
install_solc("0.8.0")
# compile the source
compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": ... | 31.2375 | 147 | 0.708283 | 293 | 2,499 | 5.832765 | 0.368601 | 0.032183 | 0.018724 | 0.038619 | 0.250439 | 0.218841 | 0.129901 | 0.0866 | 0.0866 | 0.0866 | 0 | 0.045933 | 0.163665 | 2,499 | 79 | 148 | 31.632911 | 0.77177 | 0.109244 | 0 | 0 | 0 | 0 | 0.198825 | 0.058292 | 0 | 0 | 0.048803 | 0 | 0 | 1 | 0 | false | 0 | 0.058824 | 0 | 0.058824 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4361a9278aa18283e07b14ec0d517fca7051b980 | 9,550 | py | Python | info_popup.py | cartazio/SublimeHaskell | e6f12ea69de939d12212a6ec594bf0aae0603f6d | [
"MIT"
] | 2 | 2021-07-07T16:41:48.000Z | 2021-11-17T11:08:50.000Z | info_popup.py | cartazio/SublimeHaskell | e6f12ea69de939d12212a6ec594bf0aae0603f6d | [
"MIT"
] | null | null | null | info_popup.py | cartazio/SublimeHaskell | e6f12ea69de939d12212a6ec594bf0aae0603f6d | [
"MIT"
] | null | null | null | import urllib.parse
import webbrowser
import json
from xml.etree import ElementTree
import sublime
import SublimeHaskell.sublime_haskell_common as Common
import SublimeHaskell.internals.utils as Utils
import SublimeHaskell.internals.unicode_opers as UnicodeOpers
import SublimeHaskell.symbols as symbols
import Sublim... | 42.070485 | 126 | 0.566387 | 1,087 | 9,550 | 4.789328 | 0.23827 | 0.030734 | 0.006915 | 0.00922 | 0.145601 | 0.119093 | 0.078371 | 0.062236 | 0.062236 | 0.062236 | 0 | 0.006048 | 0.324817 | 9,550 | 226 | 127 | 42.256637 | 0.801334 | 0.093717 | 0 | 0.136095 | 0 | 0 | 0.07837 | 0.024846 | 0 | 0 | 0 | 0.004425 | 0 | 1 | 0.065089 | false | 0.011834 | 0.118343 | 0 | 0.236686 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4361a9d08c25b0f208bbec15d3be738264785d14 | 4,126 | py | Python | modules/google_home_lights.py | artizanatweb/ghome-assistant | dba2bc58979ebae48afc71c356ae2d40b8830eee | [
"Apache-2.0"
] | null | null | null | modules/google_home_lights.py | artizanatweb/ghome-assistant | dba2bc58979ebae48afc71c356ae2d40b8830eee | [
"Apache-2.0"
] | null | null | null | modules/google_home_lights.py | artizanatweb/ghome-assistant | dba2bc58979ebae48afc71c356ae2d40b8830eee | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2017 Seeed Technology Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 24.128655 | 74 | 0.542414 | 547 | 4,126 | 4.025594 | 0.261426 | 0.061308 | 0.045413 | 0.029973 | 0.311989 | 0.266122 | 0.231608 | 0.21753 | 0.144414 | 0.144414 | 0 | 0.042773 | 0.342705 | 4,126 | 171 | 75 | 24.128655 | 0.769174 | 0.145904 | 0 | 0.347826 | 0 | 0 | 0.003704 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.121739 | false | 0 | 0.06087 | 0 | 0.191304 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43626cff0461fc1edbacac7b7a76a2f308ada971 | 5,016 | py | Python | tensortools/optimize/mncp_hals.py | klmcguir/tensortools | 38262f5bad9d3171286e34e5f15d196752dda939 | [
"MIT"
] | null | null | null | tensortools/optimize/mncp_hals.py | klmcguir/tensortools | 38262f5bad9d3171286e34e5f15d196752dda939 | [
"MIT"
] | null | null | null | tensortools/optimize/mncp_hals.py | klmcguir/tensortools | 38262f5bad9d3171286e34e5f15d196752dda939 | [
"MIT"
] | null | null | null | """
Nonnegative CP decomposition by Hierarchical alternating least squares (HALS).
With support for missing data.
"""
import numpy as np
import scipy as sci
from scipy import linalg
from tensortools.operations import unfold, khatri_rao
from tensortools.tensors import KTensor
from tensortools.optimize import FitResult... | 40.780488 | 94 | 0.60626 | 617 | 5,016 | 4.860616 | 0.388979 | 0.035012 | 0.023008 | 0.024008 | 0.132044 | 0.086029 | 0.058686 | 0 | 0 | 0 | 0 | 0.007922 | 0.245016 | 5,016 | 123 | 95 | 40.780488 | 0.783998 | 0.692185 | 0 | 0 | 0 | 0 | 0.009174 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.269231 | 0 | 0.346154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4363164b554bb6ade5f87250305647778400993f | 18,079 | py | Python | raredecay/tools/data_tools.py | jonas-eschle/raredecay | 6285f91e0819d01c80125f50b24e60ee5353ae2e | [
"Apache-2.0"
] | 7 | 2016-11-19T17:28:07.000Z | 2020-12-29T19:49:37.000Z | raredecay/tools/data_tools.py | mayou36/raredecay | 5b319ada66ebe54f81e216efad81fc9f06237a30 | [
"Apache-2.0"
] | 23 | 2017-03-13T19:13:58.000Z | 2021-05-30T21:48:50.000Z | raredecay/tools/data_tools.py | jonas-eschle/raredecay | 6285f91e0819d01c80125f50b24e60ee5353ae2e | [
"Apache-2.0"
] | 5 | 2016-12-17T19:24:13.000Z | 2021-05-31T14:32:34.000Z | """
@author: Jonas Eschle "Mayou36"
DEPRECEATED! USE OTHER MODULES LIKE rd.data, rd.ml, rd.reweight, rd.score and rd.stat
DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED!
Contains several tools to convert, load, save and plot data
"""
import warnings
import os
import copy
import pandas as pd
import... | 34.969052 | 117 | 0.636872 | 2,497 | 18,079 | 4.429315 | 0.161394 | 0.053707 | 0.014919 | 0.015913 | 0.242767 | 0.194846 | 0.165371 | 0.149458 | 0.142224 | 0.135895 | 0 | 0.004557 | 0.271752 | 18,079 | 516 | 118 | 35.036822 | 0.835485 | 0.44571 | 0 | 0.230415 | 0 | 0 | 0.037895 | 0 | 0 | 0 | 0 | 0.005814 | 0.013825 | 1 | 0.069124 | false | 0.009217 | 0.059908 | 0 | 0.21659 | 0.004608 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4363297eb771b020c864cdfbc69be70aff1727b6 | 2,052 | py | Python | toontown/coghq/boardbothq/BoardOfficeManagerAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2018-06-16T23:06:38.000Z | 2018-06-16T23:06:38.000Z | toontown/coghq/boardbothq/BoardOfficeManagerAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/boardbothq/BoardOfficeManagerAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
import DistributedBoardOfficeAI
from toontown.toonbase import ToontownGlobals
from toontown.coghq.boardbothq import BoardOfficeLayout
from direct.showbase import DirectObject
import random
class BoardOfficeManagerAI(DirectObject.DirectObject):
notify = DirectNotif... | 41.04 | 141 | 0.639376 | 187 | 2,052 | 6.973262 | 0.358289 | 0.023006 | 0.020706 | 0.03681 | 0.11273 | 0.062117 | 0.062117 | 0 | 0 | 0 | 0 | 0.002714 | 0.281676 | 2,052 | 49 | 142 | 41.877551 | 0.881954 | 0 | 0 | 0.119048 | 0 | 0 | 0.070175 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.166667 | 0.02381 | 0.357143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436393af32e8421a7a3401c8eb82314850e79873 | 2,144 | py | Python | ansiblemetrics/utils.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | 1 | 2020-04-24T16:09:14.000Z | 2020-04-24T16:09:14.000Z | ansiblemetrics/utils.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | ansiblemetrics/utils.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | from typing import Union
def key_value_list(d: Union[dict, list], key=None) -> list:
"""
This function iterates over all the key-value pairs of a dictionary and returns a list of tuple (key, value) where the key contain only primitive value (i.e., no list or dict), e.g., string, number etc.
d -- a diction... | 25.831325 | 206 | 0.564366 | 301 | 2,144 | 3.950166 | 0.199336 | 0.083263 | 0.070648 | 0.035324 | 0.541632 | 0.541632 | 0.518923 | 0.471825 | 0.392767 | 0.335576 | 0 | 0 | 0.333022 | 2,144 | 82 | 207 | 26.146341 | 0.831469 | 0.215951 | 0 | 0.470588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.019608 | 0 | 0.254902 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4364ccde24cc2af35ff42479b35b005f175a3209 | 24,502 | py | Python | phy/gui/actions.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 118 | 2019-06-03T06:19:43.000Z | 2022-03-25T00:05:26.000Z | phy/gui/actions.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 761 | 2015-01-08T11:17:41.000Z | 2019-05-27T16:12:08.000Z | phy/gui/actions.py | ycanerol/phy | 7a247f926dd5bf5d8ab95fe138e8f4a0db11b068 | [
"BSD-3-Clause"
] | 70 | 2019-05-30T11:05:26.000Z | 2022-03-30T11:51:23.000Z | # -*- coding: utf-8 -*-
"""Actions and snippets."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import inspect
from functools import partial, wraps
import logging
import re
import sys
import... | 35.305476 | 99 | 0.587952 | 2,938 | 24,502 | 4.792716 | 0.141253 | 0.022655 | 0.01811 | 0.009445 | 0.212201 | 0.128116 | 0.111356 | 0.088346 | 0.081812 | 0.056956 | 0 | 0.002845 | 0.282793 | 24,502 | 693 | 100 | 35.356421 | 0.798441 | 0.324218 | 0 | 0.198939 | 0 | 0 | 0.064941 | 0.003771 | 0 | 0 | 0 | 0 | 0.02122 | 1 | 0.106101 | false | 0.007958 | 0.02122 | 0.002653 | 0.249337 | 0.023873 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436637ae94348f41cc38697c102e03126553cd4f | 807 | py | Python | PP4E-Examples-1.4/Examples/PP4E/Tools/cleanpyc.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | PP4E-Examples-1.4/Examples/PP4E/Tools/cleanpyc.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | PP4E-Examples-1.4/Examples/PP4E/Tools/cleanpyc.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | """
delete all .pyc bytecode files in a directory tree: use the
command line arg as root if given, else current working dir
"""
import os, sys
findonly = False
rootdir = os.getcwd() if len(sys.argv) == 1 else sys.argv[1]
found = removed = 0
for (thisDirLevel, subsHere, filesHere) in os.walk(rootdir):
for filename... | 31.038462 | 65 | 0.553903 | 96 | 807 | 4.645833 | 0.59375 | 0.03139 | 0.035874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012915 | 0.328377 | 807 | 25 | 66 | 32.28 | 0.809963 | 0.14746 | 0 | 0 | 0 | 0 | 0.048529 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.055556 | 0 | 0.055556 | 0.166667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43670f7c99a2ebd5fc17181669e6be4597ca4939 | 25,401 | py | Python | apps/controllerx/cx_core/type/light_controller.py | clach04/controllerx | b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe | [
"MIT"
] | null | null | null | apps/controllerx/cx_core/type/light_controller.py | clach04/controllerx | b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe | [
"MIT"
] | null | null | null | apps/controllerx/cx_core/type/light_controller.py | clach04/controllerx | b5cd92d3371c352c50f7d5ba7dae4538d7c15dfe | [
"MIT"
] | null | null | null | from typing import Any, Dict, Optional, Type, Union
from cx_const import Light, PredefinedActionsMapping
from cx_core.color_helper import get_color_wheel
from cx_core.controller import action
from cx_core.feature_support.light import LightSupport
from cx_core.integration import EventData
from cx_core.integration.decon... | 37.686944 | 117 | 0.565332 | 2,526 | 25,401 | 5.4327 | 0.112035 | 0.101436 | 0.046491 | 0.036071 | 0.478102 | 0.37193 | 0.28077 | 0.213364 | 0.174525 | 0.163521 | 0 | 0.004411 | 0.357427 | 25,401 | 673 | 118 | 37.742942 | 0.836233 | 0.074761 | 0 | 0.470389 | 0 | 0 | 0.054828 | 0.008555 | 0 | 0 | 0 | 0 | 0 | 1 | 0.00846 | false | 0 | 0.021997 | 0.005076 | 0.093063 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436a1ebb3d99a1475a443393df66a840b227b6bf | 4,916 | py | Python | src/command_modules/azure-cli-security/azure/cli/command_modules/security/_params.py | jfcoz/azure-cli | 8459ef3fd3c76d9f99defd95d4c980923891fa6d | [
"MIT"
] | 1 | 2019-10-01T10:29:15.000Z | 2019-10-01T10:29:15.000Z | src/command_modules/azure-cli-security/azure/cli/command_modules/security/_params.py | jfcoz/azure-cli | 8459ef3fd3c76d9f99defd95d4c980923891fa6d | [
"MIT"
] | 3 | 2019-07-12T22:10:38.000Z | 2019-07-12T22:10:49.000Z | src/command_modules/azure-cli-security/azure/cli/command_modules/security/_params.py | jfcoz/azure-cli | 8459ef3fd3c76d9f99defd95d4c980923891fa6d | [
"MIT"
] | 1 | 2019-06-21T05:08:09.000Z | 2019-06-21T05:08:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 47.728155 | 198 | 0.621237 | 516 | 4,916 | 5.666667 | 0.24031 | 0.076607 | 0.082763 | 0.109097 | 0.392955 | 0.198358 | 0.147743 | 0.147743 | 0.121067 | 0.121067 | 0 | 0 | 0.240236 | 4,916 | 102 | 199 | 48.196078 | 0.782865 | 0.086859 | 0 | 0.246753 | 0 | 0 | 0.267753 | 0.027914 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012987 | false | 0 | 0.038961 | 0 | 0.051948 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436a53c20b8a7b3181b33290aeb94d9c5458f945 | 1,558 | py | Python | tests/models/test_transformers.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 8 | 2021-10-12T05:39:20.000Z | 2022-03-31T10:55:01.000Z | tests/models/test_transformers.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 1 | 2022-03-30T19:23:42.000Z | 2022-03-30T19:23:42.000Z | tests/models/test_transformers.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 5 | 2021-11-17T07:38:28.000Z | 2022-01-31T10:46:36.000Z | import unittest
import torch
from parameterized import parameterized
from src.constructor import create_backbone
from src.models.backbones.utils import list_models
from .test_segmentation import example_backbones
def inp(bsize, in_ch, w, h):
return torch.ones(bsize, in_ch, w, h)
class TestBackboneCorrectness(... | 38.95 | 99 | 0.717587 | 205 | 1,558 | 5.24878 | 0.331707 | 0.066915 | 0.064126 | 0.080855 | 0.604089 | 0.469331 | 0.469331 | 0.469331 | 0.438662 | 0.438662 | 0 | 0.003837 | 0.163671 | 1,558 | 39 | 100 | 39.948718 | 0.821949 | 0 | 0 | 0.333333 | 0 | 0 | 0.030167 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.2 | 0.033333 | 0.433333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436d01399c03b77d98f4cf23e9025181a7999308 | 3,767 | py | Python | app/app.py | shaswat01/Disaster_Response_ETL | c441514fb5231d193cd4b29afad00fe0f3513562 | [
"MIT"
] | null | null | null | app/app.py | shaswat01/Disaster_Response_ETL | c441514fb5231d193cd4b29afad00fe0f3513562 | [
"MIT"
] | null | null | null | app/app.py | shaswat01/Disaster_Response_ETL | c441514fb5231d193cd4b29afad00fe0f3513562 | [
"MIT"
] | null | null | null | import nltk
import json
import plotly
import pandas as pd
import plotly.graph_objects as go
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize
nltk.download(['punkt','wordnet'])
from flask import Flask
from flask import render_template, request, jsonify
from plotly.graph_objs import Bar, H... | 25.281879 | 131 | 0.528537 | 386 | 3,767 | 5.056995 | 0.411917 | 0.020492 | 0.012295 | 0.025615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007383 | 0.352801 | 3,767 | 148 | 132 | 25.452703 | 0.793273 | 0.120255 | 0 | 0.174757 | 0 | 0 | 0.137094 | 0.010312 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038835 | false | 0 | 0.116505 | 0 | 0.184466 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436d1a37515679503cc50623874a3539d00946be | 4,659 | py | Python | tools/mo/openvino/tools/mo/front/mxnet/mx_reshape_reverse.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 1 | 2019-09-22T01:05:07.000Z | 2019-09-22T01:05:07.000Z | tools/mo/openvino/tools/mo/front/mxnet/mx_reshape_reverse.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 58 | 2020-11-06T12:13:45.000Z | 2022-03-28T13:20:11.000Z | tools/mo/openvino/tools/mo/front/mxnet/mx_reshape_reverse.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 2 | 2019-09-20T01:33:37.000Z | 2019-09-20T08:42:11.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from openvino.tools.mo.front.mxnet.mx_reshape_to_reshape import MXReshapeToReshape
from openvino.tools.mo.ops.Reverse import Reverse
from openvino.tools.mo.ops.mxreshape import MXReshape
from openvino.tools.mo.front.c... | 59.730769 | 127 | 0.69457 | 598 | 4,659 | 5.137124 | 0.192308 | 0.042318 | 0.042318 | 0.046875 | 0.593099 | 0.484701 | 0.37207 | 0.257813 | 0.166667 | 0.152344 | 0 | 0.017483 | 0.201975 | 4,659 | 77 | 128 | 60.506494 | 0.808768 | 0.087787 | 0 | 0 | 0 | 0 | 0.040986 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037037 | false | 0 | 0.222222 | 0.018519 | 0.351852 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
436dafbd787a4e7854f10318324bcf64277e6432 | 6,480 | py | Python | Python/Simulation/Numerical_Methods/test_cubic_spline_solve.py | MattMarti/Lambda-Trajectory-Sim | 4155f103120bd49221776cc3b825b104f36817f2 | [
"MIT"
] | null | null | null | Python/Simulation/Numerical_Methods/test_cubic_spline_solve.py | MattMarti/Lambda-Trajectory-Sim | 4155f103120bd49221776cc3b825b104f36817f2 | [
"MIT"
] | null | null | null | Python/Simulation/Numerical_Methods/test_cubic_spline_solve.py | MattMarti/Lambda-Trajectory-Sim | 4155f103120bd49221776cc3b825b104f36817f2 | [
"MIT"
] | null | null | null | import unittest;
import numpy as np;
import scipy as sp;
from cubic_spline_solve import cubic_spline_solve;
from cubic_spline_fun import cubic_spline_fun;
class Test_cubic_spline_solve(unittest.TestCase):
'''
Test_cubicsplineSolve
Test case for the cubic spline solver function. This function just solv... | 37.241379 | 78 | 0.564352 | 795 | 6,480 | 4.525786 | 0.197484 | 0.073374 | 0.080044 | 0.100056 | 0.651473 | 0.629516 | 0.61284 | 0.611451 | 0.444692 | 0.423013 | 0 | 0.036954 | 0.310957 | 6,480 | 174 | 79 | 37.241379 | 0.768869 | 0.194907 | 0 | 0.48 | 0 | 0 | 0.009957 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0.05 | false | 0 | 0.05 | 0 | 0.13 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4370bea6e2a16934ad57aff4637712bbcfdb6bc4 | 331 | py | Python | 1805_number_of_different_integers_in_a_string.py | hotternative/leetcode | d0ec225abc2ada1398666641c7872f3eb889e7ed | [
"MIT"
] | null | null | null | 1805_number_of_different_integers_in_a_string.py | hotternative/leetcode | d0ec225abc2ada1398666641c7872f3eb889e7ed | [
"MIT"
] | null | null | null | 1805_number_of_different_integers_in_a_string.py | hotternative/leetcode | d0ec225abc2ada1398666641c7872f3eb889e7ed | [
"MIT"
] | null | null | null | from string import ascii_lowercase
ts = 'a123bc34d8ef34'
cur = []
res = set()
for c in ts:
if c in ascii_lowercase:
if cur:
s = ''.join(cur)
res.add(int(s))
cur = []
else:
cur.append(c)
else:
if cur:
s = ''.join(cur)
res.add(int(s))
pri... | 13.24 | 34 | 0.480363 | 45 | 331 | 3.488889 | 0.466667 | 0.11465 | 0.076433 | 0.127389 | 0.292994 | 0.292994 | 0.292994 | 0.292994 | 0.292994 | 0 | 0 | 0.039216 | 0.383686 | 331 | 24 | 35 | 13.791667 | 0.730392 | 0 | 0 | 0.588235 | 0 | 0 | 0.042683 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.058824 | 0 | 0.058824 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4371e6643a58d749ad832f8647f0481df0293c7c | 1,087 | py | Python | app.py | ahmedriaz9908/memeapiiz | eef98f837f2ec83edc3dd004f19dcefda9b582a5 | [
"MIT"
] | null | null | null | app.py | ahmedriaz9908/memeapiiz | eef98f837f2ec83edc3dd004f19dcefda9b582a5 | [
"MIT"
] | null | null | null | app.py | ahmedriaz9908/memeapiiz | eef98f837f2ec83edc3dd004f19dcefda9b582a5 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, jsonify
from reddit_handler import *
app = Flask(__name__)
meme_subreddits = ['izlam']
@app.route('/')
def index():
return render_template('index.html')
@app.route('/meme')
def one_post():
sub = random.choice(meme_subreddits)
re = get_posts(sub... | 20.12963 | 84 | 0.601656 | 146 | 1,087 | 4.308219 | 0.308219 | 0.133545 | 0.127186 | 0.09539 | 0.303657 | 0.303657 | 0.303657 | 0.303657 | 0.18442 | 0.18442 | 0 | 0.020631 | 0.24195 | 1,087 | 53 | 85 | 20.509434 | 0.742718 | 0 | 0 | 0.235294 | 0 | 0 | 0.10058 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.147059 | false | 0 | 0.058824 | 0.058824 | 0.352941 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4372f137c065f7fda02b994b61b1b4bd3b7965e5 | 1,775 | py | Python | pyrite/llvm.py | iahuang/pyrite | 0db83aad6aa8f245edf13d393f65d408eb956c4d | [
"MIT"
] | null | null | null | pyrite/llvm.py | iahuang/pyrite | 0db83aad6aa8f245edf13d393f65d408eb956c4d | [
"MIT"
] | 1 | 2022-03-28T00:35:11.000Z | 2022-03-29T21:17:06.000Z | pyrite/llvm.py | iahuang/pyrite | 0db83aad6aa8f245edf13d393f65d408eb956c4d | [
"MIT"
] | null | null | null | import shutil
from pyrite import fs
from pyrite.command_line import run_command
from pyrite.errors import UserError
from pyrite.globals import Globals
from os.path import join
class LLVMInterface:
_clang_path: str
def __init__(self):
self._clang_path = self._get_clang_path()
def _get_clang_path(s... | 29.583333 | 127 | 0.60507 | 213 | 1,775 | 4.826291 | 0.41784 | 0.070039 | 0.066148 | 0.061284 | 0.05642 | 0.05642 | 0 | 0 | 0 | 0 | 0 | 0 | 0.316056 | 1,775 | 59 | 128 | 30.084746 | 0.846787 | 0.132958 | 0 | 0.108108 | 0 | 0 | 0.138889 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.108108 | false | 0 | 0.162162 | 0 | 0.378378 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43741937702bf1405a4a4845184d5f67e95b3dd1 | 526 | py | Python | bag_recursive.py | eduardogerentklein/Algoritmos-Geneticos | 499836ac4867240ee3777dcdd554081a480cb8c9 | [
"MIT"
] | null | null | null | bag_recursive.py | eduardogerentklein/Algoritmos-Geneticos | 499836ac4867240ee3777dcdd554081a480cb8c9 | [
"MIT"
] | null | null | null | bag_recursive.py | eduardogerentklein/Algoritmos-Geneticos | 499836ac4867240ee3777dcdd554081a480cb8c9 | [
"MIT"
] | null | null | null | maxWeight = 30
value = [15, 7, 10, 5, 8, 17]
weight = [15, 3, 2, 5, 9, 20]
def bag(pos, selected):
# calcula o total
totalValue = 0
pesoTotal = 0
for i in selected:
totalValue += value[i]
pesoTotal += weight[i]
if pesoTotal > maxWeight:
return (0,0)
if pos >= len(weight):
return (totalValue, pesoT... | 18.137931 | 41 | 0.629278 | 77 | 526 | 4.298701 | 0.480519 | 0.054381 | 0.042296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083538 | 0.226236 | 526 | 29 | 42 | 18.137931 | 0.72973 | 0.028517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0 | 0 | 0 | 0.238095 | 0.047619 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
43785386d2679f8fabe7de8f8acd7359d1da2540 | 5,112 | py | Python | task3/task3_xgb_cv.py | meck93/intro_ml | 903710b13e9eed8b45fdbd9957c2fb49b2981f62 | [
"MIT"
] | null | null | null | task3/task3_xgb_cv.py | meck93/intro_ml | 903710b13e9eed8b45fdbd9957c2fb49b2981f62 | [
"MIT"
] | null | null | null | task3/task3_xgb_cv.py | meck93/intro_ml | 903710b13e9eed8b45fdbd9957c2fb49b2981f62 | [
"MIT"
] | null | null | null |
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import f_classif, SelectKBest
import numpy as np
import pandas as pd
import os
mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-7.2.0-posix... | 32.35443 | 150 | 0.714593 | 762 | 5,112 | 4.536745 | 0.23622 | 0.041655 | 0.032398 | 0.023141 | 0.372867 | 0.306624 | 0.273648 | 0.234596 | 0.18166 | 0.140006 | 0 | 0.020559 | 0.153169 | 5,112 | 157 | 151 | 32.56051 | 0.778009 | 0.382042 | 0 | 0 | 0 | 0.015625 | 0.17188 | 0.021283 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0.078125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4378f461808522c0661a502153858f383b5e6b02 | 1,369 | py | Python | discovery-provider/src/queries/get_plays_metrics.py | atticwip/audius-protocol | 9758e849fae01508fa1d27675741228b11533e6e | [
"Apache-2.0"
] | 429 | 2019-08-14T01:34:07.000Z | 2022-03-30T06:31:38.000Z | discovery-provider/src/queries/get_plays_metrics.py | SNOmad1/audius-protocol | 3d5fc2bf688265eb529060f1f3234ef2b95ed231 | [
"Apache-2.0"
] | 998 | 2019-08-14T01:52:37.000Z | 2022-03-31T23:17:22.000Z | discovery-provider/src/queries/get_plays_metrics.py | SNOmad1/audius-protocol | 3d5fc2bf688265eb529060f1f3234ef2b95ed231 | [
"Apache-2.0"
] | 73 | 2019-10-04T04:24:16.000Z | 2022-03-24T16:27:30.000Z | import logging
import time
from sqlalchemy import func, desc
from src.models import Play
from src.utils import db_session
logger = logging.getLogger(__name__)
def get_plays_metrics(args):
"""
Returns metrics for play counts
Args:
args: dict The parsed args from the request
args.start_tim... | 27.938776 | 82 | 0.646457 | 180 | 1,369 | 4.733333 | 0.4 | 0.032864 | 0.052817 | 0.042254 | 0.161972 | 0.100939 | 0.100939 | 0.100939 | 0.100939 | 0.100939 | 0 | 0.001955 | 0.252739 | 1,369 | 48 | 83 | 28.520833 | 0.83089 | 0.252739 | 0 | 0 | 0 | 0 | 0.075587 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0 | 0.172414 | 0 | 0.310345 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |