hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794614ab79d39b1eb5b619569e5e1b28d03c5c7b | 7,774 | py | Python | src/tests/ftest/datamover/posix_meta_entry.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 429 | 2016-09-28T20:43:20.000Z | 2022-03-25T01:22:50.000Z | src/tests/ftest/datamover/posix_meta_entry.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 6,341 | 2016-11-24T12:34:26.000Z | 2022-03-31T23:53:46.000Z | src/tests/ftest/datamover/posix_meta_entry.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 202 | 2016-10-30T14:47:53.000Z | 2022-03-30T21:29:11.000Z | #!/usr/bin/python
'''
(C) Copyright 2020-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
'''
from data_mover_test_base import DataMoverTestBase
from os.path import join
class DmvrPosixMetaEntry(DataMoverTestBase):
# pylint: disable=too-many-ancestors
"""Test class for POSIX DataMover... | 37.921951 | 84 | 0.574479 |
794615a1ea1925c7f64e9425ece5961482fc6bce | 13,173 | py | Python | src/sardana/pool/poolbaseelement.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolbaseelement.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolbaseelement.py | tacaswell/sardana | be8d64d34234b35a37b4cd8233e86fcda13f64b8 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 36.18956 | 97 | 0.562211 |
794615d14fcb23899eb3c4e7a590ab75d10dc1d8 | 2,155 | py | Python | flaskr/handyfunctions.py | tuilagio/wordNotify-rev1 | 4db3216182ac2a0b273906805a3c8005326d6e25 | [
"BSD-3-Clause"
] | null | null | null | flaskr/handyfunctions.py | tuilagio/wordNotify-rev1 | 4db3216182ac2a0b273906805a3c8005326d6e25 | [
"BSD-3-Clause"
] | 2 | 2021-03-10T15:48:08.000Z | 2021-10-06T16:00:56.000Z | flaskr/handyfunctions.py | tuilagio/wordNotify-rev1 | 4db3216182ac2a0b273906805a3c8005326d6e25 | [
"BSD-3-Clause"
] | null | null | null | import base64, json
import requests
from werkzeug.security import generate_password_hash
url_base = 'http://127.0.0.1:5000'
get_dicts = '/api/v1/dicts' # lang=${lang}&random=true
# user="tom"
# password="thisIStom"
# encoded_u = base64.b64encode((user+":"+password).encode()).decode()
# headers = {'Content-Type': 'app... | 36.525424 | 160 | 0.655684 |
794616108a8c564f6d383d75332328a9d50565ef | 2,457 | py | Python | training/overlapped_speakers/prepare.py | dimaxano/LipNet | 5990b0a0a5331ccbc2c110dfcbbf1b08e1704d19 | [
"MIT"
] | 560 | 2017-04-20T06:22:10.000Z | 2022-03-31T06:47:15.000Z | training/overlapped_speakers/prepare.py | dimaxano/LipNet | 5990b0a0a5331ccbc2c110dfcbbf1b08e1704d19 | [
"MIT"
] | 123 | 2017-04-25T11:41:45.000Z | 2022-03-11T23:11:38.000Z | training/overlapped_speakers/prepare.py | dimaxano/LipNet | 5990b0a0a5331ccbc2c110dfcbbf1b08e1704d19 | [
"MIT"
] | 241 | 2017-05-03T14:27:05.000Z | 2022-03-06T08:38:44.000Z | import os
import glob
import subprocess
import sys
'''
This script prepare training folder and its dataset for each speaker.
- Folder s{i}/datasets/train would contain original DATASET_VIDEO - s{i} with 0 <= i < VAL_SAMPLES
- Folder s{i}/datasets/val would contain s{i} >= VAL_SAMPLES
- Folder s{i}/datasets/align would... | 50.142857 | 170 | 0.658527 |
794616780fd7f37b20ade8b14629b56ac5c88531 | 411 | py | Python | queryengine/cli.py | AndyQW/queryengine | 417cb374edfcaf395e8a392bffb01fa66c82a3a9 | [
"MIT"
] | null | null | null | queryengine/cli.py | AndyQW/queryengine | 417cb374edfcaf395e8a392bffb01fa66c82a3a9 | [
"MIT"
] | null | null | null | queryengine/cli.py | AndyQW/queryengine | 417cb374edfcaf395e8a392bffb01fa66c82a3a9 | [
"MIT"
] | null | null | null | """Console script for queryengine."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for queryengine."""
click.echo("Replace this message by putting your code into "
"queryengine.cli.main")
click.echo("See click documentation at https://click.palletsprojects... | 24.176471 | 79 | 0.671533 |
794617097fc33837304ba2e565c72a92dc686991 | 1,634 | py | Python | python/ray/tests/gcp/test_gcp_node_provider.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 21,382 | 2016-09-26T23:12:52.000Z | 2022-03-31T21:47:45.000Z | python/ray/tests/gcp/test_gcp_node_provider.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 19,689 | 2016-09-17T08:21:25.000Z | 2022-03-31T23:59:30.000Z | python/ray/tests/gcp/test_gcp_node_provider.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 4,114 | 2016-09-23T18:54:01.000Z | 2022-03-31T15:07:32.000Z | import pytest
from ray.autoscaler._private.gcp.node import GCPCompute
_PROJECT_NAME = "project-one"
_AZ = "us-west1-b"
@pytest.mark.parametrize(
"test_case", [("n1-standard-4", f"zones/{_AZ}/machineTypes/n1-standard-4"),
(f"zones/{_AZ}/machineTypes/n1-standard-4",
f"zones/{_... | 32.039216 | 79 | 0.689718 |
794617bd9eed5499fd71921428be24b53c971d83 | 15,635 | py | Python | raiden_contracts/deploy/contract_deployer.py | LefterisJP/raiden-contracts | fdcee22d22aeacb16efb58c3a324ac20c01cdb40 | [
"MIT"
] | 1 | 2021-04-23T03:59:00.000Z | 2021-04-23T03:59:00.000Z | raiden_contracts/deploy/contract_deployer.py | LefterisJP/raiden-contracts | fdcee22d22aeacb16efb58c3a324ac20c01cdb40 | [
"MIT"
] | null | null | null | raiden_contracts/deploy/contract_deployer.py | LefterisJP/raiden-contracts | fdcee22d22aeacb16efb58c3a324ac20c01cdb40 | [
"MIT"
] | null | null | null | from copy import deepcopy
from logging import getLogger
from pathlib import Path
from typing import Any, Dict, List, Optional
from eth_typing import HexAddress
from eth_utils import encode_hex, is_address, to_checksum_address
from eth_utils.units import units
from web3 import Web3
from web3.contract import Contract, C... | 39.783715 | 99 | 0.664854 |
794617d0128f5db9d05c9f897dbb0803c804e28a | 949 | py | Python | shell/__init__.py | jack1142/JackCogs | ad3b5c43e4597f92816db8f0974f8f61d511abc3 | [
"Apache-2.0"
] | 18 | 2019-01-18T07:00:26.000Z | 2021-09-22T00:12:40.000Z | shell/__init__.py | jack1142/JackCogs | ad3b5c43e4597f92816db8f0974f8f61d511abc3 | [
"Apache-2.0"
] | 43 | 2019-04-28T01:31:17.000Z | 2022-03-08T02:17:55.000Z | shell/__init__.py | jack1142/JackCogs | ad3b5c43e4597f92816db8f0974f8f61d511abc3 | [
"Apache-2.0"
] | 20 | 2020-01-21T10:49:37.000Z | 2022-03-21T02:16:45.000Z | # Copyright 2018-2021 Jakub Kuczys (https://github.com/jack1142)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.633333 | 78 | 0.74921 |
794618305073dfca1b6c2753077ddf141c84edd4 | 1,272 | py | Python | singular-format-new.py | gourishankarseal/Assignment-Cohomology-of-Bott-Samelson-manifolds | a8e4fc67e48928894e638b6944759c548061fcf7 | [
"MIT"
] | null | null | null | singular-format-new.py | gourishankarseal/Assignment-Cohomology-of-Bott-Samelson-manifolds | a8e4fc67e48928894e638b6944759c548061fcf7 | [
"MIT"
] | null | null | null | singular-format-new.py | gourishankarseal/Assignment-Cohomology-of-Bott-Samelson-manifolds | a8e4fc67e48928894e638b6944759c548061fcf7 | [
"MIT"
] | null | null | null | name = ["A"];
n = int(raw_input("Enter number of fixed points:"))
for i in range(1,n+1):
name = name + ["test"+`i`];
# List name should look like this:
#name = ["A", "test1", "test2", "test3", "test4", "test5", "test6", "test7", "test8"];
fp = len(name);
for j in range(0,fp):
f=open(name[j])
lines=f.read()... | 14.964706 | 86 | 0.545597 |
7946185da63c8a9d9f675167708cde789e3321d4 | 2,300 | py | Python | lib/rucio/db/sqla/migrate_repo/versions/277b5fbb41d3_switch_heartbeats_executable.py | nimishbongale/rucio | 21c93bd7d02dbc70bc3127ad77fb1a1981b83058 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/277b5fbb41d3_switch_heartbeats_executable.py | nimishbongale/rucio | 21c93bd7d02dbc70bc3127ad77fb1a1981b83058 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/277b5fbb41d3_switch_heartbeats_executable.py | nimishbongale/rucio | 21c93bd7d02dbc70bc3127ad77fb1a1981b83058 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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-... | 40.350877 | 113 | 0.72 |
7946190009f89f5e1895590f9a2efdb2024346d0 | 7,100 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/11_features/numtrees_8/rule_5.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/11_features/numtrees_8/rule_5.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/11_features/numtrees_8/rule_5.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Age, obj[4]: Education, obj[5]: Occupation, obj[6]: Bar, obj[7]: Coffeehouse, obj[8]: Restaurant20to50, obj[9]: Direction_same, obj[10]: Distance
# {"feature": "Coupon", "instances": 127, "metric_value": 0.9762, "depth": 1}
if obj[2]>0:
... | 37.368421 | 226 | 0.511268 |
794619a3eb1c558b6756b0bad6fea5eb05b2f850 | 2,084 | py | Python | recipes/libsvm/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/libsvm/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/libsvm/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | from conans import ConanFile, tools, CMake
from conans.errors import ConanInvalidConfiguration
required_conan_version = ">=1.33.0"
class libsvmConan(ConanFile):
name = "libsvm"
description = "Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression"
url = "https://git... | 31.104478 | 113 | 0.603647 |
794619c716f77e67926aaa4e18203d3e0c4c760a | 2,235 | py | Python | yitu/models/user.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | 4 | 2017-06-30T01:32:52.000Z | 2019-07-03T15:46:24.000Z | yitu/models/user.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | 3 | 2021-03-22T17:13:51.000Z | 2021-12-13T19:40:20.000Z | yitu/models/user.py | 1ibrary/1ibrary-gzhu | 768af1837d6caa185c101cc82ea67efc931865c1 | [
"Apache-2.0"
] | null | null | null | """
Author: Tyan boot <tyanboot@outlook.com>
Date: 2017/6/20
"""
# -*- coding: utf-8 -*-
from itsdangerous import TimedJSONWebSignatureSerializer
from yitu import db
from yitu.models.book_list import BookList
from yitu.models.subscribe import Subscribe
from flask import g
class User(db.Model):
__tablename__ =... | 27.9375 | 79 | 0.605369 |
79461b73541bd0905e066cb05d8ff23209216b4d | 397 | py | Python | filelocker/wsgi.py | Yogeswari-Sahu/HackOff | 0c66e13dafc15f354fe5d8058a68a24532fbf3c0 | [
"MIT"
] | 1 | 2020-12-29T17:24:19.000Z | 2020-12-29T17:24:19.000Z | filelocker/filelocker/wsgi.py | Hawk453/HackOff | 41d7b44ae3777e95d1e1d8f2284241907f15f3c3 | [
"MIT"
] | null | null | null | filelocker/filelocker/wsgi.py | Hawk453/HackOff | 41d7b44ae3777e95d1e1d8f2284241907f15f3c3 | [
"MIT"
] | 3 | 2020-12-13T09:43:27.000Z | 2020-12-13T19:52:12.000Z | """
WSGI config for filelocker project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
79461baec98140d266b1fe3450d3334ba0d903e2 | 661 | py | Python | evaluador_consola.py | RicardoGomezT/Normalizacion_JSON_con_PySpark | 129e9fa1b4f32af1da3aff47741623cafa669ed4 | [
"MIT"
] | null | null | null | evaluador_consola.py | RicardoGomezT/Normalizacion_JSON_con_PySpark | 129e9fa1b4f32af1da3aff47741623cafa669ed4 | [
"MIT"
] | null | null | null | evaluador_consola.py | RicardoGomezT/Normalizacion_JSON_con_PySpark | 129e9fa1b4f32af1da3aff47741623cafa669ed4 | [
"MIT"
] | null | null | null | {"consumidor":{"app_consumer":{"id":"BUN-09348","session_id":"07e3ged1520","transaction_id":"12345"},"device_consumer":{"id":"device-111","user_agent":"Mozilla/5.0(iPhone)","locale":"CO","ip":"200.122.xxx.254","terminal_id":"372343"}},"operacion":{"type":"CONSULTA","operation_date":"2019-08-13T20:00:54.832Z","source_re... | 661 | 661 | 0.686838 |
79461c1ac8f355b7136c503db580e69d25612a6a | 2,795 | py | Python | cli/setup.py | ddeidda/aws-parallelcluster | b1f468d2283168dfd2992f791cee79bef3a4920a | [
"Apache-2.0"
] | null | null | null | cli/setup.py | ddeidda/aws-parallelcluster | b1f468d2283168dfd2992f791cee79bef3a4920a | [
"Apache-2.0"
] | 1 | 2020-11-16T11:07:22.000Z | 2020-11-16T11:07:22.000Z | cli/setup.py | rexcsn/aws-parallelcluster | be5f5fd926e4bd942df3da907351e5de99d49485 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2016 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://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file ... | 34.9375 | 119 | 0.643649 |
79461cd1730cdb3f451b546c2c6cf7b9f58a8d9f | 854 | py | Python | backend/StaticCodeAnalyzer/urls.py | Compro-Prasad/CAST-static-code-analyzer | a3ab84fa7fdc176960a6c535bb8705cedf92bcad | [
"MIT"
] | null | null | null | backend/StaticCodeAnalyzer/urls.py | Compro-Prasad/CAST-static-code-analyzer | a3ab84fa7fdc176960a6c535bb8705cedf92bcad | [
"MIT"
] | 7 | 2021-06-04T21:52:24.000Z | 2022-02-26T11:33:16.000Z | backend/StaticCodeAnalyzer/urls.py | Compro-Prasad/CAST-static-code-analyzer | a3ab84fa7fdc176960a6c535bb8705cedf92bcad | [
"MIT"
] | null | null | null | """StaticCodeAnalyzer URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | 32.846154 | 77 | 0.713115 |
79461cd8df5953d2ccf7ceb01c8b5892a82df91c | 23,426 | py | Python | static/SciKGraph.py | maurodlt/SciKGraph | 83688fbcd827cdec1662760531b1b3e78e09575a | [
"AFL-1.1"
] | 5 | 2020-09-08T21:22:30.000Z | 2022-01-15T10:56:24.000Z | static/bla/SciKGraph.py | maurodlt/SciKGraph | 83688fbcd827cdec1662760531b1b3e78e09575a | [
"AFL-1.1"
] | null | null | null | static/bla/SciKGraph.py | maurodlt/SciKGraph | 83688fbcd827cdec1662760531b1b3e78e09575a | [
"AFL-1.1"
] | 1 | 2021-01-20T20:43:21.000Z | 2021-01-20T20:43:21.000Z | import string
import networkx as nx
import re
import sys
from nltk import word_tokenize, pos_tag
from pybabelfy.babelfy import *
from nltk.stem import PorterStemmer
from math import log
import pickle
import glob
import os
import OClustR as OCR
import operator
#import nltk
class SciKGraph():
def __init__(self):#, ... | 36.77551 | 315 | 0.565525 |
79461ebf8433b867d5c8b35acd21b5a0727644f3 | 3,408 | py | Python | mirror_to_do_list/settings.py | hadeel36/Mirror-to-do-list | b2b018e3771357005068f355d60a95313874e16d | [
"MIT"
] | null | null | null | mirror_to_do_list/settings.py | hadeel36/Mirror-to-do-list | b2b018e3771357005068f355d60a95313874e16d | [
"MIT"
] | null | null | null | mirror_to_do_list/settings.py | hadeel36/Mirror-to-do-list | b2b018e3771357005068f355d60a95313874e16d | [
"MIT"
] | null | null | null | """
Django settings for mirror_to_do_list project.
Generated by 'django-admin startproject' using Django 1.11.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""... | 25.62406 | 91 | 0.689847 |
79461f8faaa95d45a1614a1c45442f3cd414e6dc | 16,192 | py | Python | julius4seg/sp_inserter.py | yamachu/julius4seg | 2d701f451d854aa9ed00cd7c1a0cf5ecfa83b036 | [
"MIT"
] | 7 | 2018-04-15T09:02:09.000Z | 2021-11-07T08:29:22.000Z | julius4seg/sp_inserter.py | yamachu/julius4seg | 2d701f451d854aa9ed00cd7c1a0cf5ecfa83b036 | [
"MIT"
] | 2 | 2020-01-22T17:21:09.000Z | 2020-02-16T20:26:44.000Z | julius4seg/sp_inserter.py | yamachu/julius4seg | 2d701f451d854aa9ed00cd7c1a0cf5ecfa83b036 | [
"MIT"
] | 2 | 2018-04-16T21:50:51.000Z | 2020-01-21T16:03:39.000Z | import os
import re
import sys
import subprocess
from itertools import chain
from pathlib import Path, PurePath
from logging import getLogger, DEBUG, NullHandler
logger = getLogger(__name__)
logger.addHandler(NullHandler())
logger.setLevel(DEBUG)
logger.propagate = False
# MUST CHANGE
JULIUS_ROOT = PurePath('.')
d... | 31.501946 | 184 | 0.494998 |
79461f999afead30fb25659ee6f567622c8078e5 | 1,300 | py | Python | tests/micropython/heapalloc_iter.py | PappaPeppar/micropython | ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9 | [
"MIT"
] | 692 | 2016-12-19T23:25:35.000Z | 2022-03-31T14:20:48.000Z | tests/micropython/heapalloc_iter.py | PappaPeppar/micropython | ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9 | [
"MIT"
] | 259 | 2016-12-25T06:38:22.000Z | 2022-03-13T16:38:36.000Z | tests/micropython/heapalloc_iter.py | PappaPeppar/micropython | ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9 | [
"MIT"
] | 228 | 2016-12-19T05:03:30.000Z | 2022-03-22T18:13:00.000Z | # test that iterating doesn't use the heap
try:
import array
except ImportError:
print("SKIP")
raise SystemExit
try:
from micropython import heap_lock, heap_unlock
except (ImportError, AttributeError):
heap_lock = heap_unlock = lambda:0
def do_iter(l):
for i in l:
print(i)
def gen_fun... | 18.571429 | 66 | 0.678462 |
79461fc621a75c74e9ab55822f88c144a79102d9 | 1,187 | py | Python | setup.py | juztin/flask-tracy | 8a43094f0fced3c216f7b65ad6c5c7a22c14ea25 | [
"BSD-2-Clause"
] | null | null | null | setup.py | juztin/flask-tracy | 8a43094f0fced3c216f7b65ad6c5c7a22c14ea25 | [
"BSD-2-Clause"
] | null | null | null | setup.py | juztin/flask-tracy | 8a43094f0fced3c216f7b65ad6c5c7a22c14ea25 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
with open('README.rst') as file:
readme = file.read()
setup(
name='Flask-Tracy',
version='0.1.3',
url='https://github.com/juztin/flask-tracy',
license='BSD',
author='Justin Wilson',
author_email='justin@minty.io',
des... | 28.95122 | 70 | 0.612468 |
794620094d364f22c6bc531996eff70265d3a0f8 | 489 | py | Python | package/cloudshell/cp/aws/models/ami_deployment_model.py | QualiSystemsLab/AWS-Shell | bf7b62640d8d97a5e9199edb7a1ada0b98aac6fb | [
"0BSD"
] | 1 | 2021-05-28T13:55:54.000Z | 2021-05-28T13:55:54.000Z | package/cloudshell/cp/aws/models/ami_deployment_model.py | QualiSystemsLab/AWS-Shell-ext | bf7b62640d8d97a5e9199edb7a1ada0b98aac6fb | [
"0BSD"
] | null | null | null | package/cloudshell/cp/aws/models/ami_deployment_model.py | QualiSystemsLab/AWS-Shell-ext | bf7b62640d8d97a5e9199edb7a1ada0b98aac6fb | [
"0BSD"
] | null | null | null |
class AMIDeploymentModel(object):
def __init__(self):
self.aws_ami_id = '' # type: str
self.min_count = 0 # type: int
self.max_count = 0 # type: int
self.instance_type = '' # type: str
self.private_ip_address = '' # type: str
self.security_group_ids = [] # typ... | 34.928571 | 59 | 0.576687 |
7946206fa390ea0f32240ce7ff6d529c7a83a5fb | 2,386 | py | Python | tests/rbac/common/role/propose_task_helper_test.py | kthblmfld/sawtooth-next-directory | 57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707 | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/propose_task_helper_test.py | kthblmfld/sawtooth-next-directory | 57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707 | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/propose_task_helper_test.py | kthblmfld/sawtooth-next-directory | 57291f1a7e6ce1dfc11a9c5e2930e8c5ebd31707 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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 ... | 33.138889 | 84 | 0.713747 |
7946207d02c3bff3ce4ad8aafe7d662a0b52670a | 2,857 | py | Python | scapy/trace.py | mmmonk/crap | 96ba81723f043503e7ed2f96ea727b524d22b83f | [
"MIT"
] | 14 | 2015-01-14T15:53:22.000Z | 2019-06-21T06:15:47.000Z | scapy/trace.py | mmmonk/crap | 96ba81723f043503e7ed2f96ea727b524d22b83f | [
"MIT"
] | 1 | 2018-04-01T08:40:17.000Z | 2020-06-24T10:05:33.000Z | scapy/trace.py | mmmonk/crap | 96ba81723f043503e7ed2f96ea727b524d22b83f | [
"MIT"
] | 12 | 2015-05-13T10:52:04.000Z | 2020-10-07T14:49:37.000Z | #!/usr/bin/env python
# $Id$
"""
Author: <m.lukaszuk(at)gmail.com> 2009
TCP trace route using scapy :)
"""
from scapy.all import conf,IP,TCP,sr1,sniff,send
conf.verb = 0
import random
import re
import sys
my_ttl = 1
target = sys.argv[1]
my_dport = 80
my_seq = random.randint(1024,65500)
my_sport = my_seq
def dec2... | 25.061404 | 249 | 0.630032 |
794620e9e14ef7b607d1a37b1b9f632aa7b2800b | 7,929 | py | Python | napari/_qt/dialogs/preferences_dialog.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/dialogs/preferences_dialog.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/dialogs/preferences_dialog.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | null | null | null | import json
from qtpy.QtCore import QSize, Signal
from qtpy.QtWidgets import (
QDialog,
QHBoxLayout,
QLabel,
QListWidget,
QPushButton,
QStackedWidget,
QVBoxLayout,
QWidget,
)
from ..._vendor.qt_json_builder.qt_jsonschema_form import WidgetBuilder
from ...utils.settings import SETTINGS
... | 31.589641 | 85 | 0.607517 |
7946215731e9eb73a53d7891f19f41abb09e211f | 1,084 | py | Python | actions/set_temperature.py | cognifloyd/stackstorm-nest | 43780edf4e13c8bf8996bf20edc04a40aef1caae | [
"Apache-2.0"
] | 164 | 2015-01-17T16:08:33.000Z | 2021-08-03T02:34:07.000Z | actions/set_temperature.py | cognifloyd/stackstorm-nest | 43780edf4e13c8bf8996bf20edc04a40aef1caae | [
"Apache-2.0"
] | 442 | 2015-01-01T11:19:01.000Z | 2017-09-06T23:26:17.000Z | actions/set_temperature.py | cognifloyd/stackstorm-nest | 43780edf4e13c8bf8996bf20edc04a40aef1caae | [
"Apache-2.0"
] | 202 | 2015-01-13T00:37:40.000Z | 2020-11-07T11:30:10.000Z | from lib import actions
class SetTemperatureAction(actions.BaseAction):
def run(self, scale, structure=None, device=None, temp=None, temp_low=None, temp_high=None):
temperature = None
mode = None
# Assume temp if a range is not provided
if temp_low and temp_high:
tempe... | 34.967742 | 96 | 0.581181 |
794622f56774cfa1a43648f82c76f4a033cfb786 | 581 | py | Python | bakkes_rcon/types.py | theY4Kman/bakkes-rcon | 99fad6d56b7538dc600ca5ee0deba47416429863 | [
"MIT"
] | 2 | 2021-11-11T17:20:11.000Z | 2022-01-31T22:05:55.000Z | bakkes_rcon/types.py | theY4Kman/bakkes-rcon | 99fad6d56b7538dc600ca5ee0deba47416429863 | [
"MIT"
] | null | null | null | bakkes_rcon/types.py | theY4Kman/bakkes-rcon | 99fad6d56b7538dc600ca5ee0deba47416429863 | [
"MIT"
] | null | null | null | from typing import Literal, TypeAlias, TypedDict
RawOptionalStr: TypeAlias = str | Literal['none']
RawBool: TypeAlias = Literal['true', 'false']
class RawInventoryItem(TypedDict):
product_id: int
name: str
slot: str
paint: RawOptionalStr
certification: RawOptionalStr
certification_value: int
... | 24.208333 | 49 | 0.717728 |
7946232d31b7065f58fb729034a9f8bcb98900b0 | 13,778 | py | Python | test/map/test_core.py | dataframing/snorkel | be6cec76f6758ed6f8d0ca5da7342af28ad5486c | [
"Apache-2.0"
] | 1 | 2020-06-06T05:04:12.000Z | 2020-06-06T05:04:12.000Z | test/map/test_core.py | dataframing/snorkel | be6cec76f6758ed6f8d0ca5da7342af28ad5486c | [
"Apache-2.0"
] | null | null | null | test/map/test_core.py | dataframing/snorkel | be6cec76f6758ed6f8d0ca5da7342af28ad5486c | [
"Apache-2.0"
] | 1 | 2021-04-25T21:19:21.000Z | 2021-04-25T21:19:21.000Z | import unittest
from types import SimpleNamespace
from typing import Any, Optional
import numpy as np
import pandas as pd
import spacy
from snorkel.map import Mapper, lambda_mapper
from snorkel.map.core import get_hashable
from snorkel.types import DataPoint, FieldMap
class SplitWordsMapper(Mapper):
def __init_... | 34.70529 | 83 | 0.628683 |
794626c346290f14e92abde38acd065c4352bd89 | 1,822 | py | Python | numba_dppy/config.py | fossabot/numba-dppy | 918922d94c64572c279679b893445bf84f817187 | [
"Apache-2.0"
] | null | null | null | numba_dppy/config.py | fossabot/numba-dppy | 918922d94c64572c279679b893445bf84f817187 | [
"Apache-2.0"
] | 1 | 2021-05-08T09:23:15.000Z | 2021-05-08T09:23:15.000Z | numba_dppy/config.py | fossabot/numba-dppy | 918922d94c64572c279679b893445bf84f817187 | [
"Apache-2.0"
] | 1 | 2021-05-09T13:51:03.000Z | 2021-05-09T13:51:03.000Z | # Copyright 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 28.46875 | 74 | 0.69045 |
7946284304115c48bcd1e8ccf24051890b5eb702 | 1,423 | py | Python | ICPC_Mirrors/Nitc_9.0/nwerc2019all/jackdawsandcrows/submissions/accepted/per_faster_sort.py | Shahraaz/CP_P_S5 | b068ad02d34338337e549d92a14e3b3d9e8df712 | [
"MIT"
] | null | null | null | ICPC_Mirrors/Nitc_9.0/nwerc2019all/jackdawsandcrows/submissions/accepted/per_faster_sort.py | Shahraaz/CP_P_S5 | b068ad02d34338337e549d92a14e3b3d9e8df712 | [
"MIT"
] | null | null | null | ICPC_Mirrors/Nitc_9.0/nwerc2019all/jackdawsandcrows/submissions/accepted/per_faster_sort.py | Shahraaz/CP_P_S5 | b068ad02d34338337e549d92a14e3b3d9e8df712 | [
"MIT"
] | null | null | null | def cost(v1, v2, sgn=1):
return v1 is not None and v2 is not None and sgn*v1*v2 >= 0
class Elem:
def __init__(self, v, p):
self.v = v
self.f = 1
self.prev = p
if p: p.next = self
self.next = None
def rm(self):
if self.prev: self.prev.next = self.next
... | 27.365385 | 115 | 0.504568 |
7946288c7e8323a08d8ca1dc213a8e53d3aabbb0 | 3,981 | py | Python | 2018 AceBear CTF/Comic Store/comic.py | mathboy7/CTF | e279bf91ad6b22fc41087571c5fba9501832ab80 | [
"Apache-2.0"
] | 46 | 2017-11-07T05:30:26.000Z | 2021-11-24T09:33:41.000Z | 2018 AceBear CTF/Comic Store/comic.py | mathboy7/CTF | e279bf91ad6b22fc41087571c5fba9501832ab80 | [
"Apache-2.0"
] | null | null | null | 2018 AceBear CTF/Comic Store/comic.py | mathboy7/CTF | e279bf91ad6b22fc41087571c5fba9501832ab80 | [
"Apache-2.0"
] | 3 | 2017-11-14T14:45:28.000Z | 2020-08-30T07:59:04.000Z | from pwn import *
#env = {"LD_PRELOAD":"./comic.so.6"}
#r = process("./comic_store", env=env)
r = remote("comicstore.acebear.site", 3005)
def register(name):
r.sendline("1")
print r.recvuntil("name: ")
r.send(name)
print r.recvuntil("choice: ")
def addComic(name, quantity):
r.sendline("3")
print r.recvuntil("... | 21.994475 | 94 | 0.666918 |
794628ea9c4ce8f60dfa5cff3b9ea628f016bb0a | 808 | py | Python | 02-Classes-and-Instances/exer-04-employee.py | Beshkov/OOP | 297edadb3e7801dfeee5752a20aae6aead8da610 | [
"MIT"
] | 1 | 2021-05-24T17:51:53.000Z | 2021-05-24T17:51:53.000Z | 02-Classes-and-Instances/exer-04-employee.py | Beshkov/Python_OOP | 297edadb3e7801dfeee5752a20aae6aead8da610 | [
"MIT"
] | null | null | null | 02-Classes-and-Instances/exer-04-employee.py | Beshkov/Python_OOP | 297edadb3e7801dfeee5752a20aae6aead8da610 | [
"MIT"
] | null | null | null | class Employee:
def __init__(self, id, first_name, last_name, salary):
self.id = id
self.first_name = first_name
self.last_name = last_name
self.salary = salary
def get_full_name(self):
return f"{self.first_name} {self.last_name}"
def get_annual_salary(self):
... | 32.32 | 113 | 0.667079 |
79462ac6da8cdecfa144c76ac63ad5d9c2a0c092 | 1,198 | py | Python | data/spider/quantaxisSpider/quantaxisSpider/spiders/mongodbQuery.py | QUANTAXIS/quant | d3b76799b20cac7a876fbdeb6f97c48295dde06f | [
"MIT"
] | null | null | null | data/spider/quantaxisSpider/quantaxisSpider/spiders/mongodbQuery.py | QUANTAXIS/quant | d3b76799b20cac7a876fbdeb6f97c48295dde06f | [
"MIT"
] | null | null | null | data/spider/quantaxisSpider/quantaxisSpider/spiders/mongodbQuery.py | QUANTAXIS/quant | d3b76799b20cac7a876fbdeb6f97c48295dde06f | [
"MIT"
] | 1 | 2021-04-10T07:10:42.000Z | 2021-04-10T07:10:42.000Z | import pymongo
import json
class querylist(object):
client = pymongo.MongoClient(host="127.0.0.1", port=27017)
db = client['quantaxis_Spider']
def queryMongodbSame(self,collname,keyname,keycontent):
client = pymongo.MongoClient(host="127.0.0.1", port=27017)
db = client['quantaxis_Spid... | 28.52381 | 67 | 0.542571 |
79462c76db735efcac8fc61d333893d5300569da | 7,964 | py | Python | Lib/fontTools/unicodedata/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 240 | 2021-01-11T14:49:24.000Z | 2022-03-29T22:33:49.000Z | Lib/fontTools/unicodedata/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 77 | 2021-01-12T20:23:30.000Z | 2022-03-28T12:14:34.000Z | Lib/fontTools/unicodedata/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 28 | 2021-01-17T05:44:11.000Z | 2022-01-11T19:58:46.000Z | from __future__ import (
print_function, division, absolute_import, unicode_literals)
from fontTools.misc.py23 import *
import re
from bisect import bisect_right
try:
# use unicodedata backport compatible with python2:
# https://github.com/mikekap/unicodedata2
from unicodedata2 import *
except ImportE... | 28.750903 | 78 | 0.648041 |
79462cf2f424a456a301657f3234b0e58e079a84 | 618 | py | Python | python_solutions/Two Strings.py | ersincebi/hackerrank | 9475c8e88e9071544c10a939fe7307c8e62fe3a0 | [
"MIT"
] | null | null | null | python_solutions/Two Strings.py | ersincebi/hackerrank | 9475c8e88e9071544c10a939fe7307c8e62fe3a0 | [
"MIT"
] | null | null | null | python_solutions/Two Strings.py | ersincebi/hackerrank | 9475c8e88e9071544c10a939fe7307c8e62fe3a0 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'twoStrings' function below.
#
# The function is expected to return a STRING.
# The function accepts following parameters:
# 1. STRING s1
# 2. STRING s2
#
def twoStrings(s1, s2):
return 'Yes' if set(s1) & set(s2) else 'No'
i... | 15.846154 | 46 | 0.639159 |
79462cfdc3a54276b5de5147caf153c958ad4c23 | 2,098 | py | Python | Ago-Dic-2020/Practicas/1er-Parcial/Práctica 5/strategy_test.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ago-Dic-2020/Practicas/1er-Parcial/Práctica 5/strategy_test.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ago-Dic-2020/Practicas/1er-Parcial/Práctica 5/strategy_test.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | import unittest
from strategy import *
class StrategyTest(unittest.TestCase):
def test_basic_auth_strategy(self):
context = AuthContext(BasicAuthConcreteStrategy(usr='tintin', passwd='123456'))
self.assertEqual(
context.authenticate(),
'### Authenticated with Basic Auth\n\t... | 38.851852 | 202 | 0.629171 |
79462eac4ecd7abea170b7cf91e6544702553490 | 1,576 | py | Python | MachineLearning/Bayes/bayes_classifier.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 2 | 2019-01-24T15:06:59.000Z | 2019-01-25T07:34:45.000Z | MachineLearning/Bayes/bayes_classifier.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-12-23T09:45:11.000Z | 2019-12-23T09:45:11.000Z | MachineLearning/Bayes/bayes_classifier.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-07-18T14:21:35.000Z | 2019-07-18T14:21:35.000Z | import numpy as np
from sklearn import datasets
from ..utils.dataset_operator import normalize, train_test_split
class NaiveBayes:
def __init__(self):
self.parameters = {}
def fit(self, train_data, train_label):
classes = np.unique(train_label)
for category in classes:
ca... | 33.531915 | 85 | 0.617386 |
794631f9b53acc55436aaea406d76339833b7cee | 2,715 | py | Python | prefix_sum/min_avg_two_slice/solution.py | Mendes11/codility_solutions | 036d7e0f14ef626eaa35cb28a30bb98217b46887 | [
"MIT"
] | null | null | null | prefix_sum/min_avg_two_slice/solution.py | Mendes11/codility_solutions | 036d7e0f14ef626eaa35cb28a30bb98217b46887 | [
"MIT"
] | null | null | null | prefix_sum/min_avg_two_slice/solution.py | Mendes11/codility_solutions | 036d7e0f14ef626eaa35cb28a30bb98217b46887 | [
"MIT"
] | null | null | null | from itertools import zip_longest
def solution(A):
"""
A non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a slice of array A (notice that the slice contains at least two elements). The average of a slice (P, Q) is the sum of A[P] + A[P + 1] + .... | 31.206897 | 384 | 0.590424 |
79463245142582163931f0324587d9e405f6a209 | 1,815 | py | Python | download_user_unsplash_photos.py | Ourselp/unsplash-DigitalFrame | eb092aa4e845e7269bac744d9ba385e1c922cb6f | [
"MIT"
] | null | null | null | download_user_unsplash_photos.py | Ourselp/unsplash-DigitalFrame | eb092aa4e845e7269bac744d9ba385e1c922cb6f | [
"MIT"
] | null | null | null | download_user_unsplash_photos.py | Ourselp/unsplash-DigitalFrame | eb092aa4e845e7269bac744d9ba385e1c922cb6f | [
"MIT"
] | null | null | null | import pyunsplash
import requests
import os
import re
import json
import shutil
#If you have more than 50 photos on your account think about pushing your app for production otherwise you are limited to 50 api call / hour
pu = pyunsplash.PyUnsplash(api_key='YOUR API KEY')
def main():
pageNumber = 10
count = 0... | 36.3 | 140 | 0.558127 |
794632471808bb167f52bd0d2a42e5ac85edd449 | 993 | py | Python | data/earnings_data.py | dutraa/alpaca1 | 103eb3056ae6a561a75eca79b345b41c9e68e97c | [
"MIT"
] | null | null | null | data/earnings_data.py | dutraa/alpaca1 | 103eb3056ae6a561a75eca79b345b41c9e68e97c | [
"MIT"
] | null | null | null | data/earnings_data.py | dutraa/alpaca1 | 103eb3056ae6a561a75eca79b345b41c9e68e97c | [
"MIT"
] | 1 | 2022-03-22T19:18:06.000Z | 2022-03-22T19:18:06.000Z | class EarningsDate(object):
def __init__(
self,
ticker,
companyshortname,
startdatetime,
startdatetimetype,
epsestimate,
epsactual,
epssurprisepct,
gmtOffsetMilliSeconds):
"""Return a new PennyAlgo object."""
... | 34.241379 | 115 | 0.635448 |
7946339a7e7552fd8c447056aafd0e2939dcc5b6 | 6,488 | py | Python | L0_attack.py | abahram77/mnistChallenge | 94dca5a6c54b16cac44f1a429d96a5182be64a31 | [
"MIT"
] | null | null | null | L0_attack.py | abahram77/mnistChallenge | 94dca5a6c54b16cac44f1a429d96a5182be64a31 | [
"MIT"
] | null | null | null | L0_attack.py | abahram77/mnistChallenge | 94dca5a6c54b16cac44f1a429d96a5182be64a31 | [
"MIT"
] | null | null | null | """
Implementation of attack methods. Running this file as a program will
apply the attack to the model specified by the config file and store
the examples in an .npy file.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cv2
import os
import tenso... | 27.965517 | 105 | 0.60373 |
794633e9a3d0f3ebe147a8797f92cf019cfe841a | 6,102 | py | Python | __init__.py | MycroftAI/skill-naptime | 529ef9df1df29c9518ed5ddf452ecf402340672e | [
"Apache-2.0"
] | 2 | 2018-02-24T08:20:10.000Z | 2018-11-19T21:12:27.000Z | __init__.py | MycroftAI/skill-naptime | 529ef9df1df29c9518ed5ddf452ecf402340672e | [
"Apache-2.0"
] | 19 | 2017-12-11T15:54:43.000Z | 2022-03-27T23:51:48.000Z | __init__.py | MycroftAI/skill-naptime | 529ef9df1df29c9518ed5ddf452ecf402340672e | [
"Apache-2.0"
] | 26 | 2017-05-02T22:52:27.000Z | 2021-09-06T12:46:21.000Z | # Copyright 2017, Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 38.1375 | 78 | 0.635693 |
79463417774c03aa13964320dbbe17d00789245e | 2,128 | py | Python | tools_of_curiosity_app/t4c/views.py | Innovators-for-Purpose/tools-of-curiosity | 4fa02c10f8ce9e700dd0275ee7d5a46494638c5b | [
"MIT"
] | null | null | null | tools_of_curiosity_app/t4c/views.py | Innovators-for-Purpose/tools-of-curiosity | 4fa02c10f8ce9e700dd0275ee7d5a46494638c5b | [
"MIT"
] | 1 | 2021-07-28T15:26:58.000Z | 2021-07-28T15:26:58.000Z | tools_of_curiosity_app/t4c/views.py | Innovators-for-Purpose/tools-of-curiosity | 4fa02c10f8ce9e700dd0275ee7d5a46494638c5b | [
"MIT"
] | 6 | 2021-07-06T17:37:44.000Z | 2021-07-07T13:25:06.000Z | from django.shortcuts import render
from django.http import HttpResponse
from pprint import pprint
def index(request):
print("t4c/views.py @ index()")
pprint(request)
context = {}
return render(request, "t4c/index.html", context)
def aframedemo(request):
print("t4c/views.py @ aframedemo()")
... | 27.282051 | 65 | 0.648966 |
79463505f607536c52b371760d9c549454553c6a | 707 | py | Python | tests/test_dbf.py | simonwoerpel/ingest-file | 1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0 | [
"MIT"
] | 23 | 2017-05-25T01:08:58.000Z | 2019-06-22T19:35:50.000Z | tests/test_dbf.py | simonwoerpel/ingest-file | 1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0 | [
"MIT"
] | 153 | 2020-10-07T13:42:08.000Z | 2022-03-18T08:11:37.000Z | tests/test_dbf.py | simonwoerpel/ingest-file | 1ff68be0abb92e50bf726a1c8c1f8ff12d8b2fc0 | [
"MIT"
] | 9 | 2020-10-22T08:54:20.000Z | 2022-02-01T10:23:22.000Z | # -*- coding: utf-8 -*-
from .support import TestCase
class DBFIngestorTest(TestCase):
def test_simple_dbf(self):
fixture_path, entity = self.fixture("PAK_adm1.dbf")
self.manager.ingest(fixture_path, entity)
self.assertEqual(entity.first("processingStatus"), self.manager.STATUS_SUCCESS)
... | 39.277778 | 87 | 0.66761 |
794635b18ba1eb1151fc872d910da8b5bbcbc676 | 1,322 | py | Python | rclpy/topics/minimal_subscriber/setup.py | rpaaron/examples | 1877840376ddf2fde4e553333e282ee7034c049a | [
"Apache-2.0"
] | null | null | null | rclpy/topics/minimal_subscriber/setup.py | rpaaron/examples | 1877840376ddf2fde4e553333e282ee7034c049a | [
"Apache-2.0"
] | null | null | null | rclpy/topics/minimal_subscriber/setup.py | rpaaron/examples | 1877840376ddf2fde4e553333e282ee7034c049a | [
"Apache-2.0"
] | 1 | 2021-03-06T10:13:26.000Z | 2021-03-06T10:13:26.000Z | from setuptools import setup
package_name = 'examples_rclpy_minimal_subscriber'
setup(
name=package_name,
version='0.10.2',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package... | 33.05 | 91 | 0.658094 |
794635c63ebcae4296a49130b6dd20586d675944 | 3,185 | py | Python | src/ui_custom.py | vincentX3/TrainingRecords | 1863761356887b0d20448fc46cf57d00dbba77b2 | [
"MIT"
] | null | null | null | src/ui_custom.py | vincentX3/TrainingRecords | 1863761356887b0d20448fc46cf57d00dbba77b2 | [
"MIT"
] | null | null | null | src/ui_custom.py | vincentX3/TrainingRecords | 1863761356887b0d20448fc46cf57d00dbba77b2 | [
"MIT"
] | null | null | null | import sys
from PyQt5 import QtGui, QtWidgets, QtCore
from PyQt5.QtCore import QSize
from PyQt5.QtWidgets import QListWidgetItem, QWidget, QLabel, QLineEdit, QPushButton, QHBoxLayout, QApplication, \
QListWidget, QSpacerItem, QSizePolicy
from ui_macro import *
class TodoQListWidgetItem(QListWidgetItem):
def ... | 40.833333 | 114 | 0.616327 |
794635f2bdf0efaf87e79d5a39d22b158b83ce97 | 14,555 | py | Python | seoanalyzer_two/page.py | pythonscriptkiddie/python-seo-analyzer | e476cdd3ef5332657375b76578f19be315a2440f | [
"BSD-3-Clause"
] | null | null | null | seoanalyzer_two/page.py | pythonscriptkiddie/python-seo-analyzer | e476cdd3ef5332657375b76578f19be315a2440f | [
"BSD-3-Clause"
] | null | null | null | seoanalyzer_two/page.py | pythonscriptkiddie/python-seo-analyzer | e476cdd3ef5332657375b76578f19be315a2440f | [
"BSD-3-Clause"
] | null | null | null | import hashlib
import json
import os
import re
from bs4 import BeautifulSoup
from collections import Counter
from string import punctuation
from urllib.parse import urlsplit
from urllib3.exceptions import HTTPError
from seoanalyzer.http import http
from seoanalyzer.stemmer import stem
# This list of English stop wor... | 35.67402 | 133 | 0.5528 |
7946362425e412552236a68c8b31bc939c7107a1 | 1,111 | py | Python | _drafts/Linalg/transponering.py | Andremartiny/AndreMartiny.github.io | 54d6ebadb735bc865ee152a59d6ee964a0cf9c0c | [
"MIT"
] | null | null | null | _drafts/Linalg/transponering.py | Andremartiny/AndreMartiny.github.io | 54d6ebadb735bc865ee152a59d6ee964a0cf9c0c | [
"MIT"
] | null | null | null | _drafts/Linalg/transponering.py | Andremartiny/AndreMartiny.github.io | 54d6ebadb735bc865ee152a59d6ee964a0cf9c0c | [
"MIT"
] | null | null | null | import numpy as np
def transp(matrise):
return [[matrise[rad][kol] for rad in range(len(matrise))] for kol in range(len(matrise[0]))]
def matrisemult(mat1,mat2):
# Bør sjekke om det går å multiplisere
mat1rad = len(mat1) # Antall rader i matrise 1
mat2kol = len(mat2[0]) # antall kolonner i matrise 2... | 25.837209 | 97 | 0.577858 |
794636c5f95c48bcef1ee289d825f60c761f942b | 33,407 | py | Python | ironic/conductor/rpcapi.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | ironic/conductor/rpcapi.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | ironic/conductor/rpcapi.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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/li... | 46.078621 | 79 | 0.64723 |
7946374e036143a05e6a4b7e8aa1ef97ad901fad | 1,330 | py | Python | thewegmenu/utils/wegmans_utils.py | jzaia18/TheWegMenu | 2cef89bc9b881be37c2a54c1ff4ac52ee4c4b530 | [
"MIT"
] | 2 | 2020-02-26T16:43:07.000Z | 2021-03-19T20:03:58.000Z | thewegmenu/utils/wegmans_utils.py | jzaia18/TheWegMenu | 2cef89bc9b881be37c2a54c1ff4ac52ee4c4b530 | [
"MIT"
] | null | null | null | thewegmenu/utils/wegmans_utils.py | jzaia18/TheWegMenu | 2cef89bc9b881be37c2a54c1ff4ac52ee4c4b530 | [
"MIT"
] | 1 | 2021-06-19T03:43:04.000Z | 2021-06-19T03:43:04.000Z | import requests, os, json, sys
MAX_RESULTS = 1
DIR = os.path.dirname(__file__) or '.'
KEY = json.loads(open(DIR + "/../secrets.JSON").read())['wegmans']
headers = {
'Cache-Control': 'no-cache',
"Subscription-Key": KEY,
}
params = {
"api-version": "2018-10-18",
}
def get_skus(food):
query = {
... | 24.62963 | 102 | 0.615038 |
7946378dbb436e566d105fa17001f7a17515f8b4 | 11,103 | py | Python | experiments/2020-11-11-chg-sig/analysis/aggMaxFitChgEnv.py | mmore500/Tag-based-Genetic-Regulation-for-LinearGP | eda84198123cce32d8282d6920bf80b48d74c248 | [
"MIT"
] | 1 | 2021-09-17T13:17:07.000Z | 2021-09-17T13:17:07.000Z | experiments/2020-11-11-chg-sig/analysis/aggMaxFitChgEnv.py | mmore500/Tag-based-Genetic-Regulation-for-LinearGP | eda84198123cce32d8282d6920bf80b48d74c248 | [
"MIT"
] | 1 | 2020-11-09T16:52:34.000Z | 2020-12-11T02:32:40.000Z | experiments/2020-11-11-chg-sig/analysis/aggMaxFitChgEnv.py | mmore500/Tag-based-Genetic-Regulation-for-LinearGP | eda84198123cce32d8282d6920bf80b48d74c248 | [
"MIT"
] | 2 | 2021-08-11T00:08:01.000Z | 2021-08-12T18:14:45.000Z | '''
This is a utility script for aggregating data (on MSU's HPCC) for this experiment.
WARNING: this script might not age well (makes assumptions about file systems, etc)!
For each run, grab the maximum fitness organism at end of run.
'''
import argparse, os, copy, errno, csv, re, sys
import hjson,json
csv.field_si... | 43.541176 | 242 | 0.646942 |
794639c68dcadd609799a0180bdea577c3ada072 | 7,471 | py | Python | nni/retiarii/oneshot/pytorch/random.py | ggzhang0071/nni | f4145e62d89c3ca383cf00f2de5dfd2d1025ad92 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | nni/retiarii/oneshot/pytorch/random.py | soma2000-lang/nni | eaad98528c7aa714c9848800d607d6aa3bdd531d | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | nni/retiarii/oneshot/pytorch/random.py | soma2000-lang/nni | eaad98528c7aa714c9848800d607d6aa3bdd531d | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import logging
import random
import torch
import torch.nn as nn
from ..interface import BaseOneShotTrainer
from .utils import AverageMeterGroup, replace_layer_choice, replace_input_choice, to_device
_logger = logging.getLogger(__name__)
def... | 36.622549 | 131 | 0.614376 |
79463aa6179ea893e72e58e04173fa5dca696507 | 536 | py | Python | ex15_face.py | Yasir323/Image-Processing | 1301492444182ee89eb20f37571e2f18b58de8eb | [
"MIT"
] | null | null | null | ex15_face.py | Yasir323/Image-Processing | 1301492444182ee89eb20f37571e2f18b58de8eb | [
"MIT"
] | null | null | null | ex15_face.py | Yasir323/Image-Processing | 1301492444182ee89eb20f37571e2f18b58de8eb | [
"MIT"
] | null | null | null | import cv2
face_cascade = cv2.CascadeClassifier('data/haarcascade_frontalface_default.xml')
img = cv2.imread('data/melissa.jpg')
new_width = 320
scale_factor = new_width / img.shape[1]
new_height = scale_factor * img.shape[0]
new_shape = (new_width, int(new_height))
img = cv2.resize(img, new_shape)
img_gray = cv2.cvt... | 31.529412 | 80 | 0.727612 |
79463ac174641f0eab4745a982f77d383c42f94b | 7,916 | py | Python | docs/conf.py | vijethmoudgalya/admissiondvc | 3bd0f3e580890d0915222169da7754f49c5e75e7 | [
"MIT"
] | null | null | null | docs/conf.py | vijethmoudgalya/admissiondvc | 3bd0f3e580890d0915222169da7754f49c5e75e7 | [
"MIT"
] | null | null | null | docs/conf.py | vijethmoudgalya/admissiondvc | 3bd0f3e580890d0915222169da7754f49c5e75e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# wineqdvc documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have ... | 32.310204 | 85 | 0.709197 |
79463cd47a9c84d7a471016812bdf6cbf5e7e76b | 1,537 | py | Python | base64stego.py | itungsten/miscScripts | c43378247525a2b8a48b906b3a19cf9847e4c845 | [
"MIT"
] | null | null | null | base64stego.py | itungsten/miscScripts | c43378247525a2b8a48b906b3a19cf9847e4c845 | [
"MIT"
] | null | null | null | base64stego.py | itungsten/miscScripts | c43378247525a2b8a48b906b3a19cf9847e4c845 | [
"MIT"
] | null | null | null | # stego.txt为待解密的base64隐写字符串所在的文件
# 一行一个base64编码,其中任意一行可以无隐藏数据
f = open('stego.txt','r')
import re
import base64
b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
base64str = f.readline()
# pattern2用于匹配两个等号情况时,等号前的一个字符
# pattern2用于匹配一个等号情况时,等号前的一个字符
pattern2 = r'(\S)==$'
... | 30.137255 | 78 | 0.657124 |
79463d3216ad735052a2a9548776c6c03cfcf02e | 1,343 | py | Python | app/core/tests/test_admin.py | underdog418/django-recipe | 4007d016deaac003c11e4ab2c44aa4c78347deac | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | underdog418/django-recipe | 4007d016deaac003c11e4ab2c44aa4c78347deac | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | underdog418/django-recipe | 4007d016deaac003c11e4ab2c44aa4c78347deac | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@abc.com',
... | 31.232558 | 68 | 0.635145 |
79463ffcf1da22067bf9a2305f9c5c7001bec16b | 8,351 | py | Python | test/functional/assumevalid.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 77 | 2018-07-04T14:03:42.000Z | 2021-12-19T17:11:14.000Z | test/functional/assumevalid.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 89 | 2018-06-20T03:48:55.000Z | 2022-02-10T06:50:56.000Z | test/functional/assumevalid.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 40 | 2018-06-15T12:59:35.000Z | 2021-12-12T15:49:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for skipping signature validation on old blocks.
Test logic for skipping signature validati... | 41.547264 | 107 | 0.629505 |
794640faeb0b06ea4be50c2d13245de9618dea97 | 2,163 | py | Python | Python-toolchain/2D/png_to_v_copper_list.py | astrofra/demo-unusual-suspects | 917c9d07aeaff86cc65793219f28865e55e5dc76 | [
"MIT"
] | 8 | 2015-05-19T22:02:17.000Z | 2017-10-03T18:40:28.000Z | Python-toolchain/2D/png_to_v_copper_list.py | astrofra/demo-unusual-suspects | 917c9d07aeaff86cc65793219f28865e55e5dc76 | [
"MIT"
] | 2 | 2020-03-29T16:14:20.000Z | 2020-03-29T16:19:15.000Z | Rog-Amiga-Remake/Python-toolchain/2D/png_to_v_copper_list.py | astrofra/amiga-experiments | 07b39cdcc581cb64711eb48caa54a4d90ca47811 | [
"MIT"
] | 3 | 2017-10-11T23:50:19.000Z | 2018-07-21T16:11:29.000Z | ## png_to_copper_list.py
import png
import math
import colorsys
filename_in = ['gradient.png', 'blue_gradient.png']
filename_out = '../../Assets/vert_copper_palettes'
global fc, fh
def main():
print('png_to_vertical_copper_list')
fc = open(filename_out + '.c', 'w')
fc.write('/* Vertical copper list... | 25.75 | 112 | 0.588534 |
7946415964c7d610a104b551b9350632a79e91f8 | 2,677 | py | Python | annotator.py | 0berry/CVE-analyzer | ba0bd71e60ba330616594df8f51ad4417d318d86 | [
"MIT"
] | 12 | 2019-05-10T07:58:30.000Z | 2021-10-19T01:39:06.000Z | annotator.py | 0berry/CVE-analyzer | ba0bd71e60ba330616594df8f51ad4417d318d86 | [
"MIT"
] | 3 | 2021-08-04T06:11:26.000Z | 2022-02-27T17:08:18.000Z | annotator.py | 0berry/CVE-analyzer | ba0bd71e60ba330616594df8f51ad4417d318d86 | [
"MIT"
] | 3 | 2019-07-25T09:35:17.000Z | 2022-03-22T10:29:32.000Z | import csv
import json
import sys
import re
import en_core_web_lg
def usage():
print 'usage: python annotator.py <path_to_dataset_in_csv> <output_file>'
def _get_annotations(desc, pattern, label):
regex = re.compile(pattern)
return [(match.start(), match.start() + len(match.group()), label) for match in... | 27.316327 | 106 | 0.615614 |
7946420b133425777c2367020fe5b937f948de9f | 721 | py | Python | modules/pseudo_rs_op.py | shahrukhqasim/HGCalML | 2808564b31c89d9b7eb882734f6aebc6f35e94f3 | [
"BSD-3-Clause"
] | null | null | null | modules/pseudo_rs_op.py | shahrukhqasim/HGCalML | 2808564b31c89d9b7eb882734f6aebc6f35e94f3 | [
"BSD-3-Clause"
] | null | null | null | modules/pseudo_rs_op.py | shahrukhqasim/HGCalML | 2808564b31c89d9b7eb882734f6aebc6f35e94f3 | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
def CreatePseudoRS(asso_idx, data):
'''
returns:
- indices to gather_nd the data back to original sorting
- pseudo row splits
- resorted data, according to the pseudo RS
'''
ids = tf.range(tf.shape(asso_idx)[0],dtype='int32')
args = tf.argsort(asso_idx, a... | 30.041667 | 106 | 0.647712 |
79464283c0c8f4ea4127782d5bdb95dd90d2c02d | 1,821 | py | Python | norms.py | ishine/AFRCNN-For-Speech-Separation | 8be8a33b87c7e294296c141c861f84736982a7c2 | [
"MIT"
] | 108 | 2021-10-06T08:42:48.000Z | 2022-03-28T09:16:14.000Z | norms.py | mtxing/AFRCNN-For-Speech-Separation | 2d2d20e23731279affd797441252e25401451f0d | [
"MIT"
] | 2 | 2022-03-16T09:20:21.000Z | 2022-03-30T12:24:11.000Z | norms.py | mtxing/AFRCNN-For-Speech-Separation | 2d2d20e23731279affd797441252e25401451f0d | [
"MIT"
] | 33 | 2021-10-11T09:00:30.000Z | 2022-03-24T12:15:42.000Z | import torch
import torch.nn as nn
class ChannelWiseLayerNorm(nn.LayerNorm):
"""
Channel wise layer normalization
"""
def __init__(self, *args, **kwargs):
super(ChannelWiseLayerNorm, self).__init__(*args, **kwargs)
def forward(self, x):
"""
x: N x C x T
"""
... | 29.852459 | 74 | 0.572213 |
7946438fb7d5b3709913492930b2f7039896a158 | 302 | py | Python | CCC/Junior/RTE_16_J1_Board_Game.py | DestroyedEpisode/Python-Projects | d795fd3c7b471f08087ee3f4d2ecb58710687ce2 | [
"MIT"
] | null | null | null | CCC/Junior/RTE_16_J1_Board_Game.py | DestroyedEpisode/Python-Projects | d795fd3c7b471f08087ee3f4d2ecb58710687ce2 | [
"MIT"
] | null | null | null | CCC/Junior/RTE_16_J1_Board_Game.py | DestroyedEpisode/Python-Projects | d795fd3c7b471f08087ee3f4d2ecb58710687ce2 | [
"MIT"
] | null | null | null | x = ''.join(input().split())
maximum = 0
tmp = 0
for i in range(len(x)):
if x[i] != 'L':
tmp = 0
else :
if i > 0 and i < len(x)-1:
tmp += 1
elif i == 0:
tmp += 1
elif i == len(x)-1:
tmp += 1
if tmp > maximum:
maximum = tmp
print(x.count('L'), maximum)
| 14.380952 | 30 | 0.453642 |
7946439425f43bf42f95979f31147aa5638f3136 | 17,986 | py | Python | tests/test_config.py | mjmunger/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | 7 | 2017-11-15T19:25:37.000Z | 2022-01-20T01:30:56.000Z | tests/test_config.py | DrDamnit/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | 40 | 2020-05-19T19:46:20.000Z | 2020-11-12T16:13:55.000Z | tests/test_config.py | mjmunger/PolyPyTools | 116014a47479f360ee73006d6ba3ddc7f362c7a1 | [
"MIT"
] | null | null | null | import unittest
import os.path
import json
import copy
import site
from tempfile import NamedTemporaryFile
from tempfile import TemporaryDirectory
from unittest_data_provider import data_provider
from poly_py_tools.polypy_config import PolypyConfig
from poly_py_tools.column_mapper import ColumnMapper
from unittest.m... | 43.868293 | 342 | 0.625431 |
794643c69737bbbfbdd141e078f2c15329996552 | 496 | py | Python | dqn/dqn_torch/networks.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | dqn/dqn_torch/networks.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | dqn/dqn_torch/networks.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class Q_Network(nn.Module):
def __init__(self, states, actions, hidden=[64,64]):
super(Q_Network, self).__init__()
self.fc1 = nn.Linear(states, hidden[0])
self.fc2 = nn.Linear(hidden[0], hidden[1])
self.fc3 = nn.Line... | 27.555556 | 56 | 0.594758 |
7946445db47174945f81ce7f9131ba7ac0a4e6e7 | 4,350 | py | Python | voxsql/parser.py | ccortezia/sqlnox | c1038359b62057fb67780a7755ef26ad95865686 | [
"MIT"
] | 1 | 2021-11-03T13:16:32.000Z | 2021-11-03T13:16:32.000Z | voxsql/parser.py | ccortezia/sqlnox | c1038359b62057fb67780a7755ef26ad95865686 | [
"MIT"
] | 1 | 2021-02-05T14:58:49.000Z | 2021-02-11T19:14:37.000Z | voxsql/parser.py | ccortezia/voxsql | c1038359b62057fb67780a7755ef26ad95865686 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import List
from .framer import read_frames, BaseFrame
from .utils import text_block, text_field
from .regexes import (
REGEX_DESCRIPTION,
REGEX_NAME,
REGEX_DIALECT,
REGEX_PARAM,
REGEX_RETMODE,
REGEX_RETVAL,
)
__all__ = ['parse']
# --------------... | 25.892857 | 100 | 0.541379 |
794644bfba342d60b2a4f6f05bf2d222bd169bf1 | 7,088 | py | Python | asn/serializers.py | chinxianjun2016/GreaterWMS | aacd0e15e0114f103eb57002e93670c008cce63b | [
"Apache-2.0"
] | null | null | null | asn/serializers.py | chinxianjun2016/GreaterWMS | aacd0e15e0114f103eb57002e93670c008cce63b | [
"Apache-2.0"
] | null | null | null | asn/serializers.py | chinxianjun2016/GreaterWMS | aacd0e15e0114f103eb57002e93670c008cce63b | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from .models import AsnListModel, AsnDetailModel
from userprofile.models import Users
import re
from rest_framework.exceptions import APIException
def data_validate(data):
script_obj = re.findall(r'script', str(data), re.IGNORECASE)
select_obj = re.findall(r'select', str(... | 50.628571 | 101 | 0.724464 |
794645faf5370563445912c1608de9b100a62b6f | 52,091 | py | Python | python/tests/test_validity.py | HDembinski/aghast | f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95 | [
"BSD-3-Clause"
] | 18 | 2019-04-15T14:39:35.000Z | 2021-12-21T15:01:02.000Z | python/tests/test_validity.py | HDembinski/aghast | f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95 | [
"BSD-3-Clause"
] | 27 | 2019-04-12T20:24:00.000Z | 2021-12-03T08:51:56.000Z | python/tests/test_validity.py | diana-hep/stagg | ed97e9abc870e729d300622253aa7e9c870f77ec | [
"BSD-3-Clause"
] | 11 | 2019-04-15T14:41:00.000Z | 2021-11-16T13:28:10.000Z | #!/usr/bin/env python
# BSD 3-Clause License; see https://github.com/scikit-hep/aghast/blob/master/LICENSE
import unittest
import numpy
from aghast import *
class Test(unittest.TestCase):
def runTest(self):
pass
def test_validity_Metadata(self):
h = Collection(
{}, metadata=Me... | 34.796927 | 88 | 0.378683 |
794646029a4c1f751923da3acf7504bee09bafac | 3,268 | py | Python | smilesmerge/operators/filter/filter_classes/filter_children_classes/mozziconacci_filter.py | Jacob-Spiegel/SMILESMerge | 0f98a3a5739cab7e9bbae768d11c65420b5061c1 | [
"Apache-2.0"
] | 1 | 2021-06-29T14:09:43.000Z | 2021-06-29T14:09:43.000Z | smilesmerge/operators/filter/filter_classes/filter_children_classes/mozziconacci_filter.py | Jacob-Spiegel/SMILESMerge | 0f98a3a5739cab7e9bbae768d11c65420b5061c1 | [
"Apache-2.0"
] | null | null | null | smilesmerge/operators/filter/filter_classes/filter_children_classes/mozziconacci_filter.py | Jacob-Spiegel/SMILESMerge | 0f98a3a5739cab7e9bbae768d11c65420b5061c1 | [
"Apache-2.0"
] | 1 | 2021-06-29T14:09:48.000Z | 2021-06-29T14:09:48.000Z | """Mozziconacci Filter
This runs a Mozziconacci filter. Mozziconacci filter is a filter for
Drug-likeliness which filters molecules by the number of: rotatable bonds,
rings, oxygens, and halogens.
To pass the filter a molecule must be:
# of Rotatable bonds: Max 15
# of Rings: Max 6
# of Oxygens: Min 1
... | 32.68 | 88 | 0.672277 |
7946462b40a70c3060b0b5fde40a90580b5c0a98 | 6,408 | py | Python | DOS_process/plot_DOS_by_elements/Plot_PDOS_by_elements.py | bitsoal/auxiliary_scripts_for_vasp | 2c3e34d2cf062fd4cca4c31311db1a7c87e8812c | [
"MIT"
] | null | null | null | DOS_process/plot_DOS_by_elements/Plot_PDOS_by_elements.py | bitsoal/auxiliary_scripts_for_vasp | 2c3e34d2cf062fd4cca4c31311db1a7c87e8812c | [
"MIT"
] | null | null | null | DOS_process/plot_DOS_by_elements/Plot_PDOS_by_elements.py | bitsoal/auxiliary_scripts_for_vasp | 2c3e34d2cf062fd4cca4c31311db1a7c87e8812c | [
"MIT"
] | 2 | 2019-04-24T02:59:35.000Z | 2019-12-14T03:20:07.000Z |
# coding: utf-8
# In[1]:
from pymatgen.io.vasp.outputs import Vasprun
#from pymatgen.electronic_structure.plotter
from pymatgen.io.vasp.outputs import Orbital, Spin
from pymatgen import Structure
import numpy as np
import matplotlib.pyplot as plt
#%matplotlib inline
import os, glob
# In[2]:
def sum_pdos(pdos_... | 36.827586 | 167 | 0.640605 |
794646801215762abacb67363f18595932ef05c8 | 4,308 | py | Python | models/matcher.py | xieenze/detr | 13bdf0bf59fead571cd793a01eae50e7620fc6a2 | [
"Apache-2.0"
] | null | null | null | models/matcher.py | xieenze/detr | 13bdf0bf59fead571cd793a01eae50e7620fc6a2 | [
"Apache-2.0"
] | null | null | null | models/matcher.py | xieenze/detr | 13bdf0bf59fead571cd793a01eae50e7620fc6a2 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Modules to compute the matching cost and solve the corresponding LSAP.
"""
import torch
from scipy.optimize import linear_sum_assignment
from torch import nn
from util.box_ops import box_cxcywh_to_xyxy, generalized_box_iou
from IPython import e... | 48.404494 | 119 | 0.672238 |
794647a6249abebec76f32cc14d0547932c3ec53 | 158 | py | Python | Operators_pro.py | iceboy07/Python_proj | 4565bfd148722731a6b87ffedc8b6473528a22bb | [
"MIT"
] | null | null | null | Operators_pro.py | iceboy07/Python_proj | 4565bfd148722731a6b87ffedc8b6473528a22bb | [
"MIT"
] | null | null | null | Operators_pro.py | iceboy07/Python_proj | 4565bfd148722731a6b87ffedc8b6473528a22bb | [
"MIT"
] | null | null | null | a=9
b=3
print("a=",a)
print("b=",b)
print("a + b=",a+b)
print("a - b=",a-b)
print("a * b=",a*b)
print("a / b=",a/b)
print("a % b=",a%b)
print("a pow b=",a**b) | 15.8 | 22 | 0.474684 |
794647ad77240580564b1e5059f66cc549053d99 | 557 | py | Python | ex-mundo2/ex060.py | PedroPegado/ex-cursoemvideo | 46751a7238e6a142b639c4cc3acf1759411732d7 | [
"MIT"
] | null | null | null | ex-mundo2/ex060.py | PedroPegado/ex-cursoemvideo | 46751a7238e6a142b639c4cc3acf1759411732d7 | [
"MIT"
] | null | null | null | ex-mundo2/ex060.py | PedroPegado/ex-cursoemvideo | 46751a7238e6a142b639c4cc3acf1759411732d7 | [
"MIT"
] | null | null | null | #import math
#x = int(input('Qual número deseja fatorar? '))
#f = math.factorial(x)
#print(f'O fatorial de {x} é {f}')
num = int(input('Qual número deseja fatorar? '))
c = num
f = 1
print(f'calculando {num}!',end=' = ')
while c > 0:
print(f'{c}', end='')
print(' x ' if c > 1 else ' = ', end='')
f *= c
... | 19.892857 | 48 | 0.506284 |
794647d7dbdc01e29fcc2b5dd73e98f181109b05 | 3,075 | py | Python | train_utils/lr_schemes.py | maxdel/CipherGAN | 367be620d56a0cdc88a49bcdc5123d5bc5e6f122 | [
"MIT"
] | 131 | 2018-01-15T17:13:44.000Z | 2022-03-01T09:57:40.000Z | train_utils/lr_schemes.py | maxdel/CipherGAN | 367be620d56a0cdc88a49bcdc5123d5bc5e6f122 | [
"MIT"
] | 13 | 2018-06-01T12:40:24.000Z | 2022-02-09T23:26:52.000Z | train_utils/lr_schemes.py | maxdel/CipherGAN | 367be620d56a0cdc88a49bcdc5123d5bc5e6f122 | [
"MIT"
] | 29 | 2018-01-16T11:47:02.000Z | 2022-03-01T10:16:45.000Z | import tensorflow as tf
_LR = dict()
def register(name):
def add_to_dict(fn):
global _LR
_LR[name] = fn
return fn
return add_to_dict
def get_lr(params):
return _LR[params.lr_scheme](params)
@register("constant")
def constant(params):
return params.learning_rate
@register("exp")
def expone... | 26.282051 | 79 | 0.708943 |
794648069e96afcb9bf659a0b2f81ed33d33e60d | 2,221 | py | Python | card.py | abalesluke/carding | 4961fd6d167bb07795887ff03c6fe85a23452d14 | [
"CC0-1.0"
] | null | null | null | card.py | abalesluke/carding | 4961fd6d167bb07795887ff03c6fe85a23452d14 | [
"CC0-1.0"
] | null | null | null | card.py | abalesluke/carding | 4961fd6d167bb07795887ff03c6fe85a23452d14 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python3
import random, time, os
#sololearn bin = 5235915354xxxxxx
try:
from colorama import Fore
from credit_card_checker import CreditCardChecker as ccc
f = Fore
r = f.RED
y = f.YELLOW
g = f.GREEN
b = f.BLUE
def menu():
print(f"""{y}
| |
|========================... | 21.563107 | 135 | 0.529941 |
794648b42f2ef13508e219a55d915416a8d9b950 | 1,054 | py | Python | fedjax/aggregators/__init__.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | 143 | 2020-12-24T03:30:02.000Z | 2022-03-29T04:07:18.000Z | fedjax/aggregators/__init__.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | 14 | 2021-01-08T21:29:17.000Z | 2022-03-07T23:17:23.000Z | fedjax/aggregators/__init__.py | alshedivat/fedjax | ff46ba9955f167160353d7be72f6f5e1febee32c | [
"Apache-2.0"
] | 24 | 2021-01-09T04:39:26.000Z | 2022-03-29T04:07:11.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.16 | 77 | 0.816888 |
7946491ca223db24c740732226f26e34b637b45b | 2,395 | py | Python | crypto_notifications.py | stylepatrick/crypto_notifications | 4f269915ea632f8bd4546510e71be03db804001a | [
"MIT"
] | null | null | null | crypto_notifications.py | stylepatrick/crypto_notifications | 4f269915ea632f8bd4546510e71be03db804001a | [
"MIT"
] | null | null | null | crypto_notifications.py | stylepatrick/crypto_notifications | 4f269915ea632f8bd4546510e71be03db804001a | [
"MIT"
] | null | null | null | import requests
import time
from datetime import datetime, timedelta
BITCOIN_PRICE_THRESHOLD = 9000
BITCOIN_API_URL = 'https://api.coinmarketcap.com/v1/ticker/bitcoin/'
IFTTT_WEBHOOKS_URL = 'https://maker.ifttt.com/trigger/{}/with/key/{YOUR-IFTTT-KEY}'
def get_latest_bitcoin_price():
response = requests.get(BITCO... | 40.59322 | 136 | 0.665136 |
7946495b586790537d0d92fecb16f222be81f891 | 16,959 | py | Python | prog-o-meter.py | krishane2018/prog-o-meter | 108356b81a5802864d3a03a3a4a117ff491b2cce | [
"MIT"
] | null | null | null | prog-o-meter.py | krishane2018/prog-o-meter | 108356b81a5802864d3a03a3a4a117ff491b2cce | [
"MIT"
] | null | null | null | prog-o-meter.py | krishane2018/prog-o-meter | 108356b81a5802864d3a03a3a4a117ff491b2cce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The Prog-o-meter.py program is for tracking progress during a #100DaysofCode challenge (or any other #100DaysofX challenge).
The program gives a graphic overview of ones progress through the challenge, by showing a bar containing 100 fields, showing completed days... | 51.23565 | 285 | 0.648741 |
7946497868341e8d158167f99c8ed9e31b10b68d | 67 | py | Python | Chapter04/testscript.py | PacktPublishing/Practical-Network-Automation | fa0e7e81869162fe578cf85166fdccca2acdd418 | [
"MIT"
] | 20 | 2017-12-06T10:53:01.000Z | 2022-02-28T05:13:09.000Z | Chapter04/testscript.py | larisk8ter/Practical-Network-Automation | fa0e7e81869162fe578cf85166fdccca2acdd418 | [
"MIT"
] | null | null | null | Chapter04/testscript.py | larisk8ter/Practical-Network-Automation | fa0e7e81869162fe578cf85166fdccca2acdd418 | [
"MIT"
] | 16 | 2018-02-19T16:16:00.000Z | 2022-02-24T17:06:19.000Z | print('Content-Type: text/plain')
print('')
print('Hello, world!')
| 16.75 | 33 | 0.671642 |
79464b4a04c6e7f064c5353fea799b240a5f7646 | 936 | py | Python | programme/migrations/0057_room_event.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 13 | 2015-11-29T12:19:12.000Z | 2021-02-21T15:42:11.000Z | programme/migrations/0057_room_event.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 23 | 2015-04-29T19:43:34.000Z | 2021-02-10T05:50:17.000Z | programme/migrations/0057_room_event.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 11 | 2015-09-20T18:59:00.000Z | 2020-02-07T08:47:34.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-11-09 17:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0029_auto_20170827_1818'),
('programme', '0056_auto_20171104_1806'),
]
oper... | 31.2 | 146 | 0.605769 |
79464b74ba04907821d550c95a426dbaf84dcabb | 73 | py | Python | easy_maps/__init__.py | cyber-barrista/django-easy-maps | 8c0e414f3c48a606dbe471ea8f8e3d06425638db | [
"MIT"
] | null | null | null | easy_maps/__init__.py | cyber-barrista/django-easy-maps | 8c0e414f3c48a606dbe471ea8f8e3d06425638db | [
"MIT"
] | null | null | null | easy_maps/__init__.py | cyber-barrista/django-easy-maps | 8c0e414f3c48a606dbe471ea8f8e3d06425638db | [
"MIT"
] | null | null | null | __version__ = "1.1.2"
import warnings
warnings.simplefilter("default")
| 12.166667 | 32 | 0.753425 |
79464c19c7e29dfa36f005a448d64b0b01e3b977 | 93 | py | Python | Vetor.py | pedrorsvalle/python | 88f51ff3135447b3529298e060dd57b15a206130 | [
"MIT"
] | null | null | null | Vetor.py | pedrorsvalle/python | 88f51ff3135447b3529298e060dd57b15a206130 | [
"MIT"
] | null | null | null | Vetor.py | pedrorsvalle/python | 88f51ff3135447b3529298e060dd57b15a206130 | [
"MIT"
] | null | null | null | vetorlist= [2,3,5,7,11]
i=0
while i < len(vetorlist):
print(vetorlist[i])
i=i+1
| 15.5 | 26 | 0.569892 |
79464c2a7797ad532a10220b785aa126d7dc7296 | 2,523 | py | Python | sdks/python/apache_beam/utils/proto_utils.py | kordek/beam | 65de8b5d40c4806f59da588e68611d4672734eec | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/utils/proto_utils.py | kordek/beam | 65de8b5d40c4806f59da588e68611d4672734eec | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/utils/proto_utils.py | kordek/beam | 65de8b5d40c4806f59da588e68611d4672734eec | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 27.725275 | 96 | 0.743559 |
79464e23a46727bddcf8fd4e60f1a941da7ea274 | 5,326 | py | Python | lib/galaxy/tools/deps/resolvers/brewed_tool_shed_packages.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/tools/deps/resolvers/brewed_tool_shed_packages.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/tools/deps/resolvers/brewed_tool_shed_packages.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | null | null | null | """
This dependency resolver resolves tool shed dependencies (those defined
tool_dependencies.xml) installed using Platform Homebrew and converted
via shed2tap (e.g. https://github.com/jmchilton/homebrew-toolshed).
"""
import logging
import os
from xml.etree import ElementTree as ET
from .resolver_mixins import (
... | 35.271523 | 105 | 0.693203 |
79464e6956844697460966d6c2077ccd409fdcd4 | 13,854 | py | Python | api_level_2/qt/valkkafs.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 12 | 2018-06-28T13:40:53.000Z | 2022-01-07T12:46:15.000Z | api_level_2/qt/valkkafs.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 6 | 2019-04-29T16:55:38.000Z | 2022-03-04T17:00:15.000Z | api_level_2/qt/valkkafs.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 5 | 2019-04-21T15:42:55.000Z | 2021-08-16T10:53:30.000Z | """
valkkafs.py : Framefilter chains for simultaneous decoding, presenting and reading / writing frames to ValkkaFS
* Copyright 2017-2020 Valkka Security Ltd. and Sampsa Riikonen
*
* Authors: Sampsa Riikonen <sampsa.riikonen@iki.fi>
*
* This file is part of the Valkka library.
*
* Valkka is free software: you ... | 36.55409 | 175 | 0.548939 |
79464e7a260c7fa76dd9eb8bfbc93f46605a5ab6 | 2,429 | py | Python | flask/camera.py | mscschliemann/final_project | 6d3b1ff6288bfbd14997d0a64877ebc4294de82f | [
"MIT"
] | null | null | null | flask/camera.py | mscschliemann/final_project | 6d3b1ff6288bfbd14997d0a64877ebc4294de82f | [
"MIT"
] | null | null | null | flask/camera.py | mscschliemann/final_project | 6d3b1ff6288bfbd14997d0a64877ebc4294de82f | [
"MIT"
] | null | null | null | import cv2
from classfiles.yolo_hand import YOLO
from opencv_convex_hull import cv_process
class VideoCamera(object):
def __init__(self):
# Using OpenCV to capture from device 0. If you have trouble capturing
# from a webcam, comment the line below out and use a video file
# instead.
... | 38.555556 | 100 | 0.599424 |
79464ede837992597060035ea9f6ffb3de562dd3 | 1,469 | py | Python | utils/tests/test_views.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 127 | 2017-10-12T00:27:45.000Z | 2020-08-07T11:13:55.000Z | utils/tests/test_views.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 247 | 2017-12-26T12:55:34.000Z | 2020-08-08T11:57:35.000Z | utils/tests/test_views.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 63 | 2017-10-13T06:46:05.000Z | 2020-08-08T00:41:57.000Z | import uuid
from django.contrib.auth.models import User
from utils.enums import ObjectChangeAction
from utils.models import ObjectChange, Tag
from utils.testing import ViewTestCases
class ObjectChangeTestCase(ViewTestCases.ReadOnlyObjectViewTestCase):
model = ObjectChange
test_changelog_object = None
t... | 25.77193 | 69 | 0.603812 |
79464efeae8c8fa3200d4558949587bd6ad306fc | 2,167 | py | Python | mongodb_dialect/connection.py | kitfactory/mongodb_dialect | 1746d2aca08be4b12adb74e3a6806f8d840f6382 | [
"MIT"
] | null | null | null | mongodb_dialect/connection.py | kitfactory/mongodb_dialect | 1746d2aca08be4b12adb74e3a6806f8d840f6382 | [
"MIT"
] | null | null | null | mongodb_dialect/connection.py | kitfactory/mongodb_dialect | 1746d2aca08be4b12adb74e3a6806f8d840f6382 | [
"MIT"
] | null | null | null | import os
# import pandas as pd
from sqlalchemy import types
# from ps_parser import PandasSqlParser
from .cursor import MongoDBDialectCursor
from .log import logger
class MongoDBDialectConnection(object):
# TODO Here should be modified
FILE_DIR = '/vagrant'
def __init__(self, username=None, password=N... | 30.521127 | 111 | 0.651131 |
79464f12f31e0da32d4475d26a399c436465c27f | 92 | py | Python | bin/start-server.py | IzioDev/gitmaster-chatbot | f0e119f4bfd7cf62c0942a2b821272b1d59509cf | [
"MIT"
] | null | null | null | bin/start-server.py | IzioDev/gitmaster-chatbot | f0e119f4bfd7cf62c0942a2b821272b1d59509cf | [
"MIT"
] | 4 | 2021-10-06T18:32:37.000Z | 2022-02-27T06:23:56.000Z | bin/start-server.py | IzioDev/gitmaster-chatbot | f0e119f4bfd7cf62c0942a2b821272b1d59509cf | [
"MIT"
] | null | null | null | import subprocess
subprocess.run("rasa run actions --auto-reload", shell=True, check=True)
| 23 | 72 | 0.771739 |
7946505dded0b5a47aea545d71c5f54731ad31b8 | 2,600 | py | Python | src/python/pants/engine/engine_aware.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 1 | 2021-02-22T18:11:26.000Z | 2021-02-22T18:11:26.000Z | src/python/pants/engine/engine_aware.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 13 | 2022-02-18T22:52:57.000Z | 2022-03-30T10:11:29.000Z | src/python/pants/engine/engine_aware.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | 2 | 2021-05-11T07:51:26.000Z | 2021-05-19T10:14:46.000Z | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from abc import ABC
from typing import Any, Optional
from pants.engine.fs import FileDigest, Snapshot
from pants.util.logging import LogLevel
class E... | 38.80597 | 100 | 0.689615 |
7946506148a0502c84b47c13173e1863b700995b | 48 | py | Python | ipyvuetify/extra/__init__.py | Carifio24/ipyvuetify | 59a9922ed93d1d5e61593243985566bc473caa98 | [
"MIT"
] | 242 | 2019-05-14T17:55:18.000Z | 2022-02-09T15:57:12.000Z | ipyvuetify/extra/__init__.py | guimillet/ipyvuetify | 6acd14a567e5b477b1f2baa5c92f0429b459139a | [
"MIT"
] | 172 | 2019-05-20T18:32:00.000Z | 2022-02-15T11:05:17.000Z | ipyvuetify/extra/__init__.py | guimillet/ipyvuetify | 6acd14a567e5b477b1f2baa5c92f0429b459139a | [
"MIT"
] | 44 | 2019-05-14T18:41:48.000Z | 2022-02-03T17:51:24.000Z | from .file_input import FileInput # noqa: F401
| 24 | 47 | 0.770833 |
7946521b1c3aff5788fd7caac5148ef434d2a17b | 4,456 | py | Python | bin/finalize_microbiome_entities.py | nf-core/metapep | 8229ef0d1086681e7d7094f1e794725b0e5011f9 | [
"MIT"
] | 1 | 2021-11-19T17:19:28.000Z | 2021-11-19T17:19:28.000Z | bin/finalize_microbiome_entities.py | AntoniaSchuster/metapep | a425e3c0602d5149a8a634b10b682d9f6ed924c8 | [
"MIT"
] | 34 | 2020-12-07T19:46:25.000Z | 2021-01-25T14:44:42.000Z | bin/finalize_microbiome_entities.py | skrakau/metapep | a425e3c0602d5149a8a634b10b682d9f6ed924c8 | [
"MIT"
] | 2 | 2021-08-19T08:09:36.000Z | 2021-12-13T08:45:25.000Z | #!/usr/bin/env python3
####################################################################################################
#
# Author: Leon Kuchenbecker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fo... | 51.218391 | 239 | 0.633079 |
7946526d5fb6040d4417cb9f3db4b1bd003e4142 | 398 | py | Python | ebu_tt_live/examples/__init__.py | ebu/ebu-tt-live-toolk | 8c67f83010d9fc0af5d3e270c70dce87674ad289 | [
"BSD-3-Clause"
] | 22 | 2016-01-12T10:24:27.000Z | 2022-02-17T15:40:09.000Z | ebu_tt_live/examples/__init__.py | ebu/ebu-tt-live-toolk | 8c67f83010d9fc0af5d3e270c70dce87674ad289 | [
"BSD-3-Clause"
] | 532 | 2016-04-22T13:44:11.000Z | 2021-12-21T17:39:36.000Z | ebu_tt_live/examples/__init__.py | ebu/ebu-tt-live-toolk | 8c67f83010d9fc0af5d3e270c70dce87674ad289 | [
"BSD-3-Clause"
] | 8 | 2016-04-04T12:38:30.000Z | 2019-09-05T08:01:58.000Z | from pkg_resources import ResourceManager, get_provider
def get_example_data(dataset_name):
"""
This is a smart package loader that locates text files inside our package
:param dataset_name:
:return:
"""
provider = get_provider('ebu_tt_live')
manager = ResourceManager()
source = provi... | 24.875 | 77 | 0.728643 |
794653393022035a16f39195d778530bbf680f0c | 1,969 | py | Python | trailblazer/cli/delete.py | jemten/trailblazer | dce3fe6ffd19e23c94fb6e223e4778a1c93960c9 | [
"MIT"
] | null | null | null | trailblazer/cli/delete.py | jemten/trailblazer | dce3fe6ffd19e23c94fb6e223e4778a1c93960c9 | [
"MIT"
] | null | null | null | trailblazer/cli/delete.py | jemten/trailblazer | dce3fe6ffd19e23c94fb6e223e4778a1c93960c9 | [
"MIT"
] | null | null | null | from pathlib import Path
import shutil
import click
@click.command()
@click.option('-f', '--force', is_flag=True, help='skip sanity checks')
@click.option('-y', '--yes', is_flag=True, help='skip manual confirmations')
@click.argument('analysis_id', type=int)
@click.pass_context
def delete(context, force, yes, analys... | 41.893617 | 100 | 0.631793 |
79465639827a1e7c5a2b4bb30a8aa456c4990488 | 867 | py | Python | tests/test_x2gray.py | samueljsluo/scikit-opt | b0676d5c659b9c2cd42a62d6099c02391cf381e6 | [
"MIT"
] | 3,178 | 2017-12-06T06:38:09.000Z | 2022-03-31T14:30:10.000Z | tests/test_x2gray.py | t3bol90/scikit-opt | 9282fcb6aadff3d4fbf16a36d2523735bbd1343b | [
"MIT"
] | 158 | 2018-01-21T02:21:29.000Z | 2022-03-19T11:12:54.000Z | tests/test_x2gray.py | t3bol90/scikit-opt | 9282fcb6aadff3d4fbf16a36d2523735bbd1343b | [
"MIT"
] | 807 | 2018-01-21T02:19:00.000Z | 2022-03-30T13:24:40.000Z | # -*- coding: utf-8 -*-
# @Time : 2019/10/15
# @Author : github.com/Agrover112 , github.com/guofei9987
import numpy as np
from sko.GA import GA
from sko.tool_kit import x2gray
import unittest
class TestX2Gray(unittest.TestCase):
def test_x2gray(self):
cases = [
[2, [-1, -1], [1, 1], 1e-... | 27.967742 | 113 | 0.564014 |
7946567ba9af252e225e9b8601e6b3cb772c3dcb | 1,278 | py | Python | tests/test_converters/test_conda.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1,880 | 2019-03-21T10:08:25.000Z | 2022-03-31T12:41:55.000Z | tests/test_converters/test_conda.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 356 | 2019-03-21T19:08:56.000Z | 2021-01-08T17:45:43.000Z | tests/test_converters/test_conda.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 157 | 2019-04-23T01:13:37.000Z | 2022-03-24T22:41:18.000Z | # project
from dephell.controllers import DependencyMaker
from dephell.converters.conda import CondaConverter
from dephell.models import Requirement, RootDependency
from dephell.yaml import yaml_load
def test_conda_loads():
content = '\n'.join([
'name: deeplearning',
'channels:',
'- defaul... | 31.95 | 87 | 0.647105 |
794656d3899a8a212cf2f9815a114b7aa7aab897 | 5,572 | py | Python | rover/core/servers/imu/runImuOnly.py | CSUFTitanRover/TitanRover2018 | 4926d377322a37ba644d7e852faa305fb8bb9b55 | [
"Apache-2.0"
] | 16 | 2017-09-01T23:33:17.000Z | 2021-01-04T02:41:19.000Z | rover/core/servers/imu/runImuOnly.py | CSUFTitanRover/TitanRover2018 | 4926d377322a37ba644d7e852faa305fb8bb9b55 | [
"Apache-2.0"
] | 56 | 2017-08-30T01:14:46.000Z | 2021-02-28T22:18:44.000Z | rover/core/servers/imu/runImuOnly.py | CSUFTitanRover/TitanRover2018 | 4926d377322a37ba644d7e852faa305fb8bb9b55 | [
"Apache-2.0"
] | 15 | 2017-09-14T19:55:55.000Z | 2020-05-03T19:44:39.000Z | # Simple Adafruit BNO055 sensor reading example. Will print the orientation
# and calibration data every second.
#
# Copyright (c) 2015 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "... | 37.904762 | 121 | 0.671034 |
7946575ca2e666179eddb6c5ca422d177b8a510d | 2,578 | py | Python | networks/decoder.py | Kinpzz/SANet-TMM | 46188e2f4b11727e8356b91b5e1e2453826e27fe | [
"MIT"
] | 6 | 2021-05-18T03:07:26.000Z | 2022-02-19T10:59:36.000Z | networks/decoder.py | Kinpzz/SANet-TMM | 46188e2f4b11727e8356b91b5e1e2453826e27fe | [
"MIT"
] | 2 | 2021-07-09T14:06:07.000Z | 2022-01-02T01:39:58.000Z | networks/decoder.py | Kinpzz/SANet-TMM | 46188e2f4b11727e8356b91b5e1e2453826e27fe | [
"MIT"
] | 1 | 2022-02-19T10:59:43.000Z | 2022-02-19T10:59:43.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class Decoder(nn.Module):
def __init__(self, mix_size, low_level_inplanes, num_classes, BatchNorm):
super(Decoder, self).__init__()
self.conv1 = nn.Conv2d(low_level_inplanes, 48, 1, bias=False)
self.bn1 = BatchN... | 44.448276 | 115 | 0.543445 |
7946578f4f3e9148f599bb3ed0a22efd2b42c002 | 12,673 | py | Python | models/dataset.py | magis-slac/NeuS | f3ef3c089b2076ea8d73679bf37a94ef44a08939 | [
"MIT"
] | null | null | null | models/dataset.py | magis-slac/NeuS | f3ef3c089b2076ea8d73679bf37a94ef44a08939 | [
"MIT"
] | null | null | null | models/dataset.py | magis-slac/NeuS | f3ef3c089b2076ea8d73679bf37a94ef44a08939 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
import cv2 as cv
import numpy as np
import os
from glob import glob
from icecream import ic
from scipy.spatial.transform import Rotation as Rot
from scipy.spatial.transform import Slerp
import pickle
import diffoptics as optics
from diffoptics import Rays
import sys
# Path... | 48.370229 | 217 | 0.609011 |
79465a0fd532b07e96285d1cf5897e63c44cfc9a | 41,198 | py | Python | tensorflow/python/data/experimental/ops/readers.py | nathanielchu/tensorflow | 92d160f610a6af39f644a265693cf16804ef78a9 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/experimental/ops/readers.py | nathanielchu/tensorflow | 92d160f610a6af39f644a265693cf16804ef78a9 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/experimental/ops/readers.py | nathanielchu/tensorflow | 92d160f610a6af39f644a265693cf16804ef78a9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.698381 | 87 | 0.688844 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.